amazonka-dynamodb-streams (empty) → 1.0.0
raw patch · 17 files changed
+2677/−0 lines, 17 filesdep +amazonka-coredep +amazonka-dynamodb-streamsdep +amazonka-testsetup-changed
Dependencies added: amazonka-core, amazonka-dynamodb-streams, amazonka-test, base, bytestring, lens, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +373/−0
- README.md +69/−0
- Setup.hs +2/−0
- amazonka-dynamodb-streams.cabal +112/−0
- gen/Network/AWS/DynamoDBStreams.hs +212/−0
- gen/Network/AWS/DynamoDBStreams/DescribeStream.hs +166/−0
- gen/Network/AWS/DynamoDBStreams/GetRecords.hs +168/−0
- gen/Network/AWS/DynamoDBStreams/GetShardIterator.hs +191/−0
- gen/Network/AWS/DynamoDBStreams/ListStreams.hs +179/−0
- gen/Network/AWS/DynamoDBStreams/Types.hs +194/−0
- gen/Network/AWS/DynamoDBStreams/Types/Product.hs +655/−0
- gen/Network/AWS/DynamoDBStreams/Types/Sum.hs +166/−0
- gen/Network/AWS/DynamoDBStreams/Waiters.hs +20/−0
- test/Main.hs +21/−0
- test/Test/AWS/DynamoDBStreams.hs +26/−0
- test/Test/AWS/DynamoDBStreams/Internal.hs +16/−0
- test/Test/AWS/Gen/DynamoDBStreams.hs +107/−0
+ LICENSE view
@@ -0,0 +1,373 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.++Exhibit B - "Incompatible With Secondary Licenses" Notice+---------------------------------------------------------++ This Source Code Form is "Incompatible With Secondary Licenses", as+ defined by the Mozilla Public License, v. 2.0.
+ README.md view
@@ -0,0 +1,69 @@+# Amazon DynamoDB Streams SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.0.0`+++## Description++Amazon DynamoDB Streams++This is the Amazon DynamoDB Streams API Reference. This guide describes+the low-level API actions for accessing streams and processing stream+records. For information about application development with DynamoDB+Streams, see the+<http://docs.aws.amazon.com/amazondynamodb/latest/developerguide//Streams.html Amazon DynamoDB Developer Guide>.++Note that this document is intended for use with the following DynamoDB+documentation:++- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ Amazon DynamoDB Developer Guide>++- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/ Amazon DynamoDB API Reference>++The following are short descriptions of each low-level DynamoDB Streams+API action, organized by function.++- /DescribeStream/ - Returns detailed information about a particular+ stream.++- /GetRecords/ - Retrieves the stream records from within a shard.++- /GetShardIterator/ - Returns information on how to retrieve the+ streams record from a shard with a given shard ID.++- /ListStreams/ - Returns a list of all the streams associated with+ the current AWS account and endpoint.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-dynamodb-streams)+and the [AWS API Reference](http://dynamodb-preview.s3-website-us-west-2.amazonaws.com/docs/streams-api/Welcome.html).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information and sending requests.++Use of lenses is required for constructing and manipulating types.+This is due to the amount of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-dynamodb-streams` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-dynamodb-streams.cabal view
@@ -0,0 +1,112 @@+name: amazonka-dynamodb-streams+version: 1.0.0+synopsis: Amazon DynamoDB Streams SDK.+homepage: https://github.com/brendanhay/amazonka+license: OtherLicense+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay@gmail.com>+copyright: Copyright (c) 2013-2015 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+extra-source-files: README.md+cabal-version: >= 1.10++description:+ Amazon DynamoDB Streams++ This is the Amazon DynamoDB Streams API Reference. This guide describes+ the low-level API actions for accessing streams and processing stream+ records. For information about application development with DynamoDB+ Streams, see the+ <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide//Streams.html Amazon DynamoDB Developer Guide>.++ Note that this document is intended for use with the following DynamoDB+ documentation:++ - <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ Amazon DynamoDB Developer Guide>++ - <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/ Amazon DynamoDB API Reference>++ The following are short descriptions of each low-level DynamoDB Streams+ API action, organized by function.++ - /DescribeStream/ - Returns detailed information about a particular+ stream.++ - /GetRecords/ - Retrieves the stream records from within a shard.++ - /GetShardIterator/ - Returns information on how to retrieve the+ streams record from a shard with a given shard ID.++ - /ListStreams/ - Returns a list of all the streams associated with+ the current AWS account and endpoint.+ .+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information and sending requests.+ .+ Use of lenses is required for constructing and manipulating types.+ This is due to the amount of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.DynamoDBStreams" and the <http://dynamodb-preview.s3-website-us-west-2.amazonaws.com/docs/streams-api/Welcome.html AWS API Reference>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options: -Wall++ exposed-modules:+ Network.AWS.DynamoDBStreams+ , Network.AWS.DynamoDBStreams.DescribeStream+ , Network.AWS.DynamoDBStreams.GetRecords+ , Network.AWS.DynamoDBStreams.GetShardIterator+ , Network.AWS.DynamoDBStreams.ListStreams+ , Network.AWS.DynamoDBStreams.Types+ , Network.AWS.DynamoDBStreams.Waiters++ other-modules:+ Network.AWS.DynamoDBStreams.Types.Product+ , Network.AWS.DynamoDBStreams.Types.Sum++ build-depends:+ amazonka-core == 1.0.0.*+ , base >= 4.7 && < 5++test-suite amazonka-dynamodb-streams-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs++ ghc-options: -Wall -threaded++ -- This is not comprehensive if modules have manually been added.+ -- It exists to ensure cabal 'somewhat' detects test module changes.+ other-modules:+ Test.AWS.DynamoDBStreams+ , Test.AWS.Gen.DynamoDBStreams+ , Test.AWS.DynamoDBStreams.Internal++ build-depends:+ amazonka-core == 1.0.0+ , amazonka-test == 1.0.0+ , amazonka-dynamodb-streams == 1.0.0+ , base+ , bytestring+ , lens+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ gen/Network/AWS/DynamoDBStreams.hs view
@@ -0,0 +1,212 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.DynamoDBStreams+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Amazon DynamoDB Streams+--+-- This is the Amazon DynamoDB Streams API Reference. This guide describes+-- the low-level API actions for accessing streams and processing stream+-- records. For information about application development with DynamoDB+-- Streams, see the+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide//Streams.html Amazon DynamoDB Developer Guide>.+--+-- Note that this document is intended for use with the following DynamoDB+-- documentation:+--+-- - <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ Amazon DynamoDB Developer Guide>+--+-- - <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/ Amazon DynamoDB API Reference>+--+-- The following are short descriptions of each low-level DynamoDB Streams+-- API action, organized by function.+--+-- - /DescribeStream/ - Returns detailed information about a particular+-- stream.+--+-- - /GetRecords/ - Retrieves the stream records from within a shard.+--+-- - /GetShardIterator/ - Returns information on how to retrieve the+-- streams record from a shard with a given shard ID.+--+-- - /ListStreams/ - Returns a list of all the streams associated with+-- the current AWS account and endpoint.+--+--+-- /See:/ <http://dynamodb-preview.s3-website-us-west-2.amazonaws.com/docs/streams-api/Welcome.html AWS API Reference>+module Network.AWS.DynamoDBStreams+ (+ -- * Service+ DynamoDBStreams++ -- * Errors+ -- $errors++ -- ** ExpiredIteratorException+ , _ExpiredIteratorException++ -- ** InternalServerError+ , _InternalServerError++ -- ** TrimmedDataAccessException+ , _TrimmedDataAccessException++ -- ** ResourceNotFoundException+ , _ResourceNotFoundException++ -- ** LimitExceededException+ , _LimitExceededException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** GetRecords+ , module Network.AWS.DynamoDBStreams.GetRecords++ -- ** GetShardIterator+ , module Network.AWS.DynamoDBStreams.GetShardIterator++ -- ** ListStreams+ , module Network.AWS.DynamoDBStreams.ListStreams++ -- ** DescribeStream+ , module Network.AWS.DynamoDBStreams.DescribeStream++ -- * Types++ -- ** KeyType+ , KeyType (..)++ -- ** OperationType+ , OperationType (..)++ -- ** ShardIteratorType+ , ShardIteratorType (..)++ -- ** StreamStatus+ , StreamStatus (..)++ -- ** StreamViewType+ , StreamViewType (..)++ -- ** AttributeValue+ , AttributeValue+ , attributeValue+ , avL+ , avM+ , avNS+ , avNULL+ , avN+ , avBS+ , avB+ , avSS+ , avS+ , avBOOL++ -- ** KeySchemaElement+ , KeySchemaElement+ , keySchemaElement+ , kseAttributeName+ , kseKeyType++ -- ** Record+ , Record+ , record+ , rEventVersion+ , rDynamodb+ , rAwsRegion+ , rEventName+ , rEventSource+ , rEventId++ -- ** SequenceNumberRange+ , SequenceNumberRange+ , sequenceNumberRange+ , snrStartingSequenceNumber+ , snrEndingSequenceNumber++ -- ** Shard+ , Shard+ , shard+ , sParentShardId+ , sSequenceNumberRange+ , sShardId++ -- ** Stream+ , Stream+ , stream+ , sStreamLabel+ , sStreamARN+ , sTableName++ -- ** StreamDescription+ , StreamDescription+ , streamDescription+ , sdLastEvaluatedShardId+ , sdStreamLabel+ , sdStreamStatus+ , sdKeySchema+ , sdStreamARN+ , sdStreamViewType+ , sdShards+ , sdTableName+ , sdCreationRequestDateTime++ -- ** StreamRecord+ , StreamRecord+ , streamRecord+ , srSequenceNumber+ , srSizeBytes+ , srStreamViewType+ , srKeys+ , srOldImage+ , srNewImage+ ) where++import Network.AWS.DynamoDBStreams.DescribeStream+import Network.AWS.DynamoDBStreams.GetRecords+import Network.AWS.DynamoDBStreams.GetShardIterator+import Network.AWS.DynamoDBStreams.ListStreams+import Network.AWS.DynamoDBStreams.Types+import Network.AWS.DynamoDBStreams.Waiters++{- $errors+Error matchers are designed for use with the functions provided by+<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+This allows catching (and rethrowing) service specific errors returned+by 'DynamoDBStreams'.+-}++{- $operations+Some AWS operations return results that are incomplete and require subsequent+requests in order to obtain the entire result set. The process of sending+subsequent requests to continue where a previous request left off is called+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+1000 objects at a time, and you must send subsequent requests with the+appropriate Marker in order to retrieve the next page of results.++Operations that have an 'AWSPager' instance can transparently perform subsequent+requests, correctly setting Markers and other request facets to iterate through+the entire result set of a truncated API operation. Operations which support+this have an additional note in the documentation.++Many operations have the ability to filter results on the server side. See the+individual operation parameters for details.+-}++{- $waiters+Waiters poll by repeatedly sending a request until some remote success condition+configured by the 'Wait' specification is fulfilled. The 'Wait' specification+determines how many attempts should be made, in addition to delay and retry strategies.+-}
+ gen/Network/AWS/DynamoDBStreams/DescribeStream.hs view
@@ -0,0 +1,166 @@+{-# 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.DynamoDBStreams.DescribeStream+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about a stream, including the current status of the+-- stream, its Amazon Resource Name (ARN), the composition of its shards,+-- and its corresponding DynamoDB table.+--+-- You can call /DescribeStream/ at a maximum rate of 10 times per second.+--+-- Each shard in the stream has a 'SequenceNumberRange' associated with it.+-- If the 'SequenceNumberRange' has a 'StartingSequenceNumber' but no+-- 'EndingSequenceNumber', then the shard is still open (able to receive+-- more stream records). If both 'StartingSequenceNumber' and+-- 'EndingSequenceNumber' are present, the that shared is closed and can no+-- longer receive more data.+--+-- /See:/ <http://dynamodb-preview.s3-website-us-west-2.amazonaws.com/docs/streams-api/API_DescribeStream.html AWS API Reference> for DescribeStream.+module Network.AWS.DynamoDBStreams.DescribeStream+ (+ -- * Creating a Request+ describeStream+ , DescribeStream+ -- * Request Lenses+ , dsExclusiveStartShardId+ , dsLimit+ , dsStreamARN++ -- * Destructuring the Response+ , describeStreamResponse+ , DescribeStreamResponse+ -- * Response Lenses+ , dsrsStreamDescription+ , dsrsStatus+ ) where++import Network.AWS.DynamoDBStreams.Types+import Network.AWS.DynamoDBStreams.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a /DescribeStream/ operation.+--+-- /See:/ 'describeStream' smart constructor.+data DescribeStream = DescribeStream'+ { _dsExclusiveStartShardId :: !(Maybe Text)+ , _dsLimit :: !(Maybe Nat)+ , _dsStreamARN :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeStream' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dsExclusiveStartShardId'+--+-- * 'dsLimit'+--+-- * 'dsStreamARN'+describeStream+ :: Text -- ^ 'dsStreamARN'+ -> DescribeStream+describeStream pStreamARN_ =+ DescribeStream'+ { _dsExclusiveStartShardId = Nothing+ , _dsLimit = Nothing+ , _dsStreamARN = pStreamARN_+ }++-- | The shard ID of the first item that this operation will evaluate. Use+-- the value that was returned for 'LastEvaluatedShardId' in the previous+-- operation.+dsExclusiveStartShardId :: Lens' DescribeStream (Maybe Text)+dsExclusiveStartShardId = lens _dsExclusiveStartShardId (\ s a -> s{_dsExclusiveStartShardId = a});++-- | The maximum number of shard objects to return. The upper limit is 100.+dsLimit :: Lens' DescribeStream (Maybe Natural)+dsLimit = lens _dsLimit (\ s a -> s{_dsLimit = a}) . mapping _Nat;++-- | The Amazon Resource Name (ARN) for the stream.+dsStreamARN :: Lens' DescribeStream Text+dsStreamARN = lens _dsStreamARN (\ s a -> s{_dsStreamARN = a});++instance AWSRequest DescribeStream where+ type Sv DescribeStream = DynamoDBStreams+ type Rs DescribeStream = DescribeStreamResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ DescribeStreamResponse' <$>+ (x .?> "StreamDescription") <*> (pure (fromEnum s)))++instance ToHeaders DescribeStream where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("DynamoDBStreams_20120810.DescribeStream" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.0" :: ByteString)])++instance ToJSON DescribeStream where+ toJSON DescribeStream'{..}+ = object+ ["ExclusiveStartShardId" .= _dsExclusiveStartShardId,+ "Limit" .= _dsLimit, "StreamArn" .= _dsStreamARN]++instance ToPath DescribeStream where+ toPath = const "/"++instance ToQuery DescribeStream where+ toQuery = const mempty++-- | Represents the output of a /DescribeStream/ operation.+--+-- /See:/ 'describeStreamResponse' smart constructor.+data DescribeStreamResponse = DescribeStreamResponse'+ { _dsrsStreamDescription :: !(Maybe StreamDescription)+ , _dsrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeStreamResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dsrsStreamDescription'+--+-- * 'dsrsStatus'+describeStreamResponse+ :: Int -- ^ 'dsrsStatus'+ -> DescribeStreamResponse+describeStreamResponse pStatus_ =+ DescribeStreamResponse'+ { _dsrsStreamDescription = Nothing+ , _dsrsStatus = pStatus_+ }++-- | A complete description of the stream, including its creation date and+-- time, the DynamoDB table associated with the stream, the shard IDs+-- within the stream, and the beginning and ending sequence numbers of+-- stream records within the shards.+dsrsStreamDescription :: Lens' DescribeStreamResponse (Maybe StreamDescription)+dsrsStreamDescription = lens _dsrsStreamDescription (\ s a -> s{_dsrsStreamDescription = a});++-- | The response status code.+dsrsStatus :: Lens' DescribeStreamResponse Int+dsrsStatus = lens _dsrsStatus (\ s a -> s{_dsrsStatus = a});
+ gen/Network/AWS/DynamoDBStreams/GetRecords.hs view
@@ -0,0 +1,168 @@+{-# 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.DynamoDBStreams.GetRecords+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the stream records from a given shard.+--+-- Specify a shard iterator using the 'ShardIterator' parameter. The shard+-- iterator specifies the position in the shard from which you want to+-- start reading stream records sequentially. If there are no stream+-- records available in the portion of the shard that the iterator points+-- to, 'GetRecords' returns an empty list. Note that it might take multiple+-- calls to get to a portion of the shard that contains stream records.+--+-- GetRecords can retrieve a maximum of 1 MB of data or 2000 stream+-- records, whichever comes first.+--+-- /See:/ <http://dynamodb-preview.s3-website-us-west-2.amazonaws.com/docs/streams-api/API_GetRecords.html AWS API Reference> for GetRecords.+module Network.AWS.DynamoDBStreams.GetRecords+ (+ -- * Creating a Request+ getRecords+ , GetRecords+ -- * Request Lenses+ , grLimit+ , grShardIterator++ -- * Destructuring the Response+ , getRecordsResponse+ , GetRecordsResponse+ -- * Response Lenses+ , grrsRecords+ , grrsNextShardIterator+ , grrsStatus+ ) where++import Network.AWS.DynamoDBStreams.Types+import Network.AWS.DynamoDBStreams.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a /GetRecords/ operation.+--+-- /See:/ 'getRecords' smart constructor.+data GetRecords = GetRecords'+ { _grLimit :: !(Maybe Nat)+ , _grShardIterator :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetRecords' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grLimit'+--+-- * 'grShardIterator'+getRecords+ :: Text -- ^ 'grShardIterator'+ -> GetRecords+getRecords pShardIterator_ =+ GetRecords'+ { _grLimit = Nothing+ , _grShardIterator = pShardIterator_+ }++-- | The maximum number of records to return from the shard. The upper limit+-- is 1000.+grLimit :: Lens' GetRecords (Maybe Natural)+grLimit = lens _grLimit (\ s a -> s{_grLimit = a}) . mapping _Nat;++-- | A shard iterator that was retrieved from a previous GetShardIterator+-- operation. This iterator can be used to access the stream records in+-- this shard.+grShardIterator :: Lens' GetRecords Text+grShardIterator = lens _grShardIterator (\ s a -> s{_grShardIterator = a});++instance AWSRequest GetRecords where+ type Sv GetRecords = DynamoDBStreams+ type Rs GetRecords = GetRecordsResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ GetRecordsResponse' <$>+ (x .?> "Records" .!@ mempty) <*>+ (x .?> "NextShardIterator")+ <*> (pure (fromEnum s)))++instance ToHeaders GetRecords where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("DynamoDBStreams_20120810.GetRecords" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.0" :: ByteString)])++instance ToJSON GetRecords where+ toJSON GetRecords'{..}+ = object+ ["Limit" .= _grLimit,+ "ShardIterator" .= _grShardIterator]++instance ToPath GetRecords where+ toPath = const "/"++instance ToQuery GetRecords where+ toQuery = const mempty++-- | Represents the output of a /GetRecords/ operation.+--+-- /See:/ 'getRecordsResponse' smart constructor.+data GetRecordsResponse = GetRecordsResponse'+ { _grrsRecords :: !(Maybe [Record])+ , _grrsNextShardIterator :: !(Maybe Text)+ , _grrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetRecordsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grrsRecords'+--+-- * 'grrsNextShardIterator'+--+-- * 'grrsStatus'+getRecordsResponse+ :: Int -- ^ 'grrsStatus'+ -> GetRecordsResponse+getRecordsResponse pStatus_ =+ GetRecordsResponse'+ { _grrsRecords = Nothing+ , _grrsNextShardIterator = Nothing+ , _grrsStatus = pStatus_+ }++-- | The stream records from the shard, which were retrieved using the shard+-- iterator.+grrsRecords :: Lens' GetRecordsResponse [Record]+grrsRecords = lens _grrsRecords (\ s a -> s{_grrsRecords = a}) . _Default . _Coerce;++-- | The next position in the shard from which to start sequentially reading+-- stream records. If set to 'null', the shard has been closed and the+-- requested iterator will not return any more data.+grrsNextShardIterator :: Lens' GetRecordsResponse (Maybe Text)+grrsNextShardIterator = lens _grrsNextShardIterator (\ s a -> s{_grrsNextShardIterator = a});++-- | The response status code.+grrsStatus :: Lens' GetRecordsResponse Int+grrsStatus = lens _grrsStatus (\ s a -> s{_grrsStatus = a});
+ gen/Network/AWS/DynamoDBStreams/GetShardIterator.hs view
@@ -0,0 +1,191 @@+{-# 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.DynamoDBStreams.GetShardIterator+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a shard iterator. A shard iterator provides information about+-- how to retrieve the stream records from within a shard. Use the shard+-- iterator in a subsequent 'GetRecords' request to read the stream records+-- from the shard.+--+-- A shard iterator expires 15 minutes after it is returned to the+-- requester.+--+-- /See:/ <http://dynamodb-preview.s3-website-us-west-2.amazonaws.com/docs/streams-api/API_GetShardIterator.html AWS API Reference> for GetShardIterator.+module Network.AWS.DynamoDBStreams.GetShardIterator+ (+ -- * Creating a Request+ getShardIterator+ , GetShardIterator+ -- * Request Lenses+ , gsiSequenceNumber+ , gsiStreamARN+ , gsiShardId+ , gsiShardIteratorType++ -- * Destructuring the Response+ , getShardIteratorResponse+ , GetShardIteratorResponse+ -- * Response Lenses+ , gsirsShardIterator+ , gsirsStatus+ ) where++import Network.AWS.DynamoDBStreams.Types+import Network.AWS.DynamoDBStreams.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a /GetShardIterator/ operation.+--+-- /See:/ 'getShardIterator' smart constructor.+data GetShardIterator = GetShardIterator'+ { _gsiSequenceNumber :: !(Maybe Text)+ , _gsiStreamARN :: !Text+ , _gsiShardId :: !Text+ , _gsiShardIteratorType :: !ShardIteratorType+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetShardIterator' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gsiSequenceNumber'+--+-- * 'gsiStreamARN'+--+-- * 'gsiShardId'+--+-- * 'gsiShardIteratorType'+getShardIterator+ :: Text -- ^ 'gsiStreamARN'+ -> Text -- ^ 'gsiShardId'+ -> ShardIteratorType -- ^ 'gsiShardIteratorType'+ -> GetShardIterator+getShardIterator pStreamARN_ pShardId_ pShardIteratorType_ =+ GetShardIterator'+ { _gsiSequenceNumber = Nothing+ , _gsiStreamARN = pStreamARN_+ , _gsiShardId = pShardId_+ , _gsiShardIteratorType = pShardIteratorType_+ }++-- | The sequence number of a stream record in the shard from which to start+-- reading.+gsiSequenceNumber :: Lens' GetShardIterator (Maybe Text)+gsiSequenceNumber = lens _gsiSequenceNumber (\ s a -> s{_gsiSequenceNumber = a});++-- | The Amazon Resource Name (ARN) for the stream.+gsiStreamARN :: Lens' GetShardIterator Text+gsiStreamARN = lens _gsiStreamARN (\ s a -> s{_gsiStreamARN = a});++-- | The identifier of the shard. The iterator will be returned for this+-- shard ID.+gsiShardId :: Lens' GetShardIterator Text+gsiShardId = lens _gsiShardId (\ s a -> s{_gsiShardId = a});++-- | Determines how the shard iterator is used to start reading stream+-- records from the shard:+--+-- - 'AT_SEQUENCE_NUMBER' - Start reading exactly from the position+-- denoted by a specific sequence number.+--+-- - 'AFTER_SEQUENCE_NUMBER' - Start reading right after the position+-- denoted by a specific sequence number.+--+-- - 'TRIM_HORIZON' - Start reading at the last (untrimmed) stream+-- record, which is the oldest record in the shard. In DynamoDB+-- Streams, there is a 24 hour limit on data retention. Stream records+-- whose age exceeds this limit are subject to removal (trimming) from+-- the stream.+--+-- - 'LATEST' - Start reading just after the most recent stream record in+-- the shard, so that you always read the most recent data in the+-- shard.+--+gsiShardIteratorType :: Lens' GetShardIterator ShardIteratorType+gsiShardIteratorType = lens _gsiShardIteratorType (\ s a -> s{_gsiShardIteratorType = a});++instance AWSRequest GetShardIterator where+ type Sv GetShardIterator = DynamoDBStreams+ type Rs GetShardIterator = GetShardIteratorResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ GetShardIteratorResponse' <$>+ (x .?> "ShardIterator") <*> (pure (fromEnum s)))++instance ToHeaders GetShardIterator where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("DynamoDBStreams_20120810.GetShardIterator" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.0" :: ByteString)])++instance ToJSON GetShardIterator where+ toJSON GetShardIterator'{..}+ = object+ ["SequenceNumber" .= _gsiSequenceNumber,+ "StreamArn" .= _gsiStreamARN,+ "ShardId" .= _gsiShardId,+ "ShardIteratorType" .= _gsiShardIteratorType]++instance ToPath GetShardIterator where+ toPath = const "/"++instance ToQuery GetShardIterator where+ toQuery = const mempty++-- | Represents the output of a /GetShardIterator/ operation.+--+-- /See:/ 'getShardIteratorResponse' smart constructor.+data GetShardIteratorResponse = GetShardIteratorResponse'+ { _gsirsShardIterator :: !(Maybe Text)+ , _gsirsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetShardIteratorResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gsirsShardIterator'+--+-- * 'gsirsStatus'+getShardIteratorResponse+ :: Int -- ^ 'gsirsStatus'+ -> GetShardIteratorResponse+getShardIteratorResponse pStatus_ =+ GetShardIteratorResponse'+ { _gsirsShardIterator = Nothing+ , _gsirsStatus = pStatus_+ }++-- | The position in the shard from which to start reading stream records+-- sequentially. A shard iterator specifies this position using the+-- sequence number of a stream record in a shard.+gsirsShardIterator :: Lens' GetShardIteratorResponse (Maybe Text)+gsirsShardIterator = lens _gsirsShardIterator (\ s a -> s{_gsirsShardIterator = a});++-- | The response status code.+gsirsStatus :: Lens' GetShardIteratorResponse Int+gsirsStatus = lens _gsirsStatus (\ s a -> s{_gsirsStatus = a});
+ gen/Network/AWS/DynamoDBStreams/ListStreams.hs view
@@ -0,0 +1,179 @@+{-# 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.DynamoDBStreams.ListStreams+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an array of stream ARNs associated with the current account and+-- endpoint. If the 'TableName' parameter is present, then /ListStreams/+-- will return only the streams ARNs for that table.+--+-- You can call /ListStreams/ at a maximum rate of 5 times per second.+--+-- /See:/ <http://dynamodb-preview.s3-website-us-west-2.amazonaws.com/docs/streams-api/API_ListStreams.html AWS API Reference> for ListStreams.+module Network.AWS.DynamoDBStreams.ListStreams+ (+ -- * Creating a Request+ listStreams+ , ListStreams+ -- * Request Lenses+ , lsExclusiveStartStreamARN+ , lsLimit+ , lsTableName++ -- * Destructuring the Response+ , listStreamsResponse+ , ListStreamsResponse+ -- * Response Lenses+ , lsrsLastEvaluatedStreamARN+ , lsrsStreams+ , lsrsStatus+ ) where++import Network.AWS.DynamoDBStreams.Types+import Network.AWS.DynamoDBStreams.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a /ListStreams/ operation.+--+-- /See:/ 'listStreams' smart constructor.+data ListStreams = ListStreams'+ { _lsExclusiveStartStreamARN :: !(Maybe Text)+ , _lsLimit :: !(Maybe Nat)+ , _lsTableName :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListStreams' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lsExclusiveStartStreamARN'+--+-- * 'lsLimit'+--+-- * 'lsTableName'+listStreams+ :: ListStreams+listStreams =+ ListStreams'+ { _lsExclusiveStartStreamARN = Nothing+ , _lsLimit = Nothing+ , _lsTableName = Nothing+ }++-- | The ARN (Amazon Resource Name) of the first item that this operation+-- will evaluate. Use the value that was returned for+-- 'LastEvaluatedStreamArn' in the previous operation.+lsExclusiveStartStreamARN :: Lens' ListStreams (Maybe Text)+lsExclusiveStartStreamARN = lens _lsExclusiveStartStreamARN (\ s a -> s{_lsExclusiveStartStreamARN = a});++-- | The maximum number of streams to return. The upper limit is 100.+lsLimit :: Lens' ListStreams (Maybe Natural)+lsLimit = lens _lsLimit (\ s a -> s{_lsLimit = a}) . mapping _Nat;++-- | If this parameter is provided, then only the streams associated with+-- this table name are returned.+lsTableName :: Lens' ListStreams (Maybe Text)+lsTableName = lens _lsTableName (\ s a -> s{_lsTableName = a});++instance AWSRequest ListStreams where+ type Sv ListStreams = DynamoDBStreams+ type Rs ListStreams = ListStreamsResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ ListStreamsResponse' <$>+ (x .?> "LastEvaluatedStreamArn") <*>+ (x .?> "Streams" .!@ mempty)+ <*> (pure (fromEnum s)))++instance ToHeaders ListStreams where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("DynamoDBStreams_20120810.ListStreams" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.0" :: ByteString)])++instance ToJSON ListStreams where+ toJSON ListStreams'{..}+ = object+ ["ExclusiveStartStreamArn" .=+ _lsExclusiveStartStreamARN,+ "Limit" .= _lsLimit, "TableName" .= _lsTableName]++instance ToPath ListStreams where+ toPath = const "/"++instance ToQuery ListStreams where+ toQuery = const mempty++-- | Represents the output of a /ListStreams/ operation.+--+-- /See:/ 'listStreamsResponse' smart constructor.+data ListStreamsResponse = ListStreamsResponse'+ { _lsrsLastEvaluatedStreamARN :: !(Maybe Text)+ , _lsrsStreams :: !(Maybe [Stream])+ , _lsrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListStreamsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lsrsLastEvaluatedStreamARN'+--+-- * 'lsrsStreams'+--+-- * 'lsrsStatus'+listStreamsResponse+ :: Int -- ^ 'lsrsStatus'+ -> ListStreamsResponse+listStreamsResponse pStatus_ =+ ListStreamsResponse'+ { _lsrsLastEvaluatedStreamARN = Nothing+ , _lsrsStreams = Nothing+ , _lsrsStatus = pStatus_+ }++-- | The stream ARN of the item where the operation stopped, inclusive of the+-- previous result set. Use this value to start a new operation, excluding+-- this value in the new request.+--+-- If 'LastEvaluatedStreamArn' is empty, then the \"last page\" of results+-- has been processed and there is no more data to be retrieved.+--+-- If 'LastEvaluatedStreamArn' is not empty, it does not necessarily mean+-- that there is more data in the result set. The only way to know when you+-- have reached the end of the result set is when 'LastEvaluatedStreamArn'+-- is empty.+lsrsLastEvaluatedStreamARN :: Lens' ListStreamsResponse (Maybe Text)+lsrsLastEvaluatedStreamARN = lens _lsrsLastEvaluatedStreamARN (\ s a -> s{_lsrsLastEvaluatedStreamARN = a});++-- | A list of stream descriptors associated with the current account and+-- endpoint.+lsrsStreams :: Lens' ListStreamsResponse [Stream]+lsrsStreams = lens _lsrsStreams (\ s a -> s{_lsrsStreams = a}) . _Default . _Coerce;++-- | The response status code.+lsrsStatus :: Lens' ListStreamsResponse Int+lsrsStatus = lens _lsrsStatus (\ s a -> s{_lsrsStatus = a});
+ gen/Network/AWS/DynamoDBStreams/Types.hs view
@@ -0,0 +1,194 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.DynamoDBStreams.Types+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.DynamoDBStreams.Types+ (+ -- * Service+ DynamoDBStreams++ -- * Errors+ , _ExpiredIteratorException+ , _InternalServerError+ , _TrimmedDataAccessException+ , _ResourceNotFoundException+ , _LimitExceededException++ -- * KeyType+ , KeyType (..)++ -- * OperationType+ , OperationType (..)++ -- * ShardIteratorType+ , ShardIteratorType (..)++ -- * StreamStatus+ , StreamStatus (..)++ -- * StreamViewType+ , StreamViewType (..)++ -- * AttributeValue+ , AttributeValue+ , attributeValue+ , avL+ , avM+ , avNS+ , avNULL+ , avN+ , avBS+ , avB+ , avSS+ , avS+ , avBOOL++ -- * KeySchemaElement+ , KeySchemaElement+ , keySchemaElement+ , kseAttributeName+ , kseKeyType++ -- * Record+ , Record+ , record+ , rEventVersion+ , rDynamodb+ , rAwsRegion+ , rEventName+ , rEventSource+ , rEventId++ -- * SequenceNumberRange+ , SequenceNumberRange+ , sequenceNumberRange+ , snrStartingSequenceNumber+ , snrEndingSequenceNumber++ -- * Shard+ , Shard+ , shard+ , sParentShardId+ , sSequenceNumberRange+ , sShardId++ -- * Stream+ , Stream+ , stream+ , sStreamLabel+ , sStreamARN+ , sTableName++ -- * StreamDescription+ , StreamDescription+ , streamDescription+ , sdLastEvaluatedShardId+ , sdStreamLabel+ , sdStreamStatus+ , sdKeySchema+ , sdStreamARN+ , sdStreamViewType+ , sdShards+ , sdTableName+ , sdCreationRequestDateTime++ -- * StreamRecord+ , StreamRecord+ , streamRecord+ , srSequenceNumber+ , srSizeBytes+ , srStreamViewType+ , srKeys+ , srOldImage+ , srNewImage+ ) where++import Network.AWS.DynamoDBStreams.Types.Product+import Network.AWS.DynamoDBStreams.Types.Sum+import Network.AWS.Prelude+import Network.AWS.Sign.V4++-- | Version @2012-08-10@ of the Amazon DynamoDB Streams SDK.+data DynamoDBStreams++instance AWSService DynamoDBStreams where+ type Sg DynamoDBStreams = V4+ service = const svc+ where+ svc =+ Service+ { _svcAbbrev = "DynamoDBStreams"+ , _svcPrefix = "streams.dynamodb"+ , _svcVersion = "2012-08-10"+ , _svcEndpoint = defaultEndpoint svc+ , _svcTimeout = Just 70+ , _svcStatus = statusSuccess+ , _svcError = parseJSONError+ , _svcRetry = retry+ }+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | has (hasStatus 503) e = Just "service_unavailable"+ | has (hasStatus 500) e = Just "general_server_error"+ | has (hasStatus 509) e = Just "limit_exceeded"+ | otherwise = Nothing++-- | The shard iterator has expired and can no longer be used to retrieve+-- stream records. A shard iterator expires 15 minutes after it is+-- retrieved using the /GetShardIterator/ action.+_ExpiredIteratorException :: AsError a => Getting (First ServiceError) a ServiceError+_ExpiredIteratorException = _ServiceError . hasCode "ExpiredIteratorException"++-- | An error occurred on the server side.+_InternalServerError :: AsError a => Getting (First ServiceError) a ServiceError+_InternalServerError = _ServiceError . hasCode "InternalServerError"++-- | The operation attempted to read past the oldest stream record in a+-- shard.+--+-- In DynamoDB Streams, there is a 24 hour limit on data retention. Stream+-- records whose age exceeds this limit are subject to removal (trimming)+-- from the stream. You might receive a TrimmedDataAccessException if:+--+-- - You request a shard iterator with a sequence number older than the+-- trim point (24 hours).+-- - You obtain a shard iterator, but before you use the iterator in a+-- /GetRecords/ request, a stream record in the shard exceeds the 24+-- hour period and is trimmed. This causes the iterator to access a+-- record that no longer exists.+_TrimmedDataAccessException :: AsError a => Getting (First ServiceError) a ServiceError+_TrimmedDataAccessException =+ _ServiceError . hasCode "TrimmedDataAccessException"++-- | The operation tried to access a nonexistent stream.+_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_ResourceNotFoundException =+ _ServiceError . hasCode "ResourceNotFoundException"++-- | Your request rate is too high. The AWS SDKs for DynamoDB automatically+-- retry requests that receive this exception. Your request is eventually+-- successful, unless your retry queue is too large to finish. Reduce the+-- frequency of requests and use exponential backoff. For more information,+-- go to+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#APIRetries Error Retries and Exponential Backoff>+-- in the /Amazon DynamoDB Developer Guide/.+_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_LimitExceededException = _ServiceError . hasCode "LimitExceededException"
+ gen/Network/AWS/DynamoDBStreams/Types/Product.hs view
@@ -0,0 +1,655 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.DynamoDBStreams.Types.Product+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.DynamoDBStreams.Types.Product where++import Network.AWS.DynamoDBStreams.Types.Sum+import Network.AWS.Prelude++-- | Represents the data for an attribute. You can set one, and only one, of+-- the elements.+--+-- Each attribute in an item is a name-value pair. An attribute can be+-- single-valued or multi-valued set. For example, a book item can have+-- title and authors attributes. Each book has one title but can have many+-- authors. The multi-valued attribute is a set; duplicate values are not+-- allowed.+--+-- /See:/ 'attributeValue' smart constructor.+data AttributeValue = AttributeValue'+ { _avL :: !(Maybe [AttributeValue])+ , _avM :: !(Maybe (Map Text AttributeValue))+ , _avNS :: !(Maybe [Text])+ , _avNULL :: !(Maybe Bool)+ , _avN :: !(Maybe Text)+ , _avBS :: !(Maybe [Base64])+ , _avB :: !(Maybe Base64)+ , _avSS :: !(Maybe [Text])+ , _avS :: !(Maybe Text)+ , _avBOOL :: !(Maybe Bool)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AttributeValue' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'avL'+--+-- * 'avM'+--+-- * 'avNS'+--+-- * 'avNULL'+--+-- * 'avN'+--+-- * 'avBS'+--+-- * 'avB'+--+-- * 'avSS'+--+-- * 'avS'+--+-- * 'avBOOL'+attributeValue+ :: AttributeValue+attributeValue =+ AttributeValue'+ { _avL = Nothing+ , _avM = Nothing+ , _avNS = Nothing+ , _avNULL = Nothing+ , _avN = Nothing+ , _avBS = Nothing+ , _avB = Nothing+ , _avSS = Nothing+ , _avS = Nothing+ , _avBOOL = Nothing+ }++-- | A List data type.+avL :: Lens' AttributeValue [AttributeValue]+avL = lens _avL (\ s a -> s{_avL = a}) . _Default . _Coerce;++-- | A Map data type.+avM :: Lens' AttributeValue (HashMap Text AttributeValue)+avM = lens _avM (\ s a -> s{_avM = a}) . _Default . _Map;++-- | A Number Set data type.+avNS :: Lens' AttributeValue [Text]+avNS = lens _avNS (\ s a -> s{_avNS = a}) . _Default . _Coerce;++-- | A Null data type.+avNULL :: Lens' AttributeValue (Maybe Bool)+avNULL = lens _avNULL (\ s a -> s{_avNULL = a});++-- | A Number data type.+avN :: Lens' AttributeValue (Maybe Text)+avN = lens _avN (\ s a -> s{_avN = a});++-- | A Binary Set data type.+avBS :: Lens' AttributeValue [ByteString]+avBS = lens _avBS (\ s a -> s{_avBS = a}) . _Default . _Coerce;++-- | A Binary data type.+avB :: Lens' AttributeValue (Maybe ByteString)+avB = lens _avB (\ s a -> s{_avB = a}) . mapping _Base64;++-- | A String Set data type.+avSS :: Lens' AttributeValue [Text]+avSS = lens _avSS (\ s a -> s{_avSS = a}) . _Default . _Coerce;++-- | A String data type.+avS :: Lens' AttributeValue (Maybe Text)+avS = lens _avS (\ s a -> s{_avS = a});++-- | A Boolean data type.+avBOOL :: Lens' AttributeValue (Maybe Bool)+avBOOL = lens _avBOOL (\ s a -> s{_avBOOL = a});++instance FromJSON AttributeValue where+ parseJSON+ = withObject "AttributeValue"+ (\ x ->+ AttributeValue' <$>+ (x .:? "L" .!= mempty) <*> (x .:? "M" .!= mempty) <*>+ (x .:? "NS" .!= mempty)+ <*> (x .:? "NULL")+ <*> (x .:? "N")+ <*> (x .:? "BS" .!= mempty)+ <*> (x .:? "B")+ <*> (x .:? "SS" .!= mempty)+ <*> (x .:? "S")+ <*> (x .:? "BOOL"))++-- | Represents /a single element/ of a key schema. A key schema specifies+-- the attributes that make up the primary key of a table, or the key+-- attributes of an index.+--+-- A /KeySchemaElement/ represents exactly one attribute of the primary+-- key. For example, a hash type primary key would be represented by one+-- /KeySchemaElement/. A hash-and-range type primary key would require one+-- /KeySchemaElement/ for the hash attribute, and another+-- /KeySchemaElement/ for the range attribute.+--+-- /See:/ 'keySchemaElement' smart constructor.+data KeySchemaElement = KeySchemaElement'+ { _kseAttributeName :: !Text+ , _kseKeyType :: !KeyType+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'KeySchemaElement' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'kseAttributeName'+--+-- * 'kseKeyType'+keySchemaElement+ :: Text -- ^ 'kseAttributeName'+ -> KeyType -- ^ 'kseKeyType'+ -> KeySchemaElement+keySchemaElement pAttributeName_ pKeyType_ =+ KeySchemaElement'+ { _kseAttributeName = pAttributeName_+ , _kseKeyType = pKeyType_+ }++-- | The name of a key attribute.+kseAttributeName :: Lens' KeySchemaElement Text+kseAttributeName = lens _kseAttributeName (\ s a -> s{_kseAttributeName = a});++-- | The attribute data, consisting of the data type and the attribute value+-- itself.+kseKeyType :: Lens' KeySchemaElement KeyType+kseKeyType = lens _kseKeyType (\ s a -> s{_kseKeyType = a});++instance FromJSON KeySchemaElement where+ parseJSON+ = withObject "KeySchemaElement"+ (\ x ->+ KeySchemaElement' <$>+ (x .: "AttributeName") <*> (x .: "KeyType"))++-- | A description of a unique event within a stream.+--+-- /See:/ 'record' smart constructor.+data Record = Record'+ { _rEventVersion :: !(Maybe Text)+ , _rDynamodb :: !(Maybe StreamRecord)+ , _rAwsRegion :: !(Maybe Text)+ , _rEventName :: !(Maybe OperationType)+ , _rEventSource :: !(Maybe Text)+ , _rEventId :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Record' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rEventVersion'+--+-- * 'rDynamodb'+--+-- * 'rAwsRegion'+--+-- * 'rEventName'+--+-- * 'rEventSource'+--+-- * 'rEventId'+record+ :: Record+record =+ Record'+ { _rEventVersion = Nothing+ , _rDynamodb = Nothing+ , _rAwsRegion = Nothing+ , _rEventName = Nothing+ , _rEventSource = Nothing+ , _rEventId = Nothing+ }++-- | The version number of the stream record format. Currently, this is+-- /1.0/.+rEventVersion :: Lens' Record (Maybe Text)+rEventVersion = lens _rEventVersion (\ s a -> s{_rEventVersion = a});++-- | The main body of the stream record, containing all of the+-- DynamoDB-specific fields.+rDynamodb :: Lens' Record (Maybe StreamRecord)+rDynamodb = lens _rDynamodb (\ s a -> s{_rDynamodb = a});++-- | The region in which the /GetRecords/ request was received.+rAwsRegion :: Lens' Record (Maybe Text)+rAwsRegion = lens _rAwsRegion (\ s a -> s{_rAwsRegion = a});++-- | The type of data modification that was performed on the DynamoDB table:+--+-- - 'INSERT' - a new item was added to the table.+--+-- - 'MODIFY' - one or more of the item\'s attributes were updated.+--+-- - 'REMOVE' - the item was deleted from the table+--+rEventName :: Lens' Record (Maybe OperationType)+rEventName = lens _rEventName (\ s a -> s{_rEventName = a});++-- | The AWS service from which the stream record originated. For DynamoDB+-- Streams, this is /aws:dynamodb/.+rEventSource :: Lens' Record (Maybe Text)+rEventSource = lens _rEventSource (\ s a -> s{_rEventSource = a});++-- | A globally unique identifier for the event that was recorded in this+-- stream record.+rEventId :: Lens' Record (Maybe Text)+rEventId = lens _rEventId (\ s a -> s{_rEventId = a});++instance FromJSON Record where+ parseJSON+ = withObject "Record"+ (\ x ->+ Record' <$>+ (x .:? "eventVersion") <*> (x .:? "dynamodb") <*>+ (x .:? "awsRegion")+ <*> (x .:? "eventName")+ <*> (x .:? "eventSource")+ <*> (x .:? "eventID"))++-- | The beginning and ending sequence numbers for the stream records+-- contained within a shard.+--+-- /See:/ 'sequenceNumberRange' smart constructor.+data SequenceNumberRange = SequenceNumberRange'+ { _snrStartingSequenceNumber :: !(Maybe Text)+ , _snrEndingSequenceNumber :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SequenceNumberRange' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'snrStartingSequenceNumber'+--+-- * 'snrEndingSequenceNumber'+sequenceNumberRange+ :: SequenceNumberRange+sequenceNumberRange =+ SequenceNumberRange'+ { _snrStartingSequenceNumber = Nothing+ , _snrEndingSequenceNumber = Nothing+ }++-- | The first sequence number.+snrStartingSequenceNumber :: Lens' SequenceNumberRange (Maybe Text)+snrStartingSequenceNumber = lens _snrStartingSequenceNumber (\ s a -> s{_snrStartingSequenceNumber = a});++-- | The last sequence number.+snrEndingSequenceNumber :: Lens' SequenceNumberRange (Maybe Text)+snrEndingSequenceNumber = lens _snrEndingSequenceNumber (\ s a -> s{_snrEndingSequenceNumber = a});++instance FromJSON SequenceNumberRange where+ parseJSON+ = withObject "SequenceNumberRange"+ (\ x ->+ SequenceNumberRange' <$>+ (x .:? "StartingSequenceNumber") <*>+ (x .:? "EndingSequenceNumber"))++-- | A uniquely identified group of stream records within a stream.+--+-- /See:/ 'shard' smart constructor.+data Shard = Shard'+ { _sParentShardId :: !(Maybe Text)+ , _sSequenceNumberRange :: !(Maybe SequenceNumberRange)+ , _sShardId :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Shard' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sParentShardId'+--+-- * 'sSequenceNumberRange'+--+-- * 'sShardId'+shard+ :: Shard+shard =+ Shard'+ { _sParentShardId = Nothing+ , _sSequenceNumberRange = Nothing+ , _sShardId = Nothing+ }++-- | The shard ID of the current shard\'s parent.+sParentShardId :: Lens' Shard (Maybe Text)+sParentShardId = lens _sParentShardId (\ s a -> s{_sParentShardId = a});++-- | The range of possible sequence numbers for the shard.+sSequenceNumberRange :: Lens' Shard (Maybe SequenceNumberRange)+sSequenceNumberRange = lens _sSequenceNumberRange (\ s a -> s{_sSequenceNumberRange = a});++-- | The system-generated identifier for this shard.+sShardId :: Lens' Shard (Maybe Text)+sShardId = lens _sShardId (\ s a -> s{_sShardId = a});++instance FromJSON Shard where+ parseJSON+ = withObject "Shard"+ (\ x ->+ Shard' <$>+ (x .:? "ParentShardId") <*>+ (x .:? "SequenceNumberRange")+ <*> (x .:? "ShardId"))++-- | Represents all of the data describing a particular stream.+--+-- /See:/ 'stream' smart constructor.+data Stream = Stream'+ { _sStreamLabel :: !(Maybe Text)+ , _sStreamARN :: !(Maybe Text)+ , _sTableName :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Stream' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sStreamLabel'+--+-- * 'sStreamARN'+--+-- * 'sTableName'+stream+ :: Stream+stream =+ Stream'+ { _sStreamLabel = Nothing+ , _sStreamARN = Nothing+ , _sTableName = Nothing+ }++-- | A timestamp, in ISO 8601 format, for this stream.+--+-- Note that /LatestStreamLabel/ is not a unique identifier for the stream,+-- because it is possible that a stream from another table might have the+-- same timestamp. However, the combination of the following three elements+-- is guaranteed to be unique:+--+-- - the AWS customer ID.+--+-- - the table name+--+-- - the /StreamLabel/+--+sStreamLabel :: Lens' Stream (Maybe Text)+sStreamLabel = lens _sStreamLabel (\ s a -> s{_sStreamLabel = a});++-- | The Amazon Resource Name (ARN) for the stream.+sStreamARN :: Lens' Stream (Maybe Text)+sStreamARN = lens _sStreamARN (\ s a -> s{_sStreamARN = a});++-- | The DynamoDB table with which the stream is associated.+sTableName :: Lens' Stream (Maybe Text)+sTableName = lens _sTableName (\ s a -> s{_sTableName = a});++instance FromJSON Stream where+ parseJSON+ = withObject "Stream"+ (\ x ->+ Stream' <$>+ (x .:? "StreamLabel") <*> (x .:? "StreamArn") <*>+ (x .:? "TableName"))++-- | Represents all of the data describing a particular stream.+--+-- /See:/ 'streamDescription' smart constructor.+data StreamDescription = StreamDescription'+ { _sdLastEvaluatedShardId :: !(Maybe Text)+ , _sdStreamLabel :: !(Maybe Text)+ , _sdStreamStatus :: !(Maybe StreamStatus)+ , _sdKeySchema :: !(Maybe (List1 KeySchemaElement))+ , _sdStreamARN :: !(Maybe Text)+ , _sdStreamViewType :: !(Maybe StreamViewType)+ , _sdShards :: !(Maybe [Shard])+ , _sdTableName :: !(Maybe Text)+ , _sdCreationRequestDateTime :: !(Maybe POSIX)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'StreamDescription' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sdLastEvaluatedShardId'+--+-- * 'sdStreamLabel'+--+-- * 'sdStreamStatus'+--+-- * 'sdKeySchema'+--+-- * 'sdStreamARN'+--+-- * 'sdStreamViewType'+--+-- * 'sdShards'+--+-- * 'sdTableName'+--+-- * 'sdCreationRequestDateTime'+streamDescription+ :: StreamDescription+streamDescription =+ StreamDescription'+ { _sdLastEvaluatedShardId = Nothing+ , _sdStreamLabel = Nothing+ , _sdStreamStatus = Nothing+ , _sdKeySchema = Nothing+ , _sdStreamARN = Nothing+ , _sdStreamViewType = Nothing+ , _sdShards = Nothing+ , _sdTableName = Nothing+ , _sdCreationRequestDateTime = Nothing+ }++-- | The shard ID of the item where the operation stopped, inclusive of the+-- previous result set. Use this value to start a new operation, excluding+-- this value in the new request.+--+-- If 'LastEvaluatedShardId' is empty, then the \"last page\" of results+-- has been processed and there is currently no more data to be retrieved.+--+-- If 'LastEvaluatedShardId' is not empty, it does not necessarily mean+-- that there is more data in the result set. The only way to know when you+-- have reached the end of the result set is when 'LastEvaluatedShardId' is+-- empty.+sdLastEvaluatedShardId :: Lens' StreamDescription (Maybe Text)+sdLastEvaluatedShardId = lens _sdLastEvaluatedShardId (\ s a -> s{_sdLastEvaluatedShardId = a});++-- | A timestamp, in ISO 8601 format, for this stream.+--+-- Note that /LatestStreamLabel/ is not a unique identifier for the stream,+-- because it is possible that a stream from another table might have the+-- same timestamp. However, the combination of the following three elements+-- is guaranteed to be unique:+--+-- - the AWS customer ID.+--+-- - the table name+--+-- - the /StreamLabel/+--+sdStreamLabel :: Lens' StreamDescription (Maybe Text)+sdStreamLabel = lens _sdStreamLabel (\ s a -> s{_sdStreamLabel = a});++-- | Indicates the current status of the stream:+--+-- - 'ENABLING' - Streams is currently being enabled on the DynamoDB+-- table.+--+-- - 'ENABLING' - the stream is enabled.+--+-- - 'DISABLING' - Streams is currently being disabled on the DynamoDB+-- table.+--+-- - 'DISABLED' - the stream is disabled.+--+sdStreamStatus :: Lens' StreamDescription (Maybe StreamStatus)+sdStreamStatus = lens _sdStreamStatus (\ s a -> s{_sdStreamStatus = a});++-- | The key attribute(s) of the stream\'s DynamoDB table.+sdKeySchema :: Lens' StreamDescription (Maybe (NonEmpty KeySchemaElement))+sdKeySchema = lens _sdKeySchema (\ s a -> s{_sdKeySchema = a}) . mapping _List1;++-- | The Amazon Resource Name (ARN) for the stream.+sdStreamARN :: Lens' StreamDescription (Maybe Text)+sdStreamARN = lens _sdStreamARN (\ s a -> s{_sdStreamARN = a});++-- | Indicates the format of the records within this stream:+--+-- - 'KEYS_ONLY' - only the key attributes of items that were modified in+-- the DynamoDB table.+--+-- - 'NEW_IMAGE' - entire item from the table, as it appeared after they+-- were modified.+--+-- - 'OLD_IMAGE' - entire item from the table, as it appeared before they+-- were modified.+--+-- - 'NEW_AND_OLD_IMAGES' - both the new and the old images of the items+-- from the table.+--+sdStreamViewType :: Lens' StreamDescription (Maybe StreamViewType)+sdStreamViewType = lens _sdStreamViewType (\ s a -> s{_sdStreamViewType = a});++-- | The shards that comprise the stream.+sdShards :: Lens' StreamDescription [Shard]+sdShards = lens _sdShards (\ s a -> s{_sdShards = a}) . _Default . _Coerce;++-- | The DynamoDB table with which the stream is associated.+sdTableName :: Lens' StreamDescription (Maybe Text)+sdTableName = lens _sdTableName (\ s a -> s{_sdTableName = a});++-- | The date and time when the request to create this stream was issued.+sdCreationRequestDateTime :: Lens' StreamDescription (Maybe UTCTime)+sdCreationRequestDateTime = lens _sdCreationRequestDateTime (\ s a -> s{_sdCreationRequestDateTime = a}) . mapping _Time;++instance FromJSON StreamDescription where+ parseJSON+ = withObject "StreamDescription"+ (\ x ->+ StreamDescription' <$>+ (x .:? "LastEvaluatedShardId") <*>+ (x .:? "StreamLabel")+ <*> (x .:? "StreamStatus")+ <*> (x .:? "KeySchema")+ <*> (x .:? "StreamArn")+ <*> (x .:? "StreamViewType")+ <*> (x .:? "Shards" .!= mempty)+ <*> (x .:? "TableName")+ <*> (x .:? "CreationRequestDateTime"))++-- | A description of a single data modification that was performed on an+-- item in a DynamoDB table.+--+-- /See:/ 'streamRecord' smart constructor.+data StreamRecord = StreamRecord'+ { _srSequenceNumber :: !(Maybe Text)+ , _srSizeBytes :: !(Maybe Nat)+ , _srStreamViewType :: !(Maybe StreamViewType)+ , _srKeys :: !(Maybe (Map Text AttributeValue))+ , _srOldImage :: !(Maybe (Map Text AttributeValue))+ , _srNewImage :: !(Maybe (Map Text AttributeValue))+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'StreamRecord' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'srSequenceNumber'+--+-- * 'srSizeBytes'+--+-- * 'srStreamViewType'+--+-- * 'srKeys'+--+-- * 'srOldImage'+--+-- * 'srNewImage'+streamRecord+ :: StreamRecord+streamRecord =+ StreamRecord'+ { _srSequenceNumber = Nothing+ , _srSizeBytes = Nothing+ , _srStreamViewType = Nothing+ , _srKeys = Nothing+ , _srOldImage = Nothing+ , _srNewImage = Nothing+ }++-- | The sequence number of the stream record.+srSequenceNumber :: Lens' StreamRecord (Maybe Text)+srSequenceNumber = lens _srSequenceNumber (\ s a -> s{_srSequenceNumber = a});++-- | The size of the stream record, in bytes.+srSizeBytes :: Lens' StreamRecord (Maybe Natural)+srSizeBytes = lens _srSizeBytes (\ s a -> s{_srSizeBytes = a}) . mapping _Nat;++-- | The type of data from the modified DynamoDB item that was captured in+-- this stream record:+--+-- - 'KEYS_ONLY' - only the key attributes of the modified item.+--+-- - 'NEW_IMAGE' - the entire item, as it appears after it was modified.+--+-- - 'OLD_IMAGE' - the entire item, as it appeared before it was+-- modified.+--+-- - 'NEW_AND_OLD_IMAGES' — both the new and the old item images of the+-- item.+--+srStreamViewType :: Lens' StreamRecord (Maybe StreamViewType)+srStreamViewType = lens _srStreamViewType (\ s a -> s{_srStreamViewType = a});++-- | The primary key attribute(s) for the DynamoDB item that was modified.+srKeys :: Lens' StreamRecord (HashMap Text AttributeValue)+srKeys = lens _srKeys (\ s a -> s{_srKeys = a}) . _Default . _Map;++-- | The item in the DynamoDB table as it appeared before it was modified.+srOldImage :: Lens' StreamRecord (HashMap Text AttributeValue)+srOldImage = lens _srOldImage (\ s a -> s{_srOldImage = a}) . _Default . _Map;++-- | The item in the DynamoDB table as it appeared after it was modified.+srNewImage :: Lens' StreamRecord (HashMap Text AttributeValue)+srNewImage = lens _srNewImage (\ s a -> s{_srNewImage = a}) . _Default . _Map;++instance FromJSON StreamRecord where+ parseJSON+ = withObject "StreamRecord"+ (\ x ->+ StreamRecord' <$>+ (x .:? "SequenceNumber") <*> (x .:? "SizeBytes") <*>+ (x .:? "StreamViewType")+ <*> (x .:? "Keys" .!= mempty)+ <*> (x .:? "OldImage" .!= mempty)+ <*> (x .:? "NewImage" .!= mempty))
+ gen/Network/AWS/DynamoDBStreams/Types/Sum.hs view
@@ -0,0 +1,166 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.DynamoDBStreams.Types.Sum+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.DynamoDBStreams.Types.Sum where++import Network.AWS.Prelude++data KeyType+ = Hash+ | Range+ deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText KeyType where+ parser = takeLowerText >>= \case+ "hash" -> pure Hash+ "range" -> pure Range+ e -> fromTextError $ "Failure parsing KeyType from value: '" <> e+ <> "'. Accepted values: hash, range"++instance ToText KeyType where+ toText = \case+ Hash -> "hash"+ Range -> "range"++instance Hashable KeyType+instance ToByteString KeyType+instance ToQuery KeyType+instance ToHeader KeyType++instance FromJSON KeyType where+ parseJSON = parseJSONText "KeyType"++data OperationType+ = Insert+ | Modify+ | Remove+ deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText OperationType where+ parser = takeLowerText >>= \case+ "insert" -> pure Insert+ "modify" -> pure Modify+ "remove" -> pure Remove+ e -> fromTextError $ "Failure parsing OperationType from value: '" <> e+ <> "'. Accepted values: insert, modify, remove"++instance ToText OperationType where+ toText = \case+ Insert -> "insert"+ Modify -> "modify"+ Remove -> "remove"++instance Hashable OperationType+instance ToByteString OperationType+instance ToQuery OperationType+instance ToHeader OperationType++instance FromJSON OperationType where+ parseJSON = parseJSONText "OperationType"++data ShardIteratorType+ = AfterSequenceNumber+ | AtSequenceNumber+ | Latest+ | TrimHorizon+ deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText ShardIteratorType where+ parser = takeLowerText >>= \case+ "after_sequence_number" -> pure AfterSequenceNumber+ "at_sequence_number" -> pure AtSequenceNumber+ "latest" -> pure Latest+ "trim_horizon" -> pure TrimHorizon+ e -> fromTextError $ "Failure parsing ShardIteratorType from value: '" <> e+ <> "'. Accepted values: after_sequence_number, at_sequence_number, latest, trim_horizon"++instance ToText ShardIteratorType where+ toText = \case+ AfterSequenceNumber -> "after_sequence_number"+ AtSequenceNumber -> "at_sequence_number"+ Latest -> "latest"+ TrimHorizon -> "trim_horizon"++instance Hashable ShardIteratorType+instance ToByteString ShardIteratorType+instance ToQuery ShardIteratorType+instance ToHeader ShardIteratorType++instance ToJSON ShardIteratorType where+ toJSON = toJSONText++data StreamStatus+ = Disabled+ | Disabling+ | Enabled+ | Enabling+ deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText StreamStatus where+ parser = takeLowerText >>= \case+ "disabled" -> pure Disabled+ "disabling" -> pure Disabling+ "enabled" -> pure Enabled+ "enabling" -> pure Enabling+ e -> fromTextError $ "Failure parsing StreamStatus from value: '" <> e+ <> "'. Accepted values: disabled, disabling, enabled, enabling"++instance ToText StreamStatus where+ toText = \case+ Disabled -> "disabled"+ Disabling -> "disabling"+ Enabled -> "enabled"+ Enabling -> "enabling"++instance Hashable StreamStatus+instance ToByteString StreamStatus+instance ToQuery StreamStatus+instance ToHeader StreamStatus++instance FromJSON StreamStatus where+ parseJSON = parseJSONText "StreamStatus"++data StreamViewType+ = KeysOnly+ | NewAndOldImages+ | NewImage+ | OldImage+ deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText StreamViewType where+ parser = takeLowerText >>= \case+ "keys_only" -> pure KeysOnly+ "new_and_old_images" -> pure NewAndOldImages+ "new_image" -> pure NewImage+ "old_image" -> pure OldImage+ e -> fromTextError $ "Failure parsing StreamViewType from value: '" <> e+ <> "'. Accepted values: keys_only, new_and_old_images, new_image, old_image"++instance ToText StreamViewType where+ toText = \case+ KeysOnly -> "keys_only"+ NewAndOldImages -> "new_and_old_images"+ NewImage -> "new_image"+ OldImage -> "old_image"++instance Hashable StreamViewType+instance ToByteString StreamViewType+instance ToQuery StreamViewType+instance ToHeader StreamViewType++instance FromJSON StreamViewType where+ parseJSON = parseJSONText "StreamViewType"
+ gen/Network/AWS/DynamoDBStreams/Waiters.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.DynamoDBStreams.Waiters+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.DynamoDBStreams.Waiters where++import Network.AWS.DynamoDBStreams.Types+import Network.AWS.Prelude+import Network.AWS.Waiter
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.DynamoDBStreams+import Test.AWS.DynamoDBStreams.Internal++main :: IO ()+main = defaultMain $ testGroup "DynamoDBStreams"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/DynamoDBStreams.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE OverloadedStrings #-}++-- Module : Test.AWS.DynamoDBStreams+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.DynamoDBStreams+ ( tests+ , fixtures+ ) where++import Network.AWS.DynamoDBStreams+import Test.AWS.Gen.DynamoDBStreams+import Test.Tasty++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/DynamoDBStreams/Internal.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE OverloadedStrings #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Test.AWS.DynamoDBStreams.Internal+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.DynamoDBStreams.Internal where++import Test.AWS.Prelude
+ test/Test/AWS/Gen/DynamoDBStreams.hs view
@@ -0,0 +1,107 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.AWS.Gen.DynamoDBStreams+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.DynamoDBStreams where++import Data.Proxy+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty+import Network.AWS.DynamoDBStreams+import Test.AWS.DynamoDBStreams.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.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ testGetRecords $+-- getRecords+--+-- , testGetShardIterator $+-- getShardIterator+--+-- , testListStreams $+-- listStreams+--+-- , testDescribeStream $+-- describeStream+--+-- ]++-- , testGroup "response"+-- [ testGetRecordsResponse $+-- getRecordsResponse+--+-- , testGetShardIteratorResponse $+-- getShardIteratorResponse+--+-- , testListStreamsResponse $+-- listStreamsResponse+--+-- , testDescribeStreamResponse $+-- describeStreamResponse+--+-- ]+-- ]++-- Requests++testGetRecords :: GetRecords -> TestTree+testGetRecords = req+ "GetRecords"+ "fixture/GetRecords"++testGetShardIterator :: GetShardIterator -> TestTree+testGetShardIterator = req+ "GetShardIterator"+ "fixture/GetShardIterator"++testListStreams :: ListStreams -> TestTree+testListStreams = req+ "ListStreams"+ "fixture/ListStreams"++testDescribeStream :: DescribeStream -> TestTree+testDescribeStream = req+ "DescribeStream"+ "fixture/DescribeStream"++-- Responses++testGetRecordsResponse :: GetRecordsResponse -> TestTree+testGetRecordsResponse = res+ "GetRecordsResponse"+ "fixture/GetRecordsResponse"+ (Proxy :: Proxy GetRecords)++testGetShardIteratorResponse :: GetShardIteratorResponse -> TestTree+testGetShardIteratorResponse = res+ "GetShardIteratorResponse"+ "fixture/GetShardIteratorResponse"+ (Proxy :: Proxy GetShardIterator)++testListStreamsResponse :: ListStreamsResponse -> TestTree+testListStreamsResponse = res+ "ListStreamsResponse"+ "fixture/ListStreamsResponse"+ (Proxy :: Proxy ListStreams)++testDescribeStreamResponse :: DescribeStreamResponse -> TestTree+testDescribeStreamResponse = res+ "DescribeStreamResponse"+ "fixture/DescribeStreamResponse"+ (Proxy :: Proxy DescribeStream)