All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::InstanceGroupClone

Last Updated:Oct 10, 2026

ALIYUN::ECS::InstanceGroupClone is used to clone a group of new ECS instances.

Syntax

{
  "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,
    "SecurityOptions": Map,
    "ImageOptions": Map,
    "NetworkOptions": Map,
    "HostNames": List,
    "NetworkInterfaceQueueNumber": Integer,
    "UniqueSuffix": Boolean,
    "CpuOptions": Map
  }
}

Properties

Property

Type

Required

Editable

Description

Constraints

MaxAmount

Integer

Yes

Yes

The number of ECS instances to create at a time.

Valid values: 1 to 100.

SourceInstanceId

String

Yes

No

The ECS instance ID to clone.

Each cloned instance uses the instance type, image, bandwidth billing method, bandwidth limits, network type, and other configurations of the source instance. If the source instance belongs to multiple security groups, the new instances join the first security group of the source instance.

AutoReleaseTime

String

No

No

The automatic release time of the new ECS instances.

The time must comply with ISO 8601, for example, yyyy-MM-ddTHH:mm:ssZ. The release time cannot be more than three years in the future.

AutoRenew

String

No

Yes

Specifies whether to enable auto-renewal.

Valid values:

  • True to enable auto-renewal.

  • False (default) to disable auto-renewal.

This property is required when InstanceChargeType is PrePaid.

AutoRenewPeriod

Number

No

Yes

The duration of each auto-renewal.

Required when AutoRenew is True. Valid values:

  • 1 (default)

  • 2

  • 3

  • 6

  • 12

BackendServerWeight

Integer

No

No

The weight of the new ECS instances used for load balancing.

Valid values: 0 to 100.

Default value: 100.

CpuOptions

Map

No

No

CPU-related properties, including nested virtualization settings.

For more information, see CpuOptions properties.

DeletionProtection

Boolean

No

No

Specifies whether the new instances can be released from the console or by calling the OpenAPI operation DeleteInstance.

Valid values:

  • true: supported.

  • false: not supported.

DeploymentSetId

String

No

Yes

The deployment set ID.

None.

Description

String

No

Yes

The description.

A maximum of 256 characters.

DiskMappings

List

No

Yes

The data disks to attach.

A maximum of 16 disks are supported. For more information, see DiskMappings properties.

EniMappings

List

No

Yes

The elastic network interfaces (ENIs) to attach to the instances.

A maximum of one ENI can be attached. For more information, see EniMappings properties.

HostNames

List

No

No

Specifies a different hostname for each instance when multiple instances are created.

None.

HpcClusterId

String

No

Yes

The ID of the EHPC cluster to which the new instances belong.

None.

ImageId

String

No

Yes

The image ID used to start the ECS instances, including public, custom, and Alibaba Cloud Marketplace images.

You can specify a public image ID by fuzzy match. For example,

  • ubuntu matches ubuntu16_0402_64_20G_alibase_20170818.vhd

  • ubuntu_14 matches ubuntu_14_0405_64_20G_alibase_20170824.vhd

  • ubuntu*14*32 matches ubuntu_14_0405_32_40G_alibase_20170711.vhd

  • ubuntu_16_0402_32 matches ubuntu_16_0402_32_40G_alibase_20170824.vhd.

ImageOptions

Map

No

No

Image-related properties.

For more information, see ImageOptions properties.

InstanceName

String

No

Yes

The new instance name.

A maximum of 128 characters. The name can contain letters, Chinese characters, digits, underscores (_), periods (.), and hyphens (-).

InternetMaxBandwidthIn

Integer

No

No

The maximum public inbound bandwidth.

Unit: Mbps.

Valid values: 0 to 200.

Default value: 200.

InternetMaxBandwidthOut

Integer

No

No

The maximum public outbound bandwidth.

Unit: Mbps.

Valid values:

  • fixed-bandwidth billing: 0 to 200

  • traffic billing: 1 to 200

Ipv6AddressCount

Integer

