policy_set_definition_versions
Creates, updates, deletes, gets or lists a policy_set_definition_versions resource.
Overview
| Name | policy_set_definition_versions |
| Type | Resource |
| Id | azure.resource.policy_set_definition_versions |
Fields
The following fields are returned by SELECT queries:
- get
- get_at_management_group
- list
- list_by_management_group
- get_built_in
- list_all
- list_built_in
- list_all_at_management_group
- list_all_builtins
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | The policy set definition description. |
displayName | string | The display name of the policy set definition. |
metadata | object | The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. |
parameters | object | The policy set definition parameters that can be used in policy definition references. |
policyDefinitionGroups | array | The metadata describing groups of policy definition references within the policy set definition. |
policyDefinitions | array | An array of policy definition references. Required. |
policyType | string | The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The policy set definition version in #.#.# format. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | The policy set definition description. |
displayName | string | The display name of the policy set definition. |
metadata | object | The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. |
parameters | object | The policy set definition parameters that can be used in policy definition references. |
policyDefinitionGroups | array | The metadata describing groups of policy definition references within the policy set definition. |
policyDefinitions | array | An array of policy definition references. Required. |
policyType | string | The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The policy set definition version in #.#.# format. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | The policy set definition description. |
displayName | string | The display name of the policy set definition. |
metadata | object | The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. |
parameters | object | The policy set definition parameters that can be used in policy definition references. |
policyDefinitionGroups | array | The metadata describing groups of policy definition references within the policy set definition. |
policyDefinitions | array | An array of policy definition references. Required. |
policyType | string | The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The policy set definition version in #.#.# format. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | The policy set definition description. |
displayName | string | The display name of the policy set definition. |
metadata | object | The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. |
parameters | object | The policy set definition parameters that can be used in policy definition references. |
policyDefinitionGroups | array | The metadata describing groups of policy definition references within the policy set definition. |
policyDefinitions | array | An array of policy definition references. Required. |
policyType | string | The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The policy set definition version in #.#.# format. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | The policy set definition description. |
displayName | string | The display name of the policy set definition. |
metadata | object | The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. |
parameters | object | The policy set definition parameters that can be used in policy definition references. |
policyDefinitionGroups | array | The metadata describing groups of policy definition references within the policy set definition. |
policyDefinitions | array | An array of policy definition references. Required. |
policyType | string | The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The policy set definition version in #.#.# format. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | The policy set definition description. |
displayName | string | The display name of the policy set definition. |
metadata | object | The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. |
parameters | object | The policy set definition parameters that can be used in policy definition references. |
policyDefinitionGroups | array | The metadata describing groups of policy definition references within the policy set definition. |
policyDefinitions | array | An array of policy definition references. Required. |
policyType | string | The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The policy set definition version in #.#.# format. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | The policy set definition description. |
displayName | string | The display name of the policy set definition. |
metadata | object | The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. |
parameters | object | The policy set definition parameters that can be used in policy definition references. |
policyDefinitionGroups | array | The metadata describing groups of policy definition references within the policy set definition. |
policyDefinitions | array | An array of policy definition references. Required. |
policyType | string | The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The policy set definition version in #.#.# format. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | The policy set definition description. |
displayName | string | The display name of the policy set definition. |
metadata | object | The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. |
parameters | object | The policy set definition parameters that can be used in policy definition references. |
policyDefinitionGroups | array | The metadata describing groups of policy definition references within the policy set definition. |
policyDefinitions | array | An array of policy definition references. Required. |
policyType | string | The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The policy set definition version in #.#.# format. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | The policy set definition description. |
displayName | string | The display name of the policy set definition. |
metadata | object | The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. |
parameters | object | The policy set definition parameters that can be used in policy definition references. |
policyDefinitionGroups | array | The metadata describing groups of policy definition references within the policy set definition. |
policyDefinitions | array | An array of policy definition references. Required. |
policyType | string | The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The policy set definition version in #.#.# format. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | policy_set_definition_name, policy_definition_version, subscription_id | $expand | This operation retrieves the policy set definition version in the given subscription with the given name and version. |
get_at_management_group | select | management_group_name, policy_set_definition_name, policy_definition_version | $expand | This operation retrieves the policy set definition version in the given management group with the given name and version. |
list | select | policy_set_definition_name, subscription_id | $expand, $top | This operation retrieves a list of all the policy set definition versions for the given policy set definition. |
list_by_management_group | select | management_group_name, policy_set_definition_name | $expand, $top | This operation retrieves a list of all the policy set definition versions for the given policy set definition in a given management group. |
get_built_in | select | policy_set_definition_name, policy_definition_version | $expand | This operation retrieves the built-in policy set definition version with the given name and version. |
list_all | select | subscription_id | Lists all policy set definition versions within a subscription. This operation lists all the policy set definition versions for all policy set definitions within a subscription. | |
list_built_in | select | policy_set_definition_name | $expand, $top | This operation retrieves a list of all the built-in policy set definition versions for the given built-in policy set definition. |
list_all_at_management_group | select | management_group_name | Lists all policy set definition versions at management group scope. This operation lists all the policy set definition versions for all policy set definitions at the management group scope. | |
list_all_builtins | select | Lists all built-in policy set definition versions. This operation lists all the built-in policy set definition versions for all built-in policy set definitions. | ||
create_or_update | insert | policy_set_definition_name, policy_definition_version, subscription_id | This operation creates or updates a policy set definition version in the given subscription with the given name and version. | |
create_or_update_at_management_group | insert | management_group_name, policy_set_definition_name, policy_definition_version | This operation creates or updates a policy set definition version in the given management group with the given name and version. | |
create_or_update | replace | policy_set_definition_name, policy_definition_version, subscription_id | This operation creates or updates a policy set definition version in the given subscription with the given name and version. | |
create_or_update_at_management_group | replace | management_group_name, policy_set_definition_name, policy_definition_version | This operation creates or updates a policy set definition version in the given management group with the given name and version. | |
delete | delete | policy_set_definition_name, policy_definition_version, subscription_id | This operation deletes the policy set definition version in the given subscription with the given name and version. | |
delete_at_management_group | delete | management_group_name, policy_set_definition_name, policy_definition_version | This operation deletes the policy set definition version in the given management group with the given name and version. |
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_name | string | The name of the management group. The name is case insensitive. Required. |
policy_definition_version | string | The policy set definition version. The format is x.y.z where x is the major version number, y is the minor version number, and z is the patch number. Required. |
policy_set_definition_name | string | The name of the policy set definition. Required. |
subscription_id | string | |
$expand | string | Comma-separated list of additional properties to be included in the response. Supported values are 'LatestDefinitionVersion, EffectiveDefinitionVersion'. Default value is None. |
$top | integer | Maximum number of records to return. When the $top filter is not provided, it will return 500 records. Default value is None. |
SELECT examples
- get
- get_at_management_group
- list
- list_by_management_group
- get_built_in
- list_all
- list_built_in
- list_all_at_management_group
- list_all_builtins
This operation retrieves the policy set definition version in the given subscription with the given name and version.
SELECT
id,
name,
description,
displayName,
metadata,
parameters,
policyDefinitionGroups,
policyDefinitions,
policyType,
systemData,
type,
version
FROM azure.resource.policy_set_definition_versions
WHERE policy_set_definition_name = '{{ policy_set_definition_name }}' -- required
AND policy_definition_version = '{{ policy_definition_version }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;
This operation retrieves the policy set definition version in the given management group with the given name and version.
SELECT
id,
name,
description,
displayName,
metadata,
parameters,
policyDefinitionGroups,
policyDefinitions,
policyType,
systemData,
type,
version
FROM azure.resource.policy_set_definition_versions
WHERE management_group_name = '{{ management_group_name }}' -- required
AND policy_set_definition_name = '{{ policy_set_definition_name }}' -- required
AND policy_definition_version = '{{ policy_definition_version }}' -- required
AND $expand = '{{ $expand }}'
;
This operation retrieves a list of all the policy set definition versions for the given policy set definition.
SELECT
id,
name,
description,
displayName,
metadata,
parameters,
policyDefinitionGroups,
policyDefinitions,
policyType,
systemData,
type,
version
FROM azure.resource.policy_set_definition_versions
WHERE policy_set_definition_name = '{{ policy_set_definition_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
AND $top = '{{ $top }}'
;
This operation retrieves a list of all the policy set definition versions for the given policy set definition in a given management group.
SELECT
id,
name,
description,
displayName,
metadata,
parameters,
policyDefinitionGroups,
policyDefinitions,
policyType,
systemData,
type,
version
FROM azure.resource.policy_set_definition_versions
WHERE management_group_name = '{{ management_group_name }}' -- required
AND policy_set_definition_name = '{{ policy_set_definition_name }}' -- required
AND $expand = '{{ $expand }}'
AND $top = '{{ $top }}'
;
This operation retrieves the built-in policy set definition version with the given name and version.
SELECT
id,
name,
description,
displayName,
metadata,
parameters,
policyDefinitionGroups,
policyDefinitions,
policyType,
systemData,
type,
version
FROM azure.resource.policy_set_definition_versions
WHERE policy_set_definition_name = '{{ policy_set_definition_name }}' -- required
AND policy_definition_version = '{{ policy_definition_version }}' -- required
AND $expand = '{{ $expand }}'
;
Lists all policy set definition versions within a subscription. This operation lists all the policy set definition versions for all policy set definitions within a subscription.
SELECT
id,
name,
description,
displayName,
metadata,
parameters,
policyDefinitionGroups,
policyDefinitions,
policyType,
systemData,
type,
version
FROM azure.resource.policy_set_definition_versions
WHERE subscription_id = '{{ subscription_id }}' -- required
;
This operation retrieves a list of all the built-in policy set definition versions for the given built-in policy set definition.
SELECT
id,
name,
description,
displayName,
metadata,
parameters,
policyDefinitionGroups,
policyDefinitions,
policyType,
systemData,
type,
version
FROM azure.resource.policy_set_definition_versions
WHERE policy_set_definition_name = '{{ policy_set_definition_name }}' -- required
AND $expand = '{{ $expand }}'
AND $top = '{{ $top }}'
;
Lists all policy set definition versions at management group scope. This operation lists all the policy set definition versions for all policy set definitions at the management group scope.
SELECT
id,
name,
description,
displayName,
metadata,
parameters,
policyDefinitionGroups,
policyDefinitions,
policyType,
systemData,
type,
version
FROM azure.resource.policy_set_definition_versions
WHERE management_group_name = '{{ management_group_name }}' -- required
;
Lists all built-in policy set definition versions. This operation lists all the built-in policy set definition versions for all built-in policy set definitions.
SELECT
id,
name,
description,
displayName,
metadata,
parameters,
policyDefinitionGroups,
policyDefinitions,
policyType,
systemData,
type,
version
FROM azure.resource.policy_set_definition_versions
;
INSERT examples
- create_or_update
- create_or_update_at_management_group
- Manifest
This operation creates or updates a policy set definition version in the given subscription with the given name and version.
INSERT INTO azure.resource.policy_set_definition_versions (
properties,
policy_set_definition_name,
policy_definition_version,
subscription_id
)
SELECT
'{{ properties }}',
'{{ policy_set_definition_name }}',
'{{ policy_definition_version }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
This operation creates or updates a policy set definition version in the given management group with the given name and version.
INSERT INTO azure.resource.policy_set_definition_versions (
properties,
management_group_name,
policy_set_definition_name,
policy_definition_version
)
SELECT
'{{ properties }}',
'{{ management_group_name }}',
'{{ policy_set_definition_name }}',
'{{ policy_definition_version }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: policy_set_definition_versions
props:
- name: policy_set_definition_name
value: "{{ policy_set_definition_name }}"
description: Required parameter for the policy_set_definition_versions resource.
- name: policy_definition_version
value: "{{ policy_definition_version }}"
description: Required parameter for the policy_set_definition_versions resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the policy_set_definition_versions resource.
- name: management_group_name
value: "{{ management_group_name }}"
description: Required parameter for the policy_set_definition_versions resource.
- name: properties
description: |
The policy set definition version properties.
value:
policyType: "{{ policyType }}"
displayName: "{{ displayName }}"
description: "{{ description }}"
metadata: "{{ metadata }}"
parameters: "{{ parameters }}"
policyDefinitions:
- policyDefinitionId: "{{ policyDefinitionId }}"
definitionVersion: "{{ definitionVersion }}"
latestDefinitionVersion: "{{ latestDefinitionVersion }}"
effectiveDefinitionVersion: "{{ effectiveDefinitionVersion }}"
parameters: "{{ parameters }}"
policyDefinitionReferenceId: "{{ policyDefinitionReferenceId }}"
groupNames: "{{ groupNames }}"
policyDefinitionGroups:
- name: "{{ name }}"
displayName: "{{ displayName }}"
category: "{{ category }}"
description: "{{ description }}"
additionalMetadataId: "{{ additionalMetadataId }}"
version: "{{ version }}"
REPLACE examples
- create_or_update
- create_or_update_at_management_group
This operation creates or updates a policy set definition version in the given subscription with the given name and version.
REPLACE azure.resource.policy_set_definition_versions
SET
properties = '{{ properties }}'
WHERE
policy_set_definition_name = '{{ policy_set_definition_name }}' --required
AND policy_definition_version = '{{ policy_definition_version }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
This operation creates or updates a policy set definition version in the given management group with the given name and version.
REPLACE azure.resource.policy_set_definition_versions
SET
properties = '{{ properties }}'
WHERE
management_group_name = '{{ management_group_name }}' --required
AND policy_set_definition_name = '{{ policy_set_definition_name }}' --required
AND policy_definition_version = '{{ policy_definition_version }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
- delete_at_management_group
This operation deletes the policy set definition version in the given subscription with the given name and version.
DELETE FROM azure.resource.policy_set_definition_versions
WHERE policy_set_definition_name = '{{ policy_set_definition_name }}' --required
AND policy_definition_version = '{{ policy_definition_version }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
This operation deletes the policy set definition version in the given management group with the given name and version.
DELETE FROM azure.resource.policy_set_definition_versions
WHERE management_group_name = '{{ management_group_name }}' --required
AND policy_set_definition_name = '{{ policy_set_definition_name }}' --required
AND policy_definition_version = '{{ policy_definition_version }}' --required
;