@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api PolicyStatesClient
@base https://management.azure.com
@version 2018-07-01-preview
@auth OAuth2
@common_fields {api-version: any # Client Api Version.}
@endpoints 18
@toc providers(3), subscriptions(12), {resourceId}(2), {scope}(1)

@group providers
@endpoint POST /providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
@desc Queries policy states for the resources under the management group.
@required {policyStatesResource: any # The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s)., managementGroupsNamespace: any # The namespace for Microsoft Management RP; only "Microsoft.Management" is allowed., managementGroupName: any # Management group name.}
@optional {$top: any # Maximum number of records to return., $orderby: any # 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"., $select: any # Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId"., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression., $apply: any # OData apply expression for aggregations., $skiptoken: any # Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.}
@returns(200) Query results.

@endpoint POST /providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
@desc Summarizes policy states for the resources under the management group.
@required {policyStatesSummaryResource: any # The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value., managementGroupsNamespace: any # The namespace for Microsoft Management RP; only "Microsoft.Management" is allowed., managementGroupName: any # Management group name.}
@optional {$top: any # Maximum number of records to return., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression.}
@returns(200) Summarize results.

@endgroup

@group subscriptions
@endpoint POST /subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
@desc Queries policy states for the resources under the subscription.
@required {policyStatesResource: any # The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s)., subscriptionId: any # Microsoft Azure subscription ID.}
@optional {$top: any # Maximum number of records to return., $orderby: any # 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"., $select: any # Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId"., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression., $apply: any # OData apply expression for aggregations., $skiptoken: any # Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.}
@returns(200) Query results.

@endpoint POST /subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
@desc Summarizes policy states for the resources under the subscription.
@required {policyStatesSummaryResource: any # The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value., subscriptionId: any # Microsoft Azure subscription ID.}
@optional {$top: any # Maximum number of records to return., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression.}
@returns(200) Summarize results.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
@desc Queries policy states for the resources under the resource group.
@required {policyStatesResource: any # The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s)., subscriptionId: any # Microsoft Azure subscription ID., resourceGroupName: any # Resource group name.}
@optional {$top: any # Maximum number of records to return., $orderby: any # 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"., $select: any # Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId"., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression., $apply: any # OData apply expression for aggregations., $skiptoken: any # Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.}
@returns(200) Query results.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
@desc Summarizes policy states for the resources under the resource group.
@required {policyStatesSummaryResource: any # The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value., subscriptionId: any # Microsoft Azure subscription ID., resourceGroupName: any # Resource group name.}
@optional {$top: any # Maximum number of records to return., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression.}
@returns(200) Summarize results.

@endgroup

@group {resourceId}
@endpoint POST /{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
@desc Queries policy states for the resource.
@required {policyStatesResource: any # The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s)., resourceId: any # Resource ID.}
@optional {$top: any # Maximum number of records to return., $orderby: any # 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"., $select: any # Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId"., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression., $apply: any # OData apply expression for aggregations., $expand: any # The $expand query parameter. For example, to expand policyEvaluationDetails, use $expand=policyEvaluationDetails, $skiptoken: any # Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.}
@returns(200) Query results.

@endpoint POST /{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
@desc Summarizes policy states for the resource.
@required {policyStatesSummaryResource: any # The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value., resourceId: any # Resource ID.}
@optional {$top: any # Maximum number of records to return., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression.}
@returns(200) Summarize results.

@endgroup

@group subscriptions
@endpoint POST /subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
@desc Queries policy states for the subscription level policy set definition.
@required {policyStatesResource: any # The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s)., subscriptionId: any # Microsoft Azure subscription ID., authorizationNamespace: any # The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed., policySetDefinitionName: any # Policy set definition name.}
@optional {$top: any # Maximum number of records to return., $orderby: any # 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"., $select: any # Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId"., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression., $apply: any # OData apply expression for aggregations., $skiptoken: any # Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.}
@returns(200) Query results.

@endpoint POST /subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
@desc Summarizes policy states for the subscription level policy set definition.
@required {policyStatesSummaryResource: any # The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value., subscriptionId: any # Microsoft Azure subscription ID., authorizationNamespace: any # The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed., policySetDefinitionName: any # Policy set definition name.}
@optional {$top: any # Maximum number of records to return., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression.}
@returns(200) Summarize results.

@endpoint POST /subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
@desc Queries policy states for the subscription level policy definition.
@required {policyStatesResource: any # The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s)., subscriptionId: any # Microsoft Azure subscription ID., authorizationNamespace: any # The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed., policyDefinitionName: any # Policy definition name.}
@optional {$top: any # Maximum number of records to return., $orderby: any # 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"., $select: any # Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId"., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression., $apply: any # OData apply expression for aggregations., $skiptoken: any # Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.}
@returns(200) Query results.

@endpoint POST /subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
@desc Summarizes policy states for the subscription level policy definition.
@required {policyStatesSummaryResource: any # The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value., subscriptionId: any # Microsoft Azure subscription ID., authorizationNamespace: any # The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed., policyDefinitionName: any # Policy definition name.}
@optional {$top: any # Maximum number of records to return., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression.}
@returns(200) Summarize results.

@endpoint POST /subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
@desc Queries policy states for the subscription level policy assignment.
@required {policyStatesResource: any # The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s)., subscriptionId: any # Microsoft Azure subscription ID., authorizationNamespace: any # The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed., policyAssignmentName: any # Policy assignment name.}
@optional {$top: any # Maximum number of records to return., $orderby: any # 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"., $select: any # Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId"., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression., $apply: any # OData apply expression for aggregations., $skiptoken: any # Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.}
@returns(200) Query results.

@endpoint POST /subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
@desc Summarizes policy states for the subscription level policy assignment.
@required {policyStatesSummaryResource: any # The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value., subscriptionId: any # Microsoft Azure subscription ID., authorizationNamespace: any # The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed., policyAssignmentName: any # Policy assignment name.}
@optional {$top: any # Maximum number of records to return., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression.}
@returns(200) Summarize results.

@endpoint POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults
@desc Queries policy states for the resource group level policy assignment.
@required {policyStatesResource: any # The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s)., subscriptionId: any # Microsoft Azure subscription ID., resourceGroupName: any # Resource group name., authorizationNamespace: any # The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed., policyAssignmentName: any # Policy assignment name.}
@optional {$top: any # Maximum number of records to return., $orderby: any # 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"., $select: any # Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId"., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression., $apply: any # OData apply expression for aggregations., $skiptoken: any # Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.}
@returns(200) Query results.

@endpoint POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize
@desc Summarizes policy states for the resource group level policy assignment.
@required {policyStatesSummaryResource: any # The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value., subscriptionId: any # Microsoft Azure subscription ID., resourceGroupName: any # Resource group name., authorizationNamespace: any # The namespace for Microsoft Authorization resource provider; only "Microsoft.Authorization" is allowed., policyAssignmentName: any # Policy assignment name.}
@optional {$top: any # Maximum number of records to return., $from: any # ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day)., $to: any # ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time., $filter: any # OData filter expression.}
@returns(200) Summarize results.

@endgroup

@group providers
@endpoint GET /providers/Microsoft.PolicyInsights/operations
@desc Lists available operations.
@returns(200) List of available operations.

@endgroup

@group {scope}
@endpoint GET /{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata
@desc Gets OData metadata XML document.
@required {scope: any # A valid scope, i.e. management group, subscription, resource group, or resource ID. Scope used has no effect on metadata returned.}
@returns(200) OData metadata XML document.

@endgroup

@end
