This API is used to query components of a DB instance. Before calling this API:
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/components?limit={limit}&offset={offset}
https://gaussdb.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dd93e98e103b4fc4b5a978a6bd6f03a9in14/components?limit=5&offset=10
Name |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
string |
Yes |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
instance_id |
string |
Yes |
DB instance ID. |
limit |
integer |
No |
Number of records to be queried. The default value is 100. The value cannot be a negative number. The minimum value is 1 and the maximum value is 100. For example, if this parameter is set to 10, a maximum of 10 records can be displayed. |
offset |
integer |
No |
Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The default value is 0, indicating that the query starts from the first piece of data. The value cannot be a negative number. For example, if this parameter is set to 0 and limit is set to 10, only the 1st to 10th records are displayed. |
component_type |
string |
No |
Component type. If this parameter is ALL (default value), all types of components are queried. CM: CMS components Value:
|
availability_zone_id |
string |
No |
ID of the AZ where the primary component is located. The default value is ALL, indicating that component information of nodes in all AZs of the instance is queried. When you query the AZ where a primary DN is located, the information of all DNs in the same shard as the primary DN is displayed. When you query the AZ where a CN is located, only the CN information in the AZ is displayed. When you query the AZ where a component (except CNs or DNs) is located, information about all components of the same type is returned. If there is no such a component, no information is returned. |
None
Name |
Type |
Description |
---|---|---|
nodes |
Array of objects |
Component details. For details, see Table 3. |
total_count |
integer |
Total number of records. |
Name |
Type |
Description |
---|---|---|
id |
string |
Node ID. |
components |
Array of objects |
Component information under the instance node. For details, see Table 4. |
name |
string |
Node name. |
availability_zone_id |
string |
Code of the AZ where the node is located. |
description |
string |
AZ description. |
status |
string |
Node status. |
Name |
Type |
Description |
---|---|---|
id |
string |
Component ID. Global Transaction Manager (GTM): manages the status of transactions. Cluster Management Server (CMS): manages the instance status. Data node (DN): stores and queries table data. Coordinator node (CN): stores database metadata, distributes and executes query tasks, and then returns the query results from DNs to applications. Editable Text Configuration Daemon (ETCD): serves as a distributed key-value storage system used for configuration sharing and service discovery (registration and search). |
role |
string |
Node role. master: primary node slave: standby node |
status |
string |
Component status. Primary: primary component Normal: The component is normal. Down: The component is abnormal. Standby: standby component StateFollower: standby ETCD StateLeader: primary ETCD StateCandidate: arbitration ETCD |
distributed_id |
string |
Group ID. This parameter is used to identify DNs in the same shard. For other components, the value is an empty string. |
type |
string |
Node type. Value: DN, CN, GTM, CM, or ETCD. |
detail |
string |
Details. |
{ "nodes": [ { "components": [ { "id": "cm_1", "role": "master", "status": "Primary", "distributed_id": "", "type" : "CM", "detail" : "" }, { "id": "etcd_7001", "role": "master", "status": "StateLeader", "distributed_id": "", "type" : "ETCD", "detail" : "" }, { "id": "dn_6001", "role": "master", "status": "Primary", "distributed_id": "60011", "type" : "DN", "detail" : "Normal" } ], "id": "7d19f72f8f514564bd92962a6fbddb7dno14", "name": "gauss-9e1a_root_0", "availability_zone_id": "cn-southwest-244a", "description": "az1", "status": "normal" }, { "components": [ { "id": "cm_3", "role": "slave", "status": "Standby", "distributed_id": "", "type" : "CM", "detail" : "" }, { "id": "etcd_7003", "role": "slave", "status": "StateFollower", "distributed_id": "", "type" : "ETCD", "detail" : "" }, { "id": "dn_6003", "role": "slave", "status": "Standby", "distributed_id": "60011", "type" : "DN", "detail" : "Normal" } ], "id": "aafc2e14234d4c9eadb481fb0a09a865no14", "name": "gauss-9e1a_root_2", "availability_zone_id": "cn-southwest-244a", "description": "az1", "status": "normal" }, { "components": [ { "id": "cm_2", "role": "slave", "status": "Standby", "distributed_id": "", "type" : "CM", "detail" : "" }, { "id": "etcd_7002", "role": "slave", "status": "StateFollower", "distributed_id": "", "type" : "ETCD", "detail" : "" }, { "id": "dn_6002", "role": "slave", "status": "Standby", "distributed_id": "60011", "type" : "DN", "detail" : "Normal" } ], "id": "d6c6c6e6b48c41d79d99d7240751d744no14", "name": "gauss-9e1a_root_1", "availability_zone_id": "cn-southwest-244a", "description": "az1", "status": "normal" } ], "total_count": 3 }
For details, see Abnormal Request Results.
For details, see Status Codes.
For details, see Error Codes.