Mengambil tugas asinkron.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bdrc:DescribeTasks |
none |
*全部资源
|
None | None |
Sintaks permintaan
GET /api/v1/tasks HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| TaskStatus |
string |
No |
Menentukan status tugas yang akan dikueri. Jika parameter ini dihilangkan, API akan mengembalikan tugas dalam semua status. Nilai valid: |
RUNNING |
| NextToken |
string |
No |
Token paginasi. Untuk mengambil halaman hasil berikutnya, atur parameter ini ke nilai |
cae**********699 |
| MaxResults |
integer |
No |
Jumlah entri maksimum yang akan dikembalikan per halaman. Rentang valid adalah 10 hingga 500. Jika parameter ini dihilangkan atau nilainya kurang dari 10, nilai default 10 akan digunakan. Nilai yang lebih besar dari 500 akan diperlakukan sebagai 500. |
10 |
| TaskType |
string |
No |
UPDATE_RESOURCES |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
BaseResponse<ListResult> |
||
| Data |
object |
The returned data. |
|
| Content |
array<object> |
The list of tasks. |
|
|
object |
|||
| TaskId |
string |
The task ID. |
t-0000e4w0u1v592zdf6s7 |
| TaskName |
string |
The task name. |
empty |
| TaskDescription |
string |
The task description. |
empty |
| TaskType |
string |
Valid values: TEST, UPDATE_RESOURCES, CHECK_RULES |
UPDATE_RESOURCES |
| TaskPriority |
string |
Valid values:
|
HIGH |
| RequestId |
string |
The request ID. |
AE43C4CB-8074-5EBD-9806-8CA6D12800B1 |
| TaskDetail |
string |
Task details. |
{"resourceTypes":["ACS::ECS::Instance","ACS::OSS::Bucket","ACS::OTS::Instance","ACS::NAS::FileSystem"]} |
| ExecutionId |
string |
The execution ID. This parameter is not in use and returns empty. |
empty |
| Progress |
integer |
The progress (0 - 10000). |
100 |
| TaskStatus |
string |
Valid values: CREATED, RUNNING, COMPLETE, FAILED, EXPIRED, CANCELED |
RUNNING |
| ErrorMessage |
string |
The error message returned if the call fails. |
device not online |
| StartTime |
integer |
The start time in Unix timestamp format. Unit: seconds. |
1724983927 |
| CompleteTime |
integer |
The time when the task was completed. Unix timestamp format. Unit: seconds. |
1724983927 |
| ExpireTime |
integer |
The expiration time in Unix timestamp format. Unit: seconds. |
1724983927 |
| TaskResult |
string |
{"resourceCounts":[{"resourceType":"ACS::OSS::Bucket","count":2},{"resourceType":"ACS::NAS::FileSystem","count":3}]} |
|
| NextToken |
string |
The pagination token used to retrieve the next page of results. If this parameter is empty, no more results are available. |
f4b8c2504545a3b41af5e75147d17d12e3818a0b9b2ff9a2 |
| MaxResults |
integer |
The maximum number of entries returned per page. |
10 |
| TotalCount |
integer |
The total number of entries matching the request criteria. This parameter is optional and is not returned by default. |
100 |
| RequestId |
string |
The unique ID of the request. |
AE43C4CB-8074-5EBD-9806-8CA6D12800B1 |
Contoh
Respons sukses
JSONformat
{
"Data": {
"Content": [
{
"TaskId": "t-0000e4w0u1v592zdf6s7",
"TaskName": " empty",
"TaskDescription": " empty",
"TaskType": "UPDATE_RESOURCES",
"TaskPriority": "HIGH",
"RequestId": "AE43C4CB-8074-5EBD-9806-8CA6D12800B1",
"TaskDetail": "{\"resourceTypes\":[\"ACS::ECS::Instance\",\"ACS::OSS::Bucket\",\"ACS::OTS::Instance\",\"ACS::NAS::FileSystem\"]}",
"ExecutionId": "empty",
"Progress": 100,
"TaskStatus": "RUNNING",
"ErrorMessage": "device not online",
"StartTime": 1724983927,
"CompleteTime": 1724983927,
"ExpireTime": 1724983927,
"TaskResult": "{\"resourceCounts\":[{\"resourceType\":\"ACS::OSS::Bucket\",\"count\":2},{\"resourceType\":\"ACS::NAS::FileSystem\",\"count\":3}]}"
}
],
"NextToken": "f4b8c2504545a3b41af5e75147d17d12e3818a0b9b2ff9a2",
"MaxResults": 10,
"TotalCount": 100
},
"RequestId": "AE43C4CB-8074-5EBD-9806-8CA6D12800B1"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.