All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::InstanceGroupClone

Last Updated:Dec 08, 2023

ALIYUN::ECS::InstanceGroupClone is used to create clones of an Elastic Compute Service (ECS) instance.

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
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

ResourceGroupId

String

No

No

The ID of the resource group to which the new ECS instance belongs.

None.

HpcClusterId

String

No

Yes

The ID of the Elastic High Performance Computing (E-HPC) cluster to which the new ECS instance belongs.

None.

SourceInstanceId

String

Yes

No

The ID of the source ECS instance.

You can clone the information about the source ECS instance, including the instance type, image, bandwidth metering method, bandwidth limit, and network type. If the source ECS instance belongs to multiple security groups, the new instance is added to the first security group of the source ECS instance.

MaxAmount

Integer

Yes

Yes

The number of new ECS instances that you can create at a time.

Valid values: 1 to 100.

BackendServerWeight

Integer

No

No

The weight of the new ECS instance that you want to attach to the Server Load Balancer (SLB) instance.

Valid values: 0 to 100.

Default value: 100.

LoadBalancerIdToAttach

String

No

No

The ID of the SLB instance to which you want to attach the new ECS instance.

None.

Description

String

No

Yes

The description of the new ECS instance.

The description can be up to 256 characters in length.

ImageId

String

No

Yes

The ID of the image that you want to use to start the new ECS instance. You can use a public image, a custom image, or an Alibaba Cloud Marketplace image.

To specify a public image, you can enter a partial image ID. Public images support fuzzy search. Examples:

  • If you enter ubuntu, the system matches it with the following image ID: ubuntu16_0402_64_20G_alibase_20170818.vhd.

  • If you enter ubuntu_14, the system matches it with the following image ID: ubuntu_14_0405_64_20G_alibase_20170824.vhd.

  • If you enter ubuntu*14*32, the system matches it with the following image ID: ubuntu_14_0405_32_40G_alibase_20170711.vhd.

  • If you enter ubuntu_16_0402_32, the system matches it with the following image ID: ubuntu_16_0402_32_40G_alibase_20170711.vhd.

InternetMaxBandwidthOut

Integer

No

No

The maximum outbound public bandwidth of the new ECS instance.

Unit: Mbit/s.

  • Valid values when the pay-by-bandwidth metering method is used: 0 to 200.

  • Valid values when the pay-by-data-transfer metering method is used: 1 to 200.

SecurityGroupId

String

No

No

The ID of the security group to which the new ECS instance belongs.

You cannot specify both SecurityGroupId and SecurityGroupIds.

SecurityGroupIds

List

No

No

The IDs of the security groups to which the new ECS instances belong.

For more information, see Security group limits.

You cannot specify both SecurityGroupId and SecurityGroupIds.

InstanceName

String

No

No

The name of the new ECS instance.

The name can be up to 128 characters in length, and can contain letters, digits, underscores (_), periods (.), and hyphens (-).

Password

String

No

Yes

The logon password of the new ECS instance.

The password must be 8 to 30 characters in length, and can contain letters, digits, and the following special characters: ( ) ‘ ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' < > , . ? / -

If you specify this property, you must call Resource Orchestration Service (ROS) API operations by using HTTPS to prevent password leaks.

PasswordInherit

Boolean

No

No

Specifies whether to use the preset password of the image.

Valid values:

  • true

  • false

Note

If you set this property to true, you must leave Password empty and make sure that the selected image has a preset password.

DiskMappings

List

No

Yes

The disks that you want to attach to the new ECS instance.

You can attach up to 16 disks.

For more information, see DiskMappings properties.

Period

Number

No

Yes

The subscription duration of the new ECS instance.

Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36.

Unit: month.

This property is required if you set InstanceChargeType to PrePaid. This property is optional if you set InstanceChargeType to PostPaid.

Tags

List

No

Yes

The custom tags that you want to add to the new ECS instance.

