Queries virtual private cloud (VPC) connections on an Enterprise Edition transit router.

Description

You can use the following methods to query VPC connections on an Enterprise Edition transit router:

  • Specify the ID of the Enterprise Edition transit router.
  • Specify the ID of the relevant Cloud Enterprise Network (CEN) instance and the region ID of the 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 ListTransitRouterVpcAttachments

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

CenId String No cen-j3jzhw1zpau2km****

The ID of the Cloud Enterprise Network (CEN) instance.

RegionId String No cn-hangzhou

The region ID of the Enterprise Edition transit router.

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

TransitRouterAttachmentId String No tr-attach-nls9fzkfat8934****

The ID of the VPC connection.

TransitRouterId String No tr-bp1su1ytdxtataupl****

The ID of the Enterprise Edition transit router.

MaxResults Integer No 20

The number of entries to return per page. Default value: 20.

NextToken String No dd20****

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 20

The number of entries returned per page.

NextToken String dd20****

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

RequestId String C97FF53F-3EF8-4883-B459-60E171924B23

The ID of the request.

TotalCount Integer 1

The total number of entries returned.

TransitRouterAttachments Array of TransitRouterAttachment

The list of VPC connections.

CreationTime String 2021-06-15T02:14Z

The time when the VPC connection is created.

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

ResourceType String VPC

The type of resource to which the transit router is connected. Valid values:

  • VPC: a virtual private cloud (VPC)
  • CCN: a Cloud Connect Network (CCN) instance
  • VBR: a virtual border router (VBR)
  • TR: a transit router
Status String Attached

The status of the VPC connection. Valid values:

  • Attached: The transit router is connected to the VPC.
  • Attaching: The transit router is connecting to the VPC.
  • Detaching: The transit router is disconnecting from the VPC.
  • Detached: The transit router is disconnected from the VPC.
TransitRouterAttachmentDescription String testdesc

The description of the VPC connection.

TransitRouterAttachmentId String tr-attach-nls9fzkfat8934****

The ID of the VPC connection.

TransitRouterAttachmentName String testname

The name of the VPC connection.

TransitRouterId String tr-bp1su1ytdxtataupl****

The ID of the Enterprise Edition transit router.

VpcId String vpc-bp1h8vbrbcgohcju5****

The ID of the VPC.

VpcOwnerId Long 1688111111111111

The ID of the Alibaba Cloud account to which the VPC belongs.

VpcRegionId String cn-hangzhou

The region ID of the VPC.

ZoneMappings Array of ZoneMapping

The primary and secondary zones of the VPC connection and the vSwitches deployed in the VPC.

VSwitchId String vsw-bp1a214sbus8z3b54****

The ID of the vSwitch.

ZoneId String cn-hangzhou-h

The ID of the zone.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTransitRouterVpcAttachments
&<Common request parameters>

Sample success responses

XML format

<TotalCount>1</TotalCount>
<RequestId>C97FF53F-3EF8-4883-B459-60E171924B23</RequestId>
<MaxResults>20</MaxResults>
<TransitRouterAttachments>
    <TransitRouterAttachmentId>tr-attach-nls9fzkfat8934****</TransitRouterAttachmentId>
    <Status>Attached</Status>
    <VpcId>vpc-bp1h8vbrbcgohcju5****</VpcId>
    <CreationTime>2021-06-15T02:14Z</CreationTime>
    <VpcRegionId>cn-hangzhou</VpcRegionId>
    <TransitRouterAttachmentName>test1</TransitRouterAttachmentName>
    <ResourceType>VPC</ResourceType>
    <ZoneMappings>
        <ZoneId>cn-hangzhou-h</ZoneId>
        <VSwitchId>vsw-bp1a214sbus8z3b54****</VSwitchId>
    </ZoneMappings>
    <ZoneMappings>
        <ZoneId>cn-hangzhou-i</ZoneId>
        <VSwitchId>vsw-bp1w4ve8ikmzml84g****</VSwitchId>
    </ZoneMappings>
    <VpcOwnerId>1688111111111111</VpcOwnerId>
    <TransitRouterId>tr-bp1su1ytdxtataupl****</TransitRouterId>
</TransitRouterAttachments>

JSON format

{
  "TotalCount": 1,
  "RequestId": "C97FF53F-3EF8-4883-B459-60E171924B23",
  "MaxResults": 20,
  "TransitRouterAttachments": [
    {
      "TransitRouterAttachmentId": "tr-attach-nls9fzkfat8934****",
      "Status": "Attached",
      "VpcId": "vpc-bp1h8vbrbcgohcju5****",
      "CreationTime": "2021-06-15T02:14Z",
      "VpcRegionId": "cn-hangzhou",
      "TransitRouterAttachmentName": "test1",
      "ResourceType": "VPC",
      "ZoneMappings": [
        {
          "ZoneId": "cn-hangzhou-h",
          "VSwitchId": "vsw-bp1a214sbus8z3b54****"
        },
        {
          "ZoneId": "cn-hangzhou-i",
          "VSwitchId": "vsw-bp1w4ve8ikmzml84g****"
        }
      ],
      "VpcOwnerId": "1688111111111111",
      "TransitRouterId": "tr-bp1su1ytdxtataupl****"
    }
  ]
}

Error codes

HttpCode Error code Error message Description
400 IllegalParam.NextToken The specified NextToken is invalid. The error message returned because the value of NextToken is invalid.
400 IllegalParam.TrInstance The specified TransitRouter is invalid. The error message returned because the ID of the transit router is invalid.

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