Queries route entries of a gateway route table.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListGatewayRouteTableEntries | The operation that you want to perform. Set the value to ListGatewayRouteTableEntries. |
RegionId | String | Yes | ap-southeast-6 | The region ID of the gateway route table. You can call the DescribeRegions operation to query the most recent region list. |
MaxResults | Integer | No | 10 | The number of entries to return on each page. Valid values: 1 to 100. Default value: 10. |
NextToken | String | No | FFmyTO70tTpLG6I3FmYAXGKPd**** | The token that determines the start point of the query. Valid values:
|
GatewayRouteTableId | String | Yes | vtb-5ts0ohchwkp3dydt2**** | The ID of the gateway route table that you want to query. |
DestinationCidrBlock | String | No | 192.168.0.5 | The destination CIDR block of the route in the gateway route table. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
NextToken | String | FFmyTO70tTpLG6I3FmYAXGKPd**** | The token that determines the start point of the query. Valid values:
|
RequestId | String | 0ED8D006-F706-4D23-88ED-E11ED28DCAC0 | The request ID. |
TotalCount | String | 1 | The total number of entries returned. |
GatewayRouteEntryModels | Array of GatewayRouteEntryModels | The details of the routes in the gateway route table. | |
Status | String | Available | The status of the route. Valid values:
|
NextHopId | String | i-bp11gcl0sm85t9bi**** | The ID of the next hop. |
Description | String | test | The name of the route. |
NextHopType | String | EcsInstance | The type of the next hop. Valid values:
|
DestinationCidrBlock | String | 192.168.0.5 | The destination CIDR block of the route. |
Name | String | name | The name of the route. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. |
NextHops | Array of NextHop | The information about the next hop. |
|
NextHopId | String | vpn-bp10zyaph5cc8b7c7**** | The ID of the next hop. |
NextHopType | String | Instance | The type of the next hop. Valid values:
|
Weight | String | 100 | The weight of the route. |
Enabled | String | 1 | Indicates whether the route is available. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListGatewayRouteTableEntries
&RegionId=ap-southeast-6
&MaxResults=10
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&GatewayRouteTableId=vtb-5ts0ohchwkp3dydt2****
&DestinationCidrBlock=192.168.0.5
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListGatewayRouteTableEntriesResponse>
<NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
<RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
<TotalCount>1</TotalCount>
<GatewayRouteEntryModels>
<Status>Available</Status>
<NextHopId>i-bp11gcl0sm85t9bi****</NextHopId>
<Description>test</Description>
<NextHopType>EcsInstance</NextHopType>
<DestinationCidrBlock>192.168.0.5</DestinationCidrBlock>
<Name>name</Name>
</GatewayRouteEntryModels>
</ListGatewayRouteTableEntriesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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"
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | ResourceNotFound.GatewayRouteTable | The specified resource GatewayRouteTable is not found. | The error message returned because the specified gateway route table cannot be found. |
For a list of error codes, visit the API Error Center.