You can specify up to 20 tags in the following format: [{"Key": "tagKey", "Value": "tagValue"},{"Key": "tagKey2", "Value": "tagValue2"}].

For more information, see Tags properties.

ZoneId

String

No

No

The zone ID of the new ECS instance.

None.

KeyPairName

String

No

Yes

The name of the key pair that you want to use to connect to the new ECS instance.

For Windows ECS instances, you can ignore KeyPairName. If you specify KeyPairName, the value of Password is still used for ECS instances. However, password-based logon is disabled for Linux ECS instances.

RamRoleName

String

No

Yes

The name of the Resource Access Management (RAM) role that you want to assign to the new ECS instance.

You can call the ListRoles operation to query the name of the RAM role. For more information, see CreateRole and ListRoles.

SpotPriceLimit

String

No

No

The maximum hourly price of the new ECS instance.

The value of this property can contain up to three decimal places. This property takes effect when SpotStrategy is set to SpotWithPriceLimit.

SpotStrategy

String

No

No

The bidding policy for the pay-as-you-go instance.

This property must be specified when InstanceChargeType is set to PostPaid.

Valid values:

  • NoSpot (default): The instance is created as a regular pay-as-you-go instance.

  • SpotWithPriceLimit: The instance is created as a preemptible instance that has a user-defined maximum hourly price.

  • SpotAsPriceGo: The instance is created as a preemptible instance whose bidding price is based on the market price at the time of purchase. The market price can be up to the pay-as-you-go price.

SystemDiskDiskName

String

No

Yes

The name of the system disk.

The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). The name must start with a letter and cannot start with http:// or https://.

PeriodUnit

String

No

Yes

The unit of the subscription duration of the new ECS instance.

Valid values:

  • Week:

    If you set PeriodUnit to Week, the valid values of Period are 1, 2, 3, and 4, and the valid values of AutoRenewPeriod are 1, 2, and 3.

  • Month (default):

    If you set PeriodUnit to Month, the valid values of Period are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60, and the valid values of AutoRenewPeriod are 1, 2, 3, 6, and 12.

AutoRenewPeriod

Number

No

Yes

The auto-renewal period of the new ECS instance.

This property must be specified when AutoRenew is set to True.

Valid values:

  • 1 (default)

  • 2

  • 3

  • 6

  • 12

AutoRenew

String

No

Yes

Specifies whether to enable auto-renewal for the new ECS instance.

Valid values:

  • True

  • False (default)

This property must be specified when InstanceChargeType is set to PrePaid.

EniMappings

List

No

Yes

The elastic network interfaces (ENIs) that you want to attach to the new ECS instance.

You can attach only one ENI to an instance.

For more information, see EniMappings properties.

AutoReleaseTime

String

No

No

The point in time at which the system automatically releases the new ECS instance.

Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The point in time must be within three years from the point in time at which the ECS instance is created.

SystemDiskCategory

String

No

Yes

The category of the system disk.

Valid values:

  • cloud: basic disk

  • cloud_efficiency (default): ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: enhanced SSD (ESSD)

SystemDiskProvisionedIops

Integer

No

Yes

The IOPS that is preconfigured for the system disk.

None.

SystemDiskBurstingEnabled

Boolean

No

Yes

Specifies whether to enable the burst mode for the system disk.

Valid values:

  • true

  • false (default)

LaunchTemplateName

String

No

Yes

The name of the launch template.

None.

LaunchTemplateVersion

String

No

Yes

The version of the launch template.

If you do not specify a version, the default version is used.

LaunchTemplateId

String

No

Yes

The ID of the launch template.

None.

SystemDiskDescription

String

No

Yes

The description of the system disk.

None.

DeletionProtection

Boolean

No

No

The deletion protection property of the new ECS instance. You can use this property to specify whether the ECS instance can be deleted in the ECS console or by calling the DeleteInstance operation.

Valid values:

  • true: The ECS instance can be deleted in the ECS console or by calling the DeleteInstance operation.

  • false: The ECS instance cannot be deleted in the ECS console or by calling the DeleteInstance operation.

