{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DMS.ModifyReplicationInstance
(
ModifyReplicationInstance (..),
newModifyReplicationInstance,
modifyReplicationInstance_engineVersion,
modifyReplicationInstance_autoMinorVersionUpgrade,
modifyReplicationInstance_allowMajorVersionUpgrade,
modifyReplicationInstance_preferredMaintenanceWindow,
modifyReplicationInstance_vpcSecurityGroupIds,
modifyReplicationInstance_multiAZ,
modifyReplicationInstance_allocatedStorage,
modifyReplicationInstance_applyImmediately,
modifyReplicationInstance_replicationInstanceClass,
modifyReplicationInstance_replicationInstanceIdentifier,
modifyReplicationInstance_replicationInstanceArn,
ModifyReplicationInstanceResponse (..),
newModifyReplicationInstanceResponse,
modifyReplicationInstanceResponse_replicationInstance,
modifyReplicationInstanceResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DMS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ModifyReplicationInstance = ModifyReplicationInstance'
{
ModifyReplicationInstance -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
ModifyReplicationInstance -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
ModifyReplicationInstance -> Maybe Bool
allowMajorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
ModifyReplicationInstance -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
ModifyReplicationInstance -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
ModifyReplicationInstance -> Maybe Bool
multiAZ :: Prelude.Maybe Prelude.Bool,
ModifyReplicationInstance -> Maybe Int
allocatedStorage :: Prelude.Maybe Prelude.Int,
ModifyReplicationInstance -> Maybe Bool
applyImmediately :: Prelude.Maybe Prelude.Bool,
ModifyReplicationInstance -> Maybe Text
replicationInstanceClass :: Prelude.Maybe Prelude.Text,
ModifyReplicationInstance -> Maybe Text
replicationInstanceIdentifier :: Prelude.Maybe Prelude.Text,
ModifyReplicationInstance -> Text
replicationInstanceArn :: Prelude.Text
}
deriving (ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
(ModifyReplicationInstance -> ModifyReplicationInstance -> Bool)
-> (ModifyReplicationInstance -> ModifyReplicationInstance -> Bool)
-> Eq ModifyReplicationInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
$c/= :: ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
== :: ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
$c== :: ModifyReplicationInstance -> ModifyReplicationInstance -> Bool
Prelude.Eq, ReadPrec [ModifyReplicationInstance]
ReadPrec ModifyReplicationInstance
Int -> ReadS ModifyReplicationInstance
ReadS [ModifyReplicationInstance]
(Int -> ReadS ModifyReplicationInstance)
-> ReadS [ModifyReplicationInstance]
-> ReadPrec ModifyReplicationInstance
-> ReadPrec [ModifyReplicationInstance]
-> Read ModifyReplicationInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyReplicationInstance]
$creadListPrec :: ReadPrec [ModifyReplicationInstance]
readPrec :: ReadPrec ModifyReplicationInstance
$creadPrec :: ReadPrec ModifyReplicationInstance
readList :: ReadS [ModifyReplicationInstance]
$creadList :: ReadS [ModifyReplicationInstance]
readsPrec :: Int -> ReadS ModifyReplicationInstance
$creadsPrec :: Int -> ReadS ModifyReplicationInstance
Prelude.Read, Int -> ModifyReplicationInstance -> ShowS
[ModifyReplicationInstance] -> ShowS
ModifyReplicationInstance -> String
(Int -> ModifyReplicationInstance -> ShowS)
-> (ModifyReplicationInstance -> String)
-> ([ModifyReplicationInstance] -> ShowS)
-> Show ModifyReplicationInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyReplicationInstance] -> ShowS
$cshowList :: [ModifyReplicationInstance] -> ShowS
show :: ModifyReplicationInstance -> String
$cshow :: ModifyReplicationInstance -> String
showsPrec :: Int -> ModifyReplicationInstance -> ShowS
$cshowsPrec :: Int -> ModifyReplicationInstance -> ShowS
Prelude.Show, (forall x.
ModifyReplicationInstance -> Rep ModifyReplicationInstance x)
-> (forall x.
Rep ModifyReplicationInstance x -> ModifyReplicationInstance)
-> Generic ModifyReplicationInstance
forall x.
Rep ModifyReplicationInstance x -> ModifyReplicationInstance
forall x.
ModifyReplicationInstance -> Rep ModifyReplicationInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyReplicationInstance x -> ModifyReplicationInstance
$cfrom :: forall x.
ModifyReplicationInstance -> Rep ModifyReplicationInstance x
Prelude.Generic)
newModifyReplicationInstance ::
Prelude.Text ->
ModifyReplicationInstance
newModifyReplicationInstance :: Text -> ModifyReplicationInstance
newModifyReplicationInstance Text
pReplicationInstanceArn_ =
ModifyReplicationInstance' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> ModifyReplicationInstance
ModifyReplicationInstance'
{ $sel:engineVersion:ModifyReplicationInstance' :: Maybe Text
engineVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:autoMinorVersionUpgrade:ModifyReplicationInstance' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:allowMajorVersionUpgrade:ModifyReplicationInstance' :: Maybe Bool
allowMajorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:preferredMaintenanceWindow:ModifyReplicationInstance' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcSecurityGroupIds:ModifyReplicationInstance' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:multiAZ:ModifyReplicationInstance' :: Maybe Bool
multiAZ = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:allocatedStorage:ModifyReplicationInstance' :: Maybe Int
allocatedStorage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:applyImmediately:ModifyReplicationInstance' :: Maybe Bool
applyImmediately = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:replicationInstanceClass:ModifyReplicationInstance' :: Maybe Text
replicationInstanceClass = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:replicationInstanceIdentifier:ModifyReplicationInstance' :: Maybe Text
replicationInstanceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:replicationInstanceArn:ModifyReplicationInstance' :: Text
replicationInstanceArn =
Text
pReplicationInstanceArn_
}
modifyReplicationInstance_engineVersion :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Text)
modifyReplicationInstance_engineVersion :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_engineVersion = (ModifyReplicationInstance -> Maybe Text)
-> (ModifyReplicationInstance
-> Maybe Text -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Text
a -> ModifyReplicationInstance
s {$sel:engineVersion:ModifyReplicationInstance' :: Maybe Text
engineVersion = Maybe Text
a} :: ModifyReplicationInstance)
modifyReplicationInstance_autoMinorVersionUpgrade :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Bool)
modifyReplicationInstance_autoMinorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_autoMinorVersionUpgrade = (ModifyReplicationInstance -> Maybe Bool)
-> (ModifyReplicationInstance
-> Maybe Bool -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
$sel:autoMinorVersionUpgrade:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
autoMinorVersionUpgrade} -> Maybe Bool
autoMinorVersionUpgrade) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Bool
a -> ModifyReplicationInstance
s {$sel:autoMinorVersionUpgrade:ModifyReplicationInstance' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
a} :: ModifyReplicationInstance)
modifyReplicationInstance_allowMajorVersionUpgrade :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Bool)
modifyReplicationInstance_allowMajorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_allowMajorVersionUpgrade = (ModifyReplicationInstance -> Maybe Bool)
-> (ModifyReplicationInstance
-> Maybe Bool -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Bool
allowMajorVersionUpgrade :: Maybe Bool
$sel:allowMajorVersionUpgrade:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
allowMajorVersionUpgrade} -> Maybe Bool
allowMajorVersionUpgrade) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Bool
a -> ModifyReplicationInstance
s {$sel:allowMajorVersionUpgrade:ModifyReplicationInstance' :: Maybe Bool
allowMajorVersionUpgrade = Maybe Bool
a} :: ModifyReplicationInstance)
modifyReplicationInstance_preferredMaintenanceWindow :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Text)
modifyReplicationInstance_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_preferredMaintenanceWindow = (ModifyReplicationInstance -> Maybe Text)
-> (ModifyReplicationInstance
-> Maybe Text -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Text
a -> ModifyReplicationInstance
s {$sel:preferredMaintenanceWindow:ModifyReplicationInstance' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: ModifyReplicationInstance)
modifyReplicationInstance_vpcSecurityGroupIds :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe [Prelude.Text])
modifyReplicationInstance_vpcSecurityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_vpcSecurityGroupIds = (ModifyReplicationInstance -> Maybe [Text])
-> (ModifyReplicationInstance
-> Maybe [Text] -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe [Text]
a -> ModifyReplicationInstance
s {$sel:vpcSecurityGroupIds:ModifyReplicationInstance' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: ModifyReplicationInstance) ((Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationInstance -> f ModifyReplicationInstance)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyReplicationInstance
-> f ModifyReplicationInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
modifyReplicationInstance_multiAZ :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Bool)
modifyReplicationInstance_multiAZ :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_multiAZ = (ModifyReplicationInstance -> Maybe Bool)
-> (ModifyReplicationInstance
-> Maybe Bool -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Bool
multiAZ :: Maybe Bool
$sel:multiAZ:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
multiAZ} -> Maybe Bool
multiAZ) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Bool
a -> ModifyReplicationInstance
s {$sel:multiAZ:ModifyReplicationInstance' :: Maybe Bool
multiAZ = Maybe Bool
a} :: ModifyReplicationInstance)
modifyReplicationInstance_allocatedStorage :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Int)
modifyReplicationInstance_allocatedStorage :: (Maybe Int -> f (Maybe Int))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_allocatedStorage = (ModifyReplicationInstance -> Maybe Int)
-> (ModifyReplicationInstance
-> Maybe Int -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Int
allocatedStorage :: Maybe Int
$sel:allocatedStorage:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Int
allocatedStorage} -> Maybe Int
allocatedStorage) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Int
a -> ModifyReplicationInstance
s {$sel:allocatedStorage:ModifyReplicationInstance' :: Maybe Int
allocatedStorage = Maybe Int
a} :: ModifyReplicationInstance)
modifyReplicationInstance_applyImmediately :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Bool)
modifyReplicationInstance_applyImmediately :: (Maybe Bool -> f (Maybe Bool))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_applyImmediately = (ModifyReplicationInstance -> Maybe Bool)
-> (ModifyReplicationInstance
-> Maybe Bool -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Bool
applyImmediately :: Maybe Bool
$sel:applyImmediately:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
applyImmediately} -> Maybe Bool
applyImmediately) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Bool
a -> ModifyReplicationInstance
s {$sel:applyImmediately:ModifyReplicationInstance' :: Maybe Bool
applyImmediately = Maybe Bool
a} :: ModifyReplicationInstance)
modifyReplicationInstance_replicationInstanceClass :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Text)
modifyReplicationInstance_replicationInstanceClass :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_replicationInstanceClass = (ModifyReplicationInstance -> Maybe Text)
-> (ModifyReplicationInstance
-> Maybe Text -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Text
replicationInstanceClass :: Maybe Text
$sel:replicationInstanceClass:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
replicationInstanceClass} -> Maybe Text
replicationInstanceClass) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Text
a -> ModifyReplicationInstance
s {$sel:replicationInstanceClass:ModifyReplicationInstance' :: Maybe Text
replicationInstanceClass = Maybe Text
a} :: ModifyReplicationInstance)
modifyReplicationInstance_replicationInstanceIdentifier :: Lens.Lens' ModifyReplicationInstance (Prelude.Maybe Prelude.Text)
modifyReplicationInstance_replicationInstanceIdentifier :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_replicationInstanceIdentifier = (ModifyReplicationInstance -> Maybe Text)
-> (ModifyReplicationInstance
-> Maybe Text -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance
ModifyReplicationInstance
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Maybe Text
replicationInstanceIdentifier :: Maybe Text
$sel:replicationInstanceIdentifier:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
replicationInstanceIdentifier} -> Maybe Text
replicationInstanceIdentifier) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Maybe Text
a -> ModifyReplicationInstance
s {$sel:replicationInstanceIdentifier:ModifyReplicationInstance' :: Maybe Text
replicationInstanceIdentifier = Maybe Text
a} :: ModifyReplicationInstance)
modifyReplicationInstance_replicationInstanceArn :: Lens.Lens' ModifyReplicationInstance Prelude.Text
modifyReplicationInstance_replicationInstanceArn :: (Text -> f Text)
-> ModifyReplicationInstance -> f ModifyReplicationInstance
modifyReplicationInstance_replicationInstanceArn = (ModifyReplicationInstance -> Text)
-> (ModifyReplicationInstance -> Text -> ModifyReplicationInstance)
-> Lens
ModifyReplicationInstance ModifyReplicationInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstance' {Text
replicationInstanceArn :: Text
$sel:replicationInstanceArn:ModifyReplicationInstance' :: ModifyReplicationInstance -> Text
replicationInstanceArn} -> Text
replicationInstanceArn) (\s :: ModifyReplicationInstance
s@ModifyReplicationInstance' {} Text
a -> ModifyReplicationInstance
s {$sel:replicationInstanceArn:ModifyReplicationInstance' :: Text
replicationInstanceArn = Text
a} :: ModifyReplicationInstance)
instance Core.AWSRequest ModifyReplicationInstance where
type
AWSResponse ModifyReplicationInstance =
ModifyReplicationInstanceResponse
request :: ModifyReplicationInstance -> Request ModifyReplicationInstance
request = Service
-> ModifyReplicationInstance -> Request ModifyReplicationInstance
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ModifyReplicationInstance
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyReplicationInstance)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ModifyReplicationInstance))
-> Logger
-> Service
-> Proxy ModifyReplicationInstance
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ModifyReplicationInstance)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe ReplicationInstance
-> Int -> ModifyReplicationInstanceResponse
ModifyReplicationInstanceResponse'
(Maybe ReplicationInstance
-> Int -> ModifyReplicationInstanceResponse)
-> Either String (Maybe ReplicationInstance)
-> Either String (Int -> ModifyReplicationInstanceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ReplicationInstance)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReplicationInstance")
Either String (Int -> ModifyReplicationInstanceResponse)
-> Either String Int
-> Either String ModifyReplicationInstanceResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ModifyReplicationInstance
instance Prelude.NFData ModifyReplicationInstance
instance Core.ToHeaders ModifyReplicationInstance where
toHeaders :: ModifyReplicationInstance -> ResponseHeaders
toHeaders =
ResponseHeaders -> ModifyReplicationInstance -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonDMSv20160101.ModifyReplicationInstance" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON ModifyReplicationInstance where
toJSON :: ModifyReplicationInstance -> Value
toJSON ModifyReplicationInstance' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe Text
Text
replicationInstanceArn :: Text
replicationInstanceIdentifier :: Maybe Text
replicationInstanceClass :: Maybe Text
applyImmediately :: Maybe Bool
allocatedStorage :: Maybe Int
multiAZ :: Maybe Bool
vpcSecurityGroupIds :: Maybe [Text]
preferredMaintenanceWindow :: Maybe Text
allowMajorVersionUpgrade :: Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
engineVersion :: Maybe Text
$sel:replicationInstanceArn:ModifyReplicationInstance' :: ModifyReplicationInstance -> Text
$sel:replicationInstanceIdentifier:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
$sel:replicationInstanceClass:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
$sel:applyImmediately:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
$sel:allocatedStorage:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Int
$sel:multiAZ:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
$sel:vpcSecurityGroupIds:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe [Text]
$sel:preferredMaintenanceWindow:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
$sel:allowMajorVersionUpgrade:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
$sel:autoMinorVersionUpgrade:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Bool
$sel:engineVersion:ModifyReplicationInstance' :: ModifyReplicationInstance -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EngineVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
engineVersion,
(Text
"AutoMinorVersionUpgrade" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
autoMinorVersionUpgrade,
(Text
"AllowMajorVersionUpgrade" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
allowMajorVersionUpgrade,
(Text
"PreferredMaintenanceWindow" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
preferredMaintenanceWindow,
(Text
"VpcSecurityGroupIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
vpcSecurityGroupIds,
(Text
"MultiAZ" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
multiAZ,
(Text
"AllocatedStorage" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
allocatedStorage,
(Text
"ApplyImmediately" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
applyImmediately,
(Text
"ReplicationInstanceClass" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
replicationInstanceClass,
(Text
"ReplicationInstanceIdentifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
replicationInstanceIdentifier,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ReplicationInstanceArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
replicationInstanceArn
)
]
)
instance Core.ToPath ModifyReplicationInstance where
toPath :: ModifyReplicationInstance -> ByteString
toPath = ByteString -> ModifyReplicationInstance -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ModifyReplicationInstance where
toQuery :: ModifyReplicationInstance -> QueryString
toQuery = QueryString -> ModifyReplicationInstance -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ModifyReplicationInstanceResponse = ModifyReplicationInstanceResponse'
{
ModifyReplicationInstanceResponse -> Maybe ReplicationInstance
replicationInstance :: Prelude.Maybe ReplicationInstance,
ModifyReplicationInstanceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
(ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool)
-> (ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool)
-> Eq ModifyReplicationInstanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
$c/= :: ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
== :: ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
$c== :: ModifyReplicationInstanceResponse
-> ModifyReplicationInstanceResponse -> Bool
Prelude.Eq, ReadPrec [ModifyReplicationInstanceResponse]
ReadPrec ModifyReplicationInstanceResponse
Int -> ReadS ModifyReplicationInstanceResponse
ReadS [ModifyReplicationInstanceResponse]
(Int -> ReadS ModifyReplicationInstanceResponse)
-> ReadS [ModifyReplicationInstanceResponse]
-> ReadPrec ModifyReplicationInstanceResponse
-> ReadPrec [ModifyReplicationInstanceResponse]
-> Read ModifyReplicationInstanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyReplicationInstanceResponse]
$creadListPrec :: ReadPrec [ModifyReplicationInstanceResponse]
readPrec :: ReadPrec ModifyReplicationInstanceResponse
$creadPrec :: ReadPrec ModifyReplicationInstanceResponse
readList :: ReadS [ModifyReplicationInstanceResponse]
$creadList :: ReadS [ModifyReplicationInstanceResponse]
readsPrec :: Int -> ReadS ModifyReplicationInstanceResponse
$creadsPrec :: Int -> ReadS ModifyReplicationInstanceResponse
Prelude.Read, Int -> ModifyReplicationInstanceResponse -> ShowS
[ModifyReplicationInstanceResponse] -> ShowS
ModifyReplicationInstanceResponse -> String
(Int -> ModifyReplicationInstanceResponse -> ShowS)
-> (ModifyReplicationInstanceResponse -> String)
-> ([ModifyReplicationInstanceResponse] -> ShowS)
-> Show ModifyReplicationInstanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyReplicationInstanceResponse] -> ShowS
$cshowList :: [ModifyReplicationInstanceResponse] -> ShowS
show :: ModifyReplicationInstanceResponse -> String
$cshow :: ModifyReplicationInstanceResponse -> String
showsPrec :: Int -> ModifyReplicationInstanceResponse -> ShowS
$cshowsPrec :: Int -> ModifyReplicationInstanceResponse -> ShowS
Prelude.Show, (forall x.
ModifyReplicationInstanceResponse
-> Rep ModifyReplicationInstanceResponse x)
-> (forall x.
Rep ModifyReplicationInstanceResponse x
-> ModifyReplicationInstanceResponse)
-> Generic ModifyReplicationInstanceResponse
forall x.
Rep ModifyReplicationInstanceResponse x
-> ModifyReplicationInstanceResponse
forall x.
ModifyReplicationInstanceResponse
-> Rep ModifyReplicationInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyReplicationInstanceResponse x
-> ModifyReplicationInstanceResponse
$cfrom :: forall x.
ModifyReplicationInstanceResponse
-> Rep ModifyReplicationInstanceResponse x
Prelude.Generic)
newModifyReplicationInstanceResponse ::
Prelude.Int ->
ModifyReplicationInstanceResponse
newModifyReplicationInstanceResponse :: Int -> ModifyReplicationInstanceResponse
newModifyReplicationInstanceResponse Int
pHttpStatus_ =
ModifyReplicationInstanceResponse' :: Maybe ReplicationInstance
-> Int -> ModifyReplicationInstanceResponse
ModifyReplicationInstanceResponse'
{ $sel:replicationInstance:ModifyReplicationInstanceResponse' :: Maybe ReplicationInstance
replicationInstance =
Maybe ReplicationInstance
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ModifyReplicationInstanceResponse' :: Int
httpStatus = Int
pHttpStatus_
}
modifyReplicationInstanceResponse_replicationInstance :: Lens.Lens' ModifyReplicationInstanceResponse (Prelude.Maybe ReplicationInstance)
modifyReplicationInstanceResponse_replicationInstance :: (Maybe ReplicationInstance -> f (Maybe ReplicationInstance))
-> ModifyReplicationInstanceResponse
-> f ModifyReplicationInstanceResponse
modifyReplicationInstanceResponse_replicationInstance = (ModifyReplicationInstanceResponse -> Maybe ReplicationInstance)
-> (ModifyReplicationInstanceResponse
-> Maybe ReplicationInstance -> ModifyReplicationInstanceResponse)
-> Lens
ModifyReplicationInstanceResponse
ModifyReplicationInstanceResponse
(Maybe ReplicationInstance)
(Maybe ReplicationInstance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstanceResponse' {Maybe ReplicationInstance
replicationInstance :: Maybe ReplicationInstance
$sel:replicationInstance:ModifyReplicationInstanceResponse' :: ModifyReplicationInstanceResponse -> Maybe ReplicationInstance
replicationInstance} -> Maybe ReplicationInstance
replicationInstance) (\s :: ModifyReplicationInstanceResponse
s@ModifyReplicationInstanceResponse' {} Maybe ReplicationInstance
a -> ModifyReplicationInstanceResponse
s {$sel:replicationInstance:ModifyReplicationInstanceResponse' :: Maybe ReplicationInstance
replicationInstance = Maybe ReplicationInstance
a} :: ModifyReplicationInstanceResponse)
modifyReplicationInstanceResponse_httpStatus :: Lens.Lens' ModifyReplicationInstanceResponse Prelude.Int
modifyReplicationInstanceResponse_httpStatus :: (Int -> f Int)
-> ModifyReplicationInstanceResponse
-> f ModifyReplicationInstanceResponse
modifyReplicationInstanceResponse_httpStatus = (ModifyReplicationInstanceResponse -> Int)
-> (ModifyReplicationInstanceResponse
-> Int -> ModifyReplicationInstanceResponse)
-> Lens
ModifyReplicationInstanceResponse
ModifyReplicationInstanceResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationInstanceResponse' {Int
httpStatus :: Int
$sel:httpStatus:ModifyReplicationInstanceResponse' :: ModifyReplicationInstanceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ModifyReplicationInstanceResponse
s@ModifyReplicationInstanceResponse' {} Int
a -> ModifyReplicationInstanceResponse
s {$sel:httpStatus:ModifyReplicationInstanceResponse' :: Int
httpStatus = Int
a} :: ModifyReplicationInstanceResponse)
instance
Prelude.NFData
ModifyReplicationInstanceResponse