{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MQ.Types
(
defaultService,
_BadRequestException,
_ConflictException,
_ForbiddenException,
_InternalServerErrorException,
_NotFoundException,
_UnauthorizedException,
AuthenticationStrategy (..),
BrokerState (..),
BrokerStorageType (..),
ChangeType (..),
DayOfWeek (..),
DeploymentMode (..),
EngineType (..),
SanitizationWarningReason (..),
ActionRequired (..),
newActionRequired,
actionRequired_actionRequiredCode,
actionRequired_actionRequiredInfo,
AvailabilityZone (..),
newAvailabilityZone,
availabilityZone_name,
BrokerEngineType (..),
newBrokerEngineType,
brokerEngineType_engineType,
brokerEngineType_engineVersions,
BrokerInstance (..),
newBrokerInstance,
brokerInstance_consoleURL,
brokerInstance_endpoints,
brokerInstance_ipAddress,
BrokerInstanceOption (..),
newBrokerInstanceOption,
brokerInstanceOption_availabilityZones,
brokerInstanceOption_engineType,
brokerInstanceOption_hostInstanceType,
brokerInstanceOption_storageType,
brokerInstanceOption_supportedDeploymentModes,
brokerInstanceOption_supportedEngineVersions,
BrokerSummary (..),
newBrokerSummary,
brokerSummary_brokerArn,
brokerSummary_brokerId,
brokerSummary_brokerName,
brokerSummary_brokerState,
brokerSummary_created,
brokerSummary_hostInstanceType,
brokerSummary_deploymentMode,
brokerSummary_engineType,
Configuration (..),
newConfiguration,
configuration_tags,
configuration_description,
configuration_engineVersion,
configuration_latestRevision,
configuration_authenticationStrategy,
configuration_engineType,
configuration_id,
configuration_arn,
configuration_name,
configuration_created,
ConfigurationId (..),
newConfigurationId,
configurationId_revision,
configurationId_id,
ConfigurationRevision (..),
newConfigurationRevision,
configurationRevision_description,
configurationRevision_revision,
configurationRevision_created,
Configurations (..),
newConfigurations,
configurations_current,
configurations_history,
configurations_pending,
EncryptionOptions (..),
newEncryptionOptions,
encryptionOptions_kmsKeyId,
encryptionOptions_useAwsOwnedKey,
EngineVersion (..),
newEngineVersion,
engineVersion_name,
LdapServerMetadataInput (..),
newLdapServerMetadataInput,
ldapServerMetadataInput_roleName,
ldapServerMetadataInput_roleSearchSubtree,
ldapServerMetadataInput_userRoleName,
ldapServerMetadataInput_userSearchSubtree,
ldapServerMetadataInput_hosts,
ldapServerMetadataInput_userSearchMatching,
ldapServerMetadataInput_userBase,
ldapServerMetadataInput_roleSearchMatching,
ldapServerMetadataInput_serviceAccountUsername,
ldapServerMetadataInput_roleBase,
ldapServerMetadataInput_serviceAccountPassword,
LdapServerMetadataOutput (..),
newLdapServerMetadataOutput,
ldapServerMetadataOutput_roleName,
ldapServerMetadataOutput_roleSearchSubtree,
ldapServerMetadataOutput_userRoleName,
ldapServerMetadataOutput_userSearchSubtree,
ldapServerMetadataOutput_hosts,
ldapServerMetadataOutput_userSearchMatching,
ldapServerMetadataOutput_userBase,
ldapServerMetadataOutput_roleSearchMatching,
ldapServerMetadataOutput_serviceAccountUsername,
ldapServerMetadataOutput_roleBase,
Logs (..),
newLogs,
logs_audit,
logs_general,
LogsSummary (..),
newLogsSummary,
logsSummary_audit,
logsSummary_auditLogGroup,
logsSummary_pending,
logsSummary_generalLogGroup,
logsSummary_general,
PendingLogs (..),
newPendingLogs,
pendingLogs_audit,
pendingLogs_general,
SanitizationWarning (..),
newSanitizationWarning,
sanitizationWarning_attributeName,
sanitizationWarning_elementName,
sanitizationWarning_reason,
User (..),
newUser,
user_consoleAccess,
user_groups,
user_username,
user_password,
UserPendingChanges (..),
newUserPendingChanges,
userPendingChanges_consoleAccess,
userPendingChanges_groups,
userPendingChanges_pendingChange,
UserSummary (..),
newUserSummary,
userSummary_pendingChange,
userSummary_username,
WeeklyStartTime (..),
newWeeklyStartTime,
weeklyStartTime_timeZone,
weeklyStartTime_timeOfDay,
weeklyStartTime_dayOfWeek,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.MQ.Types.ActionRequired
import Amazonka.MQ.Types.AuthenticationStrategy
import Amazonka.MQ.Types.AvailabilityZone
import Amazonka.MQ.Types.BrokerEngineType
import Amazonka.MQ.Types.BrokerInstance
import Amazonka.MQ.Types.BrokerInstanceOption
import Amazonka.MQ.Types.BrokerState
import Amazonka.MQ.Types.BrokerStorageType
import Amazonka.MQ.Types.BrokerSummary
import Amazonka.MQ.Types.ChangeType
import Amazonka.MQ.Types.Configuration
import Amazonka.MQ.Types.ConfigurationId
import Amazonka.MQ.Types.ConfigurationRevision
import Amazonka.MQ.Types.Configurations
import Amazonka.MQ.Types.DayOfWeek
import Amazonka.MQ.Types.DeploymentMode
import Amazonka.MQ.Types.EncryptionOptions
import Amazonka.MQ.Types.EngineType
import Amazonka.MQ.Types.EngineVersion
import Amazonka.MQ.Types.LdapServerMetadataInput
import Amazonka.MQ.Types.LdapServerMetadataOutput
import Amazonka.MQ.Types.Logs
import Amazonka.MQ.Types.LogsSummary
import Amazonka.MQ.Types.PendingLogs
import Amazonka.MQ.Types.SanitizationWarning
import Amazonka.MQ.Types.SanitizationWarningReason
import Amazonka.MQ.Types.User
import Amazonka.MQ.Types.UserPendingChanges
import Amazonka.MQ.Types.UserSummary
import Amazonka.MQ.Types.WeeklyStartTime
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"MQ",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"mq",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"mq",
$sel:version:Service :: ByteString
Core.version = ByteString
"2017-11-27",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"MQ",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_BadRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_BadRequestException :: forall a. AsError a => Fold a ServiceError
_BadRequestException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"BadRequestException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409
_ForbiddenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ForbiddenException :: forall a. AsError a => Fold a ServiceError
_ForbiddenException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ForbiddenException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
403
_InternalServerErrorException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerErrorException :: forall a. AsError a => Fold a ServiceError
_InternalServerErrorException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerErrorException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500
_NotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_NotFoundException :: forall a. AsError a => Fold a ServiceError
_NotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"NotFoundException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
404
_UnauthorizedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnauthorizedException :: forall a. AsError a => Fold a ServiceError
_UnauthorizedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnauthorizedException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
401