调用GetAutoScaleConfig获取指定集群的自动伸缩配置信息。

调试

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

请求参数

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

系统规定参数。取值:GetAutoScaleConfig

ClusterId String ehpc-hz-FYUr32****

集群ID。

返回数据

名称 类型 示例值 描述
ClusterId String ehpc-hz-FYUr32****

集群ID。

ClusterType String pbs

集群的调度器类型。可能值:

  • slurm
  • pbs
  • opengridscheduler
  • deadline
EnableAutoGrow Boolean true

集群是否启动自动扩容。可能值:

  • true
  • false
EnableAutoShrink Boolean true

集群是否启动自动缩容。可能值:

  • true
  • false
ExcludeNodes String i-bp19lgqwxb4206t5****,i-bp1g4hvzs9pywrhb****

不参与自动伸缩的节点列表。

ExtraNodesGrowRatio Integer 0

额外节点百分比。可能值:0~100

GrowIntervalInMinutes Integer 2

扩容时间间隔,每轮计算节点扩容的时间间隔。可能值:2~10

GrowRatio Integer 100

扩容比例。可能值:1~100

GrowTimeoutInMinutes Integer 20

扩容超时时间,等待启动节点的超时时间。可能值:10~60

ImageId String m-bp10txryr4mhrrt1****

镜像ID。

MaxNodesInCluster Integer 300

集群最多可以扩容的节点数量。可能值:0~500

Queues Array of QueueInfo

集群队列的自动伸缩配置信息。

说明 集群和队列同时开启了扩容或缩容时,则以队列设置为优先。
QueueInfo
EnableAutoGrow Boolean true

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

  • true
  • false
EnableAutoShrink Boolean true

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

  • true
  • false
InstanceType String ecs.sn1ne.large

该队列自动扩容的实例规格。

InstanceTypes Array of InstanceTypeInfo

实例规格信息。

InstanceTypeInfo
HostNamePrefix String compute

主机名前缀。

InstanceType String ecs.sn1ne.large

实例规格。

SpotPriceLimit Float 0

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

SpotStrategy String 0

计算节点竞价策略。可能值:

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

交换机ID。

ZoneId String cn-hangzhou-b

可用区ID。

MaxNodesInQueue Integer 100

单个队列最多可以扩容的节点数量。可能值:0~500

MinNodesInQueue Integer 10

单个队列最小计算节点数,队列最少可以保留的计算节点数量。可能值:0~500

QueueImageId String centos_7_06_64_20G_alibase_2019071****

节点镜像ID。

QueueName String workq

集群队列名称。

ResourceGroupId String rg-acfmxp7uc24****

资源组ID。

SpotPriceLimit Float 0

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

SpotStrategy String NoSpot

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

  • NoSpot:正常按量付费实例。
  • SpotWithPriceLimit:设置上限价格的抢占式实例。
  • SpotAsPriceGo:系统自动出价,跟随当前市场实际价格。
RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

请求ID。

ShrinkIdleTimes Integer 3

节点连续空闲次数,资源收缩检查时,一个节点连续处于空闲的次数。可能值:2~5

ShrinkIntervalInMinutes Integer 2

缩容时间间隔,每轮计算节点收缩的时间间隔。可能值:2~10

SpotPriceLimit Float 0.062

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

SpotStrategy String SpotWithPriceLimit

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

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

阿里云账号ID。

示例

请求示例

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

正常返回示例

XML格式

