packages feed

amazonka-lambda (empty) → 0.0.0

raw patch · 17 files changed

+3003/−0 lines, 17 filesdep +amazonka-coredep +basesetup-changed

Dependencies added: amazonka-core, base

Files

+ LICENSE view
@@ -0,0 +1,373 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+    means each individual or legal entity that creates, contributes to+    the creation of, or owns Covered Software.++1.2. "Contributor Version"+    means the combination of the Contributions of others (if any) used+    by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+    means Covered Software of a particular Contributor.++1.4. "Covered Software"+    means Source Code Form to which the initial Contributor has attached+    the notice in Exhibit A, the Executable Form of such Source Code+    Form, and Modifications of such Source Code Form, in each case+    including portions thereof.++1.5. "Incompatible With Secondary Licenses"+    means++    (a) that the initial Contributor has attached the notice described+        in Exhibit B to the Covered Software; or++    (b) that the Covered Software was made available under the terms of+        version 1.1 or earlier of the License, but not also under the+        terms of a Secondary License.++1.6. "Executable Form"+    means any form of the work other than Source Code Form.++1.7. "Larger Work"+    means a work that combines Covered Software with other material, in+    a separate file or files, that is not Covered Software.++1.8. "License"+    means this document.++1.9. "Licensable"+    means having the right to grant, to the maximum extent possible,+    whether at the time of the initial grant or subsequently, any and+    all of the rights conveyed by this License.++1.10. "Modifications"+    means any of the following:++    (a) any file in Source Code Form that results from an addition to,+        deletion from, or modification of the contents of Covered+        Software; or++    (b) any new file in Source Code Form that contains any Covered+        Software.++1.11. "Patent Claims" of a Contributor+    means any patent claim(s), including without limitation, method,+    process, and apparatus claims, in any patent Licensable by such+    Contributor that would be infringed, but for the grant of the+    License, by the making, using, selling, offering for sale, having+    made, import, or transfer of either its Contributions or its+    Contributor Version.++1.12. "Secondary License"+    means either the GNU General Public License, Version 2.0, the GNU+    Lesser General Public License, Version 2.1, the GNU Affero General+    Public License, Version 3.0, or any later versions of those+    licenses.++1.13. "Source Code Form"+    means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+    means an individual or a legal entity exercising rights under this+    License. For legal entities, "You" includes any entity that+    controls, is controlled by, or is under common control with You. For+    purposes of this definition, "control" means (a) the power, direct+    or indirect, to cause the direction or management of such entity,+    whether by contract or otherwise, or (b) ownership of more than+    fifty percent (50%) of the outstanding shares or beneficial+    ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+    Licensable by such Contributor to use, reproduce, make available,+    modify, display, perform, distribute, and otherwise exploit its+    Contributions, either on an unmodified basis, with Modifications, or+    as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+    for sale, have made, import, and otherwise transfer either its+    Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+    or++(b) for infringements caused by: (i) Your and any other third party's+    modifications of Covered Software, or (ii) the combination of its+    Contributions with other software (except as part of its Contributor+    Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+    its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+    Form, as described in Section 3.1, and You must inform recipients of+    the Executable Form how they can obtain a copy of such Source Code+    Form by reasonable means in a timely manner, at a charge no more+    than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+    License, or sublicense it under different terms, provided that the+    license for the Executable Form does not attempt to limit or alter+    the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+*                                                                      *+*  6. Disclaimer of Warranty                                           *+*  -------------------------                                           *+*                                                                      *+*  Covered Software is provided under this License on an "as is"       *+*  basis, without warranty of any kind, either expressed, implied, or  *+*  statutory, including, without limitation, warranties that the       *+*  Covered Software is free of defects, merchantable, fit for a        *+*  particular purpose or non-infringing. The entire risk as to the     *+*  quality and performance of the Covered Software is with You.        *+*  Should any Covered Software prove defective in any respect, You     *+*  (not any Contributor) assume the cost of any necessary servicing,   *+*  repair, or correction. This disclaimer of warranty constitutes an   *+*  essential part of this License. No use of any Covered Software is   *+*  authorized under this License except under this disclaimer.         *+*                                                                      *+************************************************************************++************************************************************************+*                                                                      *+*  7. Limitation of Liability                                          *+*  --------------------------                                          *+*                                                                      *+*  Under no circumstances and under no legal theory, whether tort      *+*  (including negligence), contract, or otherwise, shall any           *+*  Contributor, or anyone who distributes Covered Software as          *+*  permitted above, be liable to You for any direct, indirect,         *+*  special, incidental, or consequential damages of any character      *+*  including, without limitation, damages for lost profits, loss of    *+*  goodwill, work stoppage, computer failure or malfunction, or any    *+*  and all other commercial damages or losses, even if such party      *+*  shall have been informed of the possibility of such damages. This   *+*  limitation of liability shall not apply to liability for death or   *+*  personal injury resulting from such party's negligence to the       *+*  extent applicable law prohibits such limitation. Some               *+*  jurisdictions do not allow the exclusion or limitation of           *+*  incidental or consequential damages, so this exclusion and          *+*  limitation may not apply to You.                                    *+*                                                                      *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++  This Source Code Form is subject to the terms of the Mozilla Public+  License, v. 2.0. If a copy of the MPL was not distributed with this+  file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.++Exhibit B - "Incompatible With Secondary Licenses" Notice+---------------------------------------------------------++  This Source Code Form is "Incompatible With Secondary Licenses", as+  defined by the Mozilla Public License, v. 2.0.
+ README.md view
@@ -0,0 +1,26 @@+# Amazon Lambda SDK++> _Warning:_ This is an experimental preview release which is still under heavy development and not intended for public consumption, _caveat emptor_!++* [description](#description)+* [Contribute](#contribute)+* [Licence](#licence)++## Description++AWS Lambda is a compute service that runs your code in response to events and automatically manages the compute resources for you, making it easy to build applications that respond quickly to new information. AWS Lambda starts running your code within milliseconds of an event such as an image upload, in-app activity, website click, or output from a connected device. You can also use AWS Lambda to create new back-end services where compute resources are automatically triggered based on custom requests. With AWS Lambda you pay only for the requests served and the compute time required to run your code. Billing is metered in increments of 100 milliseconds, making it cost-effective and easy to scale automatically from a few requests per day to thousands per second.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-lambda)+and [AWS API Reference](http://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html).+++## 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-lambda` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-lambda.cabal view
@@ -0,0 +1,63 @@+name:                  amazonka-lambda+version:               0.0.0+synopsis:              Amazon Lambda SDK.+homepage:              https://github.com/brendanhay/amazonka+license:               OtherLicense+license-file:          LICENSE+author:                Brendan Hay+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>+copyright:             Copyright (c) 2013-2014 Brendan Hay+category:              Network, AWS, Cloud+build-type:            Simple+extra-source-files:    README.md+cabal-version:         >= 1.10++description:+    AWS Lambda is a compute service that runs your code in response to+    events and automatically manages the compute resources for you, making+    it easy to build applications that respond quickly to new information.+    AWS Lambda starts running your code within milliseconds of an event+    such as an image upload, in-app activity, website click, or output from+    a connected device. You can also use AWS Lambda to create new back-end+    services where compute resources are automatically triggered based on+    custom requests. With AWS Lambda you pay only for the requests served+    and the compute time required to run your code. Billing is metered in+    increments of 100 milliseconds, making it cost-effective and easy to+    scale automatically from a few requests per day to thousands per+    second.+    .+    /See:/ <http://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html AWS API Reference>+    .+    /Warning:/ This is an experimental preview release which is still under+    heavy development and not intended for public consumption, caveat emptor!++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.Lambda+        , Network.AWS.Lambda.AddEventSource+        , Network.AWS.Lambda.DeleteFunction+        , Network.AWS.Lambda.GetEventSource+        , Network.AWS.Lambda.GetFunction+        , Network.AWS.Lambda.GetFunctionConfiguration+        , Network.AWS.Lambda.InvokeAsync+        , Network.AWS.Lambda.ListEventSources+        , Network.AWS.Lambda.ListFunctions+        , Network.AWS.Lambda.RemoveEventSource+        , Network.AWS.Lambda.Types+        , Network.AWS.Lambda.UpdateFunctionConfiguration+        , Network.AWS.Lambda.UploadFunction++    other-modules:++    build-depends:+          amazonka-core+        , base          >= 4.7 && < 5
+ gen/Network/AWS/Lambda.hs view
@@ -0,0 +1,48 @@+-- Module      : Network.AWS.Lambda+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | AWS Lambda is a compute service that runs your code in response to events+-- and automatically manages the compute resources for you, making it easy to+-- build applications that respond quickly to new information. AWS Lambda+-- starts running your code within milliseconds of an event such as an image+-- upload, in-app activity, website click, or output from a connected device.+-- You can also use AWS Lambda to create new back-end services where compute+-- resources are automatically triggered based on custom requests. With AWS+-- Lambda you pay only for the requests served and the compute time required+-- to run your code. Billing is metered in increments of 100 milliseconds,+-- making it cost-effective and easy to scale automatically from a few+-- requests per day to thousands per second.+module Network.AWS.Lambda+    ( module Network.AWS.Lambda.AddEventSource+    , module Network.AWS.Lambda.DeleteFunction+    , module Network.AWS.Lambda.GetEventSource+    , module Network.AWS.Lambda.GetFunction+    , module Network.AWS.Lambda.GetFunctionConfiguration+    , module Network.AWS.Lambda.InvokeAsync+    , module Network.AWS.Lambda.ListEventSources+    , module Network.AWS.Lambda.ListFunctions+    , module Network.AWS.Lambda.RemoveEventSource+    , module Network.AWS.Lambda.Types+    , module Network.AWS.Lambda.UpdateFunctionConfiguration+    , module Network.AWS.Lambda.UploadFunction+    ) where++import Network.AWS.Lambda.AddEventSource+import Network.AWS.Lambda.DeleteFunction+import Network.AWS.Lambda.GetEventSource+import Network.AWS.Lambda.GetFunction+import Network.AWS.Lambda.GetFunctionConfiguration+import Network.AWS.Lambda.InvokeAsync+import Network.AWS.Lambda.ListEventSources+import Network.AWS.Lambda.ListFunctions+import Network.AWS.Lambda.RemoveEventSource+import Network.AWS.Lambda.Types+import Network.AWS.Lambda.UpdateFunctionConfiguration+import Network.AWS.Lambda.UploadFunction
+ gen/Network/AWS/Lambda/AddEventSource.hs view
@@ -0,0 +1,261 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.AddEventSource+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Identifies an Amazon Kinesis stream as the event source for an AWS Lambda+-- function. AWS Lambda invokes the specified function when records are posted+-- to the stream. This is the pull model, where AWS Lambda invokes the+-- function. For more information, go to AWS LambdaL How it Works in the AWS+-- Lambda Developer Guide. This association between an Amazon Kinesis stream+-- and an AWS Lambda function is called the event source mapping. You provide+-- the configuration information (for example, which stream to read from and+-- which AWS Lambda function to invoke) for the event source mapping in the+-- request body. This operation requires permission for the iam:PassRole+-- action for the IAM role. It also requires permission for the+-- lambda:AddEventSource action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_AddEventSource.html>+module Network.AWS.Lambda.AddEventSource+    (+    -- * Request+      AddEventSource+    -- ** Request constructor+    , addEventSource+    -- ** Request lenses+    , aesBatchSize+    , aesEventSource+    , aesFunctionName+    , aesParameters+    , aesRole++    -- * Response+    , AddEventSourceResponse+    -- ** Response constructor+    , addEventSourceResponse+    -- ** Response lenses+    , aesrBatchSize+    , aesrEventSource+    , aesrFunctionName+    , aesrIsActive+    , aesrLastModified+    , aesrParameters+    , aesrRole+    , aesrStatus+    , aesrUUID+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++data AddEventSource = AddEventSource+    { _aesBatchSize    :: Maybe Int+    , _aesEventSource  :: Text+    , _aesFunctionName :: Text+    , _aesParameters   :: Map Text Text+    , _aesRole         :: Text+    } deriving (Eq, Show)++-- | 'AddEventSource' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'aesBatchSize' @::@ 'Maybe' 'Int'+--+-- * 'aesEventSource' @::@ 'Text'+--+-- * 'aesFunctionName' @::@ 'Text'+--+-- * 'aesParameters' @::@ 'HashMap' 'Text' 'Text'+--+-- * 'aesRole' @::@ 'Text'+--+addEventSource :: Text -- ^ 'aesEventSource'+               -> Text -- ^ 'aesFunctionName'+               -> Text -- ^ 'aesRole'+               -> AddEventSource+addEventSource p1 p2 p3 = AddEventSource+    { _aesEventSource  = p1+    , _aesFunctionName = p2+    , _aesRole         = p3+    , _aesBatchSize    = Nothing+    , _aesParameters   = mempty+    }++-- | The largest number of records that AWS Lambda will give to your function+-- in a single event. The default is 100 records.+aesBatchSize :: Lens' AddEventSource (Maybe Int)+aesBatchSize = lens _aesBatchSize (\s a -> s { _aesBatchSize = a })++-- | The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the+-- event source. Any record added to this stream causes AWS Lambda to invoke+-- your Lambda function. AWS Lambda POSTs the Amazon Kinesis event,+-- containing records, to your Lambda function as JSON.+aesEventSource :: Lens' AddEventSource Text+aesEventSource = lens _aesEventSource (\s a -> s { _aesEventSource = a })++-- | The Lambda function to invoke when AWS Lambda detects an event on the+-- stream.+aesFunctionName :: Lens' AddEventSource Text+aesFunctionName = lens _aesFunctionName (\s a -> s { _aesFunctionName = a })++-- | A map (key-value pairs) defining the configuration for AWS Lambda to use+-- when reading the event source. Currently, AWS Lambda supports only the+-- InitialPositionInStream key. The valid values are: "TRIM_HORIZON" and+-- "LATEST". The default value is "TRIM_HORIZON". For more information, go+-- to ShardIteratorType in the Amazon Kinesis Service API Reference.+aesParameters :: Lens' AddEventSource (HashMap Text Text)+aesParameters = lens _aesParameters (\s a -> s { _aesParameters = a }) . _Map++-- | The ARN of the IAM role (invocation role) that AWS Lambda can assume to+-- read from the stream and invoke the function.+aesRole :: Lens' AddEventSource Text+aesRole = lens _aesRole (\s a -> s { _aesRole = a })++data AddEventSourceResponse = AddEventSourceResponse+    { _aesrBatchSize    :: Maybe Int+    , _aesrEventSource  :: Maybe Text+    , _aesrFunctionName :: Maybe Text+    , _aesrIsActive     :: Maybe Bool+    , _aesrLastModified :: Maybe RFC822+    , _aesrParameters   :: Map Text Text+    , _aesrRole         :: Maybe Text+    , _aesrStatus       :: Maybe Text+    , _aesrUUID         :: Maybe Text+    } deriving (Eq, Show)++-- | 'AddEventSourceResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'aesrBatchSize' @::@ 'Maybe' 'Int'+--+-- * 'aesrEventSource' @::@ 'Maybe' 'Text'+--+-- * 'aesrFunctionName' @::@ 'Maybe' 'Text'+--+-- * 'aesrIsActive' @::@ 'Maybe' 'Bool'+--+-- * 'aesrLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'aesrParameters' @::@ 'HashMap' 'Text' 'Text'+--+-- * 'aesrRole' @::@ 'Maybe' 'Text'+--+-- * 'aesrStatus' @::@ 'Maybe' 'Text'+--+-- * 'aesrUUID' @::@ 'Maybe' 'Text'+--+addEventSourceResponse :: AddEventSourceResponse+addEventSourceResponse = AddEventSourceResponse+    { _aesrUUID         = Nothing+    , _aesrBatchSize    = Nothing+    , _aesrEventSource  = Nothing+    , _aesrFunctionName = Nothing+    , _aesrParameters   = mempty+    , _aesrRole         = Nothing+    , _aesrLastModified = Nothing+    , _aesrIsActive     = Nothing+    , _aesrStatus       = Nothing+    }++-- | The largest number of records that AWS Lambda will POST in the invocation+-- request to your function.+aesrBatchSize :: Lens' AddEventSourceResponse (Maybe Int)+aesrBatchSize = lens _aesrBatchSize (\s a -> s { _aesrBatchSize = a })++-- | The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the+-- source of events.+aesrEventSource :: Lens' AddEventSourceResponse (Maybe Text)+aesrEventSource = lens _aesrEventSource (\s a -> s { _aesrEventSource = a })++-- | The Lambda function to invoke when AWS Lambda detects an event on the+-- stream.+aesrFunctionName :: Lens' AddEventSourceResponse (Maybe Text)+aesrFunctionName = lens _aesrFunctionName (\s a -> s { _aesrFunctionName = a })++-- | Indicates whether the event source mapping is currently honored. Events+-- are only processes if IsActive is true.+aesrIsActive :: Lens' AddEventSourceResponse (Maybe Bool)+aesrIsActive = lens _aesrIsActive (\s a -> s { _aesrIsActive = a })++-- | The UTC time string indicating the last time the event mapping was+-- updated.+aesrLastModified :: Lens' AddEventSourceResponse (Maybe UTCTime)+aesrLastModified = lens _aesrLastModified (\s a -> s { _aesrLastModified = a }) . mapping _Time++-- | The map (key-value pairs) defining the configuration for AWS Lambda to+-- use when reading the event source.+aesrParameters :: Lens' AddEventSourceResponse (HashMap Text Text)+aesrParameters = lens _aesrParameters (\s a -> s { _aesrParameters = a }) . _Map++-- | The ARN of the IAM role (invocation role) that AWS Lambda can assume to+-- read from the stream and invoke the function.+aesrRole :: Lens' AddEventSourceResponse (Maybe Text)+aesrRole = lens _aesrRole (\s a -> s { _aesrRole = a })++-- | The description of the health of the event source mapping. Valid values+-- are: "PENDING", "OK", and "PROBLEM:message". Initially this staus is+-- "PENDING". When AWS Lambda begins processing events, it changes the+-- status to "OK".+aesrStatus :: Lens' AddEventSourceResponse (Maybe Text)+aesrStatus = lens _aesrStatus (\s a -> s { _aesrStatus = a })++-- | The AWS Lambda assigned opaque identifier for the mapping.+aesrUUID :: Lens' AddEventSourceResponse (Maybe Text)+aesrUUID = lens _aesrUUID (\s a -> s { _aesrUUID = a })++instance ToPath AddEventSource where+    toPath = const "/2014-11-13/event-source-mappings/"++instance ToQuery AddEventSource where+    toQuery = const mempty++instance ToHeaders AddEventSource++instance ToJSON AddEventSource where+    toJSON AddEventSource{..} = object+        [ "EventSource"  .= _aesEventSource+        , "FunctionName" .= _aesFunctionName+        , "Role"         .= _aesRole+        , "BatchSize"    .= _aesBatchSize+        , "Parameters"   .= _aesParameters+        ]++instance AWSRequest AddEventSource where+    type Sv AddEventSource = Lambda+    type Rs AddEventSource = AddEventSourceResponse++    request  = post+    response = jsonResponse++instance FromJSON AddEventSourceResponse where+    parseJSON = withObject "AddEventSourceResponse" $ \o -> AddEventSourceResponse+        <$> o .:? "BatchSize"+        <*> o .:? "EventSource"+        <*> o .:? "FunctionName"+        <*> o .:? "IsActive"+        <*> o .:? "LastModified"+        <*> o .:  "Parameters"+        <*> o .:? "Role"+        <*> o .:? "Status"+        <*> o .:? "UUID"
+ gen/Network/AWS/Lambda/DeleteFunction.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.DeleteFunction+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Deletes the specified Lambda function code and configuration. This+-- operation requires permission for the lambda:DeleteFunction action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_DeleteFunction.html>+module Network.AWS.Lambda.DeleteFunction+    (+    -- * Request+      DeleteFunction+    -- ** Request constructor+    , deleteFunction+    -- ** Request lenses+    , dfFunctionName++    -- * Response+    , DeleteFunctionResponse+    -- ** Response constructor+    , deleteFunctionResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++newtype DeleteFunction = DeleteFunction+    { _dfFunctionName :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeleteFunction' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dfFunctionName' @::@ 'Text'+--+deleteFunction :: Text -- ^ 'dfFunctionName'+               -> DeleteFunction+deleteFunction p1 = DeleteFunction+    { _dfFunctionName = p1+    }++-- | The Lambda function to delete.+dfFunctionName :: Lens' DeleteFunction Text+dfFunctionName = lens _dfFunctionName (\s a -> s { _dfFunctionName = a })++data DeleteFunctionResponse = DeleteFunctionResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteFunctionResponse' constructor.+deleteFunctionResponse :: DeleteFunctionResponse+deleteFunctionResponse = DeleteFunctionResponse++instance ToPath DeleteFunction where+    toPath DeleteFunction{..} = mconcat+        [ "/2014-11-13/functions/"+        , toText _dfFunctionName+        ]++instance ToQuery DeleteFunction where+    toQuery = const mempty++instance ToHeaders DeleteFunction++instance ToJSON DeleteFunction where+    toJSON = const (toJSON Empty)++instance AWSRequest DeleteFunction where+    type Sv DeleteFunction = Lambda+    type Rs DeleteFunction = DeleteFunctionResponse++    request  = delete+    response = nullResponse DeleteFunctionResponse
+ gen/Network/AWS/Lambda/GetEventSource.hs view
@@ -0,0 +1,202 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.GetEventSource+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Returns configuration information for the specified event source mapping+-- (see AddEventSource). This operation requires permission for the+-- lambda:GetEventSource action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_GetEventSource.html>+module Network.AWS.Lambda.GetEventSource+    (+    -- * Request+      GetEventSource+    -- ** Request constructor+    , getEventSource+    -- ** Request lenses+    , gesUUID++    -- * Response+    , GetEventSourceResponse+    -- ** Response constructor+    , getEventSourceResponse+    -- ** Response lenses+    , gesrBatchSize+    , gesrEventSource+    , gesrFunctionName+    , gesrIsActive+    , gesrLastModified+    , gesrParameters+    , gesrRole+    , gesrStatus+    , gesrUUID+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++newtype GetEventSource = GetEventSource+    { _gesUUID :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetEventSource' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gesUUID' @::@ 'Text'+--+getEventSource :: Text -- ^ 'gesUUID'+               -> GetEventSource+getEventSource p1 = GetEventSource+    { _gesUUID = p1+    }++-- | The AWS Lambda assigned ID of the event source mapping.+gesUUID :: Lens' GetEventSource Text+gesUUID = lens _gesUUID (\s a -> s { _gesUUID = a })++data GetEventSourceResponse = GetEventSourceResponse+    { _gesrBatchSize    :: Maybe Int+    , _gesrEventSource  :: Maybe Text+    , _gesrFunctionName :: Maybe Text+    , _gesrIsActive     :: Maybe Bool+    , _gesrLastModified :: Maybe RFC822+    , _gesrParameters   :: Map Text Text+    , _gesrRole         :: Maybe Text+    , _gesrStatus       :: Maybe Text+    , _gesrUUID         :: Maybe Text+    } deriving (Eq, Show)++-- | 'GetEventSourceResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gesrBatchSize' @::@ 'Maybe' 'Int'+--+-- * 'gesrEventSource' @::@ 'Maybe' 'Text'+--+-- * 'gesrFunctionName' @::@ 'Maybe' 'Text'+--+-- * 'gesrIsActive' @::@ 'Maybe' 'Bool'+--+-- * 'gesrLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'gesrParameters' @::@ 'HashMap' 'Text' 'Text'+--+-- * 'gesrRole' @::@ 'Maybe' 'Text'+--+-- * 'gesrStatus' @::@ 'Maybe' 'Text'+--+-- * 'gesrUUID' @::@ 'Maybe' 'Text'+--+getEventSourceResponse :: GetEventSourceResponse+getEventSourceResponse = GetEventSourceResponse+    { _gesrUUID         = Nothing+    , _gesrBatchSize    = Nothing+    , _gesrEventSource  = Nothing+    , _gesrFunctionName = Nothing+    , _gesrParameters   = mempty+    , _gesrRole         = Nothing+    , _gesrLastModified = Nothing+    , _gesrIsActive     = Nothing+    , _gesrStatus       = Nothing+    }++-- | The largest number of records that AWS Lambda will POST in the invocation+-- request to your function.+gesrBatchSize :: Lens' GetEventSourceResponse (Maybe Int)+gesrBatchSize = lens _gesrBatchSize (\s a -> s { _gesrBatchSize = a })++-- | The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the+-- source of events.+gesrEventSource :: Lens' GetEventSourceResponse (Maybe Text)+gesrEventSource = lens _gesrEventSource (\s a -> s { _gesrEventSource = a })++-- | The Lambda function to invoke when AWS Lambda detects an event on the+-- stream.+gesrFunctionName :: Lens' GetEventSourceResponse (Maybe Text)+gesrFunctionName = lens _gesrFunctionName (\s a -> s { _gesrFunctionName = a })++-- | Indicates whether the event source mapping is currently honored. Events+-- are only processes if IsActive is true.+gesrIsActive :: Lens' GetEventSourceResponse (Maybe Bool)+gesrIsActive = lens _gesrIsActive (\s a -> s { _gesrIsActive = a })++-- | The UTC time string indicating the last time the event mapping was+-- updated.+gesrLastModified :: Lens' GetEventSourceResponse (Maybe UTCTime)+gesrLastModified = lens _gesrLastModified (\s a -> s { _gesrLastModified = a }) . mapping _Time++-- | The map (key-value pairs) defining the configuration for AWS Lambda to+-- use when reading the event source.+gesrParameters :: Lens' GetEventSourceResponse (HashMap Text Text)+gesrParameters = lens _gesrParameters (\s a -> s { _gesrParameters = a }) . _Map++-- | The ARN of the IAM role (invocation role) that AWS Lambda can assume to+-- read from the stream and invoke the function.+gesrRole :: Lens' GetEventSourceResponse (Maybe Text)+gesrRole = lens _gesrRole (\s a -> s { _gesrRole = a })++-- | The description of the health of the event source mapping. Valid values+-- are: "PENDING", "OK", and "PROBLEM:message". Initially this staus is+-- "PENDING". When AWS Lambda begins processing events, it changes the+-- status to "OK".+gesrStatus :: Lens' GetEventSourceResponse (Maybe Text)+gesrStatus = lens _gesrStatus (\s a -> s { _gesrStatus = a })++-- | The AWS Lambda assigned opaque identifier for the mapping.+gesrUUID :: Lens' GetEventSourceResponse (Maybe Text)+gesrUUID = lens _gesrUUID (\s a -> s { _gesrUUID = a })++instance ToPath GetEventSource where+    toPath GetEventSource{..} = mconcat+        [ "/2014-11-13/event-source-mappings/"+        , toText _gesUUID+        ]++instance ToQuery GetEventSource where+    toQuery = const mempty++instance ToHeaders GetEventSource++instance ToJSON GetEventSource where+    toJSON = const (toJSON Empty)++instance AWSRequest GetEventSource where+    type Sv GetEventSource = Lambda+    type Rs GetEventSource = GetEventSourceResponse++    request  = get+    response = jsonResponse++instance FromJSON GetEventSourceResponse where+    parseJSON = withObject "GetEventSourceResponse" $ \o -> GetEventSourceResponse+        <$> o .:? "BatchSize"+        <*> o .:? "EventSource"+        <*> o .:? "FunctionName"+        <*> o .:? "IsActive"+        <*> o .:? "LastModified"+        <*> o .:  "Parameters"+        <*> o .:? "Role"+        <*> o .:? "Status"+        <*> o .:? "UUID"
+ gen/Network/AWS/Lambda/GetFunction.hs view
@@ -0,0 +1,123 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.GetFunction+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Returns the configuration information of the Lambda function and a+-- presigned URL link to the .zip file you uploaded with UploadFunction so you+-- can download the .zip file. Note that the URL is valid for up to 10+-- minutes. The configuration information is the same information you provided+-- as parameters when uploading the function. This operation requires+-- permission for the lambda:GetFunction action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_GetFunction.html>+module Network.AWS.Lambda.GetFunction+    (+    -- * Request+      GetFunction+    -- ** Request constructor+    , getFunction+    -- ** Request lenses+    , gfFunctionName++    -- * Response+    , GetFunctionResponse+    -- ** Response constructor+    , getFunctionResponse+    -- ** Response lenses+    , gfrCode+    , gfrConfiguration+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++newtype GetFunction = GetFunction+    { _gfFunctionName :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetFunction' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gfFunctionName' @::@ 'Text'+--+getFunction :: Text -- ^ 'gfFunctionName'+            -> GetFunction+getFunction p1 = GetFunction+    { _gfFunctionName = p1+    }++-- | The Lambda function name.+gfFunctionName :: Lens' GetFunction Text+gfFunctionName = lens _gfFunctionName (\s a -> s { _gfFunctionName = a })++data GetFunctionResponse = GetFunctionResponse+    { _gfrCode          :: Maybe FunctionCodeLocation+    , _gfrConfiguration :: Maybe FunctionConfiguration+    } deriving (Eq, Show)++-- | 'GetFunctionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gfrCode' @::@ 'Maybe' 'FunctionCodeLocation'+--+-- * 'gfrConfiguration' @::@ 'Maybe' 'FunctionConfiguration'+--+getFunctionResponse :: GetFunctionResponse+getFunctionResponse = GetFunctionResponse+    { _gfrConfiguration = Nothing+    , _gfrCode          = Nothing+    }++gfrCode :: Lens' GetFunctionResponse (Maybe FunctionCodeLocation)+gfrCode = lens _gfrCode (\s a -> s { _gfrCode = a })++gfrConfiguration :: Lens' GetFunctionResponse (Maybe FunctionConfiguration)+gfrConfiguration = lens _gfrConfiguration (\s a -> s { _gfrConfiguration = a })++instance ToPath GetFunction where+    toPath GetFunction{..} = mconcat+        [ "/2014-11-13/functions/"+        , toText _gfFunctionName+        ]++instance ToQuery GetFunction where+    toQuery = const mempty++instance ToHeaders GetFunction++instance ToJSON GetFunction where+    toJSON = const (toJSON Empty)++instance AWSRequest GetFunction where+    type Sv GetFunction = Lambda+    type Rs GetFunction = GetFunctionResponse++    request  = get+    response = jsonResponse++instance FromJSON GetFunctionResponse where+    parseJSON = withObject "GetFunctionResponse" $ \o -> GetFunctionResponse+        <$> o .:? "Code"+        <*> o .:? "Configuration"
+ gen/Network/AWS/Lambda/GetFunctionConfiguration.hs view
@@ -0,0 +1,233 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.GetFunctionConfiguration+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Returns the configuration information of the Lambda function. This the same+-- information you provided as parameters when uploading the function by using+-- UploadFunction. This operation requires permission for the+-- lambda:GetFunctionConfiguration operation.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_GetFunctionConfiguration.html>+module Network.AWS.Lambda.GetFunctionConfiguration+    (+    -- * Request+      GetFunctionConfiguration+    -- ** Request constructor+    , getFunctionConfiguration+    -- ** Request lenses+    , gfcFunctionName++    -- * Response+    , GetFunctionConfigurationResponse+    -- ** Response constructor+    , getFunctionConfigurationResponse+    -- ** Response lenses+    , gfcrCodeSize+    , gfcrConfigurationId+    , gfcrDescription+    , gfcrFunctionARN+    , gfcrFunctionName+    , gfcrHandler+    , gfcrLastModified+    , gfcrMemorySize+    , gfcrMode+    , gfcrRole+    , gfcrRuntime+    , gfcrTimeout+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++newtype GetFunctionConfiguration = GetFunctionConfiguration+    { _gfcFunctionName :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetFunctionConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gfcFunctionName' @::@ 'Text'+--+getFunctionConfiguration :: Text -- ^ 'gfcFunctionName'+                         -> GetFunctionConfiguration+getFunctionConfiguration p1 = GetFunctionConfiguration+    { _gfcFunctionName = p1+    }++-- | The name of the Lambda function for which you want to retrieve the+-- configuration information.+gfcFunctionName :: Lens' GetFunctionConfiguration Text+gfcFunctionName = lens _gfcFunctionName (\s a -> s { _gfcFunctionName = a })++data GetFunctionConfigurationResponse = GetFunctionConfigurationResponse+    { _gfcrCodeSize        :: Maybe Integer+    , _gfcrConfigurationId :: Maybe Text+    , _gfcrDescription     :: Maybe Text+    , _gfcrFunctionARN     :: Maybe Text+    , _gfcrFunctionName    :: Maybe Text+    , _gfcrHandler         :: Maybe Text+    , _gfcrLastModified    :: Maybe RFC822+    , _gfcrMemorySize      :: Maybe Nat+    , _gfcrMode            :: Maybe Text+    , _gfcrRole            :: Maybe Text+    , _gfcrRuntime         :: Maybe Text+    , _gfcrTimeout         :: Maybe Nat+    } deriving (Eq, Ord, Show)++-- | 'GetFunctionConfigurationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gfcrCodeSize' @::@ 'Maybe' 'Integer'+--+-- * 'gfcrConfigurationId' @::@ 'Maybe' 'Text'+--+-- * 'gfcrDescription' @::@ 'Maybe' 'Text'+--+-- * 'gfcrFunctionARN' @::@ 'Maybe' 'Text'+--+-- * 'gfcrFunctionName' @::@ 'Maybe' 'Text'+--+-- * 'gfcrHandler' @::@ 'Maybe' 'Text'+--+-- * 'gfcrLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'gfcrMemorySize' @::@ 'Maybe' 'Natural'+--+-- * 'gfcrMode' @::@ 'Maybe' 'Text'+--+-- * 'gfcrRole' @::@ 'Maybe' 'Text'+--+-- * 'gfcrRuntime' @::@ 'Maybe' 'Text'+--+-- * 'gfcrTimeout' @::@ 'Maybe' 'Natural'+--+getFunctionConfigurationResponse :: GetFunctionConfigurationResponse+getFunctionConfigurationResponse = GetFunctionConfigurationResponse+    { _gfcrFunctionName    = Nothing+    , _gfcrFunctionARN     = Nothing+    , _gfcrConfigurationId = Nothing+    , _gfcrRuntime         = Nothing+    , _gfcrRole            = Nothing+    , _gfcrHandler         = Nothing+    , _gfcrMode            = Nothing+    , _gfcrCodeSize        = Nothing+    , _gfcrDescription     = Nothing+    , _gfcrTimeout         = Nothing+    , _gfcrMemorySize      = Nothing+    , _gfcrLastModified    = Nothing+    }++-- | The size, in bytes, of the function .zip file you uploaded.+gfcrCodeSize :: Lens' GetFunctionConfigurationResponse (Maybe Integer)+gfcrCodeSize = lens _gfcrCodeSize (\s a -> s { _gfcrCodeSize = a })++-- | A Lambda-assigned unique identifier for the current function code and+-- related configuration.+gfcrConfigurationId :: Lens' GetFunctionConfigurationResponse (Maybe Text)+gfcrConfigurationId =+    lens _gfcrConfigurationId (\s a -> s { _gfcrConfigurationId = a })++-- | The user-provided description.+gfcrDescription :: Lens' GetFunctionConfigurationResponse (Maybe Text)+gfcrDescription = lens _gfcrDescription (\s a -> s { _gfcrDescription = a })++-- | The Amazon Resource Name (ARN) assigned to the function.+gfcrFunctionARN :: Lens' GetFunctionConfigurationResponse (Maybe Text)+gfcrFunctionARN = lens _gfcrFunctionARN (\s a -> s { _gfcrFunctionARN = a })++-- | The name of the function.+gfcrFunctionName :: Lens' GetFunctionConfigurationResponse (Maybe Text)+gfcrFunctionName = lens _gfcrFunctionName (\s a -> s { _gfcrFunctionName = a })++-- | The function Lambda calls to begin executing your function.+gfcrHandler :: Lens' GetFunctionConfigurationResponse (Maybe Text)+gfcrHandler = lens _gfcrHandler (\s a -> s { _gfcrHandler = a })++-- | The timestamp of the last time you updated the function.+gfcrLastModified :: Lens' GetFunctionConfigurationResponse (Maybe UTCTime)+gfcrLastModified = lens _gfcrLastModified (\s a -> s { _gfcrLastModified = a }) . mapping _Time++-- | The memory size, in MB, you configured for the function. Must be a+-- multiple of 64 MB.+gfcrMemorySize :: Lens' GetFunctionConfigurationResponse (Maybe Natural)+gfcrMemorySize = lens _gfcrMemorySize (\s a -> s { _gfcrMemorySize = a }) . mapping _Nat++-- | The type of the Lambda function you uploaded.+gfcrMode :: Lens' GetFunctionConfigurationResponse (Maybe Text)+gfcrMode = lens _gfcrMode (\s a -> s { _gfcrMode = a })++-- | The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when+-- it executes your function to access any other Amazon Web Services (AWS)+-- resources.+gfcrRole :: Lens' GetFunctionConfigurationResponse (Maybe Text)+gfcrRole = lens _gfcrRole (\s a -> s { _gfcrRole = a })++-- | The runtime environment for the Lambda function.+gfcrRuntime :: Lens' GetFunctionConfigurationResponse (Maybe Text)+gfcrRuntime = lens _gfcrRuntime (\s a -> s { _gfcrRuntime = a })++-- | The function execution time at which Lambda should terminate the+-- function. Because the execution time has cost implications, we recommend+-- you set this value based on your expected execution time. The default is+-- 3 seconds.+gfcrTimeout :: Lens' GetFunctionConfigurationResponse (Maybe Natural)+gfcrTimeout = lens _gfcrTimeout (\s a -> s { _gfcrTimeout = a }) . mapping _Nat++instance ToPath GetFunctionConfiguration where+    toPath GetFunctionConfiguration{..} = mconcat+        [ "/2014-11-13/functions/"+        , toText _gfcFunctionName+        , "/configuration"+        ]++instance ToQuery GetFunctionConfiguration where+    toQuery = const mempty++instance ToHeaders GetFunctionConfiguration++instance ToJSON GetFunctionConfiguration where+    toJSON = const (toJSON Empty)++instance AWSRequest GetFunctionConfiguration where+    type Sv GetFunctionConfiguration = Lambda+    type Rs GetFunctionConfiguration = GetFunctionConfigurationResponse++    request  = get+    response = jsonResponse++instance FromJSON GetFunctionConfigurationResponse where+    parseJSON = withObject "GetFunctionConfigurationResponse" $ \o -> GetFunctionConfigurationResponse+        <$> o .:? "CodeSize"+        <*> o .:? "ConfigurationId"+        <*> o .:? "Description"+        <*> o .:? "FunctionARN"+        <*> o .:? "FunctionName"+        <*> o .:? "Handler"+        <*> o .:? "LastModified"+        <*> o .:? "MemorySize"+        <*> o .:? "Mode"+        <*> o .:? "Role"+        <*> o .:? "Runtime"+        <*> o .:? "Timeout"
+ gen/Network/AWS/Lambda/InvokeAsync.hs view
@@ -0,0 +1,128 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.InvokeAsync+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Submits an invocation request to AWS Lambda. Upon receiving the request,+-- Lambda executes the specified function asynchronously. To see the logs+-- generated by the Lambda function execution, see the CloudWatch logs+-- console. This operation requires permission for the lambda:InvokeAsync+-- action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_InvokeAsync.html>+module Network.AWS.Lambda.InvokeAsync+    (+    -- * Request+      InvokeAsync+    -- ** Request constructor+    , invokeAsync+    -- ** Request lenses+    , iaFunctionName+    , iaInvokeArgs++    -- * Response+    , InvokeAsyncResponse+    -- ** Response constructor+    , invokeAsyncResponse+    -- ** Response lenses+    , iarStatus+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++data InvokeAsync = InvokeAsync+    { _iaFunctionName :: Text+    , _iaInvokeArgs   :: Base64+    } deriving (Eq, Show)++-- | 'InvokeAsync' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'iaFunctionName' @::@ 'Text'+--+-- * 'iaInvokeArgs' @::@ 'Base64'+--+invokeAsync :: Text -- ^ 'iaFunctionName'+            -> Base64 -- ^ 'iaInvokeArgs'+            -> InvokeAsync+invokeAsync p1 p2 = InvokeAsync+    { _iaFunctionName = p1+    , _iaInvokeArgs   = p2+    }++-- | The Lambda function name.+iaFunctionName :: Lens' InvokeAsync Text+iaFunctionName = lens _iaFunctionName (\s a -> s { _iaFunctionName = a })++-- | JSON that you want to provide to your Lambda function as input.+iaInvokeArgs :: Lens' InvokeAsync Base64+iaInvokeArgs = lens _iaInvokeArgs (\s a -> s { _iaInvokeArgs = a })++newtype InvokeAsyncResponse = InvokeAsyncResponse+    { _iarStatus :: Int+    } deriving (Eq, Ord, Show, Enum, Num, Integral, Real)++-- | 'InvokeAsyncResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'iarStatus' @::@ 'Int'+--+invokeAsyncResponse :: Int -- ^ 'iarStatus'+                    -> InvokeAsyncResponse+invokeAsyncResponse p1 = InvokeAsyncResponse+    { _iarStatus = p1+    }++-- | It will be 202 upon success.+iarStatus :: Lens' InvokeAsyncResponse Int+iarStatus = lens _iarStatus (\s a -> s { _iarStatus = a })++instance ToPath InvokeAsync where+    toPath InvokeAsync{..} = mconcat+        [ "/2014-11-13/functions/"+        , toText _iaFunctionName+        , "/invoke-async/"+        ]++instance ToQuery InvokeAsync where+    toQuery = const mempty++instance ToHeaders InvokeAsync++instance ToJSON InvokeAsync where+    toJSON InvokeAsync{..} = object+        [ "InvokeArgs" .= _iaInvokeArgs+        ]++instance AWSRequest InvokeAsync where+    type Sv InvokeAsync = Lambda+    type Rs InvokeAsync = InvokeAsyncResponse++    request  = post+    response = jsonResponse++instance FromJSON InvokeAsyncResponse where+    parseJSON = withObject "InvokeAsyncResponse" $ \o -> InvokeAsyncResponse+        <$> o .:  "Status"
+ gen/Network/AWS/Lambda/ListEventSources.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.ListEventSources+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Returns a list of event source mappings. For each mapping, the API returns+-- configuration information (see AddEventSource). You can optionally specify+-- filters to retrieve specific event source mappings. This operation requires+-- permission for the lambda:ListEventSources action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_ListEventSources.html>+module Network.AWS.Lambda.ListEventSources+    (+    -- * Request+      ListEventSources+    -- ** Request constructor+    , listEventSources+    -- ** Request lenses+    , lesEventSourceArn+    , lesFunctionName+    , lesMarker+    , lesMaxItems++    -- * Response+    , ListEventSourcesResponse+    -- ** Response constructor+    , listEventSourcesResponse+    -- ** Response lenses+    , lesrEventSources+    , lesrNextMarker+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++data ListEventSources = ListEventSources+    { _lesEventSourceArn :: Maybe Text+    , _lesFunctionName   :: Maybe Text+    , _lesMarker         :: Maybe Text+    , _lesMaxItems       :: Maybe Nat+    } deriving (Eq, Ord, Show)++-- | 'ListEventSources' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lesEventSourceArn' @::@ 'Maybe' 'Text'+--+-- * 'lesFunctionName' @::@ 'Maybe' 'Text'+--+-- * 'lesMarker' @::@ 'Maybe' 'Text'+--+-- * 'lesMaxItems' @::@ 'Maybe' 'Natural'+--+listEventSources :: ListEventSources+listEventSources = ListEventSources+    { _lesEventSourceArn = Nothing+    , _lesFunctionName   = Nothing+    , _lesMarker         = Nothing+    , _lesMaxItems       = Nothing+    }++-- | The Amazon Resource Name (ARN) of the Amazon Kinesis stream.+lesEventSourceArn :: Lens' ListEventSources (Maybe Text)+lesEventSourceArn =+    lens _lesEventSourceArn (\s a -> s { _lesEventSourceArn = a })++-- | The name of the AWS Lambda function.+lesFunctionName :: Lens' ListEventSources (Maybe Text)+lesFunctionName = lens _lesFunctionName (\s a -> s { _lesFunctionName = a })++-- | Optional string. An opaque pagination token returned from a previous+-- ListEventSources operation. If present, specifies to continue the list+-- from where the returning call left off.+lesMarker :: Lens' ListEventSources (Maybe Text)+lesMarker = lens _lesMarker (\s a -> s { _lesMarker = a })++-- | Optional integer. Specifies the maximum number of event sources to return+-- in response. This value must be greater than 0.+lesMaxItems :: Lens' ListEventSources (Maybe Natural)+lesMaxItems = lens _lesMaxItems (\s a -> s { _lesMaxItems = a }) . mapping _Nat++data ListEventSourcesResponse = ListEventSourcesResponse+    { _lesrEventSources :: List "EventSources" EventSourceConfiguration+    , _lesrNextMarker   :: Maybe Text+    } deriving (Eq, Show)++-- | 'ListEventSourcesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lesrEventSources' @::@ ['EventSourceConfiguration']+--+-- * 'lesrNextMarker' @::@ 'Maybe' 'Text'+--+listEventSourcesResponse :: ListEventSourcesResponse+listEventSourcesResponse = ListEventSourcesResponse+    { _lesrNextMarker   = Nothing+    , _lesrEventSources = mempty+    }++-- | An arrary of EventSourceConfiguration objects.+lesrEventSources :: Lens' ListEventSourcesResponse [EventSourceConfiguration]+lesrEventSources = lens _lesrEventSources (\s a -> s { _lesrEventSources = a }) . _List++-- | A string, present if there are more event source mappings.+lesrNextMarker :: Lens' ListEventSourcesResponse (Maybe Text)+lesrNextMarker = lens _lesrNextMarker (\s a -> s { _lesrNextMarker = a })++instance ToPath ListEventSources where+    toPath = const "/2014-11-13/event-source-mappings/"++instance ToQuery ListEventSources where+    toQuery ListEventSources{..} = mconcat+        [ "EventSource"  =? _lesEventSourceArn+        , "FunctionName" =? _lesFunctionName+        , "Marker"       =? _lesMarker+        , "MaxItems"     =? _lesMaxItems+        ]++instance ToHeaders ListEventSources++instance ToJSON ListEventSources where+    toJSON = const (toJSON Empty)++instance AWSRequest ListEventSources where+    type Sv ListEventSources = Lambda+    type Rs ListEventSources = ListEventSourcesResponse++    request  = get+    response = jsonResponse++instance FromJSON ListEventSourcesResponse where+    parseJSON = withObject "ListEventSourcesResponse" $ \o -> ListEventSourcesResponse+        <$> o .:  "EventSources"+        <*> o .:? "NextMarker"
+ gen/Network/AWS/Lambda/ListFunctions.hs view
@@ -0,0 +1,134 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.ListFunctions+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Returns a list of your Lambda functions. For each function, the response+-- includes the function configuration information. You must use GetFunction+-- to retrieve the code for your function. This operation requires permission+-- for the lambda:ListFunctions action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_ListFunctions.html>+module Network.AWS.Lambda.ListFunctions+    (+    -- * Request+      ListFunctions+    -- ** Request constructor+    , listFunctions+    -- ** Request lenses+    , lfMarker+    , lfMaxItems++    -- * Response+    , ListFunctionsResponse+    -- ** Response constructor+    , listFunctionsResponse+    -- ** Response lenses+    , lfrFunctions+    , lfrNextMarker+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++data ListFunctions = ListFunctions+    { _lfMarker   :: Maybe Text+    , _lfMaxItems :: Maybe Nat+    } deriving (Eq, Ord, Show)++-- | 'ListFunctions' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lfMarker' @::@ 'Maybe' 'Text'+--+-- * 'lfMaxItems' @::@ 'Maybe' 'Natural'+--+listFunctions :: ListFunctions+listFunctions = ListFunctions+    { _lfMarker   = Nothing+    , _lfMaxItems = Nothing+    }++-- | Optional string. An opaque pagination token returned from a previous+-- ListFunctions operation. If present, indicates where to continue the+-- listing.+lfMarker :: Lens' ListFunctions (Maybe Text)+lfMarker = lens _lfMarker (\s a -> s { _lfMarker = a })++-- | Optional integer. Specifies the maximum number of AWS Lambda functions to+-- return in response. This parameter value must be greater than 0.+lfMaxItems :: Lens' ListFunctions (Maybe Natural)+lfMaxItems = lens _lfMaxItems (\s a -> s { _lfMaxItems = a }) . mapping _Nat++data ListFunctionsResponse = ListFunctionsResponse+    { _lfrFunctions  :: List "Functions" FunctionConfiguration+    , _lfrNextMarker :: Maybe Text+    } deriving (Eq, Show)++-- | 'ListFunctionsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lfrFunctions' @::@ ['FunctionConfiguration']+--+-- * 'lfrNextMarker' @::@ 'Maybe' 'Text'+--+listFunctionsResponse :: ListFunctionsResponse+listFunctionsResponse = ListFunctionsResponse+    { _lfrNextMarker = Nothing+    , _lfrFunctions  = mempty+    }++-- | A list of Lambda functions.+lfrFunctions :: Lens' ListFunctionsResponse [FunctionConfiguration]+lfrFunctions = lens _lfrFunctions (\s a -> s { _lfrFunctions = a }) . _List++-- | A string, present if there are more functions.+lfrNextMarker :: Lens' ListFunctionsResponse (Maybe Text)+lfrNextMarker = lens _lfrNextMarker (\s a -> s { _lfrNextMarker = a })++instance ToPath ListFunctions where+    toPath = const "/2014-11-13/functions/"++instance ToQuery ListFunctions where+    toQuery ListFunctions{..} = mconcat+        [ "Marker"   =? _lfMarker+        , "MaxItems" =? _lfMaxItems+        ]++instance ToHeaders ListFunctions++instance ToJSON ListFunctions where+    toJSON = const (toJSON Empty)++instance AWSRequest ListFunctions where+    type Sv ListFunctions = Lambda+    type Rs ListFunctions = ListFunctionsResponse++    request  = get+    response = jsonResponse++instance FromJSON ListFunctionsResponse where+    parseJSON = withObject "ListFunctionsResponse" $ \o -> ListFunctionsResponse+        <$> o .:  "Functions"+        <*> o .:? "NextMarker"
+ gen/Network/AWS/Lambda/RemoveEventSource.hs view
@@ -0,0 +1,94 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.RemoveEventSource+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Removes an event source mapping. This means AWS Lambda will no longer+-- invoke the function for events in the associated source. This operation+-- requires permission for the lambda:RemoveEventSource action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_RemoveEventSource.html>+module Network.AWS.Lambda.RemoveEventSource+    (+    -- * Request+      RemoveEventSource+    -- ** Request constructor+    , removeEventSource+    -- ** Request lenses+    , resUUID++    -- * Response+    , RemoveEventSourceResponse+    -- ** Response constructor+    , removeEventSourceResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++newtype RemoveEventSource = RemoveEventSource+    { _resUUID :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'RemoveEventSource' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'resUUID' @::@ 'Text'+--+removeEventSource :: Text -- ^ 'resUUID'+                  -> RemoveEventSource+removeEventSource p1 = RemoveEventSource+    { _resUUID = p1+    }++-- | The event source mapping ID.+resUUID :: Lens' RemoveEventSource Text+resUUID = lens _resUUID (\s a -> s { _resUUID = a })++data RemoveEventSourceResponse = RemoveEventSourceResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'RemoveEventSourceResponse' constructor.+removeEventSourceResponse :: RemoveEventSourceResponse+removeEventSourceResponse = RemoveEventSourceResponse++instance ToPath RemoveEventSource where+    toPath RemoveEventSource{..} = mconcat+        [ "/2014-11-13/event-source-mappings/"+        , toText _resUUID+        ]++instance ToQuery RemoveEventSource where+    toQuery = const mempty++instance ToHeaders RemoveEventSource++instance ToJSON RemoveEventSource where+    toJSON = const (toJSON Empty)++instance AWSRequest RemoveEventSource where+    type Sv RemoveEventSource = Lambda+    type Rs RemoveEventSource = RemoveEventSourceResponse++    request  = delete+    response = nullResponse RemoveEventSourceResponse
+ gen/Network/AWS/Lambda/Types.hs view
@@ -0,0 +1,434 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.Types+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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 Network.AWS.Lambda.Types+    (+    -- * Service+      Lambda+    -- ** Error+    , RESTError++    -- * Runtime+    , Runtime (..)++    -- * Mode+    , Mode (..)++    -- * FunctionCodeLocation+    , FunctionCodeLocation+    , functionCodeLocation+    , fclLocation+    , fclRepositoryType++    -- * FunctionConfiguration+    , FunctionConfiguration+    , functionConfiguration+    , fcCodeSize+    , fcConfigurationId+    , fcDescription+    , fcFunctionARN+    , fcFunctionName+    , fcHandler+    , fcLastModified+    , fcMemorySize+    , fcMode+    , fcRole+    , fcRuntime+    , fcTimeout++    -- * EventSourceConfiguration+    , EventSourceConfiguration+    , eventSourceConfiguration+    , escBatchSize+    , escEventSource+    , escFunctionName+    , escIsActive+    , escLastModified+    , escParameters+    , escRole+    , escStatus+    , escUUID+    ) where++import Data.Char (isUpper)+import Network.AWS.Error+import Network.AWS.Prelude+import Network.AWS.Signing.V4+import qualified GHC.Exts++-- | Version @2014-11-11@ of the Amazon Lambda service.+data Lambda++instance AWSService Lambda where+    type Sg Lambda = V4+    type Er Lambda = RESTError++    service = Service+        { _svcEndpoint     = regional+        , _svcAbbrev       = "Lambda"+        , _svcPrefix       = "lambda"+        , _svcVersion      = "2014-11-11"+        , _svcTargetPrefix = Nothing+        , _svcJSONVersion  = Nothing+        }++    handle = restError statusSuccess++data Runtime+    = Nodejs -- ^ nodejs+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable Runtime++instance FromText Runtime where+    parser = match "nodejs" Nodejs++instance ToText Runtime where+    toText Nodejs = "nodejs"++instance FromJSON Runtime where+    parseJSON = parseJSONText "Runtime"++instance ToJSON Runtime where+    toJSON = toJSONText++data Mode+    = Event -- ^ event+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable Mode++instance FromText Mode where+    parser = match "event" Event++instance ToText Mode where+    toText Event = "event"++instance FromJSON Mode where+    parseJSON = parseJSONText "Mode"++instance ToJSON Mode where+    toJSON = toJSONText++data FunctionCodeLocation = FunctionCodeLocation+    { _fclLocation       :: Maybe Text+    , _fclRepositoryType :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'FunctionCodeLocation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'fclLocation' @::@ 'Maybe' 'Text'+--+-- * 'fclRepositoryType' @::@ 'Maybe' 'Text'+--+functionCodeLocation :: FunctionCodeLocation+functionCodeLocation = FunctionCodeLocation+    { _fclRepositoryType = Nothing+    , _fclLocation       = Nothing+    }++-- | The presigned URL you can use to download the function's .zip file that+-- you previously uploaded. The URL is valid for up to 10 minutes.+fclLocation :: Lens' FunctionCodeLocation (Maybe Text)+fclLocation = lens _fclLocation (\s a -> s { _fclLocation = a })++-- | The repository from which you can download the function.+fclRepositoryType :: Lens' FunctionCodeLocation (Maybe Text)+fclRepositoryType =+    lens _fclRepositoryType (\s a -> s { _fclRepositoryType = a })++instance FromJSON FunctionCodeLocation where+    parseJSON = withObject "FunctionCodeLocation" $ \o -> FunctionCodeLocation+        <$> o .:? "Location"+        <*> o .:? "RepositoryType"++instance ToJSON FunctionCodeLocation where+    toJSON FunctionCodeLocation{..} = object+        [ "RepositoryType" .= _fclRepositoryType+        , "Location"       .= _fclLocation+        ]++data FunctionConfiguration = FunctionConfiguration+    { _fcCodeSize        :: Maybe Integer+    , _fcConfigurationId :: Maybe Text+    , _fcDescription     :: Maybe Text+    , _fcFunctionARN     :: Maybe Text+    , _fcFunctionName    :: Maybe Text+    , _fcHandler         :: Maybe Text+    , _fcLastModified    :: Maybe RFC822+    , _fcMemorySize      :: Maybe Nat+    , _fcMode            :: Maybe Text+    , _fcRole            :: Maybe Text+    , _fcRuntime         :: Maybe Text+    , _fcTimeout         :: Maybe Nat+    } deriving (Eq, Ord, Show)++-- | 'FunctionConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'fcCodeSize' @::@ 'Maybe' 'Integer'+--+-- * 'fcConfigurationId' @::@ 'Maybe' 'Text'+--+-- * 'fcDescription' @::@ 'Maybe' 'Text'+--+-- * 'fcFunctionARN' @::@ 'Maybe' 'Text'+--+-- * 'fcFunctionName' @::@ 'Maybe' 'Text'+--+-- * 'fcHandler' @::@ 'Maybe' 'Text'+--+-- * 'fcLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'fcMemorySize' @::@ 'Maybe' 'Natural'+--+-- * 'fcMode' @::@ 'Maybe' 'Text'+--+-- * 'fcRole' @::@ 'Maybe' 'Text'+--+-- * 'fcRuntime' @::@ 'Maybe' 'Text'+--+-- * 'fcTimeout' @::@ 'Maybe' 'Natural'+--+functionConfiguration :: FunctionConfiguration+functionConfiguration = FunctionConfiguration+    { _fcFunctionName    = Nothing+    , _fcFunctionARN     = Nothing+    , _fcConfigurationId = Nothing+    , _fcRuntime         = Nothing+    , _fcRole            = Nothing+    , _fcHandler         = Nothing+    , _fcMode            = Nothing+    , _fcCodeSize        = Nothing+    , _fcDescription     = Nothing+    , _fcTimeout         = Nothing+    , _fcMemorySize      = Nothing+    , _fcLastModified    = Nothing+    }++-- | The size, in bytes, of the function .zip file you uploaded.+fcCodeSize :: Lens' FunctionConfiguration (Maybe Integer)+fcCodeSize = lens _fcCodeSize (\s a -> s { _fcCodeSize = a })++-- | A Lambda-assigned unique identifier for the current function code and+-- related configuration.+fcConfigurationId :: Lens' FunctionConfiguration (Maybe Text)+fcConfigurationId =+    lens _fcConfigurationId (\s a -> s { _fcConfigurationId = a })++-- | The user-provided description.+fcDescription :: Lens' FunctionConfiguration (Maybe Text)+fcDescription = lens _fcDescription (\s a -> s { _fcDescription = a })++-- | The Amazon Resource Name (ARN) assigned to the function.+fcFunctionARN :: Lens' FunctionConfiguration (Maybe Text)+fcFunctionARN = lens _fcFunctionARN (\s a -> s { _fcFunctionARN = a })++-- | The name of the function.+fcFunctionName :: Lens' FunctionConfiguration (Maybe Text)+fcFunctionName = lens _fcFunctionName (\s a -> s { _fcFunctionName = a })++-- | The function Lambda calls to begin executing your function.+fcHandler :: Lens' FunctionConfiguration (Maybe Text)+fcHandler = lens _fcHandler (\s a -> s { _fcHandler = a })++-- | The timestamp of the last time you updated the function.+fcLastModified :: Lens' FunctionConfiguration (Maybe UTCTime)+fcLastModified = lens _fcLastModified (\s a -> s { _fcLastModified = a }) . mapping _Time++-- | The memory size, in MB, you configured for the function. Must be a+-- multiple of 64 MB.+fcMemorySize :: Lens' FunctionConfiguration (Maybe Natural)+fcMemorySize = lens _fcMemorySize (\s a -> s { _fcMemorySize = a }) . mapping _Nat++-- | The type of the Lambda function you uploaded.+fcMode :: Lens' FunctionConfiguration (Maybe Text)+fcMode = lens _fcMode (\s a -> s { _fcMode = a })++-- | The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when+-- it executes your function to access any other Amazon Web Services (AWS)+-- resources.+fcRole :: Lens' FunctionConfiguration (Maybe Text)+fcRole = lens _fcRole (\s a -> s { _fcRole = a })++-- | The runtime environment for the Lambda function.+fcRuntime :: Lens' FunctionConfiguration (Maybe Text)+fcRuntime = lens _fcRuntime (\s a -> s { _fcRuntime = a })++-- | The function execution time at which Lambda should terminate the+-- function. Because the execution time has cost implications, we recommend+-- you set this value based on your expected execution time. The default is+-- 3 seconds.+fcTimeout :: Lens' FunctionConfiguration (Maybe Natural)+fcTimeout = lens _fcTimeout (\s a -> s { _fcTimeout = a }) . mapping _Nat++instance FromJSON FunctionConfiguration where+    parseJSON = withObject "FunctionConfiguration" $ \o -> FunctionConfiguration+        <$> o .:? "CodeSize"+        <*> o .:? "ConfigurationId"+        <*> o .:? "Description"+        <*> o .:? "FunctionARN"+        <*> o .:? "FunctionName"+        <*> o .:? "Handler"+        <*> o .:? "LastModified"+        <*> o .:? "MemorySize"+        <*> o .:? "Mode"+        <*> o .:? "Role"+        <*> o .:? "Runtime"+        <*> o .:? "Timeout"++instance ToJSON FunctionConfiguration where+    toJSON FunctionConfiguration{..} = object+        [ "FunctionName"    .= _fcFunctionName+        , "FunctionARN"     .= _fcFunctionARN+        , "ConfigurationId" .= _fcConfigurationId+        , "Runtime"         .= _fcRuntime+        , "Role"            .= _fcRole+        , "Handler"         .= _fcHandler+        , "Mode"            .= _fcMode+        , "CodeSize"        .= _fcCodeSize+        , "Description"     .= _fcDescription+        , "Timeout"         .= _fcTimeout+        , "MemorySize"      .= _fcMemorySize+        , "LastModified"    .= _fcLastModified+        ]++data EventSourceConfiguration = EventSourceConfiguration+    { _escBatchSize    :: Maybe Int+    , _escEventSource  :: Maybe Text+    , _escFunctionName :: Maybe Text+    , _escIsActive     :: Maybe Bool+    , _escLastModified :: Maybe RFC822+    , _escParameters   :: Map Text Text+    , _escRole         :: Maybe Text+    , _escStatus       :: Maybe Text+    , _escUUID         :: Maybe Text+    } deriving (Eq, Show)++-- | 'EventSourceConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'escBatchSize' @::@ 'Maybe' 'Int'+--+-- * 'escEventSource' @::@ 'Maybe' 'Text'+--+-- * 'escFunctionName' @::@ 'Maybe' 'Text'+--+-- * 'escIsActive' @::@ 'Maybe' 'Bool'+--+-- * 'escLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'escParameters' @::@ 'HashMap' 'Text' 'Text'+--+-- * 'escRole' @::@ 'Maybe' 'Text'+--+-- * 'escStatus' @::@ 'Maybe' 'Text'+--+-- * 'escUUID' @::@ 'Maybe' 'Text'+--+eventSourceConfiguration :: EventSourceConfiguration+eventSourceConfiguration = EventSourceConfiguration+    { _escUUID         = Nothing+    , _escBatchSize    = Nothing+    , _escEventSource  = Nothing+    , _escFunctionName = Nothing+    , _escParameters   = mempty+    , _escRole         = Nothing+    , _escLastModified = Nothing+    , _escIsActive     = Nothing+    , _escStatus       = Nothing+    }++-- | The largest number of records that AWS Lambda will POST in the invocation+-- request to your function.+escBatchSize :: Lens' EventSourceConfiguration (Maybe Int)+escBatchSize = lens _escBatchSize (\s a -> s { _escBatchSize = a })++-- | The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the+-- source of events.+escEventSource :: Lens' EventSourceConfiguration (Maybe Text)+escEventSource = lens _escEventSource (\s a -> s { _escEventSource = a })++-- | The Lambda function to invoke when AWS Lambda detects an event on the+-- stream.+escFunctionName :: Lens' EventSourceConfiguration (Maybe Text)+escFunctionName = lens _escFunctionName (\s a -> s { _escFunctionName = a })++-- | Indicates whether the event source mapping is currently honored. Events+-- are only processes if IsActive is true.+escIsActive :: Lens' EventSourceConfiguration (Maybe Bool)+escIsActive = lens _escIsActive (\s a -> s { _escIsActive = a })++-- | The UTC time string indicating the last time the event mapping was+-- updated.+escLastModified :: Lens' EventSourceConfiguration (Maybe UTCTime)+escLastModified = lens _escLastModified (\s a -> s { _escLastModified = a }) . mapping _Time++-- | The map (key-value pairs) defining the configuration for AWS Lambda to+-- use when reading the event source.+escParameters :: Lens' EventSourceConfiguration (HashMap Text Text)+escParameters = lens _escParameters (\s a -> s { _escParameters = a }) . _Map++-- | The ARN of the IAM role (invocation role) that AWS Lambda can assume to+-- read from the stream and invoke the function.+escRole :: Lens' EventSourceConfiguration (Maybe Text)+escRole = lens _escRole (\s a -> s { _escRole = a })++-- | The description of the health of the event source mapping. Valid values+-- are: "PENDING", "OK", and "PROBLEM:message". Initially this staus is+-- "PENDING". When AWS Lambda begins processing events, it changes the+-- status to "OK".+escStatus :: Lens' EventSourceConfiguration (Maybe Text)+escStatus = lens _escStatus (\s a -> s { _escStatus = a })++-- | The AWS Lambda assigned opaque identifier for the mapping.+escUUID :: Lens' EventSourceConfiguration (Maybe Text)+escUUID = lens _escUUID (\s a -> s { _escUUID = a })++instance FromJSON EventSourceConfiguration where+    parseJSON = withObject "EventSourceConfiguration" $ \o -> EventSourceConfiguration+        <$> o .:? "BatchSize"+        <*> o .:? "EventSource"+        <*> o .:? "FunctionName"+        <*> o .:? "IsActive"+        <*> o .:? "LastModified"+        <*> o .:  "Parameters"+        <*> o .:? "Role"+        <*> o .:? "Status"+        <*> o .:? "UUID"++instance ToJSON EventSourceConfiguration where+    toJSON EventSourceConfiguration{..} = object+        [ "UUID"         .= _escUUID+        , "BatchSize"    .= _escBatchSize+        , "EventSource"  .= _escEventSource+        , "FunctionName" .= _escFunctionName+        , "Parameters"   .= _escParameters+        , "Role"         .= _escRole+        , "LastModified" .= _escLastModified+        , "IsActive"     .= _escIsActive+        , "Status"       .= _escStatus+        ]
+ gen/Network/AWS/Lambda/UpdateFunctionConfiguration.hs view
@@ -0,0 +1,295 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.UpdateFunctionConfiguration+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Updates the configuration parameters for the specified Lambda function by+-- using the values provided in the request. You provide only the parameters+-- you want to change. This operation must only be used on an existing Lambda+-- function and cannot be used to update the function's code. This operation+-- requires permission for the lambda:UpdateFunctionConfiguration action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_UpdateFunctionConfiguration.html>+module Network.AWS.Lambda.UpdateFunctionConfiguration+    (+    -- * Request+      UpdateFunctionConfiguration+    -- ** Request constructor+    , updateFunctionConfiguration+    -- ** Request lenses+    , ufcDescription+    , ufcFunctionName+    , ufcHandler+    , ufcMemorySize+    , ufcRole+    , ufcTimeout++    -- * Response+    , UpdateFunctionConfigurationResponse+    -- ** Response constructor+    , updateFunctionConfigurationResponse+    -- ** Response lenses+    , ufcrCodeSize+    , ufcrConfigurationId+    , ufcrDescription+    , ufcrFunctionARN+    , ufcrFunctionName+    , ufcrHandler+    , ufcrLastModified+    , ufcrMemorySize+    , ufcrMode+    , ufcrRole+    , ufcrRuntime+    , ufcrTimeout+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++data UpdateFunctionConfiguration = UpdateFunctionConfiguration+    { _ufcDescription  :: Maybe Text+    , _ufcFunctionName :: Text+    , _ufcHandler      :: Maybe Text+    , _ufcMemorySize   :: Maybe Nat+    , _ufcRole         :: Maybe Text+    , _ufcTimeout      :: Maybe Nat+    } deriving (Eq, Ord, Show)++-- | 'UpdateFunctionConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ufcDescription' @::@ 'Maybe' 'Text'+--+-- * 'ufcFunctionName' @::@ 'Text'+--+-- * 'ufcHandler' @::@ 'Maybe' 'Text'+--+-- * 'ufcMemorySize' @::@ 'Maybe' 'Natural'+--+-- * 'ufcRole' @::@ 'Maybe' 'Text'+--+-- * 'ufcTimeout' @::@ 'Maybe' 'Natural'+--+updateFunctionConfiguration :: Text -- ^ 'ufcFunctionName'+                            -> UpdateFunctionConfiguration+updateFunctionConfiguration p1 = UpdateFunctionConfiguration+    { _ufcFunctionName = p1+    , _ufcRole         = Nothing+    , _ufcHandler      = Nothing+    , _ufcDescription  = Nothing+    , _ufcTimeout      = Nothing+    , _ufcMemorySize   = Nothing+    }++-- | A short user-defined function description. Lambda does not use this+-- value. Assign a meaningful description as you see fit.+ufcDescription :: Lens' UpdateFunctionConfiguration (Maybe Text)+ufcDescription = lens _ufcDescription (\s a -> s { _ufcDescription = a })++-- | The name of the Lambda function.+ufcFunctionName :: Lens' UpdateFunctionConfiguration Text+ufcFunctionName = lens _ufcFunctionName (\s a -> s { _ufcFunctionName = a })++-- | The function that Lambda calls to begin executing your function. For+-- Node.js, it is the module-name.export value in your function.+ufcHandler :: Lens' UpdateFunctionConfiguration (Maybe Text)+ufcHandler = lens _ufcHandler (\s a -> s { _ufcHandler = a })++-- | The amount of memory, in MB, your Lambda function is given. Lambda uses+-- this memory size to infer the amount of CPU allocated to your function.+-- Your function use-case determines your CPU and memory requirements. For+-- example, a database operation might need less memory compared to an image+-- processing function. The default value is 128 MB. The value must be a+-- multiple of 64 MB.+ufcMemorySize :: Lens' UpdateFunctionConfiguration (Maybe Natural)+ufcMemorySize = lens _ufcMemorySize (\s a -> s { _ufcMemorySize = a }) . mapping _Nat++-- | The Amazon Resource Name (ARN) of the IAM role that Lambda will assume+-- when it executes your function.+ufcRole :: Lens' UpdateFunctionConfiguration (Maybe Text)+ufcRole = lens _ufcRole (\s a -> s { _ufcRole = a })++-- | The function execution time at which Lambda should terminate the+-- function. Because the execution time has cost implications, we recommend+-- you set this value based on your expected execution time. The default is+-- 3 seconds.+ufcTimeout :: Lens' UpdateFunctionConfiguration (Maybe Natural)+ufcTimeout = lens _ufcTimeout (\s a -> s { _ufcTimeout = a }) . mapping _Nat++data UpdateFunctionConfigurationResponse = UpdateFunctionConfigurationResponse+    { _ufcrCodeSize        :: Maybe Integer+    , _ufcrConfigurationId :: Maybe Text+    , _ufcrDescription     :: Maybe Text+    , _ufcrFunctionARN     :: Maybe Text+    , _ufcrFunctionName    :: Maybe Text+    , _ufcrHandler         :: Maybe Text+    , _ufcrLastModified    :: Maybe RFC822+    , _ufcrMemorySize      :: Maybe Nat+    , _ufcrMode            :: Maybe Text+    , _ufcrRole            :: Maybe Text+    , _ufcrRuntime         :: Maybe Text+    , _ufcrTimeout         :: Maybe Nat+    } deriving (Eq, Ord, Show)++-- | 'UpdateFunctionConfigurationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ufcrCodeSize' @::@ 'Maybe' 'Integer'+--+-- * 'ufcrConfigurationId' @::@ 'Maybe' 'Text'+--+-- * 'ufcrDescription' @::@ 'Maybe' 'Text'+--+-- * 'ufcrFunctionARN' @::@ 'Maybe' 'Text'+--+-- * 'ufcrFunctionName' @::@ 'Maybe' 'Text'+--+-- * 'ufcrHandler' @::@ 'Maybe' 'Text'+--+-- * 'ufcrLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'ufcrMemorySize' @::@ 'Maybe' 'Natural'+--+-- * 'ufcrMode' @::@ 'Maybe' 'Text'+--+-- * 'ufcrRole' @::@ 'Maybe' 'Text'+--+-- * 'ufcrRuntime' @::@ 'Maybe' 'Text'+--+-- * 'ufcrTimeout' @::@ 'Maybe' 'Natural'+--+updateFunctionConfigurationResponse :: UpdateFunctionConfigurationResponse+updateFunctionConfigurationResponse = UpdateFunctionConfigurationResponse+    { _ufcrFunctionName    = Nothing+    , _ufcrFunctionARN     = Nothing+    , _ufcrConfigurationId = Nothing+    , _ufcrRuntime         = Nothing+    , _ufcrRole            = Nothing+    , _ufcrHandler         = Nothing+    , _ufcrMode            = Nothing+    , _ufcrCodeSize        = Nothing+    , _ufcrDescription     = Nothing+    , _ufcrTimeout         = Nothing+    , _ufcrMemorySize      = Nothing+    , _ufcrLastModified    = Nothing+    }++-- | The size, in bytes, of the function .zip file you uploaded.+ufcrCodeSize :: Lens' UpdateFunctionConfigurationResponse (Maybe Integer)+ufcrCodeSize = lens _ufcrCodeSize (\s a -> s { _ufcrCodeSize = a })++-- | A Lambda-assigned unique identifier for the current function code and+-- related configuration.+ufcrConfigurationId :: Lens' UpdateFunctionConfigurationResponse (Maybe Text)+ufcrConfigurationId =+    lens _ufcrConfigurationId (\s a -> s { _ufcrConfigurationId = a })++-- | The user-provided description.+ufcrDescription :: Lens' UpdateFunctionConfigurationResponse (Maybe Text)+ufcrDescription = lens _ufcrDescription (\s a -> s { _ufcrDescription = a })++-- | The Amazon Resource Name (ARN) assigned to the function.+ufcrFunctionARN :: Lens' UpdateFunctionConfigurationResponse (Maybe Text)+ufcrFunctionARN = lens _ufcrFunctionARN (\s a -> s { _ufcrFunctionARN = a })++-- | The name of the function.+ufcrFunctionName :: Lens' UpdateFunctionConfigurationResponse (Maybe Text)+ufcrFunctionName = lens _ufcrFunctionName (\s a -> s { _ufcrFunctionName = a })++-- | The function Lambda calls to begin executing your function.+ufcrHandler :: Lens' UpdateFunctionConfigurationResponse (Maybe Text)+ufcrHandler = lens _ufcrHandler (\s a -> s { _ufcrHandler = a })++-- | The timestamp of the last time you updated the function.+ufcrLastModified :: Lens' UpdateFunctionConfigurationResponse (Maybe UTCTime)+ufcrLastModified = lens _ufcrLastModified (\s a -> s { _ufcrLastModified = a }) . mapping _Time++-- | The memory size, in MB, you configured for the function. Must be a+-- multiple of 64 MB.+ufcrMemorySize :: Lens' UpdateFunctionConfigurationResponse (Maybe Natural)+ufcrMemorySize = lens _ufcrMemorySize (\s a -> s { _ufcrMemorySize = a }) . mapping _Nat++-- | The type of the Lambda function you uploaded.+ufcrMode :: Lens' UpdateFunctionConfigurationResponse (Maybe Text)+ufcrMode = lens _ufcrMode (\s a -> s { _ufcrMode = a })++-- | The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when+-- it executes your function to access any other Amazon Web Services (AWS)+-- resources.+ufcrRole :: Lens' UpdateFunctionConfigurationResponse (Maybe Text)+ufcrRole = lens _ufcrRole (\s a -> s { _ufcrRole = a })++-- | The runtime environment for the Lambda function.+ufcrRuntime :: Lens' UpdateFunctionConfigurationResponse (Maybe Text)+ufcrRuntime = lens _ufcrRuntime (\s a -> s { _ufcrRuntime = a })++-- | The function execution time at which Lambda should terminate the+-- function. Because the execution time has cost implications, we recommend+-- you set this value based on your expected execution time. The default is+-- 3 seconds.+ufcrTimeout :: Lens' UpdateFunctionConfigurationResponse (Maybe Natural)+ufcrTimeout = lens _ufcrTimeout (\s a -> s { _ufcrTimeout = a }) . mapping _Nat++instance ToPath UpdateFunctionConfiguration where+    toPath UpdateFunctionConfiguration{..} = mconcat+        [ "/2014-11-13/functions/"+        , toText _ufcFunctionName+        , "/configuration"+        ]++instance ToQuery UpdateFunctionConfiguration where+    toQuery UpdateFunctionConfiguration{..} = mconcat+        [ "Role"        =? _ufcRole+        , "Handler"     =? _ufcHandler+        , "Description" =? _ufcDescription+        , "Timeout"     =? _ufcTimeout+        , "MemorySize"  =? _ufcMemorySize+        ]++instance ToHeaders UpdateFunctionConfiguration++instance ToJSON UpdateFunctionConfiguration where+    toJSON = const (toJSON Empty)++instance AWSRequest UpdateFunctionConfiguration where+    type Sv UpdateFunctionConfiguration = Lambda+    type Rs UpdateFunctionConfiguration = UpdateFunctionConfigurationResponse++    request  = put+    response = jsonResponse++instance FromJSON UpdateFunctionConfigurationResponse where+    parseJSON = withObject "UpdateFunctionConfigurationResponse" $ \o -> UpdateFunctionConfigurationResponse+        <$> o .:? "CodeSize"+        <*> o .:? "ConfigurationId"+        <*> o .:? "Description"+        <*> o .:? "FunctionARN"+        <*> o .:? "FunctionName"+        <*> o .:? "Handler"+        <*> o .:? "LastModified"+        <*> o .:? "MemorySize"+        <*> o .:? "Mode"+        <*> o .:? "Role"+        <*> o .:? "Runtime"+        <*> o .:? "Timeout"
+ gen/Network/AWS/Lambda/UploadFunction.hs view
@@ -0,0 +1,339 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.Lambda.UploadFunction+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)++-- | Creates a new Lambda function or updates an existing function. The function+-- metadata is created from the request parameters, and the code for the+-- function is provided by a .zip file in the request body. If the function+-- name already exists, the existing Lambda function is updated with the new+-- code and metadata. This operation requires permission for the+-- lambda:UploadFunction action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_UploadFunction.html>+module Network.AWS.Lambda.UploadFunction+    (+    -- * Request+      UploadFunction+    -- ** Request constructor+    , uploadFunction+    -- ** Request lenses+    , ufDescription+    , ufFunctionName+    , ufFunctionZip+    , ufHandler+    , ufMemorySize+    , ufMode+    , ufRole+    , ufRuntime+    , ufTimeout++    -- * Response+    , UploadFunctionResponse+    -- ** Response constructor+    , uploadFunctionResponse+    -- ** Response lenses+    , ufrCodeSize+    , ufrConfigurationId+    , ufrDescription+    , ufrFunctionARN+    , ufrFunctionName+    , ufrHandler+    , ufrLastModified+    , ufrMemorySize+    , ufrMode+    , ufrRole+    , ufrRuntime+    , ufrTimeout+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.Lambda.Types+import qualified GHC.Exts++data UploadFunction = UploadFunction+    { _ufDescription  :: Maybe Text+    , _ufFunctionName :: Text+    , _ufFunctionZip  :: Base64+    , _ufHandler      :: Text+    , _ufMemorySize   :: Maybe Nat+    , _ufMode         :: Text+    , _ufRole         :: Text+    , _ufRuntime      :: Text+    , _ufTimeout      :: Maybe Nat+    } deriving (Eq, Show)++-- | 'UploadFunction' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ufDescription' @::@ 'Maybe' 'Text'+--+-- * 'ufFunctionName' @::@ 'Text'+--+-- * 'ufFunctionZip' @::@ 'Base64'+--+-- * 'ufHandler' @::@ 'Text'+--+-- * 'ufMemorySize' @::@ 'Maybe' 'Natural'+--+-- * 'ufMode' @::@ 'Text'+--+-- * 'ufRole' @::@ 'Text'+--+-- * 'ufRuntime' @::@ 'Text'+--+-- * 'ufTimeout' @::@ 'Maybe' 'Natural'+--+uploadFunction :: Text -- ^ 'ufFunctionName'+               -> Base64 -- ^ 'ufFunctionZip'+               -> Text -- ^ 'ufRuntime'+               -> Text -- ^ 'ufRole'+               -> Text -- ^ 'ufHandler'+               -> Text -- ^ 'ufMode'+               -> UploadFunction+uploadFunction p1 p2 p3 p4 p5 p6 = UploadFunction+    { _ufFunctionName = p1+    , _ufFunctionZip  = p2+    , _ufRuntime      = p3+    , _ufRole         = p4+    , _ufHandler      = p5+    , _ufMode         = p6+    , _ufDescription  = Nothing+    , _ufTimeout      = Nothing+    , _ufMemorySize   = Nothing+    }++-- | A short, user-defined function description. Lambda does not use this+-- value. Assign a meaningful description as you see fit.+ufDescription :: Lens' UploadFunction (Maybe Text)+ufDescription = lens _ufDescription (\s a -> s { _ufDescription = a })++-- | The name you want to assign to the function you are uploading. The+-- function names appear in the console and are returned in the+-- ListFunctions API. Function names are used to specify functions to other+-- AWS Lambda APIs, such as InvokeAsync.+ufFunctionName :: Lens' UploadFunction Text+ufFunctionName = lens _ufFunctionName (\s a -> s { _ufFunctionName = a })++-- | A .zip file containing your packaged source code. For more information+-- about creating a .zip file, go to AWS LambdaL How it Works in the AWS+-- Lambda Developer Guide.+ufFunctionZip :: Lens' UploadFunction Base64+ufFunctionZip = lens _ufFunctionZip (\s a -> s { _ufFunctionZip = a })++-- | The function that Lambda calls to begin execution. For Node.js, it is the+-- module-name.export value in your function.+ufHandler :: Lens' UploadFunction Text+ufHandler = lens _ufHandler (\s a -> s { _ufHandler = a })++-- | The amount of memory, in MB, your Lambda function is given. Lambda uses+-- this memory size to infer the amount of CPU allocated to your function.+-- Your function use-case determines your CPU and memory requirements. For+-- example, database operation might need less memory compared to image+-- processing function. The default value is 128 MB. The value must be a+-- multiple of 64 MB.+ufMemorySize :: Lens' UploadFunction (Maybe Natural)+ufMemorySize = lens _ufMemorySize (\s a -> s { _ufMemorySize = a }) . mapping _Nat++-- | How the Lambda function will be invoked. Lambda supports only the "event"+-- mode.+ufMode :: Lens' UploadFunction Text+ufMode = lens _ufMode (\s a -> s { _ufMode = a })++-- | The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when+-- it executes your function to access any other Amazon Web Services (AWS)+-- resources.+ufRole :: Lens' UploadFunction Text+ufRole = lens _ufRole (\s a -> s { _ufRole = a })++-- | The runtime environment for the Lambda function you are uploading.+-- Currently, Lambda supports only "nodejs" as the runtime.+ufRuntime :: Lens' UploadFunction Text+ufRuntime = lens _ufRuntime (\s a -> s { _ufRuntime = a })++-- | The function execution time at which Lambda should terminate the+-- function. Because the execution time has cost implications, we recommend+-- you set this value based on your expected execution time. The default is+-- 3 seconds.+ufTimeout :: Lens' UploadFunction (Maybe Natural)+ufTimeout = lens _ufTimeout (\s a -> s { _ufTimeout = a }) . mapping _Nat++data UploadFunctionResponse = UploadFunctionResponse+    { _ufrCodeSize        :: Maybe Integer+    , _ufrConfigurationId :: Maybe Text+    , _ufrDescription     :: Maybe Text+    , _ufrFunctionARN     :: Maybe Text+    , _ufrFunctionName    :: Maybe Text+    , _ufrHandler         :: Maybe Text+    , _ufrLastModified    :: Maybe RFC822+    , _ufrMemorySize      :: Maybe Nat+    , _ufrMode            :: Maybe Text+    , _ufrRole            :: Maybe Text+    , _ufrRuntime         :: Maybe Text+    , _ufrTimeout         :: Maybe Nat+    } deriving (Eq, Ord, Show)++-- | 'UploadFunctionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ufrCodeSize' @::@ 'Maybe' 'Integer'+--+-- * 'ufrConfigurationId' @::@ 'Maybe' 'Text'+--+-- * 'ufrDescription' @::@ 'Maybe' 'Text'+--+-- * 'ufrFunctionARN' @::@ 'Maybe' 'Text'+--+-- * 'ufrFunctionName' @::@ 'Maybe' 'Text'+--+-- * 'ufrHandler' @::@ 'Maybe' 'Text'+--+-- * 'ufrLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'ufrMemorySize' @::@ 'Maybe' 'Natural'+--+-- * 'ufrMode' @::@ 'Maybe' 'Text'+--+-- * 'ufrRole' @::@ 'Maybe' 'Text'+--+-- * 'ufrRuntime' @::@ 'Maybe' 'Text'+--+-- * 'ufrTimeout' @::@ 'Maybe' 'Natural'+--+uploadFunctionResponse :: UploadFunctionResponse+uploadFunctionResponse = UploadFunctionResponse+    { _ufrFunctionName    = Nothing+    , _ufrFunctionARN     = Nothing+    , _ufrConfigurationId = Nothing+    , _ufrRuntime         = Nothing+    , _ufrRole            = Nothing+    , _ufrHandler         = Nothing+    , _ufrMode            = Nothing+    , _ufrCodeSize        = Nothing+    , _ufrDescription     = Nothing+    , _ufrTimeout         = Nothing+    , _ufrMemorySize      = Nothing+    , _ufrLastModified    = Nothing+    }++-- | The size, in bytes, of the function .zip file you uploaded.+ufrCodeSize :: Lens' UploadFunctionResponse (Maybe Integer)+ufrCodeSize = lens _ufrCodeSize (\s a -> s { _ufrCodeSize = a })++-- | A Lambda-assigned unique identifier for the current function code and+-- related configuration.+ufrConfigurationId :: Lens' UploadFunctionResponse (Maybe Text)+ufrConfigurationId =+    lens _ufrConfigurationId (\s a -> s { _ufrConfigurationId = a })++-- | The user-provided description.+ufrDescription :: Lens' UploadFunctionResponse (Maybe Text)+ufrDescription = lens _ufrDescription (\s a -> s { _ufrDescription = a })++-- | The Amazon Resource Name (ARN) assigned to the function.+ufrFunctionARN :: Lens' UploadFunctionResponse (Maybe Text)+ufrFunctionARN = lens _ufrFunctionARN (\s a -> s { _ufrFunctionARN = a })++-- | The name of the function.+ufrFunctionName :: Lens' UploadFunctionResponse (Maybe Text)+ufrFunctionName = lens _ufrFunctionName (\s a -> s { _ufrFunctionName = a })++-- | The function Lambda calls to begin executing your function.+ufrHandler :: Lens' UploadFunctionResponse (Maybe Text)+ufrHandler = lens _ufrHandler (\s a -> s { _ufrHandler = a })++-- | The timestamp of the last time you updated the function.+ufrLastModified :: Lens' UploadFunctionResponse (Maybe UTCTime)+ufrLastModified = lens _ufrLastModified (\s a -> s { _ufrLastModified = a }) . mapping _Time++-- | The memory size, in MB, you configured for the function. Must be a+-- multiple of 64 MB.+ufrMemorySize :: Lens' UploadFunctionResponse (Maybe Natural)+ufrMemorySize = lens _ufrMemorySize (\s a -> s { _ufrMemorySize = a }) . mapping _Nat++-- | The type of the Lambda function you uploaded.+ufrMode :: Lens' UploadFunctionResponse (Maybe Text)+ufrMode = lens _ufrMode (\s a -> s { _ufrMode = a })++-- | The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when+-- it executes your function to access any other Amazon Web Services (AWS)+-- resources.+ufrRole :: Lens' UploadFunctionResponse (Maybe Text)+ufrRole = lens _ufrRole (\s a -> s { _ufrRole = a })++-- | The runtime environment for the Lambda function.+ufrRuntime :: Lens' UploadFunctionResponse (Maybe Text)+ufrRuntime = lens _ufrRuntime (\s a -> s { _ufrRuntime = a })++-- | The function execution time at which Lambda should terminate the+-- function. Because the execution time has cost implications, we recommend+-- you set this value based on your expected execution time. The default is+-- 3 seconds.+ufrTimeout :: Lens' UploadFunctionResponse (Maybe Natural)+ufrTimeout = lens _ufrTimeout (\s a -> s { _ufrTimeout = a }) . mapping _Nat++instance ToPath UploadFunction where+    toPath UploadFunction{..} = mconcat+        [ "/2014-11-13/functions/"+        , toText _ufFunctionName+        ]++instance ToQuery UploadFunction where+    toQuery UploadFunction{..} = mconcat+        [ "Runtime"     =? _ufRuntime+        , "Role"        =? _ufRole+        , "Handler"     =? _ufHandler+        , "Mode"        =? _ufMode+        , "Description" =? _ufDescription+        , "Timeout"     =? _ufTimeout+        , "MemorySize"  =? _ufMemorySize+        ]++instance ToHeaders UploadFunction++instance ToJSON UploadFunction where+    toJSON UploadFunction{..} = object+        [ "FunctionZip" .= _ufFunctionZip+        ]++instance AWSRequest UploadFunction where+    type Sv UploadFunction = Lambda+    type Rs UploadFunction = UploadFunctionResponse++    request  = put+    response = jsonResponse++instance FromJSON UploadFunctionResponse where+    parseJSON = withObject "UploadFunctionResponse" $ \o -> UploadFunctionResponse+        <$> o .:? "CodeSize"+        <*> o .:? "ConfigurationId"+        <*> o .:? "Description"+        <*> o .:? "FunctionARN"+        <*> o .:? "FunctionName"+        <*> o .:? "Handler"+        <*> o .:? "LastModified"+        <*> o .:? "MemorySize"+        <*> o .:? "Mode"+        <*> o .:? "Role"+        <*> o .:? "Runtime"+        <*> o .:? "Timeout"