Skip to main content

component_policy_states

Creates, updates, deletes, gets or lists a component_policy_states resource.

Overview

Namecomponent_policy_states
TypeResource
Idazure.policy_insights.component_policy_states

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
@odataobject
valuearrayQuery results.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_query_results_for_resource_group_level_policy_assignmentselectsubscription_id, resource_group_name, policy_assignment_name, component_policy_states_resource$top, $orderby, $select, $from, $to, $filter, $applyQueries component policy states for the resource group level policy assignment.
list_query_results_for_resource_groupselectsubscription_id, resource_group_name, component_policy_states_resource$top, $orderby, $select, $from, $to, $filter, $applyQueries component policy states under resource group scope.
list_query_results_for_policy_definitionselectsubscription_id, policy_definition_name, component_policy_states_resource$top, $orderby, $select, $from, $to, $filter, $applyQueries component policy states for the subscription level policy definition.
list_query_results_for_subscription_level_policy_assignmentselectsubscription_id, policy_assignment_name, component_policy_states_resource$top, $orderby, $select, $from, $to, $filter, $applyQueries component policy states for the subscription level policy assignment.
list_query_results_for_subscriptionselectsubscription_id, component_policy_states_resource$top, $orderby, $select, $from, $to, $filter, $applyQueries component policy states under subscription scope.
list_query_results_for_resourceselectresource_id, component_policy_states_resource$top, $orderby, $select, $from, $to, $filter, $apply, $expandQueries component policy states for the resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
component_policy_states_resourcestringThe virtual resource under ComponentPolicyStates resource type. In a given time range, 'latest' represents the latest component policy state(s). "latest" Required.
policy_assignment_namestringPolicy assignment name. Required.
policy_definition_namestringPolicy definition name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_idstringResource ID. Required.
subscription_idstringThe ID of the target subscription. The value must be an UUID. Required.
$applystringOData apply expression for aggregations. Default value is None.
$expandstringThe $expand query parameter. Default value is None.
$filterstringOData filter expression. Default value is None.
$fromstring (date-time)ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day). Default value is None.
$orderbystringOrdering 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". Default value is None.
$selectstringSelect expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". Default value is None.
$tostring (date-time)ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time. Default value is None.
$topintegerMaximum number of records to return. Default value is None.

SELECT examples

Queries component policy states for the resource group level policy assignment.

SELECT
@odata,
value
FROM azure.policy_insights.component_policy_states
WHERE subscription_id = '{{ subscription_id }}' -- required
AND resource_group_name = '{{ resource_group_name }}' -- required
AND policy_assignment_name = '{{ policy_assignment_name }}' -- required
AND component_policy_states_resource = '{{ component_policy_states_resource }}' -- required
AND $top = '{{ $top }}'
AND $orderby = '{{ $orderby }}'
AND $select = '{{ $select }}'
AND $from = '{{ $from }}'
AND $to = '{{ $to }}'
AND $filter = '{{ $filter }}'
AND $apply = '{{ $apply }}'
;