赛尔校园公共服务平台 Logo
平台使用
阿里云
百度云
移动云
智算服务
教育生态
登录 →
赛尔校园公共服务平台 Logo
平台使用 阿里云 百度云 移动云 智算服务 教育生态
登录
  1. 首页
  2. 阿里云
  3. 专有网络VPC
  4. 开发参考
  5. API参考
  6. API目录
  7. 路由表
  8. ModifyRouteEntry - 修改自定义路由条目的名称描述或者路由下一跳

ModifyRouteEntry - 修改自定义路由条目的名称描述或者路由下一跳

  • 路由表
  • 发布于 2025-04-22
  • 0 次阅读
文档编辑
文档编辑

调用ModifyRouteEntry修改自定义路由条目的名称、描述和路由下一跳。

接口说明

  • ModifyRouteEntry 接口不支持并发修改同一个自定义路由条目的名称和描述。
  • ModifyRouteEntry 接口在并发情况下可能返回 TaskConflict 错误码,请酌情重试。

调试

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

调试

授权信息

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

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

请求参数

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

路由条目所在的地域 ID。

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

cn-hangzhou
RouteEntryNamestring否

路由条目的名称。

名称长度为 1~128 个字符,不能以http://或https://开头。

EntryName
RouteEntryIdstring否

自定义路由条目 ID。

rte-acfvgfsghfdd****
Descriptionstring否

路由条目的描述。

描述长度为 1~256 个字符,不能以http://或https://开头。

EntryDescription
NewNextHopTypestring否

新路由条目下一跳类型。取值如下:

  • Instance:ECS 实例。

  • HaVip:高可用虚拟 IP。

  • RouterInterface:路由器接口。

  • NetworkInterface:弹性网卡。

  • VpnGateway:VPN 网关。

  • IPv6Gateway:IPv6 网关。

  • NatGateway:NAT 网关。

  • Attachment:转发路由器。

  • VpcPeer:VPC 对等连接。

  • Ipv4Gateway:IPv4 网关。

  • GatewayEndpoint:网关终端节点。

  • Ecr:专线网关。

  • GatewayLoadBalancerEndpoint:网关型负载均衡终端节点。

NetworkInterface
NewNextHopIdstring否

新路由条目下一跳实例 ID。

eni-bp17y37ytsenqyim****
RouteTableIdstring否

路由表 ID。

vtb-bp1nk7zk65du3pni8z9td
DestinationCidrBlockstring否

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

说明 当 RouteEntryId 参数未输入时,DestinationCidrBlock 和 RouteTableId 参数必填。
192.168.0.0/24

返回参数

名称类型描述示例值
object

返回信息。

RequestIdstring

请求 ID。

861E6630-AEC0-4B2D-B214-6CB5E44B7F04

示例

正常返回示例

JSON格式

{
  "RequestId": "861E6630-AEC0-4B2D-B214-6CB5E44B7F04"
}

错误码

