summary import { DiskEncryptionSetUpdate , ComputeManagementClient } from "@msinternal/compute-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function updateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating ( ) { const subscriptionId = "{subscription-id}" ; const resourceGroupName = "myResourceGroup" ; const diskEncryptionSetName = "myDiskEncryptionSet" ; const diskEncryptionSet = { activeKey : { keyUrl : "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" } , encryptionType : "EncryptionAtRestWithCustomerKey" , identity : { type : "SystemAssigned" } , rotationToLatestKeyVersionEnabled : true } ; const credential = new DefaultAzureCredential ( ) ; const client = new ComputeManagementClient ( credential , subscriptionId ) ; const result = await client . diskEncryptionSets . beginUpdateAndWait ( resourceGroupName , diskEncryptionSetName , diskEncryptionSet ) ; console . log ( result ) ; } updateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating ( ) . catch ( console . error ) ;