All Products
Search
Document Center

Virtual Private Cloud:AcceptVpcPeerConnection

Last Updated:Aug 05, 2024

Accepts a virtual private cloud (VPC) peering connection request.

Operation description

  • For a cross-account VPC peering connection, the connection is activated only after the accepter VPC accepts the connection request.

  • AcceptVpcPeerConnection is an asynchronous operation. After a request is sent, the system returns a request ID and runs the operation in the background. You can call the GetVpcPeerConnectionAttribute operation to query the status of the task.

    • If a VPC peering connection is in the Updating state, the VPC peering connection is being activated.
    • If a VPC peering connection is in the Activated state, the VPC peering connection is activated.
  • You cannot repeatedly call the AcceptVpcPeerConnection operation within a specific period of time.

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
InstanceIdstringYes

The ID of the VPC peering connection to be accepted by the accepter VPC.

pcc-guzvyqlj0n6e10****
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
false
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses request ID as the client token. The request ID may be different for each request.
02fb3da4-130e-11e9-8e44-001****
ResourceGroupIdstringNo

The ID of the resource group.

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

rg-acfmxazb4ph6aiy****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

4EC47282-1B74-4534-BD0E-403F3EE64CAF

Examples

Sample success responses

JSONformat

{
  "RequestId": "4EC47282-1B74-4534-BD0E-403F3EE64CAF"
}

Error codes

HTTP status codeError codeError messageDescription
400ResourceNotFound.InstanceIdThe specified resource of %s is not found.The specified instance is not found
400IncorrectStatus.VpcPeerThe status of %s [%s] is incorrect.The status of the peer-to-peer connection instance does not meet the requirements. In this status, the peer-to-peer connection instance cannot be received.
400OperationFailed.CdtNotOpenedThe operation failed because the Cdt service is not opened.The operation failed because CDT is not activated.
400IncorrectBusinessStatus.VpcPeerThe business status of %s [%s] is incorrect.The current instance status is abnormal and the current operation is not allowed.
400OperationFailed.NotExist.ResourceGroupThe operation failed because the resource group does not exist.The operation failed because the resource group does not exist.
400OperationFailed.CrossBorderCdtNotOpenedThe cross-border data transmission function of Alibaba Cloud is not enabled.-

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

Change history

Change timeSummary of changesOperation
2024-06-05The Error code has changedView Change Details
2024-01-23API Description Update. The Error code has changedView Change Details
2023-05-30The Error code has changed. The request parameters of the API has changedView Change Details