All Products
Search
Document Center

Auto Scaling:ModifyScalingConfiguration

Last Updated:Apr 25, 2024

Modifies scaling configurations of the Elastic Compute Service (ECS) type. A scaling configuration is a template based on which ECS instances are scaled out. If your scaling configuration does not meet your business requirements, you can call the ModifyScalingConfiguration operation to modify your scaling configuration.

Usage notes

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

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

    • Specify SecurityGroupId, SecurityGroupIds.N, and Ipv6AddressCount to configure primary ENI-related information.

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

      Note

      If you use one of the preceding methods to modify ENI information when you call the ModifyScalingConfiguration operation, the ENI information configured by using the other method is cleared.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 to create I/O optimized instances. Valid values:

  • none: does not create I/O optimized instances.

  • optimized: creates I/O optimized instances.

SpotStrategy

String

No

NoSpot

The preemption policy that you want to apply to a pay-as-you-go or preemptible instance. Valid values:

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

  • SpotWithPriceLimit: The instance is a preemptible instance for which you specify the maximum hourly price.

  • SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is 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 (.). It must start with a letter or a digit.

The name of a scaling configuration must be unique in a region. If you do not specify this parameter, the value of ScalingConfigurationId is used.

InstanceName

String

No

inst****

The naming series of the ECS instances that Auto Scaling creates based on the scaling configuration.

HostName

String

No

hos****

The hostname series of the ECS instances. A hostname cannot start or end with a period (.) or a hyphen (-). It cannot contain consecutive periods (.) or hyphens (-). Naming conventions for different types of instances:

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

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

ImageId

String

No

centos6u5_64_20G_aliaegis_2014****.vhd

The ID of the image that Auto Scaling uses to automatically create ECS instances.

Note

If the image that is specified in the scaling configuration contains system disks and data disks, the data that is stored in the data disks is cleared after you modify the image.

ImageName

String

No

suse11sp3_64_20G_aliaegis_2015****.vhd

The name of the image. The name must be unique in a 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.

You can specify the number of vCPUs and the memory size to define the range of instance types. For example, you can set CPU to 2 and Memory to 16 to specify the instance types that have 2 vCPUs and 16 GiB of memory. If you specify CPU and Memory, Auto Scaling determines the available instance types based on factors such as I/O optimization requirements and zones. Then, Auto Scaling preferentially creates instances by using the lowest-priced instance type.

Note

You can specify CPU and Memory to define the range of instance types only if you set Scaling Policy to Cost Optimization Policy and you do not specify an instance type in the scaling configuration.

Memory

Integer

No

16

The memory size.

You can specify the number of vCPUs and the memory size to define the range of instance types. For example, you can set CPU to 2 and Memory to 16 to specify the instance types that have 2 vCPUs and 16 GiB of memory. If you specify CPU and Memory, Auto Scaling determines the available instance types based on factors such as I/O optimization requirements and zones. Then, Auto Scaling preferentially creates instances by using the lowest-priced instance type.

Note

You can specify the number of vCPUs and the memory size to determine the range of instance types only if the Scaling Policy parameter is set to Cost Optimization Policy and no instance type is specified in the scaling configuration.

InternetChargeType

String

No

PayByBandwidth

The billing method for network usage. Valid values:

  • PayByBandwidth: pay-by-bandwidth. You are charged for the maximum available bandwidth that is specified by InternetMaxBandwidthOut.

  • PayByTraffic: pay-by-traffic. You are charged for the actual data transfers. InternetMaxBandwidthOut specifies only the maximum available bandwidth.

InternetMaxBandwidthOut

Integer

No

50

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

  • 0 to 1024 if you set InternetChargeType to PayByBandwidth. If you leave this parameter empty, this parameter is automatically set to 0.

  • 0 to 1024 if you set InternetChargeType to PayByTraffic. If you leave this parameter empty, an error is reported.

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: enhanced SSD (ESSD)

  • ephemeral_ssd: local SSD

  • cloud_auto: ESSD AutoPL disk

If you specify SystemDisk.Category, you cannot specify SystemDiskCategories.N. If you do not specify SystemDisk.Category or SystemDiskCategories.N, the default value of SystemDisk.Category is used. For non-I/O optimized instances of Generation I instance types, the default value is cloud. For instances of other instance types, the default value is cloud_efficiency.

SystemDisk.Size

Integer

No

