Microsoft.Authorization locks template reference

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",
  "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.

When the lock is applied to a resource, provide the name in the format:
{resourceName}/Microsoft.Authorization/{lockName}

When the lock is applied to a resource group or subscription, provide the lock name without additional segments:
{lockName}
type enum Yes When the lock is applied to a resource, use:
{resourceProviderNamespace}/{resourceType}/providers/locks

When the lock is applied to a resource group or subscription, use:
Microsoft.Authorization/locks
apiVersion enum Yes 2015-01-01
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.