{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.WorkMail.Types
(
workMail
, _DirectoryUnavailableException
, _InvalidParameterException
, _UnsupportedOperationException
, _DirectoryServiceAuthenticationFailedException
, _OrganizationStateException
, _EntityStateException
, _InvalidConfigurationException
, _MailDomainStateException
, _ReservedNameException
, _OrganizationNotFoundException
, _EntityNotFoundException
, _EntityAlreadyRegisteredException
, _MailDomainNotFoundException
, _EmailAddressInUseException
, _NameAvailabilityException
, _InvalidPasswordException
, EntityState (..)
, MemberType (..)
, PermissionType (..)
, ResourceType (..)
, UserRole (..)
, BookingOptions
, bookingOptions
, boAutoDeclineConflictingRequests
, boAutoDeclineRecurringRequests
, boAutoAcceptRequests
, Delegate
, delegate
, dId
, dType
, Group
, group'
, gEmail
, gState
, gDisabledDate
, gName
, gId
, gEnabledDate
, Member
, member
, mState
, mDisabledDate
, mName
, mId
, mType
, mEnabledDate
, OrganizationSummary
, organizationSummary
, osState
, osAlias
, osErrorMessage
, osOrganizationId
, Permission
, permission
, pGranteeId
, pGranteeType
, pPermissionValues
, Resource
, resource
, rEmail
, rState
, rDisabledDate
, rName
, rId
, rType
, rEnabledDate
, User
, user
, uEmail
, uState
, uDisabledDate
, uName
, uId
, uDisplayName
, uUserRole
, uEnabledDate
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.WorkMail.Types.Product
import Network.AWS.WorkMail.Types.Sum
workMail :: Service
workMail =
Service
{ _svcAbbrev = "WorkMail"
, _svcSigner = v4
, _svcPrefix = "workmail"
, _svcVersion = "2017-10-01"
, _svcEndpoint = defaultEndpoint workMail
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "WorkMail"
, _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
_DirectoryUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_DirectoryUnavailableException =
_MatchServiceError workMail "DirectoryUnavailableException"
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_MatchServiceError workMail "InvalidParameterException"
_UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedOperationException =
_MatchServiceError workMail "UnsupportedOperationException"
_DirectoryServiceAuthenticationFailedException :: AsError a => Getting (First ServiceError) a ServiceError
_DirectoryServiceAuthenticationFailedException =
_MatchServiceError workMail "DirectoryServiceAuthenticationFailedException"
_OrganizationStateException :: AsError a => Getting (First ServiceError) a ServiceError
_OrganizationStateException =
_MatchServiceError workMail "OrganizationStateException"
_EntityStateException :: AsError a => Getting (First ServiceError) a ServiceError
_EntityStateException = _MatchServiceError workMail "EntityStateException"
_InvalidConfigurationException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidConfigurationException =
_MatchServiceError workMail "InvalidConfigurationException"
_MailDomainStateException :: AsError a => Getting (First ServiceError) a ServiceError
_MailDomainStateException =
_MatchServiceError workMail "MailDomainStateException"
_ReservedNameException :: AsError a => Getting (First ServiceError) a ServiceError
_ReservedNameException = _MatchServiceError workMail "ReservedNameException"
_OrganizationNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_OrganizationNotFoundException =
_MatchServiceError workMail "OrganizationNotFoundException"
_EntityNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_EntityNotFoundException = _MatchServiceError workMail "EntityNotFoundException"
_EntityAlreadyRegisteredException :: AsError a => Getting (First ServiceError) a ServiceError
_EntityAlreadyRegisteredException =
_MatchServiceError workMail "EntityAlreadyRegisteredException"
_MailDomainNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_MailDomainNotFoundException =
_MatchServiceError workMail "MailDomainNotFoundException"
_EmailAddressInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_EmailAddressInUseException =
_MatchServiceError workMail "EmailAddressInUseException"
_NameAvailabilityException :: AsError a => Getting (First ServiceError) a ServiceError
_NameAvailabilityException =
_MatchServiceError workMail "NameAvailabilityException"
_InvalidPasswordException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidPasswordException =
_MatchServiceError workMail "InvalidPasswordException"