{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Lambda.Types
(
lambda
, _EC2ThrottledException
, _PolicyLengthExceededException
, _EC2AccessDeniedException
, _InvalidSubnetIdException
, _UnsupportedMediaTypeException
, _InvalidRequestContentException
, _ENILimitReachedException
, _InvalidParameterValueException
, _RequestTooLargeException
, _TooManyRequestsException
, _InvalidSecurityGroupIdException
, _SubnetIPAddressLimitReachedException
, _ServiceException
, _CodeStorageExceededException
, _InvalidZipFileException
, _ResourceConflictException
, _EC2UnexpectedException
, _ResourceNotFoundException
, EventSourcePosition (..)
, InvocationType (..)
, LogType (..)
, Runtime (..)
, AliasConfiguration
, aliasConfiguration
, acName
, acFunctionVersion
, acAliasARN
, acDescription
, EventSourceMappingConfiguration
, eventSourceMappingConfiguration
, esmcEventSourceARN
, esmcState
, esmcFunctionARN
, esmcUUId
, esmcLastProcessingResult
, esmcBatchSize
, esmcStateTransitionReason
, esmcLastModified
, FunctionCode
, functionCode
, fcS3ObjectVersion
, fcS3Key
, fcZipFile
, fcS3Bucket
, FunctionCodeLocation
, functionCodeLocation
, fclLocation
, fclRepositoryType
, FunctionConfiguration
, functionConfiguration
, fcMemorySize
, fcRuntime
, fcFunctionARN
, fcRole
, fcVPCConfig
, fcVersion
, fcFunctionName
, fcCodeSize
, fcHandler
, fcTimeout
, fcLastModified
, fcCodeSha256
, fcDescription
, VPCConfig
, vpcConfig
, vpccSecurityGroupIds
, vpccSubnetIds
, VPCConfigResponse
, vpcConfigResponse
, vcSecurityGroupIds
, vcSubnetIds
, vcVPCId
) where
import Network.AWS.Lambda.Types.Product
import Network.AWS.Lambda.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
lambda :: Service
lambda =
Service
{ _svcAbbrev = "Lambda"
, _svcSigner = v4
, _svcPrefix = "lambda"
, _svcVersion = "2015-03-31"
, _svcEndpoint = defaultEndpoint lambda
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Lambda"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| 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 (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
_EC2ThrottledException :: AsError a => Getting (First ServiceError) a ServiceError
_EC2ThrottledException =
_ServiceError . hasStatus 502 . hasCode "EC2ThrottledException"
_PolicyLengthExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_PolicyLengthExceededException =
_ServiceError . hasStatus 400 . hasCode "PolicyLengthExceededException"
_EC2AccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError
_EC2AccessDeniedException =
_ServiceError . hasStatus 502 . hasCode "EC2AccessDeniedException"
_InvalidSubnetIdException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSubnetIdException =
_ServiceError . hasStatus 502 . hasCode "InvalidSubnetIDException"
_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"
_ENILimitReachedException :: AsError a => Getting (First ServiceError) a ServiceError
_ENILimitReachedException =
_ServiceError . hasStatus 502 . hasCode "ENILimitReachedException"
_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"
_InvalidSecurityGroupIdException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSecurityGroupIdException =
_ServiceError . hasStatus 502 . hasCode "InvalidSecurityGroupIDException"
_SubnetIPAddressLimitReachedException :: AsError a => Getting (First ServiceError) a ServiceError
_SubnetIPAddressLimitReachedException =
_ServiceError .
hasStatus 502 . hasCode "SubnetIPAddressLimitReachedException"
_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"
_InvalidZipFileException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidZipFileException =
_ServiceError . hasStatus 502 . hasCode "InvalidZipFileException"
_ResourceConflictException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceConflictException =
_ServiceError . hasStatus 409 . hasCode "ResourceConflictException"
_EC2UnexpectedException :: AsError a => Getting (First ServiceError) a ServiceError
_EC2UnexpectedException =
_ServiceError . hasStatus 502 . hasCode "EC2UnexpectedException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasStatus 404 . hasCode "ResourceNotFoundException"