All Products
Search
Document Center

Auto Scaling:CreateScalingConfiguration

Last Updated:Mar 26, 2024

Creates a scaling configuration.

Operation description

Auto Scaling automatically creates Elastic Compute Service (ECS) instances based on the specified scaling configuration. ECS instances can be created in the following modes:

  • InstancePatternInfos: intelligent configuration mode. In this mode, you need to only specify the number of vCPUs, memory size, instance family, and maximum price. Auto Scaling selects the instance type that has the lowest price based on the configurations to create ECS instances. This mode is available only for scaling groups that reside in virtual private clouds (VPCs). This mode reduces scale-out failures caused by insufficient inventory of instance types.
  • InstanceType: In this mode, you must specify one instance type.
  • InstanceTypes: In this mode, you can specify more than one instance type.
  • InstanceTypeOverrides: In this mode, you can specify multiple instance types and weights for the instance types.
  • Cpu and Memory: In this mode, you must specify the number of vCPUs and the memory size. Auto Scaling determines the range of available instance types based on factors such as I/O optimization requirements and zones. Then, Auto Scaling creates ECS instances by using the lowest-priced instance type. This mode is available only if Scaling Policy is set to Cost Optimization Policy and no instance type is specified in the scaling configuration.
Note You cannot specify InstanceType, InstanceTypes, InstanceTypeOverrides, and Cpu and Memory at the same time. You can specify InstanceType and InstancePatternInfos or specify InstanceTypes and InstancePatternInfo at the same time. If you specify InstanceType and InstancePatternInfos or specify InstanceTypes and InstancePatternInfos at the same time, Auto Scaling preferentially uses the instance types that are specified by InstanceType or InstanceTypes for scale-outs. If the instance types that are specified by InstanceType or InstanceTypes do not have sufficient inventory, Auto Scaling uses the instance types that are specified by InstancePatternInfos for scale-outs.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ScalingGroupIdstringYes

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

asg-bp14wlu85wrpchm0****
ImageIdstringNo

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

centos6u5_64_20G_aliaegis****.vhd
ImageNamestringNo

The name of the image. Each image name must be unique in a region. If you specify ImageId, ImageName is ignored.

You cannot use ImageName to specify images that are purchased from Alibaba Cloud Marketplace.

image****
InstanceTypestringNo

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

ecs.g6.large
CpuintegerNo

The number of vCPUs.

You can specify the number of vCPUs and the memory size to determine 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. If you specify Cpu and Memory, Auto Scaling determines the available instance types based on factors such as I/O optimization requirements and zones. Then, Auto Scaling preferentially creates instances by using the lowest-priced instance type.

Note You can specify Cpu and Memory to determine the range of instance types only if you set Scaling Policy to Cost Optimization Policy and you do not specify instance types in the scaling configuration.
2
MemoryintegerNo

The memory size. Unit: GiB.

You can specify the number of vCPUs and the memory size to determine 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. If you specify Cpu and Memory, Auto Scaling determines the available instance types based on factors such as I/O optimization requirements and zones. Then, Auto Scaling preferentially creates instances by using the lowest-priced instance type.

Note You can specify Cpu and Memory to determine the range of instance types only if you set Scaling Policy to Cost Optimization Policy and you do not specify instance types in the scaling configuration.
16
DeploymentSetIdstringNo

The ID of the deployment set of the ECS instances that are created by using the scaling configuration.

ds-bp1frxuzdg87zh4pz****
SecurityGroupIdstringNo

The ID of the security group with which ECS instances are associated. ECS instances that are associated with the same security group can access each other.

sg-280ih****
IoOptimizedstringNo

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

none: does not create an I/O optimized instance. optimized: creates an I/O optimized instance.

For instances of retired instance types, the default value is none. For instances of other instance types, the default value is optimized.

optimized
InternetChargeTypestringNo

The metering method for network usage. Valid values:

  • PayByBandwidth: You are charged for the maximum available bandwidth that is specified by InternetMaxBandwidthOut.
  • PayByTraffic: You are charged based on the amount of transferred data. InternetMaxBandwidthOut specifies only the maximum available bandwidth.

For the classic network, the default value is PayByBandwidth. For VPCs, the default value is PayByTraffic.

PayByTraffic
InternetMaxBandwidthInintegerNo

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.

