{-# 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.DescribeDBClusterSnapshotAttributes
(
DescribeDBClusterSnapshotAttributes (..),
newDescribeDBClusterSnapshotAttributes,
describeDBClusterSnapshotAttributes_dbClusterSnapshotIdentifier,
DescribeDBClusterSnapshotAttributesResponse (..),
newDescribeDBClusterSnapshotAttributesResponse,
describeDBClusterSnapshotAttributesResponse_dbClusterSnapshotAttributesResult,
describeDBClusterSnapshotAttributesResponse_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 DescribeDBClusterSnapshotAttributes = DescribeDBClusterSnapshotAttributes'
{
DescribeDBClusterSnapshotAttributes -> Text
dbClusterSnapshotIdentifier :: Prelude.Text
}
deriving (DescribeDBClusterSnapshotAttributes
-> DescribeDBClusterSnapshotAttributes -> Bool
(DescribeDBClusterSnapshotAttributes
-> DescribeDBClusterSnapshotAttributes -> Bool)
-> (DescribeDBClusterSnapshotAttributes
-> DescribeDBClusterSnapshotAttributes -> Bool)
-> Eq DescribeDBClusterSnapshotAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBClusterSnapshotAttributes
-> DescribeDBClusterSnapshotAttributes -> Bool
$c/= :: DescribeDBClusterSnapshotAttributes
-> DescribeDBClusterSnapshotAttributes -> Bool
== :: DescribeDBClusterSnapshotAttributes
-> DescribeDBClusterSnapshotAttributes -> Bool
$c== :: DescribeDBClusterSnapshotAttributes
-> DescribeDBClusterSnapshotAttributes -> Bool
Prelude.Eq, ReadPrec [DescribeDBClusterSnapshotAttributes]
ReadPrec DescribeDBClusterSnapshotAttributes
Int -> ReadS DescribeDBClusterSnapshotAttributes
ReadS [DescribeDBClusterSnapshotAttributes]
(Int -> ReadS DescribeDBClusterSnapshotAttributes)
-> ReadS [DescribeDBClusterSnapshotAttributes]
-> ReadPrec DescribeDBClusterSnapshotAttributes
-> ReadPrec [DescribeDBClusterSnapshotAttributes]
-> Read DescribeDBClusterSnapshotAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBClusterSnapshotAttributes]
$creadListPrec :: ReadPrec [DescribeDBClusterSnapshotAttributes]
readPrec :: ReadPrec DescribeDBClusterSnapshotAttributes
$creadPrec :: ReadPrec DescribeDBClusterSnapshotAttributes
readList :: ReadS [DescribeDBClusterSnapshotAttributes]
$creadList :: ReadS [DescribeDBClusterSnapshotAttributes]
readsPrec :: Int -> ReadS DescribeDBClusterSnapshotAttributes
$creadsPrec :: Int -> ReadS DescribeDBClusterSnapshotAttributes
Prelude.Read, Int -> DescribeDBClusterSnapshotAttributes -> ShowS
[DescribeDBClusterSnapshotAttributes] -> ShowS
DescribeDBClusterSnapshotAttributes -> String
(Int -> DescribeDBClusterSnapshotAttributes -> ShowS)
-> (DescribeDBClusterSnapshotAttributes -> String)
-> ([DescribeDBClusterSnapshotAttributes] -> ShowS)
-> Show DescribeDBClusterSnapshotAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBClusterSnapshotAttributes] -> ShowS
$cshowList :: [DescribeDBClusterSnapshotAttributes] -> ShowS
show :: DescribeDBClusterSnapshotAttributes -> String
$cshow :: DescribeDBClusterSnapshotAttributes -> String
showsPrec :: Int -> DescribeDBClusterSnapshotAttributes -> ShowS
$cshowsPrec :: Int -> DescribeDBClusterSnapshotAttributes -> ShowS
Prelude.Show, (forall x.
DescribeDBClusterSnapshotAttributes
-> Rep DescribeDBClusterSnapshotAttributes x)
-> (forall x.
Rep DescribeDBClusterSnapshotAttributes x
-> DescribeDBClusterSnapshotAttributes)
-> Generic DescribeDBClusterSnapshotAttributes
forall x.
Rep DescribeDBClusterSnapshotAttributes x
-> DescribeDBClusterSnapshotAttributes
forall x.
DescribeDBClusterSnapshotAttributes
-> Rep DescribeDBClusterSnapshotAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDBClusterSnapshotAttributes x
-> DescribeDBClusterSnapshotAttributes
$cfrom :: forall x.
DescribeDBClusterSnapshotAttributes
-> Rep DescribeDBClusterSnapshotAttributes x
Prelude.Generic)
newDescribeDBClusterSnapshotAttributes ::
Prelude.Text ->
DescribeDBClusterSnapshotAttributes
newDescribeDBClusterSnapshotAttributes :: Text -> DescribeDBClusterSnapshotAttributes
newDescribeDBClusterSnapshotAttributes
Text
pDBClusterSnapshotIdentifier_ =
DescribeDBClusterSnapshotAttributes' :: Text -> DescribeDBClusterSnapshotAttributes
DescribeDBClusterSnapshotAttributes'
{ $sel:dbClusterSnapshotIdentifier:DescribeDBClusterSnapshotAttributes' :: Text
dbClusterSnapshotIdentifier =
Text
pDBClusterSnapshotIdentifier_
}
describeDBClusterSnapshotAttributes_dbClusterSnapshotIdentifier :: Lens.Lens' DescribeDBClusterSnapshotAttributes Prelude.Text
describeDBClusterSnapshotAttributes_dbClusterSnapshotIdentifier :: (Text -> f Text)
-> DescribeDBClusterSnapshotAttributes
-> f DescribeDBClusterSnapshotAttributes
describeDBClusterSnapshotAttributes_dbClusterSnapshotIdentifier = (DescribeDBClusterSnapshotAttributes -> Text)
-> (DescribeDBClusterSnapshotAttributes
-> Text -> DescribeDBClusterSnapshotAttributes)
-> Lens
DescribeDBClusterSnapshotAttributes
DescribeDBClusterSnapshotAttributes
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshotAttributes' {Text
dbClusterSnapshotIdentifier :: Text
$sel:dbClusterSnapshotIdentifier:DescribeDBClusterSnapshotAttributes' :: DescribeDBClusterSnapshotAttributes -> Text
dbClusterSnapshotIdentifier} -> Text
dbClusterSnapshotIdentifier) (\s :: DescribeDBClusterSnapshotAttributes
s@DescribeDBClusterSnapshotAttributes' {} Text
a -> DescribeDBClusterSnapshotAttributes
s {$sel:dbClusterSnapshotIdentifier:DescribeDBClusterSnapshotAttributes' :: Text
dbClusterSnapshotIdentifier = Text
a} :: DescribeDBClusterSnapshotAttributes)
instance
Core.AWSRequest
DescribeDBClusterSnapshotAttributes
where
type
AWSResponse DescribeDBClusterSnapshotAttributes =
DescribeDBClusterSnapshotAttributesResponse
request :: DescribeDBClusterSnapshotAttributes
-> Request DescribeDBClusterSnapshotAttributes
request = Service
-> DescribeDBClusterSnapshotAttributes
-> Request DescribeDBClusterSnapshotAttributes
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeDBClusterSnapshotAttributes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeDBClusterSnapshotAttributes)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeDBClusterSnapshotAttributes))
-> Logger
-> Service
-> Proxy DescribeDBClusterSnapshotAttributes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeDBClusterSnapshotAttributes)))
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
"DescribeDBClusterSnapshotAttributesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe DBClusterSnapshotAttributesResult
-> Int -> DescribeDBClusterSnapshotAttributesResponse
DescribeDBClusterSnapshotAttributesResponse'
(Maybe DBClusterSnapshotAttributesResult
-> Int -> DescribeDBClusterSnapshotAttributesResponse)
-> Either String (Maybe DBClusterSnapshotAttributesResult)
-> Either
String (Int -> DescribeDBClusterSnapshotAttributesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text -> Either String (Maybe DBClusterSnapshotAttributesResult)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterSnapshotAttributesResult")
Either String (Int -> DescribeDBClusterSnapshotAttributesResponse)
-> Either String Int
-> Either String DescribeDBClusterSnapshotAttributesResponse
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
DescribeDBClusterSnapshotAttributes
instance
Prelude.NFData
DescribeDBClusterSnapshotAttributes
instance
Core.ToHeaders
DescribeDBClusterSnapshotAttributes
where
toHeaders :: DescribeDBClusterSnapshotAttributes -> ResponseHeaders
toHeaders = ResponseHeaders
-> DescribeDBClusterSnapshotAttributes -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
DescribeDBClusterSnapshotAttributes
where
toPath :: DescribeDBClusterSnapshotAttributes -> ByteString
toPath = ByteString -> DescribeDBClusterSnapshotAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DescribeDBClusterSnapshotAttributes
where
toQuery :: DescribeDBClusterSnapshotAttributes -> QueryString
toQuery DescribeDBClusterSnapshotAttributes' {Text
dbClusterSnapshotIdentifier :: Text
$sel:dbClusterSnapshotIdentifier:DescribeDBClusterSnapshotAttributes' :: DescribeDBClusterSnapshotAttributes -> 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
"DescribeDBClusterSnapshotAttributes" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"DBClusterSnapshotIdentifier"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterSnapshotIdentifier
]
data DescribeDBClusterSnapshotAttributesResponse = DescribeDBClusterSnapshotAttributesResponse'
{ DescribeDBClusterSnapshotAttributesResponse
-> Maybe DBClusterSnapshotAttributesResult
dbClusterSnapshotAttributesResult :: Prelude.Maybe DBClusterSnapshotAttributesResult,
DescribeDBClusterSnapshotAttributesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeDBClusterSnapshotAttributesResponse
-> DescribeDBClusterSnapshotAttributesResponse -> Bool
(DescribeDBClusterSnapshotAttributesResponse
-> DescribeDBClusterSnapshotAttributesResponse -> Bool)
-> (DescribeDBClusterSnapshotAttributesResponse
-> DescribeDBClusterSnapshotAttributesResponse -> Bool)
-> Eq DescribeDBClusterSnapshotAttributesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBClusterSnapshotAttributesResponse
-> DescribeDBClusterSnapshotAttributesResponse -> Bool
$c/= :: DescribeDBClusterSnapshotAttributesResponse
-> DescribeDBClusterSnapshotAttributesResponse -> Bool
== :: DescribeDBClusterSnapshotAttributesResponse
-> DescribeDBClusterSnapshotAttributesResponse -> Bool
$c== :: DescribeDBClusterSnapshotAttributesResponse
-> DescribeDBClusterSnapshotAttributesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDBClusterSnapshotAttributesResponse]
ReadPrec DescribeDBClusterSnapshotAttributesResponse
Int -> ReadS DescribeDBClusterSnapshotAttributesResponse
ReadS [DescribeDBClusterSnapshotAttributesResponse]
(Int -> ReadS DescribeDBClusterSnapshotAttributesResponse)
-> ReadS [DescribeDBClusterSnapshotAttributesResponse]
-> ReadPrec DescribeDBClusterSnapshotAttributesResponse
-> ReadPrec [DescribeDBClusterSnapshotAttributesResponse]
-> Read DescribeDBClusterSnapshotAttributesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBClusterSnapshotAttributesResponse]
$creadListPrec :: ReadPrec [DescribeDBClusterSnapshotAttributesResponse]
readPrec :: ReadPrec DescribeDBClusterSnapshotAttributesResponse
$creadPrec :: ReadPrec DescribeDBClusterSnapshotAttributesResponse
readList :: ReadS [DescribeDBClusterSnapshotAttributesResponse]
$creadList :: ReadS [DescribeDBClusterSnapshotAttributesResponse]
readsPrec :: Int -> ReadS DescribeDBClusterSnapshotAttributesResponse
$creadsPrec :: Int -> ReadS DescribeDBClusterSnapshotAttributesResponse
Prelude.Read, Int -> DescribeDBClusterSnapshotAttributesResponse -> ShowS
[DescribeDBClusterSnapshotAttributesResponse] -> ShowS
DescribeDBClusterSnapshotAttributesResponse -> String
(Int -> DescribeDBClusterSnapshotAttributesResponse -> ShowS)
-> (DescribeDBClusterSnapshotAttributesResponse -> String)
-> ([DescribeDBClusterSnapshotAttributesResponse] -> ShowS)
-> Show DescribeDBClusterSnapshotAttributesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBClusterSnapshotAttributesResponse] -> ShowS
$cshowList :: [DescribeDBClusterSnapshotAttributesResponse] -> ShowS
show :: DescribeDBClusterSnapshotAttributesResponse -> String
$cshow :: DescribeDBClusterSnapshotAttributesResponse -> String
showsPrec :: Int -> DescribeDBClusterSnapshotAttributesResponse -> ShowS
$cshowsPrec :: Int -> DescribeDBClusterSnapshotAttributesResponse -> ShowS
Prelude.Show, (forall x.
DescribeDBClusterSnapshotAttributesResponse
-> Rep DescribeDBClusterSnapshotAttributesResponse x)
-> (forall x.
Rep DescribeDBClusterSnapshotAttributesResponse x
-> DescribeDBClusterSnapshotAttributesResponse)
-> Generic DescribeDBClusterSnapshotAttributesResponse
forall x.
Rep DescribeDBClusterSnapshotAttributesResponse x
-> DescribeDBClusterSnapshotAttributesResponse
forall x.
DescribeDBClusterSnapshotAttributesResponse
-> Rep DescribeDBClusterSnapshotAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDBClusterSnapshotAttributesResponse x
-> DescribeDBClusterSnapshotAttributesResponse
$cfrom :: forall x.
DescribeDBClusterSnapshotAttributesResponse
-> Rep DescribeDBClusterSnapshotAttributesResponse x
Prelude.Generic)
newDescribeDBClusterSnapshotAttributesResponse ::
Prelude.Int ->
DescribeDBClusterSnapshotAttributesResponse
newDescribeDBClusterSnapshotAttributesResponse :: Int -> DescribeDBClusterSnapshotAttributesResponse
newDescribeDBClusterSnapshotAttributesResponse
Int
pHttpStatus_ =
DescribeDBClusterSnapshotAttributesResponse' :: Maybe DBClusterSnapshotAttributesResult
-> Int -> DescribeDBClusterSnapshotAttributesResponse
DescribeDBClusterSnapshotAttributesResponse'
{ $sel:dbClusterSnapshotAttributesResult:DescribeDBClusterSnapshotAttributesResponse' :: Maybe DBClusterSnapshotAttributesResult
dbClusterSnapshotAttributesResult =
Maybe DBClusterSnapshotAttributesResult
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeDBClusterSnapshotAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeDBClusterSnapshotAttributesResponse_dbClusterSnapshotAttributesResult :: Lens.Lens' DescribeDBClusterSnapshotAttributesResponse (Prelude.Maybe DBClusterSnapshotAttributesResult)
describeDBClusterSnapshotAttributesResponse_dbClusterSnapshotAttributesResult :: (Maybe DBClusterSnapshotAttributesResult
-> f (Maybe DBClusterSnapshotAttributesResult))
-> DescribeDBClusterSnapshotAttributesResponse
-> f DescribeDBClusterSnapshotAttributesResponse
describeDBClusterSnapshotAttributesResponse_dbClusterSnapshotAttributesResult = (DescribeDBClusterSnapshotAttributesResponse
-> Maybe DBClusterSnapshotAttributesResult)
-> (DescribeDBClusterSnapshotAttributesResponse
-> Maybe DBClusterSnapshotAttributesResult
-> DescribeDBClusterSnapshotAttributesResponse)
-> Lens
DescribeDBClusterSnapshotAttributesResponse
DescribeDBClusterSnapshotAttributesResponse
(Maybe DBClusterSnapshotAttributesResult)
(Maybe DBClusterSnapshotAttributesResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshotAttributesResponse' {Maybe DBClusterSnapshotAttributesResult
dbClusterSnapshotAttributesResult :: Maybe DBClusterSnapshotAttributesResult
$sel:dbClusterSnapshotAttributesResult:DescribeDBClusterSnapshotAttributesResponse' :: DescribeDBClusterSnapshotAttributesResponse
-> Maybe DBClusterSnapshotAttributesResult
dbClusterSnapshotAttributesResult} -> Maybe DBClusterSnapshotAttributesResult
dbClusterSnapshotAttributesResult) (\s :: DescribeDBClusterSnapshotAttributesResponse
s@DescribeDBClusterSnapshotAttributesResponse' {} Maybe DBClusterSnapshotAttributesResult
a -> DescribeDBClusterSnapshotAttributesResponse
s {$sel:dbClusterSnapshotAttributesResult:DescribeDBClusterSnapshotAttributesResponse' :: Maybe DBClusterSnapshotAttributesResult
dbClusterSnapshotAttributesResult = Maybe DBClusterSnapshotAttributesResult
a} :: DescribeDBClusterSnapshotAttributesResponse)
describeDBClusterSnapshotAttributesResponse_httpStatus :: Lens.Lens' DescribeDBClusterSnapshotAttributesResponse Prelude.Int
describeDBClusterSnapshotAttributesResponse_httpStatus :: (Int -> f Int)
-> DescribeDBClusterSnapshotAttributesResponse
-> f DescribeDBClusterSnapshotAttributesResponse
describeDBClusterSnapshotAttributesResponse_httpStatus = (DescribeDBClusterSnapshotAttributesResponse -> Int)
-> (DescribeDBClusterSnapshotAttributesResponse
-> Int -> DescribeDBClusterSnapshotAttributesResponse)
-> Lens
DescribeDBClusterSnapshotAttributesResponse
DescribeDBClusterSnapshotAttributesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshotAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeDBClusterSnapshotAttributesResponse' :: DescribeDBClusterSnapshotAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeDBClusterSnapshotAttributesResponse
s@DescribeDBClusterSnapshotAttributesResponse' {} Int
a -> DescribeDBClusterSnapshotAttributesResponse
s {$sel:httpStatus:DescribeDBClusterSnapshotAttributesResponse' :: Int
httpStatus = Int
a} :: DescribeDBClusterSnapshotAttributesResponse)
instance
Prelude.NFData
DescribeDBClusterSnapshotAttributesResponse