All Products
Search
Document Center

Virtual Private Cloud:DescribeRouteEntryList

Last Updated:Sep 15, 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. Both 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 route. Valid values:

  • Custom: custom route.

  • System: system route.

  • 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 controller (NIC).

  • 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 subsequent request exists, set the value to the NextToken value that is returned from the last call.

FFmyTO70tTpLG6I3FmYAXGKPd****

ServiceType

string

No

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.

TR

DestCidrBlockList

array

No

The list of destination CIDR blocks of routes.

string

No

The list of destination CIDR blocks of routes. You can specify up to 20 destination CIDR blocks.

192.168.0.0/24

Response elements

Element

Type

Description

Example

object

The detailed information about routes.

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 subsequent 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

TotalCount

integer

RouteEntrys

object

RouteEntry

array<object>

The route information.

array<object>

The route information.

Status

string

The status of the route. Valid values:

  • Pending: Being configured.

  • Available: Available.

  • Modifying: Being modified.

  • Deleting: Being deleted.

Available

Type

string

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 (ECR) route.

System

IpVersion

string

The version of the IP protocol. Valid values:

  • ipv4: IPv4.

  • ipv6: 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 route table ID.

vtb-bp15w5q90d2rk3bww****

GmtModified

string

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

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.

Note

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

100

NextHopId

string

The instance ID of the next hop.

vpn-bp10zyaph5cc8b7c7****

Enabled

integer

Indicates whether the route is available. Valid values:

  • 0: Not available.

  • 1: Available.

Note

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

1

NextHopType

string

The next hop type. Valid values:

  • Instance: ECS instance.

  • HaVip: high-availability virtual IP address.

  • VpnGateway: VPN gateway.

  • NatGateway: NAT gateway.

  • NetworkInterface: secondary elastic network interface controller (NIC).

  • RouterInterface: vRouter interface.

  • IPv6Gateway: IPv6 gateway.

  • Attachment: transit router.

  • Ipv4Gateway: IPv4 gateway.

  • GatewayEndpoint: gateway endpoint.

  • Ecr: Express Connect Router (ECR).

Instance

NextHopRelatedInfo

object

The information about the next hop.

InstanceId

string

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

vpc-bp1t36rn9l53iwbsf****

InstanceType

string

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

  • VPC: virtual private cloud (VPC).

  • VBR: Virtual Border Router.

  • PCONN: Express Connect circuit.

VPC

RegionId

string

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

ch-hangzhou

ServiceType

string

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.

TR

Origin

string

The origin of the route. Valid values:

  • RoutePropagation: Created by automatic propagation.

  • SystemCreate: Created by the system.

  • CustomCreate: Created by a user.

RoutePropagation

Examples

Success response

JSON format

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
  "TotalCount": 0,
  "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 route table instance does not exist.
400 IllegalParam.RouteEntryType The parameter of RouteEntryType is illegal. The specified route entry type is invalid.
400 MissingParam.context The param of context is missing. The required parameter context is missing.
400 MissingParam.aliUid The param of aliUid is missing.
400 MissingParam.bid The param of bid is missing. The required parameter 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. The NextToken parameter is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.