100
InternetMaxBandwidthOutintegerNo

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

  • Valid values if you set InternetChargeType to PayByBandwidth: 0 to 100. If you leave this parameter empty, this parameter is automatically set to 0.
  • Valid values if you set InternetChargeType to PayByTraffic: 0 to 100. If you leave this parameter empty, an error is returned.
50
SystemDisk.CategorystringNo

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)
  • cloud_auto: ESSD AutoPL disk

If you specify SystemDisk.Category, you cannot specify SystemDiskCategories. If you do not specify SystemDisk.Category or SystemDiskCategories, the default value of SystemDisk.Category is used.

  • For I/O optimized instances, the default value is cloud_efficiency.
  • For non-I/O optimized instances, the default value is cloud.
cloud_ssd
SystemDisk.SizeintegerNo

The size of the system disk. Unit: GiB.

  • If you set SystemDisk.Category cloud: 20 to 500.
  • If you set SystemDisk.Category to cloud_efficiency: 20 to 500.
  • If you set SystemDisk.Category to cloud_ssd: 20 to 500.
  • If you set SystemDisk.Category to cloud_essd: 20 to 500.
  • If you set SystemDisk.Category to cloud_essd: 20 to 500.

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

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

100
SystemDisk.DiskNamestringNo

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

cloud_ssdSystem
SystemDisk.DescriptionstringNo

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

Test system disk.
SystemDisk.AutoSnapshotPolicyIdstringNo

The ID of the automatic snapshot policy that you want to apply to the system disk.

sp-bp12m37ccmxvbmi5****
SystemDisk.PerformanceLevelstringNo

The performance level (PL) of the system disk that is an enhanced SSD (ESSD). Valid values:

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

Default value: PL1.

PL0
ScalingConfigurationNamestringNo

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 (.). The name must start with a letter or a digit.

The name of the scaling configuration must be unique in a region. If you do not specify this parameter, the scaling configuration ID is used.

scalingconfig****
LoadBalancerWeightintegerNo

The weight of an ECS instance as a backend server. Valid values: 1 to 100.

Default value: 50

50
TagsstringNo

The tags of the ECS instance. Tags must be specified as key-value pairs. You can specify up to 20 tags. When you specify tag keys and tag values, take note of the following items:

  • A tag key can be up to 64 characters in length. The key cannot start with acs: or aliyun and cannot 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. The value cannot start with acs: or aliyun and cannot contain http:// or https://. You can specify an empty string as a tag value.
{"key1":"value1","key2":"value2", ... "key5":"value5"}
UserDatastringNo

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

echo hello ecs!
KeyPairNamestringNo

The name of the key pair that you want to use to log on to an ECS instance.

  • Windows instances do not support this parameter.
  • By default, the username and password authentication method is disabled for Linux instances.
KeyPairTest
RamRoleNamestringNo

The name of the RAM role that you attach to the ECS instance. The name is provided and maintained by Resource Access Management (RAM). You can call the ListRoles operation to query the available RAM roles.

ramrole****
SecurityEnhancementStrategystringNo

Specifies whether to enable security hardening. Valid values:

  • Active: enables security hardening. This value is applicable only to public images.
  • Deactive: disables security hardening. This value is applicable to all image types.
Active
InstanceNamestringNo

The name of the ECS instance that Auto Scaling creates based on the scaling configuration.

instance****
HostNamestringNo

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

  • 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. You can use periods (.) to separate a hostname into multiple segments. Each segment can contain letters, digits, and hyphens (-).
host****
SpotStrategystringNo

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

  • NoSpot: The instance is created as a pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is a preemptible instance that has a user-defined maximum hourly price.
  • SpotAsPriceGo: The instance is created as a preemptible instance for which the market price at the time of purchase is automatically used as the bid price.

Default value: NoSpot

NoSpot
PasswordInheritbooleanNo

Specifies whether to use the password that is preconfigured in the image. Before you use this parameter, make sure that a password is configured in the image. Valid values:

  • true
  • false
false
PasswordstringNo

The password that you want to use to log on to an ECS instance. The password must be 8 to 30 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The following special characters are supported:

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

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 you specify Password.
123abc****
ResourceGroupIdstringNo

The ID of the resource group to which the ECS instances that are created by using the scaling configuration belong.

rg-resource****
HpcClusterIdstringNo

The ID of the Elastic High Performance Computing (E-HPC) cluster to which the ECS instances that are created by using the scaling configuration belong.

