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

Database Autonomy Service (DAS) provides the intelligent stress testing feature. You use an ADAM stress testing task to check whether you need to scale up or scale out your database instance to handle workloads during peak hours. For more information, see Intelligent Stress Testing.

The database instances that are used for stress testing must meet the following requirements:

  • The source instance is one of the following instances: an ApsaraDB RDS for MySQL High-availability Edition instance, an ApsaraDB RDS for MySQL Enterprise Edition instance, a PolarDB for MySQL Cluster Edition instance, and a PolarDB for MySQL X-Engine instance.
  • The destination instance is an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL instance.
  • The source database instance and the destination database instance are connected to DAS. For information about how to connect database instances to DAS, see Access an Alibaba Cloud database instance.
  • DAS Professional Edition are activated for the source database instance and the destination database instance. For more information, see DAS Professional Edition.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesCreateAdamBenchTask

The operation that you want to perform. Set the value to CreateAdamBenchTask.

DescriptionStringYestest-das-bench-0501

The description of the stress testing task.

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

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.

SrcEngineStringNoMySQL

The database engine that the source database instance runs.

SrcEngineVersionStringNo9i

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

SrcMaxQpsdoubleYes2013.22

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.

SrcMeanQpsdoubleYes312.22

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.

RequestStartTimeLongYes1588819800000

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

RequestDurationLongYes86400000

The duration of the stress testing task. Unit: milliseconds.

RateIntegerNo1

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.

DstInstanceIdStringYesrm-2ze1jdv45i7l6****

The ID of the destination database instance. The instance must be an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL instance. You can call the GetInstanceInspections operation to obtain the ID of the destination database instance. For more information, see GetInstanceInspections.

DstSuperAccountStringYesroot***

The name of the privileged account that is used to manage the destination database instance.

DstSuperPasswordStringYesroot***1234

The password of the privileged account that is used to manage the destination database instance.

Response parameters

ParameterTypeExampleDescription
CodeString200

The returned HTTP status code.

MessageStringSuccessful

The returned message that indicates the result of the request.

Note If the request is successful, Successful is returned. If the request fails, an error message that includes an error code is returned.
DataString"Data": { "total": 1, "list":[...] }, "Code": 200, "Success": true }

The details of the response, such as the HTTP status code and the number of returned entries.

RequestIdStringB6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

SuccessStringtrue

Indicates whether the request is successful. Valid values:

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

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=CreateAdamBenchTask
&Description=test-das-bench-0501
&SrcSqlOssAddr=http://rdslog-hz-v3.oss-cn-hangzhou.aliyuncs.com/custins4131****
&SrcEngine=MySQL
&SrcEngineVersion=9i
&SrcMaxQps=2013.22
&SrcMeanQps=312.22
&RequestStartTime=1588819800000
&RequestDuration=86400000
&Rate=1
&DstInstanceId=rm-2ze1jdv45i7l6****
&DstSuperAccount=root***
&DstSuperPassword=root***1234
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

HttpCodeError codeError messageDescription
400InvalidParamsThe request parameters are invalid.The error message returned because the specified request parameters are invalid.

For a list of error codes, visit the API Error Center.