修改网关路由表的下一跳类型和下一跳。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:UpdateGatewayRouteTableEntryAttribute |
update |
*RouteTable
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
要修改的网关路由表所在地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
ap-southeast-6 |
| IPv4GatewayRouteTableId |
string |
否 |
要修改的网关路由表 ID。 |
vtb-5ts0ohchwkp3dydt2**** |
| GatewayRouteTableId |
string |
否 |
要修改的网关路由表 ID。 |
vtb-5ts0ohchwkp3dydt2**** |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
123e4567-e89b-12d3-a456-426655440000 |
| DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
| DestinationCidrBlock |
string |
是 |
网关路由表的路由条目的目标网段。 |
47.100.XX.XX/16 |
| NextHopType |
string |
是 |
要修改的路由条目下一跳类型。取值:
|
Instance |
| NextHopId |
string |
否 |
要修改的下一跳的实例 ID。
说明
当路由条目的下一跳类型为 Instance 或 NetworkInterface 时需要修改下一跳,您需要先将 NextHopType 修改为 Local,然后再将 NextHopType 修改为 Instance 或 NetworkInterface 之后修改具体的 NextHopId。当下一跳类型为弹性网卡或 ECS 实例时,不支持直接修改下一跳为其他的弹性网卡或 ECS 实例。 |
i-bp18xq9yguxoxe7m**** |
| Name |
string |
否 |
网关路由表的名称。 长度为 2~128 个字符,必须以字母或中文开头,可包含数字、半角句号(.)、下划线(_)和短划线(-)。 |
test |
| Description |
string |
否 |
网关路由表的描述信息。 长度为 2~256 个字符,必须以字母或中文开头,但不能以 |
new |
| RegionId |
string |
是 |
要修改的网关路由表所在地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
ap-southeast-6 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
示例
正常返回示例
JSON格式
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | OperationDenied.UpdateGatewayRouteEntry | The operation is not allowed because of need switch to local first. | 修改网关路由条目失败,下一跳必须首先修改为local路由,才能自定义下一跳 |
| 400 | IllegalParam.DestCidrBlock | The destCidrBlock is invalid. | 传入的目标地址不合法 |
| 400 | ResourceNotFound.NetworkInterface | The specified resource nextHop is not found. | 下一跳弹性网卡不存在 |
| 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 | ResourceNotFound.RouteTable | The specified resource gatewayRouteTable is not found. | 网关路由表不存在 |
| 400 | InvalidRouterInterfaceId.NotFound | The specified RouterInterfaceId does not exist in our record. | |
| 400 | OperationUnsupported.OnlySupportNormalNetworkInterface | Next hop only supports binding normal network Interface. | 下一跳只支持绑定普通弹性网卡 |
| 400 | UnsupportedRegion | The feature is not supported in current region. | 当前地域不支持该功能。 |
| 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 | BothEmptyParam.GatewayRouteTableIdAndIpv4GatewayRouteTableId | The parameter GatewayRouteTableId and Ipv4GatewayRouteTableId cannot be empty at the same time. We recommend that you use GatewayRouteTableId. | 参数GatewayRouteTableId和Ipv4GatewayRouteTableId不能同时为空,建议您使用GatewayRouteTableId。 |
| 400 | OperationUnsupported.Ipv6EntryOnPrimaryNetworkInterface | You cannot create IPv6 route entries on a primary network interface. | 不允许创建下一跳为主网卡的IPv6路由。 |
| 404 | ResourceNotFound.GatewayLoadBalancerEndpoint | GatewayLoadBalancerEndpoint instance not found. | 未找到GatewayLoadBalancerEndpoint实例。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。