Creates a routing policy for a CEN instance to control route advertisement and matching.
Syntax
{
"Type": "ALIYUN::CEN::CenRouteMap",
"Properties": {
"Description": String,
"SourceInstanceIdsReverseMatch": Boolean,
"TransmitDirection": String,
"MatchCommunitySet": List,
"CenRegionId": String,
"SourceRouteTableIds": List,
"DestinationInstanceIds": List,
"DestinationInstanceIdsReverseMatch": Boolean,
"SourceInstanceIds": List,
"DestinationRouteTableIds": List,
"DestinationCidrBlocks": List,
"OperateCommunitySet": List,
"DestinationChildInstanceTypes": List,
"Priority": Integer,
"SourceChildInstanceTypes": List,
"AsPathMatchMode": String,
"CidrMatchMode": String,
"MapResult": String,
"RouteTypes": List,
"Preference": Integer,
"CommunityOperateMode": String,
"CenId": String,
"NextPriority": Integer,
"PrependAsPath": List,
"CommunityMatchMode": String,
"MatchAsns": List,
"SourceRegionIds": List
}
}
Properties
|
Property name |
Type |
Required |
Update allowed |
Description |
Constraints |
|
CenId |
String |
Yes |
No |
The CEN instance ID. |
None |
|
CenRegionId |
String |
Yes |
No |
The region of the CEN instance. |
None |
|
MapResult |
String |
Yes |
Yes |
The action to take when all conditions match. |
Valid values:
|
|
Priority |
Integer |
Yes |
Yes |
The routing policy priority. |
Value range: 1 to 100. A smaller value indicates higher priority. Note
Policies in the same region and direction must have unique priorities. Matching starts from the lowest priority number. |
|
TransmitDirection |
String |
Yes |
No |
The direction the routing policy applies to. |
Valid values:
|
|
AsPathMatchMode |
String |
No |
Yes |
The match mode for AS paths. |
A match statement. Valid values:
|
|
CidrMatchMode |
String |
No |
Yes |
The match mode for prefixes. |
A match statement. Valid values:
|
|
CommunityMatchMode |
String |
No |
Yes |
The match mode for communities. |
A match statement. Valid values:
|
|
CommunityOperateMode |
String |
No |
Yes |
The mode to operate on communities. |
An action statement. Valid values:
|
|
Description |
String |
No |
Yes |
The description of the routing policy. |
None |
|
DestinationChildInstanceTypes |
List |
No |
Yes |
Destination instance types to match. |
A match statement. Valid values:
Note
Valid only when TransmitDirection is RegionOut and the destination instances are in the current region. |
|
DestinationCidrBlocks |
List |
No |
Yes |
Destination route prefixes to match. |
A match statement. Use CIDR notation. Maximum: 32 CIDR blocks. |
|
DestinationInstanceIds |
List |
No |
Yes |
Destination instance IDs to match. |
A match statement. You can enter instance IDs for VPC, VBR, and SAG. Maximum: 32 instance IDs. Note
Valid only when TransmitDirection is RegionOut and the destination instances are in the current region. |
|
DestinationInstanceIdsReverseMatch |
Boolean |
No |
Yes |
Whether to match routes whose destination instance IDs are not in the DestinationInstanceIds list. |
Valid values:
|
|
DestinationRouteTableIds |
List |
No |
Yes |
Destination route table IDs to match. |
A match statement. Maximum: 32 route table IDs. |
|
MatchAsns |
List |
No |
Yes |
AS paths to match. |
A match statement. An AS path describes the AS number sequence a BGP route has traversed. Only AS_SEQUENCE is supported. AS_SET, AS_CONFED_SEQUENCE, and AS_CONFED_SET are not supported. |
|
MatchCommunitySet |
List |
No |
Yes |
Communities to match. |
A match statement. Format: nn:nn, where nn ranges from 1 to 65,535. Maximum: 32 communities. Must comply with RFC 1997. Large communities (RFC 8092) are not supported. Note
Incorrect community configurations may prevent routes from being advertised to your data center. |
|
NextPriority |
Integer |
No |
Yes |
Priority of the next associated routing policy. |
Value range: 1 to 100.
Routes continue to the next associated policy only when MapResult is Permit. |
|
OperateCommunitySet |
List |
No |
Yes |
Communities to operate on. |
An action statement. Format: nn:nn, where nn ranges from 1 to 65,535. Maximum: 32 communities. Must comply with RFC 1997. Large communities (RFC 8092) are not supported. Note
Incorrect community configurations may prevent routes from being advertised to your data center. |
|
Preference |
Integer |
No |
Yes |
Modifies route priority. |
An action statement. Value range: 1 to 100. Default value: 50. A smaller value indicates a higher priority. |
|
PrependAsPath |
List |
No |
Yes |
Appends AS paths when the regional gateway receives or advertises routes. |
An action statement. Requirements vary by direction:
|
|
RouteTypes |
List |
No |
Yes |
Route types to match. |
A match statement. Valid values:
You can specify multiple types. |
|
SourceChildInstanceTypes |
List |
No |
Yes |
Source instance types to match. |
A match statement. Valid values:
|
|
SourceInstanceIds |
List |
No |
Yes |
Source instance IDs to match. |
A match statement. You can enter instance IDs for VPC, VBR, and SAG. Maximum: 32 instance IDs. |
|
SourceInstanceIdsReverseMatch |
Boolean |
No |
Yes |
Whether to match routes whose source instance IDs are not in the SourceInstanceIds list. |
Valid values:
|
|
SourceRegionIds |
List |
No |
Yes |
Source region IDs to match. |
A match statement. Maximum: 32 region IDs. |
|
SourceRouteTableIds |
List |
No |
Yes |
Source route table IDs to match. |
A match statement. Maximum: 32 route table IDs. |
Return values
Fn::GetAtt
RouteMapId: The routing policy ID.
Examples
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
AsPathMatchMode:
Description: "The match mode for AS paths. Valid values: Include: uses a fuzzy
\ match. The match is successful if the AS path in the condition overlaps with
\ the AS path of the route. Complete: uses an exact match. The match is successful
\ only if the AS path in the condition is the same as the AS path of the route."
Type: String
CenId:
Description: The ID of the Cloud Enterprise Network (CEN) instance.
Type: String
CenRegionId:
Description: The region where the CEN instance is deployed. Call the DescribeRegions
operation to query region IDs.
Type: String
CidrMatchMode:
Description: "The match mode for prefixes. Valid values: Include: uses a fuzzy
\ match. The match is successful if the route prefix in the condition contains
\ the route prefix of the route. For example, a policy with the prefix 1.1.X.X/16
\ can match the route 1.1.1.0/24. Complete: uses an exact match. The match is
\ successful only if the route prefix in the condition is the same as the route
\ prefix of the route. For example, a policy with the prefix 1.1.X.X/16 can
\ match the route 1.1.X.X/16."
Type: String
CommunityMatchMode:
Description: "The match mode for communities. Valid values: Include: uses a fuzzy
\ match. The match is successful if the community in the condition overlaps
\ with the community of the route. Complete: uses an exact match. The match
\ is successful only if the community in the condition is the same as the community
\ of the route."
Type: String
CommunityOperateMode:
Description: "The action to perform on communities. Valid values: Additive: adds
\ the community value. Replace: replaces the community value."
Type: String
Description:
Description: The description of the routing policy.
Type: String
DestinationChildInstanceTypes:
Description: "Matches destination instance types. Valid values: VPC: VPCs. VBR:
\ VBRs. CCN: CCN instances. Note: This parameter is valid only when routes are
\ advertised from a gateway in the current region to an instance in the same
\ region."
Type: Json
DestinationCidrBlocks:
Description: Matches destination route prefixes. Use CIDR notation. You can enter
up to 32 CIDR blocks.
Type: Json
DestinationInstanceIds:
Description: "Matches destination instance IDs. You can enter instance IDs of
\ VPCs, VBRs, CCNs, and SAGs. You can enter up to 32 instance IDs. Note: This
\ parameter is valid only when routes are advertised from a gateway in the current
\ region to an instance in the same region."
Type: Json
DestinationInstanceIdsReverseMatch:
AllowedValues:
- 'True'
- 'true'
- 'False'
- 'false'
Description: "Specifies whether to match routes whose destination instance IDs
\ are not in the DestinationInstanceIds list. Valid values: false (default):
\ The match is successful if the destination instance ID is in the DestinationInstanceIds
\ list. true: The match is successful if the destination instance ID is not
\ in the DestinationInstanceIds list."
Type: Boolean
DestinationRouteTableIds:
Description: "Matches destination route table IDs. You can enter up to 32 route
\ table IDs. Note: This parameter is valid only when routes are advertised from
\ a gateway in the current region to a route table in the same region."
Type: Json
MapResult:
Description: "The action to perform after all conditions are matched. Valid values:
\ Permit: allows the matched routes. Deny: denies the matched routes."
Type: String
MatchAsns:
Description: "Matches the AS paths of routes. An AS path is a mandatory attribute
\ that describes the sequence of AS numbers that a BGP route traverses. Only
\ AS_SEQUENCE is supported. AS_SET, AS_CONFED_SEQUENCE, and AS_CONFED_SET are
\ not supported. This means you can only use a list of AS numbers. Sets and
\ sub-lists are not supported."
Type: Json
MatchCommunitySet:
Description: "Matches communities. Enter each community in the nn:nn format. The
\ value of nn ranges from 1 to 65,535. You can enter up to 32 communities. Each
\ community must comply with RFC 1997. RFC 8092 is not supported. Note: Incorrect
\ community configurations may prevent routes from being advertised to your
\ data center."
Type: Json
NextPriority:
Description: "The priority of the next associated routing policy. The value ranges
\ from 1 to 100. If you do not set this parameter, no next routing policy is
\ associated. If you set the value to 1, the next routing policy in the priority
\ list is associated. If you set a value other than 1, the priority of the associated
\ policy must be higher than the current policy's priority. Matched routes
\ continue to the next associated policy only if MapResult is set to Permit."
Type: Number
OperateCommunitySet:
Description: "The communities to operate on. Enter each community in the nn:nn
\ format. The value of nn ranges from 1 to 65,535. You can enter up to 32 communities.
\ Each community must comply with RFC 1997. RFC 8092 is not supported. Note:
\ Incorrect community configurations may prevent routes from being advertised
\ to your data center."
Type: Json
Preference:
Description: Modifies route priorities. The value ranges from 1 to 100. The default
value is 50. A smaller number indicates a higher priority.
Type: Number
PrependAsPath:
Description: "Appends AS paths when regional gateways receive or advertise routes.
\ The requirements for appending AS paths are different for different directions:
\ Inbound: You must specify the source instance IDs and the source region in
\ the match condition. The source region must be the same as the region where
\ the routing policy is applied. Outbound: You must specify the destination
\ instance IDs in the match condition."
Type: Json
Priority:
Description: "The priority of the routing policy. The value ranges from 1 to 100.
\ A smaller value indicates a higher priority. Note: In the same region and
\ for the same direction, priorities must be unique. The system matches conditions
\ starting with the policy that has the lowest priority number. Set priorities
\ to meet your required matching order."
Type: Number
RouteTypes:
Description: "Matches route types. Valid values: System: system routes that are
\ generated by the system. Custom: custom routes that are created by users.
\ BGP: Border Gateway Protocol (BGP) routes that are advertised to BGP. You
\ can enter multiple types."
Type: Json
SourceChildInstanceTypes:
Description: "Matches the source instance types of routes. Valid values: VPC:
\ VPCs. VBR: VBRs. CCN: CCN instances."
Type: Json
SourceInstanceIds:
Description: "Matches the source instance IDs of routes. You can enter instance
\ IDs of the following types: virtual private cloud (VPC), virtual border router
\ (VBR), Cloud Connect Network (CCN), and Smart Access Gateway (SAG). You can
\ enter up to 32 instance IDs."
Type: Json
SourceInstanceIdsReverseMatch:
AllowedValues:
- 'True'
- 'true'
- 'False'
- 'false'
Description: "Specifies whether to match routes whose source instance IDs are
\ not in the SourceInstanceIds list. Valid values: false (default): The match
\ is successful if the source instance ID is in the SourceInstanceIds list.
\ true: The match is successful if the source instance ID is not in the SourceInstanceIds
\ list."
Type: Boolean
SourceRegionIds:
Description: Matches the source region IDs of routes. You can enter up to 32 region
IDs.
Type: Json
SourceRouteTableIds:
Description: Matches the source route table IDs of routes. You can enter up to
32 route table IDs.
Type: Json
TransmitDirection:
Description: "The direction in which the routing policy is applied. Valid values:
\ RegionIn: Routes are advertised to CEN gateways. For example, routes are
\ advertised from network instances in the current region or other regions to
\ the gateway in the current region. RegionOut: Routes are advertised from CEN
\ gateways. For example, routes are advertised from the gateway in the current
\ region to network instances or to gateways in other regions."
Type: String
Resources:
CENCenRouteMap:
Properties:
AsPathMatchMode:
Ref: AsPathMatchMode
CenId:
Ref: CenId
CenRegionId:
Ref: CenRegionId
CidrMatchMode:
Ref: CidrMatchMode
CommunityMatchMode:
Ref: CommunityMatchMode
CommunityOperateMode:
Ref: CommunityOperateMode
Description:
Ref: Description
DestinationChildInstanceTypes:
Ref: DestinationChildInstanceTypes
DestinationCidrBlocks:
Ref: DestinationCidrBlocks
DestinationInstanceIds:
Ref: DestinationInstanceIds
DestinationInstanceIdsReverseMatch:
Ref: DestinationInstanceIdsReverseMatch
DestinationRouteTableIds:
Ref: DestinationRouteTableIds
MapResult:
Ref: MapResult
MatchAsns:
Ref: MatchAsns
MatchCommunitySet:
Ref: MatchCommunitySet
NextPriority:
Ref: NextPriority
OperateCommunitySet:
Ref: OperateCommunitySet
Preference:
Ref: Preference
PrependAsPath:
Ref: PrependAsPath
Priority:
Ref: Priority
RouteTypes:
Ref: RouteTypes
SourceChildInstanceTypes:
Ref: SourceChildInstanceTypes
SourceInstanceIds:
Ref: SourceInstanceIds
SourceInstanceIdsReverseMatch:
Ref: SourceInstanceIdsReverseMatch
SourceRegionIds:
Ref: SourceRegionIds
SourceRouteTableIds:
Ref: SourceRouteTableIds
TransmitDirection:
Ref: TransmitDirection
Type: ALIYUN::CEN::CenRouteMap
Outputs:
RouteMapId:
Description: The ID of the routing policy.
Value:
Fn::GetAtt:
- CENCenRouteMap
- RouteMapId
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Description": {
"Type": "String",
"Description": "The description of the routing policy."
},
"SourceInstanceIdsReverseMatch": {
"Type": "Boolean",
"Description": "Specifies whether to match routes whose source instance IDs are not in the SourceInstanceIds list. Valid values: false (default): The match is successful if the source instance ID is in the SourceInstanceIds list. true: The match is successful if the source instance ID is not in the SourceInstanceIds list.",
"AllowedValues": [
"True",
"true",
"False",
"false"
]
},
"TransmitDirection": {
"Type": "String",
"Description": "The direction in which the routing policy is applied. Valid values: RegionIn: Routes are advertised to CEN gateways. For example, routes are advertised from network instances in the current region or other regions to the gateway in the current region. RegionOut: Routes are advertised from CEN gateways. For example, routes are advertised from the gateway in the current region to network instances or to gateways in other regions."
},
"MatchCommunitySet": {
"Type": "Json",
"Description": "Matches communities. Enter each community in the nn:nn format. The value of nn ranges from 1 to 65,535. You can enter up to 32 communities. Each community must comply with RFC 1997. RFC 8092 is not supported. Note: Incorrect community configurations may prevent routes from being advertised to your data center."
},
"CenRegionId": {
"Type": "String",
"Description": "The region where the CEN instance is deployed. Call the DescribeRegions operation to query region IDs."
},
"SourceRouteTableIds": {
"Type": "Json",
"Description": "Matches the source route table IDs of routes. You can enter up to 32 route table IDs."
},
"DestinationInstanceIds": {
"Type": "Json",
"Description": "Matches destination instance IDs. You can enter instance IDs of VPCs, VBRs, CCNs, and SAGs. You can enter up to 32 instance IDs. Note: This parameter is valid only when routes are advertised from a gateway in the current region to an instance in the same region."
},
"DestinationInstanceIdsReverseMatch": {
"Type": "Boolean",
"Description": "Specifies whether to match routes whose destination instance IDs are not in the DestinationInstanceIds list. Valid values: false (default): The match is successful if the destination instance ID is in the DestinationInstanceIds list. true: The match is successful if the destination instance ID is not in the DestinationInstanceIds list.",
"AllowedValues": [
"True",
"true",
"False",
"false"
]
},
"SourceInstanceIds": {
"Type": "Json",
"Description": "Matches the source instance IDs of routes. You can enter instance IDs of the following types: virtual private cloud (VPC), virtual border router (VBR), Cloud Connect Network (CCN), and Smart Access Gateway (SAG). You can enter up to 32 instance IDs."
},
"DestinationRouteTableIds": {
"Type": "Json",
"Description": "Matches destination route table IDs. You can enter up to 32 route table IDs. Note: This parameter is valid only when routes are advertised from a gateway in the current region to a route table in the same region."
},
"DestinationCidrBlocks": {
"Type": "Json",
"Description": "Matches destination route prefixes. Use CIDR notation. You can enter up to 32 CIDR blocks."
},
"OperateCommunitySet": {
"Type": "Json",
"Description": "The communities to operate on. Enter each community in the nn:nn format. The value of nn ranges from 1 to 65,535. You can enter up to 32 communities. Each community must comply with RFC 1997. RFC 8092 is not supported. Note: Incorrect community configurations may prevent routes from being advertised to your data center."
},
"DestinationChildInstanceTypes": {
"Type": "Json",
"Description": "Matches destination instance types. Valid values: VPC: VPCs. VBR: VBRs. CCN: CCN instances. Note: This parameter is valid only when routes are advertised from a gateway in the current region to an instance in the same region."
},
"Priority": {
"Type": "Number",
"Description": "The priority of the routing policy. The value ranges from 1 to 100. A smaller value indicates a higher priority. Note: In the same region and for the same direction, priorities must be unique. The system matches conditions starting with the policy that has the lowest priority number. Set priorities to meet your required matching order."
},
"SourceChildInstanceTypes": {
"Type": "Json",
"Description": "Matches the source instance types of routes. Valid values: VPC: VPCs. VBR: VBRs. CCN: CCN instances."
},
"AsPathMatchMode": {
"Type": "String",
"Description": "The match mode for AS paths. Valid values: Include: uses a fuzzy match. The match is successful if the AS path in the condition overlaps with the AS path of the route. Complete: uses an exact match. The match is successful only if the AS path in the condition is the same as the AS path of the route."
},
"CidrMatchMode": {
"Type": "String",
"Description": "The match mode for prefixes. Valid values: Include: uses a fuzzy match. The match is successful if the route prefix in the condition contains the route prefix of the route. For example, a policy with the prefix 1.1.X.X/16 can match the route 1.1.1.0/24. Complete: uses an exact match. The match is successful only if the route prefix in the condition is the same as the route prefix of the route. For example, a policy with the prefix 1.1.X.X/16 can match the route 1.1.X.X/16."
},
"MapResult": {
"Type": "String",
"Description": "The action to perform after all conditions are matched. Valid values: Permit: allows the matched routes. Deny: denies the matched routes."
},
"RouteTypes": {
"Type": "Json",
"Description": "Matches route types. Valid values: System: system routes that are generated by the system. Custom: custom routes that are created by users. BGP: Border Gateway Protocol (BGP) routes that are advertised to BGP. You can enter multiple types."
},
"Preference": {
"Type": "Number",
"Description": "Modifies route priorities. The value ranges from 1 to 100. The default value is 50. A smaller number indicates a higher priority."
},
"CommunityOperateMode": {
"Type": "String",
"Description": "The action to perform on communities. Valid values: Additive: adds the community value. Replace: replaces the community value."
},
"CenId": {
"Type": "String",
"Description": "The ID of the Cloud Enterprise Network (CEN) instance."
},
"NextPriority": {
"Type": "Number",
"Description": "The priority of the next associated routing policy. The value ranges from 1 to 100. If you do not set this parameter, no next routing policy is associated. If you set the value to 1, the next routing policy in the priority list is associated. If you set a value other than 1, the priority of the associated policy must be higher than the current policy's priority. Matched routes continue to the next associated policy only if MapResult is set to Permit."
},
"PrependAsPath": {
"Type": "Json",
"Description": "Appends AS paths when regional gateways receive or advertise routes. The requirements for appending AS paths are different for different directions: Inbound: You must specify the source instance IDs and the source region in the match condition. The source region must be the same as the region where the routing policy is applied. Outbound: You must specify the destination instance IDs in the match condition."
},
"CommunityMatchMode": {
"Type": "String",
"Description": "The match mode for communities. Valid values: Include: uses a fuzzy match. The match is successful if the community in the condition overlaps with the community of the route. Complete: uses an exact match. The match is successful only if the community in the condition is the same as the community of the route."
},
"MatchAsns": {
"Type": "Json",
"Description": "Matches the AS paths of routes. An AS path is a mandatory attribute that describes the sequence of AS numbers that a BGP route traverses. Only AS_SEQUENCE is supported. AS_SET, AS_CONFED_SEQUENCE, and AS_CONFED_SET are not supported. This means you can only use a list of AS numbers. Sets and sub-lists are not supported."
},
"SourceRegionIds": {
"Type": "Json",
"Description": "Matches the source region IDs of routes. You can enter up to 32 region IDs."
}
},
"Resources": {
"CENCenRouteMap": {
"Type": "ALIYUN::CEN::CenRouteMap",
"Properties": {
"Description": {
"Ref": "Description"
},
"SourceInstanceIdsReverseMatch": {
"Ref": "SourceInstanceIdsReverseMatch"
},
"TransmitDirection": {
"Ref": "TransmitDirection"
},
"MatchCommunitySet": {
"Ref": "MatchCommunitySet"
},
"CenRegionId": {
"Ref": "CenRegionId"
},
"SourceRouteTableIds": {
"Ref": "SourceRouteTableIds"
},
"DestinationInstanceIds": {
"Ref": "DestinationInstanceIds"
},
"DestinationInstanceIdsReverseMatch": {
"Ref": "DestinationInstanceIdsReverseMatch"
},
"SourceInstanceIds": {
"Ref": "SourceInstanceIds"
},
"DestinationRouteTableIds": {
"Ref": "DestinationRouteTableIds"
},
"DestinationCidrBlocks": {
"Ref": "DestinationCidrBlocks"
},
"OperateCommunitySet": {
"Ref": "OperateCommunitySet"
},
"DestinationChildInstanceTypes": {
"Ref": "DestinationChildInstanceTypes"
},
"Priority": {
"Ref": "Priority"
},
"SourceChildInstanceTypes": {
"Ref": "SourceChildInstanceTypes"
},
"AsPathMatchMode": {
"Ref": "AsPathMatchMode"
},
"CidrMatchMode": {
"Ref": "CidrMatchMode"
},
"MapResult": {
"Ref": "MapResult"
},
"RouteTypes": {
"Ref": "RouteTypes"
},
"Preference": {
"Ref": "Preference"
},
"CommunityOperateMode": {
"Ref": "CommunityOperateMode"
},
"CenId": {
"Ref": "CenId"
},
"NextPriority": {
"Ref": "NextPriority"
},
"PrependAsPath": {
"Ref": "PrependAsPath"
},
"CommunityMatchMode": {
"Ref": "CommunityMatchMode"
},
"MatchAsns": {
"Ref": "MatchAsns"
},
"SourceRegionIds": {
"Ref": "SourceRegionIds"
}
}
}
},
"Outputs": {
"RouteMapId": {
"Description": "The ID of the routing policy.",
"Value": {
"Fn::GetAtt": [
"CENCenRouteMap",
"RouteMapId"
]
}
}
}
}