Forrest logo
back to the az tool

az-lock:tldr:3eaeb

az-lock: Create a read-only subscription level lock.
$ az lock create --name ${lock_name} --lock-type ReadOnly
try on your machine

The command is using the Azure CLI (command-line interface) to create a new lock in Azure resources.

Here's a breakdown of the command:

  • az lock create: This is the base command for creating a lock in Azure resources.
  • --name ${lock_name}: This specifies the name for the lock. ${lock_name} is a placeholder that can be replaced with an actual lock name.
  • --lock-type ReadOnly: This defines the type of lock to be created. In this case, it is a "ReadOnly" lock. A ReadOnly lock prevents any modification or deletion of the locked resource but allows read operations to continue.

By running this command with the appropriate values, a new ReadOnly lock will be created on the specified Azure resource.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the az tool