All Products
Search
Document Center

Virtual Private Cloud:DescribeRouteEntryList

Last Updated:Jul 13, 2026

Queries a list of routes.

Operation description

Before you call DeleteRouteEntry to delete a route, you can call this operation to query the next hop information of the route that you want to delete.

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 belongs.

You can call DescribeRegions to query the most recent region list.

cn-hangzhou

RouteTableId

string

Yes

The ID of the route table that you want to query.

vtb-bp1r9pvl4xen8s9ju****

RouteEntryId

string

No

The ID of the route that you want to query.

rte-bp1mnnr2al0naomnp****

DestinationCidrBlock

string

No

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

192.168.2.0/24

RouteEntryName

string

No

The name of the route.

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.

  • ipv6: IPv6.

ipv4

RouteEntryType

string

No

The type of the routing entry. Valid values:

  • Custom: custom route entry.

  • System: system route entry.

  • BGP: BGP route.

  • CEN: Cloud Enterprise Network (CEN) route.

  • ECR: Express Connect Router (ECR) route.

System

NextHopId

string

No

The instance ID of the next hop.

vpn-bp10zyaph5cc8b7c7****

NextHopType

string

No

The next hop type. Valid values:

  • Instance (default): ECS instance.

  • HaVip: high-availability virtual IP address.

  • VpnGateway: VPN gateway.

  • NatGateway: NAT gateway.

  • NetworkInterface: secondary elastic network interface (ENI).

  • RouterInterface: vRouter interface.

  • IPv6Gateway: IPv6 gateway.

  • Attachment: transit router.

  • Ipv4Gateway: IPv4 gateway.

  • GatewayEndpoint: gateway endpoint.

  • Ecr: Express Connect Router (ECR).

Instance

MaxResult

integer

No

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

10

NextToken

string

No

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

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

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

FFmyTO70tTpLG6I3FmYAXGKPd****

RegionId

string

Yes

The type of route hosting. If this field is empty, the route is not hosted.

Valid values: TR, which indicates that the hosting type is transit router.

cn-hangzhou

ServiceType

string

No

The list of destination CIDR blocks of routes.

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 route details.

NextToken

string

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next request exists.

  • If NextToken is returned, 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 information.

array<object>

The route information.

Status

string

The status of the route entry. Valid values:

  • Pending: being configured.

  • Available: available.

  • Modifying: being modified.

  • Deleting: being deleted.

Available

Type

string

The type of the route entry. Valid values:

  • Custom: custom route.

  • System: system route.

  • BGP: BGP route.

  • CEN: Cloud Enterprise Network (CEN) route.

  • ECR: Express Connect Router route.

System

IpVersion

string

The version of the IP protocol. Valid values:

  • ipv4: IPv4 protocol.

  • ipv6: IPv6 protocol.

ipv4

Description

string

The description of the route entry.

RouteEntryDescription

RouteEntryName

string

The name of the route entry.

aaa

DestinationCidrBlock

string

The destination CIDR block of the route entry.

192.168.2.0/24

RouteEntryId

string

The ID of the route entry.

rte-bp1mnnr2al0naomnp****

RouteTableId

string

The route table ID.

vtb-bp15w5q90d2rk3bww****

GmtModified

string

The time when the route entry was modified. The time is in UTC and displayed in the format of YYYY-MM-DDThh:mm:ssZ.

2022-05-09T03:00:07Z

NextHops

object

NextHop

array<object>

The next hop information.

array<object>

The next hop information.

NextHopRegionId

string

The region ID of the next hop instance.

Note

This parameter is returned only when the next hop type is RouterInterface.

cn-hangzhou

Weight

integer

The weight of the route entry.

Note

This parameter is returned only when the next hop type is RouterInterface.

100

NextHopId

string

The ID of the next hop instance.

vpn-bp10zyaph5cc8b7c7****

Enabled

integer

Indicates whether the route is available. Valid values:

  • 0: unavailable.

  • 1: available.

Note

This parameter is returned only when the next hop type is RouterInterface.

1

NextHopType

string

The type of the next hop. Valid values:

  • Instance: 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

NextHopRelatedInfo

object

The information related to the next hop.

InstanceId

string

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

vpc-bp1t36rn9l53iwbsf****

InstanceType

string

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

  • VPC: virtual private cloud.

  • VBR: virtual border router.

  • PCONN: physical connection.

VPC

RegionId

string

The region ID of the instance associated with the next hop.

ch-hangzhou

ServiceType

string

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

Origin

string

The origin of the route. Valid values:

  • RoutePropagation: created by dynamic route propagation.

  • SystemCreate: created by the system.

  • CustomCreate: custom created.

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. To query route entries in a gateway route table, use the listGatewayRouteTableEntries operation.
400 InvalidRouteTable.NotFound The specified RouteTable was not found. The specified route table was not found.
400 IllegalParam.RouteEntryType The parameter of RouteEntryType is illegal. The RouteEntryType parameter is invalid.
400 MissingParam.context The param of context is missing. The context parameter is missing.
400 MissingParam.aliUid The param of aliUid is missing.
400 MissingParam.bid The param of bid is missing. The bid parameter 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. The NextTokenExpired parameter is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.