{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Route53Domains.Types
(
route53Domains
, _InvalidInput
, _OperationLimitExceeded
, _DomainLimitExceeded
, _UnsupportedTLD
, _TLDRulesViolation
, _DuplicateRequest
, ContactType (..)
, CountryCode (..)
, DomainAvailability (..)
, ExtraParamName (..)
, OperationStatus (..)
, OperationType (..)
, ReachabilityStatus (..)
, BillingRecord
, billingRecord
, brOperation
, brInvoiceId
, brDomainName
, brBillDate
, brPrice
, ContactDetail
, contactDetail
, cdOrganizationName
, cdEmail
, cdState
, cdFax
, cdLastName
, cdExtraParams
, cdZipCode
, cdAddressLine1
, cdCity
, cdPhoneNumber
, cdAddressLine2
, cdFirstName
, cdCountryCode
, cdContactType
, DomainSuggestion
, domainSuggestion
, dAvailability
, dDomainName
, DomainSummary
, domainSummary
, dsExpiry
, dsTransferLock
, dsAutoRenew
, dsDomainName
, ExtraParam
, extraParam
, epName
, epValue
, Nameserver
, nameserver
, nGlueIPs
, nName
, OperationSummary
, operationSummary
, osOperationId
, osStatus
, osType
, osSubmittedDate
, Tag
, tag
, tagValue
, tagKey
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Route53Domains.Types.Product
import Network.AWS.Route53Domains.Types.Sum
import Network.AWS.Sign.V4
route53Domains :: Service
route53Domains =
Service
{ _svcAbbrev = "Route53Domains"
, _svcSigner = v4
, _svcPrefix = "route53domains"
, _svcVersion = "2014-05-15"
, _svcEndpoint = defaultEndpoint route53Domains
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Route53Domains"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| 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
_InvalidInput :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidInput = _ServiceError . hasCode "InvalidInput"
_OperationLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_OperationLimitExceeded = _ServiceError . hasCode "OperationLimitExceeded"
_DomainLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_DomainLimitExceeded = _ServiceError . hasCode "DomainLimitExceeded"
_UnsupportedTLD :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedTLD = _ServiceError . hasCode "UnsupportedTLD"
_TLDRulesViolation :: AsError a => Getting (First ServiceError) a ServiceError
_TLDRulesViolation = _ServiceError . hasCode "TLDRulesViolation"
_DuplicateRequest :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateRequest = _ServiceError . hasCode "DuplicateRequest"