{-# 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.CreateReplicationTask
(
CreateReplicationTask (..),
newCreateReplicationTask,
createReplicationTask_replicationTaskSettings,
createReplicationTask_cdcStartPosition,
createReplicationTask_taskData,
createReplicationTask_cdcStopPosition,
createReplicationTask_resourceIdentifier,
createReplicationTask_tags,
createReplicationTask_cdcStartTime,
createReplicationTask_replicationTaskIdentifier,
createReplicationTask_sourceEndpointArn,
createReplicationTask_targetEndpointArn,
createReplicationTask_replicationInstanceArn,
createReplicationTask_migrationType,
createReplicationTask_tableMappings,
CreateReplicationTaskResponse (..),
newCreateReplicationTaskResponse,
createReplicationTaskResponse_replicationTask,
createReplicationTaskResponse_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 CreateReplicationTask = CreateReplicationTask'
{
CreateReplicationTask -> Maybe Text
replicationTaskSettings :: Prelude.Maybe Prelude.Text,
CreateReplicationTask -> Maybe Text
cdcStartPosition :: Prelude.Maybe Prelude.Text,
CreateReplicationTask -> Maybe Text
taskData :: Prelude.Maybe Prelude.Text,
CreateReplicationTask -> Maybe Text
cdcStopPosition :: Prelude.Maybe Prelude.Text,
CreateReplicationTask -> Maybe Text
resourceIdentifier :: Prelude.Maybe Prelude.Text,
CreateReplicationTask -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateReplicationTask -> Maybe POSIX
cdcStartTime :: Prelude.Maybe Core.POSIX,
CreateReplicationTask -> Text
replicationTaskIdentifier :: Prelude.Text,
CreateReplicationTask -> Text
sourceEndpointArn :: Prelude.Text,
CreateReplicationTask -> Text
targetEndpointArn :: Prelude.Text,
CreateReplicationTask -> Text
replicationInstanceArn :: Prelude.Text,
CreateReplicationTask -> MigrationTypeValue
migrationType :: MigrationTypeValue,
CreateReplicationTask -> Text
tableMappings :: Prelude.Text
}
deriving (CreateReplicationTask -> CreateReplicationTask -> Bool
(CreateReplicationTask -> CreateReplicationTask -> Bool)
-> (CreateReplicationTask -> CreateReplicationTask -> Bool)
-> Eq CreateReplicationTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateReplicationTask -> CreateReplicationTask -> Bool
$c/= :: CreateReplicationTask -> CreateReplicationTask -> Bool
== :: CreateReplicationTask -> CreateReplicationTask -> Bool
$c== :: CreateReplicationTask -> CreateReplicationTask -> Bool
Prelude.Eq, ReadPrec [CreateReplicationTask]
ReadPrec CreateReplicationTask
Int -> ReadS CreateReplicationTask
ReadS [CreateReplicationTask]
(Int -> ReadS CreateReplicationTask)
-> ReadS [CreateReplicationTask]
-> ReadPrec CreateReplicationTask
-> ReadPrec [CreateReplicationTask]
-> Read CreateReplicationTask
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateReplicationTask]
$creadListPrec :: ReadPrec [CreateReplicationTask]
readPrec :: ReadPrec CreateReplicationTask
$creadPrec :: ReadPrec CreateReplicationTask
readList :: ReadS [CreateReplicationTask]
$creadList :: ReadS [CreateReplicationTask]
readsPrec :: Int -> ReadS CreateReplicationTask
$creadsPrec :: Int -> ReadS CreateReplicationTask
Prelude.Read, Int -> CreateReplicationTask -> ShowS
[CreateReplicationTask] -> ShowS
CreateReplicationTask -> String
(Int -> CreateReplicationTask -> ShowS)
-> (CreateReplicationTask -> String)
-> ([CreateReplicationTask] -> ShowS)
-> Show CreateReplicationTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateReplicationTask] -> ShowS
$cshowList :: [CreateReplicationTask] -> ShowS
show :: CreateReplicationTask -> String
$cshow :: CreateReplicationTask -> String
showsPrec :: Int -> CreateReplicationTask -> ShowS
$cshowsPrec :: Int -> CreateReplicationTask -> ShowS
Prelude.Show, (forall x. CreateReplicationTask -> Rep CreateReplicationTask x)
-> (forall x. Rep CreateReplicationTask x -> CreateReplicationTask)
-> Generic CreateReplicationTask
forall x. Rep CreateReplicationTask x -> CreateReplicationTask
forall x. CreateReplicationTask -> Rep CreateReplicationTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateReplicationTask x -> CreateReplicationTask
$cfrom :: forall x. CreateReplicationTask -> Rep CreateReplicationTask x
Prelude.Generic)
newCreateReplicationTask ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
MigrationTypeValue ->
Prelude.Text ->
CreateReplicationTask
newCreateReplicationTask :: Text
-> Text
-> Text
-> Text
-> MigrationTypeValue
-> Text
-> CreateReplicationTask
newCreateReplicationTask
Text
pReplicationTaskIdentifier_
Text
pSourceEndpointArn_
Text
pTargetEndpointArn_
Text
pReplicationInstanceArn_
MigrationTypeValue
pMigrationType_
Text
pTableMappings_ =
CreateReplicationTask' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Maybe POSIX
-> Text
-> Text
-> Text
-> Text
-> MigrationTypeValue
-> Text
-> CreateReplicationTask
CreateReplicationTask'
{ $sel:replicationTaskSettings:CreateReplicationTask' :: Maybe Text
replicationTaskSettings =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cdcStartPosition:CreateReplicationTask' :: Maybe Text
cdcStartPosition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:taskData:CreateReplicationTask' :: Maybe Text
taskData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cdcStopPosition:CreateReplicationTask' :: Maybe Text
cdcStopPosition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceIdentifier:CreateReplicationTask' :: Maybe Text
resourceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateReplicationTask' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:cdcStartTime:CreateReplicationTask' :: Maybe POSIX
cdcStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:replicationTaskIdentifier:CreateReplicationTask' :: Text
replicationTaskIdentifier =
Text
pReplicationTaskIdentifier_,
$sel:sourceEndpointArn:CreateReplicationTask' :: Text
sourceEndpointArn = Text
pSourceEndpointArn_,
$sel:targetEndpointArn:CreateReplicationTask' :: Text
targetEndpointArn = Text
pTargetEndpointArn_,
$sel:replicationInstanceArn:CreateReplicationTask' :: Text
replicationInstanceArn = Text
pReplicationInstanceArn_,
$sel:migrationType:CreateReplicationTask' :: MigrationTypeValue
migrationType = MigrationTypeValue
pMigrationType_,
$sel:tableMappings:CreateReplicationTask' :: Text
tableMappings = Text
pTableMappings_
}
createReplicationTask_replicationTaskSettings :: Lens.Lens' CreateReplicationTask (Prelude.Maybe Prelude.Text)
createReplicationTask_replicationTaskSettings :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_replicationTaskSettings = (CreateReplicationTask -> Maybe Text)
-> (CreateReplicationTask -> Maybe Text -> CreateReplicationTask)
-> Lens
CreateReplicationTask
CreateReplicationTask
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Maybe Text
replicationTaskSettings :: Maybe Text
$sel:replicationTaskSettings:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
replicationTaskSettings} -> Maybe Text
replicationTaskSettings) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Maybe Text
a -> CreateReplicationTask
s {$sel:replicationTaskSettings:CreateReplicationTask' :: Maybe Text
replicationTaskSettings = Maybe Text
a} :: CreateReplicationTask)
createReplicationTask_cdcStartPosition :: Lens.Lens' CreateReplicationTask (Prelude.Maybe Prelude.Text)
createReplicationTask_cdcStartPosition :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_cdcStartPosition = (CreateReplicationTask -> Maybe Text)
-> (CreateReplicationTask -> Maybe Text -> CreateReplicationTask)
-> Lens
CreateReplicationTask
CreateReplicationTask
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Maybe Text
cdcStartPosition :: Maybe Text
$sel:cdcStartPosition:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
cdcStartPosition} -> Maybe Text
cdcStartPosition) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Maybe Text
a -> CreateReplicationTask
s {$sel:cdcStartPosition:CreateReplicationTask' :: Maybe Text
cdcStartPosition = Maybe Text
a} :: CreateReplicationTask)
createReplicationTask_taskData :: Lens.Lens' CreateReplicationTask (Prelude.Maybe Prelude.Text)
createReplicationTask_taskData :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_taskData = (CreateReplicationTask -> Maybe Text)
-> (CreateReplicationTask -> Maybe Text -> CreateReplicationTask)
-> Lens
CreateReplicationTask
CreateReplicationTask
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Maybe Text
taskData :: Maybe Text
$sel:taskData:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
taskData} -> Maybe Text
taskData) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Maybe Text
a -> CreateReplicationTask
s {$sel:taskData:CreateReplicationTask' :: Maybe Text
taskData = Maybe Text
a} :: CreateReplicationTask)
createReplicationTask_cdcStopPosition :: Lens.Lens' CreateReplicationTask (Prelude.Maybe Prelude.Text)
createReplicationTask_cdcStopPosition :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_cdcStopPosition = (CreateReplicationTask -> Maybe Text)
-> (CreateReplicationTask -> Maybe Text -> CreateReplicationTask)
-> Lens
CreateReplicationTask
CreateReplicationTask
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Maybe Text
cdcStopPosition :: Maybe Text
$sel:cdcStopPosition:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
cdcStopPosition} -> Maybe Text
cdcStopPosition) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Maybe Text
a -> CreateReplicationTask
s {$sel:cdcStopPosition:CreateReplicationTask' :: Maybe Text
cdcStopPosition = Maybe Text
a} :: CreateReplicationTask)
createReplicationTask_resourceIdentifier :: Lens.Lens' CreateReplicationTask (Prelude.Maybe Prelude.Text)
createReplicationTask_resourceIdentifier :: (Maybe Text -> f (Maybe Text))
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_resourceIdentifier = (CreateReplicationTask -> Maybe Text)
-> (CreateReplicationTask -> Maybe Text -> CreateReplicationTask)
-> Lens
CreateReplicationTask
CreateReplicationTask
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Maybe Text
resourceIdentifier :: Maybe Text
$sel:resourceIdentifier:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
resourceIdentifier} -> Maybe Text
resourceIdentifier) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Maybe Text
a -> CreateReplicationTask
s {$sel:resourceIdentifier:CreateReplicationTask' :: Maybe Text
resourceIdentifier = Maybe Text
a} :: CreateReplicationTask)
createReplicationTask_tags :: Lens.Lens' CreateReplicationTask (Prelude.Maybe [Tag])
createReplicationTask_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_tags = (CreateReplicationTask -> Maybe [Tag])
-> (CreateReplicationTask -> Maybe [Tag] -> CreateReplicationTask)
-> Lens
CreateReplicationTask
CreateReplicationTask
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateReplicationTask' :: CreateReplicationTask -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Maybe [Tag]
a -> CreateReplicationTask
s {$sel:tags:CreateReplicationTask' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateReplicationTask) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateReplicationTask -> f CreateReplicationTask)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateReplicationTask
-> f CreateReplicationTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createReplicationTask_cdcStartTime :: Lens.Lens' CreateReplicationTask (Prelude.Maybe Prelude.UTCTime)
createReplicationTask_cdcStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_cdcStartTime = (CreateReplicationTask -> Maybe POSIX)
-> (CreateReplicationTask -> Maybe POSIX -> CreateReplicationTask)
-> Lens
CreateReplicationTask
CreateReplicationTask
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Maybe POSIX
cdcStartTime :: Maybe POSIX
$sel:cdcStartTime:CreateReplicationTask' :: CreateReplicationTask -> Maybe POSIX
cdcStartTime} -> Maybe POSIX
cdcStartTime) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Maybe POSIX
a -> CreateReplicationTask
s {$sel:cdcStartTime:CreateReplicationTask' :: Maybe POSIX
cdcStartTime = Maybe POSIX
a} :: CreateReplicationTask) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateReplicationTask -> f CreateReplicationTask)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateReplicationTask
-> f CreateReplicationTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createReplicationTask_replicationTaskIdentifier :: Lens.Lens' CreateReplicationTask Prelude.Text
createReplicationTask_replicationTaskIdentifier :: (Text -> f Text)
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_replicationTaskIdentifier = (CreateReplicationTask -> Text)
-> (CreateReplicationTask -> Text -> CreateReplicationTask)
-> Lens CreateReplicationTask CreateReplicationTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Text
replicationTaskIdentifier :: Text
$sel:replicationTaskIdentifier:CreateReplicationTask' :: CreateReplicationTask -> Text
replicationTaskIdentifier} -> Text
replicationTaskIdentifier) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Text
a -> CreateReplicationTask
s {$sel:replicationTaskIdentifier:CreateReplicationTask' :: Text
replicationTaskIdentifier = Text
a} :: CreateReplicationTask)
createReplicationTask_sourceEndpointArn :: Lens.Lens' CreateReplicationTask Prelude.Text
createReplicationTask_sourceEndpointArn :: (Text -> f Text)
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_sourceEndpointArn = (CreateReplicationTask -> Text)
-> (CreateReplicationTask -> Text -> CreateReplicationTask)
-> Lens CreateReplicationTask CreateReplicationTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Text
sourceEndpointArn :: Text
$sel:sourceEndpointArn:CreateReplicationTask' :: CreateReplicationTask -> Text
sourceEndpointArn} -> Text
sourceEndpointArn) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Text
a -> CreateReplicationTask
s {$sel:sourceEndpointArn:CreateReplicationTask' :: Text
sourceEndpointArn = Text
a} :: CreateReplicationTask)
createReplicationTask_targetEndpointArn :: Lens.Lens' CreateReplicationTask Prelude.Text
createReplicationTask_targetEndpointArn :: (Text -> f Text)
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_targetEndpointArn = (CreateReplicationTask -> Text)
-> (CreateReplicationTask -> Text -> CreateReplicationTask)
-> Lens CreateReplicationTask CreateReplicationTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Text
targetEndpointArn :: Text
$sel:targetEndpointArn:CreateReplicationTask' :: CreateReplicationTask -> Text
targetEndpointArn} -> Text
targetEndpointArn) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Text
a -> CreateReplicationTask
s {$sel:targetEndpointArn:CreateReplicationTask' :: Text
targetEndpointArn = Text
a} :: CreateReplicationTask)
createReplicationTask_replicationInstanceArn :: Lens.Lens' CreateReplicationTask Prelude.Text
createReplicationTask_replicationInstanceArn :: (Text -> f Text)
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_replicationInstanceArn = (CreateReplicationTask -> Text)
-> (CreateReplicationTask -> Text -> CreateReplicationTask)
-> Lens CreateReplicationTask CreateReplicationTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Text
replicationInstanceArn :: Text
$sel:replicationInstanceArn:CreateReplicationTask' :: CreateReplicationTask -> Text
replicationInstanceArn} -> Text
replicationInstanceArn) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Text
a -> CreateReplicationTask
s {$sel:replicationInstanceArn:CreateReplicationTask' :: Text
replicationInstanceArn = Text
a} :: CreateReplicationTask)
createReplicationTask_migrationType :: Lens.Lens' CreateReplicationTask MigrationTypeValue
createReplicationTask_migrationType :: (MigrationTypeValue -> f MigrationTypeValue)
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_migrationType = (CreateReplicationTask -> MigrationTypeValue)
-> (CreateReplicationTask
-> MigrationTypeValue -> CreateReplicationTask)
-> Lens
CreateReplicationTask
CreateReplicationTask
MigrationTypeValue
MigrationTypeValue
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {MigrationTypeValue
migrationType :: MigrationTypeValue
$sel:migrationType:CreateReplicationTask' :: CreateReplicationTask -> MigrationTypeValue
migrationType} -> MigrationTypeValue
migrationType) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} MigrationTypeValue
a -> CreateReplicationTask
s {$sel:migrationType:CreateReplicationTask' :: MigrationTypeValue
migrationType = MigrationTypeValue
a} :: CreateReplicationTask)
createReplicationTask_tableMappings :: Lens.Lens' CreateReplicationTask Prelude.Text
createReplicationTask_tableMappings :: (Text -> f Text)
-> CreateReplicationTask -> f CreateReplicationTask
createReplicationTask_tableMappings = (CreateReplicationTask -> Text)
-> (CreateReplicationTask -> Text -> CreateReplicationTask)
-> Lens CreateReplicationTask CreateReplicationTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTask' {Text
tableMappings :: Text
$sel:tableMappings:CreateReplicationTask' :: CreateReplicationTask -> Text
tableMappings} -> Text
tableMappings) (\s :: CreateReplicationTask
s@CreateReplicationTask' {} Text
a -> CreateReplicationTask
s {$sel:tableMappings:CreateReplicationTask' :: Text
tableMappings = Text
a} :: CreateReplicationTask)
instance Core.AWSRequest CreateReplicationTask where
type
AWSResponse CreateReplicationTask =
CreateReplicationTaskResponse
request :: CreateReplicationTask -> Request CreateReplicationTask
request = Service -> CreateReplicationTask -> Request CreateReplicationTask
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateReplicationTask
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateReplicationTask)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateReplicationTask))
-> Logger
-> Service
-> Proxy CreateReplicationTask
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateReplicationTask)))
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 ReplicationTask -> Int -> CreateReplicationTaskResponse
CreateReplicationTaskResponse'
(Maybe ReplicationTask -> Int -> CreateReplicationTaskResponse)
-> Either String (Maybe ReplicationTask)
-> Either String (Int -> CreateReplicationTaskResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ReplicationTask)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReplicationTask")
Either String (Int -> CreateReplicationTaskResponse)
-> Either String Int -> Either String CreateReplicationTaskResponse
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 CreateReplicationTask
instance Prelude.NFData CreateReplicationTask
instance Core.ToHeaders CreateReplicationTask where
toHeaders :: CreateReplicationTask -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateReplicationTask -> 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.CreateReplicationTask" ::
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 CreateReplicationTask where
toJSON :: CreateReplicationTask -> Value
toJSON CreateReplicationTask' {Maybe [Tag]
Maybe Text
Maybe POSIX
Text
MigrationTypeValue
tableMappings :: Text
migrationType :: MigrationTypeValue
replicationInstanceArn :: Text
targetEndpointArn :: Text
sourceEndpointArn :: Text
replicationTaskIdentifier :: Text
cdcStartTime :: Maybe POSIX
tags :: Maybe [Tag]
resourceIdentifier :: Maybe Text
cdcStopPosition :: Maybe Text
taskData :: Maybe Text
cdcStartPosition :: Maybe Text
replicationTaskSettings :: Maybe Text
$sel:tableMappings:CreateReplicationTask' :: CreateReplicationTask -> Text
$sel:migrationType:CreateReplicationTask' :: CreateReplicationTask -> MigrationTypeValue
$sel:replicationInstanceArn:CreateReplicationTask' :: CreateReplicationTask -> Text
$sel:targetEndpointArn:CreateReplicationTask' :: CreateReplicationTask -> Text
$sel:sourceEndpointArn:CreateReplicationTask' :: CreateReplicationTask -> Text
$sel:replicationTaskIdentifier:CreateReplicationTask' :: CreateReplicationTask -> Text
$sel:cdcStartTime:CreateReplicationTask' :: CreateReplicationTask -> Maybe POSIX
$sel:tags:CreateReplicationTask' :: CreateReplicationTask -> Maybe [Tag]
$sel:resourceIdentifier:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
$sel:cdcStopPosition:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
$sel:taskData:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
$sel:cdcStartPosition:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
$sel:replicationTaskSettings:CreateReplicationTask' :: CreateReplicationTask -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ReplicationTaskSettings" 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
replicationTaskSettings,
(Text
"CdcStartPosition" 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
cdcStartPosition,
(Text
"TaskData" 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
taskData,
(Text
"CdcStopPosition" 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
cdcStopPosition,
(Text
"ResourceIdentifier" 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
resourceIdentifier,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Text
"CdcStartTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
cdcStartTime,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ReplicationTaskIdentifier"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
replicationTaskIdentifier
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"SourceEndpointArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceEndpointArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"TargetEndpointArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
targetEndpointArn),
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
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MigrationType" Text -> MigrationTypeValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MigrationTypeValue
migrationType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"TableMappings" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tableMappings)
]
)
instance Core.ToPath CreateReplicationTask where
toPath :: CreateReplicationTask -> ByteString
toPath = ByteString -> CreateReplicationTask -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateReplicationTask where
toQuery :: CreateReplicationTask -> QueryString
toQuery = QueryString -> CreateReplicationTask -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateReplicationTaskResponse = CreateReplicationTaskResponse'
{
CreateReplicationTaskResponse -> Maybe ReplicationTask
replicationTask :: Prelude.Maybe ReplicationTask,
CreateReplicationTaskResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateReplicationTaskResponse
-> CreateReplicationTaskResponse -> Bool
(CreateReplicationTaskResponse
-> CreateReplicationTaskResponse -> Bool)
-> (CreateReplicationTaskResponse
-> CreateReplicationTaskResponse -> Bool)
-> Eq CreateReplicationTaskResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateReplicationTaskResponse
-> CreateReplicationTaskResponse -> Bool
$c/= :: CreateReplicationTaskResponse
-> CreateReplicationTaskResponse -> Bool
== :: CreateReplicationTaskResponse
-> CreateReplicationTaskResponse -> Bool
$c== :: CreateReplicationTaskResponse
-> CreateReplicationTaskResponse -> Bool
Prelude.Eq, ReadPrec [CreateReplicationTaskResponse]
ReadPrec CreateReplicationTaskResponse
Int -> ReadS CreateReplicationTaskResponse
ReadS [CreateReplicationTaskResponse]
(Int -> ReadS CreateReplicationTaskResponse)
-> ReadS [CreateReplicationTaskResponse]
-> ReadPrec CreateReplicationTaskResponse
-> ReadPrec [CreateReplicationTaskResponse]
-> Read CreateReplicationTaskResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateReplicationTaskResponse]
$creadListPrec :: ReadPrec [CreateReplicationTaskResponse]
readPrec :: ReadPrec CreateReplicationTaskResponse
$creadPrec :: ReadPrec CreateReplicationTaskResponse
readList :: ReadS [CreateReplicationTaskResponse]
$creadList :: ReadS [CreateReplicationTaskResponse]
readsPrec :: Int -> ReadS CreateReplicationTaskResponse
$creadsPrec :: Int -> ReadS CreateReplicationTaskResponse
Prelude.Read, Int -> CreateReplicationTaskResponse -> ShowS
[CreateReplicationTaskResponse] -> ShowS
CreateReplicationTaskResponse -> String
(Int -> CreateReplicationTaskResponse -> ShowS)
-> (CreateReplicationTaskResponse -> String)
-> ([CreateReplicationTaskResponse] -> ShowS)
-> Show CreateReplicationTaskResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateReplicationTaskResponse] -> ShowS
$cshowList :: [CreateReplicationTaskResponse] -> ShowS
show :: CreateReplicationTaskResponse -> String
$cshow :: CreateReplicationTaskResponse -> String
showsPrec :: Int -> CreateReplicationTaskResponse -> ShowS
$cshowsPrec :: Int -> CreateReplicationTaskResponse -> ShowS
Prelude.Show, (forall x.
CreateReplicationTaskResponse
-> Rep CreateReplicationTaskResponse x)
-> (forall x.
Rep CreateReplicationTaskResponse x
-> CreateReplicationTaskResponse)
-> Generic CreateReplicationTaskResponse
forall x.
Rep CreateReplicationTaskResponse x
-> CreateReplicationTaskResponse
forall x.
CreateReplicationTaskResponse
-> Rep CreateReplicationTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateReplicationTaskResponse x
-> CreateReplicationTaskResponse
$cfrom :: forall x.
CreateReplicationTaskResponse
-> Rep CreateReplicationTaskResponse x
Prelude.Generic)
newCreateReplicationTaskResponse ::
Prelude.Int ->
CreateReplicationTaskResponse
newCreateReplicationTaskResponse :: Int -> CreateReplicationTaskResponse
newCreateReplicationTaskResponse Int
pHttpStatus_ =
CreateReplicationTaskResponse' :: Maybe ReplicationTask -> Int -> CreateReplicationTaskResponse
CreateReplicationTaskResponse'
{ $sel:replicationTask:CreateReplicationTaskResponse' :: Maybe ReplicationTask
replicationTask =
Maybe ReplicationTask
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateReplicationTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createReplicationTaskResponse_replicationTask :: Lens.Lens' CreateReplicationTaskResponse (Prelude.Maybe ReplicationTask)
createReplicationTaskResponse_replicationTask :: (Maybe ReplicationTask -> f (Maybe ReplicationTask))
-> CreateReplicationTaskResponse -> f CreateReplicationTaskResponse
createReplicationTaskResponse_replicationTask = (CreateReplicationTaskResponse -> Maybe ReplicationTask)
-> (CreateReplicationTaskResponse
-> Maybe ReplicationTask -> CreateReplicationTaskResponse)
-> Lens
CreateReplicationTaskResponse
CreateReplicationTaskResponse
(Maybe ReplicationTask)
(Maybe ReplicationTask)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTaskResponse' {Maybe ReplicationTask
replicationTask :: Maybe ReplicationTask
$sel:replicationTask:CreateReplicationTaskResponse' :: CreateReplicationTaskResponse -> Maybe ReplicationTask
replicationTask} -> Maybe ReplicationTask
replicationTask) (\s :: CreateReplicationTaskResponse
s@CreateReplicationTaskResponse' {} Maybe ReplicationTask
a -> CreateReplicationTaskResponse
s {$sel:replicationTask:CreateReplicationTaskResponse' :: Maybe ReplicationTask
replicationTask = Maybe ReplicationTask
a} :: CreateReplicationTaskResponse)
createReplicationTaskResponse_httpStatus :: Lens.Lens' CreateReplicationTaskResponse Prelude.Int
createReplicationTaskResponse_httpStatus :: (Int -> f Int)
-> CreateReplicationTaskResponse -> f CreateReplicationTaskResponse
createReplicationTaskResponse_httpStatus = (CreateReplicationTaskResponse -> Int)
-> (CreateReplicationTaskResponse
-> Int -> CreateReplicationTaskResponse)
-> Lens
CreateReplicationTaskResponse CreateReplicationTaskResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateReplicationTaskResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateReplicationTaskResponse' :: CreateReplicationTaskResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateReplicationTaskResponse
s@CreateReplicationTaskResponse' {} Int
a -> CreateReplicationTaskResponse
s {$sel:httpStatus:CreateReplicationTaskResponse' :: Int
httpStatus = Int
a} :: CreateReplicationTaskResponse)
instance Prelude.NFData CreateReplicationTaskResponse