Enable read/write splitting. The Leader FE node handles write requests, and other nodes handle read requests.
Operation description
The instance must be in the running state when you call this operation.
Try it now
Test
RAM authorization
Request syntax
POST /webapi/gateway/isolateLeader HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
No |
The instance ID. |
c-b25e21e24388**** |
| IsolateLeader |
boolean |
No |
Enable read/write splitting. The Leader FE node handles write requests, and other nodes handle read requests. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
The HTTP request status code. |
200 |
| RequestId |
string |
The request ID. |
32A44F0D-BFF6-5664-999A-218BBDE7**** |
| Success |
boolean |
Indicates whether the request succeeded. |
false |
| ErrCode |
string |
The error code. |
Success |
| ErrMessage |
string |
The error message. |
Invalid params: [instance not exists]. |
| Data |
boolean |
The returned data. |
24151320976**** |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "32A44F0D-BFF6-5664-999A-218BBDE7****",
"Success": false,
"ErrCode": "Success",
"ErrMessage": "Invalid params: [instance not exists].",
"Data": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.