packages feed

amazonka-cloudwatch 1.5.0 → 1.6.0

raw patch · 29 files changed

+1054/−387 lines, 29 filesdep ~amazonka-coredep ~amazonka-testPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: amazonka-core, amazonka-test

API changes (from Hackage documentation)

+ Network.AWS.CloudWatch: Complete :: StatusCode
+ Network.AWS.CloudWatch: InternalError :: StatusCode
+ Network.AWS.CloudWatch: PartialData :: StatusCode
+ Network.AWS.CloudWatch: TimestampAscending :: ScanBy
+ Network.AWS.CloudWatch: TimestampDescending :: ScanBy
+ Network.AWS.CloudWatch: data MessageData
+ Network.AWS.CloudWatch: data MetricDataQuery
+ Network.AWS.CloudWatch: data MetricDataResult
+ Network.AWS.CloudWatch: data MetricStat
+ Network.AWS.CloudWatch: data ScanBy
+ Network.AWS.CloudWatch: data StatusCode
+ Network.AWS.CloudWatch: mCode :: Lens' MessageData (Maybe Text)
+ Network.AWS.CloudWatch: mValue :: Lens' MessageData (Maybe Text)
+ Network.AWS.CloudWatch: maDatapointsToAlarm :: Lens' MetricAlarm (Maybe Natural)
+ Network.AWS.CloudWatch: mdqExpression :: Lens' MetricDataQuery (Maybe Text)
+ Network.AWS.CloudWatch: mdqId :: Lens' MetricDataQuery Text
+ Network.AWS.CloudWatch: mdqLabel :: Lens' MetricDataQuery (Maybe Text)
+ Network.AWS.CloudWatch: mdqMetricStat :: Lens' MetricDataQuery (Maybe MetricStat)
+ Network.AWS.CloudWatch: mdqReturnData :: Lens' MetricDataQuery (Maybe Bool)
+ Network.AWS.CloudWatch: mdrId :: Lens' MetricDataResult (Maybe Text)
+ Network.AWS.CloudWatch: mdrLabel :: Lens' MetricDataResult (Maybe Text)
+ Network.AWS.CloudWatch: mdrMessages :: Lens' MetricDataResult [MessageData]
+ Network.AWS.CloudWatch: mdrStatusCode :: Lens' MetricDataResult (Maybe StatusCode)
+ Network.AWS.CloudWatch: mdrTimestamps :: Lens' MetricDataResult [UTCTime]
+ Network.AWS.CloudWatch: mdrValues :: Lens' MetricDataResult [Double]
+ Network.AWS.CloudWatch: messageData :: MessageData
+ Network.AWS.CloudWatch: metricDataQuery :: Text -> MetricDataQuery
+ Network.AWS.CloudWatch: metricDataResult :: MetricDataResult
+ Network.AWS.CloudWatch: metricStat :: Metric -> Natural -> Text -> MetricStat
+ Network.AWS.CloudWatch: msMetric :: Lens' MetricStat Metric
+ Network.AWS.CloudWatch: msPeriod :: Lens' MetricStat Natural
+ Network.AWS.CloudWatch: msStat :: Lens' MetricStat Text
+ Network.AWS.CloudWatch: msUnit :: Lens' MetricStat (Maybe StandardUnit)
+ Network.AWS.CloudWatch.GetMetricData: data GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: data GetMetricDataResponse
+ Network.AWS.CloudWatch.GetMetricData: getMetricData :: UTCTime -> UTCTime -> GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: getMetricDataResponse :: Int -> GetMetricDataResponse
+ Network.AWS.CloudWatch.GetMetricData: gmdEndTime :: Lens' GetMetricData UTCTime
+ Network.AWS.CloudWatch.GetMetricData: gmdMaxDatapoints :: Lens' GetMetricData (Maybe Int)
+ Network.AWS.CloudWatch.GetMetricData: gmdMetricDataQueries :: Lens' GetMetricData [MetricDataQuery]
+ Network.AWS.CloudWatch.GetMetricData: gmdNextToken :: Lens' GetMetricData (Maybe Text)
+ Network.AWS.CloudWatch.GetMetricData: gmdScanBy :: Lens' GetMetricData (Maybe ScanBy)
+ Network.AWS.CloudWatch.GetMetricData: gmdStartTime :: Lens' GetMetricData UTCTime
+ Network.AWS.CloudWatch.GetMetricData: gmdrsMetricDataResults :: Lens' GetMetricDataResponse [MetricDataResult]
+ Network.AWS.CloudWatch.GetMetricData: gmdrsNextToken :: Lens' GetMetricDataResponse (Maybe Text)
+ Network.AWS.CloudWatch.GetMetricData: gmdrsResponseStatus :: Lens' GetMetricDataResponse Int
+ Network.AWS.CloudWatch.GetMetricData: instance Control.DeepSeq.NFData Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance Control.DeepSeq.NFData Network.AWS.CloudWatch.GetMetricData.GetMetricDataResponse
+ Network.AWS.CloudWatch.GetMetricData: instance Data.Data.Data Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance Data.Data.Data Network.AWS.CloudWatch.GetMetricData.GetMetricDataResponse
+ Network.AWS.CloudWatch.GetMetricData: instance Data.Hashable.Class.Hashable Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance GHC.Classes.Eq Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance GHC.Classes.Eq Network.AWS.CloudWatch.GetMetricData.GetMetricDataResponse
+ Network.AWS.CloudWatch.GetMetricData: instance GHC.Generics.Generic Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance GHC.Generics.Generic Network.AWS.CloudWatch.GetMetricData.GetMetricDataResponse
+ Network.AWS.CloudWatch.GetMetricData: instance GHC.Read.Read Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance GHC.Read.Read Network.AWS.CloudWatch.GetMetricData.GetMetricDataResponse
+ Network.AWS.CloudWatch.GetMetricData: instance GHC.Show.Show Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance GHC.Show.Show Network.AWS.CloudWatch.GetMetricData.GetMetricDataResponse
+ Network.AWS.CloudWatch.GetMetricData: instance Network.AWS.Data.Headers.ToHeaders Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance Network.AWS.Data.Path.ToPath Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance Network.AWS.Data.Query.ToQuery Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.GetMetricData: instance Network.AWS.Types.AWSRequest Network.AWS.CloudWatch.GetMetricData.GetMetricData
+ Network.AWS.CloudWatch.ListDashboards: instance Network.AWS.Pager.AWSPager Network.AWS.CloudWatch.ListDashboards.ListDashboards
+ Network.AWS.CloudWatch.PutMetricAlarm: pmaDatapointsToAlarm :: Lens' PutMetricAlarm (Maybe Natural)
+ Network.AWS.CloudWatch.Types: Complete :: StatusCode
+ Network.AWS.CloudWatch.Types: InternalError :: StatusCode
+ Network.AWS.CloudWatch.Types: PartialData :: StatusCode
+ Network.AWS.CloudWatch.Types: TimestampAscending :: ScanBy
+ Network.AWS.CloudWatch.Types: TimestampDescending :: ScanBy
+ Network.AWS.CloudWatch.Types: data MessageData
+ Network.AWS.CloudWatch.Types: data MetricDataQuery
+ Network.AWS.CloudWatch.Types: data MetricDataResult
+ Network.AWS.CloudWatch.Types: data MetricStat
+ Network.AWS.CloudWatch.Types: data ScanBy
+ Network.AWS.CloudWatch.Types: data StatusCode
+ Network.AWS.CloudWatch.Types: mCode :: Lens' MessageData (Maybe Text)
+ Network.AWS.CloudWatch.Types: mValue :: Lens' MessageData (Maybe Text)
+ Network.AWS.CloudWatch.Types: maDatapointsToAlarm :: Lens' MetricAlarm (Maybe Natural)
+ Network.AWS.CloudWatch.Types: mdqExpression :: Lens' MetricDataQuery (Maybe Text)
+ Network.AWS.CloudWatch.Types: mdqId :: Lens' MetricDataQuery Text
+ Network.AWS.CloudWatch.Types: mdqLabel :: Lens' MetricDataQuery (Maybe Text)
+ Network.AWS.CloudWatch.Types: mdqMetricStat :: Lens' MetricDataQuery (Maybe MetricStat)
+ Network.AWS.CloudWatch.Types: mdqReturnData :: Lens' MetricDataQuery (Maybe Bool)
+ Network.AWS.CloudWatch.Types: mdrId :: Lens' MetricDataResult (Maybe Text)
+ Network.AWS.CloudWatch.Types: mdrLabel :: Lens' MetricDataResult (Maybe Text)
+ Network.AWS.CloudWatch.Types: mdrMessages :: Lens' MetricDataResult [MessageData]
+ Network.AWS.CloudWatch.Types: mdrStatusCode :: Lens' MetricDataResult (Maybe StatusCode)
+ Network.AWS.CloudWatch.Types: mdrTimestamps :: Lens' MetricDataResult [UTCTime]
+ Network.AWS.CloudWatch.Types: mdrValues :: Lens' MetricDataResult [Double]
+ Network.AWS.CloudWatch.Types: messageData :: MessageData
+ Network.AWS.CloudWatch.Types: metricDataQuery :: Text -> MetricDataQuery
+ Network.AWS.CloudWatch.Types: metricDataResult :: MetricDataResult
+ Network.AWS.CloudWatch.Types: metricStat :: Metric -> Natural -> Text -> MetricStat
+ Network.AWS.CloudWatch.Types: msMetric :: Lens' MetricStat Metric
+ Network.AWS.CloudWatch.Types: msPeriod :: Lens' MetricStat Natural
+ Network.AWS.CloudWatch.Types: msStat :: Lens' MetricStat Text
+ Network.AWS.CloudWatch.Types: msUnit :: Lens' MetricStat (Maybe StandardUnit)
- Network.AWS.CloudWatch.GetDashboard: gdDashboardName :: Lens' GetDashboard (Maybe Text)
+ Network.AWS.CloudWatch.GetDashboard: gdDashboardName :: Lens' GetDashboard Text
- Network.AWS.CloudWatch.GetDashboard: getDashboard :: GetDashboard
+ Network.AWS.CloudWatch.GetDashboard: getDashboard :: Text -> GetDashboard
- Network.AWS.CloudWatch.PutDashboard: pdDashboardBody :: Lens' PutDashboard (Maybe Text)
+ Network.AWS.CloudWatch.PutDashboard: pdDashboardBody :: Lens' PutDashboard Text
- Network.AWS.CloudWatch.PutDashboard: pdDashboardName :: Lens' PutDashboard (Maybe Text)
+ Network.AWS.CloudWatch.PutDashboard: pdDashboardName :: Lens' PutDashboard Text
- Network.AWS.CloudWatch.PutDashboard: putDashboard :: PutDashboard
+ Network.AWS.CloudWatch.PutDashboard: putDashboard :: Text -> Text -> PutDashboard

Files

