Skip to content

GalleryImageVersion CLI commands to support BlockDeletionBeforeEndOfLife parameter. #30227

@anuraganand202

Description

@anuraganand202

Requirement: Customers should be able to opt for "BlockDeletionBeforeEndOfLife" feature. This feature prevents the images from any accidental deletions. If the customer has provided an "EndOfLife" date for their images, this new feature will make sure that they are not deleted before the EndOfLife date expires.

This feature is supported from the API Version - "2024-03-03"

Update required in following CLI cmdlets:

  1. az sig image-version create
  2. az sig image-version update

We need a new boolean in these cmdlets called block-deletion-before-end-of-life

Sample commands:

  1. 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 $endOfLifeDate --block-deletion-before-end-life true
  2. az sig image-version update --resource-group MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --target-regions westcentralus=2 eastus2 --end-of-life-date $endOfLifeDate --block-deletion-before-end-of-life true

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotOKR CandidateThis label is used to track how many GitHub issues we have resolved for OKR purpose.feature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions