{-# 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.ModifyDBClusterSnapshotAttribute
(
modifyDBClusterSnapshotAttribute
, ModifyDBClusterSnapshotAttribute
, mdcsaValuesToAdd
, mdcsaValuesToRemove
, mdcsaDBClusterSnapshotIdentifier
, mdcsaAttributeName
, modifyDBClusterSnapshotAttributeResponse
, ModifyDBClusterSnapshotAttributeResponse
, mdcsarsDBClusterSnapshotAttributesResult
, mdcsarsResponseStatus
) 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
data ModifyDBClusterSnapshotAttribute = ModifyDBClusterSnapshotAttribute'
{ _mdcsaValuesToAdd :: !(Maybe [Text])
, _mdcsaValuesToRemove :: !(Maybe [Text])
, _mdcsaDBClusterSnapshotIdentifier :: !Text
, _mdcsaAttributeName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyDBClusterSnapshotAttribute
:: Text
-> Text
-> ModifyDBClusterSnapshotAttribute
modifyDBClusterSnapshotAttribute pDBClusterSnapshotIdentifier_ pAttributeName_ =
ModifyDBClusterSnapshotAttribute'
{ _mdcsaValuesToAdd = Nothing
, _mdcsaValuesToRemove = Nothing
, _mdcsaDBClusterSnapshotIdentifier = pDBClusterSnapshotIdentifier_
, _mdcsaAttributeName = pAttributeName_
}
mdcsaValuesToAdd :: Lens' ModifyDBClusterSnapshotAttribute [Text]
mdcsaValuesToAdd = lens _mdcsaValuesToAdd (\ s a -> s{_mdcsaValuesToAdd = a}) . _Default . _Coerce;
mdcsaValuesToRemove :: Lens' ModifyDBClusterSnapshotAttribute [Text]
mdcsaValuesToRemove = lens _mdcsaValuesToRemove (\ s a -> s{_mdcsaValuesToRemove = a}) . _Default . _Coerce;
mdcsaDBClusterSnapshotIdentifier :: Lens' ModifyDBClusterSnapshotAttribute Text
mdcsaDBClusterSnapshotIdentifier = lens _mdcsaDBClusterSnapshotIdentifier (\ s a -> s{_mdcsaDBClusterSnapshotIdentifier = a});
mdcsaAttributeName :: Lens' ModifyDBClusterSnapshotAttribute Text
mdcsaAttributeName = lens _mdcsaAttributeName (\ s a -> s{_mdcsaAttributeName = a});
instance AWSRequest ModifyDBClusterSnapshotAttribute
where
type Rs ModifyDBClusterSnapshotAttribute =
ModifyDBClusterSnapshotAttributeResponse
request = postQuery rds
response
= receiveXMLWrapper
"ModifyDBClusterSnapshotAttributeResult"
(\ s h x ->
ModifyDBClusterSnapshotAttributeResponse' <$>
(x .@? "DBClusterSnapshotAttributesResult") <*>
(pure (fromEnum s)))
instance Hashable ModifyDBClusterSnapshotAttribute
instance NFData ModifyDBClusterSnapshotAttribute
instance ToHeaders ModifyDBClusterSnapshotAttribute
where
toHeaders = const mempty
instance ToPath ModifyDBClusterSnapshotAttribute
where
toPath = const "/"
instance ToQuery ModifyDBClusterSnapshotAttribute
where
toQuery ModifyDBClusterSnapshotAttribute'{..}
= mconcat
["Action" =:
("ModifyDBClusterSnapshotAttribute" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"ValuesToAdd" =:
toQuery
(toQueryList "AttributeValue" <$> _mdcsaValuesToAdd),
"ValuesToRemove" =:
toQuery
(toQueryList "AttributeValue" <$>
_mdcsaValuesToRemove),
"DBClusterSnapshotIdentifier" =:
_mdcsaDBClusterSnapshotIdentifier,
"AttributeName" =: _mdcsaAttributeName]
data ModifyDBClusterSnapshotAttributeResponse = ModifyDBClusterSnapshotAttributeResponse'
{ _mdcsarsDBClusterSnapshotAttributesResult :: !(Maybe DBClusterSnapshotAttributesResult)
, _mdcsarsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyDBClusterSnapshotAttributeResponse
:: Int
-> ModifyDBClusterSnapshotAttributeResponse
modifyDBClusterSnapshotAttributeResponse pResponseStatus_ =
ModifyDBClusterSnapshotAttributeResponse'
{ _mdcsarsDBClusterSnapshotAttributesResult = Nothing
, _mdcsarsResponseStatus = pResponseStatus_
}
mdcsarsDBClusterSnapshotAttributesResult :: Lens' ModifyDBClusterSnapshotAttributeResponse (Maybe DBClusterSnapshotAttributesResult)
mdcsarsDBClusterSnapshotAttributesResult = lens _mdcsarsDBClusterSnapshotAttributesResult (\ s a -> s{_mdcsarsDBClusterSnapshotAttributesResult = a});
mdcsarsResponseStatus :: Lens' ModifyDBClusterSnapshotAttributeResponse Int
mdcsarsResponseStatus = lens _mdcsarsResponseStatus (\ s a -> s{_mdcsarsResponseStatus = a});
instance NFData
ModifyDBClusterSnapshotAttributeResponse