{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.RDS.DescribeDBSnapshotAttributes
(
describeDBSnapshotAttributes
, DescribeDBSnapshotAttributes
, ddsaDBSnapshotIdentifier
, describeDBSnapshotAttributesResponse
, DescribeDBSnapshotAttributesResponse
, ddsarsDBSnapshotAttributesResult
, ddsarsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.RDS.Types
import Network.AWS.RDS.Types.Product
import Network.AWS.Request
import Network.AWS.Response
newtype DescribeDBSnapshotAttributes = DescribeDBSnapshotAttributes'
{ _ddsaDBSnapshotIdentifier :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeDBSnapshotAttributes
:: Text
-> DescribeDBSnapshotAttributes
describeDBSnapshotAttributes pDBSnapshotIdentifier_ =
DescribeDBSnapshotAttributes'
{_ddsaDBSnapshotIdentifier = pDBSnapshotIdentifier_}
ddsaDBSnapshotIdentifier :: Lens' DescribeDBSnapshotAttributes Text
ddsaDBSnapshotIdentifier = lens _ddsaDBSnapshotIdentifier (\ s a -> s{_ddsaDBSnapshotIdentifier = a})
instance AWSRequest DescribeDBSnapshotAttributes
where
type Rs DescribeDBSnapshotAttributes =
DescribeDBSnapshotAttributesResponse
request = postQuery rds
response
= receiveXMLWrapper
"DescribeDBSnapshotAttributesResult"
(\ s h x ->
DescribeDBSnapshotAttributesResponse' <$>
(x .@? "DBSnapshotAttributesResult") <*>
(pure (fromEnum s)))
instance Hashable DescribeDBSnapshotAttributes where
instance NFData DescribeDBSnapshotAttributes where
instance ToHeaders DescribeDBSnapshotAttributes where
toHeaders = const mempty
instance ToPath DescribeDBSnapshotAttributes where
toPath = const "/"
instance ToQuery DescribeDBSnapshotAttributes where
toQuery DescribeDBSnapshotAttributes'{..}
= mconcat
["Action" =:
("DescribeDBSnapshotAttributes" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"DBSnapshotIdentifier" =: _ddsaDBSnapshotIdentifier]
data DescribeDBSnapshotAttributesResponse = DescribeDBSnapshotAttributesResponse'
{ _ddsarsDBSnapshotAttributesResult :: !(Maybe DBSnapshotAttributesResult)
, _ddsarsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeDBSnapshotAttributesResponse
:: Int
-> DescribeDBSnapshotAttributesResponse
describeDBSnapshotAttributesResponse pResponseStatus_ =
DescribeDBSnapshotAttributesResponse'
{ _ddsarsDBSnapshotAttributesResult = Nothing
, _ddsarsResponseStatus = pResponseStatus_
}
ddsarsDBSnapshotAttributesResult :: Lens' DescribeDBSnapshotAttributesResponse (Maybe DBSnapshotAttributesResult)
ddsarsDBSnapshotAttributesResult = lens _ddsarsDBSnapshotAttributesResult (\ s a -> s{_ddsarsDBSnapshotAttributesResult = a})
ddsarsResponseStatus :: Lens' DescribeDBSnapshotAttributesResponse Int
ddsarsResponseStatus = lens _ddsarsResponseStatus (\ s a -> s{_ddsarsResponseStatus = a})
instance NFData DescribeDBSnapshotAttributesResponse
where