Deletes a virtual private cloud (VPC) connection for an Enterprise Edition transit router.

Prerequisites

Before you delete a VPC connection, make sure that the following requirements are met:

  • No associated forwarding correlation is established between the VPC 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 VPC connection and the route tables of the Enterprise Edition transit router. For more information about how to delete a route learning correlation, see DisableTransitRouterRouteTablePropagation.
  • The route table of the VPC does not contain routes that point to the VPC 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 No DeleteTransitRouterVpcAttachment

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

TransitRouterAttachmentId String Yes tr-attach-ia340z7xis7t5s****

The ID of the VPC connection.

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 a token, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

DryRun Boolean No false

Specifies whether to only precheck the request. Check items include permissions and the status of the specified instances. Valid values:

  • false (default): sends a normal request. If the request passes the precheck, the VPC connection is deleted.
  • true: sends a request for precheck only. The VPC connection is not deleted after the request passes the precheck. If you select this option, the system checks whether the required parameters are set, and whether the request syntax is valid. If the request fails to pass the precheck, the system returns an error. If the request passes the precheck, the system returns the ID of the request.

Response parameters

Parameter Type Example Description
RequestId String 7E61D334-4025-41EF-9145-FC327B35301D

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DeleteTransitRouterVpcAttachment
&TransitRouterAttachmentId=tr-attach-ia340z7xis7t5s****
&<Common request parameters>

Sample success responses

XML format

<DeleteTransitRouterVpcAttachmentResponse> 
  <RequestId>7E61D334-4025-41EF-9145-FC327B35301D</RequestId>
</DeleteTransitRouterVpcAttachmentResponse>

JSON format

{
  "RequestId": "7E61D334-4025-41EF-9145-FC327B35301D"
}

Error codes

HttpCode Error code Error message Description
400 OperationFailed.RouteTableAssociationExist Operation failed because TransitRouterRouteTable exists The error message returned because you cannot delete the network instance connection when an associated forwarding correlation is configured.
400 OperationFailed.RouteEntryExist Operation failed because the TransitRouterAttachment exists in RouteTable. The error message returned because you cannot perform the operation when the network instance connection is specified as the next hop of one or more routes in the route table.
400 OperationFailed.RouteTablePropagationExist The specified TransitRouterAttachment has configured RouteTablePropagation. Please remove the configuration first. The error message returned because you cannot perform the operation when a route learning correlation is configured for the network instance connection.

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