All Products
Search
Document Center

Auto Scaling:ModifyScalingConfiguration

更新时间:Dec 15, 2025

If an existing scaling configuration for Elastic Compute Service (ECS) instances does not meet your business requirements, you can call the ModifyScalingConfiguration operation to modify it.

Usage notes

  • If you change the name of a scaling configuration, make sure that the new name is unique within the scaling group.

  • You can use one of the following methods to configure a primary elastic network interface (ENI). You can use only one method in each call. If you use both methods in a call, the call fails and an error message is returned.

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

    • Specify NetworkInterfaces.N to configure primary and secondary ENIs. You must use this parameter to specify at least one primary ENI. If you set NetworkInterfaces.N.InstanceType to Primary, a primary ENI is configured. If you set NetworkInterfaces.N.InstanceType to Secondary or leave the parameter empty, a secondary ENI is configured.

      Note

      If you use one of the preceding methods to modify ENI information, the information that was configured using the other method is cleared.

Try it now

You can call this operation directly in OpenAPI Explorer. OpenAPI Explorer automatically calculates the signature and generates SDK sample code.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

ModifyScalingConfiguration

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

ScalingConfigurationId

String

Yes

asc-bp16har3jpj6fjbx****

The ID of the scaling configuration that you want to modify.

IoOptimized

String

No

none

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

  • none: The instance is not I/O optimized.

  • optimized: The instance is I/O optimized.

SpotStrategy

String

No

NoSpot

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

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

  • SpotWithPriceLimit: The instance is a preemptible instance with a user-defined maximum hourly price.

  • SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is automatically used as the bid price.

ScalingConfigurationName

String

No

test-modify

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

The name of a scaling configuration 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.

InstanceName

String

No

inst****

The name of the ECS instances that are created using the scaling configuration.

HostName

String

No

hos****

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

  • For Windows instances, the hostname must be 2 to 15 characters in length and can contain letters, digits, and hyphens (-). The hostname cannot contain periods (.) or contain only digits.

  • For other types of instances, such as Linux instances, the hostname must be 2 to 64 characters in length. You can use periods (.) to separate the hostname into multiple segments. Each segment can contain letters, digits, and hyphens (-).

ImageId

String

No

centos6u5_64_20G_aliaegis_2014****.vhd

The ID of the image file that is used to create instances.

Note

If the image that you specified in the original scaling configuration contains a system disk and data disks, the data on the data disks is cleared after you change the image.

ImageName

String

No

suse11sp3_64_20G_aliaegis_2015****.vhd

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

You cannot use ImageName to specify a Marketplace image.

Cpu

Integer

No

2

The number of vCPUs.

You can specify CPU and Memory to define a 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 defined. Auto Scaling determines the available instance types based on factors such as the zone and I/O optimization settings. Then, Auto Scaling creates instances of the instance type that has the lowest price.

Note

This parameter is in effect only when you set the scaling policy of the scaling group to Cost Optimization and do not specify instance types in the scaling configuration.

Memory

Integer

No

16

The memory size.

You can specify CPU and Memory to define a 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 defined. Auto Scaling determines the available instance types based on factors such as the zone and I/O optimization settings. Then, Auto Scaling creates instances of the instance type that has the lowest price.

Note

This parameter is in effect only when you set the scaling policy of the scaling group to Cost Optimization and do not specify instance types in the scaling configuration.

InternetChargeType

String

No

PayByBandwidth

The billing method for network usage. Valid values:

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

  • PayByTraffic: pay-by-data-transfer. In this case, InternetMaxBandwidthOut is the maximum bandwidth. The fees are based on the actual network traffic.

InternetMaxBandwidthOut

Integer

No

10

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

Default value: 0.

SystemDisk.Category

String

No

cloud_efficiency

The category of the system disk. Valid values:

  • cloud: basic disk.

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

  • ephemeral_ssd: local SSD.

  • cloud_auto: ESSD AutoPL disk.

This parameter cannot be specified at the same time as SystemDiskCategories.N. If you do not specify this parameter or SystemDiskCategories.N, this parameter has a default value. If the instance type is from instance family I and the instance is not I/O optimized, the default value is cloud. Otherwise, the default value is cloud_efficiency.

SystemDisk.Size

Integer

No

50

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

  • Basic disk: 20 to 500.

  • ESSD:

    • PL0: 1 to 2048.

    • PL1: 20 to 2048.

    • PL2: 461 to 2048.

    • PL3: 1261 to 2048.

  • ESSD AutoPL disk: 1 to 2048.

  • Other 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}.

