summary import { ExpressRouteCircuitPeering , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createExpressRouteCircuitPeerings ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const circuitName = "circuitName" ; const peeringName = "AzurePrivatePeering" ; const peeringParameters = { peerASN : 200 , primaryPeerAddressPrefix : "192.168.16.252/30" , secondaryPeerAddressPrefix : "192.168.18.252/30" , vlanId : 200 } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . expressRouteCircuitPeerings . beginCreateOrUpdateAndWait ( resourceGroupName , circuitName , peeringName , peeringParameters ) ; console . log ( result ) ; } createExpressRouteCircuitPeerings ( ) . catch ( console . error ) ;