50

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

  • 20 to 500 if you set SystemDisk.Category cloud.

  • 20 to 500 if you set SystemDisk.Category to cloud_efficiency.

  • 20 to 500 if you set SystemDisk.Category to cloud_ssd.

  • 20 to 500 if you set SystemDisk.Category to cloud_essd.

  • 20 to 500 if you set SystemDisk.Category to cloud_essd.

The value of SystemDisk.Size must be greater than or equal to the value of max{20, 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 but 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. It can contain letters but cannot start with http:// or https://.

SystemDisk.AutoSnapshotPolicyId

String

No

sp-bp12m37ccmxvbmi5****

The ID of the automatic snapshot policy that you want to apply to the system disk.

SystemDisk.PerformanceLevel

String

No

PL0

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

  • PL0: An ESSD can provide up to 10,000 random read/write IOPS.

  • PL1: An ESSD can provide up to 50,000 random read/write IOPS.

  • PL2: An ESSD can provide up to 100,000 random read/write IOPS.

  • PL3: An ESSD can provide up to 1,000,000 random read/write IOPS.

Note

For more information about how to select ESSD PLs, see ESSDs.

LoadBalancerWeight

Integer

No

50

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

UserData

String

No

echo hello ecs!

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

KeyPairName

String

No

KeyPair_Name

The name of the key pair that you want to use to log on to the ECS instance.

  • Windows instances do not support this parameter.

  • By default, the username and password authentication method is disabled for Linux instances.

RamRoleName

String

No

RamRoleTest

The name of the Resource Access Management (RAM) role that you want to attach to the ECS instance. The name is provided and maintained by RAM. You can call the ListRoles operation to query the available RAM roles. You can call the CreateRole operation to create RAM roles.

PasswordInherit

Boolean

No

false

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

Tags

String

No

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

The tags of the ECS instances. The tags must be specified in the key-value format. You can specify up to 20 tags for each instance. Take note of the following items when you specify tag keys and tag values:

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

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

DeploymentSetId

String

No

ds-bp13v7bjnj9gis****

The ID of the deployment set of the ECS instances.

SecurityGroupId

String

No

sg-F876F****

The ID of the security group with which the ECS instances are associated. ECS instances that are associated with the same security group can communicate with each other.

Override

Boolean

No

true

Specifies whether to override existing data. Valid values:

  • true

  • false

ResourceGroupId

String

No

abcd1234abcd****

The ID of the resource group to which the ECS instances belong.

HpcClusterId

String

No

hpc-clusterid

The ID of the Elastic High Performance Computing (E-HPC) cluster to which the ECS instances belong.

InstanceDescription

String

No

Test instance.

The description of the ECS instances. The description must be 2 to 256 characters in length. It can contain letters but cannot start with http:// or https://.

Ipv6AddressCount

Integer

No

1

The number of randomly generated IPv6 addresses that you want to allocate 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 specify this parameter to obtain the latest available images in the current image family for instance creation. If you specify ImageId, you cannot specify ImageFamily.

ZoneId

String

No

cn-hangzhou-g

The zone ID of the ECS instances.

DedicatedHostId

String

No

dh-bp67acfmxazb4p****

The ID of the dedicated host on which you can create ECS instances. You cannot create preemptible instances on dedicated hosts. If you specify DedicatedHostId, SpotStrategy and SpotPriceLimit are ignored.

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

Affinity

String

No

default

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

  • default: does not associate the ECS instances with the dedicated host. If you restart an instance that was stopped in Economical Mode and the original dedicated host has insufficient resources, the instance is automatically deployed to another dedicated host in the automatic deployment resource pool.

  • host: associates the ECS instances with the dedicated host. If you start an instance that was stopped in Economical Mode, the instance remains on the original dedicated host. If the available resources of the original dedicated host are insufficient, the instance cannot be restarted.

Tenancy

String

No

default

Specifies whether to create ECS instances on a dedicated host. Valid values:

  • default: does not create ECS instances on a dedicated host.

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

SchedulerOptions

Map

No

["testManagedPrivateSpaceId****"]

The scheduler options.

PrivatePoolOptions.MatchCriteria

String

No

Open

The type of the private pool. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. You can select a private pool for Auto Scaling to start instances. Valid values:

  • Open: open private pool. Auto Scaling selects a matching open private pool to start ECS instances. If no matching open private pools exist, Auto Scaling uses the resources in the public pool to start ECS instances. In this case, you do not need to specify PrivatePoolOptions.Id.

  • Target: specified private pool. Auto Scaling uses the resources in the specified private pool to start instances. If the specified private pool is unavailable, Auto Scaling cannot start instances. If you set this parameter to Target, you must specify PrivatePoolOptions.Id.

  • None: no private pool. Auto Scaling does not use the resources in private pools to start ECS instances.

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 for which the private pool is generated.

SpotDuration

Integer

No

1

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

  • 1: After a preemptible instance is created, Alibaba Cloud ensures that the instance is not automatically released within one hour. After the one-hour protection period ends, Alibaba Cloud compares the bidding price with the market price and checks the resource inventory to determine whether to release the instance.

  • 0: After a preemptible instance is created, Alibaba Cloud does not ensure that the instance is not automatically released within one hour. Alibaba Cloud compares the biding price with the market price and checks the resource inventory to determine whether to release the instance.

Note

Alibaba Cloud sends ECS system events to notify you five minutes before the instance is released. Preemptible instances are billed by second. We recommend that you specify a protection period based on your business requirements.

Default value: 1.

SpotInterruptionBehavior

String

No

Terminate

The interruption mode of preemptible instances. Default value: Terminate. Set the value to Terminate, which specifies that the preemptible instance is to be released.

DataDisk.N.PerformanceLevel

String

No

PL1

The PL of data disk N that is an ESSD. If you set DataDisk.N.Category to cloud_essd, the value of N in this parameter must be the same as the value of N in DataDisk.N.Category. Valid values:

  • PL0: An ESSD can provide up to 10,000 random read/write IOPS.

  • PL1: An ESSD can provide up to 50,000 random read/write IOPS.

  • PL2: An ESSD can provide up to 100,000 random read/write IOPS.

  • PL3: An ESSD can provide up to 1,000,000 random read/write IOPS.

Note

For more information about how to select ESSD PLs, see ESSDs.

DataDisk.N.AutoSnapshotPolicyId

String

No

sp-bp19nq9enxqkomib****

The ID of the automatic snapshot policy that you want to apply to data disk N. Valid values of N: 1 to 16.

DataDisk.N.Encrypted

String

No

false

Specifies whether to encrypt data disk N. Valid values of N: 1 to 16. Valid values:

  • true

  • false

DataDisk.N.Description

String

No

Test data disk.

The description of data disk N. Valid values of N: 1 to 16. The description must be 2 to 256 characters in length. It can contain letters but cannot start with http:// or https://.

DataDisk.N.SnapshotId

String

No

s-snapshot****

The ID of the snapshot that you want to use to create data disk N. Valid values of N: 1 to 16. If you specify this parameter, DataDisk.N.Size is ignored. The size of the data disk is the same as the size of the specified snapshot.

If you specify a snapshot that was created on or before July 15, 2013, the operation fails and InvalidSnapshot.TooOld is returned.

DataDisk.N.Categories.N

String

No

cloud

Category N of data disk N. The first N in DataDisk.N.Categories.N represents the serial number of the data disk. Valid values of the first N: 1 to 16. The second N in DataDisk.N.Categories.N represents the serial number of the data disk category. Valid values of the second N: 1 to 4. A smaller value of N specifies a higher priority. If Auto Scaling cannot use the disk category of the highest priority, Auto Scaling uses the disk category of the next highest priority. Valid values:

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

  • cloud_efficiency: utra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

Note

If you specify this parameter, you cannot specify DataDisk.N.Category.

DataDisk.N.Size

Integer

No

100

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

  • 5 to 2000 if you set DataDisk.N.Category to cloud.

  • 20 to 32768 if you set DataDisk.N.Category to cloud_efficiency.

  • 20 to 32768 if you set DataDisk.N.Category to cloud_essd.

  • 5 to 800 if you set DataDisk.N.Category to ephemeral_ssd.

The size of data disk N must be greater than or equal to the size of the snapshot that is specified by SnapshotId.

DataDisk.N.Device

String

No

/dev/xvdb

The mount target of data disk N. Valid values of N: 1 to 16. If you do not specify this parameter, the system automatically assigns a mount target when Auto Scaling creates ECS instances. The name of the mount target ranges from /dev/xvdb to /dev/xvdz.

DataDisk.N.DiskName

String

No

cloud_ssdData

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

DataDisk.N.Category

String

No

cloud_ssd

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

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

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: ESSD.

  • ephemeral_ssd: local SSD.

  • cloud_auto: ESSD AutoPL disk.

If you specify DataDisk.N.Category, you cannot specify DataDisk.N.Categories.N. If you do not specify DataDisk.N.Category or DataDisk.N.Categories.N, the default value of DataDisk.N.Category is used.

  • The default value of this parameter is cloud_efficiency for I/O optimized instances.

  • The default value of this parameter is cloud for non-I/O optimized instances.

DataDisk.N.DeleteWithInstance

Boolean

No

true

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

  • true

  • false

This parameter is available only for independent disks whose DataDisk.N.Category is set to cloud, cloud_efficiency, cloud_ssd, or cloud_essd. If you specify this parameter for disks of other categories, an error is reported.

DataDisk.N.KMSKeyId

String

No

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

The ID of the Key Management Service (KMS) key that you want to use to encrypt data disk N. Valid values of N: 1 to 16.

DataDisk.N.ProvisionedIops

Long

No

100

The provisioned IOPS of data disk N.

Note

IOPS measures the number of read and write operations that an Elastic Block Storage (EBS) device can process per second.

DataDisk.N.BurstingEnabled

Boolean

No

false

Specifies whether to enable the Burst feature for data disk N. Valid values:

  • true

  • false

    Note

    This parameter is available only if you set DataDisk.Category to cloud_auto.

SpotPriceLimit.N.PriceLimit

Float

No

0.125

The price limit of preemptible instance N. Valid values of N: 1 to 10. This parameter takes effect only if you set SpotStrategy to SpotWithPriceLimit.

SpotPriceLimit.N.InstanceType

String

No

ecs.g6.large

The instance type of preemptible instance N. Valid values of N: 1 to 10. This parameter takes effect only if you set SpotStrategy to SpotWithPriceLimit.

InstanceTypes.N

String

No

ecs.g6.large

Instance type N. If you specify this parameter, InstanceType is ignored. Valid values of N: 1 to 10.

The first instance type that is specified by using InstanceTypes.N has the highest priority. The priority decreases based on the specified order of instance types. Auto Scaling creates instances based on the priorities of the instance types. If Auto Scaling cannot create instances of the instance type that has the highest priority, it creates instances of the instance type that has the next highest priority.

InstanceTypeOverride.N.InstanceType

String

No

ecs.c5.xlarge

If you want to specify the weight of instance type N in the scaling configuration, you must specify InstanceTypeOverride.N.WeightedCapacity after you specify InstanceTypeOverride.N.InstanceType.

You can use InstanceTypeOverride.N.InstanceType to specify multiple instance types and use InstanceTypeOverride.N.WeightedCapacity to specify weights for the instance types. Valid values of N: 1 to 10.

Note

If you specify InstanceTypeOverride.N.InstanceType, you cannot specify InstanceTypes.

For information about the valid values of InstanceType in InstanceTypeOverride.N.InstanceType, see Overview of instance families.

InstanceTypeOverride.N.WeightedCapacity

Integer

No

4

The weight of instance type N. If you want to specify the weight of instance type N in the scaling configuration, specify InstanceTypeOverride.N.WeightedCapacity after you specify InstanceTypeOverride.N.InstanceType. The values of N in the two parameters must be the same.

The weight specifies the capacity of an instance of instance type N in the scaling group. A higher weight specifies that a smaller number of instances of the specified instance type are required to meet the expected capacity requirement.

Performance metrics such as the number of vCPUs and memory size of each instance type may vary. You can specify different weights for different instance types based on your business requirements.

Example:

  • Current capacity: 0

  • Expected capacity: 6

  • Capacity of ecs.c5.xlarge: 4

To meet the expected capacity requirement, Auto Scaling must scale out two ecs.c5.xlarge instances.

Note

The capacity of the scaling group during a scale-out cannot exceed the sum of the maximum number of instances that is specified by MaxSize and the maximum instance type weight.

Valid values of WeightedCapacity in InstanceTypeOverride.N.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 vCPUs that you want to allocate to instance type N in intelligent configuration mode. You can specify this parameter to filter the instance types that meet the specified criteria. For more information, see Overview of instance families. Valid values of N: 1 to 10.

When you specify this parameter, take note of the following items:

  • InstancePatternInfo.N is available only for scaling groups that reside in virtual private clouds (VPCs).

  • If you specify InstancePatternInfo.N, you must also specify InstancePatternInfo.N.Cores and InstancePatternInfo.N.Memory.

  • If you specify an instance type by using InstanceType or InstanceTypes.N, Auto Scaling preferentially uses the instance type that is specified by InstanceType or InstanceTypes.N for scale-outs. If the specified instance type does not have sufficient inventory, Auto Scaling uses the lowest-priced instance type that is specified by InstancePatternInfo.N.

InstancePatternInfo.N.InstanceFamilyLevel

String

No

EnterpriseLevel

The level of instance type N in intelligent configuration mode. You can specify this parameter to filter the instance types that meet the specified criteria. Valid values:

  • EntryLevel: entry level (shared instance types). Instance types of this level are the most cost-effective, but may not provide stable computing performance in a consistent manner. Instance types of this level are suitable for scenarios in which CPU utilization is low. For more information, see Shared instance families.

  • EnterpriseLevel: enterprise level. Instance types of this level provide stable performance and dedicated resources and are suitable for scenarios that require high stability. For more information, see Overview of instance families.

  • CreditEntryLevel: credit entry level (burstable instance types). CPU credits are used to ensure computing performance. Instance types of this level are suitable for scenarios in which the CPU utilization is low but may fluctuate in specific cases. For more information, see Overview.

Valid values of N: 1 to 10.

InstancePatternInfo.N.MaxPrice

Float

No

2

The maximum price per hour for pay-as-you-go instance N or preemptible instance N in intelligent configuration mode. You can specify this parameter to filter the instance types that meet the specified criteria. Valid values of N: 1 to 10.

Note

If you set SpotStrategy to SpotWithPriceLimit, you must specify this parameter. In other cases, you do not need to specify this parameter.

InstancePatternInfo.N.Memory

Float

No

4

The memory size of instance type N in intelligent configuration mode. Unit: GiB. You can specify this parameter to filter the instance types that meet the specified criteria. For more information, see Overview of instance families. Valid values of N: 1 to 10.

InstancePatternInfo.N.Architecture.N

String

No

X86

Architecture N of instance type N. Valid values:

  • X86: x86

  • Heterogeneous: heterogeneous computing, such as GPU-accelerated or FPGA-accelerated

  • BareMetal: ECS Bare Metal Instance

  • Arm: Arm

  • SuperComputeCluster: Super Computing Cluster

By default, all values are selected.

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*

Instance type N that you want to exclude. You can use wildcard characters such as an asterisk (*) to exclude an instance type or an instance family. Examples:

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

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

Note

Separate multiple instance types with forward slashes (/). Example: ecs.n1.small/ecs.n1.*/*7*.

SystemDiskCategories.N

String

No

cloud

Category N of the system disk. Valid values of N: 1 to 4. A smaller value of N specifies a higher priority. If Auto Scaling cannot create instances by using the disk category of the highest priority, it creates instances by using the disk category of the next highest priority. Valid values:

  • cloud: basic disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: ESSD

Note

If you specify this parameter, you cannot specify SystemDisk.Category.

SystemDisk.Encrypted

Boolean

No

false

Specifies whether to encrypt the system disk. Valid values:

  • true

  • false

Default value: false.

SystemDisk.KMSKeyId

String

No

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

The ID of the KMS key that you want to use to encrypt the system disk.

SystemDisk.EncryptAlgorithm

String

No

AES-256

The algorithm that you want to use to encrypt the system disk. Valid values:

  • AES-256

  • SM4-128

Default value: AES-256.

SystemDisk.ProvisionedIops

Long

No

100

The preconfigured IOPS of the system disk.

Note

IOPS measures the number of read and write operations that an EBS device can process per second.

SystemDisk.BurstingEnabled

Boolean

No

false

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

  • true

  • false

    Note

    This parameter is available only if you set SystemDisk.Category to cloud_auto.

ImageOptions.LoginAsNonRoot

Boolean

No

false

Specifies whether to use ecs-user to log on to the ECS instance. For more information, see Manage the logon username of an instance. Valid values:

  • true

  • false

DeletionProtection

Boolean

No

false

Specifies whether to enable the Release Protection feature for the ECS instances. This parameter is applicable to only pay-as-you-go instances. You can use this parameter to specify whether an ECS instance can be directly released by using the ECS console or calling the DeleteInstance operation. Valid values:

  • true: enables Release Protection for the ECS instances. In this case, you cannot release the ECS instances by using the ECS console or calling the DeleteInstance operation.

  • false: disables Release Protection for the ECS instances. In this case, you can release the ECS instances by using the ECS console or calling the DeleteInstance operation.

Note

Release Protection does not affect normal scale-ins. If you enable Release Protection for an ECS instance and the ECS instance meets the requirements defined in the scaling policy, Auto Scaling can still release the ECS instance during a scale-in.

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

You can use CustomPriorities to specify the priority of a custom ECS instance type + vSwitch combination. CustomPriorities.N.InstanceType specifies the ECS instance type in a custom combination.

Note

This parameter takes effect only when you set Scaling Policy to Priority Policy for your scaling group and the instance type specified by CustomPriorities.N.InstanceType is contained in the scaling configuration.

If Auto Scaling cannot create ECS instances by using the ECS instance type + vSwitch combination of the highest priority, Auto Scaling automatically creates ECS instances by using the ECS instance type + vSwitch combination of the next highest priority.

Note

If you specify priorities for only partial ECS instance type + vSwitch combinations, Auto Scaling preferentially uses the combinations that have specified priorities. When the combinations that have specified priorities do not provide sufficient inventory, Auto Scaling uses the combinations that do not have specified priorities based on the specified orders of vSwitches and instance types. Example: the specified order of vSwitches for your scaling group is vsw1 and vsw2 and the specified order of instance types in your scaling configuration is type1 and type 2. In addition, you use CustomPriorities to specify ["vsw2+type2", "vsw1+type2"]. In this example, the vsw2+type2 combination has the highest priority and the vsw2+type1 combination has the lowest priority. The vsw1+type2 combination has a higher priority than the vsw1+type1 combination.

CustomPriorities.N.VswitchId

String

No

vsw-bp14zolna43z266bq****

You can use CustomPriorities.N.VswitchId to specify the vSwitch ID in a custom ECS instance type + vSwitch combination.

Note

This parameter takes effect only when you set Scaling Policy to Priority Policy and the vSwitch specified by CustomPriorities.N.VswitchId is included in the vSwitch list of your scaling group.

NetworkInterfaces.N.InstanceType

String

No

Primary

The type of ENI N. If you specify this parameter, you must also specify NetworkInterfaces.N to configure a primary ENI. In addition, you cannot specify SecurityGroupId or SecurityGroupIds.N. Valid values:

  • Primary: the primary ENI

  • Secondary: the secondary ENI

Default value: Secondary.

NetworkInterfaces.N.NetworkInterfaceTrafficMode

String

No

HighPerformance

The communication mode of ENI N. Valid values:

  • Standard: uses the TCP communication mode.

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

Default value: Standard.

Note

If you set this parameter to HighPerformance, the ECS instance type determines the number of ENIs that you can configure. For more information, see Overview of instance families.

NetworkInterfaces.N.Ipv6AddressCount

Integer

No

1

The number of randomly generated IPv6 addresses that you want to assign to the primary ENI. Take note of the following items before you specify this parameter:

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

  • If you set NetworkInterfaces.N.InstanceType to Secondary or leave it empty, you cannot specify this parameter.

  • After you specify this parameter, you can no longer specify Ipv6AddressCount.

NetworkInterfaces.N.SecurityGroupIds.N

String

No

sg-2ze55shrh****

The IDs of one or more security groups to which ENI N belongs. Take note of the following items before you specify this parameter:

  • If you set NetworkInterfaces.N.InstanceType to Primary, this parameter is required. This parameter has the same effect as SecurityGroupIds.N. You can specify only one of SecurityGroupId and SecurityGroupIds.N.

  • If you set NetworkInterfaces.N.InstanceType to Secondary or leave it empty, this parameter is optional. By default, the security group of the primary ENI is the one of the ECS instances.

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=50
&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=echo hello ecs!
&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*"]}]
&SystemDiskCategories=["cloud"]
&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****"]}]
&<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 a list of error codes, see Service error codes.

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 call the operation.

404

InvalidDataDiskSnapshotId.NotFound

Snapshot "XXX" does not exist.

The 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 snapshot exceeds the maximum size that is allowed for the disk.

404

InvalidImageId.NotFound

The specified image does not exist.

The image does not exist.

400

InvalidKeyPairName.NotFound

The specified KeyPairName does not exist in our records.

The key pair does not exist.

400

InvalidNetworkType.ForRAMRole

RAMRole can’t be used For classic instance.

The network type of an ECS instance is classic network. The classic network does not support RamRoleName.

400

InvalidParamter

The specified value of parameter is not valid.

The value of a parameter 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 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 security group and vSwitch do not reside in the same VPC.

400

InvalidTags.KeyValue

The specified tags key/value cannot be empty.

Tags is left empty.

400

InvalidTags.ListSize

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

The maximum number of tags that can be specified has been reached.

400

InvalidUserData.Base64FormatInvalid

The specified parameter UserData must be base64 encoded.

The specified user data is not encoded in Base64.

400

InvalidUserData.SizeExceeded

The specified parameter UserData exceeds the size.

The maximum size of the user data has been reached.