SystemDisk.DiskName

String

No

cloud_ssdSystem

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

SystemDisk.Description

String

No

Test system disk.

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

SystemDisk.AutoSnapshotPolicyId

String

No

sp-bp12m37ccmxvbmi5****

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

SystemDisk.PerformanceLevel

String

No

PL0

The performance level of the ESSD that is used as the system disk. 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

enterprise SSDs (ESSDs)For more information about how to select an ESSD performance level, see .

LoadBalancerWeight

Integer

No

50

The weight of the backend server. Valid values: 1 to 100.

UserData

String

No

ZWNobyBoZWxsbyBlY3Mh

The custom data of the ECS instance. The data must be Base64-encoded. The raw data cannot exceed 32 KB in size.

KeyPairName

String

No

KeyPair_Name

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

  • For Windows instances, this parameter is ignored. The default value is null.

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

RamRoleName

String

No

RamRoleTest

The name of the RAM role that you want to attach to the ECS instance. You can call the ListRoles operation to query available RAM roles. For information about how to create a RAM role, see the CreateRole operation.

PasswordInherit

Boolean

No

false

Specifies whether to use the password that is preconfigured in the image. If you use this parameter, make sure that a password is configured for the image.

Tags

String

No

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

The tags of the ECS instance. The tags are specified as key-value pairs. You can specify up to 20 tags. The following requirements apply to the keys and values:

  • A key can be up to 64 characters in length. It cannot start with aliyun or acs:. It 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:. It cannot contain http:// or https://. A value can be an empty string.

DeploymentSetId

String

No

ds-bp13v7bjnj9gis****

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

SecurityGroupId

String

No

sg-F876F****

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

Override

Boolean

No

true

Specifies whether to overwrite the data. Valid values:

  • true: overwrites the data.

  • false: does not overwrite the data.

ResourceGroupId

String

No

abcd1234abcd****

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

HpcClusterId

String

No

hpc-clusterid

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

InstanceDescription

String

No

Test instance.

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

Ipv6AddressCount

Integer

No

1

The number of randomly generated IPv6 addresses to assign to the ENI.

CreditSpecification

String

No

Standard

The performance mode of the burstable instance. Valid values:

ImageFamily

String

No

hangzhou-daily-update

The name of the image family. You can set this parameter to obtain the latest available image from the specified image family to create the instance. If you have specified the ImageId parameter, you cannot specify this parameter.

ZoneId

String

No

cn-hangzhou-g

The ID of the zone to which the ECS instance belongs.

DedicatedHostId

String

No

dh-bp67acfmxazb4p****

Specifies whether to create an ECS instance on a dedicated host. You cannot create preemptible instances on dedicated hosts. If you specify the DedicatedHostId parameter, the SpotStrategy and SpotPriceLimit settings in the request are ignored.

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

Affinity

String

No

default

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 you restart an instance that was stopped in economical mode and the resources of the original dedicated host are insufficient, the instance is migrated to another dedicated host in the automatic deployment resource pool.

  • host: The instance is associated with the dedicated host. If you restart an instance that was stopped in economical mode, the instance is still deployed on the original dedicated host. If the resources of the original dedicated host are insufficient, the instance fails to restart.

Tenancy

String

No

default

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

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

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

SchedulerOptions

Map

No

["testManagedPrivateSpaceId****"]

The scheduling options.

PrivatePoolOptions.MatchCriteria

String

No

Open

The capacity option of the private pool for starting the instance. An elasticity assurance or a capacity reservation generates a private pool. You can select a private pool to start an instance. Valid values:

  • Open: Open mode. The system automatically matches the capacity of open private pools. If no matching private pool is found, the system uses public pool resources to start the instance. In this mode, you do not need to set the PrivatePoolOptions.Id parameter.

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

  • None: The instance does not use a private pool.

PrivatePoolOptions.Id

String

No

eap-bp67acfmxazb4****

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

SpotDuration

Integer

No

1

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

  • 1: After the instance is created, Alibaba Cloud ensures that the instance runs for 1 hour and is not automatically released. After 1 hour, the system automatically compares the bid price with the market price and checks the resource inventory to determine whether to retain or reclaim the instance.

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

Note

Alibaba Cloud sends a notification to you through ECS system events 5 minutes before an instance is reclaimed. Preemptible instances are billed by the second. We recommend that you select a protection period based on the time that is required to complete your task.

Default value: 1.

SpotInterruptionBehavior

