Mengkueri detail progres tugas yang dihasilkan oleh panggilan API, seperti membuat Kluster.
Deskripsi operasi
-
You can view the progress details of tasks generated by either direct API calls, such as CreateDBCluster, or operations in the PolarDB console, such as creating a cluster.
-
Currently, this operation supports viewing the progress details only for tasks generated when you create a cluster by calling the CreateDBCluster operation, provided that the
CreationOptionparameter is not set toCreateGdnStandby.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DescribeTasks |
get |
*dbcluster
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
No |
ID Kluster. Catatan
Tentukan salah satu dari |
pc-*************** |
| DBNodeId |
string |
No |
ID node. Catatan
Tentukan salah satu dari |
pi-*************** |
| StartTime |
string |
Yes |
Awal rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu dalam format |
2020-11-30T00:00Z |
| EndTime |
string |
Yes |
Akhir rentang pengatur waktu yang akan dikueri. Pengatur waktu akhir harus lebih lambat dari pengatur waktu mulai. Tentukan pengatur waktu dalam format |
2020-12-02T03:00Z |
| Status |
string |
No |
Status Tugas. Nilai valid:
Catatan
|
Running |
| PageSize |
integer |
No |
Jumlah entri yang akan dikembalikan pada setiap halaman. Nilai valid: 30, 50, dan 100. Nilai default: 30. |
30 |
| PageNumber |
integer |
No |
Nomor halaman. Nilai harus berupa bilangan bulat yang lebih besar dari 0 dan tidak melebihi nilai maksimum Tipe data Integer. Nilai default: 1. |
1 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalRecordCount |
integer |
The total number of entries returned. |
1 |
| PageRecordCount |
integer |
The number of entries returned on the current page. |
30 |
| Tasks |
object |
||
| Task |
array<object> |
The task details. |
|
|
object |
|||
| FinishTime |
string |
The time when the task was completed. The time follows the ISO 8601 standard in the |
2020-12-02T02:40:15Z |
| StepsInfo |
string |
The details of the subtasks. |
[{\"remain\":0,\"name\":\"init_task\",\"progress\":100},{\"remain\":1764,\"name\":\"create_instance\",\"progress\":0},{\"remain\":1,\"name\":\"init_cluster\",\"progress\":0},{\"remain\":2,\"name\":\"create_backup\",\"progress\":0}] |
| Progress |
integer |
The progress of the task in percentage. |
100 |
| ExpectedFinishTime |
string |
The estimated end time of the task. In most cases, this parameter is empty. |
null |
| BeginTime |
string |
The time when the task was started. The time follows the ISO 8601 standard in the |
2020-12-02T02:39:15Z |
| TaskErrorCode |
string |
The error code that is returned when an error occurs. Catatan
This parameter is returned only when the task is in the Stop state. |
null |
| ProgressInfo |
string |
The description of the task progress. If no progress description is provided for the task, this parameter is empty. |
null |
| CurrentStepName |
string |
The name of the current step. |
create_instance |
| StepProgressInfo |
string |
The progress of the subtasks. For example, the value |
1/4 |
| TaskErrorMessage |
string |
The error message that is returned when an error occurs. Catatan
This parameter is returned only when the task is in the Stop state. |
null |
| TaskAction |
string |
The API operation that is used by the task. Example: |
CreateDBInstance |
| DBName |
string |
The database name. Catatan
This parameter is returned for only the tasks that involve database operations. |
test |
| Remain |
integer |
The estimated remaining duration of the task. Unit: seconds. |
1767 |
| TaskId |
string |
The ID of the task. |
111111111 |
| EndTime |
string |
The end of the time range to query. |
2020-12-02T03:00Z |
| RequestId |
string |
The request ID. |
4352AD99-9FF5-41A6-A319-068089****** |
| PageNumber |
integer |
The page number. |
1 |
| StartTime |
string |
The beginning of the time range to query. |
2020-11-30T00:00Z |
| DBClusterId |
string |
The ID of the cluster to which the task belongs. |
pc-*************** |
Contoh
Respons sukses
JSONformat
{
"TotalRecordCount": 1,
"PageRecordCount": 30,
"Tasks": {
"Task": [
{
"FinishTime": "2020-12-02T02:40:15Z",
"StepsInfo": "[{\\\"remain\\\":0,\\\"name\\\":\\\"init_task\\\",\\\"progress\\\":100},{\\\"remain\\\":1764,\\\"name\\\":\\\"create_instance\\\",\\\"progress\\\":0},{\\\"remain\\\":1,\\\"name\\\":\\\"init_cluster\\\",\\\"progress\\\":0},{\\\"remain\\\":2,\\\"name\\\":\\\"create_backup\\\",\\\"progress\\\":0}]",
"Progress": 100,
"ExpectedFinishTime": "null",
"BeginTime": "2020-12-02T02:39:15Z",
"TaskErrorCode": "null",
"ProgressInfo": "null",
"CurrentStepName": "create_instance",
"StepProgressInfo": "1/4",
"TaskErrorMessage": "null",
"TaskAction": "CreateDBInstance",
"DBName": "test",
"Remain": 1767,
"TaskId": "111111111"
}
]
},
"EndTime": "2020-12-02T03:00Z",
"RequestId": "4352AD99-9FF5-41A6-A319-068089******",
"PageNumber": 1,
"StartTime": "2020-11-30T00:00Z",
"DBClusterId": "pc-***************"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDBNodeId.Malformed | The specified parameter DBNodeId is not valid. | |
| 400 | InvalidStartTime.Malformed | The specified parameter StartTime is not valid. | |
| 400 | InvalidEndTime.Malformed | The specified parameter EndTime is not valid. | |
| 400 | InvalidPageSize.Malformed | The specified parameter PageSize is not valid. | |
| 400 | InvalidPageNumber.Malformed | The specified parameter PageNumber is not valid. | |
| 400 | InvalidStatus.Malformed | The specified parameter Status is not valid. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.