Querying Read Replica Information
Function
This API is used to query the read replicas of an instance and the maximum number of read replicas supported by the instance. Before calling this API:
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
Debugging
You can debug this API in API Explorer.
URI
GET /v3/{project_id}/instances/{instance_id}/readonly-nodes
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
project_id |
Yes |
Definition Project ID of a tenant in a region. To obtain the value, see Obtaining a Project ID. Constraints N/A Range The value can contain 32 characters. Only letters and digits are allowed. Default Value N/A |
|
instance_id |
Yes |
Definition Instance ID, which uniquely identifies an instance. Constraints N/A Range The value can contain 36 characters. Only letters and digits are allowed. Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. You can obtain the token by calling the IAM API used to obtain a user token. After the request is processed, the value of X-Subject-Token in the message header is the token value. Constraints N/A Range N/A Default Value N/A |
|
X-Language |
No |
String |
Definition Language. Constraints N/A Range
Default Value en-us |
Response Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
nodes |
Array of Table 4objects |
Definition List of read replicas. |
|
max_readonly_node_num |
Integer |
Definition Maximum number of read replicas that can be added to an instance. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition Node ID. Range N/A |
|
name |
String |
Definition Node name. Range N/A |
|
status |
String |
Definition Node status. Range
|
|
availability_zone |
String |
Definition AZ that the node belongs to. Range N/A |
Example Request
GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/95e33e5453684df9a300973f28751b5din14/readonly-nodes
Example Response
{
"nodes" : [ {
"id" : "b36d146eb751424dbeecacdcb3287732no14",
"name" : "hwc-test -0000_root_3",
"status" : "normal",
"availability_zone" : " az2xahz"
} ],
"max_readonly_node_num" : 3
}
Status Codes
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot