module Network.AWS.Redshift.DescribeResize
(
describeResize
, DescribeResize
, drClusterIdentifier
, describeResizeResponse
, DescribeResizeResponse
, drrsEstimatedTimeToCompletionInSeconds
, drrsImportTablesNotStarted
, drrsAvgResizeRateInMegaBytesPerSecond
, drrsTargetNumberOfNodes
, drrsTargetNodeType
, drrsImportTablesInProgress
, drrsImportTablesCompleted
, drrsProgressInMegaBytes
, drrsTotalResizeDataInMegaBytes
, drrsElapsedTimeInSeconds
, drrsTargetClusterType
, drrsStatus
) where
import Network.AWS.Prelude
import Network.AWS.Redshift.Types
import Network.AWS.Redshift.Types.Product
import Network.AWS.Request
import Network.AWS.Response
newtype DescribeResize = DescribeResize'
{ _drClusterIdentifier :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeResize
:: Text
-> DescribeResize
describeResize pClusterIdentifier_ =
DescribeResize'
{ _drClusterIdentifier = pClusterIdentifier_
}
drClusterIdentifier :: Lens' DescribeResize Text
drClusterIdentifier = lens _drClusterIdentifier (\ s a -> s{_drClusterIdentifier = a});
instance AWSRequest DescribeResize where
type Rs DescribeResize = DescribeResizeResponse
request = postQuery redshift
response
= receiveXMLWrapper "DescribeResizeResult"
(\ s h x ->
DescribeResizeResponse' <$>
(x .@? "EstimatedTimeToCompletionInSeconds") <*>
(x .@? "ImportTablesNotStarted" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "AvgResizeRateInMegaBytesPerSecond")
<*> (x .@? "TargetNumberOfNodes")
<*> (x .@? "TargetNodeType")
<*>
(x .@? "ImportTablesInProgress" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "ImportTablesCompleted" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "ProgressInMegaBytes")
<*> (x .@? "TotalResizeDataInMegaBytes")
<*> (x .@? "ElapsedTimeInSeconds")
<*> (x .@? "TargetClusterType")
<*> (pure (fromEnum s)))
instance ToHeaders DescribeResize where
toHeaders = const mempty
instance ToPath DescribeResize where
toPath = const "/"
instance ToQuery DescribeResize where
toQuery DescribeResize'{..}
= mconcat
["Action" =: ("DescribeResize" :: ByteString),
"Version" =: ("2012-12-01" :: ByteString),
"ClusterIdentifier" =: _drClusterIdentifier]
data DescribeResizeResponse = DescribeResizeResponse'
{ _drrsEstimatedTimeToCompletionInSeconds :: !(Maybe Integer)
, _drrsImportTablesNotStarted :: !(Maybe [Text])
, _drrsAvgResizeRateInMegaBytesPerSecond :: !(Maybe Double)
, _drrsTargetNumberOfNodes :: !(Maybe Int)
, _drrsTargetNodeType :: !(Maybe Text)
, _drrsImportTablesInProgress :: !(Maybe [Text])
, _drrsImportTablesCompleted :: !(Maybe [Text])
, _drrsProgressInMegaBytes :: !(Maybe Integer)
, _drrsTotalResizeDataInMegaBytes :: !(Maybe Integer)
, _drrsElapsedTimeInSeconds :: !(Maybe Integer)
, _drrsTargetClusterType :: !(Maybe Text)
, _drrsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeResizeResponse
:: Int
-> DescribeResizeResponse
describeResizeResponse pStatus_ =
DescribeResizeResponse'
{ _drrsEstimatedTimeToCompletionInSeconds = Nothing
, _drrsImportTablesNotStarted = Nothing
, _drrsAvgResizeRateInMegaBytesPerSecond = Nothing
, _drrsTargetNumberOfNodes = Nothing
, _drrsTargetNodeType = Nothing
, _drrsImportTablesInProgress = Nothing
, _drrsImportTablesCompleted = Nothing
, _drrsProgressInMegaBytes = Nothing
, _drrsTotalResizeDataInMegaBytes = Nothing
, _drrsElapsedTimeInSeconds = Nothing
, _drrsTargetClusterType = Nothing
, _drrsStatus = pStatus_
}
drrsEstimatedTimeToCompletionInSeconds :: Lens' DescribeResizeResponse (Maybe Integer)
drrsEstimatedTimeToCompletionInSeconds = lens _drrsEstimatedTimeToCompletionInSeconds (\ s a -> s{_drrsEstimatedTimeToCompletionInSeconds = a});
drrsImportTablesNotStarted :: Lens' DescribeResizeResponse [Text]
drrsImportTablesNotStarted = lens _drrsImportTablesNotStarted (\ s a -> s{_drrsImportTablesNotStarted = a}) . _Default . _Coerce;
drrsAvgResizeRateInMegaBytesPerSecond :: Lens' DescribeResizeResponse (Maybe Double)
drrsAvgResizeRateInMegaBytesPerSecond = lens _drrsAvgResizeRateInMegaBytesPerSecond (\ s a -> s{_drrsAvgResizeRateInMegaBytesPerSecond = a});
drrsTargetNumberOfNodes :: Lens' DescribeResizeResponse (Maybe Int)
drrsTargetNumberOfNodes = lens _drrsTargetNumberOfNodes (\ s a -> s{_drrsTargetNumberOfNodes = a});
drrsTargetNodeType :: Lens' DescribeResizeResponse (Maybe Text)
drrsTargetNodeType = lens _drrsTargetNodeType (\ s a -> s{_drrsTargetNodeType = a});
drrsImportTablesInProgress :: Lens' DescribeResizeResponse [Text]
drrsImportTablesInProgress = lens _drrsImportTablesInProgress (\ s a -> s{_drrsImportTablesInProgress = a}) . _Default . _Coerce;
drrsImportTablesCompleted :: Lens' DescribeResizeResponse [Text]
drrsImportTablesCompleted = lens _drrsImportTablesCompleted (\ s a -> s{_drrsImportTablesCompleted = a}) . _Default . _Coerce;
drrsProgressInMegaBytes :: Lens' DescribeResizeResponse (Maybe Integer)
drrsProgressInMegaBytes = lens _drrsProgressInMegaBytes (\ s a -> s{_drrsProgressInMegaBytes = a});
drrsTotalResizeDataInMegaBytes :: Lens' DescribeResizeResponse (Maybe Integer)
drrsTotalResizeDataInMegaBytes = lens _drrsTotalResizeDataInMegaBytes (\ s a -> s{_drrsTotalResizeDataInMegaBytes = a});
drrsElapsedTimeInSeconds :: Lens' DescribeResizeResponse (Maybe Integer)
drrsElapsedTimeInSeconds = lens _drrsElapsedTimeInSeconds (\ s a -> s{_drrsElapsedTimeInSeconds = a});
drrsTargetClusterType :: Lens' DescribeResizeResponse (Maybe Text)
drrsTargetClusterType = lens _drrsTargetClusterType (\ s a -> s{_drrsTargetClusterType = a});
drrsStatus :: Lens' DescribeResizeResponse Int
drrsStatus = lens _drrsStatus (\ s a -> s{_drrsStatus = a});