Microsoft.Authorization policyAssignments 2016-12-01

Template format

To create a Microsoft.Authorization/policyAssignments resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Authorization/policyAssignments",
  "apiVersion": "2016-12-01",
  "scope": "string",
  "properties": {
    "displayName": "string",
    "policyDefinitionId": "string",
    "scope": "string",
    "parameters": {},
    "description": "string"
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Authorization/policyAssignments object

Name Type Required Value
name string Yes
type enum Yes Microsoft.Authorization/policyAssignments
apiVersion enum Yes 2016-12-01
scope string No Use when specifying a scope that is different than the deployment scope. See Setting scope for extension resources in ARM templates.
properties object Yes Properties for the policy assignment. - PolicyAssignmentProperties object

PolicyAssignmentProperties object

Name Type Required Value
displayName string No The display name of the policy assignment.
policyDefinitionId string No The ID of the policy definition.
scope string No The scope for the policy assignment.
parameters object No Required if a parameter is used in policy rule.
description string No This message will be part of response in case of policy violation.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Assign a built-in policy to an existing Resource Group

Deploy to Azure
This template assigns a built-in policy to an existing resource group.
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.