ListGatewayRouteTableEntries

更新时间:
复制 MD 格式

Queries the route entries in a gateway route table by calling the ListGatewayRouteTableEntries operation.

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

list

*RouteTable

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

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

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

ap-southeast-6

MaxResults

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. Valid values:

  • If this is the first query or no subsequent query exists, leave this parameter empty.

  • If a subsequent query exists, set this parameter to the NextToken value returned in the previous API call.

FFmyTO70tTpLG6I3FmYAXGKPd****

GatewayRouteTableId

string

Yes

The ID of the gateway route table to query.

vtb-5ts0ohchwkp3dydt2****

DestinationCidrBlock

string

No

The destination CIDR block of the route entry in the gateway route table that you want to query.

192.168.0.5

RegionId

string

Yes

要查询网关路由表列表信息的地域 ID。

您可以通过调用 DescribeRegions 接口获取地域 ID。

ap-southeast-6

Response elements

Element

Type

Description

Example

object

The gateway route table information.

NextToken

string

The pagination token. Valid values:

  • If NextToken is empty, no subsequent query exists.

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

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The request ID.

0ED8D006-F706-4D23-88ED-E11ED28DCAC0

TotalCount

string

The total number of entries returned.

1

GatewayRouteEntryModels

array<object>

The details of route entries in the gateway route table.

array<object>

The details of route entries in the gateway route table.

Status

string

The status of the route entry.

  • Pending: being configured.

  • Available: available.

  • Modifying: being modified.

Available

NextHopId

string

The instance ID of the next hop.

i-bp11gcl0sm85t9bi****

Description

string

The description of the route entry.

test

NextHopType

string

The next hop type. Valid values:

  • EcsInstance: ECS instance.

  • NetworkInterface: elastic network interfaces (ENIs).

  • Local: local.

EcsInstance

DestinationCidrBlock

string

The destination CIDR block of the route entry.

192.168.0.5

Name

string

The name of the route entry.

The name must be 2 to 128 characters in length and must start with a letter or a Chinese character. It can contain digits, periods (.), underscores (_), and hyphens (-).

name

NextHops

array<object>

The next hop information.

object

NextHopId

string

The ID of the next hop.

vpn-bp10zyaph5cc8b7c7****

NextHopType

string

The type of the next hop. Valid values:

  • Instance (default): an ECS instance

  • HaVip: a high-availability virtual IP address (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

Instance

Weight

string

The weight of the route.

100

Enabled

string

Indicates whether the route is available. Valid values:

  • 0: unavailable

  • 1: available

1

Examples

Success response

JSON format

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
  "TotalCount": "1",
  "GatewayRouteEntryModels": [
    {
      "Status": "Available",
      "NextHopId": "i-bp11gcl0sm85t9bi****",
      "Description": "test",
      "NextHopType": "EcsInstance",
      "DestinationCidrBlock": "192.168.0.5",
      "Name": "name",
      "NextHops": [
        {
          "NextHopId": "vpn-bp10zyaph5cc8b7c7****",
          "NextHopType": "Instance",
          "Weight": "100",
          "Enabled": "1"
        }
      ]
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 ResourceNotFound.GatewayRouteTable The specified resource GatewayRouteTable is not found. The gateway route table cannot be found.
400 IllegalParam.NextToken The param of nextToken is illegal

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.