Show / Hide Table of Contents

Class RouteMap

This topic provides an overview of the route map function of Cloud Enterprise Networks (CENs). You can use the route map function to filter routes and modify route attributes. By doing so, you can manage the communication between networks attached to a CEN.

For information about CEN Route Map and how to use it, see Manage CEN Route Map.

NOTE: Available in 1.82.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var defaultInstance = new AliCloud.Cen.Instance("defaultInstance", new AliCloud.Cen.InstanceArgs
    {
    });
    var vpc00Region = new AliCloud.Provider("vpc00Region", new AliCloud.ProviderArgs
    {
        Region = "cn-hangzhou",
    });
    var vpc01Region = new AliCloud.Provider("vpc01Region", new AliCloud.ProviderArgs
    {
        Region = "cn-shanghai",
    });
    var vpc00 = new AliCloud.Vpc.Network("vpc00", new AliCloud.Vpc.NetworkArgs
    {
        CidrBlock = "172.16.0.0/12",
    });
    var vpc01 = new AliCloud.Vpc.Network("vpc01", new AliCloud.Vpc.NetworkArgs
    {
        CidrBlock = "172.16.0.0/12",
    });
    var default00 = new AliCloud.Cen.InstanceAttachment("default00", new AliCloud.Cen.InstanceAttachmentArgs
    {
        ChildInstanceId = vpc00.Id,
        ChildInstanceRegionId = "cn-hangzhou",
        InstanceId = defaultInstance.Id,
    });
    var default01 = new AliCloud.Cen.InstanceAttachment("default01", new AliCloud.Cen.InstanceAttachmentArgs
    {
        ChildInstanceId = vpc01.Id,
        ChildInstanceRegionId = "cn-shanghai",
        InstanceId = defaultInstance.Id,
    });
    var defaultRouteMap = new AliCloud.Cen.RouteMap("defaultRouteMap", new AliCloud.Cen.RouteMapArgs
    {
        AsPathMatchMode = "Include",
        CenId = alicloud_cen_instance.Cen.Id,
        CenRegionId = "cn-hangzhou",
        CidrMatchMode = "Include",
        CommunityMatchMode = "Include",
        CommunityOperateMode = "Additive",
        Description = "test-desc",
        DestinationChildInstanceTypes = 
        {
            "VPC",
        },
        DestinationCidrBlocks = 
        {
            vpc01.CidrBlock,
        },
        DestinationInstanceIds = 
        {
            vpc01.Id,
        },
        DestinationInstanceIdsReverseMatch = "false",
        DestinationRouteTableIds = 
        {
            vpc01.RouteTableId,
        },
        MapResult = "Permit",
        MatchAsns = 
        {
            "65501",
        },
        MatchCommunitySets = 
        {
            "65501:1",
        },
        NextPriority = "1",
        OperateCommunitySets = 
        {
            "65501:1",
        },
        Preference = "20",
        PrependAsPaths = 
        {
            "65501",
        },
        Priority = "1",
        RouteTypes = 
        {
            "System",
        },
        SourceChildInstanceTypes = 
        {
            "VPC",
        },
        SourceInstanceIds = 
        {
            vpc00.Id,
        },
        SourceInstanceIdsReverseMatch = "false",
        SourceRegionIds = 
        {
            "cn-hangzhou",
        },
        SourceRouteTableIds = 
        {
            vpc00.RouteTableId,
        },
        TransmitDirection = "RegionIn",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
RouteMap
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.Cen
Assembly: Pulumi.AliCloud.dll
Syntax
public class RouteMap : CustomResource

Constructors

View Source

RouteMap(String, RouteMapArgs, CustomResourceOptions)

Create a RouteMap resource with the given unique name, arguments, and options.

Declaration
public RouteMap(string name, RouteMapArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RouteMapArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AsPathMatchMode

A match statement. It indicates the mode in which the AS path attribute is matched. Valid values: ["Include", "Complete"].

Declaration
public Output<string> AsPathMatchMode { get; }
Property Value
Type Description
Output<System.String>
View Source

CenId

The ID of the CEN instance.

Declaration
public Output<string> CenId { get; }
Property Value
Type Description
Output<System.String>
View Source

CenRegionId

The ID of the region to which the CEN instance belongs.

Declaration
public Output<string> CenRegionId { get; }
Property Value
Type Description
Output<System.String>
View Source

CidrMatchMode

A match statement. It indicates the mode in which the prefix attribute is matched. Valid values: ["Include", "Complete"].

Declaration
public Output<string> CidrMatchMode { get; }
Property Value
Type Description
Output<System.String>
View Source

CommunityMatchMode

A match statement. It indicates the mode in which the community attribute is matched. Valid values: ["Include", "Complete"].

Declaration
public Output<string> CommunityMatchMode { get; }
Property Value
Type Description
Output<System.String>
View Source

CommunityOperateMode

An action statement. It indicates the mode in which the community attribute is operated. Valid values: ["Additive", "Replace"].

Declaration
public Output<string> CommunityOperateMode { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

The description of the route map.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

DestinationChildInstanceTypes

A match statement that indicates the list of destination instance types. Valid values: ["VPC", "VBR", "CCN"].

Declaration
public Output<ImmutableArray<string>> DestinationChildInstanceTypes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

DestinationCidrBlocks

A match statement that indicates the prefix list. The prefix is in the CIDR format. You can enter a maximum of 32 CIDR blocks.

Declaration
public Output<ImmutableArray<string>> DestinationCidrBlocks { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

DestinationInstanceIds

A match statement that indicates the list of IDs of the destination instances.

Declaration
public Output<ImmutableArray<string>> DestinationInstanceIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

DestinationInstanceIdsReverseMatch

Indicates whether to enable the reverse match method for the DestinationInstanceIds match condition. Valid values: ["false", "true"]. Default to "false".

Declaration
public Output<bool?> DestinationInstanceIdsReverseMatch { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

DestinationRouteTableIds

A match statement that indicates the list of IDs of the destination route tables. You can enter a maximum of 32 route table IDs.

Declaration
public Output<ImmutableArray<string>> DestinationRouteTableIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

MapResult

The action that is performed to a route if the route matches all the match conditions. Valid values: ["Permit", "Deny"].

Declaration
public Output<string> MapResult { get; }
Property Value
Type Description
Output<System.String>
View Source

MatchAsns

A match statement that indicates the AS path list. The AS path is a well-known mandatory attribute, which describes the numbers of the ASs that a BGP route passes through during transmission.

Declaration
public Output<ImmutableArray<string>> MatchAsns { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

MatchCommunitySets

A match statement that indicates the community set. The format of each community is nn:nn, which ranges from 1 to 65535. You can enter a maximum of 32 communities. Communities must comply with RFC 1997. Large communities (RFC 8092) are not supported.

Declaration
public Output<ImmutableArray<string>> MatchCommunitySets { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

NextPriority

The priority of the next route map that is associated with the current route map. Value range: 1 to 100.

Declaration
public Output<int?> NextPriority { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

OperateCommunitySets

An action statement that operates the community attribute. The format of each community is nn:nn, which ranges from 1 to 65535. You can enter a maximum of 32 communities. Communities must comply with RFC 1997. Large communities (RFC 8092) are not supported.

Declaration
public Output<ImmutableArray<string>> OperateCommunitySets { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Preference

An action statement that modifies the priority of the route. Value range: 1 to 100. The default priority of a route is 50. A lower value indicates a higher preference.

Declaration
public Output<int?> Preference { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

PrependAsPaths

An action statement that indicates an AS path is prepended when the regional gateway receives or advertises a route.

Declaration
public Output<ImmutableArray<string>> PrependAsPaths { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Priority

The priority of the route map. Value range: 1 to 100. A lower value indicates a higher priority.

Declaration
public Output<int> Priority { get; }
Property Value
Type Description
Output<System.Int32>
View Source

RouteMapId

Declaration
public Output<string> RouteMapId { get; }
Property Value
Type Description
Output<System.String>
View Source

RouteTypes

A match statement that indicates the list of route types. Valid values: ["System", "Custom", "BGP"].

Declaration
public Output<ImmutableArray<string>> RouteTypes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SourceChildInstanceTypes

A match statement that indicates the list of source instance types. Valid values: ["VPC", "VBR", "CCN"].

Declaration
public Output<ImmutableArray<string>> SourceChildInstanceTypes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SourceInstanceIds

A match statement that indicates the list of IDs of the source instances.

Declaration
public Output<ImmutableArray<string>> SourceInstanceIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SourceInstanceIdsReverseMatch

Indicates whether to enable the reverse match method for the SourceInstanceIds match condition. Valid values: ["false", "true"]. Default to "false".

Declaration
public Output<bool?> SourceInstanceIdsReverseMatch { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

SourceRegionIds

A match statement that indicates the list of IDs of the source regions. You can enter a maximum of 32 region IDs.

Declaration
public Output<ImmutableArray<string>> SourceRegionIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SourceRouteTableIds

A match statement that indicates the list of IDs of the source route tables. You can enter a maximum of 32 route table IDs.

Declaration
public Output<ImmutableArray<string>> SourceRouteTableIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Status

(Computed) The status of route map. Valid values: ["Creating", "Active", "Deleting"].

Declaration
public Output<string> Status { get; }
Property Value
Type Description
Output<System.String>
View Source

TransmitDirection

The direction in which the route map is applied. Valid values: ["RegionIn", "RegionOut"].

Declaration
public Output<string> TransmitDirection { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, RouteMapState, CustomResourceOptions)

Get an existing RouteMap resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static RouteMap Get(string name, Input<string> id, RouteMapState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

RouteMapState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
RouteMap
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.