All Products
Search
Document Center

Cloud Enterprise Network:ListTransitRouterRouteEntries

Last Updated:Sep 11, 2026

Calls the ListTransitRouterRouteEntries operation to query the details of route entries in an Enterprise Edition transit router route table.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cen:ListTransitRouterRouteEntries

get

TransitRouterRouteEntry

acs:cen:*:{#accountId}:centransitrouterroutentry/{#centransitrouterroutentryId}

TransitRouterRouteTable

acs:cen:*:{#accountId}:centransitrouterroutetable/{#centransitrouterroutetableId}

TransitRouterRouteEntry

acs:cen:*:{#accountId}:centransitrouterroutentry/*

None None

Request parameters

Parameter

Type

Required

Description

Example

MaxResults

integer

No

The number of entries per page when entries are returned in pages. Valid values: 1 to 100. Default value: 20.

20

TransitRouterRouteEntryDestinationCidrBlock deprecated

string

No

The destination CIDR block of the route entry (This parameter will be deprecated. Use the RouteFilter parameter instead).

192.168.0.0/24

TransitRouterRouteEntryStatus

string

No

The status of the route entry. Valid values:

  • All: queries route entries in all states.

  • Active (default): queries only route entries in the active state.

  • Rejected: queries only route entries that are rejected due to route conflicts.

  • Prohibited: queries only route entries that are prohibited because they match a routing policy.

  • Standby: queries only route entries that serve as standby routes.

  • Candidate: queries only route entries that serve as candidate routes.

If you do not specify this parameter, only route entries in the active state are queried.

Active

TransitRouterRouteTableId

string

Yes

The ID of the Enterprise Edition transit router route table.

vtb-bp1dudbh2d5na6b50****

NextToken

string

No

The token that determines the start point of the query. Valid values:

  • You do not need to specify this parameter for the first query or if no subsequent query is to be sent.

  • If a subsequent query is to be sent, set the value to the NextToken value returned by the previous API call.

fce19****

TransitRouterRouteEntryNames

array

No

The names of the route entries.

testname

string

No

The name of the route entry.

The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://.

Note

The system supports only using this parameter to query static route entries configured on the current route table and is incompatible with query conditions other than TransitRouterRouteEntryIds.

testname

TransitRouterRouteEntryIds

array

No

The IDs of the route entries.

rte-oklkgwmj97z6dn****

string

No

The ID of the route entry.

Note

The system supports only using this parameter to query static route entries configured on the current route table and is incompatible with query conditions other than TransitRouterRouteEntryNames.

rte-oklkgwmj97z6dn****

TransitRouterRouteEntryType

string

No

The type of the route entry. Valid values:

  • Propagated: generated by automatic learning on the current route table.

  • Static: generated by static configuration on the current route table.

Propagated

TransitRouterRouteEntryNextHopType

string

No

The next hop type. Valid values:

  • BlackHole: the route entry is a blackhole route.

  • Attachment: the next hop of the route entry is a network instance connection.

Attachment

TransitRouterRouteEntryNextHopId

string

No

The ID of the network instance connection associated with the next hop of the route entry.

tr-attach-nls9fzkfat8934****

TransitRouterRouteEntryNextHopResourceId

string

No

The instance ID of the next hop of the route entry.

vpc-m5ent6du8deaq5*****

TransitRouterRouteEntryNextHopResourceType

string

No

The type of the next hop instance of the route entry. Valid values:

  • VPC: Virtual Private Cloud (VPC) instance.

  • VBR: Virtual Border Router (VBR) instance.

  • TR: transit router instance.

  • VPN: IPsec connection instance.

VPC

TransitRouterRouteEntryOriginResourceId

string

No

The instance ID of the origin of the route entry.

vpc-m5ent6du8deaq5*****

TransitRouterRouteEntryOriginResourceType

string

No

The type of the origin instance of the route entry. Valid values:

  • VPC: Virtual Private Cloud (VPC) instance.

  • VBR: Virtual Border Router (VBR) instance.

  • TR: transit router instance.

  • VPN: IPsec connection instance.

VPC

PrefixListId

string

No

The ID of the prefix list.

pl-6ehtn5kqxgeyy08fi****

RouteFilter

array<object>

No

The filter conditions for route entry CIDR blocks.

object

No

The filter condition for route entry CIDR blocks.

Key

string

No

The filter condition. Valid values:

  • PrefixExactMatchCidrs: exact match.

  • LongestPrefixMatchCidrs: longest prefix match. IP addresses and CIDR blocks are supported.

  • SubnetOfMatchCidrs: subnet match. Matches subnets of the specified CIDR block, including the specified CIDR block itself.

  • SupernetOfMatchCidrs: supernet match. Matches supernets of the specified CIDR block, including the specified CIDR block itself.

Multiple filter conditions have an AND relationship by default, which means that a route entry must meet all filter conditions to be considered a match. You cannot specify the same filter condition more than once.

PrefixExactMatchCidrs

Value

array

No

The list of filter condition values.

string

No

Specifies the filter values based on the Key parameter. You can specify multiple filter values for a single Key. Multiple filter values have an OR relationship, which means that a route entry is considered a match if it meets any one of the filter values. A maximum of 500 filter values can be specified for a single filter condition.
IPv4 addresses, IPv6 addresses, and CIDR blocks are supported.

192.168.1.0/24

Response elements

Element

Type

Description

Example

object

The response parameters.

NextToken

string

The token that determines the start point of the next query. Valid values:

  • If NextToken is empty, no subsequent query is to be sent.

  • If NextToken is returned, the value indicates the token for the next query.

fce19****

RequestId

string

The request ID.

C3835E5E-1504-4344-B1BB-98A4110F1079

TotalCount

integer

The total number of entries.

6

MaxResults

integer

The number of entries per page when entries are returned in pages.

20

TransitRouterRouteEntries

array<object>

The list of route entries.

array<object>

The route entry information.

TransitRouterRouteEntryId

string

The ID of the route entry.

Note

This parameter is returned only for statically configured routes.

rte-oklkgwmj97z6dn****

TransitRouterRouteEntryDestinationCidrBlock

string

The destination CIDR block of the route entry. An IPv4 CIDR block or an IPv6 CIDR block is returned.

192.168.0.0/24

TransitRouterRouteEntryType

string

The type of the route entry.

  • Static: a statically configured route entry.

  • Propagated: a route entry generated by automatic learning.

Static

CreateTime

string

The time when the route entry was created.

The time is displayed in UTC in the YYYY-MM-DDThh:mmZ format.

Note

This parameter is returned only for statically configured routes.

2021-06-15T07:01Z

TransitRouterRouteEntryName

string

The name of the route entry.

Note

This parameter is returned only for statically configured routes.

testname

TransitRouterRouteEntryStatus

string

The status of the route entry.

  • Active: active.

  • Rejected: rejected due to a route conflict.

  • Prohibited: prohibited by a routing policy.

  • Standby: standby.

  • Candidate: candidate.

  • Creating: being created.

  • Deleting: being deleted.

Active

TransitRouterRouteEntryNextHopType

string

The next hop type of the route entry.

  • BlackHole: the route entry is a blackhole route. All traffic destined for the destination CIDR block is dropped.

  • Attachment: the next hop of the route entry is a network instance connection. All traffic destined for the destination CIDR block is forwarded to the specified network instance connection.

BlackHole

TransitRouterRouteEntryNextHopId

string

The next hop ID of the route entry. This parameter is not returned for blackhole routes.

tr-attach-vx6iwhjr1x1j78****

TransitRouterRouteEntryDescription

string

The description of the route entry.

Note

This parameter is returned only for statically configured routes.

CidrRoute

OperationalMode

boolean

Indicates whether the current route entry can be modified.

  • true: the route entry can be modified. You can delete the route entry.

  • false: the route entry cannot be modified. The route entry is automatically generated by the system and does not support editing.

false

Tag

string

The tag of the route entry.

The only valid value is PermitVbr, which indicates that the current route entry is propagated only to the route tables of VBR instances under the transit router instance.

Note

This parameter is returned only for system-generated routes for transit router CIDR blocks.

PermitVbr

TransitRouterRouteEntryNextHopResourceId

string

The instance ID of the next hop of the route entry.

vpc-m5ent6du8deaq5*****

TransitRouterRouteEntryNextHopResourceType

string

The type of the next hop instance of the route entry.

  • VPC: Virtual Private Cloud (VPC) instance.

  • VBR: Virtual Border Router (VBR) instance.

  • TR: transit router instance.

  • VPN: IPsec connection instance.

VPC

TransitRouterRouteEntryOriginResourceType

string

The type of the origin instance of the route entry.

  • VPC: Virtual Private Cloud (VPC) instance.

  • VBR: Virtual Border Router (VBR) instance.

  • TR: transit router instance.

  • VPN: IPsec connection instance.

VPC

TransitRouterRouteEntryOriginResourceId

string

The instance ID of the origin of the route entry.

vpc-m5ent6du8deaq5*****

PrefixListId

string

The ID of the prefix list.

pl-k1ainl66z3527773d****

PathAttributes

object

The path attributes of the route.

Communities

array

The list of Community attributes of the route entry.

string

The Community attribute value of the route entry.

65501:1

AsPaths

array

The list of AS Path attributes of the route entry.

string

The AS Path attribute value of the route entry.

65501

OriginInstanceId

string

The instance ID of the original instance from which the route entry originates.

vbr-m5ent6du8deaq5*****

OriginInstanceType

string

The type of the instance from which the route originates.

  • VPC: Virtual Private Cloud (VPC) instance.

  • VBR: Virtual Border Router (VBR) instance.

  • TR: transit router instance.

  • VPN: IPsec connection instance.

  • CCN: Cloud Connect Network (CCN) instance.

VBR

OriginRouteType

string

The original route type when the route was generated.

  • System: system route.

  • Custom: custom route.

  • Static: static route.

  • BGP: BGP route.

  • BlackHole: blackhole route.

BGP

Preference

integer

The priority of the route entry.

A smaller value indicates a higher priority.

50

Examples

Success response

JSON format

{
  "NextToken": "fce19****",
  "RequestId": "C3835E5E-1504-4344-B1BB-98A4110F1079",
  "TotalCount": 6,
  "MaxResults": 20,
  "TransitRouterRouteEntries": [
    {
      "TransitRouterRouteEntryId": "rte-oklkgwmj97z6dn****",
      "TransitRouterRouteEntryDestinationCidrBlock": "192.168.0.0/24",
      "TransitRouterRouteEntryType": "Static",
      "CreateTime": "2021-06-15T07:01Z",
      "TransitRouterRouteEntryName": "testname",
      "TransitRouterRouteEntryStatus": "Active",
      "TransitRouterRouteEntryNextHopType": "BlackHole",
      "TransitRouterRouteEntryNextHopId": "tr-attach-vx6iwhjr1x1j78****",
      "TransitRouterRouteEntryDescription": "CidrRoute",
      "OperationalMode": false,
      "Tag": "PermitVbr",
      "TransitRouterRouteEntryNextHopResourceId": "vpc-m5ent6du8deaq5*****",
      "TransitRouterRouteEntryNextHopResourceType": "VPC",
      "TransitRouterRouteEntryOriginResourceType": "VPC",
      "TransitRouterRouteEntryOriginResourceId": "vpc-m5ent6du8deaq5*****",
      "PrefixListId": "pl-k1ainl66z3527773d****",
      "PathAttributes": {
        "Communities": [
          "65501:1"
        ],
        "AsPaths": [
          "65501"
        ],
        "OriginInstanceId": "vbr-m5ent6du8deaq5*****\n",
        "OriginInstanceType": "VBR",
        "OriginRouteType": "BGP",
        "Preference": 50
      }
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalParam.TransitRouterRouteTableId TransitRouterRouteTableId is illegal. The error message returned because the route table ID of the transit router (TransitRouterRouteTableId) is invalid.
400 IllegalParam.TransitRouterRouteEntryStatus TransitRouterRouteEntryStatus is illegal. The error message returned because the status of the route on the transit router (TransitRouterRouteEntryStatus) is invalid.
400 IllegalParam.NextToken NextToken is illegal. The error message returned because the NextToken parameter is set to an invalid value.
400 ParamExclusive.RouteEntryIdsAndStatus TransitRouterRouteEntryIds and TransitRouterRouteEntryStatus is mutually exclusive. The error message returned because the TransitRouterRouteEntryIds and TransitRouterRouteEntryStatus parameters conflict with each other.
400 InvalidTransitRouterRouteTableId.NotFound TransitRouterRouteTableId is not found. The error message returned because the specified route table ID of the transit router does not exist.
400 FilterKeyDuplicated.RouteFilter The keys in RouteFilter are duplicated. The error message returned because RouteFilter contains duplicate key values.
400 InvalidFilterKey The key in filter is invalid. The key in filter is invalid.
400 IllegalParam.TransitRouterRouteEntryNextHopType TransitRouterRouteEntryNextHopType is invalid. The error message returned because the TransitRouterRouteEntryNextHopType parameter is set to an invalid value.
400 IllegalParam.TransitRouterRouteEntryNextHopAttachmentId TransitRouterRouteEntryNextHopAttachmentId is invalid. The error message returned because TransitRouterRouteEntryNextHopAttachmentId is set to an invalid value.
400 IllegalParam.TransitRouterRouteEntryNextHopResourceId TransitRouterRouteEntryNextHopResourceId is invalid. The error message returned because TransitRouterRouteEntryNextHopResourceId is set to an invalid value.
400 IllegalParam.TransitRouterRouteEntryNextHopResourceType TransitRouterRouteEntryNextHopResourceType is invalid. The error message returned because TransitRouterRouteEntryNextHopResourceType is set to an invalid value.
400 IllegalParam.TransitRouterRouteEntryOriginResourceId TransitRouterRouteEntryOriginResourceId is invalid. The error message returned because TransitRouterRouteEntryOriginResourceId is set to an invalid value.
400 IllegalParam.TransitRouterRouteEntryOriginResourceType TransitRouterRouteEntryOriginResourceType is invalid. The error message returned because TransitRouterRouteEntryOriginResourceType is set to an invalid value.
400 IllegalParam.TransitRouterRouteEntryType TransitRouterRouteEntryType is invalid. The error message returned because TransitRouterRouteEntryType is set to an invalid value.
400 IllegalParam.PrefixExactMatchCidr PrefixExactMatchCidr is invalid. The error message returned because PrefixExactMatchCidr is set to an invalid value.
400 IllegalParam.LongestPrefixMatchCidr LongestPrefixMatchCidr is invalid. The error message returned because LongestPrefixMatchCidr is set to an invalid value.
400 IllegalParam.SubnetOfMatchCidr SubnetOfMatchCidr is invalid. The error message returned because SubnetOfMatchCidr is set to an invalid value.
400 IllegalParam.SupernetOfMatchCidr SupernetOfMatchCidr is invalid. The error message returned because SupernetOfMatchCidr is set to an invalid value.
400 InvalidName Name is invalid. The error message returned because the specified name is invalid.
400 IllegalParam.TextMatchCidr The TextMatchCidr specified in the parameter is illegal. The TextMatchCidr specified in the parameter is illegal.
400 ResourceNotFound.PrefixlistAssociation The prefix list is not associated with this route table. The error message returned because the specified prefix list is not associated with a route table.
400 InvalidParameter Invalid parameter. The error message returned because the parameter is set to an invalid value.
400 Unauthorized The AccessKeyId is unauthorized. The error message returned because you do not have the permissions to perform this operation.
404 InvalidRouteTableId.NotFound The specified RouteTableId is not found. The specified route table ID does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.