amazonka-cloudwatch 1.4.4 → 1.4.5
raw patch · 16 files changed
+434/−389 lines, 16 filesdep ~amazonka-cloudwatchdep ~amazonka-coredep ~amazonka-testPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: amazonka-cloudwatch, amazonka-core, amazonka-test
API changes (from Hackage documentation)
+ Network.AWS.CloudWatch: dExtendedStatistics :: Lens' Datapoint (HashMap Text Double)
+ Network.AWS.CloudWatch: maExtendedStatistic :: Lens' MetricAlarm (Maybe Text)
+ Network.AWS.CloudWatch.DescribeAlarmsForMetric: dafmExtendedStatistic :: Lens' DescribeAlarmsForMetric (Maybe Text)
+ Network.AWS.CloudWatch.GetMetricStatistics: gmsExtendedStatistics :: Lens' GetMetricStatistics (Maybe (NonEmpty Text))
+ Network.AWS.CloudWatch.PutMetricAlarm: pmaExtendedStatistic :: Lens' PutMetricAlarm (Maybe Text)
+ Network.AWS.CloudWatch.Types: dExtendedStatistics :: Lens' Datapoint (HashMap Text Double)
+ Network.AWS.CloudWatch.Types: maExtendedStatistic :: Lens' MetricAlarm (Maybe Text)
- Network.AWS.CloudWatch.GetMetricStatistics: getMetricStatistics :: Text -> Text -> UTCTime -> UTCTime -> Natural -> NonEmpty Statistic -> GetMetricStatistics
+ Network.AWS.CloudWatch.GetMetricStatistics: getMetricStatistics :: Text -> Text -> UTCTime -> UTCTime -> Natural -> GetMetricStatistics
- Network.AWS.CloudWatch.GetMetricStatistics: gmsStatistics :: Lens' GetMetricStatistics (NonEmpty Statistic)
+ Network.AWS.CloudWatch.GetMetricStatistics: gmsStatistics :: Lens' GetMetricStatistics (Maybe (NonEmpty Statistic))
- Network.AWS.CloudWatch.PutMetricAlarm: pmaStatistic :: Lens' PutMetricAlarm Statistic
+ Network.AWS.CloudWatch.PutMetricAlarm: pmaStatistic :: Lens' PutMetricAlarm (Maybe Statistic)
- Network.AWS.CloudWatch.PutMetricAlarm: putMetricAlarm :: Text -> Text -> Text -> Statistic -> Natural -> Natural -> Double -> ComparisonOperator -> PutMetricAlarm
+ Network.AWS.CloudWatch.PutMetricAlarm: putMetricAlarm :: Text -> Text -> Text -> Natural -> Natural -> Double -> ComparisonOperator -> PutMetricAlarm
Files
- README.md +9/−10
- amazonka-cloudwatch.cabal +10/−15
- gen/Network/AWS/CloudWatch.hs +4/−0
- gen/Network/AWS/CloudWatch/DeleteAlarms.hs +6/−6
- gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs +18/−20
- gen/Network/AWS/CloudWatch/DescribeAlarms.hs +19/−21
- gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs +34/−26
- gen/Network/AWS/CloudWatch/DisableAlarmActions.hs +6/−6
- gen/Network/AWS/CloudWatch/EnableAlarmActions.hs +6/−6
- gen/Network/AWS/CloudWatch/GetMetricStatistics.hs +65/−55
- gen/Network/AWS/CloudWatch/ListMetrics.hs +18/−20
- gen/Network/AWS/CloudWatch/PutMetricAlarm.hs +64/−71
- gen/Network/AWS/CloudWatch/PutMetricData.hs +11/−13
- gen/Network/AWS/CloudWatch/SetAlarmState.hs +11/−11
- gen/Network/AWS/CloudWatch/Types.hs +23/−5
- gen/Network/AWS/CloudWatch/Types/Product.hs +130/−104
README.md view
@@ -8,28 +8,27 @@ ## Version -`1.4.4`+`1.4.5` ## Description -Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real-time. You can use CloudWatch to collect and track metrics, which are the variables you want to measure for your resources and applications.--CloudWatch alarms send notifications or automatically make changes to the resources you are monitoring based on rules that you define. For example, you can monitor the CPU usage and disk reads and writes of your Amazon Elastic Compute Cloud (Amazon EC2) instances and then use this data to determine whether you should launch additional instances to handle increased load. You can also use this data to stop under-used instances to save money.--In addition to monitoring the built-in metrics that come with AWS, you can monitor your own custom metrics. With CloudWatch, you gain system-wide visibility into resource utilization, application performance, and operational health.- Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-cloudwatch) and the [AWS API Reference](https://aws.amazon.com/documentation/). The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),-which provides mechanisms for specifying AuthN/AuthZ information and sending requests.+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses. -Use of lenses is required for constructing and manipulating types.-This is due to the amount of nesting of AWS types and transparency regarding+Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding de/serialisation into more palatable Haskell values. The provided lenses should be compatible with any of the major lens libraries [lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Network.AWS.CloudWatch](http://hackage.haskell.org/package/amazonka-cloudwatch/docs/Network-AWS-CloudWatch.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+ ## Contribute
amazonka-cloudwatch.cabal view
@@ -1,5 +1,5 @@ name: amazonka-cloudwatch-version: 1.4.4+version: 1.4.5 synopsis: Amazon CloudWatch SDK. homepage: https://github.com/brendanhay/amazonka bug-reports: https://github.com/brendanhay/amazonka/issues@@ -13,24 +13,19 @@ cabal-version: >= 1.10 extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep description:- Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real-time. You can use CloudWatch to collect and track metrics, which are the variables you want to measure for your resources and applications.-- CloudWatch alarms send notifications or automatically make changes to the resources you are monitoring based on rules that you define. For example, you can monitor the CPU usage and disk reads and writes of your Amazon Elastic Compute Cloud (Amazon EC2) instances and then use this data to determine whether you should launch additional instances to handle increased load. You can also use this data to stop under-used instances to save money.-- In addition to monitoring the built-in metrics that come with AWS, you can monitor your own custom metrics. With CloudWatch, you gain system-wide visibility into resource utilization, application performance, and operational health.- . The types from this library are intended to be used with <http://hackage.haskell.org/package/amazonka amazonka>, which provides- mechanisms for specifying AuthN/AuthZ information and sending requests.+ mechanisms for specifying AuthN/AuthZ information, sending requests,+ and receiving responses. .- Use of lenses is required for constructing and manipulating types.- This is due to the amount of nesting of AWS types and transparency regarding+ Lenses are used for constructing and manipulating types,+ due to the depth of nesting of AWS types and transparency regarding de/serialisation into more palatable Haskell values. The provided lenses should be compatible with any of the major lens libraries such as <http://hackage.haskell.org/package/lens lens> or <http://hackage.haskell.org/package/lens-family-core lens-family-core>. .- See "Network.AWS.CloudWatch" or <https://aws.amazon.com/documentation/ the AWS Documentation>+ See "Network.AWS.CloudWatch" or <https://aws.amazon.com/documentation/ the AWS documentation> to get started. source-repository head@@ -64,7 +59,7 @@ , Network.AWS.CloudWatch.Types.Sum build-depends:- amazonka-core == 1.4.4.*+ amazonka-core == 1.4.5.* , base >= 4.7 && < 5 test-suite amazonka-cloudwatch-test@@ -84,9 +79,9 @@ , Test.AWS.CloudWatch.Internal build-depends:- amazonka-core == 1.4.4.*- , amazonka-test == 1.4.4.*- , amazonka-cloudwatch == 1.4.4.*+ amazonka-core == 1.4.5.*+ , amazonka-test == 1.4.5.*+ , amazonka-cloudwatch == 1.4.5.* , base , bytestring , tasty
gen/Network/AWS/CloudWatch.hs view
@@ -13,9 +13,11 @@ -- -- Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real-time. You can use CloudWatch to collect and track metrics, which are the variables you want to measure for your resources and applications. --+-- -- CloudWatch alarms send notifications or automatically make changes to the resources you are monitoring based on rules that you define. For example, you can monitor the CPU usage and disk reads and writes of your Amazon Elastic Compute Cloud (Amazon EC2) instances and then use this data to determine whether you should launch additional instances to handle increased load. You can also use this data to stop under-used instances to save money. -- -- In addition to monitoring the built-in metrics that come with AWS, you can monitor your own custom metrics. With CloudWatch, you gain system-wide visibility into resource utilization, application performance, and operational health.+-- module Network.AWS.CloudWatch ( -- * Service Configuration@@ -120,6 +122,7 @@ , dMaximum , dAverage , dMinimum+ , dExtendedStatistics , dSum , dUnit , dTimestamp@@ -167,6 +170,7 @@ , maAlarmActions , maUnit , maStatistic+ , maExtendedStatistic -- ** MetricDatum , MetricDatum
gen/Network/AWS/CloudWatch/DeleteAlarms.hs view
@@ -18,7 +18,9 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Deletes all specified alarms. In the event of an error, no alarms are deleted.+-- Deletes the specified alarms. In the event of an error, no alarms are deleted.+--+-- module Network.AWS.CloudWatch.DeleteAlarms ( -- * Creating a Request@@ -39,9 +41,7 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for DeleteAlarms.------ /See:/ 'deleteAlarms' smart constructor.+-- | /See:/ 'deleteAlarms' smart constructor. newtype DeleteAlarms = DeleteAlarms' { _dAlarmNames :: [Text] } deriving (Eq,Read,Show,Data,Typeable,Generic)@@ -50,7 +50,7 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'dAlarmNames'+-- * 'dAlarmNames' - The alarms to be deleted. deleteAlarms :: DeleteAlarms deleteAlarms =@@ -58,7 +58,7 @@ { _dAlarmNames = mempty } --- | A list of alarms to be deleted.+-- | The alarms to be deleted. dAlarmNames :: Lens' DeleteAlarms [Text] dAlarmNames = lens _dAlarmNames (\ s a -> s{_dAlarmNames = a}) . _Coerce;
gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs view
@@ -18,10 +18,12 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Retrieves history for the specified alarm. Filter alarms by date range or item type. If an alarm name is not specified, Amazon CloudWatch returns histories for all of the owner\'s alarms.+-- Retrieves the history for the specified alarm. You can filter the results by date range or item type. If an alarm name is not specified, the histories for all alarms are returned. ----- Amazon CloudWatch retains the history of an alarm for two weeks, whether or not you delete the alarm. --+-- Note that Amazon CloudWatch retains the history of an alarm even if you delete the alarm.+--+-- -- This operation returns paginated results. module Network.AWS.CloudWatch.DescribeAlarmHistory (@@ -53,9 +55,7 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for DescribeAlarmHistory.------ /See:/ 'describeAlarmHistory' smart constructor.+-- | /See:/ 'describeAlarmHistory' smart constructor. data DescribeAlarmHistory = DescribeAlarmHistory' { _dahAlarmName :: !(Maybe Text) , _dahHistoryItemType :: !(Maybe HistoryItemType)@@ -69,17 +69,17 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'dahAlarmName'+-- * 'dahAlarmName' - The name of the alarm. ----- * 'dahHistoryItemType'+-- * 'dahHistoryItemType' - The type of alarm histories to retrieve. ----- * 'dahEndDate'+-- * 'dahEndDate' - The ending date to retrieve alarm history. ----- * 'dahStartDate'+-- * 'dahStartDate' - The starting date to retrieve alarm history. ----- * 'dahNextToken'+-- * 'dahNextToken' - The token returned by a previous call to indicate that there is more data available. ----- * 'dahMaxRecords'+-- * 'dahMaxRecords' - The maximum number of alarm history records to retrieve. describeAlarmHistory :: DescribeAlarmHistory describeAlarmHistory =@@ -158,9 +158,7 @@ "NextToken" =: _dahNextToken, "MaxRecords" =: _dahMaxRecords] --- | The output for < DescribeAlarmHistory>.------ /See:/ 'describeAlarmHistoryResponse' smart constructor.+-- | /See:/ 'describeAlarmHistoryResponse' smart constructor. data DescribeAlarmHistoryResponse = DescribeAlarmHistoryResponse' { _dahrsAlarmHistoryItems :: !(Maybe [AlarmHistoryItem]) , _dahrsNextToken :: !(Maybe Text)@@ -171,11 +169,11 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'dahrsAlarmHistoryItems'+-- * 'dahrsAlarmHistoryItems' - The alarm histories, in JSON format. ----- * 'dahrsNextToken'+-- * 'dahrsNextToken' - The token that marks the start of the next batch of returned results. ----- * 'dahrsResponseStatus'+-- * 'dahrsResponseStatus' - -- | The response status code. describeAlarmHistoryResponse :: Int -- ^ 'dahrsResponseStatus' -> DescribeAlarmHistoryResponse@@ -186,15 +184,15 @@ , _dahrsResponseStatus = pResponseStatus_ } --- | A list of alarm histories in JSON format.+-- | The alarm histories, in JSON format. dahrsAlarmHistoryItems :: Lens' DescribeAlarmHistoryResponse [AlarmHistoryItem] dahrsAlarmHistoryItems = lens _dahrsAlarmHistoryItems (\ s a -> s{_dahrsAlarmHistoryItems = a}) . _Default . _Coerce; --- | A string that marks the start of the next batch of returned results.+-- | 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}); --- | The response status code.+-- | -- | The response status code. dahrsResponseStatus :: Lens' DescribeAlarmHistoryResponse Int dahrsResponseStatus = lens _dahrsResponseStatus (\ s a -> s{_dahrsResponseStatus = a});
gen/Network/AWS/CloudWatch/DescribeAlarms.hs view
@@ -18,8 +18,10 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Retrieves alarms with the specified names. If no name is specified, all alarms for the user are returned. Alarms can be retrieved by using only a prefix for the alarm name, the alarm state, or a prefix for any action.+-- Retrieves the specified alarms. If no alarms are specified, all alarms are returned. Alarms can be retrieved by using only a prefix for the alarm name, the alarm state, or a prefix for any action. --+--+-- -- This operation returns paginated results. module Network.AWS.CloudWatch.DescribeAlarms (@@ -51,9 +53,7 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for DescribeAlarms.------ /See:/ 'describeAlarms' smart constructor.+-- | /See:/ 'describeAlarms' smart constructor. data DescribeAlarms = DescribeAlarms' { _daAlarmNamePrefix :: !(Maybe Text) , _daActionPrefix :: !(Maybe Text)@@ -67,17 +67,17 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'daAlarmNamePrefix'+-- * 'daAlarmNamePrefix' - The alarm name prefix. You cannot specify @AlarmNames@ if this parameter is specified. ----- * 'daActionPrefix'+-- * 'daActionPrefix' - The action name prefix. ----- * 'daNextToken'+-- * 'daNextToken' - The token returned by a previous call to indicate that there is more data available. ----- * 'daStateValue'+-- * 'daStateValue' - The state value to be used in matching alarms. ----- * 'daAlarmNames'+-- * 'daAlarmNames' - The names of the alarms. ----- * 'daMaxRecords'+-- * 'daMaxRecords' - The maximum number of alarm descriptions to retrieve. describeAlarms :: DescribeAlarms describeAlarms =@@ -90,7 +90,7 @@ , _daMaxRecords = Nothing } --- | The alarm name prefix. 'AlarmNames' cannot be specified if this parameter is specified.+-- | The alarm name prefix. You cannot specify @AlarmNames@ if this parameter is specified. daAlarmNamePrefix :: Lens' DescribeAlarms (Maybe Text) daAlarmNamePrefix = lens _daAlarmNamePrefix (\ s a -> s{_daAlarmNamePrefix = a}); @@ -106,7 +106,7 @@ daStateValue :: Lens' DescribeAlarms (Maybe StateValue) daStateValue = lens _daStateValue (\ s a -> s{_daStateValue = a}); --- | A list of alarm names to retrieve information for.+-- | The names of the alarms. daAlarmNames :: Lens' DescribeAlarms [Text] daAlarmNames = lens _daAlarmNames (\ s a -> s{_daAlarmNames = a}) . _Default . _Coerce; @@ -156,9 +156,7 @@ toQuery (toQueryList "member" <$> _daAlarmNames), "MaxRecords" =: _daMaxRecords] --- | The output for < DescribeAlarms>.------ /See:/ 'describeAlarmsResponse' smart constructor.+-- | /See:/ 'describeAlarmsResponse' smart constructor. data DescribeAlarmsResponse = DescribeAlarmsResponse' { _darsMetricAlarms :: !(Maybe [MetricAlarm]) , _darsNextToken :: !(Maybe Text)@@ -169,11 +167,11 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'darsMetricAlarms'+-- * 'darsMetricAlarms' - The information for the specified alarms. ----- * 'darsNextToken'+-- * 'darsNextToken' - The token that marks the start of the next batch of returned results. ----- * 'darsResponseStatus'+-- * 'darsResponseStatus' - -- | The response status code. describeAlarmsResponse :: Int -- ^ 'darsResponseStatus' -> DescribeAlarmsResponse@@ -184,15 +182,15 @@ , _darsResponseStatus = pResponseStatus_ } --- | A list of information for the specified alarms.+-- | The information for the specified alarms. darsMetricAlarms :: Lens' DescribeAlarmsResponse [MetricAlarm] darsMetricAlarms = lens _darsMetricAlarms (\ s a -> s{_darsMetricAlarms = a}) . _Default . _Coerce; --- | A string that marks the start of the next batch of returned results.+-- | 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}); --- | The response status code.+-- | -- | The response status code. darsResponseStatus :: Lens' DescribeAlarmsResponse Int darsResponseStatus = lens _darsResponseStatus (\ s a -> s{_darsResponseStatus = a});
gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs view
@@ -18,7 +18,9 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Retrieves all alarms for a single metric. Specify a statistic, period, or unit to filter the set of alarms further.+-- Retrieves the alarms for the specified metric. Specify a statistic, period, or unit to filter the results.+--+-- module Network.AWS.CloudWatch.DescribeAlarmsForMetric ( -- * Creating a Request@@ -29,6 +31,7 @@ , dafmDimensions , dafmUnit , dafmStatistic+ , dafmExtendedStatistic , dafmMetricName , dafmNamespace @@ -47,33 +50,34 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for DescribeAlarmsForMetric.------ /See:/ 'describeAlarmsForMetric' smart constructor.+-- | /See:/ 'describeAlarmsForMetric' smart constructor. data DescribeAlarmsForMetric = DescribeAlarmsForMetric'- { _dafmPeriod :: !(Maybe Nat)- , _dafmDimensions :: !(Maybe [Dimension])- , _dafmUnit :: !(Maybe StandardUnit)- , _dafmStatistic :: !(Maybe Statistic)- , _dafmMetricName :: !Text- , _dafmNamespace :: !Text+ { _dafmPeriod :: !(Maybe Nat)+ , _dafmDimensions :: !(Maybe [Dimension])+ , _dafmUnit :: !(Maybe StandardUnit)+ , _dafmStatistic :: !(Maybe Statistic)+ , _dafmExtendedStatistic :: !(Maybe Text)+ , _dafmMetricName :: !Text+ , _dafmNamespace :: !Text } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'DescribeAlarmsForMetric' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'dafmPeriod'+-- * 'dafmPeriod' - The period, in seconds, over which the statistic is applied. ----- * 'dafmDimensions'+-- * 'dafmDimensions' - The dimensions associated with the metric. If the metric has any associated dimensions, you must specify them in order for the call to succeed. ----- * 'dafmUnit'+-- * 'dafmUnit' - The unit for the metric. ----- * 'dafmStatistic'+-- * 'dafmStatistic' - The statistic for the metric, other than percentiles. For percentile statistics, use @ExtendedStatistics@ . ----- * 'dafmMetricName'+-- * 'dafmExtendedStatistic' - The percentile statistic for the metric. Specify a value between p0.0 and p100. ----- * 'dafmNamespace'+-- * 'dafmMetricName' - The name of the metric.+--+-- * 'dafmNamespace' - The namespace of the metric. describeAlarmsForMetric :: Text -- ^ 'dafmMetricName' -> Text -- ^ 'dafmNamespace'@@ -84,15 +88,16 @@ , _dafmDimensions = Nothing , _dafmUnit = Nothing , _dafmStatistic = Nothing+ , _dafmExtendedStatistic = Nothing , _dafmMetricName = pMetricName_ , _dafmNamespace = pNamespace_ } --- | The period in seconds over which the statistic is applied.+-- | 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; --- | The list of dimensions associated with the metric. If the metric has any associated dimensions, you must specify them in order for the DescribeAlarmsForMetric to succeed.+-- | 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; @@ -100,10 +105,14 @@ dafmUnit :: Lens' DescribeAlarmsForMetric (Maybe StandardUnit) dafmUnit = lens _dafmUnit (\ s a -> s{_dafmUnit = a}); --- | The statistic for the metric.+-- | 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}); +-- | 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});+ -- | The name of the metric. dafmMetricName :: Lens' DescribeAlarmsForMetric Text dafmMetricName = lens _dafmMetricName (\ s a -> s{_dafmMetricName = a});@@ -144,12 +153,11 @@ "Dimensions" =: toQuery (toQueryList "member" <$> _dafmDimensions), "Unit" =: _dafmUnit, "Statistic" =: _dafmStatistic,+ "ExtendedStatistic" =: _dafmExtendedStatistic, "MetricName" =: _dafmMetricName, "Namespace" =: _dafmNamespace] --- | The output for < DescribeAlarmsForMetric>.------ /See:/ 'describeAlarmsForMetricResponse' smart constructor.+-- | /See:/ 'describeAlarmsForMetricResponse' smart constructor. data DescribeAlarmsForMetricResponse = DescribeAlarmsForMetricResponse' { _dafmrsMetricAlarms :: !(Maybe [MetricAlarm]) , _dafmrsResponseStatus :: !Int@@ -159,9 +167,9 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'dafmrsMetricAlarms'+-- * 'dafmrsMetricAlarms' - The information for each alarm with the specified metric. ----- * 'dafmrsResponseStatus'+-- * 'dafmrsResponseStatus' - -- | The response status code. describeAlarmsForMetricResponse :: Int -- ^ 'dafmrsResponseStatus' -> DescribeAlarmsForMetricResponse@@ -171,11 +179,11 @@ , _dafmrsResponseStatus = pResponseStatus_ } --- | A list of information for each alarm with the specified metric.+-- | The information for each alarm with the specified metric. dafmrsMetricAlarms :: Lens' DescribeAlarmsForMetricResponse [MetricAlarm] dafmrsMetricAlarms = lens _dafmrsMetricAlarms (\ s a -> s{_dafmrsMetricAlarms = a}) . _Default . _Coerce; --- | The response status code.+-- | -- | The response status code. dafmrsResponseStatus :: Lens' DescribeAlarmsForMetricResponse Int dafmrsResponseStatus = lens _dafmrsResponseStatus (\ s a -> s{_dafmrsResponseStatus = a});
gen/Network/AWS/CloudWatch/DisableAlarmActions.hs view
@@ -18,7 +18,9 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Disables actions for the specified alarms. When an alarm\'s actions are disabled the alarm\'s state may change, but none of the alarm\'s actions will execute.+-- Disables the actions for the specified alarms. When an alarm's actions are disabled, the alarm actions do not execute when the alarm state changes.+--+-- module Network.AWS.CloudWatch.DisableAlarmActions ( -- * Creating a Request@@ -39,9 +41,7 @@ import Network.AWS.Request import Network.AWS.Response --- |------ /See:/ 'disableAlarmActions' smart constructor.+-- | /See:/ 'disableAlarmActions' smart constructor. newtype DisableAlarmActions = DisableAlarmActions' { _daaAlarmNames :: [Text] } deriving (Eq,Read,Show,Data,Typeable,Generic)@@ -50,7 +50,7 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'daaAlarmNames'+-- * 'daaAlarmNames' - The names of the alarms. disableAlarmActions :: DisableAlarmActions disableAlarmActions =@@ -58,7 +58,7 @@ { _daaAlarmNames = mempty } --- | The names of the alarms to disable actions for.+-- | The names of the alarms. daaAlarmNames :: Lens' DisableAlarmActions [Text] daaAlarmNames = lens _daaAlarmNames (\ s a -> s{_daaAlarmNames = a}) . _Coerce;
gen/Network/AWS/CloudWatch/EnableAlarmActions.hs view
@@ -18,7 +18,9 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Enables actions for the specified alarms.+-- Enables the actions for the specified alarms.+--+-- module Network.AWS.CloudWatch.EnableAlarmActions ( -- * Creating a Request@@ -39,9 +41,7 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for EnableAlarmActions.------ /See:/ 'enableAlarmActions' smart constructor.+-- | /See:/ 'enableAlarmActions' smart constructor. newtype EnableAlarmActions = EnableAlarmActions' { _eaaAlarmNames :: [Text] } deriving (Eq,Read,Show,Data,Typeable,Generic)@@ -50,7 +50,7 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'eaaAlarmNames'+-- * 'eaaAlarmNames' - The names of the alarms. enableAlarmActions :: EnableAlarmActions enableAlarmActions =@@ -58,7 +58,7 @@ { _eaaAlarmNames = mempty } --- | The names of the alarms to enable actions for.+-- | The names of the alarms. eaaAlarmNames :: Lens' EnableAlarmActions [Text] eaaAlarmNames = lens _eaaAlarmNames (\ s a -> s{_eaaAlarmNames = a}) . _Coerce;
gen/Network/AWS/CloudWatch/GetMetricStatistics.hs view
@@ -20,25 +20,33 @@ -- -- Gets statistics for the specified metric. ----- The maximum number of data points that can be queried is 50,850, whereas the maximum number of data points returned from a single 'GetMetricStatistics' request is 1,440. If you make a request that generates more than 1,440 data points, Amazon CloudWatch returns an error. In such a case, you can alter the request by narrowing the specified time range or increasing the specified period. A period can be as short as one minute (60 seconds) or as long as one day (86,400 seconds). Alternatively, you can make multiple requests across adjacent time ranges. 'GetMetricStatistics' does not return the data in chronological order. ----- Amazon CloudWatch aggregates data points based on the length of the 'period' that you specify. For example, if you request statistics with a one-minute granularity, Amazon CloudWatch aggregates data points with time stamps that fall within the same one-minute period. In such a case, the data points queried can greatly outnumber the data points returned.+-- Amazon CloudWatch retains metric data as follows: ----- The following examples show various statistics allowed by the data point query maximum of 50,850 when you call 'GetMetricStatistics' on Amazon EC2 instances with detailed (one-minute) monitoring enabled:+-- * Data points with a period of 60 seconds (1 minute) are available for 15 days ----- - Statistics for up to 400 instances for a span of one hour+-- * Data points with a period of 300 seconds (5 minute) are available for 63 days ----- - Statistics for up to 35 instances over a span of 24 hours+-- * Data points with a period of 3600 seconds (1 hour) are available for 455 days (15 months) ----- - Statistics for up to 2 instances over a span of 2 weeks ----- For information about the namespace, metric names, and dimensions that other Amazon Web Services products use to send metrics to CloudWatch, go to <http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html Amazon CloudWatch Metrics, Namespaces, and Dimensions Reference> in the /Amazon CloudWatch Developer Guide/.+--+-- Note that CloudWatch started retaining 5-minute and 1-hour metric data as of 9 July 2016.+--+-- The maximum number of data points returned from a single call is 1,440. If you request more than 1,440 data points, Amazon CloudWatch returns an error. To reduce the number of data points, you can narrow the specified time range and make multiple requests across adjacent time ranges, or you can increase the specified period. A period can be as short as one minute (60 seconds). Note that data points are not returned in chronological order.+--+-- Amazon CloudWatch aggregates data points based on the length of the period that you specify. For example, if you request statistics with a one-hour period, Amazon CloudWatch aggregates all data points with time stamps that fall within each one-hour period. Therefore, the number of values aggregated by CloudWatch is larger than the number of data points returned.+--+-- For a list of metrics and dimensions supported by AWS services, see the <http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CW_Support_For_AWS.html Amazon CloudWatch Metrics and Dimensions Reference> in the /Amazon CloudWatch User Guide/ .+-- module Network.AWS.CloudWatch.GetMetricStatistics ( -- * Creating a Request getMetricStatistics , GetMetricStatistics -- * Request Lenses+ , gmsExtendedStatistics+ , gmsStatistics , gmsDimensions , gmsUnit , gmsNamespace@@ -46,7 +54,6 @@ , gmsStartTime , gmsEndTime , gmsPeriod- , gmsStatistics -- * Destructuring the Response , getMetricStatisticsResponse@@ -64,64 +71,73 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for GetMetricStatistics.------ /See:/ 'getMetricStatistics' smart constructor.+-- | /See:/ 'getMetricStatistics' smart constructor. data GetMetricStatistics = GetMetricStatistics'- { _gmsDimensions :: !(Maybe [Dimension])- , _gmsUnit :: !(Maybe StandardUnit)- , _gmsNamespace :: !Text- , _gmsMetricName :: !Text- , _gmsStartTime :: !ISO8601- , _gmsEndTime :: !ISO8601- , _gmsPeriod :: !Nat- , _gmsStatistics :: !(List1 Statistic)+ { _gmsExtendedStatistics :: !(Maybe (List1 Text))+ , _gmsStatistics :: !(Maybe (List1 Statistic))+ , _gmsDimensions :: !(Maybe [Dimension])+ , _gmsUnit :: !(Maybe StandardUnit)+ , _gmsNamespace :: !Text+ , _gmsMetricName :: !Text+ , _gmsStartTime :: !ISO8601+ , _gmsEndTime :: !ISO8601+ , _gmsPeriod :: !Nat } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'GetMetricStatistics' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'gmsDimensions'+-- * 'gmsExtendedStatistics' - The percentile statistics. Specify values between p0.0 and p100. ----- * 'gmsUnit'+-- * 'gmsStatistics' - The metric statistics, other than percentile. For percentile statistics, use @ExtendedStatistic@ . ----- * 'gmsNamespace'+-- * 'gmsDimensions' - The dimensions. CloudWatch treats each unique combination of dimensions as a separate metric. You can't retrieve statistics using combinations of dimensions that were not specially published. 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/ . ----- * 'gmsMetricName'+-- * '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. ----- * 'gmsStartTime'+-- * 'gmsNamespace' - The namespace of the metric, with or without spaces. ----- * 'gmsEndTime'+-- * 'gmsMetricName' - The name of the metric, with or without spaces. ----- * 'gmsPeriod'+-- * 'gmsStartTime' - The time stamp that determines the first data point to return. Note that 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. ----- * 'gmsStatistics'+-- * 'gmsEndTime' - The time stamp that determines the last data point to return. The value specified is exclusive; results will 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).+--+-- * 'gmsPeriod' - The granularity, in seconds, of the returned data points. A period can be as short as one minute (60 seconds) and must be a multiple of 60. The default value is 60. If the @StartTime@ parameter specifies a time stamp that is greater than 15 days ago, you must specify the period as follows or no data points in that time range is returned: * 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). getMetricStatistics :: Text -- ^ 'gmsNamespace' -> Text -- ^ 'gmsMetricName' -> UTCTime -- ^ 'gmsStartTime' -> UTCTime -- ^ 'gmsEndTime' -> Natural -- ^ 'gmsPeriod'- -> NonEmpty Statistic -- ^ 'gmsStatistics' -> GetMetricStatistics-getMetricStatistics pNamespace_ pMetricName_ pStartTime_ pEndTime_ pPeriod_ pStatistics_ =+getMetricStatistics pNamespace_ pMetricName_ pStartTime_ pEndTime_ pPeriod_ = GetMetricStatistics'- { _gmsDimensions = Nothing+ { _gmsExtendedStatistics = Nothing+ , _gmsStatistics = Nothing+ , _gmsDimensions = Nothing , _gmsUnit = Nothing , _gmsNamespace = pNamespace_ , _gmsMetricName = pMetricName_ , _gmsStartTime = _Time # pStartTime_ , _gmsEndTime = _Time # pEndTime_ , _gmsPeriod = _Nat # pPeriod_- , _gmsStatistics = _List1 # pStatistics_ } --- | A list of dimensions describing qualities of the metric.+-- | The percentile statistics. Specify values between p0.0 and p100.+gmsExtendedStatistics :: Lens' GetMetricStatistics (Maybe (NonEmpty Text))+gmsExtendedStatistics = lens _gmsExtendedStatistics (\ s a -> s{_gmsExtendedStatistics = a}) . mapping _List1;++-- | The metric statistics, other than percentile. For percentile statistics, use @ExtendedStatistic@ .+gmsStatistics :: Lens' GetMetricStatistics (Maybe (NonEmpty Statistic))+gmsStatistics = lens _gmsStatistics (\ s a -> s{_gmsStatistics = a}) . mapping _List1;++-- | The dimensions. CloudWatch treats each unique combination of dimensions as a separate metric. You can't retrieve statistics using combinations of dimensions that were not specially published. 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/ . gmsDimensions :: Lens' GetMetricStatistics [Dimension] gmsDimensions = lens _gmsDimensions (\ s a -> s{_gmsDimensions = a}) . _Default . _Coerce; --- | The specific 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 will have 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 the metric only ever reports one unit, specifying a unit has no effect. gmsUnit :: Lens' GetMetricStatistics (Maybe StandardUnit) gmsUnit = lens _gmsUnit (\ s a -> s{_gmsUnit = a}); @@ -133,26 +149,18 @@ gmsMetricName :: Lens' GetMetricStatistics Text gmsMetricName = lens _gmsMetricName (\ s a -> s{_gmsMetricName = a}); --- | The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).------ The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks.------ Data that is timestamped 24 hours or more in the past may take in excess of 48 hours to become available from submission time using 'GetMetricStatistics'.+-- | The time stamp that determines the first data point to return. Note that 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. gmsStartTime :: Lens' GetMetricStatistics UTCTime gmsStartTime = lens _gmsStartTime (\ s a -> s{_gmsStartTime = a}) . _Time; --- | The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).+-- | The time stamp that determines the last data point to return. The value specified is exclusive; results will 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; --- | The granularity, in seconds, of the returned datapoints. A 'Period' can be as short as one minute (60 seconds) or as long as one day (86,400 seconds), and must be a multiple of 60. The default value is 60.+-- | The granularity, in seconds, of the returned data points. A period can be as short as one minute (60 seconds) and must be a multiple of 60. The default value is 60. If the @StartTime@ parameter specifies a time stamp that is greater than 15 days ago, you must specify the period as follows or no data points in that time range is returned: * 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; --- | The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Statistic Statistics> in the /Amazon CloudWatch Developer Guide/.-gmsStatistics :: Lens' GetMetricStatistics (NonEmpty Statistic)-gmsStatistics = lens _gmsStatistics (\ s a -> s{_gmsStatistics = a}) . _List1;- instance AWSRequest GetMetricStatistics where type Rs GetMetricStatistics = GetMetricStatisticsResponse@@ -181,17 +189,19 @@ = mconcat ["Action" =: ("GetMetricStatistics" :: ByteString), "Version" =: ("2010-08-01" :: ByteString),+ "ExtendedStatistics" =:+ toQuery+ (toQueryList "member" <$> _gmsExtendedStatistics),+ "Statistics" =:+ toQuery (toQueryList "member" <$> _gmsStatistics), "Dimensions" =: toQuery (toQueryList "member" <$> _gmsDimensions), "Unit" =: _gmsUnit, "Namespace" =: _gmsNamespace, "MetricName" =: _gmsMetricName, "StartTime" =: _gmsStartTime,- "EndTime" =: _gmsEndTime, "Period" =: _gmsPeriod,- "Statistics" =: toQueryList "member" _gmsStatistics]+ "EndTime" =: _gmsEndTime, "Period" =: _gmsPeriod] --- | The output for < GetMetricStatistics>.------ /See:/ 'getMetricStatisticsResponse' smart constructor.+-- | /See:/ 'getMetricStatisticsResponse' smart constructor. data GetMetricStatisticsResponse = GetMetricStatisticsResponse' { _gmsrsDatapoints :: !(Maybe [Datapoint]) , _gmsrsLabel :: !(Maybe Text)@@ -202,11 +212,11 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'gmsrsDatapoints'+-- * 'gmsrsDatapoints' - The data points for the specified metric. ----- * 'gmsrsLabel'+-- * 'gmsrsLabel' - A label for the specified metric. ----- * 'gmsrsResponseStatus'+-- * 'gmsrsResponseStatus' - -- | The response status code. getMetricStatisticsResponse :: Int -- ^ 'gmsrsResponseStatus' -> GetMetricStatisticsResponse@@ -217,15 +227,15 @@ , _gmsrsResponseStatus = pResponseStatus_ } --- | The datapoints for the specified metric.+-- | The data points for the specified metric. gmsrsDatapoints :: Lens' GetMetricStatisticsResponse [Datapoint] gmsrsDatapoints = lens _gmsrsDatapoints (\ s a -> s{_gmsrsDatapoints = a}) . _Default . _Coerce; --- | A label describing the specified metric.+-- | A label for the specified metric. gmsrsLabel :: Lens' GetMetricStatisticsResponse (Maybe Text) gmsrsLabel = lens _gmsrsLabel (\ s a -> s{_gmsrsLabel = a}); --- | The response status code.+-- | -- | The response status code. gmsrsResponseStatus :: Lens' GetMetricStatisticsResponse Int gmsrsResponseStatus = lens _gmsrsResponseStatus (\ s a -> s{_gmsrsResponseStatus = a});
gen/Network/AWS/CloudWatch/ListMetrics.hs view
@@ -18,12 +18,14 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Returns a list of valid metrics stored for the AWS account owner. Returned metrics can be used with < GetMetricStatistics> to obtain statistical data for a given metric.+-- List the specified metrics. You can use the returned metrics with 'GetMetricStatistics' to obtain statistical data. ----- Up to 500 results are returned for any one call. To retrieve further results, use returned 'NextToken' values with subsequent 'ListMetrics' operations. ----- If you create a metric with < PutMetricData>, allow up to fifteen minutes for the metric to appear in calls to 'ListMetrics'. Statistics about the metric, however, are available sooner using < GetMetricStatistics>.+-- Up to 500 results are returned for any one call. To retrieve additional results, use the returned token with subsequent calls. --+-- After you create a metric, allow up to fifteen minutes before the metric appears. Statistics about the metric, however, are available sooner using 'GetMetricStatistics' .+--+-- -- This operation returns paginated results. module Network.AWS.CloudWatch.ListMetrics (@@ -53,9 +55,7 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for ListMetrics.------ /See:/ 'listMetrics' smart constructor.+-- | /See:/ 'listMetrics' smart constructor. data ListMetrics = ListMetrics' { _lmMetricName :: !(Maybe Text) , _lmNamespace :: !(Maybe Text)@@ -67,13 +67,13 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'lmMetricName'+-- * 'lmMetricName' - The name of the metric to filter against. ----- * 'lmNamespace'+-- * 'lmNamespace' - The namespace to filter against. ----- * 'lmNextToken'+-- * 'lmNextToken' - The token returned by a previous call to indicate that there is more data available. ----- * 'lmDimensions'+-- * 'lmDimensions' - The dimensions to filter against. listMetrics :: ListMetrics listMetrics =@@ -96,7 +96,7 @@ lmNextToken :: Lens' ListMetrics (Maybe Text) lmNextToken = lens _lmNextToken (\ s a -> s{_lmNextToken = a}); --- | A list of dimensions to filter against.+-- | The dimensions to filter against. lmDimensions :: Lens' ListMetrics [DimensionFilter] lmDimensions = lens _lmDimensions (\ s a -> s{_lmDimensions = a}) . _Default . _Coerce; @@ -140,9 +140,7 @@ "Dimensions" =: toQuery (toQueryList "member" <$> _lmDimensions)] --- | The output for < ListMetrics>.------ /See:/ 'listMetricsResponse' smart constructor.+-- | /See:/ 'listMetricsResponse' smart constructor. data ListMetricsResponse = ListMetricsResponse' { _lmrsMetrics :: !(Maybe [Metric]) , _lmrsNextToken :: !(Maybe Text)@@ -153,11 +151,11 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'lmrsMetrics'+-- * 'lmrsMetrics' - The metrics. ----- * 'lmrsNextToken'+-- * 'lmrsNextToken' - The token that marks the start of the next batch of returned results. ----- * 'lmrsResponseStatus'+-- * 'lmrsResponseStatus' - -- | The response status code. listMetricsResponse :: Int -- ^ 'lmrsResponseStatus' -> ListMetricsResponse@@ -168,15 +166,15 @@ , _lmrsResponseStatus = pResponseStatus_ } --- | A list of metrics used to generate statistics for an AWS account.+-- | The metrics. lmrsMetrics :: Lens' ListMetricsResponse [Metric] lmrsMetrics = lens _lmrsMetrics (\ s a -> s{_lmrsMetrics = a}) . _Default . _Coerce; --- | A string that marks the start of the next batch of returned results.+-- | 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}); --- | The response status code.+-- | -- | The response status code. lmrsResponseStatus :: Lens' ListMetricsResponse Int lmrsResponseStatus = lens _lmrsResponseStatus (\ s a -> s{_lmrsResponseStatus = a});
gen/Network/AWS/CloudWatch/PutMetricAlarm.hs view
@@ -18,27 +18,33 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate one or more Amazon SNS resources with the alarm.+-- Creates or updates an alarm and associates it with the specified metric. Optionally, this operation can associate one or more Amazon SNS resources with the alarm. ----- When this operation creates an alarm, the alarm state is immediately set to 'INSUFFICIENT_DATA'. The alarm is evaluated and its 'StateValue' is set appropriately. Any actions associated with the 'StateValue' are then executed. ----- When updating an existing alarm, its 'StateValue' is left unchanged, but it completely overwrites the alarm\'s previous configuration.+-- When this operation creates an alarm, the alarm state is immediately set to @INSUFFICIENT_DATA@ . The alarm is evaluated and its state is set appropriately. Any actions associated with the state are then executed. ----- If you are using an AWS Identity and Access Management (IAM) account to create or modify an alarm, you must have the following Amazon EC2 permissions:+-- When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm. ----- - 'ec2:DescribeInstanceStatus' and 'ec2:DescribeInstances' for all alarms on Amazon EC2 instance status metrics.+-- If you are an AWS Identity and Access Management (IAM) user, you must have Amazon EC2 permissions for some operations: ----- - 'ec2:StopInstances' for alarms with stop actions.+-- * @ec2:DescribeInstanceStatus@ and @ec2:DescribeInstances@ for all alarms on EC2 instance status metrics ----- - 'ec2:TerminateInstances' for alarms with terminate actions.+-- * @ec2:StopInstances@ for alarms with stop actions ----- - 'ec2:DescribeInstanceRecoveryAttribute', and 'ec2:RecoverInstances' for alarms with recover actions.+-- * @ec2:TerminateInstances@ for alarms with terminate actions ----- If you have read\/write permissions for Amazon CloudWatch but not for Amazon EC2, you can still create an alarm but the stop or terminate actions won\'t be performed on the Amazon EC2 instance. However, if you are later granted permission to use the associated Amazon EC2 APIs, the alarm actions you created earlier will be performed. For more information about IAM permissions, see <http://docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.html Permissions and Policies> in /Using IAM/.+-- * @ec2:DescribeInstanceRecoveryAttribute@ and @ec2:RecoverInstances@ for alarms with recover actions ----- If you are using an IAM role (e.g., an Amazon EC2 instance profile), you cannot stop or terminate the instance using alarm actions. However, you can still see the alarm state and perform any other actions such as Amazon SNS notifications or Auto Scaling policies. --+--+-- If you have read/write permissions for Amazon CloudWatch but not for Amazon EC2, you can still create an alarm, but the stop or terminate actions won't be performed. However, if you are later granted the required permissions, the alarm actions that you created earlier will be performed.+--+-- If you are using an IAM role (for example, an Amazon EC2 instance profile), you cannot stop or terminate the instance using alarm actions. However, you can still see the alarm state and perform any other actions such as Amazon SNS notifications or Auto Scaling policies.+-- -- If you are using temporary security credentials granted using the AWS Security Token Service (AWS STS), you cannot stop or terminate an Amazon EC2 instance using alarm actions.+--+-- Note that you must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the __EC2ActionsAccess__ IAM role. After this IAM role is created, you can create stop, terminate, or reboot alarms using a command-line interface or an API.+-- module Network.AWS.CloudWatch.PutMetricAlarm ( -- * Creating a Request@@ -52,10 +58,11 @@ , pmaDimensions , pmaAlarmActions , pmaUnit+ , pmaStatistic+ , pmaExtendedStatistic , pmaAlarmName , pmaMetricName , pmaNamespace- , pmaStatistic , pmaPeriod , pmaEvaluationPeriods , pmaThreshold@@ -73,9 +80,7 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for PutMetricAlarm.------ /See:/ 'putMetricAlarm' smart constructor.+-- | /See:/ 'putMetricAlarm' smart constructor. data PutMetricAlarm = PutMetricAlarm' { _pmaAlarmDescription :: !(Maybe Text) , _pmaOKActions :: !(Maybe [Text])@@ -84,10 +89,11 @@ , _pmaDimensions :: !(Maybe [Dimension]) , _pmaAlarmActions :: !(Maybe [Text]) , _pmaUnit :: !(Maybe StandardUnit)+ , _pmaStatistic :: !(Maybe Statistic)+ , _pmaExtendedStatistic :: !(Maybe Text) , _pmaAlarmName :: !Text , _pmaMetricName :: !Text , _pmaNamespace :: !Text- , _pmaStatistic :: !Statistic , _pmaPeriod :: !Nat , _pmaEvaluationPeriods :: !Nat , _pmaThreshold :: !Double@@ -98,46 +104,47 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'pmaAlarmDescription'+-- * 'pmaAlarmDescription' - The description for the alarm. ----- * 'pmaOKActions'+-- * '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 ----- * 'pmaActionsEnabled'+-- * 'pmaActionsEnabled' - Indicates whether actions should be executed during any changes to the alarm state. ----- * 'pmaInsufficientDataActions'+-- * '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 ----- * 'pmaDimensions'+-- * 'pmaDimensions' - The dimensions for the metric associated with the alarm. ----- * 'pmaAlarmActions'+-- * '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 ----- * 'pmaUnit'+-- * '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 Amazon CloudWatch alarm can get stuck in the @INSUFFICIENT DATA@ state. ----- * 'pmaAlarmName'+-- * 'pmaStatistic' - The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use @ExtendedStatistic@ . ----- * 'pmaMetricName'+-- * 'pmaExtendedStatistic' - The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. ----- * 'pmaNamespace'+-- * 'pmaAlarmName' - The name for the alarm. This name must be unique within the AWS account. ----- * 'pmaStatistic'+-- * 'pmaMetricName' - The name for the metric associated with the alarm. ----- * 'pmaPeriod'+-- * 'pmaNamespace' - The namespace for the metric associated with the alarm. ----- * 'pmaEvaluationPeriods'+-- * 'pmaPeriod' - The period, in seconds, over which the specified statistic is applied. ----- * 'pmaThreshold'+-- * 'pmaEvaluationPeriods' - The number of periods over which data is compared to the specified threshold. ----- * 'pmaComparisonOperator'+-- * 'pmaThreshold' - The value against which the specified statistic is compared.+--+-- * 'pmaComparisonOperator' - The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand. putMetricAlarm :: Text -- ^ 'pmaAlarmName' -> Text -- ^ 'pmaMetricName' -> Text -- ^ 'pmaNamespace'- -> Statistic -- ^ 'pmaStatistic' -> Natural -- ^ 'pmaPeriod' -> Natural -- ^ 'pmaEvaluationPeriods' -> Double -- ^ 'pmaThreshold' -> ComparisonOperator -- ^ 'pmaComparisonOperator' -> PutMetricAlarm-putMetricAlarm pAlarmName_ pMetricName_ pNamespace_ pStatistic_ pPeriod_ pEvaluationPeriods_ pThreshold_ pComparisonOperator_ =+putMetricAlarm pAlarmName_ pMetricName_ pNamespace_ pPeriod_ pEvaluationPeriods_ pThreshold_ pComparisonOperator_ = PutMetricAlarm' { _pmaAlarmDescription = Nothing , _pmaOKActions = Nothing@@ -146,10 +153,11 @@ , _pmaDimensions = Nothing , _pmaAlarmActions = Nothing , _pmaUnit = Nothing+ , _pmaStatistic = Nothing+ , _pmaExtendedStatistic = Nothing , _pmaAlarmName = pAlarmName_ , _pmaMetricName = pMetricName_ , _pmaNamespace = pNamespace_- , _pmaStatistic = pStatistic_ , _pmaPeriod = _Nat # pPeriod_ , _pmaEvaluationPeriods = _Nat # pEvaluationPeriods_ , _pmaThreshold = pThreshold_@@ -160,67 +168,51 @@ pmaAlarmDescription :: Lens' PutMetricAlarm (Maybe Text) pmaAlarmDescription = lens _pmaAlarmDescription (\ s a -> s{_pmaAlarmDescription = a}); --- | The list of actions to execute when this alarm transitions into an 'OK' state from any other state. Each action is specified as an Amazon Resource Name (ARN).------ Valid Values: arn:aws:automate:/region (e.g., us-east-1)/:ec2:stop | arn:aws:automate:/region (e.g., us-east-1)/:ec2:terminate | arn:aws:automate:/region (e.g., us-east-1)/: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------ __Note:__ You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the __EC2ActionsAccess__ IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.+-- | 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 :: Lens' PutMetricAlarm [Text] pmaOKActions = lens _pmaOKActions (\ s a -> s{_pmaOKActions = a}) . _Default . _Coerce; --- | Indicates whether or not actions should be executed during any changes to the alarm\'s state.+-- | 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}); --- | The list of actions to execute when this alarm transitions into an 'INSUFFICIENT_DATA' state from any other state. Each action is specified as an Amazon Resource Name (ARN).------ Valid Values: arn:aws:automate:/region (e.g., us-east-1)/:ec2:stop | arn:aws:automate:/region (e.g., us-east-1)/:ec2:terminate | arn:aws:automate:/region (e.g., us-east-1)/: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------ __Note:__ You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the __EC2ActionsAccess__ IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.+-- | 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 :: Lens' PutMetricAlarm [Text] pmaInsufficientDataActions = lens _pmaInsufficientDataActions (\ s a -> s{_pmaInsufficientDataActions = a}) . _Default . _Coerce; --- | The dimensions for the alarm\'s associated metric.+-- | The dimensions for the metric associated with the alarm. pmaDimensions :: Lens' PutMetricAlarm [Dimension] pmaDimensions = lens _pmaDimensions (\ s a -> s{_pmaDimensions = a}) . _Default . _Coerce; --- | The list of actions to execute when this alarm transitions into an 'ALARM' state from any other state. Each action is specified as an Amazon Resource Name (ARN).------ Valid Values: arn:aws:automate:/region (e.g., us-east-1)/:ec2:stop | arn:aws:automate:/region (e.g., us-east-1)/:ec2:terminate | arn:aws:automate:/region (e.g., us-east-1)/: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------ __Note:__ You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the __EC2ActionsAccess__ IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.+-- | 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 :: Lens' PutMetricAlarm [Text] pmaAlarmActions = lens _pmaAlarmActions (\ s a -> s{_pmaAlarmActions = a}) . _Default . _Coerce; --- | The statistic\'s unit of measure. 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.------ __Note:__ If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.+-- | 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 Amazon CloudWatch alarm can get stuck in the @INSUFFICIENT DATA@ state. pmaUnit :: Lens' PutMetricAlarm (Maybe StandardUnit) pmaUnit = lens _pmaUnit (\ s a -> s{_pmaUnit = a}); --- | The descriptive name for the alarm. This name must be unique within the user\'s AWS account+-- | The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use @ExtendedStatistic@ .+pmaStatistic :: Lens' PutMetricAlarm (Maybe Statistic)+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.+pmaExtendedStatistic :: Lens' PutMetricAlarm (Maybe Text)+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}); --- | The name for the alarm\'s associated metric.+-- | The name for the metric associated with the alarm. pmaMetricName :: Lens' PutMetricAlarm Text pmaMetricName = lens _pmaMetricName (\ s a -> s{_pmaMetricName = a}); --- | The namespace for the alarm\'s associated metric.+-- | The namespace for the metric associated with the alarm. pmaNamespace :: Lens' PutMetricAlarm Text pmaNamespace = lens _pmaNamespace (\ s a -> s{_pmaNamespace = a}); --- | The statistic to apply to the alarm\'s associated metric.-pmaStatistic :: Lens' PutMetricAlarm Statistic-pmaStatistic = lens _pmaStatistic (\ s a -> s{_pmaStatistic = a});---- | The period in seconds over which the specified statistic is applied.+-- | The period, in seconds, over which the specified statistic is applied. pmaPeriod :: Lens' PutMetricAlarm Natural pmaPeriod = lens _pmaPeriod (\ s a -> s{_pmaPeriod = a}) . _Nat; @@ -232,7 +224,7 @@ pmaThreshold :: Lens' PutMetricAlarm Double 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.+-- | 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}); @@ -268,10 +260,11 @@ toQuery (toQueryList "member" <$> _pmaDimensions), "AlarmActions" =: toQuery (toQueryList "member" <$> _pmaAlarmActions),- "Unit" =: _pmaUnit, "AlarmName" =: _pmaAlarmName,+ "Unit" =: _pmaUnit, "Statistic" =: _pmaStatistic,+ "ExtendedStatistic" =: _pmaExtendedStatistic,+ "AlarmName" =: _pmaAlarmName, "MetricName" =: _pmaMetricName,- "Namespace" =: _pmaNamespace,- "Statistic" =: _pmaStatistic, "Period" =: _pmaPeriod,+ "Namespace" =: _pmaNamespace, "Period" =: _pmaPeriod, "EvaluationPeriods" =: _pmaEvaluationPeriods, "Threshold" =: _pmaThreshold, "ComparisonOperator" =: _pmaComparisonOperator]
gen/Network/AWS/CloudWatch/PutMetricData.hs view
@@ -18,13 +18,15 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Publishes metric data points to Amazon CloudWatch. Amazon CloudWatch associates the data points with the specified metric. If the specified metric does not exist, Amazon CloudWatch creates the metric. When Amazon CloudWatch creates a metric, it can take up to fifteen minutes for the metric to appear in calls to < ListMetrics>.+-- Publishes metric data points to Amazon CloudWatch. Amazon CloudWatch associates the data points with the specified metric. If the specified metric does not exist, Amazon CloudWatch creates the metric. When Amazon CloudWatch creates a metric, it can take up to fifteen minutes for the metric to appear in calls to 'ListMetrics' . ----- Each 'PutMetricData' request is limited to 8 KB in size for HTTP GET requests and is limited to 40 KB in size for HTTP POST requests. ----- Although the 'Value' parameter accepts numbers of type 'Double', Amazon 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 (e.g., NaN, +Infinity, -Infinity) are not supported.+-- Each @PutMetricData@ request is limited to 8 KB in size for HTTP GET requests and is limited to 40 KB in size for HTTP POST requests. ----- Data that is timestamped 24 hours or more in the past may take in excess of 48 hours to become available from submission time using 'GetMetricStatistics'.+-- Although the @Value@ parameter accepts numbers of type @Double@ , Amazon 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 (e.g., NaN, +Infinity, -Infinity) are not supported.+--+-- Data points with time stamps from 24 hours ago or longer can take at least 48 hours to become available for 'GetMetricStatistics' from the time they are submitted.+-- module Network.AWS.CloudWatch.PutMetricData ( -- * Creating a Request@@ -46,9 +48,7 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for PutMetricData.------ /See:/ 'putMetricData' smart constructor.+-- | /See:/ 'putMetricData' smart constructor. data PutMetricData = PutMetricData' { _pmdNamespace :: !Text , _pmdMetricData :: ![MetricDatum]@@ -58,9 +58,9 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'pmdNamespace'+-- * 'pmdNamespace' - 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. ----- * 'pmdMetricData'+-- * 'pmdMetricData' - The data for the metric. putMetricData :: Text -- ^ 'pmdNamespace' -> PutMetricData@@ -70,13 +70,11 @@ , _pmdMetricData = mempty } --- | The namespace for the metric data.------ You cannot specify a namespace that begins with \"AWS\/\". Namespaces that begin with \"AWS\/\" are reserved for other Amazon Web Services products that send metrics to Amazon CloudWatch.+-- | 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}); --- | A list of data describing the metric.+-- | The data for the metric. pmdMetricData :: Lens' PutMetricData [MetricDatum] pmdMetricData = lens _pmdMetricData (\ s a -> s{_pmdMetricData = a}) . _Coerce;
gen/Network/AWS/CloudWatch/SetAlarmState.hs view
@@ -18,7 +18,9 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Temporarily sets the state of an alarm for testing purposes. When the updated 'StateValue' differs from the previous value, the action configured for the appropriate state is invoked. For example, if your alarm is configured to send an Amazon SNS message when an alarm is triggered, temporarily changing the alarm\'s state to __ALARM__ sends an Amazon SNS message. The alarm returns to its actual state (often within seconds). Because the alarm state change happens very quickly, it is typically only visible in the alarm\'s __History__ tab in the Amazon CloudWatch console or through 'DescribeAlarmHistory'.+-- Temporarily sets the state of an alarm for testing purposes. When the updated state differs from the previous value, the action configured for the appropriate state is invoked. For example, if your alarm is configured to send an Amazon SNS message when an alarm is triggered, temporarily changing the alarm state to @ALARM@ sends an Amazon SNS message. The alarm returns to its actual state (often within seconds). Because the alarm state change happens very quickly, it is typically only visible in the alarm's __History__ tab in the Amazon CloudWatch console or through 'DescribeAlarmHistory' .+--+-- module Network.AWS.CloudWatch.SetAlarmState ( -- * Creating a Request@@ -42,9 +44,7 @@ import Network.AWS.Request import Network.AWS.Response --- | Describes the inputs for SetAlarmState.------ /See:/ 'setAlarmState' smart constructor.+-- | /See:/ 'setAlarmState' smart constructor. data SetAlarmState = SetAlarmState' { _sasStateReasonData :: !(Maybe Text) , _sasAlarmName :: !Text@@ -56,13 +56,13 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'sasStateReasonData'+-- * 'sasStateReasonData' - The reason that this alarm is set to this specific state, in JSON format. ----- * 'sasAlarmName'+-- * 'sasAlarmName' - The name for the alarm. This name must be unique within the AWS account. The maximum length is 255 characters. ----- * 'sasStateValue'+-- * 'sasStateValue' - The value of the state. ----- * 'sasStateReason'+-- * 'sasStateReason' - The reason that this alarm is set to this specific state, in text format. setAlarmState :: Text -- ^ 'sasAlarmName' -> StateValue -- ^ 'sasStateValue'@@ -76,11 +76,11 @@ , _sasStateReason = pStateReason_ } --- | The reason that this alarm is set to this specific state (in machine-readable JSON format)+-- | 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}); --- | The descriptive name for the alarm. This name must be unique within the user\'s AWS account. The maximum length is 255 characters.+-- | 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}); @@ -88,7 +88,7 @@ sasStateValue :: Lens' SetAlarmState StateValue sasStateValue = lens _sasStateValue (\ s a -> s{_sasStateValue = a}); --- | The reason that this alarm is set to this specific state (in human-readable text format)+-- | 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});
gen/Network/AWS/CloudWatch/Types.hs view
@@ -56,6 +56,7 @@ , dMaximum , dAverage , dMinimum+ , dExtendedStatistics , dSum , dUnit , dTimestamp@@ -103,6 +104,7 @@ , maAlarmActions , maUnit , maStatistic+ , maExtendedStatistic -- * MetricDatum , MetricDatum@@ -129,7 +131,7 @@ import Network.AWS.Prelude import Network.AWS.Sign.V4 --- | API version '2010-08-01' of the Amazon CloudWatch SDK configuration.+-- | API version @2010-08-01@ of the Amazon CloudWatch SDK configuration. cloudWatch :: Service cloudWatch = Service@@ -164,37 +166,53 @@ | otherwise = Nothing -- | The quota for alarms for this customer has already been reached.+--+-- _LimitExceededFault :: AsError a => Getting (First ServiceError) a ServiceError _LimitExceededFault = _ServiceError . hasStatus 400 . hasCode "LimitExceeded" -- | The next token specified is invalid.+--+-- _InvalidNextToken :: AsError a => Getting (First ServiceError) a ServiceError _InvalidNextToken = _ServiceError . hasStatus 400 . hasCode "InvalidNextToken" --- | Indicates that the request processing has failed due to some unknown error, exception, or failure.+-- | Request processing has failed due to some unknown error, exception, or failure.+--+-- _InternalServiceFault :: AsError a => Getting (First ServiceError) a ServiceError _InternalServiceFault = _ServiceError . hasStatus 500 . hasCode "InternalServiceError" --- | Bad or out-of-range value was supplied for the input parameter.+-- | The value of an input parameter is bad or out-of-range.+--+-- _InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidParameterValueException = _ServiceError . hasStatus 400 . hasCode "InvalidParameterValue" -- | Data was not syntactically valid JSON.+--+-- _InvalidFormatFault :: AsError a => Getting (First ServiceError) a ServiceError _InvalidFormatFault = _ServiceError . hasStatus 400 . hasCode "InvalidFormat" --- | An input parameter that is mandatory for processing the request is not supplied.+-- | An input parameter that is required is missing.+--+-- _MissingRequiredParameterException :: AsError a => Getting (First ServiceError) a ServiceError _MissingRequiredParameterException = _ServiceError . hasStatus 400 . hasCode "MissingParameter" --- | Parameters that must not be used together were used together.+-- | Parameters that cannot be used together were used together.+--+-- _InvalidParameterCombinationException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidParameterCombinationException = _ServiceError . hasStatus 400 . hasCode "InvalidParameterCombination" -- | The named resource does not exist.+--+-- _ResourceNotFound :: AsError a => Getting (First ServiceError) a ServiceError _ResourceNotFound = _ServiceError . hasStatus 404 . hasCode "ResourceNotFound"
gen/Network/AWS/CloudWatch/Types/Product.hs view
@@ -21,8 +21,10 @@ import Network.AWS.Lens import Network.AWS.Prelude --- | The 'AlarmHistoryItem' data type contains descriptive information about the history of a specific alarm. If you call < DescribeAlarmHistory>, Amazon CloudWatch returns this data type as part of the DescribeAlarmHistoryResult data type.+-- | Represents the history of a specific alarm. --+--+-- -- /See:/ 'alarmHistoryItem' smart constructor. data AlarmHistoryItem = AlarmHistoryItem' { _ahiAlarmName :: !(Maybe Text)@@ -36,15 +38,15 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'ahiAlarmName'+-- * 'ahiAlarmName' - The descriptive name for the alarm. ----- * 'ahiHistoryItemType'+-- * 'ahiHistoryItemType' - The type of alarm history item. ----- * 'ahiHistoryData'+-- * 'ahiHistoryData' - Data about the alarm, in JSON format. ----- * 'ahiHistorySummary'+-- * 'ahiHistorySummary' - A summary of the alarm history, in text format. ----- * 'ahiTimestamp'+-- * 'ahiTimestamp' - The time stamp for the alarm history item. alarmHistoryItem :: AlarmHistoryItem alarmHistoryItem =@@ -64,11 +66,11 @@ ahiHistoryItemType :: Lens' AlarmHistoryItem (Maybe HistoryItemType) ahiHistoryItemType = lens _ahiHistoryItemType (\ s a -> s{_ahiHistoryItemType = a}); --- | Machine-readable data about the alarm in JSON format.+-- | Data about the alarm, in JSON format. ahiHistoryData :: Lens' AlarmHistoryItem (Maybe Text) ahiHistoryData = lens _ahiHistoryData (\ s a -> s{_ahiHistoryData = a}); --- | A human-readable summary of the alarm history.+-- | A summary of the alarm history, in text format. ahiHistorySummary :: Lens' AlarmHistoryItem (Maybe Text) ahiHistorySummary = lens _ahiHistorySummary (\ s a -> s{_ahiHistorySummary = a}); @@ -88,36 +90,41 @@ instance NFData AlarmHistoryItem --- | The 'Datapoint' data type encapsulates the statistical data that Amazon CloudWatch computes from metric data.+-- | Encapsulates the statistical data that Amazon CloudWatch computes from metric data. --+--+-- -- /See:/ 'datapoint' smart constructor. data Datapoint = Datapoint'- { _dSampleCount :: !(Maybe Double)- , _dMaximum :: !(Maybe Double)- , _dAverage :: !(Maybe Double)- , _dMinimum :: !(Maybe Double)- , _dSum :: !(Maybe Double)- , _dUnit :: !(Maybe StandardUnit)- , _dTimestamp :: !(Maybe ISO8601)+ { _dSampleCount :: !(Maybe Double)+ , _dMaximum :: !(Maybe Double)+ , _dAverage :: !(Maybe Double)+ , _dMinimum :: !(Maybe Double)+ , _dExtendedStatistics :: !(Maybe (Map Text Double))+ , _dSum :: !(Maybe Double)+ , _dUnit :: !(Maybe StandardUnit)+ , _dTimestamp :: !(Maybe ISO8601) } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'Datapoint' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'dSampleCount'+-- * 'dSampleCount' - The number of metric values that contributed to the aggregate value of this data point. ----- * 'dMaximum'+-- * 'dMaximum' - The maximum metric value for the data point. ----- * 'dAverage'+-- * 'dAverage' - The average of the metric values that correspond to the data point. ----- * 'dMinimum'+-- * 'dMinimum' - The minimum metric value for the data point. ----- * 'dSum'+-- * 'dExtendedStatistics' - The percentile statistic for the data point. ----- * 'dUnit'+-- * 'dSum' - The sum of the metric values for the data point. ----- * 'dTimestamp'+-- * 'dUnit' - The standard unit for the data point.+--+-- * 'dTimestamp' - The time stamp used for the data point. datapoint :: Datapoint datapoint =@@ -126,36 +133,41 @@ , _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 datapoint.+-- | 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}); --- | The maximum of the metric value used for the datapoint.+-- | The maximum metric value for the data point. dMaximum :: Lens' Datapoint (Maybe Double) dMaximum = lens _dMaximum (\ s a -> s{_dMaximum = a}); --- | The average of metric values that correspond to the datapoint.+-- | 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}); --- | The minimum metric value used for the datapoint.+-- | The minimum metric value for the data point. dMinimum :: Lens' Datapoint (Maybe Double) dMinimum = lens _dMinimum (\ s a -> s{_dMinimum = a}); --- | The sum of metric values used for the datapoint.+-- | The percentile statistic for the data point.+dExtendedStatistics :: Lens' Datapoint (HashMap Text Double)+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}); --- | The standard unit used for the datapoint.+-- | The standard unit for the data point. dUnit :: Lens' Datapoint (Maybe StandardUnit) dUnit = lens _dUnit (\ s a -> s{_dUnit = a}); --- | The time stamp used for the datapoint.+-- | The time stamp used for the data point. dTimestamp :: Lens' Datapoint (Maybe UTCTime) dTimestamp = lens _dTimestamp (\ s a -> s{_dTimestamp = a}) . mapping _Time; @@ -165,6 +177,9 @@ (x .@? "SampleCount") <*> (x .@? "Maximum") <*> (x .@? "Average") <*> (x .@? "Minimum")+ <*>+ (x .@? "ExtendedStatistics" .!@ mempty >>=+ may (parseXMLMap "entry" "key" "value")) <*> (x .@? "Sum") <*> (x .@? "Unit") <*> (x .@? "Timestamp")@@ -173,10 +188,10 @@ instance NFData Datapoint --- | The 'Dimension' data type further expands on the identity of a metric using a Name, Value pair.+-- | Expands the identity of a metric. ----- For examples that use one or more dimensions, see < PutMetricData>. --+-- -- /See:/ 'dimension' smart constructor. data Dimension = Dimension' { _dName :: !Text@@ -187,9 +202,9 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'dName'+-- * 'dName' - The name of the dimension. ----- * 'dValue'+-- * 'dValue' - The value representing the dimension measurement. dimension :: Text -- ^ 'dName' -> Text -- ^ 'dValue'@@ -204,7 +219,7 @@ dName :: Lens' Dimension Text dName = lens _dName (\ s a -> s{_dName = a}); --- | The value representing the dimension measurement+-- | The value representing the dimension measurement. dValue :: Lens' Dimension Text dValue = lens _dValue (\ s a -> s{_dValue = a}); @@ -220,8 +235,10 @@ toQuery Dimension'{..} = mconcat ["Name" =: _dName, "Value" =: _dValue] --- | The 'DimensionFilter' data type is used to filter < ListMetrics> results.+-- | Represents filters for a dimension. --+--+-- -- /See:/ 'dimensionFilter' smart constructor. data DimensionFilter = DimensionFilter' { _dfValue :: !(Maybe Text)@@ -232,9 +249,9 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'dfValue'+-- * 'dfValue' - The value of the dimension to be matched. ----- * 'dfName'+-- * 'dfName' - The dimension name to be matched. dimensionFilter :: Text -- ^ 'dfName' -> DimensionFilter@@ -245,8 +262,6 @@ } -- | The value of the dimension to be matched.------ Specifying a 'Name' without specifying a 'Value' returns all values associated with that 'Name'. dfValue :: Lens' DimensionFilter (Maybe Text) dfValue = lens _dfValue (\ s a -> s{_dfValue = a}); @@ -262,10 +277,10 @@ toQuery DimensionFilter'{..} = mconcat ["Value" =: _dfValue, "Name" =: _dfName] --- | The 'Metric' data type contains information about a specific metric. If you call < ListMetrics>, Amazon CloudWatch returns information contained by this data type.+-- | Represents a specific metric. ----- The example in the Examples section publishes two metrics named buffers and latency. Both metrics are in the examples namespace. Both metrics have two dimensions, InstanceID and InstanceType. --+-- -- /See:/ 'metric' smart constructor. data Metric = Metric' { _mMetricName :: !(Maybe Text)@@ -277,11 +292,11 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'mMetricName'+-- * 'mMetricName' - The name of the metric. ----- * 'mNamespace'+-- * 'mNamespace' - The namespace of the metric. ----- * 'mDimensions'+-- * 'mDimensions' - The dimensions for the metric. metric :: Metric metric =@@ -299,7 +314,7 @@ mNamespace :: Lens' Metric (Maybe Text) mNamespace = lens _mNamespace (\ s a -> s{_mNamespace = a}); --- | A list of dimensions associated with the metric.+-- | The dimensions for the metric. mDimensions :: Lens' Metric [Dimension] mDimensions = lens _mDimensions (\ s a -> s{_mDimensions = a}) . _Default . _Coerce; @@ -314,8 +329,10 @@ instance NFData Metric --- | The < MetricAlarm> data type represents an alarm. You can use < PutMetricAlarm> to create or update an alarm.+-- | Represents an alarm. --+--+-- -- /See:/ 'metricAlarm' smart constructor. data MetricAlarm = MetricAlarm' { _maAlarmName :: !(Maybe Text)@@ -339,53 +356,56 @@ , _maAlarmActions :: !(Maybe [Text]) , _maUnit :: !(Maybe StandardUnit) , _maStatistic :: !(Maybe Statistic)+ , _maExtendedStatistic :: !(Maybe Text) } deriving (Eq,Read,Show,Data,Typeable,Generic) -- | Creates a value of 'MetricAlarm' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'maAlarmName'+-- * 'maAlarmName' - The name of the alarm. ----- * 'maStateUpdatedTimestamp'+-- * 'maStateUpdatedTimestamp' - The time stamp of the last update to the alarm state. ----- * 'maPeriod'+-- * 'maPeriod' - The period, in seconds, over which the statistic is applied. ----- * 'maAlarmDescription'+-- * 'maAlarmDescription' - The description of the alarm. ----- * 'maEvaluationPeriods'+-- * 'maEvaluationPeriods' - The number of periods over which data is compared to the specified threshold. ----- * 'maMetricName'+-- * 'maMetricName' - The name of the metric associated with the alarm. ----- * 'maNamespace'+-- * 'maNamespace' - The namespace of the metric associated with the alarm. ----- * 'maComparisonOperator'+-- * 'maComparisonOperator' - The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand. ----- * 'maOKActions'+-- * 'maOKActions' - 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). ----- * 'maStateValue'+-- * 'maStateValue' - The state value for the alarm. ----- * 'maThreshold'+-- * 'maThreshold' - The value to compare with the specified statistic. ----- * 'maAlarmConfigurationUpdatedTimestamp'+-- * 'maAlarmConfigurationUpdatedTimestamp' - The time stamp of the last update to the alarm configuration. ----- * 'maActionsEnabled'+-- * 'maActionsEnabled' - Indicates whether actions should be executed during any changes to the alarm state. ----- * 'maInsufficientDataActions'+-- * 'maInsufficientDataActions' - 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). ----- * 'maStateReason'+-- * 'maStateReason' - An explanation for the alarm state, in text format. ----- * 'maStateReasonData'+-- * 'maStateReasonData' - An explanation for the alarm state, in JSON format. ----- * 'maDimensions'+-- * 'maDimensions' - The dimensions for the metric associated with the alarm. ----- * 'maAlarmARN'+-- * 'maAlarmARN' - The Amazon Resource Name (ARN) of the alarm. ----- * 'maAlarmActions'+-- * 'maAlarmActions' - 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). ----- * 'maUnit'+-- * 'maUnit' - The unit of the metric associated with the alarm. ----- * 'maStatistic'+-- * 'maStatistic' - The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use @ExtendedStatistic@ .+--+-- * 'maExtendedStatistic' - The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. metricAlarm :: MetricAlarm metricAlarm =@@ -411,21 +431,22 @@ , _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}); --- | The time stamp of the last update to the alarm\'s state.+-- | 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; --- | The period in seconds over which the statistic is applied.+-- | The period, in seconds, over which the statistic is applied. maPeriod :: Lens' MetricAlarm (Maybe Natural) maPeriod = lens _maPeriod (\ s a -> s{_maPeriod = a}) . mapping _Nat; --- | The description for the alarm.+-- | The description of the alarm. maAlarmDescription :: Lens' MetricAlarm (Maybe Text) maAlarmDescription = lens _maAlarmDescription (\ s a -> s{_maAlarmDescription = a}); @@ -433,19 +454,19 @@ maEvaluationPeriods :: Lens' MetricAlarm (Maybe Natural) maEvaluationPeriods = lens _maEvaluationPeriods (\ s a -> s{_maEvaluationPeriods = a}) . mapping _Nat; --- | The name of the alarm\'s metric.+-- | The name of the metric associated with the alarm. maMetricName :: Lens' MetricAlarm (Maybe Text) maMetricName = lens _maMetricName (\ s a -> s{_maMetricName = a}); --- | The namespace of alarm\'s associated metric.+-- | The namespace of the metric associated with the alarm. maNamespace :: Lens' MetricAlarm (Maybe Text) maNamespace = lens _maNamespace (\ s a -> s{_maNamespace = a}); --- | The arithmetic operation to use when comparing the specified 'Statistic' and 'Threshold'. The specified 'Statistic' value is used as the first operand.+-- | The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand. maComparisonOperator :: Lens' MetricAlarm (Maybe ComparisonOperator) maComparisonOperator = lens _maComparisonOperator (\ s a -> s{_maComparisonOperator = a}); --- | The list of actions to execute when this alarm transitions into an 'OK' state from any other state. Each action is specified as an Amazon Resource Name (ARN).+-- | 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; @@ -453,7 +474,7 @@ maStateValue :: Lens' MetricAlarm (Maybe StateValue) maStateValue = lens _maStateValue (\ s a -> s{_maStateValue = a}); --- | The value against which the specified statistic is compared.+-- | The value to compare with the specified statistic. maThreshold :: Lens' MetricAlarm (Maybe Double) maThreshold = lens _maThreshold (\ s a -> s{_maThreshold = a}); @@ -461,25 +482,23 @@ maAlarmConfigurationUpdatedTimestamp :: Lens' MetricAlarm (Maybe UTCTime) maAlarmConfigurationUpdatedTimestamp = lens _maAlarmConfigurationUpdatedTimestamp (\ s a -> s{_maAlarmConfigurationUpdatedTimestamp = a}) . mapping _Time; --- | Indicates whether actions should be executed during any changes to the alarm\'s state.+-- | 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}); --- | The list of actions to execute when this alarm transitions into an 'INSUFFICIENT_DATA' state from any other state. Each action is specified as an Amazon Resource Name (ARN).------ The current WSDL lists this attribute as 'UnknownActions'.+-- | 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; --- | A human-readable explanation for the alarm\'s state.+-- | An explanation for the alarm state, in text format. maStateReason :: Lens' MetricAlarm (Maybe Text) maStateReason = lens _maStateReason (\ s a -> s{_maStateReason = a}); --- | An explanation for the alarm\'s state in machine-readable JSON format+-- | An explanation for the alarm state, in JSON format. maStateReasonData :: Lens' MetricAlarm (Maybe Text) maStateReasonData = lens _maStateReasonData (\ s a -> s{_maStateReasonData = a}); --- | The list of dimensions associated with the alarm\'s associated metric.+-- | The dimensions for the metric associated with the alarm. maDimensions :: Lens' MetricAlarm [Dimension] maDimensions = lens _maDimensions (\ s a -> s{_maDimensions = a}) . _Default . _Coerce; @@ -487,18 +506,22 @@ maAlarmARN :: Lens' MetricAlarm (Maybe Text) maAlarmARN = lens _maAlarmARN (\ s a -> s{_maAlarmARN = a}); --- | The list of actions to execute when this alarm transitions into an 'ALARM' state from any other state. Each action is specified as an Amazon Resource Name (ARN).+-- | 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; --- | The unit of the alarm\'s associated metric.+-- | The unit of the metric associated with the alarm. maUnit :: Lens' MetricAlarm (Maybe StandardUnit) maUnit = lens _maUnit (\ s a -> s{_maUnit = a}); --- | The statistic to apply to the alarm\'s associated metric.+-- | 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}); +-- | 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});+ instance FromXML MetricAlarm where parseXML x = MetricAlarm' <$>@@ -531,13 +554,16 @@ may (parseXMLList "member")) <*> (x .@? "Unit") <*> (x .@? "Statistic")+ <*> (x .@? "ExtendedStatistic") instance Hashable MetricAlarm instance NFData MetricAlarm --- | The 'MetricDatum' data type encapsulates the information sent with < PutMetricData> to either create a new metric or add new values to be aggregated into an existing metric.+-- | Encapsulates the information sent to either create a metric or add new values to be aggregated into an existing metric. --+--+-- -- /See:/ 'metricDatum' smart constructor. data MetricDatum = MetricDatum' { _mdValue :: !(Maybe Double)@@ -552,17 +578,17 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'mdValue'+-- * 'mdValue' - The value for the metric. Although the parameter accepts numbers of type Double, Amazon 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. ----- * 'mdDimensions'+-- * 'mdDimensions' - The dimensions associated with the metric. ----- * 'mdUnit'+-- * 'mdUnit' - The unit of the metric. ----- * 'mdTimestamp'+-- * 'mdTimestamp' - The time the metric data was received, expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC. ----- * 'mdStatisticValues'+-- * 'mdStatisticValues' - The statistical values for the metric. ----- * 'mdMetricName'+-- * 'mdMetricName' - The name of the metric. metricDatum :: Text -- ^ 'mdMetricName' -> MetricDatum@@ -576,13 +602,11 @@ , _mdMetricName = pMetricName_ } --- | The value for the metric.------ Although the 'Value' parameter accepts numbers of type 'Double', Amazon 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 (e.g., NaN, +Infinity, -Infinity) are not supported.+-- | The value for the metric. Although the parameter accepts numbers of type Double, Amazon 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}); --- | A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).+-- | The dimensions associated with the metric. mdDimensions :: Lens' MetricDatum [Dimension] mdDimensions = lens _mdDimensions (\ s a -> s{_mdDimensions = a}) . _Default . _Coerce; @@ -590,11 +614,11 @@ mdUnit :: Lens' MetricDatum (Maybe StandardUnit) mdUnit = lens _mdUnit (\ s a -> s{_mdUnit = a}); --- | The time stamp used for the metric in ISO 8601 Universal Coordinated Time (UTC) format. If not specified, the default value is set to the time the metric data was received.+-- | 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; --- | A set of statistical values describing the metric.+-- | The statistical values for the metric. mdStatisticValues :: Lens' MetricDatum (Maybe StatisticSet) mdStatisticValues = lens _mdStatisticValues (\ s a -> s{_mdStatisticValues = a}); @@ -616,8 +640,10 @@ "StatisticValues" =: _mdStatisticValues, "MetricName" =: _mdMetricName] --- | The 'StatisticSet' data type describes the 'StatisticValues' component of < MetricDatum>, and represents a set of statistics that describes a specific metric.+-- | Represents a set of statistics that describes a specific metric. --+--+-- -- /See:/ 'statisticSet' smart constructor. data StatisticSet = StatisticSet' { _ssSampleCount :: !Double@@ -630,13 +656,13 @@ -- -- Use one of the following lenses to modify other fields as desired: ----- * 'ssSampleCount'+-- * 'ssSampleCount' - The number of samples used for the statistic set. ----- * 'ssSum'+-- * 'ssSum' - The sum of values for the sample set. ----- * 'ssMinimum'+-- * 'ssMinimum' - The minimum value of the sample set. ----- * 'ssMaximum'+-- * 'ssMaximum' - The maximum value of the sample set. statisticSet :: Double -- ^ 'ssSampleCount' -> Double -- ^ 'ssSum'