module Network.AWS.ElastiCache.ModifyCacheParameterGroup
(
ModifyCacheParameterGroup
, modifyCacheParameterGroup
, mcpgCacheParameterGroupName
, mcpgParameterNameValues
, ModifyCacheParameterGroupResponse
, modifyCacheParameterGroupResponse
, mcpgrCacheParameterGroupName
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.ElastiCache.Types
import qualified GHC.Exts
data ModifyCacheParameterGroup = ModifyCacheParameterGroup
{ _mcpgCacheParameterGroupName :: Text
, _mcpgParameterNameValues :: List "member" ParameterNameValue
} deriving (Eq, Read, Show)
modifyCacheParameterGroup :: Text
-> ModifyCacheParameterGroup
modifyCacheParameterGroup p1 = ModifyCacheParameterGroup
{ _mcpgCacheParameterGroupName = p1
, _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 })
. _List
newtype ModifyCacheParameterGroupResponse = ModifyCacheParameterGroupResponse
{ _mcpgrCacheParameterGroupName :: Maybe Text
} deriving (Eq, Ord, Read, Show, Monoid)
modifyCacheParameterGroupResponse :: ModifyCacheParameterGroupResponse
modifyCacheParameterGroupResponse = ModifyCacheParameterGroupResponse
{ _mcpgrCacheParameterGroupName = Nothing
}
mcpgrCacheParameterGroupName :: Lens' ModifyCacheParameterGroupResponse (Maybe Text)
mcpgrCacheParameterGroupName =
lens _mcpgrCacheParameterGroupName
(\s a -> s { _mcpgrCacheParameterGroupName = a })
instance ToPath ModifyCacheParameterGroup where
toPath = const "/"
instance ToQuery ModifyCacheParameterGroup where
toQuery ModifyCacheParameterGroup{..} = mconcat
[ "CacheParameterGroupName" =? _mcpgCacheParameterGroupName
, "ParameterNameValues" =? _mcpgParameterNameValues
]
instance ToHeaders ModifyCacheParameterGroup
instance AWSRequest ModifyCacheParameterGroup where
type Sv ModifyCacheParameterGroup = ElastiCache
type Rs ModifyCacheParameterGroup = ModifyCacheParameterGroupResponse
request = post "ModifyCacheParameterGroup"
response = xmlResponse
instance FromXML ModifyCacheParameterGroupResponse where
parseXML = withElement "ModifyCacheParameterGroupResult" $ \x -> ModifyCacheParameterGroupResponse
<$> x .@? "CacheParameterGroupName"