Updated on 2024-07-12 GMT+08:00

Querying CNs

Function

This API is used to query CNs. Before calling this API:

URI

GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/coordinators

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

For details about how to obtain the project ID, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID, which is compliant with the UUID format.

offset

No

Integer

Index offset. If offset is set to N, the resource query starts from the N+1 data entry. The default value is 0, indicating that the query starts from the first data entry. The value cannot be a negative number.

limit

No

Integer

Number of records to be queried. The default value is 200. The value cannot be a negative number. The minimum value is 1 and the maximum value is 200.

Request Parameters

None

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

instance_id

String

Instance ID.

max_reduction_num

Integer

Maximum number of nodes that can be deleted at a time.

nodes

Array of Table 3 objects

Node information list.

Table 3 CnInfoBeforeReduce

Parameter

Type

Description

id

String

Node ID.

name

String

Node name.

status

String

Node status.

  • normal: The node is normal.
  • abnormal: The node is abnormal.
  • creating: The node is being created.
  • createfail: The node fails to be created.

availability_zone

String

AZ.

support_reduce

Boolean

Whether the node can be deleted.

Example Request

Querying CNs

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/coordinators

Example Response

CNs queried.

{ 
  "instance_id" : "cc6fd964d93f4003851dfc29d57d30a5in14", 
  "max_reduction_num" : 10, 
  "nodes" : [ { 
    "id" : "25b7f16ee4084b7884d52f1bdfab4e68no14", 
    "name" : "UTS-gauss-7362_gaussdbv5cn_0", 
    "status" : "normal", 
    "availability_zone" : "az2", 
    "support_reduce" : true 
  }, { 
    "id" : "ad6f02f31744422fa8ce487e81c9e7afno14", 
    "name" : "UTS-gauss-7362_gaussdbv5cn_1", 
    "status" : "normal", 
    "availability_zone" : "az3", 
    "support_reduce" : true 
  } ] 
}

Status Code

Error Code

For details, see Error Codes.