CreateScalingConfiguration

Updated at:

Creates an ECS-type scaling configuration for a scaling group by calling the CreateScalingConfiguration operation with the scaling group ID, instance type, instance image, and other information specified.

Operation description

Operation description

A scaling configuration specifies the ECS instance template used for elastic scale-out. The following instance configuration methods are supported:

  • InstancePatternInfo.N: intelligent configuration mode. You do not need to specify specific instance types. You only need to specify the number of vCPU cores, memory size, instance family level, and maximum price based on your business requirements. The system automatically filters instance types that meet the requirements and preferentially selects the instance type with the lowest price to create ECS instances. This mode applies only to scaling groups whose network type is Virtual Private Cloud (VPC) and can effectively reduce the risk of insufficient inventory for instance types during scale-out.

  • InstanceType: specifies a single instance type.

  • InstanceTypes.N: specifies multiple instance types.

  • InstanceTypeOverride.N: specifies multiple instance types and configures weights for different instance types.

  • Cpu and Memory: specifies the CPU and memory to define the range of instance types. Auto Scaling determines the set of available instance types based on factors such as I/O optimization and zones, and creates instances with the lowest price sorted by price. This method applies only when the scaling policy of the scaling group is cost optimization and no instance type is specified in the scaling configuration.

  • You can use either of the following methods to bind a primary elastic network interface (ENI). However, you can use only one method in each API call. Using both methods at the same time causes the API call to fail and an error message is returned.

    • Use parameters such as SecurityGroupId, SecurityGroupIds.N, and Ipv6AddressCount to directly configure the primary ENI.

    • Use NetworkInterfaces.N to configure both the primary and secondary ENIs. When you use this parameter, you must configure the primary ENI. When NetworkInterfaces.N.InstanceType is set to Primary, the primary ENI is configured. When NetworkInterfaces.N.InstanceType is set to Secondary or left empty, a secondary ENI is configured.

Note

The four methods InstanceType, InstanceTypes.N, InstanceTypeOverride.N, and Cpu and Memory cannot be specified at the same time. However, InstanceType or InstanceTypes.N can be specified together with InstancePatternInfo.N. When specified together with InstancePatternInfo.N, Auto Scaling preferentially uses the instance types that you specified for scale-out. When the specified instance types are out of stock, Auto Scaling uses instance types that match the InstancePatternInfo.N configuration.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ess:CreateScalingConfiguration

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ScalingGroupId

string

Yes

The ID of the scaling group to which the scaling configuration belongs.

asg-bp14wlu85wrpchm0****

ImageId

string

No

The ID of the image file used to automatic creation of instances.

Note

This parameter has the same effect as the ImageName parameter. You can set only one of them. If you set the ImageName parameter, the ImageId parameter is ignored (optional).

centos6u5_64_20G_aliaegis****.vhd

ImageName

string

No

The name of the image file. Image names are unique within a region. You cannot use this parameter to specify images from Alibaba Cloud Marketplace.

Note

This parameter has the same effect as the ImageId parameter. You can set only one of them. If you set the ImageId parameter, the ImageName parameter is ignored (optional).

image****

InstanceType

string

No

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

Note

The four methods InstanceType, InstanceTypes, InstanceTypeOverrides, and Cpu and Memory cannot be specified at the same time. However, InstanceType can be specified together with InstancePatternInfo. When specified together, Auto Scaling preferentially uses the instance types that you specified for scale-out. When the specified instance types are out of stock, Auto Scaling uses instance types that match the InstancePatternInfo configuration.

ecs.g6.large

Cpu

integer

No

The number of vCPUs. Unit: cores.

Specifying both CPU and Memory defines the range of instance types. For example, CPU=2 and Memory=16 defines all instance types with 2 vCPUs and 16 GiB of memory. Auto Scaling determines the set of available instance types based on factors such as I/O optimization and zones, and creates instances with the lowest price sorted by price.

Note

This range configuration takes effect only in cost optimization mode when no instance type is specified in the scaling configuration.

2

Memory

integer

No

The memory size. Unit: GiB.

Specifying both CPU and Memory defines the range of instance types. For example, CPU=2 and Memory=16 defines all instance types with 2 vCPUs and 16 GiB of memory. Auto Scaling determines the set of available instance types based on factors such as I/O optimization and zones, and creates instances with the lowest price sorted by price.

Note

This range configuration takes effect only in cost optimization mode when no instance type is specified in the scaling configuration.

16

DeploymentSetId

string

No

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

ds-bp1frxuzdg87zh4pz****

SecurityGroupId

string

No

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

sg-280ih****

IoOptimized

string

No

Specifies whether the instance is I/O optimized. Valid values:

  • none: non-I/O optimized instance.

  • optimized: I/O optimized instance.

The default value for retired instance types is none. The default value for other instance types is optimized.

optimized

InternetChargeType

string

No

The billing method for network usage. Valid values:

  • PayByBandwidth: pay-by-bandwidth. The value of InternetMaxBandwidthOut is the fixed bandwidth value.

  • PayByTraffic: pay-by-traffic. The value of InternetMaxBandwidthOut is only a bandwidth upper limit. Billing is based on the actual network traffic.

If this parameter is not specified, the default value is PayByBandwidth for the classic network and PayByTraffic for VPC.

PayByTraffic

InternetMaxBandwidthIn

integer

No

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

  • If the purchased outbound public bandwidth is less than or equal to 10 Mbit/s: 1 to 10. Default value: 10.

  • If the purchased outbound public bandwidth is greater than 10 Mbit/s: 1 to the value of InternetMaxBandwidthOut. Default value: the value of InternetMaxBandwidthOut.

10

InternetMaxBandwidthOut

