AWS Step Functions

2017/11/07 - AWS Step Functions - 1 updated api methods

GetExecutionHistory (updated) Link ΒΆ
Changes (response)
{'events': {'type': {'ParallelStateAborted',
                     'ParallelStateFailed',
                     'ParallelStateStarted',
                     'ParallelStateSucceeded',
                     'TaskStateAborted',
                     'WaitStateAborted'}}}

Returns the history of the specified execution as a list of events. By default, the results are returned in ascending order of the timeStamp of the events. Use the reverseOrder parameter to get the latest events first. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextToken returned by the previous call.

See also: AWS API Documentation

Request Syntax

client.get_execution_history(
    executionArn='string',
    maxResults=123,
    reverseOrder=True|False,
    nextToken='string'
)
type executionArn

string

param executionArn

[REQUIRED]

The Amazon Resource Name (ARN) of the execution.

type maxResults

integer

param maxResults

The maximum number of results that will be returned per call. nextToken can be used to obtain further pages of results. The default is 100 and the maximum allowed page size is 100. A value of 0 means to use the default.

This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.

type reverseOrder

boolean

param reverseOrder

Lists events in descending order of their timeStamp .

type nextToken

string

param nextToken

If a nextToken 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 in nextToken . Keep all other arguments unchanged.

The configured maxResults determines how many results can be returned in a single call.

rtype

dict

returns

Response Syntax

