Creates a scaling configuration.

Description

Auto Scaling automatically scales out Elastic Compute Service (ECS) instances based on a preconfigured scaling configuration. ECS instances can be configured in the following modes:

  • InstancePatternInfo.N: the intelligent configuration mode. In this mode, you need only to configure the number of vCPUs, memory size, instance family, and maximum price. The system selects an instance type with the lowest price based on your configurations to create ECS instances. This mode is applicable to scaling groups that reside in virtual private clouds (VPCs). This mode reduces the chance that the scale-out activity fails due to insufficient inventory of instance types.
  • InstanceType: In this mode, you need to specify an instance type.
  • InstanceTypes.N: In this mode, you need to specify multiple instance types.
  • InstanceTypeOverride.N: In this mode, you need to specify multiple instance types and set weights for the instance types.
  • CPU and Memory: In this mode, you need to specify the number of vCPUs and memory size. Auto Scaling uses factors such as I/O optimization and zone to determine a set of available instance types. Then, Auto Scaling creates ECS instances based on the unit prices of the instance types in ascending order. This mode is applicable only if Expansion and Contraction Strategy is set to Cost Optimization Policy and the scaling configuration does not have a specified instance type.
Note You cannot use InstanceType, InstanceTypes.N, InstanceTypeOverride.N, and CPU and Memory at the same time. However, you can use InstanceType and InstancePatternInfo.N or InstanceTypes.N and InstancePatternInfo.N at the same time. If you use InstanceType and InstancePatternInfo.N or InstanceTypes.N and InstancePatternInfo.N at the same time, Auto Scaling preferentially uses the instance types specified by InstanceType or InstanceTypes.N for scale-out activities. If the instance types specified by InstanceType or InstanceTypes.N do not have sufficient inventory, Auto Scaling then uses the instance types specified by InstancePatternInfo.N for scale-out activities.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateScalingConfiguration

The operation that you want to perform. Set the value to CreateScalingConfiguration.

ScalingGroupId String Yes asg-bp14wlu85wrpchm0****

The ID of the scaling group in which you want to create the scaling configuration.

ImageId String No centos6u5_64_20G_aliaegis****.vhd

The ID of the image that Auto Scaling uses to automatically create ECS instances.

ImageName String No image****

The name of the image. Each image name must be unique within a region. If you configure ImageId, this parameter is ignored.

Alibaba Cloud Marketplace images cannot be specified by using ImageName.

InstanceType String No ecs.g6.large

The instance type of the ECS instance. For more information, see Instance families.

Cpu Integer No 2

The number of vCPUs.

You can configure the number of vCPUs and memory size to specify the range of instance types. For example, you can set CPU to 2 and Memory to 16 to specify instance types that have 2 vCPUs and 16 GiB of memory. Auto Scaling uses factors such as I/O optimization and zone to determine a set of available instance types. Then, Auto Scaling creates instances based on the unit prices of the instance types in ascending order.

Note This instance type range is valid only if Expansion and Contraction Strategy is set to Cost Optimization Policy and the scaling configuration does not have a specified instance type.
Memory Integer No 16

The memory size.

You can configure the number of vCPUs and the memory size to specify the range of instance types. For example, you can set CPU to 2 and Memory to 16 to specify instance types that have 2 vCPUs and 16 GiB of memory. Auto Scaling uses factors such as I/O optimization and zone to determine a set of available instance types. Then, Auto Scaling creates instances based on the unit prices of the instance types in ascending order.

Note This instance type range is valid only if Expansion and Contraction Strategy is set to Cost Optimization Policy and the scaling configuration does not have a specified instance type.
DeploymentSetId String No ds-bp1frxuzdg87zh4pz****

The ID of the deployment set to which the ECS instance belongs.

InstanceTypes.N RepeatList No ecs.g6.large

Instance type N of ECS instances. If you configure this parameter, InstanceType is ignored. You can specify up to 10 instance types for a scaling configuration. Valid values of N: 1 to 10.

A smaller value of N specifies a higher priority. Auto Scaling creates instances based on the priorities of instance types. If Auto Scaling cannot create instances based on the instance type of the highest priority, Auto Scaling then uses the instance type of the next highest priority.

InstanceTypeOverride.N.InstanceType String No ecs.c5.xlarge

If you want to specify the capacity of an instance type in the scaling configuration, you must configure both InstanceTypeOverride.N.InstanceType and InstanceTypeOverride.N.WeightedCapacity.

This parameter is used to specify the instance type. You can specify N values for this parameter. You can use this parameter together with InstanceTypeOverride.N.WeightedCapacity to specify weights for multiple instance types. Valid values of N: 1 to 10.

Note If you configure this parameter, you cannot configure InstanceTypes.N or InstanceType.

For information about valid values of InstanceType in InstanceTypeOverride.N.InstanceType, see Instance families.

InstanceTypeOverride.N.WeightedCapacity Integer No 4

If you want to specify the capacity of an instance type in the scaling configuration, you must configure InstanceTypeOverride.N.InstanceType and InstanceTypeOverride.N.WeightedCapacity. The two parameters have a one-to-one correspondence. The value of N in the two parameters must be the same.

This parameter specifies the weight of the instance type. The weight specifies the capacity of a single instance of the specified instance type in the scaling group. A greater weight indicates that a smaller number of instances of the specified instance type are required to meet the expected capacity.

Performance metrics, such as the number of vCPUs and the memory size of each instance type, may vary. You can set different weights for different instance types based on your business requirements.

Example:

  • Current capacity: 0
  • Expected capacity: 6
  • Capacity of ecs.c5.xlarge: 4

To meet the expected capacity, Auto Scaling creates two ecs.c5.xlarge instances.

Note The capacity of the scaling group cannot exceed the sum of the maximum capacity specified by MaxSize and the maximum weight of the instance type.

Valid values of WeightedCapacity in InstanceTypeOverride.N.WeightedCapacity: 1 to 500.

SecurityGroupId String No sg-280ih****

The ID of the security group to which the ECS instance belongs. ECS instances in the same security group can access each other.

IoOptimized String No optimized

Specifies whether to create an I/O optimized instance. Valid values:

  • none: creates a non-I/O optimized instance.
  • optimized: creates an I/O optimized instance.

Default value for instances of retired instance types: none. Default value for instances of other instance types: optimized.

InternetChargeType String No PayByTraffic

The billing method of network bandwidth. Valid values:

  • PayByBandwidth: You are charged for the maximum available bandwidth specified by InternetMaxBandwidthOut.
  • PayByTraffic: You are charged for the actual traffic used. InternetMaxBandwidthOut specifies only the upper limit of available bandwidth.

Default value for the classic network: PayByBandwidth. Default value for VPCs: PayByTraffic.

InternetMaxBandwidthIn Integer No 100

The maximum inbound public bandwidth. Unit: Mbit/s. Valid values: 1 to 200.

Default value: 200. This parameter is not used for billing because inbound traffic to instances is free of charge.

InternetMaxBandwidthOut Integer No 50

The maximum outbound public bandwidth. Unit: Mbit/s. Valid values:

  • If you set InternetChargeType to PayByBandwidth and you leave this parameter empty, this parameter is automatically set to 0.
  • If you set InternetChargeType to PayByTraffic and you leave this parameter empty, an error is reported.
SystemDisk.Category String No cloud_ssd

The category of the system disk. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • ephemeral_ssd: local SSD
  • cloud_essd: enhanced SSD (ESSD)

SystemDisk.Category and SystemDiskCategories.N cannot be configured at the same time. If SystemDisk.Category and SystemDiskCategories.N are not configured, the default value of SystemDisk.Category is used. Default value for non-I/O optimized instances of Generation I instance types: cloud. Default value for instances of other types: cloud_efficiency.

SystemDisk.Size Integer No 100

The size of the system disk. Unit: GiB. Valid values:

  • Valid values if SystemDisk.Category is set to cloud: 20 to 500
  • Valid values if SystemDisk.Category is set to cloud_efficiency: 20 to 500
  • Valid values if SystemDisk.Category is set to cloud_ssd: 20 to 500
  • Valid values if SystemDisk.Category is set to cloud_essd: 20 to 500
  • Valid values if SystemDisk.Category is set to ephemeral_ssd: 20 to 500

The value of SystemDisk.Size must be greater than or equal to max{20, ImageSize}.

Default value: 40 or the size of the image, whichever is greater.

SystemDisk.DiskName String No cloud_ssdSystem

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

SystemDisk.Description String No Test system disk.

The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

SystemDisk.AutoSnapshotPolicyId String No sp-bp12m37ccmxvbmi5****

The ID of the automatic snapshot policy that is applied to the system disk.

SystemDisk.PerformanceLevel String No PL0

The performance level of the system disk that is an ESSD. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.

Default value: PL0.

Note For more information about how to select ESSD performance levels, see ESSDs.
ScalingConfigurationName String No scalingconfig****

The name of the scaling configuration. It must be 2 to 64 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a letter or a digit.

The name of the scaling configuration must be unique within a scaling group in a region. If you do not configure this parameter, the value of ScalingConfigurationId is used.

DataDisk.N.Size Integer No 100

The size of data disk N. Unit: GiB. Valid values of N: 1 to 16. Valid values:

  • Valid values if DataDisk.N.Category is set to cloud: 5 to 2000
  • Valid values if DataDisk.N.Category is set to cloud_efficiency: 20 to 32768
  • Valid values if DataDisk.N.Category is set to cloud_ssd: 20 to 32768
  • Valid values if DataDisk.N.Category is set to cloud_essd: 20 to 32768
  • Valid values if DataDisk.N.Category is set to ephemeral_ssd: 5 to 800

The value of DataDisk.N.Size must be greater than or equal to the size of the snapshot specified by SnapshotId.

DataDisk.N.SnapshotId String No s-280s7****

The ID of the snapshot that you want to use to create data disk N. Valid values of N: 1 to 16. If you configure this parameter, DataDisk.N.Size is ignored. The size of the disk is the same as the size of the specified snapshot.

If you specify a snapshot created on or before July 15, 2013, the operation fails and the system returns InvalidSnapshot.TooOld.

DataDisk.N.Category String No cloud_ssd

The category of data disk N. Valid values of N: 1 to 16. Valid values:

  • cloud: basic disk. The value of the DeleteWithInstance attribute of a basic disk that is created together with the instance is true.
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • ephemeral_ssd: local SSD.
  • cloud_essd: ESSD.

DataDisk.N.Category and DataDisk.N.Categories.N cannot be configured at the same time. If DataDisk.N.Category and DataDisk.N.Categories.N are not configured, the default value of DataDisk.N.Category is:

  • cloud_efficiency for I/O optimized instances.
  • cloud for non-I/O optimized instances.
DataDisk.N.Device String No /dev/xvdb

The mount target of data disk N. Valid values of N: 1 to 16. If you do not configure this parameter, the system automatically assigns a mount target when you create the ECS instances. The name of the mount target ranges from /dev/xvdb to /dev/xvdz in alphabetical order.

DataDisk.N.DeleteWithInstance Boolean No true

Specifies whether to release data disk N if the instance to which data disk N is attached is released. Valid values of N: 1 to 16. Valid values:

  • true: releases data disk N if the instance is released.
  • false: does not release data disk N if the instance is released.

This parameter is valid only for independent disks whose DataDisk.N.Category is set to cloud, cloud_efficiency, cloud_ssd, or cloud_essd. If you configure this parameter for other disks, an error is reported.

Default value: true.

DataDisk.N.Encrypted String No false

Specifies whether to encrypt data disk N. Valid values of N: 1 to 16. Valid values:

  • true: encrypts data disk N.
  • false: does not encrypt data disk N.

Default value: false.

DataDisk.N.KMSKeyId String No 0e478b7a-4262-4802-b8cb-00d3fb40****

The ID of the Key Management Service (KMS) key of data disk N. Valid values of N: 1 to 16.

DataDisk.N.DiskName String No cloud_ssdData

