aws-kinesis 0.1.1 → 0.1.2
raw patch · 20 files changed
+850/−183 lines, 20 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Aws.Kinesis.Core: instance Typeable1 KinesisError
+ Aws.Kinesis.Commands.PutRecords: PutRecords :: ![PutRecordsRequestEntry] -> !StreamName -> PutRecords
+ Aws.Kinesis.Commands.PutRecords: PutRecordsRequestEntry :: !ByteString -> !(Maybe PartitionHash) -> !PartitionKey -> PutRecordsRequestEntry
+ Aws.Kinesis.Commands.PutRecords: PutRecordsResponse :: !Int -> ![PutRecordsResponseRecord] -> PutRecordsResponse
+ Aws.Kinesis.Commands.PutRecords: PutRecordsResponseRecord :: !(Maybe Text) -> !(Maybe Text) -> !(Maybe SequenceNumber) -> !(Maybe ShardId) -> PutRecordsResponseRecord
+ Aws.Kinesis.Commands.PutRecords: data PutRecords
+ Aws.Kinesis.Commands.PutRecords: data PutRecordsRequestEntry
+ Aws.Kinesis.Commands.PutRecords: data PutRecordsResponse
+ Aws.Kinesis.Commands.PutRecords: data PutRecordsResponseRecord
+ Aws.Kinesis.Commands.PutRecords: instance AsMemoryResponse PutRecordsResponse
+ Aws.Kinesis.Commands.PutRecords: instance FromJSON PutRecordsResponse
+ Aws.Kinesis.Commands.PutRecords: instance FromJSON PutRecordsResponseRecord
+ Aws.Kinesis.Commands.PutRecords: instance ResponseConsumer r PutRecordsResponse
+ Aws.Kinesis.Commands.PutRecords: instance Show PutRecords
+ Aws.Kinesis.Commands.PutRecords: instance Show PutRecordsRequestEntry
+ Aws.Kinesis.Commands.PutRecords: instance Show PutRecordsResponse
+ Aws.Kinesis.Commands.PutRecords: instance Show PutRecordsResponseRecord
+ Aws.Kinesis.Commands.PutRecords: instance SignQuery PutRecords
+ Aws.Kinesis.Commands.PutRecords: instance ToJSON PutRecords
+ Aws.Kinesis.Commands.PutRecords: instance ToJSON PutRecordsRequestEntry
+ Aws.Kinesis.Commands.PutRecords: instance Transaction PutRecords PutRecordsResponse
+ Aws.Kinesis.Commands.PutRecords: putRecordsRecords :: PutRecords -> ![PutRecordsRequestEntry]
+ Aws.Kinesis.Commands.PutRecords: putRecordsRequestEntryData :: PutRecordsRequestEntry -> !ByteString
+ Aws.Kinesis.Commands.PutRecords: putRecordsRequestEntryExplicitHashKey :: PutRecordsRequestEntry -> !(Maybe PartitionHash)
+ Aws.Kinesis.Commands.PutRecords: putRecordsRequestEntryPartitionKey :: PutRecordsRequestEntry -> !PartitionKey
+ Aws.Kinesis.Commands.PutRecords: putRecordsResponseFailedRecordCount :: PutRecordsResponse -> !Int
+ Aws.Kinesis.Commands.PutRecords: putRecordsResponseRecordErrorCode :: PutRecordsResponseRecord -> !(Maybe Text)
+ Aws.Kinesis.Commands.PutRecords: putRecordsResponseRecordErrorMessage :: PutRecordsResponseRecord -> !(Maybe Text)
+ Aws.Kinesis.Commands.PutRecords: putRecordsResponseRecordSequenceNumber :: PutRecordsResponseRecord -> !(Maybe SequenceNumber)
+ Aws.Kinesis.Commands.PutRecords: putRecordsResponseRecordShardId :: PutRecordsResponseRecord -> !(Maybe ShardId)
+ Aws.Kinesis.Commands.PutRecords: putRecordsResponseRecords :: PutRecordsResponse -> ![PutRecordsResponseRecord]
+ Aws.Kinesis.Commands.PutRecords: putRecordsStreamName :: PutRecords -> !StreamName
+ Aws.Kinesis.Core: KinesisPutRecords :: KinesisAction
+ Aws.Kinesis.Core: instance Typeable KinesisError
Files
- CHANGELOG.md +8/−0
- LICENSE +199/−17
- README.md +3/−3
- aws-kinesis.cabal +29/−11
- constraints +39/−37
- src/Aws/Kinesis.hs +22/−4
- src/Aws/Kinesis/Commands/CreateStream.hs +27/−9
- src/Aws/Kinesis/Commands/DeleteStream.hs +27/−9
- src/Aws/Kinesis/Commands/DescribeStream.hs +28/−10
- src/Aws/Kinesis/Commands/GetRecords.hs +27/−9
- src/Aws/Kinesis/Commands/GetShardIterator.hs +28/−10
- src/Aws/Kinesis/Commands/ListStreams.hs +27/−9
- src/Aws/Kinesis/Commands/MergeShards.hs +27/−9
- src/Aws/Kinesis/Commands/PutRecord.hs +27/−9
- src/Aws/Kinesis/Commands/PutRecords.hs +202/−0
- src/Aws/Kinesis/Commands/SplitShard.hs +28/−10
- src/Aws/Kinesis/Core.hs +28/−7
- src/Aws/Kinesis/Types.hs +25/−7
- tests/Main.hs +24/−6
- tests/Utils.hs +25/−7
CHANGELOG.md view
@@ -1,3 +1,11 @@+0.1.2+=====++* Add support `PutRecords` action.++* Fix a bug in the `GetShardIterator` action's `ToJSON` instance which+ prevented starting an iterator at a sequence number.+ 0.1.1 =====
LICENSE view
@@ -1,20 +1,202 @@-Copyright (c) 2014 AlephCloud Systems, Inc. -Permission is hereby granted, free of charge, to any person obtaining-a copy of this software and associated documentation files (the-"Software"), to deal in the Software without restriction, including-without limitation the rights to use, copy, modify, merge, publish,-distribute, sublicense, and/or sell copies of the Software, and to-permit persons to whom the Software is furnished to do so, subject to-the following conditions:+ Apache License+ Version 2.0, January 2004+ http://www.apache.org/licenses/ -The above copyright notice and this permission notice shall be-included in all copies or substantial portions of the Software.+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.+ 1. Definitions.++ "License" shall mean the terms and conditions for use, reproduction,+ and distribution as defined by Sections 1 through 9 of this document.++ "Licensor" shall mean the copyright owner or entity authorized by+ the copyright owner that is granting the License.++ "Legal Entity" shall mean the union of the acting entity and all+ other entities that control, are controlled by, or are under common+ control with that entity. For the purposes of this definition,+ "control" means (i) the power, direct or indirect, to cause the+ direction or management of such entity, whether by contract or+ otherwise, or (ii) ownership of fifty percent (50%) or more of the+ outstanding shares, or (iii) beneficial ownership of such entity.++ "You" (or "Your") shall mean an individual or Legal Entity+ exercising permissions granted by this License.++ "Source" form shall mean the preferred form for making modifications,+ including but not limited to software source code, documentation+ source, and configuration files.++ "Object" form shall mean any form resulting from mechanical+ transformation or translation of a Source form, including but+ not limited to compiled object code, generated documentation,+ and conversions to other media types.++ "Work" shall mean the work of authorship, whether in Source or+ Object form, made available under the License, as indicated by a+ copyright notice that is included in or attached to the work+ (an example is provided in the Appendix below).++ "Derivative Works" shall mean any work, whether in Source or Object+ form, that is based on (or derived from) the Work and for which the+ editorial revisions, annotations, elaborations, or other modifications+ represent, as a whole, an original work of authorship. For the purposes+ of this License, Derivative Works shall not include works that remain+ separable from, or merely link (or bind by name) to the interfaces of,+ the Work and Derivative Works thereof.++ "Contribution" shall mean any work of authorship, including+ the original version of the Work and any modifications or additions+ to that Work or Derivative Works thereof, that is intentionally+ submitted to Licensor for inclusion in the Work by the copyright owner+ or by an individual or Legal Entity authorized to submit on behalf of+ the copyright owner. For the purposes of this definition, "submitted"+ means any form of electronic, verbal, or written communication sent+ to the Licensor or its representatives, including but not limited to+ communication on electronic mailing lists, source code control systems,+ and issue tracking systems that are managed by, or on behalf of, the+ Licensor for the purpose of discussing and improving the Work, but+ excluding communication that is conspicuously marked or otherwise+ designated in writing by the copyright owner as "Not a Contribution."++ "Contributor" shall mean Licensor and any individual or Legal Entity+ on behalf of whom a Contribution has been received by Licensor and+ subsequently incorporated within the Work.++ 2. Grant of Copyright License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ copyright license to reproduce, prepare Derivative Works of,+ publicly display, publicly perform, sublicense, and distribute the+ Work and such Derivative Works in Source or Object form.++ 3. Grant of Patent License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ (except as stated in this section) patent license to make, have made,+ use, offer to sell, sell, import, and otherwise transfer the Work,+ where such license applies only to those patent claims licensable+ by such Contributor that are necessarily infringed by their+ Contribution(s) alone or by combination of their Contribution(s)+ with the Work to which such Contribution(s) was submitted. If You+ institute patent litigation against any entity (including a+ cross-claim or counterclaim in a lawsuit) alleging that the Work+ or a Contribution incorporated within the Work constitutes direct+ or contributory patent infringement, then any patent licenses+ granted to You under this License for that Work shall terminate+ as of the date such litigation is filed.++ 4. Redistribution. You may reproduce and distribute copies of the+ Work or Derivative Works thereof in any medium, with or without+ modifications, and in Source or Object form, provided that You+ meet the following conditions:++ (a) You must give any other recipients of the Work or+ Derivative Works a copy of this License; and++ (b) You must cause any modified files to carry prominent notices+ stating that You changed the files; and++ (c) You must retain, in the Source form of any Derivative Works+ that You distribute, all copyright, patent, trademark, and+ attribution notices from the Source form of the Work,+ excluding those notices that do not pertain to any part of+ the Derivative Works; and++ (d) If the Work includes a "NOTICE" text file as part of its+ distribution, then any Derivative Works that You distribute must+ include a readable copy of the attribution notices contained+ within such NOTICE file, excluding those notices that do not+ pertain to any part of the Derivative Works, in at least one+ of the following places: within a NOTICE text file distributed+ as part of the Derivative Works; within the Source form or+ documentation, if provided along with the Derivative Works; or,+ within a display generated by the Derivative Works, if and+ wherever such third-party notices normally appear. The contents+ of the NOTICE file are for informational purposes only and+ do not modify the License. You may add Your own attribution+ notices within Derivative Works that You distribute, alongside+ or as an addendum to the NOTICE text from the Work, provided+ that such additional attribution notices cannot be construed+ as modifying the License.++ You may add Your own copyright statement to Your modifications and+ may provide additional or different license terms and conditions+ for use, reproduction, or distribution of Your modifications, or+ for any such Derivative Works as a whole, provided Your use,+ reproduction, and distribution of the Work otherwise complies with+ the conditions stated in this License.++ 5. Submission of Contributions. Unless You explicitly state otherwise,+ any Contribution intentionally submitted for inclusion in the Work+ by You to the Licensor shall be under the terms and conditions of+ this License, without any additional terms or conditions.+ Notwithstanding the above, nothing herein shall supersede or modify+ the terms of any separate license agreement you may have executed+ with Licensor regarding such Contributions.++ 6. Trademarks. This License does not grant permission to use the trade+ names, trademarks, service marks, or product names of the Licensor,+ except as required for reasonable and customary use in describing the+ origin of the Work and reproducing the content of the NOTICE file.++ 7. Disclaimer of Warranty. Unless required by applicable law or+ agreed to in writing, Licensor provides the Work (and each+ Contributor provides its Contributions) on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+ implied, including, without limitation, any warranties or conditions+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+ PARTICULAR PURPOSE. You are solely responsible for determining the+ appropriateness of using or redistributing the Work and assume any+ risks associated with Your exercise of permissions under this License.++ 8. Limitation of Liability. In no event and under no legal theory,+ whether in tort (including negligence), contract, or otherwise,+ unless required by applicable law (such as deliberate and grossly+ negligent acts) or agreed to in writing, shall any Contributor be+ liable to You for damages, including any direct, indirect, special,+ incidental, or consequential damages of any character arising as a+ result of this License or out of the use or inability to use the+ Work (including but not limited to damages for loss of goodwill,+ work stoppage, computer failure or malfunction, or any and all+ other commercial damages or losses), even if such Contributor+ has been advised of the possibility of such damages.++ 9. Accepting Warranty or Additional Liability. While redistributing+ the Work or Derivative Works thereof, You may choose to offer,+ and charge a fee for, acceptance of support, warranty, indemnity,+ or other liability obligations and/or rights consistent with this+ License. However, in accepting such obligations, You may act only+ on Your own behalf and on Your sole responsibility, not on behalf+ of any other Contributor, and only if You agree to indemnify,+ defend, and hold each Contributor harmless for any liability+ incurred by, or claims asserted against, such Contributor by reason+ of your accepting any such warranty or additional liability.++ END OF TERMS AND CONDITIONS++ APPENDIX: How to apply the Apache License to your work.++ To apply the Apache License to your work, attach the following+ boilerplate notice, with the fields enclosed by brackets "[]"+ replaced with your own identifying information. (Don't include+ the brackets!) The text should be enclosed in the appropriate+ comment syntax for the file format. We also recommend that a+ file or class name and description of purpose be included on the+ same "printed page" as the copyright notice for easier+ identification within third-party archives.++ Copyright [yyyy] [name of copyright owner]++ Licensed under the Apache License, Version 2.0 (the "License");+ you may not use this file except in compliance with the License.+ You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing, software+ distributed under the License is distributed on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ See the License for the specific language governing permissions and+ limitations under the License.
README.md view
@@ -1,12 +1,12 @@ [](https://travis-ci.org/alephcloud/hs-aws-kinesis) -Haskell Bindings for Amazon AWS Kinesis-=======================================+Haskell Bindings for [Amazon Kinesis](http://aws.amazon.com/kinesis/)+===================================================================== *API Version 2013-12-02* -[Amazon AWS Kinesis API Reference](http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference)+[Amazon Kinesis API Reference](http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference) This package depends on the [aws-general](https://github.com/alephcloud/hs-aws-general) package and the [aws](https://github.com/aristidb/aws) package. From the latter the it borrows the
aws-kinesis.cabal view
@@ -1,24 +1,41 @@--- ------------------------------------------------------ ----- Copyright © 2014 AlephCloud Systems, Inc.--- ------------------------------------------------------ --+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- aws-kinesis.cabal+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. Name: aws-kinesis-Version: 0.1.1-Synopsis: Bindings for AWS Kinesis Version 2013-12-02+Version: 0.1.2+Synopsis: Bindings for Amazon Kinesis description:- Bindings for AWS Kinesis+ Bindings for <http://aws.amazon.com/kinesis/ Amazon Kinesis> .+ Amazon Kinesis is an AWS service for real-time processing of+ streaming data at massive scale.+ . /API Version: 2013-12-02/ . <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference> Homepage: https://github.com/alephcloud/hs-aws-kinesis Bug-reports: https://github.com/alephcloud/hs-aws-kinesis/issues-License: MIT+License: Apache-2.0 License-file: LICENSE-Author: Lars Kuhtz <lars@alephcloud.com>-Maintainer: Lars Kuhtz <lars@alephcloud.com>-Copyright: Copyright (c) 2014 AlephCloud, Inc.+Author: Lars Kuhtz <lkuhtz@pivotmail.com>+Maintainer: Lars Kuhtz <lkuhtz@pivotmail.com>+Copyright: Copyright (c) 2013-2014 PivotCloud, Inc. Category: Network, Web, AWS, Cloud, Distributed Computing Build-type: Simple @@ -38,7 +55,7 @@ source-repository this type: git location: https://github.com/alephcloud/hs-aws-kinesis.git- tag: 0.1.1+ tag: 0.1.2 Library default-language: Haskell2010@@ -51,6 +68,7 @@ Aws.Kinesis.Commands.CreateStream Aws.Kinesis.Commands.DeleteStream Aws.Kinesis.Commands.PutRecord+ Aws.Kinesis.Commands.PutRecords Aws.Kinesis.Commands.GetRecords Aws.Kinesis.Commands.GetShardIterator Aws.Kinesis.Commands.ListStreams
constraints view
@@ -1,40 +1,38 @@-constraints: QuickCheck ==2.7.5,- aeson ==0.7.0.6,+constraints: QuickCheck ==2.7.6,+ aeson ==0.8.0.2, array ==0.5.0.0, asn1-encoding ==0.8.1.3, asn1-parse ==0.8.1, asn1-types ==0.2.3,- attoparsec ==0.12.1.0,- attoparsec-conduit ==1.1.0,- aws ==0.9.2,+ attoparsec ==0.12.1.2,+ aws ==0.10.5, aws-general ==0.1.1,- aws-kinesis ==0.1.1,+ aws-kinesis ==0.1.2, base ==4.7.0.1, base16-bytestring ==0.1.1.6, base64-bytestring ==1.0.0.1,- blaze-builder ==0.3.3.2,- blaze-builder-conduit ==1.1.0,- blaze-html ==0.7.0.2,- blaze-markup ==0.6.1.0,+ blaze-builder ==0.3.3.4,+ blaze-html ==0.7.0.3,+ blaze-markup ==0.6.1.1, byteable ==0.1.1, bytestring ==0.10.4.0,- case-insensitive ==1.2.0.0,- cereal ==0.4.0.1,+ case-insensitive ==1.2.0.1,+ cereal ==0.4.1.0, charset ==0.3.7, cipher-aes ==0.2.8, cipher-des ==0.0.6, cipher-rc4 ==0.1.4,- conduit ==1.1.6,- conduit-extra ==1.1.1,- connection ==0.2.1,+ conduit ==1.2.1,+ conduit-extra ==1.1.4,+ connection ==0.2.3, containers ==0.5.5.1,- cookie ==0.4.1.1,+ cookie ==0.4.1.4, cprng-aes ==0.5.2, crypto-cipher-types ==0.0.9, crypto-numbers ==0.2.3, crypto-pubkey ==0.2.4, crypto-pubkey-types ==0.4.2.2,- crypto-random ==0.0.7,+ crypto-random ==0.0.8, cryptohash ==0.11.6, data-default ==0.5.3, data-default-class ==0.0.1,@@ -49,54 +47,58 @@ filepath ==1.3.0.2, ghc-prim ==0.3.1.0, hashable ==1.2.2.0,- http-client ==0.3.4,- http-client-tls ==0.2.1.2,- http-conduit ==2.1.2.3,+ http-client ==0.4.0.1,+ http-client-tls ==0.2.2,+ http-conduit ==2.1.4.5, http-types ==0.8.5, integer-gmp ==0.5.1.0, lifted-base ==0.2.3.0, mime-types ==0.1.0.4,- mmorph ==1.0.3,+ mmorph ==1.0.4, monad-control ==0.3.3.0,- mtl ==2.1.3.1,+ mtl ==2.2.1, nats ==0.2,- network ==2.5.0.0,+ network ==2.6.0.2,+ network-uri ==2.6.0.1, old-locale ==1.0.0.6, old-time ==1.1.0.2,- parsec ==3.1.5,- parsers ==0.12,+ parsec ==3.1.7,+ parsers ==0.12.1.1, pem ==0.2.2, pretty ==1.1.1.1, primitive ==0.5.3.0, process ==1.2.0.0, publicsuffixlist ==0.1,- quickcheck-instances ==0.3.8,- random ==1.0.1.1,- resourcet ==1.1.2.2,+ quickcheck-instances ==0.3.9,+ random ==1.1,+ resourcet ==1.1.2.3, rts ==1.0,- scientific ==0.3.3.0,+ safe ==0.3.8,+ scientific ==0.3.3.1, securemem ==0.1.3,- semigroups ==0.15.1,+ semigroups ==0.15.3, socks ==0.5.4,- streaming-commons ==0.1.3.1,+ stm ==2.4.3,+ streaming-commons ==0.1.5, syb ==0.4.2, system-filepath ==0.4.12,+ tagged ==0.7.2, template-haskell ==2.9.0.0,- text ==1.1.1.3,+ text ==1.2.0.0, tf-random ==0.5, time ==1.4.2,- tls ==1.2.8,- transformers ==0.3.0.0,- transformers-base ==0.4.2,+ tls ==1.2.9,+ transformers ==0.4.1.0,+ transformers-base ==0.4.3, unix ==2.7.0.1, unordered-containers ==0.2.5.0, utf8-string ==0.3.8, vector ==0.10.11.0, void ==0.6.1,- x509 ==1.4.11,+ x509 ==1.4.12, x509-store ==1.4.4, x509-system ==1.4.5, x509-validation ==1.5.0,- xml-conduit ==1.2.0.3,+ xml-conduit ==1.2.3, xml-types ==0.3.4, zlib ==0.5.4.1
src/Aws/Kinesis.hs view
@@ -1,9 +1,25 @@-{-# LANGUAGE OverloadedStrings #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -30,7 +46,9 @@ -- -- In order to run the example you must replace @"access-key-id"@ and -- @"secret-access-key"@ with the respective values for your AWS account.---++{-# LANGUAGE OverloadedStrings #-}+ module Aws.Kinesis ( module Aws.Kinesis.Core , module Aws.Kinesis.Types
src/Aws/Kinesis/Commands/CreateStream.hs view
@@ -1,14 +1,25 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE DeriveDataTypeable #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.CreateStream+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis.Commands.CreateStream--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -54,7 +65,14 @@ -- CreateStream has a limit of 5 transactions per second per account. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_CreateStream.html>---++{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE DeriveDataTypeable #-}+ module Aws.Kinesis.Commands.CreateStream ( CreateStream(..) , CreateStreamResponse(..)
src/Aws/Kinesis/Commands/DeleteStream.hs view
@@ -1,14 +1,25 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE MultiParamTypeClasses #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.DeleteStream+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis.Commands.DeleteStream--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -35,7 +46,14 @@ -- DeleteStream has a limit of 5 transactions per second per account. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_DeleteStream.html>---++{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+ module Aws.Kinesis.Commands.DeleteStream ( DeleteStream(..) , DeleteStreamResponse(..)
src/Aws/Kinesis/Commands/DescribeStream.hs view
@@ -1,14 +1,25 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE MultiParamTypeClasses #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.DescribeStream+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- |--- Module: Aws.Sns.Commands.DescribeStream--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Module: Aws.Kinesis.Commands.DescribeStream+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -38,7 +49,14 @@ -- DescribeStream has a limit of 10 transactions per second per account. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_DescribeStream.html>---++{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+ module Aws.Kinesis.Commands.DescribeStream ( DescribeStream(..) , DescribeStreamResponse(..)
src/Aws/Kinesis/Commands/GetRecords.hs view
@@ -1,14 +1,25 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE MultiParamTypeClasses #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.GetRecords+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis.Commands.GetRecords--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -49,7 +60,14 @@ -- ProvisionedThroughputExceededException. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_GetRecords.html>---++{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+ module Aws.Kinesis.Commands.GetRecords ( GetRecords(..) , GetRecordsResponse(..)
src/Aws/Kinesis/Commands/GetShardIterator.hs view
@@ -1,14 +1,25 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE OverloadedStrings #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.GetShardIterator+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis.Commands.GetShardIterator--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -57,7 +68,14 @@ -- open shard. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_GetShardIterator.html>---++{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE OverloadedStrings #-}+ module Aws.Kinesis.Commands.GetShardIterator ( GetShardIterator(..) , GetShardIteratorResponse(..)@@ -98,7 +116,7 @@ toJSON GetShardIterator{..} = object [ "ShardId" .= getShardIteratorShardId , "ShardIteratorType" .= getShardIteratorShardIteratorType- , "SequenceNumber" .= getShardIteratorStartingSequenceNumber+ , "StartingSequenceNumber" .= getShardIteratorStartingSequenceNumber , "StreamName" .= getShardIteratorStreamName ]
src/Aws/Kinesis/Commands/ListStreams.hs view
@@ -1,14 +1,25 @@-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE MultiParamTypeClasses #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.ListStreams+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis.Commands.ListStreams--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -35,7 +46,14 @@ -- ListStreams has a limit of 5 transactions per second per account. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_ListStreams.html>---++{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+ module Aws.Kinesis.Commands.ListStreams ( ListStreams(..) , ListStreamsResponse(..)
src/Aws/Kinesis/Commands/MergeShards.hs view
@@ -1,14 +1,25 @@-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE MultiParamTypeClasses #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.MergeShards+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis.Commands.MergeShards--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -54,7 +65,14 @@ -- MergeShards has limit of 5 transactions per second per account. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_MergeShards.html>---++{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+ module Aws.Kinesis.Commands.MergeShards ( MergeShards(..) , MergeShardsResponse(..)
src/Aws/Kinesis/Commands/PutRecord.hs view
@@ -1,14 +1,25 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE MultiParamTypeClasses #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.PutRecord+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis.Commands.PutRecord--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -50,7 +61,14 @@ -- added to an Amazon Kinesis stream. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_PutRecord.html>---++{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+ module Aws.Kinesis.Commands.PutRecord ( PutRecord(..) , PutRecordResponse(..)
+ src/Aws/Kinesis/Commands/PutRecords.hs view
@@ -0,0 +1,202 @@+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.PutRecords+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License.++-- |+-- Module: Aws.Kinesis.Commands.PutRecords+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0+-- Maintainer: Jon Sterling <jsterling@alephcloud.com>+-- Stability: experimental+--+-- /API Version: 2013-12-02/+--+-- Puts (writes) multiple data records from a producer into an Amazon Kinesis+-- stream in a single call (also referred to as a PutRecords request). Use this+-- operation to send data from a data producer into the Amazon Kinesis stream+-- for real-time ingestion and processing. Each shard can support up to 1000+-- records written per second, up to a maximum total of 1 MB data written per+-- second.+--+-- You must specify the name of the stream that captures, stores, and+-- transports the data; and an array of request Records, with each record in+-- the array requiring a partition key and data blob.+--+-- The data blob can be any type of data; for example, a segment from a log+-- file, geographic/location data, website clickstream data, and so on.+--+-- The partition key is used by Amazon Kinesis as input to a hash function that+-- maps the partition key and associated data to a specific shard. An MD5 hash+-- function is used to map partition keys to 128-bit integer values and to map+-- associated data records to shards. As a result of this hashing mechanism,+-- all data records with the same partition key map to the same shard within+-- the stream. For more information, see Partition Key in the Amazon Kinesis+-- Developer Guide.+--+-- Each record in the Records array may include an optional parameter,+-- ExplicitHashKey, which overrides the partition key to shard mapping. This+-- parameter allows a data producer to determine explicitly the shard where the+-- record is stored. For more information, see Adding Multiple Records with+-- PutRecords in the Amazon Kinesis Developer Guide.+--+-- The PutRecords response includes an array of response Records. Each record+-- in the response array directly correlates with a record in the request array+-- using natural ordering, from the top to the bottom of the request and+-- response. The response Records array always includes the same number of+-- records as the request array.+--+-- The response Records array includes both successfully and unsuccessfully+-- processed records. Amazon Kinesis attempts to process all records in each+-- PutRecords request. A single record failure does not stop the processing of+-- subsequent records.+--+-- A successfully-processed record includes ShardId and SequenceNumber values.+-- The ShardId parameter identifies the shard in the stream where the record is+-- stored. The SequenceNumber parameter is an identifier assigned to the put+-- record, unique to all records in the stream.+--+-- An unsuccessfully-processed record includes ErrorCode and ErrorMessage+-- values. ErrorCode reflects the type of error and can be one of the following+-- values: ProvisionedThroughputExceededException or InternalFailure.+-- ErrorMessage provides more detailed information about the+-- ProvisionedThroughputExceededException exception including the account ID,+-- stream name, and shard ID of the record that was throttled.+--+-- Data records are accessible for only 24 hours from the time that they are+-- added to an Amazon Kinesis stream.+--+-- <http://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecords.html>++{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++module Aws.Kinesis.Commands.PutRecords+( PutRecords(..)+, PutRecordsRequestEntry(..)+, PutRecordsResponse(..)+, PutRecordsResponseRecord(..)+) where++import Aws.Core+import Aws.Kinesis.Core+import Aws.Kinesis.Types+import Data.Aeson+import qualified Data.ByteString as BS+import qualified Data.ByteString.Lazy as BL+import qualified Data.ByteString.Base64 as B64+import qualified Data.Text as T+import qualified Data.Text.Encoding as T++-- | Represents a single record in a 'PutRecords' request.+--+data PutRecordsRequestEntry = PutRecordsRequestEntry+ { putRecordsRequestEntryData :: !BS.ByteString+ -- ^ The data blob to be put into the record. The maximum size of the data+ -- blob is 50 kilobytes.++ , putRecordsRequestEntryExplicitHashKey :: !(Maybe PartitionHash)+ -- ^ The hash value used to determine explicitly the shard that the data+ -- record is assigned to by overriding the partition key hash.++ , putRecordsRequestEntryPartitionKey :: !PartitionKey+ -- ^ Determines which shard in the stream the data record is assigned to.+ -- All data records with the same partition key map to the same shard.+ } deriving Show++-- | The body of the 'PutRecords' request.+--+data PutRecords = PutRecords+ { putRecordsRecords :: ![PutRecordsRequestEntry]+ -- ^ The records associated with the request. Minimum of 1 item, maximum+ -- 500.++ , putRecordsStreamName :: !StreamName+ -- ^ The stream name associated with the request.+ } deriving Show++-- | Represents the result for a single record in a 'PutRecordsResponse'.+--+data PutRecordsResponseRecord = PutRecordsResponseRecord+ { putRecordsResponseRecordErrorCode :: !(Maybe T.Text)+ -- ^ If the request did not succeed, an error code will be provided.++ , putRecordsResponseRecordErrorMessage :: !(Maybe T.Text)+ -- ^ If the request did not succeed, an error message will be provided.++ , putRecordsResponseRecordSequenceNumber :: !(Maybe SequenceNumber)+ -- ^ The sequence number assigned to the (sucessfully processed) record.++ , putRecordsResponseRecordShardId :: !(Maybe ShardId)+ -- ^ The shard ID assigned to the (successfully processed) record.+ } deriving Show++data PutRecordsResponse = PutRecordsResponse+ { putRecordsResponseFailedRecordCount :: !Int+ -- ^ The number of unsuccessfully processed records in a 'PutRecords'+ -- request.++ , putRecordsResponseRecords :: ![PutRecordsResponseRecord]+ -- ^ An array of successfully and unsuccessfully processed records,+ -- correlated with the request by natural ordering.+ } deriving Show++instance ToJSON PutRecordsRequestEntry where+ toJSON PutRecordsRequestEntry{..} = object $+ [ "Data" .= T.decodeUtf8 (B64.encode putRecordsRequestEntryData)+ , "ExplicitHashKey" .= putRecordsRequestEntryExplicitHashKey+ , "PartitionKey" .= putRecordsRequestEntryPartitionKey+ ]++instance ToJSON PutRecords where+ toJSON PutRecords{..} = object+ [ "Records" .= putRecordsRecords+ , "StreamName" .= putRecordsStreamName+ ]++instance FromJSON PutRecordsResponseRecord where+ parseJSON = withObject "PutRecordsResponseRecord" $ \o -> do+ putRecordsResponseRecordErrorCode <- o .:? "ErrorCode"+ putRecordsResponseRecordErrorMessage <- o .:? "ErrorMessage"+ putRecordsResponseRecordSequenceNumber <- o .:? "SequenceNumber"+ putRecordsResponseRecordShardId <- o .:? "ShardId"+ return PutRecordsResponseRecord{..}++instance FromJSON PutRecordsResponse where+ parseJSON = withObject "PutRecordsResponse" $ \o -> do+ putRecordsResponseFailedRecordCount <- o .: "FailedRecordCount"+ putRecordsResponseRecords <- o .: "Records"+ return PutRecordsResponse{..}++instance Transaction PutRecords PutRecordsResponse where++instance ResponseConsumer r PutRecordsResponse where+ type ResponseMetadata PutRecordsResponse = KinesisMetadata+ responseConsumer _ = kinesisResponseConsumer++instance AsMemoryResponse PutRecordsResponse where+ type MemoryResponse PutRecordsResponse = PutRecordsResponse+ loadToMemory = return++instance SignQuery PutRecords where+ type ServiceConfiguration PutRecords = KinesisConfiguration+ signQuery cmd = kinesisSignQuery KinesisQuery+ { kinesisQueryAction = KinesisPutRecords+ , kinesisQueryBody = Just $ BL.toStrict $ encode cmd+ }
src/Aws/Kinesis/Commands/SplitShard.hs view
@@ -1,14 +1,25 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE MultiParamTypeClasses #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Commands.SplitShard+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- |--- Module: Aws.Sns.Commands.SplitShard--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Module: Aws.Kinesis.Commands.SplitShard+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -62,7 +73,14 @@ -- SplitShard has limit of 5 transactions per second per account. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_SplitShard.html>---++{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+ module Aws.Kinesis.Commands.SplitShard ( SplitShard(..) , SplitShardResponse(..)
src/Aws/Kinesis/Core.hs view
@@ -1,18 +1,36 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE CPP #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Core+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis.Core--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental -- -- /API Version: 2013-12-02/ -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference>---++{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE CPP #-}+ module Aws.Kinesis.Core ( KinesisVersion(..)@@ -102,6 +120,7 @@ | KinesisListStreams | KinesisMergeShards | KinesisPutRecord+ | KinesisPutRecords | KinesisSplitShard deriving (Show, Read, Eq, Ord, Enum, Bounded, Typeable) @@ -114,6 +133,7 @@ kinesisActionToText KinesisListStreams = "ListStreams" kinesisActionToText KinesisMergeShards = "MergeShards" kinesisActionToText KinesisPutRecord = "PutRecord"+kinesisActionToText KinesisPutRecords = "PutRecords" kinesisActionToText KinesisSplitShard = "SplitShard" parseKinesisAction :: P.CharParsing m => m KinesisAction@@ -126,6 +146,7 @@ <|> KinesisListStreams <$ P.text "ListStreams" <|> KinesisMergeShards <$ P.text "MergeShards" <|> KinesisPutRecord <$ P.text "PutRecord"+ <|> KinesisPutRecords <$ P.text "PutRecords" <|> KinesisSplitShard <$ P.text "SplitShard" <?> "KinesisAction" @@ -324,7 +345,7 @@ instance FromJSON KinesisErrorResponse where parseJSON = withObject "KinesisErrorResponse" $ \o -> KinesisErrorResponse <$> o .: "__type"- <*> o .: "message"+ <*> o .:? "message" .!= "" -- | Common Kinesis Errors --
src/Aws/Kinesis/Types.hs view
@@ -1,12 +1,25 @@-{-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE DeriveDataTypeable #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Aws.Kinesis.Types+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Aws.Kinesis.Types--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental --@@ -16,7 +29,12 @@ -- that various actions use. -- -- <http://docs.aws.amazon.com/kinesis/2013-12-02/APIReference/API_Types.html>---++{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE DeriveDataTypeable #-}+ module Aws.Kinesis.Types ( StreamName , streamName
tests/Main.hs view
@@ -1,16 +1,34 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE GADTs #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Main+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Main--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental -- -- Tests for Haskell Kinesis bindings---++{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE GADTs #-}+ module Main ( main ) where
tests/Utils.hs view
@@ -1,17 +1,35 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE CPP #-}+-- Copyright (c) 2013-2014 PivotCloud, Inc.+--+-- Utils+--+-- Please feel free to contact us at licensing@pivotmail.com with any+-- contributions, additions, or other feedback; we would love to hear from+-- you.+--+-- Licensed under the Apache License, Version 2.0 (the "License"); you may+-- not use this file except in compliance with the License. You may obtain a+-- copy of the License at http://www.apache.org/licenses/LICENSE-2.0+--+-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT+-- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the+-- License for the specific language governing permissions and limitations+-- under the License. -- | -- Module: Utils--- Copyright: Copyright © 2014 AlephCloud Systems, Inc.--- License: MIT+-- Copyright: Copyright (c) 2013-2014 PivotCloud, Inc.+-- license: Apache License, Version 2.0 -- Maintainer: Lars Kuhtz <lars@alephcloud.com> -- Stability: experimental -- -- Utils for Tests for Haskell AWS bindints---++{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE CPP #-}+ module Utils ( -- * Parameters