All Products
Search
Document Center

Virtual Private Cloud:AcceptVpcPeerConnection

Last Updated:Mar 03, 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.-
400UnsupportedFeature.VpcPeerThe feature of %s is not supported.-
400OperationFailed.CdtNotOpenedThe operation failed because the Cdt service is not opened.The operation failed because CDT is not activated.
400OperationFailed.CrossBorderCdtNotOpenedOperationFailed.CrossBorderCdtNotOpened-
400IncorrectBusinessStatus.VpcPeerThe business status of %s [%s] is incorrect.-
400OperationFailed.NotExist.ResourceGroupThe operation failed because the resource group does not exist.The operation failed because the resource group does not exist.

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

Change history

Change timeSummary of changesOperation
2024-01-23API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
2023-05-30The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ResourceGroupId