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
Situation Awareness
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/ GeminiDB/ API Reference/ APIs v3 (Recommended)/ Instances/ Querying Instances and Details

Querying Instances and Details

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

Function

This API is used to query instances and details based on specified conditions.

Constraints

This API supports the following types of instances:

  • GeminiDB Cassandra
  • GeminiDB Mongo
  • GeminiDB Influx
  • GeminiDB Redis

URI

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

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Explanation:

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

Constraints:

N/A

Values:

N/A

Default value:

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

id

No

String

Explanation:

Instance ID.

Constraints:

If you enter an instance ID starting with an asterisk (*), fuzzy search results are returned. If you enter a valid instance ID, an exact result is returned.

Values:

N/A

Default value:

N/A

name

No

String

Explanation:

Instance name.

Constraints:

If you enter an instance name starting with an asterisk (*), fuzzy search results are returned. If you enter a valid instance name, an exact result is returned.

Values:

N/A

Default value:

N/A

datastore_type

No

String

Explanation:

Database type

Constraints:

N/A

Values:

cassandra, indicating that GeminiDB Cassandra instances are queried.

mongodb, indicating that GeminiDB Mongo instances are queried.

influxdb, indicating that GeminiDB Influx instances are queried.

redis, indicating that GeminiDB Redis instances are queried.

Default value:

If this parameter is not transferred, all types of instances are queried.

mode

No

String

Explanation:

Instance type. The value can be:

Constraints:

N/A

Values:

  • Cluster: GeminiDB Cassandra, GeminiDB Influx, or GeminiDB Redis instance in a proxy cluster
  • RedisCluster: GeminiDB Redis instance in a Redis cluster
  • InfluxdbSingle: single-node GeminiDB Influx instance
  • ReplicaSet: GeminiDB Mongo instance in a replica set
  • The system ignores this parameter if datastore_type is not transferred.

Default value:

N/A

vpc_id

No

String

Explanation:

VPC ID. You can obtain the value with either of the following methods:

  • Method 1: Log in to the VPC console and view the VPC ID on the VPC details page.
  • Method 2: Query the VPC ID using the VPC API. For details, see Querying VPCs.

Constraints:

N/A

Values:

N/A

Default value:

N/A

subnet_id

No

String

Explanation:

Subnet ID. You can obtain the subnet ID with either of the following methods:

  • Method 1: Log in to the VPC console and click the target subnet on the Subnets page. You can view the network ID on the displayed page.
  • Method 2: Query the subnet ID using the VPC API. For details, see Querying Subnets.

Constraints:

N/A

Values:

N/A

Default value:

N/A

offset

No

Integer

Explanation:

Index position. The query starts from the next instance creation time indexed by this parameter under a specified project. If offset is set to N, the resource query starts from the N+1 piece of data.

Constraints:

N/A

Values:

The value must be no less than 0.

Default value:

If this parameter is not transferred, the index offset is 0 by default, indicating that the query starts from the latest created instance.

limit

No

Integer

Explanation:

Maximum number of instances that can be queried.

Constraints:

N/A

Values:

1 to 100

Default value:

If this parameter is not transferred, the first 100 instances are queried by default.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Explanation:

User token

You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication.

Constraints:

N/A

Values:

N/A

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

instances

Array of ListInstancesResult objects

Explanation:

Instance information.

total_count

Integer

Explanation:

Total number of records.

Values:

N/A

Table 5 ListInstancesResult

Parameter

Type

Description

id

String

Explanation:

Instance ID.

Values:

N/A

name

String

Explanation:

Instance name.

Values:

N/A

status

String

Explanation:

Instance status.

Values:

  • normal, indicating that the instance is running normally.
  • abnormal, indicating that the instance is abnormal.
  • creating, indicating that the instance is being created.
  • frozen, indicating that the instance is frozen.
  • data_disk_full, indicating that the instance disk is full.
  • createfail, indicating that the instance failed to be created.
  • enlargefail, indicating that nodes failed to be added to the instance.

