Queries the route entries in a route table of an Enterprise Edition transit router.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No ListTransitRouterRouteEntries

The operation that you want to perform. Set the value to ListTransitRouterRouteEntries.

TransitRouterRouteTableId String Yes vtb-bp1dudbh2d5na6b50****

The ID of the route table of the Enterprise Edition transit router.

MaxResults Integer No 4

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

TransitRouterRouteEntryDestinationCidrBlock String No 192.168.0.0/24

The destination CIDR block of the route entry.

TransitRouterRouteEntryStatus String No Active

The status of the route entry. Valid values: Valid values:

  • Creating: The route entry is being created.
  • Active: The route entry is active.
  • Deleting: The route entry is being deleted.
TransitRouterRouteEntryNames.N RepeatList No testname

The name of the route entry.

The name must be 1 to 128 characters in length, and can contain letters, digits, and the following special characters: , . ; / @ _ -. You can also leave the name empty.

You can query multiple route entries in each call. Maximum value of N: 20.

Note You can call this operation to query only static routes.
TransitRouterRouteEntryIds.N RepeatList No rte-oklkgwmj97z6dn****

The ID of the route entry.

You can query multiple route entries in each call. Maximum value of N: 20.

Note You can call this operation to query only static routes.
NextToken String No fce19****

The token for returning the next page when the data is returned in more than one page.

Response parameters

Parameter Type Example Description
MaxResults Integer 4

The number of entries returned per page.

NextToken String fce19****

The token for returning the next page when the data is returned in more than one page.

RequestId String C3835E5E-1504-4344-B1BB-98A4110F1079

The ID of the request.

TotalCount Integer 6

The total number of entries returned.

TransitRouterRouteEntries Array of TransitRouterRouteEntry

The list of route entries.

CreateTime String 2021-06-15T07:01Z

The time when the route entry was created.

The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.

Note This parameter is returned only for static routes.
TransitRouterRouteEntryDescription String testdesc

The description of the route entry.

Note This parameter is returned only for static routes.
TransitRouterRouteEntryDestinationCidrBlock String 172.16.0.0/16

The destination CIDR block of the route entry.

TransitRouterRouteEntryId String rte-oklkgwmj97z6dn****

The ID of the route entry.

Note This parameter is returned only for static routes.
TransitRouterRouteEntryName String test

The name of the route entry.

Note This parameter is returned only for static routes.
TransitRouterRouteEntryNextHopId String tr-attach-vx6iwhjr1x1j78****

The ID of the next hop.

TransitRouterRouteEntryNextHopType String BlackHole

The type of next hop. Valid values:

  • BlackHole: a null interface. Packets destined for the destination CIDR block of the route entry are dropped.
  • Attachment: a network instance connection. Packets destined for the destination CIDR block of the route entry are forwarded to the specified network instance connection.
TransitRouterRouteEntryStatus String Active

The status of the route entry. Valid values:

  • Creating: The route entry is being created.
  • Active: The route entry is active.
  • Deleting: The route entry is being deleted.
TransitRouterRouteEntryType String Propagated

The type of route entry. Valid values:

  • Static: a static route
  • Propagated: an automatically learned route

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTransitRouterRouteEntries
&TransitRouterRouteTableId=vtb-bp1dudbh2d5na6b50****
&<Common request parameters>

Sample success responses

XML format

