swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  title: PolicyStatesClient
  version: 2018-07-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2018-07-01-preview/policyStates.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: policyinsights-policyStates
  x-tags:
    - Azure
    - Microsoft
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  apiVersionParameter:
    description: Client Api Version.
    in: query
    name: api-version
    required: true
    type: string
    x-ms-parameter-location: client
  applyParameter:
    description: OData apply expression for aggregations.
    in: query
    name: $apply
    required: false
    type: string
    x-ms-client-name: Apply
    x-ms-parameter-grouping:
      name: QueryOptions
    x-ms-parameter-location: method
  authorizationNamespaceParameter:
    description: The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed.
    enum:
      - Microsoft.Authorization
    in: path
    name: authorizationNamespace
    required: true
    type: string
    x-ms-parameter-location: method
  expandParameter:
    description: The $expand query parameter. For example, to expand policyEvaluationDetails, use $expand=policyEvaluationDetails
    in: query
    name: $expand
    required: false
    type: string
    x-ms-client-name: Expand
    x-ms-parameter-grouping:
      name: QueryOptions
    x-ms-parameter-location: method
  filterParameter:
    description: OData filter expression.
    in: query
    name: $filter
    required: false
    type: string
    x-ms-client-name: Filter
    x-ms-parameter-grouping:
      name: QueryOptions
    x-ms-parameter-location: method
  fromParameter:
    description: ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).
    format: date-time
    in: query
    name: $from
    required: false
    type: string
    x-ms-client-name: From
    x-ms-parameter-grouping:
      name: QueryOptions
    x-ms-parameter-location: method
  managementGroupNameParameter:
    description: Management group name.
    in: path
    name: managementGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  managementGroupsNamespaceParameter:
    description: The namespace for Microsoft Management RP; only "Microsoft.Management" is allowed.
    enum:
      - Microsoft.Management
    in: path
    name: managementGroupsNamespace
    required: true
    type: string
    x-ms-parameter-location: method
  orderByParameter:
    description: 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".
    in: query
    name: $orderby
    required: false
    type: string
    x-ms-client-name: OrderBy
    x-ms-parameter-grouping:
      name: QueryOptions
    x-ms-parameter-location: method
  policyAssignmentNameParameter:
    description: Policy assignment name.
    in: path
    name: policyAssignmentName
    required: true
    type: string
    x-ms-parameter-location: method
  policyDefinitionNameParameter:
    description: Policy definition name.
    in: path
    name: policyDefinitionName
    required: true
    type: string
    x-ms-parameter-location: method
  policySetDefinitionNameParameter:
    description: Policy set definition name.
    in: path
    name: policySetDefinitionName
    required: true
    type: string
    x-ms-parameter-location: method
  policyStatesResourceParameter:
    description: 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).
    enum:
      - default
      - latest
    in: path
    name: policyStatesResource
    required: true
    type: string
    x-ms-enum:
      modelAsString: true
      name: PolicyStatesResource
    x-ms-parameter-location: method
  policyStatesSummaryResourceParameter:
    description: The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
    enum:
      - latest
    in: path
    name: policyStatesSummaryResource
    required: true
    type: string
    x-ms-parameter-location: method
  resourceGroupNameParameter:
    description: Resource group name.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  resourceIdParameter:
    description: Resource ID.
    in: path
    name: resourceId
    required: true
    type: string
    x-ms-parameter-location: method
    x-ms-skip-url-encoding: true
  scopeParameter:
    description: A valid scope, i.e. management group, subscription, resource group, or resource ID. Scope used has no effect on metadata returned.
    in: path
    name: scope
    required: true
    type: string
    x-ms-parameter-location: method
    x-ms-skip-url-encoding: true
  selectParameter:
    description: Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId".
    in: query
    name: $select
    required: false
    type: string
    x-ms-client-name: Select
    x-ms-parameter-grouping:
      name: QueryOptions
    x-ms-parameter-location: method
  subscriptionId:
    description: Microsoft Azure subscription ID.
    in: path
    name: subscriptionId
    required: true
    type: string
    x-ms-parameter-location: method
  toParameter:
    description: ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.
    format: date-time
    in: query
    name: $to
    required: false
    type: string
    x-ms-client-name: To
    x-ms-parameter-grouping:
      name: QueryOptions
    x-ms-parameter-location: method
  topParameter:
    description: Maximum number of records to return.
    format: int32
    in: query
    minimum: 0
    name: $top
    required: false
    type: integer
    x-ms-client-name: Top
    x-ms-parameter-grouping:
      name: QueryOptions
    x-ms-parameter-location: method
