Updated on 2025-09-19 GMT+08:00

Querying the Logical Cluster List

Function

This API is used to query the logical cluster list.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/clusters/{cluster_id}/logical-clusters

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

cluster_id

Yes

String

Definition

Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID.

Constraints

The value must be a valid DWS cluster ID.

Range

It is a 36-digit UUID.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition

Page offset, which starts from 0 (page number minus 1).

Constraints

N/A

Range

Greater than or equal to 0

Default Value

0

limit

No

Integer

Definition

Size of a single page.

Constraints

N/A

Range

Greater than 0

Default Value

10

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

logical_clusters

Array of LogicalClusterInfo objects

Definition

Logical cluster list.

Range

N/A

count

Integer

Definition

Total number of logical clusters.

Range

N/A

add_enable

Boolean

Definition

If other O&M operations are performed in the cluster, the value is false. In this case, a logical cluster cannot be added.

Range

N/A

Table 4 LogicalClusterInfo

Parameter

Type

Description

logical_cluster_id

String

Definition

Logical cluster ID.

Range

N/A

logical_cluster_name

String

Definition

Logical cluster name.

Range

N/A

cluster_rings

Array of ClusterRing objects

Definition

Host information of the logical cluster.

Range

N/A

status

String

Definition

Logical cluster status.

Range

N/A

first_logical_cluster

Boolean

Definition

Whether the logical cluster is the first one. The first logical cluster created or converted in an earlier version cannot be deleted because it contains some system views.

Range

N/A

action_info

ActionInfo object

Definition

Task information of the logical cluster.

Range

N/A

edit_enable

Boolean

Definition

Whether the logical cluster can be edited.

Range

N/A

restart_enable

Boolean

Definition

Whether the logical cluster can be restarted.

Range

N/A

delete_enable

Boolean

Definition

Whether the logical cluster can be deleted.

Range

N/A

add_to_elastic

Boolean

Definition

Whether autoscaling is allowed.

Range

N/A

mode

String

Definition

Logical cluster schema.

Range

N/A

waiting_for_killing

Integer

Definition

Job waiting time.

Range

N/A

cluster_type

String

Definition

Cluster type.

Range

N/A

Table 5 ClusterRing

Parameter

Type

Description

ring_hosts

Array of RingHost objects

Definition

Cluster host information.

Constraints

N/A

Range

N/A

Default Value

N/A

un_shrinkable_cluster_ring

Boolean

Definition

Whether scale-in is supported.

Constraints

N/A

Range

false or true

Default Value

N/A

Table 6 RingHost

Parameter

Type

Description

host_name

String

Definition

Host name.

Constraints

N/A

Range

N/A

Default Value

N/A

back_ip

String

Definition

Backend IP address.

Constraints

N/A

Range

N/A

Default Value

N/A

cpu_cores

Integer

Definition

Number of host CPUs.

Constraints

N/A

Range

N/A

Default Value

N/A

memory

Double

Definition

Host memory.

Constraints

N/A

Range

N/A

Default Value

N/A

disk_size

Double

Definition

Disk size of the host.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 7 ActionInfo

Parameter

Type

Description

action_name

String

Definition

Operation name.

Range

Create: creating a logical cluster

Expand: scaling out a logical cluster

Restart: restarting a logical cluster

Delete: deleting a logical cluster

Shrink: scaling in a logical cluster

progress

Integer

Definition

Operation progress. The default value is 10.

Range

0 to 100

completed

Boolean

Definition

Whether the operation is complete.

Range

N/A

start_time

String

Definition

Start time of the operation.

Range

N/A

end_time

String

Definition

End time of the operation.

Range

N/A

result

String

Definition

Operation result. The value is an empty string by default.

Range

success

failed

logs

String

Definition

Information on operation logs.

Range

N/A

Example Requests

Query the logical cluster list.

GET https://{Endpoint}/v2/9b06d044ea4f49f1a58b2bed2b0084bd/clusters/9b7ff56b-47b3-4d00-a1fd-4c023d34404b/logical-clusters

Example Responses

Status code: 200

Cluster list queried.

{
  "logical_clusters" : [ {
    "logical_cluster_id" : "fa9d69a0-3814-4fb9-98df-d9f4f5ef53ca",
    "logical_cluster_name" : "elastic_group",
    "cluster_rings" : [ {
      "ring_hosts" : [ {
        "host_name" : "host-172-16-20-246",
        "back_ip" : "172.16.73.90",
        "cpu_cores" : 8,
        "memory" : 32.0,
        "disk_size" : 800.0
      }, {
        "host_name" : "host-172-16-4-26",
        "back_ip" : "172.16.123.5",
        "cpu_cores" : 8,
        "memory" : 32.0,
        "disk_size" : 800.0
      }, {
        "host_name" : "host-172-16-43-90",
        "back_ip" : "172.16.92.175",
        "cpu_cores" : 8,
        "memory" : 32.0,
        "disk_size" : 800.0
      } ],
      "un_shrinkable_cluster_ring" : true
    } ],
    "status" : "Normal",
    "first_logical_cluster" : false,
    "action_info" : {
      "progress" : 100,
      "completed" : true,
      "result" : "success",
      "logs" : null,
      "action_name" : "Grow",
      "start_time" : "2023-06-05 01:58:43",
      "end_time" : "2023-06-05 02:11:50"
    },
    "edit_enable" : true,
    "restart_enable" : true,
    "delete_enable" : false,
    "add_to_elastic" : true,
    "mode" : null,
    "cluster_type" : null
  } ],
  "count" : 1,
  "add_enable" : true
}

Status Codes

Status Code

Description

200

Cluster list queried.

400

Request error.

401

Authentication failed.

403

You do not have required permissions.

404

No resources found.

500

Internal server error.

503

Service unavailable.