README.md view
@@ -8,7 +8,7 @@  ## Version -`1.5.0`+`1.6.0`   ## Description
amazonka-cloudwatch.cabal view
@@ -1,5 +1,5 @@ name:                  amazonka-cloudwatch-version:               1.5.0+version:               1.6.0 synopsis:              Amazon CloudWatch SDK. homepage:              https://github.com/brendanhay/amazonka bug-reports:           https://github.com/brendanhay/amazonka/issues@@ -7,7 +7,7 @@ license-file:          LICENSE author:                Brendan Hay maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>-copyright:             Copyright (c) 2013-2017 Brendan Hay+copyright:             Copyright (c) 2013-2018 Brendan Hay category:              Network, AWS, Cloud, Distributed Computing build-type:            Simple cabal-version:         >= 1.10@@ -53,6 +53,7 @@         , Network.AWS.CloudWatch.DisableAlarmActions         , Network.AWS.CloudWatch.EnableAlarmActions         , Network.AWS.CloudWatch.GetDashboard+        , Network.AWS.CloudWatch.GetMetricData         , Network.AWS.CloudWatch.GetMetricStatistics         , Network.AWS.CloudWatch.ListDashboards         , Network.AWS.CloudWatch.ListMetrics@@ -68,7 +69,7 @@         , Network.AWS.CloudWatch.Types.Sum      build-depends:-          amazonka-core == 1.5.0.*+          amazonka-core == 1.6.0.*         , base          >= 4.7     && < 5  test-suite amazonka-cloudwatch-test@@ -88,8 +89,8 @@         , Test.AWS.CloudWatch.Internal      build-depends:-          amazonka-core == 1.5.0.*-        , amazonka-test == 1.5.0.*+          amazonka-core == 1.6.0.*+        , amazonka-test == 1.6.0.*         , amazonka-cloudwatch         , base         , bytestring
+ fixture/GetMetricData.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/monitoring/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  monitoring.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/GetMetricDataResponse.proto view
gen/Network/AWS/CloudWatch.hs view
@@ -5,7 +5,7 @@  -- | -- Module      : Network.AWS.CloudWatch--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -71,10 +71,13 @@     -- ** GetDashboard     , module Network.AWS.CloudWatch.GetDashboard +    -- ** GetMetricData+    , module Network.AWS.CloudWatch.GetMetricData+     -- ** PutMetricData     , module Network.AWS.CloudWatch.PutMetricData -    -- ** ListDashboards+    -- ** ListDashboards (Paginated)     , module Network.AWS.CloudWatch.ListDashboards      -- ** DescribeAlarms (Paginated)@@ -118,6 +121,9 @@     -- ** HistoryItemType     , HistoryItemType (..) +    -- ** ScanBy+    , ScanBy (..)+     -- ** StandardUnit     , StandardUnit (..) @@ -127,6 +133,9 @@     -- ** Statistic     , Statistic (..) +    -- ** StatusCode+    , StatusCode (..)+     -- ** AlarmHistoryItem     , AlarmHistoryItem     , alarmHistoryItem@@ -174,6 +183,12 @@     , dfValue     , dfName +    -- ** MessageData+    , MessageData+    , messageData+    , mValue+    , mCode+     -- ** Metric     , Metric     , metric@@ -196,6 +211,7 @@     , maOKActions     , maEvaluateLowSampleCountPercentile     , maStateValue+    , maDatapointsToAlarm     , maThreshold     , maAlarmConfigurationUpdatedTimestamp     , maActionsEnabled@@ -209,6 +225,25 @@     , maStatistic     , maExtendedStatistic +    -- ** MetricDataQuery+    , MetricDataQuery+    , metricDataQuery+    , mdqReturnData+    , mdqExpression+    , mdqLabel+    , mdqMetricStat+    , mdqId++    -- ** MetricDataResult+    , MetricDataResult+    , metricDataResult+    , mdrValues+    , mdrId+    , mdrTimestamps+    , mdrMessages+    , mdrLabel+    , mdrStatusCode+     -- ** MetricDatum     , MetricDatum     , metricDatum@@ -220,6 +255,14 @@     , mdStatisticValues     , mdMetricName +    -- ** MetricStat+    , MetricStat+    , metricStat+    , msUnit+    , msMetric+    , msPeriod+    , msStat+     -- ** StatisticSet     , StatisticSet     , statisticSet@@ -237,6 +280,7 @@ import Network.AWS.CloudWatch.DisableAlarmActions import Network.AWS.CloudWatch.EnableAlarmActions import Network.AWS.CloudWatch.GetDashboard+import Network.AWS.CloudWatch.GetMetricData import Network.AWS.CloudWatch.GetMetricStatistics import Network.AWS.CloudWatch.ListDashboards import Network.AWS.CloudWatch.ListMetrics
gen/Network/AWS/CloudWatch/DeleteAlarms.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.DeleteAlarms--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -59,7 +59,7 @@  -- | The alarms to be deleted. dAlarmNames :: Lens' DeleteAlarms [Text]-dAlarmNames = lens _dAlarmNames (\ s a -> s{_dAlarmNames = a}) . _Coerce;+dAlarmNames = lens _dAlarmNames (\ s a -> s{_dAlarmNames = a}) . _Coerce  instance AWSRequest DeleteAlarms where         type Rs DeleteAlarms = DeleteAlarmsResponse
gen/Network/AWS/CloudWatch/DeleteDashboards.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.DeleteDashboards--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -45,7 +45,7 @@  -- | /See:/ 'deleteDashboards' smart constructor. newtype DeleteDashboards = DeleteDashboards'-  { _ddDashboardNames :: Maybe [Text]+  { _ddDashboardNames :: [Text]   } deriving (Eq, Read, Show, Data, Typeable, Generic)  @@ -53,15 +53,15 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'ddDashboardNames' - The dashboards to be deleted.+-- * 'ddDashboardNames' - The dashboards to be deleted. This parameter is required. deleteDashboards     :: DeleteDashboards-deleteDashboards = DeleteDashboards' {_ddDashboardNames = Nothing}+deleteDashboards = DeleteDashboards' {_ddDashboardNames = mempty}  --- | The dashboards to be deleted.+-- | The dashboards to be deleted. This parameter is required. ddDashboardNames :: Lens' DeleteDashboards [Text]-ddDashboardNames = lens _ddDashboardNames (\ s a -> s{_ddDashboardNames = a}) . _Default . _Coerce;+ddDashboardNames = lens _ddDashboardNames (\ s a -> s{_ddDashboardNames = a}) . _Coerce  instance AWSRequest DeleteDashboards where         type Rs DeleteDashboards = DeleteDashboardsResponse@@ -87,7 +87,7 @@               ["Action" =: ("DeleteDashboards" :: ByteString),                "Version" =: ("2010-08-01" :: ByteString),                "DashboardNames" =:-                 toQuery (toQueryList "member" <$> _ddDashboardNames)]+                 toQueryList "member" _ddDashboardNames]  -- | /See:/ 'deleteDashboardsResponse' smart constructor. newtype DeleteDashboardsResponse = DeleteDashboardsResponse'@@ -109,6 +109,6 @@  -- | -- | The response status code. ddrsResponseStatus :: Lens' DeleteDashboardsResponse Int-ddrsResponseStatus = lens _ddrsResponseStatus (\ s a -> s{_ddrsResponseStatus = a});+ddrsResponseStatus = lens _ddrsResponseStatus (\ s a -> s{_ddrsResponseStatus = a})  instance NFData DeleteDashboardsResponse where
gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.DescribeAlarmHistory--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -85,38 +85,38 @@     :: DescribeAlarmHistory describeAlarmHistory =   DescribeAlarmHistory'-  { _dahAlarmName = Nothing-  , _dahHistoryItemType = Nothing-  , _dahEndDate = Nothing-  , _dahStartDate = Nothing-  , _dahNextToken = Nothing-  , _dahMaxRecords = Nothing-  }+    { _dahAlarmName = Nothing+    , _dahHistoryItemType = Nothing+    , _dahEndDate = Nothing+    , _dahStartDate = Nothing+    , _dahNextToken = Nothing+    , _dahMaxRecords = Nothing+    }   -- | The name of the alarm. dahAlarmName :: Lens' DescribeAlarmHistory (Maybe Text)-dahAlarmName = lens _dahAlarmName (\ s a -> s{_dahAlarmName = a});+dahAlarmName = lens _dahAlarmName (\ s a -> s{_dahAlarmName = a})  -- | The type of alarm histories to retrieve. dahHistoryItemType :: Lens' DescribeAlarmHistory (Maybe HistoryItemType)-dahHistoryItemType = lens _dahHistoryItemType (\ s a -> s{_dahHistoryItemType = a});+dahHistoryItemType = lens _dahHistoryItemType (\ s a -> s{_dahHistoryItemType = a})  -- | The ending date to retrieve alarm history. dahEndDate :: Lens' DescribeAlarmHistory (Maybe UTCTime)-dahEndDate = lens _dahEndDate (\ s a -> s{_dahEndDate = a}) . mapping _Time;+dahEndDate = lens _dahEndDate (\ s a -> s{_dahEndDate = a}) . mapping _Time  -- | The starting date to retrieve alarm history. dahStartDate :: Lens' DescribeAlarmHistory (Maybe UTCTime)-dahStartDate = lens _dahStartDate (\ s a -> s{_dahStartDate = a}) . mapping _Time;+dahStartDate = lens _dahStartDate (\ s a -> s{_dahStartDate = a}) . mapping _Time  -- | The token returned by a previous call to indicate that there is more data available. dahNextToken :: Lens' DescribeAlarmHistory (Maybe Text)-dahNextToken = lens _dahNextToken (\ s a -> s{_dahNextToken = a});+dahNextToken = lens _dahNextToken (\ s a -> s{_dahNextToken = a})  -- | The maximum number of alarm history records to retrieve. dahMaxRecords :: Lens' DescribeAlarmHistory (Maybe Natural)-dahMaxRecords = lens _dahMaxRecords (\ s a -> s{_dahMaxRecords = a}) . mapping _Nat;+dahMaxRecords = lens _dahMaxRecords (\ s a -> s{_dahMaxRecords = a}) . mapping _Nat  instance AWSPager DescribeAlarmHistory where         page rq rs@@ -182,22 +182,22 @@     -> DescribeAlarmHistoryResponse describeAlarmHistoryResponse pResponseStatus_ =   DescribeAlarmHistoryResponse'-  { _dahrsAlarmHistoryItems = Nothing-  , _dahrsNextToken = Nothing-  , _dahrsResponseStatus = pResponseStatus_-  }+    { _dahrsAlarmHistoryItems = Nothing+    , _dahrsNextToken = Nothing+    , _dahrsResponseStatus = pResponseStatus_+    }   -- | The alarm histories, in JSON format. dahrsAlarmHistoryItems :: Lens' DescribeAlarmHistoryResponse [AlarmHistoryItem]-dahrsAlarmHistoryItems = lens _dahrsAlarmHistoryItems (\ s a -> s{_dahrsAlarmHistoryItems = a}) . _Default . _Coerce;+dahrsAlarmHistoryItems = lens _dahrsAlarmHistoryItems (\ s a -> s{_dahrsAlarmHistoryItems = a}) . _Default . _Coerce  -- | The token that marks the start of the next batch of returned results. dahrsNextToken :: Lens' DescribeAlarmHistoryResponse (Maybe Text)-dahrsNextToken = lens _dahrsNextToken (\ s a -> s{_dahrsNextToken = a});+dahrsNextToken = lens _dahrsNextToken (\ s a -> s{_dahrsNextToken = a})  -- | -- | The response status code. dahrsResponseStatus :: Lens' DescribeAlarmHistoryResponse Int-dahrsResponseStatus = lens _dahrsResponseStatus (\ s a -> s{_dahrsResponseStatus = a});+dahrsResponseStatus = lens _dahrsResponseStatus (\ s a -> s{_dahrsResponseStatus = a})  instance NFData DescribeAlarmHistoryResponse where
gen/Network/AWS/CloudWatch/DescribeAlarms.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.DescribeAlarms--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -83,38 +83,38 @@     :: DescribeAlarms describeAlarms =   DescribeAlarms'-  { _daAlarmNamePrefix = Nothing-  , _daActionPrefix = Nothing-  , _daNextToken = Nothing-  , _daStateValue = Nothing-  , _daAlarmNames = Nothing-  , _daMaxRecords = Nothing-  }+    { _daAlarmNamePrefix = Nothing+    , _daActionPrefix = Nothing+    , _daNextToken = Nothing+    , _daStateValue = Nothing+    , _daAlarmNames = Nothing+    , _daMaxRecords = Nothing+    }   -- | The alarm name prefix. If this parameter is specified, you cannot specify @AlarmNames@ . daAlarmNamePrefix :: Lens' DescribeAlarms (Maybe Text)-daAlarmNamePrefix = lens _daAlarmNamePrefix (\ s a -> s{_daAlarmNamePrefix = a});+daAlarmNamePrefix = lens _daAlarmNamePrefix (\ s a -> s{_daAlarmNamePrefix = a})  -- | The action name prefix. daActionPrefix :: Lens' DescribeAlarms (Maybe Text)-daActionPrefix = lens _daActionPrefix (\ s a -> s{_daActionPrefix = a});+daActionPrefix = lens _daActionPrefix (\ s a -> s{_daActionPrefix = a})  -- | The token returned by a previous call to indicate that there is more data available. daNextToken :: Lens' DescribeAlarms (Maybe Text)-daNextToken = lens _daNextToken (\ s a -> s{_daNextToken = a});+daNextToken = lens _daNextToken (\ s a -> s{_daNextToken = a})  -- | The state value to be used in matching alarms. daStateValue :: Lens' DescribeAlarms (Maybe StateValue)-daStateValue = lens _daStateValue (\ s a -> s{_daStateValue = a});+daStateValue = lens _daStateValue (\ s a -> s{_daStateValue = a})  -- | The names of the alarms. daAlarmNames :: Lens' DescribeAlarms [Text]-daAlarmNames = lens _daAlarmNames (\ s a -> s{_daAlarmNames = a}) . _Default . _Coerce;+daAlarmNames = lens _daAlarmNames (\ s a -> s{_daAlarmNames = a}) . _Default . _Coerce  -- | The maximum number of alarm descriptions to retrieve. daMaxRecords :: Lens' DescribeAlarms (Maybe Natural)-daMaxRecords = lens _daMaxRecords (\ s a -> s{_daMaxRecords = a}) . mapping _Nat;+daMaxRecords = lens _daMaxRecords (\ s a -> s{_daMaxRecords = a}) . mapping _Nat  instance AWSPager DescribeAlarms where         page rq rs@@ -180,22 +180,22 @@     -> DescribeAlarmsResponse describeAlarmsResponse pResponseStatus_ =   DescribeAlarmsResponse'-  { _darsMetricAlarms = Nothing-  , _darsNextToken = Nothing-  , _darsResponseStatus = pResponseStatus_-  }+    { _darsMetricAlarms = Nothing+    , _darsNextToken = Nothing+    , _darsResponseStatus = pResponseStatus_+    }   -- | The information for the specified alarms. darsMetricAlarms :: Lens' DescribeAlarmsResponse [MetricAlarm]-darsMetricAlarms = lens _darsMetricAlarms (\ s a -> s{_darsMetricAlarms = a}) . _Default . _Coerce;+darsMetricAlarms = lens _darsMetricAlarms (\ s a -> s{_darsMetricAlarms = a}) . _Default . _Coerce  -- | The token that marks the start of the next batch of returned results. darsNextToken :: Lens' DescribeAlarmsResponse (Maybe Text)-darsNextToken = lens _darsNextToken (\ s a -> s{_darsNextToken = a});+darsNextToken = lens _darsNextToken (\ s a -> s{_darsNextToken = a})  -- | -- | The response status code. darsResponseStatus :: Lens' DescribeAlarmsResponse Int-darsResponseStatus = lens _darsResponseStatus (\ s a -> s{_darsResponseStatus = a});+darsResponseStatus = lens _darsResponseStatus (\ s a -> s{_darsResponseStatus = a})  instance NFData DescribeAlarmsResponse where
gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.DescribeAlarmsForMetric--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -85,43 +85,43 @@     -> DescribeAlarmsForMetric describeAlarmsForMetric pMetricName_ pNamespace_ =   DescribeAlarmsForMetric'-  { _dafmPeriod = Nothing-  , _dafmDimensions = Nothing-  , _dafmUnit = Nothing-  , _dafmStatistic = Nothing-  , _dafmExtendedStatistic = Nothing-  , _dafmMetricName = pMetricName_-  , _dafmNamespace = pNamespace_-  }+    { _dafmPeriod = Nothing+    , _dafmDimensions = Nothing+    , _dafmUnit = Nothing+    , _dafmStatistic = Nothing+    , _dafmExtendedStatistic = Nothing+    , _dafmMetricName = pMetricName_+    , _dafmNamespace = pNamespace_+    }   -- | The period, in seconds, over which the statistic is applied. dafmPeriod :: Lens' DescribeAlarmsForMetric (Maybe Natural)-dafmPeriod = lens _dafmPeriod (\ s a -> s{_dafmPeriod = a}) . mapping _Nat;+dafmPeriod = lens _dafmPeriod (\ s a -> s{_dafmPeriod = a}) . mapping _Nat  -- | The dimensions associated with the metric. If the metric has any associated dimensions, you must specify them in order for the call to succeed. dafmDimensions :: Lens' DescribeAlarmsForMetric [Dimension]-dafmDimensions = lens _dafmDimensions (\ s a -> s{_dafmDimensions = a}) . _Default . _Coerce;+dafmDimensions = lens _dafmDimensions (\ s a -> s{_dafmDimensions = a}) . _Default . _Coerce  -- | The unit for the metric. dafmUnit :: Lens' DescribeAlarmsForMetric (Maybe StandardUnit)-dafmUnit = lens _dafmUnit (\ s a -> s{_dafmUnit = a});+dafmUnit = lens _dafmUnit (\ s a -> s{_dafmUnit = a})  -- | The statistic for the metric, other than percentiles. For percentile statistics, use @ExtendedStatistics@ . dafmStatistic :: Lens' DescribeAlarmsForMetric (Maybe Statistic)-dafmStatistic = lens _dafmStatistic (\ s a -> s{_dafmStatistic = a});+dafmStatistic = lens _dafmStatistic (\ s a -> s{_dafmStatistic = a})  -- | The percentile statistic for the metric. Specify a value between p0.0 and p100. dafmExtendedStatistic :: Lens' DescribeAlarmsForMetric (Maybe Text)-dafmExtendedStatistic = lens _dafmExtendedStatistic (\ s a -> s{_dafmExtendedStatistic = a});+dafmExtendedStatistic = lens _dafmExtendedStatistic (\ s a -> s{_dafmExtendedStatistic = a})  -- | The name of the metric. dafmMetricName :: Lens' DescribeAlarmsForMetric Text-dafmMetricName = lens _dafmMetricName (\ s a -> s{_dafmMetricName = a});+dafmMetricName = lens _dafmMetricName (\ s a -> s{_dafmMetricName = a})  -- | The namespace of the metric. dafmNamespace :: Lens' DescribeAlarmsForMetric Text-dafmNamespace = lens _dafmNamespace (\ s a -> s{_dafmNamespace = a});+dafmNamespace = lens _dafmNamespace (\ s a -> s{_dafmNamespace = a})  instance AWSRequest DescribeAlarmsForMetric where         type Rs DescribeAlarmsForMetric =@@ -178,15 +178,15 @@     -> DescribeAlarmsForMetricResponse describeAlarmsForMetricResponse pResponseStatus_ =   DescribeAlarmsForMetricResponse'-  {_dafmrsMetricAlarms = Nothing, _dafmrsResponseStatus = pResponseStatus_}+    {_dafmrsMetricAlarms = Nothing, _dafmrsResponseStatus = pResponseStatus_}   -- | The information for each alarm with the specified metric. dafmrsMetricAlarms :: Lens' DescribeAlarmsForMetricResponse [MetricAlarm]-dafmrsMetricAlarms = lens _dafmrsMetricAlarms (\ s a -> s{_dafmrsMetricAlarms = a}) . _Default . _Coerce;+dafmrsMetricAlarms = lens _dafmrsMetricAlarms (\ s a -> s{_dafmrsMetricAlarms = a}) . _Default . _Coerce  -- | -- | The response status code. dafmrsResponseStatus :: Lens' DescribeAlarmsForMetricResponse Int-dafmrsResponseStatus = lens _dafmrsResponseStatus (\ s a -> s{_dafmrsResponseStatus = a});+dafmrsResponseStatus = lens _dafmrsResponseStatus (\ s a -> s{_dafmrsResponseStatus = a})  instance NFData DescribeAlarmsForMetricResponse where
gen/Network/AWS/CloudWatch/DisableAlarmActions.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.DisableAlarmActions--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -59,7 +59,7 @@  -- | The names of the alarms. daaAlarmNames :: Lens' DisableAlarmActions [Text]-daaAlarmNames = lens _daaAlarmNames (\ s a -> s{_daaAlarmNames = a}) . _Coerce;+daaAlarmNames = lens _daaAlarmNames (\ s a -> s{_daaAlarmNames = a}) . _Coerce  instance AWSRequest DisableAlarmActions where         type Rs DisableAlarmActions =
gen/Network/AWS/CloudWatch/EnableAlarmActions.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.EnableAlarmActions--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -59,7 +59,7 @@  -- | The names of the alarms. eaaAlarmNames :: Lens' EnableAlarmActions [Text]-eaaAlarmNames = lens _eaaAlarmNames (\ s a -> s{_eaaAlarmNames = a}) . _Coerce;+eaaAlarmNames = lens _eaaAlarmNames (\ s a -> s{_eaaAlarmNames = a}) . _Coerce  instance AWSRequest EnableAlarmActions where         type Rs EnableAlarmActions =
gen/Network/AWS/CloudWatch/GetDashboard.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.GetDashboard--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -50,7 +50,7 @@  -- | /See:/ 'getDashboard' smart constructor. newtype GetDashboard = GetDashboard'-  { _gdDashboardName :: Maybe Text+  { _gdDashboardName :: Text   } deriving (Eq, Read, Show, Data, Typeable, Generic)  @@ -60,13 +60,15 @@ -- -- * 'gdDashboardName' - The name of the dashboard to be described. getDashboard-    :: GetDashboard-getDashboard = GetDashboard' {_gdDashboardName = Nothing}+    :: Text -- ^ 'gdDashboardName'+    -> GetDashboard+getDashboard pDashboardName_ =+  GetDashboard' {_gdDashboardName = pDashboardName_}   -- | The name of the dashboard to be described.-gdDashboardName :: Lens' GetDashboard (Maybe Text)-gdDashboardName = lens _gdDashboardName (\ s a -> s{_gdDashboardName = a});+gdDashboardName :: Lens' GetDashboard Text+gdDashboardName = lens _gdDashboardName (\ s a -> s{_gdDashboardName = a})  instance AWSRequest GetDashboard where         type Rs GetDashboard = GetDashboardResponse@@ -121,27 +123,27 @@     -> GetDashboardResponse getDashboardResponse pResponseStatus_ =   GetDashboardResponse'-  { _gdrsDashboardName = Nothing-  , _gdrsDashboardBody = Nothing-  , _gdrsDashboardARN = Nothing-  , _gdrsResponseStatus = pResponseStatus_-  }+    { _gdrsDashboardName = Nothing+    , _gdrsDashboardBody = Nothing+    , _gdrsDashboardARN = Nothing+    , _gdrsResponseStatus = pResponseStatus_+    }   -- | The name of the dashboard. gdrsDashboardName :: Lens' GetDashboardResponse (Maybe Text)-gdrsDashboardName = lens _gdrsDashboardName (\ s a -> s{_gdrsDashboardName = a});+gdrsDashboardName = lens _gdrsDashboardName (\ s a -> s{_gdrsDashboardName = a})  -- | The detailed information about the dashboard, including what widgets are included and their location on the dashboard. For more information about the @DashboardBody@ syntax, see 'CloudWatch-Dashboard-Body-Structure' . gdrsDashboardBody :: Lens' GetDashboardResponse (Maybe Text)-gdrsDashboardBody = lens _gdrsDashboardBody (\ s a -> s{_gdrsDashboardBody = a});+gdrsDashboardBody = lens _gdrsDashboardBody (\ s a -> s{_gdrsDashboardBody = a})  -- | The Amazon Resource Name (ARN) of the dashboard. gdrsDashboardARN :: Lens' GetDashboardResponse (Maybe Text)-gdrsDashboardARN = lens _gdrsDashboardARN (\ s a -> s{_gdrsDashboardARN = a});+gdrsDashboardARN = lens _gdrsDashboardARN (\ s a -> s{_gdrsDashboardARN = a})  -- | -- | The response status code. gdrsResponseStatus :: Lens' GetDashboardResponse Int-gdrsResponseStatus = lens _gdrsResponseStatus (\ s a -> s{_gdrsResponseStatus = a});+gdrsResponseStatus = lens _gdrsResponseStatus (\ s a -> s{_gdrsResponseStatus = a})  instance NFData GetDashboardResponse where
+ gen/Network/AWS/CloudWatch/GetMetricData.hs view
@@ -0,0 +1,194 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}+{-# LANGUAGE TypeFamilies       #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Network.AWS.CloudWatch.GetMetricData+-- Copyright   : (c) 2013-2018 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- You can use the @GetMetricData@ API to retrieve as many as 100 different metrics in a single request, with a total of as many as 100,800 datapoints. You can also optionally perform math expressions on the values of the returned statistics, to create new time series that represent new insights into your data. For example, using Lambda metrics, you could divide the Errors metric by the Invocations metric to get an error rate time series. For more information about metric math expressions, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax Metric Math Syntax and Functions> in the /Amazon CloudWatch User Guide/ .+--+--+-- Calls to the @GetMetricData@ API have a different pricing structure than calls to @GetMetricStatistics@ . For more information about pricing, see <https://aws.amazon.com/cloudwatch/pricing/ Amazon CloudWatch Pricing> .+--+module Network.AWS.CloudWatch.GetMetricData+    (+    -- * Creating a Request+      getMetricData+    , GetMetricData+    -- * Request Lenses+    , gmdMaxDatapoints+    , gmdNextToken+    , gmdScanBy+    , gmdMetricDataQueries+    , gmdStartTime+    , gmdEndTime++    -- * Destructuring the Response+    , getMetricDataResponse+    , GetMetricDataResponse+    -- * Response Lenses+    , gmdrsMetricDataResults+    , gmdrsNextToken+    , gmdrsResponseStatus+    ) where++import Network.AWS.CloudWatch.Types+import Network.AWS.CloudWatch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getMetricData' smart constructor.+data GetMetricData = GetMetricData'+  { _gmdMaxDatapoints     :: !(Maybe Int)+  , _gmdNextToken         :: !(Maybe Text)+  , _gmdScanBy            :: !(Maybe ScanBy)+  , _gmdMetricDataQueries :: ![MetricDataQuery]+  , _gmdStartTime         :: !ISO8601+  , _gmdEndTime           :: !ISO8601+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetMetricData' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gmdMaxDatapoints' - The maximum number of data points the request should return before paginating. If you omit this, the default of 100,800 is used.+--+-- * 'gmdNextToken' - Include this value, if it was returned by the previous call, to get the next set of data points.+--+-- * 'gmdScanBy' - The order in which data points should be returned. @TimestampDescending@ returns the newest data first and paginates when the @MaxDatapoints@ limit is reached. @TimestampAscending@ returns the oldest data first and paginates when the @MaxDatapoints@ limit is reached.+--+-- * 'gmdMetricDataQueries' - The metric queries to be returned. A single @GetMetricData@ call can include as many as 100 @MetricDataQuery@ structures. Each of these structures can specify either a metric to retrieve, or a math expression to perform on retrieved data.+--+-- * 'gmdStartTime' - The time stamp indicating the earliest data to be returned.+--+-- * 'gmdEndTime' - The time stamp indicating the latest data to be returned.+getMetricData+    :: UTCTime -- ^ 'gmdStartTime'+    -> UTCTime -- ^ 'gmdEndTime'+    -> GetMetricData+getMetricData pStartTime_ pEndTime_ =+  GetMetricData'+    { _gmdMaxDatapoints = Nothing+    , _gmdNextToken = Nothing+    , _gmdScanBy = Nothing+    , _gmdMetricDataQueries = mempty+    , _gmdStartTime = _Time # pStartTime_+    , _gmdEndTime = _Time # pEndTime_+    }+++-- | The maximum number of data points the request should return before paginating. If you omit this, the default of 100,800 is used.+gmdMaxDatapoints :: Lens' GetMetricData (Maybe Int)+gmdMaxDatapoints = lens _gmdMaxDatapoints (\ s a -> s{_gmdMaxDatapoints = a})++-- | Include this value, if it was returned by the previous call, to get the next set of data points.+gmdNextToken :: Lens' GetMetricData (Maybe Text)+gmdNextToken = lens _gmdNextToken (\ s a -> s{_gmdNextToken = a})++-- | The order in which data points should be returned. @TimestampDescending@ returns the newest data first and paginates when the @MaxDatapoints@ limit is reached. @TimestampAscending@ returns the oldest data first and paginates when the @MaxDatapoints@ limit is reached.+gmdScanBy :: Lens' GetMetricData (Maybe ScanBy)+gmdScanBy = lens _gmdScanBy (\ s a -> s{_gmdScanBy = a})++-- | The metric queries to be returned. A single @GetMetricData@ call can include as many as 100 @MetricDataQuery@ structures. Each of these structures can specify either a metric to retrieve, or a math expression to perform on retrieved data.+gmdMetricDataQueries :: Lens' GetMetricData [MetricDataQuery]+gmdMetricDataQueries = lens _gmdMetricDataQueries (\ s a -> s{_gmdMetricDataQueries = a}) . _Coerce++-- | The time stamp indicating the earliest data to be returned.+gmdStartTime :: Lens' GetMetricData UTCTime+gmdStartTime = lens _gmdStartTime (\ s a -> s{_gmdStartTime = a}) . _Time++-- | The time stamp indicating the latest data to be returned.+gmdEndTime :: Lens' GetMetricData UTCTime+gmdEndTime = lens _gmdEndTime (\ s a -> s{_gmdEndTime = a}) . _Time++instance AWSRequest GetMetricData where+        type Rs GetMetricData = GetMetricDataResponse+        request = postQuery cloudWatch+        response+          = receiveXMLWrapper "GetMetricDataResult"+              (\ s h x ->+                 GetMetricDataResponse' <$>+                   (x .@? "MetricDataResults" .!@ mempty >>=+                      may (parseXMLList "member"))+                     <*> (x .@? "NextToken")+                     <*> (pure (fromEnum s)))++instance Hashable GetMetricData where++instance NFData GetMetricData where++instance ToHeaders GetMetricData where+        toHeaders = const mempty++instance ToPath GetMetricData where+        toPath = const "/"++instance ToQuery GetMetricData where+        toQuery GetMetricData'{..}+          = mconcat+              ["Action" =: ("GetMetricData" :: ByteString),+               "Version" =: ("2010-08-01" :: ByteString),+               "MaxDatapoints" =: _gmdMaxDatapoints,+               "NextToken" =: _gmdNextToken, "ScanBy" =: _gmdScanBy,+               "MetricDataQueries" =:+                 toQueryList "member" _gmdMetricDataQueries,+               "StartTime" =: _gmdStartTime,+               "EndTime" =: _gmdEndTime]++-- | /See:/ 'getMetricDataResponse' smart constructor.+data GetMetricDataResponse = GetMetricDataResponse'+  { _gmdrsMetricDataResults :: !(Maybe [MetricDataResult])+  , _gmdrsNextToken         :: !(Maybe Text)+  , _gmdrsResponseStatus    :: !Int+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetMetricDataResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gmdrsMetricDataResults' - The metrics that are returned, including the metric name, namespace, and dimensions.+--+-- * 'gmdrsNextToken' - A token that marks the next batch of returned results.+--+-- * 'gmdrsResponseStatus' - -- | The response status code.+getMetricDataResponse+    :: Int -- ^ 'gmdrsResponseStatus'+    -> GetMetricDataResponse+getMetricDataResponse pResponseStatus_ =+  GetMetricDataResponse'+    { _gmdrsMetricDataResults = Nothing+    , _gmdrsNextToken = Nothing+    , _gmdrsResponseStatus = pResponseStatus_+    }+++-- | The metrics that are returned, including the metric name, namespace, and dimensions.+gmdrsMetricDataResults :: Lens' GetMetricDataResponse [MetricDataResult]+gmdrsMetricDataResults = lens _gmdrsMetricDataResults (\ s a -> s{_gmdrsMetricDataResults = a}) . _Default . _Coerce++-- | A token that marks the next batch of returned results.+gmdrsNextToken :: Lens' GetMetricDataResponse (Maybe Text)+gmdrsNextToken = lens _gmdrsNextToken (\ s a -> s{_gmdrsNextToken = a})++-- | -- | The response status code.+gmdrsResponseStatus :: Lens' GetMetricDataResponse Int+gmdrsResponseStatus = lens _gmdrsResponseStatus (\ s a -> s{_gmdrsResponseStatus = a})++instance NFData GetMetricDataResponse where
gen/Network/AWS/CloudWatch/GetMetricStatistics.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.GetMetricStatistics--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -107,7 +107,7 @@ -- -- * 'gmsDimensions' - The dimensions. If the metric contains multiple dimensions, you must include a value for each dimension. CloudWatch treats each unique combination of dimensions as a separate metric. If a specific combination of dimensions was not published, you can't retrieve statistics for it. You must specify the same dimensions that were used when the metrics were created. For an example, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#dimension-combinations Dimension Combinations> in the /Amazon CloudWatch User Guide/ . For more information about specifying dimensions, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html Publishing Metrics> in the /Amazon CloudWatch User Guide/ . ----- * 'gmsUnit' - The unit for a given metric. Metrics may be reported in multiple units. Not supplying a unit results in all units being returned. If the metric only ever reports one unit, specifying a unit has no effect.+-- * 'gmsUnit' - The unit for a given metric. Metrics may be reported in multiple units. Not supplying a unit results in all units being returned. If you specify only a unit that the metric does not report, the results of the call are null. -- -- * 'gmsNamespace' - The namespace of the metric, with or without spaces. --@@ -127,53 +127,53 @@     -> GetMetricStatistics getMetricStatistics pNamespace_ pMetricName_ pStartTime_ pEndTime_ pPeriod_ =   GetMetricStatistics'-  { _gmsExtendedStatistics = Nothing-  , _gmsStatistics = Nothing-  , _gmsDimensions = Nothing-  , _gmsUnit = Nothing-  , _gmsNamespace = pNamespace_-  , _gmsMetricName = pMetricName_-  , _gmsStartTime = _Time # pStartTime_-  , _gmsEndTime = _Time # pEndTime_-  , _gmsPeriod = _Nat # pPeriod_-  }+    { _gmsExtendedStatistics = Nothing+    , _gmsStatistics = Nothing+    , _gmsDimensions = Nothing+    , _gmsUnit = Nothing+    , _gmsNamespace = pNamespace_+    , _gmsMetricName = pMetricName_+    , _gmsStartTime = _Time # pStartTime_+    , _gmsEndTime = _Time # pEndTime_+    , _gmsPeriod = _Nat # pPeriod_+    }   -- | The percentile statistics. Specify values between p0.0 and p100. When calling @GetMetricStatistics@ , you must specify either @Statistics@ or @ExtendedStatistics@ , but not both. gmsExtendedStatistics :: Lens' GetMetricStatistics (Maybe (NonEmpty Text))-gmsExtendedStatistics = lens _gmsExtendedStatistics (\ s a -> s{_gmsExtendedStatistics = a}) . mapping _List1;+gmsExtendedStatistics = lens _gmsExtendedStatistics (\ s a -> s{_gmsExtendedStatistics = a}) . mapping _List1  -- | The metric statistics, other than percentile. For percentile statistics, use @ExtendedStatistics@ . When calling @GetMetricStatistics@ , you must specify either @Statistics@ or @ExtendedStatistics@ , but not both. gmsStatistics :: Lens' GetMetricStatistics (Maybe (NonEmpty Statistic))-gmsStatistics = lens _gmsStatistics (\ s a -> s{_gmsStatistics = a}) . mapping _List1;+gmsStatistics = lens _gmsStatistics (\ s a -> s{_gmsStatistics = a}) . mapping _List1  -- | The dimensions. If the metric contains multiple dimensions, you must include a value for each dimension. CloudWatch treats each unique combination of dimensions as a separate metric. If a specific combination of dimensions was not published, you can't retrieve statistics for it. You must specify the same dimensions that were used when the metrics were created. For an example, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#dimension-combinations Dimension Combinations> in the /Amazon CloudWatch User Guide/ . For more information about specifying dimensions, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html Publishing Metrics> in the /Amazon CloudWatch User Guide/ . gmsDimensions :: Lens' GetMetricStatistics [Dimension]-gmsDimensions = lens _gmsDimensions (\ s a -> s{_gmsDimensions = a}) . _Default . _Coerce;+gmsDimensions = lens _gmsDimensions (\ s a -> s{_gmsDimensions = a}) . _Default . _Coerce --- | The unit for a given metric. Metrics may be reported in multiple units. Not supplying a unit results in all units being returned. If the metric only ever reports one unit, specifying a unit has no effect.+-- | The unit for a given metric. Metrics may be reported in multiple units. Not supplying a unit results in all units being returned. If you specify only a unit that the metric does not report, the results of the call are null. gmsUnit :: Lens' GetMetricStatistics (Maybe StandardUnit)-gmsUnit = lens _gmsUnit (\ s a -> s{_gmsUnit = a});+gmsUnit = lens _gmsUnit (\ s a -> s{_gmsUnit = a})  -- | The namespace of the metric, with or without spaces. gmsNamespace :: Lens' GetMetricStatistics Text-gmsNamespace = lens _gmsNamespace (\ s a -> s{_gmsNamespace = a});+gmsNamespace = lens _gmsNamespace (\ s a -> s{_gmsNamespace = a})  -- | The name of the metric, with or without spaces. gmsMetricName :: Lens' GetMetricStatistics Text-gmsMetricName = lens _gmsMetricName (\ s a -> s{_gmsMetricName = a});+gmsMetricName = lens _gmsMetricName (\ s a -> s{_gmsMetricName = a})  -- | The time stamp that determines the first data point to return. Start times are evaluated relative to the time that CloudWatch receives the request. The value specified is inclusive; results include data points with the specified time stamp. The time stamp must be in ISO 8601 UTC format (for example, 2016-10-03T23:00:00Z). CloudWatch rounds the specified time stamp as follows:     * Start time less than 15 days ago - Round down to the nearest whole minute. For example, 12:32:34 is rounded down to 12:32:00.     * Start time between 15 and 63 days ago - Round down to the nearest 5-minute clock interval. For example, 12:32:34 is rounded down to 12:30:00.     * Start time greater than 63 days ago - Round down to the nearest 1-hour clock interval. For example, 12:32:34 is rounded down to 12:00:00. If you set @Period@ to 5, 10, or 30, the start time of your request is rounded down to the nearest time that corresponds to even 5-, 10-, or 30-second divisions of a minute. For example, if you make a query at (HH:mm:ss) 01:05:23 for the previous 10-second period, the start time of your request is rounded down and you receive data from 01:05:10 to 01:05:20. If you make a query at 15:07:17 for the previous 5 minutes of data, using a period of 5 seconds, you receive data timestamped between 15:02:15 and 15:07:15. gmsStartTime :: Lens' GetMetricStatistics UTCTime-gmsStartTime = lens _gmsStartTime (\ s a -> s{_gmsStartTime = a}) . _Time;+gmsStartTime = lens _gmsStartTime (\ s a -> s{_gmsStartTime = a}) . _Time  -- | The time stamp that determines the last data point to return. The value specified is exclusive; results include data points up to the specified time stamp. The time stamp must be in ISO 8601 UTC format (for example, 2016-10-10T23:00:00Z). gmsEndTime :: Lens' GetMetricStatistics UTCTime-gmsEndTime = lens _gmsEndTime (\ s a -> s{_gmsEndTime = a}) . _Time;+gmsEndTime = lens _gmsEndTime (\ s a -> s{_gmsEndTime = a}) . _Time  -- | The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a @PutMetricData@ call that includes a @StorageResolution@ of 1 second. If the @StartTime@ parameter specifies a time stamp that is greater than 3 hours ago, you must specify the period as follows or no data points in that time range is returned:     * Start time between 3 hours and 15 days ago - Use a multiple of 60 seconds (1 minute).     * Start time between 15 and 63 days ago - Use a multiple of 300 seconds (5 minutes).     * Start time greater than 63 days ago - Use a multiple of 3600 seconds (1 hour). gmsPeriod :: Lens' GetMetricStatistics Natural-gmsPeriod = lens _gmsPeriod (\ s a -> s{_gmsPeriod = a}) . _Nat;+gmsPeriod = lens _gmsPeriod (\ s a -> s{_gmsPeriod = a}) . _Nat  instance AWSRequest GetMetricStatistics where         type Rs GetMetricStatistics =@@ -237,22 +237,22 @@     -> GetMetricStatisticsResponse getMetricStatisticsResponse pResponseStatus_ =   GetMetricStatisticsResponse'-  { _gmsrsDatapoints = Nothing-  , _gmsrsLabel = Nothing-  , _gmsrsResponseStatus = pResponseStatus_-  }+    { _gmsrsDatapoints = Nothing+    , _gmsrsLabel = Nothing+    , _gmsrsResponseStatus = pResponseStatus_+    }   -- | The data points for the specified metric. gmsrsDatapoints :: Lens' GetMetricStatisticsResponse [Datapoint]-gmsrsDatapoints = lens _gmsrsDatapoints (\ s a -> s{_gmsrsDatapoints = a}) . _Default . _Coerce;+gmsrsDatapoints = lens _gmsrsDatapoints (\ s a -> s{_gmsrsDatapoints = a}) . _Default . _Coerce  -- | A label for the specified metric. gmsrsLabel :: Lens' GetMetricStatisticsResponse (Maybe Text)-gmsrsLabel = lens _gmsrsLabel (\ s a -> s{_gmsrsLabel = a});+gmsrsLabel = lens _gmsrsLabel (\ s a -> s{_gmsrsLabel = a})  -- | -- | The response status code. gmsrsResponseStatus :: Lens' GetMetricStatisticsResponse Int-gmsrsResponseStatus = lens _gmsrsResponseStatus (\ s a -> s{_gmsrsResponseStatus = a});+gmsrsResponseStatus = lens _gmsrsResponseStatus (\ s a -> s{_gmsrsResponseStatus = a})  instance NFData GetMetricStatisticsResponse where
gen/Network/AWS/CloudWatch/ListDashboards.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.ListDashboards--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -21,6 +21,8 @@ -- Returns a list of the dashboards for your account. If you include @DashboardNamePrefix@ , only those dashboards with names starting with the prefix are listed. Otherwise, all dashboards in your account are listed. -- --+--+-- This operation returns paginated results. module Network.AWS.CloudWatch.ListDashboards     (     -- * Creating a Request@@ -42,6 +44,7 @@ import Network.AWS.CloudWatch.Types import Network.AWS.CloudWatch.Types.Product import Network.AWS.Lens+import Network.AWS.Pager import Network.AWS.Prelude import Network.AWS.Request import Network.AWS.Response@@ -68,12 +71,19 @@  -- | If you specify this parameter, only the dashboards with names starting with the specified string are listed. The maximum length is 255, and valid characters are A-Z, a-z, 0-9, ".", "-", and "_". ldDashboardNamePrefix :: Lens' ListDashboards (Maybe Text)-ldDashboardNamePrefix = lens _ldDashboardNamePrefix (\ s a -> s{_ldDashboardNamePrefix = a});+ldDashboardNamePrefix = lens _ldDashboardNamePrefix (\ s a -> s{_ldDashboardNamePrefix = a})  -- | The token returned by a previous call to indicate that there is more data available. ldNextToken :: Lens' ListDashboards (Maybe Text)-ldNextToken = lens _ldNextToken (\ s a -> s{_ldNextToken = a});+ldNextToken = lens _ldNextToken (\ s a -> s{_ldNextToken = a}) +instance AWSPager ListDashboards where+        page rq rs+          | stop (rs ^. ldrsNextToken) = Nothing+          | stop (rs ^. ldrsDashboardEntries) = Nothing+          | otherwise =+            Just $ rq & ldNextToken .~ rs ^. ldrsNextToken+ instance AWSRequest ListDashboards where         type Rs ListDashboards = ListDashboardsResponse         request = postQuery cloudWatch@@ -126,22 +136,22 @@     -> ListDashboardsResponse listDashboardsResponse pResponseStatus_ =   ListDashboardsResponse'-  { _ldrsDashboardEntries = Nothing-  , _ldrsNextToken = Nothing-  , _ldrsResponseStatus = pResponseStatus_-  }+    { _ldrsDashboardEntries = Nothing+    , _ldrsNextToken = Nothing+    , _ldrsResponseStatus = pResponseStatus_+    }   -- | The list of matching dashboards. ldrsDashboardEntries :: Lens' ListDashboardsResponse [DashboardEntry]-ldrsDashboardEntries = lens _ldrsDashboardEntries (\ s a -> s{_ldrsDashboardEntries = a}) . _Default . _Coerce;+ldrsDashboardEntries = lens _ldrsDashboardEntries (\ s a -> s{_ldrsDashboardEntries = a}) . _Default . _Coerce  -- | The token that marks the start of the next batch of returned results. ldrsNextToken :: Lens' ListDashboardsResponse (Maybe Text)-ldrsNextToken = lens _ldrsNextToken (\ s a -> s{_ldrsNextToken = a});+ldrsNextToken = lens _ldrsNextToken (\ s a -> s{_ldrsNextToken = a})  -- | -- | The response status code. ldrsResponseStatus :: Lens' ListDashboardsResponse Int-ldrsResponseStatus = lens _ldrsResponseStatus (\ s a -> s{_ldrsResponseStatus = a});+ldrsResponseStatus = lens _ldrsResponseStatus (\ s a -> s{_ldrsResponseStatus = a})  instance NFData ListDashboardsResponse where
gen/Network/AWS/CloudWatch/ListMetrics.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.ListMetrics--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -79,28 +79,28 @@     :: ListMetrics listMetrics =   ListMetrics'-  { _lmMetricName = Nothing-  , _lmNamespace = Nothing-  , _lmNextToken = Nothing-  , _lmDimensions = Nothing-  }+    { _lmMetricName = Nothing+    , _lmNamespace = Nothing+    , _lmNextToken = Nothing+    , _lmDimensions = Nothing+    }   -- | The name of the metric to filter against. lmMetricName :: Lens' ListMetrics (Maybe Text)-lmMetricName = lens _lmMetricName (\ s a -> s{_lmMetricName = a});+lmMetricName = lens _lmMetricName (\ s a -> s{_lmMetricName = a})  -- | The namespace to filter against. lmNamespace :: Lens' ListMetrics (Maybe Text)-lmNamespace = lens _lmNamespace (\ s a -> s{_lmNamespace = a});+lmNamespace = lens _lmNamespace (\ s a -> s{_lmNamespace = a})  -- | The token returned by a previous call to indicate that there is more data available. lmNextToken :: Lens' ListMetrics (Maybe Text)-lmNextToken = lens _lmNextToken (\ s a -> s{_lmNextToken = a});+lmNextToken = lens _lmNextToken (\ s a -> s{_lmNextToken = a})  -- | The dimensions to filter against. lmDimensions :: Lens' ListMetrics [DimensionFilter]-lmDimensions = lens _lmDimensions (\ s a -> s{_lmDimensions = a}) . _Default . _Coerce;+lmDimensions = lens _lmDimensions (\ s a -> s{_lmDimensions = a}) . _Default . _Coerce  instance AWSPager ListMetrics where         page rq rs@@ -164,22 +164,22 @@     -> ListMetricsResponse listMetricsResponse pResponseStatus_ =   ListMetricsResponse'-  { _lmrsMetrics = Nothing-  , _lmrsNextToken = Nothing-  , _lmrsResponseStatus = pResponseStatus_-  }+    { _lmrsMetrics = Nothing+    , _lmrsNextToken = Nothing+    , _lmrsResponseStatus = pResponseStatus_+    }   -- | The metrics. lmrsMetrics :: Lens' ListMetricsResponse [Metric]-lmrsMetrics = lens _lmrsMetrics (\ s a -> s{_lmrsMetrics = a}) . _Default . _Coerce;+lmrsMetrics = lens _lmrsMetrics (\ s a -> s{_lmrsMetrics = a}) . _Default . _Coerce  -- | The token that marks the start of the next batch of returned results. lmrsNextToken :: Lens' ListMetricsResponse (Maybe Text)-lmrsNextToken = lens _lmrsNextToken (\ s a -> s{_lmrsNextToken = a});+lmrsNextToken = lens _lmrsNextToken (\ s a -> s{_lmrsNextToken = a})  -- | -- | The response status code. lmrsResponseStatus :: Lens' ListMetricsResponse Int-lmrsResponseStatus = lens _lmrsResponseStatus (\ s a -> s{_lmrsResponseStatus = a});+lmrsResponseStatus = lens _lmrsResponseStatus (\ s a -> s{_lmrsResponseStatus = a})  instance NFData ListMetricsResponse where
gen/Network/AWS/CloudWatch/PutDashboard.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.PutDashboard--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -53,8 +53,8 @@  -- | /See:/ 'putDashboard' smart constructor. data PutDashboard = PutDashboard'-  { _pdDashboardName :: !(Maybe Text)-  , _pdDashboardBody :: !(Maybe Text)+  { _pdDashboardName :: !Text+  , _pdDashboardBody :: !Text   } deriving (Eq, Read, Show, Data, Typeable, Generic)  @@ -62,22 +62,25 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'pdDashboardName' - The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard, replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid characters are A-Z, a-z, 0-9, "-", and "_".+-- * 'pdDashboardName' - The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard, replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required. ----- * 'pdDashboardBody' - The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard. For more information about the syntax, see 'CloudWatch-Dashboard-Body-Structure' .+-- * 'pdDashboardBody' - The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard. This parameter is required. For more information about the syntax, see 'CloudWatch-Dashboard-Body-Structure' . putDashboard-    :: PutDashboard-putDashboard =-  PutDashboard' {_pdDashboardName = Nothing, _pdDashboardBody = Nothing}+    :: Text -- ^ 'pdDashboardName'+    -> Text -- ^ 'pdDashboardBody'+    -> PutDashboard+putDashboard pDashboardName_ pDashboardBody_ =+  PutDashboard'+    {_pdDashboardName = pDashboardName_, _pdDashboardBody = pDashboardBody_}  --- | The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard, replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid characters are A-Z, a-z, 0-9, "-", and "_".-pdDashboardName :: Lens' PutDashboard (Maybe Text)-pdDashboardName = lens _pdDashboardName (\ s a -> s{_pdDashboardName = a});+-- | The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard, replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.+pdDashboardName :: Lens' PutDashboard Text+pdDashboardName = lens _pdDashboardName (\ s a -> s{_pdDashboardName = a}) --- | The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard. For more information about the syntax, see 'CloudWatch-Dashboard-Body-Structure' .-pdDashboardBody :: Lens' PutDashboard (Maybe Text)-pdDashboardBody = lens _pdDashboardBody (\ s a -> s{_pdDashboardBody = a});+-- | The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard. This parameter is required. For more information about the syntax, see 'CloudWatch-Dashboard-Body-Structure' .+pdDashboardBody :: Lens' PutDashboard Text+pdDashboardBody = lens _pdDashboardBody (\ s a -> s{_pdDashboardBody = a})  instance AWSRequest PutDashboard where         type Rs PutDashboard = PutDashboardResponse@@ -127,17 +130,17 @@     -> PutDashboardResponse putDashboardResponse pResponseStatus_ =   PutDashboardResponse'-  { _pdrsDashboardValidationMessages = Nothing-  , _pdrsResponseStatus = pResponseStatus_-  }+    { _pdrsDashboardValidationMessages = Nothing+    , _pdrsResponseStatus = pResponseStatus_+    }   -- | If the input for @PutDashboard@ was correct and the dashboard was successfully created or modified, this result is empty. If this result includes only warning messages, then the input was valid enough for the dashboard to be created or modified, but some elements of the dashboard may not render. If this result includes error messages, the input was not valid and the operation failed. pdrsDashboardValidationMessages :: Lens' PutDashboardResponse [DashboardValidationMessage]-pdrsDashboardValidationMessages = lens _pdrsDashboardValidationMessages (\ s a -> s{_pdrsDashboardValidationMessages = a}) . _Default . _Coerce;+pdrsDashboardValidationMessages = lens _pdrsDashboardValidationMessages (\ s a -> s{_pdrsDashboardValidationMessages = a}) . _Default . _Coerce  -- | -- | The response status code. pdrsResponseStatus :: Lens' PutDashboardResponse Int-pdrsResponseStatus = lens _pdrsResponseStatus (\ s a -> s{_pdrsResponseStatus = a});+pdrsResponseStatus = lens _pdrsResponseStatus (\ s a -> s{_pdrsResponseStatus = a})  instance NFData PutDashboardResponse where
gen/Network/AWS/CloudWatch/PutMetricAlarm.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.PutMetricAlarm--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -27,6 +27,8 @@ -- -- If you are an IAM user, you must have Amazon EC2 permissions for some operations: --+--     * @iam:CreateServiceLinkedRole@ for all alarms with EC2 actions+-- --     * @ec2:DescribeInstanceStatus@ and @ec2:DescribeInstances@ for all alarms on EC2 instance status metrics -- --     * @ec2:StopInstances@ for alarms with stop actions@@ -55,6 +57,7 @@     , pmaAlarmDescription     , pmaOKActions     , pmaEvaluateLowSampleCountPercentile+    , pmaDatapointsToAlarm     , pmaActionsEnabled     , pmaInsufficientDataActions     , pmaDimensions@@ -88,6 +91,7 @@   , _pmaAlarmDescription                 :: !(Maybe Text)   , _pmaOKActions                        :: !(Maybe [Text])   , _pmaEvaluateLowSampleCountPercentile :: !(Maybe Text)+  , _pmaDatapointsToAlarm                :: !(Maybe Nat)   , _pmaActionsEnabled                   :: !(Maybe Bool)   , _pmaInsufficientDataActions          :: !(Maybe [Text])   , _pmaDimensions                       :: !(Maybe [Dimension])@@ -113,23 +117,25 @@ -- -- * 'pmaAlarmDescription' - The description for the alarm. ----- * 'pmaOKActions' - The actions to execute when this alarm transitions to an @OK@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0+-- * 'pmaOKActions' - The actions to execute when this alarm transitions to an @OK@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover | arn:aws:sns:/region/ :/account-id/ :/sns-topic-name/ | arn:aws:autoscaling:/region/ :/account-id/ :scalingPolicy:/policy-id/ autoScalingGroupName//group-friendly-name/ :policyName//policy-friendly-name/  Valid Values (for use with IAM roles): arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0 -- -- * 'pmaEvaluateLowSampleCountPercentile' - Used only for alarms based on percentiles. If you specify @ignore@ , the alarm state does not change during periods with too few data points to be statistically significant. If you specify @evaluate@ or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#percentiles-with-low-samples Percentile-Based CloudWatch Alarms and Low Data Samples> . Valid Values: @evaluate | ignore@ --+-- * 'pmaDatapointsToAlarm' - The number of datapoints that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation Evaluating an Alarm> in the /Amazon CloudWatch User Guide/ .+-- -- * 'pmaActionsEnabled' - Indicates whether actions should be executed during any changes to the alarm state. ----- * 'pmaInsufficientDataActions' - The actions to execute when this alarm transitions to the @INSUFFICIENT_DATA@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0+-- * 'pmaInsufficientDataActions' - The actions to execute when this alarm transitions to the @INSUFFICIENT_DATA@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover | arn:aws:sns:/region/ :/account-id/ :/sns-topic-name/ | arn:aws:autoscaling:/region/ :/account-id/ :scalingPolicy:/policy-id/ autoScalingGroupName//group-friendly-name/ :policyName//policy-friendly-name/  Valid Values (for use with IAM roles): arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0 -- -- * 'pmaDimensions' - The dimensions for the metric associated with the alarm. ----- * 'pmaAlarmActions' - The actions to execute when this alarm transitions to the @ALARM@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0+-- * 'pmaAlarmActions' - The actions to execute when this alarm transitions to the @ALARM@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover | arn:aws:sns:/region/ :/account-id/ :/sns-topic-name/ | arn:aws:autoscaling:/region/ :/account-id/ :scalingPolicy:/policy-id/ autoScalingGroupName//group-friendly-name/ :policyName//policy-friendly-name/  Valid Values (for use with IAM roles): arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0 -- -- * 'pmaUnit' - The unit of measure for the statistic. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately. If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, the CloudWatch alarm can get stuck in the @INSUFFICIENT DATA@ state. ----- * 'pmaStatistic' - The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use @ExtendedStatistic@ .+-- * 'pmaStatistic' - The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use @ExtendedStatistic@ . When you call @PutMetricAlarm@ , you must specify either @Statistic@ or @ExtendedStatistic,@ but not both. ----- * 'pmaExtendedStatistic' - The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.+-- * 'pmaExtendedStatistic' - The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. When you call @PutMetricAlarm@ , you must specify either @Statistic@ or @ExtendedStatistic,@ but not both. -- -- * 'pmaAlarmName' - The name for the alarm. This name must be unique within the AWS account. --@@ -137,9 +143,9 @@ -- -- * 'pmaNamespace' - The namespace for the metric associated with the alarm. ----- * 'pmaPeriod' - The period, in seconds, over which the specified statistic is applied. Valid values are 10, 30, and any multiple of 60. Be sure to specify 10 or 30 only for metrics that are stored by a @PutMetricData@ call with a @StorageResolution@ of 1. If you specify a Period of 10 or 30 for a metric that does not have sub-minute resolution, the alarm still attempts to gather data at the period rate that you specify. In this case, it does not receive data for the attempts that do not correspond to a one-minute data resolution, and the alarm may often lapse into INSUFFICENT_DATA status. Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which has a higher charge than other alarms. For more information about pricing, see <https://aws.amazon.com/cloudwatch/pricing/ Amazon CloudWatch Pricing> . An alarm's total current evaluation period can be no longer than one day, so @Period@ multiplied by @EvaluationPeriods@ cannot be more than 86,400 seconds.+-- * 'pmaPeriod' - The period, in seconds, over which the specified statistic is applied. Valid values are 10, 30, and any multiple of 60. Be sure to specify 10 or 30 only for metrics that are stored by a @PutMetricData@ call with a @StorageResolution@ of 1. If you specify a period of 10 or 30 for a metric that does not have sub-minute resolution, the alarm still attempts to gather data at the period rate that you specify. In this case, it does not receive data for the attempts that do not correspond to a one-minute data resolution, and the alarm may often lapse into INSUFFICENT_DATA status. Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which has a higher charge than other alarms. For more information about pricing, see <https://aws.amazon.com/cloudwatch/pricing/ Amazon CloudWatch Pricing> . An alarm's total current evaluation period can be no longer than one day, so @Period@ multiplied by @EvaluationPeriods@ cannot be more than 86,400 seconds. ----- * 'pmaEvaluationPeriods' - The number of periods over which data is compared to the specified threshold. An alarm's total current evaluation period can be no longer than one day, so this number multiplied by @Period@ cannot be more than 86,400 seconds.+-- * 'pmaEvaluationPeriods' - The number of periods over which data is compared to the specified threshold. If you are setting an alarm which requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N. An alarm's total current evaluation period can be no longer than one day, so this number multiplied by @Period@ cannot be more than 86,400 seconds. -- -- * 'pmaThreshold' - The value against which the specified statistic is compared. --@@ -155,98 +161,103 @@     -> PutMetricAlarm putMetricAlarm pAlarmName_ pMetricName_ pNamespace_ pPeriod_ pEvaluationPeriods_ pThreshold_ pComparisonOperator_ =   PutMetricAlarm'-  { _pmaTreatMissingData = Nothing-  , _pmaAlarmDescription = Nothing-  , _pmaOKActions = Nothing-  , _pmaEvaluateLowSampleCountPercentile = Nothing-  , _pmaActionsEnabled = Nothing-  , _pmaInsufficientDataActions = Nothing-  , _pmaDimensions = Nothing-  , _pmaAlarmActions = Nothing-  , _pmaUnit = Nothing-  , _pmaStatistic = Nothing-  , _pmaExtendedStatistic = Nothing-  , _pmaAlarmName = pAlarmName_-  , _pmaMetricName = pMetricName_-  , _pmaNamespace = pNamespace_-  , _pmaPeriod = _Nat # pPeriod_-  , _pmaEvaluationPeriods = _Nat # pEvaluationPeriods_-  , _pmaThreshold = pThreshold_-  , _pmaComparisonOperator = pComparisonOperator_-  }+    { _pmaTreatMissingData = Nothing+    , _pmaAlarmDescription = Nothing+    , _pmaOKActions = Nothing+    , _pmaEvaluateLowSampleCountPercentile = Nothing+    , _pmaDatapointsToAlarm = Nothing+    , _pmaActionsEnabled = Nothing+    , _pmaInsufficientDataActions = Nothing+    , _pmaDimensions = Nothing+    , _pmaAlarmActions = Nothing+    , _pmaUnit = Nothing+    , _pmaStatistic = Nothing+    , _pmaExtendedStatistic = Nothing+    , _pmaAlarmName = pAlarmName_+    , _pmaMetricName = pMetricName_+    , _pmaNamespace = pNamespace_+    , _pmaPeriod = _Nat # pPeriod_+    , _pmaEvaluationPeriods = _Nat # pEvaluationPeriods_+    , _pmaThreshold = pThreshold_+    , _pmaComparisonOperator = pComparisonOperator_+    }   -- | Sets how this alarm is to handle missing data points. If @TreatMissingData@ is omitted, the default behavior of @missing@ is used. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data Configuring How CloudWatch Alarms Treats Missing Data> . Valid Values: @breaching | notBreaching | ignore | missing@ pmaTreatMissingData :: Lens' PutMetricAlarm (Maybe Text)-pmaTreatMissingData = lens _pmaTreatMissingData (\ s a -> s{_pmaTreatMissingData = a});+pmaTreatMissingData = lens _pmaTreatMissingData (\ s a -> s{_pmaTreatMissingData = a})  -- | The description for the alarm. pmaAlarmDescription :: Lens' PutMetricAlarm (Maybe Text)-pmaAlarmDescription = lens _pmaAlarmDescription (\ s a -> s{_pmaAlarmDescription = a});+pmaAlarmDescription = lens _pmaAlarmDescription (\ s a -> s{_pmaAlarmDescription = a}) --- | The actions to execute when this alarm transitions to an @OK@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0+-- | The actions to execute when this alarm transitions to an @OK@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover | arn:aws:sns:/region/ :/account-id/ :/sns-topic-name/ | arn:aws:autoscaling:/region/ :/account-id/ :scalingPolicy:/policy-id/ autoScalingGroupName//group-friendly-name/ :policyName//policy-friendly-name/  Valid Values (for use with IAM roles): arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0 pmaOKActions :: Lens' PutMetricAlarm [Text]-pmaOKActions = lens _pmaOKActions (\ s a -> s{_pmaOKActions = a}) . _Default . _Coerce;+pmaOKActions = lens _pmaOKActions (\ s a -> s{_pmaOKActions = a}) . _Default . _Coerce  -- | Used only for alarms based on percentiles. If you specify @ignore@ , the alarm state does not change during periods with too few data points to be statistically significant. If you specify @evaluate@ or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#percentiles-with-low-samples Percentile-Based CloudWatch Alarms and Low Data Samples> . Valid Values: @evaluate | ignore@ pmaEvaluateLowSampleCountPercentile :: Lens' PutMetricAlarm (Maybe Text)-pmaEvaluateLowSampleCountPercentile = lens _pmaEvaluateLowSampleCountPercentile (\ s a -> s{_pmaEvaluateLowSampleCountPercentile = a});+pmaEvaluateLowSampleCountPercentile = lens _pmaEvaluateLowSampleCountPercentile (\ s a -> s{_pmaEvaluateLowSampleCountPercentile = a}) +-- | The number of datapoints that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation Evaluating an Alarm> in the /Amazon CloudWatch User Guide/ .+pmaDatapointsToAlarm :: Lens' PutMetricAlarm (Maybe Natural)+pmaDatapointsToAlarm = lens _pmaDatapointsToAlarm (\ s a -> s{_pmaDatapointsToAlarm = a}) . mapping _Nat+ -- | Indicates whether actions should be executed during any changes to the alarm state. pmaActionsEnabled :: Lens' PutMetricAlarm (Maybe Bool)-pmaActionsEnabled = lens _pmaActionsEnabled (\ s a -> s{_pmaActionsEnabled = a});+pmaActionsEnabled = lens _pmaActionsEnabled (\ s a -> s{_pmaActionsEnabled = a}) --- | The actions to execute when this alarm transitions to the @INSUFFICIENT_DATA@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0+-- | The actions to execute when this alarm transitions to the @INSUFFICIENT_DATA@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover | arn:aws:sns:/region/ :/account-id/ :/sns-topic-name/ | arn:aws:autoscaling:/region/ :/account-id/ :scalingPolicy:/policy-id/ autoScalingGroupName//group-friendly-name/ :policyName//policy-friendly-name/  Valid Values (for use with IAM roles): arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0 pmaInsufficientDataActions :: Lens' PutMetricAlarm [Text]-pmaInsufficientDataActions = lens _pmaInsufficientDataActions (\ s a -> s{_pmaInsufficientDataActions = a}) . _Default . _Coerce;+pmaInsufficientDataActions = lens _pmaInsufficientDataActions (\ s a -> s{_pmaInsufficientDataActions = a}) . _Default . _Coerce  -- | The dimensions for the metric associated with the alarm. pmaDimensions :: Lens' PutMetricAlarm [Dimension]-pmaDimensions = lens _pmaDimensions (\ s a -> s{_pmaDimensions = a}) . _Default . _Coerce;+pmaDimensions = lens _pmaDimensions (\ s a -> s{_pmaDimensions = a}) . _Default . _Coerce --- | The actions to execute when this alarm transitions to the @ALARM@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{/customer-account/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0+-- | The actions to execute when this alarm transitions to the @ALARM@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). Valid Values: arn:aws:automate:/region/ :ec2:stop | arn:aws:automate:/region/ :ec2:terminate | arn:aws:automate:/region/ :ec2:recover | arn:aws:sns:/region/ :/account-id/ :/sns-topic-name/ | arn:aws:autoscaling:/region/ :/account-id/ :scalingPolicy:/policy-id/ autoScalingGroupName//group-friendly-name/ :policyName//policy-friendly-name/  Valid Values (for use with IAM roles): arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:/region/ :{/account-id/ }:action/actions/AWS_EC2.InstanceId.Reboot/1.0 pmaAlarmActions :: Lens' PutMetricAlarm [Text]-pmaAlarmActions = lens _pmaAlarmActions (\ s a -> s{_pmaAlarmActions = a}) . _Default . _Coerce;+pmaAlarmActions = lens _pmaAlarmActions (\ s a -> s{_pmaAlarmActions = a}) . _Default . _Coerce  -- | The unit of measure for the statistic. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately. If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, the CloudWatch alarm can get stuck in the @INSUFFICIENT DATA@ state. pmaUnit :: Lens' PutMetricAlarm (Maybe StandardUnit)-pmaUnit = lens _pmaUnit (\ s a -> s{_pmaUnit = a});+pmaUnit = lens _pmaUnit (\ s a -> s{_pmaUnit = a}) --- | The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use @ExtendedStatistic@ .+-- | The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use @ExtendedStatistic@ . When you call @PutMetricAlarm@ , you must specify either @Statistic@ or @ExtendedStatistic,@ but not both. pmaStatistic :: Lens' PutMetricAlarm (Maybe Statistic)-pmaStatistic = lens _pmaStatistic (\ s a -> s{_pmaStatistic = a});+pmaStatistic = lens _pmaStatistic (\ s a -> s{_pmaStatistic = a}) --- | The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.+-- | The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. When you call @PutMetricAlarm@ , you must specify either @Statistic@ or @ExtendedStatistic,@ but not both. pmaExtendedStatistic :: Lens' PutMetricAlarm (Maybe Text)-pmaExtendedStatistic = lens _pmaExtendedStatistic (\ s a -> s{_pmaExtendedStatistic = a});+pmaExtendedStatistic = lens _pmaExtendedStatistic (\ s a -> s{_pmaExtendedStatistic = a})  -- | The name for the alarm. This name must be unique within the AWS account. pmaAlarmName :: Lens' PutMetricAlarm Text-pmaAlarmName = lens _pmaAlarmName (\ s a -> s{_pmaAlarmName = a});+pmaAlarmName = lens _pmaAlarmName (\ s a -> s{_pmaAlarmName = a})  -- | The name for the metric associated with the alarm. pmaMetricName :: Lens' PutMetricAlarm Text-pmaMetricName = lens _pmaMetricName (\ s a -> s{_pmaMetricName = a});+pmaMetricName = lens _pmaMetricName (\ s a -> s{_pmaMetricName = a})  -- | The namespace for the metric associated with the alarm. pmaNamespace :: Lens' PutMetricAlarm Text-pmaNamespace = lens _pmaNamespace (\ s a -> s{_pmaNamespace = a});+pmaNamespace = lens _pmaNamespace (\ s a -> s{_pmaNamespace = a}) --- | The period, in seconds, over which the specified statistic is applied. Valid values are 10, 30, and any multiple of 60. Be sure to specify 10 or 30 only for metrics that are stored by a @PutMetricData@ call with a @StorageResolution@ of 1. If you specify a Period of 10 or 30 for a metric that does not have sub-minute resolution, the alarm still attempts to gather data at the period rate that you specify. In this case, it does not receive data for the attempts that do not correspond to a one-minute data resolution, and the alarm may often lapse into INSUFFICENT_DATA status. Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which has a higher charge than other alarms. For more information about pricing, see <https://aws.amazon.com/cloudwatch/pricing/ Amazon CloudWatch Pricing> . An alarm's total current evaluation period can be no longer than one day, so @Period@ multiplied by @EvaluationPeriods@ cannot be more than 86,400 seconds.+-- | The period, in seconds, over which the specified statistic is applied. Valid values are 10, 30, and any multiple of 60. Be sure to specify 10 or 30 only for metrics that are stored by a @PutMetricData@ call with a @StorageResolution@ of 1. If you specify a period of 10 or 30 for a metric that does not have sub-minute resolution, the alarm still attempts to gather data at the period rate that you specify. In this case, it does not receive data for the attempts that do not correspond to a one-minute data resolution, and the alarm may often lapse into INSUFFICENT_DATA status. Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which has a higher charge than other alarms. For more information about pricing, see <https://aws.amazon.com/cloudwatch/pricing/ Amazon CloudWatch Pricing> . An alarm's total current evaluation period can be no longer than one day, so @Period@ multiplied by @EvaluationPeriods@ cannot be more than 86,400 seconds. pmaPeriod :: Lens' PutMetricAlarm Natural-pmaPeriod = lens _pmaPeriod (\ s a -> s{_pmaPeriod = a}) . _Nat;+pmaPeriod = lens _pmaPeriod (\ s a -> s{_pmaPeriod = a}) . _Nat --- | The number of periods over which data is compared to the specified threshold. An alarm's total current evaluation period can be no longer than one day, so this number multiplied by @Period@ cannot be more than 86,400 seconds.+-- | The number of periods over which data is compared to the specified threshold. If you are setting an alarm which requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N. An alarm's total current evaluation period can be no longer than one day, so this number multiplied by @Period@ cannot be more than 86,400 seconds. pmaEvaluationPeriods :: Lens' PutMetricAlarm Natural-pmaEvaluationPeriods = lens _pmaEvaluationPeriods (\ s a -> s{_pmaEvaluationPeriods = a}) . _Nat;+pmaEvaluationPeriods = lens _pmaEvaluationPeriods (\ s a -> s{_pmaEvaluationPeriods = a}) . _Nat  -- | The value against which the specified statistic is compared. pmaThreshold :: Lens' PutMetricAlarm Double-pmaThreshold = lens _pmaThreshold (\ s a -> s{_pmaThreshold = a});+pmaThreshold = lens _pmaThreshold (\ s a -> s{_pmaThreshold = a})  -- | The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand. pmaComparisonOperator :: Lens' PutMetricAlarm ComparisonOperator-pmaComparisonOperator = lens _pmaComparisonOperator (\ s a -> s{_pmaComparisonOperator = a});+pmaComparisonOperator = lens _pmaComparisonOperator (\ s a -> s{_pmaComparisonOperator = a})  instance AWSRequest PutMetricAlarm where         type Rs PutMetricAlarm = PutMetricAlarmResponse@@ -274,6 +285,7 @@                  toQuery (toQueryList "member" <$> _pmaOKActions),                "EvaluateLowSampleCountPercentile" =:                  _pmaEvaluateLowSampleCountPercentile,+               "DatapointsToAlarm" =: _pmaDatapointsToAlarm,                "ActionsEnabled" =: _pmaActionsEnabled,                "InsufficientDataActions" =:                  toQuery
gen/Network/AWS/CloudWatch/PutMetricData.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.PutMetricData--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -81,11 +81,11 @@  -- | The namespace for the metric data. You cannot specify a namespace that begins with "AWS/". Namespaces that begin with "AWS/" are reserved for use by Amazon Web Services products. pmdNamespace :: Lens' PutMetricData Text-pmdNamespace = lens _pmdNamespace (\ s a -> s{_pmdNamespace = a});+pmdNamespace = lens _pmdNamespace (\ s a -> s{_pmdNamespace = a})  -- | The data for the metric. pmdMetricData :: Lens' PutMetricData [MetricDatum]-pmdMetricData = lens _pmdMetricData (\ s a -> s{_pmdMetricData = a}) . _Coerce;+pmdMetricData = lens _pmdMetricData (\ s a -> s{_pmdMetricData = a}) . _Coerce  instance AWSRequest PutMetricData where         type Rs PutMetricData = PutMetricDataResponse
gen/Network/AWS/CloudWatch/SetAlarmState.hs view
@@ -12,7 +12,7 @@  -- | -- Module      : Network.AWS.CloudWatch.SetAlarmState--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -71,28 +71,28 @@     -> SetAlarmState setAlarmState pAlarmName_ pStateValue_ pStateReason_ =   SetAlarmState'-  { _sasStateReasonData = Nothing-  , _sasAlarmName = pAlarmName_-  , _sasStateValue = pStateValue_-  , _sasStateReason = pStateReason_-  }+    { _sasStateReasonData = Nothing+    , _sasAlarmName = pAlarmName_+    , _sasStateValue = pStateValue_+    , _sasStateReason = pStateReason_+    }   -- | The reason that this alarm is set to this specific state, in JSON format. sasStateReasonData :: Lens' SetAlarmState (Maybe Text)-sasStateReasonData = lens _sasStateReasonData (\ s a -> s{_sasStateReasonData = a});+sasStateReasonData = lens _sasStateReasonData (\ s a -> s{_sasStateReasonData = a})  -- | The name for the alarm. This name must be unique within the AWS account. The maximum length is 255 characters. sasAlarmName :: Lens' SetAlarmState Text-sasAlarmName = lens _sasAlarmName (\ s a -> s{_sasAlarmName = a});+sasAlarmName = lens _sasAlarmName (\ s a -> s{_sasAlarmName = a})  -- | The value of the state. sasStateValue :: Lens' SetAlarmState StateValue-sasStateValue = lens _sasStateValue (\ s a -> s{_sasStateValue = a});+sasStateValue = lens _sasStateValue (\ s a -> s{_sasStateValue = a})  -- | The reason that this alarm is set to this specific state, in text format. sasStateReason :: Lens' SetAlarmState Text-sasStateReason = lens _sasStateReason (\ s a -> s{_sasStateReason = a});+sasStateReason = lens _sasStateReason (\ s a -> s{_sasStateReason = a})  instance AWSRequest SetAlarmState where         type Rs SetAlarmState = SetAlarmStateResponse
gen/Network/AWS/CloudWatch/Types.hs view
@@ -4,7 +4,7 @@  -- | -- Module      : Network.AWS.CloudWatch.Types--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -33,6 +33,9 @@     -- * HistoryItemType     , HistoryItemType (..) +    -- * ScanBy+    , ScanBy (..)+     -- * StandardUnit     , StandardUnit (..) @@ -42,6 +45,9 @@     -- * Statistic     , Statistic (..) +    -- * StatusCode+    , StatusCode (..)+     -- * AlarmHistoryItem     , AlarmHistoryItem     , alarmHistoryItem@@ -89,6 +95,12 @@     , dfValue     , dfName +    -- * MessageData+    , MessageData+    , messageData+    , mValue+    , mCode+     -- * Metric     , Metric     , metric@@ -111,6 +123,7 @@     , maOKActions     , maEvaluateLowSampleCountPercentile     , maStateValue+    , maDatapointsToAlarm     , maThreshold     , maAlarmConfigurationUpdatedTimestamp     , maActionsEnabled@@ -124,6 +137,25 @@     , maStatistic     , maExtendedStatistic +    -- * MetricDataQuery+    , MetricDataQuery+    , metricDataQuery+    , mdqReturnData+    , mdqExpression+    , mdqLabel+    , mdqMetricStat+    , mdqId++    -- * MetricDataResult+    , MetricDataResult+    , metricDataResult+    , mdrValues+    , mdrId+    , mdrTimestamps+    , mdrMessages+    , mdrLabel+    , mdrStatusCode+     -- * MetricDatum     , MetricDatum     , metricDatum@@ -135,6 +167,14 @@     , mdStatisticValues     , mdMetricName +    -- * MetricStat+    , MetricStat+    , metricStat+    , msUnit+    , msMetric+    , msPeriod+    , msStat+     -- * StatisticSet     , StatisticSet     , statisticSet@@ -154,24 +194,24 @@ cloudWatch :: Service cloudWatch =   Service-  { _svcAbbrev = "CloudWatch"-  , _svcSigner = v4-  , _svcPrefix = "monitoring"-  , _svcVersion = "2010-08-01"-  , _svcEndpoint = defaultEndpoint cloudWatch-  , _svcTimeout = Just 70-  , _svcCheck = statusSuccess-  , _svcError = parseXMLError "CloudWatch"-  , _svcRetry = retry-  }+    { _svcAbbrev = "CloudWatch"+    , _svcSigner = v4+    , _svcPrefix = "monitoring"+    , _svcVersion = "2010-08-01"+    , _svcEndpoint = defaultEndpoint cloudWatch+    , _svcTimeout = Just 70+    , _svcCheck = statusSuccess+    , _svcError = parseXMLError "CloudWatch"+    , _svcRetry = retry+    }   where     retry =       Exponential-      { _retryBase = 5.0e-2-      , _retryGrowth = 2-      , _retryAttempts = 5-      , _retryCheck = check-      }+        { _retryBase = 5.0e-2+        , _retryGrowth = 2+        , _retryAttempts = 5+        , _retryCheck = check+        }     check e       | has (hasCode "ThrottledException" . hasStatus 400) e =         Just "throttled_exception"@@ -180,6 +220,8 @@         Just "throttling_exception"       | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"       | has (hasStatus 504) e = Just "gateway_timeout"+      | has (hasCode "RequestThrottledException" . hasStatus 400) e =+        Just "request_throttled_exception"       | has (hasStatus 502) e = Just "bad_gateway"       | has (hasStatus 503) e = Just "service_unavailable"       | has (hasStatus 500) e = Just "general_server_error"
gen/Network/AWS/CloudWatch/Types/Product.hs view
@@ -9,7 +9,7 @@  -- | -- Module      : Network.AWS.CloudWatch.Types.Product--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -52,33 +52,33 @@     :: AlarmHistoryItem alarmHistoryItem =   AlarmHistoryItem'-  { _ahiAlarmName = Nothing-  , _ahiHistoryItemType = Nothing-  , _ahiHistoryData = Nothing-  , _ahiHistorySummary = Nothing-  , _ahiTimestamp = Nothing-  }+    { _ahiAlarmName = Nothing+    , _ahiHistoryItemType = Nothing+    , _ahiHistoryData = Nothing+    , _ahiHistorySummary = Nothing+    , _ahiTimestamp = Nothing+    }   -- | The descriptive name for the alarm. ahiAlarmName :: Lens' AlarmHistoryItem (Maybe Text)-ahiAlarmName = lens _ahiAlarmName (\ s a -> s{_ahiAlarmName = a});+ahiAlarmName = lens _ahiAlarmName (\ s a -> s{_ahiAlarmName = a})  -- | The type of alarm history item. ahiHistoryItemType :: Lens' AlarmHistoryItem (Maybe HistoryItemType)-ahiHistoryItemType = lens _ahiHistoryItemType (\ s a -> s{_ahiHistoryItemType = a});+ahiHistoryItemType = lens _ahiHistoryItemType (\ s a -> s{_ahiHistoryItemType = a})  -- | Data about the alarm, in JSON format. ahiHistoryData :: Lens' AlarmHistoryItem (Maybe Text)-ahiHistoryData = lens _ahiHistoryData (\ s a -> s{_ahiHistoryData = a});+ahiHistoryData = lens _ahiHistoryData (\ s a -> s{_ahiHistoryData = a})  -- | A summary of the alarm history, in text format. ahiHistorySummary :: Lens' AlarmHistoryItem (Maybe Text)-ahiHistorySummary = lens _ahiHistorySummary (\ s a -> s{_ahiHistorySummary = a});+ahiHistorySummary = lens _ahiHistorySummary (\ s a -> s{_ahiHistorySummary = a})  -- | The time stamp for the alarm history item. ahiTimestamp :: Lens' AlarmHistoryItem (Maybe UTCTime)-ahiTimestamp = lens _ahiTimestamp (\ s a -> s{_ahiTimestamp = a}) . mapping _Time;+ahiTimestamp = lens _ahiTimestamp (\ s a -> s{_ahiTimestamp = a}) . mapping _Time  instance FromXML AlarmHistoryItem where         parseXML x@@ -120,28 +120,28 @@     :: DashboardEntry dashboardEntry =   DashboardEntry'-  { _deSize = Nothing-  , _deDashboardName = Nothing-  , _deLastModified = Nothing-  , _deDashboardARN = Nothing-  }+    { _deSize = Nothing+    , _deDashboardName = Nothing+    , _deLastModified = Nothing+    , _deDashboardARN = Nothing+    }   -- | The size of the dashboard, in bytes. deSize :: Lens' DashboardEntry (Maybe Integer)-deSize = lens _deSize (\ s a -> s{_deSize = a});+deSize = lens _deSize (\ s a -> s{_deSize = a})  -- | The name of the dashboard. deDashboardName :: Lens' DashboardEntry (Maybe Text)-deDashboardName = lens _deDashboardName (\ s a -> s{_deDashboardName = a});+deDashboardName = lens _deDashboardName (\ s a -> s{_deDashboardName = a})  -- | The time stamp of when the dashboard was last modified, either by an API call or through the console. This number is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC. deLastModified :: Lens' DashboardEntry (Maybe UTCTime)-deLastModified = lens _deLastModified (\ s a -> s{_deLastModified = a}) . mapping _Time;+deLastModified = lens _deLastModified (\ s a -> s{_deLastModified = a}) . mapping _Time  -- | The Amazon Resource Name (ARN) of the dashboard. deDashboardARN :: Lens' DashboardEntry (Maybe Text)-deDashboardARN = lens _deDashboardARN (\ s a -> s{_deDashboardARN = a});+deDashboardARN = lens _deDashboardARN (\ s a -> s{_deDashboardARN = a})  instance FromXML DashboardEntry where         parseXML x@@ -180,11 +180,11 @@  -- | The data path related to the message. dvmDataPath :: Lens' DashboardValidationMessage (Maybe Text)-dvmDataPath = lens _dvmDataPath (\ s a -> s{_dvmDataPath = a});+dvmDataPath = lens _dvmDataPath (\ s a -> s{_dvmDataPath = a})  -- | A message describing the error or warning. dvmMessage :: Lens' DashboardValidationMessage (Maybe Text)-dvmMessage = lens _dvmMessage (\ s a -> s{_dvmMessage = a});+dvmMessage = lens _dvmMessage (\ s a -> s{_dvmMessage = a})  instance FromXML DashboardValidationMessage where         parseXML x@@ -235,48 +235,48 @@     :: Datapoint datapoint =   Datapoint'-  { _dSampleCount = Nothing-  , _dMaximum = Nothing-  , _dAverage = Nothing-  , _dMinimum = Nothing-  , _dExtendedStatistics = Nothing-  , _dSum = Nothing-  , _dUnit = Nothing-  , _dTimestamp = Nothing-  }+    { _dSampleCount = Nothing+    , _dMaximum = Nothing+    , _dAverage = Nothing+    , _dMinimum = Nothing+    , _dExtendedStatistics = Nothing+    , _dSum = Nothing+    , _dUnit = Nothing+    , _dTimestamp = Nothing+    }   -- | The number of metric values that contributed to the aggregate value of this data point. dSampleCount :: Lens' Datapoint (Maybe Double)-dSampleCount = lens _dSampleCount (\ s a -> s{_dSampleCount = a});+dSampleCount = lens _dSampleCount (\ s a -> s{_dSampleCount = a})  -- | The maximum metric value for the data point. dMaximum :: Lens' Datapoint (Maybe Double)-dMaximum = lens _dMaximum (\ s a -> s{_dMaximum = a});+dMaximum = lens _dMaximum (\ s a -> s{_dMaximum = a})  -- | The average of the metric values that correspond to the data point. dAverage :: Lens' Datapoint (Maybe Double)-dAverage = lens _dAverage (\ s a -> s{_dAverage = a});+dAverage = lens _dAverage (\ s a -> s{_dAverage = a})  -- | The minimum metric value for the data point. dMinimum :: Lens' Datapoint (Maybe Double)-dMinimum = lens _dMinimum (\ s a -> s{_dMinimum = a});+dMinimum = lens _dMinimum (\ s a -> s{_dMinimum = a})  -- | The percentile statistic for the data point. dExtendedStatistics :: Lens' Datapoint (HashMap Text Double)-dExtendedStatistics = lens _dExtendedStatistics (\ s a -> s{_dExtendedStatistics = a}) . _Default . _Map;+dExtendedStatistics = lens _dExtendedStatistics (\ s a -> s{_dExtendedStatistics = a}) . _Default . _Map  -- | The sum of the metric values for the data point. dSum :: Lens' Datapoint (Maybe Double)-dSum = lens _dSum (\ s a -> s{_dSum = a});+dSum = lens _dSum (\ s a -> s{_dSum = a})  -- | The standard unit for the data point. dUnit :: Lens' Datapoint (Maybe StandardUnit)-dUnit = lens _dUnit (\ s a -> s{_dUnit = a});+dUnit = lens _dUnit (\ s a -> s{_dUnit = a})  -- | The time stamp used for the data point. dTimestamp :: Lens' Datapoint (Maybe UTCTime)-dTimestamp = lens _dTimestamp (\ s a -> s{_dTimestamp = a}) . mapping _Time;+dTimestamp = lens _dTimestamp (\ s a -> s{_dTimestamp = a}) . mapping _Time  instance FromXML Datapoint where         parseXML x@@ -322,11 +322,11 @@  -- | The name of the dimension. dName :: Lens' Dimension Text-dName = lens _dName (\ s a -> s{_dName = a});+dName = lens _dName (\ s a -> s{_dName = a})  -- | The value representing the dimension measurement. dValue :: Lens' Dimension Text-dValue = lens _dValue (\ s a -> s{_dValue = a});+dValue = lens _dValue (\ s a -> s{_dValue = a})  instance FromXML Dimension where         parseXML x@@ -366,11 +366,11 @@  -- | The value of the dimension to be matched. dfValue :: Lens' DimensionFilter (Maybe Text)-dfValue = lens _dfValue (\ s a -> s{_dfValue = a});+dfValue = lens _dfValue (\ s a -> s{_dfValue = a})  -- | The dimension name to be matched. dfName :: Lens' DimensionFilter Text-dfName = lens _dfName (\ s a -> s{_dfName = a});+dfName = lens _dfName (\ s a -> s{_dfName = a})  instance Hashable DimensionFilter where @@ -380,6 +380,45 @@         toQuery DimensionFilter'{..}           = mconcat ["Value" =: _dfValue, "Name" =: _dfName] +-- | A message returned by the @GetMetricData@ API, including a code and a description.+--+--+--+-- /See:/ 'messageData' smart constructor.+data MessageData = MessageData'+  { _mValue :: !(Maybe Text)+  , _mCode  :: !(Maybe Text)+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'MessageData' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'mValue' - The message text.+--+-- * 'mCode' - The error code or status code associated with the message.+messageData+    :: MessageData+messageData = MessageData' {_mValue = Nothing, _mCode = Nothing}+++-- | The message text.+mValue :: Lens' MessageData (Maybe Text)+mValue = lens _mValue (\ s a -> s{_mValue = a})++-- | The error code or status code associated with the message.+mCode :: Lens' MessageData (Maybe Text)+mCode = lens _mCode (\ s a -> s{_mCode = a})++instance FromXML MessageData where+        parseXML x+          = MessageData' <$> (x .@? "Value") <*> (x .@? "Code")++instance Hashable MessageData where++instance NFData MessageData where+ -- | Represents a specific metric. -- --@@ -405,20 +444,20 @@     :: Metric metric =   Metric'-  {_mMetricName = Nothing, _mNamespace = Nothing, _mDimensions = Nothing}+    {_mMetricName = Nothing, _mNamespace = Nothing, _mDimensions = Nothing}   -- | The name of the metric. mMetricName :: Lens' Metric (Maybe Text)-mMetricName = lens _mMetricName (\ s a -> s{_mMetricName = a});+mMetricName = lens _mMetricName (\ s a -> s{_mMetricName = a})  -- | The namespace of the metric. mNamespace :: Lens' Metric (Maybe Text)-mNamespace = lens _mNamespace (\ s a -> s{_mNamespace = a});+mNamespace = lens _mNamespace (\ s a -> s{_mNamespace = a})  -- | The dimensions for the metric. mDimensions :: Lens' Metric [Dimension]-mDimensions = lens _mDimensions (\ s a -> s{_mDimensions = a}) . _Default . _Coerce;+mDimensions = lens _mDimensions (\ s a -> s{_mDimensions = a}) . _Default . _Coerce  instance FromXML Metric where         parseXML x@@ -431,6 +470,14 @@  instance NFData Metric where +instance ToQuery Metric where+        toQuery Metric'{..}+          = mconcat+              ["MetricName" =: _mMetricName,+               "Namespace" =: _mNamespace,+               "Dimensions" =:+                 toQuery (toQueryList "member" <$> _mDimensions)]+ -- | Represents an alarm. -- --@@ -449,6 +496,7 @@   , _maOKActions                          :: !(Maybe [Text])   , _maEvaluateLowSampleCountPercentile   :: !(Maybe Text)   , _maStateValue                         :: !(Maybe StateValue)+  , _maDatapointsToAlarm                  :: !(Maybe Nat)   , _maThreshold                          :: !(Maybe Double)   , _maAlarmConfigurationUpdatedTimestamp :: !(Maybe ISO8601)   , _maActionsEnabled                     :: !(Maybe Bool)@@ -492,6 +540,8 @@ -- -- * 'maStateValue' - The state value for the alarm. --+-- * 'maDatapointsToAlarm' - The number of datapoints that must be breaching to trigger the alarm.+-- -- * 'maThreshold' - The value to compare with the specified statistic. -- -- * 'maAlarmConfigurationUpdatedTimestamp' - The time stamp of the last update to the alarm configuration.@@ -519,128 +569,133 @@     :: MetricAlarm metricAlarm =   MetricAlarm'-  { _maAlarmName = Nothing-  , _maStateUpdatedTimestamp = Nothing-  , _maTreatMissingData = Nothing-  , _maPeriod = Nothing-  , _maAlarmDescription = Nothing-  , _maEvaluationPeriods = Nothing-  , _maMetricName = Nothing-  , _maNamespace = Nothing-  , _maComparisonOperator = Nothing-  , _maOKActions = Nothing-  , _maEvaluateLowSampleCountPercentile = Nothing-  , _maStateValue = Nothing-  , _maThreshold = Nothing-  , _maAlarmConfigurationUpdatedTimestamp = Nothing-  , _maActionsEnabled = Nothing-  , _maInsufficientDataActions = Nothing-  , _maStateReason = Nothing-  , _maStateReasonData = Nothing-  , _maDimensions = Nothing-  , _maAlarmARN = Nothing-  , _maAlarmActions = Nothing-  , _maUnit = Nothing-  , _maStatistic = Nothing-  , _maExtendedStatistic = Nothing-  }+    { _maAlarmName = Nothing+    , _maStateUpdatedTimestamp = Nothing+    , _maTreatMissingData = Nothing+    , _maPeriod = Nothing+    , _maAlarmDescription = Nothing+    , _maEvaluationPeriods = Nothing+    , _maMetricName = Nothing+    , _maNamespace = Nothing+    , _maComparisonOperator = Nothing+    , _maOKActions = Nothing+    , _maEvaluateLowSampleCountPercentile = Nothing+    , _maStateValue = Nothing+    , _maDatapointsToAlarm = Nothing+    , _maThreshold = Nothing+    , _maAlarmConfigurationUpdatedTimestamp = Nothing+    , _maActionsEnabled = Nothing+    , _maInsufficientDataActions = Nothing+    , _maStateReason = Nothing+    , _maStateReasonData = Nothing+    , _maDimensions = Nothing+    , _maAlarmARN = Nothing+    , _maAlarmActions = Nothing+    , _maUnit = Nothing+    , _maStatistic = Nothing+    , _maExtendedStatistic = Nothing+    }   -- | The name of the alarm. maAlarmName :: Lens' MetricAlarm (Maybe Text)-maAlarmName = lens _maAlarmName (\ s a -> s{_maAlarmName = a});+maAlarmName = lens _maAlarmName (\ s a -> s{_maAlarmName = a})  -- | The time stamp of the last update to the alarm state. maStateUpdatedTimestamp :: Lens' MetricAlarm (Maybe UTCTime)-maStateUpdatedTimestamp = lens _maStateUpdatedTimestamp (\ s a -> s{_maStateUpdatedTimestamp = a}) . mapping _Time;+maStateUpdatedTimestamp = lens _maStateUpdatedTimestamp (\ s a -> s{_maStateUpdatedTimestamp = a}) . mapping _Time  -- | Sets how this alarm is to handle missing data points. If this parameter is omitted, the default behavior of @missing@ is used. maTreatMissingData :: Lens' MetricAlarm (Maybe Text)-maTreatMissingData = lens _maTreatMissingData (\ s a -> s{_maTreatMissingData = a});+maTreatMissingData = lens _maTreatMissingData (\ s a -> s{_maTreatMissingData = 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;+maPeriod = lens _maPeriod (\ s a -> s{_maPeriod = a}) . mapping _Nat  -- | The description of the alarm. maAlarmDescription :: Lens' MetricAlarm (Maybe Text)-maAlarmDescription = lens _maAlarmDescription (\ s a -> s{_maAlarmDescription = a});+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)-maEvaluationPeriods = lens _maEvaluationPeriods (\ s a -> s{_maEvaluationPeriods = a}) . mapping _Nat;+maEvaluationPeriods = lens _maEvaluationPeriods (\ s a -> s{_maEvaluationPeriods = a}) . mapping _Nat  -- | The name of the metric associated with the alarm. maMetricName :: Lens' MetricAlarm (Maybe Text)-maMetricName = lens _maMetricName (\ s a -> s{_maMetricName = a});+maMetricName = lens _maMetricName (\ s a -> s{_maMetricName = a})  -- | The namespace of the metric associated with the alarm. maNamespace :: Lens' MetricAlarm (Maybe Text)-maNamespace = lens _maNamespace (\ s a -> s{_maNamespace = a});+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});+maComparisonOperator = lens _maComparisonOperator (\ s a -> s{_maComparisonOperator = a})  -- | The actions to execute when this alarm transitions to the @OK@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). maOKActions :: Lens' MetricAlarm [Text]-maOKActions = lens _maOKActions (\ s a -> s{_maOKActions = a}) . _Default . _Coerce;+maOKActions = lens _maOKActions (\ s a -> s{_maOKActions = a}) . _Default . _Coerce  -- | Used only for alarms based on percentiles. If @ignore@ , the alarm state does not change during periods with too few data points to be statistically significant. If @evaluate@ or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available. maEvaluateLowSampleCountPercentile :: Lens' MetricAlarm (Maybe Text)-maEvaluateLowSampleCountPercentile = lens _maEvaluateLowSampleCountPercentile (\ s a -> s{_maEvaluateLowSampleCountPercentile = a});+maEvaluateLowSampleCountPercentile = lens _maEvaluateLowSampleCountPercentile (\ s a -> s{_maEvaluateLowSampleCountPercentile = a})  -- | The state value for the alarm. maStateValue :: Lens' MetricAlarm (Maybe StateValue)-maStateValue = lens _maStateValue (\ s a -> s{_maStateValue = a});+maStateValue = lens _maStateValue (\ s a -> s{_maStateValue = a}) +-- | The number of datapoints that must be breaching to trigger the alarm.+maDatapointsToAlarm :: Lens' MetricAlarm (Maybe Natural)+maDatapointsToAlarm = lens _maDatapointsToAlarm (\ s a -> s{_maDatapointsToAlarm = a}) . mapping _Nat+ -- | The value to compare with the specified statistic. maThreshold :: Lens' MetricAlarm (Maybe Double)-maThreshold = lens _maThreshold (\ s a -> s{_maThreshold = a});+maThreshold = lens _maThreshold (\ s a -> s{_maThreshold = a})  -- | The time stamp of the last update to the alarm configuration. maAlarmConfigurationUpdatedTimestamp :: Lens' MetricAlarm (Maybe UTCTime)-maAlarmConfigurationUpdatedTimestamp = lens _maAlarmConfigurationUpdatedTimestamp (\ s a -> s{_maAlarmConfigurationUpdatedTimestamp = a}) . mapping _Time;+maAlarmConfigurationUpdatedTimestamp = lens _maAlarmConfigurationUpdatedTimestamp (\ s a -> s{_maAlarmConfigurationUpdatedTimestamp = a}) . mapping _Time  -- | Indicates whether actions should be executed during any changes to the alarm state. maActionsEnabled :: Lens' MetricAlarm (Maybe Bool)-maActionsEnabled = lens _maActionsEnabled (\ s a -> s{_maActionsEnabled = a});+maActionsEnabled = lens _maActionsEnabled (\ s a -> s{_maActionsEnabled = a})  -- | The actions to execute when this alarm transitions to the @INSUFFICIENT_DATA@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). maInsufficientDataActions :: Lens' MetricAlarm [Text]-maInsufficientDataActions = lens _maInsufficientDataActions (\ s a -> s{_maInsufficientDataActions = a}) . _Default . _Coerce;+maInsufficientDataActions = lens _maInsufficientDataActions (\ s a -> s{_maInsufficientDataActions = a}) . _Default . _Coerce  -- | An explanation for the alarm state, in text format. maStateReason :: Lens' MetricAlarm (Maybe Text)-maStateReason = lens _maStateReason (\ s a -> s{_maStateReason = a});+maStateReason = lens _maStateReason (\ s a -> s{_maStateReason = a})  -- | An explanation for the alarm state, in JSON format. maStateReasonData :: Lens' MetricAlarm (Maybe Text)-maStateReasonData = lens _maStateReasonData (\ s a -> s{_maStateReasonData = a});+maStateReasonData = lens _maStateReasonData (\ s a -> s{_maStateReasonData = a})  -- | The dimensions for the metric associated with the alarm. maDimensions :: Lens' MetricAlarm [Dimension]-maDimensions = lens _maDimensions (\ s a -> s{_maDimensions = a}) . _Default . _Coerce;+maDimensions = lens _maDimensions (\ s a -> s{_maDimensions = a}) . _Default . _Coerce  -- | The Amazon Resource Name (ARN) of the alarm. maAlarmARN :: Lens' MetricAlarm (Maybe Text)-maAlarmARN = lens _maAlarmARN (\ s a -> s{_maAlarmARN = a});+maAlarmARN = lens _maAlarmARN (\ s a -> s{_maAlarmARN = a})  -- | The actions to execute when this alarm transitions to the @ALARM@ state from any other state. Each action is specified as an Amazon Resource Name (ARN). maAlarmActions :: Lens' MetricAlarm [Text]-maAlarmActions = lens _maAlarmActions (\ s a -> s{_maAlarmActions = a}) . _Default . _Coerce;+maAlarmActions = lens _maAlarmActions (\ s a -> s{_maAlarmActions = a}) . _Default . _Coerce  -- | The unit of the metric associated with the alarm. maUnit :: Lens' MetricAlarm (Maybe StandardUnit)-maUnit = lens _maUnit (\ s a -> s{_maUnit = a});+maUnit = lens _maUnit (\ s a -> s{_maUnit = a})  -- | The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use @ExtendedStatistic@ . maStatistic :: Lens' MetricAlarm (Maybe Statistic)-maStatistic = lens _maStatistic (\ s a -> s{_maStatistic = a});+maStatistic = lens _maStatistic (\ s a -> s{_maStatistic = a})  -- | The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. maExtendedStatistic :: Lens' MetricAlarm (Maybe Text)-maExtendedStatistic = lens _maExtendedStatistic (\ s a -> s{_maExtendedStatistic = a});+maExtendedStatistic = lens _maExtendedStatistic (\ s a -> s{_maExtendedStatistic = a})  instance FromXML MetricAlarm where         parseXML x@@ -659,6 +714,7 @@                    may (parseXMLList "member"))                 <*> (x .@? "EvaluateLowSampleCountPercentile")                 <*> (x .@? "StateValue")+                <*> (x .@? "DatapointsToAlarm")                 <*> (x .@? "Threshold")                 <*> (x .@? "AlarmConfigurationUpdatedTimestamp")                 <*> (x .@? "ActionsEnabled")@@ -682,6 +738,163 @@  instance NFData MetricAlarm where +-- | This structure indicates the metric data to return, and whether this call is just retrieving a batch set of data for one metric, or is performing a math expression on metric data. A single @GetMetricData@ call can include up to 100 @MetricDataQuery@ structures.+--+--+--+-- /See:/ 'metricDataQuery' smart constructor.+data MetricDataQuery = MetricDataQuery'+  { _mdqReturnData :: !(Maybe Bool)+  , _mdqExpression :: !(Maybe Text)+  , _mdqLabel      :: !(Maybe Text)+  , _mdqMetricStat :: !(Maybe MetricStat)+  , _mdqId         :: !Text+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'MetricDataQuery' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'mdqReturnData' - Indicates whether to return the time stamps and raw data values of this metric. If you are performing this call just to do math expressions and do not also need the raw data returned, you can specify @False@ . If you omit this, the default of @True@ is used.+--+-- * 'mdqExpression' - The math expression to be performed on the returned data, if this structure is performing a math expression. For more information about metric math expressions, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax Metric Math Syntax and Functions> in the /Amazon CloudWatch User Guide/ . Within one MetricDataQuery structure, you must specify either @Expression@ or @MetricStat@ but not both.+--+-- * 'mdqLabel' - A human-readable label for this metric or expression. This is especially useful if this is an expression, so that you know what the value represents. If the metric or expression is shown in a CloudWatch dashboard widget, the label is shown. If Label is omitted, CloudWatch generates a default.+--+-- * 'mdqMetricStat' - The metric to be returned, along with statistics, period, and units. Use this parameter only if this structure is performing a data retrieval and not performing a math expression on the returned data. Within one MetricDataQuery structure, you must specify either @Expression@ or @MetricStat@ but not both.+--+-- * 'mdqId' - A short name used to tie this structure to the results in the response. This name must be unique within a single call to @GetMetricData@ . If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscore. The first character must be a lowercase letter.+metricDataQuery+    :: Text -- ^ 'mdqId'+    -> MetricDataQuery+metricDataQuery pId_ =+  MetricDataQuery'+    { _mdqReturnData = Nothing+    , _mdqExpression = Nothing+    , _mdqLabel = Nothing+    , _mdqMetricStat = Nothing+    , _mdqId = pId_+    }+++-- | Indicates whether to return the time stamps and raw data values of this metric. If you are performing this call just to do math expressions and do not also need the raw data returned, you can specify @False@ . If you omit this, the default of @True@ is used.+mdqReturnData :: Lens' MetricDataQuery (Maybe Bool)+mdqReturnData = lens _mdqReturnData (\ s a -> s{_mdqReturnData = a})++-- | The math expression to be performed on the returned data, if this structure is performing a math expression. For more information about metric math expressions, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax Metric Math Syntax and Functions> in the /Amazon CloudWatch User Guide/ . Within one MetricDataQuery structure, you must specify either @Expression@ or @MetricStat@ but not both.+mdqExpression :: Lens' MetricDataQuery (Maybe Text)+mdqExpression = lens _mdqExpression (\ s a -> s{_mdqExpression = a})++-- | A human-readable label for this metric or expression. This is especially useful if this is an expression, so that you know what the value represents. If the metric or expression is shown in a CloudWatch dashboard widget, the label is shown. If Label is omitted, CloudWatch generates a default.+mdqLabel :: Lens' MetricDataQuery (Maybe Text)+mdqLabel = lens _mdqLabel (\ s a -> s{_mdqLabel = a})++-- | The metric to be returned, along with statistics, period, and units. Use this parameter only if this structure is performing a data retrieval and not performing a math expression on the returned data. Within one MetricDataQuery structure, you must specify either @Expression@ or @MetricStat@ but not both.+mdqMetricStat :: Lens' MetricDataQuery (Maybe MetricStat)+mdqMetricStat = lens _mdqMetricStat (\ s a -> s{_mdqMetricStat = a})++-- | A short name used to tie this structure to the results in the response. This name must be unique within a single call to @GetMetricData@ . If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscore. The first character must be a lowercase letter.+mdqId :: Lens' MetricDataQuery Text+mdqId = lens _mdqId (\ s a -> s{_mdqId = a})++instance Hashable MetricDataQuery where++instance NFData MetricDataQuery where++instance ToQuery MetricDataQuery where+        toQuery MetricDataQuery'{..}+          = mconcat+              ["ReturnData" =: _mdqReturnData,+               "Expression" =: _mdqExpression, "Label" =: _mdqLabel,+               "MetricStat" =: _mdqMetricStat, "Id" =: _mdqId]++-- | A @GetMetricData@ call returns an array of @MetricDataResult@ structures. Each of these structures includes the data points for that metric, along with the time stamps of those data points and other identifying information.+--+--+--+-- /See:/ 'metricDataResult' smart constructor.+data MetricDataResult = MetricDataResult'+  { _mdrValues     :: !(Maybe [Double])+  , _mdrId         :: !(Maybe Text)+  , _mdrTimestamps :: !(Maybe [ISO8601])+  , _mdrMessages   :: !(Maybe [MessageData])+  , _mdrLabel      :: !(Maybe Text)+  , _mdrStatusCode :: !(Maybe StatusCode)+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'MetricDataResult' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'mdrValues' - The data points for the metric corresponding to @Timestamps@ . The number of values always matches the number of time stamps and the time stamp for Values[x] is Timestamps[x].+--+-- * 'mdrId' - The short name you specified to represent this metric.+--+-- * 'mdrTimestamps' - The time stamps for the data points, formatted in Unix timestamp format. The number of time stamps always matches the number of values and the value for Timestamps[x] is Values[x].+--+-- * 'mdrMessages' - A list of messages with additional information about the data returned.+--+-- * 'mdrLabel' - The human-readable label associated with the data.+--+-- * 'mdrStatusCode' - The status of the returned data. @Complete@ indicates that all data points in the requested time range were returned. @PartialData@ means that an incomplete set of data points were returned. You can use the @NextToken@ value that was returned and repeat your request to get more data points. @NextToken@ is not returned if you are performing a math expression. @InternalError@ indicates that an error occurred. Retry your request using @NextToken@ , if present.+metricDataResult+    :: MetricDataResult+metricDataResult =+  MetricDataResult'+    { _mdrValues = Nothing+    , _mdrId = Nothing+    , _mdrTimestamps = Nothing+    , _mdrMessages = Nothing+    , _mdrLabel = Nothing+    , _mdrStatusCode = Nothing+    }+++-- | The data points for the metric corresponding to @Timestamps@ . The number of values always matches the number of time stamps and the time stamp for Values[x] is Timestamps[x].+mdrValues :: Lens' MetricDataResult [Double]+mdrValues = lens _mdrValues (\ s a -> s{_mdrValues = a}) . _Default . _Coerce++-- | The short name you specified to represent this metric.+mdrId :: Lens' MetricDataResult (Maybe Text)+mdrId = lens _mdrId (\ s a -> s{_mdrId = a})++-- | The time stamps for the data points, formatted in Unix timestamp format. The number of time stamps always matches the number of values and the value for Timestamps[x] is Values[x].+mdrTimestamps :: Lens' MetricDataResult [UTCTime]+mdrTimestamps = lens _mdrTimestamps (\ s a -> s{_mdrTimestamps = a}) . _Default . _Coerce++-- | A list of messages with additional information about the data returned.+mdrMessages :: Lens' MetricDataResult [MessageData]+mdrMessages = lens _mdrMessages (\ s a -> s{_mdrMessages = a}) . _Default . _Coerce++-- | The human-readable label associated with the data.+mdrLabel :: Lens' MetricDataResult (Maybe Text)+mdrLabel = lens _mdrLabel (\ s a -> s{_mdrLabel = a})++-- | The status of the returned data. @Complete@ indicates that all data points in the requested time range were returned. @PartialData@ means that an incomplete set of data points were returned. You can use the @NextToken@ value that was returned and repeat your request to get more data points. @NextToken@ is not returned if you are performing a math expression. @InternalError@ indicates that an error occurred. Retry your request using @NextToken@ , if present.+mdrStatusCode :: Lens' MetricDataResult (Maybe StatusCode)+mdrStatusCode = lens _mdrStatusCode (\ s a -> s{_mdrStatusCode = a})++instance FromXML MetricDataResult where+        parseXML x+          = MetricDataResult' <$>+              (x .@? "Values" .!@ mempty >>=+                 may (parseXMLList "member"))+                <*> (x .@? "Id")+                <*>+                (x .@? "Timestamps" .!@ mempty >>=+                   may (parseXMLList "member"))+                <*>+                (x .@? "Messages" .!@ mempty >>=+                   may (parseXMLList "member"))+                <*> (x .@? "Label")+                <*> (x .@? "StatusCode")++instance Hashable MetricDataResult where++instance NFData MetricDataResult where+ -- | Encapsulates the information sent to either create a metric or add new values to be aggregated into an existing metric. -- --@@ -720,43 +933,43 @@     -> MetricDatum metricDatum pMetricName_ =   MetricDatum'-  { _mdValue = Nothing-  , _mdStorageResolution = Nothing-  , _mdDimensions = Nothing-  , _mdUnit = Nothing-  , _mdTimestamp = Nothing-  , _mdStatisticValues = Nothing-  , _mdMetricName = pMetricName_-  }+    { _mdValue = Nothing+    , _mdStorageResolution = Nothing+    , _mdDimensions = Nothing+    , _mdUnit = Nothing+    , _mdTimestamp = Nothing+    , _mdStatisticValues = Nothing+    , _mdMetricName = pMetricName_+    }   -- | The value for the metric. Although the parameter accepts numbers of type Double, CloudWatch rejects values that are either too small or too large. Values must be in the range of 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). In addition, special values (for example, NaN, +Infinity, -Infinity) are not supported. mdValue :: Lens' MetricDatum (Maybe Double)-mdValue = lens _mdValue (\ s a -> s{_mdValue = a});+mdValue = lens _mdValue (\ s a -> s{_mdValue = a})  -- | Valid values are 1 and 60. Setting this to 1 specifies this metric as a high-resolution metric, so that CloudWatch stores the metric with sub-minute resolution down to one second. Setting this to 60 specifies this metric as a regular-resolution metric, which CloudWatch stores at 1-minute resolution. Currently, high resolution is available only for custom metrics. For more information about high-resolution metrics, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html#high-resolution-metrics High-Resolution Metrics> in the /Amazon CloudWatch User Guide/ .  This field is optional, if you do not specify it the default of 60 is used. mdStorageResolution :: Lens' MetricDatum (Maybe Natural)-mdStorageResolution = lens _mdStorageResolution (\ s a -> s{_mdStorageResolution = a}) . mapping _Nat;+mdStorageResolution = lens _mdStorageResolution (\ s a -> s{_mdStorageResolution = a}) . mapping _Nat  -- | The dimensions associated with the metric. mdDimensions :: Lens' MetricDatum [Dimension]-mdDimensions = lens _mdDimensions (\ s a -> s{_mdDimensions = a}) . _Default . _Coerce;+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});+mdUnit = lens _mdUnit (\ s a -> s{_mdUnit = a})  -- | The time the metric data was received, expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC. mdTimestamp :: Lens' MetricDatum (Maybe UTCTime)-mdTimestamp = lens _mdTimestamp (\ s a -> s{_mdTimestamp = a}) . mapping _Time;+mdTimestamp = lens _mdTimestamp (\ s a -> s{_mdTimestamp = a}) . mapping _Time  -- | The statistical values for the metric. mdStatisticValues :: Lens' MetricDatum (Maybe StatisticSet)-mdStatisticValues = lens _mdStatisticValues (\ s a -> s{_mdStatisticValues = a});+mdStatisticValues = lens _mdStatisticValues (\ s a -> s{_mdStatisticValues = a})  -- | The name of the metric. mdMetricName :: Lens' MetricDatum Text-mdMetricName = lens _mdMetricName (\ s a -> s{_mdMetricName = a});+mdMetricName = lens _mdMetricName (\ s a -> s{_mdMetricName = a})  instance Hashable MetricDatum where @@ -773,6 +986,70 @@                "StatisticValues" =: _mdStatisticValues,                "MetricName" =: _mdMetricName] +-- | This structure defines the metric to be returned, along with the statistics, period, and units.+--+--+--+-- /See:/ 'metricStat' smart constructor.+data MetricStat = MetricStat'+  { _msUnit   :: !(Maybe StandardUnit)+  , _msMetric :: !Metric+  , _msPeriod :: !Nat+  , _msStat   :: !Text+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'MetricStat' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'msUnit' - The unit to use for the returned data points.+--+-- * 'msMetric' - The metric to return, including the metric name, namespace, and dimensions.+--+-- * 'msPeriod' - The period to use when retrieving the metric.+--+-- * 'msStat' - The statistic to return. It can include any CloudWatch statistic or extended statistic.+metricStat+    :: Metric -- ^ 'msMetric'+    -> Natural -- ^ 'msPeriod'+    -> Text -- ^ 'msStat'+    -> MetricStat+metricStat pMetric_ pPeriod_ pStat_ =+  MetricStat'+    { _msUnit = Nothing+    , _msMetric = pMetric_+    , _msPeriod = _Nat # pPeriod_+    , _msStat = pStat_+    }+++-- | The unit to use for the returned data points.+msUnit :: Lens' MetricStat (Maybe StandardUnit)+msUnit = lens _msUnit (\ s a -> s{_msUnit = a})++-- | The metric to return, including the metric name, namespace, and dimensions.+msMetric :: Lens' MetricStat Metric+msMetric = lens _msMetric (\ s a -> s{_msMetric = a})++-- | The period to use when retrieving the metric.+msPeriod :: Lens' MetricStat Natural+msPeriod = lens _msPeriod (\ s a -> s{_msPeriod = a}) . _Nat++-- | The statistic to return. It can include any CloudWatch statistic or extended statistic.+msStat :: Lens' MetricStat Text+msStat = lens _msStat (\ s a -> s{_msStat = a})++instance Hashable MetricStat where++instance NFData MetricStat where++instance ToQuery MetricStat where+        toQuery MetricStat'{..}+          = mconcat+              ["Unit" =: _msUnit, "Metric" =: _msMetric,+               "Period" =: _msPeriod, "Stat" =: _msStat]+ -- | Represents a set of statistics that describes a specific metric. -- --@@ -805,28 +1082,28 @@     -> StatisticSet statisticSet pSampleCount_ pSum_ pMinimum_ pMaximum_ =   StatisticSet'-  { _ssSampleCount = pSampleCount_-  , _ssSum = pSum_-  , _ssMinimum = pMinimum_-  , _ssMaximum = pMaximum_-  }+    { _ssSampleCount = pSampleCount_+    , _ssSum = pSum_+    , _ssMinimum = pMinimum_+    , _ssMaximum = pMaximum_+    }   -- | The number of samples used for the statistic set. ssSampleCount :: Lens' StatisticSet Double-ssSampleCount = lens _ssSampleCount (\ s a -> s{_ssSampleCount = a});+ssSampleCount = lens _ssSampleCount (\ s a -> s{_ssSampleCount = a})  -- | The sum of values for the sample set. ssSum :: Lens' StatisticSet Double-ssSum = lens _ssSum (\ s a -> s{_ssSum = a});+ssSum = lens _ssSum (\ s a -> s{_ssSum = a})  -- | The minimum value of the sample set. ssMinimum :: Lens' StatisticSet Double-ssMinimum = lens _ssMinimum (\ s a -> s{_ssMinimum = a});+ssMinimum = lens _ssMinimum (\ s a -> s{_ssMinimum = a})  -- | The maximum value of the sample set. ssMaximum :: Lens' StatisticSet Double-ssMaximum = lens _ssMaximum (\ s a -> s{_ssMaximum = a});+ssMaximum = lens _ssMaximum (\ s a -> s{_ssMaximum = a})  instance Hashable StatisticSet where 
gen/Network/AWS/CloudWatch/Types/Sum.hs view
@@ -9,7 +9,7 @@  -- | -- Module      : Network.AWS.CloudWatch.Types.Sum--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -82,6 +82,30 @@ instance FromXML HistoryItemType where     parseXML = parseXMLText "HistoryItemType" +data ScanBy+  = TimestampAscending+  | TimestampDescending+  deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ScanBy where+    parser = takeLowerText >>= \case+        "timestampascending" -> pure TimestampAscending+        "timestampdescending" -> pure TimestampDescending+        e -> fromTextError $ "Failure parsing ScanBy from value: '" <> e+           <> "'. Accepted values: timestampascending, timestampdescending"++instance ToText ScanBy where+    toText = \case+        TimestampAscending -> "TimestampAscending"+        TimestampDescending -> "TimestampDescending"++instance Hashable     ScanBy+instance NFData       ScanBy+instance ToByteString ScanBy+instance ToQuery      ScanBy+instance ToHeader     ScanBy+ data StandardUnit   = Bits   | BitsSecond@@ -249,3 +273,33 @@  instance FromXML Statistic where     parseXML = parseXMLText "Statistic"++data StatusCode+  = Complete+  | InternalError+  | PartialData+  deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText StatusCode where+    parser = takeLowerText >>= \case+        "complete" -> pure Complete+        "internalerror" -> pure InternalError+        "partialdata" -> pure PartialData+        e -> fromTextError $ "Failure parsing StatusCode from value: '" <> e+           <> "'. Accepted values: complete, internalerror, partialdata"++instance ToText StatusCode where+    toText = \case+        Complete -> "Complete"+        InternalError -> "InternalError"+        PartialData -> "PartialData"++instance Hashable     StatusCode+instance NFData       StatusCode+instance ToByteString StatusCode+instance ToQuery      StatusCode+instance ToHeader     StatusCode++instance FromXML StatusCode where+    parseXML = parseXMLText "StatusCode"
gen/Network/AWS/CloudWatch/Waiters.hs view
@@ -7,7 +7,7 @@  -- | -- Module      : Network.AWS.CloudWatch.Waiters--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -25,10 +25,10 @@ alarmExists :: Wait DescribeAlarms alarmExists =   Wait-  { _waitName = "AlarmExists"-  , _waitAttempts = 40-  , _waitDelay = 5-  , _waitAcceptors =-      [matchNonEmpty True AcceptSuccess (folding (concatOf darsMetricAlarms))]-  }+    { _waitName = "AlarmExists"+    , _waitAttempts = 40+    , _waitDelay = 5+    , _waitAcceptors =+        [matchNonEmpty True AcceptSuccess (folding (concatOf darsMetricAlarms))]+    } 
test/Main.hs view
@@ -2,7 +2,7 @@  -- | -- Module      : Main--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated
test/Test/AWS/CloudWatch.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-}  -- Module      : Test.AWS.CloudWatch--- Copyright   : (c) 2013-2016 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : This Source Code Form is subject to the terms of --               the Mozilla Public License, v. 2.0. --               A copy of the MPL can be found in the LICENSE file or
test/Test/AWS/CloudWatch/Internal.hs view
@@ -2,7 +2,7 @@ {-# OPTIONS_GHC -fno-warn-unused-imports #-}  -- Module      : Test.AWS.CloudWatch.Internal--- Copyright   : (c) 2013-2016 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : This Source Code Form is subject to the terms of --               the Mozilla Public License, v. 2.0. --               A copy of the MPL can be found in the LICENSE file or
test/Test/AWS/Gen/CloudWatch.hs view
@@ -5,7 +5,7 @@  -- | -- Module      : Test.AWS.Gen.CloudWatch--- Copyright   : (c) 2013-2017 Brendan Hay+-- Copyright   : (c) 2013-2018 Brendan Hay -- License     : Mozilla Public License, v. 2.0. -- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability   : auto-generated@@ -34,6 +34,9 @@ --         , requestGetDashboard $ --             getDashboard --+--         , requestGetMetricData $+--             getMetricData+-- --         , requestPutMetricData $ --             putMetricData --@@ -82,6 +85,9 @@ --         , responseGetDashboard $ --             getDashboardResponse --+--         , responseGetMetricData $+--             getMetricDataResponse+-- --         , responsePutMetricData $ --             putMetricDataResponse --@@ -136,6 +142,11 @@     "GetDashboard"     "fixture/GetDashboard.yaml" +requestGetMetricData :: GetMetricData -> TestTree+requestGetMetricData = req+    "GetMetricData"+    "fixture/GetMetricData.yaml"+ requestPutMetricData :: PutMetricData -> TestTree requestPutMetricData = req     "PutMetricData"@@ -216,6 +227,13 @@     "fixture/GetDashboardResponse.proto"     cloudWatch     (Proxy :: Proxy GetDashboard)++responseGetMetricData :: GetMetricDataResponse -> TestTree+responseGetMetricData = res+    "GetMetricDataResponse"+    "fixture/GetMetricDataResponse.proto"+    cloudWatch+    (Proxy :: Proxy GetMetricData)  responsePutMetricData :: PutMetricDataResponse -> TestTree responsePutMetricData = res