CreateScalingConfiguration
Creates an ECS scaling configuration for a scaling group.
Operation description
A scaling configuration specifies the ECS instance template used during scale-out. The following instance configuration methods are supported:
-
InstancePatternInfos: the intelligent configuration mode. You do not need to specify exact network types. You only need to specify the number of vCPUs, memory size, instance family level, and maximum price based on your business requirements. The system automatically filters network types that meet the requirements and preferentially selects the network type with the lowest price to create ECS instances. This mode applies only to scaling groups in a VPC and effectively reduces the chance of insufficient network type inventory during scale-out.
-
InstanceType: specifies a single instance type.
-
InstanceTypes: specifies multiple instance types.
-
InstanceTypeOverrides: specifies multiple instance types and configures weights for different instance types.
-
Cpu and Memory: specifies the range of instance types by defining the number of vCPUs and memory size. Auto Scaling determines the available instance types based on factors such as I/O optimization and zone, and creates instances with the lowest price. This method applies only when the scaling policy of the scaling group is set to cost optimization and no instance type is specified in the scaling configuration.
-
You can use one of the following methods to bind the primary ENI. Note that you can use only one method to configure the primary ENI in a single call. Using both methods at the same time causes the call to fail and returns an error message.
Directly set the configuration information of the primary ENI by using parameters such as SecurityGroupId, SecurityGroupIds, and Ipv6AddressCount.
Set the configuration information of the primary ENI and secondary ENIs by using NetworkInterfaces. When you use the NetworkInterface parameter, you must set the primary ENI information. If NetworkInterface.InstanceType is set to Primary, it indicates the primary ENI. If NetworkInterface.InstanceType is set to Secondary or left empty, it indicates a secondary ENI.
You cannot specify InstanceType, InstanceTypes, InstanceTypeOverrides, and Cpu and Memory at the same time. However, you can specify InstanceType or InstanceTypes together with InstancePatternInfos. When InstanceType or InstanceTypes is specified together with InstancePatternInfos, Auto Scaling preferentially uses the specified instance types for scale-out. If the specified instance types are out of stock, Auto Scaling uses the instance types that match the InstancePatternInfos configuration.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:CreateScalingConfiguration |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ScalingGroupId |
string |
Yes |
The ID of the scaling group to which the scaling configuration belongs. |
asg-bp14wlu85wrpchm0**** |
| ImageId |
string |
No |
The ID of the image file. The image resource used during automatic creation of instances. |
centos6u5_64_20G_aliaegis****.vhd |
| ImageName |
string |
No |
The name of the image file. The image name must be unique within a region. If ImageId is specified, ImageName is ignored. You cannot use ImageName to specify an Alibaba Cloud Marketplace image. |
image**** |
| InstanceType |
string |
No |
The instance type of the ECS instance. For more information, see instance families. |
ecs.g6.large |
| Cpu |
integer |
No |
The number of vCPUs. Unit: cores. You can specify both Cpu and Memory to define the 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 determines the available instance types based on factors such as I/O optimization and zone, and creates instances with the lowest price. Note
This configuration takes effect only when the scaling mode is set to cost optimization and no instance type is specified in the scaling configuration. |
2 |
| Memory |
integer |
No |
The memory size. Unit: GiB. You can specify both Cpu and Memory to define the 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 determines the available instance types based on factors such as I/O optimization and zone, and creates instances with the lowest price. Note
This configuration takes effect only when the scaling mode is set to cost optimization and no instance type is specified in the scaling configuration. |
16 |
| DeploymentSetId |
string |
No |
The ID of the deployment set to which the ECS instance belongs. |
ds-bp1frxuzdg87zh4pz**** |
| 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-280ih**** |
| IoOptimized |
string |
No |
Specifies whether the instance is an I/O optimization instance. Valid values:
The default value is none for retired instance types and optimized for other instance types. |
optimized |
| InternetChargeType |
string |
No |
The network billing method. Valid values:
If this parameter is not specified, the default value is PayByBandwidth for the classic network and PayByTraffic for a VPC. |
PayByTraffic |
| InternetMaxBandwidthIn |
integer |
No |
The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:
|
10 |
| InternetMaxBandwidthOut |
integer |
No |
The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. Default value: 0. |
10 |
| SystemDisk.Category |
string |
No |
The category of the system cloud disk. Valid values:
You cannot specify this parameter together with
This parameter specifies only one system cloud disk type. If you want the system to automatically try other types when the preferred disk type is unavailable, use |
cloud_ssd |
| SystemDisk.Size |
integer |
No |
The size of the system cloud disk. Unit: GiB. Valid values:
The value of this parameter must be greater than or equal to max{1, ImageSize}. Default value: max{40, ImageSize}. |
100 |
| SystemDisk.DiskName |
string |
No |
The name of the system cloud 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 and cannot start with |
cloud_ssdSystem |
| SystemDisk.Description |
string |
No |
The description of the system cloud disk. The description must be 2 to 256 characters in length and cannot start with |
Test system disk. |
| SystemDisk.AutoSnapshotPolicyId |
string |
No |
The ID of the automatic snapshot policy applied to the system cloud disk. |
sp-bp12m37ccmxvbmi5**** |
| SystemDisk.PerformanceLevel |
string |
No |
The settings of the performance level for the system cloud disk when it is an ESSD. Valid values:
Default value: PL1. |
PL0 |
| 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. The name must be unique within a scaling group in a region. If you do not specify this parameter, the ID of the scaling configuration is used by default. |
scalingconfig**** |
| LoadBalancerWeight |
integer |
No |
The weight of the ECS instance as a load balancing backend server. Valid values: 1 to 100. Default value: 50. |
50 |
| Tags |
string |
No |
The tags of the ECS instance. Tags are passed in as key-value pairs. You can add up to 20 tags. The requirements for keys and values are as follows:
|
{"key1":"value1","key2":"value2", ... "key5":"value5"} |
| UserData |
string |
No |
The user data of the ECS instance. It 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.
|
KeyPairTest |
| RamRoleName |
string |
No |
The name of the Resource Access Management (RAM) role for the ECS instance. RAM roles are provided and maintained by RAM. You can call the ListRoles operation to query available RAM roles. |
ramrole**** |
| SecurityEnhancementStrategy |
string |
No |
Specifies whether to enable security hardening. Valid values:
|
Active |
| InstanceName |
string |
No |
The name of the ECS instance during automatic creation by using this scaling configuration. |
instance**** |
| HostName |
string |
No |
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 (-). The naming requirements for different instance types are as follows:
|
host**** |
| SpotStrategy |
string |
No |
The preemption policy for the pay-as-you-go instance. Valid values:
Default value: NoSpot. |
NoSpot |
| PasswordInherit |
boolean |
No |
Specifies whether to use the preset password of the image. When you use this parameter, make sure that a password is preset in the image. Valid values:
|
false |
| 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. Special characters include: `() For Windows instances, the password cannot start with a forward slash (/). Note
If you specify the Password parameter, send requests over HTTPS to prevent password leaks. |
123abc**** |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the ECS instance belongs. |
rg-resource**** |
| 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 |
Test instance. |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see Ensure idempotence. |
123e4567-e89b-12d3-a456-42665544**** |
| Ipv6AddressCount |
integer |
No |
The number of IPv6 addresses that are randomly generated for the network interface controller (NIC). |
1 |
| CreditSpecification |
string |
No |
Specifies the running pattern of the burstable instance. Valid values:
For more information, see the performance schema section in Overview of burstable instances. |
Standard |
| ImageFamily |
string |
No |
The name of the image family. You can set this parameter to obtain the latest available image in the image family to create instances. If |
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 spot instances, the SpotStrategy and SpotPriceLimit parameters are automatically ignored if DedicatedHostId is specified. You can call the DescribeDedicatedHosts operation to query the list of dedicated host IDs. |
dh-bp67acfmxazb4p**** |
| Affinity |
string |
No |
Specifies whether to associate the instance on a dedicated host with the dedicated host. Valid values:
Default value: default. |
default |
| Tenancy |
string |
No |
Specifies whether to create the instance on a dedicated host. Valid values:
Default value: default. |
default |
| SchedulerOptions |
object |
No |
The scheduling options. |
["testManagedPrivateSpaceId****"] |
| PrivatePoolOptions.MatchCriteria |
string |
No |
The private pool options for instance startup. After an elasticity assurance or a capacity reservation takes effect, a private pool is generated for you to select when you start instances. Valid values:
|
Open |
| PrivatePoolOptions.Id |
string |
No |
The ID of the private pool. It is the ID of the elasticity assurance or capacity reservation. |
eap-bp67acfmxazb4**** |
| SpotDuration |
integer |
No |
The protection period of the spot instance. Unit: hours. Valid values:
Note
Alibaba Cloud sends you a notification by using ECS system events 5 minutes before the instance is released. Spot instances are billed by the second. Select an appropriate protection period based on the execution duration of your tasks. Default value: 1. |
1 |
| SpotInterruptionBehavior |
string |
No |
The break mode of the spot instance. Currently, only terminate (default) is supported, which releases the instance directly. |
Terminate |
| InstanceTypes |
array |
No |
The multiple instance types. If InstanceTypes is specified, InstanceType is ignored. If an instance cannot be created based on the instance type with a higher priority, Auto Scaling automatically selects the instance type with the next highest priority to create the instance. |
|
|
string |
No |
The multiple instance types. If InstanceTypes is specified, InstanceType is ignored. If an instance cannot be created based on the instance type with a higher priority, Auto Scaling automatically selects the instance type with the next highest priority to create the instance. |
ecs.g6.large |
|
| InstanceTypeOverrides |
array<object> |
No |
The information used to specify instance types. |
|
|
object |
No |
The information used to specify instance types. |
||
| InstanceType |
string |
No |
When you need the scaling group to scale based on the capacity of the instance type, specify both this parameter and WeightedCapacity. This parameter specifies the instance type and overrides the instance type in the launch template. You can specify N instance types to extend the launch template to support N instance types. Valid values of N: 1 to 20. Note
This parameter takes effect only when LaunchTemplateId is specified. Valid values of InstanceType: available ECS instance types. |
ecs.c5.xlarge |
| WeightedCapacity |
integer |
No |
When you need to specify the capacity of the instance type in the scaling configuration, specify this parameter after you specify InstanceTypeOverrides.InstanceType. This parameter specifies the weight of the instance type, which indicates the capacity that a single instance of the instance type provides in the scaling group. A greater weight indicates that fewer instances of this instance type are required to meet the expected capacity. Because instance types have different performance metrics such as the number of vCPUs and memory size, you can configure different weights for different instance types based on your business requirements. Example:
To meet the expected capacity, the scaling group scales out by adding two ecs.c5.xlarge instances. Note
During scale-out, the capacity of the scaling group cannot exceed the sum of the maximum capacity (MaxSize) and the maximum weight of the instance type. Valid values of WeightedCapacity: 1 to 500. |
4 |
| DataDisks |
array<object> |
No |
The collection of data cloud disk information. |
|
|
object |
No |
The collection of data cloud disk information. |
||
| PerformanceLevel |
string |
No |
The settings of the performance level for the data cloud disk when it is an ESSD. Valid values:
Note
For more information about how to select the performance level of an ESSD, see ESSDs. |
PL0 |
| AutoSnapshotPolicyId |
string |
No |
The ID of the automatic snapshot policy applied to the data cloud disk. |
sp-bp19nq9enxqkomib**** |
| Encrypted |
string |
No |
Specifies whether to encrypt the data cloud disk. Valid values:
Default value: false. |
false |
| Description |
string |
No |
The description of the data cloud disk. The description must be 2 to 256 characters in length and cannot start with |
Test data disk. |
| SnapshotId |
string |
No |
The snapshot used to create the data cloud disk. If this parameter is specified, DataDisks.Size is ignored, and the actual size of the created disk is the size of the specified snapshot. If the snapshot was created on or before July 15, 2013, the call is rejected and the InvalidSnapshot.TooOld error code is returned. |
s-280s7**** |
| Categories |
array |
No |
The multiple disk types of the data cloud disk. If the disk type with a higher priority is unavailable, Auto Scaling automatically tries the disk type with the next highest priority to create the data cloud disk. Valid values:
Note
If you specify this parameter, you cannot specify |
|
|
string |
No |
The multiple disk types of the data cloud disk. If the disk type with a higher priority is unavailable, Auto Scaling automatically tries the disk type with the next highest priority to create the data cloud disk. Valid values:
Note
If you specify this parameter, you cannot specify |
cloud |
|
| Size |
integer |
No |
The size of the data cloud disk. Unit: GiB. Valid values:
If you specify this parameter, the disk size must be greater than or equal to the snapshot size specified by SnapshotId. |
100 |
| Device |
string |
No |
The mount point of the data cloud disk. If you do not specify this parameter, the system automatically allocates a mount point by default during automatic creation of the ECS instance. The mount point starts from /dev/xvdb and ends at /dev/xvdz. |
/dev/xvdb |
| DiskName |
string |
No |
The name of the data cloud 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 and cannot start with |
cloud_ssdData |
| Category |
string |
No |
The category of the data cloud disk. Valid values:
You cannot specify this parameter together with DataDisk.Categories. If neither this parameter nor DataDisk.Categories is specified, the default value is used:
|
cloud_ssd |
| DeleteWithInstance |
boolean |
No |
Specifies whether to release the data cloud disk when the instance is released. Valid values:
You can set this parameter only for independent cloud disks (when DataDisks.Category is set to cloud, cloud_efficiency, cloud_ssd, or cloud_essd). Otherwise, an error is returned. Default value: true. |
true |
| KMSKeyId |
string |
No |
The ID of the Key Management Service (KMS) key used by the data cloud disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| ProvisionedIops |
integer |
No |
The provisioned IOPS (Input/Output Operations Per Second) performance metrics of the data cloud disk. Note
IOPS indicates the number of I/O operations that can be processed per second. It measures the read and write capabilities of block storage. Unit: operations per second. |
100 |
| BurstingEnabled |
boolean |
No |
Specifies whether to enable the burstable performance feature for the data cloud disk. Valid values:
Note
You can set this parameter only when For more information, see ESSD AutoPL cloud disks. |
false |
| SpotPriceLimits |
array<object> |
No |
The collection of billing information for spot instances. |
|
|
object |
No |
The collection of billing information for spot instances. |
||
| PriceLimit |
number |
No |
The maximum hourly price for the spot instance. This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit. |
0.5 |
| InstanceType |
string |
No |
The instance type of the spot instance. This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit. |
ecs.g6.large |
| SecurityGroupIds |
array |
No |
Adds the ECS instance to multiple security groups at the same time. For more information, see the Security groups section in Limits. Note
You cannot specify both SecurityGroupId and SecurityGroupIds at the same time. |
|
|
string |
No |
Adds the ECS instance to multiple security groups at the same time. For more information, see the Security groups section in Limits. Note
You cannot specify both SecurityGroupId and SecurityGroupIds at the same time. |
sg-bp18kz60mefs**** |
|
| InstancePatternInfos |
array<object> |
No |
The collection of intelligent configuration information used to filter instance types that meet your requirements. |
|
|
object |
No |
The collection of intelligent configuration information used to filter instance types that meet your requirements. |
||
| Cores |
integer |
No |
The number of vCPUs of the instance type in intelligent configuration mode. This parameter is used to filter instance types that meet your requirements. For more information, see Instance families. Take note of the following items:
|
2 |
| InstanceFamilyLevel |
string |
No |
The level of the instance family. This parameter is used to filter instance types that meet your requirements and takes effect when
|
EnterpriseLevel |
| MaxPrice |
number |
No |
The maximum acceptable hourly price for pay-as-you-go or spot instances in intelligent configuration mode. This parameter is used to filter instance types that meet your requirements. Note
This parameter is required when SpotStrategy is set to SpotWithPriceLimit. In other cases, this parameter is optional. |
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 your requirements. |
4 |
| ExcludedInstanceTypes |
array |
No |
The instance types to be excluded. You can use a wildcard (*) to exclude a single instance type or an entire instance family. Examples:
|
|
|
string |
No |
The instance types to be excluded. You can use a wildcard (*) to exclude a single instance type or an entire instance family. Examples:
|
ecs.n1.small/ecs.n1.*/*7* |
|
| Architectures |
array |
No |
The architecture type of the instance type. Valid values:
Default value: all architecture types. |
|
|
string |
No |
The architecture type of the instance type. Valid values:
Default value: all architecture types. |
X86 |
|
| BurstablePerformance |
string |
No |
Specifies whether the instance type is a burstable instance type. Valid values:
Default value: Include. |
Include |
| InstanceTypeFamilies |
array |
No |
The instance families to be queried. N indicates that you can specify multiple instance families. Valid values of N: 1 to 10. |
|
|
string |
No |
The instance families to be queried. N indicates that you can specify multiple instance families. Valid values of N: 1 to 10. |
ecs.g6 |
|
| MinimumCpuCoreCount |
integer |
No |
The minimum number of vCPUs of the instance type. |
2 |
| MaximumCpuCoreCount |
integer |
No |
The maximum number of vCPUs of the instance type. Note
The value of MaximumCpuCoreCount cannot exceed four times the value of MinimumCpuCoreCount. |
4 |
| GpuSpecs |
array |
No |
The GPU type. |
|
|
string |
No |
The GPU type. |
NVIDIA V100 |
|
| InstanceCategories |
array |
No |
The instance categorization. Valid values: Note
N indicates the Settings for multiple instance categories. Valid values of N: 1 to 10.
|
|
|
string |
No |
The instance categorization. Valid values: Note
N indicates the Settings for multiple instance categories. Valid values of N: 1 to 10.
|
Compute-optimized with GPU |
|
| CpuArchitectures |
array |
No |
The CPU architecture of the instance. Valid values: Note
N indicates that you can specify multiple CPU architectures. Valid values of N: 1 to 2.
|
|
|
string |
No |
The CPU architecture of the instance. Valid values: Note
N indicates that you can specify multiple CPU architectures. Valid values of N: 1 to 2.
|
X86 |
|
| PhysicalProcessorModels |
array |
No |
The physical processor model of the instance. N indicates that you can specify multiple processor models. Valid values of N: 1 to 10. |
|
|
string |
No |
The physical processor model 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 |
|
| MinimumEniQuantity |
integer |
No |
The minimum upper limit on the number of network interface controller (NIC) devices that can be mounted to the instance. |
2 |
| MinimumEniPrivateIpAddressQuantity |
integer |
No |
The minimum upper limit on the number of IPv4 addresses per elastic network interfaces (ENIs) or network interface controller (NIC) for the instance. |
2 |
| MinimumEniIpv6AddressQuantity |
integer |
No |
The minimum upper limit on the number of IPv6 addresses per elastic network interfaces (ENIs) or network interface controller (NIC) for the instance. |
1 |
| MinimumInitialCredit |
integer |
No |
The minimum initial vCPU credit value for t5 and t6 burstable instances. |
12 |
| MinimumBaselineCredit |
integer |
No |
The minimum baseline vCPU computing performance (the sum of all vCPUs) for t5 and t6 burstable instances. |
12 |
| MinimumMemorySize |
number |
No |
The minimum memory size of the instance. Unit: GiB. |
4 |
| MaximumMemorySize |
number |
No |
The maximum memory size of the instance. Unit: GiB. |
4 |
| MinimumGpuAmount |
integer |
No |
The minimum number of GPUs for the instance. Valid values: positive integers. |
2 |
| MaximumGpuAmount |
integer |
No |
The maximum number of GPUs for the instance. Valid values: positive integers. |
2 |
| SystemDiskCategories |
array |
No |
The disk types for the system cloud disk. If a disk type with a higher priority is unavailable, Auto Scaling automatically attempts to use the disk type with the next highest priority to create the system cloud disk. Valid values:
Note
You cannot specify both this parameter and |
|
|
string |
No |
The disk types for the system cloud disk. If a disk type with a higher priority is unavailable, Auto Scaling automatically attempts to use the disk type with the next highest priority to create the system cloud disk. Valid values:
Note
You cannot specify both this parameter and |
cloud |
|
| SystemDisk.Encrypted |
boolean |
No |
Specifies whether to encrypt the system cloud disk. Valid values:
Default value: false. |
false |
| SystemDisk.KMSKeyId |
string |
No |
The ID of the KMS key used for the system cloud disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| SystemDisk.EncryptAlgorithm |
string |
No |
The encryption algorithm used for the system cloud disk. Valid values:
Default value: AES-256. |
AES-256 |
| SystemDisk.ProvisionedIops |
integer |
No |
The provisioned IOPS (Input/Output Operations Per Second) performance metrics for the system cloud disk. Note
IOPS refers to the number of I/O operations that can be processed per second. It indicates the read and write processing capability of block storage. Unit: operations per second. |
100 |
| SystemDisk.BurstingEnabled |
boolean |
No |
Specifies whether to enable the burst (performance burst) feature for the system cloud disk. Valid values:
Note
This parameter is supported only when For more information, see ESSD AutoPL cloud disks. |
false |
| ImageOptions.LoginAsNonRoot |
boolean |
No |
Specifies whether to log on to the ECS instance as the ecs-user user. For more information, see Manage the logon username of an ECS instance. Valid values:
Default value: false. |
false |
| DeletionProtection |
boolean |
No |
The release protection property of the instance. This property specifies whether the instance can be directly released by using the ECS console or the DeleteInstance API operation, which prevents accidental deletion of the instance. Valid values:
Default value: false. Note
This property applies only to pay-as-you-go instances to prevent instances created by Auto Scaling during scale-out from being accidentally deleted. It does not affect normal scale-in activities. Instances with release protection enabled can still be released during scale-in activities. |
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: integers greater than or equal to 2. |
2 |
| CustomPriorities |
array<object> |
No |
The custom priority of the ECS instance type and vSwitch combination. Important This parameter takes effect only when the scaling policy of the scaling group is set to the priority-based policy. If an instance cannot be created based on the instance type and vSwitch combination with a higher priority, Auto Scaling automatically selects the combination with the next highest priority to create the instance. Note
If you specify custom priorities for only some instance type and vSwitch combinations, the unspecified combinations have lower priorities than the specified ones. The priorities of the unspecified combinations are determined based on the vSwitch sequence in the scaling group and the instance type sequence in the scaling configuration.
|
|
|
object |
No |
|||
| InstanceType |
string |
No |
The instance type of the ECS instance. Important The instance type must be included in the instance type list of the scaling configuration. |
ecs.g6.large |
| VswitchId |
string |
No |
The ID of the vSwitch. Important The vSwitch must be included in the vSwitch list of the scaling group. |
vsw-bp14zolna43z266bq**** |
| NetworkInterfaces |
array<object> |
No |
The list of network interface controller (NIC) devices. |
|
|
object |
No |
The elastic network interfaces (ENIs) or network interface controller (NIC). |
||
| InstanceType |
string |
No |
The elastic network interfaces (ENIs) type. When you use this parameter, you must use the NetworkInterfaces Settings for the primary network interface controller (NIC), and you cannot set the SecurityGroupId or SecurityGroupIds parameter. Valid values:
Default value: Secondary. |
Primary |
| NetworkInterfaceTrafficMode |
string |
No |
The communication pattern of the network interface controller (NIC). Valid values of the parameter:
Default value: Standard. Note
The number of elastic network interfaces (ENIs) in RDMA pattern cannot exceed the limit of the instance family. For more information, see Instance families. |
HighPerformance |
| Ipv6AddressCount |
integer |
No |
The number of randomly generated IPv6 addresses for the primary ENI. Take note of the following items:
|
1 |
| SecurityGroupIds |
array |
No |
The IDs of one or more security groups to which the elastic network interfaces (ENIs) belong. |
|
|
string |
No |
The IDs of one or more security groups to which the elastic network interfaces (ENIs) belong. Take note of the following items:
|
sg-uf6ij8dwxxxxxx |
|
| SecondaryPrivateIpAddressCount |
integer |
No |
The number of secondary private IPv4 addresses to be assigned to the ENI. Valid values: 1 to 49.
|
6 |
| VSwitchIds |
array |
No |
The ID of the vSwitch to which the elastic network interfaces (ENIs) belong. N indicates the Settings for multiple vSwitches. Valid values of N: 1 to 10. Take note of the following items:
|
|
|
string |
No |
The ID of the vSwitch to which the elastic network interfaces (ENIs) belong. N indicates the Settings for multiple vSwitches. Valid values of N: 1 to 10. Take note of the following items:
|
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:
Default value: enabled. Note
For more information about instance metadata, see Overview of instance metadata. |
enabled |
| HttpTokens |
string |
No |
Specifies whether to forcibly use the security-hardened mode (IMDSv2) to access instance metadata. Valid values:
Default value: optional. Note
For more information about the modes for accessing instance metadata, see Access modes of instance metadata. |
optional |
| ResourcePoolOptions |
object |
No |
The resource pool policy used when creating the instance. Take note of the following items when you configure this parameter:
|
|
| Strategy |
string |
No |
Resource pools include private pools generated after the elasticity assurance or capacity reservation service takes effect, as well as public pools. They are available for selection when the instance starts. Valid values:
Default value: None. |
PrivatePoolFirst |
| PrivatePoolIds |
array |
No |
The ID of the private pool, which is the ID of the elasticity assurance or capacity reservation service. You can only specify the ID of a private pool in Target mode, and you cannot specify this parameter together with PrivatePoolTags. |
|
|
string |
No |
The ID of the private pool, which is the ID of the elasticity assurance or capacity reservation service. You can only specify the ID of a private pool in Target mode, and you cannot specify this parameter together with PrivatePoolTags. 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. Note:
|
|
|
object |
No |
Filters available Target private pools by tag. Valid values of N: 1 to 20. Note:
|
||
| Key |
string |
No |
The tag key of the private pool. |
TestKey |
| Value |
string |
No |
The tag value of the private pool. |
TestValue |
| InstanceTypeCandidateOptions |
object |
No |
After you enable the candidate mode, if issues such as insufficient stock occur, the system supplements the currently selected instance types with similar instance types of the same size, or creates vSwitches in candidate zones and adds them to the scaling group. |
|
| Enabled |
boolean |
No |
Specifies whether to enable the candidate mode. |
true |
| MaxPrice |
number |
No |
The maximum price for candidate instance types. |
2.10 |
| AllowDifferentGeneration |
boolean |
No |
Specifies whether to allow supplementing instance types of other generations.
|
true |
| AllowCrossAz |
boolean |
No |
Specifies whether to allow supplementing vSwitches in other zones. Note
The instance types remain unchanged, and only new zones are used as candidates. If the scaling group cannot scale out in all selected zones due to issues such as insufficient stock, the system automatically adds vSwitches in new zones to the scaling group based on this configuration. For example, if the scaling group is configured with the cn-hangzhou-h and cn-hangzhou-g zones, and scale-out fails in both zones, Auto Scaling may create a vSwitch in the cn-hangzhou-k zone and add it to the scaling group based on real-time stock availability. |
true |
| AllowCidrBlocks |
array |
No |
Specifies the CIDR blocks of the optional vSwitches when you add vSwitches in other zones. |
|
|
string |
No |
The vSwitch CIDR block must meet the following requirements:
|
172.16.0.0/24 |
|
| SecondaryEniVSwitchConstraint |
string |
No |
Specifies whether a vSwitch available for secondary elastic network interfaces (ENIs) must be selected from the list when the VSwitchIds parameter is specified for the secondary ENIs. Valid values:
Default value: Strict. |
Strict |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The information about the created scaling configuration. |
||
| ScalingConfigurationId |
string |
The ID of the scaling configuration. |
asc-bp1ffogfdauy0nu5**** |
| RequestId |
string |
The ID of the request. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Examples
Success response
JSON format
{
"ScalingConfigurationId": "asc-bp1ffogfdauy0nu5****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.