edit-icon download-icon

ALIYUN::ECS::InstanceGroupClone

Last Updated: Jun 13, 2018

The ALIYUN::ECS::InstanceGroupClone type is used to generate a set of ECS instances by cloning.

Syntax

  1. {
  2. "Type" : "ALIYUN::ECS::InstanceGroupClone",
  3. "Properties" : {
  4. "SourceInstanceId" : String,
  5. "MaxAmount" : Integer,
  6. "MinAmount" : Integer,
  7. "BackendServerWeight" : Integer,
  8. "LoadBalancerIdToAttach": String,
  9. "SecurityGroupId" : String,
  10. "ImageId" : String,
  11. "InstanceName" : String,
  12. "Description" : String,
  13. "Password" : String,
  14. "ZoneId" : String,
  15. "InternetMaxBandwidthOut" : Integer,
  16. "AutoReleaseTime" : String,
  17. "DiskMappings" : List,
  18. "Tags" : String,
  19. "KeyPairName": String
  20. }
  21. }

Attributes

Attribute name Type Required Update allowed Description Constraint
SourceInstanceId string Yes No ID of the ECS instance you want to clone. The clone operation clones the instance type, image, bandwidth billing method, bandwidth limit, and network type. If the source ECS instance is added to multiple security groups, the new instance is added to the first of these security groups.
MaxAmount string Yes Yes Maximum number of ECS instances that can be created. Value range: [1, 100]. MaxAmount must be greater than or equal to MinAmount.
MinAmount string Yes Yes Minimum number of ECS instances that must be created. Value range: [1, 100]. MinAmount must be smaller than or equal to MaxAmount.
BackendServerWeight string No No Weight of the ECS instance in the Server Load Balancer instance. Value range: [0, 100]; default value: 100.
LoadBalancerIdToAttach string No No ID of the Server Load Balancer instance to which the ECS instance is added. N/A
Description string No No Description The maximum length is 256 characters.
ImageId string No Yes ID of the image used to start the ECS instance. The image can be a public image, custom image, or marketplace image. See ECS public image list.
Specify a public image ID in a fuzzy manner. To deploy an ECS instance, you can specify the image type and version or specify only the image type in the template. ROS automatically selects a proper public image ID. In the image ID for fuzzy search, you can replace some part of the image ID with the wildcard character asterisk (*).
Take all Ubuntu public images provided in Alibaba Cloud as an example:
ubuntu14_0405_32_40G_alibase_20170711.vhd
ubuntu_14_0405_32_40G_alibase_20170711.vhd
ubuntu_14_0405_64_20G_alibase_20170824.vhd
ubuntu_16_0402_32_40G_alibase_20170711.vhd
ubuntu_16_0402_64_20G_alibase_20170818.vhd
Specify: ubuntu
Match: ubuntu_16_0402_64_20G_alibase_20170818.vhd
Specify: ubuntu_14
Match: ubuntu_14_0405_64_20G_alibase_20170824.vhd
Specify: ubuntu1432
Match: ubuntu_14_0405_32_40G_alibase_20170711.vhd
Specify: ubuntu_16_0402_32
Match: ubuntu_16_0402_32_40G_alibase_20170711.vhd
InternetMaxBandwidthOut integer No No Maximum Internet outbound bandwidth, in Mbps. Value range in PayByBandwidth mode: [0, 200]; default value: 0. Value range in PayByTraffic mode: [1, 200]. This parameter must be specified in PayByTraffic mode.
SecurityGroupId string No No ID of the security group to which the created instance belongs. N/A
InstanceName string No No Instance name. The data disk name can contain a maximum of 128 characters including letters, numbers, underscores(_), periods(.), and hyphens(-).
Password string No No ECS instance logon password. The instance password is a string of 8-30 characters and must contain uppercase/lowercase letters, numbers, and special characters including ( ), `, ~, !, @, #, $, %, ^, &, *, -, +, =, |, { }, [ ], :, ;, ‘, < >, ,, ., ?, /. If the Password parameter is input, HTTPS method must be used when calling APIs to prevent password leakage.
DiskMappings list No No Disk you want to attach. Up to four disks can be attached.
Tags list No No Custom tag. Up to four tags are supported, in the format of [{“Key”:”tagKey”,”Value”:”tagValue”},{“Key”:”tagKey2”,”Value”:”tagValue2”}].
ZoneId string No No Zone ID. N/A
KeyPairNamestringNoNo Name of the key pair bound to the ECS instance. This parameter is ignored if the key pair is bound to a Windows ECS instance. It is null by default. If this parameter is set, the value of the Password parameter is set to the instance. However, the password logon mode in Linux is to be disabled. N/A

DiskMappings syntax

  1. "DiskMappings" : [
  2. {
  3. "Category" : String,
  4. "DiskName" : String,
  5. "Description" : String,
  6. "Device" : String,
  7. "SnapshotId" : String,
  8. "Size" : String
  9. }
  10. ]

DiskMappings syntax

  1. "DiskMappings" : [
  2. {
  3. "Category" : String,
  4. "DiskName" : String,
  5. "Description" : String,
  6. "Device" : String,
  7. "SnapshotId" : String,
  8. "Size" : String
  9. }
  10. ]

DiskMappings attributes

Attribute name Type Required Update allowed Description Constraint
Size string Yes No Data disk size, in GB. N/A
Category string No No The data disk type. Value options: cloud, cloudefficiency, cloud_ssd, and ephemeral_ssdDefault.
DiskName string No No The data disk name. The data disk name can contain a maximum of 128 characters including English letters and Chinese characters, numbers, underscores(_), periods(.), and hyphens(-).
Description string No No Description Value range: [2, 256]; default value: null.
Device string No No Device name of the data disk in the ECS instance. Example: /dev/xvd[a-z].
SnapshotId string No No ID of the snapshot used to create the data disk. N/A

Tags syntax

  1. "Tags" : [
  2. {
  3. "Value" : String,
  4. "Key" : String
  5. }
  6. ]

Tags attributes

Attribute name Type Required Update allowed Description Constraint
Key string Yes No N/A N/A
Value string No No N/A N/A

Return values

Fn::GetAtt

  • InstanceIds: IDs of the instances, which are generated by the system and are globally unique. It is a unique identifier of the instance.

  • PrivateIps: list of the private IP addresses of VPC type instances. This parameter is effective when NetworkType is VPC. It is a JSON array of [“172.16.1.1”, “172.16.2.1”, … “172.16.10.1”]. It can contain a maximum of 100 IP addresses, which are separated by commas(,).

  • InnerIps: list of the private IP addresses of Classic type instances. This parameter is effective when NetworkType is Classic. It is a JSON array of [“10.1.1.1”, “10.1.2.1”, … “10.1.10.1”]. It can contain a maximum of 100 IP addresses, which are separated by commas (,).

  • PublicIps: list of the public IP addresses of Classic type instances. This parameter is effective when NetworkType is Classic. It is a JSON array of [“42.1.1.1”, “42.1.2.1”, … “42.1.10.1”]. It can contain a maximum of 100 IP addresses, which are separated by commas(,).

  • ZoneId: zone ID.

  • HostName: host name of the instance.

Example

  1. {
  2. "ROSTemplateFormatVersion" : "2015-09-01",
  3. "Resources" : {
  4. "WebServer": {
  5. "Type": "ALIYUN::ECS::InstanceGroupClone",
  6. "Properties": {
  7. "SourceInstanceId": "i-25zskuabf",
  8. "ImageId" : "m-25l0rcfjo",
  9. "SecurityGroupId": "sg-25zwc3se0",
  10. "ZoneId": "cn-beijing-b",
  11. "MaxAmount" : 1,
  12. "MinAmount" : 1
  13. }
  14. }
  15. },
  16. "Outputs": {
  17. "InstanceIds": {
  18. "Value" : {"get_attr": ["WebServer","InstanceIds"]}
  19. },
  20. "PublicIps": {
  21. "Value" : {"get_attr": ["WebServer","PublicIps"]}
  22. }
  23. }
  24. }
Thank you! We've received your feedback.