integer

No

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

Default value: 0.

10

SystemDisk.Category

string

No

The category of the system cloud disk. Valid values:

  • cloud: basic cloud disk.

  • cloud_efficiency: ultra cloud disk.

  • cloud_ssd: standard SSD.

  • ephemeral_ssd: local SSD.

  • cloud_essd: ESSD.

  • cloud_auto: ESSD AutoPL cloud disk.

This parameter cannot be specified together with SystemDiskCategories.N. If neither this parameter nor SystemDiskCategories.N is specified, this parameter has a default value. If the InstanceType is a Series I instance type and the instance is a non-I/O optimized instance, the default value is cloud. Otherwise, the default value is cloud_efficiency.

cloud_ssd

SystemDisk.Size

integer

No

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

  • Basic cloud disk: 20 to 500.

  • ESSD:
    • PL0: 1 to 2048.

    • PL1: 20 to 2048.

    • PL2: 461 to 2048.

    • PL3: 1261 to 2048.

  • ESSD AutoPL cloud disk: 1 to 2048.

  • Other cloud disk types: 20 to 2048.

The value of this parameter must be greater than or equal to max{1, ImageSize}.

Default value: max{40, ImageSize}.

100

SystemDisk.DiskName

string

No

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

cloud_ssdSystem

SystemDisk.Description

string

No

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

Test system disk.

SystemDisk.AutoSnapshotPolicyId

string

No

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

sp-bp12m37ccmxvbmi5****

SystemDisk.PerformanceLevel

string

No

The performance level (PL) of the system cloud disk when the cloud disk is an ESSD. Valid values:

  • PL0: a single cloud disk can deliver up to 10,000 random read/write IOPS.

  • PL1: a single cloud disk can deliver up to 50,000 random read/write IOPS.

  • PL2: a single cloud disk can deliver up to 100,000 random read/write IOPS.

  • PL3: a single cloud disk can deliver up to 1,000,000 random read/write IOPS.

Default value: PL1.

Note

For more information about how to select an ESSD performance level, see ESSDs.

PL1

ScalingConfigurationName

string

No

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

The scaling configuration name must be unique within a scaling group in the same region. If you do not specify this parameter, the scaling configuration ID is used by default.

scalingconfig****

LoadBalancerWeight

integer

No

The weight of the ECS instance as a backend server of the associated load balancing instance. Valid values: 1 to 100.

Default value: 50.

50

Tags

string

No

The tags of the ECS instance. Tags are specified as key-value pairs. You can specify up to 20 tags. The following limits apply to the Key and Value parameters:

  • Key can be up to 64 characters in length and cannot start with aliyun or acs:, and cannot contain http:// or https://. Key cannot be an empty string when a tag is used.

  • Value can be up to 128 characters in length and cannot start with aliyun or acs:, and cannot contain http:// or https://. Value can be an empty string.

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

UserData

string

No

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

ZWNobyBoZWxsbyBlY3Mh

KeyPairName

string

No

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

  • For Windows instances, this parameter is ignored and is empty by default.

  • For Linux instances, password-based logon is disabled during initialization.

KeyPairTest

RamRoleName

string

No

The name of the RAM role associated with the ECS instance. The RAM role name is provided and maintained by RAM. You can call ListRoles to query available RAM roles. For more information about how to create a RAM role, see CreateRole.

ramrole****

SecurityEnhancementStrategy

string

No

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

InstanceName

string

No

The name of the ECS instance that is automatic creation by using this scaling configuration.

instance****

HostName

string

No

The hostname of the ECS instance. A period (.) or a hyphen (-) cannot be used as the first or last character, and consecutive periods (.) or hyphens (-) are not allowed. The naming conventions for different types of instances are as follows:

  • Windows instances: The hostname must be 2 to 15 characters in length and can contain letters, digits, and hyphens (-). It cannot contain periods (.) or consist entirely of digits.

  • Other instances (such as Linux): The hostname must be 2 to 64 characters in length and can contain multiple periods (.). Each segment separated by a period (.) can contain letters, digits, and hyphens (-).

host****

SpotStrategy

string

No

The preemption policy for pay-as-you-go instances. Valid values:

  • NoSpot: a regular pay-as-you-go instance.

  • SpotWithPriceLimit: a spot instance with a user-defined maximum hourly price.

  • SpotAsPriceGo: a spot instance priced at the market price at the time of purchase.

Default value: NoSpot.

NoSpot

PasswordInherit

boolean

No

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

  • true: uses the password preset in the image.

  • false: does not use the password preset in the image.

false

Password

string

No

The password of the 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:

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

For Windows instances, the password cannot start with a forward slash (/).

Note

If you specify the Password parameter, use HTTPS to send the request to avoid password leaks.

123abc****

ResourceGroupId

string

No

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

rg-resource****

HpcClusterId

string

No

The ID of the HPC cluster to which the ECS instance belongs.

hpc-clusterid

InstanceDescription

string

No

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

Test instance.

ClientToken

string

No

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 How to ensure idempotence.

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

Ipv6AddressCount

integer

No

The number of randomly generated IPv6 addresses allocated to the elastic network interfaces (ENIs).

1

CreditSpecification

string

No

The running mode of the burstable instance. Valid values:

  • Standard: standard mode.

  • Unlimited: unlimited mode.

For more information, see the performance mode section in Overview of burstable instances.

Standard

ImageFamily

string

No

The name of the image family. You can set this parameter to obtain the latest available image from the specified image family for instance creation. If the ImageId parameter is already set, you cannot set this parameter.

hangzhou-daily-update

ZoneId

string

No

The zone ID of the ECS instance.

cn-hangzhou-g

