diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetGovernanceRuleExecuteStatus_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetGovernanceRuleExecuteStatus_example.json index c8a0bc956ec1..34d59ce6df71 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetGovernanceRuleExecuteStatus_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetGovernanceRuleExecuteStatus_example.json @@ -11,7 +11,7 @@ }, "200": { "body": { - "operationId": "58b33f4f-c8c7-4b01-99cc-d437db4d40dd" + "status": "Succeeded" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRuleDeleteStatus_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRuleDeleteStatus_example.json deleted file mode 100644 index 3e745429ec66..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRuleDeleteStatus_example.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "api-version": "2022-01-01-preview", - "managementGroupId": "contoso", - "ruleId": "ad9a8e26-29d9-4829-bb30-e597a58cdbb8", - "operationId": "58b33f4f-c8c7-4b01-99cc-d437db4d40dd" - }, - "responses": { - "202": { - "location": "https://management.azure.com/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8/delete/operationResults/58b33f4f-c8c7-4b01-99cc-d437db4d40dd?api-version=2022-01-01-preview" - }, - "204": {} - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRuleExecuteStatus_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRuleExecuteStatus_example.json index 057d6492413c..37eca3d6e94e 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRuleExecuteStatus_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetManagementGroupGovernanceRuleExecuteStatus_example.json @@ -7,11 +7,11 @@ }, "responses": { "202": { - "location": "https://management.azure.com/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8/execute/operationResults/58b33f4f-c8c7-4b01-99cc-d437db4d40dd?api-version=2022-01-01-preview" + "location": "https://management.azure.com/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/governanceRules/ad9a8e26-29d9-4829-bb30-e597a58cdbb8/operationResults/58b33f4f-c8c7-4b01-99cc-d437db4d40dd?api-version=2022-01-01-preview" }, "200": { "body": { - "operationId": "58b33f4f-c8c7-4b01-99cc-d437db4d40dd" + "status": "Succeeded" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetSecurityConnectorGovernanceRuleExecuteStatus_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetSecurityConnectorGovernanceRuleExecuteStatus_example.json index f1f6fb2e254f..f74dbcec8748 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetSecurityConnectorGovernanceRuleExecuteStatus_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/examples/GovernanceRules/GetSecurityConnectorGovernanceRuleExecuteStatus_example.json @@ -13,7 +13,7 @@ }, "200": { "body": { - "operationId": "58b33f4f-c8c7-4b01-99cc-d437db4d40dd" + "status": "Succeeded" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/governanceRules.json b/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/governanceRules.json index 22f4734fbc73..26f3b8ac81be 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/governanceRules.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2022-01-01-preview/governanceRules.json @@ -366,7 +366,7 @@ "description": "OK - Governance rule was deleted" }, "202": { - "description": "Accepted - Governance rule deletion on management scope", + "description": "Accepted - The operation still in progress", "headers": { "location": { "type": "string", @@ -437,7 +437,7 @@ "GovernanceRules" ], "description": "Get a specific governance rule for the requested scope by ruleId", - "operationId": "managementGroupGovernanceRules_Get", + "operationId": "ManagementGroupGovernanceRules_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -534,7 +534,7 @@ ], "responses": { "202": { - "description": "Accepted - Governance rule deletion on management scope", + "description": "Accepted - The operation still in progress", "headers": { "location": { "type": "string", @@ -711,15 +711,15 @@ "/subscriptions/{subscriptionId}/providers/Microsoft.Security/governanceRules/{ruleId}/operationResults/{operationId}": { "get": { "x-ms-examples": { - "Get governance rules execution status by specific governanceRuleId": { + "Get governance rules long run operation result by specific governance rule ID": { "$ref": "./examples/GovernanceRules/GetGovernanceRuleExecuteStatus_example.json" } }, "tags": [ "GovernanceRules" ], - "description": "Get a specific governance rule execution status for the requested scope by ruleId and operationId", - "operationId": "SubscriptionGovernanceRulesExecuteStatus_Get", + "description": "Get governance rules long run operation result for the requested scope by ruleId and operationId", + "operationId": "SubscriptionGovernanceRulesOperationResult_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -736,13 +736,13 @@ ], "responses": { "200": { - "description": "OK", + "description": "OK - The operation completed", "schema": { - "$ref": "#/definitions/ExecuteRuleStatus" + "$ref": "#/definitions/OperationResult" } }, "202": { - "description": "Accepted", + "description": "Accepted - The operation still in progress", "headers": { "location": { "type": "string", @@ -762,15 +762,15 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName}/providers/Microsoft.Security/governanceRules/{ruleId}/operationResults/{operationId}": { "get": { "x-ms-examples": { - "Get governance rules execution status by specific governanceRuleId": { + "Get governance rules long run operation result by specific governance rule ID": { "$ref": "./examples/GovernanceRules/GetSecurityConnectorGovernanceRuleExecuteStatus_example.json" } }, "tags": [ "GovernanceRules" ], - "description": "Get a specific governance rule execution status for the requested scope by ruleId and operationId", - "operationId": "SecurityConnectorGovernanceRulesExecuteStatus_Get", + "description": "Get governance rule long run operation result for the requested scope by ruleId and operationId", + "operationId": "SecurityConnectorGovernanceRulesOperationResult_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -793,13 +793,13 @@ ], "responses": { "200": { - "description": "OK", + "description": "OK - The operation completed", "schema": { - "$ref": "#/definitions/ExecuteRuleStatus" + "$ref": "#/definitions/OperationResult" } }, "202": { - "description": "Accepted", + "description": "Accepted - The operation still in progress", "headers": { "location": { "type": "string", @@ -816,18 +816,18 @@ } } }, - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Security/governanceRules/{ruleId}/execute/operationResults/{operationId}": { + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Security/governanceRules/{ruleId}/operationResults/{operationId}": { "get": { "x-ms-examples": { - "Get governance rules execution status by specific governance rule ID": { + "Get governance rules long run operation result by specific governance rule ID": { "$ref": "./examples/GovernanceRules/GetManagementGroupGovernanceRuleExecuteStatus_example.json" } }, "tags": [ "GovernanceRules" ], - "description": "Get a specific governance rule execution status for the requested scope by ruleId and operationId", - "operationId": "ManagementGroupGovernanceRulesExecuteStatus_Get", + "description": "Get governance rules long run operation result for the requested scope by ruleId and operationId", + "operationId": "ManagementGroupGovernanceRulesOperationResult_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -844,13 +844,13 @@ ], "responses": { "200": { - "description": "OK", + "description": "OK - The operation completed", "schema": { - "$ref": "#/definitions/ExecuteRuleStatus" + "$ref": "#/definitions/OperationResult" } }, "202": { - "description": "Accepted", + "description": "Accepted - The operation still in progress", "headers": { "location": { "type": "string", @@ -866,54 +866,6 @@ } } } - }, - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Security/governanceRules/{ruleId}/delete/operationResults/{operationId}": { - "get": { - "x-ms-examples": { - "Get governance rules deletion status by specific governance rule ID": { - "$ref": "./examples/GovernanceRules/GetManagementGroupGovernanceRuleDeleteStatus_example.json" - } - }, - "tags": [ - "GovernanceRules" - ], - "description": "Get a specific governance rule deletion status for the requested scope by rule ID and operation ID", - "operationId": "ManagementGroupGovernanceRulesDeleteStatus_Get", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ManagementGroupId" - }, - { - "$ref": "#/parameters/RuleId" - }, - { - "$ref": "#/parameters/OperationId" - } - ], - "responses": { - "204": { - "description": "Delete succeeded" - }, - "202": { - "description": "Accepted", - "headers": { - "location": { - "type": "string", - "description": "Location URL for the deletion status" - } - } - }, - "default": { - "description": "Error response describing why the operation failed", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - } } }, "definitions": { @@ -1205,14 +1157,37 @@ } } }, - "ExecuteRuleStatus": { + "OperationResult": { "type": "object", - "description": "Execute status of governance rule over a given scope", + "description": "Long run operation status of governance rule over a given scope", "properties": { - "operationId": { - "description": "Unique key for the execution of governance rule", + "status": { "type": "string", - "readOnly": true + "description": "The status of the long run operation result of governance rule", + "readOnly": true, + "enum": [ + "Succeeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "OperationResult", + "modelAsString": true, + "values": [ + { + "value": "Succeeded", + "description": "The operation succeeded" + }, + { + "value": "Failed", + "description": "The operation failed" + }, + { + "value": "Canceled", + "description": "The operation canceled" + } + ] + } } } }