Modifies a scaling configuration.
Operation description
You can change the name of a scaling configuration in a scaling group. The name must be unique within the scaling group.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ess:ModifyScalingConfiguration | Write |
|
| 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 to create an I/O optimized instance. Valid values:
| none |
SpotStrategy | string | No | The preemption policy that you want to apply to pay-as-you-go instances and preemptible 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 (.). The name must start with a letter or a digit. The name of the scaling configuration must be unique in a region. If you do not specify this parameter, the scaling configuration ID is used. | test-modify |
InstanceName | string | No | The name of the Elastic Compute Service (ECS) instance that is automatically created by using the scaling configuration. | inst**** |
HostName | string | No | The hostname of the ECS instance. The hostname cannot start or end with a period (.) or a hyphen (-). The hostname cannot contain consecutive periods (.) or hyphens (-). Naming conventions for different types of instances:
| hos**** |
ImageId | string | No | The ID of the image that is used by Auto Scaling to automatically create ECS instances. Note
If the image that is specified in the scaling configuration contains system disks and data disks, the data that is stored in the data disks is cleared after you modify the image.
| centos6u5_64_20G_aliaegis_2014****.vhd |
ImageName | string | No | The name of the image. Each image name must be unique in a region. If you specify ImageId, ImageName is ignored. You cannot use ImageName to specify images from Alibaba Cloud Marketplace. | suse11sp3_64_20G_aliaegis_2015****.vhd |
Cpu | integer | No | The number of vCPUs. You can specify the number of vCPUs and the memory size to determine the range of instance types. For example, you can set Cpu to 2 and Memory to 16 to specify instance types that have 2 vCPUs and 16 GiB of memory. If you specify Cpu and Memory, Auto Scaling determines the available instance types based on factors such as I/O optimization requirements and zones. Then, Auto Scaling preferentially creates instances by using the lowest-priced instance type. Note
You can specify CPU and Memory to determine the range of instance types only if you set Scaling Policy to Cost Optimization Policy and you do not specify an instance type in the scaling configuration.
| 2 |
Memory | integer | No | The memory size. Unit: GiB. You can specify the number of vCPUs and the memory size to determine the range of instance types. For example, you can set Cpu to 2 and Memory to 16 to specify instance types that have 2 vCPUs and 16 GiB of memory. If you specify Cpu and Memory, Auto Scaling determines the available instance types based on factors such as I/O optimization requirements and zones. Then, Auto Scaling preferentially creates instances by using the lowest-priced instance type. Note
You can specify CPU and Memory to determine the range of instance types only if you set Scaling Policy to Cost Optimization Policy and you do not specify an instance type in the scaling configuration.
| 16 |
InternetChargeType | string | No | The metering method for network usage. Valid values:
| PayByBandwidth |
InternetMaxBandwidthOut | integer | No | The maximum outbound public bandwidth. Unit: Mbit/s. Valid values:
| 50 |
SystemDisk.Category | string | No | The category of the system disk. Valid values:
If you specify SystemDisk.Category, you cannot specify | cloud_efficiency |
SystemDisk.Size | integer | No | The size of the system disk. Unit: GiB. Valid values:
The value of SystemDisk.Size must be greater than or equal to max{20, ImageSize}. | 50 |
SystemDisk.DiskName | string | No | The name of the system disk. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). The name must start with a letter but cannot start with Default value: null. | cloud_ssdSystem |
SystemDisk.Description | string | No | The description of the system disk. The description must be 2 to 256 characters in length. The description can contain letters but cannot start with | Test system disk. |
SystemDisk.AutoSnapshotPolicyId | string | No | The ID of the automatic snapshot policy that you want to apply to the system disk. | sp-bp12m37ccmxvbmi5**** |
SystemDisk.PerformanceLevel | string | No | The performance level (PL) of the system disk that is an ESSD. Valid values:
Note
For more information about how to select ESSD PLs, see ESSD .
| PL0 |
LoadBalancerWeight | integer | No | The weight of an ECS instance as a 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 data before encoding is 16 KB. | echo hello ecs! |
KeyPairName | string | No | The name of the key pair that you can use to log on to an ECS instance.
| KeyPair_Name |
RamRoleName | string | No | The name of the RAM role that you want to attach to the ECS instance. The name is provided and maintained by Resource Access Management (RAM). You can call the ListRoles operation to query the available RAM roles. You can call the CreateRole operation to create RAM roles. | RamRoleTest |
PasswordInherit | boolean | No | Specifies whether to use the password that is preconfigured in the image. Before you use this parameter, make sure that a password is configured in the image. | false |
Tags | string | No | The tags of the ECS instance. Specify the tags as key-value pairs. You can specify up to 20 tags. When you specify tag keys and tag values, take note of the following items:
| {"key1":"value1","key2":"value2", ... "key5":"value5"} |
DeploymentSetId | string | No | The ID of the deployment set of the ECS instances that are created by using the scaling configuration. | ds-bp13v7bjnj9gis**** |
SecurityGroupId | string | No | The ID of the security group with which ECS instances are associated. The ECS instances that are associated with the same security group can access each other. | sg-F876F**** |
Override | boolean | No | Specifies whether to overwrite existing data. Valid values:
| true |
ResourceGroupId | string | No | The ID of the resource group to which the ECS instances belong. | abcd1234abcd**** |
HpcClusterId | string | No | The ID of the Elastic High Performance Computing (E-HPC) cluster to which the ECS instances belong. | hpc-clusterid |
InstanceDescription | string | No | The description of the ECS instance. The description must be 2 to 256 characters in length. The description can contain letters but cannot start with | Test instance. |
Ipv6AddressCount | integer | No | The number of randomly generated IPv6 addresses that you want to allocate to the elastic network interface (ENI). | 1 |
CreditSpecification | string | No | The performance mode of the burstable instance. Valid values:
| Standard |
ImageFamily | string | No | The name of the image family. If you specify this parameter, the latest custom images that are available in the specified image family are returned. Then, you can use the images to create instances. If you specify ImageId, you cannot specify ImageFamily. | hangzhou-daily-update |
ZoneId | string | No | The zone ID of the ECS instances that are created by using the scaling configuration. | cn-hangzhou-g |
DedicatedHostId | string | No | The ID of the dedicated host on which you want to create ECS instances. You cannot create preemptible instances on dedicated hosts. If you specify DedicatedHostId, SpotStrategy and SpotPriceLimit are ignored. You can call the DescribeDedicatedHosts operation to query the most recent list of dedicated host IDs. | dh-bp67acfmxazb4p**** |
Affinity | string | No | Specifies whether to associate an ECS instance on a dedicated host with the dedicated host. Valid values:
| default |
Tenancy | string | No | Specifies whether to create an ECS instance on a dedicated host. Valid values:
| default |
SchedulerOptions | object | No | The scheduler options. | ["testManagedPrivateSpaceId****"] |
PrivatePoolOptions.MatchCriteria | string | No | The type of the private pool that you want to use to start instances. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. You can select a private pool for Auto Scaling to start instances. Valid values:
| Open |
PrivatePoolOptions.Id | string | No | The ID of the private pool. The ID of a private pool is the same as the ID of the elasticity assurance or capacity reservation for which the private pool is generated. | eap-bp67acfmxazb4**** |
SpotDuration | integer | No | The retention period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6.
| 1 |
SpotInterruptionBehavior | string | No | The interruption mode of the preemptible instance. Default value: Terminate. Set the value to Terminate. This value specifies that the preemptible instance is to be released. | Terminate |
DataDisks | object [] | No | The data disks. | |
PerformanceLevel | string | No | The PL of the data disk that is an ESSD. Valid values:
Note
For more information about how to select ESSD PLs, see ESSD .
| PL1 |
AutoSnapshotPolicyId | string | No | The ID of the automatic snapshot policy that you want to apply to the data disk. | sp-bp19nq9enxqkomib**** |
Encrypted | string | No | Specifies whether to encrypt the system disk. Valid values:
| false |
Description | string | No | The description of the system disk. The description must be 2 to 256 characters in length. The description can contain letters but cannot start with | Test data disk. |
SnapshotId | string | No | The ID of the snapshot that you want to use to create data disks. If you specify this parameter, DataDisk.N.Size is ignored. The size of the disk is the same as the size of the specified snapshot. If you specify a snapshot that is created on or before July 15, 2013, the operation fails and the system returns InvalidSnapshot.TooOld. | s-snapshot**** |
Categories | array | No | The categories of the data disks. Valid values:
Note
If you specify Categories, you cannot specify DataDisk.Category .
| |
string | No | The category of the data disk. If Auto Scaling cannot create instances by using the disk category that has the highest priority, Auto Scaling creates instances by using the disk category that has the next highest priority. Valid values:
Note
If you specify Categories, you cannot specify DataDisk.Category .
| cloud | |
Size | integer | No | The size of the data disk. Unit: GiB. Valid values:
The size of the data disk must be greater than or equal to the size of the snapshot that is specified by SnapshotId. | 100 |
Device | string | No | The mount target of the data disk. If you do not specify Device, a mount target is automatically assigned when Auto Scaling creates ECS instances. The name of the mount target ranges from /dev/xvdb to /dev/xvdz. | /dev/xvdd |
DiskName | string | No | The name of the system disk. The name must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). The name must start with a letter but cannot start with | cloud_ssdData |
Category | string | No | The category of the data disk. Valid values:
If you specify Category, you cannot specify
| cloud_ssd |
DeleteWithInstance | boolean | No | Specifies whether to release the data disk when the instance to which the data disk is attached is released. Valid values:
This parameter is available only for independent disks whose Category is set to cloud, cloud_efficiency, cloud_ssd, cloud_essd, or cloud_auto. If you specify this parameter for other disks, an error is reported. | true |
KMSKeyId | string | No | The ID of the Key Management Service (KMS) key that you want to use to encrypt the data disk. | 0e478b7a-4262-4802-b8cb-00d3fb40**** |
ProvisionedIops | long | No | The IOPS metric that is preconfigured for the data disk. Note
IOPS measures the number of read and write operations that an Elastic Block Storage (EBS) device can process per second.
| 100 |
BurstingEnabled | boolean | No | Specifies whether to enable the burst feature for the system disk. Valid values:
Note
This parameter is available only if you set SystemDisk.Category to cloud_auto .
| false |
SpotPriceLimits | object [] | No | The preemptible instance types. | |
PriceLimit | float | No | The price limit of the preemptible instance. This parameter takes effect only if you set SpotStrategy to SpotWithPriceLimit. | 0.125 |
InstanceType | string | No | The instance type of the preemptible instance. This parameter takes effect only if you set SpotStrategy to SpotWithPriceLimit. | ecs.g6.large |
InstanceTypes | array | No | The instance type. If you specify InstanceTypes, InstanceType is ignored. Auto Scaling creates instances based on the priorities of instance types. If Auto Scaling cannot create instances by using the instance type that has the highest priority, Auto Scaling creates instances by using the instance type that has the next highest priority. | |
string | No | The instance type. If you specify InstanceTypes, InstanceType is ignored. Auto Scaling creates instances based on the priorities of instance types. If Auto Scaling cannot create instances by using the instance type that has the highest priority, Auto Scaling creates instances by using the instance type that has the next highest priority. | ecs.g6.large | |
InstanceTypeOverrides | object [] | No | The instance types. | |
InstanceType | string | No | The instance type. If you want to specify the capacity of instance types in the scaling configuration, specify InstanceType and WeightedCapacity at the same time. You can use InstanceType to specify multiple instance types and WeightedCapacity to specify the weights of the instance types. Note
If you specify InstanceType, you cannot specify InstanceTypes.
You can use InstanceType to specify only instance types that are available for purchase. | ecs.c5.xlarge |
WeightedCapacity | integer | No | The weight of the instance type. The weight specifies the capacity of an instance of the specified instance type in the scaling group. If you want Auto Scaling to scale instances in the scaling group based on the weighted capacity of the instances, specify WeightedCapacity after you specify InstanceType. A higher weight specifies that a smaller number of instances of the specified instance type are required to meet the expected capacity requirement. Performance metrics, such as the number of vCPUs and the memory size of each instance type, may vary. You can specify different weights for different instance types based on your business requirements. Example:
To meet the expected capacity requirement, Auto Scaling must create and add two ecs.c5.xlarge instances. Note
The capacity of the scaling group cannot exceed the sum of the maximum number of instances that is specified by MaxSize and the maximum weight of the instance types.
Valid values of WeightedCapacity: 1 to 500. | 4 |
SecurityGroupIds | array | No | The IDs of the security groups. | |
string | No | The ID of the security group. | sg-bp18kz60mefs**** | |
InstancePatternInfos | object [] | No | The intelligent configuration settings, which determines the range of instance types that meet the specified criteria. | |
Cores | integer | No | The number of vCPUs that you want to allocate to an instance type in intelligent configuration mode. You can use this parameter to filter the available instance types that meet the specified criteria. For more information, see Overview of instance families. When you specify this parameter, take note of the following items:
| 2 |
InstanceFamilyLevel | string | No | The level of the instance family. You can use this parameter to filter instance types that meet the specified criteria. This parameter takes effect only if you set
| EnterpriseLevel |
MaxPrice | float | No | The maximum hourly price for a pay-as-you-go instance or a preemptible instance in intelligent configuration mode. You can use this parameter to filter the available instance types that meet the specified criteria. Note
If you set SpotStrategy to SpotWithPriceLimit, specify MaxPrice. In other scenarios, MaxPrice is optional.
| 2 |
Memory | float | No | The memory size that you want to allocate to an instance type in intelligent configuration mode. Unit: GiB. You can use this parameter to filter the available instance types that meet the specified criteria. | 4 |
Architectures | array | No | The architectures of the instance types.
By default, all values are included. | |
string | No | The architecture of the instance type. Valid values:
By default, all values are included. | X86 | |
BurstablePerformance | string | No | Specifies whether to include burstable instance types. Valid values:
Default value: Include | Include |
ExcludedInstanceTypes | array | No | The instance types that you want to exclude. You can use wildcard characters such as an asterisk (*) to exclude an instance type or an instance family. Examples:
| |
string | No | The instance type that you want to exclude. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family. Examples:
| ecs.n1.small/ecs.n1.*/*7* | |
SystemDiskCategories | array | No | The categories of the system disks. If Auto Scaling cannot create instances by using the disk category that has the highest priority, Auto Scaling creates instances by using the disk category that has the next highest priority. Valid values:
Note
If you specify SystemDiskCategories, you cannot specify SystemDisk.Category .
| |
string | No | The category of the system disk. If Auto Scaling cannot create instances by using the disk category that has the highest priority, Auto Scaling creates instances by using the disk category that has the next highest priority. Valid values:
Note
If you specify SystemDiskCategories, you cannot specify SystemDisk.Category .
| cloud | |
SystemDisk.Encrypted | boolean | No | Specifies whether to encrypt the system disk. Valid values:
Default value: false | false |
SystemDisk.KMSKeyId | string | No | The ID of the KMS key that you want to use to encrypt the system disk. | 0e478b7a-4262-4802-b8cb-00d3fb40**** |
SystemDisk.EncryptAlgorithm | string | No | The algorithm that you want to use to encrypt the system disk. Valid values:
Default value: AES-256 | AES-256 |
SystemDisk.ProvisionedIops | long | No | The IOPS metric that is preconfigured for the system disk. Note
IOPS measures the number of read and write operations that an EBS device can process per second.
| 100 |
SystemDisk.BurstingEnabled | boolean | No | Specifies whether to enable the burst feature for the system disk. Valid values:
Note
This parameter is available only if you set SystemDisk.Category to cloud_auto .
| false |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2024-03-20 | The request parameters of the API has changed | see changesets | ||||||
| ||||||||
2024-01-29 | The request parameters of the API has changed | see changesets | ||||||
| ||||||||
2023-11-24 | The request parameters of the API has changed | see changesets | ||||||
| ||||||||
2023-08-23 | The request parameters of the API has changed | see changesets | ||||||
| ||||||||
2023-04-12 | The request parameters of the API has changed | see changesets | ||||||
|