summary import { Route , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function createRoute ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const routeTableName = "testrt" ; const routeName = "route1" ; const routeParameters = { addressPrefix : "10.0.3.0/24" , nextHopType : "VirtualNetworkGateway" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . routes . beginCreateOrUpdateAndWait ( resourceGroupName , routeTableName , routeName , routeParameters ) ; console . log ( result ) ; } createRoute ( ) . catch ( console . error ) ;