{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Discovery.Types
(
discovery
, _AuthorizationErrorException
, _InvalidParameterException
, _InvalidParameterValueException
, _ServerInternalErrorException
, _OperationNotPermittedException
, _ResourceNotFoundException
, AgentStatus (..)
, ConfigurationItemType (..)
, ExportStatus (..)
, AgentConfigurationStatus
, agentConfigurationStatus
, acsAgentId
, acsOperationSucceeded
, acsDescription
, AgentInfo
, agentInfo
, aiHostName
, aiAgentNetworkInfoList
, aiConnectorId
, aiHealth
, aiAgentId
, aiVersion
, AgentNetworkInfo
, agentNetworkInfo
, aniIpAddress
, aniMacAddress
, ConfigurationTag
, configurationTag
, ctTimeOfCreation
, ctConfigurationId
, ctConfigurationType
, ctValue
, ctKey
, ExportInfo
, exportInfo
, eiConfigurationsDownloadURL
, eiExportId
, eiExportStatus
, eiStatusMessage
, eiExportRequestTime
, Filter
, filter'
, fName
, fValues
, fCondition
, Tag
, tag
, tagKey
, tagValue
, TagFilter
, tagFilter
, tfName
, tfValues
) where
import Network.AWS.Discovery.Types.Product
import Network.AWS.Discovery.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
discovery :: Service
discovery =
Service
{ _svcAbbrev = "Discovery"
, _svcSigner = v4
, _svcPrefix = "discovery"
, _svcVersion = "2015-11-01"
, _svcEndpoint = defaultEndpoint discovery
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Discovery"
, _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
_AuthorizationErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_AuthorizationErrorException =
_ServiceError . hasCode "AuthorizationErrorException"
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_ServiceError . hasCode "InvalidParameterException"
_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterValueException =
_ServiceError . hasCode "InvalidParameterValueException"
_ServerInternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_ServerInternalErrorException =
_ServiceError . hasCode "ServerInternalErrorException"
_OperationNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError
_OperationNotPermittedException =
_ServiceError . hasCode "OperationNotPermittedException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasCode "ResourceNotFoundException"