Primary-standby switch
Updated at:2025-10-16
API description
In a multi-line active-standby routing mode, switch the active route to the standby route.
Request structure
Plain Text
1 PUT /v{version}/route/rule/{routeRuleId}?{action}&clientToken={clientToken} HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string
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 active routing rule |
| action | String | Yes | Query | The value for this API is switchRouteHA |
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?switchRouteHA&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
Response example
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3 Date: Fri, 17 Mar 2017 13:22:21 GMT
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
