調用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 且不超過 整數資料類型的最大值,預設值為 1。 |
1 |
| PageSize |
string |
否 |
每頁最大記錄數,取值大於 0 且不超過 整數資料類型的最大值,預設值為 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. | 沒有許可權執行該操作 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。