{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Route53AutoNaming.Types
(
route53AutoNaming
, _ResourceLimitExceeded
, _InvalidInput
, _NamespaceAlreadyExists
, _NamespaceNotFound
, _ServiceAlreadyExists
, _ResourceInUse
, _CustomHealthNotFound
, _InstanceNotFound
, _DuplicateRequest
, _ServiceNotFound
, _OperationNotFound
, CustomHealthStatus (..)
, FilterCondition (..)
, HealthCheckType (..)
, HealthStatus (..)
, NamespaceFilterName (..)
, NamespaceType (..)
, OperationFilterName (..)
, OperationStatus (..)
, OperationTargetType (..)
, OperationType (..)
, RecordType (..)
, RoutingPolicy (..)
, ServiceFilterName (..)
, DNSConfig
, dnsConfig
, dcRoutingPolicy
, dcNamespaceId
, dcDNSRecords
, DNSConfigChange
, dnsConfigChange
, dccDNSRecords
, DNSProperties
, dnsProperties
, dpHostedZoneId
, DNSRecord
, dnsRecord
, drType
, drTTL
, HealthCheckConfig
, healthCheckConfig
, hccFailureThreshold
, hccResourcePath
, hccType
, HealthCheckCustomConfig
, healthCheckCustomConfig
, hcccFailureThreshold
, Instance
, instance'
, iCreatorRequestId
, iAttributes
, iId
, InstanceSummary
, instanceSummary
, isAttributes
, isId
, Namespace
, namespace
, nARN
, nCreatorRequestId
, nCreateDate
, nServiceCount
, nName
, nId
, nType
, nDescription
, nProperties
, NamespaceFilter
, namespaceFilter
, nfCondition
, nfName
, nfValues
, NamespaceProperties
, namespaceProperties
, npDNSProperties
, NamespaceSummary
, namespaceSummary
, nsARN
, nsName
, nsId
, nsType
, Operation
, operation
, oStatus
, oUpdateDate
, oCreateDate
, oTargets
, oErrorCode
, oId
, oType
, oErrorMessage
, OperationFilter
, operationFilter
, ofCondition
, ofName
, ofValues
, OperationSummary
, operationSummary
, osStatus
, osId
, ServiceChange
, serviceChange
, scHealthCheckConfig
, scDescription
, scDNSConfig
, ServiceFilter
, serviceFilter
, sfCondition
, sfName
, sfValues
, ServiceInfo
, serviceInfo
, siInstanceCount
, siARN
, siHealthCheckConfig
, siCreatorRequestId
, siCreateDate
, siHealthCheckCustomConfig
, siName
, siId
, siDNSConfig
, siDescription
, ServiceSummary
, serviceSummary
, ssInstanceCount
, ssARN
, ssName
, ssId
, ssDescription
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Route53AutoNaming.Types.Product
import Network.AWS.Route53AutoNaming.Types.Sum
import Network.AWS.Sign.V4
route53AutoNaming :: Service
route53AutoNaming =
Service
{ _svcAbbrev = "Route53AutoNaming"
, _svcSigner = v4
, _svcPrefix = "servicediscovery"
, _svcVersion = "2017-03-14"
, _svcEndpoint = defaultEndpoint route53AutoNaming
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Route53AutoNaming"
, _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 (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| 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
_ResourceLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceLimitExceeded =
_MatchServiceError route53AutoNaming "ResourceLimitExceeded"
_InvalidInput :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidInput = _MatchServiceError route53AutoNaming "InvalidInput"
_NamespaceAlreadyExists :: AsError a => Getting (First ServiceError) a ServiceError
_NamespaceAlreadyExists =
_MatchServiceError route53AutoNaming "NamespaceAlreadyExists"
_NamespaceNotFound :: AsError a => Getting (First ServiceError) a ServiceError
_NamespaceNotFound = _MatchServiceError route53AutoNaming "NamespaceNotFound"
_ServiceAlreadyExists :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceAlreadyExists =
_MatchServiceError route53AutoNaming "ServiceAlreadyExists"
_ResourceInUse :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUse = _MatchServiceError route53AutoNaming "ResourceInUse"
_CustomHealthNotFound :: AsError a => Getting (First ServiceError) a ServiceError
_CustomHealthNotFound =
_MatchServiceError route53AutoNaming "CustomHealthNotFound"
_InstanceNotFound :: AsError a => Getting (First ServiceError) a ServiceError
_InstanceNotFound = _MatchServiceError route53AutoNaming "InstanceNotFound"
_DuplicateRequest :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateRequest = _MatchServiceError route53AutoNaming "DuplicateRequest"
_ServiceNotFound :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceNotFound = _MatchServiceError route53AutoNaming "ServiceNotFound"
_OperationNotFound :: AsError a => Getting (First ServiceError) a ServiceError
_OperationNotFound = _MatchServiceError route53AutoNaming "OperationNotFound"