CreateScalingConfiguration

Updated at:

Creates an ECS scaling configuration for a scaling group.

Operation description

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

  • InstancePatternInfos: the intelligent configuration mode. You do not need to specify exact network types. You only need to specify the number of vCPUs, memory size, instance family level, and maximum price based on your business requirements. The system automatically filters network types that meet the requirements and preferentially selects the network type with the lowest price to create ECS instances. This mode applies only to scaling groups in a VPC and effectively reduces the chance of insufficient network type inventory during scale-out.

  • InstanceType: specifies a single instance type.

  • InstanceTypes: specifies multiple instance types.

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

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

  • You can use one of the following methods to bind the primary ENI. Note that you can use only one method to configure the primary ENI in a single call. Using both methods at the same time causes the call to fail and returns an error message.

    • Directly set the configuration information of the primary ENI by using parameters such as SecurityGroupId, SecurityGroupIds, and Ipv6AddressCount.

    • Set the configuration information of the primary ENI and secondary ENIs by using NetworkInterfaces. When you use the NetworkInterface parameter, you must set the primary ENI information. If NetworkInterface.InstanceType is set to Primary, it indicates the primary ENI. If NetworkInterface.InstanceType is set to Secondary or left empty, it indicates a secondary ENI.

Note

You cannot specify InstanceType, InstanceTypes, InstanceTypeOverrides, and Cpu and Memory at the same time. However, you can specify InstanceType or InstanceTypes together with InstancePatternInfos. When InstanceType or InstanceTypes is specified together with InstancePatternInfos, Auto Scaling preferentially uses the specified instance types for scale-out. If the specified instance types are out of stock, Auto Scaling uses the instance types that match the InstancePatternInfos 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. The image resource used during automatic creation of instances.

centos6u5_64_20G_aliaegis****.vhd

ImageName

string

No

The name of the image file. The image name must be unique within a region. If ImageId is specified, ImageName is ignored.

You cannot use ImageName to specify an Alibaba Cloud Marketplace image.

image****

InstanceType

string

No

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

ecs.g6.large

Cpu

integer

No

The number of vCPUs. Unit: cores.

You can specify both Cpu and Memory to define the range of instance types. For example, if you set Cpu to 2 and Memory to 16, all instance types with 2 vCPUs and 16 GiB of memory are matched. Auto Scaling determines the available instance types based on factors such as I/O optimization and zone, and creates instances with the lowest price.

Note

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

2

Memory

integer

No

The memory size. Unit: GiB.

You can specify both Cpu and Memory to define the range of instance types. For example, if you set Cpu to 2 and Memory to 16, all instance types with 2 vCPUs and 16 GiB of memory are matched. Auto Scaling determines the available instance types based on factors such as I/O optimization and zone, and creates instances with the lowest price.

Note

This configuration takes effect only when the scaling mode is set to cost optimization and 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 an I/O optimization instance. Valid values:

  • none: The instance is not an I/O optimization instance.

  • optimized: The instance is an I/O optimization instance.

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

optimized

InternetChargeType

string

No

The network billing method. Valid values:

  • PayByBandwidth: pay-by-bandwidth. In this case, InternetMaxBandwidthOut specifies the fixed bandwidth value.

  • PayByTraffic: pay-by-traffic. In this case, InternetMaxBandwidthOut specifies only the maximum bandwidth, and you are billed based on the actual network traffic.

If this parameter is not specified, the default value is PayByBandwidth for the classic network and PayByTraffic for a 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 cloud disk.

  • ephemeral_ssd: local SSD.

  • cloud_essd: ESSD.

  • cloud_auto: ESSD AutoPL.

You cannot specify this parameter together with SystemDiskCategories. If neither this parameter nor SystemDiskCategories is specified, the default value is used:

  • For I/O optimized instances, the default value is cloud_efficiency.

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

This parameter specifies only one system cloud disk type. If you want the system to automatically try other types when the preferred disk type is unavailable, use SystemDiskCategories and configure multiple disk types in order of priority.

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: 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 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 settings of the performance level for the system cloud disk when it is an ESSD. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.

  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.

  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.

  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.

Default value: PL1.

PL0

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 letter, digit, or Chinese character.

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

scalingconfig****

LoadBalancerWeight

integer

No

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

Default value: 50.

50

Tags

string

No