String

No

Terminate

The interruption mode of the preemptible instance. Only Terminate is supported, which indicates that the instance is directly released. This is the default value.

DataDisk.N.PerformanceLevel

String

No

PL1

The performance level of the ESSD that is used as a data disk. The value of N must be the same as the value of N in DataDisk.N.Category=cloud_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

enterprise SSD (ESSD)For more information about how to select an ESSD performance level, see .

DataDisk.N.AutoSnapshotPolicyId

String

No

sp-bp19nq9enxqkomib****

The ID of the automatic snapshot policy that is applied to data disk N. N is an integer from 1 to 16.

DataDisk.N.Encrypted

String

No

false

Specifies whether to encrypt data disk N. N is an integer from 1 to 16. Valid values:

  • true: encrypts the disk.

  • false: does not encrypt the disk.

DataDisk.N.Description

String

No

Test data disk.

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

DataDisk.N.SnapshotId

String

No

s-snapshot****

The snapshot that is used to create data disk N. N is an integer from 1 to 16. If you specify this parameter, DataDisk.N.Size is ignored. The size of the created disk is the same as 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.

DataDisk.N.Categories.N

String

No

cloud

The categories of data disk N. The first N specifies the Nth data disk, and its valid values are 1 to 16. The second N specifies the Nth disk category for the Nth data disk, and its valid values are 1 to 4. You can specify up to four disk categories for a data disk in a scaling configuration. A smaller value of N indicates a higher priority. If a disk of a higher-priority category cannot be created, Auto Scaling automatically tries to create a disk of the next lower-priority category. Valid values:

  • cloud: basic disk. The DeleteWithInstance attribute of a basic disk that is created with an instance is true.

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

Note

Do not specify this parameter and DataDisk.N.Category at the same time.

DataDisk.N.Size

Integer

No

100

The size of data disk N. N is an integer from 1 to 16. 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, which is specified by SnapshotId.

DataDisk.N.Device

String

No

/dev/xvdb

The mount point of data disk N. N is an integer from 1 to 16. If you do not specify this parameter, the system automatically allocates a mount point when it creates the ECS instance. The mount point ranges from /dev/xvdb to /dev/xvdz.

DataDisk.N.DiskName

String

No

cloud_ssdData

The name of data disk N. N is an integer from 1 to 16. The name must be 2 to 128 characters in length. It must start with a letter or a Chinese character. It cannot start with http:// or https://. It can contain digits, colons (:), underscores (_), and hyphens (-).

DataDisk.N.Category

String

No

cloud_ssd

The category of data disk N. N is an integer from 1 to 16. Valid values:

  • cloud: basic disk. The DeleteWithInstance attribute of a basic disk that is created with an instance is true.

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

  • ephemeral_ssd: local SSD.

  • cloud_auto: ESSD AutoPL disk.

This parameter cannot be specified at the same time as DataDisk.N.Categories.N. If you do not specify this parameter or DataDisk.N.Categories.N, this parameter has a default value:

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

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

DataDisk.N.DeleteWithInstance

Boolean

No

true

Specifies whether to release data disk N when the instance is released. N is an integer from 1 to 16. Valid values:

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

  • false: The disk is not released when the instance is released.

You can set this parameter only for standalone disks for which DataDisk.N.Category is set to cloud, cloud_efficiency, cloud_ssd, or cloud_essd. Otherwise, an error is returned.

DataDisk.N.KMSKeyId

String

No

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

The ID of the KMS key for data disk N. N is an integer from 1 to 16.

DataDisk.N.ProvisionedIops

Long

No

100

The provisioned IOPS of the data disk.

Note

IOPS indicates the number of I/O operations that a block storage device can process per second. It represents the read and write capability of the block storage device. Unit: times/second.

DataDisk.N.BurstingEnabled

Boolean

No

false

Specifies whether to enable bursting for the data disk. Valid values:

  • true: enables bursting.

  • false: does not enable bursting.

    Note

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

SpotPriceLimit.N.PriceLimit

Float

No

0.125

The bid for the preemptible instance. N is an integer from 1 to 20. This parameter is in effect only when SpotStrategy is set to SpotWithPriceLimit.

SpotPriceLimit.N.InstanceType

String

No

ecs.g6.large

The instance type of the preemptible instance. N is an integer from 1 to 20. This parameter is in effect only when SpotStrategy is set to SpotWithPriceLimit.

InstanceTypes.N

String

No

ecs.g6.large

