summary import { RoutingIntent , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function routeTablePut ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const virtualHubName = "virtualHub1" ; const routingIntentName = "Intent1" ; const routingIntentParameters = { routingPolicies : [ { name : "InternetTraffic" , destinations : [ "Internet" ] , nextHop : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1" } , { name : "PrivateTrafficPolicy" , destinations : [ "PrivateTraffic" ] , nextHop : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1" } ] } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . routingIntentOperations . beginCreateOrUpdateAndWait ( resourceGroupName , virtualHubName , routingIntentName , routingIntentParameters ) ; console . log ( result ) ; } routeTablePut ( ) . catch ( console . error ) ;