调用ModifyVcoRouteEntryWeight接口修改IPsec连接下目的路由条目的权重值。
接口说明
- ModifyVcoRouteEntryWeight 接口属于异步接口,即系统先返回一个请求 ID,但该目的路由条目的权重值尚未修改成功,系统后台的修改任务仍在进行。您可以调用 DescribeVpnConnection 查询目的路由条目的权重值的修改状态:
当 IPsec 连接处于 updating 状态时,表示目的路由条目的权重值正在修改中。
当 IPsec 连接处于 attached 状态时,表示目的路由条目的权重值修改成功。
ModifyVcoRouteEntryWeight 接口不支持在同一 IPsec 连接下并发修改目的路由条目的权重值。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
IPsec 连接所属的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| VpnConnectionId |
string |
是 |
IPsec 连接 ID。 |
vco-p0w2jpkhi2eeop6q6**** |
| RouteDest |
string |
是 |
待修改的目的路由条目的目标网段。 |
192.168.10.0/24 |
| Weight |
integer |
是 |
待修改的目的路由条目的权重值。取值:
|
100 |
| NewWeight |
integer |
是 |
待修改的目的路由条目新的权重值。取值:
|
0 |
| NextHop |
string |
是 |
待修改的目的路由条目的下一跳。 |
vco-p0w2jpkhi2eeop6q6**** |
| OverlayMode |
string |
否 |
隧道协议。仅取值:Ipsec(默认值),表示 IPsec 隧道协议。 |
Ipsec |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
123e4567-e89b-12d3-a456-4266**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| RequestId |
string |
请求 ID。 |
9496F8A-82F4-3130-A51A-2266ACC799B4 |
示例
正常返回示例
JSON格式
{
"RequestId": "9496F8A-82F4-3130-A51A-2266ACC799B4"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Resource.QuotaFull | The quota of resource is full | |
| 400 | VpnConnection.Configuring | The specified service is configuring. | 服务正在配置中,请您稍后再试。 |
| 400 | VpnConnection.FinancialLocked | The specified service is financial locked. | 指定的服务欠费锁定。 |
| 400 | VpnRouteEntry.AlreadyExists | The specified route entry is already exist. | 该路由已存在。 |
| 400 | VpnRouteEntry.Conflict | The specified route entry has conflict. | 路由条目存在冲突。 |
| 400 | TaskConflict | The operation is too frequent, please wait a moment and try again. | 操作过于频繁,请稍等一会再重试 |
| 403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | |
| 403 | Forbidden | User not authorized to operate on the specified resource. | 您没有权限操作指定资源,请申请权限后再操作。 |
| 404 | InvalidVpnConnectionInstanceId.NotFound | The specified vpn connection instance id does not exist. | 指定的VPN连接不存在,请您检查该VPN连接ID是否正确。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。