Updated on 2025-10-20 GMT+08:00

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:

Debugging

You can debug this API in API Explorer.

URI

GET /v3/{project_id}/instances/{instance_id}/readonly-nodes

Table 1 Parameter description

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

Table 2 Request header 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

  • zh-cn
  • en-us

Default Value

en-us

Response Parameters

Table 3 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

Table 4 ListReadonlyNodesResult field data structure description

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

  • normal: A node is available.
  • abnormal: A node is abnormal.
  • creating: A node is being created.
  • createfail: A node failed to be created.

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

Error Codes

For details, see Error Codes.