Update route rules
Updated at:2025-10-16
API description
Modify routing rules. Currently, only single-line routing rule updates are supported.
Request structure
Plain Text
1 PUT /v{version}/route/rule/{routeRuleId}?clientToken={clientToken} HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string
4 {
5 "sourceAddress": "192.168.0.0/20",
6 "destinationAddress": "0.0.0.0/0",
7 "nexthopId": "nat-bdidwhwfwc6p",
8 "description": "this is a route rule"
9 }
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | For API version No., the current value is 1 |
| clientToken | String | No | Query | Idempotence token, which is an ASCII string with a length not exceeding 64 bits, see details in [ClientToken Idempotence Support](VPC/API Reference/General Description.md#Idempotence) |
| routeRuleId | String | Yes | URL parameter | ID of routing rule to be updated |
| sourceAddress | String | No | Request Body parameters | Source network segment, in CIDR format, which can be 0.0.0.0/0 for all segments, existing VPC subnet segments, or subnet private segments |
| destinationAddress | String | No | Request Body parameters | Destination network segment, in CIDR format, which can be 0.0.0.0/0; otherwise, the destination address must not overlap with the local VPC CIDR (except when either is 0.0.0.0/0) |
| nexthopId | String | No | Request Body parameters | ID of next hop |
| description | String | No | Request Body parameters | Description, not exceeding 200 characters |
Response headers
No special headers are required beyond the standard ones.
Response parameters
There are no special response parameters
Request example
Plain Text
1 PUT /v1/route/rule/rr-rbn5yyz6rtn8?clientToken=8257tf9d-b98n-3r6n-a93m-297ng49io149 HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Content-Type: application/json;charset=UTF-8
4 Authorization: bce-auth-v1/5a6f0606bf5e48f29dd132aa76aa5182/2017-06-12T13:13:05Z/1800/content-type;host;x-bce-date/8baeafe6bfc35b0cf6205e87e4ce6c0dbb442375951ace4d16e6c7a4dab95943
5 {
6 "sourceAddress": "192.168.0.0/20",
7 "destinationAddress": "0.0.0.0/0",
8 "nexthopId": "nat-bdidwhwfwc6p",
9 "description": "this is a route rule"
10 }
Response example
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3 Fri, 17 Mar 2017 13:22:21 GMT
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
