amazonka-cloudwatch 1.2.0.2 → 1.3.0
raw patch · 11 files changed
+198/−198 lines, 11 filesdep ~amazonka-cloudwatchdep ~amazonka-coredep ~amazonka-testPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: amazonka-cloudwatch, amazonka-core, amazonka-test
API changes (from Hackage documentation)
- Network.AWS.CloudWatch.DescribeAlarmHistory: dahrsStatus :: Lens' DescribeAlarmHistoryResponse Int
- Network.AWS.CloudWatch.DescribeAlarms: darsStatus :: Lens' DescribeAlarmsResponse Int
- Network.AWS.CloudWatch.DescribeAlarmsForMetric: dafmrsStatus :: Lens' DescribeAlarmsForMetricResponse Int
- Network.AWS.CloudWatch.GetMetricStatistics: gmsrsStatus :: Lens' GetMetricStatisticsResponse Int
- Network.AWS.CloudWatch.ListMetrics: lmrsStatus :: Lens' ListMetricsResponse Int
+ Network.AWS.CloudWatch.DescribeAlarmHistory: dahrsResponseStatus :: Lens' DescribeAlarmHistoryResponse Int
+ Network.AWS.CloudWatch.DescribeAlarms: darsResponseStatus :: Lens' DescribeAlarmsResponse Int
+ Network.AWS.CloudWatch.DescribeAlarmsForMetric: dafmrsResponseStatus :: Lens' DescribeAlarmsForMetricResponse Int
+ Network.AWS.CloudWatch.GetMetricStatistics: gmsrsResponseStatus :: Lens' GetMetricStatisticsResponse Int
+ Network.AWS.CloudWatch.ListMetrics: lmrsResponseStatus :: Lens' ListMetricsResponse Int
Files
- README.md +1/−1
- amazonka-cloudwatch.cabal +5/−5
- gen/Network/AWS/CloudWatch.hs +14/−14
- gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs +8/−8
- gen/Network/AWS/CloudWatch/DescribeAlarms.hs +10/−10
- gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs +19/−19
- gen/Network/AWS/CloudWatch/GetMetricStatistics.hs +10/−10
- gen/Network/AWS/CloudWatch/ListMetrics.hs +10/−10
- gen/Network/AWS/CloudWatch/Types.hs +9/−9
- gen/Network/AWS/CloudWatch/Types/Product.hs +81/−81
- test/Test/AWS/Gen/CloudWatch.hs +31/−31
README.md view
@@ -8,7 +8,7 @@ ## Version -`1.2.0.2`+`1.3.0` ## Description
amazonka-cloudwatch.cabal view
@@ -1,5 +1,5 @@ name: amazonka-cloudwatch-version: 1.2.0.2+version: 1.3.0 synopsis: Amazon CloudWatch SDK. homepage: https://github.com/brendanhay/amazonka bug-reports: https://github.com/brendanhay/amazonka/issues@@ -109,7 +109,7 @@ , Network.AWS.CloudWatch.Types.Sum build-depends:- amazonka-core == 1.2.0.*+ amazonka-core == 1.3.0.* , base >= 4.7 && < 5 test-suite amazonka-cloudwatch-test@@ -129,9 +129,9 @@ , Test.AWS.CloudWatch.Internal build-depends:- amazonka-core == 1.2.0.*- , amazonka-test == 1.2.0.*- , amazonka-cloudwatch == 1.2.0.*+ amazonka-core == 1.3.0.*+ , amazonka-test == 1.3.0.*+ , amazonka-cloudwatch == 1.3.0.* , base , bytestring , lens
gen/Network/AWS/CloudWatch.hs view
@@ -122,18 +122,18 @@ -- ** GetMetricStatistics , module Network.AWS.CloudWatch.GetMetricStatistics - -- ** DisableAlarmActions- , module Network.AWS.CloudWatch.DisableAlarmActions- -- ** DescribeAlarmsForMetric , module Network.AWS.CloudWatch.DescribeAlarmsForMetric - -- ** SetAlarmState- , module Network.AWS.CloudWatch.SetAlarmState+ -- ** DisableAlarmActions+ , module Network.AWS.CloudWatch.DisableAlarmActions -- ** PutMetricAlarm , module Network.AWS.CloudWatch.PutMetricAlarm + -- ** SetAlarmState+ , module Network.AWS.CloudWatch.SetAlarmState+ -- * Types -- ** ComparisonOperator@@ -157,8 +157,8 @@ , ahiAlarmName , ahiHistoryItemType , ahiHistoryData- , ahiTimestamp , ahiHistorySummary+ , ahiTimestamp -- ** Datapoint , Datapoint@@ -168,8 +168,8 @@ , dAverage , dMinimum , dSum- , dTimestamp , dUnit+ , dTimestamp -- ** Dimension , Dimension@@ -195,34 +195,34 @@ , metricAlarm , maAlarmName , maStateUpdatedTimestamp- , maAlarmDescription , maPeriod+ , maAlarmDescription , maEvaluationPeriods , maMetricName , maNamespace- , maOKActions , maComparisonOperator+ , maOKActions , maStateValue , maThreshold- , maActionsEnabled , maAlarmConfigurationUpdatedTimestamp+ , maActionsEnabled , maInsufficientDataActions- , maDimensions- , maStateReasonData , maStateReason+ , maStateReasonData+ , maDimensions , maAlarmARN , maAlarmActions- , maStatistic , maUnit+ , maStatistic -- ** MetricDatum , MetricDatum , metricDatum , mdValue , mdDimensions+ , mdUnit , mdTimestamp , mdStatisticValues- , mdUnit , mdMetricName -- ** StatisticSet
gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs view
@@ -44,7 +44,7 @@ -- * Response Lenses , dahrsAlarmHistoryItems , dahrsNextToken- , dahrsStatus+ , dahrsResponseStatus ) where import Network.AWS.CloudWatch.Types@@ -160,7 +160,7 @@ data DescribeAlarmHistoryResponse = DescribeAlarmHistoryResponse' { _dahrsAlarmHistoryItems :: !(Maybe [AlarmHistoryItem]) , _dahrsNextToken :: !(Maybe Text)- , _dahrsStatus :: !Int+ , _dahrsResponseStatus :: !Int } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'DescribeAlarmHistoryResponse' with the minimum fields required to make a request.@@ -171,15 +171,15 @@ -- -- * 'dahrsNextToken' ----- * 'dahrsStatus'+-- * 'dahrsResponseStatus' describeAlarmHistoryResponse- :: Int -- ^ 'dahrsStatus'+ :: Int -- ^ 'dahrsResponseStatus' -> DescribeAlarmHistoryResponse-describeAlarmHistoryResponse pStatus_ =+describeAlarmHistoryResponse pResponseStatus_ = DescribeAlarmHistoryResponse' { _dahrsAlarmHistoryItems = Nothing , _dahrsNextToken = Nothing- , _dahrsStatus = pStatus_+ , _dahrsResponseStatus = pResponseStatus_ } -- | A list of alarm histories in JSON format.@@ -191,5 +191,5 @@ dahrsNextToken = lens _dahrsNextToken (\ s a -> s{_dahrsNextToken = a}); -- | The response status code.-dahrsStatus :: Lens' DescribeAlarmHistoryResponse Int-dahrsStatus = lens _dahrsStatus (\ s a -> s{_dahrsStatus = a});+dahrsResponseStatus :: Lens' DescribeAlarmHistoryResponse Int+dahrsResponseStatus = lens _dahrsResponseStatus (\ s a -> s{_dahrsResponseStatus = a});
gen/Network/AWS/CloudWatch/DescribeAlarms.hs view
@@ -45,7 +45,7 @@ -- * Response Lenses , darsMetricAlarms , darsNextToken- , darsStatus+ , darsResponseStatus ) where import Network.AWS.CloudWatch.Types@@ -160,9 +160,9 @@ -- -- /See:/ 'describeAlarmsResponse' smart constructor. data DescribeAlarmsResponse = DescribeAlarmsResponse'- { _darsMetricAlarms :: !(Maybe [MetricAlarm])- , _darsNextToken :: !(Maybe Text)- , _darsStatus :: !Int+ { _darsMetricAlarms :: !(Maybe [MetricAlarm])+ , _darsNextToken :: !(Maybe Text)+ , _darsResponseStatus :: !Int } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'DescribeAlarmsResponse' with the minimum fields required to make a request.@@ -173,15 +173,15 @@ -- -- * 'darsNextToken' ----- * 'darsStatus'+-- * 'darsResponseStatus' describeAlarmsResponse- :: Int -- ^ 'darsStatus'+ :: Int -- ^ 'darsResponseStatus' -> DescribeAlarmsResponse-describeAlarmsResponse pStatus_ =+describeAlarmsResponse pResponseStatus_ = DescribeAlarmsResponse' { _darsMetricAlarms = Nothing , _darsNextToken = Nothing- , _darsStatus = pStatus_+ , _darsResponseStatus = pResponseStatus_ } -- | A list of information for the specified alarms.@@ -193,5 +193,5 @@ darsNextToken = lens _darsNextToken (\ s a -> s{_darsNextToken = a}); -- | The response status code.-darsStatus :: Lens' DescribeAlarmsResponse Int-darsStatus = lens _darsStatus (\ s a -> s{_darsStatus = a});+darsResponseStatus :: Lens' DescribeAlarmsResponse Int+darsResponseStatus = lens _darsResponseStatus (\ s a -> s{_darsResponseStatus = a});
gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs view
@@ -30,8 +30,8 @@ -- * Request Lenses , dafmPeriod , dafmDimensions- , dafmStatistic , dafmUnit+ , dafmStatistic , dafmMetricName , dafmNamespace @@ -40,7 +40,7 @@ , DescribeAlarmsForMetricResponse -- * Response Lenses , dafmrsMetricAlarms- , dafmrsStatus+ , dafmrsResponseStatus ) where import Network.AWS.CloudWatch.Types@@ -53,8 +53,8 @@ data DescribeAlarmsForMetric = DescribeAlarmsForMetric' { _dafmPeriod :: !(Maybe Nat) , _dafmDimensions :: !(Maybe [Dimension])- , _dafmStatistic :: !(Maybe Statistic) , _dafmUnit :: !(Maybe StandardUnit)+ , _dafmStatistic :: !(Maybe Statistic) , _dafmMetricName :: !Text , _dafmNamespace :: !Text } deriving (Eq,Read,Show,Data,Typeable,Generic)@@ -67,10 +67,10 @@ -- -- * 'dafmDimensions' ----- * 'dafmStatistic'--- -- * 'dafmUnit' --+-- * 'dafmStatistic'+-- -- * 'dafmMetricName' -- -- * 'dafmNamespace'@@ -82,8 +82,8 @@ DescribeAlarmsForMetric' { _dafmPeriod = Nothing , _dafmDimensions = Nothing- , _dafmStatistic = Nothing , _dafmUnit = Nothing+ , _dafmStatistic = Nothing , _dafmMetricName = pMetricName_ , _dafmNamespace = pNamespace_ }@@ -96,14 +96,14 @@ dafmDimensions :: Lens' DescribeAlarmsForMetric [Dimension] dafmDimensions = lens _dafmDimensions (\ s a -> s{_dafmDimensions = a}) . _Default . _Coerce; --- | The statistic for the metric.-dafmStatistic :: Lens' DescribeAlarmsForMetric (Maybe Statistic)-dafmStatistic = lens _dafmStatistic (\ s a -> s{_dafmStatistic = a});- -- | The unit for the metric. dafmUnit :: Lens' DescribeAlarmsForMetric (Maybe StandardUnit) dafmUnit = lens _dafmUnit (\ s a -> s{_dafmUnit = a}); +-- | The statistic for the metric.+dafmStatistic :: Lens' DescribeAlarmsForMetric (Maybe Statistic)+dafmStatistic = lens _dafmStatistic (\ s a -> s{_dafmStatistic = a});+ -- | The name of the metric. dafmMetricName :: Lens' DescribeAlarmsForMetric Text dafmMetricName = lens _dafmMetricName (\ s a -> s{_dafmMetricName = a});@@ -139,7 +139,7 @@ "Period" =: _dafmPeriod, "Dimensions" =: toQuery (toQueryList "member" <$> _dafmDimensions),- "Statistic" =: _dafmStatistic, "Unit" =: _dafmUnit,+ "Unit" =: _dafmUnit, "Statistic" =: _dafmStatistic, "MetricName" =: _dafmMetricName, "Namespace" =: _dafmNamespace] @@ -147,8 +147,8 @@ -- -- /See:/ 'describeAlarmsForMetricResponse' smart constructor. data DescribeAlarmsForMetricResponse = DescribeAlarmsForMetricResponse'- { _dafmrsMetricAlarms :: !(Maybe [MetricAlarm])- , _dafmrsStatus :: !Int+ { _dafmrsMetricAlarms :: !(Maybe [MetricAlarm])+ , _dafmrsResponseStatus :: !Int } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'DescribeAlarmsForMetricResponse' with the minimum fields required to make a request.@@ -157,14 +157,14 @@ -- -- * 'dafmrsMetricAlarms' ----- * 'dafmrsStatus'+-- * 'dafmrsResponseStatus' describeAlarmsForMetricResponse- :: Int -- ^ 'dafmrsStatus'+ :: Int -- ^ 'dafmrsResponseStatus' -> DescribeAlarmsForMetricResponse-describeAlarmsForMetricResponse pStatus_ =+describeAlarmsForMetricResponse pResponseStatus_ = DescribeAlarmsForMetricResponse' { _dafmrsMetricAlarms = Nothing- , _dafmrsStatus = pStatus_+ , _dafmrsResponseStatus = pResponseStatus_ } -- | A list of information for each alarm with the specified metric.@@ -172,5 +172,5 @@ dafmrsMetricAlarms = lens _dafmrsMetricAlarms (\ s a -> s{_dafmrsMetricAlarms = a}) . _Default . _Coerce; -- | The response status code.-dafmrsStatus :: Lens' DescribeAlarmsForMetricResponse Int-dafmrsStatus = lens _dafmrsStatus (\ s a -> s{_dafmrsStatus = a});+dafmrsResponseStatus :: Lens' DescribeAlarmsForMetricResponse Int+dafmrsResponseStatus = lens _dafmrsResponseStatus (\ s a -> s{_dafmrsResponseStatus = a});
gen/Network/AWS/CloudWatch/GetMetricStatistics.hs view
@@ -70,7 +70,7 @@ -- * Response Lenses , gmsrsDatapoints , gmsrsLabel- , gmsrsStatus+ , gmsrsResponseStatus ) where import Network.AWS.CloudWatch.Types@@ -209,9 +209,9 @@ -- -- /See:/ 'getMetricStatisticsResponse' smart constructor. data GetMetricStatisticsResponse = GetMetricStatisticsResponse'- { _gmsrsDatapoints :: !(Maybe [Datapoint])- , _gmsrsLabel :: !(Maybe Text)- , _gmsrsStatus :: !Int+ { _gmsrsDatapoints :: !(Maybe [Datapoint])+ , _gmsrsLabel :: !(Maybe Text)+ , _gmsrsResponseStatus :: !Int } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'GetMetricStatisticsResponse' with the minimum fields required to make a request.@@ -222,15 +222,15 @@ -- -- * 'gmsrsLabel' ----- * 'gmsrsStatus'+-- * 'gmsrsResponseStatus' getMetricStatisticsResponse- :: Int -- ^ 'gmsrsStatus'+ :: Int -- ^ 'gmsrsResponseStatus' -> GetMetricStatisticsResponse-getMetricStatisticsResponse pStatus_ =+getMetricStatisticsResponse pResponseStatus_ = GetMetricStatisticsResponse' { _gmsrsDatapoints = Nothing , _gmsrsLabel = Nothing- , _gmsrsStatus = pStatus_+ , _gmsrsResponseStatus = pResponseStatus_ } -- | The datapoints for the specified metric.@@ -242,5 +242,5 @@ gmsrsLabel = lens _gmsrsLabel (\ s a -> s{_gmsrsLabel = a}); -- | The response status code.-gmsrsStatus :: Lens' GetMetricStatisticsResponse Int-gmsrsStatus = lens _gmsrsStatus (\ s a -> s{_gmsrsStatus = a});+gmsrsResponseStatus :: Lens' GetMetricStatisticsResponse Int+gmsrsResponseStatus = lens _gmsrsResponseStatus (\ s a -> s{_gmsrsResponseStatus = a});
gen/Network/AWS/CloudWatch/ListMetrics.hs view
@@ -42,7 +42,7 @@ -- * Response Lenses , lmrsMetrics , lmrsNextToken- , lmrsStatus+ , lmrsResponseStatus ) where import Network.AWS.CloudWatch.Types@@ -138,9 +138,9 @@ -- -- /See:/ 'listMetricsResponse' smart constructor. data ListMetricsResponse = ListMetricsResponse'- { _lmrsMetrics :: !(Maybe [Metric])- , _lmrsNextToken :: !(Maybe Text)- , _lmrsStatus :: !Int+ { _lmrsMetrics :: !(Maybe [Metric])+ , _lmrsNextToken :: !(Maybe Text)+ , _lmrsResponseStatus :: !Int } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'ListMetricsResponse' with the minimum fields required to make a request.@@ -151,15 +151,15 @@ -- -- * 'lmrsNextToken' ----- * 'lmrsStatus'+-- * 'lmrsResponseStatus' listMetricsResponse- :: Int -- ^ 'lmrsStatus'+ :: Int -- ^ 'lmrsResponseStatus' -> ListMetricsResponse-listMetricsResponse pStatus_ =+listMetricsResponse pResponseStatus_ = ListMetricsResponse' { _lmrsMetrics = Nothing , _lmrsNextToken = Nothing- , _lmrsStatus = pStatus_+ , _lmrsResponseStatus = pResponseStatus_ } -- | A list of metrics used to generate statistics for an AWS account.@@ -171,5 +171,5 @@ lmrsNextToken = lens _lmrsNextToken (\ s a -> s{_lmrsNextToken = a}); -- | The response status code.-lmrsStatus :: Lens' ListMetricsResponse Int-lmrsStatus = lens _lmrsStatus (\ s a -> s{_lmrsStatus = a});+lmrsResponseStatus :: Lens' ListMetricsResponse Int+lmrsResponseStatus = lens _lmrsResponseStatus (\ s a -> s{_lmrsResponseStatus = a});
gen/Network/AWS/CloudWatch/Types.hs view
@@ -46,8 +46,8 @@ , ahiAlarmName , ahiHistoryItemType , ahiHistoryData- , ahiTimestamp , ahiHistorySummary+ , ahiTimestamp -- * Datapoint , Datapoint@@ -57,8 +57,8 @@ , dAverage , dMinimum , dSum- , dTimestamp , dUnit+ , dTimestamp -- * Dimension , Dimension@@ -84,34 +84,34 @@ , metricAlarm , maAlarmName , maStateUpdatedTimestamp- , maAlarmDescription , maPeriod+ , maAlarmDescription , maEvaluationPeriods , maMetricName , maNamespace- , maOKActions , maComparisonOperator+ , maOKActions , maStateValue , maThreshold- , maActionsEnabled , maAlarmConfigurationUpdatedTimestamp+ , maActionsEnabled , maInsufficientDataActions- , maDimensions- , maStateReasonData , maStateReason+ , maStateReasonData+ , maDimensions , maAlarmARN , maAlarmActions- , maStatistic , maUnit+ , maStatistic -- * MetricDatum , MetricDatum , metricDatum , mdValue , mdDimensions+ , mdUnit , mdTimestamp , mdStatisticValues- , mdUnit , mdMetricName -- * StatisticSet
gen/Network/AWS/CloudWatch/Types/Product.hs view
@@ -30,8 +30,8 @@ { _ahiAlarmName :: !(Maybe Text) , _ahiHistoryItemType :: !(Maybe HistoryItemType) , _ahiHistoryData :: !(Maybe Text)- , _ahiTimestamp :: !(Maybe ISO8601) , _ahiHistorySummary :: !(Maybe Text)+ , _ahiTimestamp :: !(Maybe ISO8601) } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'AlarmHistoryItem' with the minimum fields required to make a request.@@ -44,9 +44,9 @@ -- -- * 'ahiHistoryData' ----- * 'ahiTimestamp'--- -- * 'ahiHistorySummary'+--+-- * 'ahiTimestamp' alarmHistoryItem :: AlarmHistoryItem alarmHistoryItem =@@ -54,8 +54,8 @@ { _ahiAlarmName = Nothing , _ahiHistoryItemType = Nothing , _ahiHistoryData = Nothing- , _ahiTimestamp = Nothing , _ahiHistorySummary = Nothing+ , _ahiTimestamp = Nothing } -- | The descriptive name for the alarm.@@ -70,6 +70,10 @@ ahiHistoryData :: Lens' AlarmHistoryItem (Maybe Text) ahiHistoryData = lens _ahiHistoryData (\ s a -> s{_ahiHistoryData = a}); +-- | A human-readable summary of the alarm history.+ahiHistorySummary :: Lens' AlarmHistoryItem (Maybe Text)+ahiHistorySummary = lens _ahiHistorySummary (\ s a -> s{_ahiHistorySummary = a});+ -- | The time stamp for the alarm history item. Amazon CloudWatch uses -- Coordinated Universal Time (UTC) when returning time stamps, which do -- not accommodate seasonal adjustments such as daylight savings time. For@@ -79,17 +83,13 @@ ahiTimestamp :: Lens' AlarmHistoryItem (Maybe UTCTime) ahiTimestamp = lens _ahiTimestamp (\ s a -> s{_ahiTimestamp = a}) . mapping _Time; --- | A human-readable summary of the alarm history.-ahiHistorySummary :: Lens' AlarmHistoryItem (Maybe Text)-ahiHistorySummary = lens _ahiHistorySummary (\ s a -> s{_ahiHistorySummary = a});- instance FromXML AlarmHistoryItem where parseXML x = AlarmHistoryItem' <$> (x .@? "AlarmName") <*> (x .@? "HistoryItemType") <*> (x .@? "HistoryData")- <*> (x .@? "Timestamp") <*> (x .@? "HistorySummary")+ <*> (x .@? "Timestamp") -- | The 'Datapoint' data type encapsulates the statistical data that Amazon -- CloudWatch computes from metric data.@@ -101,8 +101,8 @@ , _dAverage :: !(Maybe Double) , _dMinimum :: !(Maybe Double) , _dSum :: !(Maybe Double)- , _dTimestamp :: !(Maybe ISO8601) , _dUnit :: !(Maybe StandardUnit)+ , _dTimestamp :: !(Maybe ISO8601) } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'Datapoint' with the minimum fields required to make a request.@@ -119,9 +119,9 @@ -- -- * 'dSum' ----- * 'dTimestamp'--- -- * 'dUnit'+--+-- * 'dTimestamp' datapoint :: Datapoint datapoint =@@ -131,8 +131,8 @@ , _dAverage = Nothing , _dMinimum = Nothing , _dSum = Nothing- , _dTimestamp = Nothing , _dUnit = Nothing+ , _dTimestamp = Nothing } -- | The number of metric values that contributed to the aggregate value of@@ -156,6 +156,10 @@ dSum :: Lens' Datapoint (Maybe Double) dSum = lens _dSum (\ s a -> s{_dSum = a}); +-- | The standard unit used for the datapoint.+dUnit :: Lens' Datapoint (Maybe StandardUnit)+dUnit = lens _dUnit (\ s a -> s{_dUnit = a});+ -- | The time stamp used for the datapoint. Amazon CloudWatch uses -- Coordinated Universal Time (UTC) when returning time stamps, which do -- not accommodate seasonal adjustments such as daylight savings time. For@@ -165,10 +169,6 @@ dTimestamp :: Lens' Datapoint (Maybe UTCTime) dTimestamp = lens _dTimestamp (\ s a -> s{_dTimestamp = a}) . mapping _Time; --- | The standard unit used for the datapoint.-dUnit :: Lens' Datapoint (Maybe StandardUnit)-dUnit = lens _dUnit (\ s a -> s{_dUnit = a});- instance FromXML Datapoint where parseXML x = Datapoint' <$>@@ -176,8 +176,8 @@ (x .@? "Average") <*> (x .@? "Minimum") <*> (x .@? "Sum")- <*> (x .@? "Timestamp") <*> (x .@? "Unit")+ <*> (x .@? "Timestamp") -- | The 'Dimension' data type further expands on the identity of a metric -- using a Name, Value pair.@@ -318,25 +318,25 @@ data MetricAlarm = MetricAlarm' { _maAlarmName :: !(Maybe Text) , _maStateUpdatedTimestamp :: !(Maybe ISO8601)- , _maAlarmDescription :: !(Maybe Text) , _maPeriod :: !(Maybe Nat)+ , _maAlarmDescription :: !(Maybe Text) , _maEvaluationPeriods :: !(Maybe Nat) , _maMetricName :: !(Maybe Text) , _maNamespace :: !(Maybe Text)- , _maOKActions :: !(Maybe [Text]) , _maComparisonOperator :: !(Maybe ComparisonOperator)+ , _maOKActions :: !(Maybe [Text]) , _maStateValue :: !(Maybe StateValue) , _maThreshold :: !(Maybe Double)- , _maActionsEnabled :: !(Maybe Bool) , _maAlarmConfigurationUpdatedTimestamp :: !(Maybe ISO8601)+ , _maActionsEnabled :: !(Maybe Bool) , _maInsufficientDataActions :: !(Maybe [Text])- , _maDimensions :: !(Maybe [Dimension])- , _maStateReasonData :: !(Maybe Text) , _maStateReason :: !(Maybe Text)+ , _maStateReasonData :: !(Maybe Text)+ , _maDimensions :: !(Maybe [Dimension]) , _maAlarmARN :: !(Maybe Text) , _maAlarmActions :: !(Maybe [Text])- , _maStatistic :: !(Maybe Statistic) , _maUnit :: !(Maybe StandardUnit)+ , _maStatistic :: !(Maybe Statistic) } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'MetricAlarm' with the minimum fields required to make a request.@@ -347,68 +347,68 @@ -- -- * 'maStateUpdatedTimestamp' ----- * 'maAlarmDescription'--- -- * 'maPeriod' --+-- * 'maAlarmDescription'+-- -- * 'maEvaluationPeriods' -- -- * 'maMetricName' -- -- * 'maNamespace' ----- * 'maOKActions'--- -- * 'maComparisonOperator' --+-- * 'maOKActions'+-- -- * 'maStateValue' -- -- * 'maThreshold' ----- * 'maActionsEnabled'--- -- * 'maAlarmConfigurationUpdatedTimestamp' --+-- * 'maActionsEnabled'+-- -- * 'maInsufficientDataActions' ----- * 'maDimensions'+-- * 'maStateReason' -- -- * 'maStateReasonData' ----- * 'maStateReason'+-- * 'maDimensions' -- -- * 'maAlarmARN' -- -- * 'maAlarmActions' ----- * 'maStatistic'--- -- * 'maUnit'+--+-- * 'maStatistic' metricAlarm :: MetricAlarm metricAlarm = MetricAlarm' { _maAlarmName = Nothing , _maStateUpdatedTimestamp = Nothing- , _maAlarmDescription = Nothing , _maPeriod = Nothing+ , _maAlarmDescription = Nothing , _maEvaluationPeriods = Nothing , _maMetricName = Nothing , _maNamespace = Nothing- , _maOKActions = Nothing , _maComparisonOperator = Nothing+ , _maOKActions = Nothing , _maStateValue = Nothing , _maThreshold = Nothing- , _maActionsEnabled = Nothing , _maAlarmConfigurationUpdatedTimestamp = Nothing+ , _maActionsEnabled = Nothing , _maInsufficientDataActions = Nothing- , _maDimensions = Nothing- , _maStateReasonData = Nothing , _maStateReason = Nothing+ , _maStateReasonData = Nothing+ , _maDimensions = Nothing , _maAlarmARN = Nothing , _maAlarmActions = Nothing- , _maStatistic = Nothing , _maUnit = Nothing+ , _maStatistic = Nothing } -- | The name of the alarm.@@ -424,14 +424,14 @@ maStateUpdatedTimestamp :: Lens' MetricAlarm (Maybe UTCTime) maStateUpdatedTimestamp = lens _maStateUpdatedTimestamp (\ s a -> s{_maStateUpdatedTimestamp = a}) . mapping _Time; --- | The description for the alarm.-maAlarmDescription :: Lens' MetricAlarm (Maybe Text)-maAlarmDescription = lens _maAlarmDescription (\ s a -> s{_maAlarmDescription = a});- -- | The period in seconds over which the statistic is applied. maPeriod :: Lens' MetricAlarm (Maybe Natural) maPeriod = lens _maPeriod (\ s a -> s{_maPeriod = a}) . mapping _Nat; +-- | The description for the alarm.+maAlarmDescription :: Lens' MetricAlarm (Maybe Text)+maAlarmDescription = lens _maAlarmDescription (\ s a -> s{_maAlarmDescription = a});+ -- | The number of periods over which data is compared to the specified -- threshold. maEvaluationPeriods :: Lens' MetricAlarm (Maybe Natural)@@ -445,6 +445,12 @@ maNamespace :: Lens' MetricAlarm (Maybe Text) maNamespace = lens _maNamespace (\ s a -> s{_maNamespace = a}); +-- | The arithmetic operation to use when comparing the specified 'Statistic'+-- and 'Threshold'. The specified 'Statistic' value is used as the first+-- operand.+maComparisonOperator :: Lens' MetricAlarm (Maybe ComparisonOperator)+maComparisonOperator = lens _maComparisonOperator (\ s a -> s{_maComparisonOperator = a});+ -- | The list of actions to execute when this alarm transitions into an 'OK' -- state from any other state. Each action is specified as an Amazon -- Resource Number (ARN). Currently the only actions supported are@@ -452,12 +458,6 @@ maOKActions :: Lens' MetricAlarm [Text] maOKActions = lens _maOKActions (\ s a -> s{_maOKActions = a}) . _Default . _Coerce; --- | The arithmetic operation to use when comparing the specified 'Statistic'--- and 'Threshold'. The specified 'Statistic' value is used as the first--- operand.-maComparisonOperator :: Lens' MetricAlarm (Maybe ComparisonOperator)-maComparisonOperator = lens _maComparisonOperator (\ s a -> s{_maComparisonOperator = a});- -- | The state value for the alarm. maStateValue :: Lens' MetricAlarm (Maybe StateValue) maStateValue = lens _maStateValue (\ s a -> s{_maStateValue = a});@@ -466,11 +466,6 @@ maThreshold :: Lens' MetricAlarm (Maybe Double) maThreshold = lens _maThreshold (\ s a -> s{_maThreshold = a}); --- | Indicates whether actions should be executed during any changes to the--- alarm\'s state.-maActionsEnabled :: Lens' MetricAlarm (Maybe Bool)-maActionsEnabled = lens _maActionsEnabled (\ s a -> s{_maActionsEnabled = a});- -- | The time stamp of the last update to the alarm configuration. Amazon -- CloudWatch uses Coordinated Universal Time (UTC) when returning time -- stamps, which do not accommodate seasonal adjustments such as daylight@@ -480,6 +475,11 @@ maAlarmConfigurationUpdatedTimestamp :: Lens' MetricAlarm (Maybe UTCTime) maAlarmConfigurationUpdatedTimestamp = lens _maAlarmConfigurationUpdatedTimestamp (\ s a -> s{_maAlarmConfigurationUpdatedTimestamp = a}) . mapping _Time; +-- | Indicates whether actions should be executed during any changes to the+-- alarm\'s state.+maActionsEnabled :: Lens' MetricAlarm (Maybe Bool)+maActionsEnabled = lens _maActionsEnabled (\ s a -> s{_maActionsEnabled = a});+ -- | The list of actions to execute when this alarm transitions into an -- 'INSUFFICIENT_DATA' state from any other state. Each action is specified -- as an Amazon Resource Number (ARN). Currently the only actions supported@@ -490,17 +490,17 @@ maInsufficientDataActions :: Lens' MetricAlarm [Text] maInsufficientDataActions = lens _maInsufficientDataActions (\ s a -> s{_maInsufficientDataActions = a}) . _Default . _Coerce; --- | The list of dimensions associated with the alarm\'s associated metric.-maDimensions :: Lens' MetricAlarm [Dimension]-maDimensions = lens _maDimensions (\ s a -> s{_maDimensions = a}) . _Default . _Coerce;+-- | A human-readable explanation for the alarm\'s state.+maStateReason :: Lens' MetricAlarm (Maybe Text)+maStateReason = lens _maStateReason (\ s a -> s{_maStateReason = a}); -- | An explanation for the alarm\'s state in machine-readable JSON format maStateReasonData :: Lens' MetricAlarm (Maybe Text) maStateReasonData = lens _maStateReasonData (\ s a -> s{_maStateReasonData = a}); --- | A human-readable explanation for the alarm\'s state.-maStateReason :: Lens' MetricAlarm (Maybe Text)-maStateReason = lens _maStateReason (\ s a -> s{_maStateReason = a});+-- | The list of dimensions associated with the alarm\'s associated metric.+maDimensions :: Lens' MetricAlarm [Dimension]+maDimensions = lens _maDimensions (\ s a -> s{_maDimensions = a}) . _Default . _Coerce; -- | The Amazon Resource Name (ARN) of the alarm. maAlarmARN :: Lens' MetricAlarm (Maybe Text)@@ -513,46 +513,46 @@ maAlarmActions :: Lens' MetricAlarm [Text] maAlarmActions = lens _maAlarmActions (\ s a -> s{_maAlarmActions = a}) . _Default . _Coerce; --- | The statistic to apply to the alarm\'s associated metric.-maStatistic :: Lens' MetricAlarm (Maybe Statistic)-maStatistic = lens _maStatistic (\ s a -> s{_maStatistic = a});- -- | The unit of the alarm\'s associated metric. maUnit :: Lens' MetricAlarm (Maybe StandardUnit) maUnit = lens _maUnit (\ s a -> s{_maUnit = a}); +-- | The statistic to apply to the alarm\'s associated metric.+maStatistic :: Lens' MetricAlarm (Maybe Statistic)+maStatistic = lens _maStatistic (\ s a -> s{_maStatistic = a});+ instance FromXML MetricAlarm where parseXML x = MetricAlarm' <$> (x .@? "AlarmName") <*> (x .@? "StateUpdatedTimestamp")- <*> (x .@? "AlarmDescription") <*> (x .@? "Period")+ <*> (x .@? "AlarmDescription") <*> (x .@? "EvaluationPeriods") <*> (x .@? "MetricName") <*> (x .@? "Namespace")+ <*> (x .@? "ComparisonOperator") <*> (x .@? "OKActions" .!@ mempty >>= may (parseXMLList "member"))- <*> (x .@? "ComparisonOperator") <*> (x .@? "StateValue") <*> (x .@? "Threshold")- <*> (x .@? "ActionsEnabled") <*> (x .@? "AlarmConfigurationUpdatedTimestamp")+ <*> (x .@? "ActionsEnabled") <*> (x .@? "InsufficientDataActions" .!@ mempty >>= may (parseXMLList "member"))+ <*> (x .@? "StateReason")+ <*> (x .@? "StateReasonData") <*> (x .@? "Dimensions" .!@ mempty >>= may (parseXMLList "member"))- <*> (x .@? "StateReasonData")- <*> (x .@? "StateReason") <*> (x .@? "AlarmArn") <*> (x .@? "AlarmActions" .!@ mempty >>= may (parseXMLList "member"))- <*> (x .@? "Statistic") <*> (x .@? "Unit")+ <*> (x .@? "Statistic") -- | The 'MetricDatum' data type encapsulates the information sent with -- PutMetricData to either create a new metric or add new values to be@@ -562,9 +562,9 @@ data MetricDatum = MetricDatum' { _mdValue :: !(Maybe Double) , _mdDimensions :: !(Maybe [Dimension])+ , _mdUnit :: !(Maybe StandardUnit) , _mdTimestamp :: !(Maybe ISO8601) , _mdStatisticValues :: !(Maybe StatisticSet)- , _mdUnit :: !(Maybe StandardUnit) , _mdMetricName :: !Text } deriving (Eq,Read,Show,Data,Typeable,Generic) @@ -576,12 +576,12 @@ -- -- * 'mdDimensions' --+-- * 'mdUnit'+-- -- * 'mdTimestamp' -- -- * 'mdStatisticValues' ----- * 'mdUnit'--- -- * 'mdMetricName' metricDatum :: Text -- ^ 'mdMetricName'@@ -590,9 +590,9 @@ MetricDatum' { _mdValue = Nothing , _mdDimensions = Nothing+ , _mdUnit = Nothing , _mdTimestamp = Nothing , _mdStatisticValues = Nothing- , _mdUnit = Nothing , _mdMetricName = pMetricName_ } @@ -612,6 +612,10 @@ mdDimensions :: Lens' MetricDatum [Dimension] mdDimensions = lens _mdDimensions (\ s a -> s{_mdDimensions = a}) . _Default . _Coerce; +-- | The unit of the metric.+mdUnit :: Lens' MetricDatum (Maybe StandardUnit)+mdUnit = lens _mdUnit (\ s a -> s{_mdUnit = a});+ -- | The time stamp used for the metric. If not specified, the default value -- is set to the time the metric data was received. Amazon CloudWatch uses -- Coordinated Universal Time (UTC) when returning time stamps, which do@@ -626,10 +630,6 @@ mdStatisticValues :: Lens' MetricDatum (Maybe StatisticSet) mdStatisticValues = lens _mdStatisticValues (\ s a -> s{_mdStatisticValues = a}); --- | The unit of the metric.-mdUnit :: Lens' MetricDatum (Maybe StandardUnit)-mdUnit = lens _mdUnit (\ s a -> s{_mdUnit = a});- -- | The name of the metric. mdMetricName :: Lens' MetricDatum Text mdMetricName = lens _mdMetricName (\ s a -> s{_mdMetricName = a});@@ -640,9 +640,9 @@ ["Value" =: _mdValue, "Dimensions" =: toQuery (toQueryList "member" <$> _mdDimensions),- "Timestamp" =: _mdTimestamp,+ "Unit" =: _mdUnit, "Timestamp" =: _mdTimestamp, "StatisticValues" =: _mdStatisticValues,- "Unit" =: _mdUnit, "MetricName" =: _mdMetricName]+ "MetricName" =: _mdMetricName] -- | The 'StatisticSet' data type describes the 'StatisticValues' component -- of MetricDatum, and represents a set of statistics that describes a
test/Test/AWS/Gen/CloudWatch.hs view
@@ -49,18 +49,18 @@ -- , testGetMetricStatistics $ -- getMetricStatistics ----- , testDisableAlarmActions $--- disableAlarmActions--- -- , testDescribeAlarmsForMetric $ -- describeAlarmsForMetric ----- , testSetAlarmState $--- setAlarmState+-- , testDisableAlarmActions $+-- disableAlarmActions -- -- , testPutMetricAlarm $ -- putMetricAlarm --+-- , testSetAlarmState $+-- setAlarmState+-- -- ] -- , testGroup "response"@@ -85,18 +85,18 @@ -- , testGetMetricStatisticsResponse $ -- getMetricStatisticsResponse ----- , testDisableAlarmActionsResponse $--- disableAlarmActionsResponse--- -- , testDescribeAlarmsForMetricResponse $ -- describeAlarmsForMetricResponse ----- , testSetAlarmStateResponse $--- setAlarmStateResponse+-- , testDisableAlarmActionsResponse $+-- disableAlarmActionsResponse -- -- , testPutMetricAlarmResponse $ -- putMetricAlarmResponse --+-- , testSetAlarmStateResponse $+-- setAlarmStateResponse+-- -- ] -- ] @@ -137,26 +137,26 @@ "GetMetricStatistics" "fixture/GetMetricStatistics.yaml" -testDisableAlarmActions :: DisableAlarmActions -> TestTree-testDisableAlarmActions = req- "DisableAlarmActions"- "fixture/DisableAlarmActions.yaml"- testDescribeAlarmsForMetric :: DescribeAlarmsForMetric -> TestTree testDescribeAlarmsForMetric = req "DescribeAlarmsForMetric" "fixture/DescribeAlarmsForMetric.yaml" -testSetAlarmState :: SetAlarmState -> TestTree-testSetAlarmState = req- "SetAlarmState"- "fixture/SetAlarmState.yaml"+testDisableAlarmActions :: DisableAlarmActions -> TestTree+testDisableAlarmActions = req+ "DisableAlarmActions"+ "fixture/DisableAlarmActions.yaml" testPutMetricAlarm :: PutMetricAlarm -> TestTree testPutMetricAlarm = req "PutMetricAlarm" "fixture/PutMetricAlarm.yaml" +testSetAlarmState :: SetAlarmState -> TestTree+testSetAlarmState = req+ "SetAlarmState"+ "fixture/SetAlarmState.yaml"+ -- Responses testEnableAlarmActionsResponse :: EnableAlarmActionsResponse -> TestTree@@ -208,13 +208,6 @@ cloudWatch (Proxy :: Proxy GetMetricStatistics) -testDisableAlarmActionsResponse :: DisableAlarmActionsResponse -> TestTree-testDisableAlarmActionsResponse = res- "DisableAlarmActionsResponse"- "fixture/DisableAlarmActionsResponse.proto"- cloudWatch- (Proxy :: Proxy DisableAlarmActions)- testDescribeAlarmsForMetricResponse :: DescribeAlarmsForMetricResponse -> TestTree testDescribeAlarmsForMetricResponse = res "DescribeAlarmsForMetricResponse"@@ -222,12 +215,12 @@ cloudWatch (Proxy :: Proxy DescribeAlarmsForMetric) -testSetAlarmStateResponse :: SetAlarmStateResponse -> TestTree-testSetAlarmStateResponse = res- "SetAlarmStateResponse"- "fixture/SetAlarmStateResponse.proto"+testDisableAlarmActionsResponse :: DisableAlarmActionsResponse -> TestTree+testDisableAlarmActionsResponse = res+ "DisableAlarmActionsResponse"+ "fixture/DisableAlarmActionsResponse.proto" cloudWatch- (Proxy :: Proxy SetAlarmState)+ (Proxy :: Proxy DisableAlarmActions) testPutMetricAlarmResponse :: PutMetricAlarmResponse -> TestTree testPutMetricAlarmResponse = res@@ -235,3 +228,10 @@ "fixture/PutMetricAlarmResponse.proto" cloudWatch (Proxy :: Proxy PutMetricAlarm)++testSetAlarmStateResponse :: SetAlarmStateResponse -> TestTree+testSetAlarmStateResponse = res+ "SetAlarmStateResponse"+ "fixture/SetAlarmStateResponse.proto"+ cloudWatch+ (Proxy :: Proxy SetAlarmState)