All Products
Search
Document Center

Database Autonomy Service:CreateAdamBenchTask

更新時間:Sep 25, 2024

Creates a stress testing task on Advanced Database & Application Migration (ADAM).

Operation description

Database Autonomy Service (DAS) provides the intelligent stress testing feature. You can create an Advanced Database & Application Migration (ADAM) stress testing task to check whether you need to scale up your database instance to handle workloads during peak hours. For more information, see Intelligent stress testing.

Make sure that your database instances meet the following requirements:

  • The source database instance is an ApsaraDB RDS for MySQL High-availability Edition or Enterprise Edition instance, or a PolarDB for MySQL Cluster Edition or X-Engine Edition cluster.
  • The destination instance is an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL cluster.
  • The source and destination database instances are connected to DAS. For information about how to connect database instances to DAS, see Connect an Alibaba Cloud database instance to DAS.
  • DAS Enterprise Edition is enabled for the source and destination database instances. For more information, see Overview .

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:CreateAdamBenchTaskcreate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DescriptionstringYes

The description of the stress testing task.

test-das-bench-0501
SrcSqlOssAddrstringYes

The URL of the Object Storage Service (OSS) folder in which the archived objects for SQL statements that run on the source database instance are stored. You can obtain the URL after you upload the archived files to OSS.

http://rdslog-hz-v3.oss-cn-hangzhou.aliyuncs.com/custins4131****
SrcEnginestringNo

The database engine that the source database instance runs.

MySQL
SrcEngineVersionstringNo

The version of the database engine that the source database instance runs.

9i
SrcMaxQpsdoubleYes

The maximum number of queries per second (QPS) within the time period during which traffic on the source database instance is captured. The value must be accurate to two decimal places.

2013.22
SrcMeanQpsdoubleYes

The average QPS within the time period in which traffic on the source database instance is captured. The value must be accurate to two decimal places.

312.22
RequestStartTimelongYes

The start time of the stress testing task. Specify the time in the UNIX timestamp format. Unit: milliseconds.

1588819800000
RequestDurationlongYes

The duration of the stress testing task for which the traffic is captured from the source instance. Unit: milliseconds.

86400000
RateintegerNo

The rate at which the traffic captured from the source database instance is replayed on the destination database instance. Valid values: 1 to 30. Default value: 1.

1
DstInstanceIdstringYes

The ID of the destination instance. The instance must be an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL instance. You can call the GetInstanceInspections operation to query the ID.

rm-2ze1jdv45i7l6****
DstSuperAccountstringYes

The name of the privileged account for the destination instance.

root***
DstSuperPasswordstringYes

The password of the privileged account for the destination instance.

root***1234

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code returned.

200
Messagestring

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
Datastring

The detailed information, including the error codes and the number of entries that are returned.

"Data": { "total": 1, "list":[...] }, "Code": 200, "Success": true }
RequestIdstring

The request ID.

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

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "Successful",
  "Data": "\"Data\": { \"total\": 1, \"list\":[...] }, \"Code\": 200, \"Success\": true }",
  "RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Success": "true"
}

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.

Change history

Change timeSummary of changesOperation
No change history