Mendapatkan catatan Tugas asinkron yang memenuhi kondisi tertentu.
Deskripsi operasi
StatefulAsyncInvocation represents asynchronous tasks. Asynchronous tasks (StatefulAsyncInvocation) allow you to manage the states of asynchronous invocations. The asynchronous task feature is more suitable for task scenarios.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:GetStatefulAsyncInvocation |
get |
*All Resource
|
None | None |
Sintaks permintaan
GET /2021-04-06/services/{serviceName}/functions/{functionName}/stateful-async-invocations/{invocationId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| serviceName |
string |
Yes |
Nama layanan tempat Tugas asinkron berada. |
demo-service |
| functionName |
string |
Yes |
Nama fungsi tempat Tugas asinkron berada. |
demo-function |
| invocationId |
string |
Yes |
ID Tugas asinkron. Catatan
Jika Anda menggunakan SDK untuk memanggil fungsi, kami menyarankan Anda menentukan ID terkait bisnis untuk memudahkan operasi berikutnya. Misalnya, fungsi pemrosesan video dapat menggunakan nama file video sebagai ID pemanggilan. Dengan cara ini, Anda dapat dengan mudah memeriksa apakah video berhasil diproses atau dihentikan sebelum diproses. ID harus diawali dengan huruf atau garis bawah (_) dan dapat berisi huruf, angka (0-9), garis bawah (_), dan tanda hubung (-). Panjang ID dapat mencapai 128 karakter. Jika Anda tidak menentukan ID pemanggilan asinkron, Function Compute akan secara otomatis membuat ID. |
e026ae92-61e5-472f-b32d-1c9e3c4e**** |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| qualifier |
string |
No |
Versi atau alias layanan tempat Tugas asinkron berada. |
LATEST |
| X-Fc-Account-Id |
string |
No |
ID akun Alibaba Cloud Anda. |
188077086902**** |
| X-Fc-Code-Checksum |
string |
No |
Nilai CRC-64 paket Kode fungsi. Nilai ini digunakan untuk memeriksa integritas data. Nilai dihitung secara otomatis oleh alat. |
1506052139770049xxxx |
| X-Fc-Log-Type |
string |
No |
Metode yang digunakan untuk mengembalikan log. Nilai default: None. Nilai valid:
|
Tail |
| X-Fc-Invocation-Type |
string |
No |
Metode yang digunakan untuk memanggil fungsi. Nilai valid:
|
Async |
| X-Fc-Date |
string |
No |
Waktu saat fungsi dipanggil. Nilai dalam format EEE,d MMM yyyy HH:mm:ss GMT. |
Sat, 14 Jul 2017 07:02:38 GMT |
| X-Fc-Trace-Id |
string |
No |
ID jejak permintaan untuk API Function Compute. |
asdf**** |
Elemen respons
|
Element |
Type |
Description |
Example |
| StatefulAsyncInvocation |
The information about the asynchronous task. The returnPayload parameter is in beta test. If you want to use this parameter, contact us. |
Alibaba Cloud CLI |
Contoh
Respons sukses
JSONformat
{
"functionName": "functionName",
"serviceName": "serviceName",
"qualifier": "LATEST",
"invocationId": "demo-id",
"status": "Running",
"startedTime": 1633449590000,
"endTime": 1633449599000,
"destinationStatus": "Succeeded",
"invocationErrorMessage": "UnhandledInvocationError",
"invocationPayload": "\"body\"",
"alreadyRetriedTimes": 3,
"requestId": "ABA740D4-********-882707EADC37",
"instanceId": "D4-*******9FD1-882707E",
"events": [
{
"eventId": 1,
"status": "Enqueued",
"timestamp": 1647420449721,
"eventDetail": "{\"Error\":\"UnhandledInvocationError\"}"
}
],
"durationMs": 100,
"returnPayload": "my-result"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.