All Products
Document Center

Virtual Private Cloud:RejectVpcPeerConnection

Last Updated:Mar 03, 2024

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

Operation description

  • An acceptor VPC can reject a connection request from the requester VPC of a cross-account VPC peering connection. After the connection request is rejected, the VPC peering connection enters the Rejected state.
  • You cannot repeatedly call the RejectVpcPeerConnection operation for the same VPC peering connection within the specified period of time.


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


The ID of the VPC peering connection to be rejected by the acceptor VPC.


Specifies whether to check the request without performing the operation. Valid values:

  • true: checks the request without performing the operation. The system checks the required parameters, request syntax, and limits. If the request fails to pass the check, an error message is returned. If the request passes the check, the DryRunOperation error code is returned.
  • false (default): sends the request. If the request passes the check, an HTTP 2xx status code is returned and the operation is performed.

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

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

Note If you do not set this parameter, the system uses RequestId as ClientToken. The value of RequestId for each API request may be different.

Response parameters




The ID of the request.



Sample success responses


  "RequestId": "4EC47282-1B74-4534-BD2E-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.-

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