module Network.AWS.Redshift.DisableSnapshotCopy
(
disableSnapshotCopy
, DisableSnapshotCopy
, dscClusterIdentifier
, disableSnapshotCopyResponse
, DisableSnapshotCopyResponse
, dscrsCluster
, dscrsResponseStatus
) 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
newtype DisableSnapshotCopy = DisableSnapshotCopy'
{ _dscClusterIdentifier :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
disableSnapshotCopy
:: Text
-> DisableSnapshotCopy
disableSnapshotCopy pClusterIdentifier_ =
DisableSnapshotCopy'
{ _dscClusterIdentifier = pClusterIdentifier_
}
dscClusterIdentifier :: Lens' DisableSnapshotCopy Text
dscClusterIdentifier = lens _dscClusterIdentifier (\ s a -> s{_dscClusterIdentifier = a});
instance AWSRequest DisableSnapshotCopy where
type Rs DisableSnapshotCopy =
DisableSnapshotCopyResponse
request = postQuery redshift
response
= receiveXMLWrapper "DisableSnapshotCopyResult"
(\ s h x ->
DisableSnapshotCopyResponse' <$>
(x .@? "Cluster") <*> (pure (fromEnum s)))
instance Hashable DisableSnapshotCopy
instance NFData DisableSnapshotCopy
instance ToHeaders DisableSnapshotCopy where
toHeaders = const mempty
instance ToPath DisableSnapshotCopy where
toPath = const "/"
instance ToQuery DisableSnapshotCopy where
toQuery DisableSnapshotCopy'{..}
= mconcat
["Action" =: ("DisableSnapshotCopy" :: ByteString),
"Version" =: ("2012-12-01" :: ByteString),
"ClusterIdentifier" =: _dscClusterIdentifier]
data DisableSnapshotCopyResponse = DisableSnapshotCopyResponse'
{ _dscrsCluster :: !(Maybe Cluster)
, _dscrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
disableSnapshotCopyResponse
:: Int
-> DisableSnapshotCopyResponse
disableSnapshotCopyResponse pResponseStatus_ =
DisableSnapshotCopyResponse'
{ _dscrsCluster = Nothing
, _dscrsResponseStatus = pResponseStatus_
}
dscrsCluster :: Lens' DisableSnapshotCopyResponse (Maybe Cluster)
dscrsCluster = lens _dscrsCluster (\ s a -> s{_dscrsCluster = a});
dscrsResponseStatus :: Lens' DisableSnapshotCopyResponse Int
dscrsResponseStatus = lens _dscrsResponseStatus (\ s a -> s{_dscrsResponseStatus = a});
instance NFData DisableSnapshotCopyResponse