Policy States - Next Link

Subsequent post calls to the next link

POST https://management.azure.com{nextLink}?Next paging op for policy states&api-version=2019-10-01
POST https://management.azure.com{nextLink}?Next paging op for policy states&api-version=2019-10-01&$skiptoken={$skiptoken}

URI Parameters

Name In Required Type Description
nextLink
path True

string

Next link for list operation.

api-version
query True

string

Client Api Version.

$skiptoken
query

string

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

Responses

Name Type Description
200 OK

PolicyStatesQueryResults

Query results.

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

Sample request

POST https://management.azure.com{nextLink}?Next paging op for policy states&api-version=2019-10-01&$skiptoken=WpmghrfhqlwpqqdrwpwmgWfBSvPhkAK6QD

Sample response

{
  "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest",
  "@odata.count": 2,
  "value": [
    {
      "@odata.id": null,
      "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity",
      "timestamp": "2019-10-09T17:41:47Z",
      "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1",
      "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a",
      "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d",
      "effectiveParameters": null,
      "isCompliant": false,
      "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
      "resourceType": "/microsoft.insights/autoscalesettings",
      "resourceLocation": "westus",
      "resourceGroup": "myrg1",
      "resourceTags": "tbd",
      "policyAssignmentName": "1ef5d536aec743a0aa801c1a",
      "policyAssignmentOwner": "tbd",
      "policyAssignmentParameters": "{}",
      "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup",
      "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d",
      "policyDefinitionAction": "audit",
      "policyDefinitionCategory": "tbd",
      "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5",
      "policySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5",
      "policySetDefinitionOwner": null,
      "policySetDefinitionCategory": null,
      "policySetDefinitionParameters": null,
      "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47",
      "policyDefinitionReferenceId": "15521232277412542086",
      "complianceState": "NonCompliant",
      "policyDefinitionGroupNames": [
        "myGroup"
      ]
    },
    {
      "@odata.id": null,
      "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity",
      "timestamp": "2019-10-09T17:41:47Z",
      "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1",
      "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c",
      "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d",
      "effectiveParameters": null,
      "isCompliant": true,
      "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
      "resourceType": "/microsoft.insights/autoscalesettings",
      "resourceLocation": "westus",
      "resourceGroup": "myrg1",
      "resourceTags": "tbd",
      "policyAssignmentName": "186044306c044a1d8c0ff76c",
      "policyAssignmentOwner": "tbd",
      "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}",
      "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup",
      "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d",
      "policyDefinitionAction": "audit",
      "policyDefinitionCategory": "tbd",
      "policySetDefinitionId": "",
      "policySetDefinitionName": "",
      "policySetDefinitionOwner": null,
      "policySetDefinitionCategory": null,
      "policySetDefinitionParameters": null,
      "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47",
      "policyDefinitionReferenceId": "",
      "complianceState": "Compliant",
      "policyDefinitionGroupNames": [
        "myGroup"
      ]
    }
  ]
}

Definitions

Name Description
ComponentStateDetails

Component state details.

Error

Error definition.

ExpressionEvaluationDetails

Evaluation details of policy language expressions.

IfNotExistsEvaluationDetails

Evaluation details of IfNotExists effect.

PolicyEvaluationDetails

Policy evaluation details.

PolicyState

Policy state record.

PolicyStatesQueryResults

Query results.

QueryFailure

Error response.

ComponentStateDetails

Component state details.

Name Type Description
complianceState

string

Component compliance state.

id

string

Component Id.

name

string

Component name.

timestamp

string

Component compliance evaluation timestamp.

type

string

Component type.

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.

ExpressionEvaluationDetails

Evaluation details of policy language expressions.

Name Type Description
expression

string

Expression evaluated.

expressionKind

string

The kind of expression that was evaluated.

expressionValue

object

Value of the expression.

operator

string

Operator to compare the expression value and the target value.

path

string

Property path if the expression is a field or an alias.

result

string

Evaluation result.

targetValue

object

Target value to be compared with the expression value.

IfNotExistsEvaluationDetails

Evaluation details of IfNotExists effect.

Name Type Description
resourceId

string

ID of the last evaluated resource for IfNotExists effect.

totalResources

integer

Total number of resources to which the existence condition is applicable.

PolicyEvaluationDetails

Policy evaluation details.

Name Type Description
evaluatedExpressions

ExpressionEvaluationDetails[]

Details of the evaluated expressions.

ifNotExistsDetails

IfNotExistsEvaluationDetails

Evaluation details of IfNotExists effect.

PolicyState

Policy state record.

Name Type Description
@odata.context

string

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

@odata.id

string

OData entity ID; always set to null since policy state records do not have an entity ID.

complianceState

string

Compliance state of the resource.

components

ComponentStateDetails[]

Components state compliance records populated only when URL contains $expand=components clause.

effectiveParameters

string

Effective parameters for the policy assignment.

isCompliant

boolean

Flag which states whether the resource is compliant against the policy assignment it was evaluated against. This property is deprecated; please use ComplianceState instead.

managementGroupIds

string

Comma separated list of management group IDs, which represent the hierarchy of the management groups the resource is under.

policyAssignmentId

string

Policy assignment ID.

policyAssignmentName

string

Policy assignment name.

policyAssignmentOwner

string

Policy assignment owner.

policyAssignmentParameters

string

Policy assignment parameters.

policyAssignmentScope

string

Policy assignment scope.

policyAssignmentVersion

string

Evaluated policy assignment version.

policyDefinitionAction

string

Policy definition action, i.e. effect.

policyDefinitionCategory

string

Policy definition category.

policyDefinitionGroupNames

string[]

Policy definition group names.

policyDefinitionId

string

Policy definition ID.

policyDefinitionName

string

Policy definition name.

policyDefinitionReferenceId

string

Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.

policyDefinitionVersion

string

Evaluated policy definition version.

policyEvaluationDetails

PolicyEvaluationDetails

Policy evaluation details.

policySetDefinitionCategory

string

Policy set definition category, if the policy assignment is for a policy set.

policySetDefinitionId

string

Policy set definition ID, if the policy assignment is for a policy set.

policySetDefinitionName

string

Policy set definition name, if the policy assignment is for a policy set.

policySetDefinitionOwner

string

Policy set definition owner, if the policy assignment is for a policy set.

policySetDefinitionParameters

string

Policy set definition parameters, if the policy assignment is for a policy set.

policySetDefinitionVersion

string

Evaluated policy set definition version.

resourceGroup

string

Resource group name.

resourceId

string

Resource ID.

resourceLocation

string

Resource location.

resourceTags

string

List of resource tags.

resourceType

string

Resource type.

subscriptionId

string

Subscription ID.

timestamp

string

Timestamp for the policy state record.

PolicyStatesQueryResults

Query results.

Name Type Description
@odata.context

string

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

@odata.count

integer

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

@odata.nextLink

string

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

value

PolicyState[]

Query results.

QueryFailure

Error response.

Name Type Description
error

Error

Error definition.