The parameter for specifying multiple instance types. If you use InstanceTypes.N, InstanceType is ignored. N is an integer from 1 to 20. You can specify up to 20 instance types in a scaling configuration.

N indicates the priority of an instance type in the current scaling configuration. The instance type with N set to 1 has the highest priority. The priority of instance types decreases as N increases. If an instance of a higher-priority instance type cannot be created, Auto Scaling automatically tries to create an instance of the next lower-priority instance type.

InstanceTypeOverride.N.InstanceType

String

No

ecs.c5.xlarge

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 and use the InstanceTypeOverride.N.WeightedCapacity parameter to specify custom weights for multiple instance types. N is an integer from 1 to 20.

Note

If you specify this parameter, you cannot specify instanceTypes.

The value must be an available ECS instance type. For more information, see Instance family.

InstanceTypeOverride.N.WeightedCapacity

Integer

No

4

To specify the capacity of an instance type in the scaling configuration, specify this parameter after you specify InstanceTypeOverride.N.InstanceType. The value of N for both parameters must be the same.

This parameter specifies the weight of the instance type. The weight indicates the capacity of a single instance of the specified instance type in the scaling group. A higher weight requires fewer instances of the specified instance type to meet the expected capacity.

Performance metrics, such as the number of vCPUs and the memory size, vary based on the instance type. You can configure different weights for different instance types based on your needs.

For 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 two ecs.c5.xlarge instances.

Note

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

Valid values of WeightedCapacity: 1 to 500.

SecurityGroupIds.N

String

No

sg-bp18kz60mefs****

The ID of the security group.

InstancePatternInfo.N.Cores

Integer

No

2

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

Note:

  • The InstancePatternInfo.N parameter is valid only when the network type of the scaling group is VPC.

  • You must specify both InstancePatternInfo.N.Cores and InstancePatternInfo.N.Memory.

  • If you specify an instance type using the InstanceType or InstanceTypes.N parameter, Auto Scaling preferentially uses the specified instance type for scale-outs. If the inventory of the specified instance type is insufficient, Auto Scaling uses the instance type that has the lowest price among the instance types that match the InstancePatternInfo.N parameter for scale-outs.

InstancePatternInfo.N.InstanceFamilyLevel

String

No

EnterpriseLevel

The level of the instance family in intelligent configuration mode. You can use this parameter to filter instance families that meet your requirements. Valid values:

  • SharedEntryLevel: entry-level, which indicates shared instance types. This level is cost-effective but cannot guarantee stable computing performance. This level is suitable for business scenarios in which the CPU utilization is low. For more information, see .

  • Instance familiesEnterpriseLevel: enterprise-level. This level provides stable performance and dedicated resources. This level is suitable for business scenarios that require high stability. For more information, see .

  • Burstable instanceCreditEntryLevel: credit entry-level, which indicates burstable instances. This level uses CPU credits to ensure computing performance. This level is suitable for scenarios in which the CPU utilization is low but may have occasional CPU bursts. For more information, see .

N is an integer from 1 to 10.

InstancePatternInfo.N.MaxPrice

Float

No

2

The maximum hourly price that you can accept for a pay-as-you-go instance or a preemptible instance in intelligent configuration mode. You can use this parameter to filter instance types that meet your requirements. N is an integer from 1 to 10.

Note

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

InstancePatternInfo.N.Memory

Float

No

4

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

InstancePatternInfo.N.Architecture.N

String

No

X86

The architecture of the instance type. Valid values:

  • X86: x86.

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

  • BareMental: ECS Bare Metal Instance.

  • Arm: Arm.

Default value: All architecture types are included.

InstancePatternInfo.N.BurstablePerformance

String

No

Include

Specifies whether to include burstable instance types. Valid values:

  • Exclude: does not include burstable instance types.

  • Include: includes burstable instance types.

  • Required: includes only burstable instance types.

Default value: Include.

InstancePatternInfo.N.ExcludedInstanceType.N

String

No

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

The instance types that you want to exclude. You can use a wildcard character (*) to exclude an instance type or an entire instance family. For example:

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

  • ecs.c6.*: excludes all instance types of the c6 family.

Note

