All Products
Search
Document Center

Virtual Private Cloud:ListVpcPeerConnections

Last Updated:Aug 05, 2024

Queries virtual private cloud (VPC) peering connections.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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.

cn-hangzhou
InstanceIdstringNo

The ID of the VPC peering connection that you want to query.

pcc-lnk0m24khwvtkm****
VpcIdarrayNo

The ID of the requester VPC or accepter VPC of the VPC peering connection that you want to query.

stringNo
vpc-bp1gsk7h12ew7oegk****
NamestringNo

The name of the VPC peering connection that you want to query.

vpcpeer
NextTokenstringNo

The token that is used for the next query. Valid values:

  • You do not need to specify this parameter for the first request.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsintegerNo

The number of entries to return per page. Valid values: 1 to 100. Default value: 20.

20
Tagsarray<object>No

The tag list.

objectNo
KeystringNo

The tag key. You can specify at most 20 tag keys. The tag key cannot be an empty string.

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

FinanceDept
ValuestringNo

The tag value. You can specify at most 20 tag values. The tag value can be an empty string.

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

FinanceJoshua
ResourceGroupIdstringNo

The ID of the resource group.

For more information about resource groups, see What is a resource group?

rg-acfm2ggeub5uf3y

Response parameters

ParameterTypeDescriptionExample
object

RpcResponse

RequestIdstring

The request ID.

0ED8D006-F706-4D23-88ED-E11ED39DCAC0
TotalCountinteger

The number of entries returned.

1
MaxResultsinteger

The number of entries per page. Valid values: 1 to 100. Default value: 20.

20
NextTokenstring

The token that is used for the next query. Valid values:

  • If no value is returned for NextToken, no next queries are sent.
  • If the value of NextToken is returned, the value indicates the token that is used for the next query.
FFmyTO70tTpLG6I3FmYAXGKPd****
VpcPeerConnectsarray<object>

The details of the VPC peering connections.

object
InstanceIdstring

The ID of the VPC peering connection.

pcc-lnk0m24khwvtkm****
GmtCreatestring

The time when the VPC peering connection was created. The time is displayed in the YYYY-MM-DDThh:mm:ssZ format in UTC.

2022-04-24T09:02:36Z
GmtModifiedstring

The time when the VPC peering connection was modified. The time is displayed in the YYYY-MM-DDThh:mm:ssZ format in UTC.

2022-04-24T19:20:45Z
Namestring

The name of the VPC peering connection.

vpcpeer
Descriptionstring

The description of the VPC peering connection.

test
OwnerIdinteger

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

253460731706911258
AcceptingOwnerUidinteger

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

253460731706911258
RegionIdstring

The region ID of the requester VPC.

cn-hangzhou
AcceptingRegionIdstring

The region ID of the accepter VPC.

cn-hangzhou
Bandwidthinteger

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:

  • The default bandwidth of an inter-region VPC peering connection is 1024 Mbit/s.
  • The default bandwidth of an intra-region VPC peering connection is -1 Mbit/s.
1024
Statusstring

The status of the VPC peering connection. Valid values:

  • Creating
  • Accepting
  • Updating
  • Rejected
  • Expired
  • Activated
  • Deleting
  • Deleted

For more information about the status of VPC peering connections, see Overview of VPC peering connections.

Activated
BizStatusstring

The business status of the VPC peering connection. Valid values:

  • Normal
  • FinancialLocked
Normal
GmtExpiredstring

The expiration time of the VPC peering connection. The time is displayed in the YYYY-MM-DDThh:mm:ssZ format in UTC.

The expiration time is returned only when the Status of the VPC peering connection is Accepting or Expired. Otherwise, null is returned.

2022-05-01T09:02:36Z
ResourceGroupIdstring

The ID of the resource group.

rg-aek2gvbs746gt4q
Vpcobject

The details of the requester VPC.

VpcIdstring

The ID of the requester VPC.

vpc-bp1gsk7h12ew7oegk****
Ipv4Cidrsarray

The CIDR block of the requester VPC.

string
192.168.0.0/16
Ipv6Cidrsarray

The IPv6 CIDR block of the requester VPC.

string
2408:XXXX:3c5:6e00::/56
AcceptingVpcobject

The details of the accepter VPC.

VpcIdstring

The ID of the accepter VPC.

vpc-bp1vzjkp2q1xgnind****
Ipv4Cidrsarray

The CIDR block of the accepter VPC.

string
10.0.0.0/16
Ipv6Cidrsarray

The IPv6 CIDR block of the accepter VPC.

string
2408:XXXX:3b8:3a00::/56
Tagsarray<object>

The tag list.

object
Keystring

The tag key.

FinanceDept
Valuestring

The tag value.

FinanceJoshua

Examples

Sample success responses

JSONformat

{
  "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",
      "OwnerId": 253460731706911260,
      "AcceptingOwnerUid": 253460731706911260,
      "RegionId": "cn-hangzhou",
      "AcceptingRegionId": "cn-hangzhou",
      "Bandwidth": 1024,
      "Status": "Activated",
      "BizStatus": "Normal",
      "GmtExpired": "2022-05-01T09:02:36Z",
      "ResourceGroupId": "rg-aek2gvbs746gt4q",
      "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 Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-23API Description UpdateView Change Details
2023-09-13The response structure of the API has changedView Change Details
2023-05-30The request parameters of the API has changed. The response structure of the API has changedView Change Details