{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.Redshift.DeleteClusterSnapshot
(
deleteClusterSnapshot
, DeleteClusterSnapshot
, dcsSnapshotClusterIdentifier
, dcsSnapshotIdentifier
, deleteClusterSnapshotResponse
, DeleteClusterSnapshotResponse
, dcsrsSnapshot
, dcsrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Redshift.Types
import Network.AWS.Redshift.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data DeleteClusterSnapshot = DeleteClusterSnapshot'
{ _dcsSnapshotClusterIdentifier :: !(Maybe Text)
, _dcsSnapshotIdentifier :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteClusterSnapshot
:: Text
-> DeleteClusterSnapshot
deleteClusterSnapshot pSnapshotIdentifier_ =
DeleteClusterSnapshot'
{ _dcsSnapshotClusterIdentifier = Nothing
, _dcsSnapshotIdentifier = pSnapshotIdentifier_
}
dcsSnapshotClusterIdentifier :: Lens' DeleteClusterSnapshot (Maybe Text)
dcsSnapshotClusterIdentifier = lens _dcsSnapshotClusterIdentifier (\ s a -> s{_dcsSnapshotClusterIdentifier = a});
dcsSnapshotIdentifier :: Lens' DeleteClusterSnapshot Text
dcsSnapshotIdentifier = lens _dcsSnapshotIdentifier (\ s a -> s{_dcsSnapshotIdentifier = a});
instance AWSRequest DeleteClusterSnapshot where
type Rs DeleteClusterSnapshot =
DeleteClusterSnapshotResponse
request = postQuery redshift
response
= receiveXMLWrapper "DeleteClusterSnapshotResult"
(\ s h x ->
DeleteClusterSnapshotResponse' <$>
(x .@? "Snapshot") <*> (pure (fromEnum s)))
instance Hashable DeleteClusterSnapshot
instance NFData DeleteClusterSnapshot
instance ToHeaders DeleteClusterSnapshot where
toHeaders = const mempty
instance ToPath DeleteClusterSnapshot where
toPath = const "/"
instance ToQuery DeleteClusterSnapshot where
toQuery DeleteClusterSnapshot'{..}
= mconcat
["Action" =: ("DeleteClusterSnapshot" :: ByteString),
"Version" =: ("2012-12-01" :: ByteString),
"SnapshotClusterIdentifier" =:
_dcsSnapshotClusterIdentifier,
"SnapshotIdentifier" =: _dcsSnapshotIdentifier]
data DeleteClusterSnapshotResponse = DeleteClusterSnapshotResponse'
{ _dcsrsSnapshot :: !(Maybe Snapshot)
, _dcsrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteClusterSnapshotResponse
:: Int
-> DeleteClusterSnapshotResponse
deleteClusterSnapshotResponse pResponseStatus_ =
DeleteClusterSnapshotResponse'
{ _dcsrsSnapshot = Nothing
, _dcsrsResponseStatus = pResponseStatus_
}
dcsrsSnapshot :: Lens' DeleteClusterSnapshotResponse (Maybe Snapshot)
dcsrsSnapshot = lens _dcsrsSnapshot (\ s a -> s{_dcsrsSnapshot = a});
dcsrsResponseStatus :: Lens' DeleteClusterSnapshotResponse Int
dcsrsResponseStatus = lens _dcsrsResponseStatus (\ s a -> s{_dcsrsResponseStatus = a});
instance NFData DeleteClusterSnapshotResponse