Microsoft.Authorization policySetDefinitions 2020-09-01

Bicep resource definition

The policySetDefinitions resource type is an extension resource, which means you can apply it to another resource.

Use the scope property on this resource to set the scope for this resource. See Set scope on extension resources in Bicep.

Valid deployment scopes for the policySetDefinitions resource are:

You can reference this resource type as a read-only resource at level of: Tenants

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Authorization/policySetDefinitions resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Authorization/policySetDefinitions@2020-09-01' = {
  name: 'string'
  scope: resourceSymbolicName
  properties: {
    description: 'string'
    displayName: 'string'
    metadata: any()
    parameters: {}
    policyDefinitionGroups: [
      {
        additionalMetadataId: 'string'
        category: 'string'
        description: 'string'
        displayName: 'string'
        name: 'string'
      }
    ]
    policyDefinitions: [
      {
        groupNames: [
          'string'
        ]
        parameters: {}
        policyDefinitionId: 'string'
        policyDefinitionReferenceId: 'string'
      }
    ]
    policyType: 'string'
  }
}

Property values

policySetDefinitions

Name Description Value
name The resource name string (required)

Character limit: 1-128 display name

1-64 resource name

Valid characters:
Display name can contain any characters.

Resource name can't use:
<>*%&:\?.+/ or control characters.

Can't end with period or space.
scope Use when creating an extension resource at a scope that is different than the deployment scope. Target resource

For Bicep, set this property to the symbolic name of the resource to apply the extension resource.
properties The policy definition properties. PolicySetDefinitionProperties

PolicySetDefinitionProperties

Name Description Value
description The policy set definition description. string
displayName The display name of the policy set definition. string
metadata The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs. For Bicep, you can use the any() function.
parameters The policy set definition parameters that can be used in policy definition references. object
policyDefinitionGroups The metadata describing groups of policy definition references within the policy set definition. PolicyDefinitionGroup[]
policyDefinitions An array of policy definition references. PolicyDefinitionReference[] (required)
policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. 'BuiltIn'
'Custom'
'NotSpecified'
'Static'

PolicyDefinitionGroup

Name Description Value
additionalMetadataId A resource ID of a resource that contains additional metadata about the group. string
category The group's category. string
description The group's description. string
displayName The group's display name. string
name The name of the group. string (required)

PolicyDefinitionReference

Name Description Value
groupNames The name of the groups that this policy definition reference belongs to. string[]
parameters The parameter values for the referenced policy rule. The keys are the parameter names. object
policyDefinitionId The ID of the policy definition or policy set definition. string (required)
policyDefinitionReferenceId A unique id (within the policy set definition) for this policy definition reference. string

ARM template resource definition

The policySetDefinitions resource type is an extension resource, which means you can apply it to another resource.

Use the scope property on this resource to set the scope for this resource. See Set scope on extension resources in ARM templates.

Valid deployment scopes for the policySetDefinitions resource are:

You can reference this resource type as a read-only resource at level of: Tenants

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Authorization/policySetDefinitions resource, add the following JSON to your template.

{
  "type": "Microsoft.Authorization/policySetDefinitions",
  "apiVersion": "2020-09-01",
  "name": "string",
  "scope": "string",
  "properties": {
    "description": "string",
    "displayName": "string",
    "metadata": {},
    "parameters": {},
    "policyDefinitionGroups": [
      {
        "additionalMetadataId": "string",
        "category": "string",
        "description": "string",
        "displayName": "string",
        "name": "string"
      }
    ],
    "policyDefinitions": [
      {
        "groupNames": [ "string" ],
        "parameters": {},
        "policyDefinitionId": "string",
        "policyDefinitionReferenceId": "string"
      }
    ],
    "policyType": "string"
  }
}

Property values

policySetDefinitions

Name Description Value
type The resource type 'Microsoft.Authorization/policySetDefinitions'
apiVersion The resource api version '2020-09-01'
name The resource name string (required)

