summary import { VaultCreateOrUpdateParameters , KeyVaultManagementClient } from "@msinternal/keyvault-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createOrUpdateAVaultWithNetworkAcls ( ) { const subscriptionId = "00000000-0000-0000-0000-000000000000" ; const resourceGroupName = "sample-resource-group" ; const vaultName = "sample-vault" ; const parameters = { location : "westus" , properties : { enabledForDeployment : true , enabledForDiskEncryption : true , enabledForTemplateDeployment : true , networkAcls : { bypass : "AzureServices" , defaultAction : "Deny" , ipRules : [ { value : "124.56.78.91" } , { value : "'10.91.4.0/24'" } ] , virtualNetworkRules : [ { id : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" } ] } , sku : { name : "standard" , family : "A" } , tenantId : "00000000-0000-0000-0000-000000000000" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new KeyVaultManagementClient ( credential , subscriptionId ) ; const result = await client . vaults . beginCreateOrUpdateAndWait ( resourceGroupName , vaultName , parameters ) ; console . log ( result ) ; } createOrUpdateAVaultWithNetworkAcls ( ) . catch ( console . error ) ;