summary import { RouteFilterRule , NetworkManagementClient } from "@msinternal/network-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function routeFilterRuleCreate ( ) { const subscriptionId = "subid" ; const resourceGroupName = "rg1" ; const routeFilterName = "filterName" ; const ruleName = "ruleName" ; const routeFilterRuleParameters = { access : "Allow" , communities : [ "12076:5030" , "12076:5040" ] , routeFilterRuleType : "Community" } ; const credential = new DefaultAzureCredential ( ) ; const client = new NetworkManagementClient ( credential , subscriptionId ) ; const result = await client . routeFilterRules . beginCreateOrUpdateAndWait ( resourceGroupName , routeFilterName , ruleName , routeFilterRuleParameters ) ; console . log ( result ) ; } routeFilterRuleCreate ( ) . catch ( console . error ) ;