Deletes a VPN connection.
Usage note
Before you delete a VPN connection, make sure that the following requirements are met:
- No associated forwarding correlation is established between the VPN connection and the route tables of the Enterprise Edition transit router. For more information about how to delete an associated forwarding correlation, see DissociateTransitRouterAttachmentFromRouteTable.
- No route learning correlation is established between the VPN connection and the route tables of the Enterprise Edition transit router. For more information about how to delete a route learning correlation, see DisableTransitRouterRouteTablePropagation.
- No route in the route table of the Enterprise Edition transit router points to the VPN connection. For more information, see DeleteTransitRouterRouteEntry.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DeleteTransitRouterVpnAttachment |
The operation that you want to perform. Set the value to DeleteTransitRouterVpnAttachment. |
| ClientToken | String | No | 123e4567-e89b-12d3-a456-42665544**** |
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, ClientToken is set to the value of RequestId. The value of RequestId may be different for each API request.
|
| DryRun | Boolean | No | false |
Specifies whether only to precheck the request. Valid values:
|
| TransitRouterAttachmentId | String | Yes | tr-attach-b9xj1dv69600kj**** |
The ID of the VPN connection. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | FA43C571-E88B-56C0-8FF8-5646D9B96297 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DeleteTransitRouterVpnAttachment
&ClientToken=123e4567-e89b-12d3-a456-42665544****
&DryRun=false
&TransitRouterAttachmentId=tr-attach-b9xj1dv69600kj****
&Common request parametersSample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteTransitRouterVpnAttachmentResponse>
<RequestId>FA43C571-E88B-56C0-8FF8-5646D9B96297</RequestId>
</DeleteTransitRouterVpnAttachmentResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "FA43C571-E88B-56C0-8FF8-5646D9B96297"
}Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | OperationFailed.RouteEntryExist | Operation failed because the TransitRouterAttachment exists in RouteTable. | The error message returned because you cannot perform the operation when the specified inter-region connection is specified as the next hop of one or more routes in the route table. |
For a list of error codes, visit the Error Center.