All Products
Search
Document Center

Database Autonomy Service:ModifyAutoScalingConfig

Last Updated:Mar 13, 2026

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

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

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

  • false

true

Upgrade

boolean

No

Specifies whether to enable automatic specification scale-up. Valid values:

  • true

  • false

true

CpuUsageUpperThreshold

integer

No

The average CPU utilization threshold that triggers automatic specification scale-up. Unit: %. Valid values:

  • 50

  • 60

  • 70

  • 80

  • 90

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:

  • 50

  • 60

  • 70

  • 80

  • 90

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.

  • Valid values for PolarDB for MySQL Cluster Edition instances: 5m, 10m, 15m, and 30m.

  • Valid values for ApsaraDB RDS for MySQL High-availability Edition instances that use standard SSDs or ESSDs: 5m, 20m, 30m, 40m, and 1h.

  • Valid values for Tair (Redis OSS-compatible) Community Edition cloud-native instances: 5m, 10m, 15m, and 30m.

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.

  • Valid values for PolarDB for MySQL Cluster Edition instances: 5m, 10m, 30m, 1h, 2h, 3h, 1d, and 7d.

  • Valid values for ApsaraDB RDS for MySQL High-availability Edition instances that use standard SSDs or Enterprise SSDs (ESSDs): 5m, 10m, 30m, 1h, 2h, 3h, 1d, and 7d.

5m

Downgrade

boolean

No

Specifies whether to enable automatic specification scale-down. Valid values:

  • true

  • false

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

  • false

true

Upgrade

boolean

No

Specifies whether to enable automatic storage expansion. Valid values:

  • true

  • false

true

DiskUsageUpperThreshold

integer

No

The average storage usage threshold that triggers automatic storage expansion. Unit: %. Valid values:

  • 50

  • 60

  • 70

  • 80

  • 90

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.

  • If the instance uses ESSDs, the maximum value of this parameter can be 32000.

  • If the instance uses standard SSDs, the maximum value of this parameter can be 6000.

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

  • false

true

Upgrade

boolean

No

Specifies whether to enable automatic bandwidth upgrade. Valid values:

  • true

  • false

true

BandwidthUsageUpperThreshold

integer

No

The average bandwidth usage threshold that triggers automatic bandwidth upgrade. Unit: %. Valid values:

  • 50

  • 60

  • 70

  • 80

  • 90

  • 95

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:

  • 1m

  • 5m

  • 10m

  • 15m

  • 30m

5m

Downgrade

boolean

No

Specifies whether to enable automatic bandwidth downgrade. Valid values:

  • true

  • false

true

BandwidthUsageLowerThreshold

integer

No

The average bandwidth usage threshold that triggers automatic bandwidth downgrade. Unit: %. Valid values:

  • 10

  • 20

  • 30

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:

  • true

  • false

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

  • false

true

MemUsageUpperThreshold

integer

No

The average memory usage threshold that triggers automatic shard addition. Unit: %. Valid values:

  • 50

  • 60

  • 70

  • 80

  • 90

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

  • 10m

  • 15m

  • 30m

5m

Downgrade

boolean

No

Specifies whether to enable automatic shard removal. Valid values:

  • true

  • false

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:

  • 10

  • 20

  • 30

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

  • 2h

  • 3h

  • 1d

  • 7d

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

  • false

true

Enable

boolean

No

Specifies whether to enable resource auto scaling. Valid values:

  • true

  • false

true

CpuUsageUpperThreshold

integer

No

The average CPU utilization threshold that triggers automatic resource scale-out. Unit: %. Valid values:

  • 70

  • 80

  • 90

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:

  • 1m

  • 3m

  • 5m

  • 10m

  • 20m

  • 30m

Valid values:

  • 30m :

    30m

  • 5m :

    5m

  • 3m :

    3m

  • 1m :

    1m

  • 10m :

    10m

  • 20m :

    20m

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:

  • 1m

  • 3m

  • 5m

  • 10m

  • 20m

  • 30m

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

  • false

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.