ALIYUN::ECS::InstanceGroup is used to create a group of Elastic Compute Service (ECS) instances that have the same configurations.

Syntax

{
  "Type": "ALIYUN::ECS::InstanceGroup",
  "Properties": {
    "DedicatedHostId": String,
    "ResourceGroupId": String,
    "SystemDiskDescription": String,
    "InstanceChargeType": String,
    "RamRoleName": String,
    "SystemDiskPerformanceLevel": String,
    "ImageId": String,
    "SystemDiskDiskName": String,
    "Tags": List,
    "HostName": String,
    "LaunchTemplateName": String,
    "VSwitchId": String,
    "Period": Number,
    "ZoneIds": List,
    "LaunchTemplateId": String,
    "DeletionProtection": "Boolean",
    "SecurityGroupIds": List,
    "SecurityEnhancementStrategy": String,
    "InternetChargeType": String,
    "InstanceName": String,
    "DeploymentSetId": String,
    "InternetMaxBandwidthOut": Integer,
    "VpcId": String,
    "LaunchTemplateVersion": String,
    "PeriodUnit": String,
    "AutoReleaseTime": String,
    "PrivateIpAddress": String,
    "Description": String,
    "DiskMappings": List,
    "SystemDiskSize": Number,
    "UserData": String,
    "AutoRenew": String,
    "Ipv6Addresses": List,
    "MaxAmount": Integer,
    "SystemDiskAutoSnapshotPolicyId": String,
    "Ipv6AddressCount": Integer,
    "NetworkType": String,
    "SpotPriceLimit": String,
    "InstanceType": String,
    "AllocatePublicIP": "Boolean",
    "SpotStrategy": String,
    "Password": String,
    "PasswordInherit": Boolean,
    "AutoRenewPeriod": Number,
    "KeyPairName": String,
    "IoOptimized": String,
    "ZoneId": String,
    "HpcClusterId": String,
    "SecurityGroupId": String,
    "SystemDiskCategory": String,
    "EniMappings": List,
    "SystemDiskProvisionedIops": Integer,
    "SystemDiskBurstingEnabled": Boolean,
    "SpotInterruptionBehavior": String,
    "SpotDuration": Integer
  }
}

Properties

Property Type Required Editable Description Constraint
ResourceGroupId String No Yes The ID of the resource group to which the instance belongs. None.
SpotInterruptionBehavior String No No The interruption mode of the preemptible instance. You can set this parameter to only Terminate, which is the default value. In this case, the preemptible instance is directly released.
SpotDuration Integer No No The retention period of the preemptible instance. Valid values: 0 to 6.

Unit: hours.

Valid values:
  • 0: If you set this parameter to 0, the preemptible instance does not have a protection period.
  • 2, 3, 4, 5, and 6: Protection periods of 2, 3, 4, 5, and 6 hours are in invitational preview. If you want to set this parameter to one of these values, submit a ticket.
  • 1: This is the default value.
HpcClusterId String No Yes The ID of the Elastic High Performance Computing (E-HPC) cluster to which the instance belongs. Updates to this property take effect only for new ECS instances.
MaxAmount Integer Yes Yes The maximum number of ECS instances that you can create at a time. Valid values: 1 to 1000.
Note If you increase or decrease the value of the MaxAmount property when you update the stack that references the property, the number of ECS instances is increased or decreased based on the new value. For example, if you change the value of the MaxAmount property from 2 to 5, three ECS instances are added.
Description String No Yes The description of the instance. The description can be up to 256 characters in length.
Note Updates to this property take effect only for new ECS instances.
InstanceType String Yes Yes The type of the ECS instance. For more information, see Instance family.
ImageId String Yes Yes The ID of the image that is used to start the ECS instance. You can use a public image, a custom image, or an Alibaba Cloud Marketplace image. If you specify a part of a public image ID, the system can match the complete ID of the public image. You do not need to specify the complete ID of the public image. Examples:
  • If you specify ubuntu, the system matches the following complete image ID: ubuntu_16_0402_64_20G_alibase_20170818.vhd.
  • If you specify ubuntu1432, the system matches the following complete image ID: ubuntu_14_0405_32_40G_alibase_20170711.vhd.
For more information, see Request parameters.
SecurityGroupId String No No The ID of the security group to which the instance belongs. Instances that belong to the same security group can communicate with each other. You cannot set both the SecurityGroupId and SecurityGroupIds properties.
SecurityGroupIds List No No The IDs of security groups to which the instance belong. You cannot set both the SecurityGroupId and SecurityGroupIds properties.

For more information, see Security group limits.

