All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::InstanceGroupClone

Last Updated:Nov 20, 2024

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

Properties

Property

Type

Required

Editable

Description

Constraint

ResourceGroupId

String

No

No

The ID of the resource group to which the ECS instances belong.

None.

HpcClusterId

String

No

Yes

The ID of the Elastic High Performance Computing (E-HPC) cluster to which the ECS instances belong.

None.

SourceInstanceId

String

Yes

No

The ID of the source ECS instance.

You can clone the specifications of an 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 instances are added to the first security group of the source ECS instance.

MaxAmount

Integer

Yes

Yes

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

Valid values: 1 to 100.

BackendServerWeight

Integer

No

No

The weight of the ECS instances that work as backend servers of the Server Load Balancer (SLB) instance.

Valid values: 0 to 100.

Default value: 100.

LoadBalancerIdToAttach

String

No

No

The SLB instance ID of the ECS instances.

None.

Description

String

No

Yes

The description.

The description can be up to 256 characters in length.

ImageId

String

No

Yes

The ID of the image that is used to start the ECS instances. You can use a public image, custom image, or Alibaba Cloud Marketplace image.

To specify a public image, you can enter a partial image ID instead of the complete 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.

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 security group to which the ECS instances belong.

You cannot specify both SecurityGroupId and SecurityGroupIds.

SecurityGroupIds

List

No

No

The security groups to which the 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 ECS instances.

The password must be 8 to 30 characters in length. It 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 to be attached.

You can attach up to 16 disks.

For more information, see DiskMappings properties.

Period

Number

No

Yes

The billing cycle.

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

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.

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.

None.

KeyPairName

String

No

Yes

The name of the key pair that is used to connect to the ECS instances.

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

RamRoleName

String

No

Yes

The name of the Resource Access Management (RAM) role for the ECS instances.

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 ECS instances.

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

Yes

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

You must specify this property 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. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).

PeriodUnit

String

No

Yes

The unit of the billing cycle for the ECS instances.

Valid values:

  • Week

    If you set PeriodUnit to Week, the valid values of Period are 1 to 4, and the valid values of AutoRenewPeriod are 1 to 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.

You must specify this property when AutoRenew is set to True.

Valid values:

  • 1 (default)

  • 2

  • 3

  • 6

  • 12

AutoRenew

String

No

Yes

Specifies whether to enable auto-renewal.

Valid values:

  • True

  • False (default)

You must specify this property when InstanceChargeType is set to PrePaid.

EniMappings

List

No

Yes

The elastic network interfaces (ENIs) of the ECS instances.

You can attach up to 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 instances.

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 new ECS instances are 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: Enterprise SSD (ESSD)

SystemDiskProvisionedIops

Integer

No

Yes

The provisioned IOPS of the system disk.

None.

SystemDiskBurstingEnabled

Boolean

No

Yes

Specifies whether to enable the performance burst feature 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 ECS instances. You can use this property to specify whether you can delete the ECS instances in the ECS console or by calling the DeleteInstance operation.

Valid values:

  • true

  • false

DeploymentSetId

String

No

Yes

The ID of the deployment set.

None.

Ipv6AddressCount

Integer

No

Yes

The number of IPv6 addresses to generate for the ENI at random.

You cannot specify both Ipv6Addresses and Ipv6AddressCount.

Ipv6Addresses

List

No

Yes

The one or more IPv6 addresses to assign to the ENI.

You can specify up to 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 is used 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.  

Unit: Mbit/s.  

Valid values: 0 to 200.

Default value: 200.

UpdatePolicy

String

No

Yes

The update policy.

Valid values:

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

  • ForAllInstances: The update policy takes effect for all ECS 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

SecurityOptions

Map

No

No

The trusted system options.

For more information, see SecurityOptions property.

ImageOptions

Map

No

No

The image options.

For more information, see ImageOptions property.

NetworkOptions

Map

No

No

The network options.

For more information, see NetworkOptions property.

HostNames

List

No

No

The hostnames of the ECS instances when you create multiple instances.

None.

NetworkInterfaceQueueNumber

Integer

No

No

The number of queues supported by the primary ENI.

Take note of the following items:

  • The value of this property cannot exceed the maximum number of queues per ENI 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 query the maximum number of queues per ENI for an instance type and the queue quota for the instance type, you can call the DescribeInstanceTypes operation and check the MaximumQueueNumberPerEni and TotalEniQueueQuantity values.

  • If NetworkInterface.N.InstanceType is set to Primary, you cannot specify NetworkInterfaceQueueNumber but can specify NetworkInterface.N.QueueNumber.

UniqueSuffix

Boolean

No

No

Specifies whether to automatically append sequential suffixes to the HostName and InstanceName values when you create multiple instances.

The sequential suffixes range from 001 to 999. Valid values:

  • true

  • false (default)

When you specify the HostName or InstanceName value in the name_prefix[begin_number,bits] format that does not contain a suffix specified by name_suffix, UniqueSuffix does not take effect. The names are sorted only in the specified sequence.

For more information, see Batch configure sequential names or hostnames for multiple instances.

CpuOptions

Map

No

No

The CPU options.

For more information, see CpuOptions properties.

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

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. It cannot start with http:// or https://.

Device

String

No

No

The device name of the data disk of the 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 is used 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 you want to use as the system disk.

Valid values:

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

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

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

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

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

ProvisionedIops

Integer

No

No

The provisioned IOPS.

None.

BurstingEnabled

