Microsoft.Authorization policydefinitions 2015-10-01-preview

Bicep resource definition

The policydefinitions resource type can be deployed with operations that target:

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

Resource format

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

resource symbolicname 'Microsoft.Authorization/policydefinitions@2015-10-01-preview' = {
  name: 'string'
  properties: {
    description: 'string'
    displayName: 'string'
    policyRule: any(Azure.Bicep.Types.Concrete.AnyType)
    policyType: 'string'
  }
}

Property values

Microsoft.Authorization/policydefinitions

Name Description Value
name The resource name string (required)
properties The policy definition properties. PolicyDefinitionProperties

PolicyDefinitionProperties

Name Description Value
description The policy definition description. string
displayName The display name of the policy definition. string
policyRule The policy rule. any
policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. 'BuiltIn'
'Custom'
'NotSpecified'

Quickstart samples

The following quickstart samples deploy this resource type.

Bicep File Description
Create an Azure Virtual Network Manager and sample VNETs This template deploys an Azure Virtual Network Manager and sample virtual networks into the named resource group. It supports multiple connectivity topologies and network group membership types.
Deploy a Policy Def and Assign to Multiple Mgmt Groups This template is a management group level template that will create a policy definition and assign that policy to multiple management groups.
Deploy a policy definition and assign to a management group This template is a management group level template that will create a policy definition and assign that policy to the target management group. Currently, this template cannot be deployed via the Azure Portal.

ARM template resource definition

The policydefinitions resource type can be deployed with operations that target:

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

Resource format

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

{
  "type": "Microsoft.Authorization/policydefinitions",
  "apiVersion": "2015-10-01-preview",
  "name": "string",
  "properties": {
    "description": "string",
    "displayName": "string",
    "policyRule": {},
    "policyType": "string"
  }
}

Property values

Microsoft.Authorization/policydefinitions

Name Description Value
apiVersion The api version '2015-10-01-preview'
name The resource name string (required)
properties The policy definition properties. PolicyDefinitionProperties
type The resource type 'Microsoft.Authorization/policydefinitions'

PolicyDefinitionProperties

Name Description Value
description The policy definition description. string
displayName The display name of the policy definition. string
policyRule The policy rule. any
policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. 'BuiltIn'
'Custom'
'NotSpecified'

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create an Azure Virtual Network Manager and sample VNETs

Deploy to Azure
This template deploys an Azure Virtual Network Manager and sample virtual networks into the named resource group. It supports multiple connectivity topologies and network group membership types.
Deploy a Policy Def and Assign to Multiple Mgmt Groups

Deploy to Azure
This template is a management group level template that will create a policy definition and assign that policy to multiple management groups.
Deploy a policy definition and assign to a management group

Deploy to Azure
This template is a management group level template that will create a policy definition and assign that policy to the target management group. Currently, this template cannot be deployed via the Azure Portal.

Terraform (AzAPI provider) resource definition

The policydefinitions resource type can be deployed with operations that target:

  • Subscription

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

Resource format

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Authorization/policydefinitions@2015-10-01-preview"
  name = "string"
  body = jsonencode({
    properties = {
      description = "string"
      displayName = "string"
      policyRule = ?
      policyType = "string"
    }
  })
}

Property values

Microsoft.Authorization/policydefinitions

Name Description Value
name The resource name string (required)
properties The policy definition properties. PolicyDefinitionProperties
type The resource type "Microsoft.Authorization/policydefinitions@2015-10-01-preview"

PolicyDefinitionProperties

Name Description Value
description The policy definition description. string
displayName The display name of the policy definition. string
policyRule The policy rule. any
policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. 'BuiltIn'
'Custom'
'NotSpecified'