Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions src/azure-cli/azure/cli/command_modules/vm/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,14 @@
--gallery-image-version 1.0.0 \\
--virtual-machine /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\
--end-of-life-date 2024-08-02T00:00:00+00:00
- name: Add a new image version and block the deletion for this image version if its end of life has not expired
text: |
az sig image-version create --resource-group MyResourceGroup \\
--gallery-name MyGallery --gallery-image-definition MyImage \\
--gallery-image-version 1.0.0 \\
--virtual-machine /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM \\
--end-of-life-date 2024-08-02T00:00:00+00:00 \\
--block-deletion-before-end-of-life true
"""

helps['sig image-version list-shared'] = """
Expand Down Expand Up @@ -913,6 +921,11 @@
az sig image-version update -g MyResourceGroup --gallery-name MyGallery \\
--gallery-image-definition MyImage --gallery-image-version 1.0.0 \\
--set safetyProfile.allowDeletionOfReplicatedLocations=true
- name: Block the deletion for this gallery image version if its end of life has not expired.
text: |
az sig image-version update -g MyResourceGroup --gallery-name MyGallery \\
--gallery-image-definition MyImage --gallery-image-version 1.0.0 \\
--block-deletion-before-end-of-life true
"""

helps['sig image-version undelete'] = """
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/command_modules/vm/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ def load_arguments(self, _):
'If a replica count is not specified, the default replica count will be used. If a storage account type is not specified, the default storage account type will be used. '
'If "--target-edge-zones None" is specified, the target extended locations will be cleared.')
c.argument('block_deletion_before_end_of_life', arg_type=get_three_state_flag(), min_api='2024-03-03',
options_list=['--block-deletion-before-end-of-life', '--block-deletion'],
options_list=['--block-deletion-before-end-of-life', '--block-delete-before-eol'],
help="Indicate whether or not the deletion is blocked for this gallery image version if its end of life has not expired")

for scope in ['sig image-version create', 'sig image-version update', 'sig image-version undelete']:
Expand Down
Loading