module Network.AWS.RDS.DeleteDBSnapshot
(
DeleteDBSnapshot
, deleteDBSnapshot
, ddbs1DBSnapshotIdentifier
, DeleteDBSnapshotResponse
, deleteDBSnapshotResponse
, ddbsrDBSnapshot
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.RDS.Types
import qualified GHC.Exts
newtype DeleteDBSnapshot = DeleteDBSnapshot
{ _ddbs1DBSnapshotIdentifier :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
deleteDBSnapshot :: Text
-> DeleteDBSnapshot
deleteDBSnapshot p1 = DeleteDBSnapshot
{ _ddbs1DBSnapshotIdentifier = p1
}
ddbs1DBSnapshotIdentifier :: Lens' DeleteDBSnapshot Text
ddbs1DBSnapshotIdentifier =
lens _ddbs1DBSnapshotIdentifier
(\s a -> s { _ddbs1DBSnapshotIdentifier = a })
newtype DeleteDBSnapshotResponse = DeleteDBSnapshotResponse
{ _ddbsrDBSnapshot :: Maybe DBSnapshot
} deriving (Eq, Show)
deleteDBSnapshotResponse :: DeleteDBSnapshotResponse
deleteDBSnapshotResponse = DeleteDBSnapshotResponse
{ _ddbsrDBSnapshot = Nothing
}
ddbsrDBSnapshot :: Lens' DeleteDBSnapshotResponse (Maybe DBSnapshot)
ddbsrDBSnapshot = lens _ddbsrDBSnapshot (\s a -> s { _ddbsrDBSnapshot = a })
instance ToPath DeleteDBSnapshot where
toPath = const "/"
instance ToQuery DeleteDBSnapshot where
toQuery DeleteDBSnapshot{..} = mconcat
[ "DBSnapshotIdentifier" =? _ddbs1DBSnapshotIdentifier
]
instance ToHeaders DeleteDBSnapshot
instance AWSRequest DeleteDBSnapshot where
type Sv DeleteDBSnapshot = RDS
type Rs DeleteDBSnapshot = DeleteDBSnapshotResponse
request = post "DeleteDBSnapshot"
response = xmlResponse
instance FromXML DeleteDBSnapshotResponse where
parseXML = withElement "DeleteDBSnapshotResult" $ \x -> DeleteDBSnapshotResponse
<$> x .@? "DBSnapshot"