Anda dapat memanggil operasi DescribeClusterTasks untuk mengkueri daftar tugas dari sebuah kluster.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:DescribeClusterTasks |
get |
*Cluster
|
None | None |
Sintaks permintaan
GET /clusters/{cluster_id}/tasks HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| cluster_id |
string |
No |
ID kluster. |
c23421cfa74454bc8b37163fd19af**** |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| page_size |
integer |
No |
Jumlah entri yang ditampilkan per halaman. |
20 |
| page_number |
integer |
No |
Nomor halaman saat ini. |
1 |
| next_token |
string |
No |
||
| max_results |
integer |
No |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Skema Respons |
||
| page_info |
object |
Informasi paginasi. |
|
| page_size |
integer |
Jumlah entri per halaman. |
10 |
| page_number |
integer |
Nomor halaman. |
1 |
| total_count |
integer |
Jumlah total hasil. |
10 |
| next_token |
string |
||
| tasks |
array<object> |
Array tugas. |
|
|
array<object> |
Detail tugas. |
||
| task_id |
string |
ID tugas. |
install-addons-c3xxxxxx |
| task_type |
string |
Jenis tugas. |
cluster_addon_install |
| state |
string |
Status tugas. |
success |
| created |
string |
Waktu pembuatan. |
2022-08-03T10:11:33+08:00 |
| updated |
string |
Waktu pembaruan. |
2022-08-03T10:12:03.482+08:00 |
| error |
object |
Informasi kesalahan tugas. |
|
| message |
string |
The error message returned. |
Addon status not match |
| code |
string |
The error code returned. |
BadRequest |
| requestId |
string |
ID permintaan. |
0527ac9a-c899-4341-a21a-xxxxxxxxx |
Contoh
Respons sukses
JSONformat
{
"page_info": {
"page_size": 10,
"page_number": 1,
"total_count": 10
},
"next_token": "",
"tasks": [
{
"task_id": "install-addons-c3xxxxxx",
"task_type": "cluster_addon_install",
"state": "success",
"created": "2022-08-03T10:11:33+08:00",
"updated": "2022-08-03T10:12:03.482+08:00",
"error": {
"message": "Addon status not match",
"code": "BadRequest"
}
}
],
"requestId": "0527ac9a-c899-4341-a21a-xxxxxxxxx"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.