{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.SMS.Types
(
sms
, _ReplicationRunLimitExceededException
, _InvalidParameterException
, _NoConnectorsAvailableException
, _ReplicationJobNotFoundException
, _ServerCannotBeReplicatedException
, _InternalError
, _ReplicationJobAlreadyExistsException
, _OperationNotPermittedException
, _MissingRequiredParameterException
, _UnauthorizedOperationException
, ConnectorCapability (..)
, ConnectorStatus (..)
, LicenseType (..)
, ReplicationJobState (..)
, ReplicationRunState (..)
, ReplicationRunType (..)
, ServerCatalogStatus (..)
, ServerType (..)
, VMManagerType (..)
, Connector
, connector
, cStatus
, cVmManagerName
, cIpAddress
, cVmManagerId
, cVmManagerType
, cConnectorId
, cAssociatedOn
, cMacAddress
, cVersion
, cCapabilityList
, ReplicationJob
, replicationJob
, rjFrequency
, rjState
, rjServerType
, rjServerId
, rjLicenseType
, rjRoleName
, rjVmServer
, rjReplicationJobId
, rjReplicationRunList
, rjNextReplicationRunStartTime
, rjStatusMessage
, rjLatestAMIId
, rjSeedReplicationTime
, rjDescription
, ReplicationRun
, replicationRun
, rrState
, rrReplicationRunId
, rrScheduledStartTime
, rrStatusMessage
, rrCompletedTime
, rrAmiId
, rrType
, rrDescription
, Server
, server
, sServerType
, sServerId
, sReplicationJobTerminated
, sVmServer
, sReplicationJobId
, VMServer
, vMServer
, vmsVmManagerName
, vmsVmManagerType
, vmsVmServerAddress
, vmsVmName
, vmsVmPath
, VMServerAddress
, vMServerAddress
, vmsaVmManagerId
, vmsaVmId
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.SMS.Types.Product
import Network.AWS.SMS.Types.Sum
sms :: Service
sms =
Service
{ _svcAbbrev = "SMS"
, _svcSigner = v4
, _svcPrefix = "sms"
, _svcVersion = "2016-10-24"
, _svcEndpoint = defaultEndpoint sms
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "SMS"
, _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
_ReplicationRunLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_ReplicationRunLimitExceededException =
_ServiceError . hasCode "ReplicationRunLimitExceededException"
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_ServiceError . hasCode "InvalidParameterException"
_NoConnectorsAvailableException :: AsError a => Getting (First ServiceError) a ServiceError
_NoConnectorsAvailableException =
_ServiceError . hasCode "NoConnectorsAvailableException"
_ReplicationJobNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ReplicationJobNotFoundException =
_ServiceError . hasCode "ReplicationJobNotFoundException"
_ServerCannotBeReplicatedException :: AsError a => Getting (First ServiceError) a ServiceError
_ServerCannotBeReplicatedException =
_ServiceError . hasCode "ServerCannotBeReplicatedException"
_InternalError :: AsError a => Getting (First ServiceError) a ServiceError
_InternalError = _ServiceError . hasCode "InternalError"
_ReplicationJobAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ReplicationJobAlreadyExistsException =
_ServiceError . hasCode "ReplicationJobAlreadyExistsException"
_OperationNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError
_OperationNotPermittedException =
_ServiceError . hasCode "OperationNotPermittedException"
_MissingRequiredParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_MissingRequiredParameterException =
_ServiceError . hasCode "MissingRequiredParameterException"
_UnauthorizedOperationException :: AsError a => Getting (First ServiceError) a ServiceError
_UnauthorizedOperationException =
_ServiceError . hasCode "UnauthorizedOperationException"