All Products
Search
Document Center

Auto Scaling:ModifyScalingConfiguration

Last Updated:Mar 06, 2026

If the current scaling configuration does not meet business requirements, you can modify the Elastic Compute Service (ECS) scaling configuration by calling the `ModifyScalingConfiguration` operation.

Operation description

  • If you change the name of a scaling configuration, ensure that no other scaling configuration in the same scaling group has the same name.

  • You can bind the primary elastic network interface (ENI) using either of the following methods. However, you must use only one method per API call. Using both methods in the same call causes the call to fail and returns an error message.

    • Set primary ENI configurations directly using parameters such as SecurityGroupId, SecurityGroupIds.N, and Ipv6AddressCount.

    • Use NetworkInterfaces.N to configure the primary and secondary ENIs. You must configure the primary ENI when using this parameter. To configure the primary ENI, set NetworkInterfaces.N.InstanceType to Primary. To configure a secondary ENI, set NetworkInterfaces.N.InstanceType to Secondary or leave it empty.

      Note

      When you modify a scaling configuration, configuring ENIs with one method deletes any configuration set by another method.

Try it now

You can run this operation in OpenAPI Explorer without calculating signatures. After successful execution, OpenAPI Explorer automatically generates SDK code examples.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

ModifyScalingConfiguration

Required parameter. Set the value to ModifyScalingConfiguration.

ScalingConfigurationId

String

Yes

asc-bp16har3jpj6fjbx****

The ID of the scaling configuration 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 pay-as-you-go instances. Valid values:

  • NoSpot: A standard pay-as-you-go instance.

  • SpotWithPriceLimit: A spot instance with a maximum price limit.

  • SpotAsPriceGo: A spot instance where Alibaba Cloud automatically bids based on the current market 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 (.). It must start with a letter, digit, or Chinese character.

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

InstanceName

String

No

inst****

The name of ECS instances created automatically using this scaling configuration.

HostName

String

No

hos****

The hostname of the ECS instance. The hostname cannot start or end with a period (.) or hyphen (-). Consecutive periods (.) or hyphens (-) are not allowed. Hostname requirements vary by instance type:

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

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

ImageId

String

No

centos6u5_64_20G_aliaegis_2014****.vhd

The ID of the image used to create instances automatically.

Note

If the original scaling configuration uses an image that includes both a system disk and a data disk, modifying the image clears the original data disk information.

ImageName

String

No

suse11sp3_64_20G_aliaegis_2015****.vhd

The name of the image. Image names must be unique within the same region. If you specify ImageId, ImageName is ignored.

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

Cpu

Integer

No

2

The number of vCPUs.

Specify both Cpu and Memory to define a range of instance types. For example, if Cpu = 2 and Memory = 16, Auto Scaling selects all instance types with 2 vCPUs and 16 GiB of memory. Auto Scaling then determines available instance types based on factors such as I/O optimization and zone, and creates the lowest-cost instance based on pricing.

Note

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

Memory

Integer

No

16

The memory size in GiB.

Specify both Cpu and Memory to define a range of instance types. For example, if Cpu = 2 and Memory = 16, Auto Scaling selects all instance types with 2 vCPUs and 16 GiB of memory. Auto Scaling then determines available instance types based on factors such as I/O optimization and zone, and creates the lowest-cost instance based on pricing.

Note

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

InternetChargeType

String

No

PayByBandwidth

The billing method for public network traffic. 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. You are billed based on actual network traffic.

InternetMaxBandwidthOut

Integer

No

10

The maximum outbound public bandwidth in 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: enterprise SSD.

  • ephemeral_ssd: local SSD.

  • cloud_auto: ESSD AutoPL disk.

You cannot specify this parameter together with SystemDiskCategories.N. If neither parameter is specified, the default value depends on the instance type and I/O optimization status: cloud for non-I/O optimized instances of Series I, and cloud_efficiency for all other cases.

SystemDisk.Size

Integer

No