<ListTransitRouterRouteEntriesResponse> 
  <TotalCount>6</TotalCount>
  <NextToken>fce19****</NextToken>
  <RequestId>C3835E5E-1504-4344-B1BB-98A4110F1079</RequestId>
  <MaxResults>4</MaxResults>
  <TransitRouterRouteEntries>
        <TransitRouterRouteEntryDestinationCidrBlock>10.0.1.0/24</TransitRouterRouteEntryDestinationCidrBlock>
        <TransitRouterRouteEntryNextHopId>tr-attach-vx6iwhjr1x1j78****</TransitRouterRouteEntryNextHopId>
        <TransitRouterRouteEntryType>Propagated</TransitRouterRouteEntryType>
        <TransitRouterRouteEntryNextHopType>Attachment</TransitRouterRouteEntryNextHopType>
        <TransitRouterRouteEntryStatus>Active</TransitRouterRouteEntryStatus>
  </TransitRouterRouteEntries>
  <TransitRouterRouteEntries>
        <TransitRouterRouteEntryDestinationCidrBlock>10.0.137.40/29</TransitRouterRouteEntryDestinationCidrBlock>
        <TransitRouterRouteEntryNextHopId>tr-attach-vx6iwhjr1x1j78****</TransitRouterRouteEntryNextHopId>
        <TransitRouterRouteEntryType>Propagated</TransitRouterRouteEntryType>
        <TransitRouterRouteEntryNextHopType>Attachment</TransitRouterRouteEntryNextHopType>
        <TransitRouterRouteEntryStatus>Active</TransitRouterRouteEntryStatus>
  </TransitRouterRouteEntries>
  <TransitRouterRouteEntries>
        <TransitRouterRouteEntryDestinationCidrBlock>10.0.2.0/24</TransitRouterRouteEntryDestinationCidrBlock>
        <TransitRouterRouteEntryNextHopId>tr-attach-vx6iwhjr1x1j78****</TransitRouterRouteEntryNextHopId>
        <TransitRouterRouteEntryType>Propagated</TransitRouterRouteEntryType>
        <TransitRouterRouteEntryNextHopType>Attachment</TransitRouterRouteEntryNextHopType>
        <TransitRouterRouteEntryStatus>Active</TransitRouterRouteEntryStatus>
  </TransitRouterRouteEntries>
  <TransitRouterRouteEntries>
        <TransitRouterRouteEntryDestinationCidrBlock>172.16.0.0/16</TransitRouterRouteEntryDestinationCidrBlock>
        <TransitRouterRouteEntryNextHopId></TransitRouterRouteEntryNextHopId>
        <TransitRouterRouteEntryType>Static</TransitRouterRouteEntryType>
        <CreateTime>2021-06-15T07:01Z</CreateTime>
        <TransitRouterRouteEntryNextHopType>BlackHole</TransitRouterRouteEntryNextHopType>
        <TransitRouterRouteEntryName>test</TransitRouterRouteEntryName>
        <TransitRouterRouteEntryId>rte-oklkgwmj97z6dn****</TransitRouterRouteEntryId>
        <TransitRouterRouteEntryStatus>Active</TransitRouterRouteEntryStatus>
  </TransitRouterRouteEntries>
</ListTransitRouterRouteEntriesResponse>

JSON format

{
  "TotalCount": 6,
  "NextToken": "fce19****",
  "RequestId": "C3835E5E-1504-4344-B1BB-98A4110F1079",
  "MaxResults": 4,
  "TransitRouterRouteEntries": [
    {
      "TransitRouterRouteEntryDestinationCidrBlock": "10.0.1.0/24",
      "TransitRouterRouteEntryNextHopId": "tr-attach-vx6iwhjr1x1j78****",
      "TransitRouterRouteEntryType": "Propagated",
      "TransitRouterRouteEntryNextHopType": "Attachment",
      "TransitRouterRouteEntryStatus": "Active"
    },
    {
      "TransitRouterRouteEntryDestinationCidrBlock": "10.0.137.40/29",
      "TransitRouterRouteEntryNextHopId": "tr-attach-vx6iwhjr1x1j78****",
      "TransitRouterRouteEntryType": "Propagated",
      "TransitRouterRouteEntryNextHopType": "Attachment",
      "TransitRouterRouteEntryStatus": "Active"
    },
    {
      "TransitRouterRouteEntryDestinationCidrBlock": "10.0.2.0/24",
      "TransitRouterRouteEntryNextHopId": "tr-attach-vx6iwhjr1x1j78****",
      "TransitRouterRouteEntryType": "Propagated",
      "TransitRouterRouteEntryNextHopType": "Attachment",
      "TransitRouterRouteEntryStatus": "Active"
    },
    {
      "TransitRouterRouteEntryDestinationCidrBlock": "172.16.0.0/16",
      "TransitRouterRouteEntryNextHopId": "",
      "TransitRouterRouteEntryType": "Static",
      "CreateTime": "2021-06-15T07:01Z",
      "TransitRouterRouteEntryNextHopType": "BlackHole",
      "TransitRouterRouteEntryName": "test",
      "TransitRouterRouteEntryId": "rte-oklkgwmj97z6dn****",
      "TransitRouterRouteEntryStatus": "Active"
    }
  ]
}

Error codes

HttpCode Error code Error message Description
400 InvalidTransitRouterRouteTableId.NotFound TransitRouterRouteTableId is not found. The error message returned because the specified route table ID of the transit router does not exist.

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