The tags of the ECS instance. Tags are passed in as key-value pairs. You can add up to 20 tags. The requirements for keys and values are as follows:

  • A key can be up to 64 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://. A key cannot be an empty string.

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

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

UserData

string

No

The user data of the ECS instance. It 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 left empty by default.

  • For Linux instances, password-based logon is disabled by default.

KeyPairTest

RamRoleName

string

No

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

ramrole****

SecurityEnhancementStrategy

string

No

Specifies whether to enable security hardening. Valid values:

  • Active: enables security hardening. This value applies only to public images.

  • Deactive: disables security hardening. This value applies to all image types.

Active

InstanceName

string

No

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

instance****

HostName

string

No

The hostname of the ECS instance. The hostname cannot start or end with a period (.) or a hyphen (-) and cannot contain consecutive periods (.) or hyphens (-). The naming requirements for different instance types 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 contain only digits.

  • Other instance types such as Linux instances: The hostname must be 2 to 64 characters in length and can contain multiple periods (.). The string between two periods is a segment, which can contain letters, digits, and hyphens (-).

host****

SpotStrategy

string

No

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

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

  • SpotWithPriceLimit: spot instance with a maximum hourly price.

  • SpotAsPriceGo: spot instance whose price is automatically set based on the current market price.

Default value: NoSpot.

NoSpot

PasswordInherit

boolean

No

Specifies whether to use the preset password of the image. When you use this parameter, make sure that a password is preset in the image. Valid values:

  • true: uses the preset password of the image.

  • false: does not use the preset password of 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. Special characters include:

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

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

Note

If you specify the Password parameter, send requests over HTTPS to prevent 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 value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see Ensure idempotence.

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

Ipv6AddressCount

integer

No

The number of IPv6 addresses that are randomly generated for the network interface controller (NIC).

1

CreditSpecification

string

No

Specifies the running pattern of the burstable instance. Valid values:

  • Standard: standard pattern.

  • Unlimited: unlimited pattern.

For more information, see the performance schema 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 in the image family to create instances. If ImageId is specified, you cannot specify 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 spot instances, the SpotStrategy and SpotPriceLimit parameters are automatically ignored if DedicatedHostId is specified.

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

dh-bp67acfmxazb4p****

Affinity

string

No

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

  • default: The instance is not associated with the dedicated host. If an instance with the economical mode enabled is stopped and then started, and the resources of the original dedicated host are insufficient, the instance is automatically deployed to another dedicated host in the automatic deployment resource pool.

  • host: The instance is associated with the dedicated host. If an instance with the economical mode enabled is stopped and then started, it remains on the original dedicated host. If the resources of the original dedicated host are insufficient, the instance fails to start.

Default value: default.

default

Tenancy

string

No

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

  • default: creates the instance on a non-dedicated host.

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

Default value: default.

default

SchedulerOptions

object

No

The scheduling options.

["testManagedPrivateSpaceId****"]

PrivatePoolOptions.MatchCriteria

string

No

The private pool options for instance startup. After an elasticity assurance or a capacity reservation takes effect, a private pool is generated for you to select when you start instances. Valid values:

  • Open: open mode. The system automatically matches an open private pool. If no matching private pool is available, the system uses resources from the public pool. In this mode, you do not need to specify the PrivatePoolOptions.Id parameter.

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

  • None: no private pool. The system does not use private pools to start the instance.

Open

PrivatePoolOptions.Id

string

No

The ID of the private pool. It 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: Alibaba Cloud guarantees that the instance runs for 1 hour after it is created and is not automatically released. After 1 hour, the system automatically compares your bid with the market price and checks resource inventory to determine whether to retain automatic release the instance.

  • 0: Alibaba Cloud does not guarantee that the instance runs for 1 hour after it is created. The system automatically compares your bid with the market price and checks resource inventory to determine whether to retain automatic release the instance.

Note

Alibaba Cloud sends you a notification by using ECS system events 5 minutes before the instance is released. Spot instances are billed by the second. Select an appropriate protection period based on the execution duration of your tasks.

Default value: 1.

1

SpotInterruptionBehavior

string

No

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

Terminate

InstanceTypes

array

No

The multiple instance types. If InstanceTypes is specified, InstanceType is ignored.

If an instance cannot be created based on the instance type with a higher priority, Auto Scaling automatically selects the instance type with the next highest priority to create the instance.

string

No

The multiple instance types. If InstanceTypes is specified, InstanceType is ignored.

