All Products
Search
Document Center

:DescribeTasks

Last Updated:Jun 10, 2026

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 CreationOption parameter is not set to CreateGdnStandby.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

polardb:DescribeTasks

get

*dbcluster

acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DBClusterId

string

No

ID Kluster.

Catatan

Tentukan salah satu dari DBNodeId atau DBClusterId. Panggil operasi DescribeDBClusters untuk mengkueri detail semua Kluster di akun Anda, termasuk ID Kluster.

pc-***************

DBNodeId

string

No

ID node.

Catatan

Tentukan salah satu dari DBNodeId atau DBClusterId. Panggil operasi DescribeDBClusters untuk mengkueri detail semua Kluster di akun Anda, termasuk ID node.

pi-***************

StartTime

string

Yes

Awal rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu dalam format YYYY-MM-DDThh:mmZ. Pengatur waktu harus dalam UTC.

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 YYYY-MM-DDThh:mmZ. Pengatur waktu harus dalam UTC.

2020-12-02T03:00Z

Status

string

No

Status Tugas. Nilai valid:

  • Waiting: Tugas sedang menunggu untuk dijalankan.

  • Running: Tugas sedang Berjalan.

  • Finished: Tugas selesai.

  • Closed: Tugas ditutup.

  • Pause: Tugas dijeda.

  • Stop: Tugas terputus.

Catatan
  • Jika Anda mengosongkan parameter ini, detail semua Tugas dalam status Waiting atau Running untuk Kluster atau node saat ini akan dikembalikan.

  • Untuk mengkueri Tugas dalam beberapa status, pisahkan nama status dengan tanda koma (,).

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 YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

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 YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

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 indicates that the task consists of four subtasks and the first subtask is in progress.

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.

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.