All Products
Search
Document Center

Virtual Private Cloud:GetVpcPeerConnectionAttribute

Last Updated:Feb 10, 2025

Queries the details of a virtual private cloud (VPC) peering connection.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:GetVpcPeerConnectionAttributeget
*PeerConnection
acs:vpc:*:{#accountId}:vpcpeer/{#InstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the VPC peering connection.

pcc-lnk0m24khwvtkm****

Response parameters

ParameterTypeDescriptionExample
object

The request ID.

RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3AC0DE3C83E
InstanceIdstring

The ID of the VPC peering connection.

pcc-lnk0m24khwvtkm****
GmtCreatestring

The time when the VPC peering connection was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.

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

The time when the VPC peering connection was modified. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed 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
OwnerIdlong

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

253460731706911258
AcceptingOwnerUidlong

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

283117732402483989
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 A value of -1 indicates that the bandwidth is unlimited.

Default value:

  • The default bandwidth value of an inter-region VPC peering connection is 1,024 Mbit/s.
  • The default bandwidth value of an intra-region VPC peering connection is -1 Mbit/s, which indicates that the bandwidth is unlimited.
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 .

Activated
BizStatusstring

The status of the VPC peering connection. Valid values:

  • Normal
  • FinancialLocked
Normal
GmtExpiredstring

The expiration time of the VPC peering connection.

A valid 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-acfmz7hy5z267ni
Vpcobject

The details of the requester VPC.

VpcIdstring

The ID of the requester VPC.

vpc-bp1gsk7h12ew7oegk****
Ipv4Cidrsarray

The CIDR block of the requester VPC.

Ipv4Cidrsstring

The CIDR block of the requester VPC.

192.168.0.0/16
Ipv6Cidrsarray

The IPv6 CIDR block of the requester VPC.

Ipv6Cidrsstring

The IPv6 CIDR block of the requester VPC.

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.

Ipv4Cidrsstring

The CIDR block of the accepter VPC.

10.0.0.0/16
Ipv6Cidrsarray

The IPv6 CIDR block of the accepter VPC.

Ipv6Cidrsstring

The IPv6 CIDR block of the accepter VPC.

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

The tag list.

Tagsobject
Keystring

The tag key.

FinanceDept
Valuestring

The tag value.

FinanceJoshua
LinkTypestring

The link type of the VPC peering connection.

Gold

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3AC0DE3C83E",
  "InstanceId": "pcc-lnk0m24khwvtkm****",
  "GmtCreate": "2022-04-24T09:02:36Z",
  "GmtModified": "2022-04-24T19:20:45Z",
  "Name": "vpcpeer",
  "Description": "test",
  "OwnerId": 253460731706911260,
  "AcceptingOwnerUid": 283117732402484000,
  "RegionId": "cn-hangzhou",
  "AcceptingRegionId": "cn-hangzhou",
  "Bandwidth": 1024,
  "Status": "Activated",
  "BizStatus": "Normal",
  "GmtExpired": "2022-05-01T09:02:36Z",
  "ResourceGroupId": "rg-acfmz7hy5z267ni",
  "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"
    }
  ],
  "LinkType": "Gold"
}

Error codes

HTTP status codeError codeError messageDescription
400ResourceNotFound.InstanceIdThe specified resource of %s is not found.The specified instance is not found

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-12-04The Error code has changed. The response structure of the API has changedView Change Details
2024-01-23API Description Update. The Error code has changedView Change Details
2023-05-30The Error code has changed. The response structure of the API has changedView Change Details