summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendanHay <>2015-08-27 18:33:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2015-08-27 18:33:00 (GMT)
commitc858a0dd275b53c4ba6ea53c7cdad77134b7b647 (patch)
treee9802ae6c1d0087d0807cffa3d59ba0566c4ee98
parent360fa9dafb2bb0b462ca0a916049660eb96aabb4 (diff)
version 1.2.01.2.0
-rw-r--r--README.md2
-rw-r--r--amazonka-cloudwatch.cabal10
-rw-r--r--gen/Network/AWS/CloudWatch.hs4
-rw-r--r--gen/Network/AWS/CloudWatch/DeleteAlarms.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/DescribeAlarms.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/DisableAlarmActions.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/EnableAlarmActions.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/GetMetricStatistics.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/ListMetrics.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/PutMetricAlarm.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/PutMetricData.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/SetAlarmState.hs3
-rw-r--r--gen/Network/AWS/CloudWatch/Types.hs68
-rw-r--r--gen/Network/AWS/CloudWatch/Types/Product.hs1
-rw-r--r--test/Test/AWS/Gen/CloudWatch.hs11
17 files changed, 62 insertions, 67 deletions
diff --git a/README.md b/README.md
index 71a0314..6b0b17f 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
## Version
-`1.1.0`
+`1.2.0`
## Description
diff --git a/amazonka-cloudwatch.cabal b/amazonka-cloudwatch.cabal
index 83d02a5..9476de2 100644
--- a/amazonka-cloudwatch.cabal
+++ b/amazonka-cloudwatch.cabal
@@ -1,5 +1,5 @@
name: amazonka-cloudwatch
-version: 1.1.0
+version: 1.2.0
synopsis: Amazon CloudWatch SDK.
homepage: https://github.com/brendanhay/amazonka
license: OtherLicense
@@ -109,7 +109,7 @@ library
, Network.AWS.CloudWatch.Types.Sum
build-depends:
- amazonka-core == 1.1.0.*
+ amazonka-core == 1.2.0.*
, base >= 4.7 && < 5
test-suite amazonka-cloudwatch-test
@@ -128,9 +128,9 @@ test-suite amazonka-cloudwatch-test
, Test.AWS.CloudWatch.Internal
build-depends:
- amazonka-core == 1.1.0
- , amazonka-test == 1.1.0
- , amazonka-cloudwatch == 1.1.0
+ amazonka-core == 1.2.0
+ , amazonka-test == 1.2.0
+ , amazonka-cloudwatch == 1.2.0
, base
, bytestring
, lens
diff --git a/gen/Network/AWS/CloudWatch.hs b/gen/Network/AWS/CloudWatch.hs
index 757be3f..4f6b227 100644
--- a/gen/Network/AWS/CloudWatch.hs
+++ b/gen/Network/AWS/CloudWatch.hs
@@ -65,8 +65,8 @@
-- /See:/ <http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html AWS API Reference>
module Network.AWS.CloudWatch
(
- -- * Service
- CloudWatch
+ -- * Service Configuration
+ cloudWatch
-- * Errors
-- $errors
diff --git a/gen/Network/AWS/CloudWatch/DeleteAlarms.hs b/gen/Network/AWS/CloudWatch/DeleteAlarms.hs
index 10dc4f2..50be0a2 100644
--- a/gen/Network/AWS/CloudWatch/DeleteAlarms.hs
+++ b/gen/Network/AWS/CloudWatch/DeleteAlarms.hs
@@ -63,9 +63,8 @@ dAlarmNames :: Lens' DeleteAlarms [Text]
dAlarmNames = lens _dAlarmNames (\ s a -> s{_dAlarmNames = a}) . _Coerce;
instance AWSRequest DeleteAlarms where
- type Sv DeleteAlarms = CloudWatch
type Rs DeleteAlarms = DeleteAlarmsResponse
- request = postQuery
+ request = postQuery cloudWatch
response = receiveNull DeleteAlarmsResponse'
instance ToHeaders DeleteAlarms where
diff --git a/gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs b/gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs
index 294aee4..8aa706d 100644
--- a/gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs
+++ b/gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs
@@ -124,10 +124,9 @@ instance AWSPager DescribeAlarmHistory where
Just $ rq & dahNextToken .~ rs ^. dahrsNextToken
instance AWSRequest DescribeAlarmHistory where
- type Sv DescribeAlarmHistory = CloudWatch
type Rs DescribeAlarmHistory =
DescribeAlarmHistoryResponse
- request = postQuery
+ request = postQuery cloudWatch
response
= receiveXMLWrapper "DescribeAlarmHistoryResult"
(\ s h x ->
diff --git a/gen/Network/AWS/CloudWatch/DescribeAlarms.hs b/gen/Network/AWS/CloudWatch/DescribeAlarms.hs
index 1fc98f6..82934cf 100644
--- a/gen/Network/AWS/CloudWatch/DescribeAlarms.hs
+++ b/gen/Network/AWS/CloudWatch/DescribeAlarms.hs
@@ -126,9 +126,8 @@ instance AWSPager DescribeAlarms where
Just $ rq & daNextToken .~ rs ^. darsNextToken
instance AWSRequest DescribeAlarms where
- type Sv DescribeAlarms = CloudWatch
type Rs DescribeAlarms = DescribeAlarmsResponse
- request = postQuery
+ request = postQuery cloudWatch
response
= receiveXMLWrapper "DescribeAlarmsResult"
(\ s h x ->
diff --git a/gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs b/gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs
index a11d5fc..f48f7f4 100644
--- a/gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs
+++ b/gen/Network/AWS/CloudWatch/DescribeAlarmsForMetric.hs
@@ -113,10 +113,9 @@ dafmNamespace :: Lens' DescribeAlarmsForMetric Text
dafmNamespace = lens _dafmNamespace (\ s a -> s{_dafmNamespace = a});
instance AWSRequest DescribeAlarmsForMetric where
- type Sv DescribeAlarmsForMetric = CloudWatch
type Rs DescribeAlarmsForMetric =
DescribeAlarmsForMetricResponse
- request = postQuery
+ request = postQuery cloudWatch
response
= receiveXMLWrapper "DescribeAlarmsForMetricResult"
(\ s h x ->
diff --git a/gen/Network/AWS/CloudWatch/DisableAlarmActions.hs b/gen/Network/AWS/CloudWatch/DisableAlarmActions.hs
index 36580cc..60f9786 100644
--- a/gen/Network/AWS/CloudWatch/DisableAlarmActions.hs
+++ b/gen/Network/AWS/CloudWatch/DisableAlarmActions.hs
@@ -66,10 +66,9 @@ daaAlarmNames :: Lens' DisableAlarmActions [Text]
daaAlarmNames = lens _daaAlarmNames (\ s a -> s{_daaAlarmNames = a}) . _Coerce;
instance AWSRequest DisableAlarmActions where
- type Sv DisableAlarmActions = CloudWatch
type Rs DisableAlarmActions =
DisableAlarmActionsResponse
- request = postQuery
+ request = postQuery cloudWatch
response = receiveNull DisableAlarmActionsResponse'
instance ToHeaders DisableAlarmActions where
diff --git a/gen/Network/AWS/CloudWatch/EnableAlarmActions.hs b/gen/Network/AWS/CloudWatch/EnableAlarmActions.hs
index 513894b..ddca005 100644
--- a/gen/Network/AWS/CloudWatch/EnableAlarmActions.hs
+++ b/gen/Network/AWS/CloudWatch/EnableAlarmActions.hs
@@ -62,10 +62,9 @@ eaaAlarmNames :: Lens' EnableAlarmActions [Text]
eaaAlarmNames = lens _eaaAlarmNames (\ s a -> s{_eaaAlarmNames = a}) . _Coerce;
instance AWSRequest EnableAlarmActions where
- type Sv EnableAlarmActions = CloudWatch
type Rs EnableAlarmActions =
EnableAlarmActionsResponse
- request = postQuery
+ request = postQuery cloudWatch
response = receiveNull EnableAlarmActionsResponse'
instance ToHeaders EnableAlarmActions where
diff --git a/gen/Network/AWS/CloudWatch/GetMetricStatistics.hs b/gen/Network/AWS/CloudWatch/GetMetricStatistics.hs
index b9f2d65..7dc4ad2 100644
--- a/gen/Network/AWS/CloudWatch/GetMetricStatistics.hs
+++ b/gen/Network/AWS/CloudWatch/GetMetricStatistics.hs
@@ -174,10 +174,9 @@ gmsStatistics :: Lens' GetMetricStatistics (NonEmpty Statistic)
gmsStatistics = lens _gmsStatistics (\ s a -> s{_gmsStatistics = a}) . _List1;
instance AWSRequest GetMetricStatistics where
- type Sv GetMetricStatistics = CloudWatch
type Rs GetMetricStatistics =
GetMetricStatisticsResponse
- request = postQuery
+ request = postQuery cloudWatch
response
= receiveXMLWrapper "GetMetricStatisticsResult"
(\ s h x ->
diff --git a/gen/Network/AWS/CloudWatch/ListMetrics.hs b/gen/Network/AWS/CloudWatch/ListMetrics.hs
index 89fbda8..00e828d 100644
--- a/gen/Network/AWS/CloudWatch/ListMetrics.hs
+++ b/gen/Network/AWS/CloudWatch/ListMetrics.hs
@@ -106,9 +106,8 @@ instance AWSPager ListMetrics where
Just $ rq & lmNextToken .~ rs ^. lmrsNextToken
instance AWSRequest ListMetrics where
- type Sv ListMetrics = CloudWatch
type Rs ListMetrics = ListMetricsResponse
- request = postQuery
+ request = postQuery cloudWatch
response
= receiveXMLWrapper "ListMetricsResult"
(\ s h x ->
diff --git a/gen/Network/AWS/CloudWatch/PutMetricAlarm.hs b/gen/Network/AWS/CloudWatch/PutMetricAlarm.hs
index a82307c..4c9989e 100644
--- a/gen/Network/AWS/CloudWatch/PutMetricAlarm.hs
+++ b/gen/Network/AWS/CloudWatch/PutMetricAlarm.hs
@@ -217,9 +217,8 @@ pmaComparisonOperator :: Lens' PutMetricAlarm ComparisonOperator
pmaComparisonOperator = lens _pmaComparisonOperator (\ s a -> s{_pmaComparisonOperator = a});
instance AWSRequest PutMetricAlarm where
- type Sv PutMetricAlarm = CloudWatch
type Rs PutMetricAlarm = PutMetricAlarmResponse
- request = postQuery
+ request = postQuery cloudWatch
response = receiveNull PutMetricAlarmResponse'
instance ToHeaders PutMetricAlarm where
diff --git a/gen/Network/AWS/CloudWatch/PutMetricData.hs b/gen/Network/AWS/CloudWatch/PutMetricData.hs
index 2d667a6..6a00bde 100644
--- a/gen/Network/AWS/CloudWatch/PutMetricData.hs
+++ b/gen/Network/AWS/CloudWatch/PutMetricData.hs
@@ -89,9 +89,8 @@ pmdMetricData :: Lens' PutMetricData [MetricDatum]
pmdMetricData = lens _pmdMetricData (\ s a -> s{_pmdMetricData = a}) . _Coerce;
instance AWSRequest PutMetricData where
- type Sv PutMetricData = CloudWatch
type Rs PutMetricData = PutMetricDataResponse
- request = postQuery
+ request = postQuery cloudWatch
response = receiveNull PutMetricDataResponse'
instance ToHeaders PutMetricData where
diff --git a/gen/Network/AWS/CloudWatch/SetAlarmState.hs b/gen/Network/AWS/CloudWatch/SetAlarmState.hs
index 6dadc6b..abe5f16 100644
--- a/gen/Network/AWS/CloudWatch/SetAlarmState.hs
+++ b/gen/Network/AWS/CloudWatch/SetAlarmState.hs
@@ -99,9 +99,8 @@ sasStateReason :: Lens' SetAlarmState Text
sasStateReason = lens _sasStateReason (\ s a -> s{_sasStateReason = a});
instance AWSRequest SetAlarmState where
- type Sv SetAlarmState = CloudWatch
type Rs SetAlarmState = SetAlarmStateResponse
- request = postQuery
+ request = postQuery cloudWatch
response = receiveNull SetAlarmStateResponse'
instance ToHeaders SetAlarmState where
diff --git a/gen/Network/AWS/CloudWatch/Types.hs b/gen/Network/AWS/CloudWatch/Types.hs
index 2c99271..4a65ca2 100644
--- a/gen/Network/AWS/CloudWatch/Types.hs
+++ b/gen/Network/AWS/CloudWatch/Types.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE TypeFamilies #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
@@ -13,8 +12,8 @@
--
module Network.AWS.CloudWatch.Types
(
- -- * Service
- CloudWatch
+ -- * Service Configuration
+ cloudWatch
-- * Errors
, _LimitExceededFault
@@ -129,39 +128,36 @@ import Network.AWS.CloudWatch.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
--- | Version @2010-08-01@ of the Amazon CloudWatch SDK.
-data CloudWatch
-
-instance AWSService CloudWatch where
- type Sg CloudWatch = V4
- service = const svc
- where
- svc =
- Service
- { _svcAbbrev = "CloudWatch"
- , _svcPrefix = "monitoring"
- , _svcVersion = "2010-08-01"
- , _svcEndpoint = defaultEndpoint svc
- , _svcTimeout = Just 70
- , _svcStatus = statusSuccess
- , _svcError = parseXMLError
- , _svcRetry = retry
- }
- retry =
- Exponential
- { _retryBase = 5.0e-2
- , _retryGrowth = 2
- , _retryAttempts = 5
- , _retryCheck = check
- }
- check e
- | has (hasCode "ThrottlingException" . hasStatus 400) e =
- Just "throttling_exception"
- | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
- | has (hasStatus 503) e = Just "service_unavailable"
- | has (hasStatus 500) e = Just "general_server_error"
- | has (hasStatus 509) e = Just "limit_exceeded"
- | otherwise = Nothing
+-- | API version '2010-08-01' of the Amazon CloudWatch SDK configuration.
+cloudWatch :: Service
+cloudWatch =
+ Service
+ { _svcAbbrev = "CloudWatch"
+ , _svcSigner = v4
+ , _svcPrefix = "monitoring"
+ , _svcVersion = "2010-08-01"
+ , _svcEndpoint = defaultEndpoint cloudWatch
+ , _svcTimeout = Just 70
+ , _svcCheck = statusSuccess
+ , _svcError = parseXMLError
+ , _svcRetry = retry
+ }
+ where
+ retry =
+ Exponential
+ { _retryBase = 5.0e-2
+ , _retryGrowth = 2
+ , _retryAttempts = 5
+ , _retryCheck = check
+ }
+ check e
+ | has (hasCode "ThrottlingException" . hasStatus 400) e =
+ Just "throttling_exception"
+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
+ | has (hasStatus 503) e = Just "service_unavailable"
+ | has (hasStatus 500) e = Just "general_server_error"
+ | has (hasStatus 509) e = Just "limit_exceeded"
+ | otherwise = Nothing
-- | The quota for alarms for this customer has already been reached.
_LimitExceededFault :: AsError a => Getting (First ServiceError) a ServiceError
diff --git a/gen/Network/AWS/CloudWatch/Types/Product.hs b/gen/Network/AWS/CloudWatch/Types/Product.hs
index ac07307..3306e82 100644
--- a/gen/Network/AWS/CloudWatch/Types/Product.hs
+++ b/gen/Network/AWS/CloudWatch/Types/Product.hs
@@ -2,7 +2,6 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
diff --git a/test/Test/AWS/Gen/CloudWatch.hs b/test/Test/AWS/Gen/CloudWatch.hs
index a2576ff..fcbc8fc 100644
--- a/test/Test/AWS/Gen/CloudWatch.hs
+++ b/test/Test/AWS/Gen/CloudWatch.hs
@@ -163,64 +163,75 @@ testEnableAlarmActionsResponse :: EnableAlarmActionsResponse -> TestTree
testEnableAlarmActionsResponse = res
"EnableAlarmActionsResponse"
"fixture/EnableAlarmActionsResponse"
+ cloudWatch
(Proxy :: Proxy EnableAlarmActions)
testPutMetricDataResponse :: PutMetricDataResponse -> TestTree
testPutMetricDataResponse = res
"PutMetricDataResponse"
"fixture/PutMetricDataResponse"
+ cloudWatch
(Proxy :: Proxy PutMetricData)
testDescribeAlarmsResponse :: DescribeAlarmsResponse -> TestTree
testDescribeAlarmsResponse = res
"DescribeAlarmsResponse"
"fixture/DescribeAlarmsResponse"
+ cloudWatch
(Proxy :: Proxy DescribeAlarms)
testListMetricsResponse :: ListMetricsResponse -> TestTree
testListMetricsResponse = res
"ListMetricsResponse"
"fixture/ListMetricsResponse"
+ cloudWatch
(Proxy :: Proxy ListMetrics)
testDeleteAlarmsResponse :: DeleteAlarmsResponse -> TestTree
testDeleteAlarmsResponse = res
"DeleteAlarmsResponse"
"fixture/DeleteAlarmsResponse"
+ cloudWatch
(Proxy :: Proxy DeleteAlarms)
testDescribeAlarmHistoryResponse :: DescribeAlarmHistoryResponse -> TestTree
testDescribeAlarmHistoryResponse = res
"DescribeAlarmHistoryResponse"
"fixture/DescribeAlarmHistoryResponse"
+ cloudWatch
(Proxy :: Proxy DescribeAlarmHistory)
testGetMetricStatisticsResponse :: GetMetricStatisticsResponse -> TestTree
testGetMetricStatisticsResponse = res
"GetMetricStatisticsResponse"
"fixture/GetMetricStatisticsResponse"
+ cloudWatch
(Proxy :: Proxy GetMetricStatistics)
testDisableAlarmActionsResponse :: DisableAlarmActionsResponse -> TestTree
testDisableAlarmActionsResponse = res
"DisableAlarmActionsResponse"
"fixture/DisableAlarmActionsResponse"
+ cloudWatch
(Proxy :: Proxy DisableAlarmActions)
testDescribeAlarmsForMetricResponse :: DescribeAlarmsForMetricResponse -> TestTree
testDescribeAlarmsForMetricResponse = res
"DescribeAlarmsForMetricResponse"
"fixture/DescribeAlarmsForMetricResponse"
+ cloudWatch
(Proxy :: Proxy DescribeAlarmsForMetric)
testSetAlarmStateResponse :: SetAlarmStateResponse -> TestTree
testSetAlarmStateResponse = res
"SetAlarmStateResponse"
"fixture/SetAlarmStateResponse"
+ cloudWatch
(Proxy :: Proxy SetAlarmState)
testPutMetricAlarmResponse :: PutMetricAlarmResponse -> TestTree
testPutMetricAlarmResponse = res
"PutMetricAlarmResponse"
"fixture/PutMetricAlarmResponse"
+ cloudWatch
(Proxy :: Proxy PutMetricAlarm)