module Network.AWS.Redshift.ModifyClusterParameterGroup
(
ModifyClusterParameterGroup
, modifyClusterParameterGroup
, mcpgParameterGroupName
, mcpgParameters
, ModifyClusterParameterGroupResponse
, modifyClusterParameterGroupResponse
, mcpgrParameterGroupName
, mcpgrParameterGroupStatus
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.Redshift.Types
import qualified GHC.Exts
data ModifyClusterParameterGroup = ModifyClusterParameterGroup
{ _mcpgParameterGroupName :: Text
, _mcpgParameters :: List "member" Parameter
} deriving (Eq, Read, Show)
modifyClusterParameterGroup :: Text
-> ModifyClusterParameterGroup
modifyClusterParameterGroup p1 = ModifyClusterParameterGroup
{ _mcpgParameterGroupName = p1
, _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 }) . _List
data ModifyClusterParameterGroupResponse = ModifyClusterParameterGroupResponse
{ _mcpgrParameterGroupName :: Maybe Text
, _mcpgrParameterGroupStatus :: Maybe Text
} deriving (Eq, Ord, Read, Show)
modifyClusterParameterGroupResponse :: ModifyClusterParameterGroupResponse
modifyClusterParameterGroupResponse = ModifyClusterParameterGroupResponse
{ _mcpgrParameterGroupName = Nothing
, _mcpgrParameterGroupStatus = Nothing
}
mcpgrParameterGroupName :: Lens' ModifyClusterParameterGroupResponse (Maybe Text)
mcpgrParameterGroupName =
lens _mcpgrParameterGroupName (\s a -> s { _mcpgrParameterGroupName = a })
mcpgrParameterGroupStatus :: Lens' ModifyClusterParameterGroupResponse (Maybe Text)
mcpgrParameterGroupStatus =
lens _mcpgrParameterGroupStatus
(\s a -> s { _mcpgrParameterGroupStatus = a })
instance ToPath ModifyClusterParameterGroup where
toPath = const "/"
instance ToQuery ModifyClusterParameterGroup where
toQuery ModifyClusterParameterGroup{..} = mconcat
[ "ParameterGroupName" =? _mcpgParameterGroupName
, "Parameters" =? _mcpgParameters
]
instance ToHeaders ModifyClusterParameterGroup
instance AWSRequest ModifyClusterParameterGroup where
type Sv ModifyClusterParameterGroup = Redshift
type Rs ModifyClusterParameterGroup = ModifyClusterParameterGroupResponse
request = post "ModifyClusterParameterGroup"
response = xmlResponse
instance FromXML ModifyClusterParameterGroupResponse where
parseXML = withElement "ModifyClusterParameterGroupResult" $ \x -> ModifyClusterParameterGroupResponse
<$> x .@? "ParameterGroupName"
<*> x .@? "ParameterGroupStatus"