Character limit: 1-128 display name

1-64 resource name

Valid characters:
Display name can contain any characters.

Resource name can't use:
<>*%&:\?.+/ or control characters.

Can't end with period or space.
scope Use when creating an extension resource at a scope that is different than the deployment scope. Target resource

For JSON, set the value to the full name of the resource to apply the extension resource to.
properties The policy definition properties. PolicySetDefinitionProperties

PolicySetDefinitionProperties

Name Description Value
description The policy set definition description. string
displayName The display name of the policy set definition. string
metadata The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.
parameters The policy set definition parameters that can be used in policy definition references. object
policyDefinitionGroups The metadata describing groups of policy definition references within the policy set definition. PolicyDefinitionGroup[]
policyDefinitions An array of policy definition references. PolicyDefinitionReference[] (required)
policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. 'BuiltIn'
'Custom'
'NotSpecified'
'Static'

PolicyDefinitionGroup

Name Description Value
additionalMetadataId A resource ID of a resource that contains additional metadata about the group. string
category The group's category. string
description The group's description. string
displayName The group's display name. string
name The name of the group. string (required)

PolicyDefinitionReference

Name Description Value
groupNames The name of the groups that this policy definition reference belongs to. string[]
parameters The parameter values for the referenced policy rule. The keys are the parameter names. object
policyDefinitionId The ID of the policy definition or policy set definition. string (required)
policyDefinitionReferenceId A unique id (within the policy set definition) for this policy definition reference. string

Terraform (AzAPI provider) resource definition

The policySetDefinitions resource type is an extension resource, which means you can apply it to another resource.

Use the parent_id property on this resource to set the scope for this resource.

Valid deployment scopes for the policySetDefinitions resource are:

  • Management groups
  • Subscriptions

You can reference this resource type as a read-only resource at level of: Tenants

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Authorization/policySetDefinitions resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Authorization/policySetDefinitions@2020-09-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      description = "string"
      displayName = "string"
      parameters = {}
      policyDefinitionGroups = [
        {
          additionalMetadataId = "string"
          category = "string"
          description = "string"
          displayName = "string"
          name = "string"
        }
      ]
      policyDefinitions = [
        {
          groupNames = [
            "string"
          ]
          parameters = {}
          policyDefinitionId = "string"
          policyDefinitionReferenceId = "string"
        }
      ]
      policyType = "string"
    }
  })
}

Property values

policySetDefinitions

Name Description Value
type The resource type "Microsoft.Authorization/policySetDefinitions@2020-09-01"
name The resource name string (required)

Character limit: 1-128 display name

1-64 resource name

Valid characters:
Display name can contain any characters.

Resource name can't use:
<>*%&:\?.+/ or control characters.

Can't end with period or space.
parent_id The ID of the resource to apply this extension resource to. string (required)
properties The policy definition properties. PolicySetDefinitionProperties

PolicySetDefinitionProperties

Name Description Value
description The policy set definition description. string
displayName The display name of the policy set definition. string
metadata The policy set definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.
parameters The policy set definition parameters that can be used in policy definition references. object
policyDefinitionGroups The metadata describing groups of policy definition references within the policy set definition. PolicyDefinitionGroup[]
policyDefinitions An array of policy definition references. PolicyDefinitionReference[] (required)
policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. "BuiltIn"
"Custom"
"NotSpecified"
"Static"

PolicyDefinitionGroup

Name Description Value
additionalMetadataId A resource ID of a resource that contains additional metadata about the group. string
category The group's category. string
description The group's description. string
displayName The group's display name. string
name The name of the group. string (required)

PolicyDefinitionReference

Name Description Value
groupNames The name of the groups that this policy definition reference belongs to. string[]
parameters The parameter values for the referenced policy rule. The keys are the parameter names. object
policyDefinitionId The ID of the policy definition or policy set definition. string (required)
policyDefinitionReferenceId A unique id (within the policy set definition) for this policy definition reference. string