edit-icon download-icon

DescribeRouteTables

Last Updated: Apr 09, 2018

Description

Query the custom route entries created in a route table.

Request parameters

Name Type Required Description
Action String Yes

The action to perform.

Valid value: DescribeRouteTables

RouterType String No

The type of the router to which the route table belongs.

  • VRouter: Virtual Private Cloud
  • VBR: Virtual border router
RouterId String No The ID of the VRouter or VBR to which the route table belongs.
VRouterId String Yes

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

The value of the RouterType parameter is set to VRouter automatically when this parameter is specified.

RouteTableId String No The ID of the route table.
PageNumber Integer No The number of pages to return. The default value is 1.
PageSize Integer No The number of rows per page. The maximum value is 50 and the default value is 10.

Response parameters

Name Type Description
RequestId String The ID of the request.
RouteTables JSON string

The detailed information of the route table.

For more information, see RouteTableSetType.

TotalCount Integer The number of queried entries.
PageNumber Integer The current page number.
PageSize Integer The number of entries on the current page.

Error codes

See VPC API Error Center.

Examples

Request example

  1. https://vpc.aliyuncs.com/?Action=DescribeRouteTables
  2. &VRouterId=vrt-25u5f8u2q
  3. &<CommonParameters>

Response example

XML format

  1. <DescribeRouteTablesResponse>
  2. <RequestId>913F8774-681A-4857-95D8-ACBAF044D453</RequestId>
  3. <RouteTables>
  4. <RouteTableId>routetable01</RouteTableId>
  5. <RouteEntrys>
  6. <RouteEntry>
  7. <DestinationCidrBlock>192.168.10.1/32</DestinationCidrBlock>
  8. <Type>Custom</Type>
  9. <InstanceId> i-25skktcp4</InstanceId>
  10. <Status>Available</Status>
  11. <RouteTableId> vtb-25vtxl5ct</RouteTableId>
  12. </RouteEntry>
  13. <RouteEntry>
  14. <DestinationCidrBlock>192.168.1.0/24</DestinationCidrBlock>
  15. <InstanceId></InstanceId>
  16. <RouteTableId>vtb-25vtxl5ct</RouteTableId>
  17. <Status>Available</Status>
  18. <Type>System</Type>
  19. </RouteEntry>
  20. <RouteEntry>
  21. <DestinationCidrBlock>100.64.0.0/10</DestinationCidrBlock>
  22. <InstanceId></InstanceId>
  23. <RouteTableId>vtb-25vtxl5ct</RouteTableId>
  24. <Status>Available</Status>
  25. <Type>System</Type>
  26. </RouteEntry>
  27. <RouteEntry>
  28. <DestinationCidrBlock>10.0.0.0/8</DestinationCidrBlock>
  29. <InstanceId></InstanceId>
  30. <RouteTableId>vtb-25vtxl5ct</RouteTableId>
  31. <Status>Available</Status>
  32. <Type>System</Type>
  33. </RouteEntry>
  34. </RouteEntrys>
  35. <RouteTableId> vtb-25vtxl5ct</RouteTableId>
  36. <RouteTableType>System</RouteTableType>
  37. <VRouterId>vrt-25u5f8u2q</VRouterId>
  38. <CreationTime> 2014-09-11T04:52:53Z </CreationTime>
  39. </RouteTables>
  40. </DescribeRouteTablesResponse>

JSON format

  1. {
  2. "PageNumber": 1,
  3. "PageSize": 10,
  4. "RequestId": "913F8774-681A-4857-95D8-ACBAF044D453",
  5. "RouteTables": {
  6. "RouteTable": [
  7. {
  8. "CreationTime": "2014-09-11T04:52:53Z",
  9. "RouteEntrys": {
  10. "RouteEntry": [
  11. {
  12. "DestinationCidrBlock": "192.168.10.1/32",
  13. "InstanceId": "i-25skktcp4",
  14. "RouteTableId": "vtb-25vtxl5ct",
  15. "Status": "Available",
  16. "Type": "Custom"
  17. },
  18. {
  19. "DestinationCidrBlock": "192.168.1.0/24",
  20. "InstanceId": "",
  21. "RouteTableId": "vtb-25vtxl5ct",
  22. "Status": "Available",
  23. "Type": "System"
  24. },
  25. {
  26. "DestinationCidrBlock": "100.64.0.0/10",
  27. "InstanceId": "",
  28. "RouteTableId": "vtb-25vtxl5ct",
  29. "Status": "Available",
  30. "Type": "System"
  31. },
  32. {
  33. "DestinationCidrBlock": "10.0.0.0/8",
  34. "InstanceId": "",
  35. "RouteTableId": "vtb-25vtxl5ct",
  36. "Status": "Available",
  37. "Type": "System"
  38. }
  39. ]
  40. },
  41. "RouteTableId": "vtb-25vtxl5ct",
  42. "RouteTableType": "System",
  43. "VRouterId": "vrt-25u5f8u2q"
  44. }
  45. ]
  46. },
  47. "TotalCount": 1
  48. }
Thank you! We've received your feedback.