Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Policy States - Trigger Resource Group Evaluation
- Service:
- Policy
- API Version:
- 2024-10-01
Triggers a policy evaluation scan for all the resources under the resource group.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation?api-version=2024-10-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resourceGroupName
|
path | True |
string |
Resource group name. |
|
subscriptionId
|
path | True |
string (uuid) minLength: 1 |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| 202 Accepted |
The scan was successfully triggered. Headers
|
|
| Other Status Codes |
An unexpected error response. |
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 resource group
Sample request
Sample response
- Status code:
- 200
- Status code:
- 202
Code: 202
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights/asyncOperationResults/00000000-0000-0000-0000-000000000000?api-version=2024-10-01
Message: Accepted
Retry-After: 30
Definitions
| Name | Description |
|---|---|
| PolicyInsightsCommon.QueryFailure |
Error response. |
| PolicyInsightsCommon.QueryFailureError |
Error definition. |
PolicyInsightsCommon.QueryFailure
Error response.
| Name | Type | Description |
|---|---|---|
| error |
Error definition. |
PolicyInsightsCommon.QueryFailureError
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. |
