Skip to main content

policy_tracked_resources

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

Overview​

Namepolicy_tracked_resources
TypeResource
Idazure.policy_insights.policy_tracked_resources

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
createdByobjectThe details of the policy triggered deployment that created the tracked resource.
lastModifiedByobjectThe details of the policy triggered deployment that modified the tracked resource.
lastUpdateUtcstring (date-time)Timestamp of the last update to the tracked resource.
policyDetailsobjectThe details of the policy that require the tracked resource.
trackedResourceIdstringThe ID of the policy tracked resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_query_results_for_resource_groupselectresource_group_name, policy_tracked_resources_resource, subscription_id$top, $filterQueries policy tracked resources under the resource group.
list_query_results_for_management_groupselectmanagement_group_name, policy_tracked_resources_resource$top, $filterQueries policy tracked resources under the management group.
list_query_results_for_subscriptionselectpolicy_tracked_resources_resource, subscription_id$top, $filterQueries policy tracked resources under the subscription.
list_query_results_for_resourceselectresource_id, policy_tracked_resources_resource$top, $filterQueries policy tracked resources under 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
management_group_namestringManagement group name. Required.
policy_tracked_resources_resourcestringThe name of the virtual resource under PolicyTrackedResources resource type; only "default" is allowed. "default" Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_idstringResource ID. Required.
subscription_idstring
$filterstringOData filter expression. Default value is None.
$topintegerMaximum number of records to return. Default value is None.

SELECT examples​

Queries policy tracked resources under the resource group.

SELECT
createdBy,
lastModifiedBy,
lastUpdateUtc,
policyDetails,
trackedResourceId
FROM azure.policy_insights.policy_tracked_resources
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND policy_tracked_resources_resource = '{{ policy_tracked_resources_resource }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
AND $filter = '{{ $filter }}'
;