{-# 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.Redshift.ModifyClusterParameterGroup
(
modifyClusterParameterGroup
, ModifyClusterParameterGroup
, mcpgParameterGroupName
, mcpgParameters
, clusterParameterGroupNameMessage
, ClusterParameterGroupNameMessage
, cpgnmParameterGroupStatus
, cpgnmParameterGroupName
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Redshift.Types
import Network.AWS.Redshift.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data ModifyClusterParameterGroup = ModifyClusterParameterGroup'
{ _mcpgParameterGroupName :: !Text
, _mcpgParameters :: ![Parameter]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifyClusterParameterGroup
:: Text
-> ModifyClusterParameterGroup
modifyClusterParameterGroup pParameterGroupName_ =
ModifyClusterParameterGroup'
{_mcpgParameterGroupName = pParameterGroupName_, _mcpgParameters = mempty}
mcpgParameterGroupName :: Lens' ModifyClusterParameterGroup Text
mcpgParameterGroupName = lens _mcpgParameterGroupName (\ s a -> s{_mcpgParameterGroupName = a})
mcpgParameters :: Lens' ModifyClusterParameterGroup [Parameter]
mcpgParameters = lens _mcpgParameters (\ s a -> s{_mcpgParameters = a}) . _Coerce
instance AWSRequest ModifyClusterParameterGroup where
type Rs ModifyClusterParameterGroup =
ClusterParameterGroupNameMessage
request = postQuery redshift
response
= receiveXMLWrapper
"ModifyClusterParameterGroupResult"
(\ s h x -> parseXML x)
instance Hashable ModifyClusterParameterGroup where
instance NFData ModifyClusterParameterGroup where
instance ToHeaders ModifyClusterParameterGroup where
toHeaders = const mempty
instance ToPath ModifyClusterParameterGroup where
toPath = const "/"
instance ToQuery ModifyClusterParameterGroup where
toQuery ModifyClusterParameterGroup'{..}
= mconcat
["Action" =:
("ModifyClusterParameterGroup" :: ByteString),
"Version" =: ("2012-12-01" :: ByteString),
"ParameterGroupName" =: _mcpgParameterGroupName,
"Parameters" =:
toQueryList "Parameter" _mcpgParameters]