Modifies the weight of a destination-based route for an IPsec-VPN connection.
Usage notes
- ModifyVcoRouteEntryWeight is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the DescribeVpnConnection operation to query the status of the associated IPsec-VPN connection and determine whether the weight of the specified destination-based route is modified.
- If the IPsec-VPN connection is in the updating state, the weight of the destination-based route is being modified.
- If the IPsec-VPN connection is in the attached state, the weight of the destination-based route is modified.
- You cannot repeatedly call the ModifyVcoRouteEntryWeight operation for the same IPsec-VPN connection within the specified period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyVcoRouteEntryWeight | The operation that you want to perform. Set the value to ModifyVcoRouteEntryWeight. |
RegionId | String | Yes | ap-southeast-2 | The ID of the region to which the IPsec-VPN connection belongs. You can call the DescribeRegions operation to query the most recent region list. |
VpnConnectionId | String | Yes | vco-p0w2jpkhi2eeop6q6**** | The ID of the IPsec-VPN connection. |
RouteDest | String | Yes | 192.168.10.0/24 | The destination CIDR block of the destination-based route that you want to modify. |
Weight | Integer | Yes | 100 | The current weight of the destination-based route that you want to modify. Valid values:
|
NewWeight | Integer | Yes | 0 | The new weight of the destination-based route that you want to modify. Valid values:
|
NextHop | String | Yes | vco-p0w2jpkhi2eeop6q6**** | The next hop of the destination-based route that you want to modify. |
OverlayMode | String | No | Ipsec | The tunneling protocol. Set the value to Ipsec, which specifies the IPsec tunneling protocol. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-4266**** | 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 all requests. The token can contain only ASCII characters. Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request may be different. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 9496F8A-82F4-3130-A51A-2266ACC799B4 | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyVcoRouteEntryWeight
&RegionId=ap-southeast-2
&VpnConnectionId=vco-p0w2jpkhi2eeop6q6****
&RouteDest=192.168.10.0/24
&Weight=100
&NewWeight=0
&NextHop=vco-p0w2jpkhi2eeop6q6****
&OverlayMode=Ipsec
&ClientToken=123e4567-e89b-12d3-a456-4266****
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyVcoRouteEntryWeightResponse>
<RequestId>9496F8A-82F4-3130-A51A-2266ACC799B4</RequestId>
</ModifyVcoRouteEntryWeightResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "9496F8A-82F4-3130-A51A-2266ACC799B4"
}
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 exhausted. |
400 | VpnConnection.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 | VpnConnection.FinancialLocked | The specified service is financial locked. | The error message returned because the service is locked due to overdue payments. |
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 because the specified route conflicts with an existing route. |
400 | TaskConflict | The operation is too frequent, please wait a moment and try again. | The error message returned because your requests are too frequent. Try again later. |
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. Apply for the required permissions and try again. |
404 | InvalidVpnConnectionInstanceId.NotFound | The specified vpn connection instance id does not exist. | The error message returned because the specified IPsec-VPN connection does not exist. Check whether the ID of the IPsec-VPN connection is valid. |
For a list of error codes, see Service error codes.