SWF / Client / list_open_workflow_executions
list_open_workflow_executions#
- SWF.Client.list_open_workflow_executions(**kwargs)#
Returns a list of open workflow executions in the specified domain that meet the filtering criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.
Note
This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.
Access Control
You can use IAM policies to control this action’s access to Amazon SWF resources as follows:
Use a
Resource
element with the domain name to limit the action to only specified domains.Use an
Action
element to allow or deny permission to call this action.Constrain the following parameters by using a
Condition
element with the appropriate keys.tagFilter.tag
: String constraint. The key isswf:tagFilter.tag
.typeFilter.name
: String constraint. The key isswf:typeFilter.name
.typeFilter.version
: String constraint. The key isswf:typeFilter.version
.
If the caller doesn’t have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute’s
cause
parameter is set toOPERATION_NOT_PERMITTED
. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.See also: AWS API Documentation
Request Syntax
response = client.list_open_workflow_executions( domain='string', startTimeFilter={ 'oldestDate': datetime(2015, 1, 1), 'latestDate': datetime(2015, 1, 1) }, typeFilter={ 'name': 'string', 'version': 'string' }, tagFilter={ 'tag': 'string' }, nextPageToken='string', maximumPageSize=123, reverseOrder=True|False, executionFilter={ 'workflowId': 'string' } )
- Parameters:
domain (string) –
[REQUIRED]
The name of the domain that contains the workflow executions to list.
startTimeFilter (dict) –
[REQUIRED]
Workflow executions are included in the returned results based on whether their start times are within the range specified by this filter.
oldestDate (datetime) – [REQUIRED]
Specifies the oldest start or close date and time to return.
latestDate (datetime) –
Specifies the latest start or close date and time to return.
typeFilter (dict) –
If specified, only executions of the type specified in the filter are returned.
Note
executionFilter
,typeFilter
andtagFilter
are mutually exclusive. You can specify at most one of these in a request.name (string) – [REQUIRED]
Name of the workflow type.
version (string) –
Version of the workflow type.
tagFilter (dict) –
If specified, only executions that have the matching tag are listed.
Note
executionFilter
,typeFilter
andtagFilter
are mutually exclusive. You can specify at most one of these in a request.tag (string) – [REQUIRED]
Specifies the tag that must be associated with the execution for it to meet the filter criteria.
Tags may only contain unicode letters, digits, whitespace, or these symbols:
_ . : / = + - @
.
nextPageToken (string) –
If
NextPageToken
is returned there are more results available. The value ofNextPageToken
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 a400
error: “Specified token has exceeded its maximum lifetime
”.The configured
maximumPageSize
determines how many results can be returned in a single call.maximumPageSize (integer) – The maximum number of results that are returned per call. Use
nextPageToken
to obtain further pages of results.reverseOrder (boolean) – When set to
true
, returns the results in reverse order. By default the results are returned in descending order of the start time of the executions.executionFilter (dict) –
If specified, only workflow executions matching the workflow ID specified in the filter are returned.
Note
executionFilter
,typeFilter
andtagFilter
are mutually exclusive. You can specify at most one of these in a request.workflowId (string) – [REQUIRED]
The workflowId to pass of match the criteria of this filter.
- Return type:
dict
- Returns:
Response Syntax
{ 'executionInfos': [ { 'execution': { 'workflowId': 'string', 'runId': 'string' }, 'workflowType': { 'name': 'string', 'version': 'string' }, 'startTimestamp': datetime(2015, 1, 1), 'closeTimestamp': datetime(2015, 1, 1), 'executionStatus': 'OPEN'|'CLOSED', 'closeStatus': 'COMPLETED'|'FAILED'|'CANCELED'|'TERMINATED'|'CONTINUED_AS_NEW'|'TIMED_OUT', 'parent': { 'workflowId': 'string', 'runId': 'string' }, 'tagList': [ 'string', ], 'cancelRequested': True|False }, ], 'nextPageToken': 'string' }
Response Structure
(dict) –
Contains a paginated list of information about workflow executions.
executionInfos (list) –
The list of workflow information structures.
(dict) –
Contains information about a workflow execution.
execution (dict) –
The workflow execution this information is about.
workflowId (string) –
The user defined identifier associated with the workflow execution.
runId (string) –
A system-generated unique identifier for the workflow execution.
workflowType (dict) –
The type of the workflow execution.
name (string) –
The name of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
version (string) –
The version of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
startTimestamp (datetime) –
The time when the execution was started.
closeTimestamp (datetime) –
The time when the workflow execution was closed. Set only if the execution status is CLOSED.
executionStatus (string) –
The current status of the execution.
closeStatus (string) –
If the execution status is closed then this specifies how the execution was closed:
COMPLETED
– the execution was successfully completed.CANCELED
– the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.TERMINATED
– the execution was force terminated.FAILED
– the execution failed to complete.TIMED_OUT
– the execution did not complete in the alloted time and was automatically timed out.CONTINUED_AS_NEW
– the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.
parent (dict) –
If this workflow execution is a child of another execution then contains the workflow execution that started this execution.
workflowId (string) –
The user defined identifier associated with the workflow execution.
runId (string) –
A system-generated unique identifier for the workflow execution.
tagList (list) –
The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.
(string) –
cancelRequested (boolean) –
Set to true if a cancellation is requested for this workflow execution.
nextPageToken (string) –
If a
NextPageToken
was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token innextPageToken
. Keep all other arguments unchanged.The configured
maximumPageSize
determines how many results can be returned in a single call.
Exceptions
SWF.Client.exceptions.UnknownResourceFault
SWF.Client.exceptions.OperationNotPermittedFault