summary import { CustomIpPrefix , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createCustomIPPrefixAllocationMethod ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const customIpPrefixName = "test-customipprefix" ; const parameters = { cidr : "0.0.0.0/24" , location : "westus" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . customIPPrefixes . beginCreateOrUpdateAndWait ( resourceGroupName , customIpPrefixName , parameters ) ; console . log ( result ) ; } createCustomIPPrefixAllocationMethod ( ) . catch ( console . error ) ;