No

Yes

The number of randomly generated IPv6 addresses for the ENI.

Cannot be specified together with Ipv6Addresses and Ipv6AddressCount.

Ipv6Addresses

List

No

Yes

One or more IPv6 addresses for the ENI.

The list can contain a maximum of one address. Property changes do not affect existing instances. Cannot be specified together with Ipv6AddressCount and Ipv6Addresses.

KeyPairName

String

No

Yes

The key pair name attached to the new ECS instances.

Ignored for Windows ECS instances. If you specify this property, Password is still set on the instance, but password logon is disabled for Linux systems.

LaunchTemplateId

String

No

Yes

The launch template ID.

None.

LaunchTemplateName

String

No

Yes

The launch template name.

None.

LaunchTemplateVersion

String

No

Yes

The launch template version.

The default version is used if no version is specified.

LoadBalancerIdToAttach

String

No

No

The ID of the load balancer instance to which the new ECS instances are added.

None.

NetworkInterfaceQueueNumber

Integer

No

No

The number of queues for the primary network interface.

  • Cannot exceed the maximum number of queues allowed for a single network interface by the instance type.

  • The total number of queues accumulated across all network interfaces of an instance must not exceed the total queue quota allowed by the instance type. The maximum number of queues per single network interface and the total quota for the instance type can be queried through the MaximumQueueNumberPerEni and TotalEniQueueQuantity fields by calling DescribeInstanceTypes .

  • When EniMappings.InstanceType is Primary, set only EniMappings.QueueNumber and do not set NetworkInterfaceQueueNumber.

NetworkOptions

Map

No

No

Network-related properties.

For more information, see NetworkOptions properties.

Password

String

No

Yes

The logon password for the new ECS instances.