DedicatedHostId

string

No

Specifies whether to create the ECS instance on a dedicated host. Because dedicated hosts do not support the creation of spot instances, the SpotStrategy and SpotPriceLimit settings in the request are automatically ignored when the DedicatedHostId parameter is specified.

You can call DescribeDedicatedHosts to query the list of dedicated host IDs.

dh-bp67acfmxazb4p****

Affinity

string

No

Specifies whether the instance on a dedicated host is associated with the dedicated host. Valid values:

  • default: the instance is not associated with the dedicated host. When an instance that has the economical mode enabled is restarted, the instance may be placed on another dedicated host in the automatic deployment resource pool if the original dedicated host has insufficient available resources.

  • host: the instance is associated with the dedicated host. When an instance that has the economical mode enabled is restarted, the instance remains on the original dedicated host. If the original dedicated host has insufficient available resources, the instance fails to restart.

Default value: default.

default

Tenancy

string

No

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

  • default: creates a non-dedicated host instance.

  • host: creates a dedicated host instance. If you do not specify DedicatedHostId, Alibaba Cloud automatically selects a dedicated host for the instance.

Default value: default.

default

SchedulerOptions

object

No

The scheduler options.

["testManagedPrivateSpaceId****"]

PrivatePoolOptions.MatchCriteria

string

No

The private pool option for instance startup. A private pool is generated after an elasticity assurance or capacity reservation takes effect. You can select a private pool when you start an instance. Valid values:

  • Open: open mode. The system automatically matches an open private pool. If no matching private pool is available, the instance is started by using public pool resources. You do not need to set the PrivatePoolOptions.Id parameter in this mode.

  • Target: specified mode. The instance is started by using the capacity of the specified private pool. If the specified private pool is unavailable, the instance fails to start. In this mode, you must specify the private pool ID. The PrivatePoolOptions.Id parameter is required.

  • None: none mode. The instance does not use private pool capacity for startup.

Open

PrivatePoolOptions.Id

string

No

The private pool ID, which is the ID of the elasticity assurance or capacity reservation.

eap-bp67acfmxazb4****

SpotDuration

integer

No

The protection period of the spot instance. Unit: hours. Valid values:

  • 1: After a spot instance is created, Alibaba Cloud ensures that the instance is not automatically released within 1 hour. After 1 hour, the system automatically compares the bid price with the marketplace price and checks the resource inventory to determine whether to retain or revoke the instance.

  • 0: After a spot instance is created, Alibaba Cloud does not ensure that the instance runs for 1 hour. The system automatically compares the bid price with the marketplace price and checks the resource inventory to determine whether to retain or revoke the instance.

Note

Alibaba Cloud sends an ECS system event notification 5 minutes before the instance is revoked. Spot instances are billed by second. Set an appropriate protection period based on the expected task execution duration.

Default value: 1.

1

SpotInterruptionBehavior

string

No

The interruption mode of the spot instance. Currently, only Terminate (default) is supported, which directly releases the instance.

Terminate

InstanceTypes

array

No

The instance types.

ecs.g6.large

string

No

The instance types. Valid values of N: 1 to 20. You can specify up to 20 instance types in a scaling configuration.

N represents the priority of the instance type in the current scaling configuration. Instance type 1 has the highest priority. The priority decreases as the number increases. When an instance cannot be created by using the instance type with a higher priority, Auto Scaling automatically selects the instance type with the next priority to create the instance.

Note

The four methods InstanceType, InstanceTypes, InstanceTypeOverrides, and Cpu and Memory cannot be specified at the same time. However, InstanceTypes can be specified together with InstancePatternInfo. When specified together, Auto Scaling preferentially uses the instance types that you specified for scale-out. When the specified instance types are out of stock, Auto Scaling uses instance types that match the InstancePatternInfo configuration.

ecs.g6.large

InstanceTypeOverride

array<object>

No

The instance type information.

object

No

The instance type information.

InstanceType

string

No

To specify the capacity of an instance type in the scaling configuration, specify both this parameter and InstanceTypeOverride.N.WeightedCapacity.

This parameter specifies the instance type. You can specify N values for this parameter. Combined with the InstanceTypeOverride.N.WeightedCapacity parameter, this extends multi-instance-type support with custom weights. Valid values of N: 1 to 20.

Note

You cannot specify this parameter together with InstanceTypes.N or InstanceType.

Valid values of InstanceType: ECS instance types that are available for purchase. For more information, see Instance families.

ecs.c5.xlarge

WeightedCapacity

integer

No

To specify the capacity of an instance type in the scaling configuration, first specify InstanceTypeOverride.N.InstanceType, and then specify this parameter. The two parameters correspond one-to-one, and N must be consistent.

This parameter specifies the weight of the instance type, which represents the capacity of a single instance of this type in the scaling group. A larger weight means fewer instances of this type are needed to meet the expected capacity.

Because performance metrics such as the number of vCPUs and memory size vary across instance types, you can configure different weights for different instance types based on your requirements.

Example:

  • Current capacity: 0.

  • Expected number of instances: 6.

  • Capacity of ecs.c5.xlarge: 4.

To meet the expected capacity, the scaling group scales out two ecs.c5.xlarge instances.

Note

During scale-out, the capacity of the scaling group cannot exceed the sum of the maximum capacity (MaxSize) and the maximum weight of the instance types.

Valid values of WeightedCapacity: 1 to 500.

4

DataDisk

array<object>

No

The data cloud disk information.

object

No

The data cloud disk information.

PerformanceLevel

string

No

