DeleteRouteEntry - 删除自定义路由条目

更新时间:
复制 MD 格式

调用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:DeleteRouteEntry

delete

*RouteTable

acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}

请求参数

名称

类型

必填

描述

示例值

RegionId

string

路由表所属地域的 ID。

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

cn-hangzhou

RouteTableId

string

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

说明

RouteEntryId 参数未输入时,DestinationCidrBlockRouteTableId 参数必填,并根据需求配置 NextHopIdNextHopList 参数。

vtb-2ze3jgygk9bmsj23s****

RouteEntryId

string

要删除的路由条目 ID,和 DestinationCidrBlock 参数互斥。

说明

DestinationCidrBlock 参数未输入时,RouteEntryId 参数必填。

rte-bp1mnnr2al0naomnpv****

DestinationCidrBlock

string

路由条目的目标网段,支持 IPv4 网段、IPv6 网段、前缀列表网段和前缀列表的实例 ID,和 RouteEntryId 参数互斥。

说明

RouteEntryId 参数未输入时,DestinationCidrBlockRouteTableId 参数必填,并根据需求配置 NextHopIdNextHopList 参数。

47.100.XX.XX/16

NextHopId

string

下一跳实例的 ID。

  • 删除 ECMP 外的其他路由条目时,请配置 NextHopId,无需配置 NextHopList

  • 删除 ECMP 路由条目时,请配置 NextHopList,无需配置 NextHopId

ri-2zeo3xzyf38r4urzd****

NextHopList

array<object>

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

object

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

NextHopId

string

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

ri-2zeo3xzyf38r43cd****

NextHopType

string

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

RouterInterface

DryRun

boolean

是否只预检此次请求,取值:

true:发送请求,不会删除路由条目。检查项包括 AccessKey 是否有效、RAM 用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DryRunOperation

false(默认值):发送正常请求,通过检查后返回 2xx HTTP 状态码并直接删除路由条目。

返回参数

名称

类型

描述

示例值

object

返回信息。

RequestId

string

请求 ID。

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

示例

正常返回示例

JSON格式

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

错误码

HTTP status code

错误码

错误信息

描述

400 MissingParameter Miss mandatory parameter.
400 IncorrcetRouteEntryStatus Some route entry status blocked this operation.
400 InvalidCidrBlock.Malformed Specified CIDR block is not valid.
400 OperationDenied Specified operation is denied as route entry type is system.
400 InvalidRouteEntry.NotFound Route entry not exists.
400 InvalidVRouter.NotFound vRouter not exists.
400 IncorrectRouteEntryStatus Some route entry status blocked this operation.
400 Forbbiden Specified RouteEntry cannot allowed delete by openApi.
400 InvalidNextHop Specified nexthop and nexthop list cannot both null.
400 InvalidRouteEntry Specified routeEntry not exist.
400 Forbidden.VRouterNotFound pecified virtual switch is not found during access authentication.
400 TaskConflict The operation is too frequent, TaskConflict. 操作太频繁,请稍后重试
400 InvalidRouteEntryId.NotFound Specified RouteEntryId does not exist. 指定的路由条目未找到
400 IncorrectVpcStatus Current VPC status does not support this operation.
400 InvalidVpnInstanceId.NotFound %s
400 ParamExclusive.RouteEntryIdAndRouteTableIdOrDestCidrBlock %s
400 InvalidNextHopList.Size Nexthop list size should be between 2 and 16
400 ParamExclusive.NextHopIdAndList NextHopId and NextHopList cannot both be not null.
400 OperationFailed.DeleteMultiScopeEntry Multi or ecmp scope must delete with force.
400 OperationFailed.DistibuteLock Distibute lock fail. 操作被其他请求加锁;
400 OperationDenied.DeleteManagedRouteEntry The operation is not allowed because of route entry is managed. 无法删除被云服务托管的路由。
400 OperationDenied.RouteTableTypeNotPermitted The operation is not allowed because the type of route table is not permitted. 指定路由表类型不允许创建路由条目
400 IncorrectStatus.VpcRouteEntry The status of the specified routeEntry is invalid. VPC路由条目状态不正确。
400 OperationDenied.NextHopNotChanged The operation is not allowed because of NextHopNotChanged. 制定操作被禁止,因为下一跳未发生改变
400 OperationDenied.DeleteGatewayEndpointRoute The operation is not allowed to delete route entry pointing gateway endpoint.. 无法手动删除指向GatewayEndpoint的路由。
400 IncorrectStatus.PrefixList The status of prefixList is incorrect. PrefixList处于中间态,无法操作
400 InvalidCidrBlock Specified CIDR block is not valid. 可能的报错原因: 1. 您不在10.0.0.0/8的路由网段的白名单中,不能使用该网段。 2. 添加的自定义路由目标网段不能从属于同一个VPC下面所有交换机的网段。 3. 由于100.64.0.0/10是云服务地址,您不能再添加该网段指向云下IDC。 4. 除100.64.0.0/10以外,100.64.0.0/11、100.96.0.0/11等明细路由网段均不能使用在云下IDC。
400 OperationDenied.VbrAttachEcrInMiddleStatus The operation is not allowed because of VBR attach or detach ECR in middle status. 由于边界路由器正处于加载或者卸载专线网关过程中,当前操作无法执行,请您稍等后重试。
400 UnsupportedFeature.NextHopType The operation is not allowed because the NextHopType of specified RouteEntry is modified from Local type. 操作不允许,因为路由的下一跳类型修改自Local类型。
400 ResourceNotFound.PrefixList The specified resource of prefixList is not found. 输入的prefixList不存在
500 Vpc.Error error code 500,Internal server error.
500 Internal.Error The request processing has failed due to some unknown error, exception or failure.
500 InternalError The request processing has failed due to some unknown error, exception or failure. 内部错误
404 InvalidRouteTableId.NotFound Specified route table does not exist.
404 InvalidVpcId.NotFound Specified value of VpcId is not found in our record. VPC不存在,请您检查输入的VPC是否正确。
404 ResourceNotFound.GatewayLoadBalancerEndpoint GatewayLoadBalancerEndpoint instance not found. 未找到GatewayLoadBalancerEndpoint实例。

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

变更历史

更多信息,参考变更详情