{-# 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.ResetDBClusterParameterGroup
(
resetDBClusterParameterGroup
, ResetDBClusterParameterGroup
, rdcpgResetAllParameters
, rdcpgParameters
, rdcpgDBClusterParameterGroupName
, dbClusterParameterGroupNameMessage
, DBClusterParameterGroupNameMessage
, dcpgnmDBClusterParameterGroupName
) 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 ResetDBClusterParameterGroup = ResetDBClusterParameterGroup'
{ _rdcpgResetAllParameters :: !(Maybe Bool)
, _rdcpgParameters :: !(Maybe [Parameter])
, _rdcpgDBClusterParameterGroupName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resetDBClusterParameterGroup
:: Text
-> ResetDBClusterParameterGroup
resetDBClusterParameterGroup pDBClusterParameterGroupName_ =
ResetDBClusterParameterGroup'
{ _rdcpgResetAllParameters = Nothing
, _rdcpgParameters = Nothing
, _rdcpgDBClusterParameterGroupName = pDBClusterParameterGroupName_
}
rdcpgResetAllParameters :: Lens' ResetDBClusterParameterGroup (Maybe Bool)
rdcpgResetAllParameters = lens _rdcpgResetAllParameters (\ s a -> s{_rdcpgResetAllParameters = a})
rdcpgParameters :: Lens' ResetDBClusterParameterGroup [Parameter]
rdcpgParameters = lens _rdcpgParameters (\ s a -> s{_rdcpgParameters = a}) . _Default . _Coerce
rdcpgDBClusterParameterGroupName :: Lens' ResetDBClusterParameterGroup Text
rdcpgDBClusterParameterGroupName = lens _rdcpgDBClusterParameterGroupName (\ s a -> s{_rdcpgDBClusterParameterGroupName = a})
instance AWSRequest ResetDBClusterParameterGroup
where
type Rs ResetDBClusterParameterGroup =
DBClusterParameterGroupNameMessage
request = postQuery rds
response
= receiveXMLWrapper
"ResetDBClusterParameterGroupResult"
(\ s h x -> parseXML x)
instance Hashable ResetDBClusterParameterGroup where
instance NFData ResetDBClusterParameterGroup where
instance ToHeaders ResetDBClusterParameterGroup where
toHeaders = const mempty
instance ToPath ResetDBClusterParameterGroup where
toPath = const "/"
instance ToQuery ResetDBClusterParameterGroup where
toQuery ResetDBClusterParameterGroup'{..}
= mconcat
["Action" =:
("ResetDBClusterParameterGroup" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"ResetAllParameters" =: _rdcpgResetAllParameters,
"Parameters" =:
toQuery
(toQueryList "Parameter" <$> _rdcpgParameters),
"DBClusterParameterGroupName" =:
_rdcpgDBClusterParameterGroupName]