全部产品
Search
文档中心

资源编排:ALIYUN::ECS::InstanceGroupClone

更新时间:Nov 02, 2023

ALIYUN::ECS::InstanceGroupClone类型用于克隆一组ECS实例。

语法

 {
  "Type": "ALIYUN::ECS::InstanceGroupClone",
  "Properties": {
    "BackendServerWeight": Integer,
    "SystemDiskAutoSnapshotPolicyId": String,
    "DiskMappings": List,
    "Period": Number,
    "LaunchTemplateName": String,
    "RamRoleName": String,
    "ResourceGroupId": String,
    "KeyPairName": String,
    "SystemDiskDiskName": String,
    "PeriodUnit": String,
    "Description": String,
    "Tags": List,
    "AutoRenewPeriod": Number,
    "ImageId": String,
    "AutoRenew": String,
    "SpotStrategy": String,
    "SourceInstanceId": String,
    "EniMappings": List,
    "Password": String,
    "PasswordInherit": Boolean,
    "MaxAmount": Integer,
    "AutoReleaseTime": String,
    "SystemDiskCategory": String,
    "LoadBalancerIdToAttach": String,
    "LaunchTemplateId": String,
    "LaunchTemplateVersion": String,
    "ZoneId": String,
    "InternetMaxBandwidthOut": Integer,
    "InstanceName": String,
    "DeletionProtection": Boolean,
    "DeploymentSetId": String,
    "Ipv6AddressCount": Integer,
    "SecurityGroupId": String,
    "SecurityGroupIds": List,
    "SpotPriceLimit": String,
    "HpcClusterId": String,
    "SystemDiskDescription": String,
    "Ipv6Addresses": List,
    "SystemDiskProvisionedIops": Integer,
    "SystemDiskBurstingEnabled": Boolean,
    "SystemDiskKMSKeyId": String,
    "SystemDiskStorageClusterId": String,
    "InternetMaxBandwidthIn": Integer,
    "UpdatePolicy": String,
    "SystemDiskEncryptAlgorithm": String,
    "SystemDiskEncrypted": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ResourceGroupId

String

实例所在的资源组ID。

HpcClusterId

String

实例所属的EHPC集群ID。

SourceInstanceId

String

需要克隆的ECS实例ID。

克隆实例规格、镜像、带宽收费方式、带宽限制、网络类型等。如果源ECS实例加入多个安全组,新的安全组会加入源实例的首个安全组。

MaxAmount

Integer

一次性创建ECS实例的个数。

取值范围:1~100。

BackendServerWeight

Integer

ECS实例在负载均衡器实例中的权重。

取值范围:0~100。

默认值:100。

LoadBalancerIdToAttach

String

ECS实例将加入到的负载均衡实例的ID。

Description

String

描述信息。

最长256个字符。

ImageId

String

用于启动ECS实例的镜像ID,包括公共镜像、自定义镜像和云市场镜像。

支持通过模糊的方式指定公共镜像ID,无需指定一个完整的公共镜像ID。例如:

  • 指定ubuntu,最终会匹配ubuntu16_0402_64_20G_alibase_20170818.vhd。

  • 指定ubuntu_14,最终会匹配ubuntu_14_0405_64_20G_alibase_20170824.vhd。

  • 指定ubuntu*14*32,最终会匹配ubuntu_14_0405_32_40G_alibase_20170711.vhd。

  • 指定ubuntu_16_0402_32,最终会匹配ubuntu_16_0402_32_40G_alibase_20170711.vhd。

InternetMaxBandwidthOut

Integer

公网最大出网带宽。

单位:Mbps。

取值范围:

  • 按固定带宽计费时:0~200。

  • 按流量计费时:1~200。

SecurityGroupId

String

实例所属的安全组。

不支持同时指定SecurityGroupId和SecurityGroupIds。

SecurityGroupIds

List

实例所属的安全组列表。

更多信息,请参见安全组

不支持同时指定SecurityGroupId和SecurityGroupIds。

InstanceName

String

实例名称。

最长为128个字符。可包含英文字母、汉字、数字、下划线(_)、半角句号(.)和短划线(-)。

Password

String

ECS实例登录密码。

长度为8~30个字符。必须同时包含英文字母、数字和特殊字符,支持特殊字符:( ) ‘ ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ‘ < > , . ? / -

如果指定此参数,请使用HTTPS协议调用API,以避免密码泄露。

PasswordInherit

Boolean

是否使用镜像预设的密码。

取值:

  • true:使用镜像预设的密码。

  • false:不使用镜像预设的密码。

说明

使用该参数时,Password参数必须为空,同时您需要确保使用的镜像已经设置了密码。

DiskMappings

List

需要挂载的磁盘。

最多支持16块磁盘。

更多信息,请参见DiskMappings属性

Period

Number

付费周期。

取值:1~9、12、24、36。

单位:月。

当InstanceChargeType取值为PrePaid时,此参数为必选参数;当InstanceChargeType取值为PostPaid时,此参数为可选参数。

Tags

List

用户自定义标签。

最多支持20个标签,格式:[{"Key": "tagKey", "Value": "tagValue"},{"Key": "tagKey2", "Value": "tagValue2"}]

更多信息,请参见Tags属性

ZoneId

String

可用区ID。

KeyPairName

String

ECS实例绑定的密钥对名称。

如果是Windows ECS实例,则忽略该参数。如果已填写KeyPairName,Password的内容仍会被设置到实例中,但是Linux系统中的密码登录方式会被禁止。

RamRoleName

String

实例RAM角色名称。

您可以调用ListRoles查询实例RAM角色名称,更多信息,请参见CreateRole - 创建角色ListRoles - 获取角色列表

SpotPriceLimit

String

实例的每小时最高价格。

最大支持3位小数。当SpotStrategy为SpotWithPriceLimit时,SpotPriceLimit生效。

SpotStrategy

String

后付费实例的竞价策略。

当InstanceChargeType取值为PostPaid时,此参数为必选参数。

取值:

  • NoSpot(默认值):正常按量付费实例。

  • SpotWithPriceLimit:上限价格的竞价实例。

  • SpotAsPriceGo:系统自动出价,最高不超过按量付费价格。

SystemDiskDiskName

String

系统盘名称。

长度为2~128个字符。必须以英文字母或汉字开头,不能以http://https://开头。可包含数字、半角冒号(:)、下划线(_)和短划线(-)。

PeriodUnit

String

购买资源的时长。

取值:

  • Week

    PeriodUnit取值为Week时,Period取值为1、2、3、4,AutoRenewPeriod取值为1、2、3。

  • Month(默认值)

    PeriodUnit取值为Month时,Period取值为1、2、3、4、5、6、7、8、9、12、24、36、48、60,AutoRenewPeriod取值为1、2、3、6、12。

AutoRenewPeriod

Number

每次自动续费的时长。

当AutoRenew为true时,该参数为必填参数。

取值:

  • 1(默认值)

  • 2

  • 3

  • 6

  • 12

AutoRenew

String

是否自动续费。

取值:

  • True:自动续费。

  • False(默认值):不自动续费。

当InstanceChargeType取值PrePaid时,此参数为必选参数。

EniMappings

List

附加到实例的弹性网卡。

附加到实例的弹性网卡个数最多为1个。

更多信息,请参见EniMappings属性

AutoReleaseTime

String

ECS实例自动释放的时间。

时间格式必须遵守ISO8601规范,例如:yyyy-MM-ddTHH:mm:ssZ。释放时间不能超过三年。

SystemDiskCategory

String

系统盘类型。

取值:

  • cloud:普通云盘。

  • cloud_efficiency(默认值):高效云盘。

  • cloud_ssd:SSD云盘。

  • cloud_essd:ESSD云盘。

SystemDiskProvisionedIops

Integer

系统盘预配的 IOPS。

SystemDiskBurstingEnabled

Boolean

系统盘是否启用突发。

取值:

  • true:启用。

  • false(默认值):禁用。

LaunchTemplateName

String

启动模板的名称。

LaunchTemplateVersion

String

启动模板的版本。

如果没有指定版本,则使用默认版本。

LaunchTemplateId

String

启动模板ID。

SystemDiskDescription

String

系统盘描述信息。

DeletionProtection

Boolean

实例释放保护属性,指定是否支持通过控制台或DeleteInstance接口释放实例。

取值:

  • true:支持。

  • false:不支持。

DeploymentSetId

String

部署集ID。

Ipv6AddressCount

Integer

为弹性网卡指定随机生成的IPv6地址数量。

不能同时指定Ipv6Addresses和Ipv6AddressCount。

Ipv6Addresses

List

为弹性网卡指定的一个或多个IPv6地址。

列表最大长度为1。属性的更改不影响现有实例。不能同时指定Ipv6Addresses和Ipv6AddressCount。

SystemDiskAutoSnapshotPolicyId

String

系统盘自动快照策略ID。

SystemDiskKMSKeyId

String

系统盘使用的KMS密钥ID。

SystemDiskStorageClusterId

String

系统盘专属块存储集群ID。

InternetMaxBandwidthIn

Integer

最大互联网输出带宽设置。 

单位为Mbps(兆比特每秒)。 

取值范围为0~200。

默认值为200。

UpdatePolicy

String

指定更新时的策略。

取值:

  • ForNewInstance(默认值):更新策略针对新增实例生效。

  • ForAllInstances:更新策略针对所有实例生效。

SystemDiskEncryptAlgorithm

String

系统盘采用的加密算法。

取值:

  • AES-256。

  • SM4-128。

SystemDiskEncrypted

String

系统盘是否加密。

取值:

  • true:加密。

  • false:不加密。

DiskMappings语法

"DiskMappings": [
  {
    "Category": String,
    "DiskName": String,
    "Description": String,
    "Encrypted": String,
    "KMSKeyId": String,
    "Device": String,
    "SnapshotId": String,
    "Size": String,
    "PerformanceLevel": String,
    "AutoSnapshotPolicyId": String,
    "ProvisionedIops": Integer,
    "BurstingEnabled": Boolean
  }
]

DiskMappings属性

属性名称

类型

必须

允许更新

描述

约束

Size

String

数据盘大小。

单位:GB。

Category

String

数据盘的类型。

取值:

  • cloud(默认值):普通云盘。

  • cloud_ssd:SSD云盘。

  • cloud_essd:ESSD云盘。

  • cloud_efficiency:高效云盘。

DiskName

String

数据盘的名称。

最长128个字符。可包含英文字母、汉字、数字、下划线(_)、半角句号(.)和短划线(-)。

Description

String

数据盘的描述。

长度为2~256个字符。不能以http://https://开头。

Device

String

数据盘在ECS中的名称。

取值示例:/dev/xvd[a-z]

SnapshotId

String

快照ID。

Encrypted

String

数据盘是否加密。

取值:

  • true:加密。

  • false(默认值):不加密。

KMSKeyId

String

数据盘对应的KMS密钥ID。

AutoSnapshotPolicyId

String

自动快照策略ID。

PerformanceLevel

String

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

取值:

  • PL0:单盘最高随机读写IOPS为1万。

  • PL1(默认值):单盘最高随机读写IOPS为5万。

  • PL2:单盘最高随机读写IOPS为10万。

  • PL3:单盘最高随机读写IOPS为100万。

关于如何选择ESSD性能等级,请参见ESSD云盘

ProvisionedIops

Integer

预配的IOPS。

BurstingEnabled

Boolean

是否启用突发。

取值:

  • true:启用。

  • false(默认值):禁用。

EniMappings语法

"EniMappings": [
  {
    "SecurityGroupId": String,
    "VSwitchId": String,
    "Description": String,
    "NetworkInterfaceName": String,
    "PrimaryIpAddress": String,    
    "InstanceType": String,
    "Ipv6AddressCount": Integer,
    "NetworkInterfaceTrafficMode": String,
    "Ipv6Addresses": List,
    "QueueNumber": Integer,
    "SecurityGroupIds": List
  }
]

EniMappings属性

属性名称

类型

必须

允许更新

描述

约束

SecurityGroupId

String

安全组ID。

所属的安全组ID必须是同一个专有网络下的安全组。

VSwitchId

String

交换机ID。

Description

String

弹性网卡的描述信息。

长度为2~256个字符,不能以http://https://开头。

NetworkInterfaceName

String

弹性网卡名称。

长度为2~128个字符。必须以英文字母或汉字开头,不能以http://https://开头。可包含英文字母、汉字、数字、半角冒号(:)、下划线(_)和短划线(-)。

PrimaryIpAddress

String

弹性网卡的主私有IP地址。

指定的IP必须是在所属交换机的地址段内的空闲地址。

如果不指定IP,则默认随机分配该交换机中的空闲地址。

InstanceType

String

弹性网卡类型。

最多设置2个网卡,设置1个弹性网卡时,支持设置1个主网卡或1个辅助网卡。设置2个弹性网卡时,仅支持同时设置1个主网卡和1个辅助网卡。

取值:

  • Primary:主网卡。

  • Secondary(默认值):辅助网卡。

Ipv6AddressCount

Integer

为主网卡指定随机生成的IPv6地址数量。

取值范围:1~10。

注意事项:

  • NetworkInterface.InstanceType取值为Primary时,设置该参数才会生效。如果NetworkInterface.InstanceType取值为Secondary或空值,则不能设置该参数。

  • 设置该参数后,您不能再设置Ipv6AddressCountIpv6AddressNetworkInterface.Ipv6Address

NetworkInterfaceTrafficMode

String

网卡的通讯模式。

取值:

  • Standard(默认值):使用TCP通讯模式。

  • HighPerformance:开启ERI(Elastic RDMA Interface)接口,使用RDMA通讯模式。

说明

RDMA模式的弹性网卡数量不能超过该实例规格族的限制。更多信息,请参见实例规格族

Ipv6Addresses

List

为主网卡指定一个或多个IPv6地址。

支持设置最多10个IPv6地址。

注意事项:

  • NetworkInterface.InstanceType取值为Primary时,设置该参数才会生效。如果NetworkInterface.InstanceType取值为Secondary或空值,则不能设置该参数。

  • 设置该参数后,Amount取值只能为1,且不能再设置Ipv6AddressCountIpv6Address.NNetworkInterface.N.Ipv6AddressCount

QueueNumber

Integer

弹性网卡队列数。

注意事项:

  • 取值范围为1~2,设置1个弹性网卡时,支持设置1个主网卡或1个辅助网卡。设置2个弹性网卡时,仅支持同时设置1个主网卡和1个辅助网卡。

  • 不能超过实例规格允许的单块网卡最大队列数。

  • 实例的所有网卡累加队列数不能超过实例规格允许的队列数总配额。实例规格的单块网卡最大队列数和总配额可以通过DescribeInstanceTypes接口查询MaximumQueueNumberPerEniTotalEniQueueQuantity字段。

  • 如果NetworkInterface.InstanceType取值为Primary,且设置了该参数取值,则不能再设置NetworkInterfaceQueueNumber参数。

SecurityGroupIds

List

弹性网卡所属的一个或多个安全组ID。

注意事项:

  • 如果NetworkInterface.N.InstanceType取值为Primary,则必须设置该参数或NetworkInterface.SecurityGroupId。此时该参数的作用等同于SecurityGroupIds,但需要注意不能再设置SecurityGroupIdSecurityGroupIdsNetworkInterface.SecurityGroupId

  • 如果NetworkInterface.N.InstanceType取值为Secondary或空值,则该参数为非必填参数。默认值为ECS实例所属的安全组。

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

长度为1~128个字符,不能以aliyunacs:开头,不能包含http://https://

Value

String

标签值。

长度为0~128个字符,不能以aliyunacs:开头,不能包含http://https://

返回值

Fn::GetAtt

  • InstanceIds:实例ID,是访问实例的唯一标识。由系统生成,全局唯一。

  • PrivateIps:VPC类型实例的私网IP列表。当NetworkType为vpc时,此参数生效。例如:一个带有格式的JSON Array: [“172.16.XX.XX”, “172.16.XX.XX”, … “172.16.XX.XX”],最多100个IP,用半角逗号(,)隔开。

  • InnerIps:Classic类型实例的私网IP列表。当NetworkType为classic时,此参数生效。例如:一个带有格式的JSON Array: [“10.1.XX.XX”, “10.1.XX.XX”, … “10.1.XX.XX”],最多100个IP,用半角逗号(,)隔开。

  • PublicIps:Classic类型实例的公网IP列表。当NetworkType为classic时,此参数生效。例如:一个带有格式的JSON Array: [“42.1.XX.XX”, “42.1.XX.XX”, … “42.1.XX.XX”],最多100个IP,用半角逗号(,)隔开。

  • HostNames:所有实例的主机名称列表。

  • OrderId:实例的订单ID列表。

  • ZoneIds:可用区ID。

  • Ipv6AddressIds:已创建ECS实例的IPv6地址ID列表。注意:返回类型是两层列表。如果实例没有任何IPv6地址,则列表中相应位置的元素为空。如果所有实例都没有任何IP地址,则将返回null。

  • Ipv6Addresses:已创建ECS实例的IPv6地址列表。注意:返回类型是两层列表。如果实例没有任何IPv6地址,则列表中相应位置的元素为null。如果所有实例都没有任何IP地址,则将返回null。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Description: According the existing ECS instance, clone a set of ECS instanes with the same configuration(InstanceType, ImageId, InternetChargeType, InternetMaxBandwidthOut, system disk, data disk configurations, VPC properties). The user only needs to specify SourceInstanceId.
Parameters:
  SourceInstanceId:
    Type: String
    Description:
      en: The source ECS instance ID to be cloned
      zh-cn: 需要克隆的ECS实例ID
    Label:
      zh-cn: 源实例ID
      en: Source Instance ID
  InstanceName:
    Type: String
    Description:
      en: '[2, 128] alphanumeric letters, underline, dot or hyphen'
      zh-cn: 实例名称。长度为2~128个字符,可包含英文、汉字、数字、下划线(_)、半角句号(.)和短划线(-)。
    ConstraintDescription:
      en: '[2, 128] characters, consists of uppercase letter, lowercase letter, number or special characters.'
      zh-cn: 长度为2~128个字符,可包含英文字母、数字或特殊字符。
    Label:
      zh-cn: 实例名称
      en: Instance Name
    Default: ClonedECS
    MaxLength: 128
    MinLength: 2
  MaxAmount:
    Type: Number
    Description:
      en: The maximum of ECS instances, must be greater than or equal to the minimum.
      zh-cn: 一次性创建ECS实例的最大个数,必须大于或等于一次性创建ECS实例的最小个数。
    ConstraintDescription:
      zh-cn: 1~100内的整数
      en: An integer within [1, 100]
    Label:
      zh-cn: 最大个数
      en: The Maximum of ECS Instances
    MaxValue: 100
    MinValue: 1
    Default: 1
  Password:
    Type: String
    Description:
      en: '[8, 30] characters, consists of uppercase letter, lowercase letter, number or special characters such as ( ) ` ~ ! @ # $ % ^  * - + = | { } [ ] : ; ‘ , . ? / '
      zh-cn: '长度为8~30个字符。必须同时包含大写英文字母、小写英文字母、数字和特殊字符中的三项,支持的特殊字符为:( ) ` ~ ! @ # $ % ^  * - + = | { } [ ] : ; ‘ , . ? /。'
    ConstraintDescription:
      en: 'Length 8-30, must contain upper case letters, lower case letters, Numbers, special symbols three; special characters include: ()`~!@#$%^*_-+=|{}[]:;'',.?/'
      zh-cn: 长度为8~30个字符。必须同时包含大写英文字母、小写英文字母、数字和特殊字符中的三项,支持的特殊字符为()`~!@#$%^*_-+=|{}[]:;' ,.?/。
    Label:
      zh-cn: ECS实例密码
      en: ECS Instance Password
    MaxLength: 30
    MinLength: 8
    AllowedPattern: '[a-zA-Z0-9-\(\)\`\~\!@\#\$%\^\*-+=\|\{\}\[\]\:\;\‘\,\.\?\/]*'
    NoEcho: true
Metadata:
  ALIYUN::ROS::Interface:
    ParameterGroups:
      - Parameters:
          - InstanceName
          - SourceInstanceId
          - MaxAmount
          - Password
        Label:
          default: ECS
    TemplateTags:
      - acs:example:弹性计算:指定SourceInstanceId克隆出相同配置的一组ECS实例。
Resources:
  ECSInstanceGroup:
    Type: ALIYUN::ECS::InstanceGroupClone
    Properties:
      SourceInstanceId:
        Ref: SourceInstanceId
      MaxAmount:
        Ref: MaxAmount
      Password:
        Ref: Password
Outputs:
  InstanceIds:
    Description: The instance ID list of created ecs instance
    Value:
      Fn::GetAtt:
        - ECSInstanceGroup
        - InstanceIds
  PublicIps:
    Description: Public IP address list of created ecs instance.
    Value:
      Fn::GetAtt:
        - ECSInstanceGroup
        - PublicIps
  ZoneIds:
    Description: Zone ID of created instance.
    Value:
      Fn::GetAtt:
        - ECSInstanceGroup
        - ZoneIds

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "According the existing ECS instance, clone a set of ECS instanes with the same configuration(InstanceType, ImageId, InternetChargeType, InternetMaxBandwidthOut, system disk, data disk configurations, VPC properties). The user only needs to specify SourceInstanceId.",
  "Parameters": {
    "SourceInstanceId": {
      "Type": "String",
      "Description": {
        "en": "The source ECS instance ID to be cloned",
        "zh-cn": "需要克隆的ECS实例ID"
      },
      "Label": {
        "zh-cn": "源实例ID",
        "en": "Source Instance ID"
      }
    },
    "InstanceName": {
      "Type": "String",
      "Description": {
        "en": "[2, 128] alphanumeric letters, underline, dot or hyphen",
        "zh-cn": "实例名称。长度为2~128个字符,可包含英文、汉字、数字、下划线(_)、半角句号(.)和短划线(-)。"
      },
      "ConstraintDescription": {
        "en": "[2, 128] characters, consists of uppercase letter, lowercase letter, number or special characters.",
        "zh-cn": "长度为2~128个字符,可包含英文字母、数字或特殊字符。"
      },
      "Label": {
        "zh-cn": "实例名称",
        "en": "Instance Name"
      },
      "Default": "ClonedECS",
      "MaxLength": 128,
      "MinLength": 2
    },
    "MaxAmount": {
      "Type": "Number",
      "Description": {
        "en": "The maximum of ECS instances, must be greater than or equal to the minimum.",
        "zh-cn": "一次性创建ECS实例的最大个数,必须大于或等于一次性创建ECS实例的最小个数。"
      },
      "ConstraintDescription": {
        "zh-cn": "1~100内的整数",
        "en": "An integer within [1, 100]"
      },
      "Label": {
        "zh-cn": "最大个数",
        "en": "The Maximum of ECS Instances"
      },
      "MaxValue": 100,
      "MinValue": 1,
      "Default": 1
    },
    "Password": {
      "Type": "String",
      "Description": {
        "en": "[8, 30] characters, consists of uppercase letter, lowercase letter, number or special characters such as ( ) ` ~ ! @ # $ % ^  * - + = | { } [ ] : ; ‘ , . ? / ",
        "zh-cn": "长度为8~30个字符。必须同时包含大写英文字母、小写英文字母、数字和特殊字符中的三项,支持的特殊字符为:( ) ` ~ ! @ # $ % ^  * - + = | { } [ ] : ; ‘ , . ? /。"
      },
      "ConstraintDescription": {
        "en": "Length 8-30, must contain upper case letters, lower case letters, Numbers, special symbols three; special characters include: ()`~!@#$%^*_-+=|{}[]:;',.?/",
        "zh-cn": "长度为8~30个字符。必须同时包含大写英文字母、小写英文字母、数字和特殊字符中的三项,支持的特殊字符为()`~!@#$%^*_-+=|{}[]:;' ,.?/。"
      },
      "Label": {
        "zh-cn": "ECS实例密码",
        "en": "ECS Instance Password"
      },
      "MaxLength": 30,
      "MinLength": 8,
      "AllowedPattern": "[a-zA-Z0-9-\\(\\)\\`\\~\\!@\\#\\$%\\^\\*-+=\\|\\{\\}\\[\\]\\:\\;\\‘\\,\\.\\?\\/]*",
      "NoEcho": true
    }
  },
  "Metadata": {
    "ALIYUN::ROS::Interface": {
      "ParameterGroups": [
        {
          "Parameters": [
            "InstanceName",
            "SourceInstanceId",
            "MaxAmount",
            "Password"
          ],
          "Label": {
            "default": "ECS"
          }
        }
      ],
      "TemplateTags": [
        "acs:example:弹性计算:指定SourceInstanceId克隆出相同配置的一组ECS实例。"
      ]
    }
  },
  "Resources": {
    "ECSInstanceGroup": {
      "Type": "ALIYUN::ECS::InstanceGroupClone",
      "Properties": {
        "SourceInstanceId": {
          "Ref": "SourceInstanceId"
        },
        "MaxAmount": {
          "Ref": "MaxAmount"
        },
        "Password": {
          "Ref": "Password"
        }
      }
    }
  },
  "Outputs": {
    "InstanceIds": {
      "Description": "The instance ID list of created ecs instance",
      "Value": {
        "Fn::GetAtt": [
          "ECSInstanceGroup",
          "InstanceIds"
        ]
      }
    },
    "PublicIps": {
      "Description": "Public IP address list of created ecs instance.",
      "Value": {
        "Fn::GetAtt": [
          "ECSInstanceGroup",
          "PublicIps"
        ]
      }
    },
    "ZoneIds": {
      "Description": "Zone ID of created instance.",
      "Value": {
        "Fn::GetAtt": [
          "ECSInstanceGroup",
          "ZoneIds"
        ]
      }
    }
  }
}

更多示例,请参见创建一组相同配置的ECS实例、克隆一个ECS实例、新建云助手命令和为一台或多台ECS实例触发一条云助手命令的组合示例:JSON示例YAML示例