{
    'events': [
        {
            'timestamp': datetime(2015, 1, 1),
            'type': 'ActivityFailed'|'ActivityScheduleFailed'|'ActivityScheduled'|'ActivityStarted'|'ActivitySucceeded'|'ActivityTimedOut'|'ChoiceStateEntered'|'ChoiceStateExited'|'ExecutionFailed'|'ExecutionStarted'|'ExecutionSucceeded'|'ExecutionAborted'|'ExecutionTimedOut'|'FailStateEntered'|'LambdaFunctionFailed'|'LambdaFunctionScheduleFailed'|'LambdaFunctionScheduled'|'LambdaFunctionStartFailed'|'LambdaFunctionStarted'|'LambdaFunctionSucceeded'|'LambdaFunctionTimedOut'|'SucceedStateEntered'|'SucceedStateExited'|'TaskStateAborted'|'TaskStateEntered'|'TaskStateExited'|'PassStateEntered'|'PassStateExited'|'ParallelStateAborted'|'ParallelStateEntered'|'ParallelStateExited'|'ParallelStateFailed'|'ParallelStateStarted'|'ParallelStateSucceeded'|'WaitStateAborted'|'WaitStateEntered'|'WaitStateExited',
            'id': 123,
            'previousEventId': 123,
            'activityFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'activityScheduleFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'activityScheduledEventDetails': {
                'resource': 'string',
                'input': 'string',
                'timeoutInSeconds': 123,
                'heartbeatInSeconds': 123
            },
            'activityStartedEventDetails': {
                'workerName': 'string'
            },
            'activitySucceededEventDetails': {
                'output': 'string'
            },
            'activityTimedOutEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'executionFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'executionStartedEventDetails': {
                'input': 'string',
                'roleArn': 'string'
            },
            'executionSucceededEventDetails': {
                'output': 'string'
            },
            'executionAbortedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'executionTimedOutEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'lambdaFunctionFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'lambdaFunctionScheduleFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'lambdaFunctionScheduledEventDetails': {
                'resource': 'string',
                'input': 'string',
                'timeoutInSeconds': 123
            },
            'lambdaFunctionStartFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'lambdaFunctionSucceededEventDetails': {
                'output': 'string'
            },
            'lambdaFunctionTimedOutEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'stateEnteredEventDetails': {
                'name': 'string',
                'input': 'string'
            },
            'stateExitedEventDetails': {
                'name': 'string',
                'output': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • events (list) --

      The list of events that occurred in the execution.

      • (dict) --

        Contains details about the events of an execution.

        • timestamp (datetime) --

          The date the event occurred.

        • type (string) --

          The type of the event.

        • id (integer) --

          The id of the event. Events are numbered sequentially, starting at one.

        • previousEventId (integer) --

          The id of the previous event.

        • activityFailedEventDetails (dict) --

          Contains details about an activity which failed during an execution.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the failure.

        • activityScheduleFailedEventDetails (dict) --

          Contains details about an activity schedule event which failed during an execution.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the failure.

        • activityScheduledEventDetails (dict) --

          Contains details about an activity scheduled during an execution.

          • resource (string) --

            The Amazon Resource Name (ARN) of the scheduled activity.

          • input (string) --

            The JSON data input to the activity task.

          • timeoutInSeconds (integer) --

            The maximum allowed duration of the activity task.

          • heartbeatInSeconds (integer) --

            The maximum allowed duration between two heartbeats for the activity task.

        • activityStartedEventDetails (dict) --

          Contains details about the start of an activity during an execution.

          • workerName (string) --

            The name of the worker that the task was assigned to. These names are provided by the workers when calling GetActivityTask.

        • activitySucceededEventDetails (dict) --

          Contains details about an activity which successfully terminated during an execution.

          • output (string) --

            The JSON data output by the activity task.

        • activityTimedOutEventDetails (dict) --

          Contains details about an activity timeout which occurred during an execution.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the timeout.

        • executionFailedEventDetails (dict) --

          Contains details about an execution failure event.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the failure.

        • executionStartedEventDetails (dict) --

          Contains details about the start of the execution.

          • input (string) --

            The JSON data input to the execution.

          • roleArn (string) --

            The Amazon Resource Name (ARN) of the IAM role used for executing AWS Lambda tasks.

        • executionSucceededEventDetails (dict) --

          Contains details about the successful termination of the execution.

          • output (string) --

            The JSON data output by the execution.

        • executionAbortedEventDetails (dict) --

          Contains details about an abort of an execution.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the failure.

        • executionTimedOutEventDetails (dict) --

          Contains details about the execution timeout which occurred during the execution.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the timeout.

        • lambdaFunctionFailedEventDetails (dict) --

          Contains details about a lambda function which failed during an execution.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the failure.

        • lambdaFunctionScheduleFailedEventDetails (dict) --

          Contains details about a failed lambda function schedule event which occurred during an execution.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the failure.

        • lambdaFunctionScheduledEventDetails (dict) --

          Contains details about a lambda function scheduled during an execution.

          • resource (string) --

            The Amazon Resource Name (ARN) of the scheduled lambda function.

          • input (string) --

            The JSON data input to the lambda function.

          • timeoutInSeconds (integer) --

            The maximum allowed duration of the lambda function.

        • lambdaFunctionStartFailedEventDetails (dict) --

          Contains details about a lambda function which failed to start during an execution.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the failure.

        • lambdaFunctionSucceededEventDetails (dict) --

          Contains details about a lambda function which terminated successfully during an execution.

          • output (string) --

            The JSON data output by the lambda function.

        • lambdaFunctionTimedOutEventDetails (dict) --

          Contains details about a lambda function timeout which occurred during an execution.

          • error (string) --

            The error code of the failure.

          • cause (string) --

            A more detailed explanation of the cause of the timeout.

        • stateEnteredEventDetails (dict) --

          Contains details about a state entered during an execution.

          • name (string) --

            The name of the state.

          • input (string) --

            The string that contains the JSON input data for the state.

        • stateExitedEventDetails (dict) --

          Contains details about an exit from a state during an execution.

          • name (string) --

            The name of the state.

            A name must not contain:

            • whitespace

            • brackets < > { } [ ]

            • wildcard characters ? *

            • special characters " # % \ ^ | ~ ` $ & , ; : /

            • control characters ( U+0000-001F , U+007F-009F )

          • output (string) --

            The JSON output data of the state.

    • nextToken (string) --

      If a nextToken is returned, there are more results available. To retrieve the next page of results, make the call again using the returned token in nextToken . Keep all other arguments unchanged.

      The configured maxResults determines how many results can be returned in a single call.