summary import { EffectiveRoutesParameters , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function effectiveRoutesForAConnectionResource ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const virtualHubName = "virtualHub1" ; const effectiveRoutesParameters = { resourceId : "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName" , virtualWanResourceType : "ExpressRouteConnection" } ; const options = { effectiveRoutesParameters : effectiveRoutesParameters } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . virtualHubs . beginGetEffectiveVirtualHubRoutesAndWait ( resourceGroupName , virtualHubName , options ) ; console . log ( result ) ; } effectiveRoutesForAConnectionResource ( ) . catch ( console . error ) ;