Modifies a route map.

Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String No ModifyCenRouteMap

The name of this action. Valid value: ModifyCenRouteMap.

CenId String Yes cen-7qthudw0ll6jmc****

The ID of the CEN instance.

CenRegionId String Yes cn-hangzhou

The ID of the region to which the CEN instance belongs. To query the region ID, call DescribeRegions.

MapResult String Yes Permit

The action that is performed to a route if the route meets all the match conditions. Valid values:

  • Permit: The route is permitted.
  • Deny: The route is denied.
Priority Integer Yes. 10

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

Note After configuring a route map with a specific priority value, you cannot set the same priority for another route map that is applied in the same region and in the same direction. When route maps are executed to evaluate a route, the system first checks whether the route matches the conditional statements of the route map with the highest priority. Therefore, we recommend that you specify an appropriate priority for each route map.
RouteMapId String Yes cenrmap-abcdedfghij****

The ID of the route map.

NextPriority Integer No 20

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

  • If this parameter is not set, the current route map is not associated with any route map that is ordered next to the current route map.
  • If this parameter is set to 1, the current route map is associated with the next route map.
  • If this parameter is set to a value other than 1, the priority of the associated route map must be lower than the priority of the current route map, that is, the value of NextPriority must be greater than the value set for Priority.

Only when MapResult is set to Permit, the routes which match all the matching criteria will be evaluated by the associated route map that is configured with a specific priority value.

Description String No test

The description of the route map.

SourceRegionIds.N RepeatList No cn-beijing

A match statement that indicates the list of IDs of the source regions. Up to 32 region IDs can be entered.

SourceInstanceIds.N RepeatList No vpc-afsfdf5435vcvc****

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

IDs of Virtual Private Cloud (VPC) instances, Virtual Border Router (VBR) instances, mainland China Cloud Connect Network (CCN) instances, and Smart Access Gateway (SAG) instances are supported. Up to 32 instance IDs can be entered.

SourceInstanceIdsReverseMatch Boolean No false

Indicates whether to enable the reverse match method of the SourceInstanceIds match condition. Valid values:

  • false (default): If the ID of a route's source instance is included in SourceInstanceIds, the route is permitted.
  • true: If the ID of a route's source instance is not included in SourceInstanceIds, the route is permitted.
DestinationInstanceIds.N RepeatList No vpc-avcdsg34ds****

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

IDs of VPC instances, VBR instances, mainland China CCN instances, and SAG instances are supported. Up to 32 instance IDs can be entered.

Note This parameter is valid only when the TransmitDirection parameter is set to RegionOut, and the destination instances and the route map belong to the same region.
DestinationInstanceIdsReverseMatch Boolean No false

Indicates whether to enable the reverse match method of the DestinationInstanceIds match condition. Valid values:

  • false (default): If the ID of a route's destination instance is included in DestinationInstanceIds, the route is permitted.
  • true: If the ID of a route's destination instance is not included in DestinationInstanceIds, the route is permitted.
SourceRouteTableIds.N RepeatList No vtb-acdbvtbr342cd****

A match statement that indicates the list of IDs of the source route tables. Up to 32 route table IDs can be entered.

DestinationRouteTableIds.N RepeatList No vtb-adfg53c322v****

A match statement that indicates the list of IDs of the destination route tables. Up to 32 route table IDs can be entered.

Note This parameter is valid only when the TransmitDirection parameter is set to RegionOut, and the destination route tables and the route map belong to the same region.
SourceChildInstanceTypes.N RepeatList No VPC

A match statement that indicates the list of source instance types. Valid values:

  • VPC: VPC
  • VBR: VBR
  • CCN: Mainland China CCN
DestinationChildInstanceTypes.N RepeatList No VPC

A match statement that indicates the list of destination instance types. Valid values:

  • VPC: VPC
  • VBR: VBR
  • CCN: Mainland China CCN
