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.
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 |
---|---|---|---|---|
hdm:ModifyAutoScalingConfig | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The instance ID. | rm-2ze8g2am97624**** |
Spec | object | No | The configuration item of the auto scaling feature for specifications. | |
Apply | boolean | No | Specifies whether to apply the Spec configuration of the auto scaling feature for specifications. Valid values:
| true |
Upgrade | boolean | No | Specifies whether to enable the automatic specification scale-up feature. 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 an ApsaraDB for Redis 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 suffix unit specifies the day.
| 5m |
Downgrade | boolean | No | Specifies whether to enable the automatic specification scale-down feature. 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 the automatic storage expansion feature. 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. The value must be greater than or equal to the total storage size of the instance. Valid values of different types of instances:
Note
The ApsaraDB RDS for MySQL instances that use standard SSDs are discontinued. We recommend that you upgrade the storage type of an ApsaraDB RDS for MySQL instance from standard SSDs to ESSDs.
| 32000 |
Bandwidth | object | No | The configuration item of the automatic bandwidth adjustment feature. | |
Apply | boolean | No | Specifies whether to apply the Bandwidth configuration of the automatic bandwidth adjustment feature. Valid values:
| true |
Upgrade | boolean | No | Specifies whether to enable the automatic bandwidth upgrade feature. 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 automatic bandwidth adjustment 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 the automatic bandwidth downgrade feature. 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 auto scaling feature for shards. | |
Apply | boolean | No | Specifies whether to apply the Shard configuration of the auto scaling feature for shards. Valid values:
Note
The auto scaling feature for shards is available only for ApsaraDB for Redis Community Edition cloud-native instances on the China site (aliyun.com).
| true |
Upgrade | boolean | No | Specifies whether to enable the feature of automatically adding shards. Valid values:
| true |
MemUsageUpperThreshold | integer | No | The average memory usage threshold that triggers automatic adding of shards. 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 feature of automatically adding shards. 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 the feature of automatically removing shards. Valid values:
Note
The feature of automatically removing shards is in canary release.
| true |
MemUsageLowerThreshold | integer | No | The average memory usage threshold that triggers automatic removal of shards. 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 feature of automatically removing shards. 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 auto scaling feature for resources. | |
Apply | boolean | No | Specifies whether to apply the Resource configuration of the auto scaling feature for resources. Valid values:
| true |
Enable | boolean | No | Specifies whether to enable the auto scaling feature for resources. Valid values:
| true |
CpuUsageUpperThreshold | integer | No | The average CPU utilization threshold that triggers automatic scale-out of resources. 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:
| 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 parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"Message": "Successful",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success": "true"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | InvalidParams | The request parameters are invalid. |
403 | NoPermission | You are not authorized to do this action. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||
---|---|---|---|---|---|---|
2024-02-22 | The Error code has changed | see changesets | ||||
|