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

Usage notes

DeleteTransitRouterVpcAttachment is an asynchronous operation. After you send a request, the system returns the request ID but the operation is still being performed in the system background. You can call ListTransitRouterVpcAttachments to query the status of a VPC connection.

  • If a VPC is in the Detaching state, the VPC connection is being deleted. You can query the VPC connection but cannot perform other operations.
  • If a VPC connection cannot be found, it is deleted.

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. For more information about how to delete routes from a VPC route table, see DeleteRouteEntry.
  • The route tables of the Enterprise Edition transit router do not contain a custom route entry whose next hop is the network instance connection. For more information about how to delete custom routes from the route tables of an Enterprise Edition transit router, see DeleteTransitRouterRouteEntry.
  • The route tables of the Enterprise Edition transit router do not contain a route that is generated from a prefix list and the next hop is the VPC connection. You can delete routes from a route table by disassociating the route table from the prefix list. For more information, see DeleteTransitRouterPrefixListAssociation.

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 DeleteTransitRouterVpcAttachment

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

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.
TransitRouterAttachmentId String Yes tr-attach-ia340z7xis7t5s****

The ID of the VPC connection.

DryRun Boolean No false

Specifies whether to perform a precheck to check information such as the permissions and instance status. Valid values:

  • false (default): sends the request. After the request passes the precheck, the VPC connection is deleted.
  • true: sends a precheck request but does not delete the VPC connection. If you use this value, the system checks the required parameters and the request syntax. If the request fails to pass the precheck, an error message is returned. If the request passes the check, 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
&ClientToken=02fb3da4-130e-11e9-8e44-001****
&TransitRouterAttachmentId=tr-attach-ia340z7xis7t5s****
&DryRun=false
&Common request parameters

Sample success responses

XML format

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

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

JSON format

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

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

Error codes

HttpCode Error codes Error message Description
400 OperationFailed.RouteTableAssociationExist Operation failed because TransitRouterRouteTable exists The error message returned because you cannot perform the operation 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 specified inter-region 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.