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

更新时间:
复制 MD 格式

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

接口说明

  • ModifyRouteEntry 接口不支持并发修改同一个自定义路由条目的名称和描述。

  • ModifyRouteEntry 接口在并发情况下可能返回 TaskConflict 错误码,请酌情重试。

调试

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

调试

授权信息

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

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

vpc:ModifyRouteEntry

update

*RouteTable

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

请求参数

名称

类型

必填

描述

示例值

RegionId

string

路由条目所在的地域 ID。

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

cn-hangzhou

RouteEntryName

string

路由条目的名称。

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

EntryName

RouteEntryId

string

自定义路由条目 ID。

rte-acfvgfsghfdd****

Description

string

路由条目的描述。

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

EntryDescription

NewNextHopType

string

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

  • Instance:ECS 实例。

  • HaVip:高可用虚拟 IP。

  • RouterInterface:路由器接口。

  • NetworkInterface:弹性网卡。

  • VpnGateway:VPN 网关。

  • IPv6Gateway:IPv6 网关。

  • NatGateway:NAT 网关。

  • Attachment:转发路由器。

  • VpcPeer:VPC 对等连接。

  • Ipv4Gateway:IPv4 网关。

  • GatewayEndpoint:网关终端节点。

  • Ecr:专线网关。

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

枚举值:

  • HaVip :

    HaVip

  • VpnGateway :

    VpnGateway

  • GatewayLoadBalancerEndpoint :

    GatewayLoadBalancerEndpoint

  • VpcPeer :

    VpcPeer

  • Instance :

    Instance

  • NetworkInterface :

    NetworkInterface

  • NatGateway :

    NatGateway

  • Attachment :

    Attachment

  • Ipv4Gateway :

    Ipv4Gateway

  • GatewayEndpoint :

    GatewayEndpoint

  • Ecr :

    Ecr

  • RouterInterface :

    RouterInterface

  • IPv6Gateway :

    IPv6Gateway

NetworkInterface

NewNextHopId

string

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

eni-bp17y37ytsenqyim****

RouteTableId

string

路由表 ID。

vtb-bp1nk7zk65du3pni8z9td

DestinationCidrBlock

string

路由条目的目标网段,支持 IPv4 网段、IPv6 网段。

说明

RouteEntryId 参数未输入时,DestinationCidrBlockRouteTableId 参数必填。 当需要修改路由的目标网段为 前缀列表 时,必须传入 RouteEntryId 参数,且 DestinationCidrBlock 参数不支持传入前缀列表网段或前缀列表实例 ID。

192.168.0.0/24

DryRun

boolean

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

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

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

返回参数

名称

类型

描述

示例值

object

返回信息。

RequestId

string

请求 ID。

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

示例

正常返回示例

