All Products
Search
Document Center

Virtual Private Cloud:ListVpcPeerConnections

Last Updated:Oct 29, 2026

Queries the details of VPC peering connections.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:ListVpcPeerConnections

list

*VpcPeer

acs:vpc:*:{#AccountId}:vpcpeer/{#InstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

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

You can call the DescribeRegions operation to query region IDs.

cn-hangzhou

InstanceId

string

No

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

pcc-lnk0m24khwvtkm****

VpcId

array

No

Filters the results by the VPC IDs of the initiator and acceptor. The filter does not distinguish between the initiator and the acceptor. If you specify only one VPC ID, the results are filtered based on the specified VPC ID.

string

No

The instance ID of the initiator or acceptor VPC of the VPC peering connection that you want to query.

vpc-bp1gsk7h12ew7oegk****

Name

string

No

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

vpcpeer

NextToken

string

No

The token that is used to retrieve the next page of results. Valid values:

  • If this is your first request or no subsequent request is to be sent, leave this parameter empty.

  • If a subsequent request is to be sent, set the value to the NextToken value returned from the last API call.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

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

20

Tags

array<object>

No

The list of tags.

object

No

The list of tags.

Key

string

No

The tag key. You can specify up to 20 tag keys. If you specify this parameter, it cannot be an empty string.

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

FinanceDept

Value

string

No

The tag value. You can specify up to 20 tag values. If you specify this parameter, it can be an empty string.

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

FinanceJoshua

ResourceGroupId

string

No

The ID of the resource group.

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

rg-acfmxazb4ph6aiy****

Response elements

Element

Type

Description

Example

object

The request ID.

MaxResults

integer

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

20

NextToken

string

The token that is used to retrieve the next page of results. Valid values:

  • If NextToken is empty, no subsequent request is to be sent.

  • If NextToken is returned, the value indicates the token used to start the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The request ID.

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

TotalCount

integer

The total number of entries returned.

1

VpcPeerConnects

array<object>

The details of the queried VPC peering connections.

array<object>

The details of a queried VPC peering connection.

AcceptingOwnerUid

integer

The Alibaba Cloud account ID of the acceptor of the VPC peering connection.

25346073170691****

AcceptingRegionId

string

The region ID of the acceptor of the VPC peering connection.

cn-hangzhou

AcceptingVpc

object

The details of the acceptor VPC-connected instance.

Ipv4Cidrs

array

The IPv4 CIDR blocks of the acceptor.

string

The IPv4 CIDR blocks of the acceptor.

10.0.0.0/16

Ipv6Cidrs

array

The IPv6 CIDR blocks of the acceptor.

string

The IPv6 CIDR blocks of the acceptor.

2408:XXXX:3b8:3a00::/56

VpcId

string

The instance ID of the acceptor VPC-connected instance.

vpc-bp1vzjkp2q1xgnind****

Bandwidth

integer

The bandwidth of the VPC peering connection. Unit: Mbit/s. The value must be an integer greater than 0.

Note

A value of -1 indicates that no bandwidth limit is applied.

Default values:

  • The default bandwidth of a cross-region VPC peering connection is 1024 Mbit/s.

  • The default bandwidth of an intra-region VPC peering connection is -1 Mbit/s, which indicates that no bandwidth limit is applied.

1024

BizStatus

string

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

  • Normal: Normal.

  • FinancialLocked: Locked due to overdue payment.

Normal

Description

string

The description of the VPC peering connection.

test

EnableJumboFrame

boolean

Indicates whether the jumbo frame feature is enabled for the VPC peering connection. Valid values:

  • true: Enabled.

  • false: Disabled.

true

GmtCreate

string

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

2022-04-24T09:02:36Z

GmtExpired

string

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

The specific expiration time is returned only when the Status of the VPC peering connection is Accepting or Expired. If the VPC peering connection is in other states, null is returned.

2022-05-01T09:02:36Z

GmtModified

string

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

2022-04-24T19:20:45Z

InstanceId

string

The instance ID of the VPC peering connection.

pcc-lnk0m24khwvtkm****

LinkType

string

The link type of the VPC peering connection.

Default values:

  • The default link type of a cross-region VPC peering connection is Gold.

  • The default link type of an intra-region VPC peering connection is empty.

Gold

ManagedService

string

The associated cloud service.

SWAS

Name

string

The name of the VPC peering connection.

vpcpeer

OwnerId

integer

The Alibaba Cloud account ID of the initiator of the VPC peering connection.

25346073170691****

RegionId

string

The region ID of the initiator of the VPC peering connection.

cn-hangzhou

ResourceGroupId

string

The ID of the resource group.

rg-acfmxazb4ph6aiy****

Status

string

The status of the VPC peering connection. Valid values:

  • Creating: Creating.

  • Accepting: Accepting.

  • Updating: Updating.

  • Rejected: Rejected.

  • Expired: Expired.

  • Activated: Activated.

  • Deleting: Deleting.

  • Deleted: Deleted.

For more information about the statuses of VPC peering connections, see VPC peering connection overview.

Activated

Tags

array<object>

The list of tags.

object

The list of tags.

Key

string

The tag key.

FinanceDept

Value

string

The tag value.

FinanceJoshua

Vpc

object

The details of the initiator VPC-connected instance.

Ipv4Cidrs

array

The IPv4 CIDR blocks of the initiator.

string

The IPv4 CIDR blocks of the initiator.

192.168.0.0/16

Ipv6Cidrs

array

The IPv6 CIDR blocks of the initiator.

string

The IPv6 CIDR blocks of the initiator.

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

VpcId

string

The instance ID of the initiator VPC-connected instance.

vpc-bp1gsk7h12ew7oegk****

Examples

Success response

JSON format

{
  "MaxResults": 20,
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "0ED8D006-F706-4D23-88ED-E11ED39DCAC0",
  "TotalCount": 1,
  "VpcPeerConnects": [
    {
      "AcceptingOwnerUid": 0,
      "AcceptingRegionId": "cn-hangzhou",
      "AcceptingVpc": {
        "Ipv4Cidrs": [
          "10.0.0.0/16"
        ],
        "Ipv6Cidrs": [
          "2408:XXXX:3b8:3a00::/56"
        ],
        "VpcId": "vpc-bp1vzjkp2q1xgnind****"
      },
      "Bandwidth": 1024,
      "BizStatus": "Normal",
      "Description": "test",
      "EnableJumboFrame": true,
      "GmtCreate": "2022-04-24T09:02:36Z",
      "GmtExpired": "2022-05-01T09:02:36Z",
      "GmtModified": "2022-04-24T19:20:45Z",
      "InstanceId": "pcc-lnk0m24khwvtkm****",
      "LinkType": "Gold",
      "ManagedService": "SWAS",
      "Name": "vpcpeer",
      "OwnerId": 0,
      "RegionId": "cn-hangzhou",
      "ResourceGroupId": "rg-acfmxazb4ph6aiy****",
      "Status": "Activated",
      "Tags": [
        {
          "Key": "FinanceDept",
          "Value": "FinanceJoshua"
        }
      ],
      "Vpc": {
        "Ipv4Cidrs": [
          "192.168.0.0/16"
        ],
        "Ipv6Cidrs": [
          "2408:XXXX:3c5:6e00::/56"
        ],
        "VpcId": "vpc-bp1gsk7h12ew7oegk****"
      }
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.