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

Querying HTAP Instances

Function

This API is used to query HTAP instances. Before calling this API:

URI

GET /v3/{project_id}/instances/{instance_id}/htap

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.

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.

Content-Type

Yes

String

Content type. Value: application/json

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 parameters

Parameter

Type

Description

total

Integer

Number of HTAP instances.

instances

Array of instances objects

HTAP instance information.

max_htap_instance_num_of_taurus

Integer

Maximum number of HTAP instances that can be created.

Table 4 instances

Parameter

Type

Description

id

String

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

name

String

HTAP instance name.

engine_name

String

HTAP DB engine name.

engine_version

String

HTAP DB engine version.

project_id

String

Project ID of a tenant in a region.

instance_state

instance_state object

HTAP instance status information.

create_at

Long

Time when the HTAP instance was created.

is_frozen

Boolean

Whether the HTAP instance is frozen.

ha_mode

String

HTAP instance deployment mode.

pay_model

String

Billing mode. Only pay-per-use billing is supported.

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

order_id

String

Order ID for the yearly/monthly subscription.

alter_order_id

String

Alternative order ID for the yearly/monthly subscription.

data_vip

String

Private IP address.

readable_node_infos

Array of ReadableNodeInfos objects

Readable node information.

proxy_ips

Array of strings

Proxy IP address.

data_vip_v6

String

Private IPv6 address.

port

Integer

Database port.

available_zones

Array of available_zones objects

AZ information.

current_actions

Array of QueryAction objects

Instance actions.

volume_type

String

Storage type.

server_type

String

Server type.

enterprise_project_id

String

Enterprise project ID. This parameter is mandatory when the enterprise project is enabled.

dedicated_resource_id

String

Dedicated resource pool ID. This parameter is displayed only when the dedicated resource pool is enabled.

network

network object

Network information.

ch_master_node_id

String

ClickHouse primary node ID.

node_num

Integer

Number of nodes.

Table 5 instance_state

Parameter

Type

Description

instance_status

String

HTAP instance status.

create_fail_error_code

String

Error code for HTAP instance creation failure.

fail_message

String

Error message for HTAP instance creation failure.

wait_restart_for_params

Boolean

Whether a reboot is required for parameter updates.

Table 6 ReadableNodeInfos

Parameter

Type

Description

data_ip

String

IP address of the readable node.

node_id

String

ID of the readable node.

node_name

String

Name of the readable node.

Table 7 available_zones

Parameter

Type

Description

code

String

AZ code.

description

String

AZ description.

az_type

String

AZ type.

Table 8 QueryAction

Parameter

Type

Description

id

String

Instance or node action ID.

action

String

Instance or node action name.

object_id

String

Object ID of the instance or node action.

type

String

Instance or node action type.

job_id

String

Task ID of the instance or node action.

status

String

Instance or node action status.

Enumerated values:

  • OK_TO_RUN
  • DELETED

created_at

Long

Time when the instance or node action was created.

updated_at

Long

Time when the instance or node action was updated.

Table 9 network

Parameter

Type

Description

vpc_id

String

VPC ID.

sub_net_id

String

Subnet ID.

security_group_id

String

Security group ID.

Status code: 400

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Querying HTAP instances of a GaussDB(for MySQL) instance

GET https://{endpoint}/v3/23a50154cf494ec9ad6883979a12db0a/instances/18c3eeb7b788479eb8b93b209946a83bin07/htap

Example Response

Status code: 200

Success.

