module Network.AWS.Redshift.DescribeResize
(
DescribeResize
, describeResize
, drClusterIdentifier
, DescribeResizeResponse
, describeResizeResponse
, drrAvgResizeRateInMegaBytesPerSecond
, drrElapsedTimeInSeconds
, drrEstimatedTimeToCompletionInSeconds
, drrImportTablesCompleted
, drrImportTablesInProgress
, drrImportTablesNotStarted
, drrProgressInMegaBytes
, drrStatus
, drrTargetClusterType
, drrTargetNodeType
, drrTargetNumberOfNodes
, drrTotalResizeDataInMegaBytes
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.Redshift.Types
import qualified GHC.Exts
newtype DescribeResize = DescribeResize
{ _drClusterIdentifier :: Text
} deriving (Eq, Ord, Read, Show, Monoid, IsString)
describeResize :: Text
-> DescribeResize
describeResize p1 = DescribeResize
{ _drClusterIdentifier = p1
}
drClusterIdentifier :: Lens' DescribeResize Text
drClusterIdentifier =
lens _drClusterIdentifier (\s a -> s { _drClusterIdentifier = a })
data DescribeResizeResponse = DescribeResizeResponse
{ _drrAvgResizeRateInMegaBytesPerSecond :: Maybe Double
, _drrElapsedTimeInSeconds :: Maybe Integer
, _drrEstimatedTimeToCompletionInSeconds :: Maybe Integer
, _drrImportTablesCompleted :: List "member" Text
, _drrImportTablesInProgress :: List "member" Text
, _drrImportTablesNotStarted :: List "member" Text
, _drrProgressInMegaBytes :: Maybe Integer
, _drrStatus :: Maybe Text
, _drrTargetClusterType :: Maybe Text
, _drrTargetNodeType :: Maybe Text
, _drrTargetNumberOfNodes :: Maybe Int
, _drrTotalResizeDataInMegaBytes :: Maybe Integer
} deriving (Eq, Ord, Read, Show)
describeResizeResponse :: DescribeResizeResponse
describeResizeResponse = DescribeResizeResponse
{ _drrTargetNodeType = Nothing
, _drrTargetNumberOfNodes = Nothing
, _drrTargetClusterType = Nothing
, _drrStatus = Nothing
, _drrImportTablesCompleted = mempty
, _drrImportTablesInProgress = mempty
, _drrImportTablesNotStarted = mempty
, _drrAvgResizeRateInMegaBytesPerSecond = Nothing
, _drrTotalResizeDataInMegaBytes = Nothing
, _drrProgressInMegaBytes = Nothing
, _drrElapsedTimeInSeconds = Nothing
, _drrEstimatedTimeToCompletionInSeconds = Nothing
}
drrAvgResizeRateInMegaBytesPerSecond :: Lens' DescribeResizeResponse (Maybe Double)
drrAvgResizeRateInMegaBytesPerSecond =
lens _drrAvgResizeRateInMegaBytesPerSecond
(\s a -> s { _drrAvgResizeRateInMegaBytesPerSecond = a })
drrElapsedTimeInSeconds :: Lens' DescribeResizeResponse (Maybe Integer)
drrElapsedTimeInSeconds =
lens _drrElapsedTimeInSeconds (\s a -> s { _drrElapsedTimeInSeconds = a })
drrEstimatedTimeToCompletionInSeconds :: Lens' DescribeResizeResponse (Maybe Integer)
drrEstimatedTimeToCompletionInSeconds =
lens _drrEstimatedTimeToCompletionInSeconds
(\s a -> s { _drrEstimatedTimeToCompletionInSeconds = a })
drrImportTablesCompleted :: Lens' DescribeResizeResponse [Text]
drrImportTablesCompleted =
lens _drrImportTablesCompleted
(\s a -> s { _drrImportTablesCompleted = a })
. _List
drrImportTablesInProgress :: Lens' DescribeResizeResponse [Text]
drrImportTablesInProgress =
lens _drrImportTablesInProgress
(\s a -> s { _drrImportTablesInProgress = a })
. _List
drrImportTablesNotStarted :: Lens' DescribeResizeResponse [Text]
drrImportTablesNotStarted =
lens _drrImportTablesNotStarted
(\s a -> s { _drrImportTablesNotStarted = a })
. _List
drrProgressInMegaBytes :: Lens' DescribeResizeResponse (Maybe Integer)
drrProgressInMegaBytes =
lens _drrProgressInMegaBytes (\s a -> s { _drrProgressInMegaBytes = a })
drrStatus :: Lens' DescribeResizeResponse (Maybe Text)
drrStatus = lens _drrStatus (\s a -> s { _drrStatus = a })
drrTargetClusterType :: Lens' DescribeResizeResponse (Maybe Text)
drrTargetClusterType =
lens _drrTargetClusterType (\s a -> s { _drrTargetClusterType = a })
drrTargetNodeType :: Lens' DescribeResizeResponse (Maybe Text)
drrTargetNodeType =
lens _drrTargetNodeType (\s a -> s { _drrTargetNodeType = a })
drrTargetNumberOfNodes :: Lens' DescribeResizeResponse (Maybe Int)
drrTargetNumberOfNodes =
lens _drrTargetNumberOfNodes (\s a -> s { _drrTargetNumberOfNodes = a })
drrTotalResizeDataInMegaBytes :: Lens' DescribeResizeResponse (Maybe Integer)
drrTotalResizeDataInMegaBytes =
lens _drrTotalResizeDataInMegaBytes
(\s a -> s { _drrTotalResizeDataInMegaBytes = a })
instance ToPath DescribeResize where
toPath = const "/"
instance ToQuery DescribeResize where
toQuery DescribeResize{..} = mconcat
[ "ClusterIdentifier" =? _drClusterIdentifier
]
instance ToHeaders DescribeResize
instance AWSRequest DescribeResize where
type Sv DescribeResize = Redshift
type Rs DescribeResize = DescribeResizeResponse
request = post "DescribeResize"
response = xmlResponse
instance FromXML DescribeResizeResponse where
parseXML = withElement "DescribeResizeResult" $ \x -> DescribeResizeResponse
<$> x .@? "AvgResizeRateInMegaBytesPerSecond"
<*> x .@? "ElapsedTimeInSeconds"
<*> x .@? "EstimatedTimeToCompletionInSeconds"
<*> x .@? "ImportTablesCompleted" .!@ mempty
<*> x .@? "ImportTablesInProgress" .!@ mempty
<*> x .@? "ImportTablesNotStarted" .!@ mempty
<*> x .@? "ProgressInMegaBytes"
<*> x .@? "Status"
<*> x .@? "TargetClusterType"
<*> x .@? "TargetNodeType"
<*> x .@? "TargetNumberOfNodes"
<*> x .@? "TotalResizeDataInMegaBytes"