Microsoft.Authorization locks 2015-01-01

Template format

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

  "name": "string",
  "type": "Microsoft.Authorization/locks",
  "apiVersion": "2015-01-01",
  "scope": "string",
  "properties": {
    "level": "string",
    "notes": "string"

Property values

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

Microsoft.Authorization/locks object

Name Type Required Value
name string Yes The name of lock. The lock name can be a maximum of 260 characters. The lock name can only include alphanumeric characters, periods, underscores, hyphens and parenthesis and cannot end in a period.
type enum Yes Microsoft.Authorization/locks
apiVersion enum Yes 2015-01-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 The properties of the lock. - ManagementLockProperties object

ManagementLockProperties object

Name Type Required Value
level enum No The lock level of the management lock. - NotSpecified, CanNotDelete, ReadOnly
notes string No The notes of the management lock.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create a resourceGroup, apply a lock and RBAC

Deploy to Azure
This template is a subscription level template that will create a resourceGroup, apply a lock the the resourceGroup and assign contributor permssions to the supplied principalId. Currently, this template cannot be deployed via the Azure Portal.