HTTP status code错误码错误信息描述
400InvalidRouteEntryId.NotFoundSpecified RouteEntryId does not exist.指定的路由条目未找到
400InvalidRouteEntryName.MalformedSpecified RouteEntry name is not valid.无法修改,因为指定的路由条目名称无效
400InvalidRouteEntryId.NotFoundThe specified routeEntry does not exist.指定的路由条目不存在。
400OperationDenied.ModifyManagedRouteEntryThe 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.指定路由表类型不允许创建路由条目
400MissingParam.NewNextHopIdThe parameter NewNextHopId is mandatory.修改路由条目下一跳缺失待修改路由条目下一跳实例ID信息。
400IllegealParam.NextHopTypeThe parameter NewNextHopType is illegal.路由条目下一跳类型非法。
400UnsupportedFeature.NormalTypeNatGatewayNormal nat gateways do not support modifying the next hop of the route.指向普通类型NAT网关的路由条目不支持修改下一跳。
400UnsupportedFeature.NextHopTypeThe route type does not support modifying the next hop of the route.当前路由条目不支持修改下一跳信息。
400InvalidRouteTable.NotFoundThe specified routetable does not exist.路由表实例不存在。
400InvalidNetworkInterface.NotFoundThe specified network interface does not exist.指定的网卡类型下一跳实例ID不存在。
400OperationDenied.NextHopExistThe operation is not allowed because the nexthop already exists.需要修改的目标路由条目下一跳已存在。
400MissingParam.NewNextHopTypeThe parameter NewNextHopType is mandatory.修改路由条目下一跳缺失待修改路由条目下一跳实例类型信息。
400UnsupportedFeature.ModifyRouteEntryNextHopThe current region does not support the function of modifying the route next hop.当前地域不支持修改路由下一跳功能。
400IncorrectRouteEntryStatusSome route entry status blocked this operation.无法执行该操作,当前路由表中有路由条目的状态为pending或modifying。
400ResourceNotFound.VSwitchThe vSwitch where the specified networkinterface is located does not exist.弹性网卡所在的交换机不存在
400MissingParam.RouteEntryIdThe param of %s is missing.缺少必须参数
400IllegalParam.RouteEntryNameThe param of %s is illegal.指定路由名称不合法
400OperationDenied.LocalRouteEntryModifiedThe next hop of a local route is modified.存在local类型的路由下一跳被修改了。
400OperationDenied.IllegalNewNextHopTypeWhen modifying the next hop of a route of the local type, a new next hop type that is not supported is passed in.修改local类型的路由下一跳时,传入了不支持的新的下一跳类型。
400OperationDenied.LocalRouteEntryModifiedWhen you modify the next hop of a Local route in a custom routing table, the destination CIDR block of the Local route is exactly the same as the Cidr of a VSwitch bound to the routing table.修改自定义路由表Local路由的下一跳时,该Local路由的目的网段恰好和路由表绑定的某个交换机的Cidr相等。
400UnsupportedFeature.VpcAdvancedFeatureThe VPC does not support some advanced features.该VPC不支持某些高级功能,请提交工单处理。
400UnsupportedRegionThe feature is not supported in current region.当前地域不支持该功能。
400OperationFailed.NotSupportIPV6The specified next hop does not support IPv6.指定的下一跳不支持IPv6功能。
400UnsupportedFeature.ModifyIpv6RouteEntryNextHopThe current region does not support the feature of modifying the IPv6 route next hop.操作失败,因为当前地域不支持修改IPv6路由下一跳。
400OperationDenied.NewNextHopNotSupportPublishNew nexthop is not supported for published route entry.该路由条目已经发布到其他组件,指定的下一跳类型不支持路由发布。
400IllegalParam.DestCidrBlockThe destCidrBlock is invalid.传入的目标地址不合法
400IllegalParamFormat.DstCidrBlockThe format of the specified destination CIDR block is invalid.目的CIDR格式不正确。
400MissingParam.RouteEntryIdOrRouteTableDstCidrThe request is missing required parameters. You must provide either the RouteEntryId or the combination of RouteTableId and DestinationCidrBlock to proceed. Please ensure that one of these parameter sets is included in your request.请求缺少必要参数。您必须提供 RouteEntryId,或者同时提供RouteTableId和DestinationCidrBlock。
400MissingParam.ParameterMustNotNull%s, %s.缺少必须传入的参数。
400ResourceNotFound.RouteTableThe specified resource gatewayRouteTable is not found.网关路由表不存在
400OperationDenied.UpdateGatewayRouteEntryThe operation is not allowed because of need switch to local first.修改网关路由条目失败,下一跳必须首先修改为local路由,才能自定义下一跳
400ResourceNotFound.RouteEntryThe specified resource routeEntry is not found.指定的路由条目不存在
400IncorrectStatus.RouteEntryThe status of %s [%s] is incorrect.路由条目处于非稳态
400IncorrectStatus.VswitchThe status of %s [%s] is incorrect.指定的vSwitch处于非稳态。
400ResourceNotFound.InstanceThe specified resource nextHop is not found.下一跳实例不存在
400IncorrectStatus.NextHopThe status of %s [%s] is incorrect.指定的下一跳资源处于非稳态
400OperationDenied.NextHopTypeNonsupportThe operation is not allowed because of nextHopType is nonsupport.不支持指定该资源类型为下一跳
400OperationDenied.LocalEntryCanOnlyModifyNextHopOnly the nextHop parameter can be modified for a local route entry.Local路由只能修改下一跳属性。
400ExclusiveParam.NextHopTypeAndNextHopIdThe param of nextHopType and nextHopId are mutually exclusive.下一跳类型和下一跳实例不匹配。
400InvalidRouterInterfaceId.NotFoundThe specified RouterInterfaceId does not exist in our record.指定的路由器接口不存在,请您检查填写的路由器接口是否正确。
400OperationUnsupported.OnlySupportNormalNetworkInterfaceNext hop only supports binding normal network Interface.下一跳只支持绑定普通弹性网卡
400UnsupportedFeature.Ipv6GatewayRouteTableThe feature of %s is not supported.您指定的网关路由表暂不支持绑定该网关实例
400OperationDenied.TrAttachmentIpv6DisabledThe operation is not allowed because tr attachment Ipv6 is disabled.Tr Attachment未开启Ipv6能力
400InvalidAttachment.NotFoundThe attachment is not found.Attachment不存在。
400OperationDenied.LocalRouteEntryInSystemRouteTableThe Local Route Entry In System Route Table Can Not Be Modify.禁止修改系统路由表中的Local路由。
400OperationDenied.LocalRouteEntryBoundToVSwitchThe VSwitch to which the local route you modified belongs is bound to the current routing table. You are not allowed to modify its next hop.您所修改的Local路由所属的交换机正与当前路由表绑定,禁止修改其下一跳。
403ForbbidenUser not authorized to operate on the specified resource.用户没有权限操作指定的资源。
404ResourceNotFound.NatGatewayThe specific NAT gateway is not found.指定的 NAT 网关不存在。
404ResourceNotFound.GatewayLoadBalancerEndpointGatewayLoadBalancerEndpoint instance not found.未找到GatewayLoadBalancerEndpoint实例。

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

