All Products
Search
Document Center

Virtual Private Cloud:DescribeRouteEntryList

Last Updated:Jun 19, 2026

Calls DescribeRouteEntryList to query the list of route entries.

Operation description

Before calling the DeleteRouteEntry operation to delete a route entry, you can call this operation to query the next hop information of the route entry to be deleted.

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

vpc:DescribeRouteEntryList

get

*RouteTable

acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the route table to which the route entry belongs.

You can call the DescribeRegions operation to query the region ID.

cn-hangzhou

RouteTableId

string

Yes

The ID of the route table to query.

vtb-bp1r9pvl4xen8s9ju****

RouteEntryId

string

No

The ID of the route entry to query.

rte-bp1mnnr2al0naomnp****

DestinationCidrBlock

string

No

The destination CIDR block of the route entry. Both IPv4 and IPv6 CIDR blocks are supported.

192.168.2.0/24

RouteEntryName

string

No

The name of the route entry.

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

abc

IpVersion

string

No

The version of the IP protocol. Valid values:

  • ipv4: IPv4 protocol.

  • ipv6: IPv6 protocol.

ipv4

RouteEntryType

string

No

The type of the route. Valid values:

  • Custom: custom route.

  • System: system route.

  • BGP: BGP route.

  • CEN: Cloud Enterprise Network (CEN) route.

  • ECR: Express Connect Router route.

System

NextHopId

string

No

The ID of the next hop instance.

vpn-bp10zyaph5cc8b7c7****

NextHopType

string

No

The type of the next hop. Valid values:

  • Instance (default): ECS instance.

  • HaVip: high-availability virtual IP address (HAVIP).

  • VpnGateway: VPN gateway.

  • NatGateway: NAT gateway.

  • NetworkInterface: secondary elastic network interface.

  • RouterInterface: router interface.

  • IPv6Gateway: IPv6 gateway.

  • Attachment: transit router.

  • Ipv4Gateway: IPv4 gateway.

  • GatewayEndpoint: gateway endpoint.

  • Ecr: Express Connect Router.

Instance

MaxResult

integer

No

The number of entries to return per page during a paged query. Valid values: 1 to 100. Default value: 10.

10

NextToken

string

No

Specifies whether a next query token (Token) exists. Valid values:

  • You do not need to specify this parameter for the first query or if no next query exists.

  • If a next query exists, set the value to the NextToken value returned from the previous API call.

FFmyTO70tTpLG6I3FmYAXGKPd****

RegionId

string

Yes

The region ID of the route table to which the route entry belongs.

You can call the DescribeRegions operation to query the region ID.

cn-hangzhou

ServiceType

string

No

The type of route service. If this field is empty, it indicates that the route is not managed.

Valid value: TR, which indicates that the managed type is transit router.

TR

DestCidrBlockList

array

No

The list of destination CIDR blocks of route entries.

string

No

The destination CIDR block list information of route entries. A maximum of 20 destination CIDR blocks can be specified.

192.168.0.0/24

Response elements

Element

Type

Description

Example

object

The detailed information about route entries.

NextToken

string

Indicates whether a next query token (Token) exists. Valid values:

  • If NextToken is empty, no next query exists.

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

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The request ID.

14A07460-EBE7-47CA-9757-12CC4761D47A

RouteEntrys

object

RouteEntry

array<object>

The route entry information.

array<object>

The route entry information.

Status

string

The status of the route entry. Valid values:

  • Pending

  • Available

  • Modifying

  • Deleting

Available

Type

string

The route type. Valid values:

  • Custom: custom routes.

  • System: system routes.

  • BGP: BGP routes.

  • CEN: CEN routes.

  • ECR: ECR routes.

System

IpVersion

string

The IP version. Valid values: Valid values:

  • ipv4

  • ipv6

ipv4

Description

string

The description of the route.

RouteEntryDescription

RouteEntryName

string

The name of the route.

aaa

DestinationCidrBlock

string

The destination CIDR block of the route.

192.168.2.0/24

RouteEntryId

string

The ID of the route.

rte-bp1mnnr2al0naomnp****

RouteTableId

string

The ID of the route table.

vtb-bp15w5q90d2rk3bww****

GmtModified

string

The time when the route was modified. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

2022-05-09T03:00:07Z

