Remediations - Delete At Management Group
Deletes an existing remediation at management group scope.
DELETE https://management.azure.com/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}?api-version=2021-10-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
management
|
path | True |
string |
Management group ID. |
management
|
path | True |
The namespace for Microsoft Management RP; only "Microsoft.Management" is allowed. |
|
remediation
|
path | True |
string |
The name of the remediation. |
api-version
|
query | True |
string |
Client Api Version. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The deleted remediation. |
|
204 No Content |
The remediation did not exist. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Delete remediation at management group scope
Sample request
DELETE https://management.azure.com/providers/Microsoft.Management/managementGroups/financeMg/providers/Microsoft.PolicyInsights/remediations/storageRemediation?api-version=2021-10-01
Sample response
{
"properties": {
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/financeMg/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5",
"provisioningState": "Succeeded",
"createdOn": "2018-09-13T21:51:09.075918Z",
"lastUpdatedOn": "2018-09-13T21:52:10.0011706Z",
"resourceDiscoveryMode": "ExistingNonCompliant",
"deploymentStatus": {
"totalDeployments": 2,
"successfulDeployments": 2,
"failedDeployments": 0
},
"statusMessage": "Remediation extended status",
"correlationId": "a14e1d60-dae9-4771-b4be-a556d69e77a6",
"resourceCount": 42,
"parallelDeployments": 6,
"failureThreshold": {
"percentage": 0.1
}
},
"id": "/providers/Microsoft.Management/managementGroups/financeMg/providers/microsoft.policyinsights/remediations/storageRemediation",
"name": "storageRemediation",
"type": "Microsoft.PolicyInsights/remediations",
"systemData": {
"createdBy": "b69a9388-9488-4534-b470-7ec6d41beef6",
"createdByType": "User",
"createdAt": "2018-09-13T21:51:09.075918Z",
"lastModifiedBy": "b69a9388-9488-4534-b470-7ec6d41beef6",
"lastModifiedByType": "User",
"lastModifiedAt": "2018-09-13T21:52:10.0011706Z"
}
}
Definitions
Name | Description |
---|---|
created |
The type of identity that created the resource. |
Error |
Error definition. |
Error |
Error response. |
Failure |
The remediation failure threshold settings |
Management |
The namespace for Microsoft Management RP; only "Microsoft.Management" is allowed. |
Remediation |
The remediation definition. |
Remediation |
The deployment status summary for all deployments created by the remediation. |
Remediation |
The filters that will be applied to determine which resources to remediate. |
Resource |
The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified. |
system |
Metadata pertaining to creation and last modification of the resource. |
Typed |
Scenario specific error details. |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
ErrorDefinition
Error definition.
Name | Type | Description |
---|---|---|
additionalInfo |
Additional scenario specific error details. |
|
code |
string |
Service specific error code which serves as the substatus for the HTTP error code. |
details |
Internal error details. |
|
message |
string |
Description of the error. |
target |
string |
The target of the error. |
ErrorResponse
Error response.
Name | Type | Description |
---|---|---|
error |
The error details. |
FailureThreshold
The remediation failure threshold settings
Name | Type | Description |
---|---|---|
percentage |
number |
A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold. |
ManagementGroupsNamespaceType
The namespace for Microsoft Management RP; only "Microsoft.Management" is allowed.
Name | Type | Description |
---|---|---|
Microsoft.Management |
string |
Remediation
The remediation definition.
Name | Type | Description |
---|---|---|
id |
string |
The ID of the remediation. |
name |
string |
The name of the remediation. |
properties.correlationId |
string |
The remediation correlation Id. Can be used to find events related to the remediation in the activity log. |
properties.createdOn |
string |
The time at which the remediation was created. |
properties.deploymentStatus |
The deployment status summary for all deployments created by the remediation. |
|
properties.failureThreshold |
The remediation failure threshold settings |
|
properties.filters |
The filters that will be applied to determine which resources to remediate. |
|
properties.lastUpdatedOn |
string |
The time at which the remediation was last updated. |
properties.parallelDeployments |
integer |
Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used. |
properties.policyAssignmentId |
string |
The resource ID of the policy assignment that should be remediated. |
properties.policyDefinitionReferenceId |
string |
The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. |
properties.provisioningState |
string |
The status of the remediation. This refers to the entire remediation task, not individual deployments. Allowed values are Evaluating, Canceled, Cancelling, Failed, Complete, or Succeeded. |
properties.resourceCount |
integer |
Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. |
properties.resourceDiscoveryMode |
The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified. |
|
properties.statusMessage |
string |
The remediation status message. Provides additional details regarding the state of the remediation. |
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
type |
string |
The type of the remediation. |
RemediationDeploymentSummary
The deployment status summary for all deployments created by the remediation.
Name | Type | Description |
---|---|---|
failedDeployments |
integer |
The number of deployments required by the remediation that have failed. |
successfulDeployments |
integer |
The number of deployments required by the remediation that have succeeded. |
totalDeployments |
integer |
The number of deployments required by the remediation. |
RemediationFilters
The filters that will be applied to determine which resources to remediate.
Name | Type | Description |
---|---|---|
locations |
string[] |
The resource locations that will be remediated. |
ResourceDiscoveryMode
The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified.
Name | Type | Description |
---|---|---|
ExistingNonCompliant |
string |
Remediate resources that are already known to be non-compliant. |
ReEvaluateCompliance |
string |
Re-evaluate the compliance state of resources and then remediate the resources found to be non-compliant. |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
TypedErrorInfo
Scenario specific error details.
Name | Type | Description |
---|---|---|
info |
|
The scenario specific error details. |
type |
string |
The type of included error details. |