hpc-clusterid
InstanceDescriptionstringNo

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

Test instance.
ClientTokenstringNo

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

123e4567-e89b-12d3-a456-42665544****
Ipv6AddressCountintegerNo

The number of randomly generated IPv6 addresses that you want to allocate to the elastic network interface (ENI).

1
CreditSpecificationstringNo

The performance mode of the burstable instance. Valid values:

  • Standard: standard mode
  • Unlimited: unlimited mode

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

Standard
ImageFamilystringNo

The name of the image family. If you specify this parameter, the most recent custom images that are available in the specified image family are returned. You can use the images to create instances. If you specify ImageId, you cannot specify ImageFamily.

hangzhou-daily-update
ZoneIdstringNo

The zone ID of the ECS instance.

cn-hangzhou-g
DedicatedHostIdstringNo

The ID of the dedicated host on which you want to create an ECS instance. You cannot create preemptible instances on dedicated hosts. If you specify DedicatedHostId, SpotStrategy and SpotPriceLimit are ignored.

You can call the DescribeDedicatedHosts operation to query dedicated host IDs.

dh-bp67acfmxazb4p****
AffinitystringNo

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

  • default: does not associate the ECS instance with the dedicated host. If you start an ECS instance that was stopped in economical mode and the original dedicated host has insufficient resources, the ECS instance is automatically deployed to another dedicated host in the automatic deployment resource pool.
  • host: associates the ECS instance with the dedicated host. If you start an ECS instance that was stopped in economical mode, the instance remains on the original dedicated host. If the original dedicated host has insufficient resources, the ECS instance fails to start.

Default value: default

default
TenancystringNo

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

  • default: does not create an ECS instance on a dedicated host.
  • host: creates an ECS instance on a dedicated host. If you do not specify DedicatedHostId, Alibaba Cloud selects a dedicated host for the ECS instance.

Default value: default

default
SchedulerOptionsobjectNo

The scheduler options.

["testManagedPrivateSpaceId****"]
PrivatePoolOptions.MatchCriteriastringNo

The type of the private pool that you want to use to start ECS instances. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. You can select a private pool to create ECS instances. Valid values:

  • Open: open private pool. Auto Scaling selects a matching open private pool to start instances. If no matching open private pools are found, Auto Scaling uses the resources in the public pool to start instances. In this case, you do not need to specify PrivatePoolOptions.Id.
  • Target: specified private pool. Auto Scaling uses the resources in the specified private pool to start ECS instances. If the specified private pool is unavailable, Auto Scaling cannot start ECS instances. If you set this parameter to Target, you must specify PrivatePoolOptions.Id.
  • None: no private pool. Auto Scaling does not use the resources in private pools to start ECS instances.
Open
PrivatePoolOptions.IdstringNo

The ID of the private pool. The ID of a private pool is the same as the ID of the elasticity assurance or capacity reservation for which the private pool is generated.

eap-bp67acfmxazb4****
SpotDurationintegerNo

The retention period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6.

  • The following retention periods are available in invitational preview: 2, 3, 4, 5, and 6 hours. If you want to set this parameter to one of these values, submit a ticket.
  • If you set this parameter to 0, no protection period is specified for the preemptible instance.

Default value: 1

1
SpotInterruptionBehaviorstringNo

The interruption mode of the preemptible instance. Set the value to Terminate. The value specifies that the preemptible instance is to be released.

Terminate
InstanceTypesarrayNo

The instance types. If you specify InstanceTypes, InstanceType is ignored.

Auto Scaling creates instances based on the priorities of the instance types. If Auto Scaling cannot create instances by using the instance type that has the highest priority, Auto Scaling creates instances by using the instance type that has the next highest priority.

stringNo

The instance type. If you specify InstanceTypes, InstanceType is ignored.

Auto Scaling creates instances based on the priorities of the instance types. If Auto Scaling cannot create instances by using the instance type that has the highest priority, Auto Scaling creates instances by using the instance type that has the next highest priority.

ecs.g6.large
InstanceTypeOverridesobject []No

The instance types.

InstanceTypestringNo

Instance type N that you want to use to override the instance type that is specified in the launch template.

If you want to trigger scale-outs based on the weighted capacities of instances, specify InstanceType and WeightedCapacity at the same time. You can specify N instance types by using the Extended Configurations feature. Valid values of N: 1 to 10.

