swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  title: PolicyEventsClient
  version: 2018-04-04
  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/stable/2018-04-04/policyEvents.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: policyinsights-policyEvents
  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: API version to use with the client requests.
    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
  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
  policyEventsResourceParameter:
    description: The name of the virtual resource under PolicyEvents resource type; only "default" is allowed.
    enum:
      - default
    in: path
    name: policyEventsResource
    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
  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
  subscriptionIdParameter:
    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/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults":
    post:
      description: Queries policy events for the resources under the management group.
      operationId: PolicyEvents_ListQueryResultsForManagementGroup
      parameters:
        - $ref: "#/parameters/policyEventsResourceParameter"
        - $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/PolicyEventsQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query at management group scope:
          parameters:
            api-version: 2018-04-04
            managementGroupName: myManagementGroup
            managementGroupsNamespace: Microsoft.Management
            policyEventsResource: default
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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
                    principalOid: fff3e452-fff2-fff1-fff8-fff12618f1b8
                    resourceGroup: myrg
                    resourceId: /subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension
                    resourceLocation: westeurope
                    resourceTags: tbd
                    resourceType: /Microsoft.Compute/virtualMachines/extensions
                    subscriptionId: fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T22:19:18.8896095Z
                  - "@odata.context": https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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/95816fce53454b15a7ed803d
                    policyAssignmentName: 95816fce53454b15a7ed803d
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"allowedLocations":{"value":["eastus"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c
                    policyDefinitionName: a2c0414b-82e4-459d-97d5-94c79a89232c
                    policyDefinitionReferenceId: ""
                    policySetDefinitionCategory: null
                    policySetDefinitionId: ""
                    policySetDefinitionName: ""
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fff3e452-fff2-fff1-fff8-fff12618f1b8
                    resourceGroup: myrg
                    resourceId: /subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension
                    resourceLocation: westeurope
                    resourceTags: tbd
                    resourceType: /Microsoft.Compute/virtualMachines/extensions
                    subscriptionId: fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T22:19:18.8896095Z
  "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults":
    post:
      description: Queries policy events for the resources under the subscription.
      operationId: PolicyEvents_ListQueryResultsForSubscription
      parameters:
        - $ref: "#/parameters/policyEventsResourceParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
        - $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/PolicyEventsQueryResults"
        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 NumDenyEvents)
            $filter: PolicyDefinitionAction eq 'deny'
            $from: 2018-02-05T18:00:00Z
            api-version: 2018-04-04
            policyEventsResource: default
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default
                "@odata.count": 1
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    NumDenyEvents: 40
        Filter and group with aggregate:
          parameters:
            $apply: groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId), aggregate($count as NumEvents))
            $filter: PolicyDefinitionAction eq 'audit' or PolicyDefinitionAction eq 'deny'
            $from: 2018-02-05T18:00:00Z
            $top: 2
            api-version: 2018-04-04
            policyEventsResource: default
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    NumEvents: 1
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29
                    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/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    NumEvents: 1
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a
                    policyDefinitionAction: audit
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService
        Filter and group without aggregate:
          parameters:
            $apply: groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId))
            $filter: PolicyDefinitionAction ne 'audit' and PolicyDefinitionAction ne 'append'
            $from: 2018-01-05T18:00:00Z
            $top: 2
            api-version: 2018-04-04
            policyEventsResource: default
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku
                    policyDefinitionAction: deny
                    policyDefinitionId: /providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.storage/storageaccounts/7d528d3a
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa
                    policyDefinitionAction: deny
                    policyDefinitionId: /providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/mysa1
        Filter and multiple groups:
          parameters:
            $apply: groupby((PolicyAssignmentId, PolicyDefinitionId, ResourceId))/groupby((PolicyAssignmentId, PolicyDefinitionId), aggregate($count as NumDeniedResources))
            $filter: PolicyDefinitionAction eq 'deny'
            $from: 2018-01-01T00:00:00Z
            $orderby: NumDeniedResources desc
            $top: 10
            api-version: 2018-04-04
            policyEventsResource: default
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default
                "@odata.count": 6
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    NumDeniedResources: 3
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/0591f497c35344fcbaf7a393
                    policyDefinitionId: /providers/microsoft.authorization/policydefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    NumDeniedResources: 2
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition1
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    NumDeniedResources: 2
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition2
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    NumDeniedResources: 1
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku
                    policyDefinitionId: /providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    NumDeniedResources: 1
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa
                    policyDefinitionId: /providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    NumDeniedResources: 1
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/myassignment2
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition3
        Query at subscription scope:
          parameters:
            api-version: 2018-04-04
            policyEventsResource: default
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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/ec62f9b2a454487296f2ccd4
                    policyAssignmentName: ec62f9b2a454487296f2ccd4
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"ALLOWEDRESOURCEGROUPS_1":{"value":["rg1","rg2"]},"ALLOWEDRESOURCEGROUPS_2":{"value":["myrg3","myrg4"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionName: 72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionReferenceId: "181565554491747128"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionName: 00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fffdfc0f-fff5-fff0-fff3-fff1a968dcc6
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T20:43:04.6971328Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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/ec62f9b2a454487296f2ccd4
                    policyAssignmentName: ec62f9b2a454487296f2ccd4
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"ALLOWEDRESOURCEGROUPS_1":{"value":["rg1","rg2"]},"ALLOWEDRESOURCEGROUPS_2":{"value":["myrg3","myrg4"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionName: 72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionReferenceId: "624540685646900425"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionName: 00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fffdfc0f-fff5-fff0-fff3-fff1a968dcc6
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T20:43:04.6971328Z
        "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-04-04
            policyEventsResource: default
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/89b27f38-e9e4-4468-ab81-801c84b8c017
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-05T22:34:02.3475017Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    policyAssignmentId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    timestamp: 2018-02-05T22:34:01.6135357Z
  "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults":
    post:
      description: Queries policy events for the subscription level policy assignment.
      operationId: PolicyEvents_ListQueryResultsForSubscriptionLevelPolicyAssignment
      parameters:
        - $ref: "#/parameters/policyEventsResourceParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
        - $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/PolicyEventsQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query at subscription level policy assignment scope:
          parameters:
            api-version: 2018-04-04
            authorizationNamespace: Microsoft.Authorization
            policyAssignmentName: ec8f9645-8ecb-4abb-9c0b-5292f19d4003
            policyEventsResource: default
            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/policyEvents/$metadata#default
                "@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/policyEvents/$metadata#default/$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: "{}"
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionName: 201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionName: 1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-08T19:59:38.6401747Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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: "{}"
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852
                    policyDefinitionAction: audit
                    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
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-08T19:59:34.2017762Z
  "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults":
    post:
      description: Queries policy events for the subscription level policy definition.
      operationId: PolicyEvents_ListQueryResultsForPolicyDefinition
      parameters:
        - $ref: "#/parameters/policyEventsResourceParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
        - $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/PolicyEventsQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query at subscription level policy definition scope:
          parameters:
            api-version: 2018-04-04
            authorizationNamespace: Microsoft.Authorization
            policyDefinitionName: 24813039-7534-408a-9842-eb99f45721b1
            policyEventsResource: default
            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/policyEvents/$metadata#default
                "@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/policyEvents/$metadata#default/$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/f4cc58b7db524a9799381531
                    policyAssignmentName: f4cc58b7db524a9799381531
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"TAGNAME_1":{"value":"NA"}}'
                    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
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/deploymentSlots/production/state/start
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames/deploymentSlots/state
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-08T19:58:11.590596Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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/f4cc58b7db524a9799381531
                    policyAssignmentName: f4cc58b7db524a9799381531
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"TAGNAME_1":{"value":"NA"}}'
                    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: "1679708035638239273"
                    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
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/deploymentSlots/production/state/start
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames/deploymentSlots/state
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-08T19:58:11.590596Z
  "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults":
    post:
      description: Queries policy events for the subscription level policy set definition.
      operationId: PolicyEvents_ListQueryResultsForPolicySetDefinition
      parameters:
        - $ref: "#/parameters/policyEventsResourceParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
        - $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/PolicyEventsQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query at subscription level policy set definition scope:
          parameters:
            api-version: 2018-04-04
            authorizationNamespace: Microsoft.Authorization
            policyEventsResource: default
            policySetDefinitionName: 3e3807c1-65c9-49e0-a406-82d8ae3e338c
            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/policyEvents/$metadata#default
                "@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/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: myManagementGroup,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
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/serviceCertificates/sha1-FFFBDAF1FFFF109FFFD95FFFC9B0FFFD6F264FFF
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames/serviceCertificates
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-08T19:49:32.9539023Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: myManagementGroup,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
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/serviceCertificates/sha1-FFF36C1CFFF4BEA57FFFEFCFFF17B9F81B710FFF
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /Microsoft.ClassicCompute/domainNames/serviceCertificates
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-08T19:49:32.9498186Z
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults":
    post:
      description: Queries policy events for the resources under the resource group.
      operationId: PolicyEvents_ListQueryResultsForResourceGroup
      parameters:
        - $ref: "#/parameters/policyEventsResourceParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
        - $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/PolicyEventsQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query at resource group scope:
          parameters:
            api-version: 2018-04-04
            policyEventsResource: default
            resourceGroupName: myResourceGroup
            subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
          responses:
            "200":
              body:
                "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default
                "@odata.count": 2
                value:
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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/ec62f9b2a454487296f2ccd4
                    policyAssignmentName: ec62f9b2a454487296f2ccd4
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"ALLOWEDRESOURCEGROUPS_1":{"value":["rg1","rg2"]},"ALLOWEDRESOURCEGROUPS_2":{"value":["myrg3","myrg4"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionName: 72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionReferenceId: "181565554491747128"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionName: 00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fffdfc0f-fff5-fff0-fff3-fff1a968dcc6
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T20:43:04.6971328Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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/ec62f9b2a454487296f2ccd4
                    policyAssignmentName: ec62f9b2a454487296f2ccd4
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"ALLOWEDRESOURCEGROUPS_1":{"value":["rg1","rg2"]},"ALLOWEDRESOURCEGROUPS_2":{"value":["myrg3","myrg4"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionName: 72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionReferenceId: "624540685646900425"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionName: 00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fffdfc0f-fff5-fff0-fff3-fff1a968dcc6
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T20:43:04.6971328Z
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults":
    post:
      description: Queries policy events for the resource group level policy assignment.
      operationId: PolicyEvents_ListQueryResultsForResourceGroupLevelPolicyAssignment
      parameters:
        - $ref: "#/parameters/policyEventsResourceParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
        - $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/PolicyEventsQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query at resource group level policy assignment scope:
          parameters:
            api-version: 2018-04-04
            authorizationNamespace: Microsoft.Authorization
            policyAssignmentName: myPolicyAssignment
            policyEventsResource: default
            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/policyEvents/$metadata#default
                "@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/policyEvents/$metadata#default/$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: null
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup
                    policyDefinitionAction: deny
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyDefinitions/myPolicyDefinition
                    policyDefinitionName: myPolicyAssignment
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fff2f355-fff2-fffc-fffb-fff1639dff94
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/defaultworkspace-fffedd8f-ffff-fffd-fffd-fffed2f84852-eus
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /microsoft.operationalinsights/workspaces
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-08T00:07:16.2804863Z
                  - "@odata.context": https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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: null
                    policyAssignmentScope: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup
                    policyDefinitionAction: deny
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyDefinitions/myPolicyDefinition
                    policyDefinitionName: myPolicyAssignment
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: null
                    policySetDefinitionName: null
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fff2f355-fff2-fffc-fffb-fff1639dff94
                    resourceGroup: myResourceGroup
                    resourceId: /subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/defaultworkspace-fffedd8f-ffff-fffd-fffd-fffed2f84852-eus
                    resourceLocation: eastus
                    resourceTags: tbd
                    resourceType: /microsoft.operationalinsights/workspaces
                    subscriptionId: fffedd8f-ffff-fffd-fffd-fffed2f84852
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-08T00:06:08.4302267Z
  "/{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults":
    post:
      description: Queries policy events for the resource.
      operationId: PolicyEvents_ListQueryResultsForResource
      parameters:
        - $ref: "#/parameters/policyEventsResourceParameter"
        - $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"
      responses:
        "200":
          description: Query results.
          schema:
            $ref: "#/definitions/PolicyEventsQueryResults"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/QueryFailure"
      x-ms-examples:
        Query at nested resource scope:
          parameters:
            api-version: 2018-04-04
            policyEventsResource: 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/policyEvents/$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/policyEvents/$metadata#default/$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/ec62f9b2a454487296f2ccd4
                    policyAssignmentName: ec62f9b2a454487296f2ccd4
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"ALLOWEDRESOURCEGROUPS_1":{"value":["rg1","rg2"]},"ALLOWEDRESOURCEGROUPS_2":{"value":["myrg3","myrg4"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionName: 72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionReferenceId: "181565554491747128"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionName: 00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fffdfc0f-fff5-fff0-fff3-fff1a968dcc6
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T20:43:04.6971328Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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/ec62f9b2a454487296f2ccd4
                    policyAssignmentName: ec62f9b2a454487296f2ccd4
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"ALLOWEDRESOURCEGROUPS_1":{"value":["rg1","rg2"]},"ALLOWEDRESOURCEGROUPS_2":{"value":["myrg3","myrg4"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionName: 72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionReferenceId: "624540685646900425"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionName: 00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fffdfc0f-fff5-fff0-fff3-fff1a968dcc6
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T20:43:04.6971328Z
        Query at resource scope:
          parameters:
            api-version: 2018-04-04
            policyEventsResource: 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/policyEvents/$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/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003
                    policyAssignmentName: ec8f9645-8ecb-4abb-9c0b-5292f19d4003
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionName: 201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionName: 1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T15:14:39.8473851Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003
                    policyAssignmentName: d15545b8-ff50-409a-a6e3-5bd5cc954003
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionName: 201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionName: 1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T15:14:39.5842458Z
        Query at subscription level nested resource scope:
          parameters:
            api-version: 2018-04-04
            policyEventsResource: 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/policyEvents/$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/policyEvents/$metadata#default/$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/ec62f9b2a454487296f2ccd4
                    policyAssignmentName: ec62f9b2a454487296f2ccd4
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"ALLOWEDRESOURCEGROUPS_1":{"value":["rg1","rg2"]},"ALLOWEDRESOURCEGROUPS_2":{"value":["myrg3","myrg4"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionName: 72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionReferenceId: "181565554491747128"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionName: 00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fffdfc0f-fff5-fff0-fff3-fff1a968dcc6
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T20:43:04.6971328Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$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/ec62f9b2a454487296f2ccd4
                    policyAssignmentName: ec62f9b2a454487296f2ccd4
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: '{"ALLOWEDRESOURCEGROUPS_1":{"value":["rg1","rg2"]},"ALLOWEDRESOURCEGROUPS_2":{"value":["myrg3","myrg4"]}}'
                    policyAssignmentScope: /providers/Microsoft.Management/managementGroups/myManagementGroup
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionName: 72c0c41a-c752-4bc0-9c61-0d6adc567066
                    policyDefinitionReferenceId: "624540685646900425"
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionName: 00b36c66-612b-44e2-9f8e-b758296d40fe
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fffdfc0f-fff5-fff0-fff3-fff1a968dcc6
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T20:43:04.6971328Z
        Query at subscription level resource scope:
          parameters:
            api-version: 2018-04-04
            policyEventsResource: 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/policyEvents/$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/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003
                    policyAssignmentName: ec8f9645-8ecb-4abb-9c0b-5292f19d4003
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionName: 201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionName: 1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T15:14:39.8473851Z
                  - "@odata.context": https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity
                    "@odata.id": null
                    effectiveParameters: null
                    isCompliant: false
                    managementGroupIds: myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47
                    policyAssignmentId: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003
                    policyAssignmentName: d15545b8-ff50-409a-a6e3-5bd5cc954003
                    policyAssignmentOwner: tbd
                    policyAssignmentParameters: "{}"
                    policyAssignmentScope: /subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5
                    policyDefinitionAction: audit
                    policyDefinitionCategory: tbd
                    policyDefinitionId: /providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionName: 201ea587-7c90-41c3-910f-c280ae01cfd6
                    policyDefinitionReferenceId: null
                    policySetDefinitionCategory: null
                    policySetDefinitionId: /providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionName: 1f3afdf9-d0c9-4c3d-847f-89da613e70a8
                    policySetDefinitionOwner: null
                    policySetDefinitionParameters: null
                    principalOid: fff890fa-fff0-fff3-fff9-fffd7653f078
                    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
                    tenantId: fff988bf-fff1-ffff-fffb-fffcd011db47
                    timestamp: 2018-02-07T15:14:39.5842458Z
  "/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata":
    get:
      description: Gets OData metadata XML document.
      operationId: PolicyEvents_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-04-04
            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="PolicyEvent">        <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" />        <Property Name="TenantId" Type="Edm.String" />        <Property Name="PrincipalOid" Type="Edm.String" />      </EntityType>      <Action Name="queryResults" IsBound="true" EntitySetPath="default">        <Parameter Name="default" Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyEvent)" Nullable="false" />        <ReturnType Type="Collection(Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyEvent)" Nullable="false" />      </Action>      <EntityContainer Name="DefaultContainer">        <EntitySet Name="default" EntityType="Microsoft.WindowsAzure.Governance.Policy.Provider.PolicyEvent">          <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>        <Annotation Term="Org.OData.Core.V1.Description" String="Policy Events" />      </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:
  MetadataDocument:
    description: Metadata XML document.
    type: string
  PolicyEvent:
    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 event 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 event records do not have an entity ID.
        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
      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
      principalOid:
        description: Principal object ID for the user who initiated the resource operation that triggered the policy event.
        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
      tenantId:
        description: Tenant ID for the policy event record.
        type: string
      timestamp:
        description: Timestamp for the policy event record.
        format: date-time
        type: string
    type: object
  PolicyEventsQueryResults:
    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 event records returned.
        format: int32
        minimum: 0
        type: integer
      value:
        description: Query results.
        items:
          $ref: "#/definitions/PolicyEvent"
        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
