summary import { ExpressRouteGateway , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function expressRouteGatewayCreate ( ) { const subscriptionId = "subid" ; const resourceGroupName = "resourceGroupName" ; const expressRouteGatewayName = "gateway-2" ; const putExpressRouteGatewayParameters = { autoScaleConfiguration : { bounds : { min : 3 } } , location : "westus" , virtualHub : { id : "/subscriptions/subid/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . expressRouteGateways . beginCreateOrUpdateAndWait ( resourceGroupName , expressRouteGatewayName , putExpressRouteGatewayParameters ) ; console . log ( result ) ; } expressRouteGatewayCreate ( ) . catch ( console . error ) ;