Queries stress testing tasks.
Operation description
Database Autonomy Service (DAS) provides the intelligent stress testing feature. This feature helps you check whether your instance needs to be scaled up to effectively handle traffic spikes. For more information, see Intelligent stress testing.
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:DescribeCloudBenchTasks | get | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Status | string | No | The status of the stress testing task. Valid values:
| SUCCESS |
TaskType | string | No | The type of the stress testing task. Valid values:
| pressure test |
StartTime | string | No | 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. | 1596177993000 |
EndTime | string | No | 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.
| 1596177993001 |
PageNo | string | No | The page number. The value must be a positive integer. Default value: 1. | 1 |
PageSize | string | No | The number of entries per page. The value must be a positive integer. Default value: 10. | 10 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"Message": "Successful",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success": "true",
"Data": {
"PageNo": 1,
"PageSize": 10,
"Extra": "None",
"Total": 2,
"List": {
"cloudbenchTasks": [
{
"DtsJobName": "RDS_TO_RDS_MIGRATION",
"ErrorMessage": "DTS-070211: Connect Source DB failed. cause by [com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Could not create connection to database server. Attempted reconnect 3 times. Giving up.][com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure\\n\\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.][java.net.ConnectException:Connection timed out (Connection timed out)] About more information in [https://yq.aliyun.com/articles/499178].",
"External": "Null",
"BackupType": "TIMESTAMP",
"UserId": "1091411816252****",
"DstType": "Instance",
"EcsInstanceId": "i-bp1ecr5go2go1****",
"DstInstanceUuid": "hdm_d887b5ccf99fa0dc9a1e5aaac368****",
"TaskType": "pressure test",
"BenchStep": "PROCEED",
"Version": "V3.0",
"EndState": "WAIT_TARGET",
"SrcInstanceUuid": "hdm_3063db6792965c080a4bcb6e6304****",
"ClientType": "ECS",
"State": "WAIT_TARGET",
"DstIp": "None",
"SrcPublicIp": "None",
"BackupId": "229132",
"SqlCompleteReuse": "{\"sqlUuid\":\"task_a37d2f07-45cb-4413-a2a6-c66c68****\",\"metaUuid\":\"task_211e2561-5c0c-486b-864c-56b511****\",\"sqlFile\":\"cl-1620057600000-1800626.sc\",\"metaFile\":\"cl-1620057600000-1800626.meta\"}",
"SmartPressureTime": 86400000,
"ArchiveState": 1,
"Status": "RUNNING",
"WorkDir": "/tmp/bench/",
"ArchiveOssTableName": "custins15546355_161604665****",
"DtsJobId": "i03e3zty16i****",
"DtsJobState": 0,
"DstPort": 3306,
"DtsJobClass": "medium",
"ClientGatewayId": "58598b2af48a0193dfc16fc6964ef****",
"Description": "test-das-bench-0501",
"ErrorCode": "10109",
"TableSchema": "[{\"TABLE_NAME\":\"customer1\",\"TABLE_SCHEMA\":\"tpcc\"}]",
"DtsJobStatus": "PRE_CHECK_FAILED",
"SrcInstanceArea": "RDS",
"BenchStepStatus": "FINISHED",
"Source": "DAS",
"ArchiveJobId": "'202105211430070112231480820340758****",
"Topic": "das",
"RequestDuration": 86400000,
"TaskId": "e5cec704-0518-430f-8263-76f4dcds****",
"Rate": 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.
Change history
Change time | Summary of changes | Operation |
---|