Creating a Queue
Function
This API is used to create a queue. The queue will be bound to specified compute resources.

It takes 5 to 15 minutes to start a job using a new queue for the first time.
URI
- URI format
- Parameter description
Table 1 URI parameter Parameter
Mandatory
Type
Description
project_id
Yes
String
Definition
Project ID, which is used for resource isolation. For how to obtain a project ID, see Obtaining a Project ID.
Example: 48cc2c48765f481480c7db940d6409d1
Constraints
None
Range
The value can contain up to 64 characters. Only letters and digits are allowed.
Default Value
None
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
queue_name |
Yes |
String |
Name of the new queue Definition Name of the new queue Constraints
Range None Default Value None |
queue_type |
No |
String |
Definition Queue type Constraints If not specified, the default value sql is used. Range
Default Value None |
description |
No |
String |
Definition Queue description Constraints None Range None Default Value None |
cu_count |
Yes |
Integer |
Definition Minimum number of CUs bound to a queue Constraints None Range The options are 16, 64, and 256. Default Value None |
charging_mode |
No |
Integer |
Definition Billing mode of a queue Constraints None Range The value can only be 1, indicating that the billing is based on the CUH. Default Value None |
enterprise_project_id |
No |
String |
Definition Enterprise project ID. The value 0 indicates the default enterprise project. Constraints Only users who have enabled Enterprise Management can set this parameter to bind a specified project. Range None Default Value None |
platform |
No |
String |
Definition CPU architecture of queue compute resources Constraints None Range
Default Value None |
resource_mode |
No |
Integer |
Definition Queue resource mode Constraints None Range 0: shared resource mode 1: dedicated resource mode Default Value None |
labels |
No |
Array of Strings |
Definition Tag information of the queue to be created. Currently, the tag information includes whether the queue is cross-AZ (JSON string). The value can only be 2, that is, a dual-AZ queue whose compute resources are distributed in two AZs is created. Constraints None Range None Default Value None |
feature |
No |
String |
Definition Type of images used by the queue Constraints None Range
Default Value The default value is basic. |
tags |
No |
Array of objects |
Definition Queue tags for identifying cloud resources. A tag consists of a key and tag value. For details, see Table 3. Constraints None Range None Default Value None |
engine |
No |
String |
Definition Engine type of the queue Constraints This parameter is available only when queue_type is set to sql. Range The options are spark and hetuEngine.
For details about the engine types and descriptions, see DLI Overview. Default Value The default value is spark. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Key |
Yes |
String |
Definition Tag key Constraints None Range A tag key can contain up to 128 characters, cannot start or end with a space, and cannot start with _sys_. Only letters, digits, spaces, and the following special characters are allowed: _.:+-@ Default Value None |
value |
Yes |
String |
Definition Tag value Constraints None Range A tag value can contain up to 255 characters. Only letters, digits, spaces, and the following special characters are allowed: _.:+-@ Default Value None |
Response Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_success |
No |
Boolean |
Definition Whether the request is successfully executed. true indicates that the request is successfully executed. Range None |
message |
No |
String |
Definition System prompt. If the execution succeeds, this parameter may be left blank. Range None |
queue_name |
No |
String |
Definition Name of the created queue. The queue name is case-insensitive. Uppercase letters will be automatically converted to lowercase letters. Range None |
Example Request
Create a dedicated general-purpose queue named queue1, with specifications of 16 CUs and compute resources distributed in two AZs.
{ "queue_name": "queue1", "description": "test", "cu_count": 16, "resource_mode": 1, "enterprise_project_id": "0", "queue_type": "general", "labels": ["multi_az=2"] }
Creating a queue in a specified elastic resource pool
{ "queue_name": "queue2", "description": "test_esp", "cu_count": 16, "resource_mode": 1, "enterprise_project_id": "0", "queue_type": "general", "labels": ["multi_az=2"], "elastic_resource_pool_name": "elastic_pool_0622_10" }
Example Response
{ "is_success": true, "message": "", "queue_name": "queue1" }
Status Codes
Table 5 describes the status codes.
Error Codes
If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.