module Network.AWS.ElastiCache.ResetCacheParameterGroup
(
resetCacheParameterGroup
, ResetCacheParameterGroup
, rcpgResetAllParameters
, rcpgCacheParameterGroupName
, rcpgParameterNameValues
, cacheParameterGroupNameMessage
, CacheParameterGroupNameMessage
, cpgnmCacheParameterGroupName
) where
import Network.AWS.ElastiCache.Types
import Network.AWS.ElastiCache.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data ResetCacheParameterGroup = ResetCacheParameterGroup'
{ _rcpgResetAllParameters :: !(Maybe Bool)
, _rcpgCacheParameterGroupName :: !Text
, _rcpgParameterNameValues :: ![ParameterNameValue]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resetCacheParameterGroup
:: Text
-> ResetCacheParameterGroup
resetCacheParameterGroup pCacheParameterGroupName_ =
ResetCacheParameterGroup'
{ _rcpgResetAllParameters = Nothing
, _rcpgCacheParameterGroupName = pCacheParameterGroupName_
, _rcpgParameterNameValues = mempty
}
rcpgResetAllParameters :: Lens' ResetCacheParameterGroup (Maybe Bool)
rcpgResetAllParameters = lens _rcpgResetAllParameters (\ s a -> s{_rcpgResetAllParameters = a});
rcpgCacheParameterGroupName :: Lens' ResetCacheParameterGroup Text
rcpgCacheParameterGroupName = lens _rcpgCacheParameterGroupName (\ s a -> s{_rcpgCacheParameterGroupName = a});
rcpgParameterNameValues :: Lens' ResetCacheParameterGroup [ParameterNameValue]
rcpgParameterNameValues = lens _rcpgParameterNameValues (\ s a -> s{_rcpgParameterNameValues = a}) . _Coerce;
instance AWSRequest ResetCacheParameterGroup where
type Rs ResetCacheParameterGroup =
CacheParameterGroupNameMessage
request = postQuery elastiCache
response
= receiveXMLWrapper "ResetCacheParameterGroupResult"
(\ s h x -> parseXML x)
instance Hashable ResetCacheParameterGroup
instance ToHeaders ResetCacheParameterGroup where
toHeaders = const mempty
instance ToPath ResetCacheParameterGroup where
toPath = const "/"
instance ToQuery ResetCacheParameterGroup where
toQuery ResetCacheParameterGroup'{..}
= mconcat
["Action" =:
("ResetCacheParameterGroup" :: ByteString),
"Version" =: ("2015-02-02" :: ByteString),
"ResetAllParameters" =: _rcpgResetAllParameters,
"CacheParameterGroupName" =:
_rcpgCacheParameterGroupName,
"ParameterNameValues" =:
toQueryList "ParameterNameValue"
_rcpgParameterNameValues]