Viewing Details of a Queue

Function

This API is used to list details of a specific queue in a project.

Debugging

You can debug this API in API Explorer.

URI

  • URI format

    GET /v1.0/{project_id}/queues/{queue_name}

  • Parameter description
    Table 1 URI parameters

    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.

    queue_name

    Yes

    String

    Specifies the name of a queue to be queried.

    NOTE:

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

    Table 2 query parameter description

    Parameter

    Mandatory

    Type

    Description

    queue_type

    No

    String

    Queue type. The options are as follows:

    • sql
    • general
    • all

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

Request

None

Response

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.

queueName

No

String

Name of a queue.

NOTE:

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

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.

queueType

No

String

Indicates the queue type.

  • sql
  • general
  • all

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

cuCount

No

Integer

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

chargingMode

No

integer

Billing mode of a queue.

  • Value 1 indicates that queues are billed based on the used CUH.
  • Value 2 indicates that queues are billed based on yearly/monthly packages.

resource_id

No

String

Resource ID of a queue.

resource_mode

No

Integer

Resource mode

  • 0: Shared queue
  • 1: Dedicated 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.

resource_type

No

String

Resource type.

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

Example

  • Example request
    None
  • Example response (successful request)
    {
        "is_success": true,
        "message": "",
        "owner": "testuser",
        "description": "",
        "queueName": "test",
        "create_time": 1587613028851,
        "queueType": "general",
        "cuCount": 16,
        "chargingMode": 1,
        "resource_id": "03d51b88-db63-4611-b779-9a72ba0cf58b",
        "resource_mode": 0,
        "enterprise_project_id": "0",
        "queue_resource_type": "vm"
    }

Status Codes

Table 4 describes the status code.

Table 4 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 Code.