summary import { VirtualRouterPeering , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createVirtualRouterPeering ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const virtualRouterName = "virtualRouter" ; const peeringName = "peering1" ; const parameters = { peerAsn : 20000 , peerIp : "192.168.1.5" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . virtualRouterPeerings . beginCreateOrUpdateAndWait ( resourceGroupName , virtualRouterName , peeringName , parameters ) ; console . log ( result ) ; } createVirtualRouterPeering ( ) . catch ( console . error ) ;