All Products
Search
Document Center

Function Compute:ListAsyncTasks

Last Updated:Jan 19, 2026

Lists the details of asynchronous tasks.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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.

  • Enqueued: The asynchronous message is enqueued and waits for processing.

  • Dequeued: The asynchronous message is dequeued and waits to be triggered.

  • Running: The invocation is in progress.

  • Succeeded: The invocation succeeded.

  • Failed: The invocation failed.

  • Stopped: The invocation was stopped.

  • Stopping: The invocation is being stopped.

  • Expired: The task was discarded because its configured maximum queuing duration was exceeded. The task was not executed.

  • Invalid: The execution is invalid because the function was deleted or for other reasons. The task was not executed.

  • Retrying: The asynchronous invocation is being retried because of an execution error.

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: ascending order

  • desc: descending order

asc

includePayload

boolean

No

Specifies whether to return the input parameters of the asynchronous task.

  • true: If this parameter is set to true, the invocationPayload field is returned.

  • false: If this parameter is set to false, the invocationPayload field is not returned.

Note

The invocationPayload field specifies the input parameters of the function for the asynchronous task.

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.