{-# 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.ModifyCacheParameterGroup
(
modifyCacheParameterGroup
, ModifyCacheParameterGroup
, mcpgCacheParameterGroupName
, mcpgParameterNameValues
, 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 ModifyCacheParameterGroup = ModifyCacheParameterGroup'
{ _mcpgCacheParameterGroupName :: !Text
, _mcpgParameterNameValues :: ![ParameterNameValue]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyCacheParameterGroup
:: Text
-> ModifyCacheParameterGroup
modifyCacheParameterGroup pCacheParameterGroupName_ =
ModifyCacheParameterGroup'
{ _mcpgCacheParameterGroupName = pCacheParameterGroupName_
, _mcpgParameterNameValues = mempty
}
mcpgCacheParameterGroupName :: Lens' ModifyCacheParameterGroup Text
mcpgCacheParameterGroupName = lens _mcpgCacheParameterGroupName (\ s a -> s{_mcpgCacheParameterGroupName = a});
mcpgParameterNameValues :: Lens' ModifyCacheParameterGroup [ParameterNameValue]
mcpgParameterNameValues = lens _mcpgParameterNameValues (\ s a -> s{_mcpgParameterNameValues = a}) . _Coerce;
instance AWSRequest ModifyCacheParameterGroup where
type Rs ModifyCacheParameterGroup =
CacheParameterGroupNameMessage
request = postQuery elastiCache
response
= receiveXMLWrapper "ModifyCacheParameterGroupResult"
(\ s h x -> parseXML x)
instance Hashable ModifyCacheParameterGroup
instance NFData ModifyCacheParameterGroup
instance ToHeaders ModifyCacheParameterGroup where
toHeaders = const mempty
instance ToPath ModifyCacheParameterGroup where
toPath = const "/"
instance ToQuery ModifyCacheParameterGroup where
toQuery ModifyCacheParameterGroup'{..}
= mconcat
["Action" =:
("ModifyCacheParameterGroup" :: ByteString),
"Version" =: ("2015-02-02" :: ByteString),
"CacheParameterGroupName" =:
_mcpgCacheParameterGroupName,
"ParameterNameValues" =:
toQueryList "ParameterNameValue"
_mcpgParameterNameValues]