
# 查询弹性资源池下所有队列 - ListElasticResourcePoolQueues
#### 功能介绍
查询队列与弹性资源池的关联关系。
#### 调试
您可以在[API Explorer](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=DLI&api=ListElasticResourcePoolQueues)中调试该接口。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限及授权项说明](https://support.huaweicloud.com/api-dli/dli_02_0375.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项 Action    | 访问级别 Access Level | 资源类型（\*为必须） Resource Type (\*: required) | 条件键 Condition Key                                                                                                                                                                                                                                                                                                                 | 别名 Alias | 依赖的授权项 Dependencies |
  |:---|:---|:---|:---|:---|:---|
  | dli:elasticresourcepool:resourceManagement | Write                                           | elasticresourcepool \*                                                 | -                                                                                                                                                                                                                                                                                                                                                              | -                                      | -                                                 |
  | dli:elasticresourcepool:resourceManagement | Write                                           | -                                                                      | - [g:EnterpriseProjectId](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)  - [g:ResourceTag/\<tag-key\>](https://support.huaweicloud.com/usermanual-iam5/iam_01_1287.html)   | -                                      | -                                                 |
     
  
 
#### URI
- URI格式 GET /v3/{project_id}/elastic-resource-pools/{elastic_resource_pool_name}/queues
  
- 参数说明
  表1路径参数 
  | 参数                         | 是否必选 | 参数类型   | 描述                                                                                     |
  |:---|:---|:---|:---|
  | elastic_resource_pool_name | 是    | String | 弹性资源池名称。                                                                               |
  | project_id                 | 是    | String | 项目编号，用于资源隔离。获取方式请参考[获取项目ID](https://support.huaweicloud.com/api-dli/dli_02_0183.html)。 |
     
  表2Query参数 
  | 参数         | 是否必选 | 参数类型    | 描述                 |
  |:---|:---|:---|:---|
  | limit      | 否    | Integer | 每页的数量。默认为100。      |
  | offset     | 否    | Integer | 偏移量。默认为0。          |
  | queue_name | 否    | String  | 可以根据queueName进行过滤。 |
     
  
 
#### 请求消息
无。
#### 响应消息
表3响应参数说明 
| 参数         | 是否必填 | 参数类型             | 描述                                                                                |
|:---|:---|:---|:---|
| is_success | 否    | Boolean          | 执行请求是否成功。"true"表示请求执行成功。                                                          |
| message    | 否    | String           | 系统提示信息，执行成功时，信息可能为空。                                                              |
| queues     | 否    | Array of objects | 该弹性资源池下所有queue的资源权重信息。详细参数说明请参考[表4]。 |
| count      | 否    | Long             | 该资源池下关联的队列数量。                                                                     |
   
 表4queues 
| 参数                     | 是否必填 | 参数类型             | 描述                                                                                                                                                                                                                                                               |
|:---|:---|:---|:---|
| queue_name             | 否    | String           | 队列名称。                                                                                                                                                                                                                                                            |
| enterprise_project_id  | 否    | String           | 企业项目ID。                                                                                                                                                                                                                                                          |
| queue_type             | 否    | String           | 队列类型。 - sql：SQL队列类型，用于运行SQL作业。  - general：通用队列类型，用于运行Flink、Spark Jar作业。   |
| queue_scaling_policies | 否    | Array of objects | 队列扩缩容策略。详细参数说明请参考[priority_infos]。                                                                                                                                                                                        |
| owner                  | 否    | String           | 队列所有者。                                                                                                                                                                                                                                                           |
| create_time            | 否    | Long             | 队列创建时间。                                                                                                                                                                                                                                                          |
| engine                 | 否    | String           | 队列引擎类型。                                                                                                                                                                                                                                                          |
   
 表5queue_scaling_policies 
| 参数                                   | 是否必填 | 参数类型    | 描述                                                                                                                                                                                                                                                                                    |
|:---|:---|:---|:---|
| priority                             | 否    | Integer | 策略优先级1-100，100优先级最高。                                                                                                                                                                                                                                                                  |
| impact_start_time                    | 否    | String  | 生效开始时间。                                                                                                                                                                                                                                                                               |
| impact_stop_time                     | 否    | String  | 生效结束时间。                                                                                                                                                                                                                                                                               |
| min_cu                               | 否    | Integer | 最小CU数量。                                                                                                                                                                                                                                                                               |
| max_cu                               | 否    | Integer | 最大CU数量。                                                                                                                                                                                                                                                                               |
| inherit_elastic_resource_pool_max_cu | 否    | Boolean | **参数解释：** 队列是否继承弹性资源池最大CUs。 仅在当前扩缩容策略的时间段生效，其他时间段需单独配置。 **取值范围：** true：在当前扩缩容策略的时间段内，队列的最大CU等于资源池的最大CU。 false：不开启队列是否继承弹性资源池最大CUs |
   
#### 请求示例
无
#### 响应示例
```
{
  "is_success": true,
  "message": "",
  "count": 1,
  "queues": [
    {
      "queue_name": "lhm_sql",
      "enterprise_project_id": "0",
      "queue_type": "sql",
      "queue_scaling_policies": [
        {
          "priority": 50,
          "impact_start_time": "00:00",
          "impact_stop_time": "24:00",
          "min_cu": 16,
          "max_cu": 16
        },
        {
          "priority": 100,
          "impact_start_time": "00:00",
          "impact_stop_time": "12:00",
          "min_cu": 32,
          "max_cu": 64
        },
        {
          "priority": 50,
          "impact_start_time": "12:00",
          "impact_stop_time": "24:00",
          "min_cu": 16,
          "max_cu": 32
        }
      ]
    }
  ]
}
```
#### 状态码
| 状态码 | 描述 |
|:---|:---|
| 200 | OK |
   
#### 错误码
调用接口出错后，将不会返回上述结果，而是返回错误码和错误信息，更多介绍请参见[错误码](https://support.huaweicloud.com/api-dli/dli_02_0056.html)。
