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

Usage notes

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 Yes ListTransitRouterVpcAttachments

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

CenId String No cen-j3jzhw1zpau2km****

The ID of the CEN instance.

RegionId String No cn-hangzhou

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

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 FFmyTO70tTpLG6I3FmYAXGKPd****

The token that determines the start point of the query. Valid values:

  • If this is your first query or no subsequent query is to be sent, ignore this parameter.
  • If a next query is to be sent, set the parameter to the value of NextToken that is returned from the last call.

Response parameters

Parameter Type Example Description
NextToken String FFmyTO70tTpLG6I3FmYAXGKPd****

The token that determines the start point of the query. Valid values:

  • If NextToken was not returned, it indicates that no additional results exist.
  • If NextToken was returned in the previous query, specify the value to obtain the next set of results.
RequestId String C97FF53F-3EF8-4883-B459-60E171924B23

The ID of the request.

TotalCount Integer 1

The total number of entries returned.

MaxResults Integer 20

The number of entries returned on each page.

TransitRouterAttachments Array of TransitRouterAttachment

The information about the VPC connection.

CreationTime String 2021-06-15T02:14Z

The time when the VPC connection is created.

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

Status String Attached

The status of the VPC connection.

  • Attached: The VPC connection is created on the transit router.
  • Attaching: The VPC connection is being created on the transit router.
  • Detaching: The VPC connection is being deleted from the transit router.
  • Detached: The VPC connection is deleted from the transit router.
VpcId String vpc-bp1h8vbrbcgohcju5****

The ID of the VPC.

TransitRouterAttachmentId String tr-attach-nls9fzkfat8934****

The ID of the VPC connection.

TransitRouterId String tr-bp1su1ytdxtataupl****

The ID of the Enterprise Edition transit router.

ResourceType String VPC

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

The value is set to VPC.

TransitRouterAttachmentDescription String testdesc

The description of the VPC connection.

VpcOwnerId Long 1250123456123456

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

VpcRegionId String cn-hangzhou

The region ID of the VPC.

TransitRouterAttachmentName String testname

The name of the VPC connection.

ZoneMappings Array of ZoneMapping

The primary and secondary zones of the VPC connection and the vSwitches and elastic network interfaces (ENIs) of the VPC.

ZoneId String cn-hangzhou-h

The ID of the zone.

VSwitchId String vsw-bp1a214sbus8z3b54****

The ID of the vSwitch.

NetworkInterfaceId String eni-bp149hmyaqegerml****

The ID of the ENI that is associated with the vSwitch of the Enterprise Edition transit router.

ChargeType String POSTPAY

The billing method of the VPC connection.

Valid value: POSTPAY, which is the default value and specifies the pay-as-you-go billing method.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTransitRouterVpcAttachments
&CenId=cen-j3jzhw1zpau2km****
&RegionId=cn-hangzhou
&TransitRouterAttachmentId=tr-attach-nls9fzkfat8934****
&TransitRouterId=tr-bp1su1ytdxtataupl****
&MaxResults=20
&Common request parameters

Sample success responses

XML format

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

<ListTransitRouterVpcAttachmentsResponse>
    <RequestId>C97FF53F-3EF8-4883-B459-60E171924B23</RequestId>
    <TotalCount>1</TotalCount>
    <MaxResults>20</MaxResults>
    <TransitRouterAttachments>
        <CreationTime>2021-06-15T02:14Z</CreationTime>
        <Status>Attached</Status>
        <VpcId>vpc-bp1h8vbrbcgohcju5****</VpcId>
        <TransitRouterAttachmentId>tr-attach-nls9fzkfat8934****</TransitRouterAttachmentId>
        <TransitRouterId>tr-bp1su1ytdxtataupl****</TransitRouterId>
        <ResourceType>VPC</ResourceType>
        <TransitRouterAttachmentDescription>testdesc</TransitRouterAttachmentDescription>
        <VpcOwnerId>1250123456123456</VpcOwnerId>
        <VpcRegionId>cn-hangzhou</VpcRegionId>
        <TransitRouterAttachmentName>testname</TransitRouterAttachmentName>
        <ZoneMappings>
            <ZoneId>cn-hangzhou-h</ZoneId>
            <VSwitchId>vsw-bp1a214sbus8z3b54****</VSwitchId>
            <NetworkInterfaceId>eni-bp149hmyaqegerml****</NetworkInterfaceId>
        </ZoneMappings>
        <ChargeType>POSTPAY</ChargeType>
    </TransitRouterAttachments>
</ListTransitRouterVpcAttachmentsResponse>

JSON format

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

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

Error codes

HttpCode Error code Error message Description
400 IllegalParam.NextToken The specified NextToken is invalid. The error message returned because NextToken is set to an invalid value.
400 IllegalParam.TrInstance The specified TransitRouter is invalid. The error message returned because TransitRouter is set to an invalid value.

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