You need to enable JavaScript to run this app.
VPN Connet

VPN Connet

Copy page
Download PDF
Customer gateway
DeleteCustomerGateway - Deleting a customer gateway
Copy page
Download PDF
DeleteCustomerGateway - Deleting a customer gateway
Call DeleteCustomerGateway to delete a specified customer gateway.​
Instructions​
You can only delete customer gateways that are not used by any IPsec-VPN connections. If used, call DeleteVpnConnection to delete the IPsec-VPN connection before deleting the customer gateway.​
Debug​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
The following only details request parameters specific to this API and key common parameters. For more information, see Common parameters.​
Action String required Example: DeleteCustomerGateway​
The action that you want to perform. Value: DeleteCustomerGateway.​
​
Version String required Example: 2020-04-01​
The API version.​
​
CustomerGatewayId String required Example: cgw-3tex2x1cwd4c6c0v****​
The ID of the customer gateway to be deleted. You can call DescribeCustomerGateways to query the customer gateway ID.​
​
​
Response parameters​
Only the response parameters specific to this API are listed below. For more information, see Response structure.​
RequestId String optional Example: 202203211611080102121461940900****​
Request ID.​
​
​
Request examples​
​
GET /?Action=DeleteCustomerGateway&Version=2020-04-01&CustomerGatewayId=cgw-2d670j2o9lc0058ozfddg**** HTTP/1.1​
Host: vpn.cn-beijing.volcengineapi.com​
X-Date: 20251029T033538Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251029/cn-beijing/vpn/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
Response examples​
​
{​
"ResponseMetadata": {​
"RequestId": "202203211611080102121461940900****",​
"Action": "DeleteCustomerGateway",​
"Version": "2020-04-01",​
"Service": "vpn",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "202203211611080102121461940900****"​
}​
}​
​
Error codes​
The following table lists the error codes related to the business logic for this API. For details, see Common error codes.​
​
Status code​
Error codes​
Error message​
Description​
400​
InvalidCustomerGateway.InvalidStatus​
The specified customer gateway is not in the correct status for the request.​
The specified customer gateway cannot respond to this request due to its status.​
400​
InvalidCustomerGateway.InUse​
The specified customer gateway has dependent resource of connection.​
The specified customer gateway cannot be deleted because it has a connection.​
404​
InvalidCustomerGateway.NotFound​
The specified customer gateway does not exist.​
The specified customer gateway does not exist.​
​
Last updated: 2026.05.09 11:19:49