{-# 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.ElastiCache.ResetCacheParameterGroup
(
resetCacheParameterGroup
, ResetCacheParameterGroup
, rcpgResetAllParameters
, rcpgParameterNameValues
, rcpgCacheParameterGroupName
, 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)
, _rcpgParameterNameValues :: !(Maybe [ParameterNameValue])
, _rcpgCacheParameterGroupName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resetCacheParameterGroup
:: Text
-> ResetCacheParameterGroup
resetCacheParameterGroup pCacheParameterGroupName_ =
ResetCacheParameterGroup'
{ _rcpgResetAllParameters = Nothing
, _rcpgParameterNameValues = Nothing
, _rcpgCacheParameterGroupName = pCacheParameterGroupName_
}
rcpgResetAllParameters :: Lens' ResetCacheParameterGroup (Maybe Bool)
rcpgResetAllParameters = lens _rcpgResetAllParameters (\ s a -> s{_rcpgResetAllParameters = a})
rcpgParameterNameValues :: Lens' ResetCacheParameterGroup [ParameterNameValue]
rcpgParameterNameValues = lens _rcpgParameterNameValues (\ s a -> s{_rcpgParameterNameValues = a}) . _Default . _Coerce
rcpgCacheParameterGroupName :: Lens' ResetCacheParameterGroup Text
rcpgCacheParameterGroupName = lens _rcpgCacheParameterGroupName (\ s a -> s{_rcpgCacheParameterGroupName = a})
instance AWSRequest ResetCacheParameterGroup where
type Rs ResetCacheParameterGroup =
CacheParameterGroupNameMessage
request = postQuery elastiCache
response
= receiveXMLWrapper "ResetCacheParameterGroupResult"
(\ s h x -> parseXML x)
instance Hashable ResetCacheParameterGroup where
instance NFData ResetCacheParameterGroup where
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,
"ParameterNameValues" =:
toQuery
(toQueryList "ParameterNameValue" <$>
_rcpgParameterNameValues),
"CacheParameterGroupName" =:
_rcpgCacheParameterGroupName]