az group lock
Manage Azure resource group locks.
Commands
az group lock create |
Create a resource group lock. |
az group lock delete |
Delete a resource group lock. |
az group lock list |
List lock information in the resource-group. |
az group lock show |
Show the details of a resource group lock. |
az group lock update |
Update a resource group lock. |
az group lock create
Create a resource group lock.
az group lock create --lock-type {CanNotDelete, ReadOnly}
--name
--resource-group
[--notes]
[--subscription]
Examples
Create a read-only resource group level lock.
az group lock create --lock-type ReadOnly -n lockName -g MyResourceGroup
Required Parameters
The type of lock restriction.
Name of the lock.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Notes about this lock.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az group lock delete
Delete a resource group lock.
az group lock delete [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Delete a resource group lock
az group lock delete --name lockName -g MyResourceGroup
Optional Parameters
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
Name of the lock.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az group lock list
List lock information in the resource-group.
az group lock list [--filter-string]
[--query-examples]
[--resource-group]
[--subscription]
Examples
List out all locks on the resource group level
az group lock list -g MyResourceGroup
Optional Parameters
A query filter to use to restrict the results.
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az group lock show
Show the details of a resource group lock.
az group lock show [--ids]
[--name]
[--query-examples]
[--resource-group]
[--subscription]
Examples
Show a resource group level lock
az group lock show -n lockname -g MyResourceGroup
Optional Parameters
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
Name of the lock.
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az group lock update
Update a resource group lock.
az group lock update [--ids]
[--lock-type {CanNotDelete, ReadOnly}]
[--name]
[--notes]
[--resource-group]
[--subscription]
Examples
Update a resource group lock with new notes and type
az group lock update --name lockName -g MyResourceGroup --notes newNotesHere --lock-type CanNotDelete
Optional Parameters
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
The type of lock restriction.
Name of the lock.
Notes about this lock.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.