DeploymentSetId

String

No

Yes

The ID of the deployment set.

None.

Ipv6AddressCount

Integer

No

Yes

The number of randomly generated IPv6 addresses that you want to assign to the ENI.

You cannot specify both Ipv6Addresses and Ipv6AddressCount.

Ipv6Addresses

List

No

Yes

The one or more IPv6 addresses that you want to assign to the ENI.

You can specify only one IPv6 address. If you modify this property, existing instances are not affected. You cannot specify both Ipv6Addresses and Ipv6AddressCount.

SystemDiskAutoSnapshotPolicyId

String

No

Yes

The ID of the automatic snapshot policy that you want to use for the system disk.

None.

SystemDiskKMSKeyId

String

No

Yes

The ID of the Key Management Service (KMS) key that you want to use for the system disk.

None.

SystemDiskStorageClusterId

String

No

Yes

The ID of the dedicated block storage cluster in which the system disk resides.

None.

InternetMaxBandwidthIn

Integer

No

No

The maximum inbound public bandwidth of the new ECS instance.  

Unit: Mbit/s.  

Valid values: 0 to 200.

Default value: 200.

UpdatePolicy

String

No

Yes

The update policy that you want to use for instances.

Valid values:

  • ForNewInstance (default): The update policy takes effect for new instances.

  • ForAllInstances: The update policy takes effect for all instances.

SystemDiskEncryptAlgorithm

String

No

Yes

The encryption algorithm that you want to use for the system disk.

Valid values:

  • AES-256

  • SM4-128

SystemDiskEncrypted

String

No

Yes

Specifies whether to encrypt the system disk.

Valid values:

  • true

  • false

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
  }
]

DiskMappings properties

Property

Type

Required

Editable

Description

Constraint

Size

String

Yes

No

The size of the data disk.

Unit: GB.

Category

String

No

No

The category of the data disk.

Valid values:

  • cloud (default): basic disk

  • cloud_ssd: standard SSD

  • cloud_essd: ESSD

  • cloud_efficiency: ultra disk

DiskName

String

No

No

The name of the data disk.

The name can be up to 128 characters in length, and can contain letters, digits, underscores (_), periods (.), and hyphens (-).

Description

String

No

No

The description of the data disk.

The description must be 2 to 256 characters in length. The description cannot start with http:// or https://.

Device

String

No

No

The device name of the data disk that you want to attach to the new ECS instance.

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

SnapshotId

String

No

No

The snapshot ID.

None.

Encrypted

String

No

No

Specifies whether to encrypt the data disk.

Valid values:

  • true

  • false (default)

KMSKeyId

String

No

No

The ID of the KMS key that you want to use for the data disk.

None.

AutoSnapshotPolicyId

String

No

No

The ID of the automatic snapshot policy.

None.

PerformanceLevel

String

No

No

The performance level (PL) of the ESSD that is used as the system disk.

Valid values:

  • PL0: An ESSD delivers up to 10,000 random read/write IOPS.

  • PL1 (default): An ESSD delivers up to 50,000 random read/write IOPS.

  • PL2: An ESSD delivers up to 100,000 random read/write IOPS.

  • PL3: An ESSD delivers up to 1,000,000 random read/write IOPS.

For more information about how to select the PLs of ESSDs, see ESSDs.

ProvisionedIops

Integer

No

No

The IOPS that is preconfigured for the data disk.

None.

BurstingEnabled

Boolean

No

No

Specifies whether to enable the burst mode.

Valid values:

  • true

  • false (default)

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
  }
]

EniMappings properties

Property

Type

Required

Editable

Description

Constraint

SecurityGroupId

String

No

Yes

The ID of the security group to which the ENI belongs.

The security group and the ECS instance must reside in the same VPC.

VSwitchId

String

Yes

No

The vSwitch ID.

None.

Description

String

No

Yes

The description of the ENI.

The description must be 2 to 256 characters in length, and cannot start with http:// or https://.

