Queries information about Virtual Private Cloud (VPC) connections under an Enterprise Edition transit router, including the status, billing type, zone information, and associated vSwitch and network interface controller (NIC) details of VPC connections that are active for forwarding and routing traffic.
Operation description
You can query information about VPC connections under an Enterprise Edition transit router in the following three ways:
Query information about all VPC connections under an Enterprise Edition transit router instance by specifying the transit router instance ID.
Query information about all VPC connections under an Enterprise Edition transit router instance by specifying the Cloud Enterprise Network (CEN) instance ID and the region ID of the Enterprise Edition transit router instance.
Query information about all VPC connections in a region by specifying the region ID of the Enterprise Edition transit router instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:ListTransitRouterVpcAttachments |
list |
*CenInstance
TransitRouterVpcAttachment
TransitRouterVpcAttachment
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CenId |
string |
No |
The CEN instance ID. |
cen-j3jzhw1zpau2km**** |
| RegionId |
string |
No |
The region ID of the Enterprise Edition transit router instance. You can call the DescribeRegions operation to query the region ID. |
cn-hangzhou |
| TransitRouterAttachmentId |
string |
No |
The VPC connection ID. |
tr-attach-nls9fzkfat8934**** |
| TransitRouterId |
string |
No |
The Enterprise Edition transit router instance ID. |
tr-bp1su1ytdxtataupl**** |
| MaxResults |
integer |
No |
The number of entries per page for a paged query. Default value: 20. |
20 |
| NextToken |
string |
No |
The token for the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| Tag |
array<object> |
No |
The tag information. You can specify up to 20 tags at a time. |
|
|
object |
No |
|||
| Key |
string |
No |
The tag key of the resource. Once specified, the tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot start with You can specify up to 20 tag keys at a time. |
tagtest |
| Value |
string |
No |
The tag value of the resource. The tag value can be empty or a string of up to 128 characters. It cannot start with Each tag key corresponds to one tag value. You can specify up to 20 tag values at a time. |
tagtest |
| VpcId |
string |
No |
The VPC instance ID. |
vpc-bp1kbjcre9vtsebo1**** |
| OrderType |
string |
No |
The payer of the network instance. Valid values:
|
PayByCenOwner |
| Status |
string |
No |
The attachment status of the network instance.
|
Attached |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| NextToken |
string |
The token for the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
The request ID. |
C97FF53F-3EF8-4883-B459-60E171924B23 |
| TotalCount |
integer |
The total number of entries. |
1 |
| MaxResults |
integer |
The number of entries per page for a paged query. |
20 |
| TransitRouterAttachments |
array<object> |
The list of VPC connections. |
|
|
array<object> |
The list of VPC connections. |
||
| CreationTime |
string |
The time when the VPC connection was created. The time is displayed in the ISO 8601 standard in UTC. Format: YYYY-MM-DDThh:mmZ. |
2021-06-15T02:14Z |
| Status |
string |
The status of the VPC connection.
|
Attached |
| VpcId |
string |
The VPC instance ID. |
vpc-bp1h8vbrbcgohcju5**** |
| TransitRouterAttachmentId |
string |
The VPC connection ID. |
tr-attach-nls9fzkfat8934**** |
| TransitRouterId |
string |
The Enterprise Edition transit router instance ID. |
tr-bp1su1ytdxtataupl**** |
| ResourceType |
string |
The resource type of the connection. The value is VPC, which indicates a VPC instance. |
VPC |
| TransitRouterAttachmentDescription |
string |
The description of the VPC connection. |
testdesc |
| VpcOwnerId |
integer |
The ID of the account that owns the VPC instance. |
1250123456123456 |
| VpcRegionId |
string |
The region ID of the VPC instance. |
cn-hangzhou |
| TransitRouterAttachmentName |
string |
The name of the VPC connection. |
testname |
| ZoneMappings |
array<object> |
The zone information of the VPC connection and the vSwitch and network interface controller (NIC) information of the associated VPC instance that are active for forwarding and routing traffic. |
|
|
object |
|||
| ZoneId |
string |
The zone ID. |
cn-hangzhou-h |
| VSwitchId |
string |
The vSwitch ID. |
vsw-bp1a214sbus8z3b54**** |
| NetworkInterfaceId |
string |
The ID of the network interface controller (NIC) that the Enterprise Edition transit router created in the vSwitch for forwarding and routing traffic. |
eni-bp149hmyaqegerml**** |
| AutoPublishRouteEnabled |
boolean |
Indicates whether the Enterprise Edition transit router automatically publishes route entries to the VPC instance.
|
true |
| ChargeType |
string |
The billing type of the VPC connection. The value is POSTPAY, which indicates pay-as-you-go. |
POSTPAY |
| Tags |
array<object> |
The tag information. |
|
|
object |
|||
| Key |
string |
The tag key. |
test |
| Value |
string |
The tag value. |
test |
| OrderType |
string |
The payer of the network instance. Valid values:
|
PayByCenOwner |
| ManagedService |
string |
The cloud service to which the connection belongs. |
SAS |
| TransitRouterVPCAttachmentOptions |
object |
The list of feature attributes of the VPC connection (to be deprecated. Use the new parameter Options instead). |
|
|
string |
The feature attribute of the VPC connection (to be deprecated. Use the new parameter Options instead).
|
{ "ipv6Support": "disable" } |
|
| CenId |
string |
The CEN instance ID. |
cen-j3jzhw1zpau2km**** |
| Options |
object |
The collection of feature attributes. |
|
| Ipv6Support |
string |
Indicates whether IPv6 is supported.
|
enable |
| ApplianceModeSupport |
string |
Indicates whether the appliance mode is enabled.
|
enable |
Examples
Success response
JSON format
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"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****"
}
],
"AutoPublishRouteEnabled": true,
"ChargeType": "POSTPAY",
"Tags": [
{
"Key": "test",
"Value": "test"
}
],
"OrderType": "PayByCenOwner",
"ManagedService": "SAS",
"TransitRouterVPCAttachmentOptions": {
"key": "{ \"ipv6Support\": \"disable\" }"
},
"CenId": "cen-j3jzhw1zpau2km****\n",
"Options": {
"Ipv6Support": "enable",
"ApplianceModeSupport": "enable"
}
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.NextToken | The specified NextToken is invalid. | The error message returned because the NextToken parameter is set to an invalid value. |
| 400 | IllegalParam.TrInstance | The specified TransitRouter is invalid. | The error message returned because the TransitRouter parameter is set to an invalid value. |
| 400 | IllegalParam.Region | The specified Region is invalid. | The error message returned because the specified region is invalid. |
| 400 | IllegalParam.CenId | The specified CenId is invalid. | The error message returned because the ID of the CEN instance is invalid. |
| 400 | IllegalParam.TransitRouterId | The specified TransitRouterId is invalid. | The error message returned because the specified transit router ID is invalid. |
| 400 | IllegalParam.CenIdOrRegionId | The specified CenId or RegionId is invalid. | The error message returned because the specified CEN instance ID or region ID is invalid. |
| 400 | IllegalParam.MaxResults | The specified MaxResults is illegal. | MaxResults illegal. |
| 400 | InvalidParameter | Invalid parameter. | The error message returned because the parameter is set to an invalid value. |
| 400 | Unauthorized | The AccessKeyId is unauthorized. | The error message returned because you do not have the permissions to perform this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.