summary import { ManagedHsm , KeyVaultManagementClient } from "@msinternal/keyvault-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function updateAnExistingManagedHsmPool ( ) { const subscriptionId = "00000000-0000-0000-0000-000000000000" ; const resourceGroupName = "hsm-group" ; const name = "hsm1" ; const parameters = { tags : { dept : "hsm" , environment : "dogfood" , slice : "A" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new KeyVaultManagementClient ( credential , subscriptionId ) ; const result = await client . managedHsms . beginUpdateAndWait ( resourceGroupName , name , parameters ) ; console . log ( result ) ; } updateAnExistingManagedHsmPool ( ) . catch ( console . error ) ;