port

String

Explanation:

Database port.

Values:

N/A

mode

String

Explanation:

Instance type

Values:

This parameter is the same as the corresponding request parameter.

region

String

Explanation:

Region where the instance is deployed.

Values:

N/A

datastore

ListInstancesDatastoreResult object

Explanation:

Database information.

engine

String

Explanation:

Storage engine.

Value:

rocksDB

created

String

Explanation:

Instance creation time.

Values:

N/A

updated

String

Explanation:

Time when an instance is updated.

Values:

N/A

db_user_name

String

Explanation:

Default username

Value:

rwuser

vpc_id

String

Explanation:

VPC ID.

Values:

N/A

subnet_id

String

Explanation:

Subnet ID.

Values:

One GeminiDB Cassandra instance may use multiple subnets. For the subnet ID, see Table 10.

security_group_id

String

Explanation:

Security group ID.

Values:

N/A

backup_strategy

ListInstancesBackupStrategyResult object

Explanation:

Backup policy.

pay_mode

String

Explanation:

Billing mode. Options:

Values:

  • 0: indicates the instance is billed on a pay-per-use basis.
  • 1: indicates the instance is billed on a yearly/monthly basis.

maintenance_window

String

Explanation:

Maintenance time window.

Values:

N/A

groups

Array of ListInstancesGroupResult objects

Explanation:

Group information.

enterprise_project_id

String

Explanation:

Enterprise project ID.

Value:

0: default enterprise project

time_zone

String

Explanation:

Time zone.

Values:

N/A

actions

Array of strings

Explanation:

Operation that is executed on the instance. Example values:

  • CREATE
  • REBOOT
  • RESTORE

dedicated_resource_id

String

Explanation:

Dedicated resource ID. This parameter is returned only when the instance belongs to a dedicated resource pool.

Values:

N/A

lb_ip_address

String

Explanation:

Load balancer IP address

Constraints:

This parameter is returned only when a load balancer IP address is assigned.

Values:

N/A

lb_port

String

Explanation:

Load balancer port

Constraints:

This parameter is returned only when a load balancer IP address is assigned.

Values:

N/A

availability_zone

String

Explanation:

AZ

Values:

N/A

Table 6 ListInstancesDatastoreResult

Parameter

Type

Description

type

String

Explanation:

DB API.

Values:

N/A

version

String

Explanation:

DB version number.

Values:

N/A

patch_available

Boolean

Explanation:

Whether the current instance can be patched

Values:

  • true: A database can be upgraded through a patching API.
  • false: A database cannot be upgraded through a patching API.

whole_version

String

Explanation:

Complete database version number

Constraints:

Currently, this parameter is available only for GeminiDB Cassandra API.

Values:

N/A

Table 7 ListInstancesBackupStrategyResult

Parameter

Type

Description

start_time

String

Explanation:

Backup time window. Automated backup will be triggered during the backup time window. The current time is the UTC time.

Values:

N/A

keep_days

Integer

Explanation:

Backup retention days

Values:

0–35

Table 8 ListInstancesGroupResult

Parameter

Type

Description

id

String

Explanation:

Group ID.

Values:

N/A

status

String

Explanation:

Group status.

Values:

  • normal, indicating that the group is normal.
  • abnormal, indicating that the group is abnormal.
  • creating, indicating that the group is being created.
  • createfail, indicating that the group failed to be created.
  • deleted: indicating that the group has been deleted.
  • resizefailed: indicating that the group specifications failed to be changed.
  • enlargefail: indicating the group failed to be scaled out.

volume

Volume object

Explanation:

Volume information.

nodes

Array of ListInstancesNodeResult objects

Explanation:

Node information.

Table 9 Volume

Parameter

Type

Description

size

String

Explanation:

Storage space in GB.

Values:

N/A

used

String

Explanation:

