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
Test
RAM authorization
|
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 |
| 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 |
| TaskExcuteStatus |
boolean |
The status of the task. Valid values:
|
true |
| ErrorCode |
string |
The error code returned by the scaling task. Valid values:
|
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.