Queries the information about a stateful asynchronous invocation.

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/{statefulAsyncInvocationId} 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 invocation was triggered.

functionName String Path Yes function_name

The name of the function for which the stateful asynchronous invocation was triggered.

qualifier String Path No alias

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

statefulAsyncInvocationId String Path Yes e026ae92-61e5-472f-b32d-1c9e3c4e****

The ID of the stateful asynchronous invocation.

Note When you use an SDK to invoke a function, we recommend that you specify a business-related ID to facilitate subsequent operations. For example, a function that processes a video can use the file name of the video as the invocation ID. Then, you can use this ID to check whether the video is processed or terminate the processing of the video. The ID must start with a letter or an underscore (_) and can contain letters, digits, underscores (_), and hyphens (-). The ID can be up to 128 characters in length. If you do not specify the ID of the asynchronous invocation, Function Compute automatically generates an ID.

Response parameters

Parameter Type Example Description
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 invocation was triggered.

qualifier String alias

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

serviceName String service_name

The name of the service that contains the function for which the stateful asynchronous invocation was 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].

Examples

Sample requests

GET /2016-08-15/services/{serviceName[.qualifier]}/functions/function_name/stateful-async-invocations/e026ae92-61e5-472f-b32d-1c9e3c4e**** HTTP/1.1
Common request headers

Sample success responses

JSON format

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

{
  "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" : "function_name",
  "alreadyRetriedTimes" : 3
}