ALIYUN::ESS::ScalingConfiguration is used to create a scaling configuration for a scaling group.

Syntax

{
  "Type": "ALIYUN::ESS::ScalingConfiguration",
  "Properties": {
    "PasswordInherit": Boolean,
    "DiskMappings": List,
    "RamRoleName": String,
    "IoOptimized": String,
    "InternetChargeType": String,
    "KeyPairName": String,
    "InstanceId": String,
    "InstanceTypes": List,
    "ImageId": String,
    "ResourceGroupId": String,
    "SpotStrategy": String,
    "InstanceType": String,
    "SystemDiskCategory": String,
    "SystemDiskSize": Integer,
    "SystemDiskAutoSnapshotPolicyId": String,
    "InternetMaxBandwidthOut": Integer,
    "InstanceName": String,
    "InternetMaxBandwidthIn": Integer,
    "ScalingConfigurationName": String,
    "UserData": String,
    "DeploymentSetId": String,
    "SecurityGroupId": String,
    "SpotPriceLimit": Number,
    "HpcClusterId": String,
    "ScalingGroupId": String,
    "SpotPriceLimitForInstanceType": Map,
    "TagList": List
  }
}

Properties

Property Type Required Editable Description Constraint
ResourceGroupId String No Yes The ID of the resource group to which created instances belong. None
DeploymentSetId String No No The ID of the deployment set. None
HpcClusterId String No No The ID of the E-HPC cluster to which created instances belong. None
ScalingGroupId String Yes No The ID of the scaling group to which the scaling configuration belongs. None
DiskMappings List No Yes The disks to be attached to created instances. A maximum of 16 disks can be attached to each instance.
InternetChargeType String No Yes The billing method for network usage. Valid values:
  • PayByBandwidth
  • PayByTraffic

Default value: PayByTraffic.

InternetMaxBandwidthIn Integer No No The maximum inbound bandwidth from the Internet.

Unit: Mbit/s.

Valid values: 1 to 100.

Default value: 100.

InternetMaxBandwidthOut Integer No Yes The maximum outbound bandwidth to the Internet.
  • Valid values when InternetChargeType is set to PayByBandwidth: 0 to 100. Default value: 0.
  • Valid values when InternetChargeType is set to PayByTraffic: 1 to 200. This parameter is required when the InternetChargeType parameter is set to PayByTraffic.

Unit: Mbit/s.

InstanceId String No No The ID of the instance whose properties are used to create the scaling configuration. None
SystemDiskCategory String No Yes The category of the system disk. Valid values:
  • cloud: indicates a basic disk.
  • cloud_efficiency: indicates an ultra disk.
  • cloud_ssd: indicates a standard SSD.
  • ephemeral_ssd: indicates a local SSD.
  • cloud_essd: indicates an enhanced SSD (ESSD).

The default value is cloud for non-I/O optimized instances of the Generation I instance types. The default value is cloud_efficiency for other types of instances.

ImageId String No Yes The ID of the image used to create ECS instances. You can use a public image, a custom image, or an Alibaba Cloud Marketplace image. For more information, see Overview.
InstanceType String No Yes The instance type. For more information, see Instance families.
SecurityGroupId String No Yes The ID of the security group to which created instances belong. None
IoOptimized String No Yes Specifies whether the created instances are I/O optimized. Valid values:
  • none: The instance is not I/O optimized.
  • optimized: The instance is I/O optimized.

Default value: none.

ScalingConfigurationName String No Yes The name of the scaling configuration.
  • The name must be 2 to 64 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a letter or digit.
  • The name of the scaling configuration must be unique within a scaling group.
  • If this parameter is not specified, the value of ScalingConfigurationId is used.
KeyPairName String No Yes The name of the key pair that is used to connect to created instances.
  • For Windows instances, this parameter is ignored and is empty by default.
  • For Linux instances, the password logon method is disabled during initialization.
RamRoleName String No Yes The RAM role name of the created instance. You can call the ListRoles operation to query the RAM role names of created instances. For more information, see CreateRole and ListRoles.
SystemDiskSize Integer No Yes The size of the system disk.

Valid values: 40 to 500.

Unit: GB.

If a custom image is used to create a system disk, ensure that the size of the system disk is greater than that of the custom image.