If an instance cannot be created based on the instance type with a higher priority, Auto Scaling automatically selects the instance type with the next highest priority to create the instance.

ecs.g6.large

InstanceTypeOverrides

array<object>

No

The information used to specify instance types.

object

No

The information used to specify instance types.

InstanceType

string

No

When you need the scaling group to scale based on the capacity of the instance type, specify both this parameter and WeightedCapacity.

This parameter specifies the instance type and overrides the instance type in the launch template. You can specify N instance types to extend the launch template to support N instance types. Valid values of N: 1 to 20.

Note

This parameter takes effect only when LaunchTemplateId is specified.

Valid values of InstanceType: available ECS instance types.

ecs.c5.xlarge

WeightedCapacity

integer

No

When you need to specify the capacity of the instance type in the scaling configuration, specify this parameter after you specify InstanceTypeOverrides.InstanceType.

This parameter specifies the weight of the instance type, which indicates the capacity that a single instance of the instance type provides in the scaling group. A greater weight indicates that fewer instances of this instance type are required to meet the expected capacity.

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

Example:

  • Current capacity: 0.

  • Expected capacity: 6.

  • Capacity of the ecs.c5.xlarge instance type: 4.

To meet the expected capacity, the scaling group scales out by adding 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 type.

Valid values of WeightedCapacity: 1 to 500.

4

DataDisks

array<object>

No

The collection of data cloud disk information.

object

No

The collection of data cloud disk information.

PerformanceLevel

string

No

The settings of the performance level for the data cloud disk when it is an ESSD. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.

  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.

  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.

  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.

Note

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

PL0

AutoSnapshotPolicyId

string

No

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

sp-bp19nq9enxqkomib****

Encrypted

string

No

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

  • true: encrypts the data cloud disk.

  • false: does not encrypt the data cloud disk.

Default value: false.

false

Description

string

No

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

Test data disk.

SnapshotId

string

No

The snapshot used to create the data cloud disk. If this parameter is specified, DataDisks.Size is ignored, and the actual size of the created 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 code is returned.

s-280s7****

Categories

array

No

The multiple disk types of the data cloud disk. If the disk type with a higher priority is unavailable, Auto Scaling automatically tries the disk type with the next highest priority to create the data cloud disk. Valid values:

  • cloud: basic cloud disk. The DeleteWithInstance property of a basic cloud disk created together 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_regional_disk_auto: regional ESSD.

Note

If you specify this parameter, you cannot specify DataDisks.Category at the same time.

string

No

The multiple disk types of the data cloud disk. If the disk type with a higher priority is unavailable, Auto Scaling automatically tries the disk type with the next highest priority to create the data cloud disk. Valid values:

  • cloud: basic cloud disk. The DeleteWithInstance property of a basic cloud disk created together 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_regional_disk_auto: regional ESSD.

Note

If you specify this parameter, you cannot specify DataDisks.Category at the same time.

cloud

Size

integer

No

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

  • cloud: 5 to 2000.

  • cloud_efficiency: 20 to 32768.

  • cloud_essd: 20 to 32768.

  • ephemeral_ssd: 5 to 800.

If you specify this parameter, the disk size must be greater than or equal to the snapshot size specified by SnapshotId.

100

Device

string

No

The mount point of the data cloud disk. If you do not specify this parameter, the system automatically allocates a mount point by default during automatic creation of the ECS instance. The mount point starts from /dev/xvdb and ends at /dev/xvdz.

/dev/xvdb

DiskName

string

No

The name of the data 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 and cannot start with http:// or https://.

cloud_ssdData

Category

string

No

The category of the data cloud disk. Valid values:

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

  • cloud_efficiency: ultra cloud disk.

  • cloud_ssd: standard SSD cloud disk.

  • cloud_essd: ESSD.

  • ephemeral_ssd: local SSD.

  • cloud_auto: ESSD AutoPL.

  • cloud_regional_disk_auto: regional ESSD.

You cannot specify this parameter together with DataDisk.Categories. If neither this parameter nor DataDisk.Categories is specified, the default value 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

DeleteWithInstance

boolean

No

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

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

  • false: retains the data cloud disk when the instance is released.

You can set this parameter only for independent cloud disks (when DataDisks.Category is set to cloud, cloud_efficiency, cloud_ssd, or cloud_essd). Otherwise, an error is returned.

Default value: true.

true

KMSKeyId

string

No

