summary import { ExpressRoutePort , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function expressRoutePortUpdateLink ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const expressRoutePortName = "portName" ; const parameters = { bandwidthInGbps : 100 , encapsulation : "QinQ" , links : [ { name : "link1" , adminState : "Enabled" } ] , location : "westus" , peeringLocation : "peeringLocationName" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . expressRoutePorts . beginCreateOrUpdateAndWait ( resourceGroupName , expressRoutePortName , parameters ) ; console . log ( result ) ; } expressRoutePortUpdateLink ( ) . catch ( console . error ) ;