module Network.AWS.CloudSearchDomains.Types
(
cloudSearchDomains
, _DocumentServiceException
, _SearchException
, ContentType (..)
, QueryParser (..)
, Bucket
, bucket
, bValue
, bCount
, BucketInfo
, bucketInfo
, biBuckets
, DocumentServiceWarning
, documentServiceWarning
, dswMessage
, Hit
, hit
, hitExprs
, hitId
, hitHighlights
, hitFields
, Hits
, hits
, hCursor
, hHit
, hStart
, hFound
, SearchStatus
, searchStatus
, sRid
, sTimems
, SuggestModel
, suggestModel
, smFound
, smSuggestions
, smQuery
, SuggestStatus
, suggestStatus
, ssRid
, ssTimems
, SuggestionMatch
, suggestionMatch
, smSuggestion
, smScore
, smId
) where
import Network.AWS.CloudSearchDomains.Types.Product
import Network.AWS.CloudSearchDomains.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
cloudSearchDomains :: Service
cloudSearchDomains =
Service
{ _svcAbbrev = "CloudSearchDomains"
, _svcSigner = v4
, _svcPrefix = "cloudsearchdomain"
, _svcVersion = "2013-01-01"
, _svcEndpoint = defaultEndpoint cloudSearchDomains
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError
, _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
_DocumentServiceException :: AsError a => Getting (First ServiceError) a ServiceError
_DocumentServiceException = _ServiceError . hasCode "DocumentServiceException"
_SearchException :: AsError a => Getting (First ServiceError) a ServiceError
_SearchException = _ServiceError . hasCode "SearchException"