调用 DescribeTasks 接口查询任务。
同步请求。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
PageNumber | Integer | 是 | 1 | 当前页页码。最小值为 1。默认值为 1。 |
PageSize | Integer | 是 | 10 | 每页记录数。最小值为 1,最大值不超过 100。默认值为 10。 |
InstanceId | String | 否 | mysql-d4942fd7**** | 实例 ID。 |
CreationStartTime | String | 否 | 2024-01-29T15:59:59Z | 任务的开始时间。 说明
|
CreationEndTime | String | 否 | 2024-01-27T16:00:00Z | 任务的结束时间。 说明
|
TaskId | String | 否 | 2024012922384660DE49D5E35F6015****-b248b3 | 任务 ID。 说明 TaskId 与任务时间(CreationStartTime 和 CreationEndTime)两组参数,二者必选其一。 |
TaskAction | String | 否 | DeleteDatabase | 任务名称。 |
ProjectName | String | 否 | default | 项目名称。 |
TaskType | String | 否 | Web | 任务类型。取值:
|
TaskSource | String | 否 | User | 任务来源。取值:
|
TaskStatus | String[] | 否 | ["Running"] | 任务状态。取值如下列表所示,可选多个:
|
TaskCategory | String[] | 否 | ["BackupRecoveryManagement"] | 任务分类。取值如下列表所示,可选多个:
|
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Total | Integer | 1 | 任务数量。 |
Datas | Object[] | 请参见返回示例。 | 任务信息。 |
POST /?Action=DescribeTasks&Version=2022-01-01 HTTP/1.1 Accept: application/json Content-Type: application/json Host: rds.volcengineapi.com X-Date: 20211202T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458**** { "CreationEndTime": "2024-01-29T20:59:59Z", "CreationStartTime": "2024-01-27T16:00:00Z", "PageNumber": 1, "PageSize": 5 }
{ "ResponseMetadata": { "RequestId": "202401292333436CBE5B3D887C2C79C17C", "Action": "DescribeTasks", "Version": "2022-01-01", "Service": "rds_mysql", "Region": "cn-beijing" }, "Result": { "Datas": [ { "CostTimeMS": 0, "CreateTime": "2024-01-29T15:33:09.829Z", "FinishTime": "", "RelatedInstanceInfos": { "InstanceID": "mysql-5bde124c****" }, "StartTime": "2024-01-29T15:33:09.829Z", "TaskAction": "CreateBackup", "TaskCategory": "BackupRecoveryManagement", "TaskDesc": "", "TaskId": "202401292333097F8700BD2CF9CA432269-222629", "TaskParams": "{\"InstanceId\":\"mysql-5bde124c****\",\"BackupType\":\"Full\",\"BackupMethod\":\"Physical\"}", "TaskSource": "User", "TaskStatus": "Running" }, { "CostTimeMS": 0, "CreateTime": "2024-01-29T15:32:11.233Z", "FinishTime": "", "RelatedInstanceInfos": { "InstanceID": "mysql-c2cd6be6****" }, "StartTime": "2024-01-29T15:32:11.233Z", "TaskAction": "CreateBackup", "TaskCategory": "BackupRecoveryManagement", "TaskDesc": "", "TaskId": "f5d40de3a5db4c3bbe716a183779b909", "TaskParams": "{\"InstanceId\":\"mysql-c2cd6be6****\",\"BackupStrategy\":\"Instance\",\"BackupType\":\"Physical\",\"BackupMode\":\"Full\",\"BackupDataType\":\"Data\"}", "TaskSource": "User", "TaskStatus": "Running" }, { "CostTimeMS": 36670, "CreateTime": "2024-01-29T15:30:37.418Z", "FinishTime": "2024-01-29T15:31:14.088Z", "RelatedInstanceInfos": { "InstanceID": "mysql-5bde124cecfd" }, "StartTime": "2024-01-29T15:30:37.418Z", "TaskAction": "CreateBackup", "TaskCategory": "BackupRecoveryManagement", "TaskDesc": "", "TaskId": "202401292330377910BC9680E914910D8E-e09dc3", "TaskParams": "{\"InstanceId\":\"mysql-5bde124c****\",\"BackupType\":\"Full\",\"BackupMethod\":\"Physical\"}", "TaskSource": "User", "TaskStatus": "Success" }, { "CostTimeMS": 2171, "CreateTime": "2024-01-29T15:29:02.980Z", "FinishTime": "2024-01-29T15:29:05.151Z", "RelatedInstanceInfos": { "InstanceID": "mysql-79558c8819de" }, "StartTime": "2024-01-29T15:29:02.980Z", "TaskAction": "CreateBinlogBackup", "TaskCategory": "BackupRecoveryManagement", "TaskDesc": "", "TaskId": "2024012923290249444C5D465C580E539C-f72418", "TaskParams": "{\"InstanceId\":\"mysql-79558c88****\"}", "TaskSource": "User", "TaskStatus": "Success" }, { "CostTimeMS": 2163, "CreateTime": "2024-01-29T15:28:54.156Z", "FinishTime": "2024-01-29T15:28:56.319Z", "RelatedInstanceInfos": { "InstanceID": "mysql-79558c88****" }, "StartTime": "2024-01-29T15:28:54.156Z", "TaskAction": "CreateBinlogBackup", "TaskCategory": "BackupRecoveryManagement", "TaskDesc": "", "TaskId": "20240129232854A98F35AB558B5A2CA4B8-b9be02", "TaskParams": "{\"InstanceId\":\"mysql-79558c88****\"}", "TaskSource": "User", "TaskStatus": "Success" } ], "Total": 1521 } }
更多详情,请参见错误码。