module Network.AWS.RDS.DeleteDBClusterSnapshot
(
deleteDBClusterSnapshot
, DeleteDBClusterSnapshot
, ddcsDBClusterSnapshotIdentifier
, deleteDBClusterSnapshotResponse
, DeleteDBClusterSnapshotResponse
, ddcsrsDBClusterSnapshot
, ddcsrsStatus
) 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 DeleteDBClusterSnapshot = DeleteDBClusterSnapshot'
{ _ddcsDBClusterSnapshotIdentifier :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteDBClusterSnapshot
:: Text
-> DeleteDBClusterSnapshot
deleteDBClusterSnapshot pDBClusterSnapshotIdentifier_ =
DeleteDBClusterSnapshot'
{ _ddcsDBClusterSnapshotIdentifier = pDBClusterSnapshotIdentifier_
}
ddcsDBClusterSnapshotIdentifier :: Lens' DeleteDBClusterSnapshot Text
ddcsDBClusterSnapshotIdentifier = lens _ddcsDBClusterSnapshotIdentifier (\ s a -> s{_ddcsDBClusterSnapshotIdentifier = a});
instance AWSRequest DeleteDBClusterSnapshot where
type Sv DeleteDBClusterSnapshot = RDS
type Rs DeleteDBClusterSnapshot =
DeleteDBClusterSnapshotResponse
request = postQuery
response
= receiveXMLWrapper "DeleteDBClusterSnapshotResult"
(\ s h x ->
DeleteDBClusterSnapshotResponse' <$>
(x .@? "DBClusterSnapshot") <*> (pure (fromEnum s)))
instance ToHeaders DeleteDBClusterSnapshot where
toHeaders = const mempty
instance ToPath DeleteDBClusterSnapshot where
toPath = const "/"
instance ToQuery DeleteDBClusterSnapshot where
toQuery DeleteDBClusterSnapshot'{..}
= mconcat
["Action" =:
("DeleteDBClusterSnapshot" :: ByteString),
"Version" =: ("2014-10-31" :: ByteString),
"DBClusterSnapshotIdentifier" =:
_ddcsDBClusterSnapshotIdentifier]
data DeleteDBClusterSnapshotResponse = DeleteDBClusterSnapshotResponse'
{ _ddcsrsDBClusterSnapshot :: !(Maybe DBClusterSnapshot)
, _ddcsrsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteDBClusterSnapshotResponse
:: Int
-> DeleteDBClusterSnapshotResponse
deleteDBClusterSnapshotResponse pStatus_ =
DeleteDBClusterSnapshotResponse'
{ _ddcsrsDBClusterSnapshot = Nothing
, _ddcsrsStatus = pStatus_
}
ddcsrsDBClusterSnapshot :: Lens' DeleteDBClusterSnapshotResponse (Maybe DBClusterSnapshot)
ddcsrsDBClusterSnapshot = lens _ddcsrsDBClusterSnapshot (\ s a -> s{_ddcsrsDBClusterSnapshot = a});
ddcsrsStatus :: Lens' DeleteDBClusterSnapshotResponse Int
ddcsrsStatus = lens _ddcsrsStatus (\ s a -> s{_ddcsrsStatus = a});