Remediations - List For Resource

Gets all remediations for a resource.

GET https://management.azure.com/{resourceId}/providers/Microsoft.PolicyInsights/remediations?api-version=2018-07-01-preview
GET https://management.azure.com/{resourceId}/providers/Microsoft.PolicyInsights/remediations?$top={$top}&$filter={$filter}&api-version=2018-07-01-preview

URI Parameters

Name In Required Type Description
resourceId
path True
  • string

Resource ID.

$top
query
  • integer
int32

Maximum number of records to return.

$filter
query
  • string

OData filter expression.

api-version
query True
  • string

Client Api Version.

Responses

Name Type Description
200 OK

The retrieved remediations.

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

List remediations at individual resource scope
List remediations at individual resource scope with query parameters

List remediations at individual resource scope

Sample Request

GET https://management.azure.com/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/rg1/providers/microsoft.storage/storageaccounts/storAc1/providers/Microsoft.PolicyInsights/remediations?api-version=2018-07-01-preview

Sample Response

{
  "value": [
    {
      "properties": {
        "policyAssignmentId": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/rg1/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5",
        "provisioningState": "Succeeded",
        "createdOn": "2018-09-13T21:51:09.075918Z",
        "lastUpdatedOn": "2018-09-13T21:52:10.0011706Z",
        "deploymentStatus": {
          "totalDeployments": 1,
          "successfulDeployments": 1,
          "failedDeployments": 0
        }
      },
      "id": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/rg1/providers/microsoft.storage/storageaccounts/storAc1/providers/microsoft.policyinsights/remediations/790996e6-9871-4b1f-9cd9-ec42cd6ced1e",
      "name": "790996e6-9871-4b1f-9cd9-ec42cd6ced1e",
      "type": "Microsoft.PolicyInsights/remediations"
    }
  ]
}

List remediations at individual resource scope with query parameters

Sample Request

GET https://management.azure.com/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/rg1/providers/microsoft.storage/storageaccounts/storAc1/providers/Microsoft.PolicyInsights/remediations?$top=1&$filter=PolicyAssignmentId eq '/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5'&api-version=2018-07-01-preview

Sample Response

{
  "value": [
    {
      "properties": {
        "policyAssignmentId": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5",
        "provisioningState": "Succeeded",
        "createdOn": "2018-09-13T21:51:09.075918Z",
        "lastUpdatedOn": "2018-09-13T21:52:10.0011706Z",
        "deploymentStatus": {
          "totalDeployments": 1,
          "successfulDeployments": 1,
          "failedDeployments": 0
        }
      },
      "id": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/rg1/providers/microsoft.storage/storageaccounts/storAc1/providers/microsoft.policyinsights/remediations/790996e6-9871-4b1f-9cd9-ec42cd6ced1e",
      "name": "790996e6-9871-4b1f-9cd9-ec42cd6ced1e",
      "type": "Microsoft.PolicyInsights/remediations"
    }
  ]
}

Definitions

ErrorDefinition

Error definition.

ErrorResponse

Error response.

Remediation

The remediation definition.

RemediationDeploymentSummary

The deployment status summary for all deployments created by the remediation.

RemediationFilters

The filters that will be applied to determine which resources to remediate.

RemediationListResult

List of remediations.

TypedErrorInfo

Scenario specific error details.

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.

Remediation

The remediation definition.

Name Type Description
id
  • string

The ID of the remediation.

name
  • string

The name of the remediation.

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.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.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.

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.

RemediationListResult

List of remediations.

Name Type Description
nextLink
  • string

The URL to get the next set of results.

value

Array of remediation definitions.

TypedErrorInfo

Scenario specific error details.

Name Type Description
info

The scenario specific error details.

type
  • string

The type of included error details.