module Network.AWS.ElastiCache.ResetCacheParameterGroup
(
ResetCacheParameterGroup
, resetCacheParameterGroup
, rcpgCacheParameterGroupName
, rcpgParameterNameValues
, rcpgResetAllParameters
, ResetCacheParameterGroupResponse
, resetCacheParameterGroupResponse
, rcpgrCacheParameterGroupName
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.ElastiCache.Types
import qualified GHC.Exts
data ResetCacheParameterGroup = ResetCacheParameterGroup
{ _rcpgCacheParameterGroupName :: Text
, _rcpgParameterNameValues :: List "member" ParameterNameValue
, _rcpgResetAllParameters :: Maybe Bool
} deriving (Eq, Show)
resetCacheParameterGroup :: Text
-> ResetCacheParameterGroup
resetCacheParameterGroup p1 = ResetCacheParameterGroup
{ _rcpgCacheParameterGroupName = p1
, _rcpgResetAllParameters = Nothing
, _rcpgParameterNameValues = mempty
}
rcpgCacheParameterGroupName :: Lens' ResetCacheParameterGroup Text
rcpgCacheParameterGroupName =
lens _rcpgCacheParameterGroupName
(\s a -> s { _rcpgCacheParameterGroupName = a })
rcpgParameterNameValues :: Lens' ResetCacheParameterGroup [ParameterNameValue]
rcpgParameterNameValues =
lens _rcpgParameterNameValues (\s a -> s { _rcpgParameterNameValues = a })
. _List
rcpgResetAllParameters :: Lens' ResetCacheParameterGroup (Maybe Bool)
rcpgResetAllParameters =
lens _rcpgResetAllParameters (\s a -> s { _rcpgResetAllParameters = a })
newtype ResetCacheParameterGroupResponse = ResetCacheParameterGroupResponse
{ _rcpgrCacheParameterGroupName :: Maybe Text
} deriving (Eq, Ord, Show, Monoid)
resetCacheParameterGroupResponse :: ResetCacheParameterGroupResponse
resetCacheParameterGroupResponse = ResetCacheParameterGroupResponse
{ _rcpgrCacheParameterGroupName = Nothing
}
rcpgrCacheParameterGroupName :: Lens' ResetCacheParameterGroupResponse (Maybe Text)
rcpgrCacheParameterGroupName =
lens _rcpgrCacheParameterGroupName
(\s a -> s { _rcpgrCacheParameterGroupName = a })
instance ToPath ResetCacheParameterGroup where
toPath = const "/"
instance ToQuery ResetCacheParameterGroup where
toQuery ResetCacheParameterGroup{..} = mconcat
[ "CacheParameterGroupName" =? _rcpgCacheParameterGroupName
, "ParameterNameValues" =? _rcpgParameterNameValues
, "ResetAllParameters" =? _rcpgResetAllParameters
]
instance ToHeaders ResetCacheParameterGroup
instance AWSRequest ResetCacheParameterGroup where
type Sv ResetCacheParameterGroup = ElastiCache
type Rs ResetCacheParameterGroup = ResetCacheParameterGroupResponse
request = post "ResetCacheParameterGroup"
response = xmlResponse
instance FromXML ResetCacheParameterGroupResponse where
parseXML = withElement "ResetCacheParameterGroupResult" $ \x -> ResetCacheParameterGroupResponse
<$> x .@? "CacheParameterGroupName"