az network route-filter rule

Manage rules in a route filter.

To learn more about route filters with Microsoft peering with ExpressRoute, visit https://docs.microsoft.com/azure/expressroute/how-to-routefilter-cli.

Commands

az network route-filter rule create

Create a rule in a route filter.

az network route-filter rule delete

Delete a rule from a route filter.

az network route-filter rule list

List rules in a route filter.

az network route-filter rule list-service-communities

Gets all the available BGP service communities.

az network route-filter rule show

Get the details of a rule in a route filter.

az network route-filter rule update

Update a rule in a route filter.

az network route-filter rule create

Create a rule in a route filter.

az network route-filter rule create --access {Allow, Deny}
                                    --communities
                                    --filter-name
                                    --name
                                    --resource-group
                                    [--location]
                                    [--subscription]

Examples

Create a rule in a route filter to allow Dynamics 365.

az network route-filter rule create -g MyResourceGroup --filter-name MyRouteFilter \
    -n MyRouteFilterRule --communities 12076:5040 --access Allow

Required Parameters

--access

The access type of the rule.

accepted values: Allow, Deny
--communities

Space-separated list of border gateway protocol (BGP) community values to filter on.

value from: az network route-filter rule list-service-communities
--filter-name

Name of the route filter.

--name -n

Name of the route filter rule.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network route-filter rule delete

Delete a rule from a route filter.

az network route-filter rule delete [--filter-name]
                                    [--ids]
                                    [--name]
                                    [--resource-group]
                                    [--subscription]

Examples

Delete a rule from a route filter.

az network route-filter rule delete -g MyResourceGroup --filter-name MyRouteFilter -n MyRouteFilterRule

Optional Parameters

--filter-name

Name of the route filter.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the route filter rule.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network route-filter rule list

List rules in a route filter.

az network route-filter rule list --filter-name
                                  --resource-group
                                  [--query-examples]
                                  [--subscription]

Examples

List rules in a route filter.

az network route-filter rule list -g MyResourceGroup --filter-name MyRouteFilter

Required Parameters

--filter-name

Name of the route filter.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network route-filter rule list-service-communities

Gets all the available BGP service communities.

az network route-filter rule list-service-communities [--subscription]

Examples

Gets all the available BGP service communities.

az network route-filter rule list-service-communities -o table

Get the community value for Exchange.

az network route-filter rule list-service-communities \
    --query '[].bgpCommunities[?communityName==`Exchange`].[communityValue][][]' -o tsv

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network route-filter rule show

Get the details of a rule in a route filter.

az network route-filter rule show [--filter-name]
                                  [--ids]
                                  [--name]
                                  [--query-examples]
                                  [--resource-group]
                                  [--subscription]

Examples

Get the details of a rule in a route filter.

az network route-filter rule show -g MyResourceGroup --filter-name MyRouteFilter -n MyRouteFilterRule

Optional Parameters

--filter-name

Name of the route filter.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the route filter rule.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az network route-filter rule update

Update a rule in a route filter.

az network route-filter rule update [--add]
                                    [--filter-name]
                                    [--force-string]
                                    [--ids]
                                    [--name]
                                    [--remove]
                                    [--resource-group]
                                    [--set]
                                    [--subscription]

Examples

Update a rule in a route filter to add Exchange to rule list.

az network route-filter rule update -g MyResourceGroup --filter-name MyRouteFilter \
    -n MyRouteFilterRule --add communities='12076:5010'

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--filter-name

Name of the route filter.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the route filter rule.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.