变更历史

变更时间变更内容概要操作
2025-04-14OpenAPI 错误码发生变更查看变更详情
2025-02-25OpenAPI 错误码发生变更查看变更详情
2025-02-14OpenAPI 错误码发生变更查看变更详情
2024-12-31OpenAPI 错误码发生变更查看变更详情
2024-11-19OpenAPI 错误码发生变更查看变更详情
2024-11-06OpenAPI 错误码发生变更查看变更详情
2024-10-28OpenAPI 错误码发生变更查看变更详情
2024-09-29OpenAPI 错误码发生变更查看变更详情
2024-09-13OpenAPI 错误码发生变更查看变更详情
2024-09-06OpenAPI 错误码发生变更查看变更详情
2024-09-03OpenAPI 错误码发生变更查看变更详情
2024-08-29OpenAPI 错误码发生变更、OpenAPI 入参发生变更查看变更详情
2024-06-05OpenAPI 错误码发生变更查看变更详情
2024-05-23OpenAPI 错误码发生变更查看变更详情
2024-03-25OpenAPI 错误码发生变更查看变更详情
2023-12-25OpenAPI 错误码发生变更查看变更详情
2023-09-15OpenAPI 错误码发生变更查看变更详情
2023-09-15OpenAPI 描述信息更新、OpenAPI 错误码发生变更、OpenAPI 入参发生变更查看变更详情
2023-05-08OpenAPI 错误码发生变更查看变更详情
相关文章

CreateRouteEntry - 创建自定义路由条目 2025-04-22 18:23

调用CreateRouteEntry在VPC路由器或边界路由器(VBR)上创建自定义路由条目。

CreateRouteEntries - 批量添加自定义路由条目 2025-04-22 18:23

在VPC路由器的路由表中批量添加自定义路由条目。 接口说

CreateRouteTable - 创建自定义路由表 2025-04-22 18:23

创建自定义路由表。 接口说明

AssociateRouteTable - 将路由表和交换机绑定 2025-04-22 18:23

将创建的自定义路由表和同一VPC内的交换机绑定。 接口说

DeleteRouteEntry - 删除自定义路由条目 2025-04-22 18:23

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

DeleteRouteEntries - 批量删除自定义路由条目 2025-04-22 18:23

调用DeleteRouteEntries批量删除自定义路由条目。

目录
Copyright © 2025 your company All Rights Reserved. Powered by 赛尔网络.
京ICP备14022346号-15
gongan beian 京公网安备11010802041014号