The name of data disk N. Valid values of N: 1 to 16. 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 but cannot start with http:// or https://.

DataDisk.N.Description String No Test data disk.

The description of data disk N. Valid values of N: 1 to 16. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

DataDisk.N.AutoSnapshotPolicyId String No sp-bp19nq9enxqkomib****

The ID of the automatic snapshot policy that is applied to data disk N. Valid values of N: 1 to 16.

DataDisk.N.PerformanceLevel String No PL1

The performance level of data disk N that is an ESSD. If DataDisk.N.Category is set to cloud_essd, the N value must be the same as that in DataDisk.N.Category. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.

Default value: PL1.

Note For more information about how to select ESSD performance levels, see ESSDs.
DataDisk.N.Categories.N RepeatList No cloud

Category N of data disk N. The first N in DataDisk.N.Categories.N represents the serial number of the data disk. Valid values of N: 1 to 16. The second N in DataDisk.N.Categories.N represents the serial number of the data disk category. Valid values of N: 1 to 4. You can specify up to four categories of data disks for a scaling configuration. A smaller value specifies a higher priority. If the disk category of the highest priority cannot be used, Auto Scaling then uses the disk category of the next highest priority to create data disks. Valid values:

  • cloud: basic disk. The value of the DeleteWithInstance attribute of a basic disk that is created together with the instance is true.
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: ESSD.
Note DataDisk.N.Categories.N and DataDisk.N.Category cannot be configured at the same time.
LoadBalancerWeight Integer No 50

The weight of the ECS instance as a backend server of a Server Load Balancer (SLB) instance. Valid values: 1 to 100.

Default value: 50.

Tags String No {"key1":"value1","key2":"value2", ... "key5":"value5"}

The tags of the ECS instance. Tags must be specified as key-value pairs. You can specify up to 20 tags. The following limits apply to tag keys and values:

  • A tag key can be up to 64 characters in length. It cannot start with acs: or aliyun, or contain http:// or https://. You cannot specify an empty string as a tag key.
  • A tag value can be up to 128 characters in length. It cannot start with acs: or aliyun, or contain http:// or https://. You can specify an empty string as a tag value.
UserData String No echo hello ecs!

The user data of the ECS instance. The data must be encoded in Base64. The maximum size of the raw data is 16 KB.

KeyPairName String No KeyPairTest

The name of the key pair that is used to log on to the ECS instance.

  • This parameter is ignored if you create a Windows instance. This parameter is empty by default.
  • By default, the username and password authentication method is disabled for Linux instances.
RamRoleName String No ramrole****

The name of the Resource Access Management (RAM) role that is associated with the ECS instance. This name is provided and maintained by RAM. You can call the ListRoles operation to query available RAM roles. For information about how to create a RAM role, see CreateRole.

SecurityEnhancementStrategy String No Active

Specifies whether to enable security hardening. Valid values:

  • Active: enables security hardening. This value is applicable only to public images.
  • Deactive: does not enable security hardening. This value is applicable to all image types.
InstanceName String No instance****

The name of the instance that is automatically created based on the scaling configuration.

HostName String No host****

The hostname of the ECS instance. The hostname cannot start or end with a period (.) or hyphen (-), or contain consecutive periods (.) or hyphens (-). Naming conventions:

  • Windows instances: The hostname must be 2 to 15 characters in length and can contain letters, digits, and hyphens (-). The hostname cannot contain periods (.) or contain only digits.
  • Other instances such as Linux instances: The hostname must be 2 to 64 characters in length and can contain letters, digits, hyphens(-), and periods (.). You can use periods (.) to separate the hostname into multiple segments.
SpotStrategy String No NoSpot

The preemption policy applied to pay-as-you-go instances and preemptible instances. Valid values:

  • NoSpot: This policy applies to regular pay-as-you-go instances.
  • SpotWithPriceLimit: This policy applies to preemptible instances with a maximum hourly price.
  • SpotAsPriceGo: This policy applies to preemptible instances whose prices are based on the market price at the time of purchase.

Default value: NoSpot

PasswordInherit Boolean No false

