{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Discovery.Types
(
discovery
, _AuthorizationErrorException
, _InvalidParameterException
, _InvalidParameterValueException
, _ServerInternalErrorException
, _OperationNotPermittedException
, _ResourceNotFoundException
, AgentStatus (..)
, ConfigurationItemType (..)
, ExportDataFormat (..)
, ExportStatus (..)
, OrderString (..)
, AgentConfigurationStatus
, agentConfigurationStatus
, acsAgentId
, acsOperationSucceeded
, acsDescription
, AgentInfo
, agentInfo
, aiHostName
, aiLastHealthPingTime
, aiAgentNetworkInfoList
, aiConnectorId
, aiHealth
, aiAgentId
, aiVersion
, aiCollectionStatus
, aiRegisteredTime
, aiAgentType
, AgentNetworkInfo
, agentNetworkInfo
, aniIpAddress
, aniMacAddress
, ConfigurationTag
, configurationTag
, ctTimeOfCreation
, ctConfigurationId
, ctConfigurationType
, ctValue
, ctKey
, CustomerAgentInfo
, customerAgentInfo
, caiActiveAgents
, caiHealthyAgents
, caiBlackListedAgents
, caiShutdownAgents
, caiUnhealthyAgents
, caiTotalAgents
, caiUnknownAgents
, CustomerConnectorInfo
, customerConnectorInfo
, cciActiveConnectors
, cciHealthyConnectors
, cciBlackListedConnectors
, cciShutdownConnectors
, cciUnhealthyConnectors
, cciTotalConnectors
, cciUnknownConnectors
, ExportFilter
, exportFilter
, efName
, efValues
, efCondition
, ExportInfo
, exportInfo
, eiConfigurationsDownloadURL
, eiRequestedStartTime
, eiRequestedEndTime
, eiIsTruncated
, eiExportId
, eiExportStatus
, eiStatusMessage
, eiExportRequestTime
, Filter
, filter'
, fName
, fValues
, fCondition
, NeighborConnectionDetail
, neighborConnectionDetail
, ncdTransportProtocol
, ncdDestinationPort
, ncdSourceServerId
, ncdDestinationServerId
, ncdConnectionsCount
, OrderByElement
, orderByElement
, obeSortOrder
, obeFieldName
, 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 (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
_AuthorizationErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_AuthorizationErrorException =
_MatchServiceError discovery "AuthorizationErrorException"
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_MatchServiceError discovery "InvalidParameterException"
_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterValueException =
_MatchServiceError discovery "InvalidParameterValueException"
_ServerInternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_ServerInternalErrorException =
_MatchServiceError discovery "ServerInternalErrorException"
_OperationNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError
_OperationNotPermittedException =
_MatchServiceError discovery "OperationNotPermittedException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_MatchServiceError discovery "ResourceNotFoundException"