All Products
Search
Document Center

Database Autonomy Service:DescribeAutoScalingHistory

Last Updated:Dec 23, 2024

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
hdm:DescribeAutoScalingHistoryget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The instance ID.

Note Only ApsaraDB RDS for MySQL instances are supported.
rm-2ze8g2am97624****
AutoScalingTaskTypestringYes

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
StartTimelongYes

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
EndTimelongYes

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

ParameterTypeDescriptionExample
object
Codestring

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

200
Messagestring

The returned message.

Note If the request was successful, Successful is returned. Otherwise, an error message such as an error code is returned.
Successful
RequestIdstring

The request ID.

B6D17591-B48B-4D31-9CD6-9B9796B2****
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Dataobject

The history of auto scaling.

InstanceIdstring

The instance ID.

rm-2ze1jdv45i7l6****
SpecHistoryarray<object>

The history of automatic performance scaling.

SpecHistoryobject
ScaleTypestring

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
TaskExcuteStatusboolean

The status of the task. Valid values:

  • true: The task was successful.
  • false: The task failed.
true
ErrorCodestring

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
OriginInstanceClassstring

The original instance type.

mysql.n2.large.2c
TargetInstanceClassstring

The destination instance type.

mysql.n2.xlarge.2c
OriginCoreinteger

The original number of CPU cores of the instance.

4
OriginMemorydouble

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

8
TargetCoreinteger

The destination number of CPU cores of the instance.

8
TargetMemorydouble

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

16
TaskTimelong

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
Storagearray<object>

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

Storageobject

The history of storage expansion of the instance.

None
Resourcearray<object>

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

Resourceobject

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

None
Shardarray<object>

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

Shardobject

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

None
Bandwidtharray<object>

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

Bandwidthobject

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

None

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError message
400InvalidParamsThe request parameters are invalid.
403NoPermissionYou are not authorized to do this action.

For a list of error codes, visit the Service error codes.