调用ListQueues查询指定集群的队列列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListQueues

系统规定参数。取值:ListQueues

ClusterId String ehpc-hz-FYUr32****

指定集群ID。

返回数据

名称 类型 示例值 描述
RequestId String C6E5005C-00B0-4F27-98BB-95AB88016C22

请求ID。

Queues Array of QueueInfo

队列信息数组。

QueueInfo
ComputeInstanceType List ecs.n1.tiny

计算节点的实例规格。

EnableAutoGrow Boolean false

队列是否启动自动扩容。可能值:

  • true:已启动
  • false:未启动
HostNamePrefix String compute

主机名前缀名称。

HostNameSuffix String 01

主机名后缀名称。

ImageId String centos_7_06_64_20G_alibase_20****.vhd

镜像ID。

QueueName String workq

队列名称。

ResourceGroupId String rg-acfmxp7uc24****

队列所属资源组ID。

SpotInstanceTypes Array of Instance

抢占式实例列表。

Instance
InstanceType String ecs.n1.tiny

ECS实例规格。

SpotPriceLimit Float 0.062

实例的每小时最高价格,支持最多3位小数。参数SpotStrategy取值为SpotWithPriceLimit时生效。

SpotStrategy String SpotWithPriceLimit

计算节点抢占策略。可能值:

  • NoSpot:正常按量付费实例。
  • SpotWithPriceLimit:设置上限价格的抢占式实例。
  • SpotAsPriceGo:系统自动出价,跟随当前市场实际价格。
Type String Execution

队列类型。可能值:

  • Execution:可以执行作业的队列。
  • Router:不能执行作业,只会将接受的作业转发至绑定的Execution队列执行。

示例

请求示例

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListQueues
&ClusterId=ehpc-hz-FYUr32****
&<公共请求参数>

正常返回示例

XML格式

<ListQueuesResponse>
      <RequestId>C6E5005C-00B0-4F27-98BB-95AB88016C22</RequestId>
      <Queues>
            <QueueInfo>
                  <HostNameSuffix>01</HostNameSuffix>
                  <EnableAutoGrow>false</EnableAutoGrow>
                  <SpotInstanceTypes>
            </SpotInstanceTypes>
                  <ImageId>centos_7_06_64_20G_alibase_20****.vhd</ImageId>
                  <HostNamePrefix>compute</HostNamePrefix>
                  <QueueName>workq</QueueName>
                  <ResourceGroupId>rg-acfmxp7uc24****</ResourceGroupId>
                  <SpotStrategy>SpotWithPriceLimit</SpotStrategy>
                  <SpotPriceLimit>0.062</SpotPriceLimit>
                  <Type>Execution</Type>
                  <ComputeInstanceType>
                        <InstanceType>ecs.n1.small</InstanceType>
                  </ComputeInstanceType>
            </QueueInfo>
      </Queues>
</ListQueuesResponse>

JSON格式

{
    "RequestId": "C6E5005C-00B0-4F27-98BB-95AB88016C22",
    "Queues":{
        "QueueInfo": [
            {
				"HostNameSuffix": "01",
				"EnableAutoGrow": false,
				"SpotInstanceTypes": {
					"Instance": []
				},
				"ImageId": "centos_7_06_64_20G_alibase_20****.vhd",
				"HostNamePrefix": "compute",
				"QueueName": "workq",
                "ResourceGroupId": "rg-acfmxp7uc24****",
				"SpotStrategy": "SpotWithPriceLimit",
                "SpotPriceLimit": "0.062",
                "Type": "Execution",
				"ComputeInstanceType": {
					"InstanceType": [
						"ecs.n1.small"
					]
				}
			}
        ]
    }
}

错误码

HttpCode 错误码 错误信息 描述
503 ServiceUnavailable The request has failed due to a temporary failure of the server 请求失败,服务暂时不可用

访问错误中心查看更多错误码。