Binds a follower instance to a leader instance.
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/instances/{instanceId}/bindReadOnly HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
No |
The ID of the follower instance. |
hgpostcn-cn-uqm3316l1004 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The ID of the region. |
cn-hangzhou |
| body |
object |
No |
The request body. |
|
| leaderInstanceId |
string |
No |
The ID of the leader instance. The follower and leader instances must be in the same region and zone, and have the same version. Obtain this ID by calling the |
hgpostcn-cn-uqm3316l1004 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
The ID of the request. |
6FF2EDFD-3154-5C3E-8CFA-8F7E366BCF9D |
| Data |
boolean |
Indicates whether the operation succeeded. Valid values:
|
true |
| Success |
boolean |
Indicates whether the API request succeeded. This parameter is independent of the binding operation result. Valid values:
|
true |
| ErrorCode |
string |
The error code for a failed request. |
404 |
| ErrorMessage |
string |
The error message for a failed request. |
Internal server error. |
| HttpStatusCode |
string |
The HTTP status code. |
200 |
Examples
Success response
JSON format
{
"RequestId": "6FF2EDFD-3154-5C3E-8CFA-8F7E366BCF9D",
"Data": true,
"Success": true,
"ErrorCode": "404",
"ErrorMessage": "Internal server error.",
"HttpStatusCode": "200"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.