All Products
Search
Document Center

Auto Scaling:CreateScalingConfiguration

最終更新日:Dec 11, 2024

Creates scaling configurations. When you call the CreateScalingConfiguration operation, you can specify the scaling group ID, instance type, and image to create a scaling configuration of the Elastic Compute Service (ECS) type.

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ess:CreateScalingConfigurationcreate
*All Resources
*
    none
none

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 Elastic Compute Service (ECS) instance. The user data must be encoded in Base64 format. The size of raw data before Base64 encoding cannot exceed 32 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
InstanceTypeOverridesarray<object>No

The instance types.

objectNo

The instance type.

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
DataDisksarray<object>No

The data disks.

objectNo

The data disk.

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
SpotPriceLimitsarray<object>No

The billing information of the preemptible instances.

objectNo

The billing information of the preemptible instance.

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****
InstancePatternInfosarray<object>No

The information about the intelligent configuration settings, which determine the available instance types.

objectNo

The information about the intelligent configuration setting, which determines the available instance types.

CoresintegerNo

The number of vCPUs per instance type in intelligent configuration mode. You can use this parameter to match the available instance types. For more information, see Overview of instance families.

Take note of the following items:

  • InstancePatternInfos applies only to the scaling groups that reside in virtual private clouds (VPCs).
  • If you specify InstancePatternInfos, you must also specify InstancePatternInfos.Cores and InstancePatternInfos.Memory.
  • If you specify InstanceType or InstanceTypes, Auto Scaling preferentially uses the instance type specified by InstanceType or InstanceTypes to create instances during scale-out events. If the specified instance type has insufficient inventory, Auto Scaling uses the lowest-priced instance type specified by InstancePatternInfos to create instances during scale-out events.
2
InstanceFamilyLevelstringNo

The level of the instance family. You can use this parameter to match the available instance types. 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. Instance types of this level are suitable for scenarios in which the CPU utilization is low. For more information, see Shared instance families.
  • 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 Overview of instance families.
  • CreditEntryLevel: credit-based entry level (burstable instance types). CPU credits are used to ensure computing performance. Instance types of this level are suitable for scenarios in which the CPU utilization is low but may fluctuate in specific cases. For more information, see Overview of burstable instances.
EnterpriseLevel
MaxPricefloatNo

The maximum hourly price of pay-as-you-go or preemptible instances in intelligent configuration mode. You can specify this parameter to filter the available instance types.

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

The memory size per instance type in intelligent configuration mode. Unit: GiB. You can use this parameter to match the available instance types.

4
ExcludedInstanceTypesarrayNo

The instance types that you want to exclude. You can use wildcard characters, such as an asterisk (*), 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 an asterisk (*), 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 architecture types of instance types. Valid values:

  • X86: x86.
  • Heterogeneous: heterogeneous computing, such as GPU-accelerated or FPGA-accelerated.
  • BareMetal: ECS Bare Metal Instance.
  • Arm: Arm.
  • SuperComputeCluster: Super Computing Cluster.

By default, all values are included.

stringNo

The architecture type of the instance type. Valid values:

  • X86: x86.
  • Heterogeneous: heterogeneous computing, such as GPU-accelerated or FPGA-accelerated.
  • BareMetal: ECS Bare Metal Instance.
  • Arm: Arm.
  • SuperComputeCluster: Super Computing Cluster.

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
InstanceTypeFamiliesarrayNo

The instance families that you want to specify. You can specify up to 10 instance families in each call.

stringNo

The instance family that you want to specify. You can specify up to 10 instance families in each call.

ecs.g6
MinimumCpuCoreCountintegerNo

The minimum number of vCPUs per instance type.

2
MaximumCpuCoreCountintegerNo

The maximum number of vCPUs per instance type.

Note The value of MaximumCpuCoreCount cannot exceed four times the value of MinimumCpuCoreCount.
4
GpuSpecsarrayNo

The GPU models.

stringNo

The GPU model.

NVIDIA V100
InstanceCategoriesarrayNo

The categories of instance types. Valid values:

Note You can specify up to 10 categories.
  • General-purpose
  • Compute-optimized
  • Memory-optimized
  • Big data
  • Local SSDs
  • High Clock Speed
  • Enhanced
  • Shared
  • Compute-optimized with GPU
  • Visual Compute-optimized
  • Heterogeneous Service
  • Compute-optimized with FPGA
  • Compute-optimized with NPU
  • ECS Bare Metal
  • Super Computing Cluster
  • High Performance Compute
stringNo

The category of the instance type. Valid values:

Note You can specify up to 10 categories.
  • General-purpose
  • Compute-optimized
  • Memory-optimized
  • Big data
  • Local SSDs
  • High Clock Speed
  • Enhanced
  • Shared
  • Compute-optimized with GPU
  • Visual Compute-optimized
  • Heterogeneous Service
  • Compute-optimized with FPGA
  • Compute-optimized with NPU
  • ECS Bare Metal
  • Super Computing Cluster
  • High Performance Compute
Compute-optimized with GPU
CpuArchitecturesarrayNo

The CPU architectures of instance types. Valid values:

Note You can specify 1 to 2 CPU architectures.
  • x86
  • Arm
stringNo

The CPU architecture of the instance type. Valid values:

Note You can specify 1 to 2 CPU architectures.
  • x86
  • Arm
X86
PhysicalProcessorModelsarrayNo

The processor models of instance types. You can specify up to 10 processor models.

stringNo

The processor model of the instance type. You can specify up to 10 processor models.

Intel Xeon(Ice Lake) Platinum 8369B
MinimumEniQuantityintegerNo

The minimum number of elastic network interfaces (ENIs) per instance.

2
MinimumEniPrivateIpAddressQuantityintegerNo

The minimum number of IPv4 addresses per ENI.

2
MinimumEniIpv6AddressQuantityintegerNo

The minimum number of IPv6 addresses per ENI.

1
MinimumInitialCreditintegerNo

The initial vCPU credits per t5 or t6 burstable instance.

12
MinimumBaselineCreditintegerNo

The baseline vCPU computing performance (overall baseline performance of all vCPUs) per t5 or t6 burstable instance.

12
MinimumMemorySizefloatNo

The minimum memory size per instance. Unit: GiB.

4
MaximumMemorySizefloatNo

The maximum memory size per instance. Unit: GiB.

4
MinimumGpuAmountintegerNo

The minimum number of GPUs per instance. The value must be a positive integer.

2
MaximumGpuAmountintegerNo

The maximum number of GPUs per instance. The value must be a positive integer.

2
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
CustomPrioritiesarray<object>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.
objectNo
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****
DedicatedHostClusterIdstringNo

The ID of the dedicated host cluster.

dc-2zedxc67zqzt7lb4****
SecurityOptionsobjectNo
ConfidentialComputingModestringNo

The confidential computing mode. Valid values:

TDX

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-11-08The request parameters of the API has changedView Change Details
2024-10-10The request parameters of the API has changedView Change Details
2024-06-12The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-04-23The request parameters of the API has changedView Change Details
2024-03-20The request parameters of the API has changedView Change Details
2024-01-29The request parameters of the API has changedView Change Details
2023-11-24The request parameters of the API has changedView Change Details
2023-08-23The request parameters of the API has changedView Change Details
2023-04-12The request parameters of the API has changedView Change Details