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
Situation Awareness
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
Updated on 2024-11-04 GMT+08:00

Querying All Queues

Function

This API is used to list all queues under the project.

URI

  • URI format

    GET/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.

    Table 2 query parameter description

    Parameter

    Mandatory

    Type

    Description

    queue_type

    No

    String

    Type of the queue. The options are as follows:

    • sql: queues for SQL jobs
    • general: queues for Flink and Spark Jar jobs
    • all: queues of all types

    If this parameter is not specified, the default value sql is used.

    with-priv

    No

    Boolean

    Whether to return permission information.

    with-charge-info

    No

    Boolean

    Whether to return billing information.

    page-size

    No

    Integer

    Maximum number of lines displayed on each page. The default value is Integer.MAX_VALUE, indicating that all results are displayed on one page.

    current-page

    No

    Integer

    Current page number. The default value is 1.

    order

    No

    String

    Filed based on which queues are ordered

    The default value is queue_name_asc (alphabetically ascending order on queue names). Other options are queue_name_desc (alphabetically descending order on queue names), cu_asc (ascending order on CUs), and cu_desc (descending order on CUs).

    tags

    No

    String

    Query results are filtered by tag.

Request Parameters

None

Response Parameters

Table 3 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.

queues

No

Array of Object

Queue information For details, see Table 4.

Table 4 queues parameters description

Parameter

Mandatory

Type

Description

queue_name

No

String

Name of a queue.

description

No

String

Queue description.

owner

No

String

User who creates a queue.

create_time

No

Long

Time when the queue is created. The timestamp is expressed in milliseconds.

queue_type

No

String

Queue type.

  • sql
  • general
  • all

If this parameter is not specified, the default value sql is used.

cu_count

No

Integer

Number of compute units (CUs) bound to a queue, that is, the number of CUs in the current queue.

charging_mode

No

Integer

Billing mode of a queue.

  • Value 0 indicates the default queue. You will be charged based on the amount of data scanned.
  • Value 1 indicates that queues are billed based on the used CUH.

resource_id

No

String

Resource ID of a queue.

enterprise_project_id

No

String

Enterprise project ID. 0 indicates the default enterprise project.

NOTE:

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

cidr_in_vpc

No

String

The VPC CIDR block of the queue. For example, 10.0.0.0/8-24, 172.16.0.0/12-24, and 192.168.0.0/16-24.

cidr_in_mgntsubnet

No

String

CIDR block of the management subnet

cidr_in_subnet

No

String

Subnet CIDR block

resource_mode

No

Integer

Resource mode

  • 0: Shared queue
  • 1: Dedicated queue

platform

No

String

CPU architecture of queue compute resources.

  • x86_64

is_restarting

No

Boolean

Whether to restart the queue. The default value is false.

labels

No

String

Tag information of the queue to be created, including the JSON string indicating whether the queue is Dual-AZ. Currently, only the value 2 is supported, indicating that two queues are created.

feature

No

String

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

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

resource_type

No

String

Type of the resource to which a queue belongs.

  • vm: ECF cluster
  • container: container cluster (Kubernetes)

cu_spec

No

Integer

Specifications of a queue. For a yearly/monthly queue, this parameter indicates the CU value of the yearly/monthly part. For a pay-per-use queue, this parameter indicates the initial value when a user purchases a queue.

cu_scale_out_limit

No

Integer

Upper limit of the CU value for elastic scaling of the current queue.

cu_scale_in_limit

No

Integer

Lower limit of the CU value for elastic scaling of the current queue.

elastic_resource_pool_name

Yes

String

Name of the elastic resource pool

Example Request

None

Example Response

{
      "is_success": "true",
      "message": "",
      "queues": [
          {
              "queue_name": "test",
              "owner": "testuser",
              "description": "",
              "create_time": 1562221422671,
              "queue_type": "spark",
              "cu_count": 16,
              "charging_mode": 2,
              "resource_id": "26afb850-d3c9-42c1-81c0-583d1163e80f",
              "enterprise_project_id": "0",
              "cidr_in_vpc": "10.0.0.0/8",
              "cidr_in_subnet": "10.0.0.0/24",
              "cidr_in_mgntsubnet": "10.23.128.0/24",
              "resource_mode": 1,
              "platform": "x86_64",
              "is_restarting": "false",
              "labels": "multi_az=2",
              "resource_type": "vm",
              "cu_spec": 16
          }
       ]      
    }

Status Codes

Table 5 describes the status code.

Table 5 Status codes

Status Code

Description

200

The query is successful.

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