Used storage space, in GB.

Values:

N/A

Table 10 ListInstancesNodeResult

Parameter

Type

Description

id

String

Explanation:

Node ID.

Values:

N/A

name

String

Explanation:

Node name.

Values:

N/A

status

String

Explanation:

Node status.

Values:

  • normal, indicating that the node is running normally.
  • abnormal, indicating that the node is abnormal.
  • creating, indicating that the node is being created.
  • createfail, indicating that the node failed to be created.
  • deleted, indicating that the node has been deleted.
  • resizefailed: indicating that the node specifications failed to be changed.
  • enlargefail: indicating nodes failed to be added.

role

String

Explanation:

Node role.

Constraints:

This parameter is available only for GeminiDB MongoAPI replica set instances.

Values:

N/A

subnet_id

String

Explanation:

ID of the subnet where the instance node is deployed.

Values:

N/A

private_ip

String

Explanation:

Private IP address of a node

Constraints:

This parameter value is available after an ECS is created. Otherwise, the value is "".

Values:

N/A

public_ip

String

Explanation:

Bound EIP

Constraints:

This parameter is valid only for nodes bound with EIPs.

Values:

N/A

spec_code

String

Explanation:

Resource specification code. For the code, see the value of parameter flavors.spec_code in Querying Instance Specifications.

Values:

N/A

availability_zone

String

Explanation:

AZ.

Values:

N/A

support_reduce

Boolean

Explanation:

Whether instance nodes can be deleted. The value can be:

Values:

  • true, indicating that instance nodes can be deleted.
  • false, indicating that instance nodes cannot be deleted.

Example Requests

  • URI example

    Querying all instances and details

    GET https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances
  • URI example

    Querying instances and details based on specified conditions

    GET https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances?offset=0&limit=10&id=ed7cc6166ec24360a5ed5c5c9c2ed726in06&name=hy&mode=Cluster&datastore_type=cassandra&vpc_id=19e5d45d-70fd-4a91-87e9-b27e71c9891f&subnet_id=bd51fb45-2dcb-4296-8783-8623bfe89bb7

Example Responses

Status code: 200

Success

