summary import { DiskEncryptionSetUpdate , ComputeManagementClient } from "@msinternal/compute-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function updateADiskEncryptionSet ( ) { const subscriptionId = "{subscription-id}" ; const resourceGroupName = "myResourceGroup" ; const diskEncryptionSetName = "myDiskEncryptionSet" ; const diskEncryptionSet = { activeKey : { keyUrl : "https://myvmvault.vault-int.azure-int.net/keys/keyName/keyVersion" , sourceVault : { id : "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" } } , encryptionType : "EncryptionAtRestWithCustomerKey" , tags : { department : "Development" , project : "Encryption" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new ComputeManagementClient ( credential , subscriptionId ) ; const result = await client . diskEncryptionSets . beginUpdateAndWait ( resourceGroupName , diskEncryptionSetName , diskEncryptionSet ) ; console . log ( result ) ; } updateADiskEncryptionSet ( ) . catch ( console . error ) ;