az-lock

Manage Azure locks.

TLDR

Create a read-only subscription level lock

$ az lock create --name [lock_name] --lock-type ReadOnly
copy

Create a read-only resource group level lock

$ az lock create --name [lock_name] --resource-group [group_name] --lock-type ReadOnly
copy

Delete a subscription level lock

$ az lock delete --name [lock_name]
copy

Delete a resource group level lock

$ az lock delete --name [lock_name] --resource-group [group_name]
copy

List out all locks on the subscription level

$ az lock list
copy

Show a subscription level lock

$ az lock show -n [lock_name]
copy

Copied to clipboard
digitalocean