调用ModifyVpnPbrRouteEntryPriority接口修改策略路由的策略优先级。
使用说明
- ModifyVpnPbrRouteEntryPriority接口属于异步接口,即系统先返回一个请求ID,但该策略路由尚未修改成功,系统后台的修改任务仍在进行。您可以调用DescribeVpnGateway接口查询VPN网关实例状态,来确定策略路由的修改状态:
- 当VPN网关实例处于updating状态时,表示策略路由正在修改中。
- 当VPN网关实例处于active状态时,表示策略路由修改成功。
- ModifyVpnPbrRouteEntryPriority接口不支持在同一VPN网关实例下并发修改策略路由。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ModifyVpnPbrRouteEntryPriority |
系统规定参数。取值:ModifyVpnPbrRouteEntryPriority。 |
RegionId | String | 是 | cn-henyuan |
VPN网关实例所在的地域ID。 您可以通过调用DescribeRegions接口获取地域ID。 |
ClientToken | String | 否 | d7d24a21-f4ba-4454-9173-b3**** |
客户端Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符。 说明 若您未指定,则系统自动使用API请求的RequestId作为ClientToken标识。每次API请求的RequestId可能不一样。
|
VpnGatewayId | String | 是 | vpn-bp1a3kqjiiq9legfx**** |
VPN网关实例ID。 |
RouteSource | String | 是 | 192.168.1.0/24 |
策略路由的源网段。 |
RouteDest | String | 是 | 10.0.0.0/24 |
策略路由的目标网段。 |
NextHop | String | 是 | vco-bp15oes1py4i66rmd**** |
策略路由的下一跳。 |
Priority | Integer | 否 | 5 |
策略路由原始的策略优先级。取值范围:1~100。 策略优先级数字越小,策略路由的优先级越高。 |
NewPriority | Integer | 是 | 10 |
策略路由新的策略优先级。取值范围:1~100。 策略优先级数字越小,策略路由的优先级越高。 |
Weight | Integer | 是 | 100 |
策略路由的权重值。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 5BE01CD7-5A50-472D-AC14-CA181C5C03BE |
请求ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=ModifyVpnPbrRouteEntryPriority
&RegionId=cn-henyuan
&ClientToken=d7d24a21-f4ba-4454-9173-b3****
&VpnGatewayId=vpn-bp1a3kqjiiq9legfx****
&RouteSource=192.168.1.0/24
&RouteDest=10.0.0.0/24
&NextHop=vco-bp15oes1py4i66rmd****
&Priority=5
&NewPriority=10
&Weight=100
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyVpnPbrRouteEntryPriorityResponse>
<RequestId>5BE01CD7-5A50-472D-AC14-CA181C5C03BE</RequestId>
</ModifyVpnPbrRouteEntryPriorityResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "5BE01CD7-5A50-472D-AC14-CA181C5C03BE"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Resource.QuotaFull | The quota of resource is full | 资源配额已达上限。 |
400 | VpnGateway.Configuring | The specified service is configuring. | 服务正在配置中,请您稍后再试。 |
400 | VpnGateway.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. | 路由条目存在冲突。 |
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 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. | 指定的 VPN 网关不存在,请您检查 VPN 网关是否正确。 |
访问错误中心查看更多错误码。