module Network.AWS.MarketplaceEntitlement.Types
(
marketplaceEntitlement
, _InvalidParameterException
, _ThrottlingException
, _InternalServiceErrorException
, GetEntitlementFilterName (..)
, Entitlement
, entitlement
, eDimension
, eValue
, eExpirationDate
, eCustomerIdentifier
, eProductCode
, EntitlementValue
, entitlementValue
, evIntegerValue
, evDoubleValue
, evStringValue
, evBooleanValue
) where
import Network.AWS.Lens
import Network.AWS.MarketplaceEntitlement.Types.Product
import Network.AWS.MarketplaceEntitlement.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
marketplaceEntitlement :: Service
marketplaceEntitlement =
Service
{ _svcAbbrev = "MarketplaceEntitlement"
, _svcSigner = v4
, _svcPrefix = "entitlement.marketplace"
, _svcVersion = "2017-01-11"
, _svcEndpoint = defaultEndpoint marketplaceEntitlement
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "MarketplaceEntitlement"
, _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
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_MatchServiceError marketplaceEntitlement "InvalidParameterException"
_ThrottlingException :: AsError a => Getting (First ServiceError) a ServiceError
_ThrottlingException =
_MatchServiceError marketplaceEntitlement "ThrottlingException"
_InternalServiceErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalServiceErrorException =
_MatchServiceError marketplaceEntitlement "InternalServiceErrorException"