ModifyScalingConfiguration

Updated at:

Modifies an ECS-type scaling configuration (the ECS instance template used for scale-out) by calling the ModifyScalingConfiguration API if the current scaling configuration does not meet your business requirements.

Operation description

Operation description.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ess:ModifyScalingConfiguration

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ScalingConfigurationId

string

Yes

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

asc-bp16har3jpj6fjbx****

IoOptimized

string

No

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

none

SpotStrategy

string

No

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

NoSpot

ScalingConfigurationName

string

No

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

test-modify

InstanceName

string

No

The name of the ECS instance that is created through automatic creation by using the scaling configuration.

inst****

HostName

string

No

The hostname of the Elastic Computing Service server. A period (.) or a hyphen (-) cannot be used as the first or last character, or used consecutively. In addition, the naming conventions for different types of instances are as follows:

hos****

ImageId

string

No

The ID of the image file used for automatic creation of instances.

centos6u5_64_20G_aliaegis_2014****.vhd

ImageName

string

No

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

suse11sp3_64_20G_aliaegis_2015****.vhd

Cpu

integer

No

The number of vCPUs.

2

Memory

integer

No

The memory size.

16

InternetChargeType

string

No

The billing method for network usage. Valid values:

PayByBandwidth

InternetMaxBandwidthOut

integer

No

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

10

SystemDisk.Category

string

No

The category of the system disk. Valid values:

cloud_efficiency

SystemDisk.Size

integer

No

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

50

SystemDisk.DiskName

string

No

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

cloud_ssdSystem

SystemDisk.Description

string

No

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

Test system disk.

SystemDisk.AutoSnapshotPolicyId

string

No

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

sp-bp12m37ccmxvbmi5****

SystemDisk.PerformanceLevel

string

No

The performance level (PL) of the system cloud disk when the system disk is an ESSD cloud disk. You cannot set this parameter when the system disk is a standard SSD. Valid values:

PL0

LoadBalancerWeight

integer

No

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

50

UserData

string

No

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

ZWNobyBoZWxsbyBlY3Mh

KeyPairName

string

No

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

KeyPair_Name

RamRoleName

string

No

The name of the RAM role associated with the ECS instance. The name is provided and maintained by RAM. You can call ListRoles to query available RAM roles. For more information about how to create a RAM role, see CreateRole.

RamRoleTest

PasswordInherit

boolean

No

Specifies whether to use the password preset in the image. To use this parameter, make sure that a password is configured for the image.

false

Tags

string

No

The tags of the ECS instance. Tags are specified as key-value pairs. You can specify up to 20 tags. The following limits apply to the Key and Value parameters:

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

DeploymentSetId

string

No

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

ds-bp13v7bjnj9gis****

SecurityGroupId

string

No

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

sg-F876F****

Override

boolean

No

Specifies whether to override existing data. Valid values:

true

ResourceGroupId

string

No

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

abcd1234abcd****

HpcClusterId

string

No

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

hpc-clusterid

InstanceDescription

string

No

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

Test instance.

Ipv6AddressCount

integer

No

The number of randomly generated IPv6 addresses allocated to the elastic network interfaces (ENIs). You can also refer to this as the number of IPv6 addresses assigned to the network interface controller (NIC).

1

CreditSpecification

string

No

The running mode of the burstable instance. Valid values:

Standard

ImageFamily

string

No

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

hangzhou-daily-update

ZoneId

string

No

The zone ID of the ECS instance.

cn-hangzhou-g

DedicatedHostId

string

No

Specifies whether to create the ECS instance on a dedicated host. Because dedicated hosts do not support the creation of spot instances, if you specify DedicatedHostId, the SpotStrategy and SpotPriceLimit settings in the request are automatically ignored.

dh-bp67acfmxazb4p****

Affinity

string

No

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

default

Tenancy

string

No

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

default

SchedulerOptions

object

No

The scheduler options.

["testManagedPrivateSpaceId****"]

PrivatePoolOptions.MatchCriteria

string

No

The private pool option for instance startup. After an Elasticity Assurance or Capacity Reservation takes effect, a private pool is generated. You can select a private pool when you start an instance. Valid values:

