Queries the transit routers of a Cloud Enterprise Network (CEN) instance.

Description

You can specify the RegionId and TransitRouterId parameters based on your requirements.

  • If you do not specify RegionId or TransitRouterId, the system queries all transit routers of the specified CEN instance.
  • If you specify only RegionId, the system queries transit routers that are deployed in the specified region.
  • If you specify only TransitRouterId, the system queries the specified transit router.
  • If you specify RegionId and TransitRouterId, the system queries the specified transit router in the specified region.

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 ListTransitRouters

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

CenId String Yes cen-j3jzhw1zpau2km****

The ID of the CEN instance.

PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

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

TransitRouterId String No tr-uf654ttymmljlvh2x****

The ID of the transit router.

RegionId String No cn-shanghai

The ID of the region where the transit router is deployed.

You can call the DescribeRegions operation to query region IDs.

Response parameters

Parameter Type Example Description
PageNumber Integer 1

The number of the returned page.

PageSize Integer 10

The number of entries returned per page.

RequestId String 68521297-5FA6-46CB-B4EB-658F1C68C8CC

The ID of the request.

TotalCount Integer 2

The total number of entries returned.

TransitRouters Array of TransitRouter

The list of transit routers.

AliUid Long 1688111111111111

The UID of the account to which the CEN instance belongs.

CenId String cen-j3jzhw1zpau2km****

The ID of the CEN instance.

CreationTime String 2021-03-15T09:39Z

The time when the transit router was created.

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

RegionId String cn-qingdao

The ID of the region where the transit router is deployed.

Status String Active

The state of the transit router. Valid values:

  • Creating: The transit router is being created.
  • Active: The transit router runs as expected.
  • Deleting: The transit router is being deleted.
  • Deleted: The transit router is deleted.
  • Upgrading: The transit router is being modified.
TransitRouterDescription String testdesc

The description of the transit router.

TransitRouterId String tr-bp1su1ytdxtataupl****

The ID of the transit router.

TransitRouterName String testname

The name of the transit router.

Type String Enterprise

The edition of the transit router. Valid values:

  • Enterprise
  • Basic

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTransitRouters
&CenId=cen-j3jzhw1zpau2km****
&<Common request parameters>

Sample success responses

XML format

<ListTransitRoutersResponse>
  <TotalCount>2</TotalCount>
  <RequestId>68521297-5FA6-46CB-B4EB-658F1C68C8CC</RequestId>
  <PageSize>10</PageSize>
  <PageNumber>1</PageNumber>
  <TransitRouters>
        <Status>Active</Status>
        <Type>Enterprise</Type>
        <CenId>cen-j3jzhw1zpau2km****</CenId>
        <CreationTime>2021-03-15T09:39Z</CreationTime>
        <TransitRouterName>zxtest</TransitRouterName>
        <RegionId>cn-hangzhou</RegionId>
        <TransitRouterId>tr-bp1su1ytdxtataupl****</TransitRouterId>
        <AliUid>1688111111111111</AliUid>
  </TransitRouters>
  <TransitRouters>
        <Status>Active</Status>
        <Type>Basic</Type>
        <CenId>cen-j3jzhw1zpau2km****</CenId>
        <CreationTime>2021-03-22T02:11Z</CreationTime>
        <RegionId>cn-qingdao</RegionId>
        <TransitRouterId>tr-m5eq27g6bndum7e88****</TransitRouterId>
        <AliUid>1688111111111111</AliUid>
  </TransitRouters>
</ListTransitRoutersResponse>

JSON format

{
  "TotalCount": 2,
  "RequestId": "68521297-5FA6-46CB-B4EB-658F1C68C8CC",
  "PageSize": 10,
  "PageNumber": 1,
  "TransitRouters": [
    {
      "Status": "Active",
      "Type": "Enterprise",
      "CenId": "cen-j3jzhw1zpau2km****",
      "CreationTime": "2021-03-15T09:39Z",
      "TransitRouterName": "zxtest",
      "RegionId": "cn-hangzhou",
      "TransitRouterId": "tr-bp1su1ytdxtataupl****",
      "AliUid": "1688111111111111"
    },
    {
      "Status": "Active",
      "Type": "Basic",
      "CenId": "cen-j3jzhw1zpau2km****",
      "CreationTime": "2021-03-22T02:11Z",
      "RegionId": "cn-qingdao",
      "TransitRouterId": "tr-m5eq27g6bndum7e88****",
      "AliUid": "1688111111111111"
    }
  ]
}

Error codes

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