Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Instance Management/ Querying the Components of a DB Instance

Querying the Components of a DB Instance

Updated on 2024-11-15 GMT+08:00

Function

This API is used to query components of a DB instance. Before calling this API:

URI

GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/components
Table 1 Parameter description

Name

Type

Mandatory

Description

project_id

String

Yes

Explanation:

Project ID of a tenant in a region.

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

Restrictions:

None

Value range:

The value can contain 32 characters. Only letters and digits are allowed.

Default value:

None

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 data entry. The default value is 0, indicating that the query starts from the first data entry. 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:

  • ALL
  • CN
  • DN
  • CM
  • GTM
  • ETCD

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.

Request Parameters

None

Response Parameters

Table 2 Parameter description

Name

Type

Description

nodes

Array of objects

Component details.

For details, see Table 3.

total_count

Integer

Total number of records.

Table 3 nodes description

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.

Table 4 components description

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.

Example Request

Querying the components of a DB instance

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

Example Response

Components of the primary/standby instance queried.
{
    "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
}
Components of the distributed instance in the independent deployment queried.
{
    "nodes": [
        {
            "components": [
                {
                    "id": "cn_5001",
                    "role": "master",
                    "status": "Normal",
                    "distributed_id": "",
                    "type": "CN",
                    "detail": ""
                }
            ],
            "id": "e0c39a9b9e91421cacbfbf75c47e0c9dno14",
            "name": "gauss-6b36_gaussdbv5cn_0",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244a",
            "description": "az1",
            "status": "normal"
        },
        {
            "components": [
                {
                    "id": "gtm_1002",
                    "role": "slave",
                    "status": "Standby",
                    "distributed_id": "",
                    "type": "GTM",
                    "detail": "Connection ok"
                }
            ],
            "id": "a19a1844ab93407489d8a63ca298f908no14",
            "name": "gauss-6b36_gaussdbv5gtm_0",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244a",
            "description": "az1",
            "status": "normal"
        },
        {
            "components": [
                {
                    "id": "gtm_1003",
                    "role": "slave",
                    "status": "Standby",
                    "distributed_id": "",
                    "type": "GTM",
                    "detail": "Connection ok"
                }
            ],
            "id": "fd949ad6b00c4d72b7af5f015817d4d9no14",
            "name": "gauss-6b36_gaussdbv5gtm_1",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244b",
            "description": "az2",
            "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": "ac7e24fc9626479c96ab6215f2107faeno14",
            "name": "gauss-6b36_gaussdbv5cms_1",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244b",
            "description": "az2",
            "status": "normal"
        },
        {
            "components": [
                {
                    "id": "dn_6001",
                    "role": "master",
                    "status": "Primary",
                    "distributed_id": "60011",
                    "type": "DN",
                    "detail": "Normal"
                }
            ],
            "id": "0989068696f94631a45b3f2b13ac7810no14",
            "name": "gauss-6b36_gaussdbv5dn1_0",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244a",
            "description": "az1",
            "status": "normal"
        },
        {
            "components": [
                {
                    "id": "cm_1",
                    "role": "master",
                    "status": "Primary",
                    "distributed_id": "",
                    "type": "CM",
                    "detail": ""
                },
                {
                    "id": "etcd_7001",
                    "role": "master",
                    "status": "StateFollower",
                    "distributed_id": "",
                    "type": "ETCD",
                    "detail": ""
                }
            ],
            "id": "912ca1f9f12f41968d60d82a7f630bedno14",
            "name": "gauss-6b36_gaussdbv5cms_2",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244c",
            "description": "az3",
            "status": "normal"
        },
        {
            "components": [
                {
                    "id": "dn_6002",
                    "role": "slave",
                    "status": "Standby",
                    "distributed_id": "60011",
                    "type": "DN",
                    "detail": "Normal"
                }
            ],
            "id": "365261e60ac14dff846480e8cc555d66no14",
            "name": "gauss-6b36_gaussdbv5dn1_1",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244b",
            "description": "az2",
            "status": "normal"
        },
        {
            "components": [
                {
                    "id": "dn_6003",
                    "role": "slave",
                    "status": "Standby",
                    "distributed_id": "60011",
                    "type": "DN",
                    "detail": "Normal"
                }
            ],
            "id": "3ce7e13a25524e7b81d78cad9afd9464no14",
            "name": "gauss-6b36_gaussdbv5dn1_2",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244c",
            "description": "az3",
            "status": "normal"
        },
        {
            "components": [
                {
                    "id": "cm_3",
                    "role": "slave",
                    "status": "Standby",
                    "distributed_id": "",
                    "type": "CM",
                    "detail": ""
                },
                {
                    "id": "etcd_7003",
                    "role": "slave",
                    "status": "StateLeader",
                    "distributed_id": "",
                    "type": "ETCD",
                    "detail": ""
                }
            ],
            "id": "e0deb77337604d149a76ce02b5060d86no14",
            "name": "gauss-6b36_gaussdbv5cms_0",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244a",
            "description": "az1",
            "status": "normal"
        },
        {
            "components": [
                {
                    "id": "gtm_1001",
                    "role": "master",
                    "status": "Primary",
                    "distributed_id": "",
                    "type": "GTM",
                    "detail": "Connection ok"
                }
            ],
            "id": "9a88dc2a3f3e4f8c844f86dc032fde84no14",
            "name": "gauss-6b36_gaussdbv5gtm_2",
            "hostname": null,
            "availability_zone_id": "cn-southwest-244c",
            "description": "az3",
            "status": "normal"
        }
    ],
    "total_count": 10
}

Status Code

Error Code

For details, see Error Codes.

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback