调用DescribeCloudBenchTasks接口,查询压测任务列表。
接口说明
数据库自治服务 DAS 提供智能压测功能,帮助您验证您的实例规格是否需要扩容,有效应对业务流量高峰。更多信息,请参见智能压测。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
Status | string | 否 | 任务的运行状态。取值:
| SUCCESS |
TaskType | string | 否 | 压测任务类型。取值:
| pressure test |
StartTime | string | 否 | 查询任务开始时间,格式为 Unix 时间戳,单位为毫秒。 | 1596177993000 |
EndTime | string | 否 | 查询任务结束时间,格式为 Unix 时间戳,单位为毫秒。 说明
查询任务结束时间需晚于查询任务开始时间。
| 1596177993001 |
PageNo | string | 否 | 页码,取值大于 0 且不超过 Integer 数据类型的最大值,默认值为 1。 | 1 |
PageSize | string | 否 | 每页最大记录数,取值大于 0 且不超过 Integer 数据类型的最大值,默认值为 10。 | 10 |
返回参数
示例
正常返回示例
JSON
格式
{
"Code": "200",
"Data": {
"Extra": "None",
"List": {
"cloudbenchTasks": [
{
"ArchiveJobId": "'202105211430070112231480820340758****",
"ArchiveOssTableName": "custins15546355_161604665****",
"ArchiveState": 1,
"BackupId": "229132",
"BackupType": "TIMESTAMP",
"BenchStep": "PROCEED",
"BenchStepStatus": "FINISHED",
"ClientGatewayId": "58598b2af48a0193dfc16fc6964ef****",
"ClientType": "ECS",
"Description": "test-das-bench-0501",
"DstInstanceUuid": "hdm_d887b5ccf99fa0dc9a1e5aaac368****",
"DstIp": "None",
"DstPort": 3306,
"DstType": "Instance",
"DtsJobClass": "medium",
"DtsJobId": "i03e3zty16i****",
"DtsJobName": "RDS间迁移",
"DtsJobState": 0,
"DtsJobStatus": "PRE_CHECK_FAILED",
"EcsInstanceId": "i-bp1ecr5go2go1****",
"EndState": "WAIT_TARGET",
"ErrorCode": "10109",
"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",
"Rate": 1,
"RequestDuration": 86400000,
"SmartPressureTime": 86400000,
"Source": "DAS",
"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\"}",
"SrcInstanceArea": "RDS",
"SrcInstanceUuid": "hdm_3063db6792965c080a4bcb6e6304****",
"SrcPublicIp": "None",
"State": "WAIT_TARGET",
"Status": "RUNNING",
"TableSchema": "[{\"TABLE_NAME\":\"customer1\",\"TABLE_SCHEMA\":\"tpcc\"}]",
"TaskId": "e5cec704-0518-430f-8263-76f4dcds****",
"TaskType": "pressure test",
"Topic": "das",
"UserId": "1091411816252****",
"Version": "V3.0",
"WorkDir": "/tmp/bench/"
}
]
},
"PageNo": 1,
"PageSize": 10,
"Total": 2
},
"Message": "Successful",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success": "true"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidParams | The request parameters are invalid. | 请求参数错误 |
403 | NoPermission | You are not authorized to do this action. | 没有权限执行该操作 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|
暂无变更历史