Open

PrivatePoolOptions.Id

string

No

The ID of the private pool. The ID of an Elasticity Assurance or Capacity Reservation.

eap-bp67acfmxazb4****

SpotDuration

integer

No

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

1

SpotInterruptionBehavior

string

No

The interruption pattern of the spot instance. Only Terminate (default) is supported, which directly releases the instance.

Terminate

DataDisk

array<object>

No

The list of data disks.

object

No

The list of data disks.

PerformanceLevel

string

No

The performance level (PL) of the data cloud disk when the data disk is an ESSD cloud disk. You cannot set this parameter when the data disk is a standard SSD. The value of N must be consistent with the N in DataDisk.N.Category=cloud_essd. Valid values:

PL1

AutoSnapshotPolicyId

string

No

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

sp-bp19nq9enxqkomib****

Encrypted

string

No

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

false

Description

string

No

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

Test data disk.

SnapshotId

string

No

The ID of the snapshot used to create data disk N. Valid values of N: 1 to 16. If you specify this parameter, DataDisk.N.Size is ignored. The actual size of the created disk is the size of the specified snapshot.

s-snapshot****

Categories

array

No

The multiple disk types of data disk N. The first N indicates data disk N. Valid values: 1 to 16. The second N indicates the Nth disk type for data disk N. Valid values: 1 to 4. This means that you can specify up to 4 disk types for a data disk in a scaling configuration. A smaller value of N indicates a higher priority. When a disk type with a higher priority cannot be used, Auto Scaling automatically attempts the disk type with the next priority to create the data disk. Valid values:

cloud

string

No

The multiple disk types of data disk N. The first N indicates data disk N. Valid values: 1 to 16. The second N indicates the Nth disk type for data disk N. Valid values: 1 to 4. This means that you can specify up to 4 disk types for a data disk in a scaling configuration. A smaller value of N indicates a higher priority. When a disk type with a higher priority cannot be used, Auto Scaling automatically attempts the disk type with the next priority to create the data disk. Valid values:

cloud

Size

integer

No

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

100

Device

string

No

The mount point of data disk N. Valid values of N: 1 to 16. If you do not specify this parameter, the default behavior during automatic creation of ECS instances is that the system allocates a mount point, starting from /dev/xvdb to /dev/xvdz.

/dev/xvdb

DiskName

string

No

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

cloud_ssdData

Category

string

No

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

cloud_ssd

DeleteWithInstance

boolean

No

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

true

KMSKeyId

string

No

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

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

ProvisionedIops

integer

No

The provisioned IOPS (Input/Output Operations Per Second) performance metrics of the data disk.

100

BurstingEnabled

boolean

No

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

false

SpotPriceLimit

array<object>

No

The collection of spot instance information.

object

No

The collection of spot instance information.

PriceLimit

number

No

The price limit of the spot instance. Valid values of N: 1 to 20. This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit.

0.125

InstanceType

string

No

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

ecs.g6.large

InstanceTypes

array

No

The multiple instance type parameter. If you specify InstanceTypes.N, InstanceType is ignored. Valid values of N: 1 to 20. This means that you can specify up to 20 instance types in a scaling configuration.

ecs.g6.large

string

No

The multiple instance type parameter. If you specify InstanceTypes.N, InstanceType is ignored. Valid values of N: 1 to 20. This means that you can specify up to 20 instance types in a scaling configuration.

ecs.g6.large

InstanceTypeOverride

array<object>

No

The instance type-related information.

object

No

The instance type-related information.

InstanceType

string

No

To specify the capacity of an instance type in the scaling configuration, specify both this parameter and InstanceTypeOverride.N.WeightedCapacity.

ecs.c5.xlarge

WeightedCapacity

integer

No

To specify the capacity of an instance type in the scaling configuration, specify this parameter after you specify InstanceTypeOverride.N.InstanceType. The two parameters must correspond to each other, and the values of N must be consistent.

4

SecurityGroupIds

array

No

The IDs of the security groups to which the ECS instance is added. The valid values of N depend on the maximum number of security groups to which an instance can belong. For more information, see the security group section in Limits.