Note This parameter is valid only when the TransmitDirection parameter is set to RegionOut, and the destination instances and the route map belong to the same region.
DestinationCidrBlocks.N RepeatList No 1.1.1.0/10

A match statement that indicates the prefix list. The prefix is in the CIDR format. Up to 32 CIDR blocks can be entered.

CidrMatchMode String No Include

A match statement. It indicates the mode in which the prefix attribute is matched. Valid values:

  • Include: Fuzzy match. If the prefix of a route is contained in the prefix in the match condition, the route matches the condition.

    For example, if the prefix in the match condition is set to 1.1.0.0/16 and the match method is set to Fuzzy Match, the route with the prefix of 1.1.1.0/24 matches the condition.

  • Complete: Exact match. A route matches the condition only when the prefix of the route is the same as the prefix in the match condition.

    For example, if the prefix in the match condition is set to 1.1.0.0/16 and the match method is set to Exact Match, only the route with the prefix of 1.1.1.0/16 matches the condition.

RouteTypes.N RepeatList No System

A match statement that indicates the list of route types. Valid values:

  • System: System routes generated by the system
  • Custom: Custom routes added by users
  • BGP: Routes advertised to BGP

Multiple route types can be entered.

MatchAsns.N RepeatList No 65501

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.

Only support AS SEQUENCE. AS SET, AS CONFED SEQUENCE, or AS CONFED SET are not supported. Specifically, only a list of AS numbers are supported. Sets or sub-lists are not supported.

AsPathMatchMode String No Include

A match statement. It indicates the mode in which the as-path attribute is matched. Valid values:

  • Include: Fuzzy match. A route matches the condition if the AS path in the route overlaps the AS path in the match condition.
  • Complete: Exact match. A route matches the condition only when the AS path of the route is the same as the AS path in the match condition.
MatchCommunitySet.N RepeatList No 65501:1

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

Note Community configuration errors may cause a problem that prevents the route to be published to the on-premises data center.
CommunityMatchMode String No Include

A match statement. It indicates the mode in which the community attribute is matched. Valid values:

  • Include: Fuzzy match. A route matches the condition if the community of the route overlaps the community in the match condition.
  • Complete: Exact match. A route matches the condition only when the community of the route is the same as the community in the match condition.
CommunityOperateMode String No Additive

An action statement. It indicates the mode in which the community attribute is operated. Valid values:

  • Additive: Sets a value for the community attribute.
  • Replace: Replaces the value of the community attribute.
OperateCommunitySet.N RepeatList No 65501:1

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

Note Community configuration errors may cause a problem that prevents the route to be published to the on-premises data center.
Preference Integer No 22

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

PrependAsPath.N RepeatList No 65501

Indicates AS Path prepending when a regional gateway receives or publishes a route.

The requirements for configuring AS Path prepending vary depending on the application direction of the route map. The requirements are described as follows:

  • If the TransmitDirection parameter is set to RegionIn, and you want to configure the AS Path prepending, the match conditions must include the Source Instance IDs and the Source Region. Furthermore, you must specify the same value for Source Region and Region.
  • If the TransmitDirection parameter is set to RegionOut, and you want to configure the AS Path prepending, the match conditions must include the Destination Instance IDs.

Response parameters

Parameter Type Example value Description
RequestId String  54B48E3D-DF70-471B-AA93-08E683A1B457

The ID of the request.

Examples

Request example

http(s)://[Endpoint]/? Action=ModifyCenRouteMap
&CenId=cen-7qthudw0ll6jmc****
&CenRegionId=cn-hangzhou
&MapResult=Permit
&Priority=10
&RouteMapId=cenrmap-abcdedfghij****
&<CommonParameters>

Response example

XML format

<ModifyCenRouteMapResponse>
    <RequestId>62172DD5-6BAC-45DF-8D44-xxxxxxxx</RequestId>
</ModifyCenRouteMapResponse>

JSON format

{
    "RequestId": "62172DD5-6BAC-45DF-8D44-xxxxxxxx"
}

Errors

For a list of error codes, visit the API Error Center.