调用AddNodes增加一个或多个计算节点。

接口说明

增加计算节点前,您可以:

调试

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

请求参数

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

系统规定参数。取值:AddNodes

ClusterId String ehpc-hz-FYUr32****

集群ID。

Count Integer 2

添加的计算节点数量。取值范围:1~99

ImageOwnerAlias String self

镜像类型。取值范围:

  • system:公共镜像
  • self:自定义镜像
  • others:共享镜像
  • marketplace:镜像市场镜像

默认值:system

ImageId String suse11sp3_64_20G_aliaegis_20150428****

镜像ID。

InstanceType String ecs.n1.tiny

扩容的实例规格,默认使用上次扩容或者创建集群时的计算节点实例规格。

ComputeSpotStrategy String NoSpot

计算节点抢占策略。当参数EcsChargeType取值PostPaid时才生效。取值范围:

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

默认值:NoSpot

ComputeSpotPriceLimit String 0.68

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

EcsChargeType String PostPaid

集群使用ECS实例的付费类型。取值范围:

  • PostPaid:按量付费
  • PrePaid:包年包月

默认值:PostPaid

若选择包年包月类型,默认开启自动续费,节点释放后将关闭自动续费。

Period Integer 1

购买资源的时长,单位由PeriodUnit指定。当参数InstanceChargeType取值为PrePaid时才生效且为必选值。取值范围:

  • PeriodUnit=Week时,Period取值:{“1”, “2”, “3”, “4”}。
  • PeriodUnit=Month时,Period取值:{“1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “12”, “24”, “36”, ”48”, ”60”}。

默认值:1

PeriodUnit String Month

购买资源的时长。取值范围:

  • Week
  • Month

默认值:Month

AutoRenew String true

是否自动续费,当参数EcsChargeType取值PrePaid时才生效。取值范围:

  • true:自动续费
  • false:不自动续费

默认值:true

AutoRenewPeriod Integer 1

每次自动续费的时长。参数AutoRenew取值true时生效。

  • PeriodUnit为Week时,AutoRenewPeriod取值{"1", "2", "3"}。
  • PeriodUnit为Month时,AutoRenewPeriod取值{"1", "2", "3", "6", "12"}。

默认值:1

JobQueue String workq

计算节点加入的队列名称。

CreateMode String manual

节点创建方式。取值范围:

  • manual:手动扩容
  • autoscale:自动扩容

默认值:manual

SystemDiskType String cloud_ssd

系统盘的云盘种类。取值范围:

  • cloud_efficiency:高效云盘
  • cloud_ssd:SSD云盘
  • cloud_essd:ESSD云盘
  • cloud:普通云盘

默认值:cloud_efficiency

其中cloud类型云盘已停售。

SystemDiskSize Integer 40

系统盘的大小。单位:GiB

取值范围:40~500

默认值:40

ZoneId String cn-hangzhou-b

可用区ID。

VSwitchId String vsw-bp1lfcjbfb099rrjn****

交换机ID。

HostNamePrefix String compute

主机名前缀。

HostNameSuffix String 01

主机名后缀。

ComputeEnableHt Boolean true

计算节点是否支持超线程。取值范围:

  • true:支持超线程
  • false:不支持超线程

默认值:true

AllocatePublicAddress Boolean false

是否分配公网地址。取值范围:

  • true:分配公网地址
  • false:不分配公网地址

默认值:false

InternetChargeType String PayByTraffic

弹性公网IP付费类型。取值范围:

  • PayByBandwidth:按固定带宽收费
  • PayByTraffic:按使用流量计费
InternetMaxBandWidthIn Integer 10

公网入带宽最大值,单位为Mbit/s。取值范围:

  • 当所购公网出带宽小于等于10Mbit/s时:1~10,默认为10。
  • 当所购公网出带宽大于10Mbit/s时:1~InternetMaxBandWidthOut的取值,默认为InternetMaxBandWidthOut的取值。
InternetMaxBandWidthOut Integer 10

公网出带宽最大值,单位为Mbit/s。取值范围:0~100

默认值:0

ClientToken String 123e4567-e89b-12d3-a456-426655440000

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符,且不能超过64个字符。更多信息,请参见如何保证幂等性

SystemDiskLevel String PL0

创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。取值范围:

  • PL0:单盘最高随机读写IOPS 1万
  • PL1:单盘最高随机读写IOPS 5万
  • PL2:单盘最高随机读写IOPS 10万
  • PL3:单盘最高随机读写IOPS 100万

默认值:PL1

更多ESSD性能参数,请参见ESSD云盘

返回数据

名称 类型 示例值 描述
InstanceIds List null

实例ID。

说明 由于AddNodes是异步操作,请求成功就会立即返回,不会等待实例创建,所以没有返回InstanceId,您可以通过ListNodes获取InstanceId。
RequestId String B745C159-3155-4B94-95D0-4B73D4D2C60F

请求ID。

TaskId String B745C159-3155-4B94-95D0-4B73D4D2C60F

任务ID。

示例

请求示例

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

正常返回示例

XML格式

<AddNodesResponse>
      <TaskId>B745C159-3155-4B94-95D0-4B73D4D2C60F</TaskId>
      <RequestId>B745C159-3155-4B94-95D0-4B73D4D2C60F</RequestId>
      <InstanceIds>
    </InstanceIds>
</AddNodesResponse>

JSON格式

{
	"TaskId": "B745C159-3155-4B94-95D0-4B73D4D2C60F",
	"RequestId": "B745C159-3155-4B94-95D0-4B73D4D2C60F",
	"InstanceIds": {
		"InstanceId": []
	}
}

错误码

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

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