module Network.AWS.SES.Types
(
sES
, _MessageRejected
, _InvalidPolicyException
, IdentityType (..)
, NotificationType (..)
, VerificationStatus (..)
, Body
, body
, bText
, bHTML
, Content
, content
, cCharset
, cData
, Destination
, destination
, dBCCAddresses
, dCCAddresses
, dToAddresses
, IdentityDkimAttributes
, identityDkimAttributes
, idaDkimTokens
, idaDkimEnabled
, idaDkimVerificationStatus
, IdentityNotificationAttributes
, identityNotificationAttributes
, inaBounceTopic
, inaComplaintTopic
, inaDeliveryTopic
, inaForwardingEnabled
, IdentityVerificationAttributes
, identityVerificationAttributes
, ivaVerificationToken
, ivaVerificationStatus
, Message
, message
, mSubject
, mBody
, RawMessage
, rawMessage
, rmData
, SendDataPoint
, sendDataPoint
, sdpRejects
, sdpComplaints
, sdpDeliveryAttempts
, sdpBounces
, sdpTimestamp
) where
import Network.AWS.Prelude
import Network.AWS.SES.Types.Product
import Network.AWS.SES.Types.Sum
import Network.AWS.Sign.V4
sES :: Service
sES =
Service
{ _svcAbbrev = "SES"
, _svcSigner = v4
, _svcPrefix = "email"
, _svcVersion = "2010-12-01"
, _svcEndpoint = defaultEndpoint sES
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseXMLError
, _svcRetry = retry
}
where
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
_MessageRejected :: AsError a => Getting (First ServiceError) a ServiceError
_MessageRejected = _ServiceError . hasStatus 400 . hasCode "MessageRejected"
_InvalidPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidPolicyException =
_ServiceError . hasStatus 400 . hasCode "InvalidPolicy"