Updated on 2026-10-21 GMT+08:00

Querying Resource Pools

Function

This API is used to query resource pools.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/clusters/{cluster_id}/workload/queues

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

logical_cluster_name

No

String

Definition

Logical cluster name. This field is mandatory in logical cluster mode.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

queue_list

Array of PlanStageQueue objects

Definition

Resource Pool Queue Details.

Range

N/A

workload_queue_name_list

Array of strings

Definition

Resource pool name queue.

Range

N/A

workload_res_code

Integer

Definition

Return code for querying resource pool queues.

Range

N/A

Table 4 PlanStageQueue

Parameter

Type

Description

queue_name

String

Definition

Name of a resource pool.

Range

N/A

queue_resources

Array of WorkloadResourceItem objects

Definition

Resource configuration queue.

Range

N/A

Table 5 WorkloadResourceItem

Parameter

Type

Description

resource_name

String

Definition

Resource name.

Range

cpu: percentage of CPU time

cpu_limit: percentage of CPU cores

memory: percentage of available memory resources on each data node

concurrency: number of concurrent queries

shortQueryConcurrencyNum: number of concurrent simple statements

weight: weight for network scheduling

tablespace: tablespace

activestatements: number of active statements

cpu_share: CPU share

resource_value

Integer

Definition

Resource attribute value.

Range

The value range varies depending on the value of resource_name.

If resource_name is cpu, the value is an integer from 1 to 99.

If resource_name is cpu_limit, the value is an integer from 0 to 100. The value 0 indicates that there is no limit.

If resource_name is memory, the value is an integer from 0 to 100. The value 0 indicates that there is no limit.

If resource_name is concurrency, the value is an integer from –1 to 2147483647. The value –1 or 0 indicates that there is no limit.

If resource_name is shortQueryConcurrencyNum, the value is an integer from –1 to 2147483647. The value –1 or 0 indicates that there is no limit.

If resource_name is weight, the value is an integer from –1 to 2147483647. The default value is –1, indicating that there is no limit.

value_unit

String

Definition

Resource attribute unit.

Range

N/A

resource_description

String

Definition

Additional resource description.

Range

N/A

Example Requests

Query resource pools.

GET https://{Endpoint}/v2/89cd04f168b84af6be287f71730fdb4b/clusters/e59d6b86-9072-46eb-a996-13f8b44994c1/workload/queues

Example Responses

Status code: 200

{
  "workload_res_code" : 0,
  "workload_queue_name_list" : [ "test" ],
  "queue_list" : [ {
    "queue_name" : "test",
    "queue_resources" : [ {
      "resource_name" : "cpu",
      "resource_value" : 5
    }, {
      "resource_name" : "cpu_limit",
      "resource_value" : 0
    }, {
      "resource_name" : "memory",
      "resource_value" : 0
    }, {
      "resource_name" : "concurrency",
      "resource_value" : 10
    }, {
      "resource_name" : "shortQueryConcurrencyNum",
      "resource_value" : -1
    } ]
  } ]
}

Status Codes

Status Code

Description

200

Resource pools 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.