Boolean

No

No

Specifies whether to enable the performance burst feature.

Valid values:

  • true

  • false (default)

StorageClusterId

String

No

No

The ID of the dedicated block storage cluster.

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

Constraint

SecurityGroupId

String

No

Yes

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

The security group of the ENI and the ENI must reside in the same virtual private cloud (VPC).

VSwitchId

String

No

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 ENI name.

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

PrimaryIpAddress

String

No

No

The primary private IP address of the ENI.

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

If you leave this property empty, an idle IP address is assigned from the CIDR block of the vSwitch at random.

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 IPv6 addresses to generate for the primary ENI at random.

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 TCP communication mode.

  • HighPerformance: uses the remote direct memory access (RDMA) communication mode with the Elastic RDMA Interface (ERI) feature enabled.

Note

The 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 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.

  • After 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 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 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 query the maximum number of queues per ENI for an instance type and the queue quota for the instance type, you can call the DescribeInstanceTypes operation and check the MaximumQueueNumberPerEni and TotalEniQueueQuantity values.

  • 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 IDs of one or more security groups to which the ECS instances belong.

QueuePairNumber

Integer

No

No

The number of queues supported by the ENI in RDMA mode.

QueuePairNumber is of the Long data type. The precision of the property value may be lost during the serialization or deserialization process. You must make sure that the value does not exceed 9007199254740991.

NetworkInterfaceId

String

No

No

The ENI ID of the ECS instance.

This property takes effect only for secondary ENIs. After you use this property to specify an existing secondary ENI, you cannot configure other properties that are used to create the ENI.

DeleteOnRelease

Boolean

No

No

Specifies whether to delete the ENI when the associated instance is released.

Valid values:

  • true

  • false

NetworkCardIndex

Integer

No

No

The network card index that you want to specify for the ENI.

  • Only specific instance types allow you to specify network card indexes.

  • If NetworkInterface.N.InstanceType is set to Primary, you must set NetworkCardIndex to 0 for instance types that support network cards.

  • If NetworkInterface.N.InstanceType is set to Secondary or left empty, you can specify NetworkCardIndex based on instance types if the instance types support network cards. For more information, see Overview of instance families.

SecurityOptions syntax

"SecurityOptions": {
  "TrustedSystemMode": String
}

SecurityOptions property

Property

Type

Required

Editable

Description

Constraint

TrustedSystemMode

String

No

No

The trusted system mode.

Set the value to vTPM. The trusted system mode supports the g7, c7, and r7 instance families and the g7t, c7t, and r7t security-enhanced instance families. You must specify this property when you create ECS instances of the preceding instance families. Take note of the following details:

If you use Alibaba Cloud Trusted System, you must set this property to vTPM. Then, Alibaba Cloud Trusted System performs trust verifications when the instances are started. If you do not use Alibaba Cloud Trusted System, you can leave this property empty. In this case, you must be aware that if you set SecurityOptions.ConfidentialComputingMode to Enclave to use an enclave-based confidential computing environment for ECS instances, Alibaba Cloud Trusted System is enabled for the instances. When you call API operations to create ECS instances that use Alibaba Cloud Trusted System, you can call only the RunInstances operation to specify SecurityOptions.TrustedSystemMode. The CreateInstance operation does not support SecurityOptions.TrustedSystemMode.

Note

If you configure an instance as a trusted instance when you create the instance, you can use only an image that supports Alibaba Cloud Trusted System to replace the system disk of the instance.

ImageOptions syntax

"ImageOptions": {
  "LoginAsNonRoot": Boolean
}

ImageOptions property

Property

Type

Required

Editable

Description

Constraint

LoginAsNonRoot

Boolean

No

No

Specifies whether the instance that uses the image supports the logons of the ecs-user user.

Valid values:

  • true

  • false

CpuOptions syntax

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

CpuOptions properties

Property

Type

Required

Editable

Description

Constraint

ThreadsPerCore

Integer

No

No

The number of threads per core.

The number of vCPUs of an ECS instance is calculated based on the following formula: Number of vCPUs = CpuOptions.Core value × CpuOptions.ThreadsPerCore value.

Core

Integer

No

No

The number of physical CPU cores.

You cannot specify a custom value for this property. You must set this property to one of its default values.

For more information about the default values, see Specify and view CPU options.

NetworkOptions syntax

"NetworkOptions": {
  "EnableJumboFrame": Boolean
}

NetworkOptions property

Property

Type

Required

Editable

Description

Constraint

EnableJumboFrame

Boolean

No

No

Specifies whether to enable the jumbo frame feature for the ECS instance.

Valid values:

  • false: does not enable the jumbo frame feature for the ECS instance. The maximum transmission unit (MTU) value of all ENIs on the instance is set to 1500.

  • true: enables the jumbo frame feature for the ECS instance. The MTU value of all ENIs on the instance is set to 8500.

Note

The jumbo frame feature is supported only by specific instance types whose generations are later than the eighth generation. For more information, see MTU and jumbo frames.

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 for an instance.

  • PrivateIps: the private IP addresses of the ECS instances in the VPC. This property takes effect when NetworkType is set 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 ECS instances 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 ECS instances 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 the ECS instances.

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

  • ZoneIds: the zone IDs.

  • Ipv6AddressIds: the IPv6 address IDs of the new ECS instances. The IPv6 address IDs 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.

  • RelatedOrderIds: the related order IDs of the new ECS instances.

Examples

YAML format

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