50

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

  • basic disk: 20 to 500.

  • enterprise SSD:

    • PL0: 1 to 2048.

    • PL1: 20 to 2048.

    • PL2: 461 to 2048.

    • PL3: 1261 to 2048.

  • ESSD AutoPL disk: 1 to 2048.

  • All other disk types: 20 to 2048.

The value 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 and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter or Chinese character. It cannot start with http:// or https://.

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 applied to the system disk.

SystemDisk.PerformanceLevel

String

No

PL0

The performance level of the system disk when it is an enterprise SSD. Valid values:

  • PL0: Up to 10,000 random read/write IOPS per disk.

  • PL1: Up to 50,000 random read/write IOPS per disk.

  • PL2: Up to 100,000 random read/write IOPS per disk.

  • PL3: Up to 1,000,000 random read/write IOPS per disk.

Note

To learn how to select a performance level for enterprise SSDs, see Enterprise SSD.

LoadBalancerWeight

Integer

No

50

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

UserData

String

No

ZWNobyBoZWxsbyBlY3Mh

The custom data for the ECS instance. This data must be Base64-encoded. The raw data before encoding can be up to 32 KB.

KeyPairName

String

No

KeyPair_Name

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

  • For Windows instances, this parameter is ignored and defaults to empty.

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

RamRoleName

String

No

RamRoleTest

The name of the RAM role attached to the ECS instance. RAM roles are provided and maintained by RAM. To list available RAM roles, call the ListRoles operation. To create a RAM role, see the CreateRole operation.

PasswordInherit

Boolean

No

false

Specifies whether to use the preset password in the image. Ensure that the image has a password configured before using this parameter.

Tags

String

No

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

The tags for the ECS instance. Tags are passed as key-value pairs. You can specify up to 20 tags. Key and value requirements:

  • Keys can be up to 64 characters long. They cannot start with aliyun or acs:, and cannot contain http:// or https://. Keys cannot be empty.

  • Values can be up to 128 characters long. They cannot start with aliyun or acs:, and cannot contain http:// or https://. Values can be empty.

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. Instances in the same security group can communicate with each other.

Override

Boolean

No

true

Specifies whether to override existing settings. Valid values:

  • true: Override.

  • false: Do not override.

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 for the ENI.

CreditSpecification

String

No

Standard

The operating mode for burstable instances. Valid values:

ImageFamily

String

No

hangzhou-daily-update

The name of the image family. Use this parameter to get the latest available image in the image family for instance creation. You cannot specify this parameter if ImageId is already set.

ZoneId

String

No

cn-hangzhou-g

The ID of the zone in which the ECS instance resides.

DedicatedHostId

String

No

dh-bp67acfmxazb4p****

The ID of the Dedicated Host on which to create the ECS instance. Dedicated Hosts do not support spot instances. If you specify DedicatedHostId, SpotStrategy and SpotPriceLimit are ignored.

To query Dedicated Host IDs, call the DescribeDedicatedHosts operation.

Affinity

String

No

default

Specifies whether the instance is associated with the Dedicated Host. Valid values:

  • default: The instance is not associated with the Dedicated Host. If economical mode is enabled and the instance stops, it restarts on another Dedicated Host in the auto-deployment resource pool if the original Dedicated Host does not have sufficient resources.

  • host: The instance is associated with the Dedicated Host. If economical mode is enabled and the instance stops, it restarts on the original Dedicated Host. If the original Dedicated Host does not have sufficient resources, the restart fails.

Tenancy

String

No

default

Specifies whether to create the instance on a Dedicated Host. Valid values:

  • default: Create a non-Dedicated Host instance.

  • host: Create a Dedicated Host instance. If you do not specify DedicatedHostId, Alibaba Cloud automatically selects a Dedicated Host.

SchedulerOptions

Map

No

["testManagedPrivateSpaceId****"]

The scheduling options.

PrivatePoolOptions.MatchCriteria

String

No

Open

