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:
|
InternetMaxBandwidthOut | Integer | No | No | The maximum outbound public bandwidth of the new ECS instance. | Unit: Mbit/s.
|
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:
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: 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:
|
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 |
PeriodUnit | String | No | Yes | The unit of the subscription duration of the new ECS instance. | Valid values:
|
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:
|
AutoRenew | String | No | Yes | Specifies whether to enable auto-renewal for the new ECS instance. | Valid values:
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 |
SystemDiskCategory | String | No | Yes | The category of the system disk. | Valid values:
|
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:
|
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:
|
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:
|
SystemDiskEncryptAlgorithm | String | No | Yes | The encryption algorithm that you want to use for the system disk. | Valid values:
|
SystemDiskEncrypted | String | No | Yes | Specifies whether to encrypt the system disk. | Valid values:
|
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:
|
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 |
Device | String | No | No | The device name of the data disk that you want to attach to the new ECS instance. | Example: |
SnapshotId | String | No | No | The snapshot ID. | None. |
Encrypted | String | No | No | Specifies whether to encrypt the data disk. | Valid values:
|
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:
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:
|
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 |
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 |
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:
|
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:
|
NetworkInterfaceTrafficMode | String | No | No | The communication mode of the ENI. | Valid values:
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:
|
QueueNumber | Integer | No | No | The number of queues that are supported by the ENI. | Take note of the following items:
|
SecurityGroupIds | List | No | No | The IDs of one or more security groups to which the ENI belongs. | Take note of the following items:
|
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 |
Value | String | No | No | The tag value. | The tag value can be up to 128 characters in length, and cannot contain |
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
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.