summary import { RouteFilter , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function routeFilterCreate ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const routeFilterName = "filterName" ; const routeFilterParameters = { location : "West US" , rules : [ { name : "ruleName" , access : "Allow" , communities : [ "12076:5030" , "12076:5040" ] , routeFilterRuleType : "Community" } ] , tags : { key1 : "value1" } } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . routeFilters . beginCreateOrUpdateAndWait ( resourceGroupName , routeFilterName , routeFilterParameters ) ; console . log ( result ) ; } routeFilterCreate ( ) . catch ( console . error ) ;