8 to 30 characters. Must contain letters, digits, and special characters. Supported special characters: ()`~!@#$%^&*-_+=|{}[]:;'<>,.?/

If this parameter is specified, please use the HTTPS protocol to call the API to avoid password leakage.

PasswordInherit

Boolean

No

No

Specifies whether to use the password preset in the image.

Valid values:

  • true: use the preset password.

  • false: do not use the preset password.

Note

When you use this property, Password must be empty, and you must ensure that the image has a password configured.

Period

Number

No

Yes

The billing cycle.

Valid values: 1 to 9, 12, 24, 36, 48, and 60.

Unit: months.

Required for PrePaid; optional for PostPaid (pay-as-you-go).

PeriodUnit

String

No

Yes

The purchase duration unit.

Valid values:

  • Week: Period can be 1, 2, 3, or 4 and AutoRenewPeriod can be 1, 2, or 3.

  • Month (default): Period can be 1 to 9, 12, 24, 36, 48, or 60 and AutoRenewPeriod can be 1, 2, 3, 6, or 12.

RamRoleName

String

No

Yes

The RAM role name for the new instances.

Query the name by calling ListRoles. For more information, see CreateRole and ListRoles.

ResourceGroupId

String

No

No

The resource group ID for the new instances.

None.

SecurityGroupId

String

No

No

The security group of the new instances.

Cannot be specified together with SecurityGroupIds and SecurityGroupId.

SecurityGroupIds

List

No

No

The security groups of the new instances.

For more information, see Limits. Cannot be specified together with SecurityGroupIds and SecurityGroupId.

SecurityOptions

Map

No

No

Trusted system properties.

For more information, see SecurityOptions properties.

SpotPriceLimit

String

No

No

The maximum hourly price for the new instances.

Supports up to three decimal places. Takes effect when SpotStrategy is SpotWithPriceLimit.

SpotStrategy

String

No

Yes

The bidding strategy for pay-as-you-go instances.

Required when InstanceChargeType is PostPaid.

Valid values:

  • NoSpot (default): regular pay-as-you-go.

  • SpotWithPriceLimit: spot instance with a price limit.

  • SpotAsPriceGo: system bid no more than the pay-as-you-go price.

SystemDiskAutoSnapshotPolicyId

String

No

Yes

The automatic snapshot policy ID for the system disk.

None.

SystemDiskBurstingEnabled

Boolean

No

Yes

Specifies whether bursting is enabled for the system disk.

Valid values:

  • true: enabled.

  • false (default): disabled.

SystemDiskCategory

String

No

Yes

The system disk type.

Valid values:

  • cloud: basic cloud disk.

  • cloud_efficiency (default): ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

SystemDiskDescription

String

No

Yes

The system disk description.

None.

SystemDiskDiskName

String

No

Yes

The system disk name.

2 to 128 characters; starts with a letter or Chinese character; cannot start with http:// or https://; can contain digits, colons (:), underscores (_), and hyphens (-).

SystemDiskEncryptAlgorithm

String

No

Yes

The system disk encryption algorithm.

Valid values:

  • AES-256

  • SM4-128

SystemDiskEncrypted

String

No

Yes

Specifies whether the system disk is encrypted.

Valid values:

  • true: encrypt.

  • false: do not encrypt.

SystemDiskKMSKeyId

String

No

Yes

The KMS key ID used by the system disk.

None.

SystemDiskProvisionedIops

Integer

No

Yes

The provisioned IOPS of the system disk.

None.

SystemDiskStorageClusterId

String

No

Yes

The dedicated block storage cluster ID for the system disk.

None.

Tags

List

No

Yes

User-defined tags.

Supports a maximum of 20 tags. Format: [{"Key": "tagKey", "Value": "tag value"},{"Key": "tagKey2", "Value": "tag value 2"}]. For more information, see Tags properties.

UniqueSuffix

Boolean

No

No

Specifies whether to add sequential suffixes to HostNames and InstanceName when creating multiple instances.

The suffix starts at 001 and cannot exceed 999.

Valid values:

  • true: add.

  • false (default): do not add.

The property does not take effect when HostNames or InstanceName uses name_prefix[begin_number,bits] without name_suffix. For more information, see Batch set sequential instance names or hostnames.

UpdatePolicy

String

No

Yes

The update policy.

Valid values:

  • ForNewInstance (default): applies to new instances.

  • ForAllInstances: applies to all instances.

ZoneId

String

No

No

The zone ID.

None.

DiskMappings syntax

"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,
    "StorageClusterId": String
  }
]

DiskMappings properties

Property

Type

Required

Editable

Description

Constraints

Size

String

Yes

No

The data disk size.

Unit: GB.

AutoSnapshotPolicyId

String

No

No

The automatic snapshot policy ID.

None.

BurstingEnabled

Boolean

No

No

Specifies whether bursting is enabled.

Valid values:

  • true: enabled.

  • false (default): disabled.

Category

String

No

No

The data disk type.

Valid values:

  • cloud (default): basic cloud disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

  • cloud_efficiency: ultra disk.

Description

String

No

No

The data disk description.

2 to 256 characters. Cannot start with http:// or https://.

Device

String

No

No

The data disk name in ECS.

Example: /dev/xvd[a-z].

DiskName

String

No

No

The data disk name.

A maximum of 128 characters. Can contain letters, Chinese characters, digits, underscores (_), periods (.), and hyphens (-).

Encrypted

String

No

No

Specifies whether the data disk is encrypted.

Valid values:

  • true: encrypt.

  • false (default): do not encrypt.

KMSKeyId

String

No

No

The KMS key ID for the data disk.

None.

PerformanceLevel

String

No

No

The performance level when an ESSD is created as a data disk.

Valid values:

  • PL0: 10,000 random read/write IOPS.

  • PL1 (default): 50,000 random read/write IOPS..

  • PL2: 100,000 random read/write IOPS..

  • PL3: 1,000,000 random read/write IOPS.

For information about selecting an ESSD performance level, see ESSDs.

ProvisionedIops

Integer

No

No

The provisioned IOPS.

None.

SnapshotId

String

No

No

The snapshot ID.

None.

StorageClusterId

String

No

No

The dedicated block storage cluster ID.

None.

EniMappings syntax

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

EniMappings properties

Property

Type

Required

Editable

Description

Constraints

DeleteOnRelease

Boolean

No

No

Specifies whether the network interface is retained when the instance is released.

Valid values:

  • true: do not retain.

  • false: retain.

Description

String

No

Yes

The ENI description.

2 to 256 characters. Cannot start with http:// or https://.

InstanceType

String

No

No

The ENI type.

A maximum of two network interfaces can be set. If one ENI is set, it can be primary or secondary. If two ENIs are set, only one primary ENI and one secondary ENI are supported.

Valid values:

  • Primary: primary ENI.

  • Secondary (default): secondary ENI.

Ipv6AddressCount

Integer

No

No

The number of randomly generated IPv6 addresses assigned to the primary ENI.

Valid values: 1 to 10.

Takes effect only if EniMappings.InstanceType is Primary; otherwise, it cannot be set.

Cannot be set together with Ipv6AddressCount、Ipv6Address or NetworkInterface.Ipv6Address.

Ipv6Addresses

List

No

No

One or more IPv6 addresses assigned to the primary ENI.

A maximum of 10 IPv6 addresses.

Notes:

Takes effect only if EniMappings.InstanceType is Primary.

After it is set, Amount can only be 1, and Ipv6AddressCount, Ipv6Address.N or NetworkInterface.N.Ipv6AddressCountcannot be set.

NetworkCardIndex

Integer

No

No

The physical network card index.

Only specific instance types support this setting.

If EniMappings.InstanceType is Primary, the value can only be 0.

If it is Secondary or empty, configure the value based on the instance type. For more information, see Instance family overview.

NetworkInterfaceId

String

No

No

The ENI ID to attach to the instance.

Takes effect only for secondary ENIs. After you specify an existing secondary ENI, you cannot configure other network interface creation properties.

NetworkInterfaceName

String

No

Yes

The ENI name.

2 to 128 characters. Must start with a letter or Chinese character. Cannot start with http:// or https://. Can contain letters, Chinese characters, digits, colons (:), underscores (_), and hyphens (-).

NetworkInterfaceTrafficMode

String

No

No

The communication mode of the network interface.

Valid values:

  • Standard (default): TCP.

  • HighPerformance: enables ERI (Elastic RDMA Interface) and uses RDMA.

Note

The number of ENIs in RDMA mode cannot exceed the instance family limit. For more information, see Instance family overview.

PrimaryIpAddress

String

No

No

The primary private IP address of the ENI.

The address must be available in the CIDR block of its vSwitch. If omitted, an available address in the vSwitch is randomly assigned.

QueueNumber

Integer

No

No

The number of ENI queues.

Notes:

  • The value range is 1 to 2. When setting 1 elastic network interface, you can configure either 1 primary network interface or 1 secondary network interface. When setting 2 elastic network interfaces, only 1 primary network interface and 1 secondary network interface can be configured at the same time.

  • Cannot exceed the maximum queues per network interface.

  • The total number of queues accumulated across all network interfaces of an instance must not exceed the total queue quota allowed by the instance type. The maximum number of queues per single network interface and the total quota for the instance type can be queried through DescribeInstanceTypes.

  • If EniMappings.InstanceType is Primary and this parameter is specified, then the NetworkInterfaceQueueNumber cannot be set.

QueuePairNumber

Integer

No

No

The number of queues for the RDMA network interface.

This field is of type Long. During serialization/deserialization, precision loss may occur, so please ensure that the value does not exceed 9007199254740991.

SecurityGroupId

String

No

Yes

The security group ID.

The security group must be in the same VPC.

SecurityGroupIds

List

No

No

One or more security group IDs to which the ENI belongs.

Notes:

If EniMappings.InstanceType is Primary, this property or EniMappings.SecurityGroupId is required. At this point, the parameter has the same effect as SecurityGroupIds, but please note that SecurityGroupId, SecurityGroupIds, and NetworkInterface.SecurityGroupId must no longer be set.

  • If it is Secondary or empty, this property is optional and defaults to the security group of the ECS instance.

VSwitchId

String

No

No

The vSwitch ID.

None.

SecurityOptions syntax

"SecurityOptions": {
  "TrustedSystemMode": String
}

SecurityOptions properties

Property

Type

Required

Editable

Description

Constraints

TrustedSystemMode

String

No

No

The trusted system mode.

Valid value: vTPM. Trusted system mode is supported by the g7, c7, and r7 instance families and the security-enhanced instance families g7t, c7t, and r7t. If you use Alibaba Cloud Trusted System, set this property to vTPM to complete trusted verification at startup. If you do not use it, leave the property unset. If SecurityOptions.ConfidentialComputingMode=Enclave, trusted system mode is enabled. To create a trusted system ECS instance through OpenAPI, call only RunInstances; CreateInstance does not support this property.

Note

A trusted instance can use only a trusted-system image when its system disk is replaced.

ImageOptions syntax

"ImageOptions": {
  "LoginAsNonRoot": Boolean
}

ImageOptions properties

Property

Type

Required

Editable

Description

Constraints

LoginAsNonRoot

Boolean

No

No

Specifies whether an instance using the image supports logon as ecs-user.

Valid values:

  • true: yes.

  • false: no.

CpuOptions syntax

"CpuOptions": {
  "ThreadsPerCore": Integer,
  "Core": Integer,
  "NestedVirtualization": String
}

CpuOptions properties

Property

Type

Required

Editable

Description

Constraints

Core

Integer

No

No

The number of CPU cores.

This property cannot be customized and uses the default value. For the default value, see Change CPU options.

NestedVirtualization

String

No

No

Specifies whether nested virtualization is enabled. This property is in invitation-only preview and is currently unavailable.

Valid values:

  • enabled

  • disabled

ThreadsPerCore

Integer

No

No

The number of CPU threads.

ECS vCPUs = CpuOptions.Core × CpuOptions.ThreadsPerCore.

NetworkOptions syntax

"NetworkOptions": {
  "EnableJumboFrame": Boolean
}

NetworkOptions properties

Property

Type

Required

Editable

Description

Constraints

EnableJumboFrame

Boolean

No

No

Specifies whether Jumbo frames are enabled for the instance.

Valid values:

  • false: disabled; the MTU of all network interfaces is 1500.

  • true (default): enabled; the MTU is 8500.

Note

Only some eighth-generation and later instance types support this feature. For more information, see Jumbo Frames.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraints

Key

String

Yes

No

The tag key.

1 to 128 characters. Cannot start with aliyun or acs:. Cannot contain http:// or https://.

Value

String

No

No

The tag value.

0 to 128 characters. Cannot start with aliyun or acs:. Cannot contain http:// or https://.

Return values

Fn::GetAtt

  • InstanceIds: The IDs of the new instances. They are globally unique identifiers generated by the system.

  • PrivateIps: The private IP address list of VPC instances.

    Note

    This attribute takes effect when NetworkType is vpc. For example: ["172.16.XX.XX", "172.16.XX.XX", … "172.16.XX.XX"]. The list can contain a maximum of 100 IP addresses separated by commas (,).

  • InnerIps: The private IP address list of Classic instances.

    Note

    This attribute takes effect when NetworkType is classic. For example: ["10.1.XX.XX", "10.1.XX.XX", …, "10.1.XX.XX"]. The list can contain a maximum of 100 IP addresses separated by commas (,).

  • PublicIps: The public IP address list of Classic instances.

    Note

    This attribute takes effect when NetworkType is classic. For example: ["42.1.XX.XX", "42.1.XX.XX", … "42.1.XX.XX"]. The list can contain a maximum of 100 IP addresses separated by commas (,).

  • HostNames: The hostname list of all new instances.

  • OrderId: The order ID list of new instances.

  • ZoneIds: The zone ID.

  • Ipv6AddressIds: The IPv6 address ID list of created ECS instances. This is a two-dimensional list. If an instance has no IPv6 addresses, the corresponding element is empty. If all instances have no IP addresses, null is returned.

  • Ipv6Addresses: The IPv6 address list of created ECS instances. This is a two-dimensional list. If an instance has no IPv6 addresses, the corresponding element is null. If all instances have no IP addresses, null is returned.

Examples

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: "\u9700\u8981\u514b\u9686\u7684ECS\u5b9e\u4f8bID"
    Label:
      zh-cn: "\u6e90\u5b9e\u4f8bID"
      en: Source Instance ID
  InstanceName:
    Type: String
    Description:
      en: '[2, 128] alphanumeric letters, underline, dot or hyphen'
      zh-cn: "\u5b9e\u4f8b\u540d\u79f0\u3002\u957f\u5ea6\u4e3a2~128\u4e2a\u5b57\u7b26\uff0c\u53ef\u5305\u542b\u82f1\u6587\u3001\u6c49\u5b57\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf\uff08_\uff09\u3001\u534a\u89d2\u53e5\u53f7\uff08.\uff09\u548c\u77ed\u5212\u7ebf\uff08-\uff09\u3002"
    ConstraintDescription:
      en: '[2, 128] characters, consists of uppercase letter, lowercase letter, number or special characters.'
      zh-cn: "\u957f\u5ea6\u4e3a2~128\u4e2a\u5b57\u7b26\uff0c\u53ef\u5305\u542b\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u7279\u6b8a\u5b57\u7b26\u3002"
    Label:
      zh-cn: "\u5b9e\u4f8b\u540d\u79f0"
      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: "\u4e00\u6b21\u6027\u521b\u5efaECS\u5b9e\u4f8b\u7684\u6700\u5927\u4e2a\u6570\uff0c\u5fc5\u987b\u5927\u4e8e\u6216\u7b49\u4e8e\u4e00\u6b21\u6027\u521b\u5efaECS\u5b9e\u4f8b\u7684\u6700\u5c0f\u4e2a\u6570\u3002"
    ConstraintDescription:
      zh-cn: "1~100\u5185\u7684\u6574\u6570"
      en: An integer within [1, 100]
    Label:
      zh-cn: "\u6700\u5927\u4e2a\u6570"
      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: "\u957f\u5ea6\u4e3a8~30\u4e2a\u5b57\u7b26\u3002\u5fc5\u987b\u540c\u65f6\u5305\u542b\u5927\u5199\u82f1\u6587\u5b57\u6bcd\u3001\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u5b57\u7b26\u4e2d\u7684\u4e09\u9879\uff0c\u652f\u6301\u7684\u7279\u6b8a\u5b57\u7b26\u4e3a\uff1a( ) ` ~ ! @ # $ % ^  * - + = | { } [ ] : ; \u2018 , . ? /\u3002"
    ConstraintDescription:
      en: 'Length 8-30, must contain upper case letters, lower case letters, Numbers, special symbols three; special characters include: ()`~!@#$%^*_-+=|{}[]:;'',.?/'
      zh-cn: "\u957f\u5ea6\u4e3a8~30\u4e2a\u5b57\u7b26\u3002\u5fc5\u987b\u540c\u65f6\u5305\u542b\u5927\u5199\u82f1\u6587\u5b57\u6bcd\u3001\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u5b57\u7b26\u4e2d\u7684\u4e09\u9879\uff0c\u652f\u6301\u7684\u7279\u6b8a\u5b57\u7b26\u4e3a\uff08\uff09`~!@#$%^*_-+=|{}[]:;' ,.?/\u3002"
    Label:
      zh-cn: "ECS\u5b9e\u4f8b\u5bc6\u7801"
      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\uff1a\u5f39\u6027\u8ba1\u7b97\uff1a\u6307\u5b9aSourceInstanceId\u514b\u9686\u51fa\u76f8\u540c\u914d\u7f6e\u7684\u4e00\u7ec4ECS\u5b9e\u4f8b\u3002"
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
{
  "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": "\u9700\u8981\u514b\u9686\u7684ECS\u5b9e\u4f8bID"
      },
      "Label": {
        "zh-cn": "\u6e90\u5b9e\u4f8bID",
        "en": "Source Instance ID"
      }
    },
    "InstanceName": {
      "Type": "String",
      "Description": {
        "en": "[2, 128] alphanumeric letters, underline, dot or hyphen",
        "zh-cn": "\u5b9e\u4f8b\u540d\u79f0\u3002\u957f\u5ea6\u4e3a2~128\u4e2a\u5b57\u7b26\uff0c\u53ef\u5305\u542b\u82f1\u6587\u3001\u6c49\u5b57\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf\uff08_\uff09\u3001\u534a\u89d2\u53e5\u53f7\uff08.\uff09\u548c\u77ed\u5212\u7ebf\uff08-\uff09\u3002"
      },
      "ConstraintDescription": {
        "en": "[2, 128] characters, consists of uppercase letter, lowercase letter, number or special characters.",
        "zh-cn": "\u957f\u5ea6\u4e3a2~128\u4e2a\u5b57\u7b26\uff0c\u53ef\u5305\u542b\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u7279\u6b8a\u5b57\u7b26\u3002"
      },
      "Label": {
        "zh-cn": "\u5b9e\u4f8b\u540d\u79f0",
        "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": "\u4e00\u6b21\u6027\u521b\u5efaECS\u5b9e\u4f8b\u7684\u6700\u5927\u4e2a\u6570\uff0c\u5fc5\u987b\u5927\u4e8e\u6216\u7b49\u4e8e\u4e00\u6b21\u6027\u521b\u5efaECS\u5b9e\u4f8b\u7684\u6700\u5c0f\u4e2a\u6570\u3002"
      },
      "ConstraintDescription": {
        "zh-cn": "1~100\u5185\u7684\u6574\u6570",
        "en": "An integer within [1, 100]"
      },
      "Label": {
        "zh-cn": "\u6700\u5927\u4e2a\u6570",
        "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": "\u957f\u5ea6\u4e3a8~30\u4e2a\u5b57\u7b26\u3002\u5fc5\u987b\u540c\u65f6\u5305\u542b\u5927\u5199\u82f1\u6587\u5b57\u6bcd\u3001\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u5b57\u7b26\u4e2d\u7684\u4e09\u9879\uff0c\u652f\u6301\u7684\u7279\u6b8a\u5b57\u7b26\u4e3a\uff1a( ) ` ~ ! @ # $ % ^  * - + = | { } [ ] : ; \u2018 , . ? /\u3002"
      },
      "ConstraintDescription": {
        "en": "Length 8-30, must contain upper case letters, lower case letters, Numbers, special symbols three; special characters include: ()`~!@#$%^*_-+=|{}[]:;',.?/",
        "zh-cn": "\u957f\u5ea6\u4e3a8~30\u4e2a\u5b57\u7b26\u3002\u5fc5\u987b\u540c\u65f6\u5305\u542b\u5927\u5199\u82f1\u6587\u5b57\u6bcd\u3001\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u5b57\u7b26\u4e2d\u7684\u4e09\u9879\uff0c\u652f\u6301\u7684\u7279\u6b8a\u5b57\u7b26\u4e3a\uff08\uff09`~!@#$%^*_-+=|{}[]:;' ,.?/\u3002"
      },
      "Label": {
        "zh-cn": "ECS\u5b9e\u4f8b\u5bc6\u7801",
        "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\uff1a\u5f39\u6027\u8ba1\u7b97\uff1a\u6307\u5b9aSourceInstanceId\u514b\u9686\u51fa\u76f8\u540c\u914d\u7f6e\u7684\u4e00\u7ec4ECS\u5b9e\u4f8b\u3002"
      ]
    }
  },
  "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"
        ]
      }
    }
  }
}