調用DescribeCloudbenchTask介面,查詢壓測任務。
介面說明
資料庫自治服務 DAS 提供智能壓測功能,協助您驗證您的執行個體規格是否需要擴容,有效應對業務流量高峰。更多資訊,請參見智能壓測。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
hdm:DescribeCloudbenchTask |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| TaskId |
string |
是 |
任務 ID,您可通過 DescribeCloudBenchTasks 介面擷取。 |
e5cec704-0518-430f-8263-76f4dcds**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| Code |
string |
返回的狀態代碼。 |
200 |
| Message |
string |
請求返回訊息。 說明
請求成功時該參數返回 Successful,請求失敗時會返回請求異常資訊(如錯誤碼等)。 |
Successful |
| RequestId |
string |
請求 ID。 |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Success |
string |
請求是否執行成功:
|
true |
| Data |
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。 |
109141182625**** |
| 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_LOGIC |
| SrcInstanceUuid |
string |
源執行個體的唯一識別碼號。 |
a364e414-e68b-4e5c-9166-65b3a153**** |
| 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-****-a2a6-c66c62****","metaUuid":"task_211e2561-5c0c-486b-864c-56b511****","sqlFile":"cl-1620057600000-1800626.sc","metaFile":"cl-1620057600000-180****.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 |
壓測內部任務返回的錯誤碼。 |
10910 |
| TableSchema |
string |
壓測中涉及的表名。 |
[{"TABLE_NAME":"customer1","TABLE_SCHEMA":"tpcc"}] |
| DtsJobStatus |
string |
DTS 任務狀態,取值:
|
PRE_CHECKING |
| SrcInstanceArea |
string |
源執行個體的資料庫類型。 |
RDS |
| BenchStepStatus |
string |
壓測子步驟狀態。取值:
|
FINISHED |
| Source |
string |
任務來源。取值:
|
DAS |
| ArchiveJobId |
string |
歸檔任務 ID。 |
'202105211430070112231480820340758**** |
| Topic |
string |
kafka 的消費 Topic。 |
das |
| RequestDuration |
integer |
壓測任務的期間。 |
864000 |
| 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": {
"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": "109141182625****",
"DstType": "Instance",
"EcsInstanceId": "i-bp1ecr5go2go1****",
"DstInstanceUuid": "hdm_d887b5ccf99fa0dc9a1e5aaac368****",
"TaskType": "pressure test",
"BenchStep": "PROCEED",
"Version": "V3.0",
"EndState": "WAIT_LOGIC",
"SrcInstanceUuid": "a364e414-e68b-4e5c-9166-65b3a153****",
"ClientType": "ECS",
"State": "WAIT_TARGET",
"DstIp": "None",
"SrcPublicIp": "None",
"BackupId": "229132",
"SqlCompleteReuse": "{\"sqlUuid\":\"task_a37d2f07-45cb-****-a2a6-c66c62****\",\"metaUuid\":\"task_211e2561-5c0c-486b-864c-56b511****\",\"sqlFile\":\"cl-1620057600000-1800626.sc\",\"metaFile\":\"cl-1620057600000-180****.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": "10910",
"TableSchema": "[{\"TABLE_NAME\":\"customer1\",\"TABLE_SCHEMA\":\"tpcc\"}]",
"DtsJobStatus": "PRE_CHECKING",
"SrcInstanceArea": "RDS",
"BenchStepStatus": "FINISHED",
"Source": "DAS",
"ArchiveJobId": "'202105211430070112231480820340758****",
"Topic": "das",
"RequestDuration": 864000,
"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. | 沒有許可權執行該操作 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。