The ID of the Key Management Service (KMS) key used by the data cloud disk.

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 indicates the number of I/O operations that can be processed per second. It measures the read and write capabilities of block storage. Unit: operations per second.

100

BurstingEnabled

boolean

No

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

  • true: enables the feature.

  • false: disables the feature.

Note

You can set this parameter only when SystemDisk.Category is set to cloud_auto.

For more information, see ESSD AutoPL cloud disks.

false

SpotPriceLimits

array<object>

No

The collection of billing information for spot instances.

object

No

The collection of billing information for spot instances.

PriceLimit

number

No

The maximum hourly price for the spot instance. This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit.

0.5

InstanceType

string

No

The instance type of the spot instance. This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit.

ecs.g6.large

SecurityGroupIds

array

No

Adds the ECS instance to multiple security groups at the same time. For more information, see the Security groups section in Limits.

Note

You cannot specify both SecurityGroupId and SecurityGroupIds at the same time.

string

No

Adds the ECS instance to multiple security groups at the same time. For more information, see the Security groups section in Limits.

Note

You cannot specify both SecurityGroupId and SecurityGroupIds at the same time.

sg-bp18kz60mefs****

InstancePatternInfos

array<object>

No

The collection of intelligent configuration information used to filter instance types that meet your requirements.

object

No

The collection of intelligent configuration information used to filter instance types that meet your requirements.

Cores

integer

No

The number of vCPUs of the instance type in intelligent configuration mode. This parameter is used to filter instance types that meet your requirements. For more information, see Instance families.

Take note of the following items:

  • The InstancePatternInfos parameter is applicable only when the network type of the scaling group is VPC.

  • You must configure both InstancePatternInfos.Cores and InstancePatternInfos.Memory when you use the InstancePatternInfos parameter.

  • If you have already specified instance types by using the InstanceType or InstanceTypes parameter, Auto Scaling preferentially uses the specified instance types for scale-out. If the specified instance types are out of stock, Auto Scaling preferentially uses the instance type that has the lowest price among the instance types that meet the requirements specified by the InstancePatternInfos parameter.

2

InstanceFamilyLevel

string

No

The level of the instance family. This parameter is used to filter instance types that meet your requirements and takes effect when CostOptimization is enabled. Valid values:

  • EntryLevel: shared instance types. These instance types are more cost-effective but cannot ensure consistent computing performance. They are suitable for scenarios where the CPU utilization is typically low. For more information, see Shared instance families.

  • EnterpriseLevel: enterprise-level instance types. These instance types provide consistent performance and dedicated resources. They are suitable for scenarios that require high stability. For more information, see Instance families.

  • CreditEntryLevel: credit-based entry-level instance types, which are burstable instances. These instance types use CPU credits to ensure computing performance and are suitable for scenarios where the CPU utilization is typically low but occasionally bursts. For more information, see Overview of burstable instances.

EnterpriseLevel

MaxPrice

number

No

The maximum acceptable hourly price for pay-as-you-go or spot instances in intelligent configuration mode. This parameter is used to filter instance types that meet your requirements.

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 your requirements.

4

ExcludedInstanceTypes

array

No

The instance types to be excluded. You can use a wildcard (*) 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 all instance types in the c6 instance family.

string

No

The instance types to be excluded. You can use a wildcard (*) 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 all instance types in the c6 instance family.

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

Architectures

array

No

The architecture type of the instance type. Valid values:

  • X86: x86 computing.

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

  • BareMental: ECS bare metal 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.

  • BareMental: ECS bare metal server.

  • Arm: Arm computing.

Default value: all architecture types.

X86

BurstablePerformance

string

No

Specifies whether the instance type is a burstable instance type. Valid values:

  • Exclude: does not include burstable instance types.

  • Include: includes burstable instance types.

  • Required: includes only burstable instance types.

Default value: Include.

Include

InstanceTypeFamilies

array

No

The instance families to be queried. N indicates that you can specify multiple instance families. Valid values of N: 1 to 10.

string

No

The instance families to be queried. N indicates that you can specify multiple instance families. Valid values of N: 1 to 10.

ecs.g6

MinimumCpuCoreCount

integer

No

The minimum number of vCPUs of the instance type.

2

MaximumCpuCoreCount

integer

No

The maximum number of vCPUs 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 indicates the Settings for multiple instance categories. 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 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: ECS Bare Metal Instance.

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

string

