module Network.AWS.Redshift.ModifyClusterSubnetGroup
(
ModifyClusterSubnetGroup
, modifyClusterSubnetGroup
, mcsgClusterSubnetGroupName
, mcsgDescription
, mcsgSubnetIds
, ModifyClusterSubnetGroupResponse
, modifyClusterSubnetGroupResponse
, mcsgrClusterSubnetGroup
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.Redshift.Types
import qualified GHC.Exts
data ModifyClusterSubnetGroup = ModifyClusterSubnetGroup
{ _mcsgClusterSubnetGroupName :: Text
, _mcsgDescription :: Maybe Text
, _mcsgSubnetIds :: List "member" Text
} deriving (Eq, Ord, Read, Show)
modifyClusterSubnetGroup :: Text
-> ModifyClusterSubnetGroup
modifyClusterSubnetGroup p1 = ModifyClusterSubnetGroup
{ _mcsgClusterSubnetGroupName = p1
, _mcsgDescription = Nothing
, _mcsgSubnetIds = mempty
}
mcsgClusterSubnetGroupName :: Lens' ModifyClusterSubnetGroup Text
mcsgClusterSubnetGroupName =
lens _mcsgClusterSubnetGroupName
(\s a -> s { _mcsgClusterSubnetGroupName = a })
mcsgDescription :: Lens' ModifyClusterSubnetGroup (Maybe Text)
mcsgDescription = lens _mcsgDescription (\s a -> s { _mcsgDescription = a })
mcsgSubnetIds :: Lens' ModifyClusterSubnetGroup [Text]
mcsgSubnetIds = lens _mcsgSubnetIds (\s a -> s { _mcsgSubnetIds = a }) . _List
newtype ModifyClusterSubnetGroupResponse = ModifyClusterSubnetGroupResponse
{ _mcsgrClusterSubnetGroup :: Maybe ClusterSubnetGroup
} deriving (Eq, Read, Show)
modifyClusterSubnetGroupResponse :: ModifyClusterSubnetGroupResponse
modifyClusterSubnetGroupResponse = ModifyClusterSubnetGroupResponse
{ _mcsgrClusterSubnetGroup = Nothing
}
mcsgrClusterSubnetGroup :: Lens' ModifyClusterSubnetGroupResponse (Maybe ClusterSubnetGroup)
mcsgrClusterSubnetGroup =
lens _mcsgrClusterSubnetGroup (\s a -> s { _mcsgrClusterSubnetGroup = a })
instance ToPath ModifyClusterSubnetGroup where
toPath = const "/"
instance ToQuery ModifyClusterSubnetGroup where
toQuery ModifyClusterSubnetGroup{..} = mconcat
[ "ClusterSubnetGroupName" =? _mcsgClusterSubnetGroupName
, "Description" =? _mcsgDescription
, "SubnetIds" =? _mcsgSubnetIds
]
instance ToHeaders ModifyClusterSubnetGroup
instance AWSRequest ModifyClusterSubnetGroup where
type Sv ModifyClusterSubnetGroup = Redshift
type Rs ModifyClusterSubnetGroup = ModifyClusterSubnetGroupResponse
request = post "ModifyClusterSubnetGroup"
response = xmlResponse
instance FromXML ModifyClusterSubnetGroupResponse where
parseXML = withElement "ModifyClusterSubnetGroupResult" $ \x -> ModifyClusterSubnetGroupResponse
<$> x .@? "ClusterSubnetGroup"