SecurityEnhancementStrategy String No No Specifies whether to enable security hardening. Valid values:
  • Active: enables security hardening. This value takes effect only for public images.
  • Deactive: disables security hardening. This value takes effect for all types of images.
InstanceName String No No The name of the ECS instance. The name can be up to 128 characters in length and can contain letters, digits, underscores (_), periods (.), and hyphens (-).

The name must be in the name_prefix[begin_number,bits]name_suffix format. The name of each ECS instance must be unique. For more information, see Request parameters.

Password String No Yes The password that is used to log on to the ECS instance. The password must be 8 to 30 characters in length. The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include : ( ) ` ~ ! @ # $ % ^ & ∗ - + = | { } [ ] : ; ' < > , . ? /.

If you set this property, we recommend that you call the Resource Orchestration Service (ROS) API by using HTTPS to prevent the exposure of your password.

PasswordInherit Boolean No No Specifies whether to use the preset password of the image. Valid values:
  • true: uses the preset password.
  • false: does not use the preset password.
Note If you set this property to true, make sure that you leave the Password property empty and that the image you want to use has a preset password.
ZoneIds List No No The IDs of the zones. None.
HostName String No No The hostname. The hostname must be at least 2 characters in length. The hostname cannot contain consecutive periods (.) or hyphens (-). The hostname cannot start or end with a period (.) or hyphen (-).

For more information, see Request parameters.

AllocatePublicIP Boolean No No Specifies whether the system assigns a public IP address. If you set the InternetMaxBandwidthOut property to 0, the system does not assign a public IP address.

Default value: true. Valid values:

  • true: assigns a public IP address.
  • false: does not assign a public IP address.
AutoReleaseTime String No No The time at which the system automatically releases the ECS instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be within three years from the time at which the instance is created.
PrivateIpAddress String No No The private IP address of the instance. If you configure a private IP address for a virtual private cloud (VPC)-connected ECS instance, select an idle IP address from the CIDR block of the vSwitch.
Note If you set the PrivateIpAddress property, you must set the MaxAmount property to 1.
DiskMappings List No Yes The data disks that you create for the ECS instance. You can create up to 16 data disks.

If you change the value of this property, existing instances are not affected. The new value takes effect for new instances.

For more information, see DiskMappings properties.

Note Updates to this property take effect only for new ECS instances.
InternetChargeType String No No The metering method for Internet bandwidth usage. Default value: PayByTraffic. Valid values:
  • PayByBandwidth: pay-by-bandwidth
  • PayByTraffic: pay-by-data-transfer
InternetMaxBandwidthOut Integer No No The maximum outbound public bandwidth.

Valid values: 0 to 100.

Unit: Mbit/s.

Default value: 0.

SystemDiskProvisionedIops Integer No Yes The IOPS that is preset in the system disk. None.
SystemDiskBurstingEnabled Boolean No Yes Specifies whether to enable the burst mode for the system disk. Default value: false. Valid values:
  • true: enables the burst mode.
  • false: disables the burst mode.
IoOptimized String No No Specifies whether the instance that you create is I/O optimized. Default value: optimized. Valid values:
  • none: a non-I/O optimized instance
  • optimized: an I/O optimized instance
SystemDiskCategory String No Yes The category of the system disk. Valid values:
  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: SSD
  • cloud_essd: enhanced SSD (ESSD)
  • ephemeral_ssd: local SSD
Note Updates to this property take effect only for new ECS instances.
SystemDiskDescription String No Yes The description of the system disk. Updates to this property take effect only for new ECS instances.
SystemDiskDiskName String No Yes The name of the system disk. Updates to this property take effect only for new ECS instances.
SystemDiskSize Number No Yes The size of the system disk. Valid values: 40 to 500.

Unit: GB.

If you use a custom image to create a system disk, make sure that the size of the system disk is larger than that of the custom image.

Tags List No Yes The tags that you want to add to the 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.

UserData String No Yes The user data that you want to pass. The user data can be up to 16 KB in size. You do not need to convert the data to Base64-encoded strings. If the user data contains special characters, you must add the escape character (\) before each special character.
ZoneId String No No The ID of the zone. None.
VpcId String No No The ID of the VPC. None.
VSwitchId String No No The ID of the vSwitch. None.
KeyPairName String No Yes The name of the key pair that is used to connect to the ECS instance.

For Windows ECS instances, you can ignore this property. By default, this property is empty.

If you specify both the KeyPairName and Password properties, the value of the Password property is used for the ECS instance. For Linux ECS instances, password-based logon is disabled.
Note Updates to this property take effect only for new ECS instances.
RamRoleName String No Yes The name of the RAM role assigned to the instance. You can call the ListRoles operation to query the names of RAM roles. For more information, see CreateRole and ListRoles.
SpotPriceLimit String No No The maximum hourly price of the instance. The value of this property can contain up to 3 decimal places. This property takes effect if you set the SpotStrategy property to SpotWithPriceLimit.
SpotStrategy String No No The bidding policy for the pay-as-you-go instance.

This property takes effect if you set the InstanceChargeType property to PostPaid.

Default value: NoSpot. Valid values:
  • NoSpot: creates the instance as a regular pay-as-you-go instance.
  • SpotWithPriceLimit: creates the instance as a preemptible instance for which you specify the maximum hourly price.
  • SpotAsPriceGo: creates the instance as a preemptible instance whose price is based on the market price at the time of purchase. The market price can be equal to the price of a pay-as-you-go instance.
DedicatedHostId String No No The ID of the dedicated host. None.
LaunchTemplateName String No Yes The name of the launch template. None.
PeriodUnit String No Yes The unit of the subscription period. Default value: Month. Valid values:
  • Week
  • Month
Note Updates to this property take effect only for new ECS instances.
AutoRenewPeriod Number No Yes The auto-renewal period for the instance. This property is required if you set the AutoRenew property to True.

Default value: 1. Valid values:

  • 1
  • 2
  • 3
  • 6
  • 12
Note Updates to this property take effect only for new ECS instances.
AutoRenew String No Yes Specifies whether to enable auto-renewal for the instance.

This property takes effect if you set the InstanceChargeType property to PrePaid.

Default value: False. Valid values:
  • True: enables auto-renewal.
  • False: does not enable auto-renewal.
Note Updates to this property take effect only for new ECS instances.
InstanceChargeType String No Yes The billing method of the instance. Default value: PostPaid. Valid values:
  • PrePaid: subscription
    Note If you want to set this property to PrePaid, make sure that your account has sufficient balance or credit. If your account does not have sufficient balance or credit, an InvalidPayMethod error is returned.
  • PostPaid: pay-as-you-go
Note Updates to this property take effect only for new ECS instances.
EniMappings List No Yes The elastic network interface (ENI) that you want to attach to the instance. You can attach only one ENI to each instance.

For more information, see EniMappings properties.

LaunchTemplateId String No Yes The ID 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.
Period Number No Yes The subscription period of the instance. This property takes effect and is required if you set the InstanceChargeType property to PrePaid.

If you also set the DedicatedHostId property, the value of the Period property must be within the subscription period of the dedicated host.

  • Valid values if you set the PeriodUnit property to Week: 1, 2, 3, and 4
  • Valid values if you set the PeriodUnit property to Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60
Note Updates to this property take effect only for new ECS instances.
NetworkType String No No The network type of the instance. Default value: classic. Valid values:
  • vpc: VPC
  • classic: classic network
DeletionProtection Boolean No No Specifies whether to enable deletion protection to allow you to release the instance by using the ECS console or by calling the DeleteInstance operation. Valid values:
  • true: enables deletion protection.
  • false: does not enable deletion protection.
DeploymentSetId String No Yes The ID of the deployment set. Updates to this property take effect only for new ECS instances.
Ipv6AddressCount Integer No Yes The number of randomly generated IPv6 addresses that are assigned to the ENI. You cannot set both the Ipv6Addresses and Ipv6AddressCount properties.
Note Updates to this property take effect only for new ECS instances.
Ipv6Addresses List No Yes The IPv6 address that is assigned to the ENI. You can specify only one IPv6 address. If you modify this property, existing instances are not affected. You cannot set both the Ipv6Addresses and Ipv6AddressCount properties.
Note Updates to this property take effect only for new ECS instances.
SystemDiskAutoSnapshotPolicyId String No Yes The ID of the automatic snapshot policy for the system disk. None.
SystemDiskPerformanceLevel String No No The performance level (PL) of the ESSD that is used as the system disk. Default value: PL1. Valid values:
  • PL0: The ESSD delivers up to 10,000 random read/write IOPS.
  • PL1: The ESSD delivers up to 50,000 random read/write IOPS.
  • PL2: The ESSD delivers up to 100,000 random read/write IOPS.
  • PL3: The ESSD delivers up to 1,000,000 random read/write IOPS.
For more information about the PLs of ESSDs, see ESSDs.

DiskMappings syntax

"DiskMappings": [
  {
    "Category": String,
    "DiskName": String,
    "Description": String,
    "Device": String,
    "SnapshotId": String,
    "Size": String,
    "Encrypted": String,
    "KMSKeyId": 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: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: SSD
  • cloud_essd: ESSD
  • ephemeral_ssd: local SSD
The default value for an I/O optimized instance is cloud_efficiency.

The default value for a non-I/O optimized instance is cloud.

DiskName String No No The name of the data 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://.
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 mount point.
Note This property will be removed in the future. We recommend that you use other properties to improve compatibility.
SnapshotId String No No The ID of the snapshot. None.
Encrypted String No No Specifies whether to encrypt the data disk. Default value: false. Valid values:
  • true: encrypts the data disk.
  • false: does not encrypt the data disk.
KMSKeyId String No No The ID of the Key Management Service (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 PL of the ESSD that is used as the data disk. Default value: PL1. Valid values:
  • PL0: The ESSD delivers up to 10,000 random read/write IOPS.
  • PL1: The ESSD delivers up to 50,000 random read/write IOPS.
  • PL2: The ESSD delivers up to 100,000 random read/write IOPS.
  • PL3: The ESSD delivers up to 1,000,000 random read/write IOPS.
For more information about the PLs of ESSDs, see ESSDs.
ProvisionedIops Integer No No The IOPS that is preset in the data disk. None.
BurstingEnabled Boolean No No Specifies whether to enable the burst mode for the data disk. Default value: false. Valid values:
  • true: enables the burst mode.
  • false: disables the burst mode.

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://. The tag key cannot start with aliyun or acs:.
Value String No No The tag value. The tag value must be 0 to 128 characters in length, and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.

EniMappings syntax

"EniMappings": [
  {
    "SecurityGroupId": String,
    "VSwitchId": String,
    "Description": String,
    "NetworkInterfaceName": String,
    "PrimaryIpAddress": String
  }
]

EniMappings properties

Property Type Required Editable Description Constraint
SecurityGroupId String Yes Yes The ID of the security group to which the ENI belongs. The security group to which the ENI belongs and the ECS instance must be deployed in the same VPC.
VSwitchId String Yes No The ID of the vSwitch. None.
Description String No Yes The description of the ENI. The description must be 2 to 256 characters in length. The description 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 do not set this property, the system randomly assigns an idle IP address from the CIDR block of the vSwitch.

Response parameters

Fn::GetAtt

  • InstanceIds: the IDs of the instances. An instance ID is a GUID that is generated by the system for an instance.
  • PrivateIps: the private IP addresses of ECS instances in VPCs. This parameter takes effect if the NetworkType property is set to vpc. Example: ["172.16.XX.XX", "172.16.XX.XX", … "172.16.XX.XX"]. In this example, the value is a JSON array that can contain up to 100 IP addresses separated by commas (,).
  • InnerIps: the private IP addresses of ECS instances in the classic network. This parameter takes effect if the NetworkType property is set to classic. Example: ["10.1.XX.XX", "10.1.XX.XX", … "10.1.XX.XX"]. In this example, the value is a JSON array that can contain up to 100 IP addresses separated by commas (,).
  • PublicIps: the public IP addresses of ECS instances in the classic network. This parameter takes effect if the NetworkType property is set to classic. Example: ["42.1.XX.XX", "42.1.XX.XX", … "42.1.XX.XX"]. In this example, the value is a JSON array that can contain up to 100 IP addresses separated by commas (,).
  • HostNames: the hostnames of the ECS instances.
  • OrderId: the order ID of the ECS instances.
  • ZoneIds: the zone IDs of the ECS instances.
  • Ipv6AddressIds: the IDs of IPv6 addresses of the ECS instances.
    Note The IDs of 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 none of the ECS instances have an IP address, null is returned.
  • Ipv6Addresses: the IPv6 addresses of the ECS instances.
    Note 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 none of the ECS instances have an IP address, null is returned.

Example

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "Creates VPC ECS instance",
  "Metadata": {
    "ALIYUN::ROS::Interface": {
      "ParameterGroups": [
        {
          "Parameters": [
            "VSwitchZoneId",
            "InstanceImageId",
            "InstanceType",
            "SystemDiskSize",
            "InstancePublicIP",
            "SystemDiskCategory",
            "InstancePassword"
          ],
          "Label": {
            "default": "ECS"
          }
        }
      ],
      "TemplateTags": [
        "Creates VPC ECS instance"
      ]
    }
  },
  "Parameters": {
    "SystemDiskCategory": {
      "Type": "String",
      "Label": {
        "en": "System Disk Type",
         
      },
      "Description": {
        "en": "System Disk Type",
         
      },
      "AssociationProperty": "ALIYUN::ECS::Disk::SystemDiskCategory",
      "AssociationPropertyMetadata": {
        "ZoneId": "VSwitchZoneId",
        "InstanceType": "InstanceType"
      }
    },
    "InstanceImageId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::ImageId",
      "Default": "centos_7",
      "Description": {
         
        "en": "Image ID"
      },
      "Label": {
         
        "en": "Image"
      }
    },
    "InstanceType": {
      "Type": "String",
      "Description": {
         
        "en": "Fill in the specifications that can be used under the VSwitch availability zone."
      },
      "Label": {
         
        "en": "Instance Type"
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
      "AssociationPropertyMetadata": {
        "ZoneId": "VSwitchZoneId"
      }
    },
    "InstancePassword": {
      "NoEcho": true,
      "Type": "String",
      "Description": {
        "en": "Server login password, Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^*_-+=|{}[]:;',.?/ Special symbol in).",
         
      },
      "AllowedPattern": "[0-9A-Za-z\\_\\-\\',=%`~!@#\\(\\)\\$\\^\\*\\+\\|\\{\\}\\[\\]\\.\\?\\/]+$",
      "Label": {
        "en": "Instance Password",
         
      },
      "ConstraintDescription": {
        "en": "Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^*_-+=|{}[]:;',.?/ Special symbol in).",
         
      },
      "MinLength": 8,
      "MaxLength": 30
    },
    "InstancePublicIP": {
      "Type": "Boolean",
      "Description": {
         
        "en": "Whether to allocate Public IP."
      },
      "Label": {
         
        "en": "Allocate Public IP"
      },
      "Default": false
    },
    "VSwitchZoneId": {
      "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
      "Type": "String",
      "Description": {
         
        "en": "VSwitch Availability Zone"
      }
      "Label": {
         
        "en": "VSwitch Availability Zone"
      }
    },
    "SystemDiskSize": {
      "Default": 40,
      "Type": "Number",
      "Description": {
           
        "en": "System disk size, range of values: 40-500, units: GB."
      },
      "Label": {
         
        "en": "System Disk Space"
      }
    }
  },
  "Resources": {
    "EcsVSwitch": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "VpcId": {
          "Ref": "EcsVpc"
        },
        "ZoneId": {
          "Ref": "VSwitchZoneId"
        },
        "CidrBlock": "192.168.XX.XX/24"
      }
    },
    "EcsInstanceGroup": {
      "Type": "ALIYUN::ECS::InstanceGroup",
      "Properties": {
        "IoOptimized": "optimized",
        "PrivateIpAddress": "192.168.XX.XX",
        "VpcId": {
          "Ref": "EcsVpc"
        },
        "SecurityGroupId": {
          "Ref": "EcsSecurityGroup"
        },
        "VSwitchId": {
          "Ref": "EcsVSwitch"
        },
        "ImageId": {
          "Ref": "InstanceImageId"
        },
        "AllocatePublicIP": {
          "Ref": "InstancePublicIP"
        },
        "InstanceType": {
          "Ref": "InstanceType"
        },
        "SystemDiskSize": {
          "Ref": "SystemDiskSize"
        },
        "SystemDiskCategory": {
          "Ref": "SystemDiskCategory"
        },
        "Password": {
          "Ref": "InstancePassword"
        },
        "MaxAmount": 1
      }
    },
    "EcsSecurityGroup": {
      "Type": "ALIYUN::ECS::SecurityGroup",
      "Properties": {
        "VpcId": {
          "Ref": "EcsVpc"
        },
        "SecurityGroupIngress": [
          {
            "PortRange": "-1/-1",
            "Priority": 1,
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "all",
            "NicType": "intranet"
          }
        ],
        "SecurityGroupEgress": [
          {
            "PortRange": "-1/-1",
            "Priority": 1,
            "IpProtocol": "all",
            "DestCidrIp": "0.0.0.0/0",
            "NicType": "intranet"
          }
        ]
      }
    },
    "EcsVpc": {
      "Type": "ALIYUN::ECS::VPC",
      "Properties": {
        "CidrBlock": "192.168.XX.XX/16",
        "VpcName": {
          "Fn::Join": [
            "-",
            [
              "StackId",
              {
                "Ref": "ALIYUN::StackId"
              }
            ]
          ]
        }
      }
    }
  },
  "Outputs": {
    "EcsInstanceId": {
      "Value": {
        "Fn::GetAtt": [
          "EcsInstanceGroup",
          "InstanceIds"
        ]
      }
    }
  }
}

For more information about examples, see InstanceGroup.json and InstanceGroup.yml. In the examples, the following resource types are involved: ALIYUN::ECS::InstanceGroup, ALIYUN::ECS::InstanceClone, ALIYUN::ECS::Command, and ALIYUN::ECS::Invocation.