module Network.AWS.Redshift.ModifySnapshotCopyRetentionPeriod
(
ModifySnapshotCopyRetentionPeriod
, modifySnapshotCopyRetentionPeriod
, mscrpClusterIdentifier
, mscrpRetentionPeriod
, ModifySnapshotCopyRetentionPeriodResponse
, modifySnapshotCopyRetentionPeriodResponse
, mscrprCluster
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.Redshift.Types
import qualified GHC.Exts
data ModifySnapshotCopyRetentionPeriod = ModifySnapshotCopyRetentionPeriod
{ _mscrpClusterIdentifier :: Text
, _mscrpRetentionPeriod :: Int
} deriving (Eq, Ord, Show)
modifySnapshotCopyRetentionPeriod :: Text
-> Int
-> ModifySnapshotCopyRetentionPeriod
modifySnapshotCopyRetentionPeriod p1 p2 = ModifySnapshotCopyRetentionPeriod
{ _mscrpClusterIdentifier = p1
, _mscrpRetentionPeriod = p2
}
mscrpClusterIdentifier :: Lens' ModifySnapshotCopyRetentionPeriod Text
mscrpClusterIdentifier =
lens _mscrpClusterIdentifier (\s a -> s { _mscrpClusterIdentifier = a })
mscrpRetentionPeriod :: Lens' ModifySnapshotCopyRetentionPeriod Int
mscrpRetentionPeriod =
lens _mscrpRetentionPeriod (\s a -> s { _mscrpRetentionPeriod = a })
newtype ModifySnapshotCopyRetentionPeriodResponse = ModifySnapshotCopyRetentionPeriodResponse
{ _mscrprCluster :: Maybe Cluster
} deriving (Eq, Show)
modifySnapshotCopyRetentionPeriodResponse :: ModifySnapshotCopyRetentionPeriodResponse
modifySnapshotCopyRetentionPeriodResponse = ModifySnapshotCopyRetentionPeriodResponse
{ _mscrprCluster = Nothing
}
mscrprCluster :: Lens' ModifySnapshotCopyRetentionPeriodResponse (Maybe Cluster)
mscrprCluster = lens _mscrprCluster (\s a -> s { _mscrprCluster = a })
instance ToPath ModifySnapshotCopyRetentionPeriod where
toPath = const "/"
instance ToQuery ModifySnapshotCopyRetentionPeriod where
toQuery ModifySnapshotCopyRetentionPeriod{..} = mconcat
[ "ClusterIdentifier" =? _mscrpClusterIdentifier
, "RetentionPeriod" =? _mscrpRetentionPeriod
]
instance ToHeaders ModifySnapshotCopyRetentionPeriod
instance AWSRequest ModifySnapshotCopyRetentionPeriod where
type Sv ModifySnapshotCopyRetentionPeriod = Redshift
type Rs ModifySnapshotCopyRetentionPeriod = ModifySnapshotCopyRetentionPeriodResponse
request = post "ModifySnapshotCopyRetentionPeriod"
response = xmlResponse
instance FromXML ModifySnapshotCopyRetentionPeriodResponse where
parseXML = withElement "ModifySnapshotCopyRetentionPeriodResult" $ \x -> ModifySnapshotCopyRetentionPeriodResponse
<$> x .@? "Cluster"