Lists asynchronous tasks.
Debugging
Authorization information
Request syntax
GET /2023-03-30/functions/{functionName}/async-tasks HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
functionName | string | Yes | The function name. | my-func |
prefix | string | No | The ID prefix of asynchronous tasks. If this parameter is specified, a list of asynchronous tasks whose IDs match the prefix is returned. | job- |
nextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. | MTIzNCNhYmM= |
limit | integer | No | The number of asynchronous tasks to return. Valid values: [1,100]. Default value: 20. | 10 |
qualifier | string | No | The version or alias of the function. | LATEST |
status | string | No | The state of asynchronous tasks. The following items list the states of an asynchronous task:
| Running |
startedTimeBegin | long | No | The start time of the period during which the asynchronous tasks are initiated. | 1640966400000 |
startedTimeEnd | long | No | The end time of the period during which the asynchronous tasks are initiated. | 1640966400000 |
sortOrderByTime | string | No | The order in which the returned asynchronous tasks are sorted.
| asc |
includePayload | boolean | No | Specifies whether to return input parameters of the asynchronous tasks. Valid values:
Note
The invocationPayload parameter indicates the input parameters of an asynchronous task.
| true |
Response parameters
Examples
Sample success responses
JSON
format
{
"nextToken": "",
"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
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|