v7

latestSwagger 2.0raw.githubusercontent.com2022-02-22181455.7 KB

Queries policy states for the resource group level policy assignment.

post/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults

Path parameters

policyStatesResource'default' | 'latest' required

The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).

subscriptionIdstring required

Microsoft Azure subscription ID.

resourceGroupNamestring required

Resource group name.

authorizationNamespace'Microsoft.Authorization' required

The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed.

policyAssignmentNamestring required

Policy assignment name.

Query parameters

api-versionstring required

Client Api Version.

$topinteger

Maximum number of records to return.

$orderbystring

Ordering expression using OData notation. One or more comma-separated column names with an optional "desc" (the default) or "asc", e.g. "$orderby=PolicyAssignmentId, ResourceId asc".

$selectstring

Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId".

$fromstring date-time

ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).

$tostring date-time

ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.

$filterstring

OData filter expression.

$applystring

OData apply expression for aggregations.

$skiptokenstring

Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.

Response

Query results.

@odata.contextstring

OData context string; used by OData clients to resolve type information based on metadata.

@odata.countinteger

OData entity count; represents the number of policy state records returned.

@odata.nextLinkstring

Odata next link; URL to get the next set of results.