{
  "total" : 4,
  "instances" : [ {
    "id" : "bfc970d8e9b34a399b4c422aabe11409in17",
    "name" : "htap-fjld",
    "engine_name" : "star-rocks",
    "engine_version" : "3.1.6",
    "project_id" : "23a50154cf494ec9ad6883979a12db0a",
    "instance_state" : {
      "instance_status" : "normal",
      "create_fail_error_code" : null,
      "fail_message" : null,
      "wait_restart_for_params" : false
    },
    "create_at" : 1711094408228,
    "is_frozen" : false,
    "ha_mode" : "Single",
    "pay_model" : "0",
    "order_id" : null,
    "alter_order_id" : "",
    "data_vip" : "192.168.0.207",
    "data_ips" : {
      "node_ip" : "192.168.0.207",
      "node_id" : "36d62cd6a77a4e80a335077867e7912bno16",
      "node_name" : "htap-1244_shard01_node01"
    },
    "proxy_ips" : [ ],
    "data_vip_v6" : null,
    "port" : 3306,
    "available_zones" : [ {
      "code" : "cn-southwest-244b",
      "description" : "az2",
      "az_type" : "Center"
    } ],
    "current_actions" : [ ],
    "volume_type" : "SSD",
    "server_type" : "KVM",
    "enter_prise_project_id" : "0",
    "dedicated_resource_id" : "",
    "network" : {
      "vpc_id" : "f7876b94-3696-419b-a609-161de4b42d59",
      "sub_net_id" : "8926baca-467a-4556-8603-b4077805ff9d",
      "security_group_id" : ""
    },
    "ch_master_node_id" : null,
    "node_num" : 2
  }, {
    "id" : "656c539296bd47b49fe29983368b9fb2in17",
    "name" : "HTAP-1711093893",
    "engine_name" : "star-rocks",
    "engine_version" : "3.1.6",
    "project_id" : "23a50154cf494ec9ad6883979a12db0a",
    "instance_state" : {
      "instance_status" : "normal",
      "create_fail_error_code" : null,
      "fail_message" : null,
      "wait_restart_for_params" : false
    },
    "create_at" : 1711094228737,
    "is_frozen" : false,
    "ha_mode" : "Single",
    "pay_model" : "0",
    "order_id" : null,
    "alter_order_id" : "",
    "data_vip" : "192.168.0.201",
    "data_ips" : [ "192.168.0.201" ],
    "proxy_ips" : [ ],
    "data_vip_v6" : null,
    "port" : 3306,
    "available_zones" : [ {
      "code" : "az",
      "description" : "az2",
      "az_type" : "Center"
    } ],
    "current_actions" : [ ],
    "volume_type" : "SSD",
    "server_type" : "KVM",
    "enter_prise_project_id" : "0",
    "dedicated_resource_id" : "",
    "network" : {
      "vpc_id" : "f7876b94-3696-419b-a609-161de4b42d59",
      "sub_net_id" : "8926baca-467a-4556-8603-b4077805ff9d",
      "security_group_id" : ""
    },
    "ch_master_node_id" : null,
    "node_num" : 2
  }, {
    "id" : "04c48d11f0d24c8d8aee254981a3b94fin17",
    "name" : "htap-fjlc",
    "engine_name" : "star-rocks",
    "engine_version" : "3.1.6",
    "project_id" : "23a50154cf494ec9ad6883979a12db0a",
    "instance_state" : {
      "instance_status" : "normal",
      "create_fail_error_code" : null,
      "fail_message" : null,
      "wait_restart_for_params" : false
    },
    "create_at" : 1711075260516,
    "is_frozen" : false,
    "ha_mode" : "Cluster",
    "pay_model" : "0",
    "order_id" : null,
    "alter_order_id" : "",
    "data_vip" : "192.168.0.249",
    "data_ips" : [ "192.168.0.183", "192.168.0.7", "192.168.0.41" ],
    "proxy_ips" : [ ],
    "data_vip_v6" : null,
    "port" : 3306,
    "available_zones" : [ {
      "code" : "az",
      "description" : "az2",
      "az_type" : "Center"
    } ],
    "current_actions" : [ ],
    "volume_type" : "SSD",
    "server_type" : "KVM",
    "enter_prise_project_id" : "0",
    "dedicated_resource_id" : "",
    "network" : {
      "vpc_id" : "f7876b94-3696-419b-a609-161de4b42d59",
      "sub_net_id" : "8926baca-467a-4556-8603-b4077805ff9d",
      "security_group_id" : ""
    },
    "ch_master_node_id" : null,
    "node_num" : 6
  }, {
    "id" : "f2d2441a88384023b2e30f0b600a0013in17",
    "name" : "htap-fjlb",
    "engine_name" : "star-rocks",
    "engine_version" : "3.1.6",
    "project_id" : "23a50154cf494ec9ad6883979a12db0a",
    "instance_state" : {
      "instance_status" : "normal",
      "create_fail_error_code" : null,
      "fail_message" : null,
      "wait_restart_for_params" : false
    },
    "create_at" : 1711021269903,
    "is_frozen" : false,
    "ha_mode" : "Single",
    "pay_model" : "0",
    "order_id" : null,
    "alter_order_id" : "",
    "data_vip" : "192.168.0.209",
    "data_ips" : [ "192.168.0.151", "192.168.0.209" ],
    "proxy_ips" : [ ],
    "data_vip_v6" : null,
    "port" : 3306,
    "available_zones" : [ {
      "code" : "cn-southwest-244b",
      "description" : "az2",
      "az_type" : "Center"
    } ],
    "current_actions" : [ ],
    "volume_type" : "SSD",
    "server_type" : "KVM",
    "enter_prise_project_id" : "0",
    "dedicated_resource_id" : "",
    "network" : {
      "vpc_id" : "f7876b94-3696-419b-a609-161de4b42d59",
      "sub_net_id" : "8926baca-467a-4556-8603-b4077805ff9d",
      "security_group_id" : ""
    },
    "ch_master_node_id" : null,
    "node_num" : 2
  } ],
  "max_htap_instance_num_of_taurus" : 10
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.