summary import { RouteTable , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createRouteTableWithRoute ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const routeTableName = "testrt" ; const parameters = { disableBgpRoutePropagation : true , location : "westus" , routes : [ { name : "route1" , addressPrefix : "10.0.3.0/24" , nextHopType : "VirtualNetworkGateway" } ] } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . routeTables . beginCreateOrUpdateAndWait ( resourceGroupName , routeTableName , parameters ) ; console . log ( result ) ; } createRouteTableWithRoute ( ) . catch ( console . error ) ;