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

Usage notes

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

  • If you do not set RegionId or TransitRouterId, the system queries all transit routers connected to the specified CEN instance.
  • If you set only RegionId, the system queries transit routers that are deployed in the specified region.
  • If you set only TransitRouterId, the system queries the specified transit router.
  • If you set both 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 Yes ListTransitRouters

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

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.

CenId String Yes cen-j3jzhw1zpau2km****

The ID of the CEN instance.

TransitRouterId String No tr-uf654ttymmljlvh2x****

The ID of the transit router.

RegionId String No ap-southeast-2

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

You can call the DescribeRegions operation to query the most recent region list.

Tag.N.Key String No TagKey

The tag keys of the resources.

The tag keys cannot be an empty string. The tag keys can be up to 64 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

You can specify at most 20 tag keys.

Tag.N.Value String No TagValue

The tag values of the resources.

The tag values can be 0 to 128 characters in length, and cannot start with aliyun or acs:. It cannot contain http:// or https://.

Each tag key has a unique tag value. You can specify at most 20 tag values in each call.

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned per page.

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

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

TotalCount Integer 1

The total number of entries returned.

TransitRouters Array of TransitRouter

A list of transit routers.

CreationTime String 2021-03-15T09:39Z

The time when the transit router was created.

The time follows the ISO8601 standard in the YYYY-MM-DDThh:mmZ format. The time is displayed in UTC.

Type String Enterprise

The edition of the transit router. Valid values:

  • Enterprise: Enhance Edition
  • Basic: Basic Edition
Status String Active

The status of the transit router. Valid values:

  • Creating: The transit router is being created.
  • Active: The transit router is available.
  • Modifying: The transit router is being modified
  • Deleting: The transit router is being deleted.
  • Upgrading: The transit router is being upgraded.
TransitRouterId String tr-bp1su1ytdxtataupl****

The ID of the transit router.

TransitRouterDescription String testdesc

The description of the transit router.

TransitRouterName String testname

The name of the transit router.

CenId String cen-j3jzhw1zpau2km****

The ID of the CEN instance.

AliUid Long 1210123456123456

The ID of the Alibaba Cloud account to which the CEN instance belongs.

RegionId String ap-southeast-2

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

SupportMulticast Boolean false

Indicates whether multicast is enabled for the transit router. Valid values:

  • true: enabled
  • false: disabled
TransitRouterCidrList Array of TransitRouterCidrList

The information about the CIDR block of the transit router.

Cidr String 192.168.1.0/24

The CIDR block of the transit router.

Name String CIDRname

The name of the CIDR block.

Description String CIDRdesc

The description of the CIDR block.

TransitRouterCidrId String cidr-46p5ceg21e8152****

The ID of the CIDR block.

PublishCidrRoute Boolean true

Indicates whether to allow the system to automatically add the CIDR block to the route table of the transit router.

  • true: yes

    A value of true indicates that after you create a private VPN connection and enable route learning for the VPN connection, the system automatically adds a blackhole route to the route table of the transit router to which the VPN connection is attached.

    The destination CIDR block of the blackhole route is the CIDR block of the transit router. The CIDR block of the transit router refers to the CIDR block from which gateway IP addresses are allocated to IPsec-VPN connections.

    The blackhole route is advertised only to the route table of the virtual border router (VBR) that is connected to the transit router.

  • false: no
Tags Array of Tag

A list of tags.

Key String TagKey

The tag key.

Value String TagValue

The tag value.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTransitRouters
&PageNumber=1
&PageSize=10
&CenId=cen-j3jzhw1zpau2km****
&TransitRouterId=tr-uf654ttymmljlvh2x****
&RegionId=ap-southeast-2
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTransitRoutersResponse>
    <PageSize>10</PageSize>
    <RequestId>68521297-5FA6-46CB-B4EB-658F1C68C8CC</RequestId>
    <PageNumber>1</PageNumber>
    <TotalCount>1</TotalCount>
    <TransitRouters>
        <CreationTime>2021-03-15T09:39Z</CreationTime>
        <Type>Enterprise</Type>
        <Status>Active</Status>
        <TransitRouterId>tr-bp1su1ytdxtataupl****</TransitRouterId>
        <TransitRouterDescription>testdesc</TransitRouterDescription>
        <TransitRouterName>testname</TransitRouterName>
        <CenId>cen-j3jzhw1zpau2km****</CenId>
        <AliUid>1210123456123456</AliUid>
        <RegionId>ap-southeast-2</RegionId>
        <SupportMulticast>false</SupportMulticast>
        <TransitRouterCidrList>
            <Cidr>192.168.1.0/24</Cidr>
            <Name>CIDRname</Name>
            <Description>CIDRdesc</Description>
            <TransitRouterCidrId>cidr-46p5ceg21e8152****</TransitRouterCidrId>
            <PublishCidrRoute>true</PublishCidrRoute>
        </TransitRouterCidrList>
    </TransitRouters>
</ListTransitRoutersResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 10,
  "RequestId" : "68521297-5FA6-46CB-B4EB-658F1C68C8CC",
  "PageNumber" : 1,
  "TotalCount" : 1,
  "TransitRouters" : [ {
    "CreationTime" : "2021-03-15T09:39Z",
    "Type" : "Enterprise",
    "Status" : "Active",
    "TransitRouterId" : "tr-bp1su1ytdxtataupl****",
    "TransitRouterDescription" : "testdesc",
    "TransitRouterName" : "testname",
    "CenId" : "cen-j3jzhw1zpau2km****",
    "AliUid" : 1210123456123456,
    "RegionId" : "ap-southeast-2",
    "SupportMulticast" : false,
    "TransitRouterCidrList" : [ {
      "Cidr" : "192.168.1.0/24",
      "Name" : "CIDRname",
      "Description" : "CIDRdesc",
      "TransitRouterCidrId" : "cidr-46p5ceg21e8152****",
      "PublishCidrRoute" : true
    } ]
  } ]
}

Error codes

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