{-# 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.RDS.CopyDBSnapshot
(
CopyDBSnapshot (..),
newCopyDBSnapshot,
copyDBSnapshot_targetCustomAvailabilityZone,
copyDBSnapshot_preSignedUrl,
copyDBSnapshot_copyTags,
copyDBSnapshot_destinationRegion,
copyDBSnapshot_kmsKeyId,
copyDBSnapshot_optionGroupName,
copyDBSnapshot_tags,
copyDBSnapshot_sourceDBSnapshotIdentifier,
copyDBSnapshot_targetDBSnapshotIdentifier,
CopyDBSnapshotResponse (..),
newCopyDBSnapshotResponse,
copyDBSnapshotResponse_dbSnapshot,
copyDBSnapshotResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CopyDBSnapshot = CopyDBSnapshot'
{
CopyDBSnapshot -> Maybe Text
targetCustomAvailabilityZone :: Prelude.Maybe Prelude.Text,
CopyDBSnapshot -> Maybe Text
preSignedUrl :: Prelude.Maybe Prelude.Text,
CopyDBSnapshot -> Maybe Bool
copyTags :: Prelude.Maybe Prelude.Bool,
CopyDBSnapshot -> Maybe Text
destinationRegion :: Prelude.Maybe Prelude.Text,
CopyDBSnapshot -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
CopyDBSnapshot -> Maybe Text
optionGroupName :: Prelude.Maybe Prelude.Text,
CopyDBSnapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CopyDBSnapshot -> Text
sourceDBSnapshotIdentifier :: Prelude.Text,
CopyDBSnapshot -> Text
targetDBSnapshotIdentifier :: Prelude.Text
}
deriving (CopyDBSnapshot -> CopyDBSnapshot -> Bool
(CopyDBSnapshot -> CopyDBSnapshot -> Bool)
-> (CopyDBSnapshot -> CopyDBSnapshot -> Bool) -> Eq CopyDBSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyDBSnapshot -> CopyDBSnapshot -> Bool
$c/= :: CopyDBSnapshot -> CopyDBSnapshot -> Bool
== :: CopyDBSnapshot -> CopyDBSnapshot -> Bool
$c== :: CopyDBSnapshot -> CopyDBSnapshot -> Bool
Prelude.Eq, ReadPrec [CopyDBSnapshot]
ReadPrec CopyDBSnapshot
Int -> ReadS CopyDBSnapshot
ReadS [CopyDBSnapshot]
(Int -> ReadS CopyDBSnapshot)
-> ReadS [CopyDBSnapshot]
-> ReadPrec CopyDBSnapshot
-> ReadPrec [CopyDBSnapshot]
-> Read CopyDBSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CopyDBSnapshot]
$creadListPrec :: ReadPrec [CopyDBSnapshot]
readPrec :: ReadPrec CopyDBSnapshot
$creadPrec :: ReadPrec CopyDBSnapshot
readList :: ReadS [CopyDBSnapshot]
$creadList :: ReadS [CopyDBSnapshot]
readsPrec :: Int -> ReadS CopyDBSnapshot
$creadsPrec :: Int -> ReadS CopyDBSnapshot
Prelude.Read, Int -> CopyDBSnapshot -> ShowS
[CopyDBSnapshot] -> ShowS
CopyDBSnapshot -> String
(Int -> CopyDBSnapshot -> ShowS)
-> (CopyDBSnapshot -> String)
-> ([CopyDBSnapshot] -> ShowS)
-> Show CopyDBSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyDBSnapshot] -> ShowS
$cshowList :: [CopyDBSnapshot] -> ShowS
show :: CopyDBSnapshot -> String
$cshow :: CopyDBSnapshot -> String
showsPrec :: Int -> CopyDBSnapshot -> ShowS
$cshowsPrec :: Int -> CopyDBSnapshot -> ShowS
Prelude.Show, (forall x. CopyDBSnapshot -> Rep CopyDBSnapshot x)
-> (forall x. Rep CopyDBSnapshot x -> CopyDBSnapshot)
-> Generic CopyDBSnapshot
forall x. Rep CopyDBSnapshot x -> CopyDBSnapshot
forall x. CopyDBSnapshot -> Rep CopyDBSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CopyDBSnapshot x -> CopyDBSnapshot
$cfrom :: forall x. CopyDBSnapshot -> Rep CopyDBSnapshot x
Prelude.Generic)
newCopyDBSnapshot ::
Prelude.Text ->
Prelude.Text ->
CopyDBSnapshot
newCopyDBSnapshot :: Text -> Text -> CopyDBSnapshot
newCopyDBSnapshot
Text
pSourceDBSnapshotIdentifier_
Text
pTargetDBSnapshotIdentifier_ =
CopyDBSnapshot' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> CopyDBSnapshot
CopyDBSnapshot'
{ $sel:targetCustomAvailabilityZone:CopyDBSnapshot' :: Maybe Text
targetCustomAvailabilityZone =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:preSignedUrl:CopyDBSnapshot' :: Maybe Text
preSignedUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:copyTags:CopyDBSnapshot' :: Maybe Bool
copyTags = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:destinationRegion:CopyDBSnapshot' :: Maybe Text
destinationRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:CopyDBSnapshot' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:optionGroupName:CopyDBSnapshot' :: Maybe Text
optionGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CopyDBSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:sourceDBSnapshotIdentifier:CopyDBSnapshot' :: Text
sourceDBSnapshotIdentifier =
Text
pSourceDBSnapshotIdentifier_,
$sel:targetDBSnapshotIdentifier:CopyDBSnapshot' :: Text
targetDBSnapshotIdentifier =
Text
pTargetDBSnapshotIdentifier_
}
copyDBSnapshot_targetCustomAvailabilityZone :: Lens.Lens' CopyDBSnapshot (Prelude.Maybe Prelude.Text)
copyDBSnapshot_targetCustomAvailabilityZone :: (Maybe Text -> f (Maybe Text))
-> CopyDBSnapshot -> f CopyDBSnapshot
copyDBSnapshot_targetCustomAvailabilityZone = (CopyDBSnapshot -> Maybe Text)
-> (CopyDBSnapshot -> Maybe Text -> CopyDBSnapshot)
-> Lens CopyDBSnapshot CopyDBSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshot' {Maybe Text
targetCustomAvailabilityZone :: Maybe Text
$sel:targetCustomAvailabilityZone:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
targetCustomAvailabilityZone} -> Maybe Text
targetCustomAvailabilityZone) (\s :: CopyDBSnapshot
s@CopyDBSnapshot' {} Maybe Text
a -> CopyDBSnapshot
s {$sel:targetCustomAvailabilityZone:CopyDBSnapshot' :: Maybe Text
targetCustomAvailabilityZone = Maybe Text
a} :: CopyDBSnapshot)
copyDBSnapshot_preSignedUrl :: Lens.Lens' CopyDBSnapshot (Prelude.Maybe Prelude.Text)
copyDBSnapshot_preSignedUrl :: (Maybe Text -> f (Maybe Text))
-> CopyDBSnapshot -> f CopyDBSnapshot
copyDBSnapshot_preSignedUrl = (CopyDBSnapshot -> Maybe Text)
-> (CopyDBSnapshot -> Maybe Text -> CopyDBSnapshot)
-> Lens CopyDBSnapshot CopyDBSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshot' {Maybe Text
preSignedUrl :: Maybe Text
$sel:preSignedUrl:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
preSignedUrl} -> Maybe Text
preSignedUrl) (\s :: CopyDBSnapshot
s@CopyDBSnapshot' {} Maybe Text
a -> CopyDBSnapshot
s {$sel:preSignedUrl:CopyDBSnapshot' :: Maybe Text
preSignedUrl = Maybe Text
a} :: CopyDBSnapshot)
copyDBSnapshot_copyTags :: Lens.Lens' CopyDBSnapshot (Prelude.Maybe Prelude.Bool)
copyDBSnapshot_copyTags :: (Maybe Bool -> f (Maybe Bool))
-> CopyDBSnapshot -> f CopyDBSnapshot
copyDBSnapshot_copyTags = (CopyDBSnapshot -> Maybe Bool)
-> (CopyDBSnapshot -> Maybe Bool -> CopyDBSnapshot)
-> Lens CopyDBSnapshot CopyDBSnapshot (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshot' {Maybe Bool
copyTags :: Maybe Bool
$sel:copyTags:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Bool
copyTags} -> Maybe Bool
copyTags) (\s :: CopyDBSnapshot
s@CopyDBSnapshot' {} Maybe Bool
a -> CopyDBSnapshot
s {$sel:copyTags:CopyDBSnapshot' :: Maybe Bool
copyTags = Maybe Bool
a} :: CopyDBSnapshot)
copyDBSnapshot_destinationRegion :: Lens.Lens' CopyDBSnapshot (Prelude.Maybe Prelude.Text)
copyDBSnapshot_destinationRegion :: (Maybe Text -> f (Maybe Text))
-> CopyDBSnapshot -> f CopyDBSnapshot
copyDBSnapshot_destinationRegion = (CopyDBSnapshot -> Maybe Text)
-> (CopyDBSnapshot -> Maybe Text -> CopyDBSnapshot)
-> Lens CopyDBSnapshot CopyDBSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshot' {Maybe Text
destinationRegion :: Maybe Text
$sel:destinationRegion:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
destinationRegion} -> Maybe Text
destinationRegion) (\s :: CopyDBSnapshot
s@CopyDBSnapshot' {} Maybe Text
a -> CopyDBSnapshot
s {$sel:destinationRegion:CopyDBSnapshot' :: Maybe Text
destinationRegion = Maybe Text
a} :: CopyDBSnapshot)
copyDBSnapshot_kmsKeyId :: Lens.Lens' CopyDBSnapshot (Prelude.Maybe Prelude.Text)
copyDBSnapshot_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CopyDBSnapshot -> f CopyDBSnapshot
copyDBSnapshot_kmsKeyId = (CopyDBSnapshot -> Maybe Text)
-> (CopyDBSnapshot -> Maybe Text -> CopyDBSnapshot)
-> Lens CopyDBSnapshot CopyDBSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshot' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CopyDBSnapshot
s@CopyDBSnapshot' {} Maybe Text
a -> CopyDBSnapshot
s {$sel:kmsKeyId:CopyDBSnapshot' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CopyDBSnapshot)
copyDBSnapshot_optionGroupName :: Lens.Lens' CopyDBSnapshot (Prelude.Maybe Prelude.Text)
copyDBSnapshot_optionGroupName :: (Maybe Text -> f (Maybe Text))
-> CopyDBSnapshot -> f CopyDBSnapshot
copyDBSnapshot_optionGroupName = (CopyDBSnapshot -> Maybe Text)
-> (CopyDBSnapshot -> Maybe Text -> CopyDBSnapshot)
-> Lens CopyDBSnapshot CopyDBSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshot' {Maybe Text
optionGroupName :: Maybe Text
$sel:optionGroupName:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
optionGroupName} -> Maybe Text
optionGroupName) (\s :: CopyDBSnapshot
s@CopyDBSnapshot' {} Maybe Text
a -> CopyDBSnapshot
s {$sel:optionGroupName:CopyDBSnapshot' :: Maybe Text
optionGroupName = Maybe Text
a} :: CopyDBSnapshot)
copyDBSnapshot_tags :: Lens.Lens' CopyDBSnapshot (Prelude.Maybe [Tag])
copyDBSnapshot_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CopyDBSnapshot -> f CopyDBSnapshot
copyDBSnapshot_tags = (CopyDBSnapshot -> Maybe [Tag])
-> (CopyDBSnapshot -> Maybe [Tag] -> CopyDBSnapshot)
-> Lens CopyDBSnapshot CopyDBSnapshot (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CopyDBSnapshot
s@CopyDBSnapshot' {} Maybe [Tag]
a -> CopyDBSnapshot
s {$sel:tags:CopyDBSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CopyDBSnapshot) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CopyDBSnapshot -> f CopyDBSnapshot)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CopyDBSnapshot
-> f CopyDBSnapshot
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
copyDBSnapshot_sourceDBSnapshotIdentifier :: Lens.Lens' CopyDBSnapshot Prelude.Text
copyDBSnapshot_sourceDBSnapshotIdentifier :: (Text -> f Text) -> CopyDBSnapshot -> f CopyDBSnapshot
copyDBSnapshot_sourceDBSnapshotIdentifier = (CopyDBSnapshot -> Text)
-> (CopyDBSnapshot -> Text -> CopyDBSnapshot)
-> Lens CopyDBSnapshot CopyDBSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshot' {Text
sourceDBSnapshotIdentifier :: Text
$sel:sourceDBSnapshotIdentifier:CopyDBSnapshot' :: CopyDBSnapshot -> Text
sourceDBSnapshotIdentifier} -> Text
sourceDBSnapshotIdentifier) (\s :: CopyDBSnapshot
s@CopyDBSnapshot' {} Text
a -> CopyDBSnapshot
s {$sel:sourceDBSnapshotIdentifier:CopyDBSnapshot' :: Text
sourceDBSnapshotIdentifier = Text
a} :: CopyDBSnapshot)
copyDBSnapshot_targetDBSnapshotIdentifier :: Lens.Lens' CopyDBSnapshot Prelude.Text
copyDBSnapshot_targetDBSnapshotIdentifier :: (Text -> f Text) -> CopyDBSnapshot -> f CopyDBSnapshot
copyDBSnapshot_targetDBSnapshotIdentifier = (CopyDBSnapshot -> Text)
-> (CopyDBSnapshot -> Text -> CopyDBSnapshot)
-> Lens CopyDBSnapshot CopyDBSnapshot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshot' {Text
targetDBSnapshotIdentifier :: Text
$sel:targetDBSnapshotIdentifier:CopyDBSnapshot' :: CopyDBSnapshot -> Text
targetDBSnapshotIdentifier} -> Text
targetDBSnapshotIdentifier) (\s :: CopyDBSnapshot
s@CopyDBSnapshot' {} Text
a -> CopyDBSnapshot
s {$sel:targetDBSnapshotIdentifier:CopyDBSnapshot' :: Text
targetDBSnapshotIdentifier = Text
a} :: CopyDBSnapshot)
instance Core.AWSRequest CopyDBSnapshot where
type
AWSResponse CopyDBSnapshot =
CopyDBSnapshotResponse
request :: CopyDBSnapshot -> Request CopyDBSnapshot
request = Service -> CopyDBSnapshot -> Request CopyDBSnapshot
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy CopyDBSnapshot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CopyDBSnapshot)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse CopyDBSnapshot))
-> Logger
-> Service
-> Proxy CopyDBSnapshot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CopyDBSnapshot)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"CopyDBSnapshotResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe DBSnapshot -> Int -> CopyDBSnapshotResponse
CopyDBSnapshotResponse'
(Maybe DBSnapshot -> Int -> CopyDBSnapshotResponse)
-> Either String (Maybe DBSnapshot)
-> Either String (Int -> CopyDBSnapshotResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe DBSnapshot)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBSnapshot")
Either String (Int -> CopyDBSnapshotResponse)
-> Either String Int -> Either String CopyDBSnapshotResponse
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 CopyDBSnapshot
instance Prelude.NFData CopyDBSnapshot
instance Core.ToHeaders CopyDBSnapshot where
toHeaders :: CopyDBSnapshot -> ResponseHeaders
toHeaders = ResponseHeaders -> CopyDBSnapshot -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath CopyDBSnapshot where
toPath :: CopyDBSnapshot -> ByteString
toPath = ByteString -> CopyDBSnapshot -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CopyDBSnapshot where
toQuery :: CopyDBSnapshot -> QueryString
toQuery CopyDBSnapshot' {Maybe Bool
Maybe [Tag]
Maybe Text
Text
targetDBSnapshotIdentifier :: Text
sourceDBSnapshotIdentifier :: Text
tags :: Maybe [Tag]
optionGroupName :: Maybe Text
kmsKeyId :: Maybe Text
destinationRegion :: Maybe Text
copyTags :: Maybe Bool
preSignedUrl :: Maybe Text
targetCustomAvailabilityZone :: Maybe Text
$sel:targetDBSnapshotIdentifier:CopyDBSnapshot' :: CopyDBSnapshot -> Text
$sel:sourceDBSnapshotIdentifier:CopyDBSnapshot' :: CopyDBSnapshot -> Text
$sel:tags:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe [Tag]
$sel:optionGroupName:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
$sel:kmsKeyId:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
$sel:destinationRegion:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
$sel:copyTags:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Bool
$sel:preSignedUrl:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
$sel:targetCustomAvailabilityZone:CopyDBSnapshot' :: CopyDBSnapshot -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CopyDBSnapshot" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"TargetCustomAvailabilityZone"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
targetCustomAvailabilityZone,
ByteString
"PreSignedUrl" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
preSignedUrl,
ByteString
"CopyTags" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
copyTags,
ByteString
"DestinationRegion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
destinationRegion,
ByteString
"KmsKeyId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
kmsKeyId,
ByteString
"OptionGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
optionGroupName,
ByteString
"Tags"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
ByteString
"SourceDBSnapshotIdentifier"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sourceDBSnapshotIdentifier,
ByteString
"TargetDBSnapshotIdentifier"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
targetDBSnapshotIdentifier
]
data CopyDBSnapshotResponse = CopyDBSnapshotResponse'
{ CopyDBSnapshotResponse -> Maybe DBSnapshot
dbSnapshot :: Prelude.Maybe DBSnapshot,
CopyDBSnapshotResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CopyDBSnapshotResponse -> CopyDBSnapshotResponse -> Bool
(CopyDBSnapshotResponse -> CopyDBSnapshotResponse -> Bool)
-> (CopyDBSnapshotResponse -> CopyDBSnapshotResponse -> Bool)
-> Eq CopyDBSnapshotResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyDBSnapshotResponse -> CopyDBSnapshotResponse -> Bool
$c/= :: CopyDBSnapshotResponse -> CopyDBSnapshotResponse -> Bool
== :: CopyDBSnapshotResponse -> CopyDBSnapshotResponse -> Bool
$c== :: CopyDBSnapshotResponse -> CopyDBSnapshotResponse -> Bool
Prelude.Eq, ReadPrec [CopyDBSnapshotResponse]
ReadPrec CopyDBSnapshotResponse
Int -> ReadS CopyDBSnapshotResponse
ReadS [CopyDBSnapshotResponse]
(Int -> ReadS CopyDBSnapshotResponse)
-> ReadS [CopyDBSnapshotResponse]
-> ReadPrec CopyDBSnapshotResponse
-> ReadPrec [CopyDBSnapshotResponse]
-> Read CopyDBSnapshotResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CopyDBSnapshotResponse]
$creadListPrec :: ReadPrec [CopyDBSnapshotResponse]
readPrec :: ReadPrec CopyDBSnapshotResponse
$creadPrec :: ReadPrec CopyDBSnapshotResponse
readList :: ReadS [CopyDBSnapshotResponse]
$creadList :: ReadS [CopyDBSnapshotResponse]
readsPrec :: Int -> ReadS CopyDBSnapshotResponse
$creadsPrec :: Int -> ReadS CopyDBSnapshotResponse
Prelude.Read, Int -> CopyDBSnapshotResponse -> ShowS
[CopyDBSnapshotResponse] -> ShowS
CopyDBSnapshotResponse -> String
(Int -> CopyDBSnapshotResponse -> ShowS)
-> (CopyDBSnapshotResponse -> String)
-> ([CopyDBSnapshotResponse] -> ShowS)
-> Show CopyDBSnapshotResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyDBSnapshotResponse] -> ShowS
$cshowList :: [CopyDBSnapshotResponse] -> ShowS
show :: CopyDBSnapshotResponse -> String
$cshow :: CopyDBSnapshotResponse -> String
showsPrec :: Int -> CopyDBSnapshotResponse -> ShowS
$cshowsPrec :: Int -> CopyDBSnapshotResponse -> ShowS
Prelude.Show, (forall x. CopyDBSnapshotResponse -> Rep CopyDBSnapshotResponse x)
-> (forall x.
Rep CopyDBSnapshotResponse x -> CopyDBSnapshotResponse)
-> Generic CopyDBSnapshotResponse
forall x. Rep CopyDBSnapshotResponse x -> CopyDBSnapshotResponse
forall x. CopyDBSnapshotResponse -> Rep CopyDBSnapshotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CopyDBSnapshotResponse x -> CopyDBSnapshotResponse
$cfrom :: forall x. CopyDBSnapshotResponse -> Rep CopyDBSnapshotResponse x
Prelude.Generic)
newCopyDBSnapshotResponse ::
Prelude.Int ->
CopyDBSnapshotResponse
newCopyDBSnapshotResponse :: Int -> CopyDBSnapshotResponse
newCopyDBSnapshotResponse Int
pHttpStatus_ =
CopyDBSnapshotResponse' :: Maybe DBSnapshot -> Int -> CopyDBSnapshotResponse
CopyDBSnapshotResponse'
{ $sel:dbSnapshot:CopyDBSnapshotResponse' :: Maybe DBSnapshot
dbSnapshot =
Maybe DBSnapshot
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CopyDBSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
}
copyDBSnapshotResponse_dbSnapshot :: Lens.Lens' CopyDBSnapshotResponse (Prelude.Maybe DBSnapshot)
copyDBSnapshotResponse_dbSnapshot :: (Maybe DBSnapshot -> f (Maybe DBSnapshot))
-> CopyDBSnapshotResponse -> f CopyDBSnapshotResponse
copyDBSnapshotResponse_dbSnapshot = (CopyDBSnapshotResponse -> Maybe DBSnapshot)
-> (CopyDBSnapshotResponse
-> Maybe DBSnapshot -> CopyDBSnapshotResponse)
-> Lens
CopyDBSnapshotResponse
CopyDBSnapshotResponse
(Maybe DBSnapshot)
(Maybe DBSnapshot)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshotResponse' {Maybe DBSnapshot
dbSnapshot :: Maybe DBSnapshot
$sel:dbSnapshot:CopyDBSnapshotResponse' :: CopyDBSnapshotResponse -> Maybe DBSnapshot
dbSnapshot} -> Maybe DBSnapshot
dbSnapshot) (\s :: CopyDBSnapshotResponse
s@CopyDBSnapshotResponse' {} Maybe DBSnapshot
a -> CopyDBSnapshotResponse
s {$sel:dbSnapshot:CopyDBSnapshotResponse' :: Maybe DBSnapshot
dbSnapshot = Maybe DBSnapshot
a} :: CopyDBSnapshotResponse)
copyDBSnapshotResponse_httpStatus :: Lens.Lens' CopyDBSnapshotResponse Prelude.Int
copyDBSnapshotResponse_httpStatus :: (Int -> f Int)
-> CopyDBSnapshotResponse -> f CopyDBSnapshotResponse
copyDBSnapshotResponse_httpStatus = (CopyDBSnapshotResponse -> Int)
-> (CopyDBSnapshotResponse -> Int -> CopyDBSnapshotResponse)
-> Lens CopyDBSnapshotResponse CopyDBSnapshotResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyDBSnapshotResponse' {Int
httpStatus :: Int
$sel:httpStatus:CopyDBSnapshotResponse' :: CopyDBSnapshotResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CopyDBSnapshotResponse
s@CopyDBSnapshotResponse' {} Int
a -> CopyDBSnapshotResponse
s {$sel:httpStatus:CopyDBSnapshotResponse' :: Int
httpStatus = Int
a} :: CopyDBSnapshotResponse)
instance Prelude.NFData CopyDBSnapshotResponse