调用DescribeAutoScaleConfig查询指定集群的自动伸缩配置信息。

调试

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

请求参数

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

系统规定参数。取值:DescribeAutoScaleConfig

ClusterId String ehpc-hz-FYUr32****

集群ID。

返回数据

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

集群ID。

ClusterType String slurm

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

  • pbs
  • slurm
  • opengridscheduler
  • deadline
EnableAutoGrow Boolean true

是否开启自动扩容。

EnableAutoShrink Boolean true

是否开启自动缩容。

ExcludeNodes String i-bp19lgqwxb4206t5****,i-bp1g4hvzs9pywrhb****

不使用自动伸缩的节点列表。

ExtraNodesGrowRatio Integer 0

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

GrowIntervalInMinutes Integer 10

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

GrowRatio Integer 1

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

GrowTimeoutInMinutes Integer 20

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

MaxNodesInCluster Integer 100

集群最大计算节点数,集群最多可以扩展的节点数量。

RequestId String 04F0F334-1335-436C-A1D7-6C044FE73

请求ID。

ShrinkIdleTimes Integer 3

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

ShrinkIntervalInMinutes Integer 2

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

SpotPriceLimit String 0.062

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

SpotStrategy String NoSpot

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

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

用户ID。

示例

请求示例

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

正常返回示例

XML格式

<DescribeAutoScaleConfigResponse>
      <RequestId>04F0F334-1335-436C-A1D7-6C044FE73</RequestId>
      <ClusterType>slurm</ClusterType>
      <Uid>testu****</Uid>
      <EnableAutoGrow>true</EnableAutoGrow>
      <EnableAutoShrink>true</EnableAutoShrink>
      <ExcludeNodes>i-bp19lgqwxb4206t5****,i-bp1g4hvzs9pywrhb****</ExcludeNodes>
      <GrowIntervalInMinutes>10</GrowIntervalInMinutes>
      <ShrinkIntervalInMinutes>2</ShrinkIntervalInMinutes>
      <ShrinkIdleTimes>3</ShrinkIdleTimes>
      <GrowTimeoutInMinutes>20</GrowTimeoutInMinutes>
      <ExtraNodesGrowRatio>0</ExtraNodesGrowRatio>
      <MaxNodesInCluster>100</MaxNodesInCluster>
      <GrowRatio>1</GrowRatio>
      <SpotStrategy>NoSpot</SpotStrategy>
      <SpotPriceLimit>0</SpotPriceLimit>
</DescribeAutoScaleConfigResponse>

JSON格式

{
        "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73",
        "ClusterType": "slurm",
        "Uid": "testu****",
        "EnableAutoGrow": true,
        "EnableAutoShrink": true,
        "ExcludeNodes": "i-bp19lgqwxb4206t5****,i-bp1g4hvzs9pywrhb****",
        "GrowIntervalInMinutes": 10,
        "ShrinkIntervalInMinutes": 2,
        "ShrinkIdleTimes": 3,
        "GrowTimeoutInMinutes": 20,
        "ExtraNodesGrowRatio": 0,
        "MaxNodesInCluster": 100,
        "GrowRatio": 1,
        "SpotStrategy": "NoSpot",
        "SpotPriceLimit": 0
}

错误码

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

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