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 |
---|---|---|---|---|
subscription
|
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
Sample response
Code: 202
Message: Accepted
Retry-After: 30
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights/asyncOperationResults/00000000-0000-0000-0000-000000000000?api-version=2019-10-01
Definitions
Name | Description |
---|---|
Error |
Error definition. |
Query |
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. |