共用方式為


Policy States - Trigger Resource Group Evaluation

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=2019-10-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

Resource group name.

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

QueryFailure

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 resource group

Sample request

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

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.

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

Error definition.