module Network.AWS.SNS.Types
(
sNS
, _EndpointDisabledException
, _AuthorizationErrorException
, _InvalidParameterException
, _SubscriptionLimitExceededException
, _PlatformApplicationDisabledException
, _InternalErrorException
, _InvalidParameterValueException
, _NotFoundException
, _TopicLimitExceededException
, Endpoint
, endpoint
, eAttributes
, eEndpointARN
, MessageAttributeValue
, messageAttributeValue
, mavBinaryValue
, mavStringValue
, mavDataType
, PlatformApplication
, platformApplication
, paPlatformApplicationARN
, paAttributes
, Subscription
, subscription
, sProtocol
, sOwner
, sTopicARN
, sEndpoint
, sSubscriptionARN
, Topic
, topic
, tTopicARN
) where
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.SNS.Types.Product
import Network.AWS.SNS.Types.Sum
sNS :: Service
sNS =
Service
{ _svcAbbrev = "SNS"
, _svcSigner = v4
, _svcPrefix = "sns"
, _svcVersion = "2010-03-31"
, _svcEndpoint = defaultEndpoint sNS
, _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
_EndpointDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
_EndpointDisabledException =
_ServiceError . hasStatus 400 . hasCode "EndpointDisabled"
_AuthorizationErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_AuthorizationErrorException =
_ServiceError . hasStatus 403 . hasCode "AuthorizationError"
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_ServiceError . hasStatus 400 . hasCode "InvalidParameter"
_SubscriptionLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_SubscriptionLimitExceededException =
_ServiceError . hasStatus 403 . hasCode "SubscriptionLimitExceeded"
_PlatformApplicationDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
_PlatformApplicationDisabledException =
_ServiceError . hasStatus 400 . hasCode "PlatformApplicationDisabled"
_InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalErrorException =
_ServiceError . hasStatus 500 . hasCode "InternalError"
_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterValueException =
_ServiceError . hasStatus 400 . hasCode "ParameterValueInvalid"
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_NotFoundException = _ServiceError . hasStatus 404 . hasCode "NotFound"
_TopicLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_TopicLimitExceededException =
_ServiceError . hasStatus 403 . hasCode "TopicLimitExceeded"