amazonka-cloudwatch-events 1.4.5 → 1.5.0
raw patch · 30 files changed
+1603/−733 lines, 30 filesdep ~amazonka-cloudwatch-eventsdep ~amazonka-coredep ~amazonka-testPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: amazonka-cloudwatch-events, amazonka-core, amazonka-test
API changes (from Hackage documentation)
+ Network.AWS.CloudWatchEvents: _PolicyLengthExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.CloudWatchEvents: data EcsParameters
+ Network.AWS.CloudWatchEvents: data InputTransformer
+ Network.AWS.CloudWatchEvents: data KinesisParameters
+ Network.AWS.CloudWatchEvents: data RunCommandParameters
+ Network.AWS.CloudWatchEvents: data RunCommandTarget
+ Network.AWS.CloudWatchEvents: ecsParameters :: Text -> EcsParameters
+ Network.AWS.CloudWatchEvents: epTaskCount :: Lens' EcsParameters (Maybe Natural)
+ Network.AWS.CloudWatchEvents: epTaskDefinitionARN :: Lens' EcsParameters Text
+ Network.AWS.CloudWatchEvents: inputTransformer :: Text -> InputTransformer
+ Network.AWS.CloudWatchEvents: itInputPathsMap :: Lens' InputTransformer (HashMap Text Text)
+ Network.AWS.CloudWatchEvents: itInputTemplate :: Lens' InputTransformer Text
+ Network.AWS.CloudWatchEvents: kinesisParameters :: Text -> KinesisParameters
+ Network.AWS.CloudWatchEvents: kpPartitionKeyPath :: Lens' KinesisParameters Text
+ Network.AWS.CloudWatchEvents: rcpRunCommandTargets :: Lens' RunCommandParameters (NonEmpty RunCommandTarget)
+ Network.AWS.CloudWatchEvents: rctKey :: Lens' RunCommandTarget Text
+ Network.AWS.CloudWatchEvents: rctValues :: Lens' RunCommandTarget (NonEmpty Text)
+ Network.AWS.CloudWatchEvents: runCommandParameters :: NonEmpty RunCommandTarget -> RunCommandParameters
+ Network.AWS.CloudWatchEvents: runCommandTarget :: Text -> NonEmpty Text -> RunCommandTarget
+ Network.AWS.CloudWatchEvents: tEcsParameters :: Lens' Target (Maybe EcsParameters)
+ Network.AWS.CloudWatchEvents: tInputTransformer :: Lens' Target (Maybe InputTransformer)
+ Network.AWS.CloudWatchEvents: tKinesisParameters :: Lens' Target (Maybe KinesisParameters)
+ Network.AWS.CloudWatchEvents: tRoleARN :: Lens' Target (Maybe Text)
+ Network.AWS.CloudWatchEvents: tRunCommandParameters :: Lens' Target (Maybe RunCommandParameters)
+ Network.AWS.CloudWatchEvents.DescribeEventBus: data DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: data DescribeEventBusResponse
+ Network.AWS.CloudWatchEvents.DescribeEventBus: debrsARN :: Lens' DescribeEventBusResponse (Maybe Text)
+ Network.AWS.CloudWatchEvents.DescribeEventBus: debrsName :: Lens' DescribeEventBusResponse (Maybe Text)
+ Network.AWS.CloudWatchEvents.DescribeEventBus: debrsPolicy :: Lens' DescribeEventBusResponse (Maybe Text)
+ Network.AWS.CloudWatchEvents.DescribeEventBus: debrsResponseStatus :: Lens' DescribeEventBusResponse Int
+ Network.AWS.CloudWatchEvents.DescribeEventBus: describeEventBus :: DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: describeEventBusResponse :: Int -> DescribeEventBusResponse
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Control.DeepSeq.NFData Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Control.DeepSeq.NFData Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBusResponse
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Data.Data.Data Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Data.Data.Data Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBusResponse
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Data.Hashable.Class.Hashable Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance GHC.Classes.Eq Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance GHC.Classes.Eq Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBusResponse
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance GHC.Generics.Generic Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance GHC.Generics.Generic Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBusResponse
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance GHC.Read.Read Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance GHC.Read.Read Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBusResponse
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance GHC.Show.Show Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance GHC.Show.Show Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBusResponse
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Network.AWS.Data.Headers.ToHeaders Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Network.AWS.Data.Path.ToPath Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Network.AWS.Data.Query.ToQuery Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.DescribeEventBus: instance Network.AWS.Types.AWSRequest Network.AWS.CloudWatchEvents.DescribeEventBus.DescribeEventBus
+ Network.AWS.CloudWatchEvents.PutPermission: data PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: data PutPermissionResponse
+ Network.AWS.CloudWatchEvents.PutPermission: instance Control.DeepSeq.NFData Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance Control.DeepSeq.NFData Network.AWS.CloudWatchEvents.PutPermission.PutPermissionResponse
+ Network.AWS.CloudWatchEvents.PutPermission: instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance Data.Data.Data Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance Data.Data.Data Network.AWS.CloudWatchEvents.PutPermission.PutPermissionResponse
+ Network.AWS.CloudWatchEvents.PutPermission: instance Data.Hashable.Class.Hashable Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance GHC.Classes.Eq Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance GHC.Classes.Eq Network.AWS.CloudWatchEvents.PutPermission.PutPermissionResponse
+ Network.AWS.CloudWatchEvents.PutPermission: instance GHC.Generics.Generic Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance GHC.Generics.Generic Network.AWS.CloudWatchEvents.PutPermission.PutPermissionResponse
+ Network.AWS.CloudWatchEvents.PutPermission: instance GHC.Read.Read Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance GHC.Read.Read Network.AWS.CloudWatchEvents.PutPermission.PutPermissionResponse
+ Network.AWS.CloudWatchEvents.PutPermission: instance GHC.Show.Show Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance GHC.Show.Show Network.AWS.CloudWatchEvents.PutPermission.PutPermissionResponse
+ Network.AWS.CloudWatchEvents.PutPermission: instance Network.AWS.Data.Headers.ToHeaders Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance Network.AWS.Data.Path.ToPath Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance Network.AWS.Data.Query.ToQuery Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: instance Network.AWS.Types.AWSRequest Network.AWS.CloudWatchEvents.PutPermission.PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: ppAction :: Lens' PutPermission Text
+ Network.AWS.CloudWatchEvents.PutPermission: ppPrincipal :: Lens' PutPermission Text
+ Network.AWS.CloudWatchEvents.PutPermission: ppStatementId :: Lens' PutPermission Text
+ Network.AWS.CloudWatchEvents.PutPermission: putPermission :: Text -> Text -> Text -> PutPermission
+ Network.AWS.CloudWatchEvents.PutPermission: putPermissionResponse :: PutPermissionResponse
+ Network.AWS.CloudWatchEvents.RemovePermission: data RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: data RemovePermissionResponse
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Control.DeepSeq.NFData Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Control.DeepSeq.NFData Network.AWS.CloudWatchEvents.RemovePermission.RemovePermissionResponse
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Data.Aeson.Types.ToJSON.ToJSON Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Data.Data.Data Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Data.Data.Data Network.AWS.CloudWatchEvents.RemovePermission.RemovePermissionResponse
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Data.Hashable.Class.Hashable Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance GHC.Classes.Eq Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance GHC.Classes.Eq Network.AWS.CloudWatchEvents.RemovePermission.RemovePermissionResponse
+ Network.AWS.CloudWatchEvents.RemovePermission: instance GHC.Generics.Generic Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance GHC.Generics.Generic Network.AWS.CloudWatchEvents.RemovePermission.RemovePermissionResponse
+ Network.AWS.CloudWatchEvents.RemovePermission: instance GHC.Read.Read Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance GHC.Read.Read Network.AWS.CloudWatchEvents.RemovePermission.RemovePermissionResponse
+ Network.AWS.CloudWatchEvents.RemovePermission: instance GHC.Show.Show Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance GHC.Show.Show Network.AWS.CloudWatchEvents.RemovePermission.RemovePermissionResponse
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Network.AWS.Data.Headers.ToHeaders Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Network.AWS.Data.Path.ToPath Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Network.AWS.Data.Query.ToQuery Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: instance Network.AWS.Types.AWSRequest Network.AWS.CloudWatchEvents.RemovePermission.RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: removePermission :: Text -> RemovePermission
+ Network.AWS.CloudWatchEvents.RemovePermission: removePermissionResponse :: RemovePermissionResponse
+ Network.AWS.CloudWatchEvents.RemovePermission: rpStatementId :: Lens' RemovePermission Text
+ Network.AWS.CloudWatchEvents.Types: _PolicyLengthExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+ Network.AWS.CloudWatchEvents.Types: data EcsParameters
+ Network.AWS.CloudWatchEvents.Types: data InputTransformer
+ Network.AWS.CloudWatchEvents.Types: data KinesisParameters
+ Network.AWS.CloudWatchEvents.Types: data RunCommandParameters
+ Network.AWS.CloudWatchEvents.Types: data RunCommandTarget
+ Network.AWS.CloudWatchEvents.Types: ecsParameters :: Text -> EcsParameters
+ Network.AWS.CloudWatchEvents.Types: epTaskCount :: Lens' EcsParameters (Maybe Natural)
+ Network.AWS.CloudWatchEvents.Types: epTaskDefinitionARN :: Lens' EcsParameters Text
+ Network.AWS.CloudWatchEvents.Types: inputTransformer :: Text -> InputTransformer
+ Network.AWS.CloudWatchEvents.Types: itInputPathsMap :: Lens' InputTransformer (HashMap Text Text)
+ Network.AWS.CloudWatchEvents.Types: itInputTemplate :: Lens' InputTransformer Text
+ Network.AWS.CloudWatchEvents.Types: kinesisParameters :: Text -> KinesisParameters
+ Network.AWS.CloudWatchEvents.Types: kpPartitionKeyPath :: Lens' KinesisParameters Text
+ Network.AWS.CloudWatchEvents.Types: rcpRunCommandTargets :: Lens' RunCommandParameters (NonEmpty RunCommandTarget)
+ Network.AWS.CloudWatchEvents.Types: rctKey :: Lens' RunCommandTarget Text
+ Network.AWS.CloudWatchEvents.Types: rctValues :: Lens' RunCommandTarget (NonEmpty Text)
+ Network.AWS.CloudWatchEvents.Types: runCommandParameters :: NonEmpty RunCommandTarget -> RunCommandParameters
+ Network.AWS.CloudWatchEvents.Types: runCommandTarget :: Text -> NonEmpty Text -> RunCommandTarget
+ Network.AWS.CloudWatchEvents.Types: tEcsParameters :: Lens' Target (Maybe EcsParameters)
+ Network.AWS.CloudWatchEvents.Types: tInputTransformer :: Lens' Target (Maybe InputTransformer)
+ Network.AWS.CloudWatchEvents.Types: tKinesisParameters :: Lens' Target (Maybe KinesisParameters)
+ Network.AWS.CloudWatchEvents.Types: tRoleARN :: Lens' Target (Maybe Text)
+ Network.AWS.CloudWatchEvents.Types: tRunCommandParameters :: Lens' Target (Maybe RunCommandParameters)
- Network.AWS.CloudWatchEvents.ListTargetsByRule: ltbrrsTargets :: Lens' ListTargetsByRuleResponse [Target]
+ Network.AWS.CloudWatchEvents.ListTargetsByRule: ltbrrsTargets :: Lens' ListTargetsByRuleResponse (Maybe (NonEmpty Target))
- Network.AWS.CloudWatchEvents.PutTargets: ptTargets :: Lens' PutTargets [Target]
+ Network.AWS.CloudWatchEvents.PutTargets: ptTargets :: Lens' PutTargets (NonEmpty Target)
- Network.AWS.CloudWatchEvents.PutTargets: putTargets :: Text -> PutTargets
+ Network.AWS.CloudWatchEvents.PutTargets: putTargets :: Text -> NonEmpty Target -> PutTargets
Files
- README.md +1/−1
- amazonka-cloudwatch-events.cabal +19/−11
- fixture/DescribeEventBus.yaml +10/−0
- fixture/DescribeEventBusResponse.proto +0/−0
- fixture/PutPermission.yaml +10/−0
- fixture/PutPermissionResponse.proto +0/−0
- fixture/RemovePermission.yaml +10/−0
- fixture/RemovePermissionResponse.proto +0/−0
- gen/Network/AWS/CloudWatchEvents.hs +73/−19
- gen/Network/AWS/CloudWatchEvents/DeleteRule.hs +27/−28
- gen/Network/AWS/CloudWatchEvents/DescribeEventBus.hs +140/−0
- gen/Network/AWS/CloudWatchEvents/DescribeRule.hs +50/−57
- gen/Network/AWS/CloudWatchEvents/DisableRule.hs +25/−28
- gen/Network/AWS/CloudWatchEvents/EnableRule.hs +25/−28
- gen/Network/AWS/CloudWatchEvents/ListRuleNamesByTarget.hs +44/−48
- gen/Network/AWS/CloudWatchEvents/ListRules.hs +39/−46
- gen/Network/AWS/CloudWatchEvents/ListTargetsByRule.hs +45/−52
- gen/Network/AWS/CloudWatchEvents/PutEvents.hs +31/−38
- gen/Network/AWS/CloudWatchEvents/PutPermission.hs +139/−0
- gen/Network/AWS/CloudWatchEvents/PutRule.hs +47/−53
- gen/Network/AWS/CloudWatchEvents/PutTargets.hs +93/−51
- gen/Network/AWS/CloudWatchEvents/RemovePermission.hs +108/−0
- gen/Network/AWS/CloudWatchEvents/RemoveTargets.hs +40/−45
- gen/Network/AWS/CloudWatchEvents/TestEventPattern.hs +32/−41
- gen/Network/AWS/CloudWatchEvents/Types.hs +85/−34
- gen/Network/AWS/CloudWatchEvents/Types/Product.hs +437/−135
- gen/Network/AWS/CloudWatchEvents/Types/Sum.hs +7/−6
- gen/Network/AWS/CloudWatchEvents/Waiters.hs +6/−6
- test/Main.hs +2/−2
- test/Test/AWS/Gen/CloudWatchEvents.hs +58/−4
README.md view
@@ -8,7 +8,7 @@ ## Version -`1.4.5`+`1.5.0` ## Description
amazonka-cloudwatch-events.cabal view
@@ -1,13 +1,13 @@ name: amazonka-cloudwatch-events-version: 1.4.5+version: 1.5.0 synopsis: Amazon CloudWatch Events SDK. homepage: https://github.com/brendanhay/amazonka bug-reports: https://github.com/brendanhay/amazonka/issues-license: OtherLicense+license: MPL-2.0 license-file: LICENSE author: Brendan Hay-maintainer: Brendan Hay <brendan.g.hay@gmail.com>-copyright: Copyright (c) 2013-2016 Brendan Hay+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>+copyright: Copyright (c) 2013-2017 Brendan Hay category: Network, AWS, Cloud, Distributed Computing build-type: Simple cabal-version: >= 1.10@@ -29,18 +29,24 @@ to get started. source-repository head- type: git- location: git://github.com/brendanhay/amazonka.git+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-cloudwatch-events library default-language: Haskell2010 hs-source-dirs: src gen - ghc-options: -Wall+ ghc-options:+ -Wall+ -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates+ -funbox-strict-fields exposed-modules: Network.AWS.CloudWatchEvents , Network.AWS.CloudWatchEvents.DeleteRule+ , Network.AWS.CloudWatchEvents.DescribeEventBus , Network.AWS.CloudWatchEvents.DescribeRule , Network.AWS.CloudWatchEvents.DisableRule , Network.AWS.CloudWatchEvents.EnableRule@@ -48,8 +54,10 @@ , Network.AWS.CloudWatchEvents.ListRules , Network.AWS.CloudWatchEvents.ListTargetsByRule , Network.AWS.CloudWatchEvents.PutEvents+ , Network.AWS.CloudWatchEvents.PutPermission , Network.AWS.CloudWatchEvents.PutRule , Network.AWS.CloudWatchEvents.PutTargets+ , Network.AWS.CloudWatchEvents.RemovePermission , Network.AWS.CloudWatchEvents.RemoveTargets , Network.AWS.CloudWatchEvents.TestEventPattern , Network.AWS.CloudWatchEvents.Types@@ -60,7 +68,7 @@ , Network.AWS.CloudWatchEvents.Types.Sum build-depends:- amazonka-core == 1.4.5.*+ amazonka-core == 1.5.0.* , base >= 4.7 && < 5 test-suite amazonka-cloudwatch-events-test@@ -80,9 +88,9 @@ , Test.AWS.CloudWatchEvents.Internal build-depends:- amazonka-core == 1.4.5.*- , amazonka-test == 1.4.5.*- , amazonka-cloudwatch-events == 1.4.5.*+ amazonka-core == 1.5.0.*+ , amazonka-test == 1.5.0.*+ , amazonka-cloudwatch-events , base , bytestring , tasty
+ fixture/DescribeEventBus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/events/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: events.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeEventBusResponse.proto view
+ fixture/PutPermission.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/events/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: events.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/PutPermissionResponse.proto view
+ fixture/RemovePermission.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/events/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: events.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/RemovePermissionResponse.proto view
gen/Network/AWS/CloudWatchEvents.hs view
@@ -5,19 +5,25 @@ -- | -- Module : Network.AWS.CloudWatchEvents--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Amazon CloudWatch Events helps you to respond to state changes in your AWS resources. When your resources change state they automatically send events into an event stream. You can create rules that match selected events in the stream and route them to targets to take action. You can also use rules to take action on a pre-determined schedule. For example, you can configure rules to:+-- Amazon CloudWatch Events helps you to respond to state changes in your AWS resources. When your resources change state, they automatically send events into an event stream. You can create rules that match selected events in the stream and route them to targets to take action. You can also use rules to take action on a pre-determined schedule. For example, you can configure rules to: -- ----- * Automatically invoke an AWS Lambda function to update DNS entries when an event notifies you that Amazon EC2 instance enters the running state. * Direct specific API records from CloudTrail to an Amazon Kinesis stream for detailed analysis of potential security or availability risks. * Periodically invoke a built-in target to create a snapshot of an Amazon EBS volume.+-- * Automatically invoke an AWS Lambda function to update DNS entries when an event notifies you that Amazon EC2 instance enters the running state. ----- For more information about Amazon CloudWatch Events features, see the <http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide Amazon CloudWatch Developer Guide> .+-- * Direct specific API records from CloudTrail to an Amazon Kinesis stream for detailed analysis of potential security or availability risks. --+-- * Periodically invoke a built-in target to create a snapshot of an Amazon EBS volume.+--+--+--+-- For more information about the features of Amazon CloudWatch Events, see the <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events Amazon CloudWatch Events User Guide> .+-- module Network.AWS.CloudWatchEvents ( -- * Service Configuration@@ -26,6 +32,9 @@ -- * Errors -- $errors + -- ** PolicyLengthExceededException+ , _PolicyLengthExceededException+ -- ** ConcurrentModificationException , _ConcurrentModificationException @@ -62,9 +71,15 @@ -- ** DisableRule , module Network.AWS.CloudWatchEvents.DisableRule + -- ** PutPermission+ , module Network.AWS.CloudWatchEvents.PutPermission+ -- ** ListTargetsByRule , module Network.AWS.CloudWatchEvents.ListTargetsByRule + -- ** RemovePermission+ , module Network.AWS.CloudWatchEvents.RemovePermission+ -- ** DescribeRule , module Network.AWS.CloudWatchEvents.DescribeRule @@ -77,6 +92,9 @@ -- ** TestEventPattern , module Network.AWS.CloudWatchEvents.TestEventPattern + -- ** DescribeEventBus+ , module Network.AWS.CloudWatchEvents.DescribeEventBus+ -- ** PutTargets , module Network.AWS.CloudWatchEvents.PutTargets @@ -88,6 +106,23 @@ -- ** RuleState , RuleState (..) + -- ** EcsParameters+ , EcsParameters+ , ecsParameters+ , epTaskCount+ , epTaskDefinitionARN++ -- ** InputTransformer+ , InputTransformer+ , inputTransformer+ , itInputPathsMap+ , itInputTemplate++ -- ** KinesisParameters+ , KinesisParameters+ , kinesisParameters+ , kpPartitionKeyPath+ -- ** PutEventsRequestEntry , PutEventsRequestEntry , putEventsRequestEntry@@ -129,29 +164,48 @@ , rDescription , rRoleARN + -- ** RunCommandParameters+ , RunCommandParameters+ , runCommandParameters+ , rcpRunCommandTargets++ -- ** RunCommandTarget+ , RunCommandTarget+ , runCommandTarget+ , rctKey+ , rctValues+ -- ** Target , Target , target+ , tRunCommandParameters+ , tKinesisParameters+ , tInputTransformer , tInput+ , tEcsParameters , tInputPath+ , tRoleARN , tId , tARN ) where -import Network.AWS.CloudWatchEvents.DeleteRule-import Network.AWS.CloudWatchEvents.DescribeRule-import Network.AWS.CloudWatchEvents.DisableRule-import Network.AWS.CloudWatchEvents.EnableRule-import Network.AWS.CloudWatchEvents.ListRuleNamesByTarget-import Network.AWS.CloudWatchEvents.ListRules-import Network.AWS.CloudWatchEvents.ListTargetsByRule-import Network.AWS.CloudWatchEvents.PutEvents-import Network.AWS.CloudWatchEvents.PutRule-import Network.AWS.CloudWatchEvents.PutTargets-import Network.AWS.CloudWatchEvents.RemoveTargets-import Network.AWS.CloudWatchEvents.TestEventPattern-import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Waiters+import Network.AWS.CloudWatchEvents.DeleteRule+import Network.AWS.CloudWatchEvents.DescribeEventBus+import Network.AWS.CloudWatchEvents.DescribeRule+import Network.AWS.CloudWatchEvents.DisableRule+import Network.AWS.CloudWatchEvents.EnableRule+import Network.AWS.CloudWatchEvents.ListRuleNamesByTarget+import Network.AWS.CloudWatchEvents.ListRules+import Network.AWS.CloudWatchEvents.ListTargetsByRule+import Network.AWS.CloudWatchEvents.PutEvents+import Network.AWS.CloudWatchEvents.PutPermission+import Network.AWS.CloudWatchEvents.PutRule+import Network.AWS.CloudWatchEvents.PutTargets+import Network.AWS.CloudWatchEvents.RemovePermission+import Network.AWS.CloudWatchEvents.RemoveTargets+import Network.AWS.CloudWatchEvents.TestEventPattern+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Waiters {- $errors Error matchers are designed for use with the functions provided by
gen/Network/AWS/CloudWatchEvents/DeleteRule.hs view
@@ -12,17 +12,19 @@ -- | -- Module : Network.AWS.CloudWatchEvents.DeleteRule--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Deletes a rule. You must remove all targets from a rule using 'RemoveTargets' before you can delete the rule.+-- Deletes the specified rule. -- ----- __Note:__ When you delete a rule, incoming events might still continue to match to the deleted rule. Please allow a short period of time for changes to take effect.+-- You must remove all targets from a rule using 'RemoveTargets' before you can delete the rule. --+-- When you delete a rule, incoming events might continue to match to the deleted rule. Please allow a short period of time for changes to take effect.+-- module Network.AWS.CloudWatchEvents.DeleteRule ( -- * Creating a Request@@ -36,36 +38,31 @@ , DeleteRuleResponse ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'DeleteRule' operation.------------ /See:/ 'deleteRule' smart constructor.+-- | /See:/ 'deleteRule' smart constructor. newtype DeleteRule = DeleteRule'- { _drName :: Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _drName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DeleteRule' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'drName' - The name of the rule to be deleted.+-- * 'drName' - The name of the rule. deleteRule :: Text -- ^ 'drName' -> DeleteRule-deleteRule pName_ =- DeleteRule'- { _drName = pName_- }+deleteRule pName_ = DeleteRule' {_drName = pName_} --- | The name of the rule to be deleted.++-- | The name of the rule. drName :: Lens' DeleteRule Text drName = lens _drName (\ s a -> s{_drName = a}); @@ -74,9 +71,9 @@ request = postJSON cloudWatchEvents response = receiveNull DeleteRuleResponse' -instance Hashable DeleteRule+instance Hashable DeleteRule where -instance NFData DeleteRule+instance NFData DeleteRule where instance ToHeaders DeleteRule where toHeaders@@ -99,13 +96,15 @@ -- | /See:/ 'deleteRuleResponse' smart constructor. data DeleteRuleResponse =- DeleteRuleResponse'- deriving (Eq,Read,Show,Data,Typeable,Generic)+ DeleteRuleResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DeleteRuleResponse' with the minimum fields required to make a request. -- deleteRuleResponse :: DeleteRuleResponse deleteRuleResponse = DeleteRuleResponse' -instance NFData DeleteRuleResponse++instance NFData DeleteRuleResponse where
+ gen/Network/AWS/CloudWatchEvents/DescribeEventBus.hs view
@@ -0,0 +1,140 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CloudWatchEvents.DescribeEventBus+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Displays the external AWS accounts that are permitted to write events to your account using your account's event bus, and the associated policy. To enable your account to receive events from other accounts, use 'PutPermission' .+--+--+module Network.AWS.CloudWatchEvents.DescribeEventBus+ (+ -- * Creating a Request+ describeEventBus+ , DescribeEventBus++ -- * Destructuring the Response+ , describeEventBusResponse+ , DescribeEventBusResponse+ -- * Response Lenses+ , debrsARN+ , debrsName+ , debrsPolicy+ , debrsResponseStatus+ ) where++import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeEventBus' smart constructor.+data DescribeEventBus =+ DescribeEventBus'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeEventBus' with the minimum fields required to make a request.+--+describeEventBus+ :: DescribeEventBus+describeEventBus = DescribeEventBus'+++instance AWSRequest DescribeEventBus where+ type Rs DescribeEventBus = DescribeEventBusResponse+ request = postJSON cloudWatchEvents+ response+ = receiveJSON+ (\ s h x ->+ DescribeEventBusResponse' <$>+ (x .?> "Arn") <*> (x .?> "Name") <*> (x .?> "Policy")+ <*> (pure (fromEnum s)))++instance Hashable DescribeEventBus where++instance NFData DescribeEventBus where++instance ToHeaders DescribeEventBus where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSEvents.DescribeEventBus" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeEventBus where+ toJSON = const (Object mempty)++instance ToPath DescribeEventBus where+ toPath = const "/"++instance ToQuery DescribeEventBus where+ toQuery = const mempty++-- | /See:/ 'describeEventBusResponse' smart constructor.+data DescribeEventBusResponse = DescribeEventBusResponse'+ { _debrsARN :: !(Maybe Text)+ , _debrsName :: !(Maybe Text)+ , _debrsPolicy :: !(Maybe Text)+ , _debrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeEventBusResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'debrsARN' - The Amazon Resource Name (ARN) of the account permitted to write events to the current account.+--+-- * 'debrsName' - The name of the event bus. Currently, this is always @default@ .+--+-- * 'debrsPolicy' - The policy that enables the external account to send events to your account.+--+-- * 'debrsResponseStatus' - -- | The response status code.+describeEventBusResponse+ :: Int -- ^ 'debrsResponseStatus'+ -> DescribeEventBusResponse+describeEventBusResponse pResponseStatus_ =+ DescribeEventBusResponse'+ { _debrsARN = Nothing+ , _debrsName = Nothing+ , _debrsPolicy = Nothing+ , _debrsResponseStatus = pResponseStatus_+ }+++-- | The Amazon Resource Name (ARN) of the account permitted to write events to the current account.+debrsARN :: Lens' DescribeEventBusResponse (Maybe Text)+debrsARN = lens _debrsARN (\ s a -> s{_debrsARN = a});++-- | The name of the event bus. Currently, this is always @default@ .+debrsName :: Lens' DescribeEventBusResponse (Maybe Text)+debrsName = lens _debrsName (\ s a -> s{_debrsName = a});++-- | The policy that enables the external account to send events to your account.+debrsPolicy :: Lens' DescribeEventBusResponse (Maybe Text)+debrsPolicy = lens _debrsPolicy (\ s a -> s{_debrsPolicy = a});++-- | -- | The response status code.+debrsResponseStatus :: Lens' DescribeEventBusResponse Int+debrsResponseStatus = lens _debrsResponseStatus (\ s a -> s{_debrsResponseStatus = a});++instance NFData DescribeEventBusResponse where
gen/Network/AWS/CloudWatchEvents/DescribeRule.hs view
@@ -12,13 +12,13 @@ -- | -- Module : Network.AWS.CloudWatchEvents.DescribeRule--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Describes the details of the specified rule.+-- Describes the specified rule. -- -- module Network.AWS.CloudWatchEvents.DescribeRule@@ -43,36 +43,31 @@ , drrsResponseStatus ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'DescribeRule' operation.------------ /See:/ 'describeRule' smart constructor.+-- | /See:/ 'describeRule' smart constructor. newtype DescribeRule = DescribeRule'- { _desName :: Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _desName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DescribeRule' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'desName' - The name of the rule you want to describe details for.+-- * 'desName' - The name of the rule. describeRule :: Text -- ^ 'desName' -> DescribeRule-describeRule pName_ =- DescribeRule'- { _desName = pName_- }+describeRule pName_ = DescribeRule' {_desName = pName_} --- | The name of the rule you want to describe details for.++-- | The name of the rule. desName :: Lens' DescribeRule Text desName = lens _desName (\ s a -> s{_desName = a}); @@ -91,9 +86,9 @@ <*> (x .?> "RoleArn") <*> (pure (fromEnum s))) -instance Hashable DescribeRule+instance Hashable DescribeRule where -instance NFData DescribeRule+instance NFData DescribeRule where instance ToHeaders DescribeRule where toHeaders@@ -114,37 +109,34 @@ instance ToQuery DescribeRule where toQuery = const mempty --- | The result of the 'DescribeRule' operation.------------ /See:/ 'describeRuleResponse' smart constructor.+-- | /See:/ 'describeRuleResponse' smart constructor. data DescribeRuleResponse = DescribeRuleResponse'- { _drrsEventPattern :: !(Maybe Text)- , _drrsState :: !(Maybe RuleState)- , _drrsARN :: !(Maybe Text)- , _drrsScheduleExpression :: !(Maybe Text)- , _drrsName :: !(Maybe Text)- , _drrsDescription :: !(Maybe Text)- , _drrsRoleARN :: !(Maybe Text)- , _drrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _drrsEventPattern :: !(Maybe Text)+ , _drrsState :: !(Maybe RuleState)+ , _drrsARN :: !(Maybe Text)+ , _drrsScheduleExpression :: !(Maybe Text)+ , _drrsName :: !(Maybe Text)+ , _drrsDescription :: !(Maybe Text)+ , _drrsRoleARN :: !(Maybe Text)+ , _drrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DescribeRuleResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'drrsEventPattern' - The event pattern.+-- * 'drrsEventPattern' - The event pattern. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html Events and Event Patterns> in the /Amazon CloudWatch Events User Guide/ . -- -- * 'drrsState' - Specifies whether the rule is enabled or disabled. ----- * 'drrsARN' - The Amazon Resource Name (ARN) associated with the rule.+-- * 'drrsARN' - The Amazon Resource Name (ARN) of the rule. -- -- * 'drrsScheduleExpression' - The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". ----- * 'drrsName' - The rule's name.+-- * 'drrsName' - The name of the rule. ----- * 'drrsDescription' - The rule's description.+-- * 'drrsDescription' - The description of the rule. -- -- * 'drrsRoleARN' - The Amazon Resource Name (ARN) of the IAM role associated with the rule. --@@ -153,18 +145,19 @@ :: Int -- ^ 'drrsResponseStatus' -> DescribeRuleResponse describeRuleResponse pResponseStatus_ =- DescribeRuleResponse'- { _drrsEventPattern = Nothing- , _drrsState = Nothing- , _drrsARN = Nothing- , _drrsScheduleExpression = Nothing- , _drrsName = Nothing- , _drrsDescription = Nothing- , _drrsRoleARN = Nothing- , _drrsResponseStatus = pResponseStatus_- }+ DescribeRuleResponse'+ { _drrsEventPattern = Nothing+ , _drrsState = Nothing+ , _drrsARN = Nothing+ , _drrsScheduleExpression = Nothing+ , _drrsName = Nothing+ , _drrsDescription = Nothing+ , _drrsRoleARN = Nothing+ , _drrsResponseStatus = pResponseStatus_+ } --- | The event pattern.++-- | The event pattern. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html Events and Event Patterns> in the /Amazon CloudWatch Events User Guide/ . drrsEventPattern :: Lens' DescribeRuleResponse (Maybe Text) drrsEventPattern = lens _drrsEventPattern (\ s a -> s{_drrsEventPattern = a}); @@ -172,7 +165,7 @@ drrsState :: Lens' DescribeRuleResponse (Maybe RuleState) drrsState = lens _drrsState (\ s a -> s{_drrsState = a}); --- | The Amazon Resource Name (ARN) associated with the rule.+-- | The Amazon Resource Name (ARN) of the rule. drrsARN :: Lens' DescribeRuleResponse (Maybe Text) drrsARN = lens _drrsARN (\ s a -> s{_drrsARN = a}); @@ -180,11 +173,11 @@ drrsScheduleExpression :: Lens' DescribeRuleResponse (Maybe Text) drrsScheduleExpression = lens _drrsScheduleExpression (\ s a -> s{_drrsScheduleExpression = a}); --- | The rule's name.+-- | The name of the rule. drrsName :: Lens' DescribeRuleResponse (Maybe Text) drrsName = lens _drrsName (\ s a -> s{_drrsName = a}); --- | The rule's description.+-- | The description of the rule. drrsDescription :: Lens' DescribeRuleResponse (Maybe Text) drrsDescription = lens _drrsDescription (\ s a -> s{_drrsDescription = a}); @@ -196,4 +189,4 @@ drrsResponseStatus :: Lens' DescribeRuleResponse Int drrsResponseStatus = lens _drrsResponseStatus (\ s a -> s{_drrsResponseStatus = a}); -instance NFData DescribeRuleResponse+instance NFData DescribeRuleResponse where
gen/Network/AWS/CloudWatchEvents/DisableRule.hs view
@@ -12,16 +12,16 @@ -- | -- Module : Network.AWS.CloudWatchEvents.DisableRule--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Disables a rule. A disabled rule won't match any events, and won't self-trigger if it has a schedule expression.+-- Disables the specified rule. A disabled rule won't match any events, and won't self-trigger if it has a schedule expression. -- ----- __Note:__ When you disable a rule, incoming events might still continue to match to the disabled rule. Please allow a short period of time for changes to take effect.+-- When you disable a rule, incoming events might continue to match to the disabled rule. Please allow a short period of time for changes to take effect. -- module Network.AWS.CloudWatchEvents.DisableRule (@@ -36,36 +36,31 @@ , DisableRuleResponse ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'DisableRule' operation.------------ /See:/ 'disableRule' smart constructor.+-- | /See:/ 'disableRule' smart constructor. newtype DisableRule = DisableRule'- { _dName :: Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _dName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DisableRule' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'dName' - The name of the rule you want to disable.+-- * 'dName' - The name of the rule. disableRule :: Text -- ^ 'dName' -> DisableRule-disableRule pName_ =- DisableRule'- { _dName = pName_- }+disableRule pName_ = DisableRule' {_dName = pName_} --- | The name of the rule you want to disable.++-- | The name of the rule. dName :: Lens' DisableRule Text dName = lens _dName (\ s a -> s{_dName = a}); @@ -74,9 +69,9 @@ request = postJSON cloudWatchEvents response = receiveNull DisableRuleResponse' -instance Hashable DisableRule+instance Hashable DisableRule where -instance NFData DisableRule+instance NFData DisableRule where instance ToHeaders DisableRule where toHeaders@@ -99,13 +94,15 @@ -- | /See:/ 'disableRuleResponse' smart constructor. data DisableRuleResponse =- DisableRuleResponse'- deriving (Eq,Read,Show,Data,Typeable,Generic)+ DisableRuleResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'DisableRuleResponse' with the minimum fields required to make a request. -- disableRuleResponse :: DisableRuleResponse disableRuleResponse = DisableRuleResponse' -instance NFData DisableRuleResponse++instance NFData DisableRuleResponse where
gen/Network/AWS/CloudWatchEvents/EnableRule.hs view
@@ -12,16 +12,16 @@ -- | -- Module : Network.AWS.CloudWatchEvents.EnableRule--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Enables a rule. If the rule does not exist, the operation fails.+-- Enables the specified rule. If the rule does not exist, the operation fails. -- ----- __Note:__ When you enable a rule, incoming events might not immediately start matching to a newly enabled rule. Please allow a short period of time for changes to take effect.+-- When you enable a rule, incoming events might not immediately start matching to a newly enabled rule. Please allow a short period of time for changes to take effect. -- module Network.AWS.CloudWatchEvents.EnableRule (@@ -36,36 +36,31 @@ , EnableRuleResponse ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'EnableRule' operation.------------ /See:/ 'enableRule' smart constructor.+-- | /See:/ 'enableRule' smart constructor. newtype EnableRule = EnableRule'- { _erName :: Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _erName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'EnableRule' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'erName' - The name of the rule that you want to enable.+-- * 'erName' - The name of the rule. enableRule :: Text -- ^ 'erName' -> EnableRule-enableRule pName_ =- EnableRule'- { _erName = pName_- }+enableRule pName_ = EnableRule' {_erName = pName_} --- | The name of the rule that you want to enable.++-- | The name of the rule. erName :: Lens' EnableRule Text erName = lens _erName (\ s a -> s{_erName = a}); @@ -74,9 +69,9 @@ request = postJSON cloudWatchEvents response = receiveNull EnableRuleResponse' -instance Hashable EnableRule+instance Hashable EnableRule where -instance NFData EnableRule+instance NFData EnableRule where instance ToHeaders EnableRule where toHeaders@@ -99,13 +94,15 @@ -- | /See:/ 'enableRuleResponse' smart constructor. data EnableRuleResponse =- EnableRuleResponse'- deriving (Eq,Read,Show,Data,Typeable,Generic)+ EnableRuleResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'EnableRuleResponse' with the minimum fields required to make a request. -- enableRuleResponse :: EnableRuleResponse enableRuleResponse = EnableRuleResponse' -instance NFData EnableRuleResponse++instance NFData EnableRuleResponse where
gen/Network/AWS/CloudWatchEvents/ListRuleNamesByTarget.hs view
@@ -12,13 +12,13 @@ -- | -- Module : Network.AWS.CloudWatchEvents.ListRuleNamesByTarget--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Lists the names of the rules that the given target is put to. You can see which of the rules in Amazon CloudWatch Events can invoke a specific target in your account. If you have more rules in your account than the given limit, the results will be paginated. In that case, use the next token returned in the response and repeat ListRulesByTarget until the NextToken in the response is returned as null.+-- Lists the rules for the specified target. You can see which of the rules in Amazon CloudWatch Events can invoke a specific target in your account. -- -- module Network.AWS.CloudWatchEvents.ListRuleNamesByTarget@@ -40,44 +40,42 @@ , lrnbtrsResponseStatus ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'ListRuleNamesByTarget' operation.------------ /See:/ 'listRuleNamesByTarget' smart constructor.+-- | /See:/ 'listRuleNamesByTarget' smart constructor. data ListRuleNamesByTarget = ListRuleNamesByTarget'- { _lrnbtNextToken :: !(Maybe Text)- , _lrnbtLimit :: !(Maybe Nat)- , _lrnbtTargetARN :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _lrnbtNextToken :: !(Maybe Text)+ , _lrnbtLimit :: !(Maybe Nat)+ , _lrnbtTargetARN :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListRuleNamesByTarget' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'lrnbtNextToken' - The token returned by a previous call to indicate that there is more data available.+-- * 'lrnbtNextToken' - The token returned by a previous call to retrieve the next set of results. -- -- * 'lrnbtLimit' - The maximum number of results to return. ----- * 'lrnbtTargetARN' - The Amazon Resource Name (ARN) of the target resource that you want to list the rules for.+-- * 'lrnbtTargetARN' - The Amazon Resource Name (ARN) of the target resource. listRuleNamesByTarget :: Text -- ^ 'lrnbtTargetARN' -> ListRuleNamesByTarget listRuleNamesByTarget pTargetARN_ =- ListRuleNamesByTarget'- { _lrnbtNextToken = Nothing- , _lrnbtLimit = Nothing- , _lrnbtTargetARN = pTargetARN_- }+ ListRuleNamesByTarget'+ { _lrnbtNextToken = Nothing+ , _lrnbtLimit = Nothing+ , _lrnbtTargetARN = pTargetARN_+ } --- | The token returned by a previous call to indicate that there is more data available.++-- | The token returned by a previous call to retrieve the next set of results. lrnbtNextToken :: Lens' ListRuleNamesByTarget (Maybe Text) lrnbtNextToken = lens _lrnbtNextToken (\ s a -> s{_lrnbtNextToken = a}); @@ -85,7 +83,7 @@ lrnbtLimit :: Lens' ListRuleNamesByTarget (Maybe Natural) lrnbtLimit = lens _lrnbtLimit (\ s a -> s{_lrnbtLimit = a}) . mapping _Nat; --- | The Amazon Resource Name (ARN) of the target resource that you want to list the rules for.+-- | The Amazon Resource Name (ARN) of the target resource. lrnbtTargetARN :: Lens' ListRuleNamesByTarget Text lrnbtTargetARN = lens _lrnbtTargetARN (\ s a -> s{_lrnbtTargetARN = a}); @@ -101,9 +99,9 @@ (x .?> "NextToken") <*> (pure (fromEnum s))) -instance Hashable ListRuleNamesByTarget+instance Hashable ListRuleNamesByTarget where -instance NFData ListRuleNamesByTarget+instance NFData ListRuleNamesByTarget where instance ToHeaders ListRuleNamesByTarget where toHeaders@@ -128,41 +126,39 @@ instance ToQuery ListRuleNamesByTarget where toQuery = const mempty --- | The result of the 'ListRuleNamesByTarget' operation.------------ /See:/ 'listRuleNamesByTargetResponse' smart constructor.+-- | /See:/ 'listRuleNamesByTargetResponse' smart constructor. data ListRuleNamesByTargetResponse = ListRuleNamesByTargetResponse'- { _lrnbtrsRuleNames :: !(Maybe [Text])- , _lrnbtrsNextToken :: !(Maybe Text)- , _lrnbtrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _lrnbtrsRuleNames :: !(Maybe [Text])+ , _lrnbtrsNextToken :: !(Maybe Text)+ , _lrnbtrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListRuleNamesByTargetResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'lrnbtrsRuleNames' - List of rules names that can invoke the given target.+-- * 'lrnbtrsRuleNames' - The names of the rules that can invoke the given target. ----- * 'lrnbtrsNextToken' - Indicates that there are additional results to retrieve.+-- * 'lrnbtrsNextToken' - Indicates whether there are additional results to retrieve. If there are no more results, the value is null. -- -- * 'lrnbtrsResponseStatus' - -- | The response status code. listRuleNamesByTargetResponse :: Int -- ^ 'lrnbtrsResponseStatus' -> ListRuleNamesByTargetResponse listRuleNamesByTargetResponse pResponseStatus_ =- ListRuleNamesByTargetResponse'- { _lrnbtrsRuleNames = Nothing- , _lrnbtrsNextToken = Nothing- , _lrnbtrsResponseStatus = pResponseStatus_- }+ ListRuleNamesByTargetResponse'+ { _lrnbtrsRuleNames = Nothing+ , _lrnbtrsNextToken = Nothing+ , _lrnbtrsResponseStatus = pResponseStatus_+ } --- | List of rules names that can invoke the given target.++-- | The names of the rules that can invoke the given target. lrnbtrsRuleNames :: Lens' ListRuleNamesByTargetResponse [Text] lrnbtrsRuleNames = lens _lrnbtrsRuleNames (\ s a -> s{_lrnbtrsRuleNames = a}) . _Default . _Coerce; --- | Indicates that there are additional results to retrieve.+-- | Indicates whether there are additional results to retrieve. If there are no more results, the value is null. lrnbtrsNextToken :: Lens' ListRuleNamesByTargetResponse (Maybe Text) lrnbtrsNextToken = lens _lrnbtrsNextToken (\ s a -> s{_lrnbtrsNextToken = a}); @@ -170,4 +166,4 @@ lrnbtrsResponseStatus :: Lens' ListRuleNamesByTargetResponse Int lrnbtrsResponseStatus = lens _lrnbtrsResponseStatus (\ s a -> s{_lrnbtrsResponseStatus = a}); -instance NFData ListRuleNamesByTargetResponse+instance NFData ListRuleNamesByTargetResponse where
gen/Network/AWS/CloudWatchEvents/ListRules.hs view
@@ -12,13 +12,13 @@ -- | -- Module : Network.AWS.CloudWatchEvents.ListRules--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Lists the Amazon CloudWatch Events rules in your account. You can either list all the rules or you can provide a prefix to match to the rule names. If you have more rules in your account than the given limit, the results will be paginated. In that case, use the next token returned in the response and repeat ListRules until the NextToken in the response is returned as null.+-- Lists your Amazon CloudWatch Events rules. You can either list all the rules or you can provide a prefix to match to the rule names. -- -- module Network.AWS.CloudWatchEvents.ListRules@@ -40,29 +40,26 @@ , lrrsResponseStatus ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'ListRules' operation.------------ /See:/ 'listRules' smart constructor.+-- | /See:/ 'listRules' smart constructor. data ListRules = ListRules'- { _lrNextToken :: !(Maybe Text)- , _lrNamePrefix :: !(Maybe Text)- , _lrLimit :: !(Maybe Nat)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _lrNextToken :: !(Maybe Text)+ , _lrNamePrefix :: !(Maybe Text)+ , _lrLimit :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListRules' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'lrNextToken' - The token returned by a previous call to indicate that there is more data available.+-- * 'lrNextToken' - The token returned by a previous call to retrieve the next set of results. -- -- * 'lrNamePrefix' - The prefix matching the rule name. --@@ -70,13 +67,11 @@ listRules :: ListRules listRules =- ListRules'- { _lrNextToken = Nothing- , _lrNamePrefix = Nothing- , _lrLimit = Nothing- }+ ListRules'+ {_lrNextToken = Nothing, _lrNamePrefix = Nothing, _lrLimit = Nothing} --- | The token returned by a previous call to indicate that there is more data available.++-- | The token returned by a previous call to retrieve the next set of results. lrNextToken :: Lens' ListRules (Maybe Text) lrNextToken = lens _lrNextToken (\ s a -> s{_lrNextToken = a}); @@ -98,9 +93,9 @@ (x .?> "Rules" .!@ mempty) <*> (x .?> "NextToken") <*> (pure (fromEnum s))) -instance Hashable ListRules+instance Hashable ListRules where -instance NFData ListRules+instance NFData ListRules where instance ToHeaders ListRules where toHeaders@@ -125,41 +120,39 @@ instance ToQuery ListRules where toQuery = const mempty --- | The result of the 'ListRules' operation.------------ /See:/ 'listRulesResponse' smart constructor.+-- | /See:/ 'listRulesResponse' smart constructor. data ListRulesResponse = ListRulesResponse'- { _lrrsRules :: !(Maybe [Rule])- , _lrrsNextToken :: !(Maybe Text)- , _lrrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _lrrsRules :: !(Maybe [Rule])+ , _lrrsNextToken :: !(Maybe Text)+ , _lrrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListRulesResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'lrrsRules' - List of rules matching the specified criteria.+-- * 'lrrsRules' - The rules that match the specified criteria. ----- * 'lrrsNextToken' - Indicates that there are additional results to retrieve.+-- * 'lrrsNextToken' - Indicates whether there are additional results to retrieve. If there are no more results, the value is null. -- -- * 'lrrsResponseStatus' - -- | The response status code. listRulesResponse :: Int -- ^ 'lrrsResponseStatus' -> ListRulesResponse listRulesResponse pResponseStatus_ =- ListRulesResponse'- { _lrrsRules = Nothing- , _lrrsNextToken = Nothing- , _lrrsResponseStatus = pResponseStatus_- }+ ListRulesResponse'+ { _lrrsRules = Nothing+ , _lrrsNextToken = Nothing+ , _lrrsResponseStatus = pResponseStatus_+ } --- | List of rules matching the specified criteria.++-- | The rules that match the specified criteria. lrrsRules :: Lens' ListRulesResponse [Rule] lrrsRules = lens _lrrsRules (\ s a -> s{_lrrsRules = a}) . _Default . _Coerce; --- | Indicates that there are additional results to retrieve.+-- | Indicates whether there are additional results to retrieve. If there are no more results, the value is null. lrrsNextToken :: Lens' ListRulesResponse (Maybe Text) lrrsNextToken = lens _lrrsNextToken (\ s a -> s{_lrrsNextToken = a}); @@ -167,4 +160,4 @@ lrrsResponseStatus :: Lens' ListRulesResponse Int lrrsResponseStatus = lens _lrrsResponseStatus (\ s a -> s{_lrrsResponseStatus = a}); -instance NFData ListRulesResponse+instance NFData ListRulesResponse where
gen/Network/AWS/CloudWatchEvents/ListTargetsByRule.hs view
@@ -12,13 +12,13 @@ -- | -- Module : Network.AWS.CloudWatchEvents.ListTargetsByRule--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Lists of targets assigned to the rule.+-- Lists the targets assigned to the specified rule. -- -- module Network.AWS.CloudWatchEvents.ListTargetsByRule@@ -40,44 +40,39 @@ , ltbrrsResponseStatus ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'ListTargetsByRule' operation.------------ /See:/ 'listTargetsByRule' smart constructor.+-- | /See:/ 'listTargetsByRule' smart constructor. data ListTargetsByRule = ListTargetsByRule'- { _ltbrNextToken :: !(Maybe Text)- , _ltbrLimit :: !(Maybe Nat)- , _ltbrRule :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _ltbrNextToken :: !(Maybe Text)+ , _ltbrLimit :: !(Maybe Nat)+ , _ltbrRule :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListTargetsByRule' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'ltbrNextToken' - The token returned by a previous call to indicate that there is more data available.+-- * 'ltbrNextToken' - The token returned by a previous call to retrieve the next set of results. -- -- * 'ltbrLimit' - The maximum number of results to return. ----- * 'ltbrRule' - The name of the rule whose targets you want to list.+-- * 'ltbrRule' - The name of the rule. listTargetsByRule :: Text -- ^ 'ltbrRule' -> ListTargetsByRule listTargetsByRule pRule_ =- ListTargetsByRule'- { _ltbrNextToken = Nothing- , _ltbrLimit = Nothing- , _ltbrRule = pRule_- }+ ListTargetsByRule'+ {_ltbrNextToken = Nothing, _ltbrLimit = Nothing, _ltbrRule = pRule_} --- | The token returned by a previous call to indicate that there is more data available.++-- | The token returned by a previous call to retrieve the next set of results. ltbrNextToken :: Lens' ListTargetsByRule (Maybe Text) ltbrNextToken = lens _ltbrNextToken (\ s a -> s{_ltbrNextToken = a}); @@ -85,7 +80,7 @@ ltbrLimit :: Lens' ListTargetsByRule (Maybe Natural) ltbrLimit = lens _ltbrLimit (\ s a -> s{_ltbrLimit = a}) . mapping _Nat; --- | The name of the rule whose targets you want to list.+-- | The name of the rule. ltbrRule :: Lens' ListTargetsByRule Text ltbrRule = lens _ltbrRule (\ s a -> s{_ltbrRule = a}); @@ -96,12 +91,12 @@ = receiveJSON (\ s h x -> ListTargetsByRuleResponse' <$>- (x .?> "NextToken") <*> (x .?> "Targets" .!@ mempty)- <*> (pure (fromEnum s)))+ (x .?> "NextToken") <*> (x .?> "Targets") <*>+ (pure (fromEnum s))) -instance Hashable ListTargetsByRule+instance Hashable ListTargetsByRule where -instance NFData ListTargetsByRule+instance NFData ListTargetsByRule where instance ToHeaders ListTargetsByRule where toHeaders@@ -126,46 +121,44 @@ instance ToQuery ListTargetsByRule where toQuery = const mempty --- | The result of the 'ListTargetsByRule' operation.------------ /See:/ 'listTargetsByRuleResponse' smart constructor.+-- | /See:/ 'listTargetsByRuleResponse' smart constructor. data ListTargetsByRuleResponse = ListTargetsByRuleResponse'- { _ltbrrsNextToken :: !(Maybe Text)- , _ltbrrsTargets :: !(Maybe [Target])- , _ltbrrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _ltbrrsNextToken :: !(Maybe Text)+ , _ltbrrsTargets :: !(Maybe (List1 Target))+ , _ltbrrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'ListTargetsByRuleResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'ltbrrsNextToken' - Indicates that there are additional results to retrieve.+-- * 'ltbrrsNextToken' - Indicates whether there are additional results to retrieve. If there are no more results, the value is null. ----- * 'ltbrrsTargets' - Lists the targets assigned to the rule.+-- * 'ltbrrsTargets' - The targets assigned to the rule. -- -- * 'ltbrrsResponseStatus' - -- | The response status code. listTargetsByRuleResponse :: Int -- ^ 'ltbrrsResponseStatus' -> ListTargetsByRuleResponse listTargetsByRuleResponse pResponseStatus_ =- ListTargetsByRuleResponse'- { _ltbrrsNextToken = Nothing- , _ltbrrsTargets = Nothing- , _ltbrrsResponseStatus = pResponseStatus_- }+ ListTargetsByRuleResponse'+ { _ltbrrsNextToken = Nothing+ , _ltbrrsTargets = Nothing+ , _ltbrrsResponseStatus = pResponseStatus_+ } --- | Indicates that there are additional results to retrieve.++-- | Indicates whether there are additional results to retrieve. If there are no more results, the value is null. ltbrrsNextToken :: Lens' ListTargetsByRuleResponse (Maybe Text) ltbrrsNextToken = lens _ltbrrsNextToken (\ s a -> s{_ltbrrsNextToken = a}); --- | Lists the targets assigned to the rule.-ltbrrsTargets :: Lens' ListTargetsByRuleResponse [Target]-ltbrrsTargets = lens _ltbrrsTargets (\ s a -> s{_ltbrrsTargets = a}) . _Default . _Coerce;+-- | The targets assigned to the rule.+ltbrrsTargets :: Lens' ListTargetsByRuleResponse (Maybe (NonEmpty Target))+ltbrrsTargets = lens _ltbrrsTargets (\ s a -> s{_ltbrrsTargets = a}) . mapping _List1; -- | -- | The response status code. ltbrrsResponseStatus :: Lens' ListTargetsByRuleResponse Int ltbrrsResponseStatus = lens _ltbrrsResponseStatus (\ s a -> s{_ltbrrsResponseStatus = a}); -instance NFData ListTargetsByRuleResponse+instance NFData ListTargetsByRuleResponse where
gen/Network/AWS/CloudWatchEvents/PutEvents.hs view
@@ -12,9 +12,9 @@ -- | -- Module : Network.AWS.CloudWatchEvents.PutEvents--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -38,22 +38,19 @@ , persResponseStatus ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'PutEvents' operation.------------ /See:/ 'putEvents' smart constructor.+-- | /See:/ 'putEvents' smart constructor. newtype PutEvents = PutEvents'- { _peEntries :: List1 PutEventsRequestEntry- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _peEntries :: List1 PutEventsRequestEntry+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutEvents' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -62,11 +59,9 @@ putEvents :: NonEmpty PutEventsRequestEntry -- ^ 'peEntries' -> PutEvents-putEvents pEntries_ =- PutEvents'- { _peEntries = _List1 # pEntries_- }+putEvents pEntries_ = PutEvents' {_peEntries = _List1 # pEntries_} + -- | The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on. peEntries :: Lens' PutEvents (NonEmpty PutEventsRequestEntry) peEntries = lens _peEntries (\ s a -> s{_peEntries = a}) . _List1;@@ -82,9 +77,9 @@ (x .?> "Entries" .!@ mempty) <*> (pure (fromEnum s))) -instance Hashable PutEvents+instance Hashable PutEvents where -instance NFData PutEvents+instance NFData PutEvents where instance ToHeaders PutEvents where toHeaders@@ -105,41 +100,39 @@ instance ToQuery PutEvents where toQuery = const mempty --- | The result of the 'PutEvents' operation.------------ /See:/ 'putEventsResponse' smart constructor.+-- | /See:/ 'putEventsResponse' smart constructor. data PutEventsResponse = PutEventsResponse'- { _persFailedEntryCount :: !(Maybe Int)- , _persEntries :: !(Maybe [PutEventsResultEntry])- , _persResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _persFailedEntryCount :: !(Maybe Int)+ , _persEntries :: !(Maybe [PutEventsResultEntry])+ , _persResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutEventsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'persFailedEntryCount' - The number of failed entries. ----- * 'persEntries' - A list of successfully and unsuccessfully ingested events results. If the ingestion was successful, the entry will have the event ID in it. If not, then the ErrorCode and ErrorMessage can be used to identify the problem with the entry.+-- * 'persEntries' - The successfully and unsuccessfully ingested events results. If the ingestion was successful, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry. -- -- * 'persResponseStatus' - -- | The response status code. putEventsResponse :: Int -- ^ 'persResponseStatus' -> PutEventsResponse putEventsResponse pResponseStatus_ =- PutEventsResponse'- { _persFailedEntryCount = Nothing- , _persEntries = Nothing- , _persResponseStatus = pResponseStatus_- }+ PutEventsResponse'+ { _persFailedEntryCount = Nothing+ , _persEntries = Nothing+ , _persResponseStatus = pResponseStatus_+ } + -- | The number of failed entries. persFailedEntryCount :: Lens' PutEventsResponse (Maybe Int) persFailedEntryCount = lens _persFailedEntryCount (\ s a -> s{_persFailedEntryCount = a}); --- | A list of successfully and unsuccessfully ingested events results. If the ingestion was successful, the entry will have the event ID in it. If not, then the ErrorCode and ErrorMessage can be used to identify the problem with the entry.+-- | The successfully and unsuccessfully ingested events results. If the ingestion was successful, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry. persEntries :: Lens' PutEventsResponse [PutEventsResultEntry] persEntries = lens _persEntries (\ s a -> s{_persEntries = a}) . _Default . _Coerce; @@ -147,4 +140,4 @@ persResponseStatus :: Lens' PutEventsResponse Int persResponseStatus = lens _persResponseStatus (\ s a -> s{_persResponseStatus = a}); -instance NFData PutEventsResponse+instance NFData PutEventsResponse where
+ gen/Network/AWS/CloudWatchEvents/PutPermission.hs view
@@ -0,0 +1,139 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CloudWatchEvents.PutPermission+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Running @PutPermission@ permits the specified AWS account to put events to your account's default /event bus/ . CloudWatch Events rules in your account are triggered by these events arriving to your default event bus.+--+--+-- For another account to send events to your account, that external account must have a CloudWatch Events rule with your account's default event bus as a target.+--+-- To enable multiple AWS accounts to put events to your default event bus, run @PutPermission@ once for each of these accounts.+--+-- The permission policy on the default event bus cannot exceed 10KB in size.+--+module Network.AWS.CloudWatchEvents.PutPermission+ (+ -- * Creating a Request+ putPermission+ , PutPermission+ -- * Request Lenses+ , ppAction+ , ppPrincipal+ , ppStatementId++ -- * Destructuring the Response+ , putPermissionResponse+ , PutPermissionResponse+ ) where++import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'putPermission' smart constructor.+data PutPermission = PutPermission'+ { _ppAction :: !Text+ , _ppPrincipal :: !Text+ , _ppStatementId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PutPermission' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ppAction' - The action that you are enabling the other account to perform. Currently, this must be @events:PutEvents@ .+--+-- * 'ppPrincipal' - The 12-digit AWS account ID that you are permitting to put events to your default event bus. Specify "*" to permit any account to put events to your default event bus. If you specify "*", avoid creating rules that may match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an @account@ field with a specific account ID from which to receive events. Rules with an account field do not match any events sent from other accounts.+--+-- * 'ppStatementId' - An identifier string for the external account that you are granting permissions to. If you later want to revoke the permission for this external account, specify this @StatementId@ when you run 'RemovePermission' .+putPermission+ :: Text -- ^ 'ppAction'+ -> Text -- ^ 'ppPrincipal'+ -> Text -- ^ 'ppStatementId'+ -> PutPermission+putPermission pAction_ pPrincipal_ pStatementId_ =+ PutPermission'+ { _ppAction = pAction_+ , _ppPrincipal = pPrincipal_+ , _ppStatementId = pStatementId_+ }+++-- | The action that you are enabling the other account to perform. Currently, this must be @events:PutEvents@ .+ppAction :: Lens' PutPermission Text+ppAction = lens _ppAction (\ s a -> s{_ppAction = a});++-- | The 12-digit AWS account ID that you are permitting to put events to your default event bus. Specify "*" to permit any account to put events to your default event bus. If you specify "*", avoid creating rules that may match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an @account@ field with a specific account ID from which to receive events. Rules with an account field do not match any events sent from other accounts.+ppPrincipal :: Lens' PutPermission Text+ppPrincipal = lens _ppPrincipal (\ s a -> s{_ppPrincipal = a});++-- | An identifier string for the external account that you are granting permissions to. If you later want to revoke the permission for this external account, specify this @StatementId@ when you run 'RemovePermission' .+ppStatementId :: Lens' PutPermission Text+ppStatementId = lens _ppStatementId (\ s a -> s{_ppStatementId = a});++instance AWSRequest PutPermission where+ type Rs PutPermission = PutPermissionResponse+ request = postJSON cloudWatchEvents+ response = receiveNull PutPermissionResponse'++instance Hashable PutPermission where++instance NFData PutPermission where++instance ToHeaders PutPermission where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSEvents.PutPermission" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON PutPermission where+ toJSON PutPermission'{..}+ = object+ (catMaybes+ [Just ("Action" .= _ppAction),+ Just ("Principal" .= _ppPrincipal),+ Just ("StatementId" .= _ppStatementId)])++instance ToPath PutPermission where+ toPath = const "/"++instance ToQuery PutPermission where+ toQuery = const mempty++-- | /See:/ 'putPermissionResponse' smart constructor.+data PutPermissionResponse =+ PutPermissionResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PutPermissionResponse' with the minimum fields required to make a request.+--+putPermissionResponse+ :: PutPermissionResponse+putPermissionResponse = PutPermissionResponse'+++instance NFData PutPermissionResponse where
gen/Network/AWS/CloudWatchEvents/PutRule.hs view
@@ -12,20 +12,20 @@ -- | -- Module : Network.AWS.CloudWatchEvents.PutRule--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Creates or updates a rule. Rules are enabled by default, or based on value of the State parameter. You can disable a rule using 'DisableRule' .+-- Creates or updates the specified rule. Rules are enabled by default, or based on value of the state. You can disable a rule using 'DisableRule' . -- ----- __Note:__ When you create or update a rule, incoming events might not immediately start matching to new or updated rules. Please allow a short period of time for changes to take effect.+-- When you create or update a rule, incoming events might not immediately start matching to new or updated rules. Please allow a short period of time for changes to take effect. ----- A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule will trigger on matching events as well as on a schedule.+-- A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule triggers on matching events as well as on a schedule. ----- __Note:__ Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.+-- Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match. -- module Network.AWS.CloudWatchEvents.PutRule (@@ -48,36 +48,33 @@ , prrsResponseStatus ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'PutRule' operation.------------ /See:/ 'putRule' smart constructor.+-- | /See:/ 'putRule' smart constructor. data PutRule = PutRule'- { _prEventPattern :: !(Maybe Text)- , _prState :: !(Maybe RuleState)- , _prScheduleExpression :: !(Maybe Text)- , _prDescription :: !(Maybe Text)- , _prRoleARN :: !(Maybe Text)- , _prName :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _prEventPattern :: !(Maybe Text)+ , _prState :: !(Maybe RuleState)+ , _prScheduleExpression :: !(Maybe Text)+ , _prDescription :: !(Maybe Text)+ , _prRoleARN :: !(Maybe Text)+ , _prName :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutRule' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'prEventPattern' - The event pattern.+-- * 'prEventPattern' - The event pattern. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html Events and Event Patterns> in the /Amazon CloudWatch Events User Guide/ . -- -- * 'prState' - Indicates whether the rule is enabled or disabled. ----- * 'prScheduleExpression' - The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".+-- * 'prScheduleExpression' - The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)". -- -- * 'prDescription' - A description of the rule. --@@ -88,16 +85,17 @@ :: Text -- ^ 'prName' -> PutRule putRule pName_ =- PutRule'- { _prEventPattern = Nothing- , _prState = Nothing- , _prScheduleExpression = Nothing- , _prDescription = Nothing- , _prRoleARN = Nothing- , _prName = pName_- }+ PutRule'+ { _prEventPattern = Nothing+ , _prState = Nothing+ , _prScheduleExpression = Nothing+ , _prDescription = Nothing+ , _prRoleARN = Nothing+ , _prName = pName_+ } --- | The event pattern.++-- | The event pattern. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html Events and Event Patterns> in the /Amazon CloudWatch Events User Guide/ . prEventPattern :: Lens' PutRule (Maybe Text) prEventPattern = lens _prEventPattern (\ s a -> s{_prEventPattern = a}); @@ -105,7 +103,7 @@ prState :: Lens' PutRule (Maybe RuleState) prState = lens _prState (\ s a -> s{_prState = a}); --- | The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".+-- | The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)". prScheduleExpression :: Lens' PutRule (Maybe Text) prScheduleExpression = lens _prScheduleExpression (\ s a -> s{_prScheduleExpression = a}); @@ -130,9 +128,9 @@ PutRuleResponse' <$> (x .?> "RuleArn") <*> (pure (fromEnum s))) -instance Hashable PutRule+instance Hashable PutRule where -instance NFData PutRule+instance NFData PutRule where instance ToHeaders PutRule where toHeaders@@ -160,33 +158,29 @@ instance ToQuery PutRule where toQuery = const mempty --- | The result of the 'PutRule' operation.------------ /See:/ 'putRuleResponse' smart constructor.+-- | /See:/ 'putRuleResponse' smart constructor. data PutRuleResponse = PutRuleResponse'- { _prrsRuleARN :: !(Maybe Text)- , _prrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _prrsRuleARN :: !(Maybe Text)+ , _prrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutRuleResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'prrsRuleARN' - The Amazon Resource Name (ARN) that identifies the rule.+-- * 'prrsRuleARN' - The Amazon Resource Name (ARN) of the rule. -- -- * 'prrsResponseStatus' - -- | The response status code. putRuleResponse :: Int -- ^ 'prrsResponseStatus' -> PutRuleResponse putRuleResponse pResponseStatus_ =- PutRuleResponse'- { _prrsRuleARN = Nothing- , _prrsResponseStatus = pResponseStatus_- }+ PutRuleResponse'+ {_prrsRuleARN = Nothing, _prrsResponseStatus = pResponseStatus_} --- | The Amazon Resource Name (ARN) that identifies the rule.++-- | The Amazon Resource Name (ARN) of the rule. prrsRuleARN :: Lens' PutRuleResponse (Maybe Text) prrsRuleARN = lens _prrsRuleARN (\ s a -> s{_prrsRuleARN = a}); @@ -194,4 +188,4 @@ prrsResponseStatus :: Lens' PutRuleResponse Int prrsResponseStatus = lens _prrsResponseStatus (\ s a -> s{_prrsResponseStatus = a}); -instance NFData PutRuleResponse+instance NFData PutRuleResponse where
gen/Network/AWS/CloudWatchEvents/PutTargets.hs view
@@ -12,23 +12,71 @@ -- | -- Module : Network.AWS.CloudWatchEvents.PutTargets--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Adds target(s) to a rule. Targets are the resources that can be invoked when a rule is triggered. For example, AWS Lambda functions, Amazon Kinesis streams, and built-in targets. Updates the target(s) if they are already associated with the role. In other words, if there is already a target with the given target ID, then the target associated with that ID is updated.+-- Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule. -- ----- In order to be able to make API calls against the resources you own, Amazon CloudWatch Events needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, CloudWatch Events relies on resource-based policies. For Amazon Kinesis streams, CloudWatch Events relies on IAM roles. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/EventsTargetPermissions.html Permissions for Sending Events to Targets> in the __/Amazon CloudWatch Developer Guide/ __ .+-- Targets are the resources that are invoked when a rule is triggered. ----- __Input__ and __InputPath__ are mutually-exclusive and optional parameters of a target. When a rule is triggered due to a matched event, if for a target:+-- You can configure the following as targets for CloudWatch Events: ----- * Neither __Input__ nor __InputPath__ is specified, then the entire event is passed to the target in JSON form. * __InputPath__ is specified in the form of JSONPath (e.g. __> .detail__ ), then only the part of the event specified in the path is passed to the target (e.g. only the detail part of the event is passed). * __Input__ is specified in the form of a valid JSON, then the matched event is overridden with this constant.+-- * EC2 instances ----- __Note:__ When you add targets to a rule, when the associated rule triggers, new or updated targets might not be immediately invoked. Please allow a short period of time for changes to take effect.+-- * AWS Lambda functions --+-- * Streams in Amazon Kinesis Streams+--+-- * Delivery streams in Amazon Kinesis Firehose+--+-- * Amazon ECS tasks+--+-- * AWS Step Functions state machines+--+-- * Pipelines in Amazon Code Pipeline+--+-- * Amazon Inspector assessment templates+--+-- * Amazon SNS topics+--+-- * Amazon SQS queues+--+-- * The default event bus of another AWS account+--+--+--+-- Note that creating rules with built-in targets is supported only in the AWS Management Console.+--+-- For some target types, @PutTargets@ provides target-specific parameters. If the target is an Amazon Kinesis stream, you can optionally specify which shard the event goes to by using the @KinesisParameters@ argument. To invoke a command on multiple EC2 instances with one rule, you can use the @RunCommandParameters@ field.+--+-- To be able to make API calls against the resources that you own, Amazon CloudWatch Events needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, CloudWatch Events relies on resource-based policies. For EC2 instances, Amazon Kinesis streams, and AWS Step Functions state machines, CloudWatch Events relies on IAM roles that you specify in the @RoleARN@ argument in @PutTargets@ . For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/auth-and-access-control-cwe.html Authentication and Access Control> in the /Amazon CloudWatch Events User Guide/ .+--+-- If another AWS account is in the same region and has granted you permission (using @PutPermission@ ), you can send events to that account by setting that account's event bus as a target of the rules in your account. To send the matched events to the other account, specify that account's event bus as the @Arn@ when you run @PutTargets@ . If your account sends events to another account, your account is charged for each sent event. Each event sent to antoher account is charged as a custom event. The account receiving the event is not charged. For more information on pricing, see <https://aws.amazon.com/cloudwatch/pricing/ Amazon CloudWatch Pricing> .+--+-- For more information about enabling cross-account events, see 'PutPermission' .+--+-- __Input__ , __InputPath__ and __InputTransformer__ are mutually exclusive and optional parameters of a target. When a rule is triggered due to a matched event:+--+-- * If none of the following arguments are specified for a target, then the entire event is passed to the target in JSON form (unless the target is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from the event is passed to the target).+--+-- * If __Input__ is specified in the form of valid JSON, then the matched event is overridden with this constant.+--+-- * If __InputPath__ is specified in the form of JSONPath (for example, @> .detail@ ), then only the part of the event specified in the path is passed to the target (for example, only the detail part of the event is passed).+--+-- * If __InputTransformer__ is specified, then one or more specified JSONPaths are extracted from the event and used as values in a template that you specify as the input to the target.+--+--+--+-- When you specify @Input@ , @InputPath@ , or @InputTransformer@ , you must use JSON dot notation, not bracket notation.+--+-- When you add targets to a rule and the associated rule triggers soon after, new or updated targets might not be immediately invoked. Please allow a short period of time for changes to take effect.+--+-- This action can partially fail if too many requests are made at the same time. If that happens, @FailedEntryCount@ is non-zero in the response and each entry in @FailedEntries@ provides the ID of the failed target and the error code.+-- module Network.AWS.CloudWatchEvents.PutTargets ( -- * Creating a Request@@ -47,46 +95,42 @@ , ptrsResponseStatus ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'PutTargets' operation.------------ /See:/ 'putTargets' smart constructor.+-- | /See:/ 'putTargets' smart constructor. data PutTargets = PutTargets'- { _ptRule :: !Text- , _ptTargets :: ![Target]- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _ptRule :: !Text+ , _ptTargets :: !(List1 Target)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutTargets' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'ptRule' - The name of the rule you want to add targets to.+-- * 'ptRule' - The name of the rule. ----- * 'ptTargets' - List of targets you want to update or add to the rule.+-- * 'ptTargets' - The targets to update or add to the rule. putTargets :: Text -- ^ 'ptRule'+ -> NonEmpty Target -- ^ 'ptTargets' -> PutTargets-putTargets pRule_ =- PutTargets'- { _ptRule = pRule_- , _ptTargets = mempty- }+putTargets pRule_ pTargets_ =+ PutTargets' {_ptRule = pRule_, _ptTargets = _List1 # pTargets_} --- | The name of the rule you want to add targets to.++-- | The name of the rule. ptRule :: Lens' PutTargets Text ptRule = lens _ptRule (\ s a -> s{_ptRule = a}); --- | List of targets you want to update or add to the rule.-ptTargets :: Lens' PutTargets [Target]-ptTargets = lens _ptTargets (\ s a -> s{_ptTargets = a}) . _Coerce;+-- | The targets to update or add to the rule.+ptTargets :: Lens' PutTargets (NonEmpty Target)+ptTargets = lens _ptTargets (\ s a -> s{_ptTargets = a}) . _List1; instance AWSRequest PutTargets where type Rs PutTargets = PutTargetsResponse@@ -99,9 +143,9 @@ (x .?> "FailedEntries" .!@ mempty) <*> (pure (fromEnum s))) -instance Hashable PutTargets+instance Hashable PutTargets where -instance NFData PutTargets+instance NFData PutTargets where instance ToHeaders PutTargets where toHeaders@@ -125,41 +169,39 @@ instance ToQuery PutTargets where toQuery = const mempty --- | The result of the 'PutTargets' operation.------------ /See:/ 'putTargetsResponse' smart constructor.+-- | /See:/ 'putTargetsResponse' smart constructor. data PutTargetsResponse = PutTargetsResponse'- { _ptrsFailedEntryCount :: !(Maybe Int)- , _ptrsFailedEntries :: !(Maybe [PutTargetsResultEntry])- , _ptrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _ptrsFailedEntryCount :: !(Maybe Int)+ , _ptrsFailedEntries :: !(Maybe [PutTargetsResultEntry])+ , _ptrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutTargetsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ptrsFailedEntryCount' - The number of failed entries. ----- * 'ptrsFailedEntries' - An array of failed target entries.+-- * 'ptrsFailedEntries' - The failed target entries. -- -- * 'ptrsResponseStatus' - -- | The response status code. putTargetsResponse :: Int -- ^ 'ptrsResponseStatus' -> PutTargetsResponse putTargetsResponse pResponseStatus_ =- PutTargetsResponse'- { _ptrsFailedEntryCount = Nothing- , _ptrsFailedEntries = Nothing- , _ptrsResponseStatus = pResponseStatus_- }+ PutTargetsResponse'+ { _ptrsFailedEntryCount = Nothing+ , _ptrsFailedEntries = Nothing+ , _ptrsResponseStatus = pResponseStatus_+ } + -- | The number of failed entries. ptrsFailedEntryCount :: Lens' PutTargetsResponse (Maybe Int) ptrsFailedEntryCount = lens _ptrsFailedEntryCount (\ s a -> s{_ptrsFailedEntryCount = a}); --- | An array of failed target entries.+-- | The failed target entries. ptrsFailedEntries :: Lens' PutTargetsResponse [PutTargetsResultEntry] ptrsFailedEntries = lens _ptrsFailedEntries (\ s a -> s{_ptrsFailedEntries = a}) . _Default . _Coerce; @@ -167,4 +209,4 @@ ptrsResponseStatus :: Lens' PutTargetsResponse Int ptrsResponseStatus = lens _ptrsResponseStatus (\ s a -> s{_ptrsResponseStatus = a}); -instance NFData PutTargetsResponse+instance NFData PutTargetsResponse where
+ gen/Network/AWS/CloudWatchEvents/RemovePermission.hs view
@@ -0,0 +1,108 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CloudWatchEvents.RemovePermission+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Revokes the permission of another AWS account to be able to put events to your default event bus. Specify the account to revoke by the @StatementId@ value that you associated with the account when you granted it permission with @PutPermission@ . You can find the @StatementId@ by using 'DescribeEventBus' .+--+--+module Network.AWS.CloudWatchEvents.RemovePermission+ (+ -- * Creating a Request+ removePermission+ , RemovePermission+ -- * Request Lenses+ , rpStatementId++ -- * Destructuring the Response+ , removePermissionResponse+ , RemovePermissionResponse+ ) where++import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'removePermission' smart constructor.+newtype RemovePermission = RemovePermission'+ { _rpStatementId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RemovePermission' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rpStatementId' - The statement ID corresponding to the account that is no longer allowed to put events to the default event bus.+removePermission+ :: Text -- ^ 'rpStatementId'+ -> RemovePermission+removePermission pStatementId_ =+ RemovePermission' {_rpStatementId = pStatementId_}+++-- | The statement ID corresponding to the account that is no longer allowed to put events to the default event bus.+rpStatementId :: Lens' RemovePermission Text+rpStatementId = lens _rpStatementId (\ s a -> s{_rpStatementId = a});++instance AWSRequest RemovePermission where+ type Rs RemovePermission = RemovePermissionResponse+ request = postJSON cloudWatchEvents+ response = receiveNull RemovePermissionResponse'++instance Hashable RemovePermission where++instance NFData RemovePermission where++instance ToHeaders RemovePermission where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSEvents.RemovePermission" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON RemovePermission where+ toJSON RemovePermission'{..}+ = object+ (catMaybes [Just ("StatementId" .= _rpStatementId)])++instance ToPath RemovePermission where+ toPath = const "/"++instance ToQuery RemovePermission where+ toQuery = const mempty++-- | /See:/ 'removePermissionResponse' smart constructor.+data RemovePermissionResponse =+ RemovePermissionResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RemovePermissionResponse' with the minimum fields required to make a request.+--+removePermissionResponse+ :: RemovePermissionResponse+removePermissionResponse = RemovePermissionResponse'+++instance NFData RemovePermissionResponse where
gen/Network/AWS/CloudWatchEvents/RemoveTargets.hs view
@@ -12,17 +12,19 @@ -- | -- Module : Network.AWS.CloudWatchEvents.RemoveTargets--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Removes target(s) from a rule so that when the rule is triggered, those targets will no longer be invoked.+-- Removes the specified targets from the specified rule. When the rule is triggered, those targets are no longer be invoked. -- ----- __Note:__ When you remove a target, when the associated rule triggers, removed targets might still continue to be invoked. Please allow a short period of time for changes to take effect.+-- When you remove a target, when the associated rule triggers, removed targets might continue to be invoked. Please allow a short period of time for changes to take effect. --+-- This action can partially fail if too many requests are made at the same time. If that happens, @FailedEntryCount@ is non-zero in the response and each entry in @FailedEntries@ provides the ID of the failed target and the error code.+-- module Network.AWS.CloudWatchEvents.RemoveTargets ( -- * Creating a Request@@ -41,45 +43,40 @@ , rtrsResponseStatus ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'RemoveTargets' operation.------------ /See:/ 'removeTargets' smart constructor.+-- | /See:/ 'removeTargets' smart constructor. data RemoveTargets = RemoveTargets'- { _rtRule :: !Text- , _rtIds :: !(List1 Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _rtRule :: !Text+ , _rtIds :: !(List1 Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'RemoveTargets' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'rtRule' - The name of the rule you want to remove targets from.+-- * 'rtRule' - The name of the rule. ----- * 'rtIds' - The list of target IDs to remove from the rule.+-- * 'rtIds' - The IDs of the targets to remove from the rule. removeTargets :: Text -- ^ 'rtRule' -> NonEmpty Text -- ^ 'rtIds' -> RemoveTargets removeTargets pRule_ pIds_ =- RemoveTargets'- { _rtRule = pRule_- , _rtIds = _List1 # pIds_- }+ RemoveTargets' {_rtRule = pRule_, _rtIds = _List1 # pIds_} --- | The name of the rule you want to remove targets from.++-- | The name of the rule. rtRule :: Lens' RemoveTargets Text rtRule = lens _rtRule (\ s a -> s{_rtRule = a}); --- | The list of target IDs to remove from the rule.+-- | The IDs of the targets to remove from the rule. rtIds :: Lens' RemoveTargets (NonEmpty Text) rtIds = lens _rtIds (\ s a -> s{_rtIds = a}) . _List1; @@ -94,9 +91,9 @@ (x .?> "FailedEntries" .!@ mempty) <*> (pure (fromEnum s))) -instance Hashable RemoveTargets+instance Hashable RemoveTargets where -instance NFData RemoveTargets+instance NFData RemoveTargets where instance ToHeaders RemoveTargets where toHeaders@@ -119,41 +116,39 @@ instance ToQuery RemoveTargets where toQuery = const mempty --- | The result of the 'RemoveTargets' operation.------------ /See:/ 'removeTargetsResponse' smart constructor.+-- | /See:/ 'removeTargetsResponse' smart constructor. data RemoveTargetsResponse = RemoveTargetsResponse'- { _rtrsFailedEntryCount :: !(Maybe Int)- , _rtrsFailedEntries :: !(Maybe [RemoveTargetsResultEntry])- , _rtrsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _rtrsFailedEntryCount :: !(Maybe Int)+ , _rtrsFailedEntries :: !(Maybe [RemoveTargetsResultEntry])+ , _rtrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'RemoveTargetsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rtrsFailedEntryCount' - The number of failed entries. ----- * 'rtrsFailedEntries' - An array of failed target entries.+-- * 'rtrsFailedEntries' - The failed target entries. -- -- * 'rtrsResponseStatus' - -- | The response status code. removeTargetsResponse :: Int -- ^ 'rtrsResponseStatus' -> RemoveTargetsResponse removeTargetsResponse pResponseStatus_ =- RemoveTargetsResponse'- { _rtrsFailedEntryCount = Nothing- , _rtrsFailedEntries = Nothing- , _rtrsResponseStatus = pResponseStatus_- }+ RemoveTargetsResponse'+ { _rtrsFailedEntryCount = Nothing+ , _rtrsFailedEntries = Nothing+ , _rtrsResponseStatus = pResponseStatus_+ } + -- | The number of failed entries. rtrsFailedEntryCount :: Lens' RemoveTargetsResponse (Maybe Int) rtrsFailedEntryCount = lens _rtrsFailedEntryCount (\ s a -> s{_rtrsFailedEntryCount = a}); --- | An array of failed target entries.+-- | The failed target entries. rtrsFailedEntries :: Lens' RemoveTargetsResponse [RemoveTargetsResultEntry] rtrsFailedEntries = lens _rtrsFailedEntries (\ s a -> s{_rtrsFailedEntries = a}) . _Default . _Coerce; @@ -161,4 +156,4 @@ rtrsResponseStatus :: Lens' RemoveTargetsResponse Int rtrsResponseStatus = lens _rtrsResponseStatus (\ s a -> s{_rtrsResponseStatus = a}); -instance NFData RemoveTargetsResponse+instance NFData RemoveTargetsResponse where
gen/Network/AWS/CloudWatchEvents/TestEventPattern.hs view
@@ -12,16 +12,16 @@ -- | -- Module : Network.AWS.CloudWatchEvents.TestEventPattern--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Tests whether an event pattern matches the provided event.+-- Tests whether the specified event pattern matches the provided event. -- ----- __Note:__ Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.+-- Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match. -- module Network.AWS.CloudWatchEvents.TestEventPattern (@@ -40,45 +40,40 @@ , teprsResponseStatus ) where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response --- | Container for the parameters to the 'TestEventPattern' operation.------------ /See:/ 'testEventPattern' smart constructor.+-- | /See:/ 'testEventPattern' smart constructor. data TestEventPattern = TestEventPattern'- { _tepEventPattern :: !Text- , _tepEvent :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _tepEventPattern :: !Text+ , _tepEvent :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'TestEventPattern' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'tepEventPattern' - The event pattern you want to test.+-- * 'tepEventPattern' - The event pattern. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html Events and Event Patterns> in the /Amazon CloudWatch Events User Guide/ . ----- * 'tepEvent' - The event in the JSON format to test against the event pattern.+-- * 'tepEvent' - The event, in JSON format, to test against the event pattern. testEventPattern :: Text -- ^ 'tepEventPattern' -> Text -- ^ 'tepEvent' -> TestEventPattern testEventPattern pEventPattern_ pEvent_ =- TestEventPattern'- { _tepEventPattern = pEventPattern_- , _tepEvent = pEvent_- }+ TestEventPattern' {_tepEventPattern = pEventPattern_, _tepEvent = pEvent_} --- | The event pattern you want to test.++-- | The event pattern. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html Events and Event Patterns> in the /Amazon CloudWatch Events User Guide/ . tepEventPattern :: Lens' TestEventPattern Text tepEventPattern = lens _tepEventPattern (\ s a -> s{_tepEventPattern = a}); --- | The event in the JSON format to test against the event pattern.+-- | The event, in JSON format, to test against the event pattern. tepEvent :: Lens' TestEventPattern Text tepEvent = lens _tepEvent (\ s a -> s{_tepEvent = a}); @@ -91,9 +86,9 @@ TestEventPatternResponse' <$> (x .?> "Result") <*> (pure (fromEnum s))) -instance Hashable TestEventPattern+instance Hashable TestEventPattern where -instance NFData TestEventPattern+instance NFData TestEventPattern where instance ToHeaders TestEventPattern where toHeaders@@ -117,16 +112,13 @@ instance ToQuery TestEventPattern where toQuery = const mempty --- | The result of the 'TestEventPattern' operation.------------ /See:/ 'testEventPatternResponse' smart constructor.+-- | /See:/ 'testEventPatternResponse' smart constructor. data TestEventPatternResponse = TestEventPatternResponse'- { _teprsResult :: !(Maybe Bool)- , _teprsResponseStatus :: !Int- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _teprsResult :: !(Maybe Bool)+ , _teprsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'TestEventPatternResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -138,11 +130,10 @@ :: Int -- ^ 'teprsResponseStatus' -> TestEventPatternResponse testEventPatternResponse pResponseStatus_ =- TestEventPatternResponse'- { _teprsResult = Nothing- , _teprsResponseStatus = pResponseStatus_- }+ TestEventPatternResponse'+ {_teprsResult = Nothing, _teprsResponseStatus = pResponseStatus_} + -- | Indicates whether the event matches the event pattern. teprsResult :: Lens' TestEventPatternResponse (Maybe Bool) teprsResult = lens _teprsResult (\ s a -> s{_teprsResult = a});@@ -151,4 +142,4 @@ teprsResponseStatus :: Lens' TestEventPatternResponse Int teprsResponseStatus = lens _teprsResponseStatus (\ s a -> s{_teprsResponseStatus = a}); -instance NFData TestEventPatternResponse+instance NFData TestEventPatternResponse where
gen/Network/AWS/CloudWatchEvents/Types.hs view
@@ -4,9 +4,9 @@ -- | -- Module : Network.AWS.CloudWatchEvents.Types--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --@@ -16,6 +16,7 @@ cloudWatchEvents -- * Errors+ , _PolicyLengthExceededException , _ConcurrentModificationException , _InvalidEventPatternException , _InternalException@@ -25,6 +26,23 @@ -- * RuleState , RuleState (..) + -- * EcsParameters+ , EcsParameters+ , ecsParameters+ , epTaskCount+ , epTaskDefinitionARN++ -- * InputTransformer+ , InputTransformer+ , inputTransformer+ , itInputPathsMap+ , itInputTemplate++ -- * KinesisParameters+ , KinesisParameters+ , kinesisParameters+ , kpPartitionKeyPath+ -- * PutEventsRequestEntry , PutEventsRequestEntry , putEventsRequestEntry@@ -66,47 +84,65 @@ , rDescription , rRoleARN + -- * RunCommandParameters+ , RunCommandParameters+ , runCommandParameters+ , rcpRunCommandTargets++ -- * RunCommandTarget+ , RunCommandTarget+ , runCommandTarget+ , rctKey+ , rctValues+ -- * Target , Target , target+ , tRunCommandParameters+ , tKinesisParameters+ , tInputTransformer , tInput+ , tEcsParameters , tInputPath+ , tRoleARN , tId , tARN ) where -import Network.AWS.CloudWatchEvents.Types.Product-import Network.AWS.CloudWatchEvents.Types.Sum-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Sign.V4+import Network.AWS.CloudWatchEvents.Types.Product+import Network.AWS.CloudWatchEvents.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Sign.V4 -- | API version @2015-10-07@ of the Amazon CloudWatch Events SDK configuration. cloudWatchEvents :: Service cloudWatchEvents =- Service- { _svcAbbrev = "CloudWatchEvents"- , _svcSigner = v4- , _svcPrefix = "events"- , _svcVersion = "2015-10-07"- , _svcEndpoint = defaultEndpoint cloudWatchEvents- , _svcTimeout = Just 70- , _svcCheck = statusSuccess- , _svcError = parseJSONError "CloudWatchEvents"- , _svcRetry = retry- }+ Service+ { _svcAbbrev = "CloudWatchEvents"+ , _svcSigner = v4+ , _svcPrefix = "events"+ , _svcVersion = "2015-10-07"+ , _svcEndpoint = defaultEndpoint cloudWatchEvents+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "CloudWatchEvents"+ , _svcRetry = retry+ } where retry =- Exponential- { _retryBase = 5.0e-2- , _retryGrowth = 2- , _retryAttempts = 5- , _retryCheck = check- }+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ } check e+ | has (hasCode "ThrottledException" . hasStatus 400) e =+ Just "throttled_exception" | has (hasStatus 429) e = Just "too_many_requests" | has (hasCode "ThrottlingException" . hasStatus 400) e =- Just "throttling_exception"+ Just "throttling_exception" | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling" | has (hasStatus 504) e = Just "gateway_timeout" | has (hasStatus 502) e = Just "bad_gateway"@@ -115,35 +151,50 @@ | has (hasStatus 509) e = Just "limit_exceeded" | otherwise = Nothing --- | This exception occurs if there is concurrent modification on rule or target.++-- | The event bus policy is too long. For more information, see the limits. -- --+_PolicyLengthExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_PolicyLengthExceededException =+ _MatchServiceError cloudWatchEvents "PolicyLengthExceededException"+++-- | There is concurrent modification on a rule or target.+--+-- _ConcurrentModificationException :: AsError a => Getting (First ServiceError) a ServiceError _ConcurrentModificationException =- _ServiceError . hasCode "ConcurrentModificationException"+ _MatchServiceError cloudWatchEvents "ConcurrentModificationException" --- | The event pattern is invalid.++-- | The event pattern is not valid. -- -- _InvalidEventPatternException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidEventPatternException =- _ServiceError . hasCode "InvalidEventPatternException"+ _MatchServiceError cloudWatchEvents "InvalidEventPatternException" + -- | This exception occurs due to unexpected causes. -- -- _InternalException :: AsError a => Getting (First ServiceError) a ServiceError-_InternalException = _ServiceError . hasCode "InternalException"+_InternalException = _MatchServiceError cloudWatchEvents "InternalException" --- | The rule does not exist.++-- | An entity that you specified does not exist. -- -- _ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError _ResourceNotFoundException =- _ServiceError . hasCode "ResourceNotFoundException"+ _MatchServiceError cloudWatchEvents "ResourceNotFoundException" --- | This exception occurs if you try to create more rules or add more targets to a rule than allowed by default.++-- | You tried to create more rules or add more targets to a rule than is allowed. -- -- _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError-_LimitExceededException = _ServiceError . hasCode "LimitExceededException"+_LimitExceededException =+ _MatchServiceError cloudWatchEvents "LimitExceededException"+
gen/Network/AWS/CloudWatchEvents/Types/Product.hs view
@@ -9,36 +9,184 @@ -- | -- Module : Network.AWS.CloudWatchEvents.Types.Product--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Network.AWS.CloudWatchEvents.Types.Product where -import Network.AWS.CloudWatchEvents.Types.Sum-import Network.AWS.Lens-import Network.AWS.Prelude+import Network.AWS.CloudWatchEvents.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude --- | Contains information about the event to be used in PutEvents.+-- | The custom parameters to be used when the target is an Amazon ECS cluster. -- -- --+-- /See:/ 'ecsParameters' smart constructor.+data EcsParameters = EcsParameters'+ { _epTaskCount :: !(Maybe Nat)+ , _epTaskDefinitionARN :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'EcsParameters' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'epTaskCount' - The number of tasks to create based on the @TaskDefinition@ . The default is one.+--+-- * 'epTaskDefinitionARN' - The ARN of the task definition to use if the event target is an Amazon ECS cluster.+ecsParameters+ :: Text -- ^ 'epTaskDefinitionARN'+ -> EcsParameters+ecsParameters pTaskDefinitionARN_ =+ EcsParameters'+ {_epTaskCount = Nothing, _epTaskDefinitionARN = pTaskDefinitionARN_}+++-- | The number of tasks to create based on the @TaskDefinition@ . The default is one.+epTaskCount :: Lens' EcsParameters (Maybe Natural)+epTaskCount = lens _epTaskCount (\ s a -> s{_epTaskCount = a}) . mapping _Nat;++-- | The ARN of the task definition to use if the event target is an Amazon ECS cluster.+epTaskDefinitionARN :: Lens' EcsParameters Text+epTaskDefinitionARN = lens _epTaskDefinitionARN (\ s a -> s{_epTaskDefinitionARN = a});++instance FromJSON EcsParameters where+ parseJSON+ = withObject "EcsParameters"+ (\ x ->+ EcsParameters' <$>+ (x .:? "TaskCount") <*> (x .: "TaskDefinitionArn"))++instance Hashable EcsParameters where++instance NFData EcsParameters where++instance ToJSON EcsParameters where+ toJSON EcsParameters'{..}+ = object+ (catMaybes+ [("TaskCount" .=) <$> _epTaskCount,+ Just ("TaskDefinitionArn" .= _epTaskDefinitionARN)])++-- | Contains the parameters needed for you to provide custom input to a target based on one or more pieces of data extracted from the event.+--+--+--+-- /See:/ 'inputTransformer' smart constructor.+data InputTransformer = InputTransformer'+ { _itInputPathsMap :: !(Maybe (Map Text Text))+ , _itInputTemplate :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'InputTransformer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'itInputPathsMap' - Map of JSON paths to be extracted from the event. These are key-value pairs, where each value is a JSON path. You must use JSON dot notation, not bracket notation.+--+-- * 'itInputTemplate' - Input template where you can use the values of the keys from @InputPathsMap@ to customize the data sent to the target.+inputTransformer+ :: Text -- ^ 'itInputTemplate'+ -> InputTransformer+inputTransformer pInputTemplate_ =+ InputTransformer'+ {_itInputPathsMap = Nothing, _itInputTemplate = pInputTemplate_}+++-- | Map of JSON paths to be extracted from the event. These are key-value pairs, where each value is a JSON path. You must use JSON dot notation, not bracket notation.+itInputPathsMap :: Lens' InputTransformer (HashMap Text Text)+itInputPathsMap = lens _itInputPathsMap (\ s a -> s{_itInputPathsMap = a}) . _Default . _Map;++-- | Input template where you can use the values of the keys from @InputPathsMap@ to customize the data sent to the target.+itInputTemplate :: Lens' InputTransformer Text+itInputTemplate = lens _itInputTemplate (\ s a -> s{_itInputTemplate = a});++instance FromJSON InputTransformer where+ parseJSON+ = withObject "InputTransformer"+ (\ x ->+ InputTransformer' <$>+ (x .:? "InputPathsMap" .!= mempty) <*>+ (x .: "InputTemplate"))++instance Hashable InputTransformer where++instance NFData InputTransformer where++instance ToJSON InputTransformer where+ toJSON InputTransformer'{..}+ = object+ (catMaybes+ [("InputPathsMap" .=) <$> _itInputPathsMap,+ Just ("InputTemplate" .= _itInputTemplate)])++-- | This object enables you to specify a JSON path to extract from the event and use as the partition key for the Amazon Kinesis stream, so that you can control the shard to which the event goes. If you do not include this parameter, the default is to use the @eventId@ as the partition key.+--+--+--+-- /See:/ 'kinesisParameters' smart constructor.+newtype KinesisParameters = KinesisParameters'+ { _kpPartitionKeyPath :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'KinesisParameters' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'kpPartitionKeyPath' - The JSON path to be extracted from the event and used as the partition key. For more information, see <http://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#partition-key Amazon Kinesis Streams Key Concepts> in the /Amazon Kinesis Streams Developer Guide/ .+kinesisParameters+ :: Text -- ^ 'kpPartitionKeyPath'+ -> KinesisParameters+kinesisParameters pPartitionKeyPath_ =+ KinesisParameters' {_kpPartitionKeyPath = pPartitionKeyPath_}+++-- | The JSON path to be extracted from the event and used as the partition key. For more information, see <http://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#partition-key Amazon Kinesis Streams Key Concepts> in the /Amazon Kinesis Streams Developer Guide/ .+kpPartitionKeyPath :: Lens' KinesisParameters Text+kpPartitionKeyPath = lens _kpPartitionKeyPath (\ s a -> s{_kpPartitionKeyPath = a});++instance FromJSON KinesisParameters where+ parseJSON+ = withObject "KinesisParameters"+ (\ x ->+ KinesisParameters' <$> (x .: "PartitionKeyPath"))++instance Hashable KinesisParameters where++instance NFData KinesisParameters where++instance ToJSON KinesisParameters where+ toJSON KinesisParameters'{..}+ = object+ (catMaybes+ [Just ("PartitionKeyPath" .= _kpPartitionKeyPath)])++-- | Represents an event to be submitted.+--+--+-- -- /See:/ 'putEventsRequestEntry' smart constructor. data PutEventsRequestEntry = PutEventsRequestEntry'- { _pereTime :: !(Maybe POSIX)- , _pereDetailType :: !(Maybe Text)- , _pereResources :: !(Maybe [Text])- , _pereSource :: !(Maybe Text)- , _pereDetail :: !(Maybe Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _pereTime :: !(Maybe POSIX)+ , _pereDetailType :: !(Maybe Text)+ , _pereResources :: !(Maybe [Text])+ , _pereSource :: !(Maybe Text)+ , _pereDetail :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutEventsRequestEntry' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'pereTime' - Timestamp of event, per <https://www.rfc-editor.org/rfc/rfc3339.txt RFC3339> . If no timestamp is provided, the timestamp of the 'PutEvents' call will be used.+-- * 'pereTime' - The timestamp of the event, per <https://www.rfc-editor.org/rfc/rfc3339.txt RFC3339> . If no timestamp is provided, the timestamp of the 'PutEvents' call is used. -- -- * 'pereDetailType' - Free-form string used to decide what fields to expect in the event detail. --@@ -46,19 +194,20 @@ -- -- * 'pereSource' - The source of the event. ----- * 'pereDetail' - In the JSON sense, an object containing fields, which may also contain nested sub-objects. No constraints are imposed on its contents.+-- * 'pereDetail' - In the JSON sense, an object containing fields, which may also contain nested subobjects. No constraints are imposed on its contents. putEventsRequestEntry :: PutEventsRequestEntry putEventsRequestEntry =- PutEventsRequestEntry'- { _pereTime = Nothing- , _pereDetailType = Nothing- , _pereResources = Nothing- , _pereSource = Nothing- , _pereDetail = Nothing- }+ PutEventsRequestEntry'+ { _pereTime = Nothing+ , _pereDetailType = Nothing+ , _pereResources = Nothing+ , _pereSource = Nothing+ , _pereDetail = Nothing+ } --- | Timestamp of event, per <https://www.rfc-editor.org/rfc/rfc3339.txt RFC3339> . If no timestamp is provided, the timestamp of the 'PutEvents' call will be used.++-- | The timestamp of the event, per <https://www.rfc-editor.org/rfc/rfc3339.txt RFC3339> . If no timestamp is provided, the timestamp of the 'PutEvents' call is used. pereTime :: Lens' PutEventsRequestEntry (Maybe UTCTime) pereTime = lens _pereTime (\ s a -> s{_pereTime = a}) . mapping _Time; @@ -74,13 +223,13 @@ pereSource :: Lens' PutEventsRequestEntry (Maybe Text) pereSource = lens _pereSource (\ s a -> s{_pereSource = a}); --- | In the JSON sense, an object containing fields, which may also contain nested sub-objects. No constraints are imposed on its contents.+-- | In the JSON sense, an object containing fields, which may also contain nested subobjects. No constraints are imposed on its contents. pereDetail :: Lens' PutEventsRequestEntry (Maybe Text) pereDetail = lens _pereDetail (\ s a -> s{_pereDetail = a}); -instance Hashable PutEventsRequestEntry+instance Hashable PutEventsRequestEntry where -instance NFData PutEventsRequestEntry+instance NFData PutEventsRequestEntry where instance ToJSON PutEventsRequestEntry where toJSON PutEventsRequestEntry'{..}@@ -92,44 +241,46 @@ ("Source" .=) <$> _pereSource, ("Detail" .=) <$> _pereDetail]) --- | A PutEventsResult contains a list of PutEventsResultEntry.+-- | Represents an event that failed to be submitted. -- -- -- -- /See:/ 'putEventsResultEntry' smart constructor. data PutEventsResultEntry = PutEventsResultEntry'- { _pereErrorCode :: !(Maybe Text)- , _pereErrorMessage :: !(Maybe Text)- , _pereEventId :: !(Maybe Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _pereErrorCode :: !(Maybe Text)+ , _pereErrorMessage :: !(Maybe Text)+ , _pereEventId :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutEventsResultEntry' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'pereErrorCode' - The error code representing why the event submission failed on this entry.+-- * 'pereErrorCode' - The error code that indicates why the event submission failed. ----- * 'pereErrorMessage' - The error message explaining why the event submission failed on this entry.+-- * 'pereErrorMessage' - The error message that explains why the event submission failed. ----- * 'pereEventId' - The ID of the event submitted to Amazon CloudWatch Events.+-- * 'pereEventId' - The ID of the event. putEventsResultEntry :: PutEventsResultEntry putEventsResultEntry =- PutEventsResultEntry'- { _pereErrorCode = Nothing- , _pereErrorMessage = Nothing- , _pereEventId = Nothing- }+ PutEventsResultEntry'+ { _pereErrorCode = Nothing+ , _pereErrorMessage = Nothing+ , _pereEventId = Nothing+ } --- | The error code representing why the event submission failed on this entry.++-- | The error code that indicates why the event submission failed. pereErrorCode :: Lens' PutEventsResultEntry (Maybe Text) pereErrorCode = lens _pereErrorCode (\ s a -> s{_pereErrorCode = a}); --- | The error message explaining why the event submission failed on this entry.+-- | The error message that explains why the event submission failed. pereErrorMessage :: Lens' PutEventsResultEntry (Maybe Text) pereErrorMessage = lens _pereErrorMessage (\ s a -> s{_pereErrorMessage = a}); --- | The ID of the event submitted to Amazon CloudWatch Events.+-- | The ID of the event. pereEventId :: Lens' PutEventsResultEntry (Maybe Text) pereEventId = lens _pereEventId (\ s a -> s{_pereEventId = a}); @@ -141,48 +292,50 @@ (x .:? "ErrorCode") <*> (x .:? "ErrorMessage") <*> (x .:? "EventId")) -instance Hashable PutEventsResultEntry+instance Hashable PutEventsResultEntry where -instance NFData PutEventsResultEntry+instance NFData PutEventsResultEntry where --- | A PutTargetsResult contains a list of PutTargetsResultEntry.+-- | Represents a target that failed to be added to a rule. -- -- -- -- /See:/ 'putTargetsResultEntry' smart constructor. data PutTargetsResultEntry = PutTargetsResultEntry'- { _ptreTargetId :: !(Maybe Text)- , _ptreErrorCode :: !(Maybe Text)- , _ptreErrorMessage :: !(Maybe Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _ptreTargetId :: !(Maybe Text)+ , _ptreErrorCode :: !(Maybe Text)+ , _ptreErrorMessage :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'PutTargetsResultEntry' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'ptreTargetId' - The ID of the target submitted to Amazon CloudWatch Events.+-- * 'ptreTargetId' - The ID of the target. ----- * 'ptreErrorCode' - The error code representing why the target submission failed on this entry.+-- * 'ptreErrorCode' - The error code that indicates why the target addition failed. If the value is @ConcurrentModificationException@ , too many requests were made at the same time. ----- * 'ptreErrorMessage' - The error message explaining why the target submission failed on this entry.+-- * 'ptreErrorMessage' - The error message that explains why the target addition failed. putTargetsResultEntry :: PutTargetsResultEntry putTargetsResultEntry =- PutTargetsResultEntry'- { _ptreTargetId = Nothing- , _ptreErrorCode = Nothing- , _ptreErrorMessage = Nothing- }+ PutTargetsResultEntry'+ { _ptreTargetId = Nothing+ , _ptreErrorCode = Nothing+ , _ptreErrorMessage = Nothing+ } --- | The ID of the target submitted to Amazon CloudWatch Events.++-- | The ID of the target. ptreTargetId :: Lens' PutTargetsResultEntry (Maybe Text) ptreTargetId = lens _ptreTargetId (\ s a -> s{_ptreTargetId = a}); --- | The error code representing why the target submission failed on this entry.+-- | The error code that indicates why the target addition failed. If the value is @ConcurrentModificationException@ , too many requests were made at the same time. ptreErrorCode :: Lens' PutTargetsResultEntry (Maybe Text) ptreErrorCode = lens _ptreErrorCode (\ s a -> s{_ptreErrorCode = a}); --- | The error message explaining why the target submission failed on this entry.+-- | The error message that explains why the target addition failed. ptreErrorMessage :: Lens' PutTargetsResultEntry (Maybe Text) ptreErrorMessage = lens _ptreErrorMessage (\ s a -> s{_ptreErrorMessage = a}); @@ -194,48 +347,50 @@ (x .:? "TargetId") <*> (x .:? "ErrorCode") <*> (x .:? "ErrorMessage")) -instance Hashable PutTargetsResultEntry+instance Hashable PutTargetsResultEntry where -instance NFData PutTargetsResultEntry+instance NFData PutTargetsResultEntry where --- | The ID of the target requested to be removed from the rule by Amazon CloudWatch Events.+-- | Represents a target that failed to be removed from a rule. -- -- -- -- /See:/ 'removeTargetsResultEntry' smart constructor. data RemoveTargetsResultEntry = RemoveTargetsResultEntry'- { _rtreTargetId :: !(Maybe Text)- , _rtreErrorCode :: !(Maybe Text)- , _rtreErrorMessage :: !(Maybe Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _rtreTargetId :: !(Maybe Text)+ , _rtreErrorCode :: !(Maybe Text)+ , _rtreErrorMessage :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'RemoveTargetsResultEntry' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'rtreTargetId' - The ID of the target requested to be removed by Amazon CloudWatch Events.+-- * 'rtreTargetId' - The ID of the target. ----- * 'rtreErrorCode' - The error code representing why the target removal failed on this entry.+-- * 'rtreErrorCode' - The error code that indicates why the target removal failed. If the value is @ConcurrentModificationException@ , too many requests were made at the same time. ----- * 'rtreErrorMessage' - The error message explaining why the target removal failed on this entry.+-- * 'rtreErrorMessage' - The error message that explains why the target removal failed. removeTargetsResultEntry :: RemoveTargetsResultEntry removeTargetsResultEntry =- RemoveTargetsResultEntry'- { _rtreTargetId = Nothing- , _rtreErrorCode = Nothing- , _rtreErrorMessage = Nothing- }+ RemoveTargetsResultEntry'+ { _rtreTargetId = Nothing+ , _rtreErrorCode = Nothing+ , _rtreErrorMessage = Nothing+ } --- | The ID of the target requested to be removed by Amazon CloudWatch Events.++-- | The ID of the target. rtreTargetId :: Lens' RemoveTargetsResultEntry (Maybe Text) rtreTargetId = lens _rtreTargetId (\ s a -> s{_rtreTargetId = a}); --- | The error code representing why the target removal failed on this entry.+-- | The error code that indicates why the target removal failed. If the value is @ConcurrentModificationException@ , too many requests were made at the same time. rtreErrorCode :: Lens' RemoveTargetsResultEntry (Maybe Text) rtreErrorCode = lens _rtreErrorCode (\ s a -> s{_rtreErrorCode = a}); --- | The error message explaining why the target removal failed on this entry.+-- | The error message that explains why the target removal failed. rtreErrorMessage :: Lens' RemoveTargetsResultEntry (Maybe Text) rtreErrorMessage = lens _rtreErrorMessage (\ s a -> s{_rtreErrorMessage = a}); @@ -247,60 +402,62 @@ (x .:? "TargetId") <*> (x .:? "ErrorCode") <*> (x .:? "ErrorMessage")) -instance Hashable RemoveTargetsResultEntry+instance Hashable RemoveTargetsResultEntry where -instance NFData RemoveTargetsResultEntry+instance NFData RemoveTargetsResultEntry where --- | Contains information about a rule in Amazon CloudWatch Events. A ListRulesResult contains a list of Rules.+-- | Contains information about a rule in Amazon CloudWatch Events. -- -- -- -- /See:/ 'rule' smart constructor. data Rule = Rule'- { _rEventPattern :: !(Maybe Text)- , _rState :: !(Maybe RuleState)- , _rARN :: !(Maybe Text)- , _rScheduleExpression :: !(Maybe Text)- , _rName :: !(Maybe Text)- , _rDescription :: !(Maybe Text)- , _rRoleARN :: !(Maybe Text)- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _rEventPattern :: !(Maybe Text)+ , _rState :: !(Maybe RuleState)+ , _rARN :: !(Maybe Text)+ , _rScheduleExpression :: !(Maybe Text)+ , _rName :: !(Maybe Text)+ , _rDescription :: !(Maybe Text)+ , _rRoleARN :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'Rule' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'rEventPattern' - The event pattern of the rule.+-- * 'rEventPattern' - The event pattern of the rule. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html Events and Event Patterns> in the /Amazon CloudWatch Events User Guide/ . ----- * 'rState' - The rule's state.+-- * 'rState' - The state of the rule. -- -- * 'rARN' - The Amazon Resource Name (ARN) of the rule. -- -- * 'rScheduleExpression' - The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". ----- * 'rName' - The rule's name.+-- * 'rName' - The name of the rule. -- -- * 'rDescription' - The description of the rule. ----- * 'rRoleARN' - The Amazon Resource Name (ARN) associated with the role that is used for target invocation.+-- * 'rRoleARN' - The Amazon Resource Name (ARN) of the role that is used for target invocation. rule :: Rule rule =- Rule'- { _rEventPattern = Nothing- , _rState = Nothing- , _rARN = Nothing- , _rScheduleExpression = Nothing- , _rName = Nothing- , _rDescription = Nothing- , _rRoleARN = Nothing- }+ Rule'+ { _rEventPattern = Nothing+ , _rState = Nothing+ , _rARN = Nothing+ , _rScheduleExpression = Nothing+ , _rName = Nothing+ , _rDescription = Nothing+ , _rRoleARN = Nothing+ } --- | The event pattern of the rule.++-- | The event pattern of the rule. For more information, see <http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html Events and Event Patterns> in the /Amazon CloudWatch Events User Guide/ . rEventPattern :: Lens' Rule (Maybe Text) rEventPattern = lens _rEventPattern (\ s a -> s{_rEventPattern = a}); --- | The rule's state.+-- | The state of the rule. rState :: Lens' Rule (Maybe RuleState) rState = lens _rState (\ s a -> s{_rState = a}); @@ -312,7 +469,7 @@ rScheduleExpression :: Lens' Rule (Maybe Text) rScheduleExpression = lens _rScheduleExpression (\ s a -> s{_rScheduleExpression = a}); --- | The rule's name.+-- | The name of the rule. rName :: Lens' Rule (Maybe Text) rName = lens _rName (\ s a -> s{_rName = a}); @@ -320,7 +477,7 @@ rDescription :: Lens' Rule (Maybe Text) rDescription = lens _rDescription (\ s a -> s{_rDescription = a}); --- | The Amazon Resource Name (ARN) associated with the role that is used for target invocation.+-- | The Amazon Resource Name (ARN) of the role that is used for target invocation. rRoleARN :: Lens' Rule (Maybe Text) rRoleARN = lens _rRoleARN (\ s a -> s{_rRoleARN = a}); @@ -336,62 +493,195 @@ <*> (x .:? "Description") <*> (x .:? "RoleArn")) -instance Hashable Rule+instance Hashable Rule where -instance NFData Rule+instance NFData Rule where --- | Targets are the resources that can be invoked when a rule is triggered. For example, AWS Lambda functions, Amazon Kinesis streams, and built-in targets.+-- | This parameter contains the criteria (either InstanceIds or a tag) used to specify which EC2 instances are to be sent the command. -- ----- __Input__ and __InputPath__ are mutually-exclusive and optional parameters of a target. When a rule is triggered due to a matched event, if for a target: ----- * Neither __Input__ nor __InputPath__ is specified, then the entire event is passed to the target in JSON form. * __InputPath__ is specified in the form of JSONPath (e.g. __> .detail__ ), then only the part of the event specified in the path is passed to the target (e.g. only the detail part of the event is passed). * __Input__ is specified in the form of a valid JSON, then the matched event is overridden with this constant.+-- /See:/ 'runCommandParameters' smart constructor.+newtype RunCommandParameters = RunCommandParameters'+ { _rcpRunCommandTargets :: List1 RunCommandTarget+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RunCommandParameters' with the minimum fields required to make a request. --+-- Use one of the following lenses to modify other fields as desired: --+-- * 'rcpRunCommandTargets' - Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.+runCommandParameters+ :: NonEmpty RunCommandTarget -- ^ 'rcpRunCommandTargets'+ -> RunCommandParameters+runCommandParameters pRunCommandTargets_ =+ RunCommandParameters' {_rcpRunCommandTargets = _List1 # pRunCommandTargets_}+++-- | Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.+rcpRunCommandTargets :: Lens' RunCommandParameters (NonEmpty RunCommandTarget)+rcpRunCommandTargets = lens _rcpRunCommandTargets (\ s a -> s{_rcpRunCommandTargets = a}) . _List1;++instance FromJSON RunCommandParameters where+ parseJSON+ = withObject "RunCommandParameters"+ (\ x ->+ RunCommandParameters' <$> (x .: "RunCommandTargets"))++instance Hashable RunCommandParameters where++instance NFData RunCommandParameters where++instance ToJSON RunCommandParameters where+ toJSON RunCommandParameters'{..}+ = object+ (catMaybes+ [Just+ ("RunCommandTargets" .= _rcpRunCommandTargets)])++-- | Information about the EC2 instances that are to be sent the command, specified as key-value pairs. Each @RunCommandTarget@ block can include only one key, but this key may specify multiple values.+--+--+--+-- /See:/ 'runCommandTarget' smart constructor.+data RunCommandTarget = RunCommandTarget'+ { _rctKey :: !Text+ , _rctValues :: !(List1 Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RunCommandTarget' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rctKey' - Can be either @tag:@ /tag-key/ or @InstanceIds@ .+--+-- * 'rctValues' - If @Key@ is @tag:@ /tag-key/ , @Values@ is a list of tag values. If @Key@ is @InstanceIds@ , @Values@ is a list of Amazon EC2 instance IDs.+runCommandTarget+ :: Text -- ^ 'rctKey'+ -> NonEmpty Text -- ^ 'rctValues'+ -> RunCommandTarget+runCommandTarget pKey_ pValues_ =+ RunCommandTarget' {_rctKey = pKey_, _rctValues = _List1 # pValues_}+++-- | Can be either @tag:@ /tag-key/ or @InstanceIds@ .+rctKey :: Lens' RunCommandTarget Text+rctKey = lens _rctKey (\ s a -> s{_rctKey = a});++-- | If @Key@ is @tag:@ /tag-key/ , @Values@ is a list of tag values. If @Key@ is @InstanceIds@ , @Values@ is a list of Amazon EC2 instance IDs.+rctValues :: Lens' RunCommandTarget (NonEmpty Text)+rctValues = lens _rctValues (\ s a -> s{_rctValues = a}) . _List1;++instance FromJSON RunCommandTarget where+ parseJSON+ = withObject "RunCommandTarget"+ (\ x ->+ RunCommandTarget' <$>+ (x .: "Key") <*> (x .: "Values"))++instance Hashable RunCommandTarget where++instance NFData RunCommandTarget where++instance ToJSON RunCommandTarget where+ toJSON RunCommandTarget'{..}+ = object+ (catMaybes+ [Just ("Key" .= _rctKey),+ Just ("Values" .= _rctValues)])++-- | Targets are the resources to be invoked when a rule is triggered. Target types include EC2 instances, AWS Lambda functions, Amazon Kinesis streams, Amazon ECS tasks, AWS Step Functions state machines, Run Command, and built-in targets.+--+--+-- -- /See:/ 'target' smart constructor. data Target = Target'- { _tInput :: !(Maybe Text)- , _tInputPath :: !(Maybe Text)- , _tId :: !Text- , _tARN :: !Text- } deriving (Eq,Read,Show,Data,Typeable,Generic)+ { _tRunCommandParameters :: !(Maybe RunCommandParameters)+ , _tKinesisParameters :: !(Maybe KinesisParameters)+ , _tInputTransformer :: !(Maybe InputTransformer)+ , _tInput :: !(Maybe Text)+ , _tEcsParameters :: !(Maybe EcsParameters)+ , _tInputPath :: !(Maybe Text)+ , _tRoleARN :: !(Maybe Text)+ , _tId :: !Text+ , _tARN :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic) + -- | Creates a value of 'Target' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: ----- * 'tInput' - Valid JSON text passed to the target. For more information about JSON text, see <http://www.rfc-editor.org/rfc/rfc7159.txt The JavaScript Object Notation (JSON) Data Interchange Format> .+-- * 'tRunCommandParameters' - Parameters used when you are using the rule to invoke Amazon EC2 Run Command. ----- * 'tInputPath' - The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. For more information about JSON paths, see <http://goessner.net/articles/JsonPath/ JSONPath> .+-- * 'tKinesisParameters' - The custom parameter you can use to control shard assignment, when the target is an Amazon Kinesis stream. If you do not include this parameter, the default is to use the @eventId@ as the partition key. ----- * 'tId' - The unique target assignment ID.+-- * 'tInputTransformer' - Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target. ----- * 'tARN' - The Amazon Resource Name (ARN) associated of the target.+-- * 'tInput' - Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. You must use JSON dot notation, not bracket notation. For more information, see <http://www.rfc-editor.org/rfc/rfc7159.txt The JavaScript Object Notation (JSON) Data Interchange Format> .+--+-- * 'tEcsParameters' - Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see <http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html Task Definitions > in the /Amazon EC2 Container Service Developer Guide/ .+--+-- * 'tInputPath' - The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You must use JSON dot notation, not bracket notation. For more information about JSON paths, see <http://goessner.net/articles/JsonPath/ JSONPath> .+--+-- * 'tRoleARN' - The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.+--+-- * 'tId' - The ID of the target.+--+-- * 'tARN' - The Amazon Resource Name (ARN) of the target. target :: Text -- ^ 'tId' -> Text -- ^ 'tARN' -> Target target pId_ pARN_ =- Target'- { _tInput = Nothing- , _tInputPath = Nothing- , _tId = pId_- , _tARN = pARN_- }+ Target'+ { _tRunCommandParameters = Nothing+ , _tKinesisParameters = Nothing+ , _tInputTransformer = Nothing+ , _tInput = Nothing+ , _tEcsParameters = Nothing+ , _tInputPath = Nothing+ , _tRoleARN = Nothing+ , _tId = pId_+ , _tARN = pARN_+ } --- | Valid JSON text passed to the target. For more information about JSON text, see <http://www.rfc-editor.org/rfc/rfc7159.txt The JavaScript Object Notation (JSON) Data Interchange Format> .++-- | Parameters used when you are using the rule to invoke Amazon EC2 Run Command.+tRunCommandParameters :: Lens' Target (Maybe RunCommandParameters)+tRunCommandParameters = lens _tRunCommandParameters (\ s a -> s{_tRunCommandParameters = a});++-- | The custom parameter you can use to control shard assignment, when the target is an Amazon Kinesis stream. If you do not include this parameter, the default is to use the @eventId@ as the partition key.+tKinesisParameters :: Lens' Target (Maybe KinesisParameters)+tKinesisParameters = lens _tKinesisParameters (\ s a -> s{_tKinesisParameters = a});++-- | Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.+tInputTransformer :: Lens' Target (Maybe InputTransformer)+tInputTransformer = lens _tInputTransformer (\ s a -> s{_tInputTransformer = a});++-- | Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. You must use JSON dot notation, not bracket notation. For more information, see <http://www.rfc-editor.org/rfc/rfc7159.txt The JavaScript Object Notation (JSON) Data Interchange Format> . tInput :: Lens' Target (Maybe Text) tInput = lens _tInput (\ s a -> s{_tInput = a}); --- | The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. For more information about JSON paths, see <http://goessner.net/articles/JsonPath/ JSONPath> .+-- | Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see <http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html Task Definitions > in the /Amazon EC2 Container Service Developer Guide/ .+tEcsParameters :: Lens' Target (Maybe EcsParameters)+tEcsParameters = lens _tEcsParameters (\ s a -> s{_tEcsParameters = a});++-- | The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You must use JSON dot notation, not bracket notation. For more information about JSON paths, see <http://goessner.net/articles/JsonPath/ JSONPath> . tInputPath :: Lens' Target (Maybe Text) tInputPath = lens _tInputPath (\ s a -> s{_tInputPath = a}); --- | The unique target assignment ID.+-- | The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.+tRoleARN :: Lens' Target (Maybe Text)+tRoleARN = lens _tRoleARN (\ s a -> s{_tRoleARN = a});++-- | The ID of the target. tId :: Lens' Target Text tId = lens _tId (\ s a -> s{_tId = a}); --- | The Amazon Resource Name (ARN) associated of the target.+-- | The Amazon Resource Name (ARN) of the target. tARN :: Lens' Target Text tARN = lens _tARN (\ s a -> s{_tARN = a}); @@ -400,18 +690,30 @@ = withObject "Target" (\ x -> Target' <$>- (x .:? "Input") <*> (x .:? "InputPath") <*>- (x .: "Id")+ (x .:? "RunCommandParameters") <*>+ (x .:? "KinesisParameters")+ <*> (x .:? "InputTransformer")+ <*> (x .:? "Input")+ <*> (x .:? "EcsParameters")+ <*> (x .:? "InputPath")+ <*> (x .:? "RoleArn")+ <*> (x .: "Id") <*> (x .: "Arn")) -instance Hashable Target+instance Hashable Target where -instance NFData Target+instance NFData Target where instance ToJSON Target where toJSON Target'{..} = object (catMaybes- [("Input" .=) <$> _tInput,+ [("RunCommandParameters" .=) <$>+ _tRunCommandParameters,+ ("KinesisParameters" .=) <$> _tKinesisParameters,+ ("InputTransformer" .=) <$> _tInputTransformer,+ ("Input" .=) <$> _tInput,+ ("EcsParameters" .=) <$> _tEcsParameters, ("InputPath" .=) <$> _tInputPath,- Just ("Id" .= _tId), Just ("Arn" .= _tARN)])+ ("RoleArn" .=) <$> _tRoleARN, Just ("Id" .= _tId),+ Just ("Arn" .= _tARN)])
gen/Network/AWS/CloudWatchEvents/Types/Sum.hs view
@@ -9,20 +9,21 @@ -- | -- Module : Network.AWS.CloudWatchEvents.Types.Sum--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Network.AWS.CloudWatchEvents.Types.Sum where -import Network.AWS.Prelude+import Network.AWS.Prelude data RuleState- = Disabled- | Enabled- deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)+ = Disabled+ | Enabled+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+ instance FromText RuleState where parser = takeLowerText >>= \case
gen/Network/AWS/CloudWatchEvents/Waiters.hs view
@@ -7,15 +7,15 @@ -- | -- Module : Network.AWS.CloudWatchEvents.Waiters--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Network.AWS.CloudWatchEvents.Waiters where -import Network.AWS.CloudWatchEvents.Types-import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Waiter+import Network.AWS.CloudWatchEvents.Types+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Waiter
test/Main.hs view
@@ -2,9 +2,9 @@ -- | -- Module : Main--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) --
test/Test/AWS/Gen/CloudWatchEvents.hs view
@@ -5,20 +5,20 @@ -- | -- Module : Test.AWS.Gen.CloudWatchEvents--- Copyright : (c) 2013-2016 Brendan Hay+-- Copyright : (c) 2013-2017 Brendan Hay -- License : Mozilla Public License, v. 2.0.--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Test.AWS.Gen.CloudWatchEvents where import Data.Proxy+import Network.AWS.CloudWatchEvents+import Test.AWS.CloudWatchEvents.Internal import Test.AWS.Fixture import Test.AWS.Prelude import Test.Tasty-import Network.AWS.CloudWatchEvents-import Test.AWS.CloudWatchEvents.Internal -- Auto-generated: the actual test selection needs to be manually placed into -- the top-level so that real test data can be incrementally added.@@ -43,9 +43,15 @@ -- , requestDisableRule $ -- disableRule --+-- , requestPutPermission $+-- putPermission+-- -- , requestListTargetsByRule $ -- listTargetsByRule --+-- , requestRemovePermission $+-- removePermission+-- -- , requestDescribeRule $ -- describeRule --@@ -58,6 +64,9 @@ -- , requestTestEventPattern $ -- testEventPattern --+-- , requestDescribeEventBus $+-- describeEventBus+-- -- , requestPutTargets $ -- putTargets --@@ -82,9 +91,15 @@ -- , responseDisableRule $ -- disableRuleResponse --+-- , responsePutPermission $+-- putPermissionResponse+-- -- , responseListTargetsByRule $ -- listTargetsByRuleResponse --+-- , responseRemovePermission $+-- removePermissionResponse+-- -- , responseDescribeRule $ -- describeRuleResponse --@@ -97,6 +112,9 @@ -- , responseTestEventPattern $ -- testEventPatternResponse --+-- , responseDescribeEventBus $+-- describeEventBusResponse+-- -- , responsePutTargets $ -- putTargetsResponse --@@ -133,11 +151,21 @@ "DisableRule" "fixture/DisableRule.yaml" +requestPutPermission :: PutPermission -> TestTree+requestPutPermission = req+ "PutPermission"+ "fixture/PutPermission.yaml"+ requestListTargetsByRule :: ListTargetsByRule -> TestTree requestListTargetsByRule = req "ListTargetsByRule" "fixture/ListTargetsByRule.yaml" +requestRemovePermission :: RemovePermission -> TestTree+requestRemovePermission = req+ "RemovePermission"+ "fixture/RemovePermission.yaml"+ requestDescribeRule :: DescribeRule -> TestTree requestDescribeRule = req "DescribeRule"@@ -158,6 +186,11 @@ "TestEventPattern" "fixture/TestEventPattern.yaml" +requestDescribeEventBus :: DescribeEventBus -> TestTree+requestDescribeEventBus = req+ "DescribeEventBus"+ "fixture/DescribeEventBus.yaml"+ requestPutTargets :: PutTargets -> TestTree requestPutTargets = req "PutTargets"@@ -205,6 +238,13 @@ cloudWatchEvents (Proxy :: Proxy DisableRule) +responsePutPermission :: PutPermissionResponse -> TestTree+responsePutPermission = res+ "PutPermissionResponse"+ "fixture/PutPermissionResponse.proto"+ cloudWatchEvents+ (Proxy :: Proxy PutPermission)+ responseListTargetsByRule :: ListTargetsByRuleResponse -> TestTree responseListTargetsByRule = res "ListTargetsByRuleResponse"@@ -212,6 +252,13 @@ cloudWatchEvents (Proxy :: Proxy ListTargetsByRule) +responseRemovePermission :: RemovePermissionResponse -> TestTree+responseRemovePermission = res+ "RemovePermissionResponse"+ "fixture/RemovePermissionResponse.proto"+ cloudWatchEvents+ (Proxy :: Proxy RemovePermission)+ responseDescribeRule :: DescribeRuleResponse -> TestTree responseDescribeRule = res "DescribeRuleResponse"@@ -239,6 +286,13 @@ "fixture/TestEventPatternResponse.proto" cloudWatchEvents (Proxy :: Proxy TestEventPattern)++responseDescribeEventBus :: DescribeEventBusResponse -> TestTree+responseDescribeEventBus = res+ "DescribeEventBusResponse"+ "fixture/DescribeEventBusResponse.proto"+ cloudWatchEvents+ (Proxy :: Proxy DescribeEventBus) responsePutTargets :: PutTargetsResponse -> TestTree responsePutTargets = res