Note This parameter takes effect only if you specify LaunchTemplateId.

You can specify an instance type that is available for purchase as the value of InstanceType.

ecs.c5.xlarge
WeightedCapacityintegerNo

The weight of instance type N. If you want to trigger scale-outs based on the weighted capacities of instances, you must specify WeightedCapacity after you specify InstanceType.

The weight of an instance type specifies the capacity of an instance of the instance type in the scaling group. A higher weight specifies that a smaller number of instances of the specified instance type is required to meet the expected capacity requirement.

Performance metrics, such as the number of vCPUs and the memory size of each instance type, may vary. You can specify 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 requirement, Auto Scaling must create and add two ecs.c5.xlarge instances.

Note The capacity of the scaling group cannot exceed the sum of the maximum number of instances that is specified by MaxSize and the maximum weight of the instance types.

Valid values of WeightedCapacity: 1 to 500.

4
DataDisksobject []No

The data disks.

PerformanceLevelstringNo

The PL of the data disk that is an ESSD. Valid values:

  • PL0: An ESSD can provide up to 10,000 random read/write IOPS.
  • PL1: An ESSD can provide up to 50,000 random read/write IOPS.
  • PL2: An ESSD can provide up to 100,000 random read/write IOPS.
  • PL3: An ESSD can provide up to 1,000,000 random read/write IOPS.
Note For more information about how to select ESSD PLs, see ESSD .
PL0
AutoSnapshotPolicyIdstringNo

The ID of the automatic snapshot policy that you want to apply to the data disk.

sp-bp19nq9enxqkomib****
EncryptedstringNo

Specifies whether to encrypt the data disk. Valid values:

  • true
  • false

Default value: false

false
DescriptionstringNo

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

Test data disk.
SnapshotIdstringNo

The ID of the snapshot that you want to use to create data disks. If you specify this parameter, DataDisks.Size is ignored. The size of the data disk is the same as the size of the specified snapshot.

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

s-280s7****
CategoriesarrayNo

The categories of the data disks. If Auto Scaling cannot create instances by using the disk category that has the highest priority, Auto Scaling creates instances by using the disk category that has the next highest priority. Valid values:

  • cloud: basic disk. For a basic disk that is created together with the instance, DeleteWithInstance is set to true.
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: ESSD.
Note If you specify Categories, you cannot specify DataDisks.Category.
stringNo

The category of the data disk. If Auto Scaling cannot create instances by using the disk category that has the highest priority, Auto Scaling creates instances by using the disk category that has the next highest priority. Valid values:

  • cloud: basic disk. For a basic disk that is created together with the instance, DeleteWithInstance is set to true.
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: ESSD.
Note If you specify Categories, you cannot specify DataDisks.Category.
cloud
SizeintegerNo

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

  • If you set Categories to cloud: 5 to 2000.
  • If you set Categories to cloud_efficiency: 20 to 32768.
  • If you set Categories to cloud_essd: 20 to 32768.
  • If you set Categories to ephemeral_ssd: 5 to 800.

The size of the data disk must be greater than or equal to the size of the snapshot that is specified by SnapshotId.

100
DevicestringNo

The mount target of the data disk. If you do not specify Device, a mount target is automatically assigned when Auto Scaling creates ECS instances. The names of mount targets range from /dev/xvdb to /dev/xvdz.

/dev/xvdb
DiskNamestringNo

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://.

cloud_ssdData
CategorystringNo

The category of the data disk. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
  • ephemeral_ssd: local SSD
  • cloud_auto: ESSD AutoPL disk

If you specify this parameter, you cannot specify Categories. If you do not specify Category or Categories, the default value of Category is used.

  • For I/O optimized instances, the default value is cloud_efficiency.
  • For non-I/O optimized instances, the default value is cloud.
cloud_ssd
DeleteWithInstancebooleanNo

Specifies whether to release the data disk when the instance to which the data disk is attached is released. Valid values:

  • true
  • false

This parameter is available only for independent disks whose value of Category is set to cloud, cloud_efficiency, cloud_ssd, or cloud_essd. If you specify this parameter for other disks, an error is reported.

Default value: true

true
KMSKeyIdstringNo

The ID of the KMS key that you want to use to encrypt the data disk.

0e478b7a-4262-4802-b8cb-00d3fb40****
ProvisionedIopslongNo

The IOPS metric that is preconfigured for the data disk.

