全部产品
Search
文档中心

专有网络 VPC:DeleteRouteEntry - 删除自定义路由条目

更新时间:Mar 04, 2024

调用DeleteRouteEntry删除VPC路由器或边界路由器的路由表中的路由条目。

接口说明

调用本接口删除路由条目时,请注意:

  • 只有处于 Available 状态的路由条目可以被删除。

  • 路由表所在的 VPC 正在进行创建或删除交换机或路由条目时,无法删除路由条目。

  • 如果需要删除边界路由器的路由表中的路由条目,请通过 DescribeRouteEntryList 接口查询要删除的路由条目的 NextHopId 后,再通过本接口删除路由条目。

  • DeleteRouteEntry 接口属于异步接口,即系统会返回一个请求 ID,但该路由条目尚未删除成功,系统后台的删除任务仍在进行。您可以调用 DescribeRouteEntryList 查询路由条目的删除状态:

    • 当路由条目处于 Deleting 状态时,表示路由条目正在删除中。
    • 当查询不到指定的路由条目时,表示路由条目删除成功。
  • DeleteRouteEntry 接口不支持在同一个 VPC 或者同一个 VBR 中并发删除路由表中的路由条目。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
vpc:DeleteRouteEntryWrite
  • RouteTable
    acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}

请求参数

名称类型必填描述示例值
RegionIdstring

路由表所属地域的 ID。

您可以通过调用 DescribeRegions 接口获取地域 ID。

cn-hangzhou
RouteTableIdstring

路由条目所在的路由表的 ID。

vtb-2ze3jgygk9bmsj23s****
RouteEntryIdstring

要删除的路由条目 ID。

rte-bp1mnnr2al0naomnpv****
DestinationCidrBlockstring

路由条目的目标网段,支持 IPv4 网段、IPv6 网段和前缀列表网段。

47.100.XX.XX/16
NextHopIdstring

下一跳实例的 ID。

  • 删除 ECMP 外的其他路由条目时,请配置 NextHopId,无需配置 NextHopList
  • 删除 ECMP 路由条目时,请配置 NextHopList,无需配置 NextHopId
ri-2zeo3xzyf38r4urzd****
NextHopListobject []

ECMP 路由的下一跳实例信息。最多支持 16 个下一跳实例信息。

NextHopIdstring

ECMP 路由条目的下一跳实例的 ID。最多支持 16 个下一跳实例信息。

ri-2zeo3xzyf38r43cd****
NextHopTypestring

ECMP 路由的下一跳的类型,目前只能取值 RouterInterface(路由器接口)。最多支持 16 个下一跳实例信息。

RouterInterface

返回参数

名称类型描述示例值
object

返回信息。

RequestIdstring

请求 ID。

0ED8D006-F706-4D23-88ED-E11ED28DCAC0

示例

正常返回示例

JSON格式

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

错误码

HTTP status code错误码错误信息描述
400MissingParameterMiss mandatory parameter.缺少必要参数,请您检查必填参数是否都已填后再进行操作。
400IncorrcetRouteEntryStatusSome route entry status blocked this operation.无法执行该操作,因为有些路由条目的状态是pending或modifying。
400InvalidCidrBlock.MalformedSpecified CIDR block is not valid.该CIDR格式不正确。
400OperationDeniedSpecified operation is denied as route entry type is system.无法执行该操作,因为路由条目是系统路由。
400InvalidRouteEntry.NotFoundRoute entry not exists.该路由条目不存在,请您检查路由条目是否正确。
400InvalidVRouter.NotFoundvRouter not exists.路由器不存在,请您检查输入的路由器是否正确。
400IncorrectRouteEntryStatusSome route entry status blocked this operation.无法执行该操作,当前路由表中有路由条目的状态为pending或modifying。
400IncorrectRouteEntryStatusVBR has NotStable route entry.无法执行该操作,边界路由表中有路由条目的状态为pending或modifying。
400IncorrectRouteEntryStatusSpecified routeEntry status error.无法执行该操作,当前路由表中有路由条目的状态为pending或modifying。
400ForbbidenSpecified RouteEntry cannot allowed delete by openApi.不允许使用API删除该路由条目。
400InvalidNextHopSpecified nexthop and nexthop list cannot both null.下一跳和下一跳列表不能同时为空。
400InvalidRouteEntrySpecified routeEntry not exist.该路由条目不存在。
400Forbidden.VRouterNotFoundpecified virtual switch is not found during access authentication.-
400TaskConflictThe operation is too frequent, TaskConflict.操作太频繁,请稍后重试
400InvalidRouteEntryId.NotFoundSpecified RouteEntryId does not exist.指定的路由条目未找到
400IncorrectVpcStatusCurrent VPC status does not support this operation.当前VPC的状态无法支持这个操作。
400InvalidVpnInstanceId.NotFound%s-
400ParamExclusive.RouteEntryIdAndRouteTableIdOrDestCidrBlock%s-
400InvalidNextHopList.SizeNexthop list size should be between 2 and 16-
400ParamExclusive.NextHopIdAndListNextHopId and NextHopList cannot both be not null.-
400OperationFailed.DeleteMultiScopeEntryMulti or ecmp scope must delete with force.-
400OperationFailed.DistibuteLockDistibute lock fail.-
400OperationDenied.DeleteManagedRouteEntryThe operation is not allowed because of route entry is managed.无法删除被云服务托管的路由。
400OperationDenied.RouteTableTypeNotPermittedThe operation is not allowed because the type of route table is not permitted.指定路由表类型不允许创建路由条目
400IncorrectStatus.VpcRouteEntryThe status of the specified routeEntry is invalid.VPC路由条目状态不正确。
400OperationDenied.NextHopNotChangedThe operation is not allowed because of NextHopNotChanged.制定操作被禁止,因为下一跳未发生改变
400OperationDenied.DeleteGatewayEndpointRouteThe operation is not allowed to delete route entry pointing gateway endpoint..无法手动删除指向GatewayEndpoint的路由。
400IncorrectStatus.PrefixListThe status of prefixList is incorrect.PrefixList处于中间态,无法操作
404InvalidRouteTableId.NotFoundSpecified route table does not exist.该路由表不存在。
404InvalidVpcId.NotFoundSpecified value of VpcId is not found in our record.该VPC不存在,请您检查输入的VPC是否正确。
500Vpc.Errorerror code 500,Internal server error.-
500Internal.ErrorThe request processing has failed due to some unknown error, exception or failure.-

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-09-06OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:404
    删除错误码:500
2023-08-15OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:404
    删除错误码:500
2023-08-03OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:404
    删除错误码:500
2023-07-20OpenAPI 描述信息更新、OpenAPI 错误码发生变更看变更集
变更项变更内容
API 描述OpenAPI 描述信息更新
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:404
    删除错误码:500
2023-05-08OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:404
    删除错误码:500