summary import { ComputeManagementClient } from "@msinternal/compute-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function deleteAGalleryImageVersion ( ) { const subscriptionId = "{subscription-id}" ; const resourceGroupName = "myResourceGroup" ; const galleryName = "myGalleryName" ; const galleryImageName = "myGalleryImageName" ; const galleryImageVersionName = "1.0.0" ; const credential = new DefaultAzureCredential ( ) ; const client = new ComputeManagementClient ( credential , subscriptionId ) ; const result = await client . galleryImageVersions . beginDeleteAndWait ( resourceGroupName , galleryName , galleryImageName , galleryImageVersionName ) ; console . log ( result ) ; } deleteAGalleryImageVersion ( ) . catch ( console . error ) ;