Modifies the auto scaling configurations of an instance.
Operation description
You can call this operation to modify the following auto scaling configurations of an instance: auto scaling for specifications, automatic storage expansion, automatic bandwidth adjustment, and auto scaling for resources.
-
You can modify the configurations of the auto scaling feature for specifications for the following types of database instances:
PolarDB for MySQL Cluster Edition instances. For more information about the feature and the billing rules, see Automatic performance scaling.
ApsaraDB RDS for MySQL High-availability Edition instances that use standard SSDs or enhanced SSDs (ESSDs). For more information about the feature and the billing rules, see Automatic performance scaling.
-
You can modify the configurations of the automatic storage expansion feature for the following types of database instances:
ApsaraDB RDS for MySQL High-availability Edition instances that use standard SSDs or ESSDs. For more information about the feature and the billing rules, see Automatic space expansion.
-
You can modify the configurations of the automatic bandwidth adjustment feature for the following types of database instances:
ApsaraDB for Redis Classic (Local Disk-based) Edition instances. For more information about the feature and the billing rules, see Automatic bandwidth adjustment.
-
You can modify the configurations of the auto scaling feature for resources for the following types of database instances:
General-purpose ApsaraDB RDS for MySQL Enterprise Edition instances. For more information about the feature and the billing rules, see Automatic performance scaling.
-
If you use an Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.
-
If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:ModifyAutoScalingConfig |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
rm-2ze8g2am97624**** |
| Spec |
object |
No |
The configuration item of the specification auto scaling feature. |
|
| Apply |
boolean |
No |
Specifies whether to apply the Spec configuration of the specification auto scaling feature. Valid values:
|
true |
| Upgrade |
boolean |
No |
Specifies whether to enable automatic specification scale-up. Valid values:
|
true |
| CpuUsageUpperThreshold |
integer |
No |
The average CPU utilization threshold that triggers automatic specification scale-up. Unit: %. Valid values:
Note
This parameter must be specified if the database instance is a PolarDB for MySQL Cluster Edition instance or an ApsaraDB RDS for MySQL High-availability Edition instance that uses standard SSDs or ESSDs. |
70 |
| MemUsageUpperThreshold |
integer |
No |
The average memory usage threshold that triggers automatic specification scale-up. Unit: %. Valid values:
Note
This parameter must be specified if the database instance is a Tair (Redis OSS-compatible) Community Edition cloud-native instance on the China site (aliyun.com). |
70 |
| MaxSpec |
string |
No |
The maximum specifications to which the database instance can be scaled up. The database instance can be upgraded only to a database instance of the same edition with higher specifications. For information about the specifications of different database instances, see the following topics:
|
polar.mysql.x8.12xlarge |
| MaxReadOnlyNodes |
integer |
No |
The maximum number of read-only nodes of the instance. Note
This parameter must be specified if the database instance is a PolarDB for MySQL Cluster Edition instance. |
10 |
| ObservationWindowSize |
string |
No |
The observation window. The value of this parameter consists of a numeric value and a time unit suffix. The m time unit suffix specifies the minute and the h time unit suffix specifies the hour.
|
5m |
| CoolDownTime |
string |
No |
The quiescent period. The value of this parameter consists of a numeric value and a time unit suffix. The m time unit suffix specifies the minute, the h time unit suffix specifies the hour, and the d time unit suffix specifies the day.
|
5m |
| Downgrade |
boolean |
No |
Specifies whether to enable automatic specification scale-down. Valid values:
Note
This parameter must be specified if the database instance is a PolarDB for MySQL Cluster Edition instance or an ApsaraDB RDS for MySQL High-availability Edition instance that uses standard SSDs or ESSDs. |
true |
| Storage |
object |
No |
The configuration item of the automatic storage expansion feature. |
|
| Apply |
boolean |
No |
Specifies whether to apply the Storage configuration of the automatic storage expansion feature. Valid values:
|
true |
| Upgrade |
boolean |
No |
Specifies whether to enable automatic storage expansion. Valid values:
|
true |
| DiskUsageUpperThreshold |
integer |
No |
The average storage usage threshold that triggers automatic storage expansion. Unit: %. Valid values:
|
70 |
| MaxStorage |
integer |
No |
The maximum storage size of the database instance. Unit: GB. The value must be greater than or equal to the total storage size of the instance.
Note
The standard SSD storage type is phased out. We recommend that you upgrade the storage type of your instance from standard SSDs to ESSDs. |
32000 |
| Bandwidth |
object |
No |
The configuration item of the bandwidth auto scaling feature. |
|
| Apply |
boolean |
No |
Specifies whether to apply the Bandwidth configuration of the bandwidth auto scaling feature. Valid values:
|
true |
| Upgrade |
boolean |
No |
Specifies whether to enable automatic bandwidth upgrade. Valid values:
|
true |
| BandwidthUsageUpperThreshold |
integer |
No |
The average bandwidth usage threshold that triggers automatic bandwidth upgrade. Unit: %. Valid values:
|
70 |
| ObservationWindowSize |
string |
No |
The observation window of the bandwidth auto scaling feature. The value of this parameter consists of a numeric value and a time unit suffix. The m time unit suffix specifies the minute. Valid values:
|
5m |
| Downgrade |
boolean |
No |
Specifies whether to enable automatic bandwidth downgrade. Valid values:
|
true |
| BandwidthUsageLowerThreshold |
integer |
No |
The average bandwidth usage threshold that triggers automatic bandwidth downgrade. Unit: %. Valid values:
|
30 |
| Shard |
object |
No |
The configuration item of the shard auto scaling feature. |
|
| Apply |
boolean |
No |
Specifies whether to apply the Shard configuration of the shard auto scaling feature. Valid values:
Note
The shard auto scaling feature is available only for Tair (Redis OSS-compatible) cloud-native cluster instances on the China site (aliyun.com). |
true |
| Upgrade |
boolean |
No |
Specifies whether to enable automatic shard addition. Valid values:
|
true |
| MemUsageUpperThreshold |
integer |
No |
The average memory usage threshold that triggers automatic shard addition. Unit: %. Valid values:
|
70 |
| MaxShards |
integer |
No |
The maximum number of shards in the instance. The value must be a positive integer. Valid values: 4 to 32. |
16 |
| UpgradeObservationWindowSize |
string |
No |
The observation window of the automatic shard addition feature. The value of this parameter consists of a numeric value and a time unit suffix. The m time unit suffix specifies the minute. Valid values:
|
5m |
| Downgrade |
boolean |
No |
Specifies whether to enable automatic shard removal. Valid values:
Note
The automatic shard removal feature is in a canary release. |
true |
| MemUsageLowerThreshold |
integer |
No |
The average memory usage threshold that triggers automatic shard removal. Unit: %. Valid values:
|
30 |
| MinShards |
integer |
No |
The minimum number of shards in the instance. The value must be a positive integer. Valid values: 4 to 32. |
4 |
| DowngradeObservationWindowSize |
string |
No |
The observation window of the automatic shard removal feature. The value of this parameter consists of a numeric value and a time unit suffix. The h time unit suffix specifies the hour. The d time unit suffix specifies the day. Valid values:
|
1h |
| Resource |
object |
No |
The configuration item of the resource auto scaling feature. |
|
| Apply |
boolean |
No |
Specifies whether to apply the Resource configuration of the resource auto scaling feature. Valid values:
|
true |
| Enable |
boolean |
No |
Specifies whether to enable resource auto scaling. Valid values:
|
true |
| CpuUsageUpperThreshold |
integer |
No |
The average CPU utilization threshold that triggers automatic resource scale-out. Unit: %. Valid values:
|
70 |
| UpgradeObservationWindowSize |
string |
No |
The observation window of the automatic resource scale-out feature. The value of this parameter consists of a numeric value and a time unit suffix. The m time unit suffix specifies the minute. Valid values:
Valid values:
|
5m |
| DowngradeObservationWindowSize |
string |
No |
The observation window of the automatic resource scale-in feature. The value of this parameter consists of a numeric value and a time unit suffix. The m time unit suffix specifies the minute. Valid values:
|
5m |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The HTTP status code returned. |
200 |
| Message |
string |
The returned message. Note
If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned. |
Successful |
| RequestId |
string |
The request ID. |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "Successful",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success": "true"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.