调用DescribeCloudBenchTasks接口,查询压测任务列表。
接口说明
数据库自治服务 DAS 提供智能压测功能,帮助您验证您的实例规格是否需要扩容,有效应对业务流量高峰。更多信息,请参见智能压测。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
hdm:DescribeCloudBenchTasks |
get |
*全部资源
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
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 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
Code |
string |
返回的状态码。 |
200 |
Message |
string |
请求返回消息。 说明
请求成功时该参数返回 Successful,请求失败时会返回请求异常信息(如错误码等)。 |
Successful |
RequestId |
string |
请求 ID。 |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
Success |
string |
请求是否执行成功:
|
true |
Data |
object |
详细信息列表,包括信息总数、错误码等。 |
|
PageNo |
integer |
页码。 |
1 |
PageSize |
integer |
每页最大记录数。 |
10 |
Extra |
string |
备用参数。 |
None |
Total |
integer |
结果的数量。 |
2 |
List |
object |
||
cloudbenchTasks |
array<object> |
压测任务的详细信息列表。 |
|
object |
|||
DtsJobName |
string |
DTS 的任务名称。 |
RDS间迁移 |
ErrorMessage |
string |
任务失败的错误提示。 |
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 |
string |
其他信息。 |
Null |
BackupType |
string |
备份类型。取值:
|
TIMESTAMP |
UserId |
string |
阿里云账号 ID。 |
1091411816252**** |
DstType |
string |
目标实例的类型。取值:
|
Instance |
EcsInstanceId |
string |
ECS 的实例 ID。 |
i-bp1ecr5go2go1**** |
DstInstanceUuid |
string |
目标实例的唯一标识符号。 |
hdm_d887b5ccf99fa0dc9a1e5aaac368**** |
TaskType |
string |
压测任务类型。取值:
|
pressure test |
BenchStep |
string |
压测的子步骤。取值:
|
PROCEED |
Version |
string |
压测任务版本。取值:
|
V3.0 |
EndState |
string |
压测任务结束后的状态。取值:
说明
当压测任务执行完 EndState 设置的状态之后,任务将直接到达完成状态。 |
WAIT_TARGET |
SrcInstanceUuid |
string |
源实例的唯一标识符号。 |
hdm_3063db6792965c080a4bcb6e6304**** |
ClientType |
string |
压测机器类型。取值:
|
ECS |
State |
string |
目前压测任务的状态。取值:
|
WAIT_TARGET |
DstIp |
string |
备用参数。 |
None |
SrcPublicIp |
string |
备用参数。 |
None |
BackupId |
string |
备份集 ID,可通过查询备份列表接口 DescribeBackups 获取。 |
229132 |
SqlCompleteReuse |
string |
全量 SQL 的复用信息。 |
{"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 |
integer |
生成压测的时间,单位为毫秒。 |
86400000 |
ArchiveState |
integer |
SQL 归档状态,取值:
|
1 |
Status |
string |
压测任务的运行状态。取值:
|
RUNNING |
WorkDir |
string |
压测生成的临时目录。 |
/tmp/bench/ |
ArchiveOssTableName |
string |
归档至 OSS 的表名。 |
custins15546355_161604665**** |
DtsJobId |
string |
DTS 迁移的任务 ID。 |
i03e3zty16i**** |
DtsJobState |
integer |
DTS 任务状态,取值:
|
CHECKING |
DstPort |
integer |
目标实例的端口。 |
3306 |
DtsJobClass |
string |
DTS 链路规格。 说明
关于各链路规格的说明及性能测试情况请参见数据迁移链路规格说明。 |
medium |
ClientGatewayId |
string |
压测机的数据库网关 ID。 |
58598b2af48a0193dfc16fc6964ef**** |
Description |
string |
压测任务描述。 |
test-das-bench-0501 |
ErrorCode |
string |
压测内部任务返回的错误码。 |
10109 |
TableSchema |
string |
压测中涉及的表名。 |
[{"TABLE_NAME":"customer1","TABLE_SCHEMA":"tpcc"}] |
DtsJobStatus |
string |
DTS 任务状态,取值:
|
PRE_CHECK_FAILED |
SrcInstanceArea |
string |
源实例的数据库类型。 |
RDS |
BenchStepStatus |
string |
压测子步骤状态。取值:
|
FINISHED |
Source |
string |
任务来源。取值:
|
DAS |
ArchiveJobId |
string |
归档任务 ID。 |
'202105211430070112231480820340758**** |
Topic |
string |
kafka 的消费 Topic。 |
das |
RequestDuration |
integer |
压测任务持续时间,单位为毫秒。 |
86400000 |
TaskId |
string |
任务 ID。 |
e5cec704-0518-430f-8263-76f4dcds**** |
Rate |
integer |
源实例流量在目标实例上的回放速度,回放速度必须是正整数,取值:0~30,默认为 1。 |
1 |
示例
正常返回示例
JSON
格式
{
"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间迁移",
"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
}
]
}
}
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | InvalidParams | The request parameters are invalid. | 请求参数错误 |
403 | NoPermission | You are not authorized to do this action. | 没有权限执行该操作 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。