az account lock
Manage Azure subscription level locks.
Commands
Name | Description | Type | Status |
---|---|---|---|
az account lock create |
Create a subscription lock. |
Core | GA |
az account lock delete |
Delete a subscription lock. |
Core | GA |
az account lock list |
List lock information in the subscription. |
Core | GA |
az account lock show |
Show the details of a subscription lock. |
Core | GA |
az account lock update |
Update a subscription lock. |
Core | GA |
az account lock create
Create a subscription lock.
az account lock create --lock-type {CanNotDelete, ReadOnly}
--name
[--notes]
Examples
Create a read-only subscription level lock.
az account lock create --lock-type ReadOnly -n lockName
Required Parameters
The type of lock restriction.
Property | Value |
---|---|
Accepted values: | CanNotDelete, ReadOnly |
Name of the lock.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Notes about this lock.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az account lock delete
Delete a subscription lock.
az account lock delete [--ids]
[--name]
Examples
Delete a subscription lock
az account lock delete --name lockName
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
Name of the lock.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az account lock list
List lock information in the subscription.
az account lock list [--filter-string]
Examples
List out all locks on the subscription level
az account lock list
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
A query filter to use to restrict the results.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az account lock show
Show the details of a subscription lock.
az account lock show [--ids]
[--name]
Examples
Show a subscription level lock
az account lock show -n lockname
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
Name of the lock.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az account lock update
Update a subscription lock.
az account lock update [--ids]
[--lock-type {CanNotDelete, ReadOnly}]
[--name]
[--notes]
Examples
Update a subscription lock with new notes and type
az account lock update --name lockName --notes newNotesHere --lock-type CanNotDelete
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
The type of lock restriction.
Property | Value |
---|---|
Accepted values: | CanNotDelete, ReadOnly |
Name of the lock.
Notes about this lock.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |