呼叫 ModifyRouteEntry 修改自訂路由條目的名稱、描述和路由下一跳。
介面說明
ModifyRouteEntry 介面不支援並發修改同一個自訂路由條目的名稱和描述。
ModifyRouteEntry 介面在並發情況下可能返回 TaskConflict 錯誤碼,請酌情重試。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:ModifyRouteEntry |
update |
*RouteTable
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
路由條目所在的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-hangzhou |
| RouteEntryName |
string |
否 |
路由條目的名稱。 名稱長度為 1~128 個字元,不能以 |
EntryName |
| RouteEntryId |
string |
否 |
自訂路由條目 ID。 |
rte-acfvgfsghfdd**** |
| Description |
string |
否 |
路由條目的描述。 描述長度為 1~256 個字元,不能以 |
EntryDescription |
| NewNextHopType |
string |
否 |
新路由條目下一跳類型。取值如下:
枚舉值:
|
NetworkInterface |
| NewNextHopId |
string |
否 |
新路由條目下一跳執行個體 ID。 |
eni-bp17y37ytsenqyim**** |
| RouteTableId |
string |
否 |
路由表 ID。 |
vtb-bp1nk7zk65du3pni8z9td |
| DestinationCidrBlock |
string |
否 |
路由條目的目標網段,支援 IPv4 網段、IPv6 網段。 說明
當 RouteEntryId 參數未輸入時,DestinationCidrBlock 和 RouteTableId 參數必填。 當需要修改路由的目標網段為前綴列表時,必須傳入 RouteEntryId 參數,且 DestinationCidrBlock 參數不支援傳入前綴列表網段或前綴列表執行個體 ID。 |
192.168.0.0/24 |
| DryRun |
boolean |
否 |
是否只預檢此次請求,取值: true:傳送請求,不會修改路由條目。檢查項包括 AccessKey 是否有效、RAM 使用者的授權情況和是否填寫了必需參數。如果檢查不通過,則返回對應錯誤。如果檢查通過,會返回錯誤碼 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,或者同时提供RouteTableId和DestinationCidrBlock。 |
| 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实例。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。