Policy States - Trigger Subscription Evaluation

Triggers a policy evaluation scan for all the resources under the subscription

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation?api-version=2019-10-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

Microsoft Azure subscription ID.

api-version
query True
  • string

Client Api Version.

Responses

Name Type Description
200 OK

The scan is done.

202 Accepted

The scan was successfully triggered.

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

Trigger evaluations for all resources in a subscription

Sample Request

POST https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation?api-version=2019-10-01

Sample Response

Definitions

Error

Error definition.

QueryFailure

Error response.

Error

Error definition.

Name Type Description
code
  • string

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

message
  • string

Description of the error.

QueryFailure

Error response.

Name Type Description
error

Error definition.