هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creating a Queue

Function

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

NOTE:

It takes 5 to 15 minutes to start a job using a new queue for the first time.

URI

  • URI format

    POST /v1.0/{project_id}/queues

  • Parameter description
    Table 1 URI parameter

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.

Request

Table 2 Request parameters

Parameter

Mandatory

Type

Description

queue_name

Yes

String

Name of a newly created resource queue. The name can contain only digits, letters, and underscores (_), but cannot contain only digits or start with an underscore (_). Length range: 1 to 128 characters.

NOTE:

The queue name is case-insensitive. The uppercase letters will be automatically converted to lowercase letters.

queue_type

No

String

Queue type. The options are as follows:

  • sql: Queues used to run SQL jobs
  • general: Queues used to run Flink and Spark Jar jobs.
NOTE:

If the type is not specified, the default value sql is used.

description

No

String

Description of a queue.

cu_count

Yes

Integer

Minimum number of CUs that are bound to a queue. Currently, the value can only be 16, 64, or 256.

charging_mode

No

Integer

Billing mode of a queue. This value can only be set to 1, indicating that the billing is based on the CUH used.

enterprise_project_id

No

String

Enterprise project ID. The value 0 indicates the default enterprise project.

NOTE:

Users who have enabled Enterprise Management can set this parameter to bind a specified project.

platform

No

String

CPU architecture of compute resources.

  • x86_64

resource_mode

No

Integer

Queue resource mode. The options are as follows:

0: shared resource mode

1: dedicated resource mode

labels

No

Array of Strings

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.

feature

No

String

Type of image used by the queue. The options are:

  • basic: basic type
  • ai: AI-enhanced (Only the SQL x86_64 dedicated queue supports this option.)

The default value is basic.

NOTE:

AI-enhanced means that the queue is loaded with an AI image that integrates algorithm packages related to AI on top of the basic image.

tags

No

Array of objects

Queue tags for identifying cloud resources. A tag consists of a key and tag value. For details, see Table 3.

elastic_resource_pool_name

No

String

Name of the elastic resource pool to which the new queue belongs.

The name can contain only digits, lowercase letters, and underscores (_), but cannot contain only digits or start with an underscore (_).

The value can contain 1 to 128 characters.

NOTE:

To add a queue to an elastic resource pool, resource_mode must be set to the dedicated resource mode. Otherwise, this parameter does not take effect.

Table 3 tags parameters

Parameter

Mandatory

Type

Description

Key

Yes

String

Tag key.
NOTE:

A tag key can contain a maximum of 128 characters. Only letters, digits, spaces, and special characters (_.:=+-@) are allowed, but the value cannot start or end with a space or start with _sys_.

value

Yes

String

Tag value.
NOTE:

A tag value can contain a maximum of 255 characters. Only letters, digits, spaces, and special characters (_.:=+-@) are allowed. The value cannot start or end with a space.

Response

Table 4 Response parameters

Parameter

Mandatory

Type

Description

is_success

No

Boolean

Indicates whether the request is successfully executed. Value true indicates that the request is successfully executed.

message

No

String

System prompt. If execution succeeds, the parameter setting may be left blank.

queue_name

No

String

Name of the created queue.

NOTE:

The queue name is case-insensitive. The uppercase letters will be automatically converted to lowercase letters.

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 code.

Table 5 Status codes

Status Code

Description

200

The job is created successfully.

400

Request error.

500

Internal service error.

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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback