All Products
Search
Document Center

Database Autonomy Service:DescribeAutoScalingHistory

Last Updated:Apr 14, 2026

Queries the auto scaling history of an instance.

Operation description

  • Supports querying automatic performance scaling history only for ApsaraDB RDS for MySQL High-availability Edition instances that use cloud disks.

  • 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:DescribeAutoScalingHistory

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

Note

Only ApsaraDB RDS for MySQL instances are supported.

rm-2ze8g2am97624****

AutoScalingTaskType

string

Yes

The type of the auto scaling task that you want to query. Set the value to SPEC, which indicates that you can query the history of only automatic performance scaling tasks.

SPEC

StartTime

integer

Yes

The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

Note

The maximum time range that can be specified is 45 days.

1675833788056

EndTime

integer

Yes

The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

Note

The end time must be later than the start time.

1676605305796

If you set AutoScalingTaskType to SPEC, the history of automatic performance scaling tasks is queried. Only SPEC is supported.

Response elements

Element

Type

Description

Example

object

The response parameters.

Code

string

The HTTP status code returned. The status code 200 indicates that the request was successful.

200

Message

string

The returned message.

Note

If the request was successful, Successful is returned. Otherwise, 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

Data

object

The history of auto scaling.

InstanceId

string

The instance ID.

rm-2ze1jdv45i7l6****

SpecHistory

array<object>

The history of automatic performance scaling.

object

ScaleType

string

The type of the automatic performance scaling task. Valid values:

  • SCALE_UP: automatic instance type scale-up task.

  • SCALE_DOWN: automatic instance type scale-down task.

SCALE_UP

TaskExcuteStatus

boolean

The status of the task. Valid values:

  • true: The task was successful.

  • false: The task failed.

true

ErrorCode

string

The error code returned by the scaling task. Valid values:

  • Insufficient_Balance: The account has insufficient balance or an unpaid order.

  • REACH_SPEC_UPPERBOUND: The instance type reaches the upper limit.

  • Control_Error_Timeout_Msg: The management task timed out.

  • Invoke_Rds_Api_Error_Msg: Failed to call the ApsaraDB RDS API.

Insufficient_Balance

OriginInstanceClass

string

The original instance type.

mysql.n2.large.2c

TargetInstanceClass

string

The destination instance type.

mysql.n2.xlarge.2c

OriginCore

integer

The original number of CPU cores of the instance.

4

OriginMemory

number

The original memory size of the instance. Unit: GB.

8

TargetCore

integer

The destination number of CPU cores of the instance.

8

TargetMemory

number

The destination memory size of the instance. Unit: GB.

16

TaskTime

integer

The time when the task was run. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1684830763000

Storage

array<object>

The history of storage expansion. This feature is not supported.

object

The history of storage expansion of the instance.

None

Resource

array<object>

The history of resource scale-out of ApsaraDB for Redis instances. This feature is not supported.

object

The history of resource scale-out of the ApsaraDB for Redis instance.

None

Shard

array<object>

The history of automatic shard scale-out of ApsaraDB for Redis instances. This feature is not supported.

object

The history of automatic shard scale-out of the ApsaraDB for Redis instance.

None

Bandwidth

array<object>

The history of automatic bandwidth scaling of ApsaraDB for Redis instances. This feature is not supported.

object

The history of automatic bandwidth scaling of the ApsaraDB for Redis instance.

None

Examples

Success response

JSON format

{
  "Code": "200",
  "Message": "Successful",
  "RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Success": "true",
  "Data": {
    "InstanceId": "rm-2ze1jdv45i7l6****",
    "SpecHistory": [
      {
        "ScaleType": "SCALE_UP",
        "TaskExcuteStatus": true,
        "ErrorCode": "Insufficient_Balance",
        "OriginInstanceClass": "mysql.n2.large.2c",
        "TargetInstanceClass": "mysql.n2.xlarge.2c",
        "OriginCore": 4,
        "OriginMemory": 8,
        "TargetCore": 8,
        "TargetMemory": 16,
        "TaskTime": 1684830763000
      }
    ],
    "Storage": [
      {
        "test": "test",
        "test2": 1
      }
    ],
    "Resource": [
      {
        "test": "test",
        "test2": 1
      }
    ],
    "Shard": [
      {
        "test": "test",
        "test2": 1
      }
    ],
    "Bandwidth": [
      {
        "test": "test",
        "test2": 1
      }
    ]
  }
}

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.