module Network.AWS.RDS.ModifyDBSubnetGroup
(
ModifyDBSubnetGroup
, modifyDBSubnetGroup
, mdbsgDBSubnetGroupDescription
, mdbsgDBSubnetGroupName
, mdbsgSubnetIds
, ModifyDBSubnetGroupResponse
, modifyDBSubnetGroupResponse
, mdbsgrDBSubnetGroup
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
data ModifyDBSubnetGroup = ModifyDBSubnetGroup
{ _mdbsgDBSubnetGroupDescription :: Maybe Text
, _mdbsgDBSubnetGroupName :: Text
, _mdbsgSubnetIds :: List "SubnetIdentifier" Text
} deriving (Eq, Ord, Show)
modifyDBSubnetGroup :: Text
-> ModifyDBSubnetGroup
modifyDBSubnetGroup p1 = ModifyDBSubnetGroup
{ _mdbsgDBSubnetGroupName = p1
, _mdbsgDBSubnetGroupDescription = Nothing
, _mdbsgSubnetIds = mempty
}
mdbsgDBSubnetGroupDescription :: Lens' ModifyDBSubnetGroup (Maybe Text)
mdbsgDBSubnetGroupDescription =
lens _mdbsgDBSubnetGroupDescription
(\s a -> s { _mdbsgDBSubnetGroupDescription = a })
mdbsgDBSubnetGroupName :: Lens' ModifyDBSubnetGroup Text
mdbsgDBSubnetGroupName =
lens _mdbsgDBSubnetGroupName (\s a -> s { _mdbsgDBSubnetGroupName = a })
mdbsgSubnetIds :: Lens' ModifyDBSubnetGroup [Text]
mdbsgSubnetIds = lens _mdbsgSubnetIds (\s a -> s { _mdbsgSubnetIds = a }) . _List
newtype ModifyDBSubnetGroupResponse = ModifyDBSubnetGroupResponse
{ _mdbsgrDBSubnetGroup :: Maybe DBSubnetGroup
} deriving (Eq, Show)
modifyDBSubnetGroupResponse :: ModifyDBSubnetGroupResponse
modifyDBSubnetGroupResponse = ModifyDBSubnetGroupResponse
{ _mdbsgrDBSubnetGroup = Nothing
}
mdbsgrDBSubnetGroup :: Lens' ModifyDBSubnetGroupResponse (Maybe DBSubnetGroup)
mdbsgrDBSubnetGroup =
lens _mdbsgrDBSubnetGroup (\s a -> s { _mdbsgrDBSubnetGroup = a })
instance ToPath ModifyDBSubnetGroup where
toPath = const "/"
instance ToQuery ModifyDBSubnetGroup where
toQuery ModifyDBSubnetGroup{..} = mconcat
[ "DBSubnetGroupDescription" =? _mdbsgDBSubnetGroupDescription
, "DBSubnetGroupName" =? _mdbsgDBSubnetGroupName
, "SubnetIds" =? _mdbsgSubnetIds
]
instance ToHeaders ModifyDBSubnetGroup
instance AWSRequest ModifyDBSubnetGroup where
type Sv ModifyDBSubnetGroup = RDS
type Rs ModifyDBSubnetGroup = ModifyDBSubnetGroupResponse
request = post "ModifyDBSubnetGroup"
response = xmlResponse
instance FromXML ModifyDBSubnetGroupResponse where
parseXML = withElement "ModifyDBSubnetGroupResult" $ \x -> ModifyDBSubnetGroupResponse
<$> x .@? "DBSubnetGroup"