JSON格式

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

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidRouteEntryId.NotFound Specified RouteEntryId does not exist. 指定的路由条目未找到
400 InvalidRouteEntryName.Malformed Specified RouteEntry name is not valid. 无法修改,因为指定的路由条目名称无效
400 OperationDenied.ModifyManagedRouteEntry 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 MissingParam.NewNextHopId The parameter NewNextHopId is mandatory. 修改路由条目下一跳缺失待修改路由条目下一跳实例ID信息。
400 IllegealParam.NextHopType The parameter NewNextHopType is illegal. 路由条目下一跳类型非法。
400 UnsupportedFeature.NormalTypeNatGateway Normal nat gateways do not support modifying the next hop of the route. 指向普通类型NAT网关的路由条目不支持修改下一跳。
400 UnsupportedFeature.NextHopType The route type does not support modifying the next hop of the route. 当前路由条目不支持修改下一跳信息。
400 InvalidRouteTable.NotFound The specified routetable does not exist. 路由表实例不存在。
400 InvalidNetworkInterface.NotFound The specified network interface does not exist. 指定的网卡类型下一跳实例ID不存在。
400 OperationDenied.NextHopExist The operation is not allowed because the nexthop already exists. 需要修改的目标路由条目下一跳已存在。
400 MissingParam.NewNextHopType The parameter NewNextHopType is mandatory. 修改路由条目下一跳缺失待修改路由条目下一跳实例类型信息。
400 UnsupportedFeature.ModifyRouteEntryNextHop The current region does not support the function of modifying the route next hop. 当前地域不支持修改路由下一跳功能。
400 IncorrectRouteEntryStatus Some route entry status blocked this operation.
400 ResourceNotFound.VSwitch The vSwitch where the specified networkinterface is located does not exist. 弹性网卡所在的交换机不存在
400 MissingParam.RouteEntryId The param of %s is missing. 缺少必须参数
400 IllegalParam.RouteEntryName The param of %s is illegal. 指定路由名称不合法
400 OperationDenied.LocalRouteEntryModified The next hop of a local route is modified. 存在local类型的路由下一跳被修改了。
400 OperationDenied.IllegalNewNextHopType When modifying the next hop of a route of the local type, a new next hop type that is not supported is passed in. 修改local类型的路由下一跳时,传入了不支持的新的下一跳类型。
400 UnsupportedFeature.VpcAdvancedFeature The VPC does not support some advanced features. VPC不支持某些高级功能,请提交工单处理。
400 UnsupportedRegion The feature is not supported in current region. 当前地域不支持该功能。
400 OperationFailed.NotSupportIPV6 The specified next hop does not support IPv6. 指定的下一跳不支持IPv6功能。
400 UnsupportedFeature.ModifyIpv6RouteEntryNextHop The current region does not support the feature of modifying the IPv6 route next hop. 操作失败,因为当前地域不支持修改IPv6路由下一跳。
400 OperationDenied.NewNextHopNotSupportPublish New nexthop is not supported for published route entry. 该路由条目已经发布到其他组件,指定的下一跳类型不支持路由发布。
400 IllegalParam.DestCidrBlock The destCidrBlock is invalid. 传入的目标地址不合法
400 IllegalParamFormat.DstCidrBlock The format of the specified destination CIDR block is invalid. 目的CIDR格式不正确。
400 MissingParam.RouteEntryIdOrRouteTableDstCidr The 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,或者同时提供RouteTableIdDestinationCidrBlock。
400 MissingParam.ParameterMustNotNull %s, %s. 缺少必须传入的参数。
400 ResourceNotFound.RouteTable The specified resource gatewayRouteTable is not found. 网关路由表不存在
400 OperationDenied.UpdateGatewayRouteEntry The operation is not allowed because of need switch to local first. 修改网关路由条目失败,下一跳必须首先修改为local路由,才能自定义下一跳
400 ResourceNotFound.RouteEntry The specified resource routeEntry is not found. 指定的路由条目不存在
400 IncorrectStatus.RouteEntry The status of %s [%s] is incorrect. 路由条目处于非稳态
400 IncorrectStatus.Vswitch The status of %s [%s] is incorrect. 指定的vSwitch处于非稳态。
400 ResourceNotFound.Instance The specified resource nextHop is not found. 下一跳实例不存在
400 IncorrectStatus.NextHop The status of %s [%s] is incorrect. 指定的下一跳资源处于非稳态
400 OperationDenied.NextHopTypeNonsupport The operation is not allowed because of nextHopType is nonsupport. 不支持指定该资源类型为下一跳
400 OperationDenied.LocalEntryCanOnlyModifyNextHop Only the nextHop parameter can be modified for a local route entry. Local路由只能修改下一跳属性。
400 ExclusiveParam.NextHopTypeAndNextHopId The param of nextHopType and nextHopId are mutually exclusive. 下一跳类型和下一跳实例不匹配。
400 InvalidRouterInterfaceId.NotFound The specified RouterInterfaceId does not exist in our record.
400 OperationUnsupported.OnlySupportNormalNetworkInterface Next hop only supports binding normal network Interface. 下一跳只支持绑定普通弹性网卡
400 UnsupportedFeature.Ipv6GatewayRouteTable The feature of %s is not supported. 您指定的网关路由表暂不支持绑定该网关实例
400 OperationDenied.TrAttachmentIpv6Disabled The operation is not allowed because tr attachment Ipv6 is disabled. Tr Attachment未开启Ipv6能力
400 InvalidAttachment.NotFound The attachment is not found. Attachment不存在。
400 OperationDenied.LocalRouteEntryInSystemRouteTable The Local Route Entry In System Route Table Can Not Be Modify. 禁止修改系统路由表中的Local路由。
400 OperationDenied.LocalRouteEntryBoundToVSwitch The 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路由所属的交换机正与当前路由表绑定,禁止修改其下一跳。
400 OperationFailed.ModifyEcmpRoute Operation is failed because ecmp route can not modify.
400 InvalidRouteEntry.NotFound vpc route entry not exist. vpc路由表项不存在
400 OperationDenied.IllegalRouteTargetGroupMemberType This operation does not support route target groups with NAT gateway members. 当前操作不支持成员为NAT网关类型的路由目标组。
400 OperationUnsupported.Ipv6EntryOnPrimaryNetworkInterface You cannot create IPv6 route entries on a primary network interface. 不允许创建下一跳为主网卡的IPv6路由。
403 Forbbiden User not authorized to operate on the specified resource. 用户没有权限操作指定的资源。
404 ResourceNotFound.NatGateway The specific NAT gateway is not found. 指定的 NAT 网关不存在。
404 ResourceNotFound.GatewayLoadBalancerEndpoint GatewayLoadBalancerEndpoint instance not found. 未找到GatewayLoadBalancerEndpoint实例。

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

变更历史

更多信息,参考变更详情