sg-bp18kz60mefs****

string

No

The ID of the security group.

sg-bp18kz60mefs****

InstancePatternInfo

array<object>

No

The instance type-related information in intelligent mode.

object

No

The instance type-related information in intelligent mode.

Cores

integer

No

The number of vCPU cores of the instance type in intelligent configuration mode. This parameter is used to filter instance types that meet the requirements. For more information, see Instance families. Valid values of N: 1 to 10.

2

InstanceFamilyLevel

string

No

The level of the instance family in intelligent configuration mode. This parameter is used to filter instance types that meet the requirements. Valid values:

EnterpriseLevel

MaxPrice

number

No

The maximum hourly price for pay-as-you-go instances or spot instances in intelligent configuration mode. This parameter is used to filter instance types that meet the requirements. Valid values of N: 1 to 10.

2

Memory

number

No

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

4

Architecture

array

No

The architecture type of the instance type. Valid values:

string

No

The architecture type of the instance type. Valid values:

X86

BurstablePerformance

string

No

Specifies whether to include burstable instance types. Valid values:

Include

ExcludedInstanceType

array

No

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

string

No

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

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

InstanceTypeFamilies

array

No

The specified instance families.

string

No

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

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

MinimumCpuCoreCount

integer

No

The minimum number of vCPU cores of the instance type.

2

MaximumCpuCoreCount

integer

No

The maximum number of vCPU cores of the instance type.

4

GpuSpecs

array

No

The specified GPU types.

string

No

The specified GPU types.

["NVIDIA V100"]

InstanceCategories

array

No

The instance type categories. Valid values:

string

No

The instance type category.

Compute-optimized with GPU

CpuArchitectures

array

No

The CPU architectures of the instance.

string

No

The CPU architecture of the instance. Valid values:

["X86", "ARM"]

PhysicalProcessorModels

array

No

The processor models of the instance.

string

No

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

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

MinimumEniQuantity

integer

No

The expected minimum number of elastic network interfaces (ENIs) supported by the instance.

2

MinimumEniPrivateIpAddressQuantity

integer

No

The expected minimum number of IPv4 addresses per elastic network interfaces (ENIs) network interface controller (NIC) of the instance.

2

MinimumEniIpv6AddressQuantity

integer

No

The expected minimum number of IPv6 addresses per elastic network interfaces (ENIs) network interface controller (NIC) of the instance.

1

MinimumInitialCredit

integer

No

The expected minimum initial vCPU credits for burstable instances (t5 and t6).

12

MinimumBaselineCredit

integer

No

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

12

MinimumMemorySize

number

No

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

4

MaximumMemorySize

number

No

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

4

MinimumGpuAmount

integer

No

The expected minimum number of GPUs of the instance. Valid values: positive integers ≥ 1.

2

MaximumGpuAmount

integer

No

The expected maximum number of GPUs of the instance. Valid values: positive integers ≥ 1.

2

SystemDiskCategories

array

No

The disk types of the system cloud disk. Valid values of N: 1 to 4, which means you can specify up to four disk types for the system cloud disk in a scaling configuration. A smaller value of N indicates a higher priority. When a disk type with a higher priority is unavailable, Auto Scaling automatically attempts the next-priority disk type to create the system cloud disk. Valid values:

cloud

string

No

The disk types of the system cloud disk. Valid values of N: 1 to 4, which means you can specify up to four disk types for the system cloud disk in a scaling configuration. A smaller value of N indicates a higher priority. When a disk type with a higher priority is unavailable, Auto Scaling automatically attempts the next-priority disk type to create the system cloud disk. Valid values:

cloud

Password

string

No

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

123abc****

SystemDisk.Encrypted

boolean

No

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

false

SystemDisk.KMSKeyId

string

No

The ID of the KMS key used by the system cloud disk.

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

SystemDisk.EncryptAlgorithm

string

No

The encryption algorithm used by the system cloud disk. Valid values:

AES-256

SystemDisk.ProvisionedIops

integer

No

The provisioned IOPS (Input/Output Operations Per Second) performance metrics of the system cloud disk.

