Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARM] az lock create/delete: Add examples for operating different levels of locks #18890

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/azure-cli/azure/cli/command_modules/resource/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,9 +1321,13 @@
helps['lock create'] = """
type: command
short-summary: Create a lock.
long-summary: 'Locks can exist at three different scopes: subscription, resource group and resource.'
long-summary: 'Locks can exist at three different scopes: subscription, resource group and resource. \
For how to add locks at different levels, please refer to the following examples.'
examples:
- name: Create a read-only subscription level lock.
text: >
az lock create --name lockName --lock-type ReadOnly
- name: Create a read-only resource group level lock.
text: >
az lock create --name lockName --resource-group group --lock-type ReadOnly
- name: Create a read-only resource level lock on a vnet resource.
Expand All @@ -1339,10 +1343,18 @@
helps['lock delete'] = """
type: command
short-summary: Delete a lock.
long-summary: 'Locks can exist at three different scopes: subscription, resource group and resource. \
For how to delete locks at different levels, please refer to the following examples.'
examples:
- name: Delete a resource group-level lock
- name: Delete a subscription level lock
text: >
az lock delete --name lockName
- name: Delete a resource group level lock
text: >
az lock delete --name lockName --resource-group group
- name: Delete a resource level lock
text: >
az lock delete --name lockName --resource-group group --resource resourceName --resource-type resourceType
"""

helps['lock list'] = """
Expand Down