amazonka-emr (empty) → 0.0.0
raw patch · 23 files changed
+6412/−0 lines, 23 filesdep +amazonka-coredep +basesetup-changed
Dependencies added: amazonka-core, base
Files
- LICENSE +373/−0
- README.md +26/−0
- Setup.hs +2/−0
- amazonka-emr.cabal +62/−0
- gen/Network/AWS/EMR.hs +54/−0
- gen/Network/AWS/EMR/AddInstanceGroups.hs +133/−0
- gen/Network/AWS/EMR/AddJobFlowSteps.hs +143/−0
- gen/Network/AWS/EMR/AddTags.hs +108/−0
- gen/Network/AWS/EMR/DescribeCluster.hs +111/−0
- gen/Network/AWS/EMR/DescribeJobFlows.hs +155/−0
- gen/Network/AWS/EMR/DescribeStep.hs +120/−0
- gen/Network/AWS/EMR/ListBootstrapActions.hs +137/−0
- gen/Network/AWS/EMR/ListClusters.hs +158/−0
- gen/Network/AWS/EMR/ListInstanceGroups.hs +137/−0
- gen/Network/AWS/EMR/ListInstances.hs +162/−0
- gen/Network/AWS/EMR/ListSteps.hs +145/−0
- gen/Network/AWS/EMR/ModifyInstanceGroups.hs +101/−0
- gen/Network/AWS/EMR/RemoveTags.hs +106/−0
- gen/Network/AWS/EMR/RunJobFlow.hs +288/−0
- gen/Network/AWS/EMR/SetTerminationProtection.hs +118/−0
- gen/Network/AWS/EMR/SetVisibleToAllUsers.hs +111/−0
- gen/Network/AWS/EMR/TerminateJobFlows.hs +103/−0
- gen/Network/AWS/EMR/Types.hs +3559/−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 Elastic MapReduce 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++Amazon Elastic MapReduce (Amazon EMR) is a web service that makes it easy to process large amounts of data efficiently. Amazon EMR uses Hadoop processing combined with several AWS products to do such tasks as web indexing, data mining, log file analysis, machine learning, scientific simulation, and data warehousing.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-emr)+and [AWS API Reference](http://docs.aws.amazon.com/ElasticMapReduce/latest/API/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-emr` 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-emr.cabal view
@@ -0,0 +1,62 @@+name: amazonka-emr+version: 0.0.0+synopsis: Amazon Elastic MapReduce 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:+ Amazon Elastic MapReduce (Amazon EMR) is a web service that makes it+ easy to process large amounts of data efficiently. Amazon EMR uses+ Hadoop processing combined with several AWS products to do such tasks+ as web indexing, data mining, log file analysis, machine learning,+ scientific simulation, and data warehousing.+ .+ /See:/ <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/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.EMR+ , Network.AWS.EMR.AddInstanceGroups+ , Network.AWS.EMR.AddJobFlowSteps+ , Network.AWS.EMR.AddTags+ , Network.AWS.EMR.DescribeCluster+ , Network.AWS.EMR.DescribeJobFlows+ , Network.AWS.EMR.DescribeStep+ , Network.AWS.EMR.ListBootstrapActions+ , Network.AWS.EMR.ListClusters+ , Network.AWS.EMR.ListInstanceGroups+ , Network.AWS.EMR.ListInstances+ , Network.AWS.EMR.ListSteps+ , Network.AWS.EMR.ModifyInstanceGroups+ , Network.AWS.EMR.RemoveTags+ , Network.AWS.EMR.RunJobFlow+ , Network.AWS.EMR.SetTerminationProtection+ , Network.AWS.EMR.SetVisibleToAllUsers+ , Network.AWS.EMR.TerminateJobFlows+ , Network.AWS.EMR.Types++ other-modules:++ build-depends:+ amazonka-core+ , base >= 4.7 && < 5
+ gen/Network/AWS/EMR.hs view
@@ -0,0 +1,54 @@+-- Module : Network.AWS.EMR+-- 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)++-- | Amazon Elastic MapReduce (Amazon EMR) is a web service that makes it easy+-- to process large amounts of data efficiently. Amazon EMR uses Hadoop+-- processing combined with several AWS products to do such tasks as web+-- indexing, data mining, log file analysis, machine learning, scientific+-- simulation, and data warehousing.+module Network.AWS.EMR+ ( module Network.AWS.EMR.AddInstanceGroups+ , module Network.AWS.EMR.AddJobFlowSteps+ , module Network.AWS.EMR.AddTags+ , module Network.AWS.EMR.DescribeCluster+ , module Network.AWS.EMR.DescribeJobFlows+ , module Network.AWS.EMR.DescribeStep+ , module Network.AWS.EMR.ListBootstrapActions+ , module Network.AWS.EMR.ListClusters+ , module Network.AWS.EMR.ListInstanceGroups+ , module Network.AWS.EMR.ListInstances+ , module Network.AWS.EMR.ListSteps+ , module Network.AWS.EMR.ModifyInstanceGroups+ , module Network.AWS.EMR.RemoveTags+ , module Network.AWS.EMR.RunJobFlow+ , module Network.AWS.EMR.SetTerminationProtection+ , module Network.AWS.EMR.SetVisibleToAllUsers+ , module Network.AWS.EMR.TerminateJobFlows+ , module Network.AWS.EMR.Types+ ) where++import Network.AWS.EMR.AddInstanceGroups+import Network.AWS.EMR.AddJobFlowSteps+import Network.AWS.EMR.AddTags+import Network.AWS.EMR.DescribeCluster+import Network.AWS.EMR.DescribeJobFlows+import Network.AWS.EMR.DescribeStep+import Network.AWS.EMR.ListBootstrapActions+import Network.AWS.EMR.ListClusters+import Network.AWS.EMR.ListInstanceGroups+import Network.AWS.EMR.ListInstances+import Network.AWS.EMR.ListSteps+import Network.AWS.EMR.ModifyInstanceGroups+import Network.AWS.EMR.RemoveTags+import Network.AWS.EMR.RunJobFlow+import Network.AWS.EMR.SetTerminationProtection+import Network.AWS.EMR.SetVisibleToAllUsers+import Network.AWS.EMR.TerminateJobFlows+import Network.AWS.EMR.Types
+ gen/Network/AWS/EMR/AddInstanceGroups.hs view
@@ -0,0 +1,133 @@+{-# 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.EMR.AddInstanceGroups+-- 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)++-- | AddInstanceGroups adds an instance group to a running cluster.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_AddInstanceGroups.html>+module Network.AWS.EMR.AddInstanceGroups+ (+ -- * Request+ AddInstanceGroups+ -- ** Request constructor+ , addInstanceGroups+ -- ** Request lenses+ , aigInstanceGroups+ , aigJobFlowId++ -- * Response+ , AddInstanceGroupsResponse+ -- ** Response constructor+ , addInstanceGroupsResponse+ -- ** Response lenses+ , aigrInstanceGroupIds+ , aigrJobFlowId+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data AddInstanceGroups = AddInstanceGroups+ { _aigInstanceGroups :: List "InstanceGroups" InstanceGroupConfig+ , _aigJobFlowId :: Text+ } deriving (Eq, Show)++-- | 'AddInstanceGroups' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'aigInstanceGroups' @::@ ['InstanceGroupConfig']+--+-- * 'aigJobFlowId' @::@ 'Text'+--+addInstanceGroups :: Text -- ^ 'aigJobFlowId'+ -> AddInstanceGroups+addInstanceGroups p1 = AddInstanceGroups+ { _aigJobFlowId = p1+ , _aigInstanceGroups = mempty+ }++-- | Instance Groups to add.+aigInstanceGroups :: Lens' AddInstanceGroups [InstanceGroupConfig]+aigInstanceGroups =+ lens _aigInstanceGroups (\s a -> s { _aigInstanceGroups = a })+ . _List++-- | Job flow in which to add the instance groups.+aigJobFlowId :: Lens' AddInstanceGroups Text+aigJobFlowId = lens _aigJobFlowId (\s a -> s { _aigJobFlowId = a })++data AddInstanceGroupsResponse = AddInstanceGroupsResponse+ { _aigrInstanceGroupIds :: List "InstanceGroupIds" Text+ , _aigrJobFlowId :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'AddInstanceGroupsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'aigrInstanceGroupIds' @::@ ['Text']+--+-- * 'aigrJobFlowId' @::@ 'Maybe' 'Text'+--+addInstanceGroupsResponse :: AddInstanceGroupsResponse+addInstanceGroupsResponse = AddInstanceGroupsResponse+ { _aigrJobFlowId = Nothing+ , _aigrInstanceGroupIds = mempty+ }++-- | Instance group IDs of the newly created instance groups.+aigrInstanceGroupIds :: Lens' AddInstanceGroupsResponse [Text]+aigrInstanceGroupIds =+ lens _aigrInstanceGroupIds (\s a -> s { _aigrInstanceGroupIds = a })+ . _List++-- | The job flow ID in which the instance groups are added.+aigrJobFlowId :: Lens' AddInstanceGroupsResponse (Maybe Text)+aigrJobFlowId = lens _aigrJobFlowId (\s a -> s { _aigrJobFlowId = a })++instance ToPath AddInstanceGroups where+ toPath = const "/"++instance ToQuery AddInstanceGroups where+ toQuery = const mempty++instance ToHeaders AddInstanceGroups++instance ToJSON AddInstanceGroups where+ toJSON AddInstanceGroups{..} = object+ [ "InstanceGroups" .= _aigInstanceGroups+ , "JobFlowId" .= _aigJobFlowId+ ]++instance AWSRequest AddInstanceGroups where+ type Sv AddInstanceGroups = EMR+ type Rs AddInstanceGroups = AddInstanceGroupsResponse++ request = post "AddInstanceGroups"+ response = jsonResponse++instance FromJSON AddInstanceGroupsResponse where+ parseJSON = withObject "AddInstanceGroupsResponse" $ \o -> AddInstanceGroupsResponse+ <$> o .: "InstanceGroupIds"+ <*> o .:? "JobFlowId"
+ gen/Network/AWS/EMR/AddJobFlowSteps.hs view
@@ -0,0 +1,143 @@+{-# 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.EMR.AddJobFlowSteps+-- 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)++-- | AddJobFlowSteps adds new steps to a running job flow. A maximum of 256+-- steps are allowed in each job flow. If your job flow is long-running (such+-- as a Hive data warehouse) or complex, you may require more than 256 steps+-- to process your data. You can bypass the 256-step limitation in various+-- ways, including using the SSH shell to connect to the master node and+-- submitting queries directly to the software running on the master node,+-- such as Hive and Hadoop. For more information on how to do this, go to Add+-- More than 256 Steps to a Job Flow in the Amazon Elastic MapReduce+-- Developer's Guide. A step specifies the location of a JAR file stored+-- either on the master node of the job flow or in Amazon S3. Each step is+-- performed by the main function of the main class of the JAR file. The main+-- class can be specified either in the manifest of the JAR or by using the+-- MainFunction parameter of the step. Elastic MapReduce executes each step in+-- the order listed. For a step to be considered complete, the main function+-- must exit with a zero exit code and all Hadoop jobs started while the step+-- was running must have completed and run successfully. You can only add+-- steps to a job flow that is in one of the following states: STARTING,+-- BOOTSTRAPPING, RUNNING, or WAITING.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_AddJobFlowSteps.html>+module Network.AWS.EMR.AddJobFlowSteps+ (+ -- * Request+ AddJobFlowSteps+ -- ** Request constructor+ , addJobFlowSteps+ -- ** Request lenses+ , ajfsJobFlowId+ , ajfsSteps++ -- * Response+ , AddJobFlowStepsResponse+ -- ** Response constructor+ , addJobFlowStepsResponse+ -- ** Response lenses+ , ajfsrStepIds+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data AddJobFlowSteps = AddJobFlowSteps+ { _ajfsJobFlowId :: Text+ , _ajfsSteps :: List "Steps" StepConfig+ } deriving (Eq, Show)++-- | 'AddJobFlowSteps' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ajfsJobFlowId' @::@ 'Text'+--+-- * 'ajfsSteps' @::@ ['StepConfig']+--+addJobFlowSteps :: Text -- ^ 'ajfsJobFlowId'+ -> AddJobFlowSteps+addJobFlowSteps p1 = AddJobFlowSteps+ { _ajfsJobFlowId = p1+ , _ajfsSteps = mempty+ }++-- | A string that uniquely identifies the job flow. This identifier is+-- returned by RunJobFlow and can also be obtained from ListClusters.+ajfsJobFlowId :: Lens' AddJobFlowSteps Text+ajfsJobFlowId = lens _ajfsJobFlowId (\s a -> s { _ajfsJobFlowId = a })++-- | A list of StepConfig to be executed by the job flow.+ajfsSteps :: Lens' AddJobFlowSteps [StepConfig]+ajfsSteps = lens _ajfsSteps (\s a -> s { _ajfsSteps = a }) . _List++newtype AddJobFlowStepsResponse = AddJobFlowStepsResponse+ { _ajfsrStepIds :: List "StepIds" Text+ } deriving (Eq, Ord, Show, Monoid, Semigroup)++instance GHC.Exts.IsList AddJobFlowStepsResponse where+ type Item AddJobFlowStepsResponse = Text++ fromList = AddJobFlowStepsResponse . GHC.Exts.fromList+ toList = GHC.Exts.toList . _ajfsrStepIds++-- | 'AddJobFlowStepsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ajfsrStepIds' @::@ ['Text']+--+addJobFlowStepsResponse :: AddJobFlowStepsResponse+addJobFlowStepsResponse = AddJobFlowStepsResponse+ { _ajfsrStepIds = mempty+ }++-- | The identifiers of the list of steps added to the job flow.+ajfsrStepIds :: Lens' AddJobFlowStepsResponse [Text]+ajfsrStepIds = lens _ajfsrStepIds (\s a -> s { _ajfsrStepIds = a }) . _List++instance ToPath AddJobFlowSteps where+ toPath = const "/"++instance ToQuery AddJobFlowSteps where+ toQuery = const mempty++instance ToHeaders AddJobFlowSteps++instance ToJSON AddJobFlowSteps where+ toJSON AddJobFlowSteps{..} = object+ [ "JobFlowId" .= _ajfsJobFlowId+ , "Steps" .= _ajfsSteps+ ]++instance AWSRequest AddJobFlowSteps where+ type Sv AddJobFlowSteps = EMR+ type Rs AddJobFlowSteps = AddJobFlowStepsResponse++ request = post "AddJobFlowSteps"+ response = jsonResponse++instance FromJSON AddJobFlowStepsResponse where+ parseJSON = withObject "AddJobFlowStepsResponse" $ \o -> AddJobFlowStepsResponse+ <$> o .: "StepIds"
+ gen/Network/AWS/EMR/AddTags.hs view
@@ -0,0 +1,108 @@+{-# 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.EMR.AddTags+-- 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 tags to an Amazon EMR resource. Tags make it easier to associate+-- clusters in various ways, such as grouping clusters to track your Amazon+-- EMR resource allocation costs. For more information, see Tagging Amazon EMR+-- Resources.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_AddTags.html>+module Network.AWS.EMR.AddTags+ (+ -- * Request+ AddTags+ -- ** Request constructor+ , addTags+ -- ** Request lenses+ , atResourceId+ , atTags++ -- * Response+ , AddTagsResponse+ -- ** Response constructor+ , addTagsResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data AddTags = AddTags+ { _atResourceId :: Text+ , _atTags :: List "Tags" Tag+ } deriving (Eq, Show)++-- | 'AddTags' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'atResourceId' @::@ 'Text'+--+-- * 'atTags' @::@ ['Tag']+--+addTags :: Text -- ^ 'atResourceId'+ -> AddTags+addTags p1 = AddTags+ { _atResourceId = p1+ , _atTags = mempty+ }++-- | The Amazon EMR resource identifier to which tags will be added. This+-- value must be a cluster identifier.+atResourceId :: Lens' AddTags Text+atResourceId = lens _atResourceId (\s a -> s { _atResourceId = a })++-- | A list of tags to associate with a cluster and propagate to Amazon EC2+-- instances. Tags are user-defined key/value pairs that consist of a+-- required key string with a maximum of 128 characters, and an optional+-- value string with a maximum of 256 characters.+atTags :: Lens' AddTags [Tag]+atTags = lens _atTags (\s a -> s { _atTags = a }) . _List++data AddTagsResponse = AddTagsResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'AddTagsResponse' constructor.+addTagsResponse :: AddTagsResponse+addTagsResponse = AddTagsResponse++instance ToPath AddTags where+ toPath = const "/"++instance ToQuery AddTags where+ toQuery = const mempty++instance ToHeaders AddTags++instance ToJSON AddTags where+ toJSON AddTags{..} = object+ [ "ResourceId" .= _atResourceId+ , "Tags" .= _atTags+ ]++instance AWSRequest AddTags where+ type Sv AddTags = EMR+ type Rs AddTags = AddTagsResponse++ request = post "AddTags"+ response = nullResponse AddTagsResponse
+ gen/Network/AWS/EMR/DescribeCluster.hs view
@@ -0,0 +1,111 @@+{-# 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.EMR.DescribeCluster+-- 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)++-- | Provides cluster-level details including status, hardware and software+-- configuration, VPC settings, and so on. For information about the cluster+-- steps, see ListSteps.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_DescribeCluster.html>+module Network.AWS.EMR.DescribeCluster+ (+ -- * Request+ DescribeCluster+ -- ** Request constructor+ , describeCluster+ -- ** Request lenses+ , dcClusterId++ -- * Response+ , DescribeClusterResponse+ -- ** Response constructor+ , describeClusterResponse+ -- ** Response lenses+ , dcrCluster+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++newtype DescribeCluster = DescribeCluster+ { _dcClusterId :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DescribeCluster' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dcClusterId' @::@ 'Text'+--+describeCluster :: Text -- ^ 'dcClusterId'+ -> DescribeCluster+describeCluster p1 = DescribeCluster+ { _dcClusterId = p1+ }++-- | The identifier of the cluster to describe.+dcClusterId :: Lens' DescribeCluster Text+dcClusterId = lens _dcClusterId (\s a -> s { _dcClusterId = a })++newtype DescribeClusterResponse = DescribeClusterResponse+ { _dcrCluster :: Maybe Cluster+ } deriving (Eq, Show)++-- | 'DescribeClusterResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dcrCluster' @::@ 'Maybe' 'Cluster'+--+describeClusterResponse :: DescribeClusterResponse+describeClusterResponse = DescribeClusterResponse+ { _dcrCluster = Nothing+ }++-- | This output contains the details for the requested cluster.+dcrCluster :: Lens' DescribeClusterResponse (Maybe Cluster)+dcrCluster = lens _dcrCluster (\s a -> s { _dcrCluster = a })++instance ToPath DescribeCluster where+ toPath = const "/"++instance ToQuery DescribeCluster where+ toQuery = const mempty++instance ToHeaders DescribeCluster++instance ToJSON DescribeCluster where+ toJSON DescribeCluster{..} = object+ [ "ClusterId" .= _dcClusterId+ ]++instance AWSRequest DescribeCluster where+ type Sv DescribeCluster = EMR+ type Rs DescribeCluster = DescribeClusterResponse++ request = post "DescribeCluster"+ response = jsonResponse++instance FromJSON DescribeClusterResponse where+ parseJSON = withObject "DescribeClusterResponse" $ \o -> DescribeClusterResponse+ <$> o .:? "Cluster"
+ gen/Network/AWS/EMR/DescribeJobFlows.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.EMR.DescribeJobFlows+-- 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)++-- | This API is deprecated and will eventually be removed. We recommend you use+-- ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and+-- ListBootstrapActions instead. DescribeJobFlows returns a list of job flows+-- that match all of the supplied parameters. The parameters can include a+-- list of job flow IDs, job flow states, and restrictions on job flow+-- creation date and time. Regardless of supplied parameters, only job flows+-- created within the last two months are returned. If no parameters are+-- supplied, then job flows matching either of the following criteria are+-- returned: Job flows created and completed in the last two weeks Job flows+-- created within the last two months that are in one of the following states:+-- RUNNING, WAITING, SHUTTING_DOWN, STARTING Amazon Elastic MapReduce can+-- return a maximum of 512 job flow descriptions.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_DescribeJobFlows.html>+module Network.AWS.EMR.DescribeJobFlows+ (+ -- * Request+ DescribeJobFlows+ -- ** Request constructor+ , describeJobFlows+ -- ** Request lenses+ , djfCreatedAfter+ , djfCreatedBefore+ , djfJobFlowIds+ , djfJobFlowStates++ -- * Response+ , DescribeJobFlowsResponse+ -- ** Response constructor+ , describeJobFlowsResponse+ -- ** Response lenses+ , djfrJobFlows+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data DescribeJobFlows = DescribeJobFlows+ { _djfCreatedAfter :: Maybe RFC822+ , _djfCreatedBefore :: Maybe RFC822+ , _djfJobFlowIds :: List "Args" Text+ , _djfJobFlowStates :: List "JobFlowStates" Text+ } deriving (Eq, Ord, Show)++-- | 'DescribeJobFlows' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'djfCreatedAfter' @::@ 'Maybe' 'UTCTime'+--+-- * 'djfCreatedBefore' @::@ 'Maybe' 'UTCTime'+--+-- * 'djfJobFlowIds' @::@ ['Text']+--+-- * 'djfJobFlowStates' @::@ ['Text']+--+describeJobFlows :: DescribeJobFlows+describeJobFlows = DescribeJobFlows+ { _djfCreatedAfter = Nothing+ , _djfCreatedBefore = Nothing+ , _djfJobFlowIds = mempty+ , _djfJobFlowStates = mempty+ }++-- | Return only job flows created after this date and time.+djfCreatedAfter :: Lens' DescribeJobFlows (Maybe UTCTime)+djfCreatedAfter = lens _djfCreatedAfter (\s a -> s { _djfCreatedAfter = a }) . mapping _Time++-- | Return only job flows created before this date and time.+djfCreatedBefore :: Lens' DescribeJobFlows (Maybe UTCTime)+djfCreatedBefore = lens _djfCreatedBefore (\s a -> s { _djfCreatedBefore = a }) . mapping _Time++-- | Return only job flows whose job flow ID is contained in this list.+djfJobFlowIds :: Lens' DescribeJobFlows [Text]+djfJobFlowIds = lens _djfJobFlowIds (\s a -> s { _djfJobFlowIds = a }) . _List++-- | Return only job flows whose state is contained in this list.+djfJobFlowStates :: Lens' DescribeJobFlows [Text]+djfJobFlowStates = lens _djfJobFlowStates (\s a -> s { _djfJobFlowStates = a }) . _List++newtype DescribeJobFlowsResponse = DescribeJobFlowsResponse+ { _djfrJobFlows :: List "JobFlows" JobFlowDetail+ } deriving (Eq, Show, Monoid, Semigroup)++instance GHC.Exts.IsList DescribeJobFlowsResponse where+ type Item DescribeJobFlowsResponse = JobFlowDetail++ fromList = DescribeJobFlowsResponse . GHC.Exts.fromList+ toList = GHC.Exts.toList . _djfrJobFlows++-- | 'DescribeJobFlowsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'djfrJobFlows' @::@ ['JobFlowDetail']+--+describeJobFlowsResponse :: DescribeJobFlowsResponse+describeJobFlowsResponse = DescribeJobFlowsResponse+ { _djfrJobFlows = mempty+ }++-- | A list of job flows matching the parameters supplied.+djfrJobFlows :: Lens' DescribeJobFlowsResponse [JobFlowDetail]+djfrJobFlows = lens _djfrJobFlows (\s a -> s { _djfrJobFlows = a }) . _List++instance ToPath DescribeJobFlows where+ toPath = const "/"++instance ToQuery DescribeJobFlows where+ toQuery = const mempty++instance ToHeaders DescribeJobFlows++instance ToJSON DescribeJobFlows where+ toJSON DescribeJobFlows{..} = object+ [ "CreatedAfter" .= _djfCreatedAfter+ , "CreatedBefore" .= _djfCreatedBefore+ , "JobFlowIds" .= _djfJobFlowIds+ , "JobFlowStates" .= _djfJobFlowStates+ ]++instance AWSRequest DescribeJobFlows where+ type Sv DescribeJobFlows = EMR+ type Rs DescribeJobFlows = DescribeJobFlowsResponse++ request = post "DescribeJobFlows"+ response = jsonResponse++instance FromJSON DescribeJobFlowsResponse where+ parseJSON = withObject "DescribeJobFlowsResponse" $ \o -> DescribeJobFlowsResponse+ <$> o .: "JobFlows"
+ gen/Network/AWS/EMR/DescribeStep.hs view
@@ -0,0 +1,120 @@+{-# 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.EMR.DescribeStep+-- 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)++-- | Provides more detail about the cluster step.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_DescribeStep.html>+module Network.AWS.EMR.DescribeStep+ (+ -- * Request+ DescribeStep+ -- ** Request constructor+ , describeStep+ -- ** Request lenses+ , dsClusterId+ , dsStepId++ -- * Response+ , DescribeStepResponse+ -- ** Response constructor+ , describeStepResponse+ -- ** Response lenses+ , dsrStep+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data DescribeStep = DescribeStep+ { _dsClusterId :: Text+ , _dsStepId :: Text+ } deriving (Eq, Ord, Show)++-- | 'DescribeStep' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dsClusterId' @::@ 'Text'+--+-- * 'dsStepId' @::@ 'Text'+--+describeStep :: Text -- ^ 'dsClusterId'+ -> Text -- ^ 'dsStepId'+ -> DescribeStep+describeStep p1 p2 = DescribeStep+ { _dsClusterId = p1+ , _dsStepId = p2+ }++-- | The identifier of the cluster with steps to describe.+dsClusterId :: Lens' DescribeStep Text+dsClusterId = lens _dsClusterId (\s a -> s { _dsClusterId = a })++-- | The identifier of the step to describe.+dsStepId :: Lens' DescribeStep Text+dsStepId = lens _dsStepId (\s a -> s { _dsStepId = a })++newtype DescribeStepResponse = DescribeStepResponse+ { _dsrStep :: Maybe Step+ } deriving (Eq, Show)++-- | 'DescribeStepResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dsrStep' @::@ 'Maybe' 'Step'+--+describeStepResponse :: DescribeStepResponse+describeStepResponse = DescribeStepResponse+ { _dsrStep = Nothing+ }++-- | The step details for the requested step identifier.+dsrStep :: Lens' DescribeStepResponse (Maybe Step)+dsrStep = lens _dsrStep (\s a -> s { _dsrStep = a })++instance ToPath DescribeStep where+ toPath = const "/"++instance ToQuery DescribeStep where+ toQuery = const mempty++instance ToHeaders DescribeStep++instance ToJSON DescribeStep where+ toJSON DescribeStep{..} = object+ [ "ClusterId" .= _dsClusterId+ , "StepId" .= _dsStepId+ ]++instance AWSRequest DescribeStep where+ type Sv DescribeStep = EMR+ type Rs DescribeStep = DescribeStepResponse++ request = post "DescribeStep"+ response = jsonResponse++instance FromJSON DescribeStepResponse where+ parseJSON = withObject "DescribeStepResponse" $ \o -> DescribeStepResponse+ <$> o .:? "Step"
+ gen/Network/AWS/EMR/ListBootstrapActions.hs view
@@ -0,0 +1,137 @@+{-# 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.EMR.ListBootstrapActions+-- 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)++-- | Provides information about the bootstrap actions associated with a cluster.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_ListBootstrapActions.html>+module Network.AWS.EMR.ListBootstrapActions+ (+ -- * Request+ ListBootstrapActions+ -- ** Request constructor+ , listBootstrapActions+ -- ** Request lenses+ , lbaClusterId+ , lbaMarker++ -- * Response+ , ListBootstrapActionsResponse+ -- ** Response constructor+ , listBootstrapActionsResponse+ -- ** Response lenses+ , lbarBootstrapActions+ , lbarMarker+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data ListBootstrapActions = ListBootstrapActions+ { _lbaClusterId :: Text+ , _lbaMarker :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'ListBootstrapActions' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lbaClusterId' @::@ 'Text'+--+-- * 'lbaMarker' @::@ 'Maybe' 'Text'+--+listBootstrapActions :: Text -- ^ 'lbaClusterId'+ -> ListBootstrapActions+listBootstrapActions p1 = ListBootstrapActions+ { _lbaClusterId = p1+ , _lbaMarker = Nothing+ }++-- | The cluster identifier for the bootstrap actions to list .+lbaClusterId :: Lens' ListBootstrapActions Text+lbaClusterId = lens _lbaClusterId (\s a -> s { _lbaClusterId = a })++-- | The pagination token that indicates the next set of results to retrieve .+lbaMarker :: Lens' ListBootstrapActions (Maybe Text)+lbaMarker = lens _lbaMarker (\s a -> s { _lbaMarker = a })++data ListBootstrapActionsResponse = ListBootstrapActionsResponse+ { _lbarBootstrapActions :: List "BootstrapActions" Command+ , _lbarMarker :: Maybe Text+ } deriving (Eq, Show)++-- | 'ListBootstrapActionsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lbarBootstrapActions' @::@ ['Command']+--+-- * 'lbarMarker' @::@ 'Maybe' 'Text'+--+listBootstrapActionsResponse :: ListBootstrapActionsResponse+listBootstrapActionsResponse = ListBootstrapActionsResponse+ { _lbarBootstrapActions = mempty+ , _lbarMarker = Nothing+ }++-- | The bootstrap actions associated with the cluster .+lbarBootstrapActions :: Lens' ListBootstrapActionsResponse [Command]+lbarBootstrapActions =+ lens _lbarBootstrapActions (\s a -> s { _lbarBootstrapActions = a })+ . _List++-- | The pagination token that indicates the next set of results to retrieve .+lbarMarker :: Lens' ListBootstrapActionsResponse (Maybe Text)+lbarMarker = lens _lbarMarker (\s a -> s { _lbarMarker = a })++instance ToPath ListBootstrapActions where+ toPath = const "/"++instance ToQuery ListBootstrapActions where+ toQuery = const mempty++instance ToHeaders ListBootstrapActions++instance ToJSON ListBootstrapActions where+ toJSON ListBootstrapActions{..} = object+ [ "ClusterId" .= _lbaClusterId+ , "Marker" .= _lbaMarker+ ]++instance AWSRequest ListBootstrapActions where+ type Sv ListBootstrapActions = EMR+ type Rs ListBootstrapActions = ListBootstrapActionsResponse++ request = post "ListBootstrapActions"+ response = jsonResponse++instance FromJSON ListBootstrapActionsResponse where+ parseJSON = withObject "ListBootstrapActionsResponse" $ \o -> ListBootstrapActionsResponse+ <$> o .: "BootstrapActions"+ <*> o .:? "Marker"++instance AWSPager ListBootstrapActions where+ page rq rs+ | stop (rq ^. lbaMarker) = Nothing+ | otherwise = (\x -> rq & lbaMarker ?~ x)+ <$> (rs ^. lbarMarker)
+ gen/Network/AWS/EMR/ListClusters.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.EMR.ListClusters+-- 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)++-- | Provides the status of all clusters visible to this AWS account. Allows you+-- to filter the list of clusters based on certain criteria; for example,+-- filtering by cluster creation date and time or by status. This call returns+-- a maximum of 50 clusters per call, but returns a marker to track the paging+-- of the cluster list across multiple ListClusters calls.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_ListClusters.html>+module Network.AWS.EMR.ListClusters+ (+ -- * Request+ ListClusters+ -- ** Request constructor+ , listClusters+ -- ** Request lenses+ , lcClusterStates+ , lcCreatedAfter+ , lcCreatedBefore+ , lcMarker++ -- * Response+ , ListClustersResponse+ -- ** Response constructor+ , listClustersResponse+ -- ** Response lenses+ , lcrClusters+ , lcrMarker+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data ListClusters = ListClusters+ { _lcClusterStates :: List "ClusterStates" Text+ , _lcCreatedAfter :: Maybe RFC822+ , _lcCreatedBefore :: Maybe RFC822+ , _lcMarker :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'ListClusters' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lcClusterStates' @::@ ['Text']+--+-- * 'lcCreatedAfter' @::@ 'Maybe' 'UTCTime'+--+-- * 'lcCreatedBefore' @::@ 'Maybe' 'UTCTime'+--+-- * 'lcMarker' @::@ 'Maybe' 'Text'+--+listClusters :: ListClusters+listClusters = ListClusters+ { _lcCreatedAfter = Nothing+ , _lcCreatedBefore = Nothing+ , _lcClusterStates = mempty+ , _lcMarker = Nothing+ }++-- | The cluster state filters to apply when listing clusters.+lcClusterStates :: Lens' ListClusters [Text]+lcClusterStates = lens _lcClusterStates (\s a -> s { _lcClusterStates = a }) . _List++-- | The creation date and time beginning value filter for listing clusters .+lcCreatedAfter :: Lens' ListClusters (Maybe UTCTime)+lcCreatedAfter = lens _lcCreatedAfter (\s a -> s { _lcCreatedAfter = a }) . mapping _Time++-- | The creation date and time end value filter for listing clusters .+lcCreatedBefore :: Lens' ListClusters (Maybe UTCTime)+lcCreatedBefore = lens _lcCreatedBefore (\s a -> s { _lcCreatedBefore = a }) . mapping _Time++-- | The pagination token that indicates the next set of results to retrieve.+lcMarker :: Lens' ListClusters (Maybe Text)+lcMarker = lens _lcMarker (\s a -> s { _lcMarker = a })++data ListClustersResponse = ListClustersResponse+ { _lcrClusters :: List "Clusters" ClusterSummary+ , _lcrMarker :: Maybe Text+ } deriving (Eq, Show)++-- | 'ListClustersResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lcrClusters' @::@ ['ClusterSummary']+--+-- * 'lcrMarker' @::@ 'Maybe' 'Text'+--+listClustersResponse :: ListClustersResponse+listClustersResponse = ListClustersResponse+ { _lcrClusters = mempty+ , _lcrMarker = Nothing+ }++-- | The list of clusters for the account based on the given filters.+lcrClusters :: Lens' ListClustersResponse [ClusterSummary]+lcrClusters = lens _lcrClusters (\s a -> s { _lcrClusters = a }) . _List++-- | The pagination token that indicates the next set of results to retrieve.+lcrMarker :: Lens' ListClustersResponse (Maybe Text)+lcrMarker = lens _lcrMarker (\s a -> s { _lcrMarker = a })++instance ToPath ListClusters where+ toPath = const "/"++instance ToQuery ListClusters where+ toQuery = const mempty++instance ToHeaders ListClusters++instance ToJSON ListClusters where+ toJSON ListClusters{..} = object+ [ "CreatedAfter" .= _lcCreatedAfter+ , "CreatedBefore" .= _lcCreatedBefore+ , "ClusterStates" .= _lcClusterStates+ , "Marker" .= _lcMarker+ ]++instance AWSRequest ListClusters where+ type Sv ListClusters = EMR+ type Rs ListClusters = ListClustersResponse++ request = post "ListClusters"+ response = jsonResponse++instance FromJSON ListClustersResponse where+ parseJSON = withObject "ListClustersResponse" $ \o -> ListClustersResponse+ <$> o .: "Clusters"+ <*> o .:? "Marker"++instance AWSPager ListClusters where+ page rq rs+ | stop (rq ^. lcMarker) = Nothing+ | otherwise = (\x -> rq & lcMarker ?~ x)+ <$> (rs ^. lcrMarker)
+ gen/Network/AWS/EMR/ListInstanceGroups.hs view
@@ -0,0 +1,137 @@+{-# 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.EMR.ListInstanceGroups+-- 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)++-- | Provides all available details about the instance groups in a cluster.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_ListInstanceGroups.html>+module Network.AWS.EMR.ListInstanceGroups+ (+ -- * Request+ ListInstanceGroups+ -- ** Request constructor+ , listInstanceGroups+ -- ** Request lenses+ , ligClusterId+ , ligMarker++ -- * Response+ , ListInstanceGroupsResponse+ -- ** Response constructor+ , listInstanceGroupsResponse+ -- ** Response lenses+ , ligrInstanceGroups+ , ligrMarker+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data ListInstanceGroups = ListInstanceGroups+ { _ligClusterId :: Text+ , _ligMarker :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'ListInstanceGroups' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ligClusterId' @::@ 'Text'+--+-- * 'ligMarker' @::@ 'Maybe' 'Text'+--+listInstanceGroups :: Text -- ^ 'ligClusterId'+ -> ListInstanceGroups+listInstanceGroups p1 = ListInstanceGroups+ { _ligClusterId = p1+ , _ligMarker = Nothing+ }++-- | The identifier of the cluster for which to list the instance groups.+ligClusterId :: Lens' ListInstanceGroups Text+ligClusterId = lens _ligClusterId (\s a -> s { _ligClusterId = a })++-- | The pagination token that indicates the next set of results to retrieve.+ligMarker :: Lens' ListInstanceGroups (Maybe Text)+ligMarker = lens _ligMarker (\s a -> s { _ligMarker = a })++data ListInstanceGroupsResponse = ListInstanceGroupsResponse+ { _ligrInstanceGroups :: List "InstanceGroups" InstanceGroup+ , _ligrMarker :: Maybe Text+ } deriving (Eq, Show)++-- | 'ListInstanceGroupsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ligrInstanceGroups' @::@ ['InstanceGroup']+--+-- * 'ligrMarker' @::@ 'Maybe' 'Text'+--+listInstanceGroupsResponse :: ListInstanceGroupsResponse+listInstanceGroupsResponse = ListInstanceGroupsResponse+ { _ligrInstanceGroups = mempty+ , _ligrMarker = Nothing+ }++-- | The list of instance groups for the cluster and given filters.+ligrInstanceGroups :: Lens' ListInstanceGroupsResponse [InstanceGroup]+ligrInstanceGroups =+ lens _ligrInstanceGroups (\s a -> s { _ligrInstanceGroups = a })+ . _List++-- | The pagination token that indicates the next set of results to retrieve.+ligrMarker :: Lens' ListInstanceGroupsResponse (Maybe Text)+ligrMarker = lens _ligrMarker (\s a -> s { _ligrMarker = a })++instance ToPath ListInstanceGroups where+ toPath = const "/"++instance ToQuery ListInstanceGroups where+ toQuery = const mempty++instance ToHeaders ListInstanceGroups++instance ToJSON ListInstanceGroups where+ toJSON ListInstanceGroups{..} = object+ [ "ClusterId" .= _ligClusterId+ , "Marker" .= _ligMarker+ ]++instance AWSRequest ListInstanceGroups where+ type Sv ListInstanceGroups = EMR+ type Rs ListInstanceGroups = ListInstanceGroupsResponse++ request = post "ListInstanceGroups"+ response = jsonResponse++instance FromJSON ListInstanceGroupsResponse where+ parseJSON = withObject "ListInstanceGroupsResponse" $ \o -> ListInstanceGroupsResponse+ <$> o .: "InstanceGroups"+ <*> o .:? "Marker"++instance AWSPager ListInstanceGroups where+ page rq rs+ | stop (rq ^. ligMarker) = Nothing+ | otherwise = (\x -> rq & ligMarker ?~ x)+ <$> (rs ^. ligrMarker)
+ gen/Network/AWS/EMR/ListInstances.hs view
@@ -0,0 +1,162 @@+{-# 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.EMR.ListInstances+-- 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)++-- | Provides information about the cluster instances that Amazon EMR provisions+-- on behalf of a user when it creates the cluster. For example, this+-- operation indicates when the EC2 instances reach the Ready state, when+-- instances become available to Amazon EMR to use for jobs, and the IP+-- addresses for cluster instances, etc.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_ListInstances.html>+module Network.AWS.EMR.ListInstances+ (+ -- * Request+ ListInstances+ -- ** Request constructor+ , listInstances+ -- ** Request lenses+ , liClusterId+ , liInstanceGroupId+ , liInstanceGroupTypes+ , liMarker++ -- * Response+ , ListInstancesResponse+ -- ** Response constructor+ , listInstancesResponse+ -- ** Response lenses+ , lirInstances+ , lirMarker+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data ListInstances = ListInstances+ { _liClusterId :: Text+ , _liInstanceGroupId :: Maybe Text+ , _liInstanceGroupTypes :: List "InstanceGroupTypes" Text+ , _liMarker :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'ListInstances' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'liClusterId' @::@ 'Text'+--+-- * 'liInstanceGroupId' @::@ 'Maybe' 'Text'+--+-- * 'liInstanceGroupTypes' @::@ ['Text']+--+-- * 'liMarker' @::@ 'Maybe' 'Text'+--+listInstances :: Text -- ^ 'liClusterId'+ -> ListInstances+listInstances p1 = ListInstances+ { _liClusterId = p1+ , _liInstanceGroupId = Nothing+ , _liInstanceGroupTypes = mempty+ , _liMarker = Nothing+ }++-- | The identifier of the cluster for which to list the instances.+liClusterId :: Lens' ListInstances Text+liClusterId = lens _liClusterId (\s a -> s { _liClusterId = a })++-- | The identifier of the instance group for which to list the instances.+liInstanceGroupId :: Lens' ListInstances (Maybe Text)+liInstanceGroupId =+ lens _liInstanceGroupId (\s a -> s { _liInstanceGroupId = a })++-- | The type of instance group for which to list the instances.+liInstanceGroupTypes :: Lens' ListInstances [Text]+liInstanceGroupTypes =+ lens _liInstanceGroupTypes (\s a -> s { _liInstanceGroupTypes = a })+ . _List++-- | The pagination token that indicates the next set of results to retrieve.+liMarker :: Lens' ListInstances (Maybe Text)+liMarker = lens _liMarker (\s a -> s { _liMarker = a })++data ListInstancesResponse = ListInstancesResponse+ { _lirInstances :: List "Instances" Instance+ , _lirMarker :: Maybe Text+ } deriving (Eq, Show)++-- | 'ListInstancesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lirInstances' @::@ ['Instance']+--+-- * 'lirMarker' @::@ 'Maybe' 'Text'+--+listInstancesResponse :: ListInstancesResponse+listInstancesResponse = ListInstancesResponse+ { _lirInstances = mempty+ , _lirMarker = Nothing+ }++-- | The list of instances for the cluster and given filters.+lirInstances :: Lens' ListInstancesResponse [Instance]+lirInstances = lens _lirInstances (\s a -> s { _lirInstances = a }) . _List++-- | The pagination token that indicates the next set of results to retrieve.+lirMarker :: Lens' ListInstancesResponse (Maybe Text)+lirMarker = lens _lirMarker (\s a -> s { _lirMarker = a })++instance ToPath ListInstances where+ toPath = const "/"++instance ToQuery ListInstances where+ toQuery = const mempty++instance ToHeaders ListInstances++instance ToJSON ListInstances where+ toJSON ListInstances{..} = object+ [ "ClusterId" .= _liClusterId+ , "InstanceGroupId" .= _liInstanceGroupId+ , "InstanceGroupTypes" .= _liInstanceGroupTypes+ , "Marker" .= _liMarker+ ]++instance AWSRequest ListInstances where+ type Sv ListInstances = EMR+ type Rs ListInstances = ListInstancesResponse++ request = post "ListInstances"+ response = jsonResponse++instance FromJSON ListInstancesResponse where+ parseJSON = withObject "ListInstancesResponse" $ \o -> ListInstancesResponse+ <$> o .: "Instances"+ <*> o .:? "Marker"++instance AWSPager ListInstances where+ page rq rs+ | stop (rq ^. liMarker) = Nothing+ | otherwise = (\x -> rq & liMarker ?~ x)+ <$> (rs ^. lirMarker)
+ gen/Network/AWS/EMR/ListSteps.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.EMR.ListSteps+-- 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)++-- | Provides a list of steps for the cluster.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_ListSteps.html>+module Network.AWS.EMR.ListSteps+ (+ -- * Request+ ListSteps+ -- ** Request constructor+ , listSteps+ -- ** Request lenses+ , lsClusterId+ , lsMarker+ , lsStepStates++ -- * Response+ , ListStepsResponse+ -- ** Response constructor+ , listStepsResponse+ -- ** Response lenses+ , lsrMarker+ , lsrSteps+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data ListSteps = ListSteps+ { _lsClusterId :: Text+ , _lsMarker :: Maybe Text+ , _lsStepStates :: List "StepStates" Text+ } deriving (Eq, Ord, Show)++-- | 'ListSteps' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lsClusterId' @::@ 'Text'+--+-- * 'lsMarker' @::@ 'Maybe' 'Text'+--+-- * 'lsStepStates' @::@ ['Text']+--+listSteps :: Text -- ^ 'lsClusterId'+ -> ListSteps+listSteps p1 = ListSteps+ { _lsClusterId = p1+ , _lsStepStates = mempty+ , _lsMarker = Nothing+ }++-- | The identifier of the cluster for which to list the steps.+lsClusterId :: Lens' ListSteps Text+lsClusterId = lens _lsClusterId (\s a -> s { _lsClusterId = a })++-- | The pagination token that indicates the next set of results to retrieve.+lsMarker :: Lens' ListSteps (Maybe Text)+lsMarker = lens _lsMarker (\s a -> s { _lsMarker = a })++-- | The filter to limit the step list based on certain states.+lsStepStates :: Lens' ListSteps [Text]+lsStepStates = lens _lsStepStates (\s a -> s { _lsStepStates = a }) . _List++data ListStepsResponse = ListStepsResponse+ { _lsrMarker :: Maybe Text+ , _lsrSteps :: List "Steps" StepSummary+ } deriving (Eq, Show)++-- | 'ListStepsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lsrMarker' @::@ 'Maybe' 'Text'+--+-- * 'lsrSteps' @::@ ['StepSummary']+--+listStepsResponse :: ListStepsResponse+listStepsResponse = ListStepsResponse+ { _lsrSteps = mempty+ , _lsrMarker = Nothing+ }++-- | The pagination token that indicates the next set of results to retrieve.+lsrMarker :: Lens' ListStepsResponse (Maybe Text)+lsrMarker = lens _lsrMarker (\s a -> s { _lsrMarker = a })++-- | The filtered list of steps for the cluster.+lsrSteps :: Lens' ListStepsResponse [StepSummary]+lsrSteps = lens _lsrSteps (\s a -> s { _lsrSteps = a }) . _List++instance ToPath ListSteps where+ toPath = const "/"++instance ToQuery ListSteps where+ toQuery = const mempty++instance ToHeaders ListSteps++instance ToJSON ListSteps where+ toJSON ListSteps{..} = object+ [ "ClusterId" .= _lsClusterId+ , "StepStates" .= _lsStepStates+ , "Marker" .= _lsMarker+ ]++instance AWSRequest ListSteps where+ type Sv ListSteps = EMR+ type Rs ListSteps = ListStepsResponse++ request = post "ListSteps"+ response = jsonResponse++instance FromJSON ListStepsResponse where+ parseJSON = withObject "ListStepsResponse" $ \o -> ListStepsResponse+ <$> o .:? "Marker"+ <*> o .: "Steps"++instance AWSPager ListSteps where+ page rq rs+ | stop (rq ^. lsMarker) = Nothing+ | otherwise = (\x -> rq & lsMarker ?~ x)+ <$> (rs ^. lsrMarker)
+ gen/Network/AWS/EMR/ModifyInstanceGroups.hs view
@@ -0,0 +1,101 @@+{-# 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.EMR.ModifyInstanceGroups+-- 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)++-- | ModifyInstanceGroups modifies the number of nodes and configuration+-- settings of an instance group. The input parameters include the new target+-- instance count for the group and the instance group ID. The call will+-- either succeed or fail atomically.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_ModifyInstanceGroups.html>+module Network.AWS.EMR.ModifyInstanceGroups+ (+ -- * Request+ ModifyInstanceGroups+ -- ** Request constructor+ , modifyInstanceGroups+ -- ** Request lenses+ , migInstanceGroups++ -- * Response+ , ModifyInstanceGroupsResponse+ -- ** Response constructor+ , modifyInstanceGroupsResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++newtype ModifyInstanceGroups = ModifyInstanceGroups+ { _migInstanceGroups :: List "InstanceGroups" InstanceGroupModifyConfig+ } deriving (Eq, Show, Monoid, Semigroup)++instance GHC.Exts.IsList ModifyInstanceGroups where+ type Item ModifyInstanceGroups = InstanceGroupModifyConfig++ fromList = ModifyInstanceGroups . GHC.Exts.fromList+ toList = GHC.Exts.toList . _migInstanceGroups++-- | 'ModifyInstanceGroups' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'migInstanceGroups' @::@ ['InstanceGroupModifyConfig']+--+modifyInstanceGroups :: ModifyInstanceGroups+modifyInstanceGroups = ModifyInstanceGroups+ { _migInstanceGroups = mempty+ }++-- | Instance groups to change.+migInstanceGroups :: Lens' ModifyInstanceGroups [InstanceGroupModifyConfig]+migInstanceGroups =+ lens _migInstanceGroups (\s a -> s { _migInstanceGroups = a })+ . _List++data ModifyInstanceGroupsResponse = ModifyInstanceGroupsResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'ModifyInstanceGroupsResponse' constructor.+modifyInstanceGroupsResponse :: ModifyInstanceGroupsResponse+modifyInstanceGroupsResponse = ModifyInstanceGroupsResponse++instance ToPath ModifyInstanceGroups where+ toPath = const "/"++instance ToQuery ModifyInstanceGroups where+ toQuery = const mempty++instance ToHeaders ModifyInstanceGroups++instance ToJSON ModifyInstanceGroups where+ toJSON ModifyInstanceGroups{..} = object+ [ "InstanceGroups" .= _migInstanceGroups+ ]++instance AWSRequest ModifyInstanceGroups where+ type Sv ModifyInstanceGroups = EMR+ type Rs ModifyInstanceGroups = ModifyInstanceGroupsResponse++ request = post "ModifyInstanceGroups"+ response = nullResponse ModifyInstanceGroupsResponse
+ gen/Network/AWS/EMR/RemoveTags.hs view
@@ -0,0 +1,106 @@+{-# 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.EMR.RemoveTags+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++-- | Removes tags from an Amazon EMR resource. Tags make it easier to associate+-- clusters in various ways, such as grouping clusters to track your Amazon+-- EMR resource allocation costs. For more information, see Tagging Amazon EMR+-- Resources. The following example removes the stack tag with value Prod from+-- a cluster:.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_RemoveTags.html>+module Network.AWS.EMR.RemoveTags+ (+ -- * Request+ RemoveTags+ -- ** Request constructor+ , removeTags+ -- ** Request lenses+ , rtResourceId+ , rtTagKeys++ -- * Response+ , RemoveTagsResponse+ -- ** Response constructor+ , removeTagsResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data RemoveTags = RemoveTags+ { _rtResourceId :: Text+ , _rtTagKeys :: List "Args" Text+ } deriving (Eq, Ord, Show)++-- | 'RemoveTags' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rtResourceId' @::@ 'Text'+--+-- * 'rtTagKeys' @::@ ['Text']+--+removeTags :: Text -- ^ 'rtResourceId'+ -> RemoveTags+removeTags p1 = RemoveTags+ { _rtResourceId = p1+ , _rtTagKeys = mempty+ }++-- | The Amazon EMR resource identifier from which tags will be removed. This+-- value must be a cluster identifier.+rtResourceId :: Lens' RemoveTags Text+rtResourceId = lens _rtResourceId (\s a -> s { _rtResourceId = a })++-- | A list of tag keys to remove from a resource.+rtTagKeys :: Lens' RemoveTags [Text]+rtTagKeys = lens _rtTagKeys (\s a -> s { _rtTagKeys = a }) . _List++data RemoveTagsResponse = RemoveTagsResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'RemoveTagsResponse' constructor.+removeTagsResponse :: RemoveTagsResponse+removeTagsResponse = RemoveTagsResponse++instance ToPath RemoveTags where+ toPath = const "/"++instance ToQuery RemoveTags where+ toQuery = const mempty++instance ToHeaders RemoveTags++instance ToJSON RemoveTags where+ toJSON RemoveTags{..} = object+ [ "ResourceId" .= _rtResourceId+ , "TagKeys" .= _rtTagKeys+ ]++instance AWSRequest RemoveTags where+ type Sv RemoveTags = EMR+ type Rs RemoveTags = RemoveTagsResponse++ request = post "RemoveTags"+ response = nullResponse RemoveTagsResponse
+ gen/Network/AWS/EMR/RunJobFlow.hs view
@@ -0,0 +1,288 @@+{-# 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.EMR.RunJobFlow+-- 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)++-- | RunJobFlow creates and starts running a new job flow. The job flow will run+-- the steps specified. Once the job flow completes, the cluster is stopped+-- and the HDFS partition is lost. To prevent loss of data, configure the last+-- step of the job flow to store results in Amazon S3. If the+-- JobFlowInstancesConfig KeepJobFlowAliveWhenNoSteps parameter is set to+-- TRUE, the job flow will transition to the WAITING state rather than+-- shutting down once the steps have completed. For additional protection, you+-- can set the JobFlowInstancesConfig TerminationProtected parameter to TRUE+-- to lock the job flow and prevent it from being terminated by API call, user+-- intervention, or in the event of a job flow error. A maximum of 256 steps+-- are allowed in each job flow. If your job flow is long-running (such as a+-- Hive data warehouse) or complex, you may require more than 256 steps to+-- process your data. You can bypass the 256-step limitation in various ways,+-- including using the SSH shell to connect to the master node and submitting+-- queries directly to the software running on the master node, such as Hive+-- and Hadoop. For more information on how to do this, go to Add More than 256+-- Steps to a Job Flow in the Amazon Elastic MapReduce Developer's Guide. For+-- long running job flows, we recommend that you periodically store your+-- results.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_RunJobFlow.html>+module Network.AWS.EMR.RunJobFlow+ (+ -- * Request+ RunJobFlow+ -- ** Request constructor+ , runJobFlow+ -- ** Request lenses+ , rjfAdditionalInfo+ , rjfAmiVersion+ , rjfBootstrapActions+ , rjfInstances+ , rjfJobFlowRole+ , rjfLogUri+ , rjfName+ , rjfNewSupportedProducts+ , rjfServiceRole+ , rjfSteps+ , rjfSupportedProducts+ , rjfTags+ , rjfVisibleToAllUsers++ -- * Response+ , RunJobFlowResponse+ -- ** Response constructor+ , runJobFlowResponse+ -- ** Response lenses+ , rjfrJobFlowId+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data RunJobFlow = RunJobFlow+ { _rjfAdditionalInfo :: Maybe Text+ , _rjfAmiVersion :: Maybe Text+ , _rjfBootstrapActions :: List "BootstrapActions" BootstrapActionConfig+ , _rjfInstances :: JobFlowInstancesConfig+ , _rjfJobFlowRole :: Maybe Text+ , _rjfLogUri :: Maybe Text+ , _rjfName :: Text+ , _rjfNewSupportedProducts :: List "NewSupportedProducts" SupportedProductConfig+ , _rjfServiceRole :: Maybe Text+ , _rjfSteps :: List "Steps" StepConfig+ , _rjfSupportedProducts :: List "SupportedProducts" Text+ , _rjfTags :: List "Tags" Tag+ , _rjfVisibleToAllUsers :: Maybe Bool+ } deriving (Eq, Show)++-- | 'RunJobFlow' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rjfAdditionalInfo' @::@ 'Maybe' 'Text'+--+-- * 'rjfAmiVersion' @::@ 'Maybe' 'Text'+--+-- * 'rjfBootstrapActions' @::@ ['BootstrapActionConfig']+--+-- * 'rjfInstances' @::@ 'JobFlowInstancesConfig'+--+-- * 'rjfJobFlowRole' @::@ 'Maybe' 'Text'+--+-- * 'rjfLogUri' @::@ 'Maybe' 'Text'+--+-- * 'rjfName' @::@ 'Text'+--+-- * 'rjfNewSupportedProducts' @::@ ['SupportedProductConfig']+--+-- * 'rjfServiceRole' @::@ 'Maybe' 'Text'+--+-- * 'rjfSteps' @::@ ['StepConfig']+--+-- * 'rjfSupportedProducts' @::@ ['Text']+--+-- * 'rjfTags' @::@ ['Tag']+--+-- * 'rjfVisibleToAllUsers' @::@ 'Maybe' 'Bool'+--+runJobFlow :: Text -- ^ 'rjfName'+ -> JobFlowInstancesConfig -- ^ 'rjfInstances'+ -> RunJobFlow+runJobFlow p1 p2 = RunJobFlow+ { _rjfName = p1+ , _rjfInstances = p2+ , _rjfLogUri = Nothing+ , _rjfAdditionalInfo = Nothing+ , _rjfAmiVersion = Nothing+ , _rjfSteps = mempty+ , _rjfBootstrapActions = mempty+ , _rjfSupportedProducts = mempty+ , _rjfNewSupportedProducts = mempty+ , _rjfVisibleToAllUsers = Nothing+ , _rjfJobFlowRole = Nothing+ , _rjfServiceRole = Nothing+ , _rjfTags = mempty+ }++-- | A JSON string for selecting additional features.+rjfAdditionalInfo :: Lens' RunJobFlow (Maybe Text)+rjfAdditionalInfo =+ lens _rjfAdditionalInfo (\s a -> s { _rjfAdditionalInfo = a })++-- | The version of the Amazon Machine Image (AMI) to use when launching+-- Amazon EC2 instances in the job flow. The following values are valid:+-- "latest" (uses the latest AMI) The version number of the AMI to use, for+-- example, "2.0" If the AMI supports multiple versions of Hadoop (for+-- example, AMI 1.0 supports both Hadoop 0.18 and 0.20) you can use the+-- JobFlowInstancesConfig HadoopVersion parameter to modify the version of+-- Hadoop from the defaults shown above. For details about the AMI versions+-- currently supported by Amazon Elastic MapReduce, go to AMI Versions+-- Supported in Elastic MapReduce in the Amazon Elastic MapReduce+-- Developer's Guide.+rjfAmiVersion :: Lens' RunJobFlow (Maybe Text)+rjfAmiVersion = lens _rjfAmiVersion (\s a -> s { _rjfAmiVersion = a })++-- | A list of bootstrap actions that will be run before Hadoop is started on+-- the cluster nodes.+rjfBootstrapActions :: Lens' RunJobFlow [BootstrapActionConfig]+rjfBootstrapActions =+ lens _rjfBootstrapActions (\s a -> s { _rjfBootstrapActions = a })+ . _List++-- | A specification of the number and type of Amazon EC2 instances on which+-- to run the job flow.+rjfInstances :: Lens' RunJobFlow JobFlowInstancesConfig+rjfInstances = lens _rjfInstances (\s a -> s { _rjfInstances = a })++-- | An IAM role for the job flow. The EC2 instances of the job flow assume+-- this role. The default role is EMRJobflowDefault. In order to use the+-- default role, you must have already created it using the CLI.+rjfJobFlowRole :: Lens' RunJobFlow (Maybe Text)+rjfJobFlowRole = lens _rjfJobFlowRole (\s a -> s { _rjfJobFlowRole = a })++-- | The location in Amazon S3 to write the log files of the job flow. If a+-- value is not provided, logs are not created.+rjfLogUri :: Lens' RunJobFlow (Maybe Text)+rjfLogUri = lens _rjfLogUri (\s a -> s { _rjfLogUri = a })++-- | The name of the job flow.+rjfName :: Lens' RunJobFlow Text+rjfName = lens _rjfName (\s a -> s { _rjfName = a })++-- | A list of strings that indicates third-party software to use with the job+-- flow that accepts a user argument list. EMR accepts and forwards the+-- argument list to the corresponding installation script as bootstrap+-- action arguments. For more information, see Launch a Job Flow on the MapR+-- Distribution for Hadoop. Currently supported values are: "mapr-m3" -+-- launch the job flow using MapR M3 Edition. "mapr-m5" - launch the job+-- flow using MapR M5 Edition. "mapr" with the user arguments specifying+-- "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or+-- M5 Edition respectively.+rjfNewSupportedProducts :: Lens' RunJobFlow [SupportedProductConfig]+rjfNewSupportedProducts =+ lens _rjfNewSupportedProducts (\s a -> s { _rjfNewSupportedProducts = a })+ . _List++-- | The IAM role that will be assumed by the Amazon EMR service to access AWS+-- resources on your behalf.+rjfServiceRole :: Lens' RunJobFlow (Maybe Text)+rjfServiceRole = lens _rjfServiceRole (\s a -> s { _rjfServiceRole = a })++-- | A list of steps to be executed by the job flow.+rjfSteps :: Lens' RunJobFlow [StepConfig]+rjfSteps = lens _rjfSteps (\s a -> s { _rjfSteps = a }) . _List++-- | A list of strings that indicates third-party software to use with the job+-- flow. For more information, go to Use Third Party Applications with+-- Amazon EMR. Currently supported values are: "mapr-m3" - launch the job+-- flow using MapR M3 Edition. "mapr-m5" - launch the job flow using MapR M5+-- Edition.+rjfSupportedProducts :: Lens' RunJobFlow [Text]+rjfSupportedProducts =+ lens _rjfSupportedProducts (\s a -> s { _rjfSupportedProducts = a })+ . _List++-- | A list of tags to associate with a cluster and propagate to Amazon EC2+-- instances.+rjfTags :: Lens' RunJobFlow [Tag]+rjfTags = lens _rjfTags (\s a -> s { _rjfTags = a }) . _List++-- | Whether the job flow is visible to all IAM users of the AWS account+-- associated with the job flow. If this value is set to true, all IAM users+-- of that AWS account can view and (if they have the proper policy+-- permissions set) manage the job flow. If it is set to false, only the IAM+-- user that created the job flow can view and manage it.+rjfVisibleToAllUsers :: Lens' RunJobFlow (Maybe Bool)+rjfVisibleToAllUsers =+ lens _rjfVisibleToAllUsers (\s a -> s { _rjfVisibleToAllUsers = a })++newtype RunJobFlowResponse = RunJobFlowResponse+ { _rjfrJobFlowId :: Maybe Text+ } deriving (Eq, Ord, Show, Monoid)++-- | 'RunJobFlowResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rjfrJobFlowId' @::@ 'Maybe' 'Text'+--+runJobFlowResponse :: RunJobFlowResponse+runJobFlowResponse = RunJobFlowResponse+ { _rjfrJobFlowId = Nothing+ }++-- | An unique identifier for the job flow.+rjfrJobFlowId :: Lens' RunJobFlowResponse (Maybe Text)+rjfrJobFlowId = lens _rjfrJobFlowId (\s a -> s { _rjfrJobFlowId = a })++instance ToPath RunJobFlow where+ toPath = const "/"++instance ToQuery RunJobFlow where+ toQuery = const mempty++instance ToHeaders RunJobFlow++instance ToJSON RunJobFlow where+ toJSON RunJobFlow{..} = object+ [ "Name" .= _rjfName+ , "LogUri" .= _rjfLogUri+ , "AdditionalInfo" .= _rjfAdditionalInfo+ , "AmiVersion" .= _rjfAmiVersion+ , "Instances" .= _rjfInstances+ , "Steps" .= _rjfSteps+ , "BootstrapActions" .= _rjfBootstrapActions+ , "SupportedProducts" .= _rjfSupportedProducts+ , "NewSupportedProducts" .= _rjfNewSupportedProducts+ , "VisibleToAllUsers" .= _rjfVisibleToAllUsers+ , "JobFlowRole" .= _rjfJobFlowRole+ , "ServiceRole" .= _rjfServiceRole+ , "Tags" .= _rjfTags+ ]++instance AWSRequest RunJobFlow where+ type Sv RunJobFlow = EMR+ type Rs RunJobFlow = RunJobFlowResponse++ request = post "RunJobFlow"+ response = jsonResponse++instance FromJSON RunJobFlowResponse where+ parseJSON = withObject "RunJobFlowResponse" $ \o -> RunJobFlowResponse+ <$> o .:? "JobFlowId"
+ gen/Network/AWS/EMR/SetTerminationProtection.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.EMR.SetTerminationProtection+-- 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)++-- | SetTerminationProtection locks a job flow so the Amazon EC2 instances in+-- the cluster cannot be terminated by user intervention, an API call, or in+-- the event of a job-flow error. The cluster still terminates upon successful+-- completion of the job flow. Calling SetTerminationProtection on a job flow+-- is analogous to calling the Amazon EC2 DisableAPITermination API on all of+-- the EC2 instances in a cluster. SetTerminationProtection is used to prevent+-- accidental termination of a job flow and to ensure that in the event of an+-- error, the instances will persist so you can recover any data stored in+-- their ephemeral instance storage. To terminate a job flow that has been+-- locked by setting SetTerminationProtection to true, you must first unlock+-- the job flow by a subsequent call to SetTerminationProtection in which you+-- set the value to false. For more information, go to Protecting a Job Flow+-- from Termination in the Amazon Elastic MapReduce Developer's Guide.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_SetTerminationProtection.html>+module Network.AWS.EMR.SetTerminationProtection+ (+ -- * Request+ SetTerminationProtection+ -- ** Request constructor+ , setTerminationProtection+ -- ** Request lenses+ , stpJobFlowIds+ , stpTerminationProtected++ -- * Response+ , SetTerminationProtectionResponse+ -- ** Response constructor+ , setTerminationProtectionResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data SetTerminationProtection = SetTerminationProtection+ { _stpJobFlowIds :: List "Args" Text+ , _stpTerminationProtected :: Bool+ } deriving (Eq, Ord, Show)++-- | 'SetTerminationProtection' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'stpJobFlowIds' @::@ ['Text']+--+-- * 'stpTerminationProtected' @::@ 'Bool'+--+setTerminationProtection :: Bool -- ^ 'stpTerminationProtected'+ -> SetTerminationProtection+setTerminationProtection p1 = SetTerminationProtection+ { _stpTerminationProtected = p1+ , _stpJobFlowIds = mempty+ }++-- | A list of strings that uniquely identify the job flows to protect. This+-- identifier is returned by RunJobFlow and can also be obtained from+-- DescribeJobFlows .+stpJobFlowIds :: Lens' SetTerminationProtection [Text]+stpJobFlowIds = lens _stpJobFlowIds (\s a -> s { _stpJobFlowIds = a }) . _List++-- | A Boolean that indicates whether to protect the job flow and prevent the+-- Amazon EC2 instances in the cluster from shutting down due to API calls,+-- user intervention, or job-flow error.+stpTerminationProtected :: Lens' SetTerminationProtection Bool+stpTerminationProtected =+ lens _stpTerminationProtected (\s a -> s { _stpTerminationProtected = a })++data SetTerminationProtectionResponse = SetTerminationProtectionResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'SetTerminationProtectionResponse' constructor.+setTerminationProtectionResponse :: SetTerminationProtectionResponse+setTerminationProtectionResponse = SetTerminationProtectionResponse++instance ToPath SetTerminationProtection where+ toPath = const "/"++instance ToQuery SetTerminationProtection where+ toQuery = const mempty++instance ToHeaders SetTerminationProtection++instance ToJSON SetTerminationProtection where+ toJSON SetTerminationProtection{..} = object+ [ "JobFlowIds" .= _stpJobFlowIds+ , "TerminationProtected" .= _stpTerminationProtected+ ]++instance AWSRequest SetTerminationProtection where+ type Sv SetTerminationProtection = EMR+ type Rs SetTerminationProtection = SetTerminationProtectionResponse++ request = post "SetTerminationProtection"+ response = nullResponse SetTerminationProtectionResponse
+ gen/Network/AWS/EMR/SetVisibleToAllUsers.hs view
@@ -0,0 +1,111 @@+{-# 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.EMR.SetVisibleToAllUsers+-- 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)++-- | Sets whether all AWS Identity and Access Management (IAM) users under your+-- account can access the specified job flows. This action works on running+-- job flows. You can also set the visibility of a job flow when you launch it+-- using the VisibleToAllUsers parameter of RunJobFlow. The+-- SetVisibleToAllUsers action can be called only by an IAM user who created+-- the job flow or the AWS account that owns the job flow.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_SetVisibleToAllUsers.html>+module Network.AWS.EMR.SetVisibleToAllUsers+ (+ -- * Request+ SetVisibleToAllUsers+ -- ** Request constructor+ , setVisibleToAllUsers+ -- ** Request lenses+ , svtauJobFlowIds+ , svtauVisibleToAllUsers++ -- * Response+ , SetVisibleToAllUsersResponse+ -- ** Response constructor+ , setVisibleToAllUsersResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++data SetVisibleToAllUsers = SetVisibleToAllUsers+ { _svtauJobFlowIds :: List "Args" Text+ , _svtauVisibleToAllUsers :: Bool+ } deriving (Eq, Ord, Show)++-- | 'SetVisibleToAllUsers' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'svtauJobFlowIds' @::@ ['Text']+--+-- * 'svtauVisibleToAllUsers' @::@ 'Bool'+--+setVisibleToAllUsers :: Bool -- ^ 'svtauVisibleToAllUsers'+ -> SetVisibleToAllUsers+setVisibleToAllUsers p1 = SetVisibleToAllUsers+ { _svtauVisibleToAllUsers = p1+ , _svtauJobFlowIds = mempty+ }++-- | Identifiers of the job flows to receive the new visibility setting.+svtauJobFlowIds :: Lens' SetVisibleToAllUsers [Text]+svtauJobFlowIds = lens _svtauJobFlowIds (\s a -> s { _svtauJobFlowIds = a }) . _List++-- | Whether the specified job flows are visible to all IAM users of the AWS+-- account associated with the job flow. If this value is set to True, all+-- IAM users of that AWS account can view and, if they have the proper IAM+-- policy permissions set, manage the job flows. If it is set to False, only+-- the IAM user that created a job flow can view and manage it.+svtauVisibleToAllUsers :: Lens' SetVisibleToAllUsers Bool+svtauVisibleToAllUsers =+ lens _svtauVisibleToAllUsers (\s a -> s { _svtauVisibleToAllUsers = a })++data SetVisibleToAllUsersResponse = SetVisibleToAllUsersResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'SetVisibleToAllUsersResponse' constructor.+setVisibleToAllUsersResponse :: SetVisibleToAllUsersResponse+setVisibleToAllUsersResponse = SetVisibleToAllUsersResponse++instance ToPath SetVisibleToAllUsers where+ toPath = const "/"++instance ToQuery SetVisibleToAllUsers where+ toQuery = const mempty++instance ToHeaders SetVisibleToAllUsers++instance ToJSON SetVisibleToAllUsers where+ toJSON SetVisibleToAllUsers{..} = object+ [ "JobFlowIds" .= _svtauJobFlowIds+ , "VisibleToAllUsers" .= _svtauVisibleToAllUsers+ ]++instance AWSRequest SetVisibleToAllUsers where+ type Sv SetVisibleToAllUsers = EMR+ type Rs SetVisibleToAllUsers = SetVisibleToAllUsersResponse++ request = post "SetVisibleToAllUsers"+ response = nullResponse SetVisibleToAllUsersResponse
+ gen/Network/AWS/EMR/TerminateJobFlows.hs view
@@ -0,0 +1,103 @@+{-# 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.EMR.TerminateJobFlows+-- 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)++-- | TerminateJobFlows shuts a list of job flows down. When a job flow is shut+-- down, any step not yet completed is canceled and the EC2 instances on which+-- the job flow is running are stopped. Any log files not already saved are+-- uploaded to Amazon S3 if a LogUri was specified when the job flow was+-- created. The call to TerminateJobFlows is asynchronous. Depending on the+-- configuration of the job flow, it may take up to 5-20 minutes for the job+-- flow to completely terminate and release allocated resources, such as+-- Amazon EC2 instances.+--+-- <http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_TerminateJobFlows.html>+module Network.AWS.EMR.TerminateJobFlows+ (+ -- * Request+ TerminateJobFlows+ -- ** Request constructor+ , terminateJobFlows+ -- ** Request lenses+ , tjfJobFlowIds++ -- * Response+ , TerminateJobFlowsResponse+ -- ** Response constructor+ , terminateJobFlowsResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.EMR.Types+import qualified GHC.Exts++newtype TerminateJobFlows = TerminateJobFlows+ { _tjfJobFlowIds :: List "Args" Text+ } deriving (Eq, Ord, Show, Monoid, Semigroup)++instance GHC.Exts.IsList TerminateJobFlows where+ type Item TerminateJobFlows = Text++ fromList = TerminateJobFlows . GHC.Exts.fromList+ toList = GHC.Exts.toList . _tjfJobFlowIds++-- | 'TerminateJobFlows' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tjfJobFlowIds' @::@ ['Text']+--+terminateJobFlows :: TerminateJobFlows+terminateJobFlows = TerminateJobFlows+ { _tjfJobFlowIds = mempty+ }++-- | A list of job flows to be shutdown.+tjfJobFlowIds :: Lens' TerminateJobFlows [Text]+tjfJobFlowIds = lens _tjfJobFlowIds (\s a -> s { _tjfJobFlowIds = a }) . _List++data TerminateJobFlowsResponse = TerminateJobFlowsResponse+ deriving (Eq, Ord, Show, Generic)++-- | 'TerminateJobFlowsResponse' constructor.+terminateJobFlowsResponse :: TerminateJobFlowsResponse+terminateJobFlowsResponse = TerminateJobFlowsResponse++instance ToPath TerminateJobFlows where+ toPath = const "/"++instance ToQuery TerminateJobFlows where+ toQuery = const mempty++instance ToHeaders TerminateJobFlows++instance ToJSON TerminateJobFlows where+ toJSON TerminateJobFlows{..} = object+ [ "JobFlowIds" .= _tjfJobFlowIds+ ]++instance AWSRequest TerminateJobFlows where+ type Sv TerminateJobFlows = EMR+ type Rs TerminateJobFlows = TerminateJobFlowsResponse++ request = post "TerminateJobFlows"+ response = nullResponse TerminateJobFlowsResponse
+ gen/Network/AWS/EMR/Types.hs view
@@ -0,0 +1,3559 @@+{-# 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.EMR.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.EMR.Types+ (+ -- * Service+ EMR+ -- ** Error+ , JSONError++ -- * MarketType+ , MarketType (..)++ -- * InstanceGroupConfig+ , InstanceGroupConfig+ , instanceGroupConfig+ , igcBidPrice+ , igcInstanceCount+ , igcInstanceRole+ , igcInstanceType+ , igcMarket+ , igcName++ -- * InstanceStateChangeReason+ , InstanceStateChangeReason+ , instanceStateChangeReason+ , iscrCode+ , iscrMessage++ -- * JobFlowDetail+ , JobFlowDetail+ , jobFlowDetail+ , jfdAmiVersion+ , jfdBootstrapActions+ , jfdExecutionStatusDetail+ , jfdInstances+ , jfdJobFlowId+ , jfdJobFlowRole+ , jfdLogUri+ , jfdName+ , jfdServiceRole+ , jfdSteps+ , jfdSupportedProducts+ , jfdVisibleToAllUsers++ -- * KeyValue+ , KeyValue+ , keyValue+ , kvKey+ , kvValue++ -- * SupportedProductConfig+ , SupportedProductConfig+ , supportedProductConfig+ , spcArgs+ , spcName++ -- * Command+ , Command+ , command+ , cArgs+ , cName+ , cScriptPath++ -- * StepExecutionState+ , StepExecutionState (..)++ -- * ActionOnFailure+ , ActionOnFailure (..)++ -- * ClusterStateChangeReason+ , ClusterStateChangeReason+ , clusterStateChangeReason+ , cscrCode+ , cscrMessage++ -- * Tag+ , Tag+ , tag+ , tagKey+ , tagValue++ -- * Application+ , Application+ , application+ , aAdditionalInfo+ , aArgs+ , aName+ , aVersion++ -- * JobFlowExecutionStatusDetail+ , JobFlowExecutionStatusDetail+ , jobFlowExecutionStatusDetail+ , jfesdCreationDateTime+ , jfesdEndDateTime+ , jfesdLastStateChangeReason+ , jfesdReadyDateTime+ , jfesdStartDateTime+ , jfesdState++ -- * InstanceGroupStatus+ , InstanceGroupStatus+ , instanceGroupStatus+ , igsState+ , igsStateChangeReason+ , igsTimeline++ -- * Cluster+ , Cluster+ , cluster+ , c1Applications+ , c1AutoTerminate+ , c1Ec2InstanceAttributes+ , c1Id+ , c1LogUri+ , c1Name+ , c1RequestedAmiVersion+ , c1RunningAmiVersion+ , c1ServiceRole+ , c1Status+ , c1Tags+ , c1TerminationProtected+ , c1VisibleToAllUsers++ -- * InstanceTimeline+ , InstanceTimeline+ , instanceTimeline+ , itCreationDateTime+ , itEndDateTime+ , itReadyDateTime++ -- * Ec2InstanceAttributes+ , Ec2InstanceAttributes+ , ec2InstanceAttributes+ , eiaEc2AvailabilityZone+ , eiaEc2KeyName+ , eiaEc2SubnetId+ , eiaIamInstanceProfile++ -- * StepStateChangeReasonCode+ , StepStateChangeReasonCode (..)++ -- * ClusterState+ , ClusterState (..)++ -- * HadoopStepConfig+ , HadoopStepConfig+ , hadoopStepConfig+ , hscArgs+ , hscJar+ , hscMainClass+ , hscProperties++ -- * JobFlowExecutionState+ , JobFlowExecutionState (..)++ -- * StepDetail+ , StepDetail+ , stepDetail+ , sdExecutionStatusDetail+ , sdStepConfig++ -- * InstanceGroupStateChangeReason+ , InstanceGroupStateChangeReason+ , instanceGroupStateChangeReason+ , igscrCode+ , igscrMessage++ -- * InstanceGroupType+ , InstanceGroupType (..)++ -- * InstanceGroupStateChangeReasonCode+ , InstanceGroupStateChangeReasonCode (..)++ -- * StepStatus+ , StepStatus+ , stepStatus+ , ssState+ , ssStateChangeReason+ , ssTimeline++ -- * StepSummary+ , StepSummary+ , stepSummary+ , ssId+ , ssName+ , ssStatus++ -- * InstanceGroupState+ , InstanceGroupState (..)++ -- * StepTimeline+ , StepTimeline+ , stepTimeline+ , stCreationDateTime+ , stEndDateTime+ , stStartDateTime++ -- * PlacementType+ , PlacementType+ , placementType+ , ptAvailabilityZone++ -- * HadoopJarStepConfig+ , HadoopJarStepConfig+ , hadoopJarStepConfig+ , hjscArgs+ , hjscJar+ , hjscMainClass+ , hjscProperties++ -- * InstanceGroupModifyConfig+ , InstanceGroupModifyConfig+ , instanceGroupModifyConfig+ , igmcEC2InstanceIdsToTerminate+ , igmcInstanceCount+ , igmcInstanceGroupId++ -- * InstanceGroupDetail+ , InstanceGroupDetail+ , instanceGroupDetail+ , igdBidPrice+ , igdCreationDateTime+ , igdEndDateTime+ , igdInstanceGroupId+ , igdInstanceRequestCount+ , igdInstanceRole+ , igdInstanceRunningCount+ , igdInstanceType+ , igdLastStateChangeReason+ , igdMarket+ , igdName+ , igdReadyDateTime+ , igdStartDateTime+ , igdState++ -- * StepStateChangeReason+ , StepStateChangeReason+ , stepStateChangeReason+ , sscrCode+ , sscrMessage++ -- * ClusterStateChangeReasonCode+ , ClusterStateChangeReasonCode (..)++ -- * Step+ , Step+ , step+ , sActionOnFailure+ , sConfig+ , sId+ , sName+ , sStatus++ -- * StepState+ , StepState (..)++ -- * InstanceGroupTimeline+ , InstanceGroupTimeline+ , instanceGroupTimeline+ , igtCreationDateTime+ , igtEndDateTime+ , igtReadyDateTime++ -- * BootstrapActionDetail+ , BootstrapActionDetail+ , bootstrapActionDetail+ , badBootstrapActionConfig++ -- * StepExecutionStatusDetail+ , StepExecutionStatusDetail+ , stepExecutionStatusDetail+ , sesdCreationDateTime+ , sesdEndDateTime+ , sesdLastStateChangeReason+ , sesdStartDateTime+ , sesdState++ -- * InstanceStatus+ , InstanceStatus+ , instanceStatus+ , isState+ , isStateChangeReason+ , isTimeline++ -- * InstanceRoleType+ , InstanceRoleType (..)++ -- * JobFlowInstancesConfig+ , JobFlowInstancesConfig+ , jobFlowInstancesConfig+ , jficEc2KeyName+ , jficEc2SubnetId+ , jficHadoopVersion+ , jficInstanceCount+ , jficInstanceGroups+ , jficKeepJobFlowAliveWhenNoSteps+ , jficMasterInstanceType+ , jficPlacement+ , jficSlaveInstanceType+ , jficTerminationProtected++ -- * StepConfig+ , StepConfig+ , stepConfig+ , scActionOnFailure+ , scHadoopJarStep+ , scName++ -- * InstanceGroup+ , InstanceGroup+ , instanceGroup+ , igBidPrice+ , igId+ , igInstanceGroupType+ , igInstanceType+ , igMarket+ , igName+ , igRequestedInstanceCount+ , igRunningInstanceCount+ , igStatus++ -- * BootstrapActionConfig+ , BootstrapActionConfig+ , bootstrapActionConfig+ , bacName+ , bacScriptBootstrapAction++ -- * ClusterSummary+ , ClusterSummary+ , clusterSummary+ , csId+ , csName+ , csStatus++ -- * JobFlowInstancesDetail+ , JobFlowInstancesDetail+ , jobFlowInstancesDetail+ , jfidEc2KeyName+ , jfidEc2SubnetId+ , jfidHadoopVersion+ , jfidInstanceCount+ , jfidInstanceGroups+ , jfidKeepJobFlowAliveWhenNoSteps+ , jfidMasterInstanceId+ , jfidMasterInstanceType+ , jfidMasterPublicDnsName+ , jfidNormalizedInstanceHours+ , jfidPlacement+ , jfidSlaveInstanceType+ , jfidTerminationProtected++ -- * ClusterStatus+ , ClusterStatus+ , clusterStatus+ , csState+ , csStateChangeReason+ , csTimeline++ -- * InstanceState+ , InstanceState (..)++ -- * ClusterTimeline+ , ClusterTimeline+ , clusterTimeline+ , ctCreationDateTime+ , ctEndDateTime+ , ctReadyDateTime++ -- * InstanceStateChangeReasonCode+ , InstanceStateChangeReasonCode (..)++ -- * Instance+ , Instance+ , instance'+ , iEc2InstanceId+ , iId+ , iPrivateDnsName+ , iPrivateIpAddress+ , iPublicDnsName+ , iPublicIpAddress+ , iStatus++ -- * ScriptBootstrapActionConfig+ , ScriptBootstrapActionConfig+ , scriptBootstrapActionConfig+ , sbacArgs+ , sbacPath+ ) where++import Data.Char (isUpper)+import Network.AWS.Error+import Network.AWS.Prelude+import Network.AWS.Signing.V4+import qualified GHC.Exts++-- | Version @2009-03-31@ of the Amazon Elastic MapReduce service.+data EMR++instance AWSService EMR where+ type Sg EMR = V4+ type Er EMR = JSONError++ service = Service+ { _svcEndpoint = regional+ , _svcAbbrev = "EMR"+ , _svcPrefix = "elasticmapreduce"+ , _svcVersion = "2009-03-31"+ , _svcTargetPrefix = Just "ElasticMapReduce"+ , _svcJSONVersion = Just "1.1"+ }++ handle = jsonError statusSuccess++data MarketType+ = OnDemand -- ^ ON_DEMAND+ | Spot -- ^ SPOT+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable MarketType++instance FromText MarketType where+ parser = match "ON_DEMAND" OnDemand+ <|> match "SPOT" Spot++instance ToText MarketType where+ toText = \case+ OnDemand -> "ON_DEMAND"+ Spot -> "SPOT"++instance FromJSON MarketType where+ parseJSON = parseJSONText "MarketType"++instance ToJSON MarketType where+ toJSON = toJSONText++data InstanceGroupConfig = InstanceGroupConfig+ { _igcBidPrice :: Maybe Text+ , _igcInstanceCount :: Int+ , _igcInstanceRole :: Text+ , _igcInstanceType :: Text+ , _igcMarket :: Maybe Text+ , _igcName :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'InstanceGroupConfig' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'igcBidPrice' @::@ 'Maybe' 'Text'+--+-- * 'igcInstanceCount' @::@ 'Int'+--+-- * 'igcInstanceRole' @::@ 'Text'+--+-- * 'igcInstanceType' @::@ 'Text'+--+-- * 'igcMarket' @::@ 'Maybe' 'Text'+--+-- * 'igcName' @::@ 'Maybe' 'Text'+--+instanceGroupConfig :: Text -- ^ 'igcInstanceRole'+ -> Text -- ^ 'igcInstanceType'+ -> Int -- ^ 'igcInstanceCount'+ -> InstanceGroupConfig+instanceGroupConfig p1 p2 p3 = InstanceGroupConfig+ { _igcInstanceRole = p1+ , _igcInstanceType = p2+ , _igcInstanceCount = p3+ , _igcName = Nothing+ , _igcMarket = Nothing+ , _igcBidPrice = Nothing+ }++-- | Bid price for each Amazon EC2 instance in the instance group when+-- launching nodes as Spot Instances, expressed in USD.+igcBidPrice :: Lens' InstanceGroupConfig (Maybe Text)+igcBidPrice = lens _igcBidPrice (\s a -> s { _igcBidPrice = a })++-- | Target number of instances for the instance group.+igcInstanceCount :: Lens' InstanceGroupConfig Int+igcInstanceCount = lens _igcInstanceCount (\s a -> s { _igcInstanceCount = a })++-- | The role of the instance group in the cluster.+igcInstanceRole :: Lens' InstanceGroupConfig Text+igcInstanceRole = lens _igcInstanceRole (\s a -> s { _igcInstanceRole = a })++-- | The Amazon EC2 instance type for all instances in the instance group.+igcInstanceType :: Lens' InstanceGroupConfig Text+igcInstanceType = lens _igcInstanceType (\s a -> s { _igcInstanceType = a })++-- | Market type of the Amazon EC2 instances used to create a cluster node.+igcMarket :: Lens' InstanceGroupConfig (Maybe Text)+igcMarket = lens _igcMarket (\s a -> s { _igcMarket = a })++-- | Friendly name given to the instance group.+igcName :: Lens' InstanceGroupConfig (Maybe Text)+igcName = lens _igcName (\s a -> s { _igcName = a })++instance FromJSON InstanceGroupConfig where+ parseJSON = withObject "InstanceGroupConfig" $ \o -> InstanceGroupConfig+ <$> o .:? "BidPrice"+ <*> o .: "InstanceCount"+ <*> o .: "InstanceRole"+ <*> o .: "InstanceType"+ <*> o .:? "Market"+ <*> o .:? "Name"++instance ToJSON InstanceGroupConfig where+ toJSON InstanceGroupConfig{..} = object+ [ "Name" .= _igcName+ , "Market" .= _igcMarket+ , "InstanceRole" .= _igcInstanceRole+ , "BidPrice" .= _igcBidPrice+ , "InstanceType" .= _igcInstanceType+ , "InstanceCount" .= _igcInstanceCount+ ]++data InstanceStateChangeReason = InstanceStateChangeReason+ { _iscrCode :: Maybe Text+ , _iscrMessage :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'InstanceStateChangeReason' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'iscrCode' @::@ 'Maybe' 'Text'+--+-- * 'iscrMessage' @::@ 'Maybe' 'Text'+--+instanceStateChangeReason :: InstanceStateChangeReason+instanceStateChangeReason = InstanceStateChangeReason+ { _iscrCode = Nothing+ , _iscrMessage = Nothing+ }++-- | The programmable code for the state change reason.+iscrCode :: Lens' InstanceStateChangeReason (Maybe Text)+iscrCode = lens _iscrCode (\s a -> s { _iscrCode = a })++-- | The status change reason description.+iscrMessage :: Lens' InstanceStateChangeReason (Maybe Text)+iscrMessage = lens _iscrMessage (\s a -> s { _iscrMessage = a })++instance FromJSON InstanceStateChangeReason where+ parseJSON = withObject "InstanceStateChangeReason" $ \o -> InstanceStateChangeReason+ <$> o .:? "Code"+ <*> o .:? "Message"++instance ToJSON InstanceStateChangeReason where+ toJSON InstanceStateChangeReason{..} = object+ [ "Code" .= _iscrCode+ , "Message" .= _iscrMessage+ ]++data JobFlowDetail = JobFlowDetail+ { _jfdAmiVersion :: Maybe Text+ , _jfdBootstrapActions :: List "BootstrapActions" BootstrapActionDetail+ , _jfdExecutionStatusDetail :: JobFlowExecutionStatusDetail+ , _jfdInstances :: JobFlowInstancesDetail+ , _jfdJobFlowId :: Text+ , _jfdJobFlowRole :: Maybe Text+ , _jfdLogUri :: Maybe Text+ , _jfdName :: Text+ , _jfdServiceRole :: Maybe Text+ , _jfdSteps :: List "Steps" StepDetail+ , _jfdSupportedProducts :: List "SupportedProducts" Text+ , _jfdVisibleToAllUsers :: Maybe Bool+ } deriving (Eq, Show)++-- | 'JobFlowDetail' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'jfdAmiVersion' @::@ 'Maybe' 'Text'+--+-- * 'jfdBootstrapActions' @::@ ['BootstrapActionDetail']+--+-- * 'jfdExecutionStatusDetail' @::@ 'JobFlowExecutionStatusDetail'+--+-- * 'jfdInstances' @::@ 'JobFlowInstancesDetail'+--+-- * 'jfdJobFlowId' @::@ 'Text'+--+-- * 'jfdJobFlowRole' @::@ 'Maybe' 'Text'+--+-- * 'jfdLogUri' @::@ 'Maybe' 'Text'+--+-- * 'jfdName' @::@ 'Text'+--+-- * 'jfdServiceRole' @::@ 'Maybe' 'Text'+--+-- * 'jfdSteps' @::@ ['StepDetail']+--+-- * 'jfdSupportedProducts' @::@ ['Text']+--+-- * 'jfdVisibleToAllUsers' @::@ 'Maybe' 'Bool'+--+jobFlowDetail :: Text -- ^ 'jfdJobFlowId'+ -> Text -- ^ 'jfdName'+ -> JobFlowExecutionStatusDetail -- ^ 'jfdExecutionStatusDetail'+ -> JobFlowInstancesDetail -- ^ 'jfdInstances'+ -> JobFlowDetail+jobFlowDetail p1 p2 p3 p4 = JobFlowDetail+ { _jfdJobFlowId = p1+ , _jfdName = p2+ , _jfdExecutionStatusDetail = p3+ , _jfdInstances = p4+ , _jfdLogUri = Nothing+ , _jfdAmiVersion = Nothing+ , _jfdSteps = mempty+ , _jfdBootstrapActions = mempty+ , _jfdSupportedProducts = mempty+ , _jfdVisibleToAllUsers = Nothing+ , _jfdJobFlowRole = Nothing+ , _jfdServiceRole = Nothing+ }++-- | The version of the AMI used to initialize Amazon EC2 instances in the job+-- flow. For a list of AMI versions currently supported by Amazon+-- ElasticMapReduce, go to AMI Versions Supported in Elastic MapReduce in+-- the Amazon Elastic MapReduce Developer's Guide.+jfdAmiVersion :: Lens' JobFlowDetail (Maybe Text)+jfdAmiVersion = lens _jfdAmiVersion (\s a -> s { _jfdAmiVersion = a })++-- | A list of the bootstrap actions run by the job flow.+jfdBootstrapActions :: Lens' JobFlowDetail [BootstrapActionDetail]+jfdBootstrapActions =+ lens _jfdBootstrapActions (\s a -> s { _jfdBootstrapActions = a })+ . _List++-- | Describes the execution status of the job flow.+jfdExecutionStatusDetail :: Lens' JobFlowDetail JobFlowExecutionStatusDetail+jfdExecutionStatusDetail =+ lens _jfdExecutionStatusDetail+ (\s a -> s { _jfdExecutionStatusDetail = a })++-- | Describes the Amazon EC2 instances of the job flow.+jfdInstances :: Lens' JobFlowDetail JobFlowInstancesDetail+jfdInstances = lens _jfdInstances (\s a -> s { _jfdInstances = a })++-- | The job flow identifier.+jfdJobFlowId :: Lens' JobFlowDetail Text+jfdJobFlowId = lens _jfdJobFlowId (\s a -> s { _jfdJobFlowId = a })++-- | The IAM role that was specified when the job flow was launched. The EC2+-- instances of the job flow assume this role.+jfdJobFlowRole :: Lens' JobFlowDetail (Maybe Text)+jfdJobFlowRole = lens _jfdJobFlowRole (\s a -> s { _jfdJobFlowRole = a })++-- | The location in Amazon S3 where log files for the job are stored.+jfdLogUri :: Lens' JobFlowDetail (Maybe Text)+jfdLogUri = lens _jfdLogUri (\s a -> s { _jfdLogUri = a })++-- | The name of the job flow.+jfdName :: Lens' JobFlowDetail Text+jfdName = lens _jfdName (\s a -> s { _jfdName = a })++-- | The IAM role that will be assumed by the Amazon EMR service to access AWS+-- resources on your behalf.+jfdServiceRole :: Lens' JobFlowDetail (Maybe Text)+jfdServiceRole = lens _jfdServiceRole (\s a -> s { _jfdServiceRole = a })++-- | A list of steps run by the job flow.+jfdSteps :: Lens' JobFlowDetail [StepDetail]+jfdSteps = lens _jfdSteps (\s a -> s { _jfdSteps = a }) . _List++-- | A list of strings set by third party software when the job flow is+-- launched. If you are not using third party software to manage the job+-- flow this value is empty.+jfdSupportedProducts :: Lens' JobFlowDetail [Text]+jfdSupportedProducts =+ lens _jfdSupportedProducts (\s a -> s { _jfdSupportedProducts = a })+ . _List++-- | Specifies whether the job flow is visible to all IAM users of the AWS+-- account associated with the job flow. If this value is set to true, all+-- IAM users of that AWS account can view and (if they have the proper+-- policy permissions set) manage the job flow. If it is set to false, only+-- the IAM user that created the job flow can view and manage it. This value+-- can be changed using the SetVisibleToAllUsers action.+jfdVisibleToAllUsers :: Lens' JobFlowDetail (Maybe Bool)+jfdVisibleToAllUsers =+ lens _jfdVisibleToAllUsers (\s a -> s { _jfdVisibleToAllUsers = a })++instance FromJSON JobFlowDetail where+ parseJSON = withObject "JobFlowDetail" $ \o -> JobFlowDetail+ <$> o .:? "AmiVersion"+ <*> o .: "BootstrapActions"+ <*> o .: "ExecutionStatusDetail"+ <*> o .: "Instances"+ <*> o .: "JobFlowId"+ <*> o .:? "JobFlowRole"+ <*> o .:? "LogUri"+ <*> o .: "Name"+ <*> o .:? "ServiceRole"+ <*> o .: "Steps"+ <*> o .: "SupportedProducts"+ <*> o .:? "VisibleToAllUsers"++instance ToJSON JobFlowDetail where+ toJSON JobFlowDetail{..} = object+ [ "JobFlowId" .= _jfdJobFlowId+ , "Name" .= _jfdName+ , "LogUri" .= _jfdLogUri+ , "AmiVersion" .= _jfdAmiVersion+ , "ExecutionStatusDetail" .= _jfdExecutionStatusDetail+ , "Instances" .= _jfdInstances+ , "Steps" .= _jfdSteps+ , "BootstrapActions" .= _jfdBootstrapActions+ , "SupportedProducts" .= _jfdSupportedProducts+ , "VisibleToAllUsers" .= _jfdVisibleToAllUsers+ , "JobFlowRole" .= _jfdJobFlowRole+ , "ServiceRole" .= _jfdServiceRole+ ]++data KeyValue = KeyValue+ { _kvKey :: Maybe Text+ , _kvValue :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'KeyValue' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'kvKey' @::@ 'Maybe' 'Text'+--+-- * 'kvValue' @::@ 'Maybe' 'Text'+--+keyValue :: KeyValue+keyValue = KeyValue+ { _kvKey = Nothing+ , _kvValue = Nothing+ }++-- | The unique identifier of a key value pair.+kvKey :: Lens' KeyValue (Maybe Text)+kvKey = lens _kvKey (\s a -> s { _kvKey = a })++-- | The value part of the identified key.+kvValue :: Lens' KeyValue (Maybe Text)+kvValue = lens _kvValue (\s a -> s { _kvValue = a })++instance FromJSON KeyValue where+ parseJSON = withObject "KeyValue" $ \o -> KeyValue+ <$> o .:? "Key"+ <*> o .:? "Value"++instance ToJSON KeyValue where+ toJSON KeyValue{..} = object+ [ "Key" .= _kvKey+ , "Value" .= _kvValue+ ]++data SupportedProductConfig = SupportedProductConfig+ { _spcArgs :: List "Args" Text+ , _spcName :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'SupportedProductConfig' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'spcArgs' @::@ ['Text']+--+-- * 'spcName' @::@ 'Maybe' 'Text'+--+supportedProductConfig :: SupportedProductConfig+supportedProductConfig = SupportedProductConfig+ { _spcName = Nothing+ , _spcArgs = mempty+ }++-- | The list of user-supplied arguments.+spcArgs :: Lens' SupportedProductConfig [Text]+spcArgs = lens _spcArgs (\s a -> s { _spcArgs = a }) . _List++-- | The name of the product configuration.+spcName :: Lens' SupportedProductConfig (Maybe Text)+spcName = lens _spcName (\s a -> s { _spcName = a })++instance FromJSON SupportedProductConfig where+ parseJSON = withObject "SupportedProductConfig" $ \o -> SupportedProductConfig+ <$> o .: "Args"+ <*> o .:? "Name"++instance ToJSON SupportedProductConfig where+ toJSON SupportedProductConfig{..} = object+ [ "Name" .= _spcName+ , "Args" .= _spcArgs+ ]++data Command = Command+ { _cArgs :: List "Args" Text+ , _cName :: Maybe Text+ , _cScriptPath :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'Command' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cArgs' @::@ ['Text']+--+-- * 'cName' @::@ 'Maybe' 'Text'+--+-- * 'cScriptPath' @::@ 'Maybe' 'Text'+--+command :: Command+command = Command+ { _cName = Nothing+ , _cScriptPath = Nothing+ , _cArgs = mempty+ }++-- | Arguments for Amazon EMR to pass to the command for execution.+cArgs :: Lens' Command [Text]+cArgs = lens _cArgs (\s a -> s { _cArgs = a }) . _List++-- | The name of the command.+cName :: Lens' Command (Maybe Text)+cName = lens _cName (\s a -> s { _cName = a })++-- | The Amazon S3 location of the command script.+cScriptPath :: Lens' Command (Maybe Text)+cScriptPath = lens _cScriptPath (\s a -> s { _cScriptPath = a })++instance FromJSON Command where+ parseJSON = withObject "Command" $ \o -> Command+ <$> o .: "Args"+ <*> o .:? "Name"+ <*> o .:? "ScriptPath"++instance ToJSON Command where+ toJSON Command{..} = object+ [ "Name" .= _cName+ , "ScriptPath" .= _cScriptPath+ , "Args" .= _cArgs+ ]++data StepExecutionState+ = Cancelled -- ^ CANCELLED+ | Completed -- ^ COMPLETED+ | Continue -- ^ CONTINUE+ | Failed -- ^ FAILED+ | Interrupted -- ^ INTERRUPTED+ | Pending -- ^ PENDING+ | Running -- ^ RUNNING+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable StepExecutionState++instance FromText StepExecutionState where+ parser = match "CANCELLED" Cancelled+ <|> match "COMPLETED" Completed+ <|> match "CONTINUE" Continue+ <|> match "FAILED" Failed+ <|> match "INTERRUPTED" Interrupted+ <|> match "PENDING" Pending+ <|> match "RUNNING" Running++instance ToText StepExecutionState where+ toText = \case+ Cancelled -> "CANCELLED"+ Completed -> "COMPLETED"+ Continue -> "CONTINUE"+ Failed -> "FAILED"+ Interrupted -> "INTERRUPTED"+ Pending -> "PENDING"+ Running -> "RUNNING"++instance FromJSON StepExecutionState where+ parseJSON = parseJSONText "StepExecutionState"++instance ToJSON StepExecutionState where+ toJSON = toJSONText++data ActionOnFailure+ = AOFCancelAndWait -- ^ CANCEL_AND_WAIT+ | AOFContinue -- ^ CONTINUE+ | AOFTerminateCluster -- ^ TERMINATE_CLUSTER+ | AOFTerminateJobFlow -- ^ TERMINATE_JOB_FLOW+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ActionOnFailure++instance FromText ActionOnFailure where+ parser = match "CANCEL_AND_WAIT" AOFCancelAndWait+ <|> match "CONTINUE" AOFContinue+ <|> match "TERMINATE_CLUSTER" AOFTerminateCluster+ <|> match "TERMINATE_JOB_FLOW" AOFTerminateJobFlow++instance ToText ActionOnFailure where+ toText = \case+ AOFCancelAndWait -> "CANCEL_AND_WAIT"+ AOFContinue -> "CONTINUE"+ AOFTerminateCluster -> "TERMINATE_CLUSTER"+ AOFTerminateJobFlow -> "TERMINATE_JOB_FLOW"++instance FromJSON ActionOnFailure where+ parseJSON = parseJSONText "ActionOnFailure"++instance ToJSON ActionOnFailure where+ toJSON = toJSONText++data ClusterStateChangeReason = ClusterStateChangeReason+ { _cscrCode :: Maybe Text+ , _cscrMessage :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'ClusterStateChangeReason' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cscrCode' @::@ 'Maybe' 'Text'+--+-- * 'cscrMessage' @::@ 'Maybe' 'Text'+--+clusterStateChangeReason :: ClusterStateChangeReason+clusterStateChangeReason = ClusterStateChangeReason+ { _cscrCode = Nothing+ , _cscrMessage = Nothing+ }++-- | The programmatic code for the state change reason.+cscrCode :: Lens' ClusterStateChangeReason (Maybe Text)+cscrCode = lens _cscrCode (\s a -> s { _cscrCode = a })++-- | The descriptive message for the state change reason.+cscrMessage :: Lens' ClusterStateChangeReason (Maybe Text)+cscrMessage = lens _cscrMessage (\s a -> s { _cscrMessage = a })++instance FromJSON ClusterStateChangeReason where+ parseJSON = withObject "ClusterStateChangeReason" $ \o -> ClusterStateChangeReason+ <$> o .:? "Code"+ <*> o .:? "Message"++instance ToJSON ClusterStateChangeReason where+ toJSON ClusterStateChangeReason{..} = object+ [ "Code" .= _cscrCode+ , "Message" .= _cscrMessage+ ]++data Tag = Tag+ { _tagKey :: Maybe Text+ , _tagValue :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'Tag' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tagKey' @::@ 'Maybe' 'Text'+--+-- * 'tagValue' @::@ 'Maybe' 'Text'+--+tag :: Tag+tag = Tag+ { _tagKey = Nothing+ , _tagValue = Nothing+ }++-- | A user-defined key, which is the minimum required information for a valid+-- tag. For more information, see Tagging Amazon EMR Resources.+tagKey :: Lens' Tag (Maybe Text)+tagKey = lens _tagKey (\s a -> s { _tagKey = a })++-- | A user-defined value, which is optional in a tag. For more information,+-- see Tagging Amazon EMR Resources.+tagValue :: Lens' Tag (Maybe Text)+tagValue = lens _tagValue (\s a -> s { _tagValue = a })++instance FromJSON Tag where+ parseJSON = withObject "Tag" $ \o -> Tag+ <$> o .:? "Key"+ <*> o .:? "Value"++instance ToJSON Tag where+ toJSON Tag{..} = object+ [ "Key" .= _tagKey+ , "Value" .= _tagValue+ ]++data Application = Application+ { _aAdditionalInfo :: Map Text Text+ , _aArgs :: List "Args" Text+ , _aName :: Maybe Text+ , _aVersion :: Maybe Text+ } deriving (Eq, Show)++-- | 'Application' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'aAdditionalInfo' @::@ 'HashMap' 'Text' 'Text'+--+-- * 'aArgs' @::@ ['Text']+--+-- * 'aName' @::@ 'Maybe' 'Text'+--+-- * 'aVersion' @::@ 'Maybe' 'Text'+--+application :: Application+application = Application+ { _aName = Nothing+ , _aVersion = Nothing+ , _aArgs = mempty+ , _aAdditionalInfo = mempty+ }++-- | This option is for advanced users only. This is meta information about+-- third-party applications that third-party vendors use for testing+-- purposes.+aAdditionalInfo :: Lens' Application (HashMap Text Text)+aAdditionalInfo = lens _aAdditionalInfo (\s a -> s { _aAdditionalInfo = a }) . _Map++-- | Arguments for Amazon EMR to pass to the application.+aArgs :: Lens' Application [Text]+aArgs = lens _aArgs (\s a -> s { _aArgs = a }) . _List++-- | The name of the application.+aName :: Lens' Application (Maybe Text)+aName = lens _aName (\s a -> s { _aName = a })++-- | The version of the application.+aVersion :: Lens' Application (Maybe Text)+aVersion = lens _aVersion (\s a -> s { _aVersion = a })++instance FromJSON Application where+ parseJSON = withObject "Application" $ \o -> Application+ <$> o .: "AdditionalInfo"+ <*> o .: "Args"+ <*> o .:? "Name"+ <*> o .:? "Version"++instance ToJSON Application where+ toJSON Application{..} = object+ [ "Name" .= _aName+ , "Version" .= _aVersion+ , "Args" .= _aArgs+ , "AdditionalInfo" .= _aAdditionalInfo+ ]++data JobFlowExecutionStatusDetail = JobFlowExecutionStatusDetail+ { _jfesdCreationDateTime :: RFC822+ , _jfesdEndDateTime :: Maybe RFC822+ , _jfesdLastStateChangeReason :: Maybe Text+ , _jfesdReadyDateTime :: Maybe RFC822+ , _jfesdStartDateTime :: Maybe RFC822+ , _jfesdState :: Text+ } deriving (Eq, Ord, Show)++-- | 'JobFlowExecutionStatusDetail' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'jfesdCreationDateTime' @::@ 'UTCTime'+--+-- * 'jfesdEndDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'jfesdLastStateChangeReason' @::@ 'Maybe' 'Text'+--+-- * 'jfesdReadyDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'jfesdStartDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'jfesdState' @::@ 'Text'+--+jobFlowExecutionStatusDetail :: Text -- ^ 'jfesdState'+ -> UTCTime -- ^ 'jfesdCreationDateTime'+ -> JobFlowExecutionStatusDetail+jobFlowExecutionStatusDetail p1 p2 = JobFlowExecutionStatusDetail+ { _jfesdState = p1+ , _jfesdCreationDateTime = withIso _Time (const id) p2+ , _jfesdStartDateTime = Nothing+ , _jfesdReadyDateTime = Nothing+ , _jfesdEndDateTime = Nothing+ , _jfesdLastStateChangeReason = Nothing+ }++-- | The creation date and time of the job flow.+jfesdCreationDateTime :: Lens' JobFlowExecutionStatusDetail UTCTime+jfesdCreationDateTime =+ lens _jfesdCreationDateTime (\s a -> s { _jfesdCreationDateTime = a })+ . _Time++-- | The completion date and time of the job flow.+jfesdEndDateTime :: Lens' JobFlowExecutionStatusDetail (Maybe UTCTime)+jfesdEndDateTime = lens _jfesdEndDateTime (\s a -> s { _jfesdEndDateTime = a }) . mapping _Time++-- | Description of the job flow last changed state.+jfesdLastStateChangeReason :: Lens' JobFlowExecutionStatusDetail (Maybe Text)+jfesdLastStateChangeReason =+ lens _jfesdLastStateChangeReason+ (\s a -> s { _jfesdLastStateChangeReason = a })++-- | The date and time when the job flow was ready to start running bootstrap+-- actions.+jfesdReadyDateTime :: Lens' JobFlowExecutionStatusDetail (Maybe UTCTime)+jfesdReadyDateTime =+ lens _jfesdReadyDateTime (\s a -> s { _jfesdReadyDateTime = a })+ . mapping _Time++-- | The start date and time of the job flow.+jfesdStartDateTime :: Lens' JobFlowExecutionStatusDetail (Maybe UTCTime)+jfesdStartDateTime =+ lens _jfesdStartDateTime (\s a -> s { _jfesdStartDateTime = a })+ . mapping _Time++-- | The state of the job flow.+jfesdState :: Lens' JobFlowExecutionStatusDetail Text+jfesdState = lens _jfesdState (\s a -> s { _jfesdState = a })++instance FromJSON JobFlowExecutionStatusDetail where+ parseJSON = withObject "JobFlowExecutionStatusDetail" $ \o -> JobFlowExecutionStatusDetail+ <$> o .: "CreationDateTime"+ <*> o .:? "EndDateTime"+ <*> o .:? "LastStateChangeReason"+ <*> o .:? "ReadyDateTime"+ <*> o .:? "StartDateTime"+ <*> o .: "State"++instance ToJSON JobFlowExecutionStatusDetail where+ toJSON JobFlowExecutionStatusDetail{..} = object+ [ "State" .= _jfesdState+ , "CreationDateTime" .= _jfesdCreationDateTime+ , "StartDateTime" .= _jfesdStartDateTime+ , "ReadyDateTime" .= _jfesdReadyDateTime+ , "EndDateTime" .= _jfesdEndDateTime+ , "LastStateChangeReason" .= _jfesdLastStateChangeReason+ ]++data InstanceGroupStatus = InstanceGroupStatus+ { _igsState :: Maybe Text+ , _igsStateChangeReason :: Maybe InstanceGroupStateChangeReason+ , _igsTimeline :: Maybe InstanceGroupTimeline+ } deriving (Eq, Show)++-- | 'InstanceGroupStatus' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'igsState' @::@ 'Maybe' 'Text'+--+-- * 'igsStateChangeReason' @::@ 'Maybe' 'InstanceGroupStateChangeReason'+--+-- * 'igsTimeline' @::@ 'Maybe' 'InstanceGroupTimeline'+--+instanceGroupStatus :: InstanceGroupStatus+instanceGroupStatus = InstanceGroupStatus+ { _igsState = Nothing+ , _igsStateChangeReason = Nothing+ , _igsTimeline = Nothing+ }++-- | The current state of the instance group.+igsState :: Lens' InstanceGroupStatus (Maybe Text)+igsState = lens _igsState (\s a -> s { _igsState = a })++-- | The status change reason details for the instance group.+igsStateChangeReason :: Lens' InstanceGroupStatus (Maybe InstanceGroupStateChangeReason)+igsStateChangeReason =+ lens _igsStateChangeReason (\s a -> s { _igsStateChangeReason = a })++-- | The timeline of the instance group status over time.+igsTimeline :: Lens' InstanceGroupStatus (Maybe InstanceGroupTimeline)+igsTimeline = lens _igsTimeline (\s a -> s { _igsTimeline = a })++instance FromJSON InstanceGroupStatus where+ parseJSON = withObject "InstanceGroupStatus" $ \o -> InstanceGroupStatus+ <$> o .:? "State"+ <*> o .:? "StateChangeReason"+ <*> o .:? "Timeline"++instance ToJSON InstanceGroupStatus where+ toJSON InstanceGroupStatus{..} = object+ [ "State" .= _igsState+ , "StateChangeReason" .= _igsStateChangeReason+ , "Timeline" .= _igsTimeline+ ]++data Cluster = Cluster+ { _c1Applications :: List "Applications" Application+ , _c1AutoTerminate :: Maybe Bool+ , _c1Ec2InstanceAttributes :: Maybe Ec2InstanceAttributes+ , _c1Id :: Maybe Text+ , _c1LogUri :: Maybe Text+ , _c1Name :: Maybe Text+ , _c1RequestedAmiVersion :: Maybe Text+ , _c1RunningAmiVersion :: Maybe Text+ , _c1ServiceRole :: Maybe Text+ , _c1Status :: Maybe ClusterStatus+ , _c1Tags :: List "Tags" Tag+ , _c1TerminationProtected :: Maybe Bool+ , _c1VisibleToAllUsers :: Maybe Bool+ } deriving (Eq, Show)++-- | 'Cluster' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'c1Applications' @::@ ['Application']+--+-- * 'c1AutoTerminate' @::@ 'Maybe' 'Bool'+--+-- * 'c1Ec2InstanceAttributes' @::@ 'Maybe' 'Ec2InstanceAttributes'+--+-- * 'c1Id' @::@ 'Maybe' 'Text'+--+-- * 'c1LogUri' @::@ 'Maybe' 'Text'+--+-- * 'c1Name' @::@ 'Maybe' 'Text'+--+-- * 'c1RequestedAmiVersion' @::@ 'Maybe' 'Text'+--+-- * 'c1RunningAmiVersion' @::@ 'Maybe' 'Text'+--+-- * 'c1ServiceRole' @::@ 'Maybe' 'Text'+--+-- * 'c1Status' @::@ 'Maybe' 'ClusterStatus'+--+-- * 'c1Tags' @::@ ['Tag']+--+-- * 'c1TerminationProtected' @::@ 'Maybe' 'Bool'+--+-- * 'c1VisibleToAllUsers' @::@ 'Maybe' 'Bool'+--+cluster :: Cluster+cluster = Cluster+ { _c1Id = Nothing+ , _c1Name = Nothing+ , _c1Status = Nothing+ , _c1Ec2InstanceAttributes = Nothing+ , _c1LogUri = Nothing+ , _c1RequestedAmiVersion = Nothing+ , _c1RunningAmiVersion = Nothing+ , _c1AutoTerminate = Nothing+ , _c1TerminationProtected = Nothing+ , _c1VisibleToAllUsers = Nothing+ , _c1Applications = mempty+ , _c1Tags = mempty+ , _c1ServiceRole = Nothing+ }++-- | The applications installed on this cluster.+c1Applications :: Lens' Cluster [Application]+c1Applications = lens _c1Applications (\s a -> s { _c1Applications = a }) . _List++-- | Specifies whether the cluster should terminate after completing all+-- steps.+c1AutoTerminate :: Lens' Cluster (Maybe Bool)+c1AutoTerminate = lens _c1AutoTerminate (\s a -> s { _c1AutoTerminate = a })++c1Ec2InstanceAttributes :: Lens' Cluster (Maybe Ec2InstanceAttributes)+c1Ec2InstanceAttributes =+ lens _c1Ec2InstanceAttributes (\s a -> s { _c1Ec2InstanceAttributes = a })++-- | The unique identifier for the cluster.+c1Id :: Lens' Cluster (Maybe Text)+c1Id = lens _c1Id (\s a -> s { _c1Id = a })++-- | The path to the Amazon S3 location where logs for this cluster are+-- stored.+c1LogUri :: Lens' Cluster (Maybe Text)+c1LogUri = lens _c1LogUri (\s a -> s { _c1LogUri = a })++-- | The name of the cluster.+c1Name :: Lens' Cluster (Maybe Text)+c1Name = lens _c1Name (\s a -> s { _c1Name = a })++-- | The AMI version requested for this cluster.+c1RequestedAmiVersion :: Lens' Cluster (Maybe Text)+c1RequestedAmiVersion =+ lens _c1RequestedAmiVersion (\s a -> s { _c1RequestedAmiVersion = a })++-- | The AMI version running on this cluster. This differs from the requested+-- version only if the requested version is a meta version, such as+-- "latest".+c1RunningAmiVersion :: Lens' Cluster (Maybe Text)+c1RunningAmiVersion =+ lens _c1RunningAmiVersion (\s a -> s { _c1RunningAmiVersion = a })++-- | The IAM role that will be assumed by the Amazon EMR service to access AWS+-- resources on your behalf.+c1ServiceRole :: Lens' Cluster (Maybe Text)+c1ServiceRole = lens _c1ServiceRole (\s a -> s { _c1ServiceRole = a })++-- | The current status details about the cluster.+c1Status :: Lens' Cluster (Maybe ClusterStatus)+c1Status = lens _c1Status (\s a -> s { _c1Status = a })++-- | A list of tags associated with a cluster.+c1Tags :: Lens' Cluster [Tag]+c1Tags = lens _c1Tags (\s a -> s { _c1Tags = a }) . _List++-- | Indicates whether Amazon EMR will lock the cluster to prevent the EC2+-- instances from being terminated by an API call or user intervention, or+-- in the event of a cluster error.+c1TerminationProtected :: Lens' Cluster (Maybe Bool)+c1TerminationProtected =+ lens _c1TerminationProtected (\s a -> s { _c1TerminationProtected = a })++-- | Indicates whether the job flow is visible to all IAM users of the AWS+-- account associated with the job flow. If this value is set to true, all+-- IAM users of that AWS account can view and manage the job flow if they+-- have the proper policy permissions set. If this value is false, only the+-- IAM user that created the cluster can view and manage it. This value can+-- be changed using the SetVisibleToAllUsers action.+c1VisibleToAllUsers :: Lens' Cluster (Maybe Bool)+c1VisibleToAllUsers =+ lens _c1VisibleToAllUsers (\s a -> s { _c1VisibleToAllUsers = a })++instance FromJSON Cluster where+ parseJSON = withObject "Cluster" $ \o -> Cluster+ <$> o .: "Applications"+ <*> o .:? "AutoTerminate"+ <*> o .:? "Ec2InstanceAttributes"+ <*> o .:? "Id"+ <*> o .:? "LogUri"+ <*> o .:? "Name"+ <*> o .:? "RequestedAmiVersion"+ <*> o .:? "RunningAmiVersion"+ <*> o .:? "ServiceRole"+ <*> o .:? "Status"+ <*> o .: "Tags"+ <*> o .:? "TerminationProtected"+ <*> o .:? "VisibleToAllUsers"++instance ToJSON Cluster where+ toJSON Cluster{..} = object+ [ "Id" .= _c1Id+ , "Name" .= _c1Name+ , "Status" .= _c1Status+ , "Ec2InstanceAttributes" .= _c1Ec2InstanceAttributes+ , "LogUri" .= _c1LogUri+ , "RequestedAmiVersion" .= _c1RequestedAmiVersion+ , "RunningAmiVersion" .= _c1RunningAmiVersion+ , "AutoTerminate" .= _c1AutoTerminate+ , "TerminationProtected" .= _c1TerminationProtected+ , "VisibleToAllUsers" .= _c1VisibleToAllUsers+ , "Applications" .= _c1Applications+ , "Tags" .= _c1Tags+ , "ServiceRole" .= _c1ServiceRole+ ]++data InstanceTimeline = InstanceTimeline+ { _itCreationDateTime :: Maybe RFC822+ , _itEndDateTime :: Maybe RFC822+ , _itReadyDateTime :: Maybe RFC822+ } deriving (Eq, Ord, Show)++-- | 'InstanceTimeline' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'itCreationDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'itEndDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'itReadyDateTime' @::@ 'Maybe' 'UTCTime'+--+instanceTimeline :: InstanceTimeline+instanceTimeline = InstanceTimeline+ { _itCreationDateTime = Nothing+ , _itReadyDateTime = Nothing+ , _itEndDateTime = Nothing+ }++-- | The creation date and time of the instance.+itCreationDateTime :: Lens' InstanceTimeline (Maybe UTCTime)+itCreationDateTime =+ lens _itCreationDateTime (\s a -> s { _itCreationDateTime = a })+ . mapping _Time++-- | The date and time when the instance was terminated.+itEndDateTime :: Lens' InstanceTimeline (Maybe UTCTime)+itEndDateTime = lens _itEndDateTime (\s a -> s { _itEndDateTime = a }) . mapping _Time++-- | The date and time when the instance was ready to perform tasks.+itReadyDateTime :: Lens' InstanceTimeline (Maybe UTCTime)+itReadyDateTime = lens _itReadyDateTime (\s a -> s { _itReadyDateTime = a }) . mapping _Time++instance FromJSON InstanceTimeline where+ parseJSON = withObject "InstanceTimeline" $ \o -> InstanceTimeline+ <$> o .:? "CreationDateTime"+ <*> o .:? "EndDateTime"+ <*> o .:? "ReadyDateTime"++instance ToJSON InstanceTimeline where+ toJSON InstanceTimeline{..} = object+ [ "CreationDateTime" .= _itCreationDateTime+ , "ReadyDateTime" .= _itReadyDateTime+ , "EndDateTime" .= _itEndDateTime+ ]++data Ec2InstanceAttributes = Ec2InstanceAttributes+ { _eiaEc2AvailabilityZone :: Maybe Text+ , _eiaEc2KeyName :: Maybe Text+ , _eiaEc2SubnetId :: Maybe Text+ , _eiaIamInstanceProfile :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'Ec2InstanceAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'eiaEc2AvailabilityZone' @::@ 'Maybe' 'Text'+--+-- * 'eiaEc2KeyName' @::@ 'Maybe' 'Text'+--+-- * 'eiaEc2SubnetId' @::@ 'Maybe' 'Text'+--+-- * 'eiaIamInstanceProfile' @::@ 'Maybe' 'Text'+--+ec2InstanceAttributes :: Ec2InstanceAttributes+ec2InstanceAttributes = Ec2InstanceAttributes+ { _eiaEc2KeyName = Nothing+ , _eiaEc2SubnetId = Nothing+ , _eiaEc2AvailabilityZone = Nothing+ , _eiaIamInstanceProfile = Nothing+ }++-- | The Availability Zone in which the cluster will run.+eiaEc2AvailabilityZone :: Lens' Ec2InstanceAttributes (Maybe Text)+eiaEc2AvailabilityZone =+ lens _eiaEc2AvailabilityZone (\s a -> s { _eiaEc2AvailabilityZone = a })++-- | The name of the Amazon EC2 key pair to use when connecting with SSH into+-- the master node as a user named "hadoop".+eiaEc2KeyName :: Lens' Ec2InstanceAttributes (Maybe Text)+eiaEc2KeyName = lens _eiaEc2KeyName (\s a -> s { _eiaEc2KeyName = a })++-- | To launch the job flow in Amazon VPC, set this parameter to the+-- identifier of the Amazon VPC subnet where you want the job flow to+-- launch. If you do not specify this value, the job flow is launched in the+-- normal AWS cloud, outside of a VPC. Amazon VPC currently does not support+-- cluster compute quadruple extra large (cc1.4xlarge) instances. Thus, you+-- cannot specify the cc1.4xlarge instance type for nodes of a job flow+-- launched in a VPC.+eiaEc2SubnetId :: Lens' Ec2InstanceAttributes (Maybe Text)+eiaEc2SubnetId = lens _eiaEc2SubnetId (\s a -> s { _eiaEc2SubnetId = a })++-- | The IAM role that was specified when the job flow was launched. The EC2+-- instances of the job flow assume this role.+eiaIamInstanceProfile :: Lens' Ec2InstanceAttributes (Maybe Text)+eiaIamInstanceProfile =+ lens _eiaIamInstanceProfile (\s a -> s { _eiaIamInstanceProfile = a })++instance FromJSON Ec2InstanceAttributes where+ parseJSON = withObject "Ec2InstanceAttributes" $ \o -> Ec2InstanceAttributes+ <$> o .:? "Ec2AvailabilityZone"+ <*> o .:? "Ec2KeyName"+ <*> o .:? "Ec2SubnetId"+ <*> o .:? "IamInstanceProfile"++instance ToJSON Ec2InstanceAttributes where+ toJSON Ec2InstanceAttributes{..} = object+ [ "Ec2KeyName" .= _eiaEc2KeyName+ , "Ec2SubnetId" .= _eiaEc2SubnetId+ , "Ec2AvailabilityZone" .= _eiaEc2AvailabilityZone+ , "IamInstanceProfile" .= _eiaIamInstanceProfile+ ]++data StepStateChangeReasonCode+ = None -- ^ NONE+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable StepStateChangeReasonCode++instance FromText StepStateChangeReasonCode where+ parser = match "NONE" None++instance ToText StepStateChangeReasonCode where+ toText None = "NONE"++instance FromJSON StepStateChangeReasonCode where+ parseJSON = parseJSONText "StepStateChangeReasonCode"++instance ToJSON StepStateChangeReasonCode where+ toJSON = toJSONText++data ClusterState+ = CSBootstrapping -- ^ BOOTSTRAPPING+ | CSRunning -- ^ RUNNING+ | CSStarting -- ^ STARTING+ | CSTerminated -- ^ TERMINATED+ | CSTerminatedWithErrors -- ^ TERMINATED_WITH_ERRORS+ | CSTerminating -- ^ TERMINATING+ | CSWaiting -- ^ WAITING+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ClusterState++instance FromText ClusterState where+ parser = match "BOOTSTRAPPING" CSBootstrapping+ <|> match "RUNNING" CSRunning+ <|> match "STARTING" CSStarting+ <|> match "TERMINATED" CSTerminated+ <|> match "TERMINATED_WITH_ERRORS" CSTerminatedWithErrors+ <|> match "TERMINATING" CSTerminating+ <|> match "WAITING" CSWaiting++instance ToText ClusterState where+ toText = \case+ CSBootstrapping -> "BOOTSTRAPPING"+ CSRunning -> "RUNNING"+ CSStarting -> "STARTING"+ CSTerminated -> "TERMINATED"+ CSTerminatedWithErrors -> "TERMINATED_WITH_ERRORS"+ CSTerminating -> "TERMINATING"+ CSWaiting -> "WAITING"++instance FromJSON ClusterState where+ parseJSON = parseJSONText "ClusterState"++instance ToJSON ClusterState where+ toJSON = toJSONText++data HadoopStepConfig = HadoopStepConfig+ { _hscArgs :: List "Args" Text+ , _hscJar :: Maybe Text+ , _hscMainClass :: Maybe Text+ , _hscProperties :: Map Text Text+ } deriving (Eq, Show)++-- | 'HadoopStepConfig' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'hscArgs' @::@ ['Text']+--+-- * 'hscJar' @::@ 'Maybe' 'Text'+--+-- * 'hscMainClass' @::@ 'Maybe' 'Text'+--+-- * 'hscProperties' @::@ 'HashMap' 'Text' 'Text'+--+hadoopStepConfig :: HadoopStepConfig+hadoopStepConfig = HadoopStepConfig+ { _hscJar = Nothing+ , _hscProperties = mempty+ , _hscMainClass = Nothing+ , _hscArgs = mempty+ }++-- | The list of command line arguments to pass to the JAR file's main+-- function for execution.+hscArgs :: Lens' HadoopStepConfig [Text]+hscArgs = lens _hscArgs (\s a -> s { _hscArgs = a }) . _List++-- | The path to the JAR file that runs during the step.+hscJar :: Lens' HadoopStepConfig (Maybe Text)+hscJar = lens _hscJar (\s a -> s { _hscJar = a })++-- | The name of the main class in the specified Java file. If not specified,+-- the JAR file should specify a main class in its manifest file.+hscMainClass :: Lens' HadoopStepConfig (Maybe Text)+hscMainClass = lens _hscMainClass (\s a -> s { _hscMainClass = a })++-- | The list of Java properties that are set when the step runs. You can use+-- these properties to pass key value pairs to your main function.+hscProperties :: Lens' HadoopStepConfig (HashMap Text Text)+hscProperties = lens _hscProperties (\s a -> s { _hscProperties = a }) . _Map++instance FromJSON HadoopStepConfig where+ parseJSON = withObject "HadoopStepConfig" $ \o -> HadoopStepConfig+ <$> o .: "Args"+ <*> o .:? "Jar"+ <*> o .:? "MainClass"+ <*> o .: "Properties"++instance ToJSON HadoopStepConfig where+ toJSON HadoopStepConfig{..} = object+ [ "Jar" .= _hscJar+ , "Properties" .= _hscProperties+ , "MainClass" .= _hscMainClass+ , "Args" .= _hscArgs+ ]++data JobFlowExecutionState+ = JFESBootstrapping -- ^ BOOTSTRAPPING+ | JFESCompleted -- ^ COMPLETED+ | JFESFailed -- ^ FAILED+ | JFESRunning -- ^ RUNNING+ | JFESShuttingDown -- ^ SHUTTING_DOWN+ | JFESStarting -- ^ STARTING+ | JFESTerminated -- ^ TERMINATED+ | JFESWaiting -- ^ WAITING+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable JobFlowExecutionState++instance FromText JobFlowExecutionState where+ parser = match "BOOTSTRAPPING" JFESBootstrapping+ <|> match "COMPLETED" JFESCompleted+ <|> match "FAILED" JFESFailed+ <|> match "RUNNING" JFESRunning+ <|> match "SHUTTING_DOWN" JFESShuttingDown+ <|> match "STARTING" JFESStarting+ <|> match "TERMINATED" JFESTerminated+ <|> match "WAITING" JFESWaiting++instance ToText JobFlowExecutionState where+ toText = \case+ JFESBootstrapping -> "BOOTSTRAPPING"+ JFESCompleted -> "COMPLETED"+ JFESFailed -> "FAILED"+ JFESRunning -> "RUNNING"+ JFESShuttingDown -> "SHUTTING_DOWN"+ JFESStarting -> "STARTING"+ JFESTerminated -> "TERMINATED"+ JFESWaiting -> "WAITING"++instance FromJSON JobFlowExecutionState where+ parseJSON = parseJSONText "JobFlowExecutionState"++instance ToJSON JobFlowExecutionState where+ toJSON = toJSONText++data StepDetail = StepDetail+ { _sdExecutionStatusDetail :: StepExecutionStatusDetail+ , _sdStepConfig :: StepConfig+ } deriving (Eq, Show)++-- | 'StepDetail' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sdExecutionStatusDetail' @::@ 'StepExecutionStatusDetail'+--+-- * 'sdStepConfig' @::@ 'StepConfig'+--+stepDetail :: StepConfig -- ^ 'sdStepConfig'+ -> StepExecutionStatusDetail -- ^ 'sdExecutionStatusDetail'+ -> StepDetail+stepDetail p1 p2 = StepDetail+ { _sdStepConfig = p1+ , _sdExecutionStatusDetail = p2+ }++-- | The description of the step status.+sdExecutionStatusDetail :: Lens' StepDetail StepExecutionStatusDetail+sdExecutionStatusDetail =+ lens _sdExecutionStatusDetail (\s a -> s { _sdExecutionStatusDetail = a })++-- | The step configuration.+sdStepConfig :: Lens' StepDetail StepConfig+sdStepConfig = lens _sdStepConfig (\s a -> s { _sdStepConfig = a })++instance FromJSON StepDetail where+ parseJSON = withObject "StepDetail" $ \o -> StepDetail+ <$> o .: "ExecutionStatusDetail"+ <*> o .: "StepConfig"++instance ToJSON StepDetail where+ toJSON StepDetail{..} = object+ [ "StepConfig" .= _sdStepConfig+ , "ExecutionStatusDetail" .= _sdExecutionStatusDetail+ ]++data InstanceGroupStateChangeReason = InstanceGroupStateChangeReason+ { _igscrCode :: Maybe Text+ , _igscrMessage :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'InstanceGroupStateChangeReason' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'igscrCode' @::@ 'Maybe' 'Text'+--+-- * 'igscrMessage' @::@ 'Maybe' 'Text'+--+instanceGroupStateChangeReason :: InstanceGroupStateChangeReason+instanceGroupStateChangeReason = InstanceGroupStateChangeReason+ { _igscrCode = Nothing+ , _igscrMessage = Nothing+ }++-- | The programmable code for the state change reason.+igscrCode :: Lens' InstanceGroupStateChangeReason (Maybe Text)+igscrCode = lens _igscrCode (\s a -> s { _igscrCode = a })++-- | The status change reason description.+igscrMessage :: Lens' InstanceGroupStateChangeReason (Maybe Text)+igscrMessage = lens _igscrMessage (\s a -> s { _igscrMessage = a })++instance FromJSON InstanceGroupStateChangeReason where+ parseJSON = withObject "InstanceGroupStateChangeReason" $ \o -> InstanceGroupStateChangeReason+ <$> o .:? "Code"+ <*> o .:? "Message"++instance ToJSON InstanceGroupStateChangeReason where+ toJSON InstanceGroupStateChangeReason{..} = object+ [ "Code" .= _igscrCode+ , "Message" .= _igscrMessage+ ]++data InstanceGroupType+ = Core -- ^ CORE+ | Master -- ^ MASTER+ | Task -- ^ TASK+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable InstanceGroupType++instance FromText InstanceGroupType where+ parser = match "CORE" Core+ <|> match "MASTER" Master+ <|> match "TASK" Task++instance ToText InstanceGroupType where+ toText = \case+ Core -> "CORE"+ Master -> "MASTER"+ Task -> "TASK"++instance FromJSON InstanceGroupType where+ parseJSON = parseJSONText "InstanceGroupType"++instance ToJSON InstanceGroupType where+ toJSON = toJSONText++data InstanceGroupStateChangeReasonCode+ = ClusterTerminated -- ^ CLUSTER_TERMINATED+ | InstanceFailure -- ^ INSTANCE_FAILURE+ | InternalError -- ^ INTERNAL_ERROR+ | ValidationError -- ^ VALIDATION_ERROR+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable InstanceGroupStateChangeReasonCode++instance FromText InstanceGroupStateChangeReasonCode where+ parser = match "CLUSTER_TERMINATED" ClusterTerminated+ <|> match "INSTANCE_FAILURE" InstanceFailure+ <|> match "INTERNAL_ERROR" InternalError+ <|> match "VALIDATION_ERROR" ValidationError++instance ToText InstanceGroupStateChangeReasonCode where+ toText = \case+ ClusterTerminated -> "CLUSTER_TERMINATED"+ InstanceFailure -> "INSTANCE_FAILURE"+ InternalError -> "INTERNAL_ERROR"+ ValidationError -> "VALIDATION_ERROR"++instance FromJSON InstanceGroupStateChangeReasonCode where+ parseJSON = parseJSONText "InstanceGroupStateChangeReasonCode"++instance ToJSON InstanceGroupStateChangeReasonCode where+ toJSON = toJSONText++data StepStatus = StepStatus+ { _ssState :: Maybe Text+ , _ssStateChangeReason :: Maybe StepStateChangeReason+ , _ssTimeline :: Maybe StepTimeline+ } deriving (Eq, Show)++-- | 'StepStatus' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ssState' @::@ 'Maybe' 'Text'+--+-- * 'ssStateChangeReason' @::@ 'Maybe' 'StepStateChangeReason'+--+-- * 'ssTimeline' @::@ 'Maybe' 'StepTimeline'+--+stepStatus :: StepStatus+stepStatus = StepStatus+ { _ssState = Nothing+ , _ssStateChangeReason = Nothing+ , _ssTimeline = Nothing+ }++-- | The execution state of the cluster step.+ssState :: Lens' StepStatus (Maybe Text)+ssState = lens _ssState (\s a -> s { _ssState = a })++-- | The reason for the step execution status change.+ssStateChangeReason :: Lens' StepStatus (Maybe StepStateChangeReason)+ssStateChangeReason =+ lens _ssStateChangeReason (\s a -> s { _ssStateChangeReason = a })++-- | The timeline of the cluster step status over time.+ssTimeline :: Lens' StepStatus (Maybe StepTimeline)+ssTimeline = lens _ssTimeline (\s a -> s { _ssTimeline = a })++instance FromJSON StepStatus where+ parseJSON = withObject "StepStatus" $ \o -> StepStatus+ <$> o .:? "State"+ <*> o .:? "StateChangeReason"+ <*> o .:? "Timeline"++instance ToJSON StepStatus where+ toJSON StepStatus{..} = object+ [ "State" .= _ssState+ , "StateChangeReason" .= _ssStateChangeReason+ , "Timeline" .= _ssTimeline+ ]++data StepSummary = StepSummary+ { _ssId :: Maybe Text+ , _ssName :: Maybe Text+ , _ssStatus :: Maybe StepStatus+ } deriving (Eq, Show)++-- | 'StepSummary' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ssId' @::@ 'Maybe' 'Text'+--+-- * 'ssName' @::@ 'Maybe' 'Text'+--+-- * 'ssStatus' @::@ 'Maybe' 'StepStatus'+--+stepSummary :: StepSummary+stepSummary = StepSummary+ { _ssId = Nothing+ , _ssName = Nothing+ , _ssStatus = Nothing+ }++-- | The identifier of the cluster step.+ssId :: Lens' StepSummary (Maybe Text)+ssId = lens _ssId (\s a -> s { _ssId = a })++-- | The name of the cluster step.+ssName :: Lens' StepSummary (Maybe Text)+ssName = lens _ssName (\s a -> s { _ssName = a })++-- | The current execution status details of the cluster step.+ssStatus :: Lens' StepSummary (Maybe StepStatus)+ssStatus = lens _ssStatus (\s a -> s { _ssStatus = a })++instance FromJSON StepSummary where+ parseJSON = withObject "StepSummary" $ \o -> StepSummary+ <$> o .:? "Id"+ <*> o .:? "Name"+ <*> o .:? "Status"++instance ToJSON StepSummary where+ toJSON StepSummary{..} = object+ [ "Id" .= _ssId+ , "Name" .= _ssName+ , "Status" .= _ssStatus+ ]++data InstanceGroupState+ = IGSArrested -- ^ ARRESTED+ | IGSBootstrapping -- ^ BOOTSTRAPPING+ | IGSEnded -- ^ ENDED+ | IGSProvisioning -- ^ PROVISIONING+ | IGSResizing -- ^ RESIZING+ | IGSRunning -- ^ RUNNING+ | IGSShuttingDown -- ^ SHUTTING_DOWN+ | IGSSuspended -- ^ SUSPENDED+ | IGSTerminated -- ^ TERMINATED+ | IGSTerminating -- ^ TERMINATING+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable InstanceGroupState++instance FromText InstanceGroupState where+ parser = match "ARRESTED" IGSArrested+ <|> match "BOOTSTRAPPING" IGSBootstrapping+ <|> match "ENDED" IGSEnded+ <|> match "PROVISIONING" IGSProvisioning+ <|> match "RESIZING" IGSResizing+ <|> match "RUNNING" IGSRunning+ <|> match "SHUTTING_DOWN" IGSShuttingDown+ <|> match "SUSPENDED" IGSSuspended+ <|> match "TERMINATED" IGSTerminated+ <|> match "TERMINATING" IGSTerminating++instance ToText InstanceGroupState where+ toText = \case+ IGSArrested -> "ARRESTED"+ IGSBootstrapping -> "BOOTSTRAPPING"+ IGSEnded -> "ENDED"+ IGSProvisioning -> "PROVISIONING"+ IGSResizing -> "RESIZING"+ IGSRunning -> "RUNNING"+ IGSShuttingDown -> "SHUTTING_DOWN"+ IGSSuspended -> "SUSPENDED"+ IGSTerminated -> "TERMINATED"+ IGSTerminating -> "TERMINATING"++instance FromJSON InstanceGroupState where+ parseJSON = parseJSONText "InstanceGroupState"++instance ToJSON InstanceGroupState where+ toJSON = toJSONText++data StepTimeline = StepTimeline+ { _stCreationDateTime :: Maybe RFC822+ , _stEndDateTime :: Maybe RFC822+ , _stStartDateTime :: Maybe RFC822+ } deriving (Eq, Ord, Show)++-- | 'StepTimeline' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'stCreationDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'stEndDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'stStartDateTime' @::@ 'Maybe' 'UTCTime'+--+stepTimeline :: StepTimeline+stepTimeline = StepTimeline+ { _stCreationDateTime = Nothing+ , _stStartDateTime = Nothing+ , _stEndDateTime = Nothing+ }++-- | The date and time when the cluster step was created.+stCreationDateTime :: Lens' StepTimeline (Maybe UTCTime)+stCreationDateTime =+ lens _stCreationDateTime (\s a -> s { _stCreationDateTime = a })+ . mapping _Time++-- | The date and time when the cluster step execution completed or failed.+stEndDateTime :: Lens' StepTimeline (Maybe UTCTime)+stEndDateTime = lens _stEndDateTime (\s a -> s { _stEndDateTime = a }) . mapping _Time++-- | The date and time when the cluster step execution started.+stStartDateTime :: Lens' StepTimeline (Maybe UTCTime)+stStartDateTime = lens _stStartDateTime (\s a -> s { _stStartDateTime = a }) . mapping _Time++instance FromJSON StepTimeline where+ parseJSON = withObject "StepTimeline" $ \o -> StepTimeline+ <$> o .:? "CreationDateTime"+ <*> o .:? "EndDateTime"+ <*> o .:? "StartDateTime"++instance ToJSON StepTimeline where+ toJSON StepTimeline{..} = object+ [ "CreationDateTime" .= _stCreationDateTime+ , "StartDateTime" .= _stStartDateTime+ , "EndDateTime" .= _stEndDateTime+ ]++newtype PlacementType = PlacementType+ { _ptAvailabilityZone :: Text+ } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'PlacementType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ptAvailabilityZone' @::@ 'Text'+--+placementType :: Text -- ^ 'ptAvailabilityZone'+ -> PlacementType+placementType p1 = PlacementType+ { _ptAvailabilityZone = p1+ }++-- | The Amazon EC2 Availability Zone for the job flow.+ptAvailabilityZone :: Lens' PlacementType Text+ptAvailabilityZone =+ lens _ptAvailabilityZone (\s a -> s { _ptAvailabilityZone = a })++instance FromJSON PlacementType where+ parseJSON = withObject "PlacementType" $ \o -> PlacementType+ <$> o .: "AvailabilityZone"++instance ToJSON PlacementType where+ toJSON PlacementType{..} = object+ [ "AvailabilityZone" .= _ptAvailabilityZone+ ]++data HadoopJarStepConfig = HadoopJarStepConfig+ { _hjscArgs :: List "Args" Text+ , _hjscJar :: Text+ , _hjscMainClass :: Maybe Text+ , _hjscProperties :: List "Properties" KeyValue+ } deriving (Eq, Show)++-- | 'HadoopJarStepConfig' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'hjscArgs' @::@ ['Text']+--+-- * 'hjscJar' @::@ 'Text'+--+-- * 'hjscMainClass' @::@ 'Maybe' 'Text'+--+-- * 'hjscProperties' @::@ ['KeyValue']+--+hadoopJarStepConfig :: Text -- ^ 'hjscJar'+ -> HadoopJarStepConfig+hadoopJarStepConfig p1 = HadoopJarStepConfig+ { _hjscJar = p1+ , _hjscProperties = mempty+ , _hjscMainClass = Nothing+ , _hjscArgs = mempty+ }++-- | A list of command line arguments passed to the JAR file's main function+-- when executed.+hjscArgs :: Lens' HadoopJarStepConfig [Text]+hjscArgs = lens _hjscArgs (\s a -> s { _hjscArgs = a }) . _List++-- | A path to a JAR file run during the step.+hjscJar :: Lens' HadoopJarStepConfig Text+hjscJar = lens _hjscJar (\s a -> s { _hjscJar = a })++-- | The name of the main class in the specified Java file. If not specified,+-- the JAR file should specify a Main-Class in its manifest file.+hjscMainClass :: Lens' HadoopJarStepConfig (Maybe Text)+hjscMainClass = lens _hjscMainClass (\s a -> s { _hjscMainClass = a })++-- | A list of Java properties that are set when the step runs. You can use+-- these properties to pass key value pairs to your main function.+hjscProperties :: Lens' HadoopJarStepConfig [KeyValue]+hjscProperties = lens _hjscProperties (\s a -> s { _hjscProperties = a }) . _List++instance FromJSON HadoopJarStepConfig where+ parseJSON = withObject "HadoopJarStepConfig" $ \o -> HadoopJarStepConfig+ <$> o .: "Args"+ <*> o .: "Jar"+ <*> o .:? "MainClass"+ <*> o .: "Properties"++instance ToJSON HadoopJarStepConfig where+ toJSON HadoopJarStepConfig{..} = object+ [ "Properties" .= _hjscProperties+ , "Jar" .= _hjscJar+ , "MainClass" .= _hjscMainClass+ , "Args" .= _hjscArgs+ ]++data InstanceGroupModifyConfig = InstanceGroupModifyConfig+ { _igmcEC2InstanceIdsToTerminate :: List "EC2InstanceIdsToTerminate" Text+ , _igmcInstanceCount :: Maybe Int+ , _igmcInstanceGroupId :: Text+ } deriving (Eq, Ord, Show)++-- | 'InstanceGroupModifyConfig' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'igmcEC2InstanceIdsToTerminate' @::@ ['Text']+--+-- * 'igmcInstanceCount' @::@ 'Maybe' 'Int'+--+-- * 'igmcInstanceGroupId' @::@ 'Text'+--+instanceGroupModifyConfig :: Text -- ^ 'igmcInstanceGroupId'+ -> InstanceGroupModifyConfig+instanceGroupModifyConfig p1 = InstanceGroupModifyConfig+ { _igmcInstanceGroupId = p1+ , _igmcInstanceCount = Nothing+ , _igmcEC2InstanceIdsToTerminate = mempty+ }++-- | The EC2 InstanceIds to terminate. For advanced users only. Once you+-- terminate the instances, the instance group will not return to its+-- original requested size.+igmcEC2InstanceIdsToTerminate :: Lens' InstanceGroupModifyConfig [Text]+igmcEC2InstanceIdsToTerminate =+ lens _igmcEC2InstanceIdsToTerminate+ (\s a -> s { _igmcEC2InstanceIdsToTerminate = a })+ . _List++-- | Target size for the instance group.+igmcInstanceCount :: Lens' InstanceGroupModifyConfig (Maybe Int)+igmcInstanceCount =+ lens _igmcInstanceCount (\s a -> s { _igmcInstanceCount = a })++-- | Unique ID of the instance group to expand or shrink.+igmcInstanceGroupId :: Lens' InstanceGroupModifyConfig Text+igmcInstanceGroupId =+ lens _igmcInstanceGroupId (\s a -> s { _igmcInstanceGroupId = a })++instance FromJSON InstanceGroupModifyConfig where+ parseJSON = withObject "InstanceGroupModifyConfig" $ \o -> InstanceGroupModifyConfig+ <$> o .: "EC2InstanceIdsToTerminate"+ <*> o .:? "InstanceCount"+ <*> o .: "InstanceGroupId"++instance ToJSON InstanceGroupModifyConfig where+ toJSON InstanceGroupModifyConfig{..} = object+ [ "InstanceGroupId" .= _igmcInstanceGroupId+ , "InstanceCount" .= _igmcInstanceCount+ , "EC2InstanceIdsToTerminate" .= _igmcEC2InstanceIdsToTerminate+ ]++data InstanceGroupDetail = InstanceGroupDetail+ { _igdBidPrice :: Maybe Text+ , _igdCreationDateTime :: RFC822+ , _igdEndDateTime :: Maybe RFC822+ , _igdInstanceGroupId :: Maybe Text+ , _igdInstanceRequestCount :: Int+ , _igdInstanceRole :: Text+ , _igdInstanceRunningCount :: Int+ , _igdInstanceType :: Text+ , _igdLastStateChangeReason :: Maybe Text+ , _igdMarket :: Text+ , _igdName :: Maybe Text+ , _igdReadyDateTime :: Maybe RFC822+ , _igdStartDateTime :: Maybe RFC822+ , _igdState :: Text+ } deriving (Eq, Ord, Show)++-- | 'InstanceGroupDetail' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'igdBidPrice' @::@ 'Maybe' 'Text'+--+-- * 'igdCreationDateTime' @::@ 'UTCTime'+--+-- * 'igdEndDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'igdInstanceGroupId' @::@ 'Maybe' 'Text'+--+-- * 'igdInstanceRequestCount' @::@ 'Int'+--+-- * 'igdInstanceRole' @::@ 'Text'+--+-- * 'igdInstanceRunningCount' @::@ 'Int'+--+-- * 'igdInstanceType' @::@ 'Text'+--+-- * 'igdLastStateChangeReason' @::@ 'Maybe' 'Text'+--+-- * 'igdMarket' @::@ 'Text'+--+-- * 'igdName' @::@ 'Maybe' 'Text'+--+-- * 'igdReadyDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'igdStartDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'igdState' @::@ 'Text'+--+instanceGroupDetail :: Text -- ^ 'igdMarket'+ -> Text -- ^ 'igdInstanceRole'+ -> Text -- ^ 'igdInstanceType'+ -> Int -- ^ 'igdInstanceRequestCount'+ -> Int -- ^ 'igdInstanceRunningCount'+ -> Text -- ^ 'igdState'+ -> UTCTime -- ^ 'igdCreationDateTime'+ -> InstanceGroupDetail+instanceGroupDetail p1 p2 p3 p4 p5 p6 p7 = InstanceGroupDetail+ { _igdMarket = p1+ , _igdInstanceRole = p2+ , _igdInstanceType = p3+ , _igdInstanceRequestCount = p4+ , _igdInstanceRunningCount = p5+ , _igdState = p6+ , _igdCreationDateTime = withIso _Time (const id) p7+ , _igdInstanceGroupId = Nothing+ , _igdName = Nothing+ , _igdBidPrice = Nothing+ , _igdLastStateChangeReason = Nothing+ , _igdStartDateTime = Nothing+ , _igdReadyDateTime = Nothing+ , _igdEndDateTime = Nothing+ }++-- | Bid price for EC2 Instances when launching nodes as Spot Instances,+-- expressed in USD.+igdBidPrice :: Lens' InstanceGroupDetail (Maybe Text)+igdBidPrice = lens _igdBidPrice (\s a -> s { _igdBidPrice = a })++-- | The date/time the instance group was created.+igdCreationDateTime :: Lens' InstanceGroupDetail UTCTime+igdCreationDateTime =+ lens _igdCreationDateTime (\s a -> s { _igdCreationDateTime = a })+ . _Time++-- | The date/time the instance group was terminated.+igdEndDateTime :: Lens' InstanceGroupDetail (Maybe UTCTime)+igdEndDateTime = lens _igdEndDateTime (\s a -> s { _igdEndDateTime = a }) . mapping _Time++-- | Unique identifier for the instance group.+igdInstanceGroupId :: Lens' InstanceGroupDetail (Maybe Text)+igdInstanceGroupId =+ lens _igdInstanceGroupId (\s a -> s { _igdInstanceGroupId = a })++-- | Target number of instances to run in the instance group.+igdInstanceRequestCount :: Lens' InstanceGroupDetail Int+igdInstanceRequestCount =+ lens _igdInstanceRequestCount (\s a -> s { _igdInstanceRequestCount = a })++-- | Instance group role in the cluster.+igdInstanceRole :: Lens' InstanceGroupDetail Text+igdInstanceRole = lens _igdInstanceRole (\s a -> s { _igdInstanceRole = a })++-- | Actual count of running instances.+igdInstanceRunningCount :: Lens' InstanceGroupDetail Int+igdInstanceRunningCount =+ lens _igdInstanceRunningCount (\s a -> s { _igdInstanceRunningCount = a })++-- | Amazon EC2 Instance type.+igdInstanceType :: Lens' InstanceGroupDetail Text+igdInstanceType = lens _igdInstanceType (\s a -> s { _igdInstanceType = a })++-- | Details regarding the state of the instance group.+igdLastStateChangeReason :: Lens' InstanceGroupDetail (Maybe Text)+igdLastStateChangeReason =+ lens _igdLastStateChangeReason+ (\s a -> s { _igdLastStateChangeReason = a })++-- | Market type of the Amazon EC2 instances used to create a cluster node.+igdMarket :: Lens' InstanceGroupDetail Text+igdMarket = lens _igdMarket (\s a -> s { _igdMarket = a })++-- | Friendly name for the instance group.+igdName :: Lens' InstanceGroupDetail (Maybe Text)+igdName = lens _igdName (\s a -> s { _igdName = a })++-- | The date/time the instance group was available to the cluster.+igdReadyDateTime :: Lens' InstanceGroupDetail (Maybe UTCTime)+igdReadyDateTime = lens _igdReadyDateTime (\s a -> s { _igdReadyDateTime = a }) . mapping _Time++-- | The date/time the instance group was started.+igdStartDateTime :: Lens' InstanceGroupDetail (Maybe UTCTime)+igdStartDateTime = lens _igdStartDateTime (\s a -> s { _igdStartDateTime = a }) . mapping _Time++-- | State of instance group. The following values are deprecated: STARTING,+-- TERMINATED, and FAILED.+igdState :: Lens' InstanceGroupDetail Text+igdState = lens _igdState (\s a -> s { _igdState = a })++instance FromJSON InstanceGroupDetail where+ parseJSON = withObject "InstanceGroupDetail" $ \o -> InstanceGroupDetail+ <$> o .:? "BidPrice"+ <*> o .: "CreationDateTime"+ <*> o .:? "EndDateTime"+ <*> o .:? "InstanceGroupId"+ <*> o .: "InstanceRequestCount"+ <*> o .: "InstanceRole"+ <*> o .: "InstanceRunningCount"+ <*> o .: "InstanceType"+ <*> o .:? "LastStateChangeReason"+ <*> o .: "Market"+ <*> o .:? "Name"+ <*> o .:? "ReadyDateTime"+ <*> o .:? "StartDateTime"+ <*> o .: "State"++instance ToJSON InstanceGroupDetail where+ toJSON InstanceGroupDetail{..} = object+ [ "InstanceGroupId" .= _igdInstanceGroupId+ , "Name" .= _igdName+ , "Market" .= _igdMarket+ , "InstanceRole" .= _igdInstanceRole+ , "BidPrice" .= _igdBidPrice+ , "InstanceType" .= _igdInstanceType+ , "InstanceRequestCount" .= _igdInstanceRequestCount+ , "InstanceRunningCount" .= _igdInstanceRunningCount+ , "State" .= _igdState+ , "LastStateChangeReason" .= _igdLastStateChangeReason+ , "CreationDateTime" .= _igdCreationDateTime+ , "StartDateTime" .= _igdStartDateTime+ , "ReadyDateTime" .= _igdReadyDateTime+ , "EndDateTime" .= _igdEndDateTime+ ]++data StepStateChangeReason = StepStateChangeReason+ { _sscrCode :: Maybe Text+ , _sscrMessage :: Maybe Text+ } deriving (Eq, Ord, Show)++-- | 'StepStateChangeReason' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sscrCode' @::@ 'Maybe' 'Text'+--+-- * 'sscrMessage' @::@ 'Maybe' 'Text'+--+stepStateChangeReason :: StepStateChangeReason+stepStateChangeReason = StepStateChangeReason+ { _sscrCode = Nothing+ , _sscrMessage = Nothing+ }++-- | The programmable code for the state change reason.+sscrCode :: Lens' StepStateChangeReason (Maybe Text)+sscrCode = lens _sscrCode (\s a -> s { _sscrCode = a })++-- | The descriptive message for the state change reason.+sscrMessage :: Lens' StepStateChangeReason (Maybe Text)+sscrMessage = lens _sscrMessage (\s a -> s { _sscrMessage = a })++instance FromJSON StepStateChangeReason where+ parseJSON = withObject "StepStateChangeReason" $ \o -> StepStateChangeReason+ <$> o .:? "Code"+ <*> o .:? "Message"++instance ToJSON StepStateChangeReason where+ toJSON StepStateChangeReason{..} = object+ [ "Code" .= _sscrCode+ , "Message" .= _sscrMessage+ ]++data ClusterStateChangeReasonCode+ = CSCRCAllStepsCompleted -- ^ ALL_STEPS_COMPLETED+ | CSCRCBootstrapFailure -- ^ BOOTSTRAP_FAILURE+ | CSCRCInstanceFailure -- ^ INSTANCE_FAILURE+ | CSCRCInternalError -- ^ INTERNAL_ERROR+ | CSCRCStepFailure -- ^ STEP_FAILURE+ | CSCRCUserRequest -- ^ USER_REQUEST+ | CSCRCValidationError -- ^ VALIDATION_ERROR+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ClusterStateChangeReasonCode++instance FromText ClusterStateChangeReasonCode where+ parser = match "ALL_STEPS_COMPLETED" CSCRCAllStepsCompleted+ <|> match "BOOTSTRAP_FAILURE" CSCRCBootstrapFailure+ <|> match "INSTANCE_FAILURE" CSCRCInstanceFailure+ <|> match "INTERNAL_ERROR" CSCRCInternalError+ <|> match "STEP_FAILURE" CSCRCStepFailure+ <|> match "USER_REQUEST" CSCRCUserRequest+ <|> match "VALIDATION_ERROR" CSCRCValidationError++instance ToText ClusterStateChangeReasonCode where+ toText = \case+ CSCRCAllStepsCompleted -> "ALL_STEPS_COMPLETED"+ CSCRCBootstrapFailure -> "BOOTSTRAP_FAILURE"+ CSCRCInstanceFailure -> "INSTANCE_FAILURE"+ CSCRCInternalError -> "INTERNAL_ERROR"+ CSCRCStepFailure -> "STEP_FAILURE"+ CSCRCUserRequest -> "USER_REQUEST"+ CSCRCValidationError -> "VALIDATION_ERROR"++instance FromJSON ClusterStateChangeReasonCode where+ parseJSON = parseJSONText "ClusterStateChangeReasonCode"++instance ToJSON ClusterStateChangeReasonCode where+ toJSON = toJSONText++data Step = Step+ { _sActionOnFailure :: Maybe Text+ , _sConfig :: Maybe HadoopStepConfig+ , _sId :: Maybe Text+ , _sName :: Maybe Text+ , _sStatus :: Maybe StepStatus+ } deriving (Eq, Show)++-- | 'Step' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sActionOnFailure' @::@ 'Maybe' 'Text'+--+-- * 'sConfig' @::@ 'Maybe' 'HadoopStepConfig'+--+-- * 'sId' @::@ 'Maybe' 'Text'+--+-- * 'sName' @::@ 'Maybe' 'Text'+--+-- * 'sStatus' @::@ 'Maybe' 'StepStatus'+--+step :: Step+step = Step+ { _sId = Nothing+ , _sName = Nothing+ , _sConfig = Nothing+ , _sActionOnFailure = Nothing+ , _sStatus = Nothing+ }++-- | This specifies what action to take when the cluster step fails. Possible+-- values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE.+sActionOnFailure :: Lens' Step (Maybe Text)+sActionOnFailure = lens _sActionOnFailure (\s a -> s { _sActionOnFailure = a })++-- | The Hadoop job configuration of the cluster step.+sConfig :: Lens' Step (Maybe HadoopStepConfig)+sConfig = lens _sConfig (\s a -> s { _sConfig = a })++-- | The identifier of the cluster step.+sId :: Lens' Step (Maybe Text)+sId = lens _sId (\s a -> s { _sId = a })++-- | The name of the cluster step.+sName :: Lens' Step (Maybe Text)+sName = lens _sName (\s a -> s { _sName = a })++-- | The current execution status details of the cluster step.+sStatus :: Lens' Step (Maybe StepStatus)+sStatus = lens _sStatus (\s a -> s { _sStatus = a })++instance FromJSON Step where+ parseJSON = withObject "Step" $ \o -> Step+ <$> o .:? "ActionOnFailure"+ <*> o .:? "Config"+ <*> o .:? "Id"+ <*> o .:? "Name"+ <*> o .:? "Status"++instance ToJSON Step where+ toJSON Step{..} = object+ [ "Id" .= _sId+ , "Name" .= _sName+ , "Config" .= _sConfig+ , "ActionOnFailure" .= _sActionOnFailure+ , "Status" .= _sStatus+ ]++data StepState+ = SSCancelled -- ^ CANCELLED+ | SSCompleted -- ^ COMPLETED+ | SSFailed -- ^ FAILED+ | SSInterrupted -- ^ INTERRUPTED+ | SSPending -- ^ PENDING+ | SSRunning -- ^ RUNNING+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable StepState++instance FromText StepState where+ parser = match "CANCELLED" SSCancelled+ <|> match "COMPLETED" SSCompleted+ <|> match "FAILED" SSFailed+ <|> match "INTERRUPTED" SSInterrupted+ <|> match "PENDING" SSPending+ <|> match "RUNNING" SSRunning++instance ToText StepState where+ toText = \case+ SSCancelled -> "CANCELLED"+ SSCompleted -> "COMPLETED"+ SSFailed -> "FAILED"+ SSInterrupted -> "INTERRUPTED"+ SSPending -> "PENDING"+ SSRunning -> "RUNNING"++instance FromJSON StepState where+ parseJSON = parseJSONText "StepState"++instance ToJSON StepState where+ toJSON = toJSONText++data InstanceGroupTimeline = InstanceGroupTimeline+ { _igtCreationDateTime :: Maybe RFC822+ , _igtEndDateTime :: Maybe RFC822+ , _igtReadyDateTime :: Maybe RFC822+ } deriving (Eq, Ord, Show)++-- | 'InstanceGroupTimeline' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'igtCreationDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'igtEndDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'igtReadyDateTime' @::@ 'Maybe' 'UTCTime'+--+instanceGroupTimeline :: InstanceGroupTimeline+instanceGroupTimeline = InstanceGroupTimeline+ { _igtCreationDateTime = Nothing+ , _igtReadyDateTime = Nothing+ , _igtEndDateTime = Nothing+ }++-- | The creation date and time of the instance group.+igtCreationDateTime :: Lens' InstanceGroupTimeline (Maybe UTCTime)+igtCreationDateTime =+ lens _igtCreationDateTime (\s a -> s { _igtCreationDateTime = a })+ . mapping _Time++-- | The date and time when the instance group terminated.+igtEndDateTime :: Lens' InstanceGroupTimeline (Maybe UTCTime)+igtEndDateTime = lens _igtEndDateTime (\s a -> s { _igtEndDateTime = a }) . mapping _Time++-- | The date and time when the instance group became ready to perform tasks.+igtReadyDateTime :: Lens' InstanceGroupTimeline (Maybe UTCTime)+igtReadyDateTime = lens _igtReadyDateTime (\s a -> s { _igtReadyDateTime = a }) . mapping _Time++instance FromJSON InstanceGroupTimeline where+ parseJSON = withObject "InstanceGroupTimeline" $ \o -> InstanceGroupTimeline+ <$> o .:? "CreationDateTime"+ <*> o .:? "EndDateTime"+ <*> o .:? "ReadyDateTime"++instance ToJSON InstanceGroupTimeline where+ toJSON InstanceGroupTimeline{..} = object+ [ "CreationDateTime" .= _igtCreationDateTime+ , "ReadyDateTime" .= _igtReadyDateTime+ , "EndDateTime" .= _igtEndDateTime+ ]++newtype BootstrapActionDetail = BootstrapActionDetail+ { _badBootstrapActionConfig :: Maybe BootstrapActionConfig+ } deriving (Eq, Show)++-- | 'BootstrapActionDetail' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'badBootstrapActionConfig' @::@ 'Maybe' 'BootstrapActionConfig'+--+bootstrapActionDetail :: BootstrapActionDetail+bootstrapActionDetail = BootstrapActionDetail+ { _badBootstrapActionConfig = Nothing+ }++-- | A description of the bootstrap action.+badBootstrapActionConfig :: Lens' BootstrapActionDetail (Maybe BootstrapActionConfig)+badBootstrapActionConfig =+ lens _badBootstrapActionConfig+ (\s a -> s { _badBootstrapActionConfig = a })++instance FromJSON BootstrapActionDetail where+ parseJSON = withObject "BootstrapActionDetail" $ \o -> BootstrapActionDetail+ <$> o .:? "BootstrapActionConfig"++instance ToJSON BootstrapActionDetail where+ toJSON BootstrapActionDetail{..} = object+ [ "BootstrapActionConfig" .= _badBootstrapActionConfig+ ]++data StepExecutionStatusDetail = StepExecutionStatusDetail+ { _sesdCreationDateTime :: RFC822+ , _sesdEndDateTime :: Maybe RFC822+ , _sesdLastStateChangeReason :: Maybe Text+ , _sesdStartDateTime :: Maybe RFC822+ , _sesdState :: Text+ } deriving (Eq, Ord, Show)++-- | 'StepExecutionStatusDetail' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sesdCreationDateTime' @::@ 'UTCTime'+--+-- * 'sesdEndDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'sesdLastStateChangeReason' @::@ 'Maybe' 'Text'+--+-- * 'sesdStartDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'sesdState' @::@ 'Text'+--+stepExecutionStatusDetail :: Text -- ^ 'sesdState'+ -> UTCTime -- ^ 'sesdCreationDateTime'+ -> StepExecutionStatusDetail+stepExecutionStatusDetail p1 p2 = StepExecutionStatusDetail+ { _sesdState = p1+ , _sesdCreationDateTime = withIso _Time (const id) p2+ , _sesdStartDateTime = Nothing+ , _sesdEndDateTime = Nothing+ , _sesdLastStateChangeReason = Nothing+ }++-- | The creation date and time of the step.+sesdCreationDateTime :: Lens' StepExecutionStatusDetail UTCTime+sesdCreationDateTime =+ lens _sesdCreationDateTime (\s a -> s { _sesdCreationDateTime = a })+ . _Time++-- | The completion date and time of the step.+sesdEndDateTime :: Lens' StepExecutionStatusDetail (Maybe UTCTime)+sesdEndDateTime = lens _sesdEndDateTime (\s a -> s { _sesdEndDateTime = a }) . mapping _Time++-- | A description of the step's current state.+sesdLastStateChangeReason :: Lens' StepExecutionStatusDetail (Maybe Text)+sesdLastStateChangeReason =+ lens _sesdLastStateChangeReason+ (\s a -> s { _sesdLastStateChangeReason = a })++-- | The start date and time of the step.+sesdStartDateTime :: Lens' StepExecutionStatusDetail (Maybe UTCTime)+sesdStartDateTime =+ lens _sesdStartDateTime (\s a -> s { _sesdStartDateTime = a })+ . mapping _Time++-- | The state of the job flow step.+sesdState :: Lens' StepExecutionStatusDetail Text+sesdState = lens _sesdState (\s a -> s { _sesdState = a })++instance FromJSON StepExecutionStatusDetail where+ parseJSON = withObject "StepExecutionStatusDetail" $ \o -> StepExecutionStatusDetail+ <$> o .: "CreationDateTime"+ <*> o .:? "EndDateTime"+ <*> o .:? "LastStateChangeReason"+ <*> o .:? "StartDateTime"+ <*> o .: "State"++instance ToJSON StepExecutionStatusDetail where+ toJSON StepExecutionStatusDetail{..} = object+ [ "State" .= _sesdState+ , "CreationDateTime" .= _sesdCreationDateTime+ , "StartDateTime" .= _sesdStartDateTime+ , "EndDateTime" .= _sesdEndDateTime+ , "LastStateChangeReason" .= _sesdLastStateChangeReason+ ]++data InstanceStatus = InstanceStatus+ { _isState :: Maybe Text+ , _isStateChangeReason :: Maybe InstanceStateChangeReason+ , _isTimeline :: Maybe InstanceTimeline+ } deriving (Eq, Show)++-- | 'InstanceStatus' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'isState' @::@ 'Maybe' 'Text'+--+-- * 'isStateChangeReason' @::@ 'Maybe' 'InstanceStateChangeReason'+--+-- * 'isTimeline' @::@ 'Maybe' 'InstanceTimeline'+--+instanceStatus :: InstanceStatus+instanceStatus = InstanceStatus+ { _isState = Nothing+ , _isStateChangeReason = Nothing+ , _isTimeline = Nothing+ }++-- | The current state of the instance.+isState :: Lens' InstanceStatus (Maybe Text)+isState = lens _isState (\s a -> s { _isState = a })++-- | The details of the status change reason for the instance.+isStateChangeReason :: Lens' InstanceStatus (Maybe InstanceStateChangeReason)+isStateChangeReason =+ lens _isStateChangeReason (\s a -> s { _isStateChangeReason = a })++-- | The timeline of the instance status over time.+isTimeline :: Lens' InstanceStatus (Maybe InstanceTimeline)+isTimeline = lens _isTimeline (\s a -> s { _isTimeline = a })++instance FromJSON InstanceStatus where+ parseJSON = withObject "InstanceStatus" $ \o -> InstanceStatus+ <$> o .:? "State"+ <*> o .:? "StateChangeReason"+ <*> o .:? "Timeline"++instance ToJSON InstanceStatus where+ toJSON InstanceStatus{..} = object+ [ "State" .= _isState+ , "StateChangeReason" .= _isStateChangeReason+ , "Timeline" .= _isTimeline+ ]++data InstanceRoleType+ = IRTCore -- ^ CORE+ | IRTMaster -- ^ MASTER+ | IRTTask -- ^ TASK+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable InstanceRoleType++instance FromText InstanceRoleType where+ parser = match "CORE" IRTCore+ <|> match "MASTER" IRTMaster+ <|> match "TASK" IRTTask++instance ToText InstanceRoleType where+ toText = \case+ IRTCore -> "CORE"+ IRTMaster -> "MASTER"+ IRTTask -> "TASK"++instance FromJSON InstanceRoleType where+ parseJSON = parseJSONText "InstanceRoleType"++instance ToJSON InstanceRoleType where+ toJSON = toJSONText++data JobFlowInstancesConfig = JobFlowInstancesConfig+ { _jficEc2KeyName :: Maybe Text+ , _jficEc2SubnetId :: Maybe Text+ , _jficHadoopVersion :: Maybe Text+ , _jficInstanceCount :: Maybe Int+ , _jficInstanceGroups :: List "InstanceGroups" InstanceGroupConfig+ , _jficKeepJobFlowAliveWhenNoSteps :: Maybe Bool+ , _jficMasterInstanceType :: Maybe Text+ , _jficPlacement :: Maybe PlacementType+ , _jficSlaveInstanceType :: Maybe Text+ , _jficTerminationProtected :: Maybe Bool+ } deriving (Eq, Show)++-- | 'JobFlowInstancesConfig' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'jficEc2KeyName' @::@ 'Maybe' 'Text'+--+-- * 'jficEc2SubnetId' @::@ 'Maybe' 'Text'+--+-- * 'jficHadoopVersion' @::@ 'Maybe' 'Text'+--+-- * 'jficInstanceCount' @::@ 'Maybe' 'Int'+--+-- * 'jficInstanceGroups' @::@ ['InstanceGroupConfig']+--+-- * 'jficKeepJobFlowAliveWhenNoSteps' @::@ 'Maybe' 'Bool'+--+-- * 'jficMasterInstanceType' @::@ 'Maybe' 'Text'+--+-- * 'jficPlacement' @::@ 'Maybe' 'PlacementType'+--+-- * 'jficSlaveInstanceType' @::@ 'Maybe' 'Text'+--+-- * 'jficTerminationProtected' @::@ 'Maybe' 'Bool'+--+jobFlowInstancesConfig :: JobFlowInstancesConfig+jobFlowInstancesConfig = JobFlowInstancesConfig+ { _jficMasterInstanceType = Nothing+ , _jficSlaveInstanceType = Nothing+ , _jficInstanceCount = Nothing+ , _jficInstanceGroups = mempty+ , _jficEc2KeyName = Nothing+ , _jficPlacement = Nothing+ , _jficKeepJobFlowAliveWhenNoSteps = Nothing+ , _jficTerminationProtected = Nothing+ , _jficHadoopVersion = Nothing+ , _jficEc2SubnetId = Nothing+ }++-- | The name of the Amazon EC2 key pair that can be used to ssh to the master+-- node as the user called "hadoop.".+jficEc2KeyName :: Lens' JobFlowInstancesConfig (Maybe Text)+jficEc2KeyName = lens _jficEc2KeyName (\s a -> s { _jficEc2KeyName = a })++-- | To launch the job flow in Amazon Virtual Private Cloud (Amazon VPC), set+-- this parameter to the identifier of the Amazon VPC subnet where you want+-- the job flow to launch. If you do not specify this value, the job flow is+-- launched in the normal Amazon Web Services cloud, outside of an Amazon+-- VPC. Amazon VPC currently does not support cluster compute quadruple+-- extra large (cc1.4xlarge) instances. Thus you cannot specify the+-- cc1.4xlarge instance type for nodes of a job flow launched in a Amazon+-- VPC.+jficEc2SubnetId :: Lens' JobFlowInstancesConfig (Maybe Text)+jficEc2SubnetId = lens _jficEc2SubnetId (\s a -> s { _jficEc2SubnetId = a })++-- | The Hadoop version for the job flow. Valid inputs are "0.18", "0.20", or+-- "0.20.205". If you do not set this value, the default of 0.18 is used,+-- unless the AmiVersion parameter is set in the RunJobFlow call, in which+-- case the default version of Hadoop for that AMI version is used.+jficHadoopVersion :: Lens' JobFlowInstancesConfig (Maybe Text)+jficHadoopVersion =+ lens _jficHadoopVersion (\s a -> s { _jficHadoopVersion = a })++-- | The number of Amazon EC2 instances used to execute the job flow.+jficInstanceCount :: Lens' JobFlowInstancesConfig (Maybe Int)+jficInstanceCount =+ lens _jficInstanceCount (\s a -> s { _jficInstanceCount = a })++-- | Configuration for the job flow's instance groups.+jficInstanceGroups :: Lens' JobFlowInstancesConfig [InstanceGroupConfig]+jficInstanceGroups =+ lens _jficInstanceGroups (\s a -> s { _jficInstanceGroups = a })+ . _List++-- | Specifies whether the job flow should terminate after completing all+-- steps.+jficKeepJobFlowAliveWhenNoSteps :: Lens' JobFlowInstancesConfig (Maybe Bool)+jficKeepJobFlowAliveWhenNoSteps =+ lens _jficKeepJobFlowAliveWhenNoSteps+ (\s a -> s { _jficKeepJobFlowAliveWhenNoSteps = a })++-- | The EC2 instance type of the master node.+jficMasterInstanceType :: Lens' JobFlowInstancesConfig (Maybe Text)+jficMasterInstanceType =+ lens _jficMasterInstanceType (\s a -> s { _jficMasterInstanceType = a })++-- | The Availability Zone the job flow will run in.+jficPlacement :: Lens' JobFlowInstancesConfig (Maybe PlacementType)+jficPlacement = lens _jficPlacement (\s a -> s { _jficPlacement = a })++-- | The EC2 instance type of the slave nodes.+jficSlaveInstanceType :: Lens' JobFlowInstancesConfig (Maybe Text)+jficSlaveInstanceType =+ lens _jficSlaveInstanceType (\s a -> s { _jficSlaveInstanceType = a })++-- | Specifies whether to lock the job flow to prevent the Amazon EC2+-- instances from being terminated by API call, user intervention, or in the+-- event of a job flow error.+jficTerminationProtected :: Lens' JobFlowInstancesConfig (Maybe Bool)+jficTerminationProtected =+ lens _jficTerminationProtected+ (\s a -> s { _jficTerminationProtected = a })++instance FromJSON JobFlowInstancesConfig where+ parseJSON = withObject "JobFlowInstancesConfig" $ \o -> JobFlowInstancesConfig+ <$> o .:? "Ec2KeyName"+ <*> o .:? "Ec2SubnetId"+ <*> o .:? "HadoopVersion"+ <*> o .:? "InstanceCount"+ <*> o .: "InstanceGroups"+ <*> o .:? "KeepJobFlowAliveWhenNoSteps"+ <*> o .:? "MasterInstanceType"+ <*> o .:? "Placement"+ <*> o .:? "SlaveInstanceType"+ <*> o .:? "TerminationProtected"++instance ToJSON JobFlowInstancesConfig where+ toJSON JobFlowInstancesConfig{..} = object+ [ "MasterInstanceType" .= _jficMasterInstanceType+ , "SlaveInstanceType" .= _jficSlaveInstanceType+ , "InstanceCount" .= _jficInstanceCount+ , "InstanceGroups" .= _jficInstanceGroups+ , "Ec2KeyName" .= _jficEc2KeyName+ , "Placement" .= _jficPlacement+ , "KeepJobFlowAliveWhenNoSteps" .= _jficKeepJobFlowAliveWhenNoSteps+ , "TerminationProtected" .= _jficTerminationProtected+ , "HadoopVersion" .= _jficHadoopVersion+ , "Ec2SubnetId" .= _jficEc2SubnetId+ ]++data StepConfig = StepConfig+ { _scActionOnFailure :: Maybe Text+ , _scHadoopJarStep :: HadoopJarStepConfig+ , _scName :: Text+ } deriving (Eq, Show)++-- | 'StepConfig' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'scActionOnFailure' @::@ 'Maybe' 'Text'+--+-- * 'scHadoopJarStep' @::@ 'HadoopJarStepConfig'+--+-- * 'scName' @::@ 'Text'+--+stepConfig :: Text -- ^ 'scName'+ -> HadoopJarStepConfig -- ^ 'scHadoopJarStep'+ -> StepConfig+stepConfig p1 p2 = StepConfig+ { _scName = p1+ , _scHadoopJarStep = p2+ , _scActionOnFailure = Nothing+ }++-- | The action to take if the job flow step fails.+scActionOnFailure :: Lens' StepConfig (Maybe Text)+scActionOnFailure =+ lens _scActionOnFailure (\s a -> s { _scActionOnFailure = a })++-- | The JAR file used for the job flow step.+scHadoopJarStep :: Lens' StepConfig HadoopJarStepConfig+scHadoopJarStep = lens _scHadoopJarStep (\s a -> s { _scHadoopJarStep = a })++-- | The name of the job flow step.+scName :: Lens' StepConfig Text+scName = lens _scName (\s a -> s { _scName = a })++instance FromJSON StepConfig where+ parseJSON = withObject "StepConfig" $ \o -> StepConfig+ <$> o .:? "ActionOnFailure"+ <*> o .: "HadoopJarStep"+ <*> o .: "Name"++instance ToJSON StepConfig where+ toJSON StepConfig{..} = object+ [ "Name" .= _scName+ , "ActionOnFailure" .= _scActionOnFailure+ , "HadoopJarStep" .= _scHadoopJarStep+ ]++data InstanceGroup = InstanceGroup+ { _igBidPrice :: Maybe Text+ , _igId :: Maybe Text+ , _igInstanceGroupType :: Maybe Text+ , _igInstanceType :: Maybe Text+ , _igMarket :: Maybe Text+ , _igName :: Maybe Text+ , _igRequestedInstanceCount :: Maybe Int+ , _igRunningInstanceCount :: Maybe Int+ , _igStatus :: Maybe InstanceGroupStatus+ } deriving (Eq, Show)++-- | 'InstanceGroup' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'igBidPrice' @::@ 'Maybe' 'Text'+--+-- * 'igId' @::@ 'Maybe' 'Text'+--+-- * 'igInstanceGroupType' @::@ 'Maybe' 'Text'+--+-- * 'igInstanceType' @::@ 'Maybe' 'Text'+--+-- * 'igMarket' @::@ 'Maybe' 'Text'+--+-- * 'igName' @::@ 'Maybe' 'Text'+--+-- * 'igRequestedInstanceCount' @::@ 'Maybe' 'Int'+--+-- * 'igRunningInstanceCount' @::@ 'Maybe' 'Int'+--+-- * 'igStatus' @::@ 'Maybe' 'InstanceGroupStatus'+--+instanceGroup :: InstanceGroup+instanceGroup = InstanceGroup+ { _igId = Nothing+ , _igName = Nothing+ , _igMarket = Nothing+ , _igInstanceGroupType = Nothing+ , _igBidPrice = Nothing+ , _igInstanceType = Nothing+ , _igRequestedInstanceCount = Nothing+ , _igRunningInstanceCount = Nothing+ , _igStatus = Nothing+ }++-- | The bid price for each EC2 instance in the instance group when launching+-- nodes as Spot Instances, expressed in USD.+igBidPrice :: Lens' InstanceGroup (Maybe Text)+igBidPrice = lens _igBidPrice (\s a -> s { _igBidPrice = a })++-- | The identifier of the instance group.+igId :: Lens' InstanceGroup (Maybe Text)+igId = lens _igId (\s a -> s { _igId = a })++-- | The type of the instance group. Valid values are MASTER, CORE or TASK.+igInstanceGroupType :: Lens' InstanceGroup (Maybe Text)+igInstanceGroupType =+ lens _igInstanceGroupType (\s a -> s { _igInstanceGroupType = a })++-- | The EC2 instance type for all instances in the instance group.+igInstanceType :: Lens' InstanceGroup (Maybe Text)+igInstanceType = lens _igInstanceType (\s a -> s { _igInstanceType = a })++-- | The marketplace to provision instances for this group. Valid values are+-- ON_DEMAND or SPOT.+igMarket :: Lens' InstanceGroup (Maybe Text)+igMarket = lens _igMarket (\s a -> s { _igMarket = a })++-- | The name of the instance group.+igName :: Lens' InstanceGroup (Maybe Text)+igName = lens _igName (\s a -> s { _igName = a })++-- | The target number of instances for the instance group.+igRequestedInstanceCount :: Lens' InstanceGroup (Maybe Int)+igRequestedInstanceCount =+ lens _igRequestedInstanceCount+ (\s a -> s { _igRequestedInstanceCount = a })++-- | The number of instances currently running in this instance group.+igRunningInstanceCount :: Lens' InstanceGroup (Maybe Int)+igRunningInstanceCount =+ lens _igRunningInstanceCount (\s a -> s { _igRunningInstanceCount = a })++-- | The current status of the instance group.+igStatus :: Lens' InstanceGroup (Maybe InstanceGroupStatus)+igStatus = lens _igStatus (\s a -> s { _igStatus = a })++instance FromJSON InstanceGroup where+ parseJSON = withObject "InstanceGroup" $ \o -> InstanceGroup+ <$> o .:? "BidPrice"+ <*> o .:? "Id"+ <*> o .:? "InstanceGroupType"+ <*> o .:? "InstanceType"+ <*> o .:? "Market"+ <*> o .:? "Name"+ <*> o .:? "RequestedInstanceCount"+ <*> o .:? "RunningInstanceCount"+ <*> o .:? "Status"++instance ToJSON InstanceGroup where+ toJSON InstanceGroup{..} = object+ [ "Id" .= _igId+ , "Name" .= _igName+ , "Market" .= _igMarket+ , "InstanceGroupType" .= _igInstanceGroupType+ , "BidPrice" .= _igBidPrice+ , "InstanceType" .= _igInstanceType+ , "RequestedInstanceCount" .= _igRequestedInstanceCount+ , "RunningInstanceCount" .= _igRunningInstanceCount+ , "Status" .= _igStatus+ ]++data BootstrapActionConfig = BootstrapActionConfig+ { _bacName :: Text+ , _bacScriptBootstrapAction :: ScriptBootstrapActionConfig+ } deriving (Eq, Show)++-- | 'BootstrapActionConfig' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'bacName' @::@ 'Text'+--+-- * 'bacScriptBootstrapAction' @::@ 'ScriptBootstrapActionConfig'+--+bootstrapActionConfig :: Text -- ^ 'bacName'+ -> ScriptBootstrapActionConfig -- ^ 'bacScriptBootstrapAction'+ -> BootstrapActionConfig+bootstrapActionConfig p1 p2 = BootstrapActionConfig+ { _bacName = p1+ , _bacScriptBootstrapAction = p2+ }++-- | The name of the bootstrap action.+bacName :: Lens' BootstrapActionConfig Text+bacName = lens _bacName (\s a -> s { _bacName = a })++-- | The script run by the bootstrap action.+bacScriptBootstrapAction :: Lens' BootstrapActionConfig ScriptBootstrapActionConfig+bacScriptBootstrapAction =+ lens _bacScriptBootstrapAction+ (\s a -> s { _bacScriptBootstrapAction = a })++instance FromJSON BootstrapActionConfig where+ parseJSON = withObject "BootstrapActionConfig" $ \o -> BootstrapActionConfig+ <$> o .: "Name"+ <*> o .: "ScriptBootstrapAction"++instance ToJSON BootstrapActionConfig where+ toJSON BootstrapActionConfig{..} = object+ [ "Name" .= _bacName+ , "ScriptBootstrapAction" .= _bacScriptBootstrapAction+ ]++data ClusterSummary = ClusterSummary+ { _csId :: Maybe Text+ , _csName :: Maybe Text+ , _csStatus :: Maybe ClusterStatus+ } deriving (Eq, Show)++-- | 'ClusterSummary' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'csId' @::@ 'Maybe' 'Text'+--+-- * 'csName' @::@ 'Maybe' 'Text'+--+-- * 'csStatus' @::@ 'Maybe' 'ClusterStatus'+--+clusterSummary :: ClusterSummary+clusterSummary = ClusterSummary+ { _csId = Nothing+ , _csName = Nothing+ , _csStatus = Nothing+ }++-- | The unique identifier for the cluster.+csId :: Lens' ClusterSummary (Maybe Text)+csId = lens _csId (\s a -> s { _csId = a })++-- | The name of the cluster.+csName :: Lens' ClusterSummary (Maybe Text)+csName = lens _csName (\s a -> s { _csName = a })++-- | The details about the current status of the cluster.+csStatus :: Lens' ClusterSummary (Maybe ClusterStatus)+csStatus = lens _csStatus (\s a -> s { _csStatus = a })++instance FromJSON ClusterSummary where+ parseJSON = withObject "ClusterSummary" $ \o -> ClusterSummary+ <$> o .:? "Id"+ <*> o .:? "Name"+ <*> o .:? "Status"++instance ToJSON ClusterSummary where+ toJSON ClusterSummary{..} = object+ [ "Id" .= _csId+ , "Name" .= _csName+ , "Status" .= _csStatus+ ]++data JobFlowInstancesDetail = JobFlowInstancesDetail+ { _jfidEc2KeyName :: Maybe Text+ , _jfidEc2SubnetId :: Maybe Text+ , _jfidHadoopVersion :: Maybe Text+ , _jfidInstanceCount :: Int+ , _jfidInstanceGroups :: List "InstanceGroups" InstanceGroupDetail+ , _jfidKeepJobFlowAliveWhenNoSteps :: Maybe Bool+ , _jfidMasterInstanceId :: Maybe Text+ , _jfidMasterInstanceType :: Text+ , _jfidMasterPublicDnsName :: Maybe Text+ , _jfidNormalizedInstanceHours :: Maybe Int+ , _jfidPlacement :: Maybe PlacementType+ , _jfidSlaveInstanceType :: Text+ , _jfidTerminationProtected :: Maybe Bool+ } deriving (Eq, Show)++-- | 'JobFlowInstancesDetail' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'jfidEc2KeyName' @::@ 'Maybe' 'Text'+--+-- * 'jfidEc2SubnetId' @::@ 'Maybe' 'Text'+--+-- * 'jfidHadoopVersion' @::@ 'Maybe' 'Text'+--+-- * 'jfidInstanceCount' @::@ 'Int'+--+-- * 'jfidInstanceGroups' @::@ ['InstanceGroupDetail']+--+-- * 'jfidKeepJobFlowAliveWhenNoSteps' @::@ 'Maybe' 'Bool'+--+-- * 'jfidMasterInstanceId' @::@ 'Maybe' 'Text'+--+-- * 'jfidMasterInstanceType' @::@ 'Text'+--+-- * 'jfidMasterPublicDnsName' @::@ 'Maybe' 'Text'+--+-- * 'jfidNormalizedInstanceHours' @::@ 'Maybe' 'Int'+--+-- * 'jfidPlacement' @::@ 'Maybe' 'PlacementType'+--+-- * 'jfidSlaveInstanceType' @::@ 'Text'+--+-- * 'jfidTerminationProtected' @::@ 'Maybe' 'Bool'+--+jobFlowInstancesDetail :: Text -- ^ 'jfidMasterInstanceType'+ -> Text -- ^ 'jfidSlaveInstanceType'+ -> Int -- ^ 'jfidInstanceCount'+ -> JobFlowInstancesDetail+jobFlowInstancesDetail p1 p2 p3 = JobFlowInstancesDetail+ { _jfidMasterInstanceType = p1+ , _jfidSlaveInstanceType = p2+ , _jfidInstanceCount = p3+ , _jfidMasterPublicDnsName = Nothing+ , _jfidMasterInstanceId = Nothing+ , _jfidInstanceGroups = mempty+ , _jfidNormalizedInstanceHours = Nothing+ , _jfidEc2KeyName = Nothing+ , _jfidEc2SubnetId = Nothing+ , _jfidPlacement = Nothing+ , _jfidKeepJobFlowAliveWhenNoSteps = Nothing+ , _jfidTerminationProtected = Nothing+ , _jfidHadoopVersion = Nothing+ }++-- | The name of an Amazon EC2 key pair that can be used to ssh to the master+-- node of job flow.+jfidEc2KeyName :: Lens' JobFlowInstancesDetail (Maybe Text)+jfidEc2KeyName = lens _jfidEc2KeyName (\s a -> s { _jfidEc2KeyName = a })++-- | For job flows launched within Amazon Virtual Private Cloud, this value+-- specifies the identifier of the subnet where the job flow was launched.+jfidEc2SubnetId :: Lens' JobFlowInstancesDetail (Maybe Text)+jfidEc2SubnetId = lens _jfidEc2SubnetId (\s a -> s { _jfidEc2SubnetId = a })++-- | The Hadoop version for the job flow.+jfidHadoopVersion :: Lens' JobFlowInstancesDetail (Maybe Text)+jfidHadoopVersion =+ lens _jfidHadoopVersion (\s a -> s { _jfidHadoopVersion = a })++-- | The number of Amazon EC2 instances in the cluster. If the value is 1, the+-- same instance serves as both the master and slave node. If the value is+-- greater than 1, one instance is the master node and all others are slave+-- nodes.+jfidInstanceCount :: Lens' JobFlowInstancesDetail Int+jfidInstanceCount =+ lens _jfidInstanceCount (\s a -> s { _jfidInstanceCount = a })++-- | Details about the job flow's instance groups.+jfidInstanceGroups :: Lens' JobFlowInstancesDetail [InstanceGroupDetail]+jfidInstanceGroups =+ lens _jfidInstanceGroups (\s a -> s { _jfidInstanceGroups = a })+ . _List++-- | Specifies whether the job flow should terminate after completing all+-- steps.+jfidKeepJobFlowAliveWhenNoSteps :: Lens' JobFlowInstancesDetail (Maybe Bool)+jfidKeepJobFlowAliveWhenNoSteps =+ lens _jfidKeepJobFlowAliveWhenNoSteps+ (\s a -> s { _jfidKeepJobFlowAliveWhenNoSteps = a })++-- | The Amazon EC2 instance identifier of the master node.+jfidMasterInstanceId :: Lens' JobFlowInstancesDetail (Maybe Text)+jfidMasterInstanceId =+ lens _jfidMasterInstanceId (\s a -> s { _jfidMasterInstanceId = a })++-- | The Amazon EC2 master node instance type.+jfidMasterInstanceType :: Lens' JobFlowInstancesDetail Text+jfidMasterInstanceType =+ lens _jfidMasterInstanceType (\s a -> s { _jfidMasterInstanceType = a })++-- | The DNS name of the master node.+jfidMasterPublicDnsName :: Lens' JobFlowInstancesDetail (Maybe Text)+jfidMasterPublicDnsName =+ lens _jfidMasterPublicDnsName (\s a -> s { _jfidMasterPublicDnsName = a })++-- | An approximation of the cost of the job flow, represented in+-- m1.small/hours. This value is incremented once for every hour an m1.small+-- runs. Larger instances are weighted more, so an Amazon EC2 instance that+-- is roughly four times more expensive would result in the normalized+-- instance hours being incremented by four. This result is only an+-- approximation and does not reflect the actual billing rate.+jfidNormalizedInstanceHours :: Lens' JobFlowInstancesDetail (Maybe Int)+jfidNormalizedInstanceHours =+ lens _jfidNormalizedInstanceHours+ (\s a -> s { _jfidNormalizedInstanceHours = a })++-- | The Amazon EC2 Availability Zone for the job flow.+jfidPlacement :: Lens' JobFlowInstancesDetail (Maybe PlacementType)+jfidPlacement = lens _jfidPlacement (\s a -> s { _jfidPlacement = a })++-- | The Amazon EC2 slave node instance type.+jfidSlaveInstanceType :: Lens' JobFlowInstancesDetail Text+jfidSlaveInstanceType =+ lens _jfidSlaveInstanceType (\s a -> s { _jfidSlaveInstanceType = a })++-- | Specifies whether the Amazon EC2 instances in the cluster are protected+-- from termination by API calls, user intervention, or in the event of a+-- job flow error.+jfidTerminationProtected :: Lens' JobFlowInstancesDetail (Maybe Bool)+jfidTerminationProtected =+ lens _jfidTerminationProtected+ (\s a -> s { _jfidTerminationProtected = a })++instance FromJSON JobFlowInstancesDetail where+ parseJSON = withObject "JobFlowInstancesDetail" $ \o -> JobFlowInstancesDetail+ <$> o .:? "Ec2KeyName"+ <*> o .:? "Ec2SubnetId"+ <*> o .:? "HadoopVersion"+ <*> o .: "InstanceCount"+ <*> o .: "InstanceGroups"+ <*> o .:? "KeepJobFlowAliveWhenNoSteps"+ <*> o .:? "MasterInstanceId"+ <*> o .: "MasterInstanceType"+ <*> o .:? "MasterPublicDnsName"+ <*> o .:? "NormalizedInstanceHours"+ <*> o .:? "Placement"+ <*> o .: "SlaveInstanceType"+ <*> o .:? "TerminationProtected"++instance ToJSON JobFlowInstancesDetail where+ toJSON JobFlowInstancesDetail{..} = object+ [ "MasterInstanceType" .= _jfidMasterInstanceType+ , "MasterPublicDnsName" .= _jfidMasterPublicDnsName+ , "MasterInstanceId" .= _jfidMasterInstanceId+ , "SlaveInstanceType" .= _jfidSlaveInstanceType+ , "InstanceCount" .= _jfidInstanceCount+ , "InstanceGroups" .= _jfidInstanceGroups+ , "NormalizedInstanceHours" .= _jfidNormalizedInstanceHours+ , "Ec2KeyName" .= _jfidEc2KeyName+ , "Ec2SubnetId" .= _jfidEc2SubnetId+ , "Placement" .= _jfidPlacement+ , "KeepJobFlowAliveWhenNoSteps" .= _jfidKeepJobFlowAliveWhenNoSteps+ , "TerminationProtected" .= _jfidTerminationProtected+ , "HadoopVersion" .= _jfidHadoopVersion+ ]++data ClusterStatus = ClusterStatus+ { _csState :: Maybe Text+ , _csStateChangeReason :: Maybe ClusterStateChangeReason+ , _csTimeline :: Maybe ClusterTimeline+ } deriving (Eq, Show)++-- | 'ClusterStatus' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'csState' @::@ 'Maybe' 'Text'+--+-- * 'csStateChangeReason' @::@ 'Maybe' 'ClusterStateChangeReason'+--+-- * 'csTimeline' @::@ 'Maybe' 'ClusterTimeline'+--+clusterStatus :: ClusterStatus+clusterStatus = ClusterStatus+ { _csState = Nothing+ , _csStateChangeReason = Nothing+ , _csTimeline = Nothing+ }++-- | The current state of the cluster.+csState :: Lens' ClusterStatus (Maybe Text)+csState = lens _csState (\s a -> s { _csState = a })++-- | The reason for the cluster status change.+csStateChangeReason :: Lens' ClusterStatus (Maybe ClusterStateChangeReason)+csStateChangeReason =+ lens _csStateChangeReason (\s a -> s { _csStateChangeReason = a })++-- | A timeline that represents the status of a cluster over the lifetime of+-- the cluster.+csTimeline :: Lens' ClusterStatus (Maybe ClusterTimeline)+csTimeline = lens _csTimeline (\s a -> s { _csTimeline = a })++instance FromJSON ClusterStatus where+ parseJSON = withObject "ClusterStatus" $ \o -> ClusterStatus+ <$> o .:? "State"+ <*> o .:? "StateChangeReason"+ <*> o .:? "Timeline"++instance ToJSON ClusterStatus where+ toJSON ClusterStatus{..} = object+ [ "State" .= _csState+ , "StateChangeReason" .= _csStateChangeReason+ , "Timeline" .= _csTimeline+ ]++data InstanceState+ = ISAwaitingFulfillment -- ^ AWAITING_FULFILLMENT+ | ISBootstrapping -- ^ BOOTSTRAPPING+ | ISProvisioning -- ^ PROVISIONING+ | ISRunning -- ^ RUNNING+ | ISTerminated -- ^ TERMINATED+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable InstanceState++instance FromText InstanceState where+ parser = match "AWAITING_FULFILLMENT" ISAwaitingFulfillment+ <|> match "BOOTSTRAPPING" ISBootstrapping+ <|> match "PROVISIONING" ISProvisioning+ <|> match "RUNNING" ISRunning+ <|> match "TERMINATED" ISTerminated++instance ToText InstanceState where+ toText = \case+ ISAwaitingFulfillment -> "AWAITING_FULFILLMENT"+ ISBootstrapping -> "BOOTSTRAPPING"+ ISProvisioning -> "PROVISIONING"+ ISRunning -> "RUNNING"+ ISTerminated -> "TERMINATED"++instance FromJSON InstanceState where+ parseJSON = parseJSONText "InstanceState"++instance ToJSON InstanceState where+ toJSON = toJSONText++data ClusterTimeline = ClusterTimeline+ { _ctCreationDateTime :: Maybe RFC822+ , _ctEndDateTime :: Maybe RFC822+ , _ctReadyDateTime :: Maybe RFC822+ } deriving (Eq, Ord, Show)++-- | 'ClusterTimeline' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ctCreationDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'ctEndDateTime' @::@ 'Maybe' 'UTCTime'+--+-- * 'ctReadyDateTime' @::@ 'Maybe' 'UTCTime'+--+clusterTimeline :: ClusterTimeline+clusterTimeline = ClusterTimeline+ { _ctCreationDateTime = Nothing+ , _ctReadyDateTime = Nothing+ , _ctEndDateTime = Nothing+ }++-- | The creation date and time of the cluster.+ctCreationDateTime :: Lens' ClusterTimeline (Maybe UTCTime)+ctCreationDateTime =+ lens _ctCreationDateTime (\s a -> s { _ctCreationDateTime = a })+ . mapping _Time++-- | The date and time when the cluster was terminated.+ctEndDateTime :: Lens' ClusterTimeline (Maybe UTCTime)+ctEndDateTime = lens _ctEndDateTime (\s a -> s { _ctEndDateTime = a }) . mapping _Time++-- | The date and time when the cluster was ready to execute steps.+ctReadyDateTime :: Lens' ClusterTimeline (Maybe UTCTime)+ctReadyDateTime = lens _ctReadyDateTime (\s a -> s { _ctReadyDateTime = a }) . mapping _Time++instance FromJSON ClusterTimeline where+ parseJSON = withObject "ClusterTimeline" $ \o -> ClusterTimeline+ <$> o .:? "CreationDateTime"+ <*> o .:? "EndDateTime"+ <*> o .:? "ReadyDateTime"++instance ToJSON ClusterTimeline where+ toJSON ClusterTimeline{..} = object+ [ "CreationDateTime" .= _ctCreationDateTime+ , "ReadyDateTime" .= _ctReadyDateTime+ , "EndDateTime" .= _ctEndDateTime+ ]++data InstanceStateChangeReasonCode+ = ISCRCBootstrapFailure -- ^ BOOTSTRAP_FAILURE+ | ISCRCClusterTerminated -- ^ CLUSTER_TERMINATED+ | ISCRCInstanceFailure -- ^ INSTANCE_FAILURE+ | ISCRCInternalError -- ^ INTERNAL_ERROR+ | ISCRCValidationError -- ^ VALIDATION_ERROR+ deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable InstanceStateChangeReasonCode++instance FromText InstanceStateChangeReasonCode where+ parser = match "BOOTSTRAP_FAILURE" ISCRCBootstrapFailure+ <|> match "CLUSTER_TERMINATED" ISCRCClusterTerminated+ <|> match "INSTANCE_FAILURE" ISCRCInstanceFailure+ <|> match "INTERNAL_ERROR" ISCRCInternalError+ <|> match "VALIDATION_ERROR" ISCRCValidationError++instance ToText InstanceStateChangeReasonCode where+ toText = \case+ ISCRCBootstrapFailure -> "BOOTSTRAP_FAILURE"+ ISCRCClusterTerminated -> "CLUSTER_TERMINATED"+ ISCRCInstanceFailure -> "INSTANCE_FAILURE"+ ISCRCInternalError -> "INTERNAL_ERROR"+ ISCRCValidationError -> "VALIDATION_ERROR"++instance FromJSON InstanceStateChangeReasonCode where+ parseJSON = parseJSONText "InstanceStateChangeReasonCode"++instance ToJSON InstanceStateChangeReasonCode where+ toJSON = toJSONText++data Instance = Instance+ { _iEc2InstanceId :: Maybe Text+ , _iId :: Maybe Text+ , _iPrivateDnsName :: Maybe Text+ , _iPrivateIpAddress :: Maybe Text+ , _iPublicDnsName :: Maybe Text+ , _iPublicIpAddress :: Maybe Text+ , _iStatus :: Maybe InstanceStatus+ } deriving (Eq, Show)++-- | 'Instance' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'iEc2InstanceId' @::@ 'Maybe' 'Text'+--+-- * 'iId' @::@ 'Maybe' 'Text'+--+-- * 'iPrivateDnsName' @::@ 'Maybe' 'Text'+--+-- * 'iPrivateIpAddress' @::@ 'Maybe' 'Text'+--+-- * 'iPublicDnsName' @::@ 'Maybe' 'Text'+--+-- * 'iPublicIpAddress' @::@ 'Maybe' 'Text'+--+-- * 'iStatus' @::@ 'Maybe' 'InstanceStatus'+--+instance' :: Instance+instance' = Instance+ { _iId = Nothing+ , _iEc2InstanceId = Nothing+ , _iPublicDnsName = Nothing+ , _iPublicIpAddress = Nothing+ , _iPrivateDnsName = Nothing+ , _iPrivateIpAddress = Nothing+ , _iStatus = Nothing+ }++-- | The unique identifier of the instance in Amazon EC2.+iEc2InstanceId :: Lens' Instance (Maybe Text)+iEc2InstanceId = lens _iEc2InstanceId (\s a -> s { _iEc2InstanceId = a })++-- | The unique identifier for the instance in Amazon EMR.+iId :: Lens' Instance (Maybe Text)+iId = lens _iId (\s a -> s { _iId = a })++-- | The private DNS name of the instance.+iPrivateDnsName :: Lens' Instance (Maybe Text)+iPrivateDnsName = lens _iPrivateDnsName (\s a -> s { _iPrivateDnsName = a })++-- | The private IP address of the instance.+iPrivateIpAddress :: Lens' Instance (Maybe Text)+iPrivateIpAddress =+ lens _iPrivateIpAddress (\s a -> s { _iPrivateIpAddress = a })++-- | The public DNS name of the instance.+iPublicDnsName :: Lens' Instance (Maybe Text)+iPublicDnsName = lens _iPublicDnsName (\s a -> s { _iPublicDnsName = a })++-- | The public IP address of the instance.+iPublicIpAddress :: Lens' Instance (Maybe Text)+iPublicIpAddress = lens _iPublicIpAddress (\s a -> s { _iPublicIpAddress = a })++-- | The current status of the instance.+iStatus :: Lens' Instance (Maybe InstanceStatus)+iStatus = lens _iStatus (\s a -> s { _iStatus = a })++instance FromJSON Instance where+ parseJSON = withObject "Instance" $ \o -> Instance+ <$> o .:? "Ec2InstanceId"+ <*> o .:? "Id"+ <*> o .:? "PrivateDnsName"+ <*> o .:? "PrivateIpAddress"+ <*> o .:? "PublicDnsName"+ <*> o .:? "PublicIpAddress"+ <*> o .:? "Status"++instance ToJSON Instance where+ toJSON Instance{..} = object+ [ "Id" .= _iId+ , "Ec2InstanceId" .= _iEc2InstanceId+ , "PublicDnsName" .= _iPublicDnsName+ , "PublicIpAddress" .= _iPublicIpAddress+ , "PrivateDnsName" .= _iPrivateDnsName+ , "PrivateIpAddress" .= _iPrivateIpAddress+ , "Status" .= _iStatus+ ]++data ScriptBootstrapActionConfig = ScriptBootstrapActionConfig+ { _sbacArgs :: List "Args" Text+ , _sbacPath :: Text+ } deriving (Eq, Ord, Show)++-- | 'ScriptBootstrapActionConfig' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sbacArgs' @::@ ['Text']+--+-- * 'sbacPath' @::@ 'Text'+--+scriptBootstrapActionConfig :: Text -- ^ 'sbacPath'+ -> ScriptBootstrapActionConfig+scriptBootstrapActionConfig p1 = ScriptBootstrapActionConfig+ { _sbacPath = p1+ , _sbacArgs = mempty+ }++-- | A list of command line arguments to pass to the bootstrap action script.+sbacArgs :: Lens' ScriptBootstrapActionConfig [Text]+sbacArgs = lens _sbacArgs (\s a -> s { _sbacArgs = a }) . _List++-- | Location of the script to run during a bootstrap action. Can be either a+-- location in Amazon S3 or on a local file system.+sbacPath :: Lens' ScriptBootstrapActionConfig Text+sbacPath = lens _sbacPath (\s a -> s { _sbacPath = a })++instance FromJSON ScriptBootstrapActionConfig where+ parseJSON = withObject "ScriptBootstrapActionConfig" $ \o -> ScriptBootstrapActionConfig+ <$> o .: "Args"+ <*> o .: "Path"++instance ToJSON ScriptBootstrapActionConfig where+ toJSON ScriptBootstrapActionConfig{..} = object+ [ "Path" .= _sbacPath+ , "Args" .= _sbacArgs+ ]