100

SystemDisk.BurstingEnabled

boolean

No

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

false

ImageOptions.LoginAsNonRoot

boolean

No

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

false

DeletionProtection

boolean

No

The release protection property of the ECS instance. This parameter applies only to pay-as-you-go instances and specifies whether the instance can be directly released from the ECS console or by calling the DeleteInstance operation. Valid values:

false

StorageSetId

string

No

The ID of the storage set.

ss-bp67acfmxazb4p****

StorageSetPartitionNumber

integer

No

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

2

CustomPriorities

array<object>

No

The custom priorities of ECS instance type + vSwitch combinations.

object

No

The custom priorities of ECS instance type + vSwitch combinations.

InstanceType

string

No

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

ecs.g6.large

VswitchId

string

No

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

vsw-bp14zolna43z266bq****

NetworkInterfaces

array<object>

No

The list of elastic network interfaces (ENIs).

object

No

The list of elastic network interfaces (ENIs).

InstanceType

string

No

The type of the elastic network interfaces (ENIs) network interface controller (NIC). When you use this parameter, you must use NetworkInterfaces.N to Settings the primary network interface controller (NIC), but you cannot specify SecurityGroupId or SecurityGroupIds.N at the same time. Valid values:

Primary

NetworkInterfaceTrafficMode

string

No

The communication mode of the ENI. Valid values:

HighPerformance

Ipv6AddressCount

integer

No

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

1

SecurityGroupIds

array

No

The IDs of one or more security groups to which the elastic network interfaces (ENIs) network interface controller (NIC) belongs.

string

No

The IDs of one or more security groups to which the elastic network interfaces (ENIs) network interface controller (NIC) belongs. Note the following items:

sg-2ze55shrh****

SecondaryPrivateIpAddressCount

integer

No

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

2

VSwitchIds

array

No

The IDs of the vSwitches to which the elastic network interfaces (ENIs) network interface controller (NIC) belongs. N indicates that you can Settings multiple vSwitches. Valid values of N: 1 to 10.

string

No

The IDs of the vSwitches to which the elastic network interfaces (ENIs) network interface controller (NIC) belongs. N indicates that you can Settings multiple vSwitches. Valid values of N: 1 to 10.

vsw-bp67acfmxazb4p****

DedicatedHostClusterId

string

No

The ID of the dedicated host cluster.

dc-2zedxc67zqzt7lb4****

SecurityOptions

object

No

The security options.

ConfidentialComputingMode

string

No

The confidential computing mode. Valid values:

TDX

HttpEndpoint

string

No

Specifies whether to enable the access channel for instance metadata. Valid values:

enabled

HttpTokens

string

No

Specifies whether to forcefully use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

optional

InternetMaxBandwidthIn

integer

No

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

10

ResourcePoolOptions

object

No

The resource pool policy used when creating instances. After you set this parameter, note the following items:

Strategy

string

No

Resource pools include private pools generated after elasticity assurance or capacity reservation takes effect, and public pools for instance startup selection. Valid values:

PrivatePoolFirst

PrivatePoolIds

array

No

The private pool IDs. A private pool ID is the ID of an elasticity assurance or capacity reservation. Only Target mode private pool IDs can be specified. This parameter cannot be specified together with the PrivatePoolTags parameter.

string

No

The private pool ID. A private pool ID is the ID of an elasticity assurance or capacity reservation. Only Target mode private pool IDs can be specified. This parameter cannot be specified together with the PrivatePoolTags parameter. Valid values of N: 1 to 20.

eap-bp67acfmxazb4****

PrivatePoolTags

array<object>

No

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

object

No

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

Key

string

No

The tag key of the private pool.

TestKey

Value

string

No

The tag value of the private pool.

TestValue

SecondaryEniVSwitchConstraint

string

No

Specifies whether a vSwitch must be selected from the VSwitchIds list that is active for the secondary elastic network interfaces (ENIs) network interface controller (NIC) when the VSwitchIds parameter is Settings for the secondary elastic network interfaces (ENIs) network interface controller (NIC).

Strict

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.