module Network.AWS.RDS.DeleteDBSnapshot
(
deleteDBSnapshot
, DeleteDBSnapshot
, ddbsDBSnapshotIdentifier
, deleteDBSnapshotResponse
, DeleteDBSnapshotResponse
, ddbsrsDBSnapshot
, ddbsrsStatus
) where
import Network.AWS.Prelude
import Network.AWS.RDS.Types
import Network.AWS.RDS.Types.Product
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteDBSnapshot = DeleteDBSnapshot'
{ _ddbsDBSnapshotIdentifier :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteDBSnapshot
:: Text
-> DeleteDBSnapshot
deleteDBSnapshot pDBSnapshotIdentifier_ =
DeleteDBSnapshot'
{ _ddbsDBSnapshotIdentifier = pDBSnapshotIdentifier_
}
ddbsDBSnapshotIdentifier :: Lens' DeleteDBSnapshot Text
ddbsDBSnapshotIdentifier = lens _ddbsDBSnapshotIdentifier (\ s a -> s{_ddbsDBSnapshotIdentifier = a});
instance AWSRequest DeleteDBSnapshot where
type Sv DeleteDBSnapshot = RDS
type Rs DeleteDBSnapshot = DeleteDBSnapshotResponse
request = postQuery
response
= receiveXMLWrapper "DeleteDBSnapshotResult"
(\ s h x ->
DeleteDBSnapshotResponse' <$>
(x .@? "DBSnapshot") <*> (pure (fromEnum s)))
instance ToHeaders DeleteDBSnapshot where
toHeaders = const mempty
instance ToPath DeleteDBSnapshot where
toPath = const "/"
instance ToQuery DeleteDBSnapshot where
toQuery DeleteDBSnapshot'{..}
= mconcat
["Action" =: ("DeleteDBSnapshot" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"DBSnapshotIdentifier" =: _ddbsDBSnapshotIdentifier]
data DeleteDBSnapshotResponse = DeleteDBSnapshotResponse'
{ _ddbsrsDBSnapshot :: !(Maybe DBSnapshot)
, _ddbsrsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteDBSnapshotResponse
:: Int
-> DeleteDBSnapshotResponse
deleteDBSnapshotResponse pStatus_ =
DeleteDBSnapshotResponse'
{ _ddbsrsDBSnapshot = Nothing
, _ddbsrsStatus = pStatus_
}
ddbsrsDBSnapshot :: Lens' DeleteDBSnapshotResponse (Maybe DBSnapshot)
ddbsrsDBSnapshot = lens _ddbsrsDBSnapshot (\ s a -> s{_ddbsrsDBSnapshot = a});
ddbsrsStatus :: Lens' DeleteDBSnapshotResponse Int
ddbsrsStatus = lens _ddbsrsStatus (\ s a -> s{_ddbsrsStatus = a});