To exclude multiple instance types, separate them with a forward slash (/). For example, ecs.n1.small/ecs.n1.*/*7*.

InstancePatternInfo.N.InstanceTypeFamilies.N

String

No

["ecs.g6", "ecs.c6", … "ecs.r6"]

The specified instance families. You can specify multiple instance families. N is an integer from 1 to 10.

InstancePatternInfo.N.MinimumCpuCoreCount

Integer

No

2

The minimum number of vCPU cores of the instance type.

InstancePatternInfo.N.MaximumCpuCoreCount

Integer

No

4

The maximum number of vCPU cores of the instance type.

Note

MaximumCpuCoreCount parameter cannot be more than four times the value of the MinimumCpuCoreCount parameter.

InstancePatternInfo.N.GpuSpecs.N

String

No

["NVIDIA V100"]

The specified GPU type.

InstancePatternInfo.N.InstanceCategories.N

String

No

Compute-optimized with GPU

The category of the instance type.

Note

You can specify multiple instance categories. N is an integer from 1 to 10.

  • General-purpose: general-purpose.

  • Compute-optimized: compute-optimized.

  • Memory-optimized: memory-optimized.

  • Big data: big data.

  • Local SSDs: local SSDs.

  • High Clock Speed: high frequency.

  • Enhanced: enhanced.

  • Shared: shared.

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

  • 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.

InstancePatternInfo.N.CpuArchitectures.N

String

No

["X86", "ARM"]

The CPU architecture of the instance. Valid values:

Note

You can specify multiple CPU architectures. N is an integer from 1 to 2.

  • X86.

  • ARM.

InstancePatternInfo.N.PhysicalProcessorModels.N

String

No

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

The processor model of the instance. You can specify multiple processor models. N is an integer from 1 to 10.

InstancePatternInfo.N.MinimumEniQuantity

Integer

No

2

The minimum number of ENIs that the instance is expected to support.

InstancePatternInfo.N.MinimumEniPrivateIpAddressQuantity

Integer

No

2

The minimum number of IPv4 addresses that a single ENI of the instance is expected to support.

InstancePatternInfo.N.MinimumEniIpv6AddressQuantity

Integer

No

1

The minimum number of IPv6 addresses that a single ENI of the instance is expected to support.

InstancePatternInfo.N.MinimumInitialCredit

Integer

No

12

The minimum initial vCPU credits of a t5 or t6 burstable instance.

InstancePatternInfo.N.MinimumBaselineCredit

Integer

No

12

The minimum baseline vCPU computing performance of a t5 or t6 burstable instance. This is the sum of the performance of all vCPUs.

InstancePatternInfo.N.MinimumMemorySize

Float

No

4

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

InstancePatternInfo.N.MaximumMemorySize

Float

No

4

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

InstancePatternInfo.N.MinimumGpuAmount

Integer

No

2

The minimum number of GPUs for the instance. The value must be a positive integer greater than or equal to 1.

InstancePatternInfo.N.MaximumGpuAmount

Integer

No

2

The maximum number of GPUs for the instance. The value must be a positive integer greater than or equal to 1.

SystemDiskCategories.N

String

No

cloud

The categories of the system disk. You can specify up to four disk categories for the system disk in a scaling configuration. N is an integer from 1 to 4. A smaller value of N indicates a higher priority. If a disk of a higher-priority category cannot be created, Auto Scaling automatically tries to create a disk of the next lower-priority category. Valid values:

  • cloud: basic disk.

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

Note

Do not specify this parameter and SystemDisk.Category at the same time.

Password

String

No

123abc****

The password of the ECS instance. The password must be 8 to 30 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The special characters can be:

()~!@#$%^&*-_+=\|{}[]:;'<>,.?/ For Windows instances, the password cannot start with a forward slash (/). > If you specify the Password parameter, we recommend that you use HTTPS to send the request to prevent password leakage.

SystemDisk.Encrypted

Boolean

No

false

Specifies whether to encrypt the system disk. Valid values:

  • true: encrypts the disk.

  • false: does not encrypt the disk.

Default value: false.

SystemDisk.KMSKeyId

String

No

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

The ID of the KMS key that is used for the system disk.

SystemDisk.EncryptAlgorithm

String

No

AES-256

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

  • AES-256.

  • SM4-128.

Default value: AES-256.

SystemDisk.ProvisionedIops

Long

No

100

The provisioned IOPS of the system disk.

Note

IOPS indicates the number of I/O operations that a block storage device can process per second. It represents the read and write capability of the block storage device. Unit: times/second.

SystemDisk.BurstingEnabled

Boolean

No

false

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

  • true: enables bursting.

  • false: does not enable bursting.

    Note

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

ImageOptions.LoginAsNonRoot

Boolean

No

false

Specifies whether to log on to the ECS instance as the ecs-user user. For more information, see Manage logon usernames of ECS instances. Valid values:

  • true: yes.

  • false: no.

DeletionProtection

Boolean

No

false

The release protection attribute of the ECS instance. This parameter is valid only for pay-as-you-go instances. It specifies whether you can release the instance using the ECS console or by calling the DeleteInstance operation. Valid values:

  • true: enables release protection for the instance. This prevents the instance from being accidentally deleted during a scale-in event in Auto Scaling.

  • false: disables release protection for the instance. You can release the instance using the ECS console or by calling the DeleteInstance operation.

Note

This attribute does not affect normal scale-in activities in Auto Scaling. A pay-as-you-go instance for which release protection is enabled can be released during a scale-in event.

StorageSetId

String

No

ss-bp67acfmxazb4p****

The ID of the storage set.

StorageSetPartitionNumber

Integer

No

2

The maximum number of partitions in the storage set. The value must be greater than or equal to 2.

CustomPriorities.N.InstanceType

String

No

ecs.g6.large

The CustomPriorities field indicates the custom priority of an ECS instance type and vSwitch combination. The CustomPriorities.N.InstanceType parameter indicates the instance type of the ECS instance in the custom priority.

Note

This parameter is valid only when the Scaling PolicyPriority

If an ECS instance cannot be created based on the ECS instance type and vSwitch combination that has a higher priority, Auto Scaling automatically tries to create an ECS instance based on the combination that has the next lower priority.

Note

If you specify custom priorities for only some ECS instance type and vSwitch combinations, the combinations for which you do not specify custom priorities have a lower priority. The priorities of the combinations for which you do not specify custom priorities are determined by the order of vSwitches that is specified in the scaling group and the order of instance types that is specified in the scaling configuration. For example, the vSwitches of the scaling group are vsw1 and vsw2 in sequential order, and the instance types in the scaling configuration are type1 and type2 in sequential order. If you specify a custom priority of ["vsw2+type2", "vsw1+type2"], the final priority is vsw2+type2 > vsw1+type2 > vsw1+type1 > vsw2+type1.

CustomPriorities.N.VswitchId

String

No

vsw-bp14zolna43z266bq****

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

Note

This parameter is valid only when the Scaling PolicyPriority

NetworkInterfaces.N.InstanceType

String

No

Primary

The type of the ENI. You must use NetworkInterfaces.N to configure the primary ENI. You cannot specify the SecurityGroupId or SecurityGroupIds.N parameter. Valid values:

  • Primary: primary ENI.

  • Secondary: secondary ENI.

Default value: Secondary.

NetworkInterfaces.N.NetworkInterfaceTrafficMode

String

No

HighPerformance

The communication mode of the network interface card (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

instance familyThe number of ENIs in RDMA mode cannot exceed the limit for the instance family. For more information, see .

NetworkInterfaces.N.Ipv6AddressCount

Integer

No

1

The number of randomly generated IPv6 addresses to assign to the primary ENI. Note:

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

  • You cannot set this parameter if NetworkInterfaces.N.InstanceType is set to Secondary or is left empty.

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

NetworkInterfaces.N.SecurityGroupIds.N

String

No

sg-2ze55shrh****

The IDs of one or more security groups to which the ENI belongs. Note:

  • You must set this parameter if NetworkInterfaces.N.InstanceType is set to Primary. In this case, this parameter has the same effect as SecurityGroupIds.N. You cannot set the SecurityGroupId or SecurityGroupIds.N parameter.

  • This parameter is optional if NetworkInterfaces.N.InstanceType is set to Secondary or is left empty. The default value is the security group of the ECS instance, which is the security group of the primary ENI.

DedicatedHostClusterId

String

No

dc-2zedxc67zqzt7lb4****

The ID of the dedicated host cluster.

SecurityOptions.ConfidentialComputingMode

String

No

TDX

The confidential computing mode. Valid values:

HttpEndpoint

String

No

enabled

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

Instance metadata overviewFor more information about instance metadata, see .

HttpTokens

String

No

optional

Specifies whether to forcibly use the security-hardened mode (IMDSv2) to access instance metadata. Valid values:

  • optional: does not forcibly use IMDSv2.

  • required: forcibly uses IMDSv2. If you set this parameter to required, you cannot access instance metadata in normal mode.

Default value: optional.

Note

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

InternetMaxBandwidthIn

Integer

No

10

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, the valid values of this parameter are 1 to 10, and the default value is 10.

  • If the purchased outbound public bandwidth is greater than 10 Mbit/s, the valid values of this parameter are 1 to the value of InternetMaxBandwidthOut, and the default value is the value of InternetMaxBandwidthOut.

ResourcePoolOptions.Strategy

String

No

PrivatePoolFirst

The resource pool for instance startup. The resource pool can be a private pool that is generated after an elasticity assurance or a capacity reservation takes effect, or the public pool. Valid values:

  • PrivatePoolFirst: Private pool first. If you set this parameter to PrivatePoolFirst and specify ResourcePoolOptions.PrivatePoolIds, the system preferentially uses the specified private pools. If you do not specify private pools or the specified private pools have insufficient capacity, the system automatically matches open private pools. If no matching private pool is found, the system uses the public pool to create instances.

  • PrivatePoolOnly: Private pools only. If you set this parameter to PrivatePoolOnly, you must specify ResourcePoolOptions.PrivatePoolIds. If the specified private pools have insufficient capacity, the instances fail to start.

  • None: No resource pool strategy is used.

Default value: None.

ResourcePoolOptions.PrivatePoolIds.N

String

No

eap-bp67acfmxazb4****

The ID of the private pool. The ID of a private pool is the same as the ID of the elasticity assurance or capacity reservation. You can specify only the ID of a private pool in Target mode. N is an integer from 1 to 20.

Response parameters

Parameter

Type

Example

Description

RequestId

String

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

The request ID.

Examples

Sample request

http(s)://ess.aliyuncs.com/?Action=ModifyScalingConfiguration
&ScalingConfigurationId=asc-bp16har3jpj6fjbx****
&IoOptimized=none
&SpotStrategy=NoSpot
&ScalingConfigurationName=test-modify
&InstanceName=inst****
&HostName=hos****
&ImageId=centos6u5_64_20G_aliaegis_2014****.vhd
&ImageName=suse11sp3_64_20G_aliaegis_2015****.vhd
&Cpu=2
&Memory=16
&InternetChargeType=PayByBandwidth
&InternetMaxBandwidthOut=10
&SystemDisk.Category=cloud_efficiency
&SystemDisk.Size=50
&SystemDisk.DiskName=cloud_ssdSystem
&SystemDisk.Description=Test system disk.
&SystemDisk.AutoSnapshotPolicyId=sp-bp12m37ccmxvbmi5****
&SystemDisk.PerformanceLevel=PL0
&LoadBalancerWeight=50
&UserData=ZWNobyBoZWxsbyBlY3Mh
&KeyPairName=KeyPair_Name
&RamRoleName=RamRoleTest
&PasswordInherit=false
&Tags={"key1":"value1","key2":"value2", ... "key5":"value5"}
&DeploymentSetId=ds-bp13v7bjnj9gis****
&SecurityGroupId=sg-F876F****
&Override=true
&ResourceGroupId=abcd1234abcd****
&HpcClusterId=hpc-clusterid
&InstanceDescription=Test instance.
&Ipv6AddressCount=1
&CreditSpecification=Standard
&ImageFamily=hangzhou-daily-update
&ZoneId=cn-hangzhou-g
&DedicatedHostId=dh-bp67acfmxazb4p****
&Affinity=default
&Tenancy=default
&PrivatePoolOptions.MatchCriteria=Open
&PrivatePoolOptions.Id=eap-bp67acfmxazb4****
&SpotDuration=1
&SpotInterruptionBehavior=Terminate
&DataDisk=[{"PerformanceLevel":"PL1","AutoSnapshotPolicyId":"sp-bp19nq9enxqkomib****","Encrypted":"false","Description":"Test data disk.","SnapshotId":"s-snapshot****","Categories":["cloud"],"Size":100,"Device":"/dev/xvdb","DiskName":"cloud_ssdData","Category":"cloud_ssd","DeleteWithInstance":true,"KMSKeyId":"0e478b7a-4262-4802-b8cb-00d3fb40****","ProvisionedIops":100,"BurstingEnabled":false}]
&SpotPriceLimit=[{"PriceLimit":0.125,"InstanceType":"ecs.g6.large"}]
&InstanceTypes=["ecs.g6.large"]
&InstanceTypeOverride=[{"InstanceType":"ecs.c5.xlarge","WeightedCapacity":4}]
&SecurityGroupIds=["sg-bp18kz60mefs****"]
&InstancePatternInfo=[{"Cores":2,"InstanceFamilyLevel":"EnterpriseLevel","MaxPrice":2.0,"Memory":4.0,"Architecture":["X86"],"BurstablePerformance":"Include","ExcludedInstanceType":["ecs.n1.small/ecs.n1.*/*7*"],"InstanceTypeFamilies":["[\"ecs.g6\", \"ecs.c6\", … \"ecs.r6\"]"],"MinimumCpuCoreCount":2,"MaximumCpuCoreCount":4,"GpuSpecs":["[\"NVIDIA V100\"]"],"InstanceCategories":["Compute-optimized with GPU"],"CpuArchitectures":["[\"X86\", \"ARM\"]"],"PhysicalProcessorModels":["[\"Intel Xeon(Ice Lake) Platinum 8369B\", \"Intel Xeon(Skylake) Platinum 8163\", … \"Intel Xeon(Cascade Lake) Platinum 8269CY\"]"],"MinimumEniQuantity":2,"MinimumEniPrivateIpAddressQuantity":2,"MinimumEniIpv6AddressQuantity":1,"MinimumInitialCredit":12,"MinimumBaselineCredit":12,"MinimumMemorySize":4.0,"MaximumMemorySize":4.0,"MinimumGpuAmount":2,"MaximumGpuAmount":2}]
&SystemDiskCategories=["cloud"]
&Password=123abc****
&SystemDisk.Encrypted=false
&SystemDisk.KMSKeyId=0e478b7a-4262-4802-b8cb-00d3fb40****
&SystemDisk.EncryptAlgorithm=AES-256
&SystemDisk.ProvisionedIops=100
&SystemDisk.BurstingEnabled=false
&ImageOptions.LoginAsNonRoot=false
&DeletionProtection=false
&StorageSetId=ss-bp67acfmxazb4p****
&StorageSetPartitionNumber=2
&CustomPriorities=[{"InstanceType":"ecs.g6.large","VswitchId":"vsw-bp14zolna43z266bq****"}]
&NetworkInterfaces=[{"InstanceType":"Primary","NetworkInterfaceTrafficMode":"HighPerformance","Ipv6AddressCount":1,"SecurityGroupIds":["sg-2ze55shrh****"]}]
&DedicatedHostClusterId=dc-2zedxc67zqzt7lb4****
&SecurityOptions={"ConfidentialComputingMode":"TDX"}
&HttpEndpoint=enabled
&HttpTokens=optional
&InternetMaxBandwidthIn=10
&ResourcePoolOptions={"Strategy":"PrivatePoolFirst","PrivatePoolIds":["eap-bp67acfmxazb4****"]}
&<Common request parameters>

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyScalingConfigurationResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
</ModifyScalingConfigurationResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