NetworkInterfaceName

String

No

Yes

The name of the ENI.

The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). The name must start with a letter and cannot start with http:// or https://.

PrimaryIpAddress

String

No

No

The primary private IP address of the ENI.

The IP address must be an idle IP address within the CIDR block of the vSwitch.

If you leave this property empty, the system randomly assigns an idle IP address from the CIDR block of the vSwitch.

InstanceType

String

No

No

The ENI type.

You can attach up to two ENIs. If you attach only one ENI, you can configure a primary or secondary ENI. If you attach two ENIs, you must configure a primary ENI and a secondary ENI.

Valid values:

  • Primary

  • Secondary (default)

Ipv6AddressCount

Integer

No

No

The number of randomly generated IPv6 addresses that you want to assign to the primary ENI.

Valid values: 1 to 10.

Take note of the following items:

  • This property takes effect only when NetworkInterface.InstanceType is set to Primary. If NetworkInterface.InstanceType is set to Secondary or left empty, you cannot specify NetworkInterface.Ipv6AddressCount.

  • After you specify NetworkInterface.Ipv6AddressCount, you cannot specify Ipv6AddressCount, Ipv6Address, or NetworkInterface.Ipv6Address.

NetworkInterfaceTrafficMode

String

No

No

The communication mode of the ENI.

Valid values:

  • Standard (default): uses the Transmission Control Protocol (TCP) communication mode.

  • HighPerformance: enables Elastic RDMA Interface (ERI) and uses the remote direct memory access (RDMA) communication mode.

Note

The maximum number of ENIs in RDMA mode that can be attached to an instance cannot exceed the maximum number of ENIs that the instance type supports. For more information, see Overview of instance families.

Ipv6Addresses

List

No

No

The one or more IPv6 addresses that you want to assign to the primary ENI.

You can specify up to 10 IPv6 addresses.

Take note of the following items:

  • This property takes effect only when NetworkInterface.InstanceType is set to Primary. If NetworkInterface.InstanceType is set to Secondary or left empty, you cannot specify NetworkInterface.Ipv6Addresses.

  • If you specify NetworkInterface.Ipv6Addresses, you must set Amount to 1 and cannot specify Ipv6AddressCount, Ipv6Address.N, or NetworkInterface.N.Ipv6AddressCount.

QueueNumber

Integer

No

No

The number of queues that are supported by the ENI.

Take note of the following items:

  • Valid values: 1 and 2. If you attach only one ENI, you can configure a primary or secondary ENI. If you attach two ENIs, you must configure a primary ENI and a secondary ENI.

  • The value of this property cannot exceed the maximum number of queues per ENI that is allowed for the instance type.

  • The total number of queues for all ENIs on an instance cannot exceed the queue quota for the instance type. To obtain the maximum number of queues per ENI for an instance type and the queue quota for an instance type, you can call the DescribeInstanceTypes operation and query the values of MaximumQueueNumberPerEni and TotalEniQueueQuantity.

  • If NetworkInterface.InstanceType is set to Primary and QueueNumber is specified, you cannot specify NetworkInterfaceQueueNumber.

SecurityGroupIds

List

No

No

The IDs of one or more security groups to which the ENI belongs.

Take note of the following items:

  • If NetworkInterface.N.InstanceType is set to Primary, you must specify NetworkInterface.SecurityGroupIds or NetworkInterface.SecurityGroupId. In this case, NetworkInterface.SecurityGroupIds has the same effect as SecurityGroupIds. In addition, you cannot specify SecurityGroupId, SecurityGroupIds, or NetworkInterface.SecurityGroupId.

  • If NetworkInterface.N.InstanceType is set to Secondary or left empty, NetworkInterface.SecurityGroupIds is optional. The default value is the ID of the security group to which the new ECS instance belongs.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The tag key.

The tag key must be 1 to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Value

String

No

No

The tag value.