Note IOPS measures the number of read and write operations that an EBS device can process per second.
100
BurstingEnabledbooleanNo

Specifies whether to enable the burst feature for the system disk. Valid values:

  • true
  • false
Note This parameter is available only if you set SystemDisk.Category to cloud_auto.
false
SpotPriceLimitsobject []No

The billing information of the preemptible instances.

PriceLimitfloatNo

The price limit of the preemptible instance. This parameter takes effect only if you set SpotStrategy to SpotWithPriceLimit.

0.5
InstanceTypestringNo

The instance type of the preemptible instance. This parameter takes effect only if you set SpotStrategy to SpotWithPriceLimit.

ecs.g6.large
SecurityGroupIdsarrayNo

The IDs of the security groups with which you want to associate the ECS instances that are created by using the scaling configuration. For more information, see the "Security group limits" section of the " Limits " topic.

Note If you specify SecurityGroupId, you cannot specify SecurityGroupIds.
stringNo

The ID of the security group with which you want to associate the ECS instance that is created by using the scaling configuration. For more information, see the "Security group limits" section of the " Limits " topic.

Note If you specify SecurityGroupId, you cannot specify SecurityGroupIds.
sg-bp18kz60mefs****
InstancePatternInfosobject []No

Details of the intelligent configuration settings that determine the range of instance types that meet the specified criteria.

CoresintegerNo

The number of vCPUs that you want to allocate to an instance type in intelligent configuration mode. This parameter is used to filter the available instance types that meet the specified criteria. For more information, see the "Instance families" topic.

Take note of the following items when you specify Cores:

  • InstancePatternInfos is available only for scaling groups that reside in VPCs.
  • If you specify InstancePatternInfos, you must specify Cores and Memory.
  • If you specify an instance type by using InstanceType or InstanceTypes, Auto Scaling preferentially uses the instance type that is specified by InstanceType or InstanceTypes for scale-outs. If the specified instance type does not have sufficient inventory, Auto Scaling creates instances by using the lowest-priced instance type that is specified by InstancePatternInfos.
2
InstanceFamilyLevelstringNo

The level of the instance type, which is used to filter instance types that meet the specified criteria. This parameter takes effect only if you set CostOptimization to true. Valid values:

  • EntryLevel: entry level (shared instance type). Instance types of this level are the most cost-effective but may not provide stable computing performance in a consistent manner. Instance types of this level are suitable for business scenarios in which the CPU utilization is low. For more information, see the "Shared instance families" topic.
  • EnterpriseLevel: enterprise level. Instance types of this level provide stable performance and dedicated resources and are suitable for business scenarios that require high stability. For more information, see the "Instance families" topic.
  • CreditEntryLevel: credit entry level. This value is valid only for burstable instances. CPU credits are used to ensure computing performance. Instance types of this level are suitable for business scenarios in which the CPU utilization is low but may fluctuate in specific cases. For more information, see the " Overview " topic of burstable instances.
EnterpriseLevel
MaxPricefloatNo

The maximum hourly price of a pay-as-you-go or preemptible instance in intelligent configuration mode. This parameter is used to filter the available instance types that meet the specified criteria.

Note If you set SpotStrategy to SpotWithPriceLimit, you must specify MaxPrice. In other cases, MaxPrice is optional.
2
MemoryfloatNo

The memory size that you want to allocate to an instance type in intelligent configuration mode. Unit: GiB. This parameter is used to filter the available instance types that meet the specified criteria.

4
ExcludedInstanceTypesarrayNo

The instance types that you want to exclude. You can use wildcard characters, such as asterisks (*), to exclude an instance type or an instance family. Examples:

  • ecs.c6.large: excludes the ecs.c6.large instance type.
  • ecs.c6.*: excludes the c6 instance family.
stringNo

The instance type that you want to exclude. You can use wildcard characters, such as asterisks (*), to exclude an instance type or an instance family. Examples:

  • ecs.c6.large: excludes the ecs.c6.large instance type.
  • ecs.c6.*: excludes the c6 instance family.