paths:
  /providers/Microsoft.PolicyInsights/operations:
    get:
      description: Lists available operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: List of available operations.
          schema:
            $ref: "#/definitions/OperationsListResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        List operations:
          parameters:
            api-version: 2018-07-01-preview
          responses:
            "200":
              body:
                "@odata.count": 3
                value:
                  - display:
                      description: Query information about policy events.
                      operation: Query Policy Events
                      provider: Microsoft Policy Insights
                      resource: Policy Events
                    name: Microsoft.PolicyInsights/policyEvents/queryResults/action
                  - display:
                      description: Query information about policy states.
                      operation: Query Policy States
                      provider: Microsoft Policy Insights
                      resource: Policy States
                    name: Microsoft.PolicyInsights/policyStates/queryResults/action
                  - display:
                      description: Query summary information about policy latest states.
                      operation: Query Policy Latest States Summary
                      provider: Microsoft Policy Insights
                      resource: Policy States
                    name: Microsoft.PolicyInsights/policyStates/summarize/action
  "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults":
    post:
      description: Queries policy states for the resources under the management group.
      operationId: PolicyStates_ListQueryResultsForManagementGroup
      parameters:
        - $ref: "#/parameters/policyStatesResourceParameter"
        - $ref: "#/parameters/managementGroupsNamespaceParameter"
        - $ref: "#/parameters/managementGroupNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/orderByParameter"
        - $ref: "#/parameters/selectParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
        - $ref: "#/parameters/applyParameter"
      responses:
        "200":
          description: Query results.
          schema:
            $ref: "#/definitions/PolicyStatesQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query latest at management group scope:
          parameters:
            api-version: 2018-07-01-preview
            managementGroupName: myManagementGroup
            managementGroupsNamespace: Microsoft.Management
            policyStatesResource: latest
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a
                    policyAssignmentName: 1ef5d536aec743a0aa801c1a
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionName: 022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionReferenceId: "15521232277412542086"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5
                    policySetDefinitionName: 335cefd2-ab16-430f-b364-974a170eb1d5
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myrg1
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1
                    resourceLocation: westus
                    resourceTags: tbd
                    resourceType: /microsoft.insights/autoscalesettings
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-09T17:41:47Z
                  - "@odata.context": https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c
                    policyAssignmentName: 186044306c044a1d8c0ff76c
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"allowedLocations":{"value":["centralus"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionName: 022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionReferenceId: ""
                    policySetDefinitionCategory: null
                    policySetDefinitionId: ""
                    policySetDefinitionName: ""
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myrg1
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1
                    resourceLocation: westus
                    resourceTags: tbd
                    resourceType: /microsoft.insights/autoscalesettings
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-09T17:41:47Z
  "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize":
    post:
      description: Summarizes policy states for the resources under the management group.
      operationId: PolicyStates_SummarizeForManagementGroup
      parameters:
        - $ref: "#/parameters/policyStatesSummaryResourceParameter"
        - $ref: "#/parameters/managementGroupsNamespaceParameter"
        - $ref: "#/parameters/managementGroupNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
      responses:
        "200":
          description: Summarize results.
          schema:
            $ref: "#/definitions/SummarizeResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Summarize at management group scope:
          parameters:
            $filter: PolicyDefinitionAction eq 'deny' or PolicyDefinitionAction eq 'audit'
            $from: 2018-02-05T18:00:00Z
            $to: 2018-02-06T18:00:00Z
            $top: 0
            api-version: 2018-07-01-preview
            managementGroupName: myManagementGroup
            managementGroupsNamespace: Microsoft.Management
            policyStatesSummaryResource: latest
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity
                    "@odata.id": null
                    policyAssignments: []
                    results:
                      nonCompliantPolicies: 68
                      nonCompliantResources: 15410
                      queryResultsUri: https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-05 18:00:00Z&$to=2018-02-06 18:00:00Z&$filter=(PolicyDefinitionAction eq 'deny' or PolicyDefinitionAction eq 'audit') and IsCompliant eq false
  "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults":
    post:
      description: Queries policy states for the resources under the subscription.
      operationId: PolicyStates_ListQueryResultsForSubscription
      parameters:
        - $ref: "#/parameters/policyStatesResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/orderByParameter"
        - $ref: "#/parameters/selectParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
        - $ref: "#/parameters/applyParameter"
      responses:
        "200":
          description: Query results.
          schema:
            $ref: "#/definitions/PolicyStatesQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Filter and aggregate only:
          parameters:
            $apply: aggregate($count as NumDenyStates)
            $filter: PolicyDefinitionAction eq 'deny'
            $from: 2018-02-05T18:00:00Z
            api-version: 2018-07-01-preview
            policyStatesResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumDenyStates: 6
        Filter and group with aggregate:
          parameters:
            $apply: groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId), aggregate($count as NumAuditDenyNonComplianceRecords))
            $filter: IsCompliant eq false and (PolicyDefinitionAction eq 'audit' or PolicyDefinitionAction eq 'deny')
            $from: 2018-02-05T18:00:00Z
            $orderby: NumAuditDenyNonComplianceRecords desc
            $top: 2
            api-version: 2018-07-01-preview
            policyStatesResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumAuditDenyNonComplianceRecords: 10
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01
                    policyDefinitionAction: audit
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumAuditDenyNonComplianceRecords: 10
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1
                    policyDefinitionAction: audit
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName
        Filter and group without aggregate:
          parameters:
            $apply: groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId))
            $filter: IsCompliant eq false and (PolicyDefinitionAction ne 'audit' and PolicyDefinitionAction ne 'append')
            $from: 2018-01-05T18:00:00Z
            $top: 2
            api-version: 2018-07-01-preview
            policyStatesResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/enable monitoring in azure security center
                    policyDefinitionAction: auditifnotexists
                    policyDefinitionId: /providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/89b27f38-e9e4-4468-ab81-801c84b8c017
                    policyDefinitionAction: auditifnotexists
                    policyDefinitionId: /providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet
        Filter and multiple groups:
          parameters:
            $apply: groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId, ResourceId))/groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId), aggregate($count as NumNonCompliantResources))
            $filter: IsCompliant eq false
            $orderby: NumNonCompliantResources desc
            $top: 10
            api-version: 2018-07-01-preview
            policyStatesResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 10
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 557
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: "14799174781370023846"
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 557
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: "1679708035638239273"
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 557
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: "14799174781370023846"
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 557
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: "1679708035638239273"
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 557
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: ""
                    policySetDefinitionId: ""
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 557
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                    policyDefinitionReferenceId: ""
                    policySetDefinitionId: ""
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 552
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: ""
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 544
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                    policyDefinitionReferenceId: "8935913113203900114"
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 526
                    policyAssignmentId: /providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874
                    policyDefinitionId: /providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionReferenceId: ""
                    policySetDefinitionId: ""
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    NumNonCompliantResources: 509
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                    policyDefinitionReferenceId: "2124621540977569058"
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
        Query latest at subscription scope:
          parameters:
            api-version: 2018-07-01-preview
            policyStatesResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center
                    policyAssignmentName: Enable Monitoring in Azure Security Center
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: AuditIfNotExists
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6
                    policyDefinitionName: 9daedab3-fb2d-461e-b861-71790eead4f6
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionName: 1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myrg1
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.Network/publicIPAddresses
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-09T17:48:05Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/9ac09b0657d942e5ad4041a6
                    policyAssignmentName: 9ac09b0657d942e5ad4041a6
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: AuditIfNotExists
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6
                    policyDefinitionName: 9daedab3-fb2d-461e-b861-71790eead4f6
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionName: 1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myrg1
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.Network/publicIPAddresses
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-09T17:48:05Z
        "Time range; sort, select and limit":
          parameters:
            $from: 2018-02-05T18:00:00Z
            $orderby: Timestamp desc, PolicyAssignmentId asc, SubscriptionId asc, ResourceGroup asc, ResourceId
            $select: Timestamp, PolicyAssignmentId, PolicyDefinitionId, SubscriptionId, ResourceGroup, ResourceId
            $to: 2018-02-06T18:00:00Z
            $top: 2
            api-version: 2018-07-01-preview
            policyStatesResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    policyAssignmentId: /providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759
                    resourceGroup: myrg1
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Storage/storageAccounts/mysa1
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-06T17:58:00Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    policyAssignmentId: /providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759
                    resourceGroup: myrg2
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg2/providers/Microsoft.Storage/storageAccounts/mysa2
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-06T17:58:00Z
  "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize":
    post:
      description: Summarizes policy states for the resources under the subscription.
      operationId: PolicyStates_SummarizeForSubscription
      parameters:
        - $ref: "#/parameters/policyStatesSummaryResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
      responses:
        "200":
          description: Summarize results.
          schema:
            $ref: "#/definitions/SummarizeResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Summarize at subscription scope:
          parameters:
            $top: 5
            api-version: 2018-07-01-preview
            policyStatesSummaryResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity
                    "@odata.id": null
                    policyAssignments:
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 557
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'
                        policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 557
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01'
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 557
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 557
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 557
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 557
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49'
                      - policyAssignmentId: /providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 557
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'
                        policySetDefinitionId: /providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 557
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 552
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 29
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 2
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682'
                        policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c
                        results:
                          nonCompliantPolicies: 3
                          nonCompliantResources: 552
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'
                    results:
                      nonCompliantPolicies: 40
                      nonCompliantResources: 619
                      queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false
  "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults":
    post:
      description: Queries policy states for the subscription level policy assignment.
      operationId: PolicyStates_ListQueryResultsForSubscriptionLevelPolicyAssignment
      parameters:
        - $ref: "#/parameters/policyStatesResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/authorizationNamespaceParameter"
        - $ref: "#/parameters/policyAssignmentNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/orderByParameter"
        - $ref: "#/parameters/selectParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
        - $ref: "#/parameters/applyParameter"
      responses:
        "200":
          description: Query results.
          schema:
            $ref: "#/definitions/PolicyStatesQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query latest at subscription level policy assignment scope:
          parameters:
            api-version: 2018-07-01-preview
            authorizationNamespace: Microsoft.Authorization
            policyAssignmentName: ec8f9645-8ecb-4abb-9c0b-5292f19d4003
            policyStatesResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003
                    policyAssignmentName: ec8f9645-8ecb-4abb-9c0b-5292f19d4003
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"TAGNAME_1":{"value":"test"}}'
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                    policyDefinitionName: c8b79b49-a579-4045-984e-1b249ab8b474
                    policyDefinitionReferenceId: "2124621540977569058"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                    policySetDefinitionName: 12b58873-e0f8-4b95-936c-86cbe7c9d697
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/my-ip-1
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.Network/publicIPAddresses
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-13T00:45:19Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003
                    policyAssignmentName: ec8f9645-8ecb-4abb-9c0b-5292f19d4003
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"TAGNAME_1":{"value":"test"}}'
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionName: 24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: "14799174781370023846"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                    policySetDefinitionName: 12b58873-e0f8-4b95-936c-86cbe7c9d697
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/my-ip-1
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.Network/publicIPAddresses
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-13T00:45:19Z
  "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize":
    post:
      description: Summarizes policy states for the subscription level policy assignment.
      operationId: PolicyStates_SummarizeForSubscriptionLevelPolicyAssignment
      parameters:
        - $ref: "#/parameters/policyStatesSummaryResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/authorizationNamespaceParameter"
        - $ref: "#/parameters/policyAssignmentNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
      responses:
        "200":
          description: Summarize results.
          schema:
            $ref: "#/definitions/SummarizeResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Summarize at policy assignment scope:
          parameters:
            api-version: 2018-07-01-preview
            authorizationNamespace: Microsoft.Authorization
            policyAssignmentName: ec8f9645-8ecb-4abb-9c0b-5292f19d4003
            policyStatesSummaryResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity
                    "@odata.id": null
                    policyAssignments:
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 531
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 531
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 220
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 54
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682'
                        policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                        results:
                          nonCompliantPolicies: 4
                          nonCompliantResources: 531
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'
                    results:
                      nonCompliantPolicies: 1
                      nonCompliantResources: 531
                      queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false
  "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults":
    post:
      description: Queries policy states for the subscription level policy definition.
      operationId: PolicyStates_ListQueryResultsForPolicyDefinition
      parameters:
        - $ref: "#/parameters/policyStatesResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/authorizationNamespaceParameter"
        - $ref: "#/parameters/policyDefinitionNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/orderByParameter"
        - $ref: "#/parameters/selectParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
        - $ref: "#/parameters/applyParameter"
      responses:
        "200":
          description: Query results.
          schema:
            $ref: "#/definitions/PolicyStatesQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query latest at subscription level policy definition scope:
          parameters:
            api-version: 2018-07-01-preview
            authorizationNamespace: Microsoft.Authorization
            policyDefinitionName: 24813039-7534-408a-9842-eb99f45721b1
            policyStatesResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7
                    policyAssignmentName: d9da7e80af6344ab9d342aa7
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"tagName":{"value":"MyTag"}}'
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionName: 24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/services/myService
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ServiceFabric/clusters/applications/services
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-13T00:50:27Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7
                    policyAssignmentName: d9da7e80af6344ab9d342aa7
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"tagName":{"value":"MyTag"}}'
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionName: 24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/services/myService
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ServiceFabric/clusters/applications/services
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-13T00:50:27Z
  "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize":
    post:
      description: Summarizes policy states for the subscription level policy definition.
      operationId: PolicyStates_SummarizeForPolicyDefinition
      parameters:
        - $ref: "#/parameters/policyStatesSummaryResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/authorizationNamespaceParameter"
        - $ref: "#/parameters/policyDefinitionNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
      responses:
        "200":
          description: Summarize results.
          schema:
            $ref: "#/definitions/SummarizeResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Summarize at policy definition scope:
          parameters:
            api-version: 2018-07-01-preview
            authorizationNamespace: Microsoft.Authorization
            policyDefinitionName: 24813039-7534-408a-9842-eb99f45721b1
            policyStatesSummaryResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity
                    "@odata.id": null
                    policyAssignments:
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 558
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 558
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 553
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                        policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 553
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 531
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                        policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 531
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1'
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 531
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                        policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 531
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'
                    results:
                      nonCompliantPolicies: 4
                      nonCompliantResources: 561
                      queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false
  "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults":
    post:
      description: Queries policy states for the subscription level policy set definition.
      operationId: PolicyStates_ListQueryResultsForPolicySetDefinition
      parameters:
        - $ref: "#/parameters/policyStatesResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/authorizationNamespaceParameter"
        - $ref: "#/parameters/policySetDefinitionNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/orderByParameter"
        - $ref: "#/parameters/selectParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
        - $ref: "#/parameters/applyParameter"
      responses:
        "200":
          description: Query results.
          schema:
            $ref: "#/definitions/PolicyStatesQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query latest at subscription level policy set definition scope:
          parameters:
            api-version: 2018-07-01-preview
            authorizationNamespace: Microsoft.Authorization
            policySetDefinitionName: 3e3807c1-65c9-49e0-a406-82d8ae3e338c
            policyStatesResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29
                    policyAssignmentName: 3f3c4330183b4e218fe6fd29
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionName: 24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c
                    policySetDefinitionName: 3e3807c1-65c9-49e0-a406-82d8ae3e338c
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/mySite
                    resourceLocation: centralus
                    resourceTags: tbd
                    resourceType: /Microsoft.Web/sites
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-13T00:54:58Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29
                    policyAssignmentName: 3f3c4330183b4e218fe6fd29
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: Audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/LocationAuditDefinition
                    policyDefinitionName: LocationAuditDefinition
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c
                    policySetDefinitionName: 3e3807c1-65c9-49e0-a406-82d8ae3e338c
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/mySite
                    resourceLocation: centralus
                    resourceTags: tbd
                    resourceType: /Microsoft.Web/sites
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-13T00:54:58Z
  "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize":
    post:
      description: Summarizes policy states for the subscription level policy set definition.
      operationId: PolicyStates_SummarizeForPolicySetDefinition
      parameters:
        - $ref: "#/parameters/policyStatesSummaryResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/authorizationNamespaceParameter"
        - $ref: "#/parameters/policySetDefinitionNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
      responses:
        "200":
          description: Summarize results.
          schema:
            $ref: "#/definitions/SummarizeResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Summarize at policy set definition scope:
          parameters:
            $filter: PolicyDefinitionAction eq 'deny'
            $from: 2018-02-05T18:00:00Z
            $to: 2018-02-06T18:00:00Z
            $top: 1
            api-version: 2018-07-01-preview
            authorizationNamespace: Microsoft.Authorization
            policySetDefinitionName: 3e3807c1-65c9-49e0-a406-82d8ae3e338c
            policyStatesSummaryResource: latest
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity
                    "@odata.id": null
                    policyAssignments: []
                    results:
                      nonCompliantPolicies: 0
                      nonCompliantResources: 0
                      queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-05 18:00:00Z&$to=2018-02-06 18:00:00Z&$filter=(PolicyDefinitionAction eq 'deny') and IsCompliant eq false
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults":
    post:
      description: Queries policy states for the resources under the resource group.
      operationId: PolicyStates_ListQueryResultsForResourceGroup
      parameters:
        - $ref: "#/parameters/policyStatesResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/orderByParameter"
        - $ref: "#/parameters/selectParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
        - $ref: "#/parameters/applyParameter"
      responses:
        "200":
          description: Query results.
          schema:
            $ref: "#/definitions/PolicyStatesQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query latest at resource group scope:
          parameters:
            api-version: 2018-07-01-preview
            policyStatesResource: latest
            resourceGroupName: myResourceGroup
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29
                    policyAssignmentName: 3f3c4330183b4e218fe6fd29
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionName: 24813039-7534-408a-9842-eb99f45721b1
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c
                    policySetDefinitionName: 3e3807c1-65c9-49e0-a406-82d8ae3e338c
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.Storage/storageAccounts
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-09T18:42:42Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29
                    policyAssignmentName: 3f3c4330183b4e218fe6fd29
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682
                    policyDefinitionName: 3e3807c1-65c9-49e0-a406-82d8ae3e3682
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c
                    policySetDefinitionName: 3e3807c1-65c9-49e0-a406-82d8ae3e338c
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.Storage/storageAccounts
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-09T18:42:42Z
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize":
    post:
      description: Summarizes policy states for the resources under the resource group.
      operationId: PolicyStates_SummarizeForResourceGroup
      parameters:
        - $ref: "#/parameters/policyStatesSummaryResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
      responses:
        "200":
          description: Summarize results.
          schema:
            $ref: "#/definitions/SummarizeResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Summarize at resource group scope:
          parameters:
            api-version: 2018-07-01-preview
            policyStatesSummaryResource: latest
            resourceGroupName: myResourceGroup
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity
                    "@odata.id": null
                    policyAssignments:
                      - policyAssignmentId: /providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 55
                              queryResultsUri: https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 55
                          queryResultsUri: https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c'
                      - policyAssignmentId: /providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 55
                              queryResultsUri: https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'
                        policySetDefinitionId: /providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 55
                          queryResultsUri: https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'
                    results:
                      nonCompliantPolicies: 20
                      nonCompliantResources: 55
                      queryResultsUri: https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults":
    post:
      description: Queries policy states for the resource group level policy assignment.
      operationId: PolicyStates_ListQueryResultsForResourceGroupLevelPolicyAssignment
      parameters:
        - $ref: "#/parameters/policyStatesResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/authorizationNamespaceParameter"
        - $ref: "#/parameters/policyAssignmentNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/orderByParameter"
        - $ref: "#/parameters/selectParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
        - $ref: "#/parameters/applyParameter"
      responses:
        "200":
          description: Query results.
          schema:
            $ref: "#/definitions/PolicyStatesQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query latest at resource group level policy assignment scope:
          parameters:
            api-version: 2018-07-01-preview
            authorizationNamespace: Microsoft.Authorization
            policyAssignmentName: myPolicyAssignment
            policyStatesResource: latest
            resourceGroupName: myResourceGroup
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment
                    policyAssignmentName: myPolicyAssignment
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"allowedLocations":{"value":["EUS, WEU"]}}'
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60
                    policyDefinitionName: 4a0425e4-97bf-4ad0-ab36-145b94083c60
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Security/policies/mySecurityPolicy
                    resourceLocation: null
                    resourceTags: tbd
                    resourceType: /Microsoft.Security/policies
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-13T00:38:50Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment
                    policyAssignmentName: myPolicyAssignment
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"allowedLocations":{"value":["EUS, WEU"]}}'
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60
                    policyDefinitionName: 4a0425e4-97bf-4ad0-ab36-145b94083c60
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/test
                    resourceLocation: null
                    resourceTags: tbd
                    resourceType: /Microsoft.Authorization/policyAssignments
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-13T00:38:50Z
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize":
    post:
      description: Summarizes policy states for the resource group level policy assignment.
      operationId: PolicyStates_SummarizeForResourceGroupLevelPolicyAssignment
      parameters:
        - $ref: "#/parameters/policyStatesSummaryResourceParameter"
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/authorizationNamespaceParameter"
        - $ref: "#/parameters/policyAssignmentNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
      responses:
        "200":
          description: Summarize results.
          schema:
            $ref: "#/definitions/SummarizeResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Summarize at policy assignment scope:
          parameters:
            api-version: 2018-07-01-preview
            authorizationNamespace: Microsoft.Authorization
            policyAssignmentName: b7a1ca2596524e3ab19597f2
            policyStatesSummaryResource: latest
            resourceGroupName: myResourceGroup
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity
                    "@odata.id": null
                    policyAssignments:
                      - policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/b7a1ca2596524e3ab19597f2
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 7
                              queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-22 23:54:22Z&$to=2018-02-23 23:54:22Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/b7a1ca2596524e3ab19597f2' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60'
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 7
                          queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-22 23:54:22Z&$to=2018-02-23 23:54:22Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/b7a1ca2596524e3ab19597f2'
                    results:
                      nonCompliantPolicies: 1
                      nonCompliantResources: 7
                      queryResultsUri: https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-22 23:54:22Z&$to=2018-02-23 23:54:22Z&$filter=IsCompliant eq false
  "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults":
    post:
      description: Queries policy states for the resource.
      operationId: PolicyStates_ListQueryResultsForResource
      parameters:
        - $ref: "#/parameters/policyStatesResourceParameter"
        - $ref: "#/parameters/resourceIdParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/orderByParameter"
        - $ref: "#/parameters/selectParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
        - $ref: "#/parameters/applyParameter"
        - $ref: "#/parameters/expandParameter"
      responses:
        "200":
          description: Query results.
          schema:
            $ref: "#/definitions/PolicyStatesQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query all policy states at nested resource scope:
          parameters:
            api-version: 2018-07-01-preview
            policyStatesResource: default
            resourceId: subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c
                    policyAssignmentName: 186044306c044a1d8c0ff76c
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"allowedLocations":{"value":["centralus"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/mymg
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionName: 022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ServiceFabric/clusters/applications
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c
                    policyAssignmentName: 186044306c044a1d8c0ff76c
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"allowedLocations":{"value":["centralus"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/mymg
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionName: 022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ServiceFabric/clusters/applications
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
        Query all policy states at resource scope:
          parameters:
            api-version: 2018-07-01-preview
            policyStatesResource: default
            resourceId: subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test
                    policyAssignmentName: test
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"tagName":{"value":"no"},"tagValue":{"value":"no"}}'
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value
                    policyDefinitionName: Audit a tag and it's value
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test
                    policyAssignmentName: test
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"tagName":{"value":"no"},"tagValue":{"value":"no"}}'
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value
                    policyDefinitionName: Audit a tag and it's value
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
        Query all policy states at resource scope and expand policyEvaluationDetails:
          parameters:
            $expand: policyEvaluationDetails
            api-version: 2018-07-01-preview
            policyStatesResource: latest
            resourceId: subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    complianceState: NonCompliant
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test
                    policyAssignmentName: test
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"tagName":{"value":"no"},"tagValue":{"value":"no"}}'
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value
                    policyDefinitionName: Audit a tag and it's value
                    policyDefinitionReferenceId: null
                    policyEvaluationDetails:
                      evaluatedExpressions:
                        - expression: type
                          expressionValue: Microsoft.ClassicCompute/domainNames
                          operator: Equals
                          path: type
                          result: "True"
                          targetValue: Microsoft.ClassicCompute/domainNames
                        - expression: name
                          expressionValue: myDomainName
                          operator: Equals
                          path: name
                          result: "False"
                          targetValue: someName
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    complianceState: NonCompliant
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test2
                    policyAssignmentName: test
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: auditifnotexists
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/AuditIfNotExistsTest
                    policyDefinitionName: AuditIfNotExists test
                    policyDefinitionReferenceId: null
                    policyEvaluationDetails:
                      evaluatedExpressions:
                        - expression: tags
                          expressionValue: {}
                          operator: NotContainsKey
                          path: tags
                          result: "True"
                          targetValue: global-opco
                      ifNotExistsDetails:
                        resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName
                        totalResources: 1
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
        Query all policy states at subscription level nested resource scope:
          parameters:
            api-version: 2018-07-01-preview
            policyStatesResource: default
            resourceId: subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c
                    policyAssignmentName: 186044306c044a1d8c0ff76c
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"allowedLocations":{"value":["centralus"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/mymg
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionName: 022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: ""
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.SomeNamespace/someResourceType/someNestedResourceType
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c
                    policyAssignmentName: 186044306c044a1d8c0ff76c
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"allowedLocations":{"value":["centralus"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/mymg
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionName: 022d9357-5a90-46f7-9554-21d30ce4c32d
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: ""
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.SomeNamespace/someResourceType/someNestedResourceType
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
        Query all policy states at subscription level resource scope:
          parameters:
            api-version: 2018-07-01-preview
            policyStatesResource: default
            resourceId: subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test
                    policyAssignmentName: test
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"tagName":{"value":"no"},"tagValue":{"value":"no"}}'
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value
                    policyDefinitionName: Audit a tag and it's value
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: ""
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.SomeNamespace/someResourceType
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: mymg,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test
                    policyAssignmentName: test
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"tagName":{"value":"no"},"tagValue":{"value":"no"}}'
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value
                    policyDefinitionName: Audit a tag and it's value
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    resourceGroup: ""
                    resourceId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.SomeNamespace/someResourceType
                    subscriptionId: fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    timestamp: 2018-02-09T16:04:31Z
  "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize":
    post:
      description: Summarizes policy states for the resource.
      operationId: PolicyStates_SummarizeForResource
      parameters:
        - $ref: "#/parameters/policyStatesSummaryResourceParameter"
        - $ref: "#/parameters/resourceIdParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/topParameter"
        - $ref: "#/parameters/fromParameter"
        - $ref: "#/parameters/toParameter"
        - $ref: "#/parameters/filterParameter"
      responses:
        "200":
          description: Summarize results.
          schema:
            $ref: "#/definitions/SummarizeResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Summarize at resource scope:
          parameters:
            api-version: 2018-07-01-preview
            policyStatesSummaryResource: latest
            resourceId: subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity
                    "@odata.id": null
                    policyAssignments:
                      - policyAssignmentId: /providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874'
                      - policyAssignmentId: /providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'
                        policySetDefinitionId: /providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'
                      - policyAssignmentId: /providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/test
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/testtest'
                        policySetDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/bafcd34b-58c6-47b4-bc8b-f35198d6a025
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and its value
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and its value'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'
                        policySetDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/e4a08f18-4e3e-47af-a2eb-cc96d8c9a01f
                        results:
                          nonCompliantPolicies: 2
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'
                        policySetDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'
                        policySetDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/deny a resource based on owner tag
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6'
                        policySetDefinitionId: ""
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                        policySetDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c
                        results:
                          nonCompliantPolicies: 1
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                        policySetDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                        results:
                          nonCompliantPolicies: 3
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'
                      - policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1
                        policyDefinitions:
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'
                          - effect: audit
                            policyDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1
                            policyDefinitionReferenceId: ""
                            results:
                              nonCompliantResources: 1
                              queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'
                        policySetDefinitionId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697
                        results:
                          nonCompliantPolicies: 3
                          nonCompliantResources: 1
                          queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1'
                    results:
                      nonCompliantPolicies: 14
                      nonCompliantResources: 1
                      queryResultsUri: https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2018-07-01-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false
  "/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata":
    get:
      description: Gets OData metadata XML document.
      operationId: PolicyStates_GetMetadata
      parameters:
        - $ref: "#/parameters/scopeParameter"
        - $ref: "#/parameters/apiVersionParameter"
      produces:
        - application/xml
      responses:
        "200":
          description: OData metadata XML document.
          schema:
            $ref: "#/definitions/MetadataDocument"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Get metadata:
          parameters:
            api-version: 2018-07-01-preview
            scope: subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body: <edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">  <edmx:DataServices>    <Schema Namespace="Microsoft.WindowsAzure.Governance.Policy.Provider" xmlns="http://docs.oasis-open.org/odata/ns/edm">      <EntityType Name="PolicyState">        <Key>          <PropertyRef Name="Timestamp" />          <PropertyRef Name="ResourceId" />          <PropertyRef Name="PolicyAssignmentId" />          <PropertyRef Name="PolicyDefinitionId" />        </Key>        <Property Name="Timestamp" Type="Edm.DateTimeOffset" />        <Property Name="ResourceId" Type="Edm.String" />        <Property Name="PolicyAssignmentId" Type="Edm.String" />        <Property Name="PolicyDefinitionId" Type="Edm.String" />        <Property Name="EffectiveParameters" Type="Edm.String" />        <Property Name="IsCompliant" Type="Edm.Boolean" />        <Property Name="SubscriptionId" Type="Edm.String" />        <Property Name="ResourceType" Type="Edm.String" />        <Property Name="ResourceLocation" Type="Edm.String" />        <Property Name="ResourceGroup" Type="Edm.String" />        <Property Name="ResourceTags" Type="Edm.String" />        <Property Name="PolicyAssignmentName" Type="Edm.String" />        <Property Name="PolicyAssignmentOwner" Type="Edm.String" />        <Property Name="PolicyAssignmentParameters" Type="Edm.String" />        <Property Name="PolicyAssignmentScope" Type="Edm.String" />        <Property Name="PolicyDefinitionName" Type="Edm.String" />        <Property Name="PolicyDefinitionAction" Type="Edm.String" />        <Property Name="PolicyDefinitionCategory" Type="Edm.String" />        <Property Name="PolicySetDefinitionId" Type="Edm.String" />        <Property Name="PolicySetDefinitionName" Type="Edm.String" />        <Property Name="PolicySetDefinitionOwner" Type="Edm.String" />        <Property Name="PolicySetDefinitionCategory" Type="Edm.String" />        <Property Name="PolicySetDefinitionParameters" Type="Edm.String" />        <Property Name="ManagementGroupIds" Type="Edm.String" />        <Property Name="PolicyDefinitionReferenceId" Type="Edm.String" />      </EntityType>      <ComplexType Name="SummaryResults">        <Property Name="QueryResultsUri" Type="Edm.String" Nullable="false" />        <Property Name="NonCompliantResources" Type="Edm.Int64" Nullable="false" />        <Property Name="NonCompliantPolicies" Type="Edm.Int64" />      </ComplexType>      <ComplexType Name="PolicyDefinitionSummary">        <Property Name="PolicyDefinitionId" Type="Edm.String" Nullable="false" />        <Property Name="Effect" Type="Edm.String" Nullable="false" />        <Property Name="Results" Type="Microsoft.WindowsAzure.Governance.Policy.Provider.SummaryResults" Nullable="false" />        <Property Name="PolicyDefinitionReferenceId" Type="Edm.String" />      </ComplexType>      <ComplexType Name="PolicyAssignmentSummary">        <Property Name="PolicyAssignmentId" Type="Edm.String" Nullable="false" />        <Property Name="PolicySetDefinitionId" Type="Edm.String" />        <Property Name="Results" Type="Microsoft.WindowsAzure.Governance.Policy.Provider.SummaryResults" Nullable="false" />        <Property Name="PolicyDefinitions" Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyDefinitionSummary)" />      </ComplexType>      <EntityType Name="Summary">        <Property Name="Results" Type="Microsoft.WindowsAzure.Governance.Policy.Provider.SummaryResults" Nullable="false" />        <Property Name="PolicyAssignments" Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyAssignmentSummary)" />      </EntityType>      <Action Name="queryResults" IsBound="true" EntitySetPath="default">        <Parameter Name="default" Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyState)" Nullable="false" />        <ReturnType Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyState)" Nullable="false" />      </Action>      <Action Name="queryResults" IsBound="true" EntitySetPath="latest">        <Parameter Name="latest" Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyState)" Nullable="false" />        <ReturnType Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyState)" Nullable="false" />      </Action>      <Action Name="summarize" IsBound="true" EntitySetPath="summary">        <Parameter Name="summary" Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyState)" Nullable="false" />        <ReturnType Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.Summary)" Nullable="false" />      </Action>      <EntityContainer Name="DefaultContainer">        <EntitySet Name="default" EntityType="Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyState">          <Annotation Term="Org.OData.Core.V1.ResourcePath" String="default" />          <Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">            <Record>              <PropertyValue Property="Searchable" Bool="false" />            </Record>          </Annotation>          <Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">            <Record>              <PropertyValue Property="Insertable" Bool="false" />            </Record>          </Annotation>          <Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">            <Record>              <PropertyValue Property="Updatable" Bool="false" />            </Record>          </Annotation>          <Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">            <Record>              <PropertyValue Property="Deletable" Bool="false" />            </Record>          </Annotation>        </EntitySet>        <EntitySet Name="latest" EntityType="Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyState">          <Annotation Term="Org.OData.Core.V1.ResourcePath" String="latest" />          <Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">            <Record>              <PropertyValue Property="Searchable" Bool="false" />            </Record>          </Annotation>          <Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">            <Record>              <PropertyValue Property="Insertable" Bool="false" />            </Record>          </Annotation>          <Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">            <Record>              <PropertyValue Property="Updatable" Bool="false" />            </Record>          </Annotation>          <Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">            <Record>              <PropertyValue Property="Deletable" Bool="false" />            </Record>          </Annotation>        </EntitySet>        <EntitySet Name="summary" EntityType="Microsoft.WindowsAzure.Governance.Policy.Provider.Summary">          <Annotation Term="Org.OData.Core.V1.ResourcePath" String="summary" />          <Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">            <Record>              <PropertyValue Property="Searchable" Bool="false" />            </Record>          </Annotation>          <Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">            <Record>              <PropertyValue Property="Insertable" Bool="false" />            </Record>          </Annotation>          <Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">            <Record>              <PropertyValue Property="Updatable" Bool="false" />            </Record>          </Annotation>          <Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">            <Record>              <PropertyValue Property="Deletable" Bool="false" />            </Record>          </Annotation>        </EntitySet>        <Annotation Term="Org.OData.Core.V1.Description" String="Policy States" />      </EntityContainer>      <Annotations Target="Microsoft.WindowsAzure.Governance.Policy.Provider.DefaultContainer">        <Annotation Term="Org.OData.Capabilities.V1.ConformanceLevel">          <EnumMember>Org.OData.Capabilities.V1.ConformanceLevelType/Minimal</EnumMember>        </Annotation>        <Annotation Term="Org.OData.Capabilities.V1.SupportedFormats">          <Collection>            <String>application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true</String>            <String>application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true</String>          </Collection>        </Annotation>        <Annotation Term="Org.OData.Capabilities.V1.AsynchronousRequestsSupported" Bool="true" />      </Annotations>    </Schema>  </edmx:DataServices></edmx:Edmx>
              headers:
                content-type: application/xml
definitions:
  ExpressionEvaluationDetails:
    description: Evaluation details of policy language expressions.
    properties:
      expression:
        description: Expression evaluated.
        type: string
      expressionValue:
        description: Value of the expression.
        type: object
      operator:
        description: Operator to compare the expression value and the target value.
        type: string
      path:
        description: Property path if the expression is a field or an alias.
        type: string
      result:
        description: Evaluation result.
        type: string
      targetValue:
        description: Target value to be compared with the expression value.
        type: object
    type: object
  IfNotExistsEvaluationDetails:
    description: Evaluation details of IfNotExists effect.
    properties:
      resourceId:
        description: ID of the last evaluated resource for IfNotExists effect.
        type: string
      totalResources:
        description: Total number of resources to which the existence condition is applicable.
        type: integer
    type: object
  MetadataDocument:
    description: Metadata XML document.
    type: string
  Operation:
    description: Operation definition.
    properties:
      display:
        description: Display metadata associated with the operation.
        properties:
          description:
            description: Operation description.
            type: string
          operation:
            description: Operation name.
            type: string
          provider:
            description: Resource provider name.
            type: string
          resource:
            description: Resource name on which the operation is performed.
            type: string
      name:
        description: Operation name.
        type: string
  OperationsListResults:
    description: List of available operations.
    properties:
      "@odata.count":
        description: OData entity count; represents the number of operations returned.
        format: int32
        minimum: 1
        type: integer
      value:
        description: List of available operations.
        items:
          $ref: "#/definitions/Operation"
        type: array
  PolicyAssignmentSummary:
    description: Policy assignment summary.
    properties:
      policyAssignmentId:
        description: Policy assignment ID.
        type: string
      policyDefinitions:
        description: Policy definitions summary.
        items:
          $ref: "#/definitions/PolicyDefinitionSummary"
        type: array
      policySetDefinitionId:
        description: Policy set definition ID, if the policy assignment is for a policy set.
        type: string
      results:
        $ref: "#/definitions/SummaryResults"
        description: Non-compliance summary for the policy assignment.
  PolicyDefinitionSummary:
    description: Policy definition summary.
    properties:
      effect:
        description: Policy effect, i.e. policy definition action.
        type: string
      policyDefinitionId:
        description: Policy definition ID.
        type: string
      policyDefinitionReferenceId:
        description: Policy definition reference ID.
        type: string
      results:
        $ref: "#/definitions/SummaryResults"
        description: Non-compliance summary for the policy definition.
  PolicyEvaluationDetails:
    description: Policy evaluation details.
    properties:
      evaluatedExpressions:
        description: Details of the evaluated expressions.
        items:
          $ref: "#/definitions/ExpressionEvaluationDetails"
        type: array
      ifNotExistsDetails:
        $ref: "#/definitions/IfNotExistsEvaluationDetails"
        description: Evaluation details of IfNotExists effect.
        type: object
    type: object
  PolicyState:
    additionalProperties:
      description: The list of key/value pairs for the additional properties, in the format 'key':'value' where key = the field name, and value = the field value. By default this is not populated
    description: Policy state record.
    properties:
      "@odata.context":
        description: OData context string; used by OData clients to resolve type information based on metadata.
        type: string
      "@odata.id":
        description: OData entity ID; always set to null since policy state records do not have an entity ID.
        type: string
      complianceState:
        description: Compliance state of the resource.
        type: string
      effectiveParameters:
        description: Effective parameters for the policy assignment.
        type: string
      isCompliant:
        description: Flag which states whether the resource is compliant against the policy assignment it was evaluated against.
        type: boolean
      managementGroupIds:
        description: Comma separated list of management group IDs, which represent the hierarchy of the management groups the resource is under.
        type: string
      policyAssignmentId:
        description: Policy assignment ID.
        type: string
      policyAssignmentName:
        description: Policy assignment name.
        type: string
      policyAssignmentOwner:
        description: Policy assignment owner.
        type: string
      policyAssignmentParameters:
        description: Policy assignment parameters.
        type: string
      policyAssignmentScope:
        description: Policy assignment scope.
        type: string
      policyDefinitionAction:
        description: Policy definition action, i.e. effect.
        type: string
      policyDefinitionCategory:
        description: Policy definition category.
        type: string
      policyDefinitionId:
        description: Policy definition ID.
        type: string
      policyDefinitionName:
        description: Policy definition name.
        type: string
      policyDefinitionReferenceId:
        description: Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.
        type: string
      policyEvaluationDetails:
        $ref: "#/definitions/PolicyEvaluationDetails"
        description: Policy evaluation details.
        type: object
      policySetDefinitionCategory:
        description: Policy set definition category, if the policy assignment is for a policy set.
        type: string
      policySetDefinitionId:
        description: Policy set definition ID, if the policy assignment is for a policy set.
        type: string
      policySetDefinitionName:
        description: Policy set definition name, if the policy assignment is for a policy set.
        type: string
      policySetDefinitionOwner:
        description: Policy set definition owner, if the policy assignment is for a policy set.
        type: string
      policySetDefinitionParameters:
        description: Policy set definition parameters, if the policy assignment is for a policy set.
        type: string
      resourceGroup:
        description: Resource group name.
        type: string
      resourceId:
        description: Resource ID.
        type: string
      resourceLocation:
        description: Resource location.
        type: string
      resourceTags:
        description: List of resource tags.
        type: string
      resourceType:
        description: Resource type.
        type: string
      subscriptionId:
        description: Subscription ID.
        type: string
      timestamp:
        description: Timestamp for the policy state record.
        format: date-time
        type: string
    type: object
  PolicyStatesQueryResults:
    description: Query results.
    properties:
      "@odata.context":
        description: OData context string; used by OData clients to resolve type information based on metadata.
        type: string
      "@odata.count":
        description: OData entity count; represents the number of policy state records returned.
        format: int32
        minimum: 0
        type: integer
      value:
        description: Query results.
        items:
          $ref: "#/definitions/PolicyState"
        type: array
  QueryFailure:
    description: Error response.
    properties:
      error:
        description: Error definition.
        properties:
          code:
            description: Service specific error code which serves as the substatus for the HTTP error code.
            readOnly: true
            type: string
          message:
            description: Description of the error.
            readOnly: true
            type: string
  SummarizeResults:
    description: Summarize action results.
    properties:
      "@odata.context":
        description: OData context string; used by OData clients to resolve type information based on metadata.
        type: string
      "@odata.count":
        description: OData entity count; represents the number of summaries returned; always set to 1.
        format: int32
        maximum: 1
        minimum: 1
        type: integer
      value:
        description: Summarize action results.
        items:
          $ref: "#/definitions/Summary"
        type: array
  Summary:
    description: Summary results.
    properties:
      "@odata.context":
        description: OData context string; used by OData clients to resolve type information based on metadata.
        type: string
      "@odata.id":
        description: OData entity ID; always set to null since summaries do not have an entity ID.
        type: string
      policyAssignments:
        description: Policy assignments summary.
        items:
          $ref: "#/definitions/PolicyAssignmentSummary"
        type: array
      results:
        $ref: "#/definitions/SummaryResults"
        description: Non-compliance summary for all policy assignments.
  SummaryResults:
    description: Non-compliance summary on a particular summary level.
    properties:
      nonCompliantPolicies:
        description: Number of non-compliant policies.
        format: int32
        minimum: 0
        type: integer
      nonCompliantResources:
        description: Number of non-compliant resources.
        format: int32
        minimum: 0
        type: integer
      queryResultsUri:
        description: HTTP POST URI for queryResults action on Microsoft.PolicyInsights to retrieve raw results for the non-compliance summary.
        type: string