The private pool capacity option for instance startup. Elastic assurance or capacity reservation services generate private pool capacity for instance startup. Valid values:

  • Open: Open mode. Automatically matches open-type private pool capacity. If no matching private pool capacity is available, the instance starts using public pool resources. You do not need to specify PrivatePoolOptions.Id in this mode.

  • Target: Target mode. Starts the instance using the specified private pool capacity. If the specified private pool capacity is unavailable, the instance startup fails. You must specify the private pool ID, making PrivatePoolOptions.Id required in this mode.

  • None: No private pool mode. The instance starts without using private pool capacity.

PrivatePoolOptions.Id

String

No

eap-bp67acfmxazb4****

The ID of the private pool. This is the ID of the elastic assurance service or capacity reservation service.

SpotDuration

Integer

No

1

The retention duration for spot instances, in hours. Valid values:

  • 1: Alibaba Cloud guarantees that the instance runs for at least 1 hour before automatic release. After 1 hour, the system compares your bid price with the market price and checks inventory to decide whether to retain or reclaim the instance.

  • 0: Alibaba Cloud does not guarantee that the instance runs for 1 hour. The system compares your bid price with the market price and checks inventory to decide whether to retain or reclaim the instance.

Note

Alibaba Cloud sends a notification through an ECS system event 5 minutes before reclaiming the instance. Spot instances are billed per second. Choose a retention duration appropriate for your task duration.

Default value: 1.

SpotInterruptionBehavior

String

No

Terminate

The interruption behavior for spot instances. Only Terminate (default) is supported, which releases the instance immediately.

DataDisk.N.PerformanceLevel

String

No

PL1

The performance level of the data disk when it is an enterprise SSD. N must match the N in DataDisk.N.Category=cloud_essd. Valid values:

  • PL0: Up to 10,000 random read/write IOPS per disk.

  • PL1: Up to 50,000 random read/write IOPS per disk.

  • PL2: Up to 100,000 random read/write IOPS per disk.

  • PL3: Up to 1,000,000 random read/write IOPS per disk.

Note

To learn how to select a performance level for enterprise SSDs, see Enterprise SSD.

DataDisk.N.AutoSnapshotPolicyId

String

No

sp-bp19nq9enxqkomib****

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

DataDisk.N.Encrypted

String

No

false

Specifies whether the data disk is encrypted. Valid values for N: 1 to 16.

  • true: Encrypted.

  • false: Not encrypted.

DataDisk.N.Description

String

No

Test data disk.

The description of the data disk. Valid values for N: 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 used to create the data disk. Valid values for N: 1 to 16. If you specify this parameter, DataDisk.N.Size is ignored. The actual disk size equals the snapshot size.

If the snapshot was created on or before July 15, 2013, the request is rejected with the error code InvalidSnapshot.TooOld.

DataDisk.N.Categories.N

String

No

cloud

The categories of the data disk. The first N indicates the Nth data disk (valid values: 1 to 16). The second N indicates the Nth category for the Nth data disk (valid values: 1 to 4). You can specify up to four categories per scaling configuration. Lower N values indicate higher priority. If a higher-priority category is unavailable, Auto Scaling tries the next priority. Valid values:

  • cloud: basic disk. The DeleteWithInstance property of basic disks created with instances is true.

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: enterprise SSD.

Note

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

DataDisk.N.Size

Integer

No

100

The size of the data disk in GiB. Valid values for N: 1 to 16.

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

DataDisk.N.Device

String

No

/dev/xvdb

The mount point of the data disk. Valid values for N: 1 to 16. If you do not specify this parameter, the system assigns a mount point automatically, starting from /dev/xvdb to /dev/xvdz.

DataDisk.N.DiskName

String

No

cloud_ssdData

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

DataDisk.N.Category

String

No

cloud_ssd

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

  • cloud: basic disk. The DeleteWithInstance property of basic disks created with instances is true.

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: enterprise SSD.

  • ephemeral_ssd: local SSD.

  • cloud_auto: ESSD AutoPL disk.

