ModifyScalingConfiguration

Updated at:
Copy as MD

Modify a scaling configuration.

API

  • The name of a scaling configuration must be unique within a scaling group.
  • Configure the primary network interface using one of the following methods. You can use only one method per API request. If you specify both, the request fails and an error message is returned.
    • Directly configure the primary network interface using parameters such as SecurityGroupId, SecurityGroupIds.N, and Ipv6AddressCount.
    • Configure the primary and secondary network interfaces using the NetworkInterfaces.N parameter. Set NetworkInterfaces.N.InstanceType to Primary for the primary network interface. Set it to Secondary or leave it unspecified for a secondary network interface.

      Note Modifying the network interface settings of a scaling configuration using one of these methods clears any settings configured by the other.

Try it now

Run this operation in OpenAPI Explorer without the hassle of signature calculation and get an SDK code example upon success.

Request parameters

Parameter

Type

Required

Example value

Description

Action String Yes ModifyScalingConfiguration

The action to perform. 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 an I/O optimized instance. Valid values:

  • none: The instance is not an I/O optimized instance.
  • optimized: The instance is an I/O optimized instance.
SpotStrategy String No NoSpot

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

  • NoSpot: The instance is a regular pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is a spot instance for which you can specify a maximum hourly price.
  • SpotAsPriceGo: The instance is a spot instance for which the system automatically bids at the current market price.
ScalingConfigurationName String No test-modify

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

The name must be unique within its scaling group and region. If you omit this parameter, the scaling configuration ID is used as the name.

InstanceName String No inst****

The name of ECS instances created by this scaling configuration.

HostName String No hos****

The hostname of the ECS instance. The hostname cannot start or end with a period (.) or a hyphen (-), and cannot contain consecutive periods or hyphens. Naming conventions vary by operating system:

  • Windows: The hostname must be 2 to 15 characters in length and can contain letters, digits, and hyphens (-). The hostname cannot contain periods (.) or be composed of only digits.
  • Other OS (such as Linux): 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 used to create instances.

Note If the previous image for the scaling configuration included a system disk and data disks, changing 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 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 both 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 matched. Auto Scaling considers factors such as I/O optimization and availability zone to determine the available instance types and then creates an instance of the lowest-priced matching instance type.

Note This configuration is effective only when cost optimization is enabled and no instance type is specified in the scaling configuration.
Memory Integer No 16

The memory size in GiB.

You can specify both 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 matched. Auto Scaling considers factors such as I/O optimization and availability zone to determine the available instance types and then creates an instance of the lowest-priced matching instance type.

Note This configuration is effective only when cost optimization is enabled and no instance type is specified in the scaling configuration.
InternetChargeType String No PayByBandwidth

The network billing method. Valid values:

  • PayByBandwidth: Bills by bandwidth. InternetMaxBandwidthOut specifies the fixed bandwidth.
  • PayByTraffic: Bills by traffic. InternetMaxBandwidthOut specifies the maximum bandwidth, and billing is based on actual usage.
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 Cloud Disk.
  • cloud_efficiency: Ultra Cloud Disk.
  • cloud_ssd: SSD cloud disk.
  • cloud_essd: ESSD.
  • ephemeral_ssd: local SSD disk.
  • cloud_auto: ESSD AutoPL disk.

You cannot specify this parameter and SystemDiskCategories.N at the same time. If neither this parameter nor SystemDiskCategories.N is specified, a default value is used. For non-I/O-optimized, first-generation instances, the default is cloud; otherwise, the default is cloud_efficiency.

SystemDisk.Size Integer No 50

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

  • Basic Cloud Disk: 20 to 500.
  • ESSD:
    • PL0: 1 to 2,048.
    • PL1: 20 to 2,048.
    • PL2: 461 to 2,048.
    • PL3: 1,261 to 2,048.
  • ESSD AutoPL disk: 1 to 2,048.
  • Other cloud disk types: 20 to 2,048.

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 long, start with a letter or a Chinese character, and 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 long and cannot start with http:// or https://.

SystemDisk.AutoSnapshotPolicyId String No sp-bp12m37ccmxvbmi5****

The ID of the auto snapshot policy for the system disk.

SystemDisk.PerformanceLevel String No PL0

The performance level of the ESSD that is used as the system disk. Valid values:

  • PL0: An ESSD at this level can deliver up to 10,000 random read/write IOPS.
  • PL1: An ESSD at this level can deliver up to 50,000 random read/write IOPS.
  • PL2: An ESSD at this level can deliver up to 100,000 random read/write IOPS.
  • PL3: An ESSD at this level can deliver up to 1,000,000 random read/write IOPS.
