From 66e7f9b04a2325fe00afd04d8abdab6ed78b7c4a Mon Sep 17 00:00:00 2001 From: juliawelborn <104529855+juliawelborn@users.noreply.github.com> Date: Fri, 17 Feb 2023 06:42:30 -0800 Subject: [PATCH] Update roleManagementAlertOperations properties (#22642) * Start updating paths * update all paths and examples * Change patch operations to 204 instead of 200 * Update operations paths * Add new properties to operation * Update RoleManagementAlerts.json * Delete GetAlertOperations.json * Update GetAlertOperationById.json * Fix accidental comma deletion * Update GetAlertOperationById.json * Update RefreshAlert.json * Update RefreshAllAlerts.json * Update RefreshAlert.json * Fix date formatting * Fix date format * Fix date format * Update RefreshAlert.json * Remove unused type * Add remediatable to custom words --- custom-words.txt | 1 + .../RoleManagementAlerts.json | 80 +++++-------------- .../examples/GetAlertOperationById.json | 6 +- .../examples/GetAlertOperations.json | 30 ------- .../examples/RefreshAlert.json | 6 +- .../examples/RefreshAllAlerts.json | 6 +- 6 files changed, 38 insertions(+), 91 deletions(-) delete mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertOperations.json diff --git a/custom-words.txt b/custom-words.txt index e8330b543ff0..86b526b493db 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2713,3 +2713,4 @@ Mebibytes UTURN Isochrone Ochestrator +remediatable diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/RoleManagementAlerts.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/RoleManagementAlerts.json index fc5f10405394..d54c295875cf 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/RoleManagementAlerts.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/RoleManagementAlerts.json @@ -738,47 +738,6 @@ } } } - }, - "/{scope}/providers/Microsoft.Authorization/roleManagementAlertOperations": { - "get": { - "tags": [ - "AlertOperations" - ], - "operationId": "AlertOperation_ListForScope", - "description": "Gets alert operations for a resource scope.", - "parameters": [ - { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope of the alert operation.", - "x-ms-skip-url-encoding": true - }, - { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of the operations.", - "schema": { - "$ref": "#/definitions/AlertOperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-examples": { - "GetAlertOperations": { - "$ref": "./examples/GetAlertOperations.json" - } - } - } } }, "definitions": { @@ -1328,6 +1287,28 @@ "type": "string", "readOnly": true, "description": "The status of the alert operation." + }, + "statusDetail": { + "type": "string", + "readOnly": true, + "description": "The status detail of the alert operation." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "The created date of the alert operation." + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "The last action date of the alert operation." + }, + "resourceLocation": { + "type": "string", + "readOnly": true, + "description": "The location of the alert associated with the operation." } }, "type": "object", @@ -1343,23 +1324,6 @@ "type": "object", "description": "An error response from the service." }, - "AlertOperationListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertOperationResult" - }, - "description": "Alert operation list" - }, - "nextLink": { - "type": "string", - "description": "The URL to use for getting the next set of results." - } - }, - "type": "object", - "description": "Alert operation list operation result." - }, "CloudErrorBody": { "x-ms-external": true, "properties": { diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertOperationById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertOperationById.json index 05ff8cc1e935..950a30516fba 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertOperationById.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertOperationById.json @@ -8,7 +8,11 @@ "200": { "body": { "id": "{operationId}", - "status": "Running" + "status": "Running", + "statusDetail": "{\"result\":[{\"name\":\"DuplicateRoleCreated\",\"statusDetail\":\"Alert scan is not yet started.\"}]}", + "lastActionDateTime": "2022-04-05T03:04:06.467+00:00", + "createdDateTime": "2022-04-05T03:04:06.467+00:00", + "resourceLocation": "https://management.azure.com/providers/Microsoft.Subscription/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/DuplicateRoleCreated?api-version=2022-08-01-preview" } } } diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertOperations.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertOperations.json deleted file mode 100644 index 2ab7f27e7e97..000000000000 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/GetAlertOperations.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parameters": { - "scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f", - "api-version": "2022-08-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "{operationId}", - "status": "Running" - }, - { - "id": "{operationId}", - "status": "NotStarted" - }, - { - "id": "{operationId}", - "status": "NotStarted" - }, - { - "id": "{operationId}", - "status": "Succeeded" - } - ] - } - } - } -} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAlert.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAlert.json index f05718a689d8..6078716bec60 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAlert.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAlert.json @@ -11,7 +11,11 @@ }, "body": { "id": "{operationId}", - "status": "NotStarted" + "status": "Running", + "statusDetail": "{\"result\":[{\"name\":\"AzureRolesAssignedOutsidePimAlert\",\"statusDetail\":\"Alert scan is running.\"}]}", + "lastActionDateTime": "2022-04-05T03:04:06.467+00:00", + "createdDateTime": "2022-04-05T03:04:06.467+00:00", + "resourceLocation": "https://management.azure.com/providers/Microsoft.Subscription/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/AzureRolesAssignedOutsidePimAlert?api-version=2022-08-01-preview" } } } diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAllAlerts.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAllAlerts.json index b4308eae67e0..dc3bd2acdfa2 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAllAlerts.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2022-08-01-preview/examples/RefreshAllAlerts.json @@ -10,7 +10,11 @@ }, "body": { "id": "{operationId}", - "status": "NotStarted" + "status": "notStarted", + "statusDetail": "{\"result\":[{\"name\":\"AzureRolesAssignedOutsidePimAlert\",\"statusDetail\":\"Alert scan is not yet started.\"}, {\"name\":\"DuplicateRoleCreated\",\"statusDetail\":\"Alert scan is not yet started.\"}]}", + "lastActionDateTime": "2022-04-05T03:04:06.467+00:00", + "createdDateTime": "2022-04-05T03:04:06.467+00:00", + "resourceLocation": "https://management.azure.com/providers/Microsoft.Subscription/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts?api-version=2022-08-01-preview" } } }