{
  "instances" : [ {
    "id" : "8436a91546294036b75931e879882200in06",
    "name" : "nosql-efa6",
    "status" : "normal",
    "port" : "8635",
    "mode" : "Cluster",
    "region" : "aaa",
    "datastore" : {
      "type" : "Cassandra",
      "version" : "3.11",
      "whole_version" : "3.11.3.11204", 
      "patch_available" : false
    },
    "engine" : "rocksDB",
    "created" : "2019-01-17T07:05:52",
    "updated" : "2019-01-17T07:05:47",
    "db_user_name" : "rwuser",
    "vpc_id" : "674e9b42-cd8d-4d25-a2e6-5abcc565b961",
    "subnet_id" : "f1df08c5-71d1-406a-aff0-de435a51007b",
    "security_group_id" : "7aa51dbf-5b63-40db-9724-dad3c4828b58",
    "backup_strategy" : {
      "start_time" : "16:00-17:00",
      "keep_days" : 7
    },
    "pay_mode" : 0,
    "maintenance_window" : "02:00-06:00",
    "groups" : [ {
      "id" : "0b0ff12541794e1084f6827e424be2d6gr06",
      "status" : "creating",
      "volume" : {
        "size" : 10,
        "used" : 0.33
      },
      "nodes" : [ {
        "id" : "233eaac9c6f245c0bb9c2d21eea12d1bno06",
        "name" : "nosql-efa6_priam_node_1",
        "status" : "normal",
        "subnet_id" : "f1df08c5-71d1-406a-aff0-de435a51007b",
        "private_ip" : "192.168.0.174",
        "spec_code" : "geminidb.redis.xlarge.4",
        "availability_zone" : "bbb"
      }, {
        "id" : "d57d76d6320a4a7b86db82c317550c4ano06",
        "name" : "nosql-efa6_priam_node_2",
        "status" : "normal",
        "subnet_id" : "f1df08c5-71d1-406a-aff0-de435a51007b",
        "private_ip" : "192.168.0.175",
        "spec_code" : "geminidb.redis.xlarge.4",
        "availability_zone" : "bbb"
      }, {
        "id" : "f46b0a1cf4d9400e9fd7af17f8742d37no06",
        "name" : "nosql-efa6_priam_node_3",
        "status" : "normal",
        "subnet_id" : "f1df08c5-71d1-406a-aff0-de435a51007b",
        "private_ip" : "192.168.0.176",
        "spec_code" : "geminidb.redis.xlarge.4",
        "availability_zone" : "bbb"
      } ]
    } ],
      "enterprise_project_id" : "0",
      "availability_zone": "cn-north-4a,cn-north-4b,cn-north-4c",
      "time_zone" : "",
      "actions" : [ "CREATE" ],
      "lb_ip_address" : "192.168.11.145",
      "lb_port" : "8635"
  }, {
    "id" : "1236a91546294036b75931e879882200in02",
    "name" : "nosql-efa7",
    "status" : "normal",
    "port" : "8635",
    "mode" : "ReplicaSet",
    "region" : "aaa",
    "datastore" : {
      "type" : "ReplicaSet",
      "version" : "4.0",
      "patch_available" : false
    },
    "engine" : "rocksDB",
    "created" : "2019-01-17T07:05:52",
    "updated" : "2019-01-17T07:05:47",
    "db_user_name" : "rwuser",
    "vpc_id" : "674e9b42-cd8d-4d25-a2e6-5abcc565b961",
    "subnet_id" : "f1df08c5-71d1-406a-aff0-de435a51007b",
    "security_group_id" : "7aa51dbf-5b63-40db-9724-dad3c4828b58",
    "backup_strategy" : {
      "start_time" : "16:00-17:00",
      "keep_days" : 7
    },
    "pay_mode" : 0,
    "maintenance_window" : "02:00-06:00",
    "groups" : [ {
      "id" : "0b0ff12541794e1084f6827e424be2d1gr02",
      "status" : "normal",
      "volume" : {
        "size" : 100,
        "used" : 0.003
      },
      "nodes" : [ {
        "id" : "233eaac9c6f245c0bb9c2d21eea12d1bno02",
        "name" : "nosql-efa7_replica_node_2",
        "status" : "normal",
        "role" : "Primary",
        "subnet_id" : "f1df08c5-71d1-406a-aff0-de435a51007b",
        "private_ip" : "192.168.0.174",
        "public_ip" : "10.154.217.134",
        "spec_code" : "geminidb.mongodb.xlarge.4",
        "availability_zone" : "bbb"
      }, {
        "id" : "d57d76d6320a4a7b86db82c317550c4ano02",
        "name" : "nosql-efa7_replica_node_1",
        "status" : "normal",
        "role" : "Secondary",
        "subnet_id" : "f1df08c5-71d1-406a-aff0-de435a51007b",
        "private_ip" : "192.168.0.39",
        "spec_code" : "geminidb.mongodb.xlarge.4",
        "availability_zone" : "bbb"
      }, {
        "id" : "f46b0a1cf4d9400e9fd7af17f8742d37no02",
        "name" : "nosql-efa7_replica_node_3",
        "status" : "normal",
        "role" : "Secondary",
        "subnet_id" : "f1df08c5-71d1-406a-aff0-de435a51007b",
        "private_ip" : "192.168.0.176",
        "spec_code" : "geminidb.mongodb.xlarge.4",
        "availability_zone" : "bbb"
      } ]
    } ],
      "enterprise_project_id" : "0", 
      "availability_zone": "cn-north-4a,cn-north-4b,cn-north-4c",
      "time_zone" : "",
      "actions" : [ ]
  } ],
  "total_count" : 2
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback