Queries one or more route maps of a CEN instance.

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 DescribeCenRouteMaps

The name of this action. Valid value: DescribeCenRouteMaps.

CenId String Yes cen-7qthudw0ll6jmc****

The ID of the CEN instance.

CenRegionId String No cn-beijing

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

RouteMapId String No cenrmap-abcdedfghij****

The ID of the route map.

TransmitDirection String No RegionIn

The direction in which the route map is applied. Valid values:

  • RegionIn: The direction in which routes are imported to the regional gateway of the CEN.

    For example, routes are imported to the regional gateway from an instance in the current region or another region.

  • RegionOut: The direction in which routes are exported from the regional gateway of the CEN.

    For example, routes are exported from the regional gateway of the current region to an instance in the same region, or to the regional gateway in another region.

PageNumber Integer No 1

The page number. Default value: 1

PageSize Integer No 10

The number of entries per page for a paged query. Maximum value: 50. Default value: 10.

Response parameters

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

The ID of the request.

TotalCount Integer 10

The number of total entries.

PageNumber Integer 1

The current page number.

PageSize Integer 10

The number of entries per page.

RouteMaps Array

The information of route maps.

Status String Active

The status of the route map.

  • Active: The route map is available.
  • Creating: The route map is being created.
RouteMapId String cenrmap-abcdedfghij****

The ID of the route map.

CenId String cen-7qthudw0ll6jmc****

The ID of the CEN instance.

CenRegionId String cn-hangzhou

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

Description String abc

The description of the route map.

MapResult String Permit

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

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

The priority of the route map.

NextPriority Integer 33

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 conditions will be evaluated by the associated route map that is configured with a specific preference value.

CidrMatchMode String 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.

AsPathMatchMode String 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.
CommunityMatchMode String  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 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.
Preference Integer 20

An action statement that modifies the preference of the route.

TransmitDirection String RegionIn

The direction in which the route map is applied.

  • RegionIn: The direction in which routes are imported to the regional gateway of the CEN.

    For example, routes are imported to the regional gateway from an instance in the current region or another region.

  • RegionOut: The direction in which routes are exported from the regional gateway of the CEN.

    For example, routes are exported from the regional gateway of the current region to an instance in the same region, or to the regional gateway in another region.

SourceInstanceIdsReverseMatch Boolean 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.
DestinationInstanceIdsReverseMatch Boolean 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.
SourceInstanceIds List vpc-a

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

DestinationInstanceIds List vpc-a

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

This parameter is valid only when the TransmitDirection parameter is set to RegionOut, and the destination instance and the route map belongs to the same region.

SourceRouteTableIds List vtb-a

A match statement that indicates the list of IDs of the source route tables.

DestinationRouteTableIds List vtb-a

A match statement that indicates the list of IDs of the destination route tables.

This parameter is valid only when the TransmitDirection parameter is set to RegionOut, and the destination route table and the route map belongs to the same region.

SourceRegionIds List cn-beijing

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

SourceChildInstanceTypes List VPC

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

  • VPC: Virtual Private Cloud (VPC)
  • VBR: Virtual Border Router (VBR)
  • CCN: Mainland China Cloud Connect Network (CCN)
DestinationChildInstanceTypes List VPC

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

  • VPC: VPC
  • VBR: VBR
  • CCN: Mainland China CCN

This parameter is valid only when the TransmitDirection parameter is set to RegionOut, and the destination instance and the route map belong to the same region.

DestinationCidrBlocks List 1.1.1.0/10

A match statement that indicates the prefix list.

RouteTypes List System

A match statement that indicates the list of route types.

  • System: System routes generated by the system.
  • Custom: Custom routes added by users.
  • BGP: Routes advertised to BGP.
MatchAsns List 65501

A match statement that indicates the As path list.

MatchCommunitySet List 65501:1

A match statement that indicates the community set.

OperateCommunitySet List 65501:1

An action statement that operates the community attribute.

PrependAsPath List 65501

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

Examples

Request example

http(s)://[Endpoint]/? Action=DescribeCenRouteMaps
&CenId=cen-7qthudw0ll6jmc****
&<CommonParameters>

Response example

XML format

<DescribeCenRouteMapsResponse>
	  <RouteMaps>
		    <RouteMap>
			      <Status>Active</Status>
			      <CenRegionId>cn-beijing</CenRegionId>
			      <RouteMapId>cenrmap-jumdfzmj5sgggl****</RouteMapId>
			      <MapResult>Permit</MapResult>
			      <TransmitDirection>RegionIn</TransmitDirection>
			      <CenId>cen-nh98vzx8gfhlwn****</CenId>
			      <Priority>20</Priority>
		    </RouteMap>
	  </RouteMaps>
	  <PageNumber>1</PageNumber>
	  <TotalCount>1</TotalCount>
	  <PageSize>10</PageSize>
</DescribeCenRouteMapsResponse>

JSON format

{
    "RouteMaps": {
        "RouteMap": [
            {
                "Status": "Active",
                "CenRegionId": "cn-beijing",
                "RouteMapId": "cenrmap-jumdfzmj5sgggl****",
                "MapResult": "Permit",
                "TransmitDirection": "RegionIn",
                "CenId": "cen-nh98vzx8gfhlwn****",
                "Priority": 20
            }
        ]
    },
    "PageNumber": 1,
    "TotalCount": 1,
    "PageSize": 10
}

Errors

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