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

Usage notes

  • 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.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes RejectVpcPeerConnection

The operation that you want to perform. Set the value to RejectVpcPeerConnection.

InstanceId String Yes pcc-lnk0m24khwvtkm0****

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

DryRun Boolean No false

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.
ClientToken String No 123e4567-e89b-12d3-a456-426655440000

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

Parameter Type Example Description
RequestId String 4EC47282-1B74-4534-BD2E-403F3EE64CAF

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=RejectVpcPeerConnection
&InstanceId=pcc-lnk0m24khwvtkm0****
&DryRun=false
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<RejectVpcPeerConnectionResponse>
    <RequestId>4EC47282-1B74-4534-BD2E-403F3EE64CAF</RequestId>
</RejectVpcPeerConnectionResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

For a list of error codes, visit the API Error Center.