{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.StepFunctions.Types
(
stepFunctions
, _ExecutionLimitExceeded
, _InvalidDefinition
, _StateMachineLimitExceeded
, _ExecutionAlreadyExists
, _StateMachineAlreadyExists
, _TaskTimedOut
, _InvalidExecutionInput
, _InvalidOutput
, _InvalidName
, _TaskDoesNotExist
, _ActivityDoesNotExist
, _StateMachineDeleting
, _MissingRequiredParameter
, _InvalidARN
, _InvalidToken
, _ActivityWorkerLimitExceeded
, _ActivityLimitExceeded
, _ExecutionDoesNotExist
, _StateMachineDoesNotExist
, ExecutionStatus (..)
, HistoryEventType (..)
, StateMachineStatus (..)
, ActivityFailedEventDetails
, activityFailedEventDetails
, afedError
, afedCause
, ActivityListItem
, activityListItem
, aliActivityARN
, aliName
, aliCreationDate
, ActivityScheduleFailedEventDetails
, activityScheduleFailedEventDetails
, asfedError
, asfedCause
, ActivityScheduledEventDetails
, activityScheduledEventDetails
, asedHeartbeatInSeconds
, asedInput
, asedTimeoutInSeconds
, asedResource
, ActivityStartedEventDetails
, activityStartedEventDetails
, asedWorkerName
, ActivitySucceededEventDetails
, activitySucceededEventDetails
, asedOutput
, ActivityTimedOutEventDetails
, activityTimedOutEventDetails
, atoedError
, atoedCause
, ExecutionAbortedEventDetails
, executionAbortedEventDetails
, eaedError
, eaedCause
, ExecutionFailedEventDetails
, executionFailedEventDetails
, efedError
, efedCause
, ExecutionListItem
, executionListItem
, eliStopDate
, eliExecutionARN
, eliStateMachineARN
, eliName
, eliStatus
, eliStartDate
, ExecutionStartedEventDetails
, executionStartedEventDetails
, esedInput
, esedRoleARN
, ExecutionSucceededEventDetails
, executionSucceededEventDetails
, esedOutput
, ExecutionTimedOutEventDetails
, executionTimedOutEventDetails
, etoedError
, etoedCause
, HistoryEvent
, historyEvent
, heActivityStartedEventDetails
, heLambdaFunctionStartFailedEventDetails
, heStateExitedEventDetails
, heLambdaFunctionSucceededEventDetails
, heActivitySucceededEventDetails
, heLambdaFunctionTimedOutEventDetails
, heActivityTimedOutEventDetails
, heExecutionFailedEventDetails
, heExecutionAbortedEventDetails
, heExecutionSucceededEventDetails
, heLambdaFunctionScheduledEventDetails
, heActivityScheduledEventDetails
, heExecutionStartedEventDetails
, heActivityScheduleFailedEventDetails
, heLambdaFunctionScheduleFailedEventDetails
, heStateEnteredEventDetails
, hePreviousEventId
, heActivityFailedEventDetails
, heLambdaFunctionFailedEventDetails
, heExecutionTimedOutEventDetails
, heTimestamp
, heType
, heId
, LambdaFunctionFailedEventDetails
, lambdaFunctionFailedEventDetails
, lffedError
, lffedCause
, LambdaFunctionScheduleFailedEventDetails
, lambdaFunctionScheduleFailedEventDetails
, lError
, lCause
, LambdaFunctionScheduledEventDetails
, lambdaFunctionScheduledEventDetails
, lfsedInput
, lfsedTimeoutInSeconds
, lfsedResource
, LambdaFunctionStartFailedEventDetails
, lambdaFunctionStartFailedEventDetails
, lfsfedError
, lfsfedCause
, LambdaFunctionSucceededEventDetails
, lambdaFunctionSucceededEventDetails
, lfsedOutput
, LambdaFunctionTimedOutEventDetails
, lambdaFunctionTimedOutEventDetails
, lftoedError
, lftoedCause
, StateEnteredEventDetails
, stateEnteredEventDetails
, sInput
, sName
, StateExitedEventDetails
, stateExitedEventDetails
, seedOutput
, seedName
, StateMachineListItem
, stateMachineListItem
, smliStateMachineARN
, smliName
, smliCreationDate
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.StepFunctions.Types.Product
import Network.AWS.StepFunctions.Types.Sum
stepFunctions :: Service
stepFunctions =
Service
{ _svcAbbrev = "StepFunctions"
, _svcSigner = v4
, _svcPrefix = "states"
, _svcVersion = "2016-11-23"
, _svcEndpoint = defaultEndpoint stepFunctions
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "StepFunctions"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottledException" . hasStatus 400) e =
Just "throttled_exception"
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_ExecutionLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_ExecutionLimitExceeded =
_MatchServiceError stepFunctions "ExecutionLimitExceeded"
_InvalidDefinition :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidDefinition = _MatchServiceError stepFunctions "InvalidDefinition"
_StateMachineLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_StateMachineLimitExceeded =
_MatchServiceError stepFunctions "StateMachineLimitExceeded"
_ExecutionAlreadyExists :: AsError a => Getting (First ServiceError) a ServiceError
_ExecutionAlreadyExists =
_MatchServiceError stepFunctions "ExecutionAlreadyExists"
_StateMachineAlreadyExists :: AsError a => Getting (First ServiceError) a ServiceError
_StateMachineAlreadyExists =
_MatchServiceError stepFunctions "StateMachineAlreadyExists"
_TaskTimedOut :: AsError a => Getting (First ServiceError) a ServiceError
_TaskTimedOut = _MatchServiceError stepFunctions "TaskTimedOut"
_InvalidExecutionInput :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidExecutionInput =
_MatchServiceError stepFunctions "InvalidExecutionInput"
_InvalidOutput :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidOutput = _MatchServiceError stepFunctions "InvalidOutput"
_InvalidName :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidName = _MatchServiceError stepFunctions "InvalidName"
_TaskDoesNotExist :: AsError a => Getting (First ServiceError) a ServiceError
_TaskDoesNotExist = _MatchServiceError stepFunctions "TaskDoesNotExist"
_ActivityDoesNotExist :: AsError a => Getting (First ServiceError) a ServiceError
_ActivityDoesNotExist = _MatchServiceError stepFunctions "ActivityDoesNotExist"
_StateMachineDeleting :: AsError a => Getting (First ServiceError) a ServiceError
_StateMachineDeleting = _MatchServiceError stepFunctions "StateMachineDeleting"
_MissingRequiredParameter :: AsError a => Getting (First ServiceError) a ServiceError
_MissingRequiredParameter =
_MatchServiceError stepFunctions "MissingRequiredParameter"
_InvalidARN :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidARN = _MatchServiceError stepFunctions "InvalidArn"
_InvalidToken :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidToken = _MatchServiceError stepFunctions "InvalidToken"
_ActivityWorkerLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_ActivityWorkerLimitExceeded =
_MatchServiceError stepFunctions "ActivityWorkerLimitExceeded"
_ActivityLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_ActivityLimitExceeded =
_MatchServiceError stepFunctions "ActivityLimitExceeded"
_ExecutionDoesNotExist :: AsError a => Getting (First ServiceError) a ServiceError
_ExecutionDoesNotExist =
_MatchServiceError stepFunctions "ExecutionDoesNotExist"
_StateMachineDoesNotExist :: AsError a => Getting (First ServiceError) a ServiceError
_StateMachineDoesNotExist =
_MatchServiceError stepFunctions "StateMachineDoesNotExist"