amazonka-datapipeline (empty) → 0.0.0
raw patch · 22 files changed
+3461/−0 lines, 22 filesdep +amazonka-coredep +basesetup-changed
Dependencies added: amazonka-core, base
Files
- LICENSE +373/−0
- README.md +26/−0
- Setup.hs +2/−0
- amazonka-datapipeline.cabal +60/−0
- gen/Network/AWS/DataPipeline.hs +51/−0
- gen/Network/AWS/DataPipeline/ActivatePipeline.hs +95/−0
- gen/Network/AWS/DataPipeline/CreatePipeline.hs +146/−0
- gen/Network/AWS/DataPipeline/DeletePipeline.hs +97/−0
- gen/Network/AWS/DataPipeline/DescribeObjects.hs +180/−0
- gen/Network/AWS/DataPipeline/DescribePipelines.hs +132/−0
- gen/Network/AWS/DataPipeline/EvaluateExpression.hs +134/−0
- gen/Network/AWS/DataPipeline/GetPipelineDefinition.hs +132/−0
- gen/Network/AWS/DataPipeline/ListPipelines.hs +147/−0
- gen/Network/AWS/DataPipeline/PollForTask.hs +158/−0
- gen/Network/AWS/DataPipeline/PutPipelineDefinition.hs +159/−0
- gen/Network/AWS/DataPipeline/QueryObjects.hs +193/−0
- gen/Network/AWS/DataPipeline/ReportTaskProgress.hs +124/−0
- gen/Network/AWS/DataPipeline/ReportTaskRunnerHeartbeat.hs +145/−0
- gen/Network/AWS/DataPipeline/SetStatus.hs +118/−0
- gen/Network/AWS/DataPipeline/SetTaskStatus.hs +148/−0
- gen/Network/AWS/DataPipeline/Types.hs +691/−0
- gen/Network/AWS/DataPipeline/ValidatePipelineDefinition.hs +150/−0
+ LICENSE view
@@ -0,0 +1,373 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.++Exhibit B - "Incompatible With Secondary Licenses" Notice+---------------------------------------------------------++ This Source Code Form is "Incompatible With Secondary Licenses", as+ defined by the Mozilla Public License, v. 2.0.
+ README.md view
@@ -0,0 +1,26 @@+# Amazon Data Pipeline 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 Data Pipeline is a web service that you can use to automate the movement and transformation of data. With AWS Data Pipeline, you can define data-driven workflows, so that tasks can be dependent on the successful completion of previous tasks.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-datapipeline)+and [AWS API Reference](http://docs.aws.amazon.com/datapipeline/latest/APIReference/Welcome.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-datapipeline` 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-datapipeline.cabal view
@@ -0,0 +1,60 @@+name: amazonka-datapipeline+version: 0.0.0+synopsis: Amazon Data Pipeline 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 Data Pipeline is a web service that you can use to automate the+ movement and transformation of data. With AWS Data Pipeline, you can+ define data-driven workflows, so that tasks can be dependent on the+ successful completion of previous tasks.+ .+ /See:/ <http://docs.aws.amazon.com/datapipeline/latest/APIReference/Welcome.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.DataPipeline+ , Network.AWS.DataPipeline.ActivatePipeline+ , Network.AWS.DataPipeline.CreatePipeline+ , Network.AWS.DataPipeline.DeletePipeline+ , Network.AWS.DataPipeline.DescribeObjects+ , Network.AWS.DataPipeline.DescribePipelines+ , Network.AWS.DataPipeline.EvaluateExpression+ , Network.AWS.DataPipeline.GetPipelineDefinition+ , Network.AWS.DataPipeline.ListPipelines+ , Network.AWS.DataPipeline.PollForTask+ , Network.AWS.DataPipeline.PutPipelineDefinition+ , Network.AWS.DataPipeline.QueryObjects+ , Network.AWS.DataPipeline.ReportTaskProgress+ , Network.AWS.DataPipeline.ReportTaskRunnerHeartbeat+ , Network.AWS.DataPipeline.SetStatus+ , Network.AWS.DataPipeline.SetTaskStatus+ , Network.AWS.DataPipeline.Types+ , Network.AWS.DataPipeline.ValidatePipelineDefinition++ other-modules:++ build-depends:+ amazonka-core+ , base >= 4.7 && < 5
+ gen/Network/AWS/DataPipeline.hs view
@@ -0,0 +1,51 @@+-- Module : Network.AWS.DataPipeline+-- 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 Data Pipeline is a web service that you can use to automate the+-- movement and transformation of data. With AWS Data Pipeline, you can define+-- data-driven workflows, so that tasks can be dependent on the successful+-- completion of previous tasks.+module Network.AWS.DataPipeline+ ( module Network.AWS.DataPipeline.ActivatePipeline+ , module Network.AWS.DataPipeline.CreatePipeline+ , module Network.AWS.DataPipeline.DeletePipeline+ , module Network.AWS.DataPipeline.DescribeObjects+ , module Network.AWS.DataPipeline.DescribePipelines+ , module Network.AWS.DataPipeline.EvaluateExpression+ , module Network.AWS.DataPipeline.GetPipelineDefinition+ , module Network.AWS.DataPipeline.ListPipelines+ , module Network.AWS.DataPipeline.PollForTask+ , module Network.AWS.DataPipeline.PutPipelineDefinition+ , module Network.AWS.DataPipeline.QueryObjects+ , module Network.AWS.DataPipeline.ReportTaskProgress+ , module Network.AWS.DataPipeline.ReportTaskRunnerHeartbeat+ , module Network.AWS.DataPipeline.SetStatus+ , module Network.AWS.DataPipeline.SetTaskStatus+ , module Network.AWS.DataPipeline.Types+ , module Network.AWS.DataPipeline.ValidatePipelineDefinition+ ) where++import Network.AWS.DataPipeline.ActivatePipeline+import Network.AWS.DataPipeline.CreatePipeline+import Network.AWS.DataPipeline.DeletePipeline+import Network.AWS.DataPipeline.DescribeObjects+import Network.AWS.DataPipeline.DescribePipelines+import Network.AWS.DataPipeline.EvaluateExpression+import Network.AWS.DataPipeline.GetPipelineDefinition+import Network.AWS.DataPipeline.ListPipelines+import Network.AWS.DataPipeline.PollForTask+import Network.AWS.DataPipeline.PutPipelineDefinition+import Network.AWS.DataPipeline.QueryObjects+import Network.AWS.DataPipeline.ReportTaskProgress+import Network.AWS.DataPipeline.ReportTaskRunnerHeartbeat+import Network.AWS.DataPipeline.SetStatus+import Network.AWS.DataPipeline.SetTaskStatus+import Network.AWS.DataPipeline.Types+import Network.AWS.DataPipeline.ValidatePipelineDefinition
+ gen/Network/AWS/DataPipeline/ActivatePipeline.hs view
@@ -0,0 +1,95 @@+{-# 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.DataPipeline.ActivatePipeline+-- 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)++-- | Validates a pipeline and initiates processing. If the pipeline does not+-- pass validation, activation fails. Call this action to start processing+-- pipeline tasks of a pipeline you've created using the CreatePipeline and+-- PutPipelineDefinition actions. A pipeline cannot be modified after it has+-- been successfully activated.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_ActivatePipeline.html>+module Network.AWS.DataPipeline.ActivatePipeline+ (+ -- * Request+ ActivatePipeline+ -- ** Request constructor+ , activatePipeline+ -- ** Request lenses+ , apPipelineId++ -- * Response+ , ActivatePipelineResponse+ -- ** Response constructor+ , activatePipelineResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++newtype ActivatePipeline = ActivatePipeline+ { _apPipelineId :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'ActivatePipeline' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'apPipelineId' @::@ 'Text'+--+activatePipeline :: Text -- ^ 'apPipelineId'+ -> ActivatePipeline+activatePipeline p1 = ActivatePipeline+ { _apPipelineId = p1+ }++-- | The identifier of the pipeline to activate.+apPipelineId :: Lens' ActivatePipeline Text+apPipelineId = lens _apPipelineId (\s a -> s { _apPipelineId = a })++data ActivatePipelineResponse = ActivatePipelineResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'ActivatePipelineResponse' constructor.+activatePipelineResponse :: ActivatePipelineResponse+activatePipelineResponse = ActivatePipelineResponse++instance ToPath ActivatePipeline where+ toPath = const "/"++instance ToQuery ActivatePipeline where+ toQuery = const mempty++instance ToHeaders ActivatePipeline++instance ToJSON ActivatePipeline where+ toJSON ActivatePipeline{..} = object+ [ "pipelineId" .= _apPipelineId+ ]++instance AWSRequest ActivatePipeline where+ type Sv ActivatePipeline = DataPipeline+ type Rs ActivatePipeline = ActivatePipelineResponse++ request = post "ActivatePipeline"+ response = nullResponse ActivatePipelineResponse
+ gen/Network/AWS/DataPipeline/CreatePipeline.hs view
@@ -0,0 +1,146 @@+{-# 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.DataPipeline.CreatePipeline+-- 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 empty pipeline. When this action succeeds, you can then use+-- the PutPipelineDefinition action to populate the pipeline.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_CreatePipeline.html>+module Network.AWS.DataPipeline.CreatePipeline+ (+ -- * Request+ CreatePipeline+ -- ** Request constructor+ , createPipeline+ -- ** Request lenses+ , cpDescription+ , cpName+ , cpUniqueId++ -- * Response+ , CreatePipelineResponse+ -- ** Response constructor+ , createPipelineResponse+ -- ** Response lenses+ , cprPipelineId+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data CreatePipeline = CreatePipeline+ { _cpDescription :: Maybe Text+ , _cpName :: Text+ , _cpUniqueId :: Text+ } deriving (Eq, Ord, Show)++-- | 'CreatePipeline' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cpDescription' @::@ 'Maybe' 'Text'+--+-- * 'cpName' @::@ 'Text'+--+-- * 'cpUniqueId' @::@ 'Text'+--+createPipeline :: Text -- ^ 'cpName'+ -> Text -- ^ 'cpUniqueId'+ -> CreatePipeline+createPipeline p1 p2 = CreatePipeline+ { _cpName = p1+ , _cpUniqueId = p2+ , _cpDescription = Nothing+ }++-- | The description of the new pipeline.+cpDescription :: Lens' CreatePipeline (Maybe Text)+cpDescription = lens _cpDescription (\s a -> s { _cpDescription = a })++-- | The name of the new pipeline. You can use the same name for multiple+-- pipelines associated with your AWS account, because AWS Data Pipeline+-- assigns each new pipeline a unique pipeline identifier.+cpName :: Lens' CreatePipeline Text+cpName = lens _cpName (\s a -> s { _cpName = a })++-- | A unique identifier that you specify. This identifier is not the same as+-- the pipeline identifier assigned by AWS Data Pipeline. You are+-- responsible for defining the format and ensuring the uniqueness of this+-- identifier. You use this parameter to ensure idempotency during repeated+-- calls to CreatePipeline. For example, if the first call to CreatePipeline+-- does not return a clear success, you can pass in the same unique+-- identifier and pipeline name combination on a subsequent call to+-- CreatePipeline. CreatePipeline ensures that if a pipeline already exists+-- with the same name and unique identifier, a new pipeline will not be+-- created. Instead, you'll receive the pipeline identifier from the+-- previous attempt. The uniqueness of the name and unique identifier+-- combination is scoped to the AWS account or IAM user credentials.+cpUniqueId :: Lens' CreatePipeline Text+cpUniqueId = lens _cpUniqueId (\s a -> s { _cpUniqueId = a })++newtype CreatePipelineResponse = CreatePipelineResponse+ { _cprPipelineId :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'CreatePipelineResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cprPipelineId' @::@ 'Text'+--+createPipelineResponse :: Text -- ^ 'cprPipelineId'+ -> CreatePipelineResponse+createPipelineResponse p1 = CreatePipelineResponse+ { _cprPipelineId = p1+ }++-- | The ID that AWS Data Pipeline assigns the newly created pipeline. The ID+-- is a string of the form: df-06372391ZG65EXAMPLE.+cprPipelineId :: Lens' CreatePipelineResponse Text+cprPipelineId = lens _cprPipelineId (\s a -> s { _cprPipelineId = a })++instance ToPath CreatePipeline where+ toPath = const "/"++instance ToQuery CreatePipeline where+ toQuery = const mempty++instance ToHeaders CreatePipeline++instance ToJSON CreatePipeline where+ toJSON CreatePipeline{..} = object+ [ "name" .= _cpName+ , "uniqueId" .= _cpUniqueId+ , "description" .= _cpDescription+ ]++instance AWSRequest CreatePipeline where+ type Sv CreatePipeline = DataPipeline+ type Rs CreatePipeline = CreatePipelineResponse++ request = post "CreatePipeline"+ response = jsonResponse++instance FromJSON CreatePipelineResponse where+ parseJSON = withObject "CreatePipelineResponse" $ \o -> CreatePipelineResponse+ <$> o .: "pipelineId"
+ gen/Network/AWS/DataPipeline/DeletePipeline.hs view
@@ -0,0 +1,97 @@+{-# 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.DataPipeline.DeletePipeline+-- 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)++-- | Permanently deletes a pipeline, its pipeline definition and its run+-- history. You cannot query or restore a deleted pipeline. AWS Data Pipeline+-- will attempt to cancel instances associated with the pipeline that are+-- currently being processed by task runners. Deleting a pipeline cannot be+-- undone. To temporarily pause a pipeline instead of deleting it, call+-- SetStatus with the status set to Pause on individual components. Components+-- that are paused by SetStatus can be resumed.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_DeletePipeline.html>+module Network.AWS.DataPipeline.DeletePipeline+ (+ -- * Request+ DeletePipeline+ -- ** Request constructor+ , deletePipeline+ -- ** Request lenses+ , dpPipelineId++ -- * Response+ , DeletePipelineResponse+ -- ** Response constructor+ , deletePipelineResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++newtype DeletePipeline = DeletePipeline+ { _dpPipelineId :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeletePipeline' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dpPipelineId' @::@ 'Text'+--+deletePipeline :: Text -- ^ 'dpPipelineId'+ -> DeletePipeline+deletePipeline p1 = DeletePipeline+ { _dpPipelineId = p1+ }++-- | The identifier of the pipeline to be deleted.+dpPipelineId :: Lens' DeletePipeline Text+dpPipelineId = lens _dpPipelineId (\s a -> s { _dpPipelineId = a })++data DeletePipelineResponse = DeletePipelineResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'DeletePipelineResponse' constructor.+deletePipelineResponse :: DeletePipelineResponse+deletePipelineResponse = DeletePipelineResponse++instance ToPath DeletePipeline where+ toPath = const "/"++instance ToQuery DeletePipeline where+ toQuery = const mempty++instance ToHeaders DeletePipeline++instance ToJSON DeletePipeline where+ toJSON DeletePipeline{..} = object+ [ "pipelineId" .= _dpPipelineId+ ]++instance AWSRequest DeletePipeline where+ type Sv DeletePipeline = DataPipeline+ type Rs DeletePipeline = DeletePipelineResponse++ request = post "DeletePipeline"+ response = nullResponse DeletePipelineResponse
+ gen/Network/AWS/DataPipeline/DescribeObjects.hs view
@@ -0,0 +1,180 @@+{-# 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.DataPipeline.DescribeObjects+-- 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 object definitions for a set of objects associated with the+-- pipeline. Object definitions are composed of a set of fields that define+-- the properties of the object.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_DescribeObjects.html>+module Network.AWS.DataPipeline.DescribeObjects+ (+ -- * Request+ DescribeObjects+ -- ** Request constructor+ , describeObjects+ -- ** Request lenses+ , doEvaluateExpressions+ , doMarker+ , doObjectIds+ , doPipelineId++ -- * Response+ , DescribeObjectsResponse+ -- ** Response constructor+ , describeObjectsResponse+ -- ** Response lenses+ , dorHasMoreResults+ , dorMarker+ , dorPipelineObjects+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data DescribeObjects = DescribeObjects+ { _doEvaluateExpressions :: Maybe Bool+ , _doMarker :: Maybe Text+ , _doObjectIds :: List "pipelineIds" Text+ , _doPipelineId :: Text+ } deriving (Eq, Ord, Show)++-- | 'DescribeObjects' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'doEvaluateExpressions' @::@ 'Maybe' 'Bool'+--+-- * 'doMarker' @::@ 'Maybe' 'Text'+--+-- * 'doObjectIds' @::@ ['Text']+--+-- * 'doPipelineId' @::@ 'Text'+--+describeObjects :: Text -- ^ 'doPipelineId'+ -> DescribeObjects+describeObjects p1 = DescribeObjects+ { _doPipelineId = p1+ , _doObjectIds = mempty+ , _doEvaluateExpressions = Nothing+ , _doMarker = Nothing+ }++-- | Indicates whether any expressions in the object should be evaluated when+-- the object descriptions are returned.+doEvaluateExpressions :: Lens' DescribeObjects (Maybe Bool)+doEvaluateExpressions =+ lens _doEvaluateExpressions (\s a -> s { _doEvaluateExpressions = a })++-- | The starting point for the results to be returned. The first time you+-- call DescribeObjects, this value should be empty. As long as the action+-- returns HasMoreResults as True, you can call DescribeObjects again and+-- pass the marker value from the response to retrieve the next set of+-- results.+doMarker :: Lens' DescribeObjects (Maybe Text)+doMarker = lens _doMarker (\s a -> s { _doMarker = a })++-- | Identifiers of the pipeline objects that contain the definitions to be+-- described. You can pass as many as 25 identifiers in a single call to+-- DescribeObjects.+doObjectIds :: Lens' DescribeObjects [Text]+doObjectIds = lens _doObjectIds (\s a -> s { _doObjectIds = a }) . _List++-- | Identifier of the pipeline that contains the object definitions.+doPipelineId :: Lens' DescribeObjects Text+doPipelineId = lens _doPipelineId (\s a -> s { _doPipelineId = a })++data DescribeObjectsResponse = DescribeObjectsResponse+ { _dorHasMoreResults :: Maybe Bool+ , _dorMarker :: Maybe Text+ , _dorPipelineObjects :: List "pipelineObjects" PipelineObject+ } deriving (Eq, Show)++-- | 'DescribeObjectsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dorHasMoreResults' @::@ 'Maybe' 'Bool'+--+-- * 'dorMarker' @::@ 'Maybe' 'Text'+--+-- * 'dorPipelineObjects' @::@ ['PipelineObject']+--+describeObjectsResponse :: DescribeObjectsResponse+describeObjectsResponse = DescribeObjectsResponse+ { _dorPipelineObjects = mempty+ , _dorMarker = Nothing+ , _dorHasMoreResults = Nothing+ }++-- | If True, there are more pages of results to return.+dorHasMoreResults :: Lens' DescribeObjectsResponse (Maybe Bool)+dorHasMoreResults =+ lens _dorHasMoreResults (\s a -> s { _dorHasMoreResults = a })++-- | The starting point for the next page of results. To view the next page of+-- results, call DescribeObjects again with this marker value.+dorMarker :: Lens' DescribeObjectsResponse (Maybe Text)+dorMarker = lens _dorMarker (\s a -> s { _dorMarker = a })++-- | An array of object definitions that are returned by the call to+-- DescribeObjects.+dorPipelineObjects :: Lens' DescribeObjectsResponse [PipelineObject]+dorPipelineObjects =+ lens _dorPipelineObjects (\s a -> s { _dorPipelineObjects = a })+ . _List++instance ToPath DescribeObjects where+ toPath = const "/"++instance ToQuery DescribeObjects where+ toQuery = const mempty++instance ToHeaders DescribeObjects++instance ToJSON DescribeObjects where+ toJSON DescribeObjects{..} = object+ [ "pipelineId" .= _doPipelineId+ , "objectIds" .= _doObjectIds+ , "evaluateExpressions" .= _doEvaluateExpressions+ , "marker" .= _doMarker+ ]++instance AWSRequest DescribeObjects where+ type Sv DescribeObjects = DataPipeline+ type Rs DescribeObjects = DescribeObjectsResponse++ request = post "DescribeObjects"+ response = jsonResponse++instance FromJSON DescribeObjectsResponse where+ parseJSON = withObject "DescribeObjectsResponse" $ \o -> DescribeObjectsResponse+ <$> o .:? "hasMoreResults"+ <*> o .:? "marker"+ <*> o .: "pipelineObjects"++instance AWSPager DescribeObjects where+ page rq rs+ | stop (rs ^. dorHasMoreResults) = Nothing+ | otherwise = Just $ rq+ & doMarker .~ rs ^. dorMarker
+ gen/Network/AWS/DataPipeline/DescribePipelines.hs view
@@ -0,0 +1,132 @@+{-# 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.DataPipeline.DescribePipelines+-- 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)++-- | Retrieve metadata about one or more pipelines. The information retrieved+-- includes the name of the pipeline, the pipeline identifier, its current+-- state, and the user account that owns the pipeline. Using account+-- credentials, you can retrieve metadata about pipelines that you or your IAM+-- users have created. If you are using an IAM user account, you can retrieve+-- metadata about only those pipelines you have read permission for. To+-- retrieve the full pipeline definition instead of metadata about the+-- pipeline, call the GetPipelineDefinition action.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_DescribePipelines.html>+module Network.AWS.DataPipeline.DescribePipelines+ (+ -- * Request+ DescribePipelines+ -- ** Request constructor+ , describePipelines+ -- ** Request lenses+ , dpPipelineIds++ -- * Response+ , DescribePipelinesResponse+ -- ** Response constructor+ , describePipelinesResponse+ -- ** Response lenses+ , dprPipelineDescriptionList+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++newtype DescribePipelines = DescribePipelines+ { _dpPipelineIds :: List "pipelineIds" Text+ } deriving (Eq, Ord, Show, Monoid, Semigroup)++instance GHC.Exts.IsList DescribePipelines where+ type Item DescribePipelines = Text++ fromList = DescribePipelines . GHC.Exts.fromList+ toList = GHC.Exts.toList . _dpPipelineIds++-- | 'DescribePipelines' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dpPipelineIds' @::@ ['Text']+--+describePipelines :: DescribePipelines+describePipelines = DescribePipelines+ { _dpPipelineIds = mempty+ }++-- | Identifiers of the pipelines to describe. You can pass as many as 25+-- identifiers in a single call to DescribePipelines. You can obtain+-- pipeline identifiers by calling ListPipelines.+dpPipelineIds :: Lens' DescribePipelines [Text]+dpPipelineIds = lens _dpPipelineIds (\s a -> s { _dpPipelineIds = a }) . _List++newtype DescribePipelinesResponse = DescribePipelinesResponse+ { _dprPipelineDescriptionList :: List "pipelineDescriptionList" PipelineDescription+ } deriving (Eq, Show, Monoid, Semigroup)++instance GHC.Exts.IsList DescribePipelinesResponse where+ type Item DescribePipelinesResponse = PipelineDescription++ fromList = DescribePipelinesResponse . GHC.Exts.fromList+ toList = GHC.Exts.toList . _dprPipelineDescriptionList++-- | 'DescribePipelinesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dprPipelineDescriptionList' @::@ ['PipelineDescription']+--+describePipelinesResponse :: DescribePipelinesResponse+describePipelinesResponse = DescribePipelinesResponse+ { _dprPipelineDescriptionList = mempty+ }++-- | An array of descriptions returned for the specified pipelines.+dprPipelineDescriptionList :: Lens' DescribePipelinesResponse [PipelineDescription]+dprPipelineDescriptionList =+ lens _dprPipelineDescriptionList+ (\s a -> s { _dprPipelineDescriptionList = a })+ . _List++instance ToPath DescribePipelines where+ toPath = const "/"++instance ToQuery DescribePipelines where+ toQuery = const mempty++instance ToHeaders DescribePipelines++instance ToJSON DescribePipelines where+ toJSON DescribePipelines{..} = object+ [ "pipelineIds" .= _dpPipelineIds+ ]++instance AWSRequest DescribePipelines where+ type Sv DescribePipelines = DataPipeline+ type Rs DescribePipelines = DescribePipelinesResponse++ request = post "DescribePipelines"+ response = jsonResponse++instance FromJSON DescribePipelinesResponse where+ parseJSON = withObject "DescribePipelinesResponse" $ \o -> DescribePipelinesResponse+ <$> o .: "pipelineDescriptionList"
+ gen/Network/AWS/DataPipeline/EvaluateExpression.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.DataPipeline.EvaluateExpression+-- 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)++-- | Evaluates a string in the context of a specified object. A task runner can+-- use this action to evaluate SQL queries stored in Amazon S3.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_EvaluateExpression.html>+module Network.AWS.DataPipeline.EvaluateExpression+ (+ -- * Request+ EvaluateExpression+ -- ** Request constructor+ , evaluateExpression+ -- ** Request lenses+ , eeExpression+ , eeObjectId+ , eePipelineId++ -- * Response+ , EvaluateExpressionResponse+ -- ** Response constructor+ , evaluateExpressionResponse+ -- ** Response lenses+ , eerEvaluatedExpression+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data EvaluateExpression = EvaluateExpression+ { _eeExpression :: Text+ , _eeObjectId :: Text+ , _eePipelineId :: Text+ } deriving (Eq, Ord, Show)++-- | 'EvaluateExpression' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'eeExpression' @::@ 'Text'+--+-- * 'eeObjectId' @::@ 'Text'+--+-- * 'eePipelineId' @::@ 'Text'+--+evaluateExpression :: Text -- ^ 'eePipelineId'+ -> Text -- ^ 'eeObjectId'+ -> Text -- ^ 'eeExpression'+ -> EvaluateExpression+evaluateExpression p1 p2 p3 = EvaluateExpression+ { _eePipelineId = p1+ , _eeObjectId = p2+ , _eeExpression = p3+ }++-- | The expression to evaluate.+eeExpression :: Lens' EvaluateExpression Text+eeExpression = lens _eeExpression (\s a -> s { _eeExpression = a })++-- | The identifier of the object.+eeObjectId :: Lens' EvaluateExpression Text+eeObjectId = lens _eeObjectId (\s a -> s { _eeObjectId = a })++-- | The identifier of the pipeline.+eePipelineId :: Lens' EvaluateExpression Text+eePipelineId = lens _eePipelineId (\s a -> s { _eePipelineId = a })++newtype EvaluateExpressionResponse = EvaluateExpressionResponse+ { _eerEvaluatedExpression :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'EvaluateExpressionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'eerEvaluatedExpression' @::@ 'Text'+--+evaluateExpressionResponse :: Text -- ^ 'eerEvaluatedExpression'+ -> EvaluateExpressionResponse+evaluateExpressionResponse p1 = EvaluateExpressionResponse+ { _eerEvaluatedExpression = p1+ }++-- | The evaluated expression.+eerEvaluatedExpression :: Lens' EvaluateExpressionResponse Text+eerEvaluatedExpression =+ lens _eerEvaluatedExpression (\s a -> s { _eerEvaluatedExpression = a })++instance ToPath EvaluateExpression where+ toPath = const "/"++instance ToQuery EvaluateExpression where+ toQuery = const mempty++instance ToHeaders EvaluateExpression++instance ToJSON EvaluateExpression where+ toJSON EvaluateExpression{..} = object+ [ "pipelineId" .= _eePipelineId+ , "objectId" .= _eeObjectId+ , "expression" .= _eeExpression+ ]++instance AWSRequest EvaluateExpression where+ type Sv EvaluateExpression = DataPipeline+ type Rs EvaluateExpression = EvaluateExpressionResponse++ request = post "EvaluateExpression"+ response = jsonResponse++instance FromJSON EvaluateExpressionResponse where+ parseJSON = withObject "EvaluateExpressionResponse" $ \o -> EvaluateExpressionResponse+ <$> o .: "evaluatedExpression"
+ gen/Network/AWS/DataPipeline/GetPipelineDefinition.hs view
@@ -0,0 +1,132 @@+{-# 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.DataPipeline.GetPipelineDefinition+-- 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 definition of the specified pipeline. You can call+-- GetPipelineDefinition to retrieve the pipeline definition you provided+-- using PutPipelineDefinition.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_GetPipelineDefinition.html>+module Network.AWS.DataPipeline.GetPipelineDefinition+ (+ -- * Request+ GetPipelineDefinition+ -- ** Request constructor+ , getPipelineDefinition+ -- ** Request lenses+ , gpdPipelineId+ , gpdVersion++ -- * Response+ , GetPipelineDefinitionResponse+ -- ** Response constructor+ , getPipelineDefinitionResponse+ -- ** Response lenses+ , gpdrPipelineObjects+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data GetPipelineDefinition = GetPipelineDefinition+ { _gpdPipelineId :: Text+ , _gpdVersion :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'GetPipelineDefinition' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gpdPipelineId' @::@ 'Text'+--+-- * 'gpdVersion' @::@ 'Maybe' 'Text'+--+getPipelineDefinition :: Text -- ^ 'gpdPipelineId'+ -> GetPipelineDefinition+getPipelineDefinition p1 = GetPipelineDefinition+ { _gpdPipelineId = p1+ , _gpdVersion = Nothing+ }++-- | The identifier of the pipeline.+gpdPipelineId :: Lens' GetPipelineDefinition Text+gpdPipelineId = lens _gpdPipelineId (\s a -> s { _gpdPipelineId = a })++-- | The version of the pipeline definition to retrieve. This parameter+-- accepts the values latest (default) and active. Where latest indicates+-- the last definition saved to the pipeline and active indicates the last+-- definition of the pipeline that was activated.+gpdVersion :: Lens' GetPipelineDefinition (Maybe Text)+gpdVersion = lens _gpdVersion (\s a -> s { _gpdVersion = a })++newtype GetPipelineDefinitionResponse = GetPipelineDefinitionResponse+ { _gpdrPipelineObjects :: List "pipelineObjects" PipelineObject+ } deriving (Eq, Show, Monoid, Semigroup)++instance GHC.Exts.IsList GetPipelineDefinitionResponse where+ type Item GetPipelineDefinitionResponse = PipelineObject++ fromList = GetPipelineDefinitionResponse . GHC.Exts.fromList+ toList = GHC.Exts.toList . _gpdrPipelineObjects++-- | 'GetPipelineDefinitionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gpdrPipelineObjects' @::@ ['PipelineObject']+--+getPipelineDefinitionResponse :: GetPipelineDefinitionResponse+getPipelineDefinitionResponse = GetPipelineDefinitionResponse+ { _gpdrPipelineObjects = mempty+ }++-- | An array of objects defined in the pipeline.+gpdrPipelineObjects :: Lens' GetPipelineDefinitionResponse [PipelineObject]+gpdrPipelineObjects =+ lens _gpdrPipelineObjects (\s a -> s { _gpdrPipelineObjects = a })+ . _List++instance ToPath GetPipelineDefinition where+ toPath = const "/"++instance ToQuery GetPipelineDefinition where+ toQuery = const mempty++instance ToHeaders GetPipelineDefinition++instance ToJSON GetPipelineDefinition where+ toJSON GetPipelineDefinition{..} = object+ [ "pipelineId" .= _gpdPipelineId+ , "version" .= _gpdVersion+ ]++instance AWSRequest GetPipelineDefinition where+ type Sv GetPipelineDefinition = DataPipeline+ type Rs GetPipelineDefinition = GetPipelineDefinitionResponse++ request = post "GetPipelineDefinition"+ response = jsonResponse++instance FromJSON GetPipelineDefinitionResponse where+ parseJSON = withObject "GetPipelineDefinitionResponse" $ \o -> GetPipelineDefinitionResponse+ <$> o .: "pipelineObjects"
+ gen/Network/AWS/DataPipeline/ListPipelines.hs view
@@ -0,0 +1,147 @@+{-# 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.DataPipeline.ListPipelines+-- 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 pipeline identifiers for all active pipelines.+-- Identifiers are returned only for pipelines you have permission to access.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_ListPipelines.html>+module Network.AWS.DataPipeline.ListPipelines+ (+ -- * Request+ ListPipelines+ -- ** Request constructor+ , listPipelines+ -- ** Request lenses+ , lpMarker++ -- * Response+ , ListPipelinesResponse+ -- ** Response constructor+ , listPipelinesResponse+ -- ** Response lenses+ , lprHasMoreResults+ , lprMarker+ , lprPipelineIdList+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++newtype ListPipelines = ListPipelines+ { _lpMarker :: Maybe Text+ } deriving (Eq, Ord, Show, Monoid)++-- | 'ListPipelines' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lpMarker' @::@ 'Maybe' 'Text'+--+listPipelines :: ListPipelines+listPipelines = ListPipelines+ { _lpMarker = Nothing+ }++-- | The starting point for the results to be returned. The first time you+-- call ListPipelines, this value should be empty. As long as the action+-- returns HasMoreResults as True, you can call ListPipelines again and pass+-- the marker value from the response to retrieve the next set of results.+lpMarker :: Lens' ListPipelines (Maybe Text)+lpMarker = lens _lpMarker (\s a -> s { _lpMarker = a })++data ListPipelinesResponse = ListPipelinesResponse+ { _lprHasMoreResults :: Maybe Bool+ , _lprMarker :: Maybe Text+ , _lprPipelineIdList :: List "pipelineIdList" PipelineIdName+ } deriving (Eq, Show)++-- | 'ListPipelinesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lprHasMoreResults' @::@ 'Maybe' 'Bool'+--+-- * 'lprMarker' @::@ 'Maybe' 'Text'+--+-- * 'lprPipelineIdList' @::@ ['PipelineIdName']+--+listPipelinesResponse :: ListPipelinesResponse+listPipelinesResponse = ListPipelinesResponse+ { _lprPipelineIdList = mempty+ , _lprMarker = Nothing+ , _lprHasMoreResults = Nothing+ }++-- | If True, there are more results that can be obtained by a subsequent call+-- to ListPipelines.+lprHasMoreResults :: Lens' ListPipelinesResponse (Maybe Bool)+lprHasMoreResults =+ lens _lprHasMoreResults (\s a -> s { _lprHasMoreResults = a })++-- | If not null, indicates the starting point for the set of pipeline+-- identifiers that the next call to ListPipelines will retrieve. If null,+-- there are no more pipeline identifiers.+lprMarker :: Lens' ListPipelinesResponse (Maybe Text)+lprMarker = lens _lprMarker (\s a -> s { _lprMarker = a })++-- | A list of all the pipeline identifiers that your account has permission+-- to access. If you require additional information about the pipelines, you+-- can use these identifiers to call DescribePipelines and+-- GetPipelineDefinition.+lprPipelineIdList :: Lens' ListPipelinesResponse [PipelineIdName]+lprPipelineIdList =+ lens _lprPipelineIdList (\s a -> s { _lprPipelineIdList = a })+ . _List++instance ToPath ListPipelines where+ toPath = const "/"++instance ToQuery ListPipelines where+ toQuery = const mempty++instance ToHeaders ListPipelines++instance ToJSON ListPipelines where+ toJSON ListPipelines{..} = object+ [ "marker" .= _lpMarker+ ]++instance AWSRequest ListPipelines where+ type Sv ListPipelines = DataPipeline+ type Rs ListPipelines = ListPipelinesResponse++ request = post "ListPipelines"+ response = jsonResponse++instance FromJSON ListPipelinesResponse where+ parseJSON = withObject "ListPipelinesResponse" $ \o -> ListPipelinesResponse+ <$> o .:? "hasMoreResults"+ <*> o .:? "marker"+ <*> o .: "pipelineIdList"++instance AWSPager ListPipelines where+ page rq rs+ | stop (rs ^. lprHasMoreResults) = Nothing+ | otherwise = Just $ rq+ & lpMarker .~ rs ^. lprMarker
+ gen/Network/AWS/DataPipeline/PollForTask.hs view
@@ -0,0 +1,158 @@+{-# 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.DataPipeline.PollForTask+-- 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)++-- | Task runners call this action to receive a task to perform from AWS Data+-- Pipeline. The task runner specifies which tasks it can perform by setting a+-- value for the workerGroup parameter of the PollForTask call. The task+-- returned by PollForTask may come from any of the pipelines that match the+-- workerGroup value passed in by the task runner and that was launched using+-- the IAM user credentials specified by the task runner. If tasks are ready+-- in the work queue, PollForTask returns a response immediately. If no tasks+-- are available in the queue, PollForTask uses long-polling and holds on to a+-- poll connection for up to a 90 seconds during which time the first newly+-- scheduled task is handed to the task runner. To accomodate this, set the+-- socket timeout in your task runner to 90 seconds. The task runner should+-- not call PollForTask again on the same workerGroup until it receives a+-- response, and this may take up to 90 seconds.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_PollForTask.html>+module Network.AWS.DataPipeline.PollForTask+ (+ -- * Request+ PollForTask+ -- ** Request constructor+ , pollForTask+ -- ** Request lenses+ , pftHostname+ , pftInstanceIdentity+ , pftWorkerGroup++ -- * Response+ , PollForTaskResponse+ -- ** Response constructor+ , pollForTaskResponse+ -- ** Response lenses+ , pftrTaskObject+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data PollForTask = PollForTask+ { _pftHostname :: Maybe Text+ , _pftInstanceIdentity :: Maybe InstanceIdentity+ , _pftWorkerGroup :: Text+ } deriving (Eq, Show)++-- | 'PollForTask' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pftHostname' @::@ 'Maybe' 'Text'+--+-- * 'pftInstanceIdentity' @::@ 'Maybe' 'InstanceIdentity'+--+-- * 'pftWorkerGroup' @::@ 'Text'+--+pollForTask :: Text -- ^ 'pftWorkerGroup'+ -> PollForTask+pollForTask p1 = PollForTask+ { _pftWorkerGroup = p1+ , _pftHostname = Nothing+ , _pftInstanceIdentity = Nothing+ }++-- | The public DNS name of the calling task runner.+pftHostname :: Lens' PollForTask (Maybe Text)+pftHostname = lens _pftHostname (\s a -> s { _pftHostname = a })++-- | Identity information for the Amazon EC2 instance that is hosting the task+-- runner. You can get this value by calling the URI,+-- http://169.254.169.254/latest/meta-data/instance-id, from the EC2+-- instance. For more information, go to Instance Metadata in the Amazon+-- Elastic Compute Cloud User Guide. Passing in this value proves that your+-- task runner is running on an EC2 instance, and ensures the proper AWS+-- Data Pipeline service charges are applied to your pipeline.+pftInstanceIdentity :: Lens' PollForTask (Maybe InstanceIdentity)+pftInstanceIdentity =+ lens _pftInstanceIdentity (\s a -> s { _pftInstanceIdentity = a })++-- | Indicates the type of task the task runner is configured to accept and+-- process. The worker group is set as a field on objects in the pipeline+-- when they are created. You can only specify a single value for+-- workerGroup in the call to PollForTask. There are no wildcard values+-- permitted in workerGroup, the string must be an exact, case-sensitive,+-- match.+pftWorkerGroup :: Lens' PollForTask Text+pftWorkerGroup = lens _pftWorkerGroup (\s a -> s { _pftWorkerGroup = a })++newtype PollForTaskResponse = PollForTaskResponse+ { _pftrTaskObject :: Maybe TaskObject+ } deriving (Eq, Show)++-- | 'PollForTaskResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pftrTaskObject' @::@ 'Maybe' 'TaskObject'+--+pollForTaskResponse :: PollForTaskResponse+pollForTaskResponse = PollForTaskResponse+ { _pftrTaskObject = Nothing+ }++-- | An instance of PollForTaskResult, which contains an instance of+-- TaskObject. The returned object contains all the information needed to+-- complete the task that is being assigned to the task runner. One of the+-- fields returned in this object is taskId, which contains an identifier+-- for the task being assigned. The calling task runner uses taskId in+-- subsequent calls to ReportTaskProgress and SetTaskStatus.+pftrTaskObject :: Lens' PollForTaskResponse (Maybe TaskObject)+pftrTaskObject = lens _pftrTaskObject (\s a -> s { _pftrTaskObject = a })++instance ToPath PollForTask where+ toPath = const "/"++instance ToQuery PollForTask where+ toQuery = const mempty++instance ToHeaders PollForTask++instance ToJSON PollForTask where+ toJSON PollForTask{..} = object+ [ "workerGroup" .= _pftWorkerGroup+ , "hostname" .= _pftHostname+ , "instanceIdentity" .= _pftInstanceIdentity+ ]++instance AWSRequest PollForTask where+ type Sv PollForTask = DataPipeline+ type Rs PollForTask = PollForTaskResponse++ request = post "PollForTask"+ response = jsonResponse++instance FromJSON PollForTaskResponse where+ parseJSON = withObject "PollForTaskResponse" $ \o -> PollForTaskResponse+ <$> o .:? "taskObject"
+ gen/Network/AWS/DataPipeline/PutPipelineDefinition.hs view
@@ -0,0 +1,159 @@+{-# 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.DataPipeline.PutPipelineDefinition+-- 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)++-- | Adds tasks, schedules, and preconditions that control the behavior of the+-- pipeline. You can use PutPipelineDefinition to populate a new pipeline.+-- PutPipelineDefinition also validates the configuration as it adds it to the+-- pipeline. Changes to the pipeline are saved unless one of the following+-- three validation errors exists in the pipeline. An object is missing a name+-- or identifier field. A string or reference field is empty. The number of+-- objects in the pipeline exceeds the maximum allowed objects. Pipeline+-- object definitions are passed to the PutPipelineDefinition action and+-- returned by the GetPipelineDefinition action.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_PutPipelineDefinition.html>+module Network.AWS.DataPipeline.PutPipelineDefinition+ (+ -- * Request+ PutPipelineDefinition+ -- ** Request constructor+ , putPipelineDefinition+ -- ** Request lenses+ , ppdPipelineId+ , ppdPipelineObjects++ -- * Response+ , PutPipelineDefinitionResponse+ -- ** Response constructor+ , putPipelineDefinitionResponse+ -- ** Response lenses+ , ppdrErrored+ , ppdrValidationErrors+ , ppdrValidationWarnings+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data PutPipelineDefinition = PutPipelineDefinition+ { _ppdPipelineId :: Text+ , _ppdPipelineObjects :: List "pipelineObjects" PipelineObject+ } deriving (Eq, Show)++-- | 'PutPipelineDefinition' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ppdPipelineId' @::@ 'Text'+--+-- * 'ppdPipelineObjects' @::@ ['PipelineObject']+--+putPipelineDefinition :: Text -- ^ 'ppdPipelineId'+ -> PutPipelineDefinition+putPipelineDefinition p1 = PutPipelineDefinition+ { _ppdPipelineId = p1+ , _ppdPipelineObjects = mempty+ }++-- | The identifier of the pipeline to be configured.+ppdPipelineId :: Lens' PutPipelineDefinition Text+ppdPipelineId = lens _ppdPipelineId (\s a -> s { _ppdPipelineId = a })++-- | The objects that define the pipeline. These will overwrite the existing+-- pipeline definition.+ppdPipelineObjects :: Lens' PutPipelineDefinition [PipelineObject]+ppdPipelineObjects =+ lens _ppdPipelineObjects (\s a -> s { _ppdPipelineObjects = a })+ . _List++data PutPipelineDefinitionResponse = PutPipelineDefinitionResponse+ { _ppdrErrored :: Bool+ , _ppdrValidationErrors :: List "validationErrors" ValidationError+ , _ppdrValidationWarnings :: List "validationWarnings" ValidationWarning+ } deriving (Eq, Show)++-- | 'PutPipelineDefinitionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ppdrErrored' @::@ 'Bool'+--+-- * 'ppdrValidationErrors' @::@ ['ValidationError']+--+-- * 'ppdrValidationWarnings' @::@ ['ValidationWarning']+--+putPipelineDefinitionResponse :: Bool -- ^ 'ppdrErrored'+ -> PutPipelineDefinitionResponse+putPipelineDefinitionResponse p1 = PutPipelineDefinitionResponse+ { _ppdrErrored = p1+ , _ppdrValidationErrors = mempty+ , _ppdrValidationWarnings = mempty+ }++-- | If True, there were validation errors. If errored is True, the pipeline+-- definition is stored but cannot be activated until you correct the+-- pipeline and call PutPipelineDefinition to commit the corrected pipeline.+ppdrErrored :: Lens' PutPipelineDefinitionResponse Bool+ppdrErrored = lens _ppdrErrored (\s a -> s { _ppdrErrored = a })++-- | A list of the validation errors that are associated with the objects+-- defined in pipelineObjects.+ppdrValidationErrors :: Lens' PutPipelineDefinitionResponse [ValidationError]+ppdrValidationErrors =+ lens _ppdrValidationErrors (\s a -> s { _ppdrValidationErrors = a })+ . _List++-- | A list of the validation warnings that are associated with the objects+-- defined in pipelineObjects.+ppdrValidationWarnings :: Lens' PutPipelineDefinitionResponse [ValidationWarning]+ppdrValidationWarnings =+ lens _ppdrValidationWarnings (\s a -> s { _ppdrValidationWarnings = a })+ . _List++instance ToPath PutPipelineDefinition where+ toPath = const "/"++instance ToQuery PutPipelineDefinition where+ toQuery = const mempty++instance ToHeaders PutPipelineDefinition++instance ToJSON PutPipelineDefinition where+ toJSON PutPipelineDefinition{..} = object+ [ "pipelineId" .= _ppdPipelineId+ , "pipelineObjects" .= _ppdPipelineObjects+ ]++instance AWSRequest PutPipelineDefinition where+ type Sv PutPipelineDefinition = DataPipeline+ type Rs PutPipelineDefinition = PutPipelineDefinitionResponse++ request = post "PutPipelineDefinition"+ response = jsonResponse++instance FromJSON PutPipelineDefinitionResponse where+ parseJSON = withObject "PutPipelineDefinitionResponse" $ \o -> PutPipelineDefinitionResponse+ <$> o .: "errored"+ <*> o .: "validationErrors"+ <*> o .: "validationWarnings"
+ gen/Network/AWS/DataPipeline/QueryObjects.hs view
@@ -0,0 +1,193 @@+{-# 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.DataPipeline.QueryObjects+-- 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)++-- | Queries a pipeline for the names of objects that match a specified set of+-- conditions. The objects returned by QueryObjects are paginated and then+-- filtered by the value you set for query. This means the action may return+-- an empty result set with a value set for marker. If HasMoreResults is set+-- to True, you should continue to call QueryObjects, passing in the returned+-- value for marker, until HasMoreResults returns False.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_QueryObjects.html>+module Network.AWS.DataPipeline.QueryObjects+ (+ -- * Request+ QueryObjects+ -- ** Request constructor+ , queryObjects+ -- ** Request lenses+ , qoLimit+ , qoMarker+ , qoPipelineId+ , qoQuery+ , qoSphere++ -- * Response+ , QueryObjectsResponse+ -- ** Response constructor+ , queryObjectsResponse+ -- ** Response lenses+ , qorHasMoreResults+ , qorIds+ , qorMarker+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data QueryObjects = QueryObjects+ { _qoLimit :: Maybe Int+ , _qoMarker :: Maybe Text+ , _qoPipelineId :: Text+ , _qoQuery :: Maybe Query+ , _qoSphere :: Text+ } deriving (Eq, Show)++-- | 'QueryObjects' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'qoLimit' @::@ 'Maybe' 'Int'+--+-- * 'qoMarker' @::@ 'Maybe' 'Text'+--+-- * 'qoPipelineId' @::@ 'Text'+--+-- * 'qoQuery' @::@ 'Maybe' 'Query'+--+-- * 'qoSphere' @::@ 'Text'+--+queryObjects :: Text -- ^ 'qoPipelineId'+ -> Text -- ^ 'qoSphere'+ -> QueryObjects+queryObjects p1 p2 = QueryObjects+ { _qoPipelineId = p1+ , _qoSphere = p2+ , _qoQuery = Nothing+ , _qoMarker = Nothing+ , _qoLimit = Nothing+ }++-- | Specifies the maximum number of object names that QueryObjects will+-- return in a single call. The default value is 100.+qoLimit :: Lens' QueryObjects (Maybe Int)+qoLimit = lens _qoLimit (\s a -> s { _qoLimit = a })++-- | The starting point for the results to be returned. The first time you+-- call QueryObjects, this value should be empty. As long as the action+-- returns HasMoreResults as True, you can call QueryObjects again and pass+-- the marker value from the response to retrieve the next set of results.+qoMarker :: Lens' QueryObjects (Maybe Text)+qoMarker = lens _qoMarker (\s a -> s { _qoMarker = a })++-- | Identifier of the pipeline to be queried for object names.+qoPipelineId :: Lens' QueryObjects Text+qoPipelineId = lens _qoPipelineId (\s a -> s { _qoPipelineId = a })++-- | Query that defines the objects to be returned. The Query object can+-- contain a maximum of ten selectors. The conditions in the query are+-- limited to top-level String fields in the object. These filters can be+-- applied to components, instances, and attempts.+qoQuery :: Lens' QueryObjects (Maybe Query)+qoQuery = lens _qoQuery (\s a -> s { _qoQuery = a })++-- | Specifies whether the query applies to components or instances. Allowable+-- values: COMPONENT, INSTANCE, ATTEMPT.+qoSphere :: Lens' QueryObjects Text+qoSphere = lens _qoSphere (\s a -> s { _qoSphere = a })++data QueryObjectsResponse = QueryObjectsResponse+ { _qorHasMoreResults :: Maybe Bool+ , _qorIds :: List "pipelineIds" Text+ , _qorMarker :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'QueryObjectsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'qorHasMoreResults' @::@ 'Maybe' 'Bool'+--+-- * 'qorIds' @::@ ['Text']+--+-- * 'qorMarker' @::@ 'Maybe' 'Text'+--+queryObjectsResponse :: QueryObjectsResponse+queryObjectsResponse = QueryObjectsResponse+ { _qorIds = mempty+ , _qorMarker = Nothing+ , _qorHasMoreResults = Nothing+ }++-- | If True, there are more results that can be obtained by a subsequent call+-- to QueryObjects.+qorHasMoreResults :: Lens' QueryObjectsResponse (Maybe Bool)+qorHasMoreResults =+ lens _qorHasMoreResults (\s a -> s { _qorHasMoreResults = a })++-- | A list of identifiers that match the query selectors.+qorIds :: Lens' QueryObjectsResponse [Text]+qorIds = lens _qorIds (\s a -> s { _qorIds = a }) . _List++-- | The starting point for the results to be returned. As long as the action+-- returns HasMoreResults as True, you can call QueryObjects again and pass+-- the marker value from the response to retrieve the next set of results.+qorMarker :: Lens' QueryObjectsResponse (Maybe Text)+qorMarker = lens _qorMarker (\s a -> s { _qorMarker = a })++instance ToPath QueryObjects where+ toPath = const "/"++instance ToQuery QueryObjects where+ toQuery = const mempty++instance ToHeaders QueryObjects++instance ToJSON QueryObjects where+ toJSON QueryObjects{..} = object+ [ "pipelineId" .= _qoPipelineId+ , "query" .= _qoQuery+ , "sphere" .= _qoSphere+ , "marker" .= _qoMarker+ , "limit" .= _qoLimit+ ]++instance AWSRequest QueryObjects where+ type Sv QueryObjects = DataPipeline+ type Rs QueryObjects = QueryObjectsResponse++ request = post "QueryObjects"+ response = jsonResponse++instance FromJSON QueryObjectsResponse where+ parseJSON = withObject "QueryObjectsResponse" $ \o -> QueryObjectsResponse+ <$> o .:? "hasMoreResults"+ <*> o .: "ids"+ <*> o .:? "marker"++instance AWSPager QueryObjects where+ page rq rs+ | stop (rs ^. qorHasMoreResults) = Nothing+ | otherwise = Just $ rq+ & qoMarker .~ rs ^. qorMarker
+ gen/Network/AWS/DataPipeline/ReportTaskProgress.hs view
@@ -0,0 +1,124 @@+{-# 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.DataPipeline.ReportTaskProgress+-- 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 AWS Data Pipeline service on the progress of the calling task+-- runner. When the task runner is assigned a task, it should call+-- ReportTaskProgress to acknowledge that it has the task within 2 minutes. If+-- the web service does not recieve this acknowledgement within the 2 minute+-- window, it will assign the task in a subsequent PollForTask call. After+-- this initial acknowledgement, the task runner only needs to report progress+-- every 15 minutes to maintain its ownership of the task. You can change this+-- reporting time from 15 minutes by specifying a reportProgressTimeout field+-- in your pipeline. If a task runner does not report its status after 5+-- minutes, AWS Data Pipeline will assume that the task runner is unable to+-- process the task and will reassign the task in a subsequent response to+-- PollForTask. task runners should call ReportTaskProgress every 60 seconds.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_ReportTaskProgress.html>+module Network.AWS.DataPipeline.ReportTaskProgress+ (+ -- * Request+ ReportTaskProgress+ -- ** Request constructor+ , reportTaskProgress+ -- ** Request lenses+ , rtpTaskId++ -- * Response+ , ReportTaskProgressResponse+ -- ** Response constructor+ , reportTaskProgressResponse+ -- ** Response lenses+ , rtprCanceled+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++newtype ReportTaskProgress = ReportTaskProgress+ { _rtpTaskId :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'ReportTaskProgress' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rtpTaskId' @::@ 'Text'+--+reportTaskProgress :: Text -- ^ 'rtpTaskId'+ -> ReportTaskProgress+reportTaskProgress p1 = ReportTaskProgress+ { _rtpTaskId = p1+ }++-- | Identifier of the task assigned to the task runner. This value is+-- provided in the TaskObject that the service returns with the response for+-- the PollForTask action.+rtpTaskId :: Lens' ReportTaskProgress Text+rtpTaskId = lens _rtpTaskId (\s a -> s { _rtpTaskId = a })++newtype ReportTaskProgressResponse = ReportTaskProgressResponse+ { _rtprCanceled :: Bool+ } deriving (Eq, Ord, Show, Enum)++-- | 'ReportTaskProgressResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rtprCanceled' @::@ 'Bool'+--+reportTaskProgressResponse :: Bool -- ^ 'rtprCanceled'+ -> ReportTaskProgressResponse+reportTaskProgressResponse p1 = ReportTaskProgressResponse+ { _rtprCanceled = p1+ }++-- | If True, the calling task runner should cancel processing of the task.+-- The task runner does not need to call SetTaskStatus for canceled tasks.+rtprCanceled :: Lens' ReportTaskProgressResponse Bool+rtprCanceled = lens _rtprCanceled (\s a -> s { _rtprCanceled = a })++instance ToPath ReportTaskProgress where+ toPath = const "/"++instance ToQuery ReportTaskProgress where+ toQuery = const mempty++instance ToHeaders ReportTaskProgress++instance ToJSON ReportTaskProgress where+ toJSON ReportTaskProgress{..} = object+ [ "taskId" .= _rtpTaskId+ ]++instance AWSRequest ReportTaskProgress where+ type Sv ReportTaskProgress = DataPipeline+ type Rs ReportTaskProgress = ReportTaskProgressResponse++ request = post "ReportTaskProgress"+ response = jsonResponse++instance FromJSON ReportTaskProgressResponse where+ parseJSON = withObject "ReportTaskProgressResponse" $ \o -> ReportTaskProgressResponse+ <$> o .: "canceled"
+ gen/Network/AWS/DataPipeline/ReportTaskRunnerHeartbeat.hs view
@@ -0,0 +1,145 @@+{-# 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.DataPipeline.ReportTaskRunnerHeartbeat+-- 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)++-- | Task runners call ReportTaskRunnerHeartbeat every 15 minutes to indicate+-- that they are operational. In the case of AWS Data Pipeline Task Runner+-- launched on a resource managed by AWS Data Pipeline, the web service can+-- use this call to detect when the task runner application has failed and+-- restart a new instance.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_ReportTaskRunnerHeartbeat.html>+module Network.AWS.DataPipeline.ReportTaskRunnerHeartbeat+ (+ -- * Request+ ReportTaskRunnerHeartbeat+ -- ** Request constructor+ , reportTaskRunnerHeartbeat+ -- ** Request lenses+ , rtrhHostname+ , rtrhTaskrunnerId+ , rtrhWorkerGroup++ -- * Response+ , ReportTaskRunnerHeartbeatResponse+ -- ** Response constructor+ , reportTaskRunnerHeartbeatResponse+ -- ** Response lenses+ , rtrhrTerminate+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data ReportTaskRunnerHeartbeat = ReportTaskRunnerHeartbeat+ { _rtrhHostname :: Maybe Text+ , _rtrhTaskrunnerId :: Text+ , _rtrhWorkerGroup :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'ReportTaskRunnerHeartbeat' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rtrhHostname' @::@ 'Maybe' 'Text'+--+-- * 'rtrhTaskrunnerId' @::@ 'Text'+--+-- * 'rtrhWorkerGroup' @::@ 'Maybe' 'Text'+--+reportTaskRunnerHeartbeat :: Text -- ^ 'rtrhTaskrunnerId'+ -> ReportTaskRunnerHeartbeat+reportTaskRunnerHeartbeat p1 = ReportTaskRunnerHeartbeat+ { _rtrhTaskrunnerId = p1+ , _rtrhWorkerGroup = Nothing+ , _rtrhHostname = Nothing+ }++-- | The public DNS name of the calling task runner.+rtrhHostname :: Lens' ReportTaskRunnerHeartbeat (Maybe Text)+rtrhHostname = lens _rtrhHostname (\s a -> s { _rtrhHostname = a })++-- | The identifier of the task runner. This value should be unique across+-- your AWS account. In the case of AWS Data Pipeline Task Runner launched+-- on a resource managed by AWS Data Pipeline, the web service provides a+-- unique identifier when it launches the application. If you have written a+-- custom task runner, you should assign a unique identifier for the task+-- runner.+rtrhTaskrunnerId :: Lens' ReportTaskRunnerHeartbeat Text+rtrhTaskrunnerId = lens _rtrhTaskrunnerId (\s a -> s { _rtrhTaskrunnerId = a })++-- | Indicates the type of task the task runner is configured to accept and+-- process. The worker group is set as a field on objects in the pipeline+-- when they are created. You can only specify a single value for+-- workerGroup in the call to ReportTaskRunnerHeartbeat. There are no+-- wildcard values permitted in workerGroup, the string must be an exact,+-- case-sensitive, match.+rtrhWorkerGroup :: Lens' ReportTaskRunnerHeartbeat (Maybe Text)+rtrhWorkerGroup = lens _rtrhWorkerGroup (\s a -> s { _rtrhWorkerGroup = a })++newtype ReportTaskRunnerHeartbeatResponse = ReportTaskRunnerHeartbeatResponse+ { _rtrhrTerminate :: Bool+ } deriving (Eq, Ord, Show, Enum)++-- | 'ReportTaskRunnerHeartbeatResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rtrhrTerminate' @::@ 'Bool'+--+reportTaskRunnerHeartbeatResponse :: Bool -- ^ 'rtrhrTerminate'+ -> ReportTaskRunnerHeartbeatResponse+reportTaskRunnerHeartbeatResponse p1 = ReportTaskRunnerHeartbeatResponse+ { _rtrhrTerminate = p1+ }++-- | Indicates whether the calling task runner should terminate. If True, the+-- task runner that called ReportTaskRunnerHeartbeat should terminate.+rtrhrTerminate :: Lens' ReportTaskRunnerHeartbeatResponse Bool+rtrhrTerminate = lens _rtrhrTerminate (\s a -> s { _rtrhrTerminate = a })++instance ToPath ReportTaskRunnerHeartbeat where+ toPath = const "/"++instance ToQuery ReportTaskRunnerHeartbeat where+ toQuery = const mempty++instance ToHeaders ReportTaskRunnerHeartbeat++instance ToJSON ReportTaskRunnerHeartbeat where+ toJSON ReportTaskRunnerHeartbeat{..} = object+ [ "taskrunnerId" .= _rtrhTaskrunnerId+ , "workerGroup" .= _rtrhWorkerGroup+ , "hostname" .= _rtrhHostname+ ]++instance AWSRequest ReportTaskRunnerHeartbeat where+ type Sv ReportTaskRunnerHeartbeat = DataPipeline+ type Rs ReportTaskRunnerHeartbeat = ReportTaskRunnerHeartbeatResponse++ request = post "ReportTaskRunnerHeartbeat"+ response = jsonResponse++instance FromJSON ReportTaskRunnerHeartbeatResponse where+ parseJSON = withObject "ReportTaskRunnerHeartbeatResponse" $ \o -> ReportTaskRunnerHeartbeatResponse+ <$> o .: "terminate"
+ gen/Network/AWS/DataPipeline/SetStatus.hs view
@@ -0,0 +1,118 @@+{-# 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.DataPipeline.SetStatus+-- 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)++-- | Requests that the status of an array of physical or logical pipeline+-- objects be updated in the pipeline. This update may not occur immediately,+-- but is eventually consistent. The status that can be set depends on the+-- type of object.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_SetStatus.html>+module Network.AWS.DataPipeline.SetStatus+ (+ -- * Request+ SetStatus+ -- ** Request constructor+ , setStatus+ -- ** Request lenses+ , ssObjectIds+ , ssPipelineId+ , ssStatus++ -- * Response+ , SetStatusResponse+ -- ** Response constructor+ , setStatusResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data SetStatus = SetStatus+ { _ssObjectIds :: List "pipelineIds" Text+ , _ssPipelineId :: Text+ , _ssStatus :: Text+ } deriving (Eq, Ord, Show)++-- | 'SetStatus' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ssObjectIds' @::@ ['Text']+--+-- * 'ssPipelineId' @::@ 'Text'+--+-- * 'ssStatus' @::@ 'Text'+--+setStatus :: Text -- ^ 'ssPipelineId'+ -> Text -- ^ 'ssStatus'+ -> SetStatus+setStatus p1 p2 = SetStatus+ { _ssPipelineId = p1+ , _ssStatus = p2+ , _ssObjectIds = mempty+ }++-- | Identifies an array of objects. The corresponding objects can be either+-- physical or components, but not a mix of both types.+ssObjectIds :: Lens' SetStatus [Text]+ssObjectIds = lens _ssObjectIds (\s a -> s { _ssObjectIds = a }) . _List++-- | Identifies the pipeline that contains the objects.+ssPipelineId :: Lens' SetStatus Text+ssPipelineId = lens _ssPipelineId (\s a -> s { _ssPipelineId = a })++-- | Specifies the status to be set on all the objects in objectIds. For+-- components, this can be either PAUSE or RESUME. For instances, this can+-- be either CANCEL, RERUN, or MARK_FINISHED.+ssStatus :: Lens' SetStatus Text+ssStatus = lens _ssStatus (\s a -> s { _ssStatus = a })++data SetStatusResponse = SetStatusResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'SetStatusResponse' constructor.+setStatusResponse :: SetStatusResponse+setStatusResponse = SetStatusResponse++instance ToPath SetStatus where+ toPath = const "/"++instance ToQuery SetStatus where+ toQuery = const mempty++instance ToHeaders SetStatus++instance ToJSON SetStatus where+ toJSON SetStatus{..} = object+ [ "pipelineId" .= _ssPipelineId+ , "objectIds" .= _ssObjectIds+ , "status" .= _ssStatus+ ]++instance AWSRequest SetStatus where+ type Sv SetStatus = DataPipeline+ type Rs SetStatus = SetStatusResponse++ request = post "SetStatus"+ response = nullResponse SetStatusResponse
+ gen/Network/AWS/DataPipeline/SetTaskStatus.hs view
@@ -0,0 +1,148 @@+{-# 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.DataPipeline.SetTaskStatus+-- 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)++-- | Notifies AWS Data Pipeline that a task is completed and provides+-- information about the final status. The task runner calls this action+-- regardless of whether the task was sucessful. The task runner does not need+-- to call SetTaskStatus for tasks that are canceled by the web service during+-- a call to ReportTaskProgress.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_SetTaskStatus.html>+module Network.AWS.DataPipeline.SetTaskStatus+ (+ -- * Request+ SetTaskStatus+ -- ** Request constructor+ , setTaskStatus+ -- ** Request lenses+ , stsErrorId+ , stsErrorMessage+ , stsErrorStackTrace+ , stsTaskId+ , stsTaskStatus++ -- * Response+ , SetTaskStatusResponse+ -- ** Response constructor+ , setTaskStatusResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data SetTaskStatus = SetTaskStatus+ { _stsErrorId :: Maybe Text+ , _stsErrorMessage :: Maybe Text+ , _stsErrorStackTrace :: Maybe Text+ , _stsTaskId :: Text+ , _stsTaskStatus :: Text+ } deriving (Eq, Ord, Show)++-- | 'SetTaskStatus' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'stsErrorId' @::@ 'Maybe' 'Text'+--+-- * 'stsErrorMessage' @::@ 'Maybe' 'Text'+--+-- * 'stsErrorStackTrace' @::@ 'Maybe' 'Text'+--+-- * 'stsTaskId' @::@ 'Text'+--+-- * 'stsTaskStatus' @::@ 'Text'+--+setTaskStatus :: Text -- ^ 'stsTaskId'+ -> Text -- ^ 'stsTaskStatus'+ -> SetTaskStatus+setTaskStatus p1 p2 = SetTaskStatus+ { _stsTaskId = p1+ , _stsTaskStatus = p2+ , _stsErrorId = Nothing+ , _stsErrorMessage = Nothing+ , _stsErrorStackTrace = Nothing+ }++-- | If an error occurred during the task, this value specifies an id value+-- that represents the error. This value is set on the physical attempt+-- object. It is used to display error information to the user. It should+-- not start with string "Service_" which is reserved by the system.+stsErrorId :: Lens' SetTaskStatus (Maybe Text)+stsErrorId = lens _stsErrorId (\s a -> s { _stsErrorId = a })++-- | If an error occurred during the task, this value specifies a text+-- description of the error. This value is set on the physical attempt+-- object. It is used to display error information to the user. The web+-- service does not parse this value.+stsErrorMessage :: Lens' SetTaskStatus (Maybe Text)+stsErrorMessage = lens _stsErrorMessage (\s a -> s { _stsErrorMessage = a })++-- | If an error occurred during the task, this value specifies the stack+-- trace associated with the error. This value is set on the physical+-- attempt object. It is used to display error information to the user. The+-- web service does not parse this value.+stsErrorStackTrace :: Lens' SetTaskStatus (Maybe Text)+stsErrorStackTrace =+ lens _stsErrorStackTrace (\s a -> s { _stsErrorStackTrace = a })++-- | Identifies the task assigned to the task runner. This value is set in the+-- TaskObject that is returned by the PollForTask action.+stsTaskId :: Lens' SetTaskStatus Text+stsTaskId = lens _stsTaskId (\s a -> s { _stsTaskId = a })++-- | If FINISHED, the task successfully completed. If FAILED the task ended+-- unsuccessfully. The FALSE value is used by preconditions.+stsTaskStatus :: Lens' SetTaskStatus Text+stsTaskStatus = lens _stsTaskStatus (\s a -> s { _stsTaskStatus = a })++data SetTaskStatusResponse = SetTaskStatusResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'SetTaskStatusResponse' constructor.+setTaskStatusResponse :: SetTaskStatusResponse+setTaskStatusResponse = SetTaskStatusResponse++instance ToPath SetTaskStatus where+ toPath = const "/"++instance ToQuery SetTaskStatus where+ toQuery = const mempty++instance ToHeaders SetTaskStatus++instance ToJSON SetTaskStatus where+ toJSON SetTaskStatus{..} = object+ [ "taskId" .= _stsTaskId+ , "taskStatus" .= _stsTaskStatus+ , "errorId" .= _stsErrorId+ , "errorMessage" .= _stsErrorMessage+ , "errorStackTrace" .= _stsErrorStackTrace+ ]++instance AWSRequest SetTaskStatus where+ type Sv SetTaskStatus = DataPipeline+ type Rs SetTaskStatus = SetTaskStatusResponse++ request = post "SetTaskStatus"+ response = nullResponse SetTaskStatusResponse
+ gen/Network/AWS/DataPipeline/Types.hs view
@@ -0,0 +1,691 @@+{-# 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.DataPipeline.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.DataPipeline.Types+ (+ -- * Service+ DataPipeline+ -- ** Error+ , JSONError++ -- * PipelineObject+ , PipelineObject+ , pipelineObject+ , poFields+ , poId+ , poName++ -- * Field+ , Field+ , field+ , fKey+ , fRefValue+ , fStringValue++ -- * Selector+ , Selector+ , selector+ , sFieldName+ , sOperator++ -- * Operator+ , Operator+ , operator+ , oType+ , oValues++ -- * TaskObject+ , TaskObject+ , taskObject+ , toAttemptId+ , toObjects+ , toPipelineId+ , toTaskId++ -- * ValidationError+ , ValidationError+ , validationError+ , veErrors+ , veId++ -- * PipelineDescription+ , PipelineDescription+ , pipelineDescription+ , pdDescription+ , pdFields+ , pdName+ , pdPipelineId++ -- * InstanceIdentity+ , InstanceIdentity+ , instanceIdentity+ , iiDocument+ , iiSignature++ -- * Query+ , Query+ , query+ , qSelectors++ -- * OperatorType+ , OperatorType (..)++ -- * PipelineIdName+ , PipelineIdName+ , pipelineIdName+ , pinId+ , pinName++ -- * TaskStatus+ , TaskStatus (..)++ -- * ValidationWarning+ , ValidationWarning+ , validationWarning+ , vwId+ , vwWarnings+ ) where++import Data.Char (isUpper)+import Network.AWS.Error+import Network.AWS.Prelude+import Network.AWS.Signing.V4+import qualified GHC.Exts++-- | Version @2012-10-29@ of the Amazon Data Pipeline service.+data DataPipeline++instance AWSService DataPipeline where+ type Sg DataPipeline = V4+ type Er DataPipeline = JSONError++ service = Service+ { _svcEndpoint = regional+ , _svcAbbrev = "DataPipeline"+ , _svcPrefix = "datapipeline"+ , _svcVersion = "2012-10-29"+ , _svcTargetPrefix = Just "DataPipeline"+ , _svcJSONVersion = Just "1.1"+ }++ handle = jsonError statusSuccess++data PipelineObject = PipelineObject+ { _poFields :: List "fields" Field+ , _poId :: Text+ , _poName :: Text+ } deriving (Eq, Show)++-- | 'PipelineObject' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'poFields' @::@ ['Field']+--+-- * 'poId' @::@ 'Text'+--+-- * 'poName' @::@ 'Text'+--+pipelineObject :: Text -- ^ 'poId'+ -> Text -- ^ 'poName'+ -> PipelineObject+pipelineObject p1 p2 = PipelineObject+ { _poId = p1+ , _poName = p2+ , _poFields = mempty+ }++-- | Key-value pairs that define the properties of the object.+poFields :: Lens' PipelineObject [Field]+poFields = lens _poFields (\s a -> s { _poFields = a }) . _List++-- | Identifier of the object.+poId :: Lens' PipelineObject Text+poId = lens _poId (\s a -> s { _poId = a })++-- | Name of the object.+poName :: Lens' PipelineObject Text+poName = lens _poName (\s a -> s { _poName = a })++instance FromJSON PipelineObject where+ parseJSON = withObject "PipelineObject" $ \o -> PipelineObject+ <$> o .: "fields"+ <*> o .: "id"+ <*> o .: "name"++instance ToJSON PipelineObject where+ toJSON PipelineObject{..} = object+ [ "id" .= _poId+ , "name" .= _poName+ , "fields" .= _poFields+ ]++data Field = Field+ { _fKey :: Text+ , _fRefValue :: Maybe Text+ , _fStringValue :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'Field' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'fKey' @::@ 'Text'+--+-- * 'fRefValue' @::@ 'Maybe' 'Text'+--+-- * 'fStringValue' @::@ 'Maybe' 'Text'+--+field :: Text -- ^ 'fKey'+ -> Field+field p1 = Field+ { _fKey = p1+ , _fStringValue = Nothing+ , _fRefValue = Nothing+ }++-- | The field identifier.+fKey :: Lens' Field Text+fKey = lens _fKey (\s a -> s { _fKey = a })++-- | The field value, expressed as the identifier of another object.+fRefValue :: Lens' Field (Maybe Text)+fRefValue = lens _fRefValue (\s a -> s { _fRefValue = a })++-- | The field value, expressed as a String.+fStringValue :: Lens' Field (Maybe Text)+fStringValue = lens _fStringValue (\s a -> s { _fStringValue = a })++instance FromJSON Field where+ parseJSON = withObject "Field" $ \o -> Field+ <$> o .: "key"+ <*> o .:? "refValue"+ <*> o .:? "stringValue"++instance ToJSON Field where+ toJSON Field{..} = object+ [ "key" .= _fKey+ , "stringValue" .= _fStringValue+ , "refValue" .= _fRefValue+ ]++data Selector = Selector+ { _sFieldName :: Maybe Text+ , _sOperator :: Maybe Operator+ } deriving (Eq, Show)++-- | 'Selector' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sFieldName' @::@ 'Maybe' 'Text'+--+-- * 'sOperator' @::@ 'Maybe' 'Operator'+--+selector :: Selector+selector = Selector+ { _sFieldName = Nothing+ , _sOperator = Nothing+ }++-- | The name of the field that the operator will be applied to. The field+-- name is the "key" portion of the field definition in the pipeline+-- definition syntax that is used by the AWS Data Pipeline API. If the field+-- is not set on the object, the condition fails.+sFieldName :: Lens' Selector (Maybe Text)+sFieldName = lens _sFieldName (\s a -> s { _sFieldName = a })++sOperator :: Lens' Selector (Maybe Operator)+sOperator = lens _sOperator (\s a -> s { _sOperator = a })++instance FromJSON Selector where+ parseJSON = withObject "Selector" $ \o -> Selector+ <$> o .:? "fieldName"+ <*> o .:? "operator"++instance ToJSON Selector where+ toJSON Selector{..} = object+ [ "fieldName" .= _sFieldName+ , "operator" .= _sOperator+ ]++data Operator = Operator+ { _oType :: Maybe Text+ , _oValues :: List "values" Text+ } deriving (Eq, Ord, Show)++-- | 'Operator' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'oType' @::@ 'Maybe' 'Text'+--+-- * 'oValues' @::@ ['Text']+--+operator :: Operator+operator = Operator+ { _oType = Nothing+ , _oValues = mempty+ }++-- | The logical operation to be performed: equal (EQ), equal reference+-- (REF_EQ), less than or equal (LE), greater than or equal (GE), or between+-- (BETWEEN). Equal reference (REF_EQ) can be used only with reference+-- fields. The other comparison types can be used only with String fields.+-- The comparison types you can use apply only to certain object fields, as+-- detailed below. The comparison operators EQ and REF_EQ act on the+-- following fields: name @sphere parent @componentParent @instanceParent+-- @status @scheduledStartTime @scheduledEndTime @actualStartTime+-- @actualEndTime The comparison operators GE, LE, and BETWEEN act on the+-- following fields: @scheduledStartTime @scheduledEndTime @actualStartTime+-- @actualEndTime Note that fields beginning with the at sign (@) are+-- read-only and set by the web service. When you name fields, you should+-- choose names containing only alpha-numeric values, as symbols may be+-- reserved by AWS Data Pipeline. User-defined fields that you add to a+-- pipeline should prefix their name with the string "my".+oType :: Lens' Operator (Maybe Text)+oType = lens _oType (\s a -> s { _oType = a })++-- | The value that the actual field value will be compared with.+oValues :: Lens' Operator [Text]+oValues = lens _oValues (\s a -> s { _oValues = a }) . _List++instance FromJSON Operator where+ parseJSON = withObject "Operator" $ \o -> Operator+ <$> o .:? "type"+ <*> o .: "values"++instance ToJSON Operator where+ toJSON Operator{..} = object+ [ "type" .= _oType+ , "values" .= _oValues+ ]++data TaskObject = TaskObject+ { _toAttemptId :: Maybe Text+ , _toObjects :: Map Text PipelineObject+ , _toPipelineId :: Maybe Text+ , _toTaskId :: Maybe Text+ } deriving (Eq, Show)++-- | 'TaskObject' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'toAttemptId' @::@ 'Maybe' 'Text'+--+-- * 'toObjects' @::@ 'HashMap' 'Text' 'PipelineObject'+--+-- * 'toPipelineId' @::@ 'Maybe' 'Text'+--+-- * 'toTaskId' @::@ 'Maybe' 'Text'+--+taskObject :: TaskObject+taskObject = TaskObject+ { _toTaskId = Nothing+ , _toPipelineId = Nothing+ , _toAttemptId = Nothing+ , _toObjects = mempty+ }++-- | Identifier of the pipeline task attempt object. AWS Data Pipeline uses+-- this value to track how many times a task is attempted.+toAttemptId :: Lens' TaskObject (Maybe Text)+toAttemptId = lens _toAttemptId (\s a -> s { _toAttemptId = a })++-- | Connection information for the location where the task runner will+-- publish the output of the task.+toObjects :: Lens' TaskObject (HashMap Text PipelineObject)+toObjects = lens _toObjects (\s a -> s { _toObjects = a }) . _Map++-- | Identifier of the pipeline that provided the task.+toPipelineId :: Lens' TaskObject (Maybe Text)+toPipelineId = lens _toPipelineId (\s a -> s { _toPipelineId = a })++-- | An internal identifier for the task. This ID is passed to the+-- SetTaskStatus and ReportTaskProgress actions.+toTaskId :: Lens' TaskObject (Maybe Text)+toTaskId = lens _toTaskId (\s a -> s { _toTaskId = a })++instance FromJSON TaskObject where+ parseJSON = withObject "TaskObject" $ \o -> TaskObject+ <$> o .:? "attemptId"+ <*> o .: "objects"+ <*> o .:? "pipelineId"+ <*> o .:? "taskId"++instance ToJSON TaskObject where+ toJSON TaskObject{..} = object+ [ "taskId" .= _toTaskId+ , "pipelineId" .= _toPipelineId+ , "attemptId" .= _toAttemptId+ , "objects" .= _toObjects+ ]++data ValidationError = ValidationError+ { _veErrors :: List "errors" Text+ , _veId :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'ValidationError' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'veErrors' @::@ ['Text']+--+-- * 'veId' @::@ 'Maybe' 'Text'+--+validationError :: ValidationError+validationError = ValidationError+ { _veId = Nothing+ , _veErrors = mempty+ }++-- | A description of the validation error.+veErrors :: Lens' ValidationError [Text]+veErrors = lens _veErrors (\s a -> s { _veErrors = a }) . _List++-- | The identifier of the object that contains the validation error.+veId :: Lens' ValidationError (Maybe Text)+veId = lens _veId (\s a -> s { _veId = a })++instance FromJSON ValidationError where+ parseJSON = withObject "ValidationError" $ \o -> ValidationError+ <$> o .: "errors"+ <*> o .:? "id"++instance ToJSON ValidationError where+ toJSON ValidationError{..} = object+ [ "id" .= _veId+ , "errors" .= _veErrors+ ]++data PipelineDescription = PipelineDescription+ { _pdDescription :: Maybe Text+ , _pdFields :: List "fields" Field+ , _pdName :: Text+ , _pdPipelineId :: Text+ } deriving (Eq, Show)++-- | 'PipelineDescription' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pdDescription' @::@ 'Maybe' 'Text'+--+-- * 'pdFields' @::@ ['Field']+--+-- * 'pdName' @::@ 'Text'+--+-- * 'pdPipelineId' @::@ 'Text'+--+pipelineDescription :: Text -- ^ 'pdPipelineId'+ -> Text -- ^ 'pdName'+ -> PipelineDescription+pipelineDescription p1 p2 = PipelineDescription+ { _pdPipelineId = p1+ , _pdName = p2+ , _pdFields = mempty+ , _pdDescription = Nothing+ }++-- | Description of the pipeline.+pdDescription :: Lens' PipelineDescription (Maybe Text)+pdDescription = lens _pdDescription (\s a -> s { _pdDescription = a })++-- | A list of read-only fields that contain metadata about the pipeline:+-- @userId, @accountId, and @pipelineState.+pdFields :: Lens' PipelineDescription [Field]+pdFields = lens _pdFields (\s a -> s { _pdFields = a }) . _List++-- | Name of the pipeline.+pdName :: Lens' PipelineDescription Text+pdName = lens _pdName (\s a -> s { _pdName = a })++-- | The pipeline identifier that was assigned by AWS Data Pipeline. This is a+-- string of the form df-297EG78HU43EEXAMPLE.+pdPipelineId :: Lens' PipelineDescription Text+pdPipelineId = lens _pdPipelineId (\s a -> s { _pdPipelineId = a })++instance FromJSON PipelineDescription where+ parseJSON = withObject "PipelineDescription" $ \o -> PipelineDescription+ <$> o .:? "description"+ <*> o .: "fields"+ <*> o .: "name"+ <*> o .: "pipelineId"++instance ToJSON PipelineDescription where+ toJSON PipelineDescription{..} = object+ [ "pipelineId" .= _pdPipelineId+ , "name" .= _pdName+ , "fields" .= _pdFields+ , "description" .= _pdDescription+ ]++data InstanceIdentity = InstanceIdentity+ { _iiDocument :: Maybe Text+ , _iiSignature :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'InstanceIdentity' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'iiDocument' @::@ 'Maybe' 'Text'+--+-- * 'iiSignature' @::@ 'Maybe' 'Text'+--+instanceIdentity :: InstanceIdentity+instanceIdentity = InstanceIdentity+ { _iiDocument = Nothing+ , _iiSignature = Nothing+ }++-- | A description of an Amazon EC2 instance that is generated when the+-- instance is launched and exposed to the instance via the instance+-- metadata service in the form of a JSON representation of an object.+iiDocument :: Lens' InstanceIdentity (Maybe Text)+iiDocument = lens _iiDocument (\s a -> s { _iiDocument = a })++-- | A signature which can be used to verify the accuracy and authenticity of+-- the information provided in the instance identity document.+iiSignature :: Lens' InstanceIdentity (Maybe Text)+iiSignature = lens _iiSignature (\s a -> s { _iiSignature = a })++instance FromJSON InstanceIdentity where+ parseJSON = withObject "InstanceIdentity" $ \o -> InstanceIdentity+ <$> o .:? "document"+ <*> o .:? "signature"++instance ToJSON InstanceIdentity where+ toJSON InstanceIdentity{..} = object+ [ "document" .= _iiDocument+ , "signature" .= _iiSignature+ ]++newtype Query = Query+ { _qSelectors :: List "selectors" Selector+ } deriving (Eq, Show, Monoid, Semigroup)++instance GHC.Exts.IsList Query where+ type Item Query = Selector++ fromList = Query . GHC.Exts.fromList+ toList = GHC.Exts.toList . _qSelectors++-- | 'Query' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'qSelectors' @::@ ['Selector']+--+query :: Query+query = Query+ { _qSelectors = mempty+ }++-- | List of selectors that define the query. An object must satisfy all of+-- the selectors to match the query.+qSelectors :: Lens' Query [Selector]+qSelectors = lens _qSelectors (\s a -> s { _qSelectors = a }) . _List++instance FromJSON Query where+ parseJSON = withObject "Query" $ \o -> Query+ <$> o .: "selectors"++instance ToJSON Query where+ toJSON Query{..} = object+ [ "selectors" .= _qSelectors+ ]++data OperatorType+ = OperatorBetween -- ^ BETWEEN+ | OperatorEq -- ^ EQ+ | OperatorGe -- ^ GE+ | OperatorLe -- ^ LE+ | OperatorRefEq -- ^ REF_EQ+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable OperatorType++instance FromText OperatorType where+ parser = match "BETWEEN" OperatorBetween+ <|> match "EQ" OperatorEq+ <|> match "GE" OperatorGe+ <|> match "LE" OperatorLe+ <|> match "REF_EQ" OperatorRefEq++instance ToText OperatorType where+ toText = \case+ OperatorBetween -> "BETWEEN"+ OperatorEq -> "EQ"+ OperatorGe -> "GE"+ OperatorLe -> "LE"+ OperatorRefEq -> "REF_EQ"++instance FromJSON OperatorType where+ parseJSON = parseJSONText "OperatorType"++instance ToJSON OperatorType where+ toJSON = toJSONText++data PipelineIdName = PipelineIdName+ { _pinId :: Maybe Text+ , _pinName :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'PipelineIdName' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pinId' @::@ 'Maybe' 'Text'+--+-- * 'pinName' @::@ 'Maybe' 'Text'+--+pipelineIdName :: PipelineIdName+pipelineIdName = PipelineIdName+ { _pinId = Nothing+ , _pinName = Nothing+ }++-- | Identifier of the pipeline that was assigned by AWS Data Pipeline. This+-- is a string of the form df-297EG78HU43EEXAMPLE.+pinId :: Lens' PipelineIdName (Maybe Text)+pinId = lens _pinId (\s a -> s { _pinId = a })++-- | Name of the pipeline.+pinName :: Lens' PipelineIdName (Maybe Text)+pinName = lens _pinName (\s a -> s { _pinName = a })++instance FromJSON PipelineIdName where+ parseJSON = withObject "PipelineIdName" $ \o -> PipelineIdName+ <$> o .:? "id"+ <*> o .:? "name"++instance ToJSON PipelineIdName where+ toJSON PipelineIdName{..} = object+ [ "id" .= _pinId+ , "name" .= _pinName+ ]++data TaskStatus+ = Failed -- ^ FAILED+ | False' -- ^ FALSE+ | Finished -- ^ FINISHED+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable TaskStatus++instance FromText TaskStatus where+ parser = match "FAILED" Failed+ <|> match "FALSE" False'+ <|> match "FINISHED" Finished++instance ToText TaskStatus where+ toText = \case+ Failed -> "FAILED"+ False' -> "FALSE"+ Finished -> "FINISHED"++instance FromJSON TaskStatus where+ parseJSON = parseJSONText "TaskStatus"++instance ToJSON TaskStatus where+ toJSON = toJSONText++data ValidationWarning = ValidationWarning+ { _vwId :: Maybe Text+ , _vwWarnings :: List "errors" Text+ } deriving (Eq, Ord, Show)++-- | 'ValidationWarning' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'vwId' @::@ 'Maybe' 'Text'+--+-- * 'vwWarnings' @::@ ['Text']+--+validationWarning :: ValidationWarning+validationWarning = ValidationWarning+ { _vwId = Nothing+ , _vwWarnings = mempty+ }++-- | The identifier of the object that contains the validation warning.+vwId :: Lens' ValidationWarning (Maybe Text)+vwId = lens _vwId (\s a -> s { _vwId = a })++-- | A description of the validation warning.+vwWarnings :: Lens' ValidationWarning [Text]+vwWarnings = lens _vwWarnings (\s a -> s { _vwWarnings = a }) . _List++instance FromJSON ValidationWarning where+ parseJSON = withObject "ValidationWarning" $ \o -> ValidationWarning+ <$> o .:? "id"+ <*> o .: "warnings"++instance ToJSON ValidationWarning where+ toJSON ValidationWarning{..} = object+ [ "id" .= _vwId+ , "warnings" .= _vwWarnings+ ]
+ gen/Network/AWS/DataPipeline/ValidatePipelineDefinition.hs view
@@ -0,0 +1,150 @@+{-# 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.DataPipeline.ValidatePipelineDefinition+-- 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)++-- | Tests the pipeline definition with a set of validation checks to ensure+-- that it is well formed and can run without error.+--+-- <http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_ValidatePipelineDefinition.html>+module Network.AWS.DataPipeline.ValidatePipelineDefinition+ (+ -- * Request+ ValidatePipelineDefinition+ -- ** Request constructor+ , validatePipelineDefinition+ -- ** Request lenses+ , vpdPipelineId+ , vpdPipelineObjects++ -- * Response+ , ValidatePipelineDefinitionResponse+ -- ** Response constructor+ , validatePipelineDefinitionResponse+ -- ** Response lenses+ , vpdrErrored+ , vpdrValidationErrors+ , vpdrValidationWarnings+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.DataPipeline.Types+import qualified GHC.Exts++data ValidatePipelineDefinition = ValidatePipelineDefinition+ { _vpdPipelineId :: Text+ , _vpdPipelineObjects :: List "pipelineObjects" PipelineObject+ } deriving (Eq, Show)++-- | 'ValidatePipelineDefinition' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'vpdPipelineId' @::@ 'Text'+--+-- * 'vpdPipelineObjects' @::@ ['PipelineObject']+--+validatePipelineDefinition :: Text -- ^ 'vpdPipelineId'+ -> ValidatePipelineDefinition+validatePipelineDefinition p1 = ValidatePipelineDefinition+ { _vpdPipelineId = p1+ , _vpdPipelineObjects = mempty+ }++-- | Identifies the pipeline whose definition is to be validated.+vpdPipelineId :: Lens' ValidatePipelineDefinition Text+vpdPipelineId = lens _vpdPipelineId (\s a -> s { _vpdPipelineId = a })++-- | A list of objects that define the pipeline changes to validate against+-- the pipeline.+vpdPipelineObjects :: Lens' ValidatePipelineDefinition [PipelineObject]+vpdPipelineObjects =+ lens _vpdPipelineObjects (\s a -> s { _vpdPipelineObjects = a })+ . _List++data ValidatePipelineDefinitionResponse = ValidatePipelineDefinitionResponse+ { _vpdrErrored :: Bool+ , _vpdrValidationErrors :: List "validationErrors" ValidationError+ , _vpdrValidationWarnings :: List "validationWarnings" ValidationWarning+ } deriving (Eq, Show)++-- | 'ValidatePipelineDefinitionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'vpdrErrored' @::@ 'Bool'+--+-- * 'vpdrValidationErrors' @::@ ['ValidationError']+--+-- * 'vpdrValidationWarnings' @::@ ['ValidationWarning']+--+validatePipelineDefinitionResponse :: Bool -- ^ 'vpdrErrored'+ -> ValidatePipelineDefinitionResponse+validatePipelineDefinitionResponse p1 = ValidatePipelineDefinitionResponse+ { _vpdrErrored = p1+ , _vpdrValidationErrors = mempty+ , _vpdrValidationWarnings = mempty+ }++-- | If True, there were validation errors.+vpdrErrored :: Lens' ValidatePipelineDefinitionResponse Bool+vpdrErrored = lens _vpdrErrored (\s a -> s { _vpdrErrored = a })++-- | Lists the validation errors that were found by+-- ValidatePipelineDefinition.+vpdrValidationErrors :: Lens' ValidatePipelineDefinitionResponse [ValidationError]+vpdrValidationErrors =+ lens _vpdrValidationErrors (\s a -> s { _vpdrValidationErrors = a })+ . _List++-- | Lists the validation warnings that were found by+-- ValidatePipelineDefinition.+vpdrValidationWarnings :: Lens' ValidatePipelineDefinitionResponse [ValidationWarning]+vpdrValidationWarnings =+ lens _vpdrValidationWarnings (\s a -> s { _vpdrValidationWarnings = a })+ . _List++instance ToPath ValidatePipelineDefinition where+ toPath = const "/"++instance ToQuery ValidatePipelineDefinition where+ toQuery = const mempty++instance ToHeaders ValidatePipelineDefinition++instance ToJSON ValidatePipelineDefinition where+ toJSON ValidatePipelineDefinition{..} = object+ [ "pipelineId" .= _vpdPipelineId+ , "pipelineObjects" .= _vpdPipelineObjects+ ]++instance AWSRequest ValidatePipelineDefinition where+ type Sv ValidatePipelineDefinition = DataPipeline+ type Rs ValidatePipelineDefinition = ValidatePipelineDefinitionResponse++ request = post "ValidatePipelineDefinition"+ response = jsonResponse++instance FromJSON ValidatePipelineDefinitionResponse where+ parseJSON = withObject "ValidatePipelineDefinitionResponse" $ \o -> ValidatePipelineDefinitionResponse+ <$> o .: "errored"+ <*> o .: "validationErrors"+ <*> o .: "validationWarnings"