Deletes a router interface.

When you call this operation, take note of the following limits:

  • You can delete only a router interface that is in the Idle or Inactive state.
  • Before you delete a router interface, you must delete all custom route entries destined for the router interface.

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 DeleteRouterInterface

The operation that you want to perform.

Set the value to DeleteRouterInterface.

RegionId String Yes cn-shanghai

The ID of the region where the router interface is deployed. You can call the DescribeRegions operation to query region IDs.

RouterInterfaceId String Yes ri-2zeo3xzyf38r4urz****

The ID of the router interface.

ClientToken String No qwefcc12123333334f

The client token that is used to ensure the idempotency of the request.

You can use the client to generate the value, 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.

Response parameters

Parameter Type Example Description
RequestId String 4EC47282-1B74-4534-BD0E-403F3EE64CAF

The ID of the request.

Examples

Sample requests


http(s)://vpc.aliyuncs.com/? Action=DeleteRouterInterface
&RegionId=cn-shanghai
&RouterInterfaceId=ri-2zeo3xzyf38r4urz****
&<Common Request Parameters>

Sample success responses

XML format

<DeleteRouterInterfaceResponse>
      <RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
</DeleteRouterInterfaceResponse>

JSON format

{
	"RequestId":"0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}

Error codes

HttpCode Error code Error message Description
404 InvalidRegionId.NotFound The error message returned because the specified region ID is invalid.
400 IncorrectStatus This openeration would be allowed only when status of this RouterInterface is Idle/Inactive. The error message returned because you do not have the permissions to call this operation. The error message returned because the router interface is not in the Idle or Inactive state. You can call this operation only when the router interface is in the Idle or Inactive state.
400 DependencyViolation.RouterInterfaceReferedByRouteEntry RouterInterface cannot be deleted when it is refered by a route table entry as next hop. The error message returned because the router interface is used as a next hop of a route entry and cannot be deleted. Delete the route entry before you delete the router interface.
404 InvalidInstanceId.NotFound The InstanceId provided does not exist in our records. The error message returned because the Elastic Compute Service (ECS) instance does not exist in the virtual private cloud (VPC).
400 InvalidRouterInterfaceChargeType.Malformed The prepaid routerinterface can not delete. The error message returned because you cannot delete a subscription router interface.

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