Remediations - List Deployments At Subscription

Gets all deployments for a remediation at subscription scope.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments?api-version=2021-10-01
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments?$top={$top}&api-version=2021-10-01

URI Parameters

Name In Required Type Description
remediationName
path True

string

The name of the remediation.

subscriptionId
path True

string

Microsoft Azure subscription ID.

api-version
query True

string

Client Api Version.

$top
query

integer

int32

Maximum number of records to return.

Responses

Name Type Description
200 OK

RemediationDeploymentsListResult

The retrieved remediation deployments.

Other Status Codes

ErrorResponse

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 deployments for a remediation at subscription scope

Sample request

POST https://management.azure.com/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/providers/Microsoft.PolicyInsights/remediations/myRemediation/listDeployments?api-version=2021-10-01

Sample response

{
  "value": [
    {
      "remediatedResourceId": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1",
      "deploymentId": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.resources/deployments/a088e8fd-8600-4126-8d74-fc7ead0e9ae4",
      "status": "Succeeded",
      "resourceLocation": "eastus",
      "createdOn": "2018-09-13T21:51:09.075918Z",
      "lastUpdatedOn": "2018-09-13T21:52:09.8919106Z"
    },
    {
      "remediatedResourceId": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup2/providers/microsoft.storage/storageaccounts/stor1",
      "deploymentId": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup2/providers/microsoft.resources/deployments/6b8898c0-18a2-449e-987a-8d4d4f634f56",
      "status": "Succeeded",
      "resourceLocation": "westus",
      "createdOn": "2018-09-13T21:51:09.075918Z",
      "lastUpdatedOn": "2018-09-13T21:52:09.8761679Z"
    }
  ]
}

Definitions

Name Description
ErrorDefinition

Error definition.

ErrorResponse

Error response.

RemediationDeployment

Details of a single deployment created by the remediation.

RemediationDeploymentsListResult

List of deployments for a remediation.

TypedErrorInfo

Scenario specific error details.

ErrorDefinition

Error definition.

Name Type Description
additionalInfo

TypedErrorInfo[]

Additional scenario specific error details.

code

string

Service specific error code which serves as the substatus for the HTTP error code.

details

ErrorDefinition[]

Internal error details.

message

string

Description of the error.

target

string

The target of the error.

ErrorResponse

Error response.

Name Type Description
error

ErrorDefinition

The error details.

RemediationDeployment

Details of a single deployment created by the remediation.

Name Type Description
createdOn

string

The time at which the remediation was created.

deploymentId

string

Resource ID of the template deployment that will remediate the resource.

error

ErrorDefinition

Error encountered while remediated the resource.

lastUpdatedOn

string

The time at which the remediation deployment was last updated.

remediatedResourceId

string

Resource ID of the resource that is being remediated by the deployment.

resourceLocation

string

Location of the resource that is being remediated.

status

string

Status of the remediation deployment.

RemediationDeploymentsListResult

List of deployments for a remediation.

Name Type Description
nextLink

string

The URL to get the next set of results.

value

RemediationDeployment[]

Array of deployments for the remediation.

TypedErrorInfo

Scenario specific error details.

Name Type Description
info

The scenario specific error details.

type

string

The type of included error details.