ALIYUN::ESS::ScalingGroup is used to create a scaling group.

Syntax

{
  "Type": "ALIYUN::ESS::ScalingGroup",
  "Properties": {
    "VpcId": String,
    "ScalingGroupName": String,
    "RemovalPolicys": List,
    "MinSize": Integer,
    "MaxSize": Integer,
    "VSwitchId": String,
    "LoadBalancerIds": List
    "DefaultCooldown": Integer,
    "DBInstanceIds": List,
    "VSwitchIds": List
  }
}

Properties

Name Type Required Editable Description Validity
MinSize Integer Yes No The minimum number of ECS instances in a scaling group. Valid values: 0 to 100.
MaxSize Integer Yes No The maximum number of ECS instances allowed in a scaling group. Valid values: 0 to 100.
VpcId String No No The ID of the VPC to which the scaling group belongs. None
ScalingGroupName String No No The name of the scaling group. The name must be 2 to 40 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a digit or letter. This parameter must be unique in a region and under an Alibaba Cloud account. Default value: ScalingGroupId.
RemovalPolicys List No No The policies to remove ECS instances from the scaling group.

Valid values:

OldestInstance: removes the ECS instance that was attached to the scaling group at the earliest point in time.

NewestInstance: removes the ECS instance that was attached to the scaling group at the latest point in time.

OldestScalingConfiguration: removes ECS instances that were created based on the earliest scaling configuration.

Default value: OldestScalingConfiguration or OldestInstance. You can specify a maximum of two removal policies.

VSwitchId String No No The ID of the VSwitch in the VPC. None
LoadBalancerIds List No No The list of IDs of Server Load Balancer (SLB) instances in the scaling group. None
DefaultCooldown Integer No No The default cooldown time of the scaling group.

Valid values: 0 to 86,400. Unit: second.

Default value: 300.

DBInstanceIds List No No The list of IDs of ApsaraDB for RDS instances in the scaling group. None
VSwitchIds List No No The list of VSwitch IDs. You can specify a maximum of five VSwitch IDs. If you set this parameter, the VSwitchId parameter becomes inapplicable.
MultiAZPolicy String No No The ECS instance scaling policy for a multi-zone scaling group. Valid values: PRIORITY and BALANCE.
NotificationConfigurations List No Yes The list of notification configurations for event and resource changes. None
ProtectedInstances List No Yes The list of ECS instances protected in the scaling group. A scaling group can have a maximum of 1,000 protected instances.
StandbyInstances List No Yes The list of secondary ECS instances in the scaling group. A scaling group can have a maximum of 1,000 secondary instances.
HealthCheckType String No Yes The health check type. Valid values: ECS and NONE.

Response parameters

Fn::GetAtt

ScalingGroupId: the ID of the scaling group. It is a globally unique identifier (GUID) generated by the system.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "ScalingGroup": {
      "Type": "ALIYUN::ESS::ScalingGroup",
      "Properties": {
        "MaxSize": 1,
        "MinSize": 1,
        # "ScalingGroupName": "HeatCreatedReal2",
        # "DefaultCooldown": 500,
        # "RemovalPolicy_1": "",
        # "RemovalPolicy_2": "",
      }
    }
  },
  "Outputs": {
    "ScalingGroup": {
         "Value": {"Fn::GetAtt": ["ScalingGroup", "ScalingGroupId"]}
    }
  }
}