def get_workflow_execution_history(domain=None, execution=None,
    nextPageToken=None, maximumPageSize=None, reverseOrder=None):
    """
    Returns the history of the specified workflow execution. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.
    Access Control
    You can use IAM policies to control this action's access to Amazon SWF resources as follows:
    If the caller does not 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 will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .
    See also: AWS API Documentation
    
    
    :example: response = client.get_workflow_execution_history(
        domain='string',
        execution={
            'workflowId': 'string',
            'runId': 'string'
        },
        nextPageToken='string',
        maximumPageSize=123,
        reverseOrder=True|False
    )
    
    
    :type domain: string
    :param domain: [REQUIRED]
            The name of the domain containing the workflow execution.
            

    :type execution: dict
    :param execution: [REQUIRED]
            Specifies the workflow execution for which to return the history.
            workflowId (string) -- [REQUIRED]The user defined identifier associated with the workflow execution.
            runId (string) -- [REQUIRED]A system-generated unique identifier for the workflow execution.
            

    :type nextPageToken: string
    :param nextPageToken: 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 in nextPageToken . Keep all other arguments unchanged.
            The configured maximumPageSize determines how many results can be returned in a single call.
            

    :type maximumPageSize: integer
    :param maximumPageSize: The maximum number of results that will be returned per call. nextPageToken can be used to obtain futher pages of results. The default is 1000, which is the maximum allowed page size. You can, however, specify a page size smaller than the maximum.
            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: When set to true , returns the events in reverse order. By default the results are returned in ascending order of the eventTimeStamp of the events.

    :rtype: dict
    :return: {
        'events': [
            {
                'eventTimestamp': datetime(2015, 1, 1),
                'eventType': 'WorkflowExecutionStarted'|'WorkflowExecutionCancelRequested'|'WorkflowExecutionCompleted'|'CompleteWorkflowExecutionFailed'|'WorkflowExecutionFailed'|'FailWorkflowExecutionFailed'|'WorkflowExecutionTimedOut'|'WorkflowExecutionCanceled'|'CancelWorkflowExecutionFailed'|'WorkflowExecutionContinuedAsNew'|'ContinueAsNewWorkflowExecutionFailed'|'WorkflowExecutionTerminated'|'DecisionTaskScheduled'|'DecisionTaskStarted'|'DecisionTaskCompleted'|'DecisionTaskTimedOut'|'ActivityTaskScheduled'|'ScheduleActivityTaskFailed'|'ActivityTaskStarted'|'ActivityTaskCompleted'|'ActivityTaskFailed'|'ActivityTaskTimedOut'|'ActivityTaskCanceled'|'ActivityTaskCancelRequested'|'RequestCancelActivityTaskFailed'|'WorkflowExecutionSignaled'|'MarkerRecorded'|'RecordMarkerFailed'|'TimerStarted'|'StartTimerFailed'|'TimerFired'|'TimerCanceled'|'CancelTimerFailed'|'StartChildWorkflowExecutionInitiated'|'StartChildWorkflowExecutionFailed'|'ChildWorkflowExecutionStarted'|'ChildWorkflowExecutionCompleted'|'ChildWorkflowExecutionFailed'|'ChildWorkflowExecutionTimedOut'|'ChildWorkflowExecutionCanceled'|'ChildWorkflowExecutionTerminated'|'SignalExternalWorkflowExecutionInitiated'|'SignalExternalWorkflowExecutionFailed'|'ExternalWorkflowExecutionSignaled'|'RequestCancelExternalWorkflowExecutionInitiated'|'RequestCancelExternalWorkflowExecutionFailed'|'ExternalWorkflowExecutionCancelRequested'|'LambdaFunctionScheduled'|'LambdaFunctionStarted'|'LambdaFunctionCompleted'|'LambdaFunctionFailed'|'LambdaFunctionTimedOut'|'ScheduleLambdaFunctionFailed'|'StartLambdaFunctionFailed',
                'eventId': 123,
                'workflowExecutionStartedEventAttributes': {
                    'input': 'string',
                    'executionStartToCloseTimeout': 'string',
                    'taskStartToCloseTimeout': 'string',
                    'childPolicy': 'TERMINATE'|'REQUEST_CANCEL'|'ABANDON',
                    'taskList': {
                        'name': 'string'
                    },
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'tagList': [
                        'string',
                    ],
                    'taskPriority': 'string',
                    'continuedExecutionRunId': 'string',
                    'parentWorkflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'parentInitiatedEventId': 123,
                    'lambdaRole': 'string'
                },
                'workflowExecutionCompletedEventAttributes': {
                    'result': 'string',
                    'decisionTaskCompletedEventId': 123
                },
                'completeWorkflowExecutionFailedEventAttributes': {
                    'cause': 'UNHANDLED_DECISION'|'OPERATION_NOT_PERMITTED',
                    'decisionTaskCompletedEventId': 123
                },
                'workflowExecutionFailedEventAttributes': {
                    'reason': 'string',
                    'details': 'string',
                    'decisionTaskCompletedEventId': 123
                },
                'failWorkflowExecutionFailedEventAttributes': {
                    'cause': 'UNHANDLED_DECISION'|'OPERATION_NOT_PERMITTED',
                    'decisionTaskCompletedEventId': 123
                },
                'workflowExecutionTimedOutEventAttributes': {
                    'timeoutType': 'START_TO_CLOSE',
                    'childPolicy': 'TERMINATE'|'REQUEST_CANCEL'|'ABANDON'
                },
                'workflowExecutionCanceledEventAttributes': {
                    'details': 'string',
                    'decisionTaskCompletedEventId': 123
                },
                'cancelWorkflowExecutionFailedEventAttributes': {
                    'cause': 'UNHANDLED_DECISION'|'OPERATION_NOT_PERMITTED',
                    'decisionTaskCompletedEventId': 123
                },
                'workflowExecutionContinuedAsNewEventAttributes': {
                    'input': 'string',
                    'decisionTaskCompletedEventId': 123,
                    'newExecutionRunId': 'string',
                    'executionStartToCloseTimeout': 'string',
                    'taskList': {
                        'name': 'string'
                    },
                    'taskPriority': 'string',
                    'taskStartToCloseTimeout': 'string',
                    'childPolicy': 'TERMINATE'|'REQUEST_CANCEL'|'ABANDON',
                    'tagList': [
                        'string',
                    ],
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'lambdaRole': 'string'
                },
                'continueAsNewWorkflowExecutionFailedEventAttributes': {
                    'cause': 'UNHANDLED_DECISION'|'WORKFLOW_TYPE_DEPRECATED'|'WORKFLOW_TYPE_DOES_NOT_EXIST'|'DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED'|'DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED'|'DEFAULT_TASK_LIST_UNDEFINED'|'DEFAULT_CHILD_POLICY_UNDEFINED'|'CONTINUE_AS_NEW_WORKFLOW_EXECUTION_RATE_EXCEEDED'|'OPERATION_NOT_PERMITTED',
                    'decisionTaskCompletedEventId': 123
                },
                'workflowExecutionTerminatedEventAttributes': {
                    'reason': 'string',
                    'details': 'string',
                    'childPolicy': 'TERMINATE'|'REQUEST_CANCEL'|'ABANDON',
                    'cause': 'CHILD_POLICY_APPLIED'|'EVENT_LIMIT_EXCEEDED'|'OPERATOR_INITIATED'
                },
                'workflowExecutionCancelRequestedEventAttributes': {
                    'externalWorkflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'externalInitiatedEventId': 123,
                    'cause': 'CHILD_POLICY_APPLIED'
                },
                'decisionTaskScheduledEventAttributes': {
                    'taskList': {
                        'name': 'string'
                    },
                    'taskPriority': 'string',
                    'startToCloseTimeout': 'string'
                },
                'decisionTaskStartedEventAttributes': {
                    'identity': 'string',
                    'scheduledEventId': 123
                },
                'decisionTaskCompletedEventAttributes': {
                    'executionContext': 'string',
                    'scheduledEventId': 123,
                    'startedEventId': 123
                },
                'decisionTaskTimedOutEventAttributes': {
                    'timeoutType': 'START_TO_CLOSE',
                    'scheduledEventId': 123,
                    'startedEventId': 123
                },
                'activityTaskScheduledEventAttributes': {
                    'activityType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'activityId': 'string',
                    'input': 'string',
                    'control': 'string',
                    'scheduleToStartTimeout': 'string',
                    'scheduleToCloseTimeout': 'string',
                    'startToCloseTimeout': 'string',
                    'taskList': {
                        'name': 'string'
                    },
                    'taskPriority': 'string',
                    'decisionTaskCompletedEventId': 123,
                    'heartbeatTimeout': 'string'
                },
                'activityTaskStartedEventAttributes': {
                    'identity': 'string',
                    'scheduledEventId': 123
                },
                'activityTaskCompletedEventAttributes': {
                    'result': 'string',
                    'scheduledEventId': 123,
                    'startedEventId': 123
                },
                'activityTaskFailedEventAttributes': {
                    'reason': 'string',
                    'details': 'string',
                    'scheduledEventId': 123,
                    'startedEventId': 123
                },
                'activityTaskTimedOutEventAttributes': {
                    'timeoutType': 'START_TO_CLOSE'|'SCHEDULE_TO_START'|'SCHEDULE_TO_CLOSE'|'HEARTBEAT',
                    'scheduledEventId': 123,
                    'startedEventId': 123,
                    'details': 'string'
                },
                'activityTaskCanceledEventAttributes': {
                    'details': 'string',
                    'scheduledEventId': 123,
                    'startedEventId': 123,
                    'latestCancelRequestedEventId': 123
                },
                'activityTaskCancelRequestedEventAttributes': {
                    'decisionTaskCompletedEventId': 123,
                    'activityId': 'string'
                },
                'workflowExecutionSignaledEventAttributes': {
                    'signalName': 'string',
                    'input': 'string',
                    'externalWorkflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'externalInitiatedEventId': 123
                },
                'markerRecordedEventAttributes': {
                    'markerName': 'string',
                    'details': 'string',
                    'decisionTaskCompletedEventId': 123
                },
                'recordMarkerFailedEventAttributes': {
                    'markerName': 'string',
                    'cause': 'OPERATION_NOT_PERMITTED',
                    'decisionTaskCompletedEventId': 123
                },
                'timerStartedEventAttributes': {
                    'timerId': 'string',
                    'control': 'string',
                    'startToFireTimeout': 'string',
                    'decisionTaskCompletedEventId': 123
                },
                'timerFiredEventAttributes': {
                    'timerId': 'string',
                    'startedEventId': 123
                },
                'timerCanceledEventAttributes': {
                    'timerId': 'string',
                    'startedEventId': 123,
                    'decisionTaskCompletedEventId': 123
                },
                'startChildWorkflowExecutionInitiatedEventAttributes': {
                    'workflowId': 'string',
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'control': 'string',
                    'input': 'string',
                    'executionStartToCloseTimeout': 'string',
                    'taskList': {
                        'name': 'string'
                    },
                    'taskPriority': 'string',
                    'decisionTaskCompletedEventId': 123,
                    'childPolicy': 'TERMINATE'|'REQUEST_CANCEL'|'ABANDON',
                    'taskStartToCloseTimeout': 'string',
                    'tagList': [
                        'string',
                    ],
                    'lambdaRole': 'string'
                },
                'childWorkflowExecutionStartedEventAttributes': {
                    'workflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'initiatedEventId': 123
                },
                'childWorkflowExecutionCompletedEventAttributes': {
                    'workflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'result': 'string',
                    'initiatedEventId': 123,
                    'startedEventId': 123
                },
                'childWorkflowExecutionFailedEventAttributes': {
                    'workflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'reason': 'string',
                    'details': 'string',
                    'initiatedEventId': 123,
                    'startedEventId': 123
                },
                'childWorkflowExecutionTimedOutEventAttributes': {
                    'workflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'timeoutType': 'START_TO_CLOSE',
                    'initiatedEventId': 123,
                    'startedEventId': 123
                },
                'childWorkflowExecutionCanceledEventAttributes': {
                    'workflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'details': 'string',
                    'initiatedEventId': 123,
                    'startedEventId': 123
                },
                'childWorkflowExecutionTerminatedEventAttributes': {
                    'workflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'initiatedEventId': 123,
                    'startedEventId': 123
                },
                'signalExternalWorkflowExecutionInitiatedEventAttributes': {
                    'workflowId': 'string',
                    'runId': 'string',
                    'signalName': 'string',
                    'input': 'string',
                    'decisionTaskCompletedEventId': 123,
                    'control': 'string'
                },
                'externalWorkflowExecutionSignaledEventAttributes': {
                    'workflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'initiatedEventId': 123
                },
                'signalExternalWorkflowExecutionFailedEventAttributes': {
                    'workflowId': 'string',
                    'runId': 'string',
                    'cause': 'UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION'|'SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED'|'OPERATION_NOT_PERMITTED',
                    'initiatedEventId': 123,
                    'decisionTaskCompletedEventId': 123,
                    'control': 'string'
                },
                'externalWorkflowExecutionCancelRequestedEventAttributes': {
                    'workflowExecution': {
                        'workflowId': 'string',
                        'runId': 'string'
                    },
                    'initiatedEventId': 123
                },
                'requestCancelExternalWorkflowExecutionInitiatedEventAttributes': {
                    'workflowId': 'string',
                    'runId': 'string',
                    'decisionTaskCompletedEventId': 123,
                    'control': 'string'
                },
                'requestCancelExternalWorkflowExecutionFailedEventAttributes': {
                    'workflowId': 'string',
                    'runId': 'string',
                    'cause': 'UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION'|'REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_RATE_EXCEEDED'|'OPERATION_NOT_PERMITTED',
                    'initiatedEventId': 123,
                    'decisionTaskCompletedEventId': 123,
                    'control': 'string'
                },
                'scheduleActivityTaskFailedEventAttributes': {
                    'activityType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'activityId': 'string',
                    'cause': 'ACTIVITY_TYPE_DEPRECATED'|'ACTIVITY_TYPE_DOES_NOT_EXIST'|'ACTIVITY_ID_ALREADY_IN_USE'|'OPEN_ACTIVITIES_LIMIT_EXCEEDED'|'ACTIVITY_CREATION_RATE_EXCEEDED'|'DEFAULT_SCHEDULE_TO_CLOSE_TIMEOUT_UNDEFINED'|'DEFAULT_TASK_LIST_UNDEFINED'|'DEFAULT_SCHEDULE_TO_START_TIMEOUT_UNDEFINED'|'DEFAULT_START_TO_CLOSE_TIMEOUT_UNDEFINED'|'DEFAULT_HEARTBEAT_TIMEOUT_UNDEFINED'|'OPERATION_NOT_PERMITTED',
                    'decisionTaskCompletedEventId': 123
                },
                'requestCancelActivityTaskFailedEventAttributes': {
                    'activityId': 'string',
                    'cause': 'ACTIVITY_ID_UNKNOWN'|'OPERATION_NOT_PERMITTED',
                    'decisionTaskCompletedEventId': 123
                },
                'startTimerFailedEventAttributes': {
                    'timerId': 'string',
                    'cause': 'TIMER_ID_ALREADY_IN_USE'|'OPEN_TIMERS_LIMIT_EXCEEDED'|'TIMER_CREATION_RATE_EXCEEDED'|'OPERATION_NOT_PERMITTED',
                    'decisionTaskCompletedEventId': 123
                },
                'cancelTimerFailedEventAttributes': {
                    'timerId': 'string',
                    'cause': 'TIMER_ID_UNKNOWN'|'OPERATION_NOT_PERMITTED',
                    'decisionTaskCompletedEventId': 123
                },
                'startChildWorkflowExecutionFailedEventAttributes': {
                    'workflowType': {
                        'name': 'string',
                        'version': 'string'
                    },
                    'cause': 'WORKFLOW_TYPE_DOES_NOT_EXIST'|'WORKFLOW_TYPE_DEPRECATED'|'OPEN_CHILDREN_LIMIT_EXCEEDED'|'OPEN_WORKFLOWS_LIMIT_EXCEEDED'|'CHILD_CREATION_RATE_EXCEEDED'|'WORKFLOW_ALREADY_RUNNING'|'DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED'|'DEFAULT_TASK_LIST_UNDEFINED'|'DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED'|'DEFAULT_CHILD_POLICY_UNDEFINED'|'OPERATION_NOT_PERMITTED',
                    'workflowId': 'string',
                    'initiatedEventId': 123,
                    'decisionTaskCompletedEventId': 123,
                    'control': 'string'
                },
                'lambdaFunctionScheduledEventAttributes': {
                    'id': 'string',
                    'name': 'string',
                    'input': 'string',
                    'startToCloseTimeout': 'string',
                    'decisionTaskCompletedEventId': 123
                },
                'lambdaFunctionStartedEventAttributes': {
                    'scheduledEventId': 123
                },
                'lambdaFunctionCompletedEventAttributes': {
                    'scheduledEventId': 123,
                    'startedEventId': 123,
                    'result': 'string'
                },
                'lambdaFunctionFailedEventAttributes': {
                    'scheduledEventId': 123,
                    'startedEventId': 123,
                    'reason': 'string',
                    'details': 'string'
                },
                'lambdaFunctionTimedOutEventAttributes': {
                    'scheduledEventId': 123,
                    'startedEventId': 123,
                    'timeoutType': 'START_TO_CLOSE'
                },
                'scheduleLambdaFunctionFailedEventAttributes': {
                    'id': 'string',
                    'name': 'string',
                    'cause': 'ID_ALREADY_IN_USE'|'OPEN_LAMBDA_FUNCTIONS_LIMIT_EXCEEDED'|'LAMBDA_FUNCTION_CREATION_RATE_EXCEEDED'|'LAMBDA_SERVICE_NOT_AVAILABLE_IN_REGION',
                    'decisionTaskCompletedEventId': 123
                },
                'startLambdaFunctionFailedEventAttributes': {
                    'scheduledEventId': 123,
                    'cause': 'ASSUME_ROLE_FAILED',
                    'message': 'string'
                }
            },
        ],
        'nextPageToken': 'string'
    }
    
    
    :returns: 
    domain (string) -- [REQUIRED]
    The name of the domain containing the workflow execution.
    
    execution (dict) -- [REQUIRED]
    Specifies the workflow execution for which to return the history.
    
    workflowId (string) -- [REQUIRED]The user defined identifier associated with the workflow execution.
    
    runId (string) -- [REQUIRED]A system-generated unique identifier for the 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 in nextPageToken . Keep all other arguments unchanged.
    The configured maximumPageSize determines how many results can be returned in a single call.
    
    maximumPageSize (integer) -- The maximum number of results that will be returned per call. nextPageToken can be used to obtain futher pages of results. The default is 1000, which is the maximum allowed page size. You can, however, specify a page size smaller than the maximum.
    This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.
    
    reverseOrder (boolean) -- When set to true , returns the events in reverse order. By default the results are returned in ascending order of the eventTimeStamp of the events.
    
    """
    pass
