All Products
Search
Document Center

Elastic Compute Service:DescribeRouteTables

Last Updated:Jun 18, 2026

Note

This API has been deprecated. We recommend migrating to Vpc(2016-04-28) - DescribeRouteTableList for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.

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:DescribeRouteTables

get

*RouteTable

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

  • vpc:VBR
  • vpc:VRouter
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

VRouterId

string

No

RouteTableId

string

No

RouterType

string

No

RouterId

string

No

RouteTableName

string

No

PageNumber

integer

No

PageSize

integer

No

Response elements

Element

Type

Description

Example

object

PageSize

integer

RequestId

string

PageNumber

integer

TotalCount

integer

RouteTables

object

RouteTable

array<object>

array<object>

CreationTime

string

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

VRouterId

string

The ID of the VRouter that the route table belongs to.

RouteTableId

string

The ID of the route table.

ResourceGroupId

string

The ID of the resource group that the route table belongs to.

RouteTableType

string

The type of the route table. Valid values:

  • System

  • Custom

RouteEntrys

object

A container for the list of route entries.

RouteEntry

array<object>

A list of route entries.

array<object>

Type

string

The type of the route entry. Valid values:

  • System: A route entry automatically created by the system.

  • Custom: A route entry created by a user.

  • BGP: A route entry propagated from a BGP-enabled device.

Status

string

The status of the route entry. Valid values:

  • Pending

  • Available

  • Modifying

NextHopType

string

The type of the next hop. Valid values:

  • Instance: An ECS instance.

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

  • VpnGateway: A VPN gateway.

  • NatGateway: A NAT gateway.

  • NetworkInterface: An elastic network interface (ENI).

  • RouterInterface: A router interface.

  • IPv6Gateway: An IPv6 gateway.

  • Attachment: A transit router attachment.

DestinationCidrBlock

string

The destination CIDR block of the route entry.

InstanceId

string

The ID of the instance that serves as the next hop.

Note

This parameter is returned only when NextHopType is set to Instance.

RouteTableId

string

The ID of the route table that the route entry belongs to.

NextHops

object

Details of the next hops for an ECMP route.

NextHop

array<object>

A list of next hops.

object

Weight

integer

The weight of the next hop. A larger value indicates a higher priority.

Note

This parameter is returned only for ECMP routes. Valid values: 0 to 100.

NextHopId

string

The ID of the next hop.

NextHopType

string

The type of the next hop. Valid values:

  • Instance

  • HaVip

  • VpnGateway

  • NatGateway

  • NetworkInterface

  • RouterInterface

  • IPv6Gateway

  • Attachment

Enabled

integer

Whether the next hop of the ECMP route is enabled. Valid values:

  • 1: Enabled.

  • 0: Disabled.

Examples

Success response

JSON format

{
  "PageSize": 0,
  "RequestId": "",
  "PageNumber": 0,
  "TotalCount": 0,
  "RouteTables": {
    "RouteTable": [
      {
        "CreationTime": "",
        "VRouterId": "",
        "RouteTableId": "",
        "ResourceGroupId": "",
        "RouteTableType": "",
        "RouteEntrys": {
          "RouteEntry": [
            {
              "Type": "",
              "Status": "",
              "NextHopType": "",
              "DestinationCidrBlock": "",
              "InstanceId": "",
              "RouteTableId": "",
              "NextHops": {
                "NextHop": [
                  {
                    "Weight": 0,
                    "NextHopId": "",
                    "NextHopType": "",
                    "Enabled": 0
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.