1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. RouteFilterRule
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi

azure-native.network.RouteFilterRule

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi

Route Filter Rule Resource.

Uses Azure REST API version 2024-05-01. In version 2.x of the Azure Native provider, it used API version 2023-02-01.

Other available API versions: 2018-06-01, 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-03-01, 2020-04-01, 2020-05-01, 2020-06-01, 2020-07-01, 2020-08-01, 2020-11-01, 2021-02-01, 2021-03-01, 2021-05-01, 2021-08-01, 2022-01-01, 2022-05-01, 2022-07-01, 2022-09-01, 2022-11-01, 2023-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native network [ApiVersion]. See the version guide for details.

Example Usage

RouteFilterRuleCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var routeFilterRule = new AzureNative.Network.RouteFilterRule("routeFilterRule", new()
    {
        Access = AzureNative.Network.Access.Allow,
        Communities = new[]
        {
            "12076:5030",
            "12076:5040",
        },
        ResourceGroupName = "rg1",
        RouteFilterName = "filterName",
        RouteFilterRuleType = AzureNative.Network.RouteFilterRuleType.Community,
        RuleName = "ruleName",
    });

});
Copy
package main

import (
	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewRouteFilterRule(ctx, "routeFilterRule", &network.RouteFilterRuleArgs{
			Access: pulumi.String(network.AccessAllow),
			Communities: pulumi.StringArray{
				pulumi.String("12076:5030"),
				pulumi.String("12076:5040"),
			},
			ResourceGroupName:   pulumi.String("rg1"),
			RouteFilterName:     pulumi.String("filterName"),
			RouteFilterRuleType: pulumi.String(network.RouteFilterRuleTypeCommunity),
			RuleName:            pulumi.String("ruleName"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.RouteFilterRule;
import com.pulumi.azurenative.network.RouteFilterRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var routeFilterRule = new RouteFilterRule("routeFilterRule", RouteFilterRuleArgs.builder()
            .access("Allow")
            .communities(            
                "12076:5030",
                "12076:5040")
            .resourceGroupName("rg1")
            .routeFilterName("filterName")
            .routeFilterRuleType("Community")
            .ruleName("ruleName")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const routeFilterRule = new azure_native.network.RouteFilterRule("routeFilterRule", {
    access: azure_native.network.Access.Allow,
    communities: [
        "12076:5030",
        "12076:5040",
    ],
    resourceGroupName: "rg1",
    routeFilterName: "filterName",
    routeFilterRuleType: azure_native.network.RouteFilterRuleType.Community,
    ruleName: "ruleName",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

route_filter_rule = azure_native.network.RouteFilterRule("routeFilterRule",
    access=azure_native.network.Access.ALLOW,
    communities=[
        "12076:5030",
        "12076:5040",
    ],
    resource_group_name="rg1",
    route_filter_name="filterName",
    route_filter_rule_type=azure_native.network.RouteFilterRuleType.COMMUNITY,
    rule_name="ruleName")
Copy
resources:
  routeFilterRule:
    type: azure-native:network:RouteFilterRule
    properties:
      access: Allow
      communities:
        - 12076:5030
        - 12076:5040
      resourceGroupName: rg1
      routeFilterName: filterName
      routeFilterRuleType: Community
      ruleName: ruleName
Copy

Create RouteFilterRule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new RouteFilterRule(name: string, args: RouteFilterRuleArgs, opts?: CustomResourceOptions);
@overload
def RouteFilterRule(resource_name: str,
                    args: RouteFilterRuleInitArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def RouteFilterRule(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    access: Optional[Union[str, Access]] = None,
                    communities: Optional[Sequence[str]] = None,
                    resource_group_name: Optional[str] = None,
                    route_filter_name: Optional[str] = None,
                    route_filter_rule_type: Optional[Union[str, RouteFilterRuleType]] = None,
                    id: Optional[str] = None,
                    location: Optional[str] = None,
                    name: Optional[str] = None,
                    rule_name: Optional[str] = None)
func NewRouteFilterRule(ctx *Context, name string, args RouteFilterRuleArgs, opts ...ResourceOption) (*RouteFilterRule, error)
public RouteFilterRule(string name, RouteFilterRuleArgs args, CustomResourceOptions? opts = null)
public RouteFilterRule(String name, RouteFilterRuleArgs args)
public RouteFilterRule(String name, RouteFilterRuleArgs args, CustomResourceOptions options)
type: azure-native:network:RouteFilterRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RouteFilterRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RouteFilterRuleInitArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RouteFilterRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RouteFilterRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RouteFilterRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var routeFilterRuleResource = new AzureNative.Network.RouteFilterRule("routeFilterRuleResource", new()
{
    Access = "string",
    Communities = new[]
    {
        "string",
    },
    ResourceGroupName = "string",
    RouteFilterName = "string",
    RouteFilterRuleType = "string",
    Id = "string",
    Location = "string",
    Name = "string",
    RuleName = "string",
});
Copy
example, err := network.NewRouteFilterRule(ctx, "routeFilterRuleResource", &network.RouteFilterRuleArgs{
	Access: pulumi.String("string"),
	Communities: pulumi.StringArray{
		pulumi.String("string"),
	},
	ResourceGroupName:   pulumi.String("string"),
	RouteFilterName:     pulumi.String("string"),
	RouteFilterRuleType: pulumi.String("string"),
	Id:                  pulumi.String("string"),
	Location:            pulumi.String("string"),
	Name:                pulumi.String("string"),
	RuleName:            pulumi.String("string"),
})
Copy
var routeFilterRuleResource = new RouteFilterRule("routeFilterRuleResource", RouteFilterRuleArgs.builder()
    .access("string")
    .communities("string")
    .resourceGroupName("string")
    .routeFilterName("string")
    .routeFilterRuleType("string")
    .id("string")
    .location("string")
    .name("string")
    .ruleName("string")
    .build());
Copy
route_filter_rule_resource = azure_native.network.RouteFilterRule("routeFilterRuleResource",
    access="string",
    communities=["string"],
    resource_group_name="string",
    route_filter_name="string",
    route_filter_rule_type="string",
    id="string",
    location="string",
    name="string",
    rule_name="string")
Copy
const routeFilterRuleResource = new azure_native.network.RouteFilterRule("routeFilterRuleResource", {
    access: "string",
    communities: ["string"],
    resourceGroupName: "string",
    routeFilterName: "string",
    routeFilterRuleType: "string",
    id: "string",
    location: "string",
    name: "string",
    ruleName: "string",
});
Copy
type: azure-native:network:RouteFilterRule
properties:
    access: string
    communities:
        - string
    id: string
    location: string
    name: string
    resourceGroupName: string
    routeFilterName: string
    routeFilterRuleType: string
    ruleName: string
Copy

RouteFilterRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The RouteFilterRule resource accepts the following input properties:

Access This property is required. string | Pulumi.AzureNative.Network.Access
The access type of the rule.
Communities This property is required. List<string>
The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
RouteFilterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the route filter.
RouteFilterRuleType This property is required. string | Pulumi.AzureNative.Network.RouteFilterRuleType
The rule type of the rule.
Id string
Resource ID.
Location string
Resource location.
Name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
RuleName Changes to this property will trigger replacement. string
The name of the route filter rule.
Access This property is required. string | Access
The access type of the rule.
Communities This property is required. []string
The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
RouteFilterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the route filter.
RouteFilterRuleType This property is required. string | RouteFilterRuleTypeEnum
The rule type of the rule.
Id string
Resource ID.
Location string
Resource location.
Name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
RuleName Changes to this property will trigger replacement. string
The name of the route filter rule.
access This property is required. String | Access
The access type of the rule.
communities This property is required. List<String>
The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
routeFilterName
This property is required.
Changes to this property will trigger replacement.
String
The name of the route filter.
routeFilterRuleType This property is required. String | RouteFilterRuleType
The rule type of the rule.
id String
Resource ID.
location String
Resource location.
name String
The name of the resource that is unique within a resource group. This name can be used to access the resource.
ruleName Changes to this property will trigger replacement. String
The name of the route filter rule.
access This property is required. string | Access
The access type of the rule.
communities This property is required. string[]
The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
routeFilterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the route filter.
routeFilterRuleType This property is required. string | RouteFilterRuleType
The rule type of the rule.
id string
Resource ID.
location string
Resource location.
name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
ruleName Changes to this property will trigger replacement. string
The name of the route filter rule.
access This property is required. str | Access
The access type of the rule.
communities This property is required. Sequence[str]
The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
route_filter_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the route filter.
route_filter_rule_type This property is required. str | RouteFilterRuleType
The rule type of the rule.
id str
Resource ID.
location str
Resource location.
name str
The name of the resource that is unique within a resource group. This name can be used to access the resource.
rule_name Changes to this property will trigger replacement. str
The name of the route filter rule.
access This property is required. String | "Allow" | "Deny"
The access type of the rule.
communities This property is required. List<String>
The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
routeFilterName
This property is required.
Changes to this property will trigger replacement.
String
The name of the route filter.
routeFilterRuleType This property is required. String | "Community"
The rule type of the rule.
id String
Resource ID.
location String
Resource location.
name String
The name of the resource that is unique within a resource group. This name can be used to access the resource.
ruleName Changes to this property will trigger replacement. String
The name of the route filter rule.

Outputs

All input properties are implicitly available as output properties. Additionally, the RouteFilterRule resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
ProvisioningState string
The provisioning state of the route filter rule resource.
AzureApiVersion string
The Azure API version of the resource.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
ProvisioningState string
The provisioning state of the route filter rule resource.
azureApiVersion String
The Azure API version of the resource.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
provisioningState String
The provisioning state of the route filter rule resource.
azureApiVersion string
The Azure API version of the resource.
etag string
A unique read-only string that changes whenever the resource is updated.
id string
The provider-assigned unique ID for this managed resource.
provisioningState string
The provisioning state of the route filter rule resource.
azure_api_version str
The Azure API version of the resource.
etag str
A unique read-only string that changes whenever the resource is updated.
id str
The provider-assigned unique ID for this managed resource.
provisioning_state str
The provisioning state of the route filter rule resource.
azureApiVersion String
The Azure API version of the resource.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
provisioningState String
The provisioning state of the route filter rule resource.

Supporting Types

Access
, AccessArgs

Allow
Allow
Deny
Deny
AccessAllow
Allow
AccessDeny
Deny
Allow
Allow
Deny
Deny
Allow
Allow
Deny
Deny
ALLOW
Allow
DENY
Deny
"Allow"
Allow
"Deny"
Deny

RouteFilterRuleType
, RouteFilterRuleTypeArgs

Community
Community
RouteFilterRuleTypeCommunity
Community
Community
Community
Community
Community
COMMUNITY
Community
"Community"
Community

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:RouteFilterRule ruleName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi