Queries one or more route entries in a route table.

Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String Yes DescribeRouteEntryList

The name of this action. Value: DescribeRouteEntryList

RegionId String Yes cn-hangzhou

The region ID of the route table to which the route entry belongs. To query the region ID, call DescribeRegions.

RouteTableId String Yes vtb-bp1r9pvl4xen8s9ju****

The ID of the route table.

DestinationCidrBlock String No 192.168.2.0/24

The destination CIDR block of the route entry. IPv4 and IPv6 CIDR blocks are supported.

Note Only the China site supports IPv6 CIDR blocks.
IpVersion String No IPv4

The version of the IP protocol. Valid values:

  • IPv4: IPv4 protocol
  • IPv6: IPv6 protocol
Note Only the China site supports the IPv6 protocol.
MaxResult Integer No 50

The number of entries per page in the case of a paged query result. Value range: 20 to 100. Default value: 50

NextHopId String No vpn-bp10zyaph5cc8b7c7****

The instance ID of the next hop.

NextHopType String No Instance

The type of the next hop. Valid values:

  • Instance: ECS instance
  • HaVip: High-Availability Virtual IP Address (HaVip)
  • VpnGateway: VPN Gateway
  • NatGateway: NAT Gateway
  • NetworkInterface: Secondary Elastic Network Interface
  • RouterInterface: Router interface
  • IPv6Gateway: IPv6 Gateway
Note Only the China site supports IPv6 Gateways as next hops.
NextToken String No caeba0bbb2be03f84eb48b699f0a4883

The token for the next query.

RouteEntryId String No rte-bp1mnnr2al0naomnp****

The ID of the route entry to be queried.

RouteEntryName String No abc

The name of the route entry.

RouteEntryType String No System

The type of the route entry. Valid values:

  • Custom: Custom route entry
  • System: System route entry

Response parameters

Parameter Type Example value Description
NextToken String caeba0bbb2be03f84eb48b699f0a4883

The token for the next query.

RequestId String 14A07460-EBE7-47CA-9757-12CC4761D47A

The ID of the request.

RouteEntrys Array

The details of route entries.

RouteEntry

The details of the route entry.

DestinationCidrBlock String 10.0.0.0/24

The destination CIDR block of the route entry.

IpVersion String IPv4

The version of the IP protocol.

  • IPv4: IPv4 protocol
  • IPv6: IPv6 protocol
NextHops Array

The details of the next hops.

NextHop

The details of the next hop.

Enabled Integer 0

Indicates whether the route is available.

  • 0: Unavailable
  • 1: Available
NextHopId String vpn-bp10zyaph5cc8b7c7****

The instance ID of the next hop.

NextHopRegionId String cn-hangzhou

The region ID of the next hop instance.

NextHopRelatedInfo

The association information of the next hop.

InstanceId String vpc-bp1t36rn9l53iwbsf****

The ID of the instance associated with the next hop.

InstanceType String VPC

The type of the instance associated with the next hop.

  • VPC: Virtual Private Cloud (VPC)
  • VBR: Virtual Border Router (VBR)
RegionId String ch-hangzhou

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

NextHopType String Instance

The type of the next hop.

  • Instance: ECS instance
  • HaVip: High-Availability Virtual IP Address (HaVip)
  • VpnGateway: VPN Gateway
  • NatGateway: NAT Gateway
  • NetworkInterface: Secondary Elastic Network Interface
  • RouterInterface: Router interface
  • IPv6Gateway: IPv6 Gateway
Note Only the China site supports IPv6 Gateways as next hops.
Weight Integer 100

The weight of the route entry.

RouteEntryId String rte-bp1mnnr2al0naomnp****

The ID of the route entry.

RouteEntryName String aaa

The name of the route entry.

RouteTableId String vtb-bp15w5q90d2rk3bww****

The ID of the route table.

Status String Available

The status of the route entry.

  • Pending: The route entry is being configured.
  • Available: The route entry is available.
  • Modifying: The route entry is being modified.
Type String Custom

The type of the route entry.

  • Custom: Custom route entry
  • System: System route entry

Examples

Request example


http(s)://vpc.aliyuncs.com/? Action=DescribeRouteEntryList
&RegionId=cn-hangzhou
&RouteTableId=vtb-bp1r9pvl4xen8s9ju****
&<CommonParameters>

Response example

XML format

<DescribeRouteEntryListResponse>
	  <NextToken></NextToken>
	  <RouteEntrys>
		    <RouteEntry>
			      <NextHops>
				        <NextHop>
					          <NextHopId>eni-bp16v0fuhulfl5e1****</NextHopId>
					          <NextHopRelatedInfo></NextHopRelatedInfo>
					          <NextHopType>NetworkInterface</NextHopType>
				        </NextHop>
			      </NextHops>
			      <Status>Available</Status>
			      <RouteEntryName>ENI</RouteEntryName>
			      <RouteEntryId>rte-bp1aejenqyg5zcmv4****</RouteEntryId>
			      <Type>Custom</Type>
			      <IpVersion>ipv4</IpVersion>
			      <RouteTableId>vtb-bp15w5q90d2rk3bww****</RouteTableId>
			      <DestinationCidrBlock>103.0.0.0/32</DestinationCidrBlock>
		    </RouteEntry>
	  </RouteEntrys>
	  <RequestId>57828ADD-F0C4-4125-AF79-6556D44C5277</RequestId>
</DescribeRouteEntryListResponse>

JSON format

{
	"NextToken":"",
	"RouteEntrys":{
		"RouteEntry":[
			{
				"Status":"Available",
				"NextHops":{
					"NextHop":[
						{
							"NextHopId":"eni-bp16v0fuhulfl5e1****",
							"NextHopRelatedInfo":{},
							"NextHopType":"NetworkInterface"
						}
					]
				},
				"RouteEntryName":"ENI",
				"Type":"Custom",
				"RouteEntryId":"rte-bp1aejenqyg5zcmv4****",
				"IpVersion":"ipv4",
				"RouteTableId":"vtb-bp15w5q90d2rk3bww****",
				"DestinationCidrBlock":"103.0.0.0/32"
			}
		]
	},
	"RequestId":"57828ADD-F0C4-4125-AF79-6556D44C5277"
}

Errors

For a list of error codes, visit the API Error Center.