Note For more information about how to select an ESSD performance level, see ESSDs.
LoadBalancerWeight Integer No 50

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

UserData String No ZWNobyBoZWxsbyBlY3Mh

The user data for the ECS instance. The data must be Base64-encoded, and the original data cannot exceed 32 KB.

KeyPairName String No KeyPair_Name

The name of the key pair to use for logging on to the ECS instance.

  • On Windows instances, this parameter is ignored.
  • On Linux instances, setting this parameter disables password-based logon by default.
RamRoleName String No RamRoleTest

The name of the RAM role for the ECS instance. You can call the ListRoles operation to query available RAM roles. To create a RAM role, call the CreateRole operation.

PasswordInherit Boolean No false

Specifies whether to use the password preset in the image. If you enable this, ensure the image has a preset password.

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

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

  • The key can be up to 64 characters in length, cannot start with aliyun or acs:, and cannot contain http:// or https://. The key cannot be an empty string.
  • The value can be up to 128 characters in length, cannot start with aliyun or acs:, and cannot contain http:// or https://. The 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 within the same security group can access each other.

Override Boolean No true

Specifies whether to overwrite the existing configurations. Valid values:

  • true: Overwrites the existing configurations.
  • false: Does not overwrite the existing configurations.
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 High Performance Computing (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 elastic network interface.

CreditSpecification String No Standard

The performance mode of the burstable performance instance. Valid values:

ImageFamily String No hangzhou-daily-update

You can set this parameter to use the latest available image from the specified image family to create instances. This parameter cannot be specified if ImageId is also set.

ZoneId String No cn-hangzhou-g

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

DedicatedHostId String No dh-bp67acfmxazb4p****

The ID of the dedicated host on which to launch the ECS instance. If you specify a DedicatedHostId, the instance will not be a spot instance, and any SpotStrategy or SpotPriceLimit settings are ignored.

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

Affinity String No default

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

  • default: The instance is not associated with a specific dedicated host. When restarting a stopped instance, it may be moved to a different host if the original host lacks resources.
  • host: The instance is associated with a specific dedicated host. When restarting a stopped instance, it remains on the original host. The restart fails if the original host lacks resources.
Tenancy String No default

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

  • default: The instance runs on shared hardware.
  • host: The instance runs on a dedicated host. If you do not specify DedicatedHostId, one is automatically selected for you.
SchedulerOptions Map No ["testManagedPrivateSpaceId****"]

The scheduling options.

PrivatePoolOptions.MatchCriteria String No Open

An elasticity assurance or capacity reservation generates a private pool of resources. This parameter defines how to use that pool when launching instances. Valid values:

  • Open: open mode. The system automatically matches the capacity of open private pools. If no eligible private pool is found, public pool resources are used. In this mode, you do not need to specify the PrivatePoolOptions.Id parameter.
  • Target: specified mode. The instance is launched by using the capacity of a specified private pool. If the specified private pool is unavailable, the instance launch fails. In this mode, you must specify a private pool ID in the PrivatePoolOptions.Id parameter.
  • None: no mode. The instance does not use private pool capacity.
PrivatePoolOptions.Id String No eap-bp67acfmxazb4****

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

SpotDuration Integer No 1

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

  • 1: Alibaba Cloud ensures that the instance is not automatically released within 1 hour of its creation. After the 1-hour period, the system compares the bid price with the market price and checks the resource inventory to determine whether to retain or release the instance.
  • 0: Alibaba Cloud does not guarantee that the instance runs for 1 hour after creation. The system compares the bid price with the market price and checks the resource inventory to determine whether to retain or release the instance.
Note Alibaba Cloud sends an ECS system event notification 5 minutes before releasing a spot instance. Billing is per second. Choose a protection period that aligns with your task completion time.

Default value: 1.

SpotInterruptionBehavior String No Terminate

The action to take when a spot instance is interrupted. Only Terminate (release the instance) is supported. This is the default.

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: An ESSD at this level can deliver up to 10,000 random read/write IOPS.
  • PL1: An ESSD at this level can deliver up to 50,000 random read/write IOPS.
  • PL2: An ESSD at this level can deliver up to 100,000 random read/write IOPS.
  • PL3: An ESSD at this level can deliver up to 1,000,000 random read/write IOPS.
Note For more information about how to select an ESSD performance level, see ESSDs.
DataDisk.N.AutoSnapshotPolicyId String No sp-bp19nq9enxqkomib****

The ID of the auto snapshot policy applied to data disk N. The value of N can be 1 to 16.

DataDisk.N.Encrypted String No false

Specifies whether to encrypt data disk N. The value of N can be 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. The value of N can be 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. The value of N can be 1 to 16. If you specify this parameter, DataDisk.N.Size is ignored, and the size of the created disk is the size of the specified snapshot.

Snapshots created on or before July 15, 2013, are not supported and will result in an InvalidSnapshot.TooOld error.

DataDisk.N.Categories.N String No cloud

A prioritized list of categories for data disk N. The first N identifies the data disk (1-16), and the second N sets the priority (1-4). You can specify up to four categories. Auto Scaling attempts to create the disk using the highest-priority category first, falling back to lower-priority categories if the attempt fails. Valid values:

  • cloud: Basic Cloud Disk. The DeleteWithInstance attribute of a Basic Cloud Disk that is created with an instance is true.
  • cloud_efficiency: Ultra Cloud Disk.
  • cloud_ssd: SSD cloud disk.
  • cloud_essd: ESSD.
Note You cannot specify this parameter and DataDisk.N.Category at the same time.
DataDisk.N.Size Integer No 100

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

  • cloud: 5 to 2,000.
  • cloud_efficiency: 20 to 32,768.
  • cloud_essd: 20 to 32,768.
  • 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 data disk N. The value of N can be 1 to 16. If you do not specify this parameter, the system allocates a mount point when it automatically creates an ECS instance. The mount points range from /dev/xvdb to /dev/xvdz.

DataDisk.N.DiskName String No cloud_ssdData

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

DataDisk.N.Category String No cloud_ssd

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

  • cloud: Basic Cloud Disk. The DeleteWithInstance attribute of a Basic Cloud Disk that is created with an instance is true.
  • cloud_efficiency: Ultra Cloud Disk.
  • cloud_ssd: SSD cloud disk.
  • cloud_essd: ESSD.
  • ephemeral_ssd: local SSD disk.
  • cloud_auto: ESSD AutoPL disk.

You cannot specify this parameter and DataDisk.N.Categories.N at the same time. If neither this parameter nor DataDisk.N.Categories.N is specified, the default value is determined as follows:

  • 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. The value of N can be 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 cloud disks (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. The value of N can be 1 to 16.

DataDisk.N.ProvisionedIops Long No 100

The IOPS provisioned for the data disk.

Note IOPS (Input/Output Operations Per Second) measures the number of I/O operations a block storage device can process per second.
DataDisk.N.BurstingEnabled Boolean No false

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

  • true: enables the feature.
  • false: disables the feature.

    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 the spot instance. The value of N can be 1 to 20. This parameter is effective only when SpotStrategy is set to SpotWithPriceLimit.

SpotPriceLimit.N.InstanceType String No ecs.g6.large

The instance type of the spot instance. The value of N can be 1 to 20. This parameter is effective only when SpotStrategy is set to SpotWithPriceLimit.

InstanceTypes.N String No ecs.g6.large

The parameter for multiple instance types. If you specify InstanceTypes.N, InstanceType is ignored. The value of N can be 1 to 20, which means that you can specify up to 20 instance types in a scaling configuration.

N defines the priority, where 1 is the highest. If instance creation fails for a higher-priority type, Auto Scaling automatically attempts to use the next type in the list.

InstanceTypeOverride.N.InstanceType String No ecs.c5.xlarge

If you need to specify the capacity of an instance type in a scaling configuration, specify both this parameter and InstanceTypeOverride.N.WeightedCapacity.

This parameter specifies the instance type. You can specify N instances of this parameter, in conjunction with the InstanceTypeOverride.N.WeightedCapacity parameter, to extend multi-instance type support with custom weights. The value of N can be 1 to 20.

Note You cannot specify this parameter and InstanceTypes.N at the same time.

For information about the valid values of InstanceType, see Instance families.

InstanceTypeOverride.N.WeightedCapacity Integer No 4

If you need to specify the capacity of an instance type in the scaling configuration, specify this parameter after specifying InstanceTypeOverride.N.InstanceType. These two parameters are paired, and the value of N must be the same.

This parameter specifies the weight of the instance type. The weight represents the capacity of a single instance of that type in the scaling group. A higher weight means that fewer instances of this type are needed to meet the desired capacity.

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

Example:

  • Current capacity: 0
  • Desired capacity: 6
  • Capacity of an ecs.c5.xlarge instance: 4

To meet the desired capacity, the scaling group will scale out two ecs.c5.xlarge instances.

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

Valid values for WeightedCapacity: 1 to 500.

SecurityGroupIds.N String No sg-bp18kz60mefs****

The ID of the security group.

InstancePatternInfo.N.Cores Integer No 2

In intelligent configuration mode, this parameter specifies the number of vCPU cores of the instance type, which is used to filter instance types. For more information, see Instance families. The value of N can be 1 to 10.

Take note of the following information:

  • The InstancePatternInfo.N parameter is applicable only when the network type of the scaling group is a virtual private cloud (VPC).
  • When you specify InstancePatternInfo.N, you must also specify both InstancePatternInfo.N.Cores and InstancePatternInfo.N.Memory.
  • If InstanceType or InstanceTypes.N is specified, those types are prioritized. If they are unavailable, Auto Scaling selects the lowest-priced instance type that matches the InstancePatternInfo filters.
InstancePatternInfo.N.InstanceFamilyLevel String No EnterpriseLevel

In intelligent configuration mode, this parameter specifies the level of the instance family, which is used to filter instance types. Valid values:

  • EntryLevel: entry-level instances, which are shared instance types. These instances offer lower costs but cannot guarantee stable computing performance. They are suitable for business scenarios with low CPU utilization. For more information, see Shared instance families.
  • EnterpriseLevel: enterprise-level instances. These instances offer stable performance and dedicated resources, and are suitable for business scenarios that require high stability. For more information, see Instance families.
  • CreditEntryLevel: credit entry-level instances, which are burstable performance instances. These instances use CPU credits to ensure computing performance and are suitable for scenarios with low average CPU utilization but occasional CPU usage spikes. For more information, see Burstable performance instances.

The value of N can be 1 to 10.

InstancePatternInfo.N.MaxPrice Float No 2

In intelligent configuration mode, this parameter specifies the maximum acceptable hourly price for pay-as-you-go or spot instances, which is used to filter instance types. The value of N can be 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

In intelligent configuration mode, this parameter specifies the memory size of the instance type. Unit: GiB. This parameter is used to filter instance types. For more information, see Instance families. The value of N can be 1 to 10.

InstancePatternInfo.N.Architecture.N String No X86

The architecture type of the instance type. Valid values:

  • X86: x86 architecture.
  • Heterogeneous: heterogeneous computing architecture, such as GPU or FPGA.
  • BareMental: ECS bare metal instance.
  • Arm: Arm architecture.

Default value: All architecture types are included.

InstancePatternInfo.N.BurstablePerformance String No Include

Specifies whether to include burstable performance instances. Valid values:

  • Exclude: does not include burstable performance instances.
  • Include: includes burstable performance instances.
  • Required: includes only burstable performance instances.

Default value: Include.

InstancePatternInfo.N.ExcludedInstanceType.N String No ecs.n1.small/ecs.n1.*/*7*

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

  • ecs.c6.large: excludes the ecs.c6.large instance type.
  • ecs.c6.*: excludes all instance types of the c6 family.
Note To exclude multiple instance types, use forward slashes (/) to separate them. For example: ecs.n1.small/ecs.n1.*/*7*.
InstancePatternInfo.N.InstanceTypeFamilies.N String No ["ecs.g6", "ecs.c6", … "ecs.r6"]

The specified instance families. N indicates that you can specify multiple instance families, with a value range of 1 to 10.

InstancePatternInfo.N.MinimumCpuCoreCount Integer No 2

The minimum number of vCPU cores for the instance type.

InstancePatternInfo.N.MaximumCpuCoreCount Integer No 4

The maximum number of vCPU cores for the instance type.

Note The value of the 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 N indicates that you can specify multiple instance categories, with a value range of 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 of the instance. Valid values:

Note N indicates that you can specify multiple CPU architectures, with a value range of 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. N indicates that you can specify multiple processor models, with a value range of 1 to 10.

InstancePatternInfo.N.MinimumEniQuantity Integer No 2

The minimum number of elastic network interfaces that the instance must support.

InstancePatternInfo.N.MinimumEniPrivateIpAddressQuantity Integer No 2

The minimum number of IPv4 addresses per elastic network interface that the instance must support.

InstancePatternInfo.N.MinimumEniIpv6AddressQuantity Integer No 1

The minimum number of IPv6 addresses per elastic network interface that the instance must support.

InstancePatternInfo.N.MinimumInitialCredit Integer No 12

The minimum initial vCPU credits for burstable performance instances of the t5 or t6 family.

InstancePatternInfo.N.MinimumBaselineCredit Integer No 12

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

InstancePatternInfo.N.MinimumMemorySize Float No 4

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

InstancePatternInfo.N.MaximumMemorySize Float No 4

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

InstancePatternInfo.N.MinimumGpuAmount Integer No 2

The minimum number of GPUs required 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 required for the instance. The value must be a positive integer greater than or equal to 1.

SystemDiskCategories.N String No cloud

The categories for the system disk. The value of N can be 1 to 4, which means that you can specify up to four disk categories for a system disk in a scaling configuration. A smaller N value indicates a higher priority. If a system disk cannot be created by using a disk category with a higher priority, Auto Scaling automatically tries the next disk category. Valid values:

  • cloud: Basic Cloud Disk.
  • cloud_efficiency: Ultra Cloud Disk.
  • cloud_ssd: SSD cloud disk.
  • cloud_essd: ESSD.
Note You cannot 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 supported special characters are:

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

SystemDisk.EncryptAlgorithm String No AES-256

The encryption algorithm for the system disk. Valid values:

  • AES-256
  • SM4-128

Default value: AES-256.

SystemDisk.ProvisionedIops Long No 100

The IOPS provisioned for the system disk.

Note IOPS (Input/Output Operations Per Second) measures the number of I/O operations a block storage device can process per second.
SystemDisk.BurstingEnabled Boolean No false

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

  • true: enables the feature.
  • false: disables the feature.

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

ImageOptions.LoginAsNonRoot Boolean No false

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

  • true
  • false
DeletionProtection Boolean No false

The deletion protection setting for the ECS instance. This parameter applies only to pay-as-you-go instances and specifies whether an instance is protected from accidental deletion via the ECS console or the DeleteInstance API call. Valid values:

  • true: Enables release protection. This prevents the instance from being released directly from the ECS console or by using the API, which helps prevent accidental deletion of instances that are scaled out by Auto Scaling.
  • false: Disables release protection. This allows the instance to be released directly from the ECS console or by using the API.
Note This attribute does not affect normal scale-in activities. During a scale-in event, pay-as-you-go instances with release protection enabled can be released as expected.
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 specifies the custom priority of an ECS instance type and vSwitch combination. The CustomPriorities.N.InstanceType parameter specifies the instance type in the custom priority.

Note This parameter takes effect only when the scaling policy of the scaling group is the priority policy, and the specified instance type must be included in the list of instance types in the scaling configuration.

If an ECS instance cannot be created from a higher-priority ECS instance type and vSwitch combination, Auto Scaling automatically selects the next-priority ECS instance type and vSwitch combination to create the instance.

Note Combinations without a custom priority are ranked lower than all specified combinations. Their relative priority is determined by the order of vSwitches in the scaling group, then the order of instance types in the scaling configuration. For example, if the vSwitches are vsw1 and vsw2, and the instance types are type1 and type2, and the custom priority 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 CustomPriorities.N.VswitchId parameter specifies the ID of the vSwitch in the custom priority.

Note This parameter takes effect only when the scaling policy of the scaling group is the priority policy, and the specified vSwitch must be included in the list of vSwitches in the scaling group.
NetworkInterfaces.N.InstanceType String No Primary

The elastic network interface type. If you use this parameter, you must use NetworkInterfaces.N to configure the primary network interface. You cannot specify SecurityGroupId or SecurityGroupIds.N at the same time. Valid values:

  • Primary: primary network interface.
  • Secondary: secondary network interface.

Default value: Secondary.

NetworkInterfaces.N.NetworkInterfaceTrafficMode String No HighPerformance

The communication mode of the network interface. Valid values:

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

Default value: Standard.

Note The number of RDMA-enabled elastic network interfaces 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 to assign to the primary network interface. Note the following:

  • This parameter is effective only when NetworkInterfaces.N.InstanceType is set to Primary.
  • You cannot set this parameter if NetworkInterfaces.N.InstanceType is set to Secondary or is empty.
  • If 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 elastic network interface belongs. Note the following:

  • If NetworkInterfaces.N.InstanceType is set to Primary, you must set this parameter. It serves the same purpose as SecurityGroupIds.N, but you cannot set SecurityGroupId or SecurityGroupIds.N at the same time.
  • If NetworkInterfaces.N.InstanceType is set to Secondary or is empty, this parameter is optional. The default value is the security group of the ECS instance, which is the security group of the primary network interface.
NetworkInterfaces.N.SecondaryPrivateIpAddressCount Integer No 2

The number of secondary private IPv4 addresses to assign to the network interface. 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 is used to assign a number of secondary private IPv4 addresses (excluding the primary private IP address of the network interface). The system randomly assigns these addresses from the available CIDR block of the vSwitch where the network interface is located (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 the access channel for instance metadata. Valid values:

  • enabled
  • disabled

Default value: enabled.

Note For more information about instance metadata, see Overview of instance metadata.
HttpTokens String No optional

Specifies whether to enforce the use of Instance Metadata Service Version 2 (IMDSv2) when accessing instance metadata. Valid values:

  • optional: does not enforce the use of IMDSv2.
  • required: enforces the use of IMDSv2. If you set this value, you cannot access instance metadata in normal mode.

Default value: optional.

Note For more information about modes for accessing instance metadata, see Instance metadata access modes.
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: 1 to 10. The default value is 10.
  • If the purchased outbound public bandwidth is greater than 10 Mbit/s: 1 to the value of InternetMaxBandwidthOut. The default value is the value of InternetMaxBandwidthOut.
ResourcePoolOptions.Strategy String No PrivatePoolFirst

A resource pool includes private pools generated after elasticity assurances or capacity reservations take effect, as well as public pools, for launching instances. Valid values:

  • PrivatePoolFirst: Private pool first. If you select this policy, the system prioritizes using the corresponding private pool when ResourcePoolOptions.PrivatePoolIds is specified or when the conditions for PrivatePoolTags are met. If no private pool is specified or the specified private pool has insufficient capacity, the system automatically matches an open private pool. If no matching private pool is found, a public pool is used to create the instance.
  • PrivatePoolOnly: Private pool only. If you select this policy, you must specify ResourcePoolOptions.PrivatePoolIds. If the specified private pool has insufficient capacity, the instance fails to be launched.
  • PublicPoolFirst: Public pool first. The system prioritizes using a public pool to create the instance. If the public pool has insufficient resources, private pool resources are used as a supplement. The system prioritizes automatically matching an open private pool. If no matching private pool is found, a Target-type private pool that is specified by ResourcePoolOptions.PrivatePoolIds or that meets the PrivatePoolTags conditions is used.

    Note This policy is in invited preview and is not supported.

  • None: No resource pool policy is used.

Default value: None.

ResourcePoolOptions.PrivatePoolIds.N String No eap-bp67acfmxazb4****

The private pool ID, which is the ID of the elasticity assurance or capacity reservation. You can specify only the IDs of private pools in Target mode for this parameter. You cannot specify this parameter and the PrivatePoolTags parameter at the same time. The value of N can be 1 to 20.

ResourcePoolOptions.PrivatePoolTags.N.Key String No TestKey

The tag key of the private pool.

Filters available Target private pools based on tags. The value of N can be 1 to 20.

Notes:

  • When this parameter is configured, the system filters only from the

    Target private pools associated with the account that have matching tags and also meet the constraints of the scaling group (such as availability zone and instance type).

  • Tag matching rule: The private pool must match all specified tags.
  • You cannot specify this parameter and the PrivatePoolIds parameter at the same time.
ResourcePoolOptions.PrivatePoolTags.N.Value String No TestValue

The tag value of the private pool.

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

Visit the Error Center for more error codes.

HTTP 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 the specified 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.

The specified key pair does not exist.

400

InvalidNetworkType.ForRAMRole

The RAMRole parameter is not supported for instances in a classic network.

RAM roles are not supported for instances in a classic network.

400

InvalidParamter

The specified parameter value is invalid.

The specified parameter value is invalid.

400

InvalidScalingConfigurationName.Duplicate

The specified scaling configuration name already exists.

The scaling configuration name already exists.

400

InvalidSecurityGroupId.IncorrectNetworkType

The network type of the specified security group is not supported for 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 virtual switch are not in the same VPC.

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

400

InvalidTags.KeyValue

The key or value of a specified tag cannot be empty.

The key or value of a specified tag cannot be empty.

400

InvalidTags.ListSize

The number of tags cannot exceed 20.

The number of tags exceeds the limit of 20.

400

InvalidUserData.Base64FormatInvalid

The UserData parameter must be Base64-encoded.

The specified user data is not Base64-encoded.

400

InvalidUserData.SizeExceeded

The value of the UserData parameter exceeds the size limit.

The size of the specified user data exceeds the limit.

400

InvalidSecurityGroupId.IncorrectType

The managed security group "XXX" is not supported.

The specified managed security group is not supported.