Queries virtual private cloud (VPC) peering connections.
Debugging
Request parameters
Parameter | Type | Required | Exampleq | Description |
---|---|---|---|---|
Action | String | Yes | ListVpcPeerConnections | The operation that you want to perform. Set the value to ListVpcPeerConnections. |
RegionId | String | No | cn-hangzhou | The ID of the region where you want to query VPC peering connections. You can call the DescribeRegions operation to query the most recent region list. |
InstanceId | String | No | pcc-lnk0m24khwvtkm**** | The ID of the VPC peering connection that you want to query. |
VpcId | Array of String | No | vpc-bp1gsk7h12ew7oegk**** | The ID of the requester VPC or accepter VPC of the VPC peering connection that you want to query. |
Name | String | No | vpcpeer | The name of the VPC peering connection that you want to query. |
NextToken | String | No | FFmyTO70tTpLG6I3FmYAXGKPd**** | The token that is used for the next query. Valid values:
|
MaxResults | Integer | No | 20 | The number of entries to return per page. Valid values: 1 to 100. Default value: 20. |
Tags.N.Key | String | No | FinanceDept | The tag key. You can specify at most 20 tag keys. It cannot be an empty string. The key cannot exceed 64 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). The key must start with a letter but cannot start with |
Tags.N.Value | String | No | FinanceJoshua | The tag value. You can specify at most 20 tag values. The tag key can be an empty string. The tag value cannot exceed 128 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). The key must start with a letter but cannot start with |
ResourceGroupId | String | No | rg-acfmxazb4ph6aiy**** | The ID of the resource group. For more information about resource groups, see What is a resource group? |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 0ED8D006-F706-4D23-88ED-E11ED39DCAC0 | The request ID. |
TotalCount | Integer | 1 | The number of entries returned. |
MaxResults | Integer | 20 | The number of entries per page. Valid values: 1 to 100. Default value: 20. |
NextToken | String | FFmyTO70tTpLG6I3FmYAXGKPd**** | The token that is used for the next query. Valid values:
|
VpcPeerConnects | Array of VpcPeerConnects | The details of the VPC peering connections. |
|
InstanceId | String | pcc-lnk0m24khwvtkm**** | The ID of the VPC peering connection. |
GmtCreate | String | 2022-04-24T09:02:36Z | The time when the VPC peering connection was created. The time is displayed in the |
GmtModified | String | 2022-04-24T19:20:45Z | The time when the VPC peering connection was modified. The time is displayed in the |
Name | String | vpcpeer | The name of the VPC peering connection. |
Description | String | test | The description of the VPC peering connection. |
OwnerId | Integer | 253460731706911258 | The ID of the Alibaba Cloud account to which the requester VPC belongs. |
AcceptingOwnerUid | Integer | 253460731706911258 | The ID of the Alibaba Cloud account to which the accepter VPC belongs. |
RegionId | String | cn-hangzhou | The region ID of the requester VPC. |
AcceptingRegionId | String | cn-hangzhou | The region ID of the accepter VPC. |
Bandwidth | Integer | 1024 | The bandwidth of the VPC peering connection. Unit: Mbit/s. The value is an integer greater than 0. Note If the value is set to -1, it indicates that no limit is imposed on the bandwidth. Default value:
|
Status | String | Activated | The status of the VPC peering connection. Valid values:
For more information about the status of VPC peering connections, see Overview of VPC peering connections. |
BizStatus | String | Normal | The business status of the VPC peering connection. Valid values:
|
GmtExpired | String | 2022-05-01T09:02:36Z | The expiration time of the VPC peering connection. The time is displayed in the The expiration time is returned only when the Status of the VPC peering connection is Accepting or Expired. Otherwise, null is returned. |
ResourceGroupId | String | rg-acfmxazb4ph6aiy**** | The ID of the resource group. |
Vpc | Object | The details of the requester VPC. |
|
VpcId | String | vpc-bp1gsk7h12ew7oegk**** | The ID of the requester VPC. |
Ipv4Cidrs | Array of String | 192.168.0.0/16 | The CIDR block of the requester VPC. |
Ipv6Cidrs | Array of String | 2408:XXXX:3c5:6e00::/56 | The IPv6 CIDR block of the requester VPC. |
AcceptingVpc | Object | The details of the accepter VPC. |
|
VpcId | String | vpc-bp1vzjkp2q1xgnind**** | The ID of the accepter VPC. |
Ipv4Cidrs | Array of String | 10.0.0.0/16 | The CIDR block of the accepter VPC. |
Ipv6Cidrs | Array of String | 2408:XXXX:3b8:3a00::/56 | The IPv6 CIDR block of the accepter VPC. |
Tags | Array of Tags | The tag list. |
|
Key | String | FinanceDept | The tag key. |
Value | String | FinanceJoshua | The tag value. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListVpcPeerConnections
&RegionId=cn-hangzhou
&InstanceId=pcc-lnk0m24khwvtkm****
&VpcId=["vpc-bp1gsk7h12ew7oegk****"]
&Name=vpcpeer
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=20
&Tags=[{"Key":"FinanceDept","Value":"FinanceJoshua"}]
&ResourceGroupId=rg-acfmxazb4ph6aiy****
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListVpcPeerConnectionsResponse>
<RequestId>0ED8D006-F706-4D23-88ED-E11ED39DCAC0</RequestId>
<TotalCount>1</TotalCount>
<MaxResults>20</MaxResults>
<NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
<VpcPeerConnects>
<InstanceId>pcc-lnk0m24khwvtkm****</InstanceId>
<GmtCreate>2022-04-24T09:02:36Z</GmtCreate>
<GmtModified>2022-04-24T19:20:45Z</GmtModified>
<Name>vpcpeer</Name>
<Description>test</Description>
<RegionId>cn-hangzhou</RegionId>
<AcceptingRegionId>cn-hangzhou</AcceptingRegionId>
<Bandwidth>1024</Bandwidth>
<Status>Activated</Status>
<BizStatus>Normal</BizStatus>
<GmtExpired>2022-05-01T09:02:36Z</GmtExpired>
<ResourceGroupId>rg-acfmxazb4ph6aiy****</ResourceGroupId>
<Vpc>
<VpcId>vpc-bp1gsk7h12ew7oegk****</VpcId>
<Ipv4Cidrs>192.168.0.0/16</Ipv4Cidrs>
<Ipv6Cidrs>2408:XXXX:3c5:6e00::/56</Ipv6Cidrs>
</Vpc>
<AcceptingVpc>
<VpcId>vpc-bp1vzjkp2q1xgnind****</VpcId>
<Ipv4Cidrs>10.0.0.0/16</Ipv4Cidrs>
<Ipv6Cidrs>2408:XXXX:3b8:3a00::/56</Ipv6Cidrs>
</AcceptingVpc>
<Tags>
<Key>FinanceDept</Key>
<Value>FinanceJoshua</Value>
</Tags>
</VpcPeerConnects>
</ListVpcPeerConnectionsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "0ED8D006-F706-4D23-88ED-E11ED39DCAC0",
"TotalCount" : 1,
"MaxResults" : 20,
"NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
"VpcPeerConnects" : [ {
"InstanceId" : "pcc-lnk0m24khwvtkm****",
"GmtCreate" : "2022-04-24T09:02:36Z",
"GmtModified" : "2022-04-24T19:20:45Z",
"Name" : "vpcpeer",
"Description" : "test",
"RegionId" : "cn-hangzhou",
"AcceptingRegionId" : "cn-hangzhou",
"Bandwidth" : 1024,
"Status" : "Activated",
"BizStatus" : "Normal",
"GmtExpired" : "2022-05-01T09:02:36Z",
"ResourceGroupId" : "rg-acfmxazb4ph6aiy****",
"Vpc" : {
"VpcId" : "vpc-bp1gsk7h12ew7oegk****",
"Ipv4Cidrs" : [ "192.168.0.0/16" ],
"Ipv6Cidrs" : [ "2408:XXXX:3c5:6e00::/56" ]
},
"AcceptingVpc" : {
"VpcId" : "vpc-bp1vzjkp2q1xgnind****",
"Ipv4Cidrs" : [ "10.0.0.0/16" ],
"Ipv6Cidrs" : [ "2408:XXXX:3b8:3a00::/56" ]
},
"Tags" : [ {
"Key" : "FinanceDept",
"Value" : "FinanceJoshua"
} ]
} ]
}
Error codes
For a list of error codes, visit the Error Center.