module Network.AWS.Redshift.ResetClusterParameterGroup
(
ResetClusterParameterGroup
, resetClusterParameterGroup
, rcpgParameterGroupName
, rcpgParameters
, rcpgResetAllParameters
, ResetClusterParameterGroupResponse
, resetClusterParameterGroupResponse
, rcpgrParameterGroupName
, rcpgrParameterGroupStatus
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.Redshift.Types
import qualified GHC.Exts
data ResetClusterParameterGroup = ResetClusterParameterGroup
{ _rcpgParameterGroupName :: Text
, _rcpgParameters :: List "Parameter" Parameter
, _rcpgResetAllParameters :: Maybe Bool
} deriving (Eq, Show)
resetClusterParameterGroup :: Text
-> ResetClusterParameterGroup
resetClusterParameterGroup p1 = ResetClusterParameterGroup
{ _rcpgParameterGroupName = p1
, _rcpgResetAllParameters = Nothing
, _rcpgParameters = mempty
}
rcpgParameterGroupName :: Lens' ResetClusterParameterGroup Text
rcpgParameterGroupName =
lens _rcpgParameterGroupName (\s a -> s { _rcpgParameterGroupName = a })
rcpgParameters :: Lens' ResetClusterParameterGroup [Parameter]
rcpgParameters = lens _rcpgParameters (\s a -> s { _rcpgParameters = a }) . _List
rcpgResetAllParameters :: Lens' ResetClusterParameterGroup (Maybe Bool)
rcpgResetAllParameters =
lens _rcpgResetAllParameters (\s a -> s { _rcpgResetAllParameters = a })
data ResetClusterParameterGroupResponse = ResetClusterParameterGroupResponse
{ _rcpgrParameterGroupName :: Maybe Text
, _rcpgrParameterGroupStatus :: Maybe Text
} deriving (Eq, Ord, Show)
resetClusterParameterGroupResponse :: ResetClusterParameterGroupResponse
resetClusterParameterGroupResponse = ResetClusterParameterGroupResponse
{ _rcpgrParameterGroupName = Nothing
, _rcpgrParameterGroupStatus = Nothing
}
rcpgrParameterGroupName :: Lens' ResetClusterParameterGroupResponse (Maybe Text)
rcpgrParameterGroupName =
lens _rcpgrParameterGroupName (\s a -> s { _rcpgrParameterGroupName = a })
rcpgrParameterGroupStatus :: Lens' ResetClusterParameterGroupResponse (Maybe Text)
rcpgrParameterGroupStatus =
lens _rcpgrParameterGroupStatus
(\s a -> s { _rcpgrParameterGroupStatus = a })
instance ToPath ResetClusterParameterGroup where
toPath = const "/"
instance ToQuery ResetClusterParameterGroup where
toQuery ResetClusterParameterGroup{..} = mconcat
[ "ParameterGroupName" =? _rcpgParameterGroupName
, "Parameters" =? _rcpgParameters
, "ResetAllParameters" =? _rcpgResetAllParameters
]
instance ToHeaders ResetClusterParameterGroup
instance AWSRequest ResetClusterParameterGroup where
type Sv ResetClusterParameterGroup = Redshift
type Rs ResetClusterParameterGroup = ResetClusterParameterGroupResponse
request = post "ResetClusterParameterGroup"
response = xmlResponse
instance FromXML ResetClusterParameterGroupResponse where
parseXML = withElement "ResetClusterParameterGroupResult" $ \x -> ResetClusterParameterGroupResponse
<$> x .@? "ParameterGroupName"
<*> x .@? "ParameterGroupStatus"