Deletes a router interface.

Note the following before you delete a router interface:
  • You can only delete a router interface in the Idle or Inactive state.

  • Before deleting a router interface, you must delete all custom route entries pointing to it.


By using API Explorer, you can easily debug APIs, automatically generate SDK code examples, and quickly search for APIs.

Request parameters

Parameter Type Required? Example value Description
Action String Yes DeleteRouterInterface

The name of this action. Value: 


RegionId String Yes cn-shanghai

The ID of the region to which the router interface belongs.

To query the region ID, call DescribeRegions.

RouterInterfaceId String Yes ri-2zeo3xzyf38r4urzdpvfs

The ID of the router interface.

ClientToken String No qwefcc12123333334f

A client token used to guarantee the idempotence of requests.

This parameter value is generated by the client and must be unique. It must be 1 to 64 ASCII characters in length.

Response parameters

Parameter Type Example value Description
RequestId String 4EC47282-1B74-4534-BD0E-403F3EE64CAF The ID of the request.


Request example

Response example
  • XML format

  • JSON format


Error codes

HTTP status code Error code Error message Description
400 IncorrectStatus This openeration would be allowed only when status of this RouterInterface is Idle/Inactive. This operation cannot be performed because the router interface is not 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. You cannot delete this router interface because a route entry is using it as the next hop. You need to delete the route entry before you can delete this router interface.
404 InvalidInstanceId.NotFound The InstanceId provided does not exist in our records. The specified ECS instance does not exist. That is, the instance is not under the VPC.
400 InvalidRouterInterfaceChargeType.Malformed The prepaid routerinterface can not delete. You cannot delete a Subscription router interface.

See common error codes