You cannot specify this parameter together with DataDisk.N.Categories.N. If neither parameter is specified, the default value depends on the instance type:

  • I/O optimized instances: cloud_efficiency.

  • Non-I/O optimized instances: cloud.

DataDisk.N.DeleteWithInstance

Boolean

No

true

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

  • true: Release the disk when releasing the instance.

  • false: Keep the disk when releasing the instance.

This parameter applies only to independent cloud disks (DataDisk.N.Category is cloud, cloud_efficiency, cloud_ssd, or cloud_essd). Otherwise, an error occurs.

DataDisk.N.KMSKeyId

String

No

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

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

DataDisk.N.ProvisionedIops

Long

No

100

The provisioned IOPS (input/output operations per second) performance metric for the data disk.

Note

IOPS measures the number of I/O operations processed per second, indicating block storage read/write capability. Unit: operations per second.

DataDisk.N.BurstingEnabled

Boolean

No

false

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

  • true: Enable.

  • false: Not enabled.

    Note

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

SpotPriceLimit.N.PriceLimit

Float

No

0.125

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

SpotPriceLimit.N.InstanceType

String

No

ecs.g6.large

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

InstanceTypes.N

String

No

ecs.g6.large

The multi-instance type parameter. If you specify InstanceTypes.N, InstanceType is ignored. Valid values for N: 1 to 20. You can specify up to 20 instance types per scaling configuration.

N represents the priority of the instance type in the scaling configuration. Instance type 1 has the highest priority. Priority decreases as N increases. If Auto Scaling cannot create an instance using a higher-priority instance type, it automatically selects the next priority.

InstanceTypeOverride.N.InstanceType

String

No

ecs.c5.xlarge

Specify this parameter and InstanceTypeOverride.N.WeightedCapacity to define the capacity of instance types in the scaling configuration.

This parameter specifies the instance type. You can specify up to 20 values for N. Combined with InstanceTypeOverride.N.WeightedCapacity, it extends multi-instance type support for custom weights.

Note

You cannot specify this parameter together with InstanceTypes.

Valid values: Available ECS instance types. For more information, see Instance families.

InstanceTypeOverride.N.WeightedCapacity

Integer

No

4

Specify this parameter after InstanceTypeOverride.N.InstanceType to define the capacity of instance types in the scaling configuration. The two parameters correspond one-to-one, and N must match.

This parameter specifies the weight of the instance type, representing its capacity in the scaling group. A higher weight means fewer instances are needed to meet the desired capacity.

Because instance types differ in vCPU count, memory size, and other metrics, assign different weights based on your needs.

Example:

  • Current capacity: 0.

  • Desired capacity: 6.

  • Capacity of ecs.c5.xlarge: 4.

To meet the desired capacity, the scaling group adds two ecs.c5.xlarge instances.

Note

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

Valid values: 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 for filtering instance types in intelligent configuration mode. For more information, see Instance families. Valid values for N: 1 to 10.

Note the following:

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

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

  • If you specify instance types using InstanceType or InstanceTypes.N, Auto Scaling prioritizes those types for scale-out. If those types are unavailable, Auto Scaling selects the lowest-cost instance type that matches InstancePatternInfo.N.

InstancePatternInfo.N.InstanceFamilyLevel

String

No

EnterpriseLevel

The instance family level for filtering instance types in intelligent configuration mode. Valid values:

  • EntryLevel: Entry-level, such as shared-resource instances. Lower cost but no guaranteed computing performance stability. Suitable for workloads with low average CPU usage. For more information, see Shared-resource instances.

  • EnterpriseLevel: Enterprise-level. Stable performance and dedicated resources. Suitable for workloads requiring high stability. For more information, see Instance families.

  • CreditEntryLevel: Credit entry-level, such as burstable instances. Uses CPU credits to guarantee computing performance. Suitable for workloads with low average CPU usage and occasional CPU bursts. For more information, see Burstable instances.

Valid values for N: 1 to 10.

InstancePatternInfo.N.MaxPrice

Float

No

2

