Modifies the weight and priority of a policy-based route.
Usage notes
- You can call the ModifyVpnPbrRouteEntryAttribute operation to modify the weight and priority of a policy-based route.
- If you want to modify only the weight of a policy-based route, call ModifyVpnPbrRouteEntryWeight.
- If you want to modify only the priority of a policy-based route, call ModifyVpnPbrRouteEntryPriority.
- If a policy-based route does not support priorities, you can only call ModifyVpnPbrRouteEntryWeight to modify its weight.
- The ModifyVpnPbrRouteEntryAttribute operation is asynchronous. After you send a request, the system returns a request
ID, but the operation is still being performed in the system background. You can call
DescribeVpnGateway to query the status of a VPN gateway.
- If the VPN gateway is in the updating state, the policy-based route is being created.
- If the VPN gateway is in the active state, the policy-based route is created.
- You cannot repeatedly call the ModifyVpnPbrRouteEntryAttribute operation for the same VPN gateway within the specified period of time
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyVpnPbrRouteEntryAttribute |
The operation that you want to perform. Set the value to ModifyVpnPbrRouteEntryAttribute. |
RegionId | String | Yes | cn-heyuan |
The region ID of the VPN gateway. You can call the DescribeRegions operation to query the most recent region list. |
ClientToken | String | No | d7d24a21-f4ba-4454-9173-b3**** |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters. Note If you do not set this parameter, the system sets ClientToken to the value of RequestId. The value of RequestId may be different for each API request.
|
VpnGatewayId | String | Yes | vpn-bp1a3kqjiiq9legfx**** |
The ID of the VPN gateway. |
RouteSource | String | Yes | 192.168.1.0/24 |
The source CIDR block of the policy-based route. |
RouteDest | String | Yes | 10.0.0.0/24 |
The destination CIDR block of the policy-based route. |
NextHop | String | Yes | vco-bp15oes1py4i66rmd**** |
The next hop of the policy-based route. |
Priority | Integer | Yes | 5 |
The original priority of the policy-based route. Valid values: 1 to 100. A smaller value indicates a higher priority. |
NewPriority | Integer | No | 10 |
The new priority of the policy-based route. Valid values: 1 to 100. A smaller value indicates a higher priority. If you do not set this parameter, the priority of the policy-based route is not modified. |
Weight | Integer | Yes | 100 |
The original weight of the policy-based route. Valid values:
|
NewWeight | Integer | No | 0 |
The new weight of the policy-based route. Valid values:
If you do not set this parameter, the weight of the policy-based route is not modified. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 5BE01CD7-5A50-472D-AC14-CA181C5C03BE |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyVpnPbrRouteEntryAttribute
&RegionId=cn-heyuan
&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
&NewWeight=0
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyVpnPbrRouteEntryAttributeResponse>
<RequestId>5BE01CD7-5A50-472D-AC14-CA181C5C03BE</RequestId>
</ModifyVpnPbrRouteEntryAttributeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "5BE01CD7-5A50-472D-AC14-CA181C5C03BE"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | Resource.QuotaFull | The quota of resource is full | The error message returned because the resource quota is reached. |
400 | VpnGateway.Configuring | The specified service is configuring. | The error message returned because the operation is not allowed when the specified service is being configured. Try again later. |
400 | VpnGateway.FinancialLocked | The specified service is financial locked. | The error message returned because the service is suspended due to overdue payments. Top up your account balance first. |
400 | VpnRouteEntry.AlreadyExists | The specified route entry is already exist. | The error message returned because the route already exists. |
400 | VpnRouteEntry.Conflict | The specified route entry has conflict. | The error message returned the specified route conflicts with an existing route. |
403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | The error message returned because you are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again. |
403 | Forbidden | User not authorized to operate on the specified resource. | The error message returned because you are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again. |
404 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. | The error message returned because the specified VPN gateway does not exist. Check whether the specified VPN gateway is valid. |
For a list of error codes, see Service error codes.