No

The instance categorization. Valid values:

Note

N indicates the Settings for multiple instance categories. 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 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: ECS Bare Metal Instance.

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

Compute-optimized with GPU

CpuArchitectures

array

No

The CPU architecture of the instance. Valid values:

Note

N indicates that you can specify multiple CPU architectures. Valid values of N: 1 to 2.

  • X86.

  • ARM.

string

No

The CPU architecture of the instance. Valid values:

Note

N indicates that you can specify multiple CPU architectures. Valid values of N: 1 to 2.

  • X86.

  • ARM.

X86

PhysicalProcessorModels

array

No

The physical processor model of the instance. N indicates that you can specify multiple processor models. Valid values of N: 1 to 10.

string

No

The physical processor model of the instance. N indicates that you can specify multiple processor models. Valid values of N: 1 to 10.

Intel Xeon(Ice Lake) Platinum 8369B

MinimumEniQuantity

integer

No

The minimum upper limit on the number of network interface controller (NIC) devices that can be mounted to the instance.

2

MinimumEniPrivateIpAddressQuantity

integer

No

The minimum upper limit on the number of IPv4 addresses per elastic network interfaces (ENIs) or network interface controller (NIC) for the instance.

2

MinimumEniIpv6AddressQuantity

integer

No

The minimum upper limit on the number of IPv6 addresses per elastic network interfaces (ENIs) or network interface controller (NIC) for the instance.

1

MinimumInitialCredit

integer

No

The minimum initial vCPU credit value for t5 and t6 burstable instances.

12

MinimumBaselineCredit

integer

No

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

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 for the instance. Valid values: positive integers.

2

MaximumGpuAmount

integer

No

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

2

SystemDiskCategories

array

No

The disk types for the system cloud disk. If a disk type with a higher priority is unavailable, Auto Scaling automatically attempts to use the disk type with the next highest priority to create the system cloud disk. Valid values:

  • cloud: basic cloud disk.

  • cloud_efficiency: ultra cloud disk.

  • cloud_ssd: standard SSD cloud disk.

  • cloud_essd: ESSD cloud disk.

Note

You cannot specify both this parameter and SystemDisk.Category at the same time.

string

No

The disk types for the system cloud disk. If a disk type with a higher priority is unavailable, Auto Scaling automatically attempts to use the disk type with the next highest priority to create the system cloud disk. Valid values:

  • cloud: basic cloud disk.

  • cloud_efficiency: ultra cloud disk.

  • cloud_ssd: standard SSD cloud disk.

  • cloud_essd: ESSD cloud disk.

Note

You cannot specify both this parameter and 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 refers to the number of I/O operations that can be processed per second. It indicates the read and write processing capability of block storage. Unit: operations 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: disables 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 to log on to the ECS instance as the ecs-user user. For more information, see Manage the logon username of an ECS instance. Valid values:

  • true: yes.

  • false: no.

Default value: false.

false

DeletionProtection

boolean

No

The release protection property of the instance. This property specifies whether the instance can be directly released by using the ECS console or the DeleteInstance API operation, which prevents accidental deletion of the instance. Valid values:

  • true: enables release protection for the instance. The instance cannot be directly released by using the ECS console or the DeleteInstance API operation.

  • false: shutdown release protection for the instance. The instance can be directly released by using the ECS console or the DeleteInstance API operation.

Default value: false.

Note

This property applies only to pay-as-you-go instances to prevent instances created by Auto Scaling during scale-out from being accidentally deleted. It does not affect normal scale-in activities. Instances with release protection enabled can still be released during scale-in activities.

false

StorageSetId

string

No

The ID of the storage set.

ss-bp67acfmxazb4p****

StorageSetPartitionNumber

integer

No

The maximum number of partitions in the storage set. Valid values: integers greater than or equal to 2.

2

CustomPriorities

array<object>

No

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

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

If an instance cannot be created based on the instance type and vSwitch combination with a higher priority, Auto Scaling automatically selects the combination with the next highest priority to create the instance.

Note

If you specify custom priorities for only some instance type and vSwitch combinations, the unspecified combinations have lower priorities than the specified ones. The priorities of the unspecified combinations are determined based on the vSwitch sequence in the scaling group and the instance type sequence in the scaling configuration.

  • Example: If the vSwitch sequence in the scaling group is vsw1 and vsw2, the instance type sequence in the scaling configuration is type1 and type2, and the custom priority sequence is ["vsw2+type2", "vsw1+type2"], the final priority sequence is: "vsw2+type2" > "vsw1+type2" > "vsw1+type1" > "vsw2+type1".

