From a1871e8cde55e065c28709a4030151a92c058708 Mon Sep 17 00:00:00 2001 From: Itiel Maimon Date: Tue, 16 Jan 2024 14:28:19 +0200 Subject: [PATCH 1/9] Added Microsoft.SecurityInsights Recommendations API 2024-01-01-preview --- .../2024-01-01-preview/Recommendations.json | 423 ++++++++++++++++++ .../recommendations/GetRecommendation.json | 37 ++ .../recommendations/GetRecommendations.json | 40 ++ .../recommendations/PatchRecommendation.json | 45 ++ .../ReevaluateRecommendation.json | 19 + 5 files changed, 564 insertions(+) create mode 100644 specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json create mode 100644 specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendation.json create mode 100644 specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendations.json create mode 100644 specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json create mode 100644 specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json new file mode 100644 index 000000000000..087dc9733731 --- /dev/null +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json @@ -0,0 +1,423 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Insights", + "description": "API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider", + "version": "2024-01-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations": { + "get": { + "x-ms-examples": { + "Get Recommendations list.": { + "$ref": "./examples/recommendations/GetRecommendations.json" + } + }, + "tags": [ + "recommendations" + ], + "description": "Gets a list of all recommendations.", + "operationId": "GetRecommendations_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RecommendationList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/2.0/types.json#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations/{recommendationId}": { + "get": { + "x-ms-examples": { + "Get a recommendation.": { + "$ref": "./examples/recommendations/GetRecommendation.json" + } + }, + "tags": [ + "recommendations" + ], + "description": "Gets a recommendation by its id.", + "operationId": "Get_SingleRecommendation", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName" + }, + { + "$ref": "#/parameters/RecommendationId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Recommendation" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/2.0/types.json#/definitions/CloudError" + } + } + } + }, + "patch": { + "x-ms-examples": { + "Creates a recommendation.": { + "$ref": "./examples/recommendations/PatchRecommendation.json" + } + }, + "tags": [ + "recommendations" + ], + "description": "Patch a recommendation.", + "operationId": "Update_Recommendation", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName" + }, + { + "$ref": "#/parameters/RecommendationId" + }, + { + "$ref": "#/parameters/RecommendationPatch" + } + ], + "x-ms-long-running-operation": true, + "responses": { + "202": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Recommendation" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/2.0/types.json#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations/{recommendationId}/triggerEvaluation": { + "post": { + "x-ms-examples": { + "Reevaluate a recommendation.": { + "$ref": "./examples/recommendations/ReevaluateRecommendation.json" + } + }, + "tags": [ + "recommendations" + ], + "description": "Reevaluate a recommendation.", + "operationId": "Reevaluate_Recommendation", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName" + }, + { + "$ref": "#/parameters/RecommendationId" + } + ], + "x-ms-long-running-operation": true, + "responses": { + "202": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ReevaluateResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/2.0/types.json#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "Recommendation": { + "description": "Recommendation object.", + "properties": { + "recommendationTypeId": { + "description": "Id of the recommendation type.", + "type": "string" + }, + "state": { + "description": "State of the recommendation.", + "$ref": "#/definitions/RecommendationState" + }, + "title": { + "description": "Title of the recommendation.", + "type": "string" + }, + "description": { + "description": "Description of the recommendation.", + "type": "string" + }, + "creationTimeUtc": { + "description": "The time stamp (UTC) when the recommendation was created.", + "type": "string", + "format": "date-time" + }, + "lastEvaluatedTimeUtc": { + "description": "The time stamp (UTC) when the recommendation was last evaluated.", + "type": "string", + "format": "date-time" + }, + "lastModifiedTimeUtc": { + "description": "The time stamp (UTC) when the recommendation was last modified.", + "type": "string", + "format": "date-time" + }, + "suggestions": { + "description": "List of suggestions to take for this recommendation.", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendedSuggestion" + }, + "x-ms-identifiers": [] + }, + "resourceId": { + "description": "Id of the resource this recommendation refers to.", + "type": "string", + "x-nullable": true + }, + "additionalProperties": { + "description": "Collection of additional properties for the recommendation.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-nullable": true + } + }, + "required": [ + "recommendationTypeId", + "state", + "title", + "description", + "creationTimeUtc", + "lastEvaluatedTimeUtc", + "lastModifiedTimeUtc", + "suggestions" + ], + "type": "object" + }, + "RecommendationList": { + "description": "A list of recommendations", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Recommendation" + }, + "description": "An list of recommendations" + } + }, + "type": "object" + }, + "RecommendedSuggestion": { + "description": "What suggestions should be taken to complete the recommendation.", + "properties": { + "suggestionTypeId": { + "description": "Id of the suggestion type.", + "type": "string" + }, + "title": { + "description": "Title of the suggestion.", + "type": "string" + }, + "description": { + "description": "Description of the suggestion.", + "type": "string" + }, + "action": { + "description": "Action of the suggestion.", + "type": "string" + }, + "additionalProperties": { + "description": "Collection of additional properties for the suggestion.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-nullable": true + } + }, + "required": [ + "suggestionTypeId", + "title", + "description", + "action" + ], + "type": "object" + }, + "RecommendationPatch": { + "description": "Recommendation Fields to update.", + "properties": { + "state": { + "description": "State of the recommendation.", + "$ref": "#/definitions/RecommendationState" + } + }, + "type": "object" + }, + "RecommendationState": { + "description": "State of recommendation.", + "type": "string", + "enum": [ + "Active", + "InProgress", + "Dismissed", + "CompletedByUser", + "CompletedBySystem" + ], + "x-ms-enum": { + "name": "State", + "modelAsString": true, + "values": [ + { + "value": "Active", + "description": "Recommendation is active." + }, + { + "value": "InProgress", + "description": "Recommendation is in progress." + }, + { + "value": "Dismissed", + "description": "Recommendation has been dismissed." + }, + { + "value": "CompletedByUser", + "description": "Recommendation has been completed by user." + }, + { + "value": "CompletedBySystem", + "description": "Recommendation has been completed by the system." + } + ] + } + }, + "ReevaluateResponse": { + "description": "Reevaluate response object.", + "properties": { + "lastEvaluatedTimeUtc": { + "description": "The time stamp (UTC) when the recommendation was last evaluated.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "lastEvaluatedTimeUtc" + ], + "type": "object" + } + }, + "parameters": { + "RecommendationId": { + "description": "Recommendation Id.", + "in": "path", + "name": "recommendationId", + "required": true, + "type": "string", + "format": "uuid", + "x-ms-parameter-location": "method" + }, + "RecommendationPatch": { + "description": "Recommendation Fields to Update.", + "in": "body", + "name": "recommendationPatch", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RecommendationPatch" + }, + "x-ms-identifiers": [] + }, + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendation.json new file mode 100644 index 000000000000..2392be793ff2 --- /dev/null +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendation.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2024-01-01-preview", + "subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", + "resourceGroupName": "myRg", + "workspaceName": "myWorkspace", + "recommendationId": "6d4b54eb-8684-4aa3-a156-3aa37b8014bc" + }, + "responses": { + "200": { + "body": { + "recommendationTypeId": "Swagger_Example", + "state": "CompletedBySystem", + "title": "someText", + "description": "someText", + "creationTimeUtc": "2022-02-19T03:09:03.4888396+00:00", + "lastEvaluatedTimeUtc": "2022-02-19T03:09:03.4888396+00:00", + "lastModifiedTimeUtc": "2022-02-19T03:57:31.7964447+00:00", + "suggestions": [ + { + "suggestionTypeId": "ThreatIntelligence_Example_Suggestion_Example", + "title": "someText", + "description": "someText", + "action": "someText", + "additionalProperties": { + "someKey": "someValue" + } + } + ], + "resourceId": "someId", + "additionalProperties": { + "someKey": "someValue" + } + } + } + } +} \ No newline at end of file diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendations.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendations.json new file mode 100644 index 000000000000..10cb0360da93 --- /dev/null +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendations.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2024-01-01-preview", + "subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", + "resourceGroupName": "myRg", + "workspaceName": "myWorkspace" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "recommendationTypeId": "ThreatIntelligence_Example", + "state": "CompletedBySystem", + "title": "someText", + "description": "someText", + "creationTimeUtc": "2022-02-19T03:09:03.4888396+00:00", + "lastEvaluatedTimeUtc": "2022-02-19T03:09:03.4888396+00:00", + "lastModifiedTimeUtc": "2022-02-19T03:57:31.7964447+00:00", + "suggestions": [ + { + "suggestionTypeId": "ThreatIntelligence_Example_Suggestion_Example", + "title": "someText", + "description": "someText", + "action": "someText", + "additionalProperties": { + "someKey": "someValue" + } + } + ], + "resourceId": "someId", + "additionalProperties": { + "someKey": "someValue" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json new file mode 100644 index 000000000000..fc17af4cce4b --- /dev/null +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2024-01-01-preview", + "subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", + "resourceGroupName": "myRg", + "workspaceName": "myWorkspace", + "recommendationId": "6d4b54eb-8684-4aa3-a156-3aa37b8014bc", + "recommendationPatch": [ + { + "state": "Active" + } + ] + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc?api-version=2024-01-01-preview" + }, + "body": { + "recommendationTypeId": "ThreatIntelligence_Example", + "state": "CompletedByUser", + "title": "someText", + "description": "someText", + "creationTimeUtc": "2022-02-19T03:09:03.4888396+00:00", + "lastEvaluatedTimeUtc": "2022-02-19T03:09:03.4888396+00:00", + "lastModifiedTimeUtc": "2022-02-19T03:57:31.7964447+00:00", + "suggestions": [ + { + "suggestionTypeId": "ThreatIntelligence_Example_Suggestion_Example", + "title": "someText", + "description": "someText", + "action": "someText", + "additionalProperties": { + "someKey": "someValue" + } + } + ], + "resourceId": "someId", + "additionalProperties": { + "someKey": "someValue" + } + } + } + } +} \ No newline at end of file diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json new file mode 100644 index 000000000000..b0b537599f42 --- /dev/null +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2024-01-01-preview", + "subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", + "resourceGroupName": "myRg", + "workspaceName": "myWorkspace", + "recommendationId": "6d4b54eb-8684-4aa3-a156-3aa37b8014bc" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc/triggerEvaluation?api-version=2024-01-01-preview" + }, + "body": { + "lastEvaluatedTimeUtc": "2023-10-10T03:09:03.4888396+00:00" + } + } + } +} \ No newline at end of file From 834da4645ebd25635852b13e516b511388d4e85f Mon Sep 17 00:00:00 2001 From: Itiel Maimon Date: Wed, 7 Feb 2024 14:35:24 +0200 Subject: [PATCH 2/9] prettier --- .../preview/2024-01-01-preview/Recommendations.json | 2 +- .../examples/recommendations/GetRecommendation.json | 2 +- .../examples/recommendations/GetRecommendations.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json index 087dc9733731..fc1d965b7af7 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json @@ -420,4 +420,4 @@ "x-ms-parameter-location": "method" } } -} \ No newline at end of file +} diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendation.json index 2392be793ff2..8d764080ce43 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendation.json @@ -34,4 +34,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendations.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendations.json index 10cb0360da93..a09c474f7ed2 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendations.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/GetRecommendations.json @@ -37,4 +37,4 @@ } } } -} \ No newline at end of file +} From 233d2c8ded4e59f8a1cf0a92dd14d8498c6a6474 Mon Sep 17 00:00:00 2001 From: Itiel Maimon Date: Wed, 7 Feb 2024 14:46:09 +0200 Subject: [PATCH 3/9] prettier --- .../recommendations/PatchRecommendation.json | 2 +- .../ReevaluateRecommendation.json | 36 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json index fc17af4cce4b..7bdc8c78064b 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json @@ -42,4 +42,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json index b0b537599f42..c0975790c470 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json @@ -1,19 +1,19 @@ { - "parameters": { - "api-version": "2024-01-01-preview", - "subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", - "resourceGroupName": "myRg", - "workspaceName": "myWorkspace", - "recommendationId": "6d4b54eb-8684-4aa3-a156-3aa37b8014bc" - }, - "responses": { - "202": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc/triggerEvaluation?api-version=2024-01-01-preview" - }, - "body": { - "lastEvaluatedTimeUtc": "2023-10-10T03:09:03.4888396+00:00" - } - } - } -} \ No newline at end of file + "parameters": { + "api-version": "2024-01-01-preview", + "subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", + "resourceGroupName": "myRg", + "workspaceName": "myWorkspace", + "recommendationId": "6d4b54eb-8684-4aa3-a156-3aa37b8014bc" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc/triggerEvaluation?api-version=2024-01-01-preview" + }, + "body": { + "lastEvaluatedTimeUtc": "2023-10-10T03:09:03.4888396+00:00" + } + } + } +} From 09152f2bef0c5f44672a8268b29ff37357d82e58 Mon Sep 17 00:00:00 2001 From: Itiel Maimon Date: Mon, 12 Feb 2024 15:36:22 +0200 Subject: [PATCH 4/9] cr --- .../examples/recommendations/PatchRecommendation.json | 3 --- .../examples/recommendations/ReevaluateRecommendation.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json index 7bdc8c78064b..232e10ad66e9 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json @@ -13,9 +13,6 @@ }, "responses": { "202": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc?api-version=2024-01-01-preview" - }, "body": { "recommendationTypeId": "ThreatIntelligence_Example", "state": "CompletedByUser", diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json index c0975790c470..b18af8c74311 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json @@ -8,9 +8,6 @@ }, "responses": { "202": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc/triggerEvaluation?api-version=2024-01-01-preview" - }, "body": { "lastEvaluatedTimeUtc": "2023-10-10T03:09:03.4888396+00:00" } From 437921feec6ca9e5d79def315bb49c5a202da476 Mon Sep 17 00:00:00 2001 From: Itiel Maimon Date: Tue, 13 Feb 2024 12:39:17 +0200 Subject: [PATCH 5/9] Added back Azure-AsyncOperation header --- .../examples/recommendations/PatchRecommendation.json | 3 +++ .../examples/recommendations/ReevaluateRecommendation.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json index 232e10ad66e9..45904f3b1345 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json @@ -13,6 +13,9 @@ }, "responses": { "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc/triggerEvaluation?api-version=2024-01-01-preview" + }, "body": { "recommendationTypeId": "ThreatIntelligence_Example", "state": "CompletedByUser", diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json index b18af8c74311..c0975790c470 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json @@ -8,6 +8,9 @@ }, "responses": { "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc/triggerEvaluation?api-version=2024-01-01-preview" + }, "body": { "lastEvaluatedTimeUtc": "2023-10-10T03:09:03.4888396+00:00" } From 2d38d0f6f105f1b213ba3c67e7968fb98351a674 Mon Sep 17 00:00:00 2001 From: Itiel Maimon Date: Thu, 15 Feb 2024 11:28:25 +0200 Subject: [PATCH 6/9] cr --- .../preview/2024-01-01-preview/Recommendations.json | 2 -- .../examples/recommendations/PatchRecommendation.json | 3 --- .../examples/recommendations/ReevaluateRecommendation.json | 3 --- 3 files changed, 8 deletions(-) diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json index fc1d965b7af7..3fe899a76232 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json @@ -151,7 +151,6 @@ "$ref": "#/parameters/RecommendationPatch" } ], - "x-ms-long-running-operation": true, "responses": { "202": { "description": "OK", @@ -197,7 +196,6 @@ "$ref": "#/parameters/RecommendationId" } ], - "x-ms-long-running-operation": true, "responses": { "202": { "description": "OK", diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json index 45904f3b1345..232e10ad66e9 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json @@ -13,9 +13,6 @@ }, "responses": { "202": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc/triggerEvaluation?api-version=2024-01-01-preview" - }, "body": { "recommendationTypeId": "ThreatIntelligence_Example", "state": "CompletedByUser", diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json index c0975790c470..b18af8c74311 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json @@ -8,9 +8,6 @@ }, "responses": { "202": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SecurityInsights/recommendations/6d4b54eb-8684-4aa3-a156-3aa37b8014bc/triggerEvaluation?api-version=2024-01-01-preview" - }, "body": { "lastEvaluatedTimeUtc": "2023-10-10T03:09:03.4888396+00:00" } From bbb514a185194fce2c40e45d42e8f113be2a237a Mon Sep 17 00:00:00 2001 From: Itiel Maimon Date: Thu, 15 Feb 2024 11:38:13 +0200 Subject: [PATCH 7/9] cr --- .../preview/2024-01-01-preview/Recommendations.json | 6 ++---- .../examples/recommendations/PatchRecommendation.json | 8 +++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json index 3fe899a76232..581473869a31 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json @@ -409,10 +409,8 @@ "name": "recommendationPatch", "required": true, "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RecommendationPatch" - }, + "type": "object", + "$ref": "#/definitions/RecommendationPatch", "x-ms-identifiers": [] }, "x-ms-parameter-location": "method" diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json index 232e10ad66e9..a39c00354ddd 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json @@ -5,11 +5,9 @@ "resourceGroupName": "myRg", "workspaceName": "myWorkspace", "recommendationId": "6d4b54eb-8684-4aa3-a156-3aa37b8014bc", - "recommendationPatch": [ - { - "state": "Active" - } - ] + "recommendationPatch": { + "state": "Active" + } }, "responses": { "202": { From 48421afdc34eedc2b0f89406e41e8dbf76548ddb Mon Sep 17 00:00:00 2001 From: Itiel Maimon Date: Mon, 19 Feb 2024 14:28:07 +0200 Subject: [PATCH 8/9] cr --- .../preview/2024-01-01-preview/Recommendations.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json index 581473869a31..884cd7d25d55 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/Recommendations.json @@ -152,7 +152,7 @@ } ], "responses": { - "202": { + "200": { "description": "OK", "schema": { "$ref": "#/definitions/Recommendation" @@ -197,7 +197,7 @@ } ], "responses": { - "202": { + "200": { "description": "OK", "schema": { "$ref": "#/definitions/ReevaluateResponse" From ec7aae3a9507c33c761a161749b0bc72e20c0c29 Mon Sep 17 00:00:00 2001 From: Itiel Maimon Date: Mon, 19 Feb 2024 14:29:42 +0200 Subject: [PATCH 9/9] cr --- .../examples/recommendations/PatchRecommendation.json | 2 +- .../examples/recommendations/ReevaluateRecommendation.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json index a39c00354ddd..16b2f48d55ba 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/PatchRecommendation.json @@ -10,7 +10,7 @@ } }, "responses": { - "202": { + "200": { "body": { "recommendationTypeId": "ThreatIntelligence_Example", "state": "CompletedByUser", diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json index b18af8c74311..8a62608705c2 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2024-01-01-preview/examples/recommendations/ReevaluateRecommendation.json @@ -7,7 +7,7 @@ "recommendationId": "6d4b54eb-8684-4aa3-a156-3aa37b8014bc" }, "responses": { - "202": { + "200": { "body": { "lastEvaluatedTimeUtc": "2023-10-10T03:09:03.4888396+00:00" }