ecs.n1.small/ecs.n1.*/*7*
ArchitecturesarrayNo

The architectures of the instance types. Valid values:

  • X86: x86 architecture.
  • Heterogeneous: heterogeneous architecture, such as GPUs and FPGAs.
  • BareMetal: ECS Bare Metal Instance architecture.
  • Arm: ARM architecture.
  • SuperComputeCluster: Super Computing Cluster architecture.

By default, all values are included.

stringNo

The architecture of the instance type. Valid values:

  • X86: x86 architecture.
  • Heterogeneous: heterogeneous architecture, such as GPUs and FPGAs.
  • BareMetal: ECS Bare Metal Instance architecture.
  • Arm: ARM architecture.
  • SuperComputeCluster: Super Computing Cluster architecture.

By default, all values are included.

X86
BurstablePerformancestringNo

Specifies whether to include burstable instance types. Valid values:

  • Exclude: does not include burstable instance types.
  • Include: includes burstable instance types.
  • Required: includes only burstable instance types.

Default value: Include

Include
SystemDiskCategoriesarrayNo

The categories of the system disks. If Auto Scaling cannot create instances by using the disk category that has the highest priority, Auto Scaling creates instances by using the disk category that has the next highest priority. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
Note If you specify SystemDiskCategories, you cannot specify SystemDisk.Category.
stringNo

The category of the system disk. If Auto Scaling cannot create instances by using the disk category that has the highest priority, Auto Scaling creates instances by using the disk category that has the next highest priority. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
Note If you specify SystemDiskCategories, you cannot specify SystemDisk.Category.
cloud
SystemDisk.EncryptedbooleanNo

Specifies whether to encrypt the system disk. Valid values:

  • true
  • false

Default value: false

false
SystemDisk.KMSKeyIdstringNo

The ID of the KMS key that you want to use to encrypt the system disk.

0e478b7a-4262-4802-b8cb-00d3fb40****
SystemDisk.EncryptAlgorithmstringNo

The encryption algorithm that you want to use to encrypt the system disk. Valid values:

  • AES-256
  • SM4-128

Default value: AES-256

AES-256
SystemDisk.ProvisionedIopslongNo

The IOPS metric that is preconfigured for the system disk.

Note IOPS measures the number of read and write operations that an EBS device can process per second.
100
SystemDisk.BurstingEnabledbooleanNo

Specifies whether to enable the burst feature for the system disk. Valid values:

  • true
  • false
Note This parameter is available only if you set SystemDisk.Category to cloud_auto.
false
ImageOptions.LoginAsNonRootbooleanNo

For more information about whether an ECS instance uses the ecs-user user user to log on to an ECS instance, see Manage the login name of an ECS instance. Value range:

  • true: Yes.
  • false: No.

Default value: false.

false
CustomPrioritiesobject []No

The priority of the custom ECS instance type + vSwitch combination.

Note This parameter takes effect only when Scaling Policy of the scaling group is set to Priority Policy.

If Auto Scaling cannot create ECS instances by using the custom ECS instance type + vSwitch combination of the highest priority, Auto Scaling creates ECS instances by using the custom ECS instance type + vSwitch combination of the next highest priority.

Note If you specify the priorities of only partial custom ECS instance type + vSwitch combinations, Auto Scaling preferentially creates ECS instances by using the custom combinations that have specified priorities. If the custom combinations that have specified priorities do not provide sufficient resources, Auto Scaling creates ECS instances by using the custom combinations that do not have specified priorities based on the specified orders of vSwitches and instance types.
  • Example: the specified order of vSwitches for your scaling group is vsw1 and vsw2 and the specified order of instance types in your scaling configuration is type1 and type 2. In addition, you use CustomPriorities to specify ["vsw2+type2", "vsw1+type2"]. In this example, the vsw2+type2 combination has the highest priority and the vsw2+type1 combination has the lowest priority. The vsw1+type2 combination has a higher priority than the vsw1+type1 combination.
InstanceTypestringNo

The ECS instance type.

Note The ECS instance type must be included in the instance types specified in the scaling configuration.
ecs.g6.large
VswitchIdstringNo

The vSwitch ID.

Note The vSwitch must be included in the vSwitch list of the scaling group.
vsw-bp14zolna43z266bq****

Response parameters

ParameterTypeDescriptionExample
object

The information that is returned.

ScalingConfigurationIdstring

The ID of the scaling configuration.

asc-bp1ffogfdauy0nu5****
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-03-20The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: NetworkInterfaces
2024-01-29The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: CustomPriorities
2023-11-24The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: StorageSetId
    Added Input Parameters: StorageSetPartitionNumber
2023-08-23The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: DeletionProtection
2023-04-12The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ImageOptions.LoginAsNonRoot