module Network.AWS.Redshift.RevokeSnapshotAccess
(
revokeSnapshotAccess
, RevokeSnapshotAccess
, rsaSnapshotClusterIdentifier
, rsaSnapshotIdentifier
, rsaAccountWithRestoreAccess
, revokeSnapshotAccessResponse
, RevokeSnapshotAccessResponse
, rsarsSnapshot
, rsarsResponseStatus
) where
import Network.AWS.Prelude
import Network.AWS.Redshift.Types
import Network.AWS.Redshift.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data RevokeSnapshotAccess = RevokeSnapshotAccess'
{ _rsaSnapshotClusterIdentifier :: !(Maybe Text)
, _rsaSnapshotIdentifier :: !Text
, _rsaAccountWithRestoreAccess :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
revokeSnapshotAccess
:: Text
-> Text
-> RevokeSnapshotAccess
revokeSnapshotAccess pSnapshotIdentifier_ pAccountWithRestoreAccess_ =
RevokeSnapshotAccess'
{ _rsaSnapshotClusterIdentifier = Nothing
, _rsaSnapshotIdentifier = pSnapshotIdentifier_
, _rsaAccountWithRestoreAccess = pAccountWithRestoreAccess_
}
rsaSnapshotClusterIdentifier :: Lens' RevokeSnapshotAccess (Maybe Text)
rsaSnapshotClusterIdentifier = lens _rsaSnapshotClusterIdentifier (\ s a -> s{_rsaSnapshotClusterIdentifier = a});
rsaSnapshotIdentifier :: Lens' RevokeSnapshotAccess Text
rsaSnapshotIdentifier = lens _rsaSnapshotIdentifier (\ s a -> s{_rsaSnapshotIdentifier = a});
rsaAccountWithRestoreAccess :: Lens' RevokeSnapshotAccess Text
rsaAccountWithRestoreAccess = lens _rsaAccountWithRestoreAccess (\ s a -> s{_rsaAccountWithRestoreAccess = a});
instance AWSRequest RevokeSnapshotAccess where
type Rs RevokeSnapshotAccess =
RevokeSnapshotAccessResponse
request = postQuery redshift
response
= receiveXMLWrapper "RevokeSnapshotAccessResult"
(\ s h x ->
RevokeSnapshotAccessResponse' <$>
(x .@? "Snapshot") <*> (pure (fromEnum s)))
instance ToHeaders RevokeSnapshotAccess where
toHeaders = const mempty
instance ToPath RevokeSnapshotAccess where
toPath = const "/"
instance ToQuery RevokeSnapshotAccess where
toQuery RevokeSnapshotAccess'{..}
= mconcat
["Action" =: ("RevokeSnapshotAccess" :: ByteString),
"Version" =: ("2012-12-01" :: ByteString),
"SnapshotClusterIdentifier" =:
_rsaSnapshotClusterIdentifier,
"SnapshotIdentifier" =: _rsaSnapshotIdentifier,
"AccountWithRestoreAccess" =:
_rsaAccountWithRestoreAccess]
data RevokeSnapshotAccessResponse = RevokeSnapshotAccessResponse'
{ _rsarsSnapshot :: !(Maybe Snapshot)
, _rsarsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
revokeSnapshotAccessResponse
:: Int
-> RevokeSnapshotAccessResponse
revokeSnapshotAccessResponse pResponseStatus_ =
RevokeSnapshotAccessResponse'
{ _rsarsSnapshot = Nothing
, _rsarsResponseStatus = pResponseStatus_
}
rsarsSnapshot :: Lens' RevokeSnapshotAccessResponse (Maybe Snapshot)
rsarsSnapshot = lens _rsarsSnapshot (\ s a -> s{_rsarsSnapshot = a});
rsarsResponseStatus :: Lens' RevokeSnapshotAccessResponse Int
rsarsResponseStatus = lens _rsarsResponseStatus (\ s a -> s{_rsarsResponseStatus = a});