module Network.AWS.Lambda.Types
(
lambda
, _KMSInvalidStateException
, _EC2ThrottledException
, _InvalidRuntimeException
, _PolicyLengthExceededException
, _EC2AccessDeniedException
, _InvalidSubnetIdException
, _UnsupportedMediaTypeException
, _InvalidRequestContentException
, _KMSNotFoundException
, _ENILimitReachedException
, _InvalidParameterValueException
, _RequestTooLargeException
, _TooManyRequestsException
, _InvalidSecurityGroupIdException
, _KMSDisabledException
, _SubnetIPAddressLimitReachedException
, _ServiceException
, _CodeStorageExceededException
, _InvalidZipFileException
, _ResourceConflictException
, _EC2UnexpectedException
, _ResourceNotFoundException
, _KMSAccessDeniedException
, EventSourcePosition (..)
, FunctionVersion (..)
, InvocationType (..)
, LogType (..)
, Runtime (..)
, TracingMode (..)
, AccountLimit
, accountLimit
, alConcurrentExecutions
, alTotalCodeSize
, alCodeSizeUnzipped
, alCodeSizeZipped
, AccountUsage
, accountUsage
, auTotalCodeSize
, auFunctionCount
, AliasConfiguration
, aliasConfiguration
, acName
, acFunctionVersion
, acAliasARN
, acDescription
, DeadLetterConfig
, deadLetterConfig
, dlcTargetARN
, Environment
, environment
, eVariables
, EnvironmentError
, environmentError
, eeErrorCode
, eeMessage
, EnvironmentResponse
, environmentResponse
, envVariables
, envError
, 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
, fcKMSKeyARN
, fcEnvironment
, fcDeadLetterConfig
, fcRole
, fcVPCConfig
, fcVersion
, fcFunctionName
, fcCodeSize
, fcHandler
, fcTimeout
, fcLastModified
, fcCodeSha256
, fcTracingConfig
, fcDescription
, fcMasterARN
, TracingConfig
, tracingConfig
, tMode
, TracingConfigResponse
, tracingConfigResponse
, tcMode
, 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 (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 (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
_KMSInvalidStateException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSInvalidStateException =
_MatchServiceError lambda "KMSInvalidStateException" . hasStatus 502
_EC2ThrottledException :: AsError a => Getting (First ServiceError) a ServiceError
_EC2ThrottledException =
_MatchServiceError lambda "EC2ThrottledException" . hasStatus 502
_InvalidRuntimeException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidRuntimeException =
_MatchServiceError lambda "InvalidRuntimeException" . hasStatus 502
_PolicyLengthExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_PolicyLengthExceededException =
_MatchServiceError lambda "PolicyLengthExceededException" . hasStatus 400
_EC2AccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError
_EC2AccessDeniedException =
_MatchServiceError lambda "EC2AccessDeniedException" . hasStatus 502
_InvalidSubnetIdException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSubnetIdException =
_MatchServiceError lambda "InvalidSubnetIDException" . hasStatus 502
_UnsupportedMediaTypeException :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedMediaTypeException =
_MatchServiceError lambda "UnsupportedMediaTypeException" . hasStatus 415
_InvalidRequestContentException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidRequestContentException =
_MatchServiceError lambda "InvalidRequestContentException" . hasStatus 400
_KMSNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSNotFoundException =
_MatchServiceError lambda "KMSNotFoundException" . hasStatus 502
_ENILimitReachedException :: AsError a => Getting (First ServiceError) a ServiceError
_ENILimitReachedException =
_MatchServiceError lambda "ENILimitReachedException" . hasStatus 502
_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterValueException =
_MatchServiceError lambda "InvalidParameterValueException" . hasStatus 400
_RequestTooLargeException :: AsError a => Getting (First ServiceError) a ServiceError
_RequestTooLargeException =
_MatchServiceError lambda "RequestTooLargeException" . hasStatus 413
_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyRequestsException =
_MatchServiceError lambda "TooManyRequestsException" . hasStatus 429
_InvalidSecurityGroupIdException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSecurityGroupIdException =
_MatchServiceError lambda "InvalidSecurityGroupIDException" . hasStatus 502
_KMSDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSDisabledException =
_MatchServiceError lambda "KMSDisabledException" . hasStatus 502
_SubnetIPAddressLimitReachedException :: AsError a => Getting (First ServiceError) a ServiceError
_SubnetIPAddressLimitReachedException =
_MatchServiceError lambda "SubnetIPAddressLimitReachedException" .
hasStatus 502
_ServiceException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceException = _MatchServiceError lambda "ServiceException" . hasStatus 500
_CodeStorageExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_CodeStorageExceededException =
_MatchServiceError lambda "CodeStorageExceededException" . hasStatus 400
_InvalidZipFileException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidZipFileException =
_MatchServiceError lambda "InvalidZipFileException" . hasStatus 502
_ResourceConflictException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceConflictException =
_MatchServiceError lambda "ResourceConflictException" . hasStatus 409
_EC2UnexpectedException :: AsError a => Getting (First ServiceError) a ServiceError
_EC2UnexpectedException =
_MatchServiceError lambda "EC2UnexpectedException" . hasStatus 502
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_MatchServiceError lambda "ResourceNotFoundException" . hasStatus 404
_KMSAccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSAccessDeniedException =
_MatchServiceError lambda "KMSAccessDeniedException" . hasStatus 502