module Network.AWS.RDS.CopyDBParameterGroup
(
CopyDBParameterGroup
, copyDBParameterGroup
, cdbpgSourceDBParameterGroupIdentifier
, cdbpgTags
, cdbpgTargetDBParameterGroupDescription
, cdbpgTargetDBParameterGroupIdentifier
, CopyDBParameterGroupResponse
, copyDBParameterGroupResponse
, cdbpgr1DBParameterGroup
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
data CopyDBParameterGroup = CopyDBParameterGroup
{ _cdbpgSourceDBParameterGroupIdentifier :: Text
, _cdbpgTags :: List "member" Tag
, _cdbpgTargetDBParameterGroupDescription :: Text
, _cdbpgTargetDBParameterGroupIdentifier :: Text
} deriving (Eq, Read, Show)
copyDBParameterGroup :: Text
-> Text
-> Text
-> CopyDBParameterGroup
copyDBParameterGroup p1 p2 p3 = CopyDBParameterGroup
{ _cdbpgSourceDBParameterGroupIdentifier = p1
, _cdbpgTargetDBParameterGroupIdentifier = p2
, _cdbpgTargetDBParameterGroupDescription = p3
, _cdbpgTags = mempty
}
cdbpgSourceDBParameterGroupIdentifier :: Lens' CopyDBParameterGroup Text
cdbpgSourceDBParameterGroupIdentifier =
lens _cdbpgSourceDBParameterGroupIdentifier
(\s a -> s { _cdbpgSourceDBParameterGroupIdentifier = a })
cdbpgTags :: Lens' CopyDBParameterGroup [Tag]
cdbpgTags = lens _cdbpgTags (\s a -> s { _cdbpgTags = a }) . _List
cdbpgTargetDBParameterGroupDescription :: Lens' CopyDBParameterGroup Text
cdbpgTargetDBParameterGroupDescription =
lens _cdbpgTargetDBParameterGroupDescription
(\s a -> s { _cdbpgTargetDBParameterGroupDescription = a })
cdbpgTargetDBParameterGroupIdentifier :: Lens' CopyDBParameterGroup Text
cdbpgTargetDBParameterGroupIdentifier =
lens _cdbpgTargetDBParameterGroupIdentifier
(\s a -> s { _cdbpgTargetDBParameterGroupIdentifier = a })
newtype CopyDBParameterGroupResponse = CopyDBParameterGroupResponse
{ _cdbpgr1DBParameterGroup :: Maybe DBParameterGroup
} deriving (Eq, Read, Show)
copyDBParameterGroupResponse :: CopyDBParameterGroupResponse
copyDBParameterGroupResponse = CopyDBParameterGroupResponse
{ _cdbpgr1DBParameterGroup = Nothing
}
cdbpgr1DBParameterGroup :: Lens' CopyDBParameterGroupResponse (Maybe DBParameterGroup)
cdbpgr1DBParameterGroup =
lens _cdbpgr1DBParameterGroup (\s a -> s { _cdbpgr1DBParameterGroup = a })
instance ToPath CopyDBParameterGroup where
toPath = const "/"
instance ToQuery CopyDBParameterGroup where
toQuery CopyDBParameterGroup{..} = mconcat
[ "SourceDBParameterGroupIdentifier" =? _cdbpgSourceDBParameterGroupIdentifier
, "Tags" =? _cdbpgTags
, "TargetDBParameterGroupDescription" =? _cdbpgTargetDBParameterGroupDescription
, "TargetDBParameterGroupIdentifier" =? _cdbpgTargetDBParameterGroupIdentifier
]
instance ToHeaders CopyDBParameterGroup
instance AWSRequest CopyDBParameterGroup where
type Sv CopyDBParameterGroup = RDS
type Rs CopyDBParameterGroup = CopyDBParameterGroupResponse
request = post "CopyDBParameterGroup"
response = xmlResponse
instance FromXML CopyDBParameterGroupResponse where
parseXML = withElement "CopyDBParameterGroupResult" $ \x -> CopyDBParameterGroupResponse
<$> x .@? "DBParameterGroup"