<GetAutoScaleConfigResponse>
      <RequestId>04F0F334-13358736C-A1D7-6C044FE73368</RequestId>
      <ExtraNodesGrowRatio>0</ExtraNodesGrowRatio>
      <EnableAutoGrow>true</EnableAutoGrow>
      <ClusterId>ehpc-hz-FYUr32****</ClusterId>
      <ShrinkIdleTimes>3</ShrinkIdleTimes>
      <MaxNodesInCluster>300</MaxNodesInCluster>
      <ClusterType>pbs</ClusterType>
      <EnableAutoShrink>true</EnableAutoShrink>
      <GrowRatio>100</GrowRatio>
      <GrowIntervalInMinutes>2</GrowIntervalInMinutes>
      <Uid>129845258050****</Uid>
      <GrowTimeoutInMinutes>20</GrowTimeoutInMinutes>
      <ImageId>m-bp10txryr4mhrrt1****</ImageId>
      <ShrinkIntervalInMinutes>2</ShrinkIntervalInMinutes>
      <SpotPriceLimit>0</SpotPriceLimit>
      <Queues>
            <QueueInfo>
                  <MinNodesInQueue>0</MinNodesInQueue>
                  <MaxNodesInQueue>100</MaxNodesInQueue>
                  <EnableAutoGrow>true</EnableAutoGrow>
                  <EnableAutoShrink>true</EnableAutoShrink>
                  <InstanceTypes>
                        <InstanceTypeInfo>
                              <ZoneId>cn-hangzhou-i</ZoneId>
                              <VSwitchId>vsw-bp1lfcjbfb099rrjn****</VSwitchId>
                              <SpotPriceLimit>0</SpotPriceLimit>
                              <HostNamePrefix>compute</HostNamePrefix>
                              <InstanceType>ecs.sn1ne.large</InstanceType>
                              <SpotStrategy>NoSpot</SpotStrategy>
                        </InstanceTypeInfo>
                  </InstanceTypes>
                  <QueueName>workq</QueueName>
            </QueueInfo>
            <QueueInfo>
                  <MinNodesInQueue>0</MinNodesInQueue>
                  <MaxNodesInQueue>100</MaxNodesInQueue>
                  <EnableAutoGrow>true</EnableAutoGrow>
                  <EnableAutoShrink>true</EnableAutoShrink>
                  <InstanceTypes>
            </InstanceTypes>
                  <QueueName>test1</QueueName>
            </QueueInfo>
            <QueueInfo>
                  <MinNodesInQueue>0</MinNodesInQueue>
                  <MaxNodesInQueue>100</MaxNodesInQueue>
                  <EnableAutoGrow>true</EnableAutoGrow>
                  <EnableAutoShrink>true</EnableAutoShrink>
                  <InstanceTypes>
            </InstanceTypes>
                  <QueueName>tes2</QueueName>
            </QueueInfo>
      </Queues>
      <ExcludeNodes>i-bp19lgqwxb4206t5****,i-bp1g4hvzs9pywrhb****</ExcludeNodes>
      <SpotStrategy>NoSpot</SpotStrategy>
</GetAutoScaleConfigResponse>

JSON格式

{
	"RequestId":"04F0F334-13358736C-A1D7-6C044FE73368",
    "ExtraNodesGrowRatio": 0,
	"EnableAutoGrow": true,
	"ClusterId": "ehpc-hz-FYUr32****",
	"ShrinkIdleTimes": 3,
	"MaxNodesInCluster": 300,
	"ClusterType": "pbs",
	"EnableAutoShrink": true,
	"GrowRatio": 100,
	"GrowIntervalInMinutes": 2,
	"Uid": "129845258050****",
	"GrowTimeoutInMinutes": 20,
	"ImageId": "m-bp10txryr4mhrrt1****",
	"ShrinkIntervalInMinutes": 2,
	"SpotPriceLimit": 0,
	"Queues": {
		"QueueInfo": [
			{
				"MinNodesInQueue": "0",
				"MaxNodesInQueue": "100",
				"EnableAutoGrow": "true",
				"EnableAutoShrink": "true",
				"InstanceTypes": {
					"InstanceTypeInfo": [
						{
							"ZoneId": "cn-hangzhou-i",
							"VSwitchId": "vsw-bp1lfcjbfb099rrjn****",
							"SpotPriceLimit": "0",
							"HostNamePrefix": "compute",
							"InstanceType": "ecs.sn1ne.large",
							"SpotStrategy": "NoSpot"
						}
					]
				},
				"QueueName": "workq"
			},
			{
				"MinNodesInQueue": "0",
				"MaxNodesInQueue": "100",
				"EnableAutoGrow": "true",
				"EnableAutoShrink": "true",
				"InstanceTypes": {
					"InstanceTypeInfo": []
				},
				"QueueName": "test1"
			},
			{
				"MinNodesInQueue": "0",
				"MaxNodesInQueue": "100",
				"EnableAutoGrow": "true",
				"EnableAutoShrink": "true",
				"InstanceTypes": {
					"InstanceTypeInfo": []
				},
				"QueueName": "tes2"
			}
		]
	},
	"ExcludeNodes": "i-bp19lgqwxb4206t5****,i-bp1g4hvzs9pywrhb****",
	"SpotStrategy": "NoSpot"
}

错误码

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

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