The performance level (PL) of the data cloud disk when the cloud disk is an ESSD. The value of N must be consistent with the N in DataDisk.N.Category=cloud_essd. Valid values:

  • PL0: a single cloud disk can deliver up to 10,000 random read/write IOPS.

  • PL1: a single cloud disk can deliver up to 50,000 random read/write IOPS.

  • PL2: a single cloud disk can deliver up to 100,000 random read/write IOPS.

  • PL3: a single cloud disk can deliver up to 1,000,000 random read/write IOPS.

Default value: PL1.

Note

For more information about how to select an ESSD performance level, see ESSDs.

PL1

AutoSnapshotPolicyId

string

No

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

sp-bp19nq9enxqkomib****

Encrypted

string

No

Specifies whether data cloud disk N is encrypted. Valid values of N: 1 to 16. Valid values:

  • true: encrypted.

  • false: not encrypted.

Default value: false.

false

Description

string

No

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

Test data disk.

SnapshotId

string

No

The ID of the snapshot used to create the data cloud disk. Valid values of N: 1 to 16. After this parameter is specified, DataDisk.N.Size is ignored, and the size of the created cloud disk is the size of the specified snapshot.

If the snapshot was created on or before July 15, 2013, the call is rejected and the InvalidSnapshot.TooOld error is returned.

s-280s7****

Categories

array

No

The multiple disk types of data cloud disk N. The first N indicates the Nth data cloud disk. Valid values: 1 to 16. The second N indicates the Nth disk type for the data cloud disk. Valid values: 1 to 4. You can specify up to 4 disk types for a data cloud disk in a scaling configuration. A smaller N value indicates a higher priority. When a disk type with a higher priority cannot be used, Auto Scaling automatically attempts the next-priority disk type to create the data cloud disk. Valid values:

  • cloud: basic cloud disk. The DeleteWithInstance property of a basic cloud disk created along with the instance is set to true.

  • cloud_efficiency: ultra cloud disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

  • ephemeral_ssd: local SSD.

  • cloud_auto: ESSD AutoPL cloud disk.

  • cloud_regional_disk_auto: regional ESSD.

Note

You cannot specify this parameter together with DataDisk.N.Category.

cloud

string

No

The multiple disk types of data cloud disk N. The first N indicates the Nth data cloud disk. Valid values: 1 to 16. The second N indicates the Nth disk type for the data cloud disk. Valid values: 1 to 4. You can specify up to 4 disk types for a data cloud disk in a scaling configuration. A smaller N value indicates a higher priority. When a disk type with a higher priority cannot be used, Auto Scaling automatically attempts the next-priority disk type to create the data cloud disk. Valid values:

  • cloud: basic cloud disk. The DeleteWithInstance property of a basic cloud disk created along with the instance is set to true.

  • cloud_efficiency: ultra cloud disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

  • ephemeral_ssd: local SSD.

  • cloud_auto: ESSD AutoPL cloud disk.

  • cloud_regional_disk_auto: regional ESSD.

Note

You cannot specify this parameter together with DataDisk.N.Category.

cloud

Size

integer

No

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

  • cloud: 5 to 2000.

  • cloud_efficiency: 20 to 32768.

  • cloud_ssd: 20 to 32768.

  • cloud_essd: 20 to 32768.

  • ephemeral_ssd: 5 to 800.

After this parameter is specified, the cloud disk size must be greater than or equal to the snapshot size (the snapshot is specified by SnapshotId).

100

Device

string

No

The mount point of the data cloud disk. Valid values of N: 1 to 16. If you do not specify this parameter, the mount point is automatically allocated by the system by default when the ECS instance is automatic creation, starting from /dev/xvdb to /dev/xvdz.

/dev/xvdb

DiskName

string

No

The name of the data cloud disk. 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 (-). It must start with a letter or a Chinese character and cannot start with http:// or https://.

cloud_ssdData

Category

string

No

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

  • cloud: basic cloud disk. The DeleteWithInstance property of a basic cloud disk created along with the instance is set to true.

  • cloud_efficiency: ultra cloud disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

  • ephemeral_ssd: local SSD.

  • cloud_auto: ESSD AutoPL cloud disk.

  • cloud_regional_disk_auto: regional ESSD.

This parameter cannot be specified together with DataDisk.N.Categories.N. If neither this parameter nor DataDisk.N.Categories.N is specified, the default value is:

  • cloud_efficiency for I/O optimized instances.

  • cloud for non-I/O optimized instances.

cloud_ssd

DeleteWithInstance

boolean

No

Specifies whether the data cloud disk is released when the instance is released. Valid values of N: 1 to 16. Valid values:

  • true: the cloud disk is released when the instance is released.

  • false: the cloud disk is retained when the instance is released.

This parameter can be set only for independent cloud disks (DataDisk.N.Category is cloud, cloud_efficiency, cloud_ssd, cloud_essd, or cloud_auto). Otherwise, an error is returned.

Default value: true.

true

KMSKeyId

string

No

The ID of the KMS key for the data cloud disk. Valid values of N: 1 to 16.

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

ProvisionedIops

integer

No

The provisioned IOPS (Input/Output Operations Per Second) performance metrics of the data cloud disk.

Note

IOPS (Input/Output Operations Per Second) measures the number of read/write (output/input) operations that block storage can process per second.

100

BurstingEnabled

boolean

No

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

  • true: enabled.

  • false: disabled.

Note

This parameter is supported only when DataDisk.Category is set to cloud_auto.

For more information, see ESSD AutoPL cloud disks.

false

SpotPriceLimit

array<object>

No

The spot instance information.

object

No

The spot instance information.

PriceLimit

number

No

The bid price for the spot instance. Valid values of N: 1 to 20. This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit.

0.5

InstanceType

string

No

The instance type of the spot instance. Valid values of N: 1 to 20. This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit.