The tag value can be up to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • InstanceIds: the IDs of the new ECS instances. An instance ID is a GUID that is generated by the system.

  • PrivateIps: the private IP addresses of the new ECS instances that reside in VPCs. This property takes effect when NetworkType to vpc. The value is a JSON array that can contain up to 100 IP addresses separated by commas (,). Example: [“172.16.XX.XX”, “172.16.XX.XX”, … “172.16.XX.XX”].

  • InnerIps: the private IP addresses of the new ECS instances that reside in the classic network. This property takes effect when NetworkType is set to classic. The value is a JSON array that can contain up to 100 IP addresses separated by commas (,). Example: [“10.1.XX.XX”, “10.1.XX.XX”, … “10.1.XX.XX”].

  • PublicIps: the public IP addresses of the new ECS instances that reside in the classic network. This property takes effect when NetworkType is set to classic. The value is a JSON array that can contain up to 100 IP addresses separated by commas (,). Example: [“42.1.XX.XX”, “42.1.XX.XX”, … “42.1.XX.XX”].

  • HostNames: the hostnames of all the new ECS instances.

  • OrderId: the order ID of the new ECS instances.

  • ZoneIds: the zone IDs of the new ECS instances.

  • Ipv6AddressIds: the IDs of the IPv6 addresses of the new ECS instances. The IDs of the IPv6 addresses are returned in a list that has two levels of nesting. If an ECS instance does not have an IPv6 address, the element at the relevant position in the list is empty. If all ECS instances do not have IP addresses, null is returned.

  • Ipv6Addresses: the IPv6 addresses of the new ECS instances. The IPv6 addresses are returned in a list that has two levels of nesting. If an ECS instance does not have an IPv6 address, the element at the relevant position in the list is null. If all ECS instances do not have IP addresses, null is returned.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Description: According the existing ECS instance, clone a set of ECS instances 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
       
    Label:
       
      en: Source Instance ID
  InstanceName:
    Type: String
    Description:
      en: '[2, 128] alphanumeric letters, underline, dot or hyphen'
        
    ConstraintDescription:
      en: '[2, 128] characters, consists of uppercase letter, lowercase letter, number or special characters.'
       
    Label:
       
      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.
       
    ConstraintDescription:
       
      en: An integer within [1, 100]
    Label:
       
      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 ( ) ` ~ !   / '
            '
    ConstraintDescription:
      en: 'Length 8-30, must contain upper case letters, lower case letters, Numbers, special symbols three; special characters include: ()`~!@#$%^*_-+=|{}[]:;'',.?/'
        
    Label:
       
      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: ECS: Specify SourceInstanceId to create multiple clones of an ECS instance that have the same configurations. 
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 format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "According the existing ECS instance, clone a set of ECS instances 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",
         
      },
      "Label": {
         
        "en": "Source Instance ID"
      }
    },
    "InstanceName": {
      "Type": "String",
      "Description": {
        "en": "[2, 128] alphanumeric letters, underline, dot or hyphen",
          
      },
      "ConstraintDescription": {
        "en": "[2, 128] characters, consists of uppercase letter, lowercase letter, number or special characters.",
         
      },
      "Label": {
         
        "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.",
         
      },
      "ConstraintDescription": {
         
        "en": "An integer within [1, 100]"
      },
      "Label": {
         
        "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 ( ) ` ~ !   / ",
              
      },
      "ConstraintDescription": {
        "en": "Length 8-30, must contain upper case letters, lower case letters, Numbers, special symbols three; special characters include: ()`~!@#$%^*_-+=|{}[]:;',.?/",
          
      },
      "Label": {
         
        "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: ECS: Specify SourceInstanceId to create multiple clones of an ECS instance that have the same configurations."
      ]
    }
  },
  "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"
        ]
      }
    }
  }
}

For more examples, visit InstanceGroup.json and InstanceGroup.yml. In the examples, the following resource types are used: ALIYUN::ECS::InstanceGroup, ALIYUN::ECS::InstanceClone, ALIYUN::ECS::Command, and ALIYUN::ECS::Invocation.