policy_restrictions
Creates, updates, deletes, gets or lists a policy_restrictions resource.
Overview
| Name | policy_restrictions |
| Type | Resource |
| Id | azure.policy_insights.policy_restrictions |
Fields
The following fields are returned by SELECT queries:
- check_at_resource_group_scope
- check_at_subscription_scope
- check_at_management_group_scope
| Name | Datatype | Description |
|---|---|---|
contentEvaluationResult | object | Evaluation results for the provided partial resource content. |
fieldRestrictions | array | The restrictions that will be placed on various fields in the resource by policy. |
| Name | Datatype | Description |
|---|---|---|
contentEvaluationResult | object | Evaluation results for the provided partial resource content. |
fieldRestrictions | array | The restrictions that will be placed on various fields in the resource by policy. |
| Name | Datatype | Description |
|---|---|---|
contentEvaluationResult | object | Evaluation results for the provided partial resource content. |
fieldRestrictions | array | The restrictions that will be placed on various fields in the resource by policy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
check_at_resource_group_scope | select | resource_group_name, subscription_id | Checks what restrictions Azure Policy will place on a resource within a resource group. Use this when the resource group the resource will be created in is already known. | |
check_at_subscription_scope | select | subscription_id | Checks what restrictions Azure Policy will place on a resource within a subscription. | |
check_at_management_group_scope | select | management_group_id | Checks what restrictions Azure Policy will place on resources within a management group. |
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.
| Name | Datatype | Description |
|---|---|---|
management_group_id | string | Management group ID. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- check_at_resource_group_scope
- check_at_subscription_scope
- check_at_management_group_scope
Checks what restrictions Azure Policy will place on a resource within a resource group. Use this when the resource group the resource will be created in is already known.
SELECT
contentEvaluationResult,
fieldRestrictions
FROM azure.policy_insights.policy_restrictions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Checks what restrictions Azure Policy will place on a resource within a subscription.
SELECT
contentEvaluationResult,
fieldRestrictions
FROM azure.policy_insights.policy_restrictions
WHERE subscription_id = '{{ subscription_id }}' -- required
;
Checks what restrictions Azure Policy will place on resources within a management group.
SELECT
contentEvaluationResult,
fieldRestrictions
FROM azure.policy_insights.policy_restrictions
WHERE management_group_id = '{{ management_group_id }}' -- required
;