ecs.g6.large

SecurityGroupIds

array

No

The IDs of the security groups to which the ECS instance is added. The valid values of N depend on the maximum number of security groups to which an instance can belong. For more information, see the security group section in Limits.

Note

You cannot specify both SecurityGroupId and SecurityGroupIds.N.

sg-bp18kz60mefs****

string

No

The IDs of the security groups to which the ECS instance is added. The valid values of N depend on the maximum number of security groups to which an instance can belong. For more information, see the security group section in Limits.

Note

You cannot specify both SecurityGroupId and SecurityGroupIds.N.

sg-bp18kz60mefs****

InstancePatternInfo

array<object>

No

The instance type information in intelligent mode.

object

No

The instance type information in intelligent mode.

Cores

integer

No

The number of vCPU cores of the instance type in intelligent configuration mode, used to filter instance types that meet the requirements. For more information, see Instance families. Valid values of N: 1 to 10.

Note the following:

  • The InstancePatternInfo.N parameter applies only to scaling groups whose network type is VPC.

  • You must specify both InstancePatternInfo.N.Cores and InstancePatternInfo.N.Memory for the InstancePatternInfo.N parameter.

  • If you have specified instance types by using the InstanceType or InstanceTypes.N parameter, Auto Scaling preferentially uses the specified instance types for scale-out. When the specified instance types are out of stock, Auto Scaling preferentially uses the instance type with the lowest price from the instance types that match the InstancePatternInfo.N parameter values.

2

InstanceFamilyLevel

string

No

The instance family level in intelligent configuration mode, used to filter instance types that meet the requirements. Valid values:

  • EntryLevel: entry level, which refers to shared instance types. Lower cost but no guarantee of stable instance computing performance. Suitable for scenarios with low average CPU utilization. For more information, see Shared instance families.

  • EnterpriseLevel: enterprise level. Stable performance with dedicated resources. Suitable for scenarios that require high stability. For more information, see Instance families.

  • CreditEntryLevel: credit-based entry level, which refers to burstable instances. Uses CPU credits to ensure computing performance. Suitable for scenarios with low average CPU utilization and occasional CPU usage spikes. For more information, see Burstable instances.

Valid values of N: 1 to 10.

EnterpriseLevel

MaxPrice

number

No

The maximum hourly price for pay-as-you-go or spot instances in intelligent configuration mode, used to filter instance types that meet the requirements. Valid values of N: 1 to 10.

Note

This parameter is required when SpotStrategy is set to SpotWithPriceLimit. In other cases, this parameter is optional.

2

Memory

number

No

The memory size of the instance type in intelligent configuration mode. Unit: GiB. This parameter is used to filter instance types that meet the requirements. For more information, see Instance families. Valid values of N: 1 to 10.

4

ExcludedInstanceType

array

No

The instance types to exclude. You can use wildcard characters (*) to exclude a single instance type or an entire instance family. Examples:

  • ecs.c6.large: excludes the ecs.c6.large instance type.

  • ecs.c6.*: excludes the entire c6 instance family.

string

No

The instance types to exclude. You can use wildcard characters (*) to exclude a single instance type or an entire instance family. Examples:

  • ecs.c6.large: excludes the ecs.c6.large instance type.

  • ecs.c6.*: excludes the entire c6 instance family.

