Lists the details of asynchronous tasks.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:ListAsyncTasks |
list |
*All Resource
|
None | None |
Request syntax
GET /2023-03-30/functions/{functionName}/async-tasks HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| functionName |
string |
Yes |
The name of the function. |
my-func |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| prefix |
string |
No |
The prefix of the asynchronous task ID. The system returns a list of asynchronous tasks that match the prefix. |
job- |
| nextToken |
string |
No |
The pagination token to return more results. You do not need to provide this parameter for the first query. Obtain the token for a subsequent query from the response to the previous query. |
MTIzNCNhYmM= |
| limit |
integer |
No |
The number of asynchronous tasks to return. The default value is 20. The value must be in the range of [1, 100]. |
10 |
| qualifier |
string |
No |
The version or alias of the function. |
LATEST |
| status |
string |
No |
The execution status of the asynchronous task.
|
Running |
| startedTimeBegin |
integer |
No |
The start of the time range when the asynchronous task was started. |
1640966400000 |
| startedTimeEnd |
integer |
No |
The end of the time range when the asynchronous task was started. |
1640966400000 |
| sortOrderByTime |
string |
No |
The sorting order of the returned asynchronous tasks.
|
asc |
| includePayload |
boolean |
No |
Specifies whether to return the input parameters of the asynchronous task.
Note
The |
true |
Response elements
|
Element |
Type |
Description |
Example |
| ListAsyncTaskOutput |
The returned data structure. |
Examples
Success response
JSON format
{
"nextToken": "MTIzNCNhYmM=\n",
"tasks": [
{
"alreadyRetriedTimes": 3,
"destinationStatus": "Succeeded",
"durationMs": 1000,
"endTime": 1633449590000,
"events": [
{
"eventDetail": "body",
"eventId": 1,
"status": "Succeeded",
"timestamp": 1647420449721
}
],
"functionArn": "acs:fc:cn-shanghai:1234/functions/my-func",
"instanceId": "D4-*******9FD1-882707E",
"qualifier": "prod",
"requestId": "e026ae92-61e5-472f-b32d-1c9e3c4e****",
"returnPayload": "result",
"startedTime": 1633449590000,
"status": "Running",
"taskErrorMessage": "UnhandledInvocationError",
"taskId": "e026ae92-61e5-472f-b32d-1c9e3c4e****",
"taskPayload": "body"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.