Deletes an IPsec-VPN connection.

Usage notes

  • If the IPsec-VPN connection is associated with a transit router, you must first disassociate the IPsec-VPN connection from the transit router before you delete the IPsec-VPN connection.
  • If the IPsec-VPN connection is not associated with a resource, you can call the DeleteVpnAttachment to delete the IPsec-VPN connection.

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 DeleteVpnAttachment

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

RegionId String Yes ap-southeast-2

The ID of the region to which the IPsec-VPN connection belongs.

You can call the DescribeRegions operation to query the most recent region list.

VpnConnectionId String Yes vco-p0w7gtr14m09r9lkr****

The ID of the IPsec-VPN connection.

ClientToken String No 123e4567-e89b-12d3-a456-4266****

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. ClientToken can contain only ASCII characters.

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

Response parameters

Parameter Type Example Description
RequestId String 29440C49-398F-3D06-BA8B-E3CD13F3246D

The ID of the request.

Code String 200

The status code returned for the operation. A value of 200 indicates that the operation is performed.

Success Boolean true

Indicates whether the operation is performed.

  • true: yes
  • false: no
Message String successful

The information returned for the operation.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DeleteVpnAttachment
&RegionId=ap-southeast-2
&VpnConnectionId=vco-p0w7gtr14m09r9lkr****
&ClientToken=123e4567-e89b-12d3-a456-4266****
&<Common request parameters>

Sample success responses

XML format

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

<DeleteVpnAttachmentResponse>
    <RequestId>29440C49-398F-3D06-BA8B-E3CD13F3246D</RequestId>
    <Code>200</Code>
    <Success>true</Success>
    <Message>successful</Message>
</DeleteVpnAttachmentResponse>

JSON format

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

{
  "RequestId" : "29440C49-398F-3D06-BA8B-E3CD13F3246D",
  "Code" : "200",
  "Success" : true,
  "Message" : "successful"
}

Error codes

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