Queries the auto scaling history of an instance.
Operation description
- You can call this operation to query the history information about the automatic performance scaling only of ApsaraDB RDS for MySQL High-availability Edition instances.
- 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:DescribeAutoScalingHistory | get | *All Resources * |
| 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 | long | 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 | long | 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 parameters
Examples
Sample success responses
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 |
---|---|---|
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.