Queries the route entries in a gateway route table by calling the ListGatewayRouteTableEntries operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:ListGatewayRouteTableEntries |
list |
*RouteTable
|
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:
|
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:
|
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.
|
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 |
| 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 |
| Weight |
string |
The weight of the route. |
100 |
| Enabled |
string |
Indicates whether the route is available. Valid values:
|
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.