module Network.AWS.RDS.CreateDBSubnetGroup
(
CreateDBSubnetGroup
, createDBSubnetGroup
, cdbsg1DBSubnetGroupDescription
, cdbsg1DBSubnetGroupName
, cdbsg1SubnetIds
, cdbsg1Tags
, CreateDBSubnetGroupResponse
, createDBSubnetGroupResponse
, cdbsgrDBSubnetGroup
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
data CreateDBSubnetGroup = CreateDBSubnetGroup
{ _cdbsg1DBSubnetGroupDescription :: Text
, _cdbsg1DBSubnetGroupName :: Text
, _cdbsg1SubnetIds :: List "member" Text
, _cdbsg1Tags :: List "member" Tag
} deriving (Eq, Show)
createDBSubnetGroup :: Text
-> Text
-> CreateDBSubnetGroup
createDBSubnetGroup p1 p2 = CreateDBSubnetGroup
{ _cdbsg1DBSubnetGroupName = p1
, _cdbsg1DBSubnetGroupDescription = p2
, _cdbsg1SubnetIds = mempty
, _cdbsg1Tags = mempty
}
cdbsg1DBSubnetGroupDescription :: Lens' CreateDBSubnetGroup Text
cdbsg1DBSubnetGroupDescription =
lens _cdbsg1DBSubnetGroupDescription
(\s a -> s { _cdbsg1DBSubnetGroupDescription = a })
cdbsg1DBSubnetGroupName :: Lens' CreateDBSubnetGroup Text
cdbsg1DBSubnetGroupName =
lens _cdbsg1DBSubnetGroupName (\s a -> s { _cdbsg1DBSubnetGroupName = a })
cdbsg1SubnetIds :: Lens' CreateDBSubnetGroup [Text]
cdbsg1SubnetIds = lens _cdbsg1SubnetIds (\s a -> s { _cdbsg1SubnetIds = a }) . _List
cdbsg1Tags :: Lens' CreateDBSubnetGroup [Tag]
cdbsg1Tags = lens _cdbsg1Tags (\s a -> s { _cdbsg1Tags = a }) . _List
newtype CreateDBSubnetGroupResponse = CreateDBSubnetGroupResponse
{ _cdbsgrDBSubnetGroup :: Maybe DBSubnetGroup
} deriving (Eq, Show)
createDBSubnetGroupResponse :: CreateDBSubnetGroupResponse
createDBSubnetGroupResponse = CreateDBSubnetGroupResponse
{ _cdbsgrDBSubnetGroup = Nothing
}
cdbsgrDBSubnetGroup :: Lens' CreateDBSubnetGroupResponse (Maybe DBSubnetGroup)
cdbsgrDBSubnetGroup =
lens _cdbsgrDBSubnetGroup (\s a -> s { _cdbsgrDBSubnetGroup = a })
instance ToPath CreateDBSubnetGroup where
toPath = const "/"
instance ToQuery CreateDBSubnetGroup where
toQuery CreateDBSubnetGroup{..} = mconcat
[ "DBSubnetGroupDescription" =? _cdbsg1DBSubnetGroupDescription
, "DBSubnetGroupName" =? _cdbsg1DBSubnetGroupName
, "SubnetIds" =? _cdbsg1SubnetIds
, "Tags" =? _cdbsg1Tags
]
instance ToHeaders CreateDBSubnetGroup
instance AWSRequest CreateDBSubnetGroup where
type Sv CreateDBSubnetGroup = RDS
type Rs CreateDBSubnetGroup = CreateDBSubnetGroupResponse
request = post "CreateDBSubnetGroup"
response = xmlResponse
instance FromXML CreateDBSubnetGroupResponse where
parseXML = withElement "CreateDBSubnetGroupResult" $ \x -> CreateDBSubnetGroupResponse
<$> x .@? "DBSubnetGroup"