Deletes a transit router.
Usage notes
DeleteTransitRouter is an asynchronous operation. After you send a request, the request ID is returned but the operation is still being performed in the system background. You can call ListTransitRouters to query the status of a transit router.
- If a transit router is in the Deleting state, the transit router is being deleted. In this case, you can query the transit router but cannot perform other operations.
- If a transit router cannot be found, the transit router is deleted.
Prerequisites
Before you delete a transit router, make sure that the following prerequisites are met:
- No network instance connections are created on the transit router.
- For more information about how to delete a virtual private cloud (VPC) connection, see DeleteTransitRouterVpcAttachment.
- For more information about how to delete a virtual border router (VBR) connection, see DeleteTransitRouterVbrAttachment.
- For more information about how to delete a Cloud Connect Network (CCN) connection, see DetachCenChildInstance.
- For more information about how to delete a VPN connection, see DeleteTransitRouterVpnAttachment.
- For more information about how to delete an inter-region connection, see DeleteTransitRouterPeerAttachment.
- No custom route tables are created on the transit router. For more information about how to delete a custom route table, see DeleteTransitRouterRouteTable.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DeleteTransitRouter |
The operation that you want to perform. Set the value to DeleteTransitRouter. |
| ClientToken | String | No | 02fb3da4-130e-11e9-8e44-001**** |
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. Check items include permissions and the status of the transit router. Valid values:
|
| TransitRouterId | String | Yes | tr-uf654ttymmljlvh2x**** |
The ID of the transit router. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 6DE3EE92-39C8-4BBD-A3AD-F568D74741BB |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DeleteTransitRouter
&ClientToken=02fb3da4-130e-11e9-8e44-001****
&DryRun=false
&TransitRouterId=tr-uf654ttymmljlvh2x****
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteTransitRouterResponse>
<RequestId>6DE3EE92-39C8-4BBD-A3AD-F568D74741BB</RequestId>
</DeleteTransitRouterResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6DE3EE92-39C8-4BBD-A3AD-F568D74741BB"
}
Error codes
| HttpCode | Error codes | Error message | Description |
|---|---|---|---|
| 400 | OperationFailed.DeleteTransitRouter | Operation failed because TransitRouterRouteEntry exists | The error message returned because the specified transit router cannot be deleted when route entries are configured for the transit router. |
| 400 | OperationFailed.DeleteTransitRouter | Operation failed because TransitRouterRouteTable exists | The error message returned because the specified transit router cannot be deleted when custom route tables are associated with the transit router. |
| 400 | IncorrectStatus.TransitRouterInstance | The status of TransitRouter is incorrect. | The error message returned because the transit router cannot be deleted in the current state. |
| 400 | OperationFailed.BandwidthLimitExist | Operation is invalid because a bandwidth limit exist. | The error message returned because the transit router cannot be deleted when bandwidth throttling is enabled for the transit router. |
For a list of error codes, visit the API Error Center.