Specifies whether to use the password predefined in the image. To use this parameter, make sure that a password is configured for the specified image. Valid values:

  • true: uses the password predefined in the image.
  • false: does not use the password predefined in the image.
SpotPriceLimit.N.InstanceType String No ecs.g6.large

The instance type of preemptible instance N. Valid values of N: 1 to 10. This parameter is available only if SpotStrategy is set to SpotWithPriceLimit.

SpotPriceLimit.N.PriceLimit Float No 0.5

The price limit of preemptible instance N. Valid values of N: 1 to 10. This parameter is available only if SpotStrategy is set to SpotWithPriceLimit.

Password String No 123abc****

The password that is used to log on to the ECS instance. The password must be 8 to 30 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include:

()` ~!@#$%^&*-_+=\|{}[]:;'<>,.?/

The password of a Windows instance cannot start with a forward slash (/).

Note For security reasons, we recommend that you use HTTPS to send requests if the Password parameter is configured.
ResourceGroupId String No rg-resource****

The ID of the resource group to which the ECS instance belongs.

SecurityGroupIds.N RepeatList No sg-bp18kz60mefs****

The ID of security group N to which you want to add ECS instances. The valid values of N vary based on the maximum number of security groups to which an instance can be added. For more information, see the "Security group limits" section in Limits.

Note SecurityGroupId and SecurityGroupIds.N cannot be configured at the same time.
HpcClusterId String No hpc-clusterid

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

InstanceDescription String No Test instance.

The description of the ECS instance. The description must be 2 to 256 characters in length. It can contain letters but cannot start with http:// or https://.

ClientToken String No 123e4567-e89b-12d3-a456-42665544****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure the idempotence of a request.

Ipv6AddressCount Integer No 1

The number of randomly generated IPv6 addresses that are assigned to the elastic network interface (ENI).

CreditSpecification String No Standard

The performance mode of the burstable instance. Valid values:

  • Standard: indicates the standard mode
  • Unlimited: indicates the unlimited mode

For more information, see the "Performance modes" section in Overview.

ImageFamily String No hangzhou-daily-update

The name of the image family. You can configure this parameter to obtain the latest custom images that are available in the specified image family. The images are used to create ECS instances. If ImageId is configured, you cannot configure ImageFamily.

ZoneId String No cn-hangzhou-g

The zone ID of the ECS instance.

DedicatedHostId String No dh-bp67acfmxazb4p****

The ID of the dedicated host on which you want to create ECS instances. Preemptible instances cannot be created on dedicated hosts. Therefore, if DedicatedHostId is configured, SpotStrategy and SpotPriceLimit are ignored.

You can call the DescribeDedicatedHosts operation to query the IDs of dedicated hosts.

Affinity String No default

Specifies whether to associate the instance on a dedicated host with the dedicated host. Valid values:

  • default: does not associate the instance with the dedicated host. If you restart an instance in the economical mode and the available resources of the dedicated host are insufficient, the instance is automatically deployed to another dedicated host in the automatic deployment resource pool.
  • host: associates the instance with the dedicated host. If you restart an instance in the economical mode, the instance remains on the dedicated host. If the resources of the dedicated host are insufficient, the instance fails to be restarted.

Default value: default.

Tenancy String No default

Specifies whether to create the instance on a dedicated host. Valid values:

  • default: does not create the instance on a dedicated host.
  • host: creates the instance on a dedicated host. If you do not configure DedicatedHostId, the system automatically selects a dedicated host for the instance that you create.

Default value: default.

PrivatePoolOptions.MatchCriteria String No Open

The type of the private pool. After an elasticity assurance or a capacity reservation takes effect, a private pool is generated. You can select a private pool when you start an instance. Valid values:

  • Open: In this mode, the system automatically selects a matched private pool of the open type to start the instance. If no matched private pool exists, the instance uses public pool resources. In this case, you do not need to configure PrivatePoolOptions.Id.
  • Target: In this mode, the system uses the specified private pool to start the instance. If the specified private pool is unavailable, the instance fails to be started. If PrivatePoolOptions.MatchCriteria is set to Target, you must also configure PrivatePoolOptions.Id.
  • None: In this mode, no private pools are used to start the instance.
PrivatePoolOptions.Id String No eap-bp67acfmxazb4****

The ID of the private pool. Set the value to the ID of the elasticity assurance or capacity reservation based on which the private pool is generated.

SpotDuration Integer No 1

The protection period of the preemptible instance. Unit: hours. Valid values: 0 to 6.

  • Protection periods of 2 to 6 hours are in invitational preview. If you want to set this parameter to a value in this range, submit a ticket.
  • If this parameter is set to 0, no protection period is specified for the preemptible instance.

Default value: 1.

SpotInterruptionBehavior String No Terminate

The interruption mode of the preemptible instance. Default value: Terminate. Only Terminate is supported, which means that the instance is directly released.

InstancePatternInfo.N.Cores Integer No 2

The number of vCPUs defined in an instance type in the intelligent configuration mode. This parameter is used to filter available instance types that meet the criteria that you specified. For more information, see Instance families. Valid values of N: 1 to 10.

Take note of the following items:

  • InstancePatternInfo.N applies only to scaling groups that reside in VPCs.
  • InstancePatternInfo.N, InstancePatternInfo.N.Cores, and InstancePatternInfo.N.Memory must be configured at the same time.
  • If you specify an instance type by using InstanceType or InstanceTypes.N, Auto Scaling preferentially uses the specified instance type for scale-out activities. If the specified instance type does have sufficient inventory, Auto Scaling automatically uses the instance type specified by InstancePatternInfo.N based on the unit prices of instance types in ascending order.
InstancePatternInfo.N.Memory Float No 4

The memory size defined in an instance type in the intelligent configuration mode. This parameter is used to filter available instance types that meet the criteria that you specified. For more information, see Instance families. Valid values of N: 1 to 10.

InstancePatternInfo.N.MaxPrice Float No 2

The maximum price per hour for a pay-as-you-go instance or a preemptible instance in the intelligent configuration mode. This parameter is used to filter available instance types that meet the criteria that you specified. Valid values of N: 1 to 10.

Note This parameter is required if SpotStrategy is set to SpotWithPriceLimit. In other cases, this parameter is optional.
InstancePatternInfo.N.InstanceFamilyLevel String No EnterpriseLevel

The instance family level in the intelligent configuration mode. This parameter is used to filter available instance types that meet the criteria that you specified. Valid values:

  • EntryLevel: indicates the shared instance type. Instances of this level have lower costs, but the computing performance of the instances cannot be ensured. This level is suitable for business scenarios in which CPU utilization is low. For more information, see Shared instance families.
  • EnterpriseLevel: Instances of this level provides stable performance and dedicated resources. This level is suitable for business scenarios that require high stability. For more information, see Instance families.
  • CreditEntryLevel: This value is valid only for burstable instances. Instances of this level use CPU credits to ensure computing performance. This level is suitable for scenarios in which the CPU utilization is usually low but bursts of CPU utilization may occur. For more information, see What are burstable instances?

Valid values of N: 1 to 10.

SystemDiskCategories.N RepeatList No cloud

Category N of the system disk. Valid values of N: 1 to 4. You can specify up to four disk categories for system disks in a scaling configuration. A smaller value of N specifies a higher priority. If the disk category of the highest priority cannot be used, Auto Scaling automatically uses the disk category of the next highest priority to create system disks. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
Note SystemDiskCategories.N and SystemDisk.Category cannot be configured at the same time.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

ScalingConfigurationId String asc-bp1ffogfdauy0nu5****

The ID of the scaling configuration.

Examples

Sample requests

https://ess.aliyuncs.com/?Action=CreateScalingConfiguration
&ScalingGroupId=asg-bp14wlu85wrpchm0****
&SecurityGroupId=sg-280ih****
&ImageId=centos6u5_64_20G_aliaegis****.vhd
&InstanceTypes.1=ecs.g6.large
&<Common request parameters>

Sample success responses

XML format

<CreateScalingConfigurationResponse>
      <ScalingConfigurationId>asc-bp1ffogfdauy0nu5****</ScalingConfigurationId>
      <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</CreateScalingConfigurationResponse>

JSON format

{
    "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
    "ScalingConfigurationId": "asc-bp1ffogfdauy0nu5****"
}

Error codes

For a list of error codes, visit the API Error Center.

HTTP status code

Error code

Error message

Description

400

InstanceType.Mismatch

The specified scaling configuration and existing active scaling configuration have different instance type.

The error message returned because the instance type of the specified scaling configuration differs from that of the current scaling configuration.

404

InvalidDataDiskSnapshotId.NotFound

Snapshot “XXX” does not exist.

The error message returned because the specified snapshot does not exist.

400

InvalidDataDiskSnapshotId.SizeNotSupported

The capacity of snapshot “XXX” exceeds the size limit of the specified disk category.

The error message returned because the size of the specified snapshot exceeds the maximum size allowed for the specified disk.

403

InvalidDevice.InUse

Device “XXX” has been occupied.

The error message returned because the mount target of the data disk is occupied.

400

InvalidImageId.InstanceTypeMismatch

The specified image does not support the specified instance type.

The error message returned because the specified image does not support the specified instance type.

404

InvalidImageId.NotFound

The specified image does not exist.

The error message returned because the specified image does not exist in your account.

400

InvalidKeyPairName.NotFound

The specified KeyPairName does not exist in our records.

The error message returned because the specified value for KeyPairName does not exist.

400

InvalidNetworkType.ForRAMRole

RAMRole can't be used For classic instance.

The error message returned because the instance is a classic network-type instance that does not support RamRoleName.

400

InvalidParameter

The specified value of parameter KeyPairName is not valid.

The error message returned because the specified instance OS is Windows that does not support KeyPairName.

400

InvalidParameter.Conflict

The value of parameter SystemDisk.Category and parameter DataDisk.N.Category are conflict.

The error message returned because the specified system disk category conflicts with the data disk category.

400

InvalidRamRole.NotFound

The specified RamRoleName does not exist.

The error message returned because the specified value of RamRoleName does not exist.

400

InvalidScalingConfigurationName.Duplicate

The specified value of parameter ScalingConfigurationName is duplicated.

The error message returned because the specified scaling configuration name already exists.

404

InvalidScalingGroupId.NotFound

The specified scaling group does not exist.

The error message returned because the specified scaling group does not exist in your account.

400

InvalidSecurityGroupId.IncorrectNetworkType

The network type of specified security Group does not support this action.

The error message returned because the network type of the specified security group differs from that of the scaling group.

404

InvalidSecurityGroupId.NotFound

The specified security group does not exist.

The error message returned because the specified security group does not exist in your account.

400

InvalidSecurityGroupId.VPCMismatch

The specified security group and the specified virtual switch are not in the same VPC.

The error message returned because the specified security group and vSwitch are not in the same VPC.

403

InvalidSnapshot.TooOld

This operation is denied because the specified snapshot is created before 2013-07-15.

The error message returned because the snapshot is created on or before July 15, 2013 and the request is rejected.

403

InvalidSystemDiskCategory.ValueUnauthorized

The system disk category is not authorized.

The error message returned because you are not authorized to create an ephemeral system disk.

400

InvalidUserData.Base64FormatInvalid

The specified parameter UserData must be base64 encoded.

The error message returned because the specified user data is not encoded in Base64.

400

InvalidUserData.SizeExceeded

The specified parameter UserData exceeds the size.

The error message returned because the user data size exceeds the upper limit.

403

QuotaExceeded.EphemeralDiskSize

Ephemeral disk size quota exceeded.

The error message returned because the total capacity of mounted ephemeral data disks exceeds 2 TiB (2,048 GiB).

400

QuotaExceeded.ScalingConfiguration

Scaling configuration quota exceeded in the specified scaling group.

The error message returned because the maximum number of scaling configurations is reached.

400

QuotaExceeded.SecurityGroupInstance

Instance quota exceeded in the specified security group.

The error message returned because the maximum number of ECS instances that can be added to the specified security group is reached.