For a list of error codes, see the Error Center.

HTTP status code

Error code

Error message

Description

403

Forbidden.Unauthorized

A required authorization for the specified action is not supplied.

You are not authorized to perform this operation.

404

InvalidDataDiskSnapshotId.NotFound

Snapshot "XXX" does not exist.

The specified snapshot does not exist.

400

InvalidDataDiskSnapshotId.SizeNotSupported

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

The size of the specified snapshot exceeds the disk size limit.

404

InvalidImageId.NotFound

The specified image does not exist.

The specified image does not exist.

400

InvalidKeyPairName.NotFound

The specified KeyPairName does not exist in our records.

The specified key pair name does not exist.

400

InvalidNetworkType.ForRAMRole

RAMRole can’t be used For classic instance.

Instances that are in the classic network do not support the RamRoleName parameter.

400

InvalidParamter

The specified value of parameter is not valid.

The specified parameter value is invalid.

400

InvalidScalingConfigurationName.Duplicate

The specified value of parameter is duplicated.

The scaling configuration name already exists.

400

InvalidSecurityGroupId.IncorrectNetworkType

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

The network type of the specified security group is different from the network type of the scaling group.

400

InvalidSecurityGroupId.VPCMismatch

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

The specified security group and vSwitch do not belong to the same VPC.

400

InvalidTags.KeyValue

The specified tags key/value cannot be empty.

The Tags parameter must be specified.

400

InvalidTags.ListSize

The specified tags list size cannot be more than "20".

The number of tags exceeds the limit.

400

InvalidUserData.Base64FormatInvalid

The specified parameter UserData must be base64 encoded.

The UserData is not Base64-encoded.

400

InvalidUserData.SizeExceeded

The specified parameter UserData exceeds the size.

The specified UserData is too long.

400

InvalidSecurityGroupId.IncorrectType

The managed security group "XXX" is not supported.

Managed security group "XXX" is not supported.