The maximum hourly price for pay-as-you-go or spot instances in intelligent configuration mode. Used to filter instance types. Valid values for N: 1 to 10.

Note

This parameter is required when SpotStrategy is set to SpotWithPriceLimit. Otherwise, it is optional.

InstancePatternInfo.N.Memory

Float

No

4

The memory size in GiB for filtering instance types in intelligent configuration mode. For more information, see Instance families. Valid values for N: 1 to 10.

InstancePatternInfo.N.Architecture.N

String

No

X86

The architecture type of the instance family. Valid values:

  • X86: X86 computing.

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

  • BareMental: ECS Bare Metal Instance.

  • Arm: Arm computing.

Default value: All architecture types.

InstancePatternInfo.N.BurstablePerformance

String

No

Include

Specifies whether to include burstable instance types. Valid values:

  • Exclude: Exclude burstable instance types.

  • Include: Include burstable instance types.

  • Required: Include only burstable instance types.

Default value: Include.

InstancePatternInfo.N.ExcludedInstanceType.N

String

No

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

The instance types to exclude. Use wildcard characters (*) to exclude individual types or entire families. Examples:

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

  • ecs.c6.*: Excludes all instance types in the c6 family.

Note

To exclude multiple instance types, separate them with forward slashes (/). Example: ecs.n1.small/ecs.n1.*/*7*.

InstancePatternInfo.N.InstanceTypeFamilies.N

String

No

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

The instance families to use. N indicates the number of families you can specify. Valid values for N: 1 to 10.

InstancePatternInfo.N.MinimumCpuCoreCount

Integer

No

2

The minimum number of vCPU cores.

InstancePatternInfo.N.MaximumCpuCoreCount

Integer

No

4

The maximum number of vCPU cores.

Note

MaximumCpuCoreCount cannot exceed four times the value of MinimumCpuCoreCount.

InstancePatternInfo.N.GpuSpecs.N

String

No

["NVIDIA V100"]

The GPU type.

InstancePatternInfo.N.InstanceCategories.N

String

No

Compute-optimized with GPU

The instance category.

Note

N indicates the number of categories you can specify. Valid values for N: 1 to 10.

  • General-purpose.

  • Compute-optimized.

  • Memory-optimized.

  • Big data.

  • Local SSDs.

  • High Clock Speed.

  • Enhanced.

  • Shared.

  • Compute-optimized with GPU.

  • Visual Compute-optimized.

  • Heterogeneous Service.

  • Compute-optimized with FPGA.

  • Compute-optimized with NPU.

  • ECS Bare Metal.

  • High Performance Compute.

InstancePatternInfo.N.CpuArchitectures.N

String

No

["X86", "ARM"]

The CPU architecture. Valid values:

Note

N indicates the number of architectures you can specify. Valid values for N: 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. N indicates the number of models you can specify. Valid values for N: 1 to 10.

InstancePatternInfo.N.MinimumEniQuantity

Integer

No

2

The minimum number of ENIs the instance supports.

InstancePatternInfo.N.MinimumEniPrivateIpAddressQuantity

Integer

No

2

The maximum number of IPv4 addresses for each ENI on the instance.

InstancePatternInfo.N.MinimumEniIpv6AddressQuantity

Integer

No

1

The maximum number of IPv6 addresses to assign to each elastic network interface (ENI) of the instance.

InstancePatternInfo.N.MinimumInitialCredit

Integer

No

12

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

InstancePatternInfo.N.MinimumBaselineCredit

Integer

No

12

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

InstancePatternInfo.N.MinimumMemorySize

Float

No

4

The minimum memory size in GiB.

InstancePatternInfo.N.MaximumMemorySize

Float

No

4

The maximum memory size in GiB.

InstancePatternInfo.N.MinimumGpuAmount

Integer

No

2

The minimum number of GPUs. Valid values: Positive integers ≥ 1.

InstancePatternInfo.N.MaximumGpuAmount

Integer

No

2

The maximum number of GPUs. Valid values: Positive integers ≥ 1.

SystemDiskCategories.N

String

No

cloud

The categories of the system disk. Valid values for N: 1 to 4. You can specify up to four categories per scaling configuration. Lower N values indicate higher priority. If a higher-priority category is unavailable, Auto Scaling tries the next priority. Valid values:

  • cloud: basic disk.

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: enterprise SSD.

Note

You cannot specify this parameter together with SystemDisk.Category.

Password

String

No

123abc****

The password for 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. Valid special characters include the following:

()~!@#$%^&*-_+=\|{}[]:;'<>,.?/ Note: For Windows instances, the password cannot start with a forward slash (/). > To avoid password leaks, use HTTPS to send requests that include the Password parameter.

SystemDisk.Encrypted

Boolean

No

false

Specifies whether to encrypt the system disk. Valid values:

  • true: Encrypt.

  • false: Do not encrypt.

Default value: false.

SystemDisk.KMSKeyId

String

No

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

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

SystemDisk.EncryptAlgorithm

String

No

AES-256

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

  • AES-256.

  • SM4-128.

Default value: AES-256.

SystemDisk.ProvisionedIops

Long

No

100

The provisioned IOPS (input/output operations per second) performance metric for the system disk.

Note

IOPS measures the number of I/O operations processed per second, indicating block storage read/write capability. Unit: operations per second.

SystemDisk.BurstingEnabled

Boolean

No

false

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

  • true: Enable.

  • false: Disabled.

    Note

    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. For more information, see Manage login names for ECS instances. Valid values:

  • true: Yes.

  • false: No.

DeletionProtection

Boolean

No

false

The deletion protection setting for the ECS instance. This setting applies only to pay-as-you-go instances and controls whether the instance can be deleted directly from the ECS console or by calling the DeleteInstance operation. Valid values:

  • true: Enable deletion protection. The instance cannot be deleted directly from the ECS console or by calling DeleteInstance (prevents accidental deletion of instances created by Auto Scaling).

  • false: Disable deletion protection. The instance can be deleted directly from the ECS console or by calling DeleteInstance.

Note

This setting does not affect normal scale-in activities. During scale-in, pay-as-you-go instances with deletion protection enabled can still be released normally.

StorageSetId

String

No

ss-bp67acfmxazb4p****

The ID of the storage set.

StorageSetPartitionNumber

Integer

No

2

The maximum number of partitions in the storage set. Valid values: Integers ≥ 2.

CustomPriorities.N.InstanceType

String

No

ecs.g6.large

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

Note

This parameter is valid only when the scaling group's scaling policy is set to Priority Policy, and the specified instance type must be included in the scaling configuration's instance type list.

If Auto Scaling cannot create an ECS instance using a higher-priority ECS instance type + vSwitch combination, it automatically selects the next priority combination.

Note

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

CustomPriorities.N.VswitchId

String

No

vsw-bp14zolna43z266bq****

The ID of the vSwitch in the custom priority.

Note

This parameter is valid only when the scaling group's scaling policy is set to Priority Policy, and the specified vSwitch must be included in the scaling group's vSwitch list.

NetworkInterfaces.N.InstanceType

String

No

Primary

The type of the ENI. When you use this parameter, you must configure the primary ENI using NetworkInterfaces.N. You cannot specify SecurityGroupId or SecurityGroupIds.N at the same time. Valid values:

  • Primary: Primary ENI.

  • Secondary: Secondary ENI.

Default value: Secondary.

NetworkInterfaces.N.NetworkInterfaceTrafficMode

String

No

HighPerformance

The communication mode of the ENI. Valid values:

  • Standard: TCP communication mode.

  • HighPerformance: RDMA communication mode using the Elastic RDMA Interface (ERI).

Default value: Standard.

Note

The number of RDMA-mode ENIs cannot exceed the limit for the instance family. For more information, see Instance families.

NetworkInterfaces.N.Ipv6AddressCount

Integer

No

1

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

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

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

  • If you set this parameter, you cannot set Ipv6AddressCount.

NetworkInterfaces.N.SecurityGroupIds.N

String

No

sg-2ze55shrh****

The ID of one or more security groups for the ENI. Note the following:

  • If NetworkInterfaces.N.InstanceType is set to Primary, you must specify this parameter. In this case, it functions the same as SecurityGroupIds.N, but you cannot specify SecurityGroupId or SecurityGroupIds.N at the same time.

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

NetworkInterfaces.N.SecondaryPrivateIpAddressCount

Integer

No

2

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

  • The value cannot exceed the IP address limit for the instance type. For more information, see Instance families.

  • NetworkInterface.N.SecondaryPrivateIpAddressCount specifies the number of secondary private IPv4 addresses assigned to the ENI (excluding the ENI's primary private IP). The system randomly assigns addresses from the available CIDR block of the vSwitch specified by NetworkInterface.N.VSwitchId.

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 access to instance metadata. Valid values:

  • enabled: Enable.

  • disabled: Disable.

Default value: enabled.

Note

For more information about instance metadata, see Instance metadata overview.

HttpTokens

String

No

optional

Specifies whether to enforce the secure mode (IMDSv2) for accessing instance metadata. Valid values:

  • optional: Do not enforce.

  • required: Enforce. With this setting, the standard mode cannot access instance metadata.

Default value: optional.

Note

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

InternetMaxBandwidthIn

Integer

No

10

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

  • If the purchased outbound public bandwidth is ≤ 10 Mbit/s: 1 to 10. Default: 10.

  • If the purchased outbound public bandwidth is > 10 Mbit/s: 1 to InternetMaxBandwidthOut. Default: InternetMaxBandwidthOut.

ResourcePoolOptions.Strategy

String

No

PrivatePoolFirst

The resource pool includes private pools generated by elastic assurance or capacity reservation services, and public pools, for instance startup. Valid values:

  • PrivatePoolFirst: Private pool first. When you specify ResourcePoolOptions.PrivatePoolIds, this strategy prioritizes the specified private pools. If no private pool is specified or the specified private pool lacks capacity, the system automatically matches open-type private pools. If no matching private pool is available, the system uses the public pool.

  • PrivatePoolOnly: Private pool only. You must specify ResourcePoolOptions.PrivatePoolIds. If the specified private pool lacks capacity, instance startup fails.

  • PublicPoolFirst: Use public pool resources first. The system prioritizes creating instances from the public pool. If public pool resources are insufficient, it supplements capacity using private pool resources. When you specify ResourcePoolOptions.PrivatePoolIds, the system prioritizes the specified private pools. If no private pools are specified or the specified private pools lack sufficient capacity, the system automatically matches open-type private pools.

    Note

    This policy is in invitational preview and is not yet available for use.

  • None: No resource pool strategy.

Default value: None.

ResourcePoolOptions.PrivatePoolIds.N

String

No

eap-bp67acfmxazb4****

The ID of the private pool. This is the ID of the elastic assurance service or capacity reservation service. You can specify only Target mode private pool IDs. Valid values for N: 1 to 20.

Response parameters

Parameter

Type

Example

Description

RequestId

String

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

The request ID.

Examples

Sample requests

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 success 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 more error codes, see 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 action.

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 KeyPairName does not exist.

400

InvalidNetworkType.ForRAMRole

RAMRole can’t be used For classic instance.

The RamRoleName parameter is not supported for classic network instances.

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 does not match 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 are not in the same VPC.

400

InvalidTags.KeyValue

The specified tags key/value cannot be empty.

You must specify the Tags parameter.

400

InvalidTags.ListSize

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

The number of tags exceeds the limit of 20.

400

InvalidUserData.Base64FormatInvalid

The specified parameter UserData must be base64 encoded.

The UserData parameter does not conform to Base64 encoding standards.

400

InvalidUserData.SizeExceeded

The specified parameter UserData exceeds the size.

The specified UserData is too large.

400

InvalidSecurityGroupId.IncorrectType

The managed security group "XXX" is not supported.

The managed security group "XXX" is not supported.