1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. RouteFilterRule
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.network.RouteFilterRule

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

    Route Filter Rule Resource. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.

    Other available API versions: 2017-03-01, 2017-10-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.

    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",
        });
    
    });
    
    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
    	})
    }
    
    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());
    
        }
    }
    
    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")
    
    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",
    });
    
    resources:
      routeFilterRule:
        type: azure-native:network:RouteFilterRule
        properties:
          access: Allow
          communities:
            - 12076:5030
            - 12076:5040
          resourceGroupName: rg1
          routeFilterName: filterName
          routeFilterRuleType: Community
          ruleName: ruleName
    

    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 string
    The unique name of the resource.
    args RouteFilterRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args RouteFilterRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RouteFilterRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    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"),
    })
    
    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());
    
    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")
    
    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",
    });
    
    type: azure-native:network:RouteFilterRule
    properties:
        access: string
        communities:
            - string
        id: string
        location: string
        name: string
        resourceGroupName: string
        routeFilterName: string
        routeFilterRuleType: string
        ruleName: string
    

    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

    The RouteFilterRule resource accepts the following input properties:

    Access string | Pulumi.AzureNative.Network.Access
    The access type of the rule.
    Communities List<string>
    The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
    ResourceGroupName string
    The name of the resource group.
    RouteFilterName string
    The name of the route filter.
    RouteFilterRuleType 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 string
    The name of the route filter rule.
    Access string | Access
    The access type of the rule.
    Communities []string
    The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
    ResourceGroupName string
    The name of the resource group.
    RouteFilterName string
    The name of the route filter.
    RouteFilterRuleType 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 string
    The name of the route filter rule.
    access String | Access
    The access type of the rule.
    communities List<String>
    The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
    resourceGroupName String
    The name of the resource group.
    routeFilterName String
    The name of the route filter.
    routeFilterRuleType 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 String
    The name of the route filter rule.
    access string | Access
    The access type of the rule.
    communities string[]
    The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
    resourceGroupName string
    The name of the resource group.
    routeFilterName string
    The name of the route filter.
    routeFilterRuleType 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 string
    The name of the route filter rule.
    access str | Access
    The access type of the rule.
    communities Sequence[str]
    The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
    resource_group_name str
    The name of the resource group.
    route_filter_name str
    The name of the route filter.
    route_filter_rule_type 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 str
    The name of the route filter rule.
    access String | "Allow" | "Deny"
    The access type of the rule.
    communities List<String>
    The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
    resourceGroupName String
    The name of the resource group.
    routeFilterName String
    The name of the route filter.
    routeFilterRuleType 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 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:

    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.
    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.
    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.
    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.
    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.
    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} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi