Deletes a virtual private cloud (VPC) peering connection.
Operation description
-
You can delete VPC peering connections. After you delete a VPC peering connection, your service is affected. Proceed with caution.
- If you forcefully delete a VPC peering connection, the system deletes the routes that point to the VPC peering connection from the VPC route table.
- If you do not forcefully delete a VPC peering connection, the system does not delete these routes. You must manually delete them.
-
The DeleteVpcPeerConnection operation is asynchronous. After you send a request, the system returns RequestId, but the operation is still being performed in the background. You can call the GetVpcPeerConnectionAttribute operation to query the status of a VPC peering connection.
- If a VPC peering connection is in the Deleting state, it is being deleted.
- If a VPC peering connection is in the Deleted state, it is deleted.
-
You cannot repeatedly call the DeleteVpcPeerConnection operation for the same VPC peering connection within the specified period of time.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The ID of the VPC peering connection that you want to delete. | pcc-lnk0m24khwvtkm**** |
Force | boolean | No | Specifies whether to forcefully delete the VPC peering connection. Valid values:
| false |
DryRun | boolean | No | Specifies whether to check the request without performing the operation. Valid values:
| false |
ClientToken | string | No | 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.
| 02fb3da4-130e-11e9-8e44-001**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ResourceNotFound.InstanceId | The specified resource of %s is not found. | The specified instance is not found |
400 | IncorrectStatus.VpcPeer | The 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. |
400 | OperationDenied.RouteEntryExist | The operation is not allowed because of existing routeEntry point to VpcPeer. | The VPC peering connection cannot be deleted because a route points to the VPC peering connection. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-01-23 | API Description Update. The Error code has changed | View Change Details |