Skip to main content

policy_set_definition_versions

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

Overview

Namepolicy_set_definition_versions
TypeResource
Idazure.resource.policy_set_definition_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
descriptionstringThe policy set definition description.
displayNamestringThe display name of the policy set definition.
metadataobjectThe policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.
parametersobjectThe policy set definition parameters that can be used in policy definition references.
policyDefinitionGroupsarrayThe metadata describing groups of policy definition references within the policy set definition.
policyDefinitionsarrayAn array of policy definition references. Required.
policyTypestringThe type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Known values are: "NotSpecified", "BuiltIn", "Custom", and "Static". (NotSpecified, BuiltIn, Custom, Static)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
versionstringThe policy set definition version in #.#.# format.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpolicy_set_definition_name, policy_definition_version, subscription_id$expandThis operation retrieves the policy set definition version in the given subscription with the given name and version.
get_at_management_groupselectmanagement_group_name, policy_set_definition_name, policy_definition_version$expandThis operation retrieves the policy set definition version in the given management group with the given name and version.
listselectpolicy_set_definition_name, subscription_id$expand, $topThis operation retrieves a list of all the policy set definition versions for the given policy set definition.
list_by_management_groupselectmanagement_group_name, policy_set_definition_name$expand, $topThis operation retrieves a list of all the policy set definition versions for the given policy set definition in a given management group.
get_built_inselectpolicy_set_definition_name, policy_definition_version$expandThis operation retrieves the built-in policy set definition version with the given name and version.
list_allselectsubscription_idLists 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_inselectpolicy_set_definition_name$expand, $topThis 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_groupselectmanagement_group_nameLists 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_builtinsselectLists 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_updateinsertpolicy_set_definition_name, policy_definition_version, subscription_idThis operation creates or updates a policy set definition version in the given subscription with the given name and version.
create_or_update_at_management_groupinsertmanagement_group_name, policy_set_definition_name, policy_definition_versionThis operation creates or updates a policy set definition version in the given management group with the given name and version.
create_or_updatereplacepolicy_set_definition_name, policy_definition_version, subscription_idThis operation creates or updates a policy set definition version in the given subscription with the given name and version.
create_or_update_at_management_groupreplacemanagement_group_name, policy_set_definition_name, policy_definition_versionThis operation creates or updates a policy set definition version in the given management group with the given name and version.
deletedeletepolicy_set_definition_name, policy_definition_version, subscription_idThis operation deletes the policy set definition version in the given subscription with the given name and version.
delete_at_management_groupdeletemanagement_group_name, policy_set_definition_name, policy_definition_versionThis 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.

NameDatatypeDescription
management_group_namestringThe name of the management group. The name is case insensitive. Required.
policy_definition_versionstringThe 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_namestringThe name of the policy set definition. Required.
subscription_idstring
$expandstringComma-separated list of additional properties to be included in the response. Supported values are 'LatestDefinitionVersion, EffectiveDefinitionVersion'. Default value is None.
$topintegerMaximum number of records to return. When the $top filter is not provided, it will return 500 records. Default value is None.

SELECT examples

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 }}'
;

INSERT examples

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
;

REPLACE examples

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;

DELETE examples

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
;