module Network.AWS.Redshift.DisableSnapshotCopy
(
DisableSnapshotCopy
, disableSnapshotCopy
, dscClusterIdentifier
, DisableSnapshotCopyResponse
, disableSnapshotCopyResponse
, dscrCluster
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.Redshift.Types
import qualified GHC.Exts
newtype DisableSnapshotCopy = DisableSnapshotCopy
{ _dscClusterIdentifier :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
disableSnapshotCopy :: Text
-> DisableSnapshotCopy
disableSnapshotCopy p1 = DisableSnapshotCopy
{ _dscClusterIdentifier = p1
}
dscClusterIdentifier :: Lens' DisableSnapshotCopy Text
dscClusterIdentifier =
lens _dscClusterIdentifier (\s a -> s { _dscClusterIdentifier = a })
newtype DisableSnapshotCopyResponse = DisableSnapshotCopyResponse
{ _dscrCluster :: Maybe Cluster
} deriving (Eq, Show)
disableSnapshotCopyResponse :: DisableSnapshotCopyResponse
disableSnapshotCopyResponse = DisableSnapshotCopyResponse
{ _dscrCluster = Nothing
}
dscrCluster :: Lens' DisableSnapshotCopyResponse (Maybe Cluster)
dscrCluster = lens _dscrCluster (\s a -> s { _dscrCluster = a })
instance ToPath DisableSnapshotCopy where
toPath = const "/"
instance ToQuery DisableSnapshotCopy where
toQuery DisableSnapshotCopy{..} = mconcat
[ "ClusterIdentifier" =? _dscClusterIdentifier
]
instance ToHeaders DisableSnapshotCopy
instance AWSRequest DisableSnapshotCopy where
type Sv DisableSnapshotCopy = Redshift
type Rs DisableSnapshotCopy = DisableSnapshotCopyResponse
request = post "DisableSnapshotCopy"
response = xmlResponse
instance FromXML DisableSnapshotCopyResponse where
parseXML = withElement "DisableSnapshotCopyResult" $ \x -> DisableSnapshotCopyResponse
<$> x .@? "Cluster"