ecs.n1.small/ecs.n1.*/*7*

Architecture

array

No

The architecture type of the instance type. Valid values:

  • X86: X86 computing.

  • Heterogeneous: heterogeneous computing, such as GPU or FPGA.

  • BareMetal: Elastic Compute Service Bare Metal Instance server.

  • Arm: Arm computing.

Default value: all architecture types.

string

No

The architecture type of the instance type. Valid values:

  • X86: X86 computing.

  • Heterogeneous: heterogeneous computing, such as GPU or FPGA.

  • BareMetal: Elastic Compute Service Bare Metal Instance server.

  • Arm: Arm computing.

Default value: all architecture types.

X86

BurstablePerformance

string

No

Specifies whether to include burstable instance types. Valid values:

  • Exclude: excludes burstable instance types.

  • Include: includes burstable instance types.

  • Required: includes only burstable instance types.

Default value: Include. [_single

Include

InstanceTypeFamilies

array

No

The instance type families to query. N specifies that you can set multiple instance type families. Valid values of N: 1 to 10.

string

No

The instance type family. N specifies that you can set multiple instance type families. Valid values of N: 1 to 10.

ecs.g6

MinimumCpuCoreCount

integer

No

The minimum number of vCPU cores of the instance type.

2

MaximumCpuCoreCount

integer

No

The maximum number of vCPU cores of the instance type.

Note

The value of MaximumCpuCoreCount cannot exceed four times the value of MinimumCpuCoreCount.

4

GpuSpecs

array

No

The GPU type.

string

No

The GPU type.

NVIDIA V100

InstanceCategories

array

No

The instance categorization. Valid values:

Note

N specifies that you can settings multiple instance categorization values. Valid values of N: 1 to 10.

  • General-purpose: general-purpose.

  • Compute-optimized: compute-optimized.

  • Memory-optimized: memory-optimized.

  • Big data: big data.

  • Local SSDs: local SSD.

  • High Clock Speed: high frequency.

  • Enhanced: enhanced.

  • Shared: shared.

  • Compute-optimized with GPU: GPU-accelerated instances (GPU computing).

  • Visual Compute-optimized: visual compute-optimized.

  • Heterogeneous Service: heterogeneous service.

  • Compute-optimized with FPGA: FPGA-accelerated compute-optimized.

  • Compute-optimized with NPU: NPU-accelerated compute-optimized.

  • ECS Bare Metal: Elastic Compute Service Bare Metal Instance server.

  • High Performance Compute: high-performance computing (HPC).

string

No

The instance categorization. Valid values:

Note

N specifies that you can settings multiple instance categorization values. Valid values of N: 1 to 10.

  • General-purpose: general-purpose.

  • Compute-optimized: compute-optimized.

  • Memory-optimized: memory-optimized.

  • Big data: big data.

  • Local SSDs: local SSD.

  • High Clock Speed: high frequency.

  • Enhanced: enhanced.

  • Shared: shared.

  • Compute-optimized with GPU: GPU-accelerated instances (GPU computing).

  • Visual Compute-optimized: visual compute-optimized.

  • Heterogeneous Service: heterogeneous service.

  • Compute-optimized with FPGA: FPGA-accelerated compute-optimized.

  • Compute-optimized with NPU: NPU-accelerated compute-optimized.

  • ECS Bare Metal: Elastic Compute Service Bare Metal Instance server.

  • High Performance Compute: high-performance computing (HPC).

Compute-optimized with GPU

CpuArchitectures

array

No

The CPU architectures of the instance. Valid values:

Note

N specifies that you can set multiple CPU architectures. Valid values of N: 1 to 2.

  • X86.

  • ARM.

string

No

The CPU architectures of the instance. Valid values:

Note

N specifies that you can set multiple CPU architectures. Valid values of N: 1 to 2.

  • X86.

  • ARM.

X86

PhysicalProcessorModels

array

No

The processor models of the instance. N specifies that you can set multiple processor models. Valid values of N: 1 to 10.

string

No

The processor models of the instance. N specifies that you can set multiple processor models. Valid values of N: 1 to 10.

Intel Xeon(Ice Lake) Platinum 8369B", "Intel Xeon(Skylake) Platinum 8163", … "Intel Xeon(Cascade Lake) Platinum 8269CY

MinimumEniQuantity

integer

No

The minimum number of elastic network interfaces (ENIs) that the instance supports.

2

MinimumEniPrivateIpAddressQuantity

integer

No

The minimum number of IPv4 addresses per elastic network interface (ENI) on a single network interface controller (NIC) of the instance.

2

MinimumEniIpv6AddressQuantity

integer

No

The minimum number of IPv6 addresses per elastic network interface (ENI) on a single network interface controller (NIC) of the instance.

1

MinimumInitialCredit

integer

No

The minimum initial vCPU credits for burstable instances t5 and t6.

12

MinimumBaselineCredit

integer

No

The minimum baseline vCPU computing performance (sum of all vCPUs) for burstable instances t5 and t6.

12

MinimumMemorySize

number

No

The minimum memory size of the instance. Unit: GiB.

4

MaximumMemorySize

number

No

The maximum memory size of the instance. Unit: GiB.

4

MinimumGpuAmount

integer

No

The minimum number of GPUs of the instance. Valid values: positive integers.

2

MaximumGpuAmount

integer

No

The maximum number of GPUs of the instance. Valid values: positive integers.

2

SystemDiskCategories

array

No

The disk types for the system cloud disk. Valid values of N: 1 to 4. You can specify up to four disk types for the system cloud disk in a scaling configuration. A smaller value of N indicates a higher priority. When a disk type with a higher priority is unavailable, Auto Scaling automatically attempts the next-priority disk type to create the system cloud disk. Valid values:

  • cloud: basic cloud disk.

  • cloud_efficiency: ultra cloud disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

Note

If you specify this parameter, do not specify SystemDisk.Category at the same time.

cloud

string

No

The disk types for the system cloud disk. Valid values of N: 1 to 4. You can specify up to four disk types for the system cloud disk in a scaling configuration. A smaller value of N indicates a higher priority. When a disk type with a higher priority is unavailable, Auto Scaling automatically attempts the next-priority disk type to create the system cloud disk. Valid values:

  • cloud: basic cloud disk.

  • cloud_efficiency: ultra cloud disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

Note

If you specify this parameter, do not specify SystemDisk.Category at the same time.

cloud

SystemDisk.Encrypted

boolean

No

Specifies whether to encrypt the system cloud disk. Valid values:

  • true: encrypts the system cloud disk.

  • false: does not encrypt the system cloud disk.

Default value: false.

false

SystemDisk.KMSKeyId

string

No

The ID of the KMS key used for the system cloud disk.

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

SystemDisk.EncryptAlgorithm

string

No

The encryption algorithm used for the system cloud disk. Valid values:

  • AES-256.

  • SM4-128.

Default value: AES-256.

AES-256

SystemDisk.ProvisionedIops

integer

No

The provisioned IOPS (Input/Output Operations Per Second) performance metrics for the system cloud disk.

Note

IOPS (Input/Output Operations Per Second) measures the number of read and write (output/input) operations that a block storage device can process per second.

100

SystemDisk.BurstingEnabled

boolean

No

Specifies whether to enable the Burst (performance burst) feature for the system cloud disk. Valid values:

  • true: enables the feature.

  • false: does not enable the feature.

Note

This parameter is supported only when SystemDisk.Category is set to cloud_auto.

For more information, see ESSD AutoPL cloud disks.

false

ImageOptions.LoginAsNonRoot

boolean

No

Specifies whether the ECS instance uses the ecs-user user for logon. For more information, see Manage the logon name of an ECS instance. Valid values:

  • true: yes.

  • false: no.

Default value: false.

false

DeletionProtection

boolean

No

The release protection property of the ECS instance. This property applies only to pay-as-you-go instances and specifies whether the instance can be directly released from the ECS console or by calling the DeleteInstance operation. Valid values:

  • true: enables release protection, which prevents the instance from being directly released from the ECS console or by calling the API operation. This prevents instances scaled out by Auto Scaling from being accidentally deleted.

  • false: disables release protection, which allows the instance to be directly released from the ECS console or by calling the API operation.

Default value: false.

Note

This property does not affect normal scale-in activities of Auto Scaling. Pay-as-you-go instances with release protection enabled can still be released during scale-in activities.

false

StorageSetId

string

No

The ID of the dedicated block storage cluster.

ss-bp67acfmxazb4p****

StorageSetPartitionNumber

integer

No

The maximum number of partitions in the dedicated block storage cluster. The value must be an integer greater than or equal to 2.

2

CustomPriorities

array<object>

No

The custom priorities for ECS instance type + vSwitch combinations.

Note

This parameter takes effect only when the scaling policy of the scaling group is set to Priority.

When an ECS instance cannot be created based on a higher-priority ECS instance type + vSwitch combination, Auto Scaling automatically selects the next-priority ECS instance type + vSwitch combination to create the instance.

Note

If you specify custom priorities for only some ECS instance type + vSwitch combinations, the unspecified combinations have lower priorities than the specified ones. The unspecified combinations are still prioritized based on the vSwitch order of the scaling group and the instance type order of the scaling configuration. For example, if the vSwitch order of the scaling group is vsw1 and vsw2, and the instance type order of the scaling configuration is type1 and type2, and the custom priority order is ["vsw2+type2", "vsw1+type2"], the final priority is vsw2+type2 > vsw1+type2 > vsw1+type1 > vsw2+type1.

object

No

The custom priorities for ECS instance type + vSwitch combinations.

Important This parameter takes effect only when the scaling policy of the scaling group is set to Priority.

InstanceType

string

No

The CustomPriorities field specifies the custom priorities for ECS instance type + vSwitch combinations. The CustomPriorities.N.InstanceType parameter specifies the instance type in the custom priority.

Note

This parameter takes effect only when the scaling policy of the scaling group is set to Priority. The instance type (InstanceType) must be included in the instance type list of the scaling configuration.

When an ECS instance cannot be created based on a higher-priority ECS instance type + vSwitch combination, Auto Scaling automatically selects the next-priority ECS instance type + vSwitch combination to create the instance.

Note

If you specify custom priorities for only some ECS instance type + vSwitch combinations, the unspecified combinations have lower priorities than the specified ones. The unspecified combinations are still prioritized based on the vSwitch order of the scaling group and the instance type order of the scaling configuration. For example, if the vSwitch order of the scaling group is vsw1 and vsw2, and the instance type order of the scaling configuration is type1 and type2, and the custom priority order is ["vsw2+type2", "vsw1+type2"], the final priority is vsw2+type2 > vsw1+type2 > vsw1+type1 > vsw2+type1.

ecs.g6.large

VswitchId

string

No

The CustomPriorities.N.VswitchId parameter specifies the ID of the vSwitch in the custom priority.

Note

This parameter takes effect only when the scaling policy of the scaling group is set to Priority. The vSwitch must be included in the vSwitch list of the scaling group.

vsw-bp14zolna43z266bq****

NetworkInterfaces

array<object>

No

The list of elastic network interfaces (ENIs).

object

No

The list of elastic network interfaces (ENIs).

InstanceType

string

No

The type of the elastic network interface (ENI). When you use NetworkInterfaces.N, you must settings the primary elastic network interface (ENI), but you cannot set the SecurityGroupId or SecurityGroupIds.N parameter at the same time. Valid values:

  • Primary: primary network interface controller (NIC).

  • Secondary: secondary NIC.

Default value: Secondary.

Primary

NetworkInterfaceTrafficMode

string

No

The communication mode of the network interface controller (NIC). Valid values:

  • Standard: uses the TCP communication mode.

  • HighPerformance: enables the Elastic RDMA Interface (ERI) and uses the RDMA communication mode.

Default value: Standard.

Note

The number of elastic network interfaces (ENIs) in RDMA mode cannot exceed the limit of the instance family. For more information, see Instance families.

HighPerformance

Ipv6AddressCount

integer

No

The number of randomly generated IPv6 addresses for the primary ENI. Note the following items:

  • This parameter takes effect only when NetworkInterfaces.N.InstanceType is set to Primary.

  • If NetworkInterface.N.InstanceType is set to Secondary or left empty, this parameter cannot be set.

  • After you set this parameter, you cannot set the Ipv6AddressCount parameter.

1

SecurityGroupIds

array

No

The IDs of one or more security groups to which the elastic network interface (ENI) belongs.

string

No

The IDs of one or more security groups to which the elastic network interface (ENI) belongs. Note the following items:

  • If NetworkInterfaces.N.InstanceType is settings to Primary, this parameter is required. This parameter has the same effect as SecurityGroupIds.N, but you cannot set SecurityGroupId or SecurityGroupIds.N at the same time.

  • If NetworkInterfaces.N.InstanceType is set to Secondary or left empty, this parameter is optional. The default value is the security group of the ECS instance (the security group of the primary elastic network interface (ENI)).

sg-uf6ij8dwxh****

SecondaryPrivateIpAddressCount

integer

No

The number of secondary private IPv4 addresses to assign to the ENI. Valid values: 1 to 49.

  • The value cannot exceed the limit on the number of IP addresses for the instance type. For more information, see Instance families.

  • NetworkInterface.N.SecondaryPrivateIpAddressCount specifies the number of secondary private IPv4 addresses to assign to the ENI (excluding the primary private IP address of the ENI). The system randomly assigns IP addresses from the available CIDR block of the vSwitch (NetworkInterface.N.VSwitchId) to which the ENI belongs.

2

VSwitchIds

array

No

The IDs of the vSwitches to which the elastic network interface (ENI) belongs. N specifies that you can settings multiple vSwitches. Valid values of N: 1 to 10.

Note the following items:

  • If InstanceType is set to Primary, this parameter cannot be set. The default value is the vSwitch of the instance.

  • If InstanceType is set to Secondary or left empty, this parameter is optional.

  • The system selects a vSwitch that is in the same zone as the primary elastic network interface (ENI) and has the most available IP addresses.

string

No

The IDs of the vSwitches to which the elastic network interface (ENI) belongs. N specifies that you can settings multiple vSwitches. Valid values of N: 1 to 10.

Note the following items:

  • If InstanceType is set to Primary, this parameter cannot be set. The default value is the vSwitch of the instance.

  • If InstanceType is set to Secondary or left empty, this parameter is optional.

  • The system selects a vSwitch that is in the same zone as the primary elastic network interface (ENI) and has the most available IP addresses.

vsw-bp67acfmxazb4p****

DedicatedHostClusterId

string

No

The ID of the dedicated host cluster.

dc-2zedxc67zqzt7lb4****

SecurityOptions

object

No

The security options.

ConfidentialComputingMode

string

No

The confidential computing mode. Valid values:

TDX

HttpEndpoint

string

No

Specifies whether to enable the access channel for instance metadata. Valid values:

  • enabled: enables the access channel.

  • disabled: disables the access channel.

Default value: enabled.

Note

For more information about instance metadata, see Overview of instance metadata.

enabled

HttpTokens

string

No

Specifies whether to forcefully use the security-hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: does not forcefully use the mode.

  • required: forcefully uses the mode. After this value is set, instance metadata cannot be accessed in normal mode.

Default value: optional.

Note

For more information about instance metadata access modes, see Instance metadata access modes.

optional

ResourcePoolOptions

object

No

The resource pool policy used when creating instances. After you set this parameter, note the following items:

  • This parameter takes effect only when pay-as-you-go instances are created.

  • This parameter cannot be set together with PrivatePoolOptions.MatchCriteria or PrivatePoolOptions.Id.

Strategy

string

No

Resource pools include private pools generated after elasticity assurance or capacity reservation takes effect, and public pools, which are available for instance startup. Valid values:

  • PrivatePoolFirst: private pool first. When this strategy is selected and ResourcePoolOptions.PrivatePoolIds is specified or PrivatePoolTags conditions are met, the corresponding private pools are used first. If no private pool is specified or the specified private pool has insufficient capacity, open-type private pools are automatically matched. If no matching private pool is available, the public pool is used to create instances.

  • PrivatePoolOnly: private pool only. When this strategy is selected, you must specify ResourcePoolOptions.PrivatePoolIds. If the specified private pool has insufficient capacity, instance creation fails.

  • PublicPoolFirst: public pool first. The public pool is used first to create instances. When public pool resources are insufficient, private pool resources are used as a supplement. Open-type private pools are automatically matched first. If no matching private pool is available, the Target-type private pools specified in ResourcePoolOptions.PrivatePoolIds or matching PrivatePoolTags conditions are used.

    Note

    This strategy is in invitational preview and is not available for use.

  • None: does not use a resource pool policy.

Default value: None.

PrivatePoolFirst

PrivatePoolIds

array

No

The IDs of private pools, which are elasticity assurance IDs or capacity reservation IDs. Only Target-type private pool IDs can be specified. This parameter cannot be specified together with the PrivatePoolTags parameter.

string

No

The ID of a private pool, which is an elasticity assurance ID or capacity reservation ID. Only Target-type private pool IDs can be specified. This parameter cannot be specified together with the PrivatePoolTags parameter. Valid values of N: 1 to 20.

eap-bp67acfmxazb4****

PrivatePoolTags

array<object>

No

Filters available Target private pools by tags. Valid values of N: 1 to 20. Note:

  • When this parameter is configured, the system filters only the Target private pools under the account that match the tags and satisfy the scaling group constraints (such as zone and instance type).

  • Tag matching rule: private pools must match all specified tags.

  • This parameter cannot be specified together with the PrivatePoolIds parameter.

object

No

Filters available Target private pools by tags. Valid values of N: 1 to 20. Note:

  • When this parameter is configured, the system filters only the Target private pools under the account that match the tags and satisfy the scaling group constraints (such as zone and instance type).

  • Tag matching rule: private pools must match all specified tags.

  • This parameter cannot be specified together with the PrivatePoolIds parameter.

Key

string

No

The tag key of the private pool.

Filters available Target private pools by tags. Valid values of N: 1 to 20. Note:

When this parameter is configured, the system filters only the Target private pools under the account that match the tags and satisfy the scaling group constraints (such as zone and instance type). Tag matching rule: private pools must match all specified tags. This parameter cannot be specified together with the PrivatePoolIds parameter.

TestKey

Value

string

No

The tag value of the private pool.

TestValue

SecondaryEniVSwitchConstraint

string

No

Specifies whether a vSwitch from the VSwitchIds list must be selected for the secondary elastic network interface (ENI) when the VSwitchIds parameter is settings for the secondary network interface controller (NIC).

  • Strict: strict mode. If no vSwitch in VSwitchIds meets the conditional requirements, instance creation fails.

  • Tolerant: tolerant mode. If no vSwitch in VSwitchIds meets the conditional requirements, no secondary elastic network interface (ENI) is set, and the instance is still created as active.

Default value: Strict.

Strict

Response elements

Element

Type

Description

Example

object

ScalingConfigurationId

string

The ID of the scaling configuration.

asc-bp1ffogfdauy0nu5****

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.