UserData String No Yes The user data that you provide when you create instances. The user data can be up to 16 KB in size. You do not need to convert the data into Base64-encoded strings. If the data contains special characters, add a backslash (\) immediately before each special character.
InstanceTypes List No Yes The instance types from which instances can be created. If this parameter is specified, the InstanceType parameter is ignored. A maximum of 10 instance types can be specified. The priority is determined in descending order of instance types in the list. Auto Scaling creates instances in order of priority. When an instance type with the highest priority cannot be used to create an instance, the instance type with the next highest priority is automatically used.
PasswordInherit Boolean No Yes Specifies whether to use the preconfigured password of the specified image. To use this parameter, ensure that a password is preconfigured for the specified image.
TagList List No Yes The tags of the instance. A tag is a key-value pair. You can specify a maximum of five tags in the {"key1": "value1", "key2": "value2", ... "key5": "value5"} format. A tag key can be up to 64 characters in length and cannot start with aliyun, http://, or https://. If you use a tag, the key of the tag cannot be an empty string. The value of the tag must be 0 to 128 characters in length.
SpotStrategy String No Yes The preemption policy to be applied to pay-as-you-go instances. Valid values:
  • NoSpot: specifies a regular pay-as-you-go instance.
  • SpotWithPriceLimit: specifies a preemptible instance with a maximum hourly price.
  • SpotAsPriceGo: specifies a preemptible instance priced at the market price at the time of purchase.

Default value: NoSpot.

InstanceName String No Yes The name of the instance created based on the current scaling configuration. None
SpotPriceLimit Number No Yes The maximum hourly price for the instance. A maximum of three decimal places can be specified. This parameter takes effect only when the SpotStrategy parameter is set to SpotWithPriceLimit. The value of this parameter can be overwritten by the value of SpotPriceLimitForInstanceType.
SpotPriceLimitForInstanceType Map No Yes The maximum spot price for each instance type. The format is {"<instance_type_1>": <price_limit_1>, ..., {"<instance_type_10>": <price_limit_10>}. This parameter takes effect only when the SpotStrategy parameter is set to SpotWithPriceLimit. You can configure up to 10 pairs of instance types and spot prices.
SystemDiskAutoSnapshotPolicyId String No Yes The ID of the automatic snapshot policy applied to the system disk. None

DiskMappings syntax

"DiskMappings": [
  {
    "Category": String,
    "DiskName": String,
    "Description": String,
    "AutoSnapshotPolicyId": String,
    "Encrypted": String,
    "KMSKeyId": String,
    "Device": String,
    "SnapshotId": String,
    "Size": String
  }
]

DiskMappings properties

Property Type Required Editable Description Constraint
Size String Yes No The size of the data disk.
  • Valid values when Category is set to cloud: 5 to 2000.
  • Valid values when Category is set to cloud_efficiency: 20 to 32768.
  • Valid values when Category is set to cloud_ssd: 20 to 32768.
  • Valid values when Category is set to cloud_essd: 20 to 32768.
  • Valid values when Category is set to ephemeral_ssd: 5 to 800.

If this parameter is specified, the data disk size must be greater than or equal to the size of the snapshot specified by SnapshotId.

Unit: GiB.

Category String No No The category of the data disk. Valid values: cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd, and cloud_essd. For I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value 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 (-). It must start with a letter, but 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. It cannot start with http:// or https://.
Device String No No The device name of the data disk. If this parameter is not specified, the system automatically allocates a device name in alphabetical order from /dev/xvdb to /dev/xvdz.
SnapshotId String No No The ID of the snapshot used to create the data disk. After this parameter is specified, the Size parameter is ignored. The actual size of the created disk is the size of the specified snapshot. If you specify a snapshot that was created on or before July 15, 2013, the operation fails and returns InvalidSnapshot.TooOld.
Encrypted String No No Specifies whether to encrypt the data disk. Default value: false.
KMSKeyId String No No The ID of the KMS key corresponding to the data disk. None
AutoSnapshotPolicyId String No No The ID of the automatic snapshot policy applied to the data disk. None

TagList syntax

"TagList": [
  {
    "Key": String,
    "Value": String
  }
]

TagList properties

Property Type Required Editable Description Constraint
Key String Yes No The key of the tag. The key must be 1 to 64 characters in length and cannot start with aliyun, acs:, http://, or https://.
Value String No No The value of the tag. The value must be 0 to 63 characters in length and cannot start with aliyun, acs:, http://, or https://.

Response parameters

Fn::GetAtt

ScalingConfigurationId: the ID of the scaling configuration. This ID is a globally unique identifier (GUID) generated by the system.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "ScalingConfiguration": {
      "Type": "ALIYUN::ESS::ScalingConfiguration",
      "Properties": {
        "ImageId": "ubuntu1404_64_20G_aliaegis_2015****.vhd",
        "InstanceType": "ecs.t1.small",
        "InstanceId": "i-25xhh****",
        "InternetChargeType": "PayByTraffic",
        "InternetMaxBandwidthIn": 1,
        "InternetMaxBandwidthOut": 20,
        "SystemDisk_Category": "cloud",
        "ScalingGroupId": "bwhtvpcBcKYac9fe3vd0****",
        "SecurityGroupId": "sg-25zwc****",
        "DiskMappings": [
          {
            "Size": 10
          },
          {
            "Category": "cloud",
            "Size": 10
          }
        ]
      }
    }
  },
  "Outputs": {
    "ScalingConfiguration": {
      "Value": {"get_attr": ["ScalingConfigurationId"]}
    }
  }
}