NextHops

object

NextHop

array<object>

The information about the next hops.

array<object>

NextHopRegionId

string

The ID of the region where the next hop is deployed.

Note

This parameter is returned when the next hop type is set to RouterInterface.

cn-hangzhou

Weight

integer

The weight of the route.

Note

This parameter is returned when the next hop type is set to RouterInterface.

100

NextHopId

string

The ID of the next hop.

vpn-bp10zyaph5cc8b7c7****

Enabled

integer

Indicates whether the route is available. Valid values:

  • 0: unavailable

  • 1: available

Note

This parameter is returned when the next hop type is set to RouterInterface.

1

NextHopType

string

The next hop type. Valid values:

  • Instance: an ECS instance.

  • HaVip: an HaVip.

  • VpnGateway: a VPN gateway.

  • NatGateway: a NAT gateway.

  • NetworkInterface: a secondary ENI.

  • RouterInterface: a router interface.

  • IPv6Gateway: an IPv6 gateway.

  • Attachment: a transit router.

  • Ipv4Gateway: an IPv4 gateway.

  • GatewayEndpoint: a gateway endpoint.

  • CenBasic: CEN does not support transit routers.

  • Ecr: ECR.

Instance

NextHopRelatedInfo

object

The information about the next hop.

InstanceId

string

The ID of the instance that is associated with the next hop.

vpc-bp1t36rn9l53iwbsf****

InstanceType

string

The type of the instance associated with the next hop. Valid values:

  • VPC: a VPC

  • VBR: a VBR

  • PCONN: an Express Connect circuit

VPC

RegionId

string

The region ID of the instance associated with the next hop. Valid values:

ch-hangzhou

ServiceType

string

Indicates whether the route is hosted. If the parameter is empty, the route is not hosted.

If TR is returned, the route is hosted by a transit router.

TR

Origin

string

The route origin. Valid values:

  • RoutePropagation: The route is created by a dynamic propagation source.

  • SystemCreate: The route is created by the system.

  • CustomCreate: The route is created by a user.

RoutePropagation

Examples

Success response

JSON format

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
  "RouteEntrys": {
    "RouteEntry": [
      {
        "Status": "Available",
        "Type": "System",
        "IpVersion": "ipv4",
        "Description": "RouteEntryDescription",
        "RouteEntryName": "aaa",
        "DestinationCidrBlock": "192.168.2.0/24",
        "RouteEntryId": "rte-bp1mnnr2al0naomnp****",
        "RouteTableId": "vtb-bp15w5q90d2rk3bww****",
        "GmtModified": "2022-05-09T03:00:07Z",
        "NextHops": {
          "NextHop": [
            {
              "NextHopRegionId": "cn-hangzhou",
              "Weight": 100,
              "NextHopId": "vpn-bp10zyaph5cc8b7c7****",
              "Enabled": 1,
              "NextHopType": "Instance",
              "NextHopRelatedInfo": {
                "InstanceId": "vpc-bp1t36rn9l53iwbsf****",
                "InstanceType": "VPC",
                "RegionId": "ch-hangzhou"
              }
            }
          ]
        },
        "ServiceType": "TR",
        "Origin": "RoutePropagation"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalParam.NextToken User nextToken is illegal.
400 InvalidNextHop.NotFound The specified route entry nexthop does not exist in our records.
400 OperationFailed.QueryCenEntry Operation is denied because getting CEN route entry has failed. Operation is denied because getting CEN route entry has failed.
400 OperationDenied.UseGatewayRouteEntryQueryInterface Use listGatewayRouteTableEntries to describe gateway route entries.
400 InvalidRouteTable.NotFound The specified RouteTable was not found.
400 IllegalParam.RouteEntryType The parameter of RouteEntryType is illegal.
400 MissingParam.context The param of context is missing.
400 MissingParam.aliUid The param of aliUid is missing.
400 MissingParam.bid The param of bid is missing.
400 IllegalParam.IpVersion Param IpVersion illegal. Illegal parameter: IpVersion
400 OperationFailed.FilterParamUnderWrongRouteType Operation failed because only custom type support filter by routeEntryId or routeEntryName The operation failed because only custom routes support search by route ID or route name.
400 IllegalParam.NextTokenExpired The parameter of NextTokenExpired is illegal.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.