CenRouteMap
This class encapsulates and extends the ROS resource type ALIYUN::CEN::CenRouteMap
, which is used to create a routing policy.
Initializers
import com.aliyun.ros.cdk.cen.CenRouteMap;
CenRouteMap.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.cenId(java.lang.String)
.cenId(IResolvable)
.cenRegionId(java.lang.String)
.cenRegionId(IResolvable)
.mapResult(java.lang.String)
.mapResult(IResolvable)
.priority(java.lang.Number)
.priority(IResolvable)
.transmitDirection(java.lang.String)
.transmitDirection(IResolvable)
// .asPathMatchMode(java.lang.String)
// .asPathMatchMode(IResolvable)
// .cidrMatchMode(java.lang.String)
// .cidrMatchMode(IResolvable)
// .communityMatchMode(java.lang.String)
// .communityMatchMode(IResolvable)
// .communityOperateMode(java.lang.String)
// .communityOperateMode(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .destinationChildInstanceTypes(IResolvable)
// .destinationChildInstanceTypes(java.util.List<java.lang.String)
// .destinationChildInstanceTypes(IResolvable>)
// .destinationCidrBlocks(IResolvable)
// .destinationCidrBlocks(java.util.List<java.lang.String)
// .destinationCidrBlocks(IResolvable>)
// .destinationInstanceIds(IResolvable)
// .destinationInstanceIds(java.util.List<java.lang.String)
// .destinationInstanceIds(IResolvable>)
// .destinationInstanceIdsReverseMatch(java.lang.Boolean)
// .destinationInstanceIdsReverseMatch(IResolvable)
// .destinationRouteTableIds(IResolvable)
// .destinationRouteTableIds(java.util.List<java.lang.String)
// .destinationRouteTableIds(IResolvable>)
// .matchAsns(IResolvable)
// .matchAsns(java.util.List<java.lang.String)
// .matchAsns(IResolvable>)
// .matchCommunitySet(IResolvable)
// .matchCommunitySet(java.util.List<java.lang.String)
// .matchCommunitySet(IResolvable>)
// .nextPriority(java.lang.Number)
// .nextPriority(IResolvable)
// .operateCommunitySet(IResolvable)
// .operateCommunitySet(java.util.List<java.lang.String)
// .operateCommunitySet(IResolvable>)
// .preference(java.lang.Number)
// .preference(IResolvable)
// .prependAsPath(IResolvable)
// .prependAsPath(java.util.List<java.lang.String)
// .prependAsPath(IResolvable>)
// .routeTypes(IResolvable)
// .routeTypes(java.util.List<java.lang.String)
// .routeTypes(IResolvable>)
// .sourceChildInstanceTypes(IResolvable)
// .sourceChildInstanceTypes(java.util.List<java.lang.String)
// .sourceChildInstanceTypes(IResolvable>)
// .sourceInstanceIds(IResolvable)
// .sourceInstanceIds(java.util.List<java.lang.String)
// .sourceInstanceIds(IResolvable>)
// .sourceInstanceIdsReverseMatch(java.lang.Boolean)
// .sourceInstanceIdsReverseMatch(IResolvable)
// .sourceRegionIds(IResolvable)
// .sourceRegionIds(java.util.List<java.lang.String)
// .sourceRegionIds(IResolvable>)
// .sourceRouteTableIds(IResolvable)
// .sourceRouteTableIds(java.util.List<java.lang.String)
// .sourceRouteTableIds(IResolvable>)
.build();
Name | Type | Description |
---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
cenId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property cenId: The ID of the Cloud Enterprise Network (CEN) instance. |
cenRegionId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property cenRegionId: The region where the CEN instance is deployed. |
mapResult |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property mapResult: The route map behavior after all conditions are matched. |
priority |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property priority: The priority of the route map. |
transmitDirection |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property transmitDirection: The direction in which the route map is applied. |
asPathMatchMode |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property asPathMatchMode: Match statements are used to match the AS paths. |
cidrMatchMode |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property cidrMatchMode: Match statements are used to match the prefixes. |
communityMatchMode |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property communityMatchMode: Match statements are used to match the Communities. |
communityOperateMode |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property communityOperateMode: Action statements are used to operate the Communities. |
description |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property description: The description of the route map. |
destinationChildInstanceTypes |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property destinationChildInstanceTypes: Match statements are used to match the destination instance types. |
destinationCidrBlocks |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property destinationCidrBlocks: Match statements are used to match the routing prefixes. |
destinationInstanceIds |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property destinationInstanceIds: Match statements are used to match the destination instance IDs. |
destinationInstanceIdsReverseMatch |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property destinationInstanceIdsReverseMatch: The IDs of destination instances to be advertised do not support match statements. |
destinationRouteTableIds |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property destinationRouteTableIds: Match statements are used to match the IDs of the destination route tables. |
matchAsns |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property matchAsns: Match statements are used to match AS paths of the routes. |
matchCommunitySet |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property matchCommunitySet: Match statements are used to match the Communities. |
nextPriority |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property nextPriority: The priority of the next associated route map. |
operateCommunitySet |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property operateCommunitySet: Action statements are used to operate the Communities. |
preference |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property preference: Action statements are used to modify route priorities. |
prependAsPath |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property prependAsPath: AS paths are attached when regional gateways receive or advertise routes. |
routeTypes |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property routeTypes: Match statements are used to match the route types. |
sourceChildInstanceTypes |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property sourceChildInstanceTypes: Match statements are used to match source instance types of the routes. |
sourceInstanceIds |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property sourceInstanceIds: Match statements are used to match source instance IDs of the routes. |
sourceInstanceIdsReverseMatch |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property sourceInstanceIdsReverseMatch: The IDs of source instances to be advertised do not support match statements. |
sourceRegionIds |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property sourceRegionIds: Match statements are used to match source region IDs of the routes. |
sourceRouteTableIds |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property sourceRouteTableIds: Match statements are used to match source route table IDs of the routes. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
cenId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property cenId: The ID of the Cloud Enterprise Network (CEN) instance.
cenRegionId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property cenRegionId: The region where the CEN instance is deployed.
You can call the DescribeRegions operation to query region IDs.
mapResult
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property mapResult: The route map behavior after all conditions are matched.
Valid values: Permit: allows the routes that are matched. Deny: rejects the routes that are matched.
priority
Required
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property priority: The priority of the route map.
Valid values: 1 to 100 . A lower value indicates a higher priority. Note In the same region, for route maps that are applied in the same direction, the priority is unique. When a route map is implemented, the system matches conditions with a route map whose priority number is the smallest. Therefore, make sure that you set priorities for route maps to meet your requirements.
transmitDirection
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property transmitDirection: The direction in which the route map is applied.
Valid values: RegionIn: Routes are advertised to CEN gateways. For example, routes are advertised from network instances deployed in the current region or other regions to the gateways deployed in the current region. RegionOut: Routes are advertised from CEN gateways. For example, routes are advertised from gateways deployed in the current region to network instances or gateways deployed in other regions.
asPathMatchMode
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property asPathMatchMode: Match statements are used to match the AS paths.
Valid values: Include: uses fuzzy match. If the AS path in the condition overlaps with the AS path in the route, the match is successful. Complete: uses exact match. Only when the AS path in the condition is the same as the AS path in the route, the match is successful.
cidrMatchMode
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property cidrMatchMode: Match statements are used to match the prefixes.
Valid values: Include: uses fuzzy match. If the routing prefix in the condition contains the routing prefix of the route, the match is successful. For example, the 1.1.0.0/16 policy can match the 1.1.1.0/24 route. Complete: uses exact match. Only when the routing prefix in the condition is the same as the routing prefix of the route, the match is successful. For example, the 1.1.0.0/16 policy can match the 1.1.0.0/16 route.
communityMatchMode
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property communityMatchMode: Match statements are used to match the Communities.
Valid values: Include: uses fuzzy match. If the Community in the condition overlaps with the Community of the route, the match is successful. Complete: uses exact match. Only when the Community in the condition is the same as the Community of the route, the match is successful.
communityOperateMode
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property communityOperateMode: Action statements are used to operate the Communities.
Valid values: Additive: adds. Replace: replaces.
description
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of the route map.
destinationChildInstanceTypes
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property destinationChildInstanceTypes: Match statements are used to match the destination instance types.
Valid values: VPC: VPCs. VBR: VBRs. CCN: CCN instances in mainland China. Note The destination instance types are valid only when the route map is applied to scenarios where routes are advertised from gateways in the current region to instances in the current region.
destinationCidrBlocks
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property destinationCidrBlocks: Match statements are used to match the routing prefixes.
The CIDR format is used. You can enter at most 32 CIDR blocks.
destinationInstanceIds
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property destinationInstanceIds: Match statements are used to match the destination instance IDs.
You can enter instance IDs of the following types: VPC, VBR, CCN in mainland China, and SAG. You can enter at most 32 instance IDs. Note The destination instance IDs are valid only when the route map is applied to scenarios where routes are advertised from gateways in the current region to instances in the current region.
destinationInstanceIdsReverseMatch
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property destinationInstanceIdsReverseMatch: The IDs of destination instances to be advertised do not support match statements.
Valid values: false(default value): If the ID of the destination instance to be advertised is in the DestinationInstanceIds field, the match is successful. true: If the ID of the destination instance to be advertised is not in the DestinationInstanceIds filed, the match is successful.
destinationRouteTableIds
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property destinationRouteTableIds: Match statements are used to match the IDs of the destination route tables.
You can enter at most 32 route table IDs. Note The destination route table IDs are valid only when the route map is applied to scenarios where routes are advertised from gateways in the current region to route tables in the current region.
matchAsns
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property matchAsns: Match statements are used to match AS paths of the routes.
An AS path is a mandatory attribute, which describes the AS number through which a BGP route passes when the BGP route is advertised. Only the AS-SEQUENCE parameter is supported. The AS-SET, AS-CONFED-SEQUENCE, and AS-CONFED-SET parameters are not supported. Specifically, only the AS number list is supported. Sets and sub-lists are not supported.
matchCommunitySet
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property matchCommunitySet: Match statements are used to match the Communities.
Enter each Community in the format of nn:nn. Valid values of nn: 1 to 65535. You can enter at most 32 Communities. Each Community must comply with RFC 1997. RFC 8092 is not supported. Note If the configurations of the Communities are incorrect, routes may not be advertised to the on-premises data center.
nextPriority
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property nextPriority: The priority of the next associated route map.
Valid values: 1 to 100. If the priority is not set, no next route map is associated with the current route map. If the priority is set to 1, the next route map is associated with the current route map. If the priority is set and the value is not 1, the priority of the associated route map must be higher than that of the current route map. Only when the MapResult parameter is set to Permit, the matched routes continue to match the next associated route maps.
operateCommunitySet
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property operateCommunitySet: Action statements are used to operate the Communities.
Valid values: Enter each Community in the format of nn:nn. Valid values of nn: 1 to 65535. You can enter at most 32 Communities. Each Community must comply with RFC 1997. RFC 8092 is not supported. Note If the configurations of the Communities are incorrect, routes may not be advertised to the on-premises data center.
preference
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property preference: Action statements are used to modify route priorities.
Valid values: 1 to 100. Default value: 50. A smaller number indicates a higher priority.
prependAsPath
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property prependAsPath: AS paths are attached when regional gateways receive or advertise routes.
For route maps that are applied in different directions, the requirements for AS paths to be attached are different: For the inbound direction: You must specify the list of source instance IDs and the source region in the condition to be matched. The source region must be the same as the region where the route map is applied. For the outbound direction: You must specify the list of destination instance IDs in the condition to be matched.
routeTypes
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property routeTypes: Match statements are used to match the 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.
sourceChildInstanceTypes
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property sourceChildInstanceTypes: Match statements are used to match source instance types of the routes.
Valid values: VPC: VPCs. VBR: VBRs. CCN: CCN instances in mainland China.
sourceInstanceIds
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property sourceInstanceIds: Match statements are used to match source instance IDs of the routes.
You can enter instance IDs of the following types: virtual private cloud (VPC), virtual border router (VBR), Cloud Connect Network (CCN) in mainland China, Smart Access Gateway (SAG). You can enter at most 32 instance IDs.
sourceInstanceIdsReverseMatch
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property sourceInstanceIdsReverseMatch: The IDs of source instances to be advertised do not support match statements.
Valid values: false (default value): If the source instance ID is in the SourceInstanceIds field, the match is successful. true: If the source instance ID is not in the SourceInstanceIds field, the match is successful.
sourceRegionIds
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property sourceRegionIds: Match statements are used to match source region IDs of the routes.
You can enter at most 32 region IDs.
sourceRouteTableIds
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property sourceRouteTableIds: Match statements are used to match source route table IDs of the routes.
You can enter at most 32 route table IDs.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.cen.CenRouteMap;
CenRouteMap.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrRouteMapId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute RouteMapId: The ID of the route map. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrRouteMapId
Required
public IResolvable getAttrRouteMapId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute RouteMapId: The ID of the route map.