SFN / Paginator / GetExecutionHistory

GetExecutionHistory#

class SFN.Paginator.GetExecutionHistory#
paginator = client.get_paginator('get_execution_history')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from SFN.Client.get_execution_history().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    executionArn='string',
    reverseOrder=True|False,
    includeExecutionData=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • executionArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the execution.

  • reverseOrder (boolean) – Lists events in descending order of their timeStamp.

  • includeExecutionData (boolean) – You can select whether execution data (input or output of a history event) is returned. The default is true.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'events': [
        {
            'timestamp': datetime(2015, 1, 1),
            'type': 'ActivityFailed'|'ActivityScheduled'|'ActivityScheduleFailed'|'ActivityStarted'|'ActivitySucceeded'|'ActivityTimedOut'|'ChoiceStateEntered'|'ChoiceStateExited'|'ExecutionAborted'|'ExecutionFailed'|'ExecutionStarted'|'ExecutionSucceeded'|'ExecutionTimedOut'|'FailStateEntered'|'LambdaFunctionFailed'|'LambdaFunctionScheduled'|'LambdaFunctionScheduleFailed'|'LambdaFunctionStarted'|'LambdaFunctionStartFailed'|'LambdaFunctionSucceeded'|'LambdaFunctionTimedOut'|'MapIterationAborted'|'MapIterationFailed'|'MapIterationStarted'|'MapIterationSucceeded'|'MapStateAborted'|'MapStateEntered'|'MapStateExited'|'MapStateFailed'|'MapStateStarted'|'MapStateSucceeded'|'ParallelStateAborted'|'ParallelStateEntered'|'ParallelStateExited'|'ParallelStateFailed'|'ParallelStateStarted'|'ParallelStateSucceeded'|'PassStateEntered'|'PassStateExited'|'SucceedStateEntered'|'SucceedStateExited'|'TaskFailed'|'TaskScheduled'|'TaskStarted'|'TaskStartFailed'|'TaskStateAborted'|'TaskStateEntered'|'TaskStateExited'|'TaskSubmitFailed'|'TaskSubmitted'|'TaskSucceeded'|'TaskTimedOut'|'WaitStateAborted'|'WaitStateEntered'|'WaitStateExited'|'MapRunAborted'|'MapRunFailed'|'MapRunStarted'|'MapRunSucceeded'|'ExecutionRedriven'|'MapRunRedriven',
            'id': 123,
            'previousEventId': 123,
            'activityFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'activityScheduleFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'activityScheduledEventDetails': {
                'resource': 'string',
                'input': 'string',
                'inputDetails': {
                    'truncated': True|False
                },
                'timeoutInSeconds': 123,
                'heartbeatInSeconds': 123
            },
            'activityStartedEventDetails': {
                'workerName': 'string'
            },
            'activitySucceededEventDetails': {
                'output': 'string',
                'outputDetails': {
                    'truncated': True|False
                }
            },
            'activityTimedOutEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'taskFailedEventDetails': {
                'resourceType': 'string',
                'resource': 'string',
                'error': 'string',
                'cause': 'string'
            },
            'taskScheduledEventDetails': {
                'resourceType': 'string',
                'resource': 'string',
                'region': 'string',
                'parameters': 'string',
                'timeoutInSeconds': 123,
                'heartbeatInSeconds': 123,
                'taskCredentials': {
                    'roleArn': 'string'
                }
            },
            'taskStartFailedEventDetails': {
                'resourceType': 'string',
                'resource': 'string',
                'error': 'string',
                'cause': 'string'
            },
            'taskStartedEventDetails': {
                'resourceType': 'string',
                'resource': 'string'
            },
            'taskSubmitFailedEventDetails': {
                'resourceType': 'string',
                'resource': 'string',
                'error': 'string',
                'cause': 'string'
            },
            'taskSubmittedEventDetails': {
                'resourceType': 'string',
                'resource': 'string',
                'output': 'string',
                'outputDetails': {
                    'truncated': True|False
                }
            },
            'taskSucceededEventDetails': {
                'resourceType': 'string',
                'resource': 'string',
                'output': 'string',
                'outputDetails': {
                    'truncated': True|False
                }
            },
            'taskTimedOutEventDetails': {
                'resourceType': 'string',
                'resource': 'string',
                'error': 'string',
                'cause': 'string'
            },
            'executionFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'executionStartedEventDetails': {
                'input': 'string',
                'inputDetails': {
                    'truncated': True|False
                },
                'roleArn': 'string',
                'stateMachineAliasArn': 'string',
                'stateMachineVersionArn': 'string'
            },
            'executionSucceededEventDetails': {
                'output': 'string',
                'outputDetails': {
                    'truncated': True|False
                }
            },
            'executionAbortedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'executionTimedOutEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'executionRedrivenEventDetails': {
                'redriveCount': 123
            },
            'mapStateStartedEventDetails': {
                'length': 123
            },
            'mapIterationStartedEventDetails': {
                'name': 'string',
                'index': 123
            },
            'mapIterationSucceededEventDetails': {
                'name': 'string',
                'index': 123
            },
            'mapIterationFailedEventDetails': {
                'name': 'string',
                'index': 123
            },
            'mapIterationAbortedEventDetails': {
                'name': 'string',
                'index': 123
            },
            'lambdaFunctionFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'lambdaFunctionScheduleFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'lambdaFunctionScheduledEventDetails': {
                'resource': 'string',
                'input': 'string',
                'inputDetails': {
                    'truncated': True|False
                },
                'timeoutInSeconds': 123,
                'taskCredentials': {
                    'roleArn': 'string'
                }
            },
            'lambdaFunctionStartFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'lambdaFunctionSucceededEventDetails': {
                'output': 'string',
                'outputDetails': {
                    'truncated': True|False
                }
            },
            'lambdaFunctionTimedOutEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'stateEnteredEventDetails': {
                'name': 'string',
                'input': 'string',
                'inputDetails': {
                    'truncated': True|False
                }
            },
            'stateExitedEventDetails': {
                'name': 'string',
                'output': 'string',
                'outputDetails': {
                    'truncated': True|False
                }
            },
            'mapRunStartedEventDetails': {
                'mapRunArn': 'string'
            },
            'mapRunFailedEventDetails': {
                'error': 'string',
                'cause': 'string'
            },
            'mapRunRedrivenEventDetails': {
                'mapRunArn': 'string',
                'redriveCount': 123
            }
        },
    ],
    '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 and time 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 that 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 that 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. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • inputDetails (dict) –

            Contains details about the input for an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

          • 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 is assigned to. These names are provided by the workers when calling GetActivityTask.

        • activitySucceededEventDetails (dict) –

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

          • output (string) –

            The JSON data output by the activity task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • outputDetails (dict) –

            Contains details about the output of an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

        • activityTimedOutEventDetails (dict) –

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

          • error (string) –

            The error code of the failure.

          • cause (string) –

            A more detailed explanation of the cause of the timeout.

        • taskFailedEventDetails (dict) –

          Contains details about the failure of a task.

          • resourceType (string) –

            The service name of the resource in a task state.

          • resource (string) –

            The action of the resource called by a task state.

          • error (string) –

            The error code of the failure.

          • cause (string) –

            A more detailed explanation of the cause of the failure.

        • taskScheduledEventDetails (dict) –

          Contains details about a task that was scheduled.

          • resourceType (string) –

            The service name of the resource in a task state.

          • resource (string) –

            The action of the resource called by a task state.

          • region (string) –

            The region of the scheduled task

          • parameters (string) –

            The JSON data passed to the resource referenced in a task state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • timeoutInSeconds (integer) –

            The maximum allowed duration of the task.

          • heartbeatInSeconds (integer) –

            The maximum allowed duration between two heartbeats for the task.

          • taskCredentials (dict) –

            The credentials that Step Functions uses for the task.

            • roleArn (string) –

              The ARN of an IAM role that Step Functions assumes for the task. The role can allow cross-account access to resources.

        • taskStartFailedEventDetails (dict) –

          Contains details about a task that failed to start.

          • resourceType (string) –

            The service name of the resource in a task state.

          • resource (string) –

            The action of the resource called by a task state.

          • error (string) –

            The error code of the failure.

          • cause (string) –

            A more detailed explanation of the cause of the failure.

        • taskStartedEventDetails (dict) –

          Contains details about a task that was started.

          • resourceType (string) –

            The service name of the resource in a task state.

          • resource (string) –

            The action of the resource called by a task state.

        • taskSubmitFailedEventDetails (dict) –

          Contains details about a task that where the submit failed.

          • resourceType (string) –

            The service name of the resource in a task state.

          • resource (string) –

            The action of the resource called by a task state.

          • error (string) –

            The error code of the failure.

          • cause (string) –

            A more detailed explanation of the cause of the failure.

        • taskSubmittedEventDetails (dict) –

          Contains details about a submitted task.

          • resourceType (string) –

            The service name of the resource in a task state.

          • resource (string) –

            The action of the resource called by a task state.

          • output (string) –

            The response from a resource when a task has started. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • outputDetails (dict) –

            Contains details about the output of an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

        • taskSucceededEventDetails (dict) –

          Contains details about a task that succeeded.

          • resourceType (string) –

            The service name of the resource in a task state.

          • resource (string) –

            The action of the resource called by a task state.

          • output (string) –

            The full JSON response from a resource when a task has succeeded. This response becomes the output of the related task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • outputDetails (dict) –

            Contains details about the output of an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

        • taskTimedOutEventDetails (dict) –

          Contains details about a task that timed out.

          • resourceType (string) –

            The service name of the resource in a task state.

          • resource (string) –

            The action of the resource called by a task state.

          • error (string) –

            The error code of the failure.

          • cause (string) –

            A more detailed explanation of the cause of the failure.

        • 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. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • inputDetails (dict) –

            Contains details about the input for an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

          • roleArn (string) –

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

          • stateMachineAliasArn (string) –

            The Amazon Resource Name (ARN) that identifies a state machine alias used for starting the state machine execution.

          • stateMachineVersionArn (string) –

            The Amazon Resource Name (ARN) that identifies a state machine version used for starting the state machine execution.

        • executionSucceededEventDetails (dict) –

          Contains details about the successful termination of the execution.

          • output (string) –

            The JSON data output by the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • outputDetails (dict) –

            Contains details about the output of an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

        • 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 that occurred during the execution.

          • error (string) –

            The error code of the failure.

          • cause (string) –

            A more detailed explanation of the cause of the timeout.

        • executionRedrivenEventDetails (dict) –

          Contains details about the redrive attempt of an execution.

          • redriveCount (integer) –

            The number of times you’ve redriven an execution. If you have not yet redriven an execution, the redriveCount is 0. This count is not updated for redrives that failed to start or are pending to be redriven.

        • mapStateStartedEventDetails (dict) –

          Contains details about Map state that was started.

          • length (integer) –

            The size of the array for Map state iterations.

        • mapIterationStartedEventDetails (dict) –

          Contains details about an iteration of a Map state that was started.

          • name (string) –

            The name of the iteration’s parent Map state.

          • index (integer) –

            The index of the array belonging to the Map state iteration.

        • mapIterationSucceededEventDetails (dict) –

          Contains details about an iteration of a Map state that succeeded.

          • name (string) –

            The name of the iteration’s parent Map state.

          • index (integer) –

            The index of the array belonging to the Map state iteration.

        • mapIterationFailedEventDetails (dict) –

          Contains details about an iteration of a Map state that failed.

          • name (string) –

            The name of the iteration’s parent Map state.

          • index (integer) –

            The index of the array belonging to the Map state iteration.

        • mapIterationAbortedEventDetails (dict) –

          Contains details about an iteration of a Map state that was aborted.

          • name (string) –

            The name of the iteration’s parent Map state.

          • index (integer) –

            The index of the array belonging to the Map state iteration.

        • lambdaFunctionFailedEventDetails (dict) –

          Contains details about a Lambda function that 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 that 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. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • inputDetails (dict) –

            Contains details about input for an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

          • timeoutInSeconds (integer) –

            The maximum allowed duration of the Lambda function.

          • taskCredentials (dict) –

            The credentials that Step Functions uses for the task.

            • roleArn (string) –

              The ARN of an IAM role that Step Functions assumes for the task. The role can allow cross-account access to resources.

        • lambdaFunctionStartFailedEventDetails (dict) –

          Contains details about a lambda function that 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 that terminated successfully during an execution.

          • output (string) –

            The JSON data output by the Lambda function. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • outputDetails (dict) –

            Contains details about the output of an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

        • lambdaFunctionTimedOutEventDetails (dict) –

          Contains details about a Lambda function timeout that 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. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • inputDetails (dict) –

            Contains details about the input for an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

        • 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:

            • white space

            • brackets < > { } [ ]

            • wildcard characters ? *

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

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

            To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.

          • output (string) –

            The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

          • outputDetails (dict) –

            Contains details about the output of an execution history event.

            • truncated (boolean) –

              Indicates whether input or output was truncated in the response. Always false for API calls.

        • mapRunStartedEventDetails (dict) –

          Contains details, such as mapRunArn, and the start date and time of a Map Run. mapRunArn is the Amazon Resource Name (ARN) of the Map Run that was started.

          • mapRunArn (string) –

            The Amazon Resource Name (ARN) of a Map Run that was started.

        • mapRunFailedEventDetails (dict) –

          Contains error and cause details about a Map Run that failed.

          • error (string) –

            The error code of the Map Run failure.

          • cause (string) –

            A more detailed explanation of the cause of the failure.

        • mapRunRedrivenEventDetails (dict) –

          Contains details about the redrive attempt of a Map Run.

          • mapRunArn (string) –

            The Amazon Resource Name (ARN) of a Map Run that was redriven.

          • redriveCount (integer) –

            The number of times the Map Run has been redriven at this point in the execution’s history including this event. The redrive count for a redriven Map Run is always greater than 0.

    • NextToken (string) –

      A token to resume pagination.