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

Querying Instance Details

Function

This API is used to query instance details. Before calling this API:

URI

GET /v3/{project_id}/instances/{instance_id}/clickhouse/{clickhouse_instance_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

instance_id

Yes

String

GaussDB(for MySQL) instance ID, which is compliant with the UUID format.

clickhouse_instance_id

Yes

String

ClickHouse instance ID, which is compliant with the UUID format.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

To obtain this value, call the IAM API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

X-Language

No

String

Request language type. The default value is en-us.

Values:

  • en-us
  • zh-cn

Response Parameters

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

instance

instance object

DB instance information.

Table 4 instance

Parameter

Type

Description

id

String

Instance ID.

name

String

Instance name.

project_id

String

Project ID of a tenant in a region.

public_ip

String

Public IP address.

can_enable_public_access

Boolean

Whether the instance can be accessed from a public network.

current_backup_node_id

String

ID of the backup node.

cluster_mode

String

Deployment mode. Values:

  • Single: single-node
  • Ha: primary/standby

status

String

Instance status.

is_frozen

Integer

Whether the instance is frozen. Values:

  • 0: not frozen
  • 1: frozen

frozen_time

String

Frozen time.

db_user

String

Default user.

bak_period

String

Backup cycle.

bak_keep_day

Integer

Backup retention days.

bak_expected_start_time

String

Estimated backup start time.

datastore_version_id

String

DB version ID.

datastore_version

String

DB version.

datastore_type

String

DB engine.

create_at

Integer

Instance creation time.

update_at

Integer

Instance update time.

delete_at

Integer

Instance deletion time.

db_port

String

Database port. Value range: 0–65535.

param_group

param_group object

Parameter template.

actions

Array of ChQueryActionInfo objects

Instance actions.

create_fail_error_code

String

Error code for an instance creation failure.

groups

Array of groups objects

Instance groups.

ops_window

ops_window object

Instance operation time window.

tags_info

tags_info object

Instance tags.

time_zone

String

Time zone.

backup_used_space

String

Used backup space.

az_mode

String

AZ type. Values:

  • single: single AZ
  • double: multiple AZs

master_az_code

String

Primary AZ.

enterprise_project_id

String

Enterprise project ID.

port_info

port_info object

Port information.

volume_code

String

Disk specification code.

support_data_replication

Boolean

Whether replicas are supported.

new_version_available

Boolean

Whether there is a new DB version available.

ssl_option

Boolean

Whether to enable SSL.

dedicated_resource_id

String

ID of the dedicated resource pool.

pay_model

String

Payment method. Values:

  • 0: pay-per-use
  • 1: yearly/monthly
Table 5 param_group

Parameter

Type

Description

id

String

Parameter ID.

name

String

Parameter name.

Table 6 ChQueryActionInfo

Parameter

Type

Description

id

String

Instance action ID.

action

String

Instance action name.

object_id

String

Object ID of the instance action.

type

String

Instance action type.

job_id

String

Task ID of the instance action.

status

String

Instance action status.

created_at

Integer

Time when an instance action was created.

updated_at

Integer

Time when an instance action was updated.

Table 7 groups

Parameter

Type

Description

id

String

Group ID.

name

String

Group name.

group_type_name

String

Instance group type name. Only clickhouse is supported.

nodes

Array of ClickHouseNodeInfo objects

Instance node information.

Table 8 ClickHouseNodeInfo

Parameter

Type

Description

id

String

Instance node ID.

name

String

Instance node name.

type

String

Instance node type. Values:

  • master: primary node
  • slave: standby node

status

String

Instance node status.

period

String

Instance node subscription period.

volume

volume object

Instance node storage information.

cpu

String

Number of vCPUs of the instance node.

mem

String

Memory size (GB) of the instance node.

datastore

datastore object

Data storage information.

priority

Integer

Node priority.

frozen_flag

Integer

Frozen flag. Values:

  • 0: not frozen
  • 1: frozen

db_port

Integer

Database port. Value range: 0–65535.

pay_model

String

Payment method. Values:

  • 0: pay-per-use
  • 1: yearly/monthly

order_id

String

Yearly/Monthly order ID.

traffic_ip

String

Data plane IP address of the node.

traffic_ipv6

String

Data plane IPv6 address of the node.

traffic_vip

String

Data plane virtual IP address of the node.

traffic_vipv6

String

Data plane virtual IPv6 address of the node.

az_code

String

AZ.

az_description

String

AZ description.

az_type

String

AZ type.

region

String

Region where the node is located.

create_at

Integer

Time when the node was created.

update_at

Integer

Time when the node was updated.

flavor_id

String

Node specification ID.

flavor_ref

String

Node specification code.

iass_flavor_ref

String

IaaS specification code.

max_connections

String

Maximum number of public network connections.

vpc_id

String

VPC ID.

subnet_id

String

Subnet ID.

need_restart

Boolean

Whether a reboot is required for parameter update.

sg_id

String

Security group.

Table 9 volume

Parameter

Type

Description

type

String

Storage type of the instance node. Values:

  • SSD: ultra-high I/O
  • ESSD: extreme SSD

size

String

Storage space of the instance node.

used

String

Used storage space of the instance node.

iops

Integer

Storage IOPS of the instance node.

Table 10 datastore

Parameter

Type

Description

id

String

Engine ID.

type

String

Engine type. Only click-house is supported.

version

String

Engine version.

Table 11 ops_window

Parameter

Type

Description

period

String

Time window period.

start_time

String

Start time of the time window.

end_time

String

End time of the time window.

Table 12 tags_info

Parameter

Type

Description

tags

Array of tags objects

User tags.

sys_tags

Array of sys_tags objects

System tags.

Table 13 tags

Parameter

Type

Description

key

String

Tag key.

value

String

Tag value.

Table 14 sys_tags

Parameter

Type

Description

key

String

Tag key.

value

String

Tag value.

Table 15 port_info

Parameter

Type

Description

tep_port

Integer

TEP port. Value range: 0–65535.

http_port

Integer

HTTP port. Value range: 0–65535.

mysql_port

Integer

MySQL port. Value range: 0–65535.

https_port

Integer

HTTPS port. Value range: 0–65535.

tep_secure_port

Integer

TEP security port. Value range: 0–65535.

Status code: 400

Table 16 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 17 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Querying details about a ClickHouse instance

GET https://{endpoint}/v3/23a50154cf494ec9ad6883979a12db0a/instances/fb632d1d531a4107804f0f082581810fin07/clickhouse/df3ae779e2ad4993a03ccd7a81240125in16

Example Response

Status code: 200

Success.

{
  "instance" : {
    "id" : "f8d286fa7db44f51aed30ed7eb6da007in16",
    "name" : "htap-1fb3",
    "project_id" : "23a50154cf494ec9ad6883979a12db0a",
    "public_ip" : "",
    "can_enable_public_access" : false,
    "current_backup_node_id" : null,
    "cluster_mode" : "Single",
    "status" : "normal",
    "is_frozen" : 0,
    "frozen_time" : null,
    "db_user" : null,
    "bak_period" : null,
    "bak_keep_day" : null,
    "bak_expected_start_time" : null,
    "datastore_version_id" : "6a9e233f-e7da-3e81-b12f-7a41a8689250",
    "datastore_version" : "1.23.3.24",
    "datastore_type" : "click-house",
    "create_at" : 1714099209183,
    "update_at" : 1714099209781,
    "delete_at" : null,
    "db_port" : "3306",
    "param_group" : {
      "id" : "1661d4eddd4444dd8447992e74fa3b3epr16",
      "name" : "Default-clickhouse"
    },
    "actions" : [ ],
    "create_fail_error_code" : "",
    "groups" : [ {
      "id" : "f3f95d4a837f42ee921760f3c7a0e730gr16",
      "name" : "htap-1fb3_shard01",
      "group_type_name" : "clickhouse",
      "nodes" : [ {
        "id" : "8f23427bf3764627bca1ee40e2364abfno16",
        "name" : "htap-1fb3_shard01_node01",
        "type" : "master",
        "status" : "normal",
        "period" : "null",
        "volume" : {
          "type" : "SSD",
          "size" : "50000000000"
        },
        "cpu" : "4",
        "mem" : "16",
        "datastore" : {
          "id" : "6a9e233f-e7da-3e81-b12f-7a41a8689250",
          "type" : "click-house",
          "version" : "1.23.3.24"
        },
        "priority" : 1,
        "frozen_flag" : 0,
        "db_port" : 3306,
        "pay_model" : "0",
        "order_id" : "",
        "traffic_ip" : "192.168.0.55",
        "traffic_ipv6" : "",
        "traffic_vip" : "",
        "traffic_vipv6" : "",
        "az_code" : "cn-southwest-244b",
        "az_description" : "AZ2",
        "az_type" : "Center",
        "region" : "cn-southwest-244",
        "create_at" : 1714099209183,
        "update_at" : 1714099209183,
        "flavor_id" : "b44cfde6-d250-313c-8d7a-cd216f071658",
        "flavor_ref" : "gaussdb.ch.xlarge.x86.4",
        "iass_flavor_ref" : "c3.xlarge.4",
        "max_connections" : "0",
        "vpc_id" : "134c4042-1a1f-4cb8-8258-219a2f6c0d4d",
        "subnet_id" : "072e022f-13aa-4c8f-8d64-492cfd123305",
        "need_restart" : false,
        "sg_id" : ""
      } ]
    } ],
    "ops_window" : {
      "period" : null,
      "start_time" : "18:00",
      "end_time" : "22:00"
    },
    "tags_info" : {
      "tags" : [ ],
      "sys_tags" : [ {
        "key" : "_sys_enterprise_project_id",
        "value" : "0"
      } ]
    },
    "time_zone" : "UTC+08:00",
    "backup_used_space" : null,
    "az_mode" : "single",
    "master_az_code" : null,
    "enterprise_project_id" : null,
    "port_info" : {
      "tep_port" : 9000,
      "http_port" : 8123,
      "mysql_port" : 3306,
      "https_port" : 8443,
      "tep_secure_port" : 9440
    },
    "volume_code" : "gaussdb.ch.evs.ultrahighio",
    "support_data_replication" : true,
    "new_version_available" : false,
    "ssl_option" : true,
    "dedicated_resource_id" : null,
    "pay_model" : null
  }
}

Status Code

Status Code

Description

200

Success.

400

Client error.

500

Server error.

Error Code

For details, see Error Codes.