object

No

InstanceType

string

No

The instance type of the ECS instance.

Important The instance type must be included in the instance type list of the scaling configuration.

ecs.g6.large

VswitchId

string

No

The ID of the vSwitch.

Important The vSwitch must be included in the vSwitch list of the scaling group.

vsw-bp14zolna43z266bq****

NetworkInterfaces

array<object>

No

The list of network interface controller (NIC) devices.

object

No

The elastic network interfaces (ENIs) or network interface controller (NIC).

InstanceType

string

No

The elastic network interfaces (ENIs) type. When you use this parameter, you must use the NetworkInterfaces Settings for the primary network interface controller (NIC), and you cannot set the SecurityGroupId or SecurityGroupIds parameter. Valid values:

  • Primary: primary elastic network interface (ENI).

  • Secondary: secondary elastic network interface (ENI).

Default value: Secondary.

Primary

NetworkInterfaceTrafficMode

string

No

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

  • Standard: uses the TCP communication pattern.

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

Default value: Standard.

Note

The number of elastic network interfaces (ENIs) in RDMA pattern 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. Take note of the following items:

  • This parameter takes effect only when NetworkInterface.InstanceType is set to Primary. If NetworkInterface.InstanceType is set to Secondary or left empty, you cannot configure this parameter.

  • After you configure this parameter, you cannot configure Ipv6AddressCount.

1

SecurityGroupIds

array

No

The IDs of one or more security groups to which the elastic network interfaces (ENIs) belong.

string

No

The IDs of one or more security groups to which the elastic network interfaces (ENIs) belong. Take note of the following items:

  • If NetworkInterface.InstanceType is set to Primary, you must configure the Settings for this parameter. In this case, this parameter functions the same as SecurityGroupIds, but you cannot set SecurityGroupId or SecurityGroupIds.

  • If NetworkInterface.InstanceType is set to Secondary or left empty, this parameter is optional. The default value is the security group to which the ECS instance belongs, which is the security group of the primary network interface controller (NIC).

sg-uf6ij8dwxxxxxx

SecondaryPrivateIpAddressCount

integer

No

The number of secondary private IPv4 addresses to be assigned 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 be assigned to the ENI, excluding the primary private IP address of the ENI. The system randomly assigns these addresses from the available CIDR block of the vSwitch (NetworkInterface.N.VSwitchId) to which the ENI belongs.

6

VSwitchIds

array

No

The ID of the vSwitch to which the elastic network interfaces (ENIs) belong. N indicates the Settings for multiple vSwitches. Valid values of N: 1 to 10.

Take note of the following items:

  • If InstanceType is set to Primary, you cannot set this parameter. The default value is the vSwitch to which the instance belongs.

  • 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 network interface controller (NIC) and has the most active IP addresses.

string

No

The ID of the vSwitch to which the elastic network interfaces (ENIs) belong. N indicates the Settings for multiple vSwitches. Valid values of N: 1 to 10.

Take note of the following items:

  • If InstanceType is set to Primary, you cannot set this parameter. The default value is the vSwitch to which the instance belongs.

  • 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 network interface controller (NIC) and has the most active 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 forcibly use the security-hardened mode (IMDSv2) to access instance metadata. Valid values:

  • optional: does not forcibly use the security-hardened mode.

  • required: forcibly uses the security-hardened mode. After you set this value, you cannot access instance metadata in normal mode.

Default value: optional.

Note

For more information about the modes for accessing instance metadata, see Access modes of instance metadata.

optional

ResourcePoolOptions

object

No

The resource pool policy used when creating the instance. Take note of the following items when you configure this parameter:

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

  • You cannot configure this parameter together with PrivatePoolOptions.MatchCriteria or PrivatePoolOptions.Id.

Strategy

string

No

Resource pools include private pools generated after the elasticity assurance or capacity reservation service takes effect, as well as public pools. They are available for selection when the instance starts. Valid values:

  • PrivatePoolFirst: private pools take precedence. When you select this policy, if ResourcePoolOptions.PrivatePoolIds is specified or the PrivatePoolTags condition is met, the corresponding private pool is preferentially used. If no private pool is specified or the specified private pool has insufficient capacity, the system automatically matches an open private pool. If no eligible private pool is available, the public pool is used to create the instance.

  • PrivatePoolOnly: only private pools are used. When you select this policy, you must specify ResourcePoolOptions.PrivatePoolIds. If the specified private pool has insufficient capacity, the instance fails to start.

  • PublicPoolFirst: public pool resources take precedence. The public pool is preferentially used to create the instance. When public pool resources are insufficient, private pool resources are used as a supplement. The system preferentially and automatically matches an open private pool. If no eligible private pool is available, the specified ResourcePoolOptions.PrivatePoolIds or a Target private pool that meets the PrivatePoolTags condition is used. (This policy is in invitational preview and is not supported yet.)

  • None: no resource pool policy is used.

Default value: None.

PrivatePoolFirst

PrivatePoolIds

array

No

The ID of the private pool, which is the ID of the elasticity assurance or capacity reservation service. You can only specify the ID of a private pool in Target mode, and you cannot specify this parameter together with PrivatePoolTags.

string

No

The ID of the private pool, which is the ID of the elasticity assurance or capacity reservation service. You can only specify the ID of a private pool in Target mode, and you cannot specify this parameter together with PrivatePoolTags. Valid values of N: 1 to 20.

eap-bp67acfmxazb4****

PrivatePoolTags

array<object>

No

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

  • When you configure this parameter, the system filters private pools from the Target private pools associated with your account. The filtered private pools must match the tags and meet the scaling group constraints, such as zone and instance type.

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

  • You cannot specify this parameter together with PrivatePoolIds.

object

No

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

  • When you configure this parameter, the system filters private pools from the Target private pools associated with your account. The filtered private pools must match the tags and meet the scaling group constraints, such as zone and instance type.

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

  • You cannot specify this parameter together with PrivatePoolIds.

Key

string

No

The tag key of the private pool.

TestKey

Value

string

No

The tag value of the private pool.

TestValue

InstanceTypeCandidateOptions

object

No

After you enable the candidate mode, if issues such as insufficient stock occur, the system supplements the currently selected instance types with similar instance types of the same size, or creates vSwitches in candidate zones and adds them to the scaling group.

Enabled

boolean

No

Specifies whether to enable the candidate mode.

true

MaxPrice

number

No

The maximum price for candidate instance types.

2.10

AllowDifferentGeneration

boolean

No

Specifies whether to allow supplementing instance types of other generations.

  • For example, if the current instance type is ecs.c7.large, instance types such as ecs.c6.large and ecs.c8.large can be used as candidates after this feature is enabled.

true

AllowCrossAz

boolean

No

Specifies whether to allow supplementing vSwitches in other zones.

Note

The instance types remain unchanged, and only new zones are used as candidates. If the scaling group cannot scale out in all selected zones due to issues such as insufficient stock, the system automatically adds vSwitches in new zones to the scaling group based on this configuration. For example, if the scaling group is configured with the cn-hangzhou-h and cn-hangzhou-g zones, and scale-out fails in both zones, Auto Scaling may create a vSwitch in the cn-hangzhou-k zone and add it to the scaling group based on real-time stock availability.

true

AllowCidrBlocks

array

No

Specifies the CIDR blocks of the optional vSwitches when you add vSwitches in other zones.

string

No

The vSwitch CIDR block must meet the following requirements:

  • The subnet mask length of the vSwitch CIDR block must be 16 to 29 bits.

  • The vSwitch CIDR block must be a subset of the VPC CIDR block.

  • The vSwitch CIDR block cannot be the same as the destination CIDR block of a route entry in the VPC, but it can be a subset of the destination CIDR block.

  • The vSwitch CIDR block cannot be 100.64.0.0/10 or its subnets.

172.16.0.0/24

SecondaryEniVSwitchConstraint

string

No

Specifies whether a vSwitch available for secondary elastic network interfaces (ENIs) must be selected from the list when the VSwitchIds parameter is specified for the secondary ENIs. Valid values:

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

  • Tolerant: fault-tolerant mode. If no vSwitch in the VSwitchIds list meets the requirements, no secondary ENI is configured, and the instance is still created.

Default value: Strict.

Strict

Response elements

Element

Type

Description

Example

object

The information about the created scaling configuration.

ScalingConfigurationId

string

The ID of the scaling configuration.

asc-bp1ffogfdauy0nu5****

RequestId

string

The ID of the request.

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.