diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/Watchlists.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/Watchlists.json index 3930dfd2368f..e89bd202557c 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/Watchlists.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/Watchlists.json @@ -155,8 +155,18 @@ } ], "responses": { - "200": { - "description": "OK" + "202": { + "description": "OK", + "headers": { + "Azure-AsyncOperation": { + "description": "Contains the status URL on which clients are expected to poll the status of the delete operation.", + "type": "string" + }, + "Location": { + "description": "Location URL to poll for result.", + "type": "string" + } + } }, "204": { "description": "No Content" @@ -164,9 +174,13 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../common/2.0/types.json#/definitions/CloudError" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" } }, "put": { @@ -211,17 +225,27 @@ } }, "201": { - "description": "Created", + "description": "Created. The response includes the Provisioning State and the Azure-AsyncOperation header. To get the progress of the operation, call GET operation on the URL in Azure-AsyncOperation header field.", "schema": { "$ref": "#/definitions/Watchlist" + }, + "headers": { + "Azure-AsyncOperation": { + "description": "Contains the status URL on which clients are expected to poll the status of the operation.", + "type": "string" + } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../common/2.0/types.json#/definitions/CloudError" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" } } }, @@ -480,9 +504,31 @@ "type": "string" }, "source": { - "description": "The source of the watchlist. Only accepts \"Local file\" and \"Remote storage\". And it must included in the request.", + "description": "The filename of the watchlist, called 'source'", "type": "string" }, + "sourceType": { + "description": "The sourceType of the watchlist", + "enum": [ + "Local file", + "Remote storage" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "sourceType", + "values": [ + { + "description": "The source from local file.", + "value": "Local file" + }, + { + "description": "The source from remote storage.", + "value": "Remote storage" + } + ] + } + }, "created": { "description": "The time the watchlist was created", "format": "date-time", @@ -536,12 +582,12 @@ "type": "string" }, "numberOfLinesToSkip": { - "description": "The number of lines in a csv content to skip before the header", + "description": "The number of lines in a csv/tsv content to skip before the header", "type": "integer", "format": "int32" }, "rawContent": { - "description": "The raw content that represents to watchlist items to create. Example : This line will be skipped\nheader1,header2\nvalue1,value2", + "description": "The raw content that represents to watchlist items to create. In case of csv/tsv content type, it's the content of the file that will parsed by the endpoint", "type": "string" }, "itemsSearchKey": { @@ -549,12 +595,15 @@ "type": "string" }, "contentType": { - "description": "The content type of the raw content. For now, only text/csv is valid", + "description": "The content type of the raw content. Example : text/csv or text/tsv", "type": "string" }, "uploadStatus": { "description": "The status of the Watchlist upload : New, InProgress or Complete. **Note** : When a Watchlist upload status is InProgress, the Watchlist cannot be deleted", "type": "string" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState" } }, "required": [ @@ -653,6 +702,54 @@ "itemsKeyValue" ], "type": "object" + }, + "ProvisioningState": { + "description": "Describes provisioning state", + "enum": [ + "New", + "InProgress", + "Uploading", + "Deleting", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "description": "The New provisioning state.", + "value": "New" + }, + { + "description": "The InProgress provisioning state.", + "value": "InProgress" + }, + { + "description": "The Uploading provisioning state.", + "value": "Uploading" + }, + { + "description": "The Deleting provisioning state.", + "value": "Deleting" + }, + { + "description": "The Succeeded provisioning state.", + "value": "Succeeded" + }, + { + "description": "The Failed provisioning state.", + "value": "Failed" + }, + { + "description": "The Canceled provisioning state.", + "value": "Canceled" + } + ] + }, + "readOnly": true } }, "parameters": { diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/CreateWatchlist.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/CreateWatchlist.json index e364f5cb5fa8..227c2dd5910b 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/CreateWatchlist.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/CreateWatchlist.json @@ -10,7 +10,8 @@ "etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"", "properties": { "displayName": "High Value Assets Watchlist", - "source": "Local file", + "source": "watchlist.csv", + "sourceType": "Local file", "provider": "Microsoft", "description": "Watchlist from CSV content", "itemsSearchKey": "header1" @@ -28,7 +29,8 @@ "watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017", "displayName": "High Value Assets Watchlist", "provider": "Microsoft", - "source": "Local file", + "source": "watchlist.csv", + "sourceType": "Local file", "created": "2020-09-28T00:26:54.7746089+00:00", "updated": "2020-09-28T00:26:57+00:00", "createdBy": { @@ -60,7 +62,8 @@ "watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017", "displayName": "High Value Assets Watchlist", "provider": "Microsoft", - "source": "Local file", + "source": "watchlist.csv", + "sourceType": "Local file", "created": "2020-09-28T00:26:54.7746089+00:00", "updated": "2020-09-28T00:26:57+00:00", "createdBy": { @@ -84,4 +87,3 @@ } } } - diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/CreateWatchlistAndWatchlistItems.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/CreateWatchlistAndWatchlistItems.json index 417d244285cb..ff47d4103034 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/CreateWatchlistAndWatchlistItems.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/CreateWatchlistAndWatchlistItems.json @@ -10,7 +10,8 @@ "etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"", "properties": { "displayName": "High Value Assets Watchlist", - "source": "Local file", + "source": "watchlist.csv", + "sourceType": "Local file", "provider": "Microsoft", "description": "Watchlist from CSV content", "numberOfLinesToSkip": 1, @@ -31,7 +32,8 @@ "watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017", "displayName": "High Value Assets Watchlist", "provider": "Microsoft", - "source": "Local file", + "source": "watchlist.csv", + "sourceType": "Local file", "created": "2020-09-28T00:26:54.7746089+00:00", "updated": "2020-09-28T00:26:57+00:00", "createdBy": { @@ -63,7 +65,8 @@ "watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017", "displayName": "High Value Assets Watchlist", "provider": "Microsoft", - "source": "Local file", + "source": "watchlist.csv", + "sourceType": "Local file", "created": "2020-09-28T00:26:54.7746089+00:00", "updated": "2020-09-28T00:26:57+00:00", "createdBy": { @@ -87,4 +90,3 @@ } } } - diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/DeleteWatchlist.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/DeleteWatchlist.json index 0a5064acfc5b..50a65b6ab412 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/DeleteWatchlist.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/DeleteWatchlist.json @@ -8,8 +8,11 @@ "watchlistAlias": "highValueAsset" }, "responses": { - "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/watchlists/1011-01/watchlistStatuses/00000000-0000-0000-0000-000000000000?api-version=2024-09-01" + } + }, "204": {} } } - diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/GetWatchlistByAlias.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/GetWatchlistByAlias.json index c62b537c8d30..0232879b0b2a 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/GetWatchlistByAlias.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/GetWatchlistByAlias.json @@ -18,7 +18,8 @@ "watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017", "displayName": "High Value Assets Watchlist", "provider": "Microsoft", - "source": "Local file", + "source": "watchlist.csv", + "sourceType": "Local file", "created": "2020-09-28T00:26:54.7746089+00:00", "updated": "2020-09-28T00:26:57+00:00", "createdBy": { @@ -47,4 +48,3 @@ } } } - diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/GetWatchlists.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/GetWatchlists.json index f729225d9a58..0d33c8a99ee9 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/GetWatchlists.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2024-09-01/examples/watchlists/GetWatchlists.json @@ -19,7 +19,8 @@ "watchlistId": "76d5a51f-ba1f-4038-9d22-59fda38dc017", "displayName": "High Value Assets Watchlist", "provider": "Microsoft", - "source": "Local file", + "source": "watchlist.csv", + "sourceType": "Local file", "created": "2020-09-28T00:26:54.7746089+00:00", "updated": "2020-09-28T00:26:57+00:00", "createdBy": { @@ -50,4 +51,3 @@ } } } -