Queries all stateful asynchronous invocations that meet a specific condition.

Request headers

This operation uses only common request headers. For more information, see Common parameters.

Request syntax

GET /services/{serviceName[.qualifier]}/functions/{functionName}/stateful-async-invocations HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
serviceName String Path Yes service_name

The name of the service that contains the function for which the stateful asynchronous invocations were triggered.

functionName String Path Yes function_name

The name of the function for which the stateful asynchronous invocations were triggered.

qualifier String Path No alias

The alias or version of the service that contains the function for which the stateful asynchronous invocations were triggered.

invocationIdPrefix String Path No job-***

The prefix of the names of the asynchronous invocations. This parameter is used to limit the names of the returned invocations. If you set the invocationidPrefix parameter to job, the names of the returned invocations must start with job.

nextToken String Query Yes e026ae92-61e5-472f-b32d-1c9e3c4e****

The token used to start the query of the stateful asynchronous invocations. If the number of stateful asynchronous invocations exceeds the limit, the nextToken parameter is returned. Include this parameter in subsequent calls to obtain more results. You do not need to provide this parameter in the first call.

limit Integer Query No 50

The maximum number of asynchronous invocations to be returned. Valid values: [1,100]. Default value: 50.

startedTimeBegin Long Query No 161941846****

The beginning of the time range to query, within which the stateful asynchronous invocations started. Unit: milliseconds.

startedTimeEnd Long Query No 161941846****

The end of the time range to query, within which the stateful asynchronous invocations ended. Unit: milliseconds.

sortOrderByTime String Query No asc

The method used to sort the returned asynchronous invocations.

  • asc: Sort the asynchronous invocations by time in ascending order.
  • desc: Sort the asynchronous invocations by time in descending order.
includePayload Boolean Query No true

Specifies whether to return the invocationPayload parameter in the response.

  • true: Return the invocationPayload parameter in the response.
  • false: Do not return the invocationPayload parameter in the response.
Note The invocationPayload parameter specifies the input of the stateful asynchronous invocation.

Response parameters

Parameter Type Example Description
invocations Array

The stateful asynchronous invocations.

startedTime Long 2020-08-20T02:28:21Z

The start time of the stateful asynchronous invocation.

endTime Long 2020-08-20T02:38:21Z

The end time of the stateful asynchronous invocation.

functionName String function_name

The name of the function for which the stateful asynchronous invocations were triggered.

qualifier String alias

The alias or version of the service that contains the function for which the stateful asynchronous invocations were triggered.

serviceName String service_name

The name of the service that contains the function for which the stateful asynchronous invocations were triggered.

invocationId String e026ae92-61e5-472f-b32d-1c9e3c4e****

The ID of the stateful asynchronous invocation.

requestId String 403fcbd6-ec41-401f-9fa7-386f3d3d****

The ID of the request.

status String Succeeded

The status of the stateful asynchronous invocation.

  • Succeeded: The invocation was successful.
  • Failed: The invocation failed.
  • Running: The invocation is running.
  • Stopped: The invocation was terminated.
  • Stopping: The invocation is being terminated.
  • Invalid: The invocation is invalid and not triggered due to specific reasons. For example, the function was deleted.
  • Expired: You have configured a validity period for the asynchronous invocation. The invocation was discarded and not triggered due to expiration.
destinationStatus String Succeeded

The status of the destination for the stateful asynchronous invocation.

invocationErrorMessage String UnhandledException

The error message for the failure of the stateful asynchronous invocation.

InvocationPayload String hello world

The input of the stateful asynchronous invocation.

alreadyRetriedTimes Long 3

The maximum number of retries after the stateful asynchronous invocation fails. Default value: 3. Valid values: [0,8].

nextToken String caeba0be03****f84eb48b699f0a4883

The token used to obtain more results. If the number of stateful asynchronous invocations exceeds the limit, the nextToken parameter is returned. Include this parameter in subsequent calls to obtain more results. You do not need to provide this parameter in the first call.

Examples

Sample requests

GET /2016-08-15/services/service_name.alias/functions/function_name/stateful-async-invocations HTTP/1.1
Common request headers

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "invocations" : [ {
    "functionName" : "function_name",
    "qualifier" : "alias",
    "serviceName" : "service_name",
    "invocationId" : "e026ae92-61e5-472f-b32d-1c9e3c4e****",
    "requestId" : "403fcbd6-ec41-401f-9fa7-386f3d3d****",
    "status" : "Succeeded",
    "destinationStatus" : "Succeeded",
    "invocationErrorMessage" : "UnhandledException",
    "InvocationPayload" : "hello world",
    "alreadyRetriedTimes" : 3
  } ],
  "nextToken" : "caeba0be03****f84eb48b699f0a4883"
}