module Network.AWS.Lambda.Types
(
Lambda
, _PolicyLengthExceededException
, _UnsupportedMediaTypeException
, _InvalidRequestContentException
, _InvalidParameterValueException
, _RequestTooLargeException
, _TooManyRequestsException
, _ServiceException
, _CodeStorageExceededException
, _ResourceConflictException
, _ResourceNotFoundException
, EventSourcePosition (..)
, InvocationType (..)
, LogType (..)
, Runtime (..)
, EventSourceMappingConfiguration
, eventSourceMappingConfiguration
, esmcEventSourceARN
, esmcFunctionARN
, esmcState
, esmcUUId
, esmcLastProcessingResult
, esmcBatchSize
, esmcStateTransitionReason
, esmcLastModified
, FunctionCode
, functionCode
, fcS3ObjectVersion
, fcS3Key
, fcZipFile
, fcS3Bucket
, FunctionCodeLocation
, functionCodeLocation
, fclLocation
, fclRepositoryType
, FunctionConfiguration
, functionConfiguration
, fcRuntime
, fcMemorySize
, fcFunctionARN
, fcRole
, fcFunctionName
, fcCodeSize
, fcHandler
, fcTimeout
, fcLastModified
, fcDescription
) where
import Network.AWS.Lambda.Types.Product
import Network.AWS.Lambda.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
data Lambda
instance AWSService Lambda where
type Sg Lambda = V4
service = const svc
where
svc =
Service
{ _svcAbbrev = "Lambda"
, _svcPrefix = "lambda"
, _svcVersion = "2015-03-31"
, _svcEndpoint = defaultEndpoint svc
, _svcTimeout = Just 70
, _svcStatus = statusSuccess
, _svcError = parseJSONError
, _svcRetry = retry
}
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_PolicyLengthExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_PolicyLengthExceededException =
_ServiceError . hasStatus 400 . hasCode "PolicyLengthExceededException"
_UnsupportedMediaTypeException :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedMediaTypeException =
_ServiceError . hasStatus 415 . hasCode "UnsupportedMediaTypeException"
_InvalidRequestContentException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidRequestContentException =
_ServiceError . hasStatus 400 . hasCode "InvalidRequestContentException"
_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterValueException =
_ServiceError . hasStatus 400 . hasCode "InvalidParameterValueException"
_RequestTooLargeException :: AsError a => Getting (First ServiceError) a ServiceError
_RequestTooLargeException =
_ServiceError . hasStatus 413 . hasCode "RequestTooLargeException"
_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyRequestsException =
_ServiceError . hasStatus 429 . hasCode "TooManyRequestsException"
_ServiceException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceException = _ServiceError . hasStatus 500 . hasCode "ServiceException"
_CodeStorageExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_CodeStorageExceededException =
_ServiceError . hasStatus 400 . hasCode "CodeStorageExceededException"
_ResourceConflictException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceConflictException =
_ServiceError . hasStatus 409 . hasCode "ResourceConflictException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasStatus 404 . hasCode "ResourceNotFoundException"