ListExecutions
Lists all executions of a state machine or a Map Run. You can list all executions related to a state machine by specifying a state machine Amazon Resource Name (ARN), or those related to a Map Run by specifying a Map Run ARN.
Results are sorted by time, with the most recent execution first.
If nextToken
is returned, there are more results available. The value of nextToken
is a unique pagination token for each page.
Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
Note
This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
This API action is not supported by EXPRESS
state machines.
Request Syntax
{
"mapRunArn": "string
",
"maxResults": number
,
"nextToken": "string
",
"stateMachineArn": "string
",
"statusFilter": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- mapRunArn
-
The Amazon Resource Name (ARN) of the Map Run that started the child workflow executions. If the
mapRunArn
field is specified, a list of all of the child workflow executions started by a Map Run is returned. For more information, see Examining Map Run in the Amazon Step Functions Developer Guide.You can specify either a
mapRunArn
or astateMachineArn
, but not both.Type: String
Length Constraints: Minimum length of 1. Maximum length of 2000.
Required: No
- maxResults
-
The maximum number of results that are returned per call. You can use
nextToken
to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.
Type: Integer
Valid Range: Minimum value of 0. Maximum value of 1000.
Required: No
- nextToken
-
If
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.Type: String
Length Constraints: Minimum length of 1. Maximum length of 3096.
Required: No
- stateMachineArn
-
The Amazon Resource Name (ARN) of the state machine whose executions is listed.
You can specify either a
mapRunArn
or astateMachineArn
, but not both.Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No
- statusFilter
-
If specified, only list the executions whose current execution status matches the given filter.
Type: String
Valid Values:
RUNNING | SUCCEEDED | FAILED | TIMED_OUT | ABORTED
Required: No
Response Syntax
{
"executions": [
{
"executionArn": "string",
"itemCount": number,
"mapRunArn": "string",
"name": "string",
"startDate": number,
"stateMachineArn": "string",
"status": "string",
"stopDate": number
}
],
"nextToken": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- executions
-
The list of matching executions.
Type: Array of ExecutionListItem objects
- nextToken
-
If
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.Type: String
Length Constraints: Minimum length of 1. Maximum length of 3096.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InvalidArn
-
The provided Amazon Resource Name (ARN) is not valid.
HTTP Status Code: 400
- InvalidToken
-
The provided token is not valid.
HTTP Status Code: 400
- ResourceNotFound
-
Could not find the referenced resource. Only state machine and activity ARNs are supported.
HTTP Status Code: 400
- StateMachineDoesNotExist
-
The specified state machine does not exist.
HTTP Status Code: 400
- StateMachineTypeNotSupported
-
HTTP Status Code: 400
- ValidationException
-
The input does not satisfy the constraints specified by an Amazon service.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: