{-# 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.Lightsail.CreateRelationalDatabaseFromSnapshot
(
CreateRelationalDatabaseFromSnapshot (..),
newCreateRelationalDatabaseFromSnapshot,
createRelationalDatabaseFromSnapshot_sourceRelationalDatabaseName,
createRelationalDatabaseFromSnapshot_relationalDatabaseBundleId,
createRelationalDatabaseFromSnapshot_publiclyAccessible,
createRelationalDatabaseFromSnapshot_useLatestRestorableTime,
createRelationalDatabaseFromSnapshot_restoreTime,
createRelationalDatabaseFromSnapshot_availabilityZone,
createRelationalDatabaseFromSnapshot_relationalDatabaseSnapshotName,
createRelationalDatabaseFromSnapshot_tags,
createRelationalDatabaseFromSnapshot_relationalDatabaseName,
CreateRelationalDatabaseFromSnapshotResponse (..),
newCreateRelationalDatabaseFromSnapshotResponse,
createRelationalDatabaseFromSnapshotResponse_operations,
createRelationalDatabaseFromSnapshotResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateRelationalDatabaseFromSnapshot = CreateRelationalDatabaseFromSnapshot'
{
CreateRelationalDatabaseFromSnapshot -> Maybe Text
sourceRelationalDatabaseName :: Prelude.Maybe Prelude.Text,
CreateRelationalDatabaseFromSnapshot -> Maybe Text
relationalDatabaseBundleId :: Prelude.Maybe Prelude.Text,
CreateRelationalDatabaseFromSnapshot -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
CreateRelationalDatabaseFromSnapshot -> Maybe Bool
useLatestRestorableTime :: Prelude.Maybe Prelude.Bool,
CreateRelationalDatabaseFromSnapshot -> Maybe POSIX
restoreTime :: Prelude.Maybe Core.POSIX,
CreateRelationalDatabaseFromSnapshot -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
CreateRelationalDatabaseFromSnapshot -> Maybe Text
relationalDatabaseSnapshotName :: Prelude.Maybe Prelude.Text,
CreateRelationalDatabaseFromSnapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateRelationalDatabaseFromSnapshot -> Text
relationalDatabaseName :: Prelude.Text
}
deriving (CreateRelationalDatabaseFromSnapshot
-> CreateRelationalDatabaseFromSnapshot -> Bool
(CreateRelationalDatabaseFromSnapshot
-> CreateRelationalDatabaseFromSnapshot -> Bool)
-> (CreateRelationalDatabaseFromSnapshot
-> CreateRelationalDatabaseFromSnapshot -> Bool)
-> Eq CreateRelationalDatabaseFromSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRelationalDatabaseFromSnapshot
-> CreateRelationalDatabaseFromSnapshot -> Bool
$c/= :: CreateRelationalDatabaseFromSnapshot
-> CreateRelationalDatabaseFromSnapshot -> Bool
== :: CreateRelationalDatabaseFromSnapshot
-> CreateRelationalDatabaseFromSnapshot -> Bool
$c== :: CreateRelationalDatabaseFromSnapshot
-> CreateRelationalDatabaseFromSnapshot -> Bool
Prelude.Eq, ReadPrec [CreateRelationalDatabaseFromSnapshot]
ReadPrec CreateRelationalDatabaseFromSnapshot
Int -> ReadS CreateRelationalDatabaseFromSnapshot
ReadS [CreateRelationalDatabaseFromSnapshot]
(Int -> ReadS CreateRelationalDatabaseFromSnapshot)
-> ReadS [CreateRelationalDatabaseFromSnapshot]
-> ReadPrec CreateRelationalDatabaseFromSnapshot
-> ReadPrec [CreateRelationalDatabaseFromSnapshot]
-> Read CreateRelationalDatabaseFromSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRelationalDatabaseFromSnapshot]
$creadListPrec :: ReadPrec [CreateRelationalDatabaseFromSnapshot]
readPrec :: ReadPrec CreateRelationalDatabaseFromSnapshot
$creadPrec :: ReadPrec CreateRelationalDatabaseFromSnapshot
readList :: ReadS [CreateRelationalDatabaseFromSnapshot]
$creadList :: ReadS [CreateRelationalDatabaseFromSnapshot]
readsPrec :: Int -> ReadS CreateRelationalDatabaseFromSnapshot
$creadsPrec :: Int -> ReadS CreateRelationalDatabaseFromSnapshot
Prelude.Read, Int -> CreateRelationalDatabaseFromSnapshot -> ShowS
[CreateRelationalDatabaseFromSnapshot] -> ShowS
CreateRelationalDatabaseFromSnapshot -> String
(Int -> CreateRelationalDatabaseFromSnapshot -> ShowS)
-> (CreateRelationalDatabaseFromSnapshot -> String)
-> ([CreateRelationalDatabaseFromSnapshot] -> ShowS)
-> Show CreateRelationalDatabaseFromSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRelationalDatabaseFromSnapshot] -> ShowS
$cshowList :: [CreateRelationalDatabaseFromSnapshot] -> ShowS
show :: CreateRelationalDatabaseFromSnapshot -> String
$cshow :: CreateRelationalDatabaseFromSnapshot -> String
showsPrec :: Int -> CreateRelationalDatabaseFromSnapshot -> ShowS
$cshowsPrec :: Int -> CreateRelationalDatabaseFromSnapshot -> ShowS
Prelude.Show, (forall x.
CreateRelationalDatabaseFromSnapshot
-> Rep CreateRelationalDatabaseFromSnapshot x)
-> (forall x.
Rep CreateRelationalDatabaseFromSnapshot x
-> CreateRelationalDatabaseFromSnapshot)
-> Generic CreateRelationalDatabaseFromSnapshot
forall x.
Rep CreateRelationalDatabaseFromSnapshot x
-> CreateRelationalDatabaseFromSnapshot
forall x.
CreateRelationalDatabaseFromSnapshot
-> Rep CreateRelationalDatabaseFromSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRelationalDatabaseFromSnapshot x
-> CreateRelationalDatabaseFromSnapshot
$cfrom :: forall x.
CreateRelationalDatabaseFromSnapshot
-> Rep CreateRelationalDatabaseFromSnapshot x
Prelude.Generic)
newCreateRelationalDatabaseFromSnapshot ::
Prelude.Text ->
CreateRelationalDatabaseFromSnapshot
newCreateRelationalDatabaseFromSnapshot :: Text -> CreateRelationalDatabaseFromSnapshot
newCreateRelationalDatabaseFromSnapshot
Text
pRelationalDatabaseName_ =
CreateRelationalDatabaseFromSnapshot' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot'
{ $sel:sourceRelationalDatabaseName:CreateRelationalDatabaseFromSnapshot' :: Maybe Text
sourceRelationalDatabaseName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:relationalDatabaseBundleId:CreateRelationalDatabaseFromSnapshot' :: Maybe Text
relationalDatabaseBundleId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:publiclyAccessible:CreateRelationalDatabaseFromSnapshot' :: Maybe Bool
publiclyAccessible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:useLatestRestorableTime:CreateRelationalDatabaseFromSnapshot' :: Maybe Bool
useLatestRestorableTime =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:restoreTime:CreateRelationalDatabaseFromSnapshot' :: Maybe POSIX
restoreTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZone:CreateRelationalDatabaseFromSnapshot' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:relationalDatabaseSnapshotName:CreateRelationalDatabaseFromSnapshot' :: Maybe Text
relationalDatabaseSnapshotName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateRelationalDatabaseFromSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:relationalDatabaseName:CreateRelationalDatabaseFromSnapshot' :: Text
relationalDatabaseName =
Text
pRelationalDatabaseName_
}
createRelationalDatabaseFromSnapshot_sourceRelationalDatabaseName :: Lens.Lens' CreateRelationalDatabaseFromSnapshot (Prelude.Maybe Prelude.Text)
createRelationalDatabaseFromSnapshot_sourceRelationalDatabaseName :: (Maybe Text -> f (Maybe Text))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
createRelationalDatabaseFromSnapshot_sourceRelationalDatabaseName = (CreateRelationalDatabaseFromSnapshot -> Maybe Text)
-> (CreateRelationalDatabaseFromSnapshot
-> Maybe Text -> CreateRelationalDatabaseFromSnapshot)
-> Lens
CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshot' {Maybe Text
sourceRelationalDatabaseName :: Maybe Text
$sel:sourceRelationalDatabaseName:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Text
sourceRelationalDatabaseName} -> Maybe Text
sourceRelationalDatabaseName) (\s :: CreateRelationalDatabaseFromSnapshot
s@CreateRelationalDatabaseFromSnapshot' {} Maybe Text
a -> CreateRelationalDatabaseFromSnapshot
s {$sel:sourceRelationalDatabaseName:CreateRelationalDatabaseFromSnapshot' :: Maybe Text
sourceRelationalDatabaseName = Maybe Text
a} :: CreateRelationalDatabaseFromSnapshot)
createRelationalDatabaseFromSnapshot_relationalDatabaseBundleId :: Lens.Lens' CreateRelationalDatabaseFromSnapshot (Prelude.Maybe Prelude.Text)
createRelationalDatabaseFromSnapshot_relationalDatabaseBundleId :: (Maybe Text -> f (Maybe Text))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
createRelationalDatabaseFromSnapshot_relationalDatabaseBundleId = (CreateRelationalDatabaseFromSnapshot -> Maybe Text)
-> (CreateRelationalDatabaseFromSnapshot
-> Maybe Text -> CreateRelationalDatabaseFromSnapshot)
-> Lens
CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshot' {Maybe Text
relationalDatabaseBundleId :: Maybe Text
$sel:relationalDatabaseBundleId:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Text
relationalDatabaseBundleId} -> Maybe Text
relationalDatabaseBundleId) (\s :: CreateRelationalDatabaseFromSnapshot
s@CreateRelationalDatabaseFromSnapshot' {} Maybe Text
a -> CreateRelationalDatabaseFromSnapshot
s {$sel:relationalDatabaseBundleId:CreateRelationalDatabaseFromSnapshot' :: Maybe Text
relationalDatabaseBundleId = Maybe Text
a} :: CreateRelationalDatabaseFromSnapshot)
createRelationalDatabaseFromSnapshot_publiclyAccessible :: Lens.Lens' CreateRelationalDatabaseFromSnapshot (Prelude.Maybe Prelude.Bool)
createRelationalDatabaseFromSnapshot_publiclyAccessible :: (Maybe Bool -> f (Maybe Bool))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
createRelationalDatabaseFromSnapshot_publiclyAccessible = (CreateRelationalDatabaseFromSnapshot -> Maybe Bool)
-> (CreateRelationalDatabaseFromSnapshot
-> Maybe Bool -> CreateRelationalDatabaseFromSnapshot)
-> Lens
CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshot' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: CreateRelationalDatabaseFromSnapshot
s@CreateRelationalDatabaseFromSnapshot' {} Maybe Bool
a -> CreateRelationalDatabaseFromSnapshot
s {$sel:publiclyAccessible:CreateRelationalDatabaseFromSnapshot' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: CreateRelationalDatabaseFromSnapshot)
createRelationalDatabaseFromSnapshot_useLatestRestorableTime :: Lens.Lens' CreateRelationalDatabaseFromSnapshot (Prelude.Maybe Prelude.Bool)
createRelationalDatabaseFromSnapshot_useLatestRestorableTime :: (Maybe Bool -> f (Maybe Bool))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
createRelationalDatabaseFromSnapshot_useLatestRestorableTime = (CreateRelationalDatabaseFromSnapshot -> Maybe Bool)
-> (CreateRelationalDatabaseFromSnapshot
-> Maybe Bool -> CreateRelationalDatabaseFromSnapshot)
-> Lens
CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshot' {Maybe Bool
useLatestRestorableTime :: Maybe Bool
$sel:useLatestRestorableTime:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Bool
useLatestRestorableTime} -> Maybe Bool
useLatestRestorableTime) (\s :: CreateRelationalDatabaseFromSnapshot
s@CreateRelationalDatabaseFromSnapshot' {} Maybe Bool
a -> CreateRelationalDatabaseFromSnapshot
s {$sel:useLatestRestorableTime:CreateRelationalDatabaseFromSnapshot' :: Maybe Bool
useLatestRestorableTime = Maybe Bool
a} :: CreateRelationalDatabaseFromSnapshot)
createRelationalDatabaseFromSnapshot_restoreTime :: Lens.Lens' CreateRelationalDatabaseFromSnapshot (Prelude.Maybe Prelude.UTCTime)
createRelationalDatabaseFromSnapshot_restoreTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
createRelationalDatabaseFromSnapshot_restoreTime = (CreateRelationalDatabaseFromSnapshot -> Maybe POSIX)
-> (CreateRelationalDatabaseFromSnapshot
-> Maybe POSIX -> CreateRelationalDatabaseFromSnapshot)
-> Lens
CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshot' {Maybe POSIX
restoreTime :: Maybe POSIX
$sel:restoreTime:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe POSIX
restoreTime} -> Maybe POSIX
restoreTime) (\s :: CreateRelationalDatabaseFromSnapshot
s@CreateRelationalDatabaseFromSnapshot' {} Maybe POSIX
a -> CreateRelationalDatabaseFromSnapshot
s {$sel:restoreTime:CreateRelationalDatabaseFromSnapshot' :: Maybe POSIX
restoreTime = Maybe POSIX
a} :: CreateRelationalDatabaseFromSnapshot) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
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
createRelationalDatabaseFromSnapshot_availabilityZone :: Lens.Lens' CreateRelationalDatabaseFromSnapshot (Prelude.Maybe Prelude.Text)
createRelationalDatabaseFromSnapshot_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
createRelationalDatabaseFromSnapshot_availabilityZone = (CreateRelationalDatabaseFromSnapshot -> Maybe Text)
-> (CreateRelationalDatabaseFromSnapshot
-> Maybe Text -> CreateRelationalDatabaseFromSnapshot)
-> Lens
CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshot' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: CreateRelationalDatabaseFromSnapshot
s@CreateRelationalDatabaseFromSnapshot' {} Maybe Text
a -> CreateRelationalDatabaseFromSnapshot
s {$sel:availabilityZone:CreateRelationalDatabaseFromSnapshot' :: Maybe Text
availabilityZone = Maybe Text
a} :: CreateRelationalDatabaseFromSnapshot)
createRelationalDatabaseFromSnapshot_relationalDatabaseSnapshotName :: Lens.Lens' CreateRelationalDatabaseFromSnapshot (Prelude.Maybe Prelude.Text)
createRelationalDatabaseFromSnapshot_relationalDatabaseSnapshotName :: (Maybe Text -> f (Maybe Text))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
createRelationalDatabaseFromSnapshot_relationalDatabaseSnapshotName = (CreateRelationalDatabaseFromSnapshot -> Maybe Text)
-> (CreateRelationalDatabaseFromSnapshot
-> Maybe Text -> CreateRelationalDatabaseFromSnapshot)
-> Lens
CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshot' {Maybe Text
relationalDatabaseSnapshotName :: Maybe Text
$sel:relationalDatabaseSnapshotName:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Text
relationalDatabaseSnapshotName} -> Maybe Text
relationalDatabaseSnapshotName) (\s :: CreateRelationalDatabaseFromSnapshot
s@CreateRelationalDatabaseFromSnapshot' {} Maybe Text
a -> CreateRelationalDatabaseFromSnapshot
s {$sel:relationalDatabaseSnapshotName:CreateRelationalDatabaseFromSnapshot' :: Maybe Text
relationalDatabaseSnapshotName = Maybe Text
a} :: CreateRelationalDatabaseFromSnapshot)
createRelationalDatabaseFromSnapshot_tags :: Lens.Lens' CreateRelationalDatabaseFromSnapshot (Prelude.Maybe [Tag])
createRelationalDatabaseFromSnapshot_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
createRelationalDatabaseFromSnapshot_tags = (CreateRelationalDatabaseFromSnapshot -> Maybe [Tag])
-> (CreateRelationalDatabaseFromSnapshot
-> Maybe [Tag] -> CreateRelationalDatabaseFromSnapshot)
-> Lens
CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateRelationalDatabaseFromSnapshot
s@CreateRelationalDatabaseFromSnapshot' {} Maybe [Tag]
a -> CreateRelationalDatabaseFromSnapshot
s {$sel:tags:CreateRelationalDatabaseFromSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateRelationalDatabaseFromSnapshot) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
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
createRelationalDatabaseFromSnapshot_relationalDatabaseName :: Lens.Lens' CreateRelationalDatabaseFromSnapshot Prelude.Text
createRelationalDatabaseFromSnapshot_relationalDatabaseName :: (Text -> f Text)
-> CreateRelationalDatabaseFromSnapshot
-> f CreateRelationalDatabaseFromSnapshot
createRelationalDatabaseFromSnapshot_relationalDatabaseName = (CreateRelationalDatabaseFromSnapshot -> Text)
-> (CreateRelationalDatabaseFromSnapshot
-> Text -> CreateRelationalDatabaseFromSnapshot)
-> Lens
CreateRelationalDatabaseFromSnapshot
CreateRelationalDatabaseFromSnapshot
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshot' {Text
relationalDatabaseName :: Text
$sel:relationalDatabaseName:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Text
relationalDatabaseName} -> Text
relationalDatabaseName) (\s :: CreateRelationalDatabaseFromSnapshot
s@CreateRelationalDatabaseFromSnapshot' {} Text
a -> CreateRelationalDatabaseFromSnapshot
s {$sel:relationalDatabaseName:CreateRelationalDatabaseFromSnapshot' :: Text
relationalDatabaseName = Text
a} :: CreateRelationalDatabaseFromSnapshot)
instance
Core.AWSRequest
CreateRelationalDatabaseFromSnapshot
where
type
AWSResponse CreateRelationalDatabaseFromSnapshot =
CreateRelationalDatabaseFromSnapshotResponse
request :: CreateRelationalDatabaseFromSnapshot
-> Request CreateRelationalDatabaseFromSnapshot
request = Service
-> CreateRelationalDatabaseFromSnapshot
-> Request CreateRelationalDatabaseFromSnapshot
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateRelationalDatabaseFromSnapshot
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse CreateRelationalDatabaseFromSnapshot)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse CreateRelationalDatabaseFromSnapshot))
-> Logger
-> Service
-> Proxy CreateRelationalDatabaseFromSnapshot
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse CreateRelationalDatabaseFromSnapshot)))
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 [Operation]
-> Int -> CreateRelationalDatabaseFromSnapshotResponse
CreateRelationalDatabaseFromSnapshotResponse'
(Maybe [Operation]
-> Int -> CreateRelationalDatabaseFromSnapshotResponse)
-> Either String (Maybe [Operation])
-> Either
String (Int -> CreateRelationalDatabaseFromSnapshotResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Operation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"operations" Either String (Maybe (Maybe [Operation]))
-> Maybe [Operation] -> Either String (Maybe [Operation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Operation]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> CreateRelationalDatabaseFromSnapshotResponse)
-> Either String Int
-> Either String CreateRelationalDatabaseFromSnapshotResponse
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
CreateRelationalDatabaseFromSnapshot
instance
Prelude.NFData
CreateRelationalDatabaseFromSnapshot
instance
Core.ToHeaders
CreateRelationalDatabaseFromSnapshot
where
toHeaders :: CreateRelationalDatabaseFromSnapshot -> ResponseHeaders
toHeaders =
ResponseHeaders
-> CreateRelationalDatabaseFromSnapshot -> 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
"Lightsail_20161128.CreateRelationalDatabaseFromSnapshot" ::
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
CreateRelationalDatabaseFromSnapshot
where
toJSON :: CreateRelationalDatabaseFromSnapshot -> Value
toJSON CreateRelationalDatabaseFromSnapshot' {Maybe Bool
Maybe [Tag]
Maybe Text
Maybe POSIX
Text
relationalDatabaseName :: Text
tags :: Maybe [Tag]
relationalDatabaseSnapshotName :: Maybe Text
availabilityZone :: Maybe Text
restoreTime :: Maybe POSIX
useLatestRestorableTime :: Maybe Bool
publiclyAccessible :: Maybe Bool
relationalDatabaseBundleId :: Maybe Text
sourceRelationalDatabaseName :: Maybe Text
$sel:relationalDatabaseName:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Text
$sel:tags:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe [Tag]
$sel:relationalDatabaseSnapshotName:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Text
$sel:availabilityZone:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Text
$sel:restoreTime:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe POSIX
$sel:useLatestRestorableTime:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Bool
$sel:publiclyAccessible:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Bool
$sel:relationalDatabaseBundleId:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Text
$sel:sourceRelationalDatabaseName:CreateRelationalDatabaseFromSnapshot' :: CreateRelationalDatabaseFromSnapshot -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"sourceRelationalDatabaseName" 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
sourceRelationalDatabaseName,
(Text
"relationalDatabaseBundleId" 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
relationalDatabaseBundleId,
(Text
"publiclyAccessible" 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
publiclyAccessible,
(Text
"useLatestRestorableTime" 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
useLatestRestorableTime,
(Text
"restoreTime" 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
restoreTime,
(Text
"availabilityZone" 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
availabilityZone,
(Text
"relationalDatabaseSnapshotName" 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
relationalDatabaseSnapshotName,
(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,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"relationalDatabaseName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
relationalDatabaseName
)
]
)
instance
Core.ToPath
CreateRelationalDatabaseFromSnapshot
where
toPath :: CreateRelationalDatabaseFromSnapshot -> ByteString
toPath = ByteString -> CreateRelationalDatabaseFromSnapshot -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
CreateRelationalDatabaseFromSnapshot
where
toQuery :: CreateRelationalDatabaseFromSnapshot -> QueryString
toQuery = QueryString -> CreateRelationalDatabaseFromSnapshot -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateRelationalDatabaseFromSnapshotResponse = CreateRelationalDatabaseFromSnapshotResponse'
{
CreateRelationalDatabaseFromSnapshotResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
CreateRelationalDatabaseFromSnapshotResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateRelationalDatabaseFromSnapshotResponse
-> CreateRelationalDatabaseFromSnapshotResponse -> Bool
(CreateRelationalDatabaseFromSnapshotResponse
-> CreateRelationalDatabaseFromSnapshotResponse -> Bool)
-> (CreateRelationalDatabaseFromSnapshotResponse
-> CreateRelationalDatabaseFromSnapshotResponse -> Bool)
-> Eq CreateRelationalDatabaseFromSnapshotResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRelationalDatabaseFromSnapshotResponse
-> CreateRelationalDatabaseFromSnapshotResponse -> Bool
$c/= :: CreateRelationalDatabaseFromSnapshotResponse
-> CreateRelationalDatabaseFromSnapshotResponse -> Bool
== :: CreateRelationalDatabaseFromSnapshotResponse
-> CreateRelationalDatabaseFromSnapshotResponse -> Bool
$c== :: CreateRelationalDatabaseFromSnapshotResponse
-> CreateRelationalDatabaseFromSnapshotResponse -> Bool
Prelude.Eq, ReadPrec [CreateRelationalDatabaseFromSnapshotResponse]
ReadPrec CreateRelationalDatabaseFromSnapshotResponse
Int -> ReadS CreateRelationalDatabaseFromSnapshotResponse
ReadS [CreateRelationalDatabaseFromSnapshotResponse]
(Int -> ReadS CreateRelationalDatabaseFromSnapshotResponse)
-> ReadS [CreateRelationalDatabaseFromSnapshotResponse]
-> ReadPrec CreateRelationalDatabaseFromSnapshotResponse
-> ReadPrec [CreateRelationalDatabaseFromSnapshotResponse]
-> Read CreateRelationalDatabaseFromSnapshotResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRelationalDatabaseFromSnapshotResponse]
$creadListPrec :: ReadPrec [CreateRelationalDatabaseFromSnapshotResponse]
readPrec :: ReadPrec CreateRelationalDatabaseFromSnapshotResponse
$creadPrec :: ReadPrec CreateRelationalDatabaseFromSnapshotResponse
readList :: ReadS [CreateRelationalDatabaseFromSnapshotResponse]
$creadList :: ReadS [CreateRelationalDatabaseFromSnapshotResponse]
readsPrec :: Int -> ReadS CreateRelationalDatabaseFromSnapshotResponse
$creadsPrec :: Int -> ReadS CreateRelationalDatabaseFromSnapshotResponse
Prelude.Read, Int -> CreateRelationalDatabaseFromSnapshotResponse -> ShowS
[CreateRelationalDatabaseFromSnapshotResponse] -> ShowS
CreateRelationalDatabaseFromSnapshotResponse -> String
(Int -> CreateRelationalDatabaseFromSnapshotResponse -> ShowS)
-> (CreateRelationalDatabaseFromSnapshotResponse -> String)
-> ([CreateRelationalDatabaseFromSnapshotResponse] -> ShowS)
-> Show CreateRelationalDatabaseFromSnapshotResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRelationalDatabaseFromSnapshotResponse] -> ShowS
$cshowList :: [CreateRelationalDatabaseFromSnapshotResponse] -> ShowS
show :: CreateRelationalDatabaseFromSnapshotResponse -> String
$cshow :: CreateRelationalDatabaseFromSnapshotResponse -> String
showsPrec :: Int -> CreateRelationalDatabaseFromSnapshotResponse -> ShowS
$cshowsPrec :: Int -> CreateRelationalDatabaseFromSnapshotResponse -> ShowS
Prelude.Show, (forall x.
CreateRelationalDatabaseFromSnapshotResponse
-> Rep CreateRelationalDatabaseFromSnapshotResponse x)
-> (forall x.
Rep CreateRelationalDatabaseFromSnapshotResponse x
-> CreateRelationalDatabaseFromSnapshotResponse)
-> Generic CreateRelationalDatabaseFromSnapshotResponse
forall x.
Rep CreateRelationalDatabaseFromSnapshotResponse x
-> CreateRelationalDatabaseFromSnapshotResponse
forall x.
CreateRelationalDatabaseFromSnapshotResponse
-> Rep CreateRelationalDatabaseFromSnapshotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRelationalDatabaseFromSnapshotResponse x
-> CreateRelationalDatabaseFromSnapshotResponse
$cfrom :: forall x.
CreateRelationalDatabaseFromSnapshotResponse
-> Rep CreateRelationalDatabaseFromSnapshotResponse x
Prelude.Generic)
newCreateRelationalDatabaseFromSnapshotResponse ::
Prelude.Int ->
CreateRelationalDatabaseFromSnapshotResponse
newCreateRelationalDatabaseFromSnapshotResponse :: Int -> CreateRelationalDatabaseFromSnapshotResponse
newCreateRelationalDatabaseFromSnapshotResponse
Int
pHttpStatus_ =
CreateRelationalDatabaseFromSnapshotResponse' :: Maybe [Operation]
-> Int -> CreateRelationalDatabaseFromSnapshotResponse
CreateRelationalDatabaseFromSnapshotResponse'
{ $sel:operations:CreateRelationalDatabaseFromSnapshotResponse' :: Maybe [Operation]
operations =
Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateRelationalDatabaseFromSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createRelationalDatabaseFromSnapshotResponse_operations :: Lens.Lens' CreateRelationalDatabaseFromSnapshotResponse (Prelude.Maybe [Operation])
createRelationalDatabaseFromSnapshotResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> CreateRelationalDatabaseFromSnapshotResponse
-> f CreateRelationalDatabaseFromSnapshotResponse
createRelationalDatabaseFromSnapshotResponse_operations = (CreateRelationalDatabaseFromSnapshotResponse -> Maybe [Operation])
-> (CreateRelationalDatabaseFromSnapshotResponse
-> Maybe [Operation]
-> CreateRelationalDatabaseFromSnapshotResponse)
-> Lens
CreateRelationalDatabaseFromSnapshotResponse
CreateRelationalDatabaseFromSnapshotResponse
(Maybe [Operation])
(Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshotResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:CreateRelationalDatabaseFromSnapshotResponse' :: CreateRelationalDatabaseFromSnapshotResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: CreateRelationalDatabaseFromSnapshotResponse
s@CreateRelationalDatabaseFromSnapshotResponse' {} Maybe [Operation]
a -> CreateRelationalDatabaseFromSnapshotResponse
s {$sel:operations:CreateRelationalDatabaseFromSnapshotResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: CreateRelationalDatabaseFromSnapshotResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
-> CreateRelationalDatabaseFromSnapshotResponse
-> f CreateRelationalDatabaseFromSnapshotResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
-> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> CreateRelationalDatabaseFromSnapshotResponse
-> f CreateRelationalDatabaseFromSnapshotResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Operation] [Operation] [Operation] [Operation]
-> Iso
(Maybe [Operation])
(Maybe [Operation])
(Maybe [Operation])
(Maybe [Operation])
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 [Operation] [Operation] [Operation] [Operation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createRelationalDatabaseFromSnapshotResponse_httpStatus :: Lens.Lens' CreateRelationalDatabaseFromSnapshotResponse Prelude.Int
createRelationalDatabaseFromSnapshotResponse_httpStatus :: (Int -> f Int)
-> CreateRelationalDatabaseFromSnapshotResponse
-> f CreateRelationalDatabaseFromSnapshotResponse
createRelationalDatabaseFromSnapshotResponse_httpStatus = (CreateRelationalDatabaseFromSnapshotResponse -> Int)
-> (CreateRelationalDatabaseFromSnapshotResponse
-> Int -> CreateRelationalDatabaseFromSnapshotResponse)
-> Lens
CreateRelationalDatabaseFromSnapshotResponse
CreateRelationalDatabaseFromSnapshotResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRelationalDatabaseFromSnapshotResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRelationalDatabaseFromSnapshotResponse' :: CreateRelationalDatabaseFromSnapshotResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRelationalDatabaseFromSnapshotResponse
s@CreateRelationalDatabaseFromSnapshotResponse' {} Int
a -> CreateRelationalDatabaseFromSnapshotResponse
s {$sel:httpStatus:CreateRelationalDatabaseFromSnapshotResponse' :: Int
httpStatus = Int
a} :: CreateRelationalDatabaseFromSnapshotResponse)
instance
Prelude.NFData
CreateRelationalDatabaseFromSnapshotResponse