packages feed

amazonka-kinesis-firehose (empty) → 1.3.3

raw patch · 34 files changed

+3569/−0 lines, 34 filesdep +amazonka-coredep +amazonka-kinesis-firehosedep +amazonka-testsetup-changed

Dependencies added: amazonka-core, amazonka-kinesis-firehose, amazonka-test, base, bytestring, lens, tasty, tasty-hunit, text, time, unordered-containers

Files

+ LICENSE view
@@ -0,0 +1,367 @@+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.
+ README.md view
@@ -0,0 +1,46 @@+# Amazon Kinesis Firehose SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.3.3`+++## Description++Amazon Kinesis Firehose API Reference++Amazon Kinesis Firehose is a fully-managed service that delivers+real-time streaming data to destinations such as Amazon S3 and Amazon+Redshift.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-kinesis-firehose)+and the [AWS API Reference](http://docs.aws.amazon.com/firehose/latest/APIReference/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-kinesis-firehose` 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-kinesis-firehose.cabal view
@@ -0,0 +1,93 @@+name:                  amazonka-kinesis-firehose+version:               1.3.3+synopsis:              Amazon Kinesis Firehose SDK.+homepage:              https://github.com/brendanhay/amazonka+bug-reports:           https://github.com/brendanhay/amazonka/issues+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+cabal-version:         >= 1.10+extra-source-files:    README.md fixture/*.yaml fixture/*.proto+description:+    Amazon Kinesis Firehose API Reference++    Amazon Kinesis Firehose is a fully-managed service that delivers+    real-time streaming data to destinations such as Amazon S3 and Amazon+    Redshift.+    .+    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.Firehose" and the <http://docs.aws.amazon.com/firehose/latest/APIReference/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.Firehose+        , Network.AWS.Firehose.CreateDeliveryStream+        , Network.AWS.Firehose.DeleteDeliveryStream+        , Network.AWS.Firehose.DescribeDeliveryStream+        , Network.AWS.Firehose.ListDeliveryStreams+        , Network.AWS.Firehose.PutRecord+        , Network.AWS.Firehose.PutRecordBatch+        , Network.AWS.Firehose.Types+        , Network.AWS.Firehose.UpdateDestination+        , Network.AWS.Firehose.Waiters++    other-modules:+          Network.AWS.Firehose.Types.Product+        , Network.AWS.Firehose.Types.Sum++    build-depends:+          amazonka-core == 1.3.3.*+        , base          >= 4.7     && < 5++test-suite amazonka-kinesis-firehose-test+    type:              exitcode-stdio-1.0+    default-language:  Haskell2010+    hs-source-dirs:    test+    main-is:           Main.hs++    ghc-options:       -Wall -threaded++    -- This section is encoded by the template and any modules added by+    -- hand outside these namespaces will not correctly be added to the+    -- distribution package.+    other-modules:+          Test.AWS.Firehose+        , Test.AWS.Gen.Firehose+        , Test.AWS.Firehose.Internal++    build-depends:+          amazonka-core == 1.3.3.*+        , amazonka-test == 1.3.3.*+        , amazonka-kinesis-firehose == 1.3.3.*+        , base+        , bytestring+        , lens+        , tasty+        , tasty-hunit+        , text+        , time+        , unordered-containers
+ fixture/CreateDeliveryStream.yaml view
+ fixture/CreateDeliveryStreamResponse.proto view
+ fixture/DeleteDeliveryStream.yaml view
+ fixture/DeleteDeliveryStreamResponse.proto view
+ fixture/DescribeDeliveryStream.yaml view
+ fixture/DescribeDeliveryStreamResponse.proto view
+ fixture/ListDeliveryStreams.yaml view
+ fixture/ListDeliveryStreamsResponse.proto view
+ fixture/PutRecord.yaml view
+ fixture/PutRecordBatch.yaml view
+ fixture/PutRecordBatchResponse.proto view
+ fixture/PutRecordResponse.proto view
+ fixture/UpdateDestination.yaml view
+ fixture/UpdateDestinationResponse.proto view
+ gen/Network/AWS/Firehose.hs view
@@ -0,0 +1,238 @@+{-# 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.Firehose+-- 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 Kinesis Firehose API Reference+--+-- Amazon Kinesis Firehose is a fully-managed service that delivers+-- real-time streaming data to destinations such as Amazon S3 and Amazon+-- Redshift.+--+-- /See:/ <http://docs.aws.amazon.com/firehose/latest/APIReference/Welcome.html AWS API Reference>+module Network.AWS.Firehose+    (+    -- * Service Configuration+      firehose++    -- * Errors+    -- $errors++    -- ** InvalidArgumentException+    , _InvalidArgumentException++    -- ** ConcurrentModificationException+    , _ConcurrentModificationException++    -- ** ServiceUnavailableException+    , _ServiceUnavailableException++    -- ** ResourceNotFoundException+    , _ResourceNotFoundException++    -- ** LimitExceededException+    , _LimitExceededException++    -- ** ResourceInUseException+    , _ResourceInUseException++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** PutRecord+    , module Network.AWS.Firehose.PutRecord++    -- ** UpdateDestination+    , module Network.AWS.Firehose.UpdateDestination++    -- ** PutRecordBatch+    , module Network.AWS.Firehose.PutRecordBatch++    -- ** CreateDeliveryStream+    , module Network.AWS.Firehose.CreateDeliveryStream++    -- ** DescribeDeliveryStream+    , module Network.AWS.Firehose.DescribeDeliveryStream++    -- ** ListDeliveryStreams+    , module Network.AWS.Firehose.ListDeliveryStreams++    -- ** DeleteDeliveryStream+    , module Network.AWS.Firehose.DeleteDeliveryStream++    -- * Types++    -- ** CompressionFormat+    , CompressionFormat (..)++    -- ** DeliveryStreamStatus+    , DeliveryStreamStatus (..)++    -- ** NoEncryptionConfig+    , NoEncryptionConfig (..)++    -- ** BufferingHints+    , BufferingHints+    , bufferingHints+    , bhSizeInMBs+    , bhIntervalInSeconds++    -- ** CopyCommand+    , CopyCommand+    , copyCommand+    , ccCopyOptions+    , ccDataTableColumns+    , ccDataTableName++    -- ** DeliveryStreamDescription+    , DeliveryStreamDescription+    , deliveryStreamDescription+    , dsdCreateTimestamp+    , dsdLastUpdateTimestamp+    , dsdDeliveryStreamName+    , dsdDeliveryStreamARN+    , dsdDeliveryStreamStatus+    , dsdVersionId+    , dsdDestinations+    , dsdHasMoreDestinations++    -- ** DestinationDescription+    , DestinationDescription+    , destinationDescription+    , ddS3DestinationDescription+    , ddRedshiftDestinationDescription+    , ddDestinationId++    -- ** EncryptionConfiguration+    , EncryptionConfiguration+    , encryptionConfiguration+    , ecNoEncryptionConfig+    , ecKMSEncryptionConfig++    -- ** KMSEncryptionConfig+    , KMSEncryptionConfig+    , kmsEncryptionConfig+    , kecAWSKMSKeyARN++    -- ** PutRecordBatchResponseEntry+    , PutRecordBatchResponseEntry+    , putRecordBatchResponseEntry+    , prbreRecordId+    , prbreErrorCode+    , prbreErrorMessage++    -- ** Record+    , Record+    , record+    , rData++    -- ** RedshiftDestinationConfiguration+    , RedshiftDestinationConfiguration+    , redshiftDestinationConfiguration+    , rdcRoleARN+    , rdcClusterJDBCURL+    , rdcCopyCommand+    , rdcUsername+    , rdcPassword+    , rdcS3Configuration++    -- ** RedshiftDestinationDescription+    , RedshiftDestinationDescription+    , redshiftDestinationDescription+    , rddRoleARN+    , rddClusterJDBCURL+    , rddCopyCommand+    , rddUsername+    , rddS3DestinationDescription++    -- ** RedshiftDestinationUpdate+    , RedshiftDestinationUpdate+    , redshiftDestinationUpdate+    , rduUsername+    , rduS3Update+    , rduPassword+    , rduCopyCommand+    , rduClusterJDBCURL+    , rduRoleARN++    -- ** S3DestinationConfiguration+    , S3DestinationConfiguration+    , s3DestinationConfiguration+    , sdcPrefix+    , sdcEncryptionConfiguration+    , sdcCompressionFormat+    , sdcBufferingHints+    , sdcRoleARN+    , sdcBucketARN++    -- ** S3DestinationDescription+    , S3DestinationDescription+    , s3DestinationDescription+    , sddPrefix+    , sddRoleARN+    , sddBucketARN+    , sddBufferingHints+    , sddCompressionFormat+    , sddEncryptionConfiguration++    -- ** S3DestinationUpdate+    , S3DestinationUpdate+    , s3DestinationUpdate+    , sduPrefix+    , sduEncryptionConfiguration+    , sduCompressionFormat+    , sduBufferingHints+    , sduBucketARN+    , sduRoleARN+    ) where++import           Network.AWS.Firehose.CreateDeliveryStream+import           Network.AWS.Firehose.DeleteDeliveryStream+import           Network.AWS.Firehose.DescribeDeliveryStream+import           Network.AWS.Firehose.ListDeliveryStreams+import           Network.AWS.Firehose.PutRecord+import           Network.AWS.Firehose.PutRecordBatch+import           Network.AWS.Firehose.Types+import           Network.AWS.Firehose.UpdateDestination+import           Network.AWS.Firehose.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 'Firehose'.+-}++{- $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/Firehose/CreateDeliveryStream.hs view
@@ -0,0 +1,212 @@+{-# 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.Firehose.CreateDeliveryStream+-- 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)+--+-- Creates a delivery stream.+--+-- CreateDeliveryStream is an asynchronous operation that immediately+-- returns. The initial status of the delivery stream is 'CREATING'. After+-- the delivery stream is created, its status is 'ACTIVE' and it now+-- accepts data. Attempts to send data to a delivery stream that is not in+-- the 'ACTIVE' state cause an exception. To check the state of a delivery+-- stream, use DescribeDeliveryStream.+--+-- The name of a delivery stream identifies it. You can\'t have two+-- delivery streams with the same name in the same region. Two delivery+-- streams in different AWS accounts or different regions in the same AWS+-- account can have the same name.+--+-- By default, you can create up to 5 delivery streams per region.+--+-- A delivery stream can only be configured with a single destination,+-- Amazon S3 or Amazon Redshift. For correct CreateDeliveryStream request+-- syntax, specify only one destination configuration parameter: either+-- 'RedshiftDestinationConfiguration' or 'S3DestinationConfiguration'+--+-- As part of 'S3DestinationConfiguration', optional values+-- 'BufferingHints', 'EncryptionConfiguration', and 'CompressionFormat' can+-- be provided. By default, if no 'BufferingHints' value is provided,+-- Amazon Kinesis Firehose buffers data up to 5 MB or for 5 minutes,+-- whichever condition is satisfied first. Note that 'BufferingHints' is a+-- hint, so there are some cases where the service cannot adhere to these+-- conditions strictly; for example, record boundaries are such that the+-- size is a little over or under the configured buffering size. By+-- default, no encryption is performed. We strongly recommend that you+-- enable encryption to ensure secure data storage in Amazon S3.+--+-- A few notes about 'RedshiftDestinationConfiguration':+--+-- -   An Amazon Redshift destination requires an S3 bucket as intermediate+--     location, as Amazon Kinesis Firehose first delivers data to S3 and+--     then uses 'COPY' syntax to load data into an Amazon Redshift table.+--     This is specified in the+--     'RedshiftDestinationConfiguration.S3Configuration' parameter+--     element.+-- -   The compression formats 'SNAPPY' or 'ZIP' cannot be specified in+--     'RedshiftDestinationConfiguration.S3Configuration' because the+--     Amazon Redshift 'COPY' operation that reads from the S3 bucket+--     doesn\'t support these compression formats.+-- -   We strongly recommend that the username and password provided is+--     used exclusively for Amazon Kinesis Firehose purposes, and that the+--     permissions for the account are restricted for Amazon Redshift+--     'INSERT' permissions.+--+-- Amazon Kinesis Firehose assumes the IAM role that is configured as part+-- of destinations. The IAM role should allow the Amazon Kinesis Firehose+-- principal to assume the role, and the role should have permissions that+-- allows the service to deliver the data. For more information, see+-- <http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3 Amazon S3 Bucket Access>+-- in the /Amazon Kinesis Firehose Developer Guide/.+--+-- /See:/ <http://docs.aws.amazon.com/firehose/latest/APIReference/API_CreateDeliveryStream.html AWS API Reference> for CreateDeliveryStream.+module Network.AWS.Firehose.CreateDeliveryStream+    (+    -- * Creating a Request+      createDeliveryStream+    , CreateDeliveryStream+    -- * Request Lenses+    , cdsS3DestinationConfiguration+    , cdsRedshiftDestinationConfiguration+    , cdsDeliveryStreamName++    -- * Destructuring the Response+    , createDeliveryStreamResponse+    , CreateDeliveryStreamResponse+    -- * Response Lenses+    , cdsrsDeliveryStreamARN+    , cdsrsResponseStatus+    ) where++import           Network.AWS.Firehose.Types+import           Network.AWS.Firehose.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response++-- | Contains the parameters for CreateDeliveryStream.+--+-- /See:/ 'createDeliveryStream' smart constructor.+data CreateDeliveryStream = CreateDeliveryStream'+    { _cdsS3DestinationConfiguration       :: !(Maybe S3DestinationConfiguration)+    , _cdsRedshiftDestinationConfiguration :: !(Maybe RedshiftDestinationConfiguration)+    , _cdsDeliveryStreamName               :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateDeliveryStream' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cdsS3DestinationConfiguration'+--+-- * 'cdsRedshiftDestinationConfiguration'+--+-- * 'cdsDeliveryStreamName'+createDeliveryStream+    :: Text -- ^ 'cdsDeliveryStreamName'+    -> CreateDeliveryStream+createDeliveryStream pDeliveryStreamName_ =+    CreateDeliveryStream'+    { _cdsS3DestinationConfiguration = Nothing+    , _cdsRedshiftDestinationConfiguration = Nothing+    , _cdsDeliveryStreamName = pDeliveryStreamName_+    }++-- | The destination in Amazon S3. This value must be specified if+-- 'RedshiftDestinationConfiguration' is specified (see restrictions listed+-- above).+cdsS3DestinationConfiguration :: Lens' CreateDeliveryStream (Maybe S3DestinationConfiguration)+cdsS3DestinationConfiguration = lens _cdsS3DestinationConfiguration (\ s a -> s{_cdsS3DestinationConfiguration = a});++-- | The destination in Amazon Redshift. This value cannot be specified if+-- Amazon S3 is the desired destination (see restrictions listed above).+cdsRedshiftDestinationConfiguration :: Lens' CreateDeliveryStream (Maybe RedshiftDestinationConfiguration)+cdsRedshiftDestinationConfiguration = lens _cdsRedshiftDestinationConfiguration (\ s a -> s{_cdsRedshiftDestinationConfiguration = a});++-- | The name of the delivery stream.+cdsDeliveryStreamName :: Lens' CreateDeliveryStream Text+cdsDeliveryStreamName = lens _cdsDeliveryStreamName (\ s a -> s{_cdsDeliveryStreamName = a});++instance AWSRequest CreateDeliveryStream where+        type Rs CreateDeliveryStream =+             CreateDeliveryStreamResponse+        request = postJSON firehose+        response+          = receiveJSON+              (\ s h x ->+                 CreateDeliveryStreamResponse' <$>+                   (x .?> "DeliveryStreamARN") <*> (pure (fromEnum s)))++instance ToHeaders CreateDeliveryStream where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("Firehose_20150804.CreateDeliveryStream" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateDeliveryStream where+        toJSON CreateDeliveryStream'{..}+          = object+              (catMaybes+                 [("S3DestinationConfiguration" .=) <$>+                    _cdsS3DestinationConfiguration,+                  ("RedshiftDestinationConfiguration" .=) <$>+                    _cdsRedshiftDestinationConfiguration,+                  Just+                    ("DeliveryStreamName" .= _cdsDeliveryStreamName)])++instance ToPath CreateDeliveryStream where+        toPath = const "/"++instance ToQuery CreateDeliveryStream where+        toQuery = const mempty++-- | Contains the output of CreateDeliveryStream.+--+-- /See:/ 'createDeliveryStreamResponse' smart constructor.+data CreateDeliveryStreamResponse = CreateDeliveryStreamResponse'+    { _cdsrsDeliveryStreamARN :: !(Maybe Text)+    , _cdsrsResponseStatus    :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateDeliveryStreamResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cdsrsDeliveryStreamARN'+--+-- * 'cdsrsResponseStatus'+createDeliveryStreamResponse+    :: Int -- ^ 'cdsrsResponseStatus'+    -> CreateDeliveryStreamResponse+createDeliveryStreamResponse pResponseStatus_ =+    CreateDeliveryStreamResponse'+    { _cdsrsDeliveryStreamARN = Nothing+    , _cdsrsResponseStatus = pResponseStatus_+    }++-- | The ARN of the delivery stream.+cdsrsDeliveryStreamARN :: Lens' CreateDeliveryStreamResponse (Maybe Text)+cdsrsDeliveryStreamARN = lens _cdsrsDeliveryStreamARN (\ s a -> s{_cdsrsDeliveryStreamARN = a});++-- | The response status code.+cdsrsResponseStatus :: Lens' CreateDeliveryStreamResponse Int+cdsrsResponseStatus = lens _cdsrsResponseStatus (\ s a -> s{_cdsrsResponseStatus = a});
+ gen/Network/AWS/Firehose/DeleteDeliveryStream.hs view
@@ -0,0 +1,136 @@+{-# 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.Firehose.DeleteDeliveryStream+-- 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)+--+-- Deletes a delivery stream and its data.+--+-- You can delete a delivery stream only if it is in 'ACTIVE' or 'DELETING'+-- state, and not in the 'CREATING' state. While the deletion request is in+-- process, the delivery stream is in the 'DELETING' state.+--+-- To check the state of a delivery stream, use DescribeDeliveryStream.+--+-- While the delivery stream is 'DELETING' state, the service may continue+-- to accept the records, but the service doesn\'t make any guarantees with+-- respect to delivering the data. Therefore, as a best practice, you+-- should first stop any applications that are sending records before+-- deleting a delivery stream.+--+-- /See:/ <http://docs.aws.amazon.com/firehose/latest/APIReference/API_DeleteDeliveryStream.html AWS API Reference> for DeleteDeliveryStream.+module Network.AWS.Firehose.DeleteDeliveryStream+    (+    -- * Creating a Request+      deleteDeliveryStream+    , DeleteDeliveryStream+    -- * Request Lenses+    , dDeliveryStreamName++    -- * Destructuring the Response+    , deleteDeliveryStreamResponse+    , DeleteDeliveryStreamResponse+    -- * Response Lenses+    , drsResponseStatus+    ) where++import           Network.AWS.Firehose.Types+import           Network.AWS.Firehose.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response++-- | Contains the parameters for DeleteDeliveryStream.+--+-- /See:/ 'deleteDeliveryStream' smart constructor.+newtype DeleteDeliveryStream = DeleteDeliveryStream'+    { _dDeliveryStreamName :: Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteDeliveryStream' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dDeliveryStreamName'+deleteDeliveryStream+    :: Text -- ^ 'dDeliveryStreamName'+    -> DeleteDeliveryStream+deleteDeliveryStream pDeliveryStreamName_ =+    DeleteDeliveryStream'+    { _dDeliveryStreamName = pDeliveryStreamName_+    }++-- | The name of the delivery stream.+dDeliveryStreamName :: Lens' DeleteDeliveryStream Text+dDeliveryStreamName = lens _dDeliveryStreamName (\ s a -> s{_dDeliveryStreamName = a});++instance AWSRequest DeleteDeliveryStream where+        type Rs DeleteDeliveryStream =+             DeleteDeliveryStreamResponse+        request = postJSON firehose+        response+          = receiveEmpty+              (\ s h x ->+                 DeleteDeliveryStreamResponse' <$>+                   (pure (fromEnum s)))++instance ToHeaders DeleteDeliveryStream where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("Firehose_20150804.DeleteDeliveryStream" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteDeliveryStream where+        toJSON DeleteDeliveryStream'{..}+          = object+              (catMaybes+                 [Just+                    ("DeliveryStreamName" .= _dDeliveryStreamName)])++instance ToPath DeleteDeliveryStream where+        toPath = const "/"++instance ToQuery DeleteDeliveryStream where+        toQuery = const mempty++-- | Contains the output of DeleteDeliveryStream.+--+-- /See:/ 'deleteDeliveryStreamResponse' smart constructor.+newtype DeleteDeliveryStreamResponse = DeleteDeliveryStreamResponse'+    { _drsResponseStatus :: Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteDeliveryStreamResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drsResponseStatus'+deleteDeliveryStreamResponse+    :: Int -- ^ 'drsResponseStatus'+    -> DeleteDeliveryStreamResponse+deleteDeliveryStreamResponse pResponseStatus_ =+    DeleteDeliveryStreamResponse'+    { _drsResponseStatus = pResponseStatus_+    }++-- | The response status code.+drsResponseStatus :: Lens' DeleteDeliveryStreamResponse Int+drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});
+ gen/Network/AWS/Firehose/DescribeDeliveryStream.hs view
@@ -0,0 +1,162 @@+{-# 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.Firehose.DescribeDeliveryStream+-- 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)+--+-- Describes the specified delivery stream and gets the status. For+-- example, after your delivery stream is created, call+-- DescribeDeliveryStream to see if the delivery stream is 'ACTIVE' and+-- therefore ready for data to be sent to it.+--+-- /See:/ <http://docs.aws.amazon.com/firehose/latest/APIReference/API_DescribeDeliveryStream.html AWS API Reference> for DescribeDeliveryStream.+module Network.AWS.Firehose.DescribeDeliveryStream+    (+    -- * Creating a Request+      describeDeliveryStream+    , DescribeDeliveryStream+    -- * Request Lenses+    , ddsExclusiveStartDestinationId+    , ddsLimit+    , ddsDeliveryStreamName++    -- * Destructuring the Response+    , describeDeliveryStreamResponse+    , DescribeDeliveryStreamResponse+    -- * Response Lenses+    , ddsrsResponseStatus+    , ddsrsDeliveryStreamDescription+    ) where++import           Network.AWS.Firehose.Types+import           Network.AWS.Firehose.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response++-- | Contains the parameters for DescribeDeliveryStream.+--+-- /See:/ 'describeDeliveryStream' smart constructor.+data DescribeDeliveryStream = DescribeDeliveryStream'+    { _ddsExclusiveStartDestinationId :: !(Maybe Text)+    , _ddsLimit                       :: !(Maybe Nat)+    , _ddsDeliveryStreamName          :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeDeliveryStream' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ddsExclusiveStartDestinationId'+--+-- * 'ddsLimit'+--+-- * 'ddsDeliveryStreamName'+describeDeliveryStream+    :: Text -- ^ 'ddsDeliveryStreamName'+    -> DescribeDeliveryStream+describeDeliveryStream pDeliveryStreamName_ =+    DescribeDeliveryStream'+    { _ddsExclusiveStartDestinationId = Nothing+    , _ddsLimit = Nothing+    , _ddsDeliveryStreamName = pDeliveryStreamName_+    }++-- | Specifies the destination ID to start returning the destination+-- information. Currently Amazon Kinesis Firehose supports one destination+-- per delivery stream.+ddsExclusiveStartDestinationId :: Lens' DescribeDeliveryStream (Maybe Text)+ddsExclusiveStartDestinationId = lens _ddsExclusiveStartDestinationId (\ s a -> s{_ddsExclusiveStartDestinationId = a});++-- | The limit on the number of destinations to return. Currently, you can+-- have one destination per delivery stream.+ddsLimit :: Lens' DescribeDeliveryStream (Maybe Natural)+ddsLimit = lens _ddsLimit (\ s a -> s{_ddsLimit = a}) . mapping _Nat;++-- | The name of the delivery stream.+ddsDeliveryStreamName :: Lens' DescribeDeliveryStream Text+ddsDeliveryStreamName = lens _ddsDeliveryStreamName (\ s a -> s{_ddsDeliveryStreamName = a});++instance AWSRequest DescribeDeliveryStream where+        type Rs DescribeDeliveryStream =+             DescribeDeliveryStreamResponse+        request = postJSON firehose+        response+          = receiveJSON+              (\ s h x ->+                 DescribeDeliveryStreamResponse' <$>+                   (pure (fromEnum s)) <*>+                     (x .:> "DeliveryStreamDescription"))++instance ToHeaders DescribeDeliveryStream where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("Firehose_20150804.DescribeDeliveryStream" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeDeliveryStream where+        toJSON DescribeDeliveryStream'{..}+          = object+              (catMaybes+                 [("ExclusiveStartDestinationId" .=) <$>+                    _ddsExclusiveStartDestinationId,+                  ("Limit" .=) <$> _ddsLimit,+                  Just+                    ("DeliveryStreamName" .= _ddsDeliveryStreamName)])++instance ToPath DescribeDeliveryStream where+        toPath = const "/"++instance ToQuery DescribeDeliveryStream where+        toQuery = const mempty++-- | Contains the output of DescribeDeliveryStream.+--+-- /See:/ 'describeDeliveryStreamResponse' smart constructor.+data DescribeDeliveryStreamResponse = DescribeDeliveryStreamResponse'+    { _ddsrsResponseStatus            :: !Int+    , _ddsrsDeliveryStreamDescription :: !DeliveryStreamDescription+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeDeliveryStreamResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ddsrsResponseStatus'+--+-- * 'ddsrsDeliveryStreamDescription'+describeDeliveryStreamResponse+    :: Int -- ^ 'ddsrsResponseStatus'+    -> DeliveryStreamDescription -- ^ 'ddsrsDeliveryStreamDescription'+    -> DescribeDeliveryStreamResponse+describeDeliveryStreamResponse pResponseStatus_ pDeliveryStreamDescription_ =+    DescribeDeliveryStreamResponse'+    { _ddsrsResponseStatus = pResponseStatus_+    , _ddsrsDeliveryStreamDescription = pDeliveryStreamDescription_+    }++-- | The response status code.+ddsrsResponseStatus :: Lens' DescribeDeliveryStreamResponse Int+ddsrsResponseStatus = lens _ddsrsResponseStatus (\ s a -> s{_ddsrsResponseStatus = a});++-- | Information about the delivery stream.+ddsrsDeliveryStreamDescription :: Lens' DescribeDeliveryStreamResponse DeliveryStreamDescription+ddsrsDeliveryStreamDescription = lens _ddsrsDeliveryStreamDescription (\ s a -> s{_ddsrsDeliveryStreamDescription = a});
+ gen/Network/AWS/Firehose/ListDeliveryStreams.hs view
@@ -0,0 +1,163 @@+{-# 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.Firehose.ListDeliveryStreams+-- 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)+--+-- Lists your delivery streams.+--+-- The number of delivery streams might be too large to return using a+-- single call to ListDeliveryStreams. You can limit the number of delivery+-- streams returned, using the 'Limit' parameter. To determine whether+-- there are more delivery streams to list, check the value of+-- 'HasMoreDeliveryStreams' in the output. If there are more delivery+-- streams to list, you can request them by specifying the name of the last+-- delivery stream returned in the call in the+-- 'ExclusiveStartDeliveryStreamName' parameter of a subsequent call.+--+-- /See:/ <http://docs.aws.amazon.com/firehose/latest/APIReference/API_ListDeliveryStreams.html AWS API Reference> for ListDeliveryStreams.+module Network.AWS.Firehose.ListDeliveryStreams+    (+    -- * Creating a Request+      listDeliveryStreams+    , ListDeliveryStreams+    -- * Request Lenses+    , ldsLimit+    , ldsExclusiveStartDeliveryStreamName++    -- * Destructuring the Response+    , listDeliveryStreamsResponse+    , ListDeliveryStreamsResponse+    -- * Response Lenses+    , ldsrsResponseStatus+    , ldsrsDeliveryStreamNames+    , ldsrsHasMoreDeliveryStreams+    ) where++import           Network.AWS.Firehose.Types+import           Network.AWS.Firehose.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response++-- | Contains the parameters for ListDeliveryStreams.+--+-- /See:/ 'listDeliveryStreams' smart constructor.+data ListDeliveryStreams = ListDeliveryStreams'+    { _ldsLimit                            :: !(Maybe Nat)+    , _ldsExclusiveStartDeliveryStreamName :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListDeliveryStreams' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ldsLimit'+--+-- * 'ldsExclusiveStartDeliveryStreamName'+listDeliveryStreams+    :: ListDeliveryStreams+listDeliveryStreams =+    ListDeliveryStreams'+    { _ldsLimit = Nothing+    , _ldsExclusiveStartDeliveryStreamName = Nothing+    }++-- | The maximum number of delivery streams to list.+ldsLimit :: Lens' ListDeliveryStreams (Maybe Natural)+ldsLimit = lens _ldsLimit (\ s a -> s{_ldsLimit = a}) . mapping _Nat;++-- | The name of the delivery stream to start the list with.+ldsExclusiveStartDeliveryStreamName :: Lens' ListDeliveryStreams (Maybe Text)+ldsExclusiveStartDeliveryStreamName = lens _ldsExclusiveStartDeliveryStreamName (\ s a -> s{_ldsExclusiveStartDeliveryStreamName = a});++instance AWSRequest ListDeliveryStreams where+        type Rs ListDeliveryStreams =+             ListDeliveryStreamsResponse+        request = postJSON firehose+        response+          = receiveJSON+              (\ s h x ->+                 ListDeliveryStreamsResponse' <$>+                   (pure (fromEnum s)) <*>+                     (x .?> "DeliveryStreamNames" .!@ mempty)+                     <*> (x .:> "HasMoreDeliveryStreams"))++instance ToHeaders ListDeliveryStreams where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("Firehose_20150804.ListDeliveryStreams" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListDeliveryStreams where+        toJSON ListDeliveryStreams'{..}+          = object+              (catMaybes+                 [("Limit" .=) <$> _ldsLimit,+                  ("ExclusiveStartDeliveryStreamName" .=) <$>+                    _ldsExclusiveStartDeliveryStreamName])++instance ToPath ListDeliveryStreams where+        toPath = const "/"++instance ToQuery ListDeliveryStreams where+        toQuery = const mempty++-- | Contains the output of ListDeliveryStreams.+--+-- /See:/ 'listDeliveryStreamsResponse' smart constructor.+data ListDeliveryStreamsResponse = ListDeliveryStreamsResponse'+    { _ldsrsResponseStatus         :: !Int+    , _ldsrsDeliveryStreamNames    :: ![Text]+    , _ldsrsHasMoreDeliveryStreams :: !Bool+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListDeliveryStreamsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ldsrsResponseStatus'+--+-- * 'ldsrsDeliveryStreamNames'+--+-- * 'ldsrsHasMoreDeliveryStreams'+listDeliveryStreamsResponse+    :: Int -- ^ 'ldsrsResponseStatus'+    -> Bool -- ^ 'ldsrsHasMoreDeliveryStreams'+    -> ListDeliveryStreamsResponse+listDeliveryStreamsResponse pResponseStatus_ pHasMoreDeliveryStreams_ =+    ListDeliveryStreamsResponse'+    { _ldsrsResponseStatus = pResponseStatus_+    , _ldsrsDeliveryStreamNames = mempty+    , _ldsrsHasMoreDeliveryStreams = pHasMoreDeliveryStreams_+    }++-- | The response status code.+ldsrsResponseStatus :: Lens' ListDeliveryStreamsResponse Int+ldsrsResponseStatus = lens _ldsrsResponseStatus (\ s a -> s{_ldsrsResponseStatus = a});++-- | The names of the delivery streams.+ldsrsDeliveryStreamNames :: Lens' ListDeliveryStreamsResponse [Text]+ldsrsDeliveryStreamNames = lens _ldsrsDeliveryStreamNames (\ s a -> s{_ldsrsDeliveryStreamNames = a}) . _Coerce;++-- | Indicates whether there are more delivery streams available to list.+ldsrsHasMoreDeliveryStreams :: Lens' ListDeliveryStreamsResponse Bool+ldsrsHasMoreDeliveryStreams = lens _ldsrsHasMoreDeliveryStreams (\ s a -> s{_ldsrsHasMoreDeliveryStreams = a});
+ gen/Network/AWS/Firehose/PutRecord.hs view
@@ -0,0 +1,184 @@+{-# 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.Firehose.PutRecord+-- 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)+--+-- Writes a single data record into an Amazon Kinesis Firehose delivery+-- stream. To write multiple data records into a delivery stream, use+-- PutRecordBatch. Applications using these operations are referred to as+-- producers.+--+-- By default, each delivery stream can take in up to 2,000 transactions+-- per second, 5,000 records per second, or 5 MB per second. Note that if+-- you use PutRecord and PutRecordBatch, the limits are an aggregate across+-- these two operations for each delivery stream. For more information+-- about limits and how to request an increase, see+-- <http://docs.aws.amazon.com/firehose/latest/dev/limits.html Amazon Kinesis Firehose Limits>.+--+-- You must specify the name of the delivery stream and the data record+-- when using PutRecord. The data record consists of a data blob that can+-- be up to 1,000 KB in size, and any kind of data, for example, a segment+-- from a log file, geographic location data, web site clickstream data,+-- etc.+--+-- Amazon Kinesis Firehose buffers records before delivering them to the+-- destination. To disambiguate the data blobs at the destination, a common+-- solution is to use delimiters in the data, such as a newline ('\\n') or+-- some other character unique within the data. This allows the consumer+-- application(s) to parse individual data items when reading the data from+-- the destination.+--+-- Amazon Kinesis Firehose does not maintain data record ordering. If the+-- destination data needs to be re-ordered by the consumer application, the+-- producer should include some form of sequence number in each data+-- record.+--+-- The PutRecord operation returns a 'RecordId', which is a unique string+-- assigned to each record. Producer applications can use this ID for+-- purposes such as auditability and investigation.+--+-- If the PutRecord operation throws a 'ServiceUnavailableException', back+-- off and retry. If the exception persists, it is possible that the+-- throughput limits have been exceeded for the delivery stream.+--+-- Data records sent to Amazon Kinesis Firehose are stored for 24 hours+-- from the time they are added to a delivery stream as it attempts to send+-- the records to the destination. If the destination is unreachable for+-- more than 24 hours, the data is no longer available.+--+-- /See:/ <http://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecord.html AWS API Reference> for PutRecord.+module Network.AWS.Firehose.PutRecord+    (+    -- * Creating a Request+      putRecord+    , PutRecord+    -- * Request Lenses+    , prDeliveryStreamName+    , prRecord++    -- * Destructuring the Response+    , putRecordResponse+    , PutRecordResponse+    -- * Response Lenses+    , prrsResponseStatus+    , prrsRecordId+    ) where++import           Network.AWS.Firehose.Types+import           Network.AWS.Firehose.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response++-- | Contains the parameters for PutRecord.+--+-- /See:/ 'putRecord' smart constructor.+data PutRecord = PutRecord'+    { _prDeliveryStreamName :: !Text+    , _prRecord             :: !Record+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PutRecord' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prDeliveryStreamName'+--+-- * 'prRecord'+putRecord+    :: Text -- ^ 'prDeliveryStreamName'+    -> Record -- ^ 'prRecord'+    -> PutRecord+putRecord pDeliveryStreamName_ pRecord_ =+    PutRecord'+    { _prDeliveryStreamName = pDeliveryStreamName_+    , _prRecord = pRecord_+    }++-- | The name of the delivery stream.+prDeliveryStreamName :: Lens' PutRecord Text+prDeliveryStreamName = lens _prDeliveryStreamName (\ s a -> s{_prDeliveryStreamName = a});++-- | The record.+prRecord :: Lens' PutRecord Record+prRecord = lens _prRecord (\ s a -> s{_prRecord = a});++instance AWSRequest PutRecord where+        type Rs PutRecord = PutRecordResponse+        request = postJSON firehose+        response+          = receiveJSON+              (\ s h x ->+                 PutRecordResponse' <$>+                   (pure (fromEnum s)) <*> (x .:> "RecordId"))++instance ToHeaders PutRecord where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("Firehose_20150804.PutRecord" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON PutRecord where+        toJSON PutRecord'{..}+          = object+              (catMaybes+                 [Just+                    ("DeliveryStreamName" .= _prDeliveryStreamName),+                  Just ("Record" .= _prRecord)])++instance ToPath PutRecord where+        toPath = const "/"++instance ToQuery PutRecord where+        toQuery = const mempty++-- | Contains the output of PutRecord.+--+-- /See:/ 'putRecordResponse' smart constructor.+data PutRecordResponse = PutRecordResponse'+    { _prrsResponseStatus :: !Int+    , _prrsRecordId       :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PutRecordResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prrsResponseStatus'+--+-- * 'prrsRecordId'+putRecordResponse+    :: Int -- ^ 'prrsResponseStatus'+    -> Text -- ^ 'prrsRecordId'+    -> PutRecordResponse+putRecordResponse pResponseStatus_ pRecordId_ =+    PutRecordResponse'+    { _prrsResponseStatus = pResponseStatus_+    , _prrsRecordId = pRecordId_+    }++-- | The response status code.+prrsResponseStatus :: Lens' PutRecordResponse Int+prrsResponseStatus = lens _prrsResponseStatus (\ s a -> s{_prrsResponseStatus = a});++-- | The ID of the record.+prrsRecordId :: Lens' PutRecordResponse Text+prrsRecordId = lens _prrsRecordId (\ s a -> s{_prrsRecordId = a});
+ gen/Network/AWS/Firehose/PutRecordBatch.hs view
@@ -0,0 +1,217 @@+{-# 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.Firehose.PutRecordBatch+-- 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)+--+-- Writes multiple data records into a delivery stream in a single call,+-- which can achieve higher throughput per producer than when writing+-- single records. To write single data records into a delivery stream, use+-- PutRecord. Applications using these operations are referred to as+-- producers.+--+-- Each PutRecordBatch request supports up to 500 records. Each record in+-- the request can be as large as 1,000 KB (before 64-bit encoding), up to+-- a limit of 4 MB for the entire request. By default, each delivery stream+-- can take in up to 2,000 transactions per second, 5,000 records per+-- second, or 5 MB per second. Note that if you use PutRecord and+-- PutRecordBatch, the limits are an aggregate across these two operations+-- for each delivery stream. For more information about limits and how to+-- request an increase, see+-- <http://docs.aws.amazon.com/firehose/latest/dev/limits.html Amazon Kinesis Firehose Limits>.+--+-- You must specify the name of the delivery stream and the data record+-- when using PutRecord. The data record consists of a data blob that can+-- be up to 1,000 KB in size, and any kind of data, for example, a segment+-- from a log file, geographic location data, web site clickstream data,+-- and so on.+--+-- Amazon Kinesis Firehose buffers records before delivering them to the+-- destination. To disambiguate the data blobs at the destination, a common+-- solution is to use delimiters in the data, such as a newline ('\\n') or+-- some other character unique within the data. This allows the consumer+-- application(s) to parse individual data items when reading the data from+-- the destination.+--+-- The PutRecordBatch response includes a count of any failed records,+-- 'FailedPutCount', and an array of responses, 'RequestResponses'. The+-- 'FailedPutCount' value is a count of records that failed. Each entry in+-- the 'RequestResponses' array gives additional information of the+-- processed record. Each entry in 'RequestResponses' directly correlates+-- with a record in the request array using the same ordering, from the top+-- to the bottom of the request and response. 'RequestResponses' always+-- includes the same number of records as the request array.+-- 'RequestResponses' both successfully and unsuccessfully processed+-- records. Amazon Kinesis Firehose attempts to process all records in each+-- PutRecordBatch request. A single record failure does not stop the+-- processing of subsequent records.+--+-- A successfully processed record includes a 'RecordId' value, which is a+-- unique value identified for the record. An unsuccessfully processed+-- record includes 'ErrorCode' and 'ErrorMessage' values. 'ErrorCode'+-- reflects the type of error and is one of the following values:+-- 'ServiceUnavailable' or 'InternalFailure'. 'ErrorMessage' provides more+-- detailed information about the error.+--+-- If 'FailedPutCount' is greater than 0 (zero), retry the request. A retry+-- of the entire batch of records is possible; however, we strongly+-- recommend that you inspect the entire response and resend only those+-- records that failed processing. This minimizes duplicate records and+-- also reduces the total bytes sent (and corresponding charges).+--+-- If the PutRecordBatch operation throws a 'ServiceUnavailableException',+-- back off and retry. If the exception persists, it is possible that the+-- throughput limits have been exceeded for the delivery stream.+--+-- Data records sent to Amazon Kinesis Firehose are stored for 24 hours+-- from the time they are added to a delivery stream as it attempts to send+-- the records to the destination. If the destination is unreachable for+-- more than 24 hours, the data is no longer available.+--+-- /See:/ <http://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html AWS API Reference> for PutRecordBatch.+module Network.AWS.Firehose.PutRecordBatch+    (+    -- * Creating a Request+      putRecordBatch+    , PutRecordBatch+    -- * Request Lenses+    , prbDeliveryStreamName+    , prbRecords++    -- * Destructuring the Response+    , putRecordBatchResponse+    , PutRecordBatchResponse+    -- * Response Lenses+    , prbrsResponseStatus+    , prbrsFailedPutCount+    , prbrsRequestResponses+    ) where++import           Network.AWS.Firehose.Types+import           Network.AWS.Firehose.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response++-- | Contains the parameters for PutRecordBatch.+--+-- /See:/ 'putRecordBatch' smart constructor.+data PutRecordBatch = PutRecordBatch'+    { _prbDeliveryStreamName :: !Text+    , _prbRecords            :: !(List1 Record)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PutRecordBatch' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prbDeliveryStreamName'+--+-- * 'prbRecords'+putRecordBatch+    :: Text -- ^ 'prbDeliveryStreamName'+    -> NonEmpty Record -- ^ 'prbRecords'+    -> PutRecordBatch+putRecordBatch pDeliveryStreamName_ pRecords_ =+    PutRecordBatch'+    { _prbDeliveryStreamName = pDeliveryStreamName_+    , _prbRecords = _List1 # pRecords_+    }++-- | The name of the delivery stream.+prbDeliveryStreamName :: Lens' PutRecordBatch Text+prbDeliveryStreamName = lens _prbDeliveryStreamName (\ s a -> s{_prbDeliveryStreamName = a});++-- | One or more records.+prbRecords :: Lens' PutRecordBatch (NonEmpty Record)+prbRecords = lens _prbRecords (\ s a -> s{_prbRecords = a}) . _List1;++instance AWSRequest PutRecordBatch where+        type Rs PutRecordBatch = PutRecordBatchResponse+        request = postJSON firehose+        response+          = receiveJSON+              (\ s h x ->+                 PutRecordBatchResponse' <$>+                   (pure (fromEnum s)) <*> (x .:> "FailedPutCount") <*>+                     (x .:> "RequestResponses"))++instance ToHeaders PutRecordBatch where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("Firehose_20150804.PutRecordBatch" :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON PutRecordBatch where+        toJSON PutRecordBatch'{..}+          = object+              (catMaybes+                 [Just+                    ("DeliveryStreamName" .= _prbDeliveryStreamName),+                  Just ("Records" .= _prbRecords)])++instance ToPath PutRecordBatch where+        toPath = const "/"++instance ToQuery PutRecordBatch where+        toQuery = const mempty++-- | Contains the output of PutRecordBatch.+--+-- /See:/ 'putRecordBatchResponse' smart constructor.+data PutRecordBatchResponse = PutRecordBatchResponse'+    { _prbrsResponseStatus   :: !Int+    , _prbrsFailedPutCount   :: !Nat+    , _prbrsRequestResponses :: !(List1 PutRecordBatchResponseEntry)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PutRecordBatchResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prbrsResponseStatus'+--+-- * 'prbrsFailedPutCount'+--+-- * 'prbrsRequestResponses'+putRecordBatchResponse+    :: Int -- ^ 'prbrsResponseStatus'+    -> Natural -- ^ 'prbrsFailedPutCount'+    -> NonEmpty PutRecordBatchResponseEntry -- ^ 'prbrsRequestResponses'+    -> PutRecordBatchResponse+putRecordBatchResponse pResponseStatus_ pFailedPutCount_ pRequestResponses_ =+    PutRecordBatchResponse'+    { _prbrsResponseStatus = pResponseStatus_+    , _prbrsFailedPutCount = _Nat # pFailedPutCount_+    , _prbrsRequestResponses = _List1 # pRequestResponses_+    }++-- | The response status code.+prbrsResponseStatus :: Lens' PutRecordBatchResponse Int+prbrsResponseStatus = lens _prbrsResponseStatus (\ s a -> s{_prbrsResponseStatus = a});++-- | The number of unsuccessfully written records.+prbrsFailedPutCount :: Lens' PutRecordBatchResponse Natural+prbrsFailedPutCount = lens _prbrsFailedPutCount (\ s a -> s{_prbrsFailedPutCount = a}) . _Nat;++-- | The results for the individual records. The index of each element+-- matches the same index in which records were sent.+prbrsRequestResponses :: Lens' PutRecordBatchResponse (NonEmpty PutRecordBatchResponseEntry)+prbrsRequestResponses = lens _prbrsRequestResponses (\ s a -> s{_prbrsRequestResponses = a}) . _List1;
+ gen/Network/AWS/Firehose/Types.hs view
@@ -0,0 +1,216 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Network.AWS.Firehose.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.Firehose.Types+    (+    -- * Service Configuration+      firehose++    -- * Errors+    , _InvalidArgumentException+    , _ConcurrentModificationException+    , _ServiceUnavailableException+    , _ResourceNotFoundException+    , _LimitExceededException+    , _ResourceInUseException++    -- * CompressionFormat+    , CompressionFormat (..)++    -- * DeliveryStreamStatus+    , DeliveryStreamStatus (..)++    -- * NoEncryptionConfig+    , NoEncryptionConfig (..)++    -- * BufferingHints+    , BufferingHints+    , bufferingHints+    , bhSizeInMBs+    , bhIntervalInSeconds++    -- * CopyCommand+    , CopyCommand+    , copyCommand+    , ccCopyOptions+    , ccDataTableColumns+    , ccDataTableName++    -- * DeliveryStreamDescription+    , DeliveryStreamDescription+    , deliveryStreamDescription+    , dsdCreateTimestamp+    , dsdLastUpdateTimestamp+    , dsdDeliveryStreamName+    , dsdDeliveryStreamARN+    , dsdDeliveryStreamStatus+    , dsdVersionId+    , dsdDestinations+    , dsdHasMoreDestinations++    -- * DestinationDescription+    , DestinationDescription+    , destinationDescription+    , ddS3DestinationDescription+    , ddRedshiftDestinationDescription+    , ddDestinationId++    -- * EncryptionConfiguration+    , EncryptionConfiguration+    , encryptionConfiguration+    , ecNoEncryptionConfig+    , ecKMSEncryptionConfig++    -- * KMSEncryptionConfig+    , KMSEncryptionConfig+    , kmsEncryptionConfig+    , kecAWSKMSKeyARN++    -- * PutRecordBatchResponseEntry+    , PutRecordBatchResponseEntry+    , putRecordBatchResponseEntry+    , prbreRecordId+    , prbreErrorCode+    , prbreErrorMessage++    -- * Record+    , Record+    , record+    , rData++    -- * RedshiftDestinationConfiguration+    , RedshiftDestinationConfiguration+    , redshiftDestinationConfiguration+    , rdcRoleARN+    , rdcClusterJDBCURL+    , rdcCopyCommand+    , rdcUsername+    , rdcPassword+    , rdcS3Configuration++    -- * RedshiftDestinationDescription+    , RedshiftDestinationDescription+    , redshiftDestinationDescription+    , rddRoleARN+    , rddClusterJDBCURL+    , rddCopyCommand+    , rddUsername+    , rddS3DestinationDescription++    -- * RedshiftDestinationUpdate+    , RedshiftDestinationUpdate+    , redshiftDestinationUpdate+    , rduUsername+    , rduS3Update+    , rduPassword+    , rduCopyCommand+    , rduClusterJDBCURL+    , rduRoleARN++    -- * S3DestinationConfiguration+    , S3DestinationConfiguration+    , s3DestinationConfiguration+    , sdcPrefix+    , sdcEncryptionConfiguration+    , sdcCompressionFormat+    , sdcBufferingHints+    , sdcRoleARN+    , sdcBucketARN++    -- * S3DestinationDescription+    , S3DestinationDescription+    , s3DestinationDescription+    , sddPrefix+    , sddRoleARN+    , sddBucketARN+    , sddBufferingHints+    , sddCompressionFormat+    , sddEncryptionConfiguration++    -- * S3DestinationUpdate+    , S3DestinationUpdate+    , s3DestinationUpdate+    , sduPrefix+    , sduEncryptionConfiguration+    , sduCompressionFormat+    , sduBufferingHints+    , sduBucketARN+    , sduRoleARN+    ) where++import           Network.AWS.Firehose.Types.Product+import           Network.AWS.Firehose.Types.Sum+import           Network.AWS.Prelude+import           Network.AWS.Sign.V4++-- | API version '2015-08-04' of the Amazon Kinesis Firehose SDK configuration.+firehose :: Service+firehose =+    Service+    { _svcAbbrev = "Firehose"+    , _svcSigner = v4+    , _svcPrefix = "firehose"+    , _svcVersion = "2015-08-04"+    , _svcEndpoint = defaultEndpoint firehose+    , _svcTimeout = Just 70+    , _svcCheck = statusSuccess+    , _svcError = parseJSONError+    , _svcRetry = retry+    }+  where+    retry =+        Exponential+        { _retryBase = 5.0e-2+        , _retryGrowth = 2+        , _retryAttempts = 5+        , _retryCheck = check+        }+    check e+      | has (hasCode "ThrottlingException" . hasStatus 400) e =+          Just "throttling_exception"+      | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+      | has (hasStatus 503) e = Just "service_unavailable"+      | has (hasStatus 500) e = Just "general_server_error"+      | has (hasStatus 509) e = Just "limit_exceeded"+      | otherwise = Nothing++-- | The specified input parameter has an value that is not valid.+_InvalidArgumentException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidArgumentException = _ServiceError . hasCode "InvalidArgumentException"++-- | Another modification has already happened. Fetch 'VersionId' again and+-- use it to update the destination.+_ConcurrentModificationException :: AsError a => Getting (First ServiceError) a ServiceError+_ConcurrentModificationException =+    _ServiceError . hasCode "ConcurrentModificationException"++-- | The service is unavailable, back off and retry the operation. If you+-- continue to see the exception, throughput limits for the delivery stream+-- may have been exceeded. For more information about limits and how to+-- request an increase, see+-- <http://docs.aws.amazon.com/firehose/latest/dev/limits.html Amazon Kinesis Firehose Limits>.+_ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError+_ServiceUnavailableException =+    _ServiceError . hasStatus 503 . hasCode "ServiceUnavailableException"++-- | The specified resource could not be found.+_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_ResourceNotFoundException =+    _ServiceError . hasCode "ResourceNotFoundException"++-- | You have already reached the limit for a requested resource.+_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_LimitExceededException = _ServiceError . hasCode "LimitExceededException"++-- | The resource is already in use and not available for this operation.+_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError+_ResourceInUseException = _ServiceError . hasCode "ResourceInUseException"
+ gen/Network/AWS/Firehose/Types/Product.hs view
@@ -0,0 +1,975 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric      #-}+{-# LANGUAGE OverloadedStrings  #-}+{-# LANGUAGE RecordWildCards    #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Network.AWS.Firehose.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.Firehose.Types.Product where++import           Network.AWS.Firehose.Types.Sum+import           Network.AWS.Prelude++-- | Describes the buffering to perform before delivering data to the+-- destination.+--+-- /See:/ 'bufferingHints' smart constructor.+data BufferingHints = BufferingHints'+    { _bhSizeInMBs         :: !(Maybe Nat)+    , _bhIntervalInSeconds :: !(Maybe Nat)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'BufferingHints' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bhSizeInMBs'+--+-- * 'bhIntervalInSeconds'+bufferingHints+    :: BufferingHints+bufferingHints =+    BufferingHints'+    { _bhSizeInMBs = Nothing+    , _bhIntervalInSeconds = Nothing+    }++-- | Buffer incoming data to the specified size, in MBs, before delivering it+-- to the destination. The default value is 5.+--+-- We recommend setting SizeInMBs to a value greater than the amount of+-- data you typically ingest into the delivery stream in 10 seconds. For+-- example, if you typically ingest data at 1 MB\/sec set SizeInMBs to be+-- 10 MB or higher.+bhSizeInMBs :: Lens' BufferingHints (Maybe Natural)+bhSizeInMBs = lens _bhSizeInMBs (\ s a -> s{_bhSizeInMBs = a}) . mapping _Nat;++-- | Buffer incoming data for the specified period of time, in seconds,+-- before delivering it to the destination. The default value is 300.+bhIntervalInSeconds :: Lens' BufferingHints (Maybe Natural)+bhIntervalInSeconds = lens _bhIntervalInSeconds (\ s a -> s{_bhIntervalInSeconds = a}) . mapping _Nat;++instance FromJSON BufferingHints where+        parseJSON+          = withObject "BufferingHints"+              (\ x ->+                 BufferingHints' <$>+                   (x .:? "SizeInMBs") <*> (x .:? "IntervalInSeconds"))++instance ToJSON BufferingHints where+        toJSON BufferingHints'{..}+          = object+              (catMaybes+                 [("SizeInMBs" .=) <$> _bhSizeInMBs,+                  ("IntervalInSeconds" .=) <$> _bhIntervalInSeconds])++-- | Describes a 'COPY' command for Amazon Redshift.+--+-- /See:/ 'copyCommand' smart constructor.+data CopyCommand = CopyCommand'+    { _ccCopyOptions      :: !(Maybe Text)+    , _ccDataTableColumns :: !(Maybe Text)+    , _ccDataTableName    :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CopyCommand' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ccCopyOptions'+--+-- * 'ccDataTableColumns'+--+-- * 'ccDataTableName'+copyCommand+    :: Text -- ^ 'ccDataTableName'+    -> CopyCommand+copyCommand pDataTableName_ =+    CopyCommand'+    { _ccCopyOptions = Nothing+    , _ccDataTableColumns = Nothing+    , _ccDataTableName = pDataTableName_+    }++-- | Optional parameters to use with the Amazon Redshift 'COPY' command. For+-- more information, see the \"Optional Parameters\" section of+-- <http://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html Amazon Redshift COPY command>.+-- Some possible examples that would apply to Amazon Kinesis Firehose are+-- as follows.+--+-- 'delimiter \'\\t\' lzop;' - fields are delimited with \"\\t\" (TAB+-- character) and compressed using lzop.+--+-- 'delimiter \'|' - fields are delimited with \"|\" (this is the default+-- delimiter).+--+-- 'delimiter \'|\' escape' - the delimiter should be escaped.+--+-- 'fixedwidth \'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6\''+-- - fields are fixed width in the source, with each width specified after+-- every column in the table.+--+-- 'JSON \'s3:\/\/mybucket\/jsonpaths.txt\'' - data is in JSON format, and+-- the path specified is the format of the data.+--+-- For more examples, see and+-- <http://docs.aws.amazon.com/redshift/latest/dg/r_COPY_command_examples.html Amazon Redshift COPY command exmaples>.+ccCopyOptions :: Lens' CopyCommand (Maybe Text)+ccCopyOptions = lens _ccCopyOptions (\ s a -> s{_ccCopyOptions = a});++-- | A comma-separated list of column names.+ccDataTableColumns :: Lens' CopyCommand (Maybe Text)+ccDataTableColumns = lens _ccDataTableColumns (\ s a -> s{_ccDataTableColumns = a});++-- | The name of the target table. The table must already exist in the+-- database.+ccDataTableName :: Lens' CopyCommand Text+ccDataTableName = lens _ccDataTableName (\ s a -> s{_ccDataTableName = a});++instance FromJSON CopyCommand where+        parseJSON+          = withObject "CopyCommand"+              (\ x ->+                 CopyCommand' <$>+                   (x .:? "CopyOptions") <*> (x .:? "DataTableColumns")+                     <*> (x .: "DataTableName"))++instance ToJSON CopyCommand where+        toJSON CopyCommand'{..}+          = object+              (catMaybes+                 [("CopyOptions" .=) <$> _ccCopyOptions,+                  ("DataTableColumns" .=) <$> _ccDataTableColumns,+                  Just ("DataTableName" .= _ccDataTableName)])++-- | Contains information about a delivery stream.+--+-- /See:/ 'deliveryStreamDescription' smart constructor.+data DeliveryStreamDescription = DeliveryStreamDescription'+    { _dsdCreateTimestamp      :: !(Maybe POSIX)+    , _dsdLastUpdateTimestamp  :: !(Maybe POSIX)+    , _dsdDeliveryStreamName   :: !Text+    , _dsdDeliveryStreamARN    :: !Text+    , _dsdDeliveryStreamStatus :: !DeliveryStreamStatus+    , _dsdVersionId            :: !Text+    , _dsdDestinations         :: ![DestinationDescription]+    , _dsdHasMoreDestinations  :: !Bool+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeliveryStreamDescription' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dsdCreateTimestamp'+--+-- * 'dsdLastUpdateTimestamp'+--+-- * 'dsdDeliveryStreamName'+--+-- * 'dsdDeliveryStreamARN'+--+-- * 'dsdDeliveryStreamStatus'+--+-- * 'dsdVersionId'+--+-- * 'dsdDestinations'+--+-- * 'dsdHasMoreDestinations'+deliveryStreamDescription+    :: Text -- ^ 'dsdDeliveryStreamName'+    -> Text -- ^ 'dsdDeliveryStreamARN'+    -> DeliveryStreamStatus -- ^ 'dsdDeliveryStreamStatus'+    -> Text -- ^ 'dsdVersionId'+    -> Bool -- ^ 'dsdHasMoreDestinations'+    -> DeliveryStreamDescription+deliveryStreamDescription pDeliveryStreamName_ pDeliveryStreamARN_ pDeliveryStreamStatus_ pVersionId_ pHasMoreDestinations_ =+    DeliveryStreamDescription'+    { _dsdCreateTimestamp = Nothing+    , _dsdLastUpdateTimestamp = Nothing+    , _dsdDeliveryStreamName = pDeliveryStreamName_+    , _dsdDeliveryStreamARN = pDeliveryStreamARN_+    , _dsdDeliveryStreamStatus = pDeliveryStreamStatus_+    , _dsdVersionId = pVersionId_+    , _dsdDestinations = mempty+    , _dsdHasMoreDestinations = pHasMoreDestinations_+    }++-- | The date and time that the delivery stream was created.+dsdCreateTimestamp :: Lens' DeliveryStreamDescription (Maybe UTCTime)+dsdCreateTimestamp = lens _dsdCreateTimestamp (\ s a -> s{_dsdCreateTimestamp = a}) . mapping _Time;++-- | The date and time that the delivery stream was last updated.+dsdLastUpdateTimestamp :: Lens' DeliveryStreamDescription (Maybe UTCTime)+dsdLastUpdateTimestamp = lens _dsdLastUpdateTimestamp (\ s a -> s{_dsdLastUpdateTimestamp = a}) . mapping _Time;++-- | The name of the delivery stream.+dsdDeliveryStreamName :: Lens' DeliveryStreamDescription Text+dsdDeliveryStreamName = lens _dsdDeliveryStreamName (\ s a -> s{_dsdDeliveryStreamName = a});++-- | The Amazon Resource Name (ARN) of the delivery stream.+dsdDeliveryStreamARN :: Lens' DeliveryStreamDescription Text+dsdDeliveryStreamARN = lens _dsdDeliveryStreamARN (\ s a -> s{_dsdDeliveryStreamARN = a});++-- | The status of the delivery stream.+dsdDeliveryStreamStatus :: Lens' DeliveryStreamDescription DeliveryStreamStatus+dsdDeliveryStreamStatus = lens _dsdDeliveryStreamStatus (\ s a -> s{_dsdDeliveryStreamStatus = a});++-- | Used when calling the UpdateDestination operation. Each time the+-- destination is updated for the delivery stream, the VersionId is+-- changed, and the current VersionId is required when updating the+-- destination. This is so that the service knows it is applying the+-- changes to the correct version of the delivery stream.+dsdVersionId :: Lens' DeliveryStreamDescription Text+dsdVersionId = lens _dsdVersionId (\ s a -> s{_dsdVersionId = a});++-- | The destinations.+dsdDestinations :: Lens' DeliveryStreamDescription [DestinationDescription]+dsdDestinations = lens _dsdDestinations (\ s a -> s{_dsdDestinations = a}) . _Coerce;++-- | Indicates whether there are more destinations available to list.+dsdHasMoreDestinations :: Lens' DeliveryStreamDescription Bool+dsdHasMoreDestinations = lens _dsdHasMoreDestinations (\ s a -> s{_dsdHasMoreDestinations = a});++instance FromJSON DeliveryStreamDescription where+        parseJSON+          = withObject "DeliveryStreamDescription"+              (\ x ->+                 DeliveryStreamDescription' <$>+                   (x .:? "CreateTimestamp") <*>+                     (x .:? "LastUpdateTimestamp")+                     <*> (x .: "DeliveryStreamName")+                     <*> (x .: "DeliveryStreamARN")+                     <*> (x .: "DeliveryStreamStatus")+                     <*> (x .: "VersionId")+                     <*> (x .:? "Destinations" .!= mempty)+                     <*> (x .: "HasMoreDestinations"))++-- | Describes the destination for a delivery stream.+--+-- /See:/ 'destinationDescription' smart constructor.+data DestinationDescription = DestinationDescription'+    { _ddS3DestinationDescription       :: !(Maybe S3DestinationDescription)+    , _ddRedshiftDestinationDescription :: !(Maybe RedshiftDestinationDescription)+    , _ddDestinationId                  :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DestinationDescription' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ddS3DestinationDescription'+--+-- * 'ddRedshiftDestinationDescription'+--+-- * 'ddDestinationId'+destinationDescription+    :: Text -- ^ 'ddDestinationId'+    -> DestinationDescription+destinationDescription pDestinationId_ =+    DestinationDescription'+    { _ddS3DestinationDescription = Nothing+    , _ddRedshiftDestinationDescription = Nothing+    , _ddDestinationId = pDestinationId_+    }++-- | The Amazon S3 destination.+ddS3DestinationDescription :: Lens' DestinationDescription (Maybe S3DestinationDescription)+ddS3DestinationDescription = lens _ddS3DestinationDescription (\ s a -> s{_ddS3DestinationDescription = a});++-- | The destination in Amazon Redshift.+ddRedshiftDestinationDescription :: Lens' DestinationDescription (Maybe RedshiftDestinationDescription)+ddRedshiftDestinationDescription = lens _ddRedshiftDestinationDescription (\ s a -> s{_ddRedshiftDestinationDescription = a});++-- | The ID of the destination.+ddDestinationId :: Lens' DestinationDescription Text+ddDestinationId = lens _ddDestinationId (\ s a -> s{_ddDestinationId = a});++instance FromJSON DestinationDescription where+        parseJSON+          = withObject "DestinationDescription"+              (\ x ->+                 DestinationDescription' <$>+                   (x .:? "S3DestinationDescription") <*>+                     (x .:? "RedshiftDestinationDescription")+                     <*> (x .: "DestinationId"))++-- | Describes the encryption for a destination in Amazon S3.+--+-- /See:/ 'encryptionConfiguration' smart constructor.+data EncryptionConfiguration = EncryptionConfiguration'+    { _ecNoEncryptionConfig  :: !(Maybe NoEncryptionConfig)+    , _ecKMSEncryptionConfig :: !(Maybe KMSEncryptionConfig)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'EncryptionConfiguration' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ecNoEncryptionConfig'+--+-- * 'ecKMSEncryptionConfig'+encryptionConfiguration+    :: EncryptionConfiguration+encryptionConfiguration =+    EncryptionConfiguration'+    { _ecNoEncryptionConfig = Nothing+    , _ecKMSEncryptionConfig = Nothing+    }++-- | Specifically override existing encryption information to ensure no+-- encryption is used.+ecNoEncryptionConfig :: Lens' EncryptionConfiguration (Maybe NoEncryptionConfig)+ecNoEncryptionConfig = lens _ecNoEncryptionConfig (\ s a -> s{_ecNoEncryptionConfig = a});++-- | The encryption key.+ecKMSEncryptionConfig :: Lens' EncryptionConfiguration (Maybe KMSEncryptionConfig)+ecKMSEncryptionConfig = lens _ecKMSEncryptionConfig (\ s a -> s{_ecKMSEncryptionConfig = a});++instance FromJSON EncryptionConfiguration where+        parseJSON+          = withObject "EncryptionConfiguration"+              (\ x ->+                 EncryptionConfiguration' <$>+                   (x .:? "NoEncryptionConfig") <*>+                     (x .:? "KMSEncryptionConfig"))++instance ToJSON EncryptionConfiguration where+        toJSON EncryptionConfiguration'{..}+          = object+              (catMaybes+                 [("NoEncryptionConfig" .=) <$> _ecNoEncryptionConfig,+                  ("KMSEncryptionConfig" .=) <$>+                    _ecKMSEncryptionConfig])++-- | Describes an encryption key for a destination in Amazon S3.+--+-- /See:/ 'kmsEncryptionConfig' smart constructor.+newtype KMSEncryptionConfig = KMSEncryptionConfig'+    { _kecAWSKMSKeyARN :: Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'KMSEncryptionConfig' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'kecAWSKMSKeyARN'+kmsEncryptionConfig+    :: Text -- ^ 'kecAWSKMSKeyARN'+    -> KMSEncryptionConfig+kmsEncryptionConfig pAWSKMSKeyARN_ =+    KMSEncryptionConfig'+    { _kecAWSKMSKeyARN = pAWSKMSKeyARN_+    }++-- | The ARN of the encryption key. Must belong to the same region as the+-- destination Amazon S3 bucket.+kecAWSKMSKeyARN :: Lens' KMSEncryptionConfig Text+kecAWSKMSKeyARN = lens _kecAWSKMSKeyARN (\ s a -> s{_kecAWSKMSKeyARN = a});++instance FromJSON KMSEncryptionConfig where+        parseJSON+          = withObject "KMSEncryptionConfig"+              (\ x ->+                 KMSEncryptionConfig' <$> (x .: "AWSKMSKeyARN"))++instance ToJSON KMSEncryptionConfig where+        toJSON KMSEncryptionConfig'{..}+          = object+              (catMaybes+                 [Just ("AWSKMSKeyARN" .= _kecAWSKMSKeyARN)])++-- | Contains the result for an individual record from a PutRecordBatch+-- request. If the record is successfully added to your delivery stream, it+-- receives a record ID. If the record fails to be added to your delivery+-- stream, the result includes an error code and an error message.+--+-- /See:/ 'putRecordBatchResponseEntry' smart constructor.+data PutRecordBatchResponseEntry = PutRecordBatchResponseEntry'+    { _prbreRecordId     :: !(Maybe Text)+    , _prbreErrorCode    :: !(Maybe Text)+    , _prbreErrorMessage :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PutRecordBatchResponseEntry' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'prbreRecordId'+--+-- * 'prbreErrorCode'+--+-- * 'prbreErrorMessage'+putRecordBatchResponseEntry+    :: PutRecordBatchResponseEntry+putRecordBatchResponseEntry =+    PutRecordBatchResponseEntry'+    { _prbreRecordId = Nothing+    , _prbreErrorCode = Nothing+    , _prbreErrorMessage = Nothing+    }++-- | The ID of the record.+prbreRecordId :: Lens' PutRecordBatchResponseEntry (Maybe Text)+prbreRecordId = lens _prbreRecordId (\ s a -> s{_prbreRecordId = a});++-- | The error code for an individual record result.+prbreErrorCode :: Lens' PutRecordBatchResponseEntry (Maybe Text)+prbreErrorCode = lens _prbreErrorCode (\ s a -> s{_prbreErrorCode = a});++-- | The error message for an individual record result.+prbreErrorMessage :: Lens' PutRecordBatchResponseEntry (Maybe Text)+prbreErrorMessage = lens _prbreErrorMessage (\ s a -> s{_prbreErrorMessage = a});++instance FromJSON PutRecordBatchResponseEntry where+        parseJSON+          = withObject "PutRecordBatchResponseEntry"+              (\ x ->+                 PutRecordBatchResponseEntry' <$>+                   (x .:? "RecordId") <*> (x .:? "ErrorCode") <*>+                     (x .:? "ErrorMessage"))++-- | The unit of data in a delivery stream.+--+-- /See:/ 'record' smart constructor.+newtype Record = Record'+    { _rData :: Base64+    } 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:+--+-- * 'rData'+record+    :: ByteString -- ^ 'rData'+    -> Record+record pData_ =+    Record'+    { _rData = _Base64 # pData_+    }++-- | The data blob, which is base64-encoded when the blob is serialized. The+-- maximum size of the data blob, before base64-encoding, is 1,000 KB.+--+-- /Note:/ This 'Lens' automatically encodes and decodes Base64 data,+-- despite what the AWS documentation might say.+-- The underlying isomorphism will encode to Base64 representation during+-- serialisation, and decode from Base64 representation during deserialisation.+-- This 'Lens' accepts and returns only raw unencoded data.+rData :: Lens' Record ByteString+rData = lens _rData (\ s a -> s{_rData = a}) . _Base64;++instance ToJSON Record where+        toJSON Record'{..}+          = object (catMaybes [Just ("Data" .= _rData)])++-- | Describes the configuration of a destination in Amazon Redshift.+--+-- /See:/ 'redshiftDestinationConfiguration' smart constructor.+data RedshiftDestinationConfiguration = RedshiftDestinationConfiguration'+    { _rdcRoleARN         :: !Text+    , _rdcClusterJDBCURL  :: !Text+    , _rdcCopyCommand     :: !CopyCommand+    , _rdcUsername        :: !(Sensitive Text)+    , _rdcPassword        :: !(Sensitive Text)+    , _rdcS3Configuration :: !S3DestinationConfiguration+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RedshiftDestinationConfiguration' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rdcRoleARN'+--+-- * 'rdcClusterJDBCURL'+--+-- * 'rdcCopyCommand'+--+-- * 'rdcUsername'+--+-- * 'rdcPassword'+--+-- * 'rdcS3Configuration'+redshiftDestinationConfiguration+    :: Text -- ^ 'rdcRoleARN'+    -> Text -- ^ 'rdcClusterJDBCURL'+    -> CopyCommand -- ^ 'rdcCopyCommand'+    -> Text -- ^ 'rdcUsername'+    -> Text -- ^ 'rdcPassword'+    -> S3DestinationConfiguration -- ^ 'rdcS3Configuration'+    -> RedshiftDestinationConfiguration+redshiftDestinationConfiguration pRoleARN_ pClusterJDBCURL_ pCopyCommand_ pUsername_ pPassword_ pS3Configuration_ =+    RedshiftDestinationConfiguration'+    { _rdcRoleARN = pRoleARN_+    , _rdcClusterJDBCURL = pClusterJDBCURL_+    , _rdcCopyCommand = pCopyCommand_+    , _rdcUsername = _Sensitive # pUsername_+    , _rdcPassword = _Sensitive # pPassword_+    , _rdcS3Configuration = pS3Configuration_+    }++-- | The ARN of the AWS credentials.+rdcRoleARN :: Lens' RedshiftDestinationConfiguration Text+rdcRoleARN = lens _rdcRoleARN (\ s a -> s{_rdcRoleARN = a});++-- | The database connection string.+rdcClusterJDBCURL :: Lens' RedshiftDestinationConfiguration Text+rdcClusterJDBCURL = lens _rdcClusterJDBCURL (\ s a -> s{_rdcClusterJDBCURL = a});++-- | The 'COPY' command.+rdcCopyCommand :: Lens' RedshiftDestinationConfiguration CopyCommand+rdcCopyCommand = lens _rdcCopyCommand (\ s a -> s{_rdcCopyCommand = a});++-- | The name of the user.+rdcUsername :: Lens' RedshiftDestinationConfiguration Text+rdcUsername = lens _rdcUsername (\ s a -> s{_rdcUsername = a}) . _Sensitive;++-- | The user password.+rdcPassword :: Lens' RedshiftDestinationConfiguration Text+rdcPassword = lens _rdcPassword (\ s a -> s{_rdcPassword = a}) . _Sensitive;++-- | The S3 configuration for the intermediate location from which Amazon+-- Redshift obtains data. Restrictions are described in the topic for+-- CreateDeliveryStream.+--+-- The compression formats 'SNAPPY' or 'ZIP' cannot be specified in+-- 'RedshiftDestinationConfiguration.S3Configuration' because the Amazon+-- Redshift 'COPY' operation that reads from the S3 bucket doesn\'t support+-- these compression formats.+rdcS3Configuration :: Lens' RedshiftDestinationConfiguration S3DestinationConfiguration+rdcS3Configuration = lens _rdcS3Configuration (\ s a -> s{_rdcS3Configuration = a});++instance ToJSON RedshiftDestinationConfiguration+         where+        toJSON RedshiftDestinationConfiguration'{..}+          = object+              (catMaybes+                 [Just ("RoleARN" .= _rdcRoleARN),+                  Just ("ClusterJDBCURL" .= _rdcClusterJDBCURL),+                  Just ("CopyCommand" .= _rdcCopyCommand),+                  Just ("Username" .= _rdcUsername),+                  Just ("Password" .= _rdcPassword),+                  Just ("S3Configuration" .= _rdcS3Configuration)])++-- | Describes a destination in Amazon Redshift.+--+-- /See:/ 'redshiftDestinationDescription' smart constructor.+data RedshiftDestinationDescription = RedshiftDestinationDescription'+    { _rddRoleARN                  :: !Text+    , _rddClusterJDBCURL           :: !Text+    , _rddCopyCommand              :: !CopyCommand+    , _rddUsername                 :: !(Sensitive Text)+    , _rddS3DestinationDescription :: !S3DestinationDescription+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RedshiftDestinationDescription' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rddRoleARN'+--+-- * 'rddClusterJDBCURL'+--+-- * 'rddCopyCommand'+--+-- * 'rddUsername'+--+-- * 'rddS3DestinationDescription'+redshiftDestinationDescription+    :: Text -- ^ 'rddRoleARN'+    -> Text -- ^ 'rddClusterJDBCURL'+    -> CopyCommand -- ^ 'rddCopyCommand'+    -> Text -- ^ 'rddUsername'+    -> S3DestinationDescription -- ^ 'rddS3DestinationDescription'+    -> RedshiftDestinationDescription+redshiftDestinationDescription pRoleARN_ pClusterJDBCURL_ pCopyCommand_ pUsername_ pS3DestinationDescription_ =+    RedshiftDestinationDescription'+    { _rddRoleARN = pRoleARN_+    , _rddClusterJDBCURL = pClusterJDBCURL_+    , _rddCopyCommand = pCopyCommand_+    , _rddUsername = _Sensitive # pUsername_+    , _rddS3DestinationDescription = pS3DestinationDescription_+    }++-- | The ARN of the AWS credentials.+rddRoleARN :: Lens' RedshiftDestinationDescription Text+rddRoleARN = lens _rddRoleARN (\ s a -> s{_rddRoleARN = a});++-- | The database connection string.+rddClusterJDBCURL :: Lens' RedshiftDestinationDescription Text+rddClusterJDBCURL = lens _rddClusterJDBCURL (\ s a -> s{_rddClusterJDBCURL = a});++-- | The 'COPY' command.+rddCopyCommand :: Lens' RedshiftDestinationDescription CopyCommand+rddCopyCommand = lens _rddCopyCommand (\ s a -> s{_rddCopyCommand = a});++-- | The name of the user.+rddUsername :: Lens' RedshiftDestinationDescription Text+rddUsername = lens _rddUsername (\ s a -> s{_rddUsername = a}) . _Sensitive;++-- | The Amazon S3 destination.+rddS3DestinationDescription :: Lens' RedshiftDestinationDescription S3DestinationDescription+rddS3DestinationDescription = lens _rddS3DestinationDescription (\ s a -> s{_rddS3DestinationDescription = a});++instance FromJSON RedshiftDestinationDescription+         where+        parseJSON+          = withObject "RedshiftDestinationDescription"+              (\ x ->+                 RedshiftDestinationDescription' <$>+                   (x .: "RoleARN") <*> (x .: "ClusterJDBCURL") <*>+                     (x .: "CopyCommand")+                     <*> (x .: "Username")+                     <*> (x .: "S3DestinationDescription"))++-- | Describes an update for a destination in Amazon Redshift.+--+-- /See:/ 'redshiftDestinationUpdate' smart constructor.+data RedshiftDestinationUpdate = RedshiftDestinationUpdate'+    { _rduUsername       :: !(Maybe (Sensitive Text))+    , _rduS3Update       :: !(Maybe S3DestinationUpdate)+    , _rduPassword       :: !(Maybe (Sensitive Text))+    , _rduCopyCommand    :: !(Maybe CopyCommand)+    , _rduClusterJDBCURL :: !(Maybe Text)+    , _rduRoleARN        :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RedshiftDestinationUpdate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rduUsername'+--+-- * 'rduS3Update'+--+-- * 'rduPassword'+--+-- * 'rduCopyCommand'+--+-- * 'rduClusterJDBCURL'+--+-- * 'rduRoleARN'+redshiftDestinationUpdate+    :: RedshiftDestinationUpdate+redshiftDestinationUpdate =+    RedshiftDestinationUpdate'+    { _rduUsername = Nothing+    , _rduS3Update = Nothing+    , _rduPassword = Nothing+    , _rduCopyCommand = Nothing+    , _rduClusterJDBCURL = Nothing+    , _rduRoleARN = Nothing+    }++-- | The name of the user.+rduUsername :: Lens' RedshiftDestinationUpdate (Maybe Text)+rduUsername = lens _rduUsername (\ s a -> s{_rduUsername = a}) . mapping _Sensitive;++-- | The Amazon S3 destination.+--+-- The compression formats 'SNAPPY' or 'ZIP' cannot be specified in+-- 'RedshiftDestinationUpdate.S3Update' because the Amazon Redshift 'COPY'+-- operation that reads from the S3 bucket doesn\'t support these+-- compression formats.+rduS3Update :: Lens' RedshiftDestinationUpdate (Maybe S3DestinationUpdate)+rduS3Update = lens _rduS3Update (\ s a -> s{_rduS3Update = a});++-- | The user password.+rduPassword :: Lens' RedshiftDestinationUpdate (Maybe Text)+rduPassword = lens _rduPassword (\ s a -> s{_rduPassword = a}) . mapping _Sensitive;++-- | The 'COPY' command.+rduCopyCommand :: Lens' RedshiftDestinationUpdate (Maybe CopyCommand)+rduCopyCommand = lens _rduCopyCommand (\ s a -> s{_rduCopyCommand = a});++-- | The database connection string.+rduClusterJDBCURL :: Lens' RedshiftDestinationUpdate (Maybe Text)+rduClusterJDBCURL = lens _rduClusterJDBCURL (\ s a -> s{_rduClusterJDBCURL = a});++-- | The ARN of the AWS credentials.+rduRoleARN :: Lens' RedshiftDestinationUpdate (Maybe Text)+rduRoleARN = lens _rduRoleARN (\ s a -> s{_rduRoleARN = a});++instance ToJSON RedshiftDestinationUpdate where+        toJSON RedshiftDestinationUpdate'{..}+          = object+              (catMaybes+                 [("Username" .=) <$> _rduUsername,+                  ("S3Update" .=) <$> _rduS3Update,+                  ("Password" .=) <$> _rduPassword,+                  ("CopyCommand" .=) <$> _rduCopyCommand,+                  ("ClusterJDBCURL" .=) <$> _rduClusterJDBCURL,+                  ("RoleARN" .=) <$> _rduRoleARN])++-- | Describes the configuration of a destination in Amazon S3.+--+-- /See:/ 's3DestinationConfiguration' smart constructor.+data S3DestinationConfiguration = S3DestinationConfiguration'+    { _sdcPrefix                  :: !(Maybe Text)+    , _sdcEncryptionConfiguration :: !(Maybe EncryptionConfiguration)+    , _sdcCompressionFormat       :: !(Maybe CompressionFormat)+    , _sdcBufferingHints          :: !(Maybe BufferingHints)+    , _sdcRoleARN                 :: !Text+    , _sdcBucketARN               :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'S3DestinationConfiguration' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sdcPrefix'+--+-- * 'sdcEncryptionConfiguration'+--+-- * 'sdcCompressionFormat'+--+-- * 'sdcBufferingHints'+--+-- * 'sdcRoleARN'+--+-- * 'sdcBucketARN'+s3DestinationConfiguration+    :: Text -- ^ 'sdcRoleARN'+    -> Text -- ^ 'sdcBucketARN'+    -> S3DestinationConfiguration+s3DestinationConfiguration pRoleARN_ pBucketARN_ =+    S3DestinationConfiguration'+    { _sdcPrefix = Nothing+    , _sdcEncryptionConfiguration = Nothing+    , _sdcCompressionFormat = Nothing+    , _sdcBufferingHints = Nothing+    , _sdcRoleARN = pRoleARN_+    , _sdcBucketARN = pBucketARN_+    }++-- | The \"YYYY\/MM\/DD\/HH\" time format prefix is automatically used for+-- delivered S3 files. You can specify an extra prefix to be added in front+-- of the time format prefix. Note that if the prefix ends with a slash, it+-- appears as a folder in the S3 bucket. For more information, see+-- <http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html Amazon S3 Object Name Format>+-- in the <http://docs.aws.amazon.com/firehose/latest/dev/ guide-fh-dev>.+sdcPrefix :: Lens' S3DestinationConfiguration (Maybe Text)+sdcPrefix = lens _sdcPrefix (\ s a -> s{_sdcPrefix = a});++-- | The encryption configuration. If no value is specified, the default is+-- no encryption.+sdcEncryptionConfiguration :: Lens' S3DestinationConfiguration (Maybe EncryptionConfiguration)+sdcEncryptionConfiguration = lens _sdcEncryptionConfiguration (\ s a -> s{_sdcEncryptionConfiguration = a});++-- | The compression format. If no value is specified, the default is+-- 'UNCOMPRESSED'.+--+-- The compression formats 'SNAPPY' or 'ZIP' cannot be specified for Amazon+-- Redshift destinations because they are not supported by the Amazon+-- Redshift 'COPY' operation that reads from the S3 bucket.+sdcCompressionFormat :: Lens' S3DestinationConfiguration (Maybe CompressionFormat)+sdcCompressionFormat = lens _sdcCompressionFormat (\ s a -> s{_sdcCompressionFormat = a});++-- | The buffering option. If no value is specified, 'BufferingHints' object+-- default values are used.+sdcBufferingHints :: Lens' S3DestinationConfiguration (Maybe BufferingHints)+sdcBufferingHints = lens _sdcBufferingHints (\ s a -> s{_sdcBufferingHints = a});++-- | The ARN of the AWS credentials.+sdcRoleARN :: Lens' S3DestinationConfiguration Text+sdcRoleARN = lens _sdcRoleARN (\ s a -> s{_sdcRoleARN = a});++-- | The ARN of the S3 bucket.+sdcBucketARN :: Lens' S3DestinationConfiguration Text+sdcBucketARN = lens _sdcBucketARN (\ s a -> s{_sdcBucketARN = a});++instance ToJSON S3DestinationConfiguration where+        toJSON S3DestinationConfiguration'{..}+          = object+              (catMaybes+                 [("Prefix" .=) <$> _sdcPrefix,+                  ("EncryptionConfiguration" .=) <$>+                    _sdcEncryptionConfiguration,+                  ("CompressionFormat" .=) <$> _sdcCompressionFormat,+                  ("BufferingHints" .=) <$> _sdcBufferingHints,+                  Just ("RoleARN" .= _sdcRoleARN),+                  Just ("BucketARN" .= _sdcBucketARN)])++-- | Describes a destination in Amazon S3.+--+-- /See:/ 's3DestinationDescription' smart constructor.+data S3DestinationDescription = S3DestinationDescription'+    { _sddPrefix                  :: !(Maybe Text)+    , _sddRoleARN                 :: !Text+    , _sddBucketARN               :: !Text+    , _sddBufferingHints          :: !BufferingHints+    , _sddCompressionFormat       :: !CompressionFormat+    , _sddEncryptionConfiguration :: !EncryptionConfiguration+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'S3DestinationDescription' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sddPrefix'+--+-- * 'sddRoleARN'+--+-- * 'sddBucketARN'+--+-- * 'sddBufferingHints'+--+-- * 'sddCompressionFormat'+--+-- * 'sddEncryptionConfiguration'+s3DestinationDescription+    :: Text -- ^ 'sddRoleARN'+    -> Text -- ^ 'sddBucketARN'+    -> BufferingHints -- ^ 'sddBufferingHints'+    -> CompressionFormat -- ^ 'sddCompressionFormat'+    -> EncryptionConfiguration -- ^ 'sddEncryptionConfiguration'+    -> S3DestinationDescription+s3DestinationDescription pRoleARN_ pBucketARN_ pBufferingHints_ pCompressionFormat_ pEncryptionConfiguration_ =+    S3DestinationDescription'+    { _sddPrefix = Nothing+    , _sddRoleARN = pRoleARN_+    , _sddBucketARN = pBucketARN_+    , _sddBufferingHints = pBufferingHints_+    , _sddCompressionFormat = pCompressionFormat_+    , _sddEncryptionConfiguration = pEncryptionConfiguration_+    }++-- | The \"YYYY\/MM\/DD\/HH\" time format prefix is automatically used for+-- delivered S3 files. You can specify an extra prefix to be added in front+-- of the time format prefix. Note that if the prefix ends with a slash, it+-- appears as a folder in the S3 bucket. For more information, see+-- <http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html Amazon S3 Object Name Format>+-- in the <http://docs.aws.amazon.com/firehose/latest/dev/ guide-fh-dev>.+sddPrefix :: Lens' S3DestinationDescription (Maybe Text)+sddPrefix = lens _sddPrefix (\ s a -> s{_sddPrefix = a});++-- | The ARN of the AWS credentials.+sddRoleARN :: Lens' S3DestinationDescription Text+sddRoleARN = lens _sddRoleARN (\ s a -> s{_sddRoleARN = a});++-- | The ARN of the S3 bucket.+sddBucketARN :: Lens' S3DestinationDescription Text+sddBucketARN = lens _sddBucketARN (\ s a -> s{_sddBucketARN = a});++-- | The buffering option. If no value is specified, 'BufferingHints' object+-- default values are used.+sddBufferingHints :: Lens' S3DestinationDescription BufferingHints+sddBufferingHints = lens _sddBufferingHints (\ s a -> s{_sddBufferingHints = a});++-- | The compression format. If no value is specified, the default is+-- 'NOCOMPRESSION'.+sddCompressionFormat :: Lens' S3DestinationDescription CompressionFormat+sddCompressionFormat = lens _sddCompressionFormat (\ s a -> s{_sddCompressionFormat = a});++-- | The encryption configuration. If no value is specified, the default is+-- no encryption.+sddEncryptionConfiguration :: Lens' S3DestinationDescription EncryptionConfiguration+sddEncryptionConfiguration = lens _sddEncryptionConfiguration (\ s a -> s{_sddEncryptionConfiguration = a});++instance FromJSON S3DestinationDescription where+        parseJSON+          = withObject "S3DestinationDescription"+              (\ x ->+                 S3DestinationDescription' <$>+                   (x .:? "Prefix") <*> (x .: "RoleARN") <*>+                     (x .: "BucketARN")+                     <*> (x .: "BufferingHints")+                     <*> (x .: "CompressionFormat")+                     <*> (x .: "EncryptionConfiguration"))++-- | Describes an update for a destination in Amazon S3.+--+-- /See:/ 's3DestinationUpdate' smart constructor.+data S3DestinationUpdate = S3DestinationUpdate'+    { _sduPrefix                  :: !(Maybe Text)+    , _sduEncryptionConfiguration :: !(Maybe EncryptionConfiguration)+    , _sduCompressionFormat       :: !(Maybe CompressionFormat)+    , _sduBufferingHints          :: !(Maybe BufferingHints)+    , _sduBucketARN               :: !(Maybe Text)+    , _sduRoleARN                 :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'S3DestinationUpdate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sduPrefix'+--+-- * 'sduEncryptionConfiguration'+--+-- * 'sduCompressionFormat'+--+-- * 'sduBufferingHints'+--+-- * 'sduBucketARN'+--+-- * 'sduRoleARN'+s3DestinationUpdate+    :: S3DestinationUpdate+s3DestinationUpdate =+    S3DestinationUpdate'+    { _sduPrefix = Nothing+    , _sduEncryptionConfiguration = Nothing+    , _sduCompressionFormat = Nothing+    , _sduBufferingHints = Nothing+    , _sduBucketARN = Nothing+    , _sduRoleARN = Nothing+    }++-- | The \"YYYY\/MM\/DD\/HH\" time format prefix is automatically used for+-- delivered S3 files. You can specify an extra prefix to be added in front+-- of the time format prefix. Note that if the prefix ends with a slash, it+-- appears as a folder in the S3 bucket. For more information, see+-- <http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html Amazon S3 Object Name Format>+-- in the <http://docs.aws.amazon.com/firehose/latest/dev/ guide-fh-dev>.+sduPrefix :: Lens' S3DestinationUpdate (Maybe Text)+sduPrefix = lens _sduPrefix (\ s a -> s{_sduPrefix = a});++-- | The encryption configuration. If no value is specified, the default is+-- no encryption.+sduEncryptionConfiguration :: Lens' S3DestinationUpdate (Maybe EncryptionConfiguration)+sduEncryptionConfiguration = lens _sduEncryptionConfiguration (\ s a -> s{_sduEncryptionConfiguration = a});++-- | The compression format. If no value is specified, the default is+-- 'NOCOMPRESSION'.+--+-- The compression formats 'SNAPPY' or 'ZIP' cannot be specified for Amazon+-- Redshift destinations because they are not supported by the Amazon+-- Redshift 'COPY' operation that reads from the S3 bucket.+sduCompressionFormat :: Lens' S3DestinationUpdate (Maybe CompressionFormat)+sduCompressionFormat = lens _sduCompressionFormat (\ s a -> s{_sduCompressionFormat = a});++-- | The buffering option. If no value is specified, 'BufferingHints' object+-- default values are used.+sduBufferingHints :: Lens' S3DestinationUpdate (Maybe BufferingHints)+sduBufferingHints = lens _sduBufferingHints (\ s a -> s{_sduBufferingHints = a});++-- | The ARN of the S3 bucket.+sduBucketARN :: Lens' S3DestinationUpdate (Maybe Text)+sduBucketARN = lens _sduBucketARN (\ s a -> s{_sduBucketARN = a});++-- | The ARN of the AWS credentials.+sduRoleARN :: Lens' S3DestinationUpdate (Maybe Text)+sduRoleARN = lens _sduRoleARN (\ s a -> s{_sduRoleARN = a});++instance ToJSON S3DestinationUpdate where+        toJSON S3DestinationUpdate'{..}+          = object+              (catMaybes+                 [("Prefix" .=) <$> _sduPrefix,+                  ("EncryptionConfiguration" .=) <$>+                    _sduEncryptionConfiguration,+                  ("CompressionFormat" .=) <$> _sduCompressionFormat,+                  ("BufferingHints" .=) <$> _sduBufferingHints,+                  ("BucketARN" .=) <$> _sduBucketARN,+                  ("RoleARN" .=) <$> _sduRoleARN])
+ gen/Network/AWS/Firehose/Types/Sum.hs view
@@ -0,0 +1,107 @@+{-# 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.Firehose.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.Firehose.Types.Sum where++import           Network.AWS.Prelude++data CompressionFormat+    = Gzip+    | Snappy+    | Uncompressed+    | Zip+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText CompressionFormat where+    parser = takeLowerText >>= \case+        "gzip" -> pure Gzip+        "snappy" -> pure Snappy+        "uncompressed" -> pure Uncompressed+        "zip" -> pure Zip+        e -> fromTextError $ "Failure parsing CompressionFormat from value: '" <> e+           <> "'. Accepted values: GZIP, Snappy, UNCOMPRESSED, ZIP"++instance ToText CompressionFormat where+    toText = \case+        Gzip -> "GZIP"+        Snappy -> "Snappy"+        Uncompressed -> "UNCOMPRESSED"+        Zip -> "ZIP"++instance Hashable     CompressionFormat+instance ToByteString CompressionFormat+instance ToQuery      CompressionFormat+instance ToHeader     CompressionFormat++instance ToJSON CompressionFormat where+    toJSON = toJSONText++instance FromJSON CompressionFormat where+    parseJSON = parseJSONText "CompressionFormat"++data DeliveryStreamStatus+    = Active+    | Creating+    | Deleting+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText DeliveryStreamStatus where+    parser = takeLowerText >>= \case+        "active" -> pure Active+        "creating" -> pure Creating+        "deleting" -> pure Deleting+        e -> fromTextError $ "Failure parsing DeliveryStreamStatus from value: '" <> e+           <> "'. Accepted values: ACTIVE, CREATING, DELETING"++instance ToText DeliveryStreamStatus where+    toText = \case+        Active -> "ACTIVE"+        Creating -> "CREATING"+        Deleting -> "DELETING"++instance Hashable     DeliveryStreamStatus+instance ToByteString DeliveryStreamStatus+instance ToQuery      DeliveryStreamStatus+instance ToHeader     DeliveryStreamStatus++instance FromJSON DeliveryStreamStatus where+    parseJSON = parseJSONText "DeliveryStreamStatus"++data NoEncryptionConfig =+    NoEncryption+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText NoEncryptionConfig where+    parser = takeLowerText >>= \case+        "noencryption" -> pure NoEncryption+        e -> fromTextError $ "Failure parsing NoEncryptionConfig from value: '" <> e+           <> "'. Accepted values: NoEncryption"++instance ToText NoEncryptionConfig where+    toText = \case+        NoEncryption -> "NoEncryption"++instance Hashable     NoEncryptionConfig+instance ToByteString NoEncryptionConfig+instance ToQuery      NoEncryptionConfig+instance ToHeader     NoEncryptionConfig++instance ToJSON NoEncryptionConfig where+    toJSON = toJSONText++instance FromJSON NoEncryptionConfig where+    parseJSON = parseJSONText "NoEncryptionConfig"
+ gen/Network/AWS/Firehose/UpdateDestination.hs view
@@ -0,0 +1,205 @@+{-# 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.Firehose.UpdateDestination+-- 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)+--+-- Updates the specified destination of the specified delivery stream.+--+-- This operation can be used to change the destination type (for example,+-- to replace the Amazon S3 destination with Amazon Redshift) or change the+-- parameters associated with a given destination (for example, to change+-- the bucket name of the Amazon S3 destination). The update may not occur+-- immediately. The target delivery stream remains active while the+-- configurations are updated, so data writes to the delivery stream can+-- continue during this process. The updated configurations are normally+-- effective within a few minutes.+--+-- If the destination type is the same, Amazon Kinesis Firehose merges the+-- configuration parameters specified in the UpdateDestination request with+-- the destination configuration that already exists on the delivery+-- stream. If any of the parameters are not specified in the update+-- request, then the existing configuration parameters are retained. For+-- example, in the Amazon S3 destination, if EncryptionConfiguration is not+-- specified then the existing EncryptionConfiguration is maintained on the+-- destination.+--+-- If the destination type is not the same, for example, changing the+-- destination from Amazon S3 to Amazon Redshift, Amazon Kinesis Firehose+-- does not merge any parameters. In this case, all parameters must be+-- specified.+--+-- Amazon Kinesis Firehose uses the 'CurrentDeliveryStreamVersionId' to+-- avoid race conditions and conflicting merges. This is a required field+-- in every request and the service only updates the configuration if the+-- existing configuration matches the 'VersionId'. After the update is+-- applied successfully, the 'VersionId' is updated, which can be retrieved+-- with the DescribeDeliveryStream operation. The new 'VersionId' should be+-- uses to set 'CurrentDeliveryStreamVersionId' in the next+-- UpdateDestination operation.+--+-- /See:/ <http://docs.aws.amazon.com/firehose/latest/APIReference/API_UpdateDestination.html AWS API Reference> for UpdateDestination.+module Network.AWS.Firehose.UpdateDestination+    (+    -- * Creating a Request+      updateDestination+    , UpdateDestination+    -- * Request Lenses+    , udS3DestinationUpdate+    , udRedshiftDestinationUpdate+    , udDeliveryStreamName+    , udCurrentDeliveryStreamVersionId+    , udDestinationId++    -- * Destructuring the Response+    , updateDestinationResponse+    , UpdateDestinationResponse+    -- * Response Lenses+    , udrsResponseStatus+    ) where++import           Network.AWS.Firehose.Types+import           Network.AWS.Firehose.Types.Product+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response++-- | Contains the parameters for UpdateDestination.+--+-- /See:/ 'updateDestination' smart constructor.+data UpdateDestination = UpdateDestination'+    { _udS3DestinationUpdate            :: !(Maybe S3DestinationUpdate)+    , _udRedshiftDestinationUpdate      :: !(Maybe RedshiftDestinationUpdate)+    , _udDeliveryStreamName             :: !Text+    , _udCurrentDeliveryStreamVersionId :: !Text+    , _udDestinationId                  :: !Text+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateDestination' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'udS3DestinationUpdate'+--+-- * 'udRedshiftDestinationUpdate'+--+-- * 'udDeliveryStreamName'+--+-- * 'udCurrentDeliveryStreamVersionId'+--+-- * 'udDestinationId'+updateDestination+    :: Text -- ^ 'udDeliveryStreamName'+    -> Text -- ^ 'udCurrentDeliveryStreamVersionId'+    -> Text -- ^ 'udDestinationId'+    -> UpdateDestination+updateDestination pDeliveryStreamName_ pCurrentDeliveryStreamVersionId_ pDestinationId_ =+    UpdateDestination'+    { _udS3DestinationUpdate = Nothing+    , _udRedshiftDestinationUpdate = Nothing+    , _udDeliveryStreamName = pDeliveryStreamName_+    , _udCurrentDeliveryStreamVersionId = pCurrentDeliveryStreamVersionId_+    , _udDestinationId = pDestinationId_+    }++-- | Undocumented member.+udS3DestinationUpdate :: Lens' UpdateDestination (Maybe S3DestinationUpdate)+udS3DestinationUpdate = lens _udS3DestinationUpdate (\ s a -> s{_udS3DestinationUpdate = a});++-- | Undocumented member.+udRedshiftDestinationUpdate :: Lens' UpdateDestination (Maybe RedshiftDestinationUpdate)+udRedshiftDestinationUpdate = lens _udRedshiftDestinationUpdate (\ s a -> s{_udRedshiftDestinationUpdate = a});++-- | The name of the delivery stream.+udDeliveryStreamName :: Lens' UpdateDestination Text+udDeliveryStreamName = lens _udDeliveryStreamName (\ s a -> s{_udDeliveryStreamName = a});++-- | Obtain this value from the 'VersionId' result of the+-- DeliveryStreamDescription operation. This value is required, and helps+-- the service to perform conditional operations. For example, if there is+-- a interleaving update and this value is null, then the update+-- destination fails. After the update is successful, the 'VersionId' value+-- is updated. The service then performs a merge of the old configuration+-- with the new configuration.+udCurrentDeliveryStreamVersionId :: Lens' UpdateDestination Text+udCurrentDeliveryStreamVersionId = lens _udCurrentDeliveryStreamVersionId (\ s a -> s{_udCurrentDeliveryStreamVersionId = a});++-- | The ID of the destination.+udDestinationId :: Lens' UpdateDestination Text+udDestinationId = lens _udDestinationId (\ s a -> s{_udDestinationId = a});++instance AWSRequest UpdateDestination where+        type Rs UpdateDestination = UpdateDestinationResponse+        request = postJSON firehose+        response+          = receiveEmpty+              (\ s h x ->+                 UpdateDestinationResponse' <$> (pure (fromEnum s)))++instance ToHeaders UpdateDestination where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("Firehose_20150804.UpdateDestination" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateDestination where+        toJSON UpdateDestination'{..}+          = object+              (catMaybes+                 [("S3DestinationUpdate" .=) <$>+                    _udS3DestinationUpdate,+                  ("RedshiftDestinationUpdate" .=) <$>+                    _udRedshiftDestinationUpdate,+                  Just ("DeliveryStreamName" .= _udDeliveryStreamName),+                  Just+                    ("CurrentDeliveryStreamVersionId" .=+                       _udCurrentDeliveryStreamVersionId),+                  Just ("DestinationId" .= _udDestinationId)])++instance ToPath UpdateDestination where+        toPath = const "/"++instance ToQuery UpdateDestination where+        toQuery = const mempty++-- | Contains the output of UpdateDestination.+--+-- /See:/ 'updateDestinationResponse' smart constructor.+newtype UpdateDestinationResponse = UpdateDestinationResponse'+    { _udrsResponseStatus :: Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateDestinationResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'udrsResponseStatus'+updateDestinationResponse+    :: Int -- ^ 'udrsResponseStatus'+    -> UpdateDestinationResponse+updateDestinationResponse pResponseStatus_ =+    UpdateDestinationResponse'+    { _udrsResponseStatus = pResponseStatus_+    }++-- | The response status code.+udrsResponseStatus :: Lens' UpdateDestinationResponse Int+udrsResponseStatus = lens _udrsResponseStatus (\ s a -> s{_udrsResponseStatus = a});
+ gen/Network/AWS/Firehose/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.Firehose.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.Firehose.Waiters where++import           Network.AWS.Firehose.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.Firehose+import Test.AWS.Firehose.Internal++main :: IO ()+main = defaultMain $ testGroup "Firehose"+    [ testGroup "tests"    tests+    , testGroup "fixtures" fixtures+    ]
+ test/Test/AWS/Firehose.hs view
@@ -0,0 +1,23 @@+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Test.AWS.Firehose+-- 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.Firehose where++import           Test.AWS.Prelude++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/Firehose/Internal.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Test.AWS.Firehose.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.Firehose.Internal where++import           Test.AWS.Prelude
+ test/Test/AWS/Gen/Firehose.hs view
@@ -0,0 +1,165 @@+{-# 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.Firehose+-- 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.Firehose where++import Data.Proxy+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty+import Network.AWS.Firehose+import Test.AWS.Firehose.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"+--         [ testPutRecord $+--             putRecord+--+--         , testUpdateDestination $+--             updateDestination+--+--         , testPutRecordBatch $+--             putRecordBatch+--+--         , testCreateDeliveryStream $+--             createDeliveryStream+--+--         , testDescribeDeliveryStream $+--             describeDeliveryStream+--+--         , testListDeliveryStreams $+--             listDeliveryStreams+--+--         , testDeleteDeliveryStream $+--             deleteDeliveryStream+--+--           ]++--     , testGroup "response"+--         [ testPutRecordResponse $+--             putRecordResponse+--+--         , testUpdateDestinationResponse $+--             updateDestinationResponse+--+--         , testPutRecordBatchResponse $+--             putRecordBatchResponse+--+--         , testCreateDeliveryStreamResponse $+--             createDeliveryStreamResponse+--+--         , testDescribeDeliveryStreamResponse $+--             describeDeliveryStreamResponse+--+--         , testListDeliveryStreamsResponse $+--             listDeliveryStreamsResponse+--+--         , testDeleteDeliveryStreamResponse $+--             deleteDeliveryStreamResponse+--+--           ]+--     ]++-- Requests++testPutRecord :: PutRecord -> TestTree+testPutRecord = req+    "PutRecord"+    "fixture/PutRecord.yaml"++testUpdateDestination :: UpdateDestination -> TestTree+testUpdateDestination = req+    "UpdateDestination"+    "fixture/UpdateDestination.yaml"++testPutRecordBatch :: PutRecordBatch -> TestTree+testPutRecordBatch = req+    "PutRecordBatch"+    "fixture/PutRecordBatch.yaml"++testCreateDeliveryStream :: CreateDeliveryStream -> TestTree+testCreateDeliveryStream = req+    "CreateDeliveryStream"+    "fixture/CreateDeliveryStream.yaml"++testDescribeDeliveryStream :: DescribeDeliveryStream -> TestTree+testDescribeDeliveryStream = req+    "DescribeDeliveryStream"+    "fixture/DescribeDeliveryStream.yaml"++testListDeliveryStreams :: ListDeliveryStreams -> TestTree+testListDeliveryStreams = req+    "ListDeliveryStreams"+    "fixture/ListDeliveryStreams.yaml"++testDeleteDeliveryStream :: DeleteDeliveryStream -> TestTree+testDeleteDeliveryStream = req+    "DeleteDeliveryStream"+    "fixture/DeleteDeliveryStream.yaml"++-- Responses++testPutRecordResponse :: PutRecordResponse -> TestTree+testPutRecordResponse = res+    "PutRecordResponse"+    "fixture/PutRecordResponse.proto"+    firehose+    (Proxy :: Proxy PutRecord)++testUpdateDestinationResponse :: UpdateDestinationResponse -> TestTree+testUpdateDestinationResponse = res+    "UpdateDestinationResponse"+    "fixture/UpdateDestinationResponse.proto"+    firehose+    (Proxy :: Proxy UpdateDestination)++testPutRecordBatchResponse :: PutRecordBatchResponse -> TestTree+testPutRecordBatchResponse = res+    "PutRecordBatchResponse"+    "fixture/PutRecordBatchResponse.proto"+    firehose+    (Proxy :: Proxy PutRecordBatch)++testCreateDeliveryStreamResponse :: CreateDeliveryStreamResponse -> TestTree+testCreateDeliveryStreamResponse = res+    "CreateDeliveryStreamResponse"+    "fixture/CreateDeliveryStreamResponse.proto"+    firehose+    (Proxy :: Proxy CreateDeliveryStream)++testDescribeDeliveryStreamResponse :: DescribeDeliveryStreamResponse -> TestTree+testDescribeDeliveryStreamResponse = res+    "DescribeDeliveryStreamResponse"+    "fixture/DescribeDeliveryStreamResponse.proto"+    firehose+    (Proxy :: Proxy DescribeDeliveryStream)++testListDeliveryStreamsResponse :: ListDeliveryStreamsResponse -> TestTree+testListDeliveryStreamsResponse = res+    "ListDeliveryStreamsResponse"+    "fixture/ListDeliveryStreamsResponse.proto"+    firehose+    (Proxy :: Proxy ListDeliveryStreams)++testDeleteDeliveryStreamResponse :: DeleteDeliveryStreamResponse -> TestTree+testDeleteDeliveryStreamResponse = res+    "DeleteDeliveryStreamResponse"+    "fixture/DeleteDeliveryStreamResponse.proto"+    firehose+    (Proxy :: Proxy DeleteDeliveryStream)