Query the custom route entries created in a route table.

Request parameters

Name Type Required Description
Action String Yes

The action to perform. Value:

DescribeRouteTables

RouterType String No

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

  • 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 No

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.
TotalCount String The number of queried entries.
PageNumber Integer Current page.
PageSize String The number of entries on the current page.
RouteTables List For more information, see RouteTableSetType.
Table 1. RouteTable
Name Type Description
RouterType String The type of the router to which the route table belongs.
  • VRouter: Virtual Private Cloud

  • VBR: Virtual border router

RouterId String The ID of the VRouter or VBR to which the route table belongs.
VRouterId String The ID of the VPC router.
RouteTableId String The ID of the route table.
RouteTableType String The type of route table.
CreationTime String The creation of the router table.
RouteEntrys JSON String More information on router number.
Table 2. Routeentry
Name Type Description
Type String Type of Route entry, value:
  • System: System router

  • Custom: Custom router

  • BGP BGP Router

RouteTableId String The ID of the router table to which the router numbers belongs.
Destinationcidrblock String The target network segment of the route entry.
NextHopType String The type of the next hop.
InstanceId String Instance ID of the next hop.
Status String Status of the route entry, value:
  • Pending: being configuring

  • Available: available

  • Modifying:modifying

RouterId String The ID of the VRouter or VBR to which the route table belongs.
NextHops List The next hop list of ECMP routes.
Table 3. NextHop
Name Type Description
NextHopType String

Type of next hop. Value:

  • Instance: ECS instance (default)

    HaVip: high available virtual IP

    RouterInterface: router interface

NextHopId String The ID of the next hop instance
Enabled Integer Enable next hop:
  • 0:unavailable

  • 1:available

Weight Integer The route weight of the next hop.

Examples

Request example

https://vpc.aliyuncs.com/?Action=DescribeRouteTables
&RouteTableId=vtb-2zevpmy9th8cxmwtarqg4
&CommonParameters
Return example
  • XML format

    <? XML version = "1.0" encoding = "UTF-8 "? >
    <DescribeRouteTablesResponse>
    	<PageNumber>1</PageNumber>
    	<TotalCount>1</TotalCount>
    	<PageSize>10</PageSize>
    	<RequestId> </RequestId>
    	<RouteTables>
    		<RouteTable>
    			<CreationTime>2017-08-22T10:40:25Z</CreationTime>
    			<RouteEntrys>
    			<Routeentry>
    					<NextHops></NextHops>
    					<Status>Available</Status>
    					<Type>Custom</Type>
    					<InstanceId>ri-2zeo3xzyf38r4urzdpvfs</InstanceId>
    					<NextHopType>RouterInterface</NextHopType>
    					<RouteTableId>vtb-2zevpmy9th8cxmwtarqg4</RouteTableId>
    					<DestinationCidrBlock>10.10.0.0/24</DestinationCidrBlock>
    					</Routeentry>
    				<RouteEntry>
    					<NextHops></NextHops>
    					<Status>Available</Status>
    					<Type>System</Type>
    					<Instanceid> </instanceid>
    					<NextHopType>service</NextHopType>
    					<RouteTableId>vtb-2zevpmy9th8cxmwtarqg4</RouteTableId>
    					<DestinationCidrBlock>100.64.0.0/10</DestinationCidrBlock>
    				</RouteEntry>
    			</RouteEntrys>
    			<RouteTableId>vtb-2zevpmy9th8cxmwtarqg4</RouteTableId>
    			<RouteTableType>System</RouteTableType>
    			<VRouterId>vrt-2zefso23vmu6xi3jeiw0z</VRouterId>
    		</RouteTable>
    	</RouteTables>
    </DescribeRouteTablesResponse>
  • JSON format

    {
        "PageNumber": 1, 
        "TotalCount": 1, 
        "PageSize": 10, 
        "RequestId": "DC668356-BCB4-42FD-9BC3-FA2B2E04B634", 
        "RouteTables": {
            "RouteTable": [
                {
                    "CreationTime": "2017-08-22T10:40:25Z", 
                    "RouteEntrys": {
                        "RouteEntry": [
                            {
                                "NextHops": {
                                    "NextHop": [ ]
                                }, 
                                "Status": "Available", 
                                "Type": "Custom", 
                                "InstanceId": "ri-2zeo3xzyf38r4urzdpvfs", 
                                "NextHopType": "RouterInterface", 
                                "RouteTableId": "vtb-2zevpmy9th8cxmwtarqg4", 
                                "DestinationCidrBlock": "10.10.0.0/24"
                            }, 
                            {
                                "NextHops": {
                                    "NextHop": [ ]
                                }, 
                                "Status": "Available", 
                                "Type": "System", 
                                "Instanceid ":"", 
                                "NextHopType": "service", 
                                "RouteTableId": "vtb-2zevpmy9th8cxmwtarqg4", 
                                "DestinationCidrBlock": "100.64.0.0/10"
                            }
                        ]
                    }, 
                    "RouteTableId": "vtb-2zevpmy9th8cxmwtarqg4", 
                    "RouteTableType": "System", 
                    "VRouterId": "vrt-2zefso23vmu6xi3jeiw0z"
                }
            ]
        }
    }