amazonka-batch (empty) → 1.5.0
raw patch · 62 files changed
+6285/−0 lines, 62 filesdep +amazonka-batchdep +amazonka-coredep +amazonka-testsetup-changed
Dependencies added: amazonka-batch, amazonka-core, amazonka-test, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +45/−0
- Setup.hs +2/−0
- amazonka-batch.cabal +101/−0
- fixture/CancelJob.yaml +10/−0
- fixture/CancelJobResponse.proto +0/−0
- fixture/CreateComputeEnvironment.yaml +10/−0
- fixture/CreateComputeEnvironmentResponse.proto +0/−0
- fixture/CreateJobQueue.yaml +10/−0
- fixture/CreateJobQueueResponse.proto +0/−0
- fixture/DeleteComputeEnvironment.yaml +10/−0
- fixture/DeleteComputeEnvironmentResponse.proto +0/−0
- fixture/DeleteJobQueue.yaml +10/−0
- fixture/DeleteJobQueueResponse.proto +0/−0
- fixture/DeregisterJobDefinition.yaml +10/−0
- fixture/DeregisterJobDefinitionResponse.proto +0/−0
- fixture/DescribeComputeEnvironments.yaml +10/−0
- fixture/DescribeComputeEnvironmentsResponse.proto +0/−0
- fixture/DescribeJobDefinitions.yaml +10/−0
- fixture/DescribeJobDefinitionsResponse.proto +0/−0
- fixture/DescribeJobQueues.yaml +10/−0
- fixture/DescribeJobQueuesResponse.proto +0/−0
- fixture/DescribeJobs.yaml +10/−0
- fixture/DescribeJobsResponse.proto +0/−0
- fixture/ListJobs.yaml +10/−0
- fixture/ListJobsResponse.proto +0/−0
- fixture/RegisterJobDefinition.yaml +10/−0
- fixture/RegisterJobDefinitionResponse.proto +0/−0
- fixture/SubmitJob.yaml +10/−0
- fixture/SubmitJobResponse.proto +0/−0
- fixture/TerminateJob.yaml +10/−0
- fixture/TerminateJobResponse.proto +0/−0
- fixture/UpdateComputeEnvironment.yaml +10/−0
- fixture/UpdateComputeEnvironmentResponse.proto +0/−0
- fixture/UpdateJobQueue.yaml +10/−0
- fixture/UpdateJobQueueResponse.proto +0/−0
- gen/Network/AWS/Batch.hs +354/−0
- gen/Network/AWS/Batch/CancelJob.hs +131/−0
- gen/Network/AWS/Batch/CreateComputeEnvironment.hs +196/−0
- gen/Network/AWS/Batch/CreateJobQueue.hs +182/−0
- gen/Network/AWS/Batch/DeleteComputeEnvironment.hs +127/−0
- gen/Network/AWS/Batch/DeleteJobQueue.hs +121/−0
- gen/Network/AWS/Batch/DeregisterJobDefinition.hs +123/−0
- gen/Network/AWS/Batch/DescribeComputeEnvironments.hs +170/−0
- gen/Network/AWS/Batch/DescribeJobDefinitions.hs +186/−0
- gen/Network/AWS/Batch/DescribeJobQueues.hs +162/−0
- gen/Network/AWS/Batch/DescribeJobs.hs +127/−0
- gen/Network/AWS/Batch/ListJobs.hs +175/−0
- gen/Network/AWS/Batch/RegisterJobDefinition.hs +201/−0
- gen/Network/AWS/Batch/SubmitJob.hs +209/−0
- gen/Network/AWS/Batch/TerminateJob.hs +131/−0
- gen/Network/AWS/Batch/Types.hs +295/−0
- gen/Network/AWS/Batch/Types/Product.hs +1680/−0
- gen/Network/AWS/Batch/Types/Sum.hs +287/−0
- gen/Network/AWS/Batch/UpdateComputeEnvironment.hs +179/−0
- gen/Network/AWS/Batch/UpdateJobQueue.hs +176/−0
- gen/Network/AWS/Batch/Waiters.hs +21/−0
- src/.gitkeep +0/−0
- test/Main.hs +21/−0
- test/Test/AWS/Batch.hs +20/−0
- test/Test/AWS/Batch/Internal.hs +9/−0
- test/Test/AWS/Gen/Batch.hs +327/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,45 @@+# Amazon Batch SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.5.0`+++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-batch)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Network.AWS.Batch](http://hackage.haskell.org/package/amazonka-batch/docs/Network-AWS-Batch.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+++## 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-batch` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-batch.cabal view
@@ -0,0 +1,101 @@+name: amazonka-batch+version: 1.5.0+synopsis: Amazon Batch SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>+copyright: Copyright (c) 2013-2017 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep+description:+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information, sending requests,+ and receiving responses.+ .+ Lenses are used for constructing and manipulating types,+ due to the depth of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.Batch" or <https://aws.amazon.com/documentation/ the AWS documentation>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-batch++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options:+ -Wall+ -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates+ -funbox-strict-fields++ exposed-modules:+ Network.AWS.Batch+ , Network.AWS.Batch.CancelJob+ , Network.AWS.Batch.CreateComputeEnvironment+ , Network.AWS.Batch.CreateJobQueue+ , Network.AWS.Batch.DeleteComputeEnvironment+ , Network.AWS.Batch.DeleteJobQueue+ , Network.AWS.Batch.DeregisterJobDefinition+ , Network.AWS.Batch.DescribeComputeEnvironments+ , Network.AWS.Batch.DescribeJobDefinitions+ , Network.AWS.Batch.DescribeJobQueues+ , Network.AWS.Batch.DescribeJobs+ , Network.AWS.Batch.ListJobs+ , Network.AWS.Batch.RegisterJobDefinition+ , Network.AWS.Batch.SubmitJob+ , Network.AWS.Batch.TerminateJob+ , Network.AWS.Batch.Types+ , Network.AWS.Batch.UpdateComputeEnvironment+ , Network.AWS.Batch.UpdateJobQueue+ , Network.AWS.Batch.Waiters++ other-modules:+ Network.AWS.Batch.Types.Product+ , Network.AWS.Batch.Types.Sum++ build-depends:+ amazonka-core == 1.5.0.*+ , base >= 4.7 && < 5++test-suite amazonka-batch-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs++ ghc-options: -Wall -threaded++ -- This section is encoded by the template and any modules added by+ -- hand outside these namespaces will not correctly be added to the+ -- distribution package.+ other-modules:+ Test.AWS.Batch+ , Test.AWS.Gen.Batch+ , Test.AWS.Batch.Internal++ build-depends:+ amazonka-core == 1.5.0.*+ , amazonka-test == 1.5.0.*+ , amazonka-batch+ , base+ , bytestring+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CancelJob.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CancelJobResponse.proto view
+ fixture/CreateComputeEnvironment.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateComputeEnvironmentResponse.proto view
+ fixture/CreateJobQueue.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateJobQueueResponse.proto view
+ fixture/DeleteComputeEnvironment.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteComputeEnvironmentResponse.proto view
+ fixture/DeleteJobQueue.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteJobQueueResponse.proto view
+ fixture/DeregisterJobDefinition.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeregisterJobDefinitionResponse.proto view
+ fixture/DescribeComputeEnvironments.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeComputeEnvironmentsResponse.proto view
+ fixture/DescribeJobDefinitions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeJobDefinitionsResponse.proto view
+ fixture/DescribeJobQueues.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeJobQueuesResponse.proto view
+ fixture/DescribeJobs.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeJobsResponse.proto view
+ fixture/ListJobs.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListJobsResponse.proto view
+ fixture/RegisterJobDefinition.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/RegisterJobDefinitionResponse.proto view
+ fixture/SubmitJob.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/SubmitJobResponse.proto view
+ fixture/TerminateJob.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/TerminateJobResponse.proto view
+ fixture/UpdateComputeEnvironment.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateComputeEnvironmentResponse.proto view
+ fixture/UpdateJobQueue.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/batch/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: batch.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateJobQueueResponse.proto view
+ gen/Network/AWS/Batch.hs view
@@ -0,0 +1,354 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- AWS Batch enables you to run batch computing workloads on the AWS Cloud. Batch computing is a common way for developers, scientists, and engineers to access large amounts of compute resources, and AWS Batch removes the undifferentiated heavy lifting of configuring and managing the required infrastructure. AWS Batch will be familiar to users of traditional batch computing software. This service can efficiently provision resources in response to jobs submitted in order to eliminate capacity constraints, reduce compute costs, and deliver results quickly.+--+--+-- As a fully managed service, AWS Batch enables developers, scientists, and engineers to run batch computing workloads of any scale. AWS Batch automatically provisions compute resources and optimizes the workload distribution based on the quantity and scale of the workloads. With AWS Batch, there is no need to install or manage batch computing software, which allows you to focus on analyzing results and solving problems. AWS Batch reduces operational complexities, saves time, and reduces costs, which makes it easy for developers, scientists, and engineers to run their batch jobs in the AWS Cloud.+--+module Network.AWS.Batch+ (+ -- * Service Configuration+ batch++ -- * Errors+ -- $errors++ -- ** ServerException+ , _ServerException++ -- ** ClientException+ , _ClientException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** CreateComputeEnvironment+ , module Network.AWS.Batch.CreateComputeEnvironment++ -- ** RegisterJobDefinition+ , module Network.AWS.Batch.RegisterJobDefinition++ -- ** SubmitJob+ , module Network.AWS.Batch.SubmitJob++ -- ** ListJobs+ , module Network.AWS.Batch.ListJobs++ -- ** TerminateJob+ , module Network.AWS.Batch.TerminateJob++ -- ** DescribeJobs+ , module Network.AWS.Batch.DescribeJobs++ -- ** DeleteComputeEnvironment+ , module Network.AWS.Batch.DeleteComputeEnvironment++ -- ** UpdateComputeEnvironment+ , module Network.AWS.Batch.UpdateComputeEnvironment++ -- ** DescribeJobDefinitions+ , module Network.AWS.Batch.DescribeJobDefinitions++ -- ** UpdateJobQueue+ , module Network.AWS.Batch.UpdateJobQueue++ -- ** DeleteJobQueue+ , module Network.AWS.Batch.DeleteJobQueue++ -- ** CreateJobQueue+ , module Network.AWS.Batch.CreateJobQueue++ -- ** DeregisterJobDefinition+ , module Network.AWS.Batch.DeregisterJobDefinition++ -- ** DescribeJobQueues+ , module Network.AWS.Batch.DescribeJobQueues++ -- ** DescribeComputeEnvironments+ , module Network.AWS.Batch.DescribeComputeEnvironments++ -- ** CancelJob+ , module Network.AWS.Batch.CancelJob++ -- * Types++ -- ** CEState+ , CEState (..)++ -- ** CEStatus+ , CEStatus (..)++ -- ** CEType+ , CEType (..)++ -- ** CRType+ , CRType (..)++ -- ** JQState+ , JQState (..)++ -- ** JQStatus+ , JQStatus (..)++ -- ** JobDefinitionType+ , JobDefinitionType (..)++ -- ** JobStatus+ , JobStatus (..)++ -- ** AttemptContainerDetail+ , AttemptContainerDetail+ , attemptContainerDetail+ , acdTaskARN+ , acdContainerInstanceARN+ , acdReason+ , acdLogStreamName+ , acdExitCode++ -- ** AttemptDetail+ , AttemptDetail+ , attemptDetail+ , adStoppedAt+ , adStartedAt+ , adContainer+ , adStatusReason++ -- ** ComputeEnvironmentDetail+ , ComputeEnvironmentDetail+ , computeEnvironmentDetail+ , cedStatus+ , cedState+ , cedComputeResources+ , cedStatusReason+ , cedType+ , cedServiceRole+ , cedComputeEnvironmentName+ , cedComputeEnvironmentARN+ , cedEcsClusterARN++ -- ** ComputeEnvironmentOrder+ , ComputeEnvironmentOrder+ , computeEnvironmentOrder+ , ceoOrder+ , ceoComputeEnvironment++ -- ** ComputeResource+ , ComputeResource+ , computeResource+ , crEc2KeyPair+ , crBidPercentage+ , crSpotIAMFleetRole+ , crImageId+ , crDesiredvCPUs+ , crTags+ , crType+ , crMinvCPUs+ , crMaxvCPUs+ , crInstanceTypes+ , crSubnets+ , crSecurityGroupIds+ , crInstanceRole++ -- ** ComputeResourceUpdate+ , ComputeResourceUpdate+ , computeResourceUpdate+ , cruMinvCPUs+ , cruMaxvCPUs+ , cruDesiredvCPUs++ -- ** ContainerDetail+ , ContainerDetail+ , containerDetail+ , cdImage+ , cdCommand+ , cdEnvironment+ , cdTaskARN+ , cdUlimits+ , cdContainerInstanceARN+ , cdPrivileged+ , cdJobRoleARN+ , cdMemory+ , cdUser+ , cdReason+ , cdLogStreamName+ , cdMountPoints+ , cdExitCode+ , cdVcpus+ , cdReadonlyRootFilesystem+ , cdVolumes++ -- ** ContainerOverrides+ , ContainerOverrides+ , containerOverrides+ , coCommand+ , coEnvironment+ , coMemory+ , coVcpus++ -- ** ContainerProperties+ , ContainerProperties+ , containerProperties+ , cpCommand+ , cpEnvironment+ , cpUlimits+ , cpPrivileged+ , cpJobRoleARN+ , cpUser+ , cpMountPoints+ , cpReadonlyRootFilesystem+ , cpVolumes+ , cpImage+ , cpVcpus+ , cpMemory++ -- ** Host+ , Host+ , host+ , hSourcePath++ -- ** JobDefinition+ , JobDefinition+ , jobDefinition+ , jStatus+ , jRetryStrategy+ , jParameters+ , jContainerProperties+ , jJobDefinitionName+ , jJobDefinitionARN+ , jRevision+ , jType++ -- ** JobDependency+ , JobDependency+ , jobDependency+ , jJobId++ -- ** JobDetail+ , JobDetail+ , jobDetail+ , jdStoppedAt+ , jdCreatedAt+ , jdRetryStrategy+ , jdAttempts+ , jdDependsOn+ , jdContainer+ , jdParameters+ , jdStatusReason+ , jdJobName+ , jdJobId+ , jdJobQueue+ , jdStatus+ , jdStartedAt+ , jdJobDefinition++ -- ** JobQueueDetail+ , JobQueueDetail+ , jobQueueDetail+ , jqdStatus+ , jqdStatusReason+ , jqdJobQueueName+ , jqdJobQueueARN+ , jqdState+ , jqdPriority+ , jqdComputeEnvironmentOrder++ -- ** JobSummary+ , JobSummary+ , jobSummary+ , jsJobId+ , jsJobName++ -- ** KeyValuePair+ , KeyValuePair+ , keyValuePair+ , kvpValue+ , kvpName++ -- ** MountPoint+ , MountPoint+ , mountPoint+ , mpContainerPath+ , mpSourceVolume+ , mpReadOnly++ -- ** RetryStrategy+ , RetryStrategy+ , retryStrategy+ , rsAttempts++ -- ** Ulimit+ , Ulimit+ , ulimit+ , uHardLimit+ , uName+ , uSoftLimit++ -- ** Volume+ , Volume+ , volume+ , vName+ , vHost+ ) where++import Network.AWS.Batch.CancelJob+import Network.AWS.Batch.CreateComputeEnvironment+import Network.AWS.Batch.CreateJobQueue+import Network.AWS.Batch.DeleteComputeEnvironment+import Network.AWS.Batch.DeleteJobQueue+import Network.AWS.Batch.DeregisterJobDefinition+import Network.AWS.Batch.DescribeComputeEnvironments+import Network.AWS.Batch.DescribeJobDefinitions+import Network.AWS.Batch.DescribeJobQueues+import Network.AWS.Batch.DescribeJobs+import Network.AWS.Batch.ListJobs+import Network.AWS.Batch.RegisterJobDefinition+import Network.AWS.Batch.SubmitJob+import Network.AWS.Batch.TerminateJob+import Network.AWS.Batch.Types+import Network.AWS.Batch.UpdateComputeEnvironment+import Network.AWS.Batch.UpdateJobQueue+import Network.AWS.Batch.Waiters++{- $errors+Error matchers are designed for use with the functions provided by+<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+This allows catching (and rethrowing) service specific errors returned+by 'Batch'.+-}++{- $operations+Some AWS operations return results that are incomplete and require subsequent+requests in order to obtain the entire result set. The process of sending+subsequent requests to continue where a previous request left off is called+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+1000 objects at a time, and you must send subsequent requests with the+appropriate Marker in order to retrieve the next page of results.++Operations that have an 'AWSPager' instance can transparently perform subsequent+requests, correctly setting Markers and other request facets to iterate through+the entire result set of a truncated API operation. Operations which support+this have an additional note in the documentation.++Many operations have the ability to filter results on the server side. See the+individual operation parameters for details.+-}++{- $waiters+Waiters poll by repeatedly sending a request until some remote success condition+configured by the 'Wait' specification is fulfilled. The 'Wait' specification+determines how many attempts should be made, in addition to delay and retry strategies.+-}
+ gen/Network/AWS/Batch/CancelJob.hs view
@@ -0,0 +1,131 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.CancelJob+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Cancels a job in an AWS Batch job queue. Jobs that are in the @SUBMITTED@ , @PENDING@ , or @RUNNABLE@ state are cancelled. Jobs that have progressed to @STARTING@ or @RUNNING@ are not cancelled (but the API operation still succeeds, even if no job is cancelled); these jobs must be terminated with the 'TerminateJob' operation.+--+--+module Network.AWS.Batch.CancelJob+ (+ -- * Creating a Request+ cancelJob+ , CancelJob+ -- * Request Lenses+ , cjJobId+ , cjReason++ -- * Destructuring the Response+ , cancelJobResponse+ , CancelJobResponse+ -- * Response Lenses+ , cjrsResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'cancelJob' smart constructor.+data CancelJob = CancelJob'+ { _cjJobId :: !Text+ , _cjReason :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CancelJob' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cjJobId' - The AWS Batch job ID of the job to cancel.+--+-- * 'cjReason' - A message to attach to the job that explains the reason for cancelling it. This message is returned by future 'DescribeJobs' operations on the job. This message is also recorded in the AWS Batch activity logs.+cancelJob+ :: Text -- ^ 'cjJobId'+ -> Text -- ^ 'cjReason'+ -> CancelJob+cancelJob pJobId_ pReason_ =+ CancelJob' {_cjJobId = pJobId_, _cjReason = pReason_}+++-- | The AWS Batch job ID of the job to cancel.+cjJobId :: Lens' CancelJob Text+cjJobId = lens _cjJobId (\ s a -> s{_cjJobId = a});++-- | A message to attach to the job that explains the reason for cancelling it. This message is returned by future 'DescribeJobs' operations on the job. This message is also recorded in the AWS Batch activity logs.+cjReason :: Lens' CancelJob Text+cjReason = lens _cjReason (\ s a -> s{_cjReason = a});++instance AWSRequest CancelJob where+ type Rs CancelJob = CancelJobResponse+ request = postJSON batch+ response+ = receiveEmpty+ (\ s h x ->+ CancelJobResponse' <$> (pure (fromEnum s)))++instance Hashable CancelJob where++instance NFData CancelJob where++instance ToHeaders CancelJob where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CancelJob where+ toJSON CancelJob'{..}+ = object+ (catMaybes+ [Just ("jobId" .= _cjJobId),+ Just ("reason" .= _cjReason)])++instance ToPath CancelJob where+ toPath = const "/v1/canceljob"++instance ToQuery CancelJob where+ toQuery = const mempty++-- | /See:/ 'cancelJobResponse' smart constructor.+newtype CancelJobResponse = CancelJobResponse'+ { _cjrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CancelJobResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cjrsResponseStatus' - -- | The response status code.+cancelJobResponse+ :: Int -- ^ 'cjrsResponseStatus'+ -> CancelJobResponse+cancelJobResponse pResponseStatus_ =+ CancelJobResponse' {_cjrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+cjrsResponseStatus :: Lens' CancelJobResponse Int+cjrsResponseStatus = lens _cjrsResponseStatus (\ s a -> s{_cjrsResponseStatus = a});++instance NFData CancelJobResponse where
+ gen/Network/AWS/Batch/CreateComputeEnvironment.hs view
@@ -0,0 +1,196 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.CreateComputeEnvironment+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an AWS Batch compute environment. You can create @MANAGED@ or @UNMANAGED@ compute environments.+--+--+-- In a managed compute environment, AWS Batch manages the compute resources within the environment, based on the compute resources that you specify. Instances launched into a managed compute environment use a recent, approved version of the Amazon ECS-optimized AMI. You can choose to use Amazon EC2 On-Demand instances in your managed compute environment, or you can use Amazon EC2 Spot instances that only launch when the Spot bid price is below a specified percentage of the On-Demand price.+--+-- In an unmanaged compute environment, you can manage your own compute resources. This provides more compute resource configuration options, such as using a custom AMI, but you must ensure that your AMI meets the Amazon ECS container instance AMI specification. For more information, see <http://docs.aws.amazon.com/AmazonECS/latest/developerguide/container_instance_AMIs.html Container Instance AMIs> in the /Amazon EC2 Container Service Developer Guide/ . After you have created your unmanaged compute environment, you can use the 'DescribeComputeEnvironments' operation to find the Amazon ECS cluster that is associated with it and then manually launch your container instances into that Amazon ECS cluster. For more information, see <http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html Launching an Amazon ECS Container Instance> in the /Amazon EC2 Container Service Developer Guide/ .+--+module Network.AWS.Batch.CreateComputeEnvironment+ (+ -- * Creating a Request+ createComputeEnvironment+ , CreateComputeEnvironment+ -- * Request Lenses+ , cceState+ , cceComputeResources+ , cceComputeEnvironmentName+ , cceType+ , cceServiceRole++ -- * Destructuring the Response+ , createComputeEnvironmentResponse+ , CreateComputeEnvironmentResponse+ -- * Response Lenses+ , ccersComputeEnvironmentName+ , ccersComputeEnvironmentARN+ , ccersResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createComputeEnvironment' smart constructor.+data CreateComputeEnvironment = CreateComputeEnvironment'+ { _cceState :: !(Maybe CEState)+ , _cceComputeResources :: !(Maybe ComputeResource)+ , _cceComputeEnvironmentName :: !Text+ , _cceType :: !CEType+ , _cceServiceRole :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateComputeEnvironment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cceState' - The state of the compute environment. If the state is @ENABLED@ , then the compute environment accepts jobs from a queue and can scale out automatically based on queues.+--+-- * 'cceComputeResources' - Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments.+--+-- * 'cceComputeEnvironmentName' - The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.+--+-- * 'cceType' - The type of the compute environment.+--+-- * 'cceServiceRole' - The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf. If your specified role has a path other than @/@ , then you must either specify the full role ARN (this is recommended) or prefix the role name with the path.+createComputeEnvironment+ :: Text -- ^ 'cceComputeEnvironmentName'+ -> CEType -- ^ 'cceType'+ -> Text -- ^ 'cceServiceRole'+ -> CreateComputeEnvironment+createComputeEnvironment pComputeEnvironmentName_ pType_ pServiceRole_ =+ CreateComputeEnvironment'+ { _cceState = Nothing+ , _cceComputeResources = Nothing+ , _cceComputeEnvironmentName = pComputeEnvironmentName_+ , _cceType = pType_+ , _cceServiceRole = pServiceRole_+ }+++-- | The state of the compute environment. If the state is @ENABLED@ , then the compute environment accepts jobs from a queue and can scale out automatically based on queues.+cceState :: Lens' CreateComputeEnvironment (Maybe CEState)+cceState = lens _cceState (\ s a -> s{_cceState = a});++-- | Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments.+cceComputeResources :: Lens' CreateComputeEnvironment (Maybe ComputeResource)+cceComputeResources = lens _cceComputeResources (\ s a -> s{_cceComputeResources = a});++-- | The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.+cceComputeEnvironmentName :: Lens' CreateComputeEnvironment Text+cceComputeEnvironmentName = lens _cceComputeEnvironmentName (\ s a -> s{_cceComputeEnvironmentName = a});++-- | The type of the compute environment.+cceType :: Lens' CreateComputeEnvironment CEType+cceType = lens _cceType (\ s a -> s{_cceType = a});++-- | The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf. If your specified role has a path other than @/@ , then you must either specify the full role ARN (this is recommended) or prefix the role name with the path.+cceServiceRole :: Lens' CreateComputeEnvironment Text+cceServiceRole = lens _cceServiceRole (\ s a -> s{_cceServiceRole = a});++instance AWSRequest CreateComputeEnvironment where+ type Rs CreateComputeEnvironment =+ CreateComputeEnvironmentResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ CreateComputeEnvironmentResponse' <$>+ (x .?> "computeEnvironmentName") <*>+ (x .?> "computeEnvironmentArn")+ <*> (pure (fromEnum s)))++instance Hashable CreateComputeEnvironment where++instance NFData CreateComputeEnvironment where++instance ToHeaders CreateComputeEnvironment where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateComputeEnvironment where+ toJSON CreateComputeEnvironment'{..}+ = object+ (catMaybes+ [("state" .=) <$> _cceState,+ ("computeResources" .=) <$> _cceComputeResources,+ Just+ ("computeEnvironmentName" .=+ _cceComputeEnvironmentName),+ Just ("type" .= _cceType),+ Just ("serviceRole" .= _cceServiceRole)])++instance ToPath CreateComputeEnvironment where+ toPath = const "/v1/createcomputeenvironment"++instance ToQuery CreateComputeEnvironment where+ toQuery = const mempty++-- | /See:/ 'createComputeEnvironmentResponse' smart constructor.+data CreateComputeEnvironmentResponse = CreateComputeEnvironmentResponse'+ { _ccersComputeEnvironmentName :: !(Maybe Text)+ , _ccersComputeEnvironmentARN :: !(Maybe Text)+ , _ccersResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateComputeEnvironmentResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ccersComputeEnvironmentName' - The name of the compute environment.+--+-- * 'ccersComputeEnvironmentARN' - The Amazon Resource Name (ARN) of the compute environment.+--+-- * 'ccersResponseStatus' - -- | The response status code.+createComputeEnvironmentResponse+ :: Int -- ^ 'ccersResponseStatus'+ -> CreateComputeEnvironmentResponse+createComputeEnvironmentResponse pResponseStatus_ =+ CreateComputeEnvironmentResponse'+ { _ccersComputeEnvironmentName = Nothing+ , _ccersComputeEnvironmentARN = Nothing+ , _ccersResponseStatus = pResponseStatus_+ }+++-- | The name of the compute environment.+ccersComputeEnvironmentName :: Lens' CreateComputeEnvironmentResponse (Maybe Text)+ccersComputeEnvironmentName = lens _ccersComputeEnvironmentName (\ s a -> s{_ccersComputeEnvironmentName = a});++-- | The Amazon Resource Name (ARN) of the compute environment.+ccersComputeEnvironmentARN :: Lens' CreateComputeEnvironmentResponse (Maybe Text)+ccersComputeEnvironmentARN = lens _ccersComputeEnvironmentARN (\ s a -> s{_ccersComputeEnvironmentARN = a});++-- | -- | The response status code.+ccersResponseStatus :: Lens' CreateComputeEnvironmentResponse Int+ccersResponseStatus = lens _ccersResponseStatus (\ s a -> s{_ccersResponseStatus = a});++instance NFData CreateComputeEnvironmentResponse+ where
+ gen/Network/AWS/Batch/CreateJobQueue.hs view
@@ -0,0 +1,182 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.CreateJobQueue+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an AWS Batch job queue. When you create a job queue, you associate one or more compute environments to the queue and assign an order of preference for the compute environments.+--+--+-- You also set a priority to the job queue that determines the order in which the AWS Batch scheduler places jobs onto its associated compute environments. For example, if a compute environment is associated with more than one job queue, the job queue with a higher priority is given preference for scheduling jobs to that compute environment.+--+module Network.AWS.Batch.CreateJobQueue+ (+ -- * Creating a Request+ createJobQueue+ , CreateJobQueue+ -- * Request Lenses+ , cjqState+ , cjqJobQueueName+ , cjqPriority+ , cjqComputeEnvironmentOrder++ -- * Destructuring the Response+ , createJobQueueResponse+ , CreateJobQueueResponse+ -- * Response Lenses+ , cjqrsResponseStatus+ , cjqrsJobQueueName+ , cjqrsJobQueueARN+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createJobQueue' smart constructor.+data CreateJobQueue = CreateJobQueue'+ { _cjqState :: !(Maybe JQState)+ , _cjqJobQueueName :: !Text+ , _cjqPriority :: !Int+ , _cjqComputeEnvironmentOrder :: ![ComputeEnvironmentOrder]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateJobQueue' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cjqState' - The state of the job queue. If the job queue state is @ENABLED@ , it is able to accept jobs.+--+-- * 'cjqJobQueueName' - The name of the job queue.+--+-- * 'cjqPriority' - The priority of the job queue. Job queues with a higher priority (or a higher integer value for the @priority@ parameter) are evaluated first when associated with same compute environment. Priority is determined in descending order, for example, a job queue with a priority value of @10@ is given scheduling preference over a job queue with a priority value of @1@ .+--+-- * 'cjqComputeEnvironmentOrder' - The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment should execute a given job. Compute environments must be in the @VALID@ state before you can associate them with a job queue. You can associate up to 3 compute environments with a job queue.+createJobQueue+ :: Text -- ^ 'cjqJobQueueName'+ -> Int -- ^ 'cjqPriority'+ -> CreateJobQueue+createJobQueue pJobQueueName_ pPriority_ =+ CreateJobQueue'+ { _cjqState = Nothing+ , _cjqJobQueueName = pJobQueueName_+ , _cjqPriority = pPriority_+ , _cjqComputeEnvironmentOrder = mempty+ }+++-- | The state of the job queue. If the job queue state is @ENABLED@ , it is able to accept jobs.+cjqState :: Lens' CreateJobQueue (Maybe JQState)+cjqState = lens _cjqState (\ s a -> s{_cjqState = a});++-- | The name of the job queue.+cjqJobQueueName :: Lens' CreateJobQueue Text+cjqJobQueueName = lens _cjqJobQueueName (\ s a -> s{_cjqJobQueueName = a});++-- | The priority of the job queue. Job queues with a higher priority (or a higher integer value for the @priority@ parameter) are evaluated first when associated with same compute environment. Priority is determined in descending order, for example, a job queue with a priority value of @10@ is given scheduling preference over a job queue with a priority value of @1@ .+cjqPriority :: Lens' CreateJobQueue Int+cjqPriority = lens _cjqPriority (\ s a -> s{_cjqPriority = a});++-- | The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment should execute a given job. Compute environments must be in the @VALID@ state before you can associate them with a job queue. You can associate up to 3 compute environments with a job queue.+cjqComputeEnvironmentOrder :: Lens' CreateJobQueue [ComputeEnvironmentOrder]+cjqComputeEnvironmentOrder = lens _cjqComputeEnvironmentOrder (\ s a -> s{_cjqComputeEnvironmentOrder = a}) . _Coerce;++instance AWSRequest CreateJobQueue where+ type Rs CreateJobQueue = CreateJobQueueResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ CreateJobQueueResponse' <$>+ (pure (fromEnum s)) <*> (x .:> "jobQueueName") <*>+ (x .:> "jobQueueArn"))++instance Hashable CreateJobQueue where++instance NFData CreateJobQueue where++instance ToHeaders CreateJobQueue where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateJobQueue where+ toJSON CreateJobQueue'{..}+ = object+ (catMaybes+ [("state" .=) <$> _cjqState,+ Just ("jobQueueName" .= _cjqJobQueueName),+ Just ("priority" .= _cjqPriority),+ Just+ ("computeEnvironmentOrder" .=+ _cjqComputeEnvironmentOrder)])++instance ToPath CreateJobQueue where+ toPath = const "/v1/createjobqueue"++instance ToQuery CreateJobQueue where+ toQuery = const mempty++-- | /See:/ 'createJobQueueResponse' smart constructor.+data CreateJobQueueResponse = CreateJobQueueResponse'+ { _cjqrsResponseStatus :: !Int+ , _cjqrsJobQueueName :: !Text+ , _cjqrsJobQueueARN :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateJobQueueResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cjqrsResponseStatus' - -- | The response status code.+--+-- * 'cjqrsJobQueueName' - The name of the job queue.+--+-- * 'cjqrsJobQueueARN' - The Amazon Resource Name (ARN) of the job queue.+createJobQueueResponse+ :: Int -- ^ 'cjqrsResponseStatus'+ -> Text -- ^ 'cjqrsJobQueueName'+ -> Text -- ^ 'cjqrsJobQueueARN'+ -> CreateJobQueueResponse+createJobQueueResponse pResponseStatus_ pJobQueueName_ pJobQueueARN_ =+ CreateJobQueueResponse'+ { _cjqrsResponseStatus = pResponseStatus_+ , _cjqrsJobQueueName = pJobQueueName_+ , _cjqrsJobQueueARN = pJobQueueARN_+ }+++-- | -- | The response status code.+cjqrsResponseStatus :: Lens' CreateJobQueueResponse Int+cjqrsResponseStatus = lens _cjqrsResponseStatus (\ s a -> s{_cjqrsResponseStatus = a});++-- | The name of the job queue.+cjqrsJobQueueName :: Lens' CreateJobQueueResponse Text+cjqrsJobQueueName = lens _cjqrsJobQueueName (\ s a -> s{_cjqrsJobQueueName = a});++-- | The Amazon Resource Name (ARN) of the job queue.+cjqrsJobQueueARN :: Lens' CreateJobQueueResponse Text+cjqrsJobQueueARN = lens _cjqrsJobQueueARN (\ s a -> s{_cjqrsJobQueueARN = a});++instance NFData CreateJobQueueResponse where
+ gen/Network/AWS/Batch/DeleteComputeEnvironment.hs view
@@ -0,0 +1,127 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.DeleteComputeEnvironment+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes an AWS Batch compute environment.+--+--+-- Before you can delete a compute environment, you must set its state to @DISABLED@ with the 'UpdateComputeEnvironment' API operation and disassociate it from any job queues with the 'UpdateJobQueue' API operation.+--+module Network.AWS.Batch.DeleteComputeEnvironment+ (+ -- * Creating a Request+ deleteComputeEnvironment+ , DeleteComputeEnvironment+ -- * Request Lenses+ , dceComputeEnvironment++ -- * Destructuring the Response+ , deleteComputeEnvironmentResponse+ , DeleteComputeEnvironmentResponse+ -- * Response Lenses+ , dcersResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteComputeEnvironment' smart constructor.+newtype DeleteComputeEnvironment = DeleteComputeEnvironment'+ { _dceComputeEnvironment :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteComputeEnvironment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dceComputeEnvironment' - The name or Amazon Resource Name (ARN) of the compute environment to delete.+deleteComputeEnvironment+ :: Text -- ^ 'dceComputeEnvironment'+ -> DeleteComputeEnvironment+deleteComputeEnvironment pComputeEnvironment_ =+ DeleteComputeEnvironment' {_dceComputeEnvironment = pComputeEnvironment_}+++-- | The name or Amazon Resource Name (ARN) of the compute environment to delete.+dceComputeEnvironment :: Lens' DeleteComputeEnvironment Text+dceComputeEnvironment = lens _dceComputeEnvironment (\ s a -> s{_dceComputeEnvironment = a});++instance AWSRequest DeleteComputeEnvironment where+ type Rs DeleteComputeEnvironment =+ DeleteComputeEnvironmentResponse+ request = postJSON batch+ response+ = receiveEmpty+ (\ s h x ->+ DeleteComputeEnvironmentResponse' <$>+ (pure (fromEnum s)))++instance Hashable DeleteComputeEnvironment where++instance NFData DeleteComputeEnvironment where++instance ToHeaders DeleteComputeEnvironment where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteComputeEnvironment where+ toJSON DeleteComputeEnvironment'{..}+ = object+ (catMaybes+ [Just+ ("computeEnvironment" .= _dceComputeEnvironment)])++instance ToPath DeleteComputeEnvironment where+ toPath = const "/v1/deletecomputeenvironment"++instance ToQuery DeleteComputeEnvironment where+ toQuery = const mempty++-- | /See:/ 'deleteComputeEnvironmentResponse' smart constructor.+newtype DeleteComputeEnvironmentResponse = DeleteComputeEnvironmentResponse'+ { _dcersResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteComputeEnvironmentResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcersResponseStatus' - -- | The response status code.+deleteComputeEnvironmentResponse+ :: Int -- ^ 'dcersResponseStatus'+ -> DeleteComputeEnvironmentResponse+deleteComputeEnvironmentResponse pResponseStatus_ =+ DeleteComputeEnvironmentResponse' {_dcersResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dcersResponseStatus :: Lens' DeleteComputeEnvironmentResponse Int+dcersResponseStatus = lens _dcersResponseStatus (\ s a -> s{_dcersResponseStatus = a});++instance NFData DeleteComputeEnvironmentResponse+ where
+ gen/Network/AWS/Batch/DeleteJobQueue.hs view
@@ -0,0 +1,121 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.DeleteJobQueue+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified job queue. You must first disable submissions for a queue with the 'UpdateJobQueue' operation. All jobs in the queue are terminated when you delete a job queue.+--+--+-- It is not necessary to disassociate compute environments from a queue before submitting a @DeleteJobQueue@ request.+--+module Network.AWS.Batch.DeleteJobQueue+ (+ -- * Creating a Request+ deleteJobQueue+ , DeleteJobQueue+ -- * Request Lenses+ , djqJobQueue++ -- * Destructuring the Response+ , deleteJobQueueResponse+ , DeleteJobQueueResponse+ -- * Response Lenses+ , djqrsResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteJobQueue' smart constructor.+newtype DeleteJobQueue = DeleteJobQueue'+ { _djqJobQueue :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteJobQueue' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'djqJobQueue' - The short name or full Amazon Resource Name (ARN) of the queue to delete.+deleteJobQueue+ :: Text -- ^ 'djqJobQueue'+ -> DeleteJobQueue+deleteJobQueue pJobQueue_ = DeleteJobQueue' {_djqJobQueue = pJobQueue_}+++-- | The short name or full Amazon Resource Name (ARN) of the queue to delete.+djqJobQueue :: Lens' DeleteJobQueue Text+djqJobQueue = lens _djqJobQueue (\ s a -> s{_djqJobQueue = a});++instance AWSRequest DeleteJobQueue where+ type Rs DeleteJobQueue = DeleteJobQueueResponse+ request = postJSON batch+ response+ = receiveEmpty+ (\ s h x ->+ DeleteJobQueueResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteJobQueue where++instance NFData DeleteJobQueue where++instance ToHeaders DeleteJobQueue where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteJobQueue where+ toJSON DeleteJobQueue'{..}+ = object+ (catMaybes [Just ("jobQueue" .= _djqJobQueue)])++instance ToPath DeleteJobQueue where+ toPath = const "/v1/deletejobqueue"++instance ToQuery DeleteJobQueue where+ toQuery = const mempty++-- | /See:/ 'deleteJobQueueResponse' smart constructor.+newtype DeleteJobQueueResponse = DeleteJobQueueResponse'+ { _djqrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteJobQueueResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'djqrsResponseStatus' - -- | The response status code.+deleteJobQueueResponse+ :: Int -- ^ 'djqrsResponseStatus'+ -> DeleteJobQueueResponse+deleteJobQueueResponse pResponseStatus_ =+ DeleteJobQueueResponse' {_djqrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+djqrsResponseStatus :: Lens' DeleteJobQueueResponse Int+djqrsResponseStatus = lens _djqrsResponseStatus (\ s a -> s{_djqrsResponseStatus = a});++instance NFData DeleteJobQueueResponse where
+ gen/Network/AWS/Batch/DeregisterJobDefinition.hs view
@@ -0,0 +1,123 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.DeregisterJobDefinition+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deregisters an AWS Batch job definition.+--+--+module Network.AWS.Batch.DeregisterJobDefinition+ (+ -- * Creating a Request+ deregisterJobDefinition+ , DeregisterJobDefinition+ -- * Request Lenses+ , djdJobDefinition++ -- * Destructuring the Response+ , deregisterJobDefinitionResponse+ , DeregisterJobDefinitionResponse+ -- * Response Lenses+ , derrsResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deregisterJobDefinition' smart constructor.+newtype DeregisterJobDefinition = DeregisterJobDefinition'+ { _djdJobDefinition :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeregisterJobDefinition' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'djdJobDefinition' - The name and revision (@name:revision@ ) or full Amazon Resource Name (ARN) of the job definition to deregister.+deregisterJobDefinition+ :: Text -- ^ 'djdJobDefinition'+ -> DeregisterJobDefinition+deregisterJobDefinition pJobDefinition_ =+ DeregisterJobDefinition' {_djdJobDefinition = pJobDefinition_}+++-- | The name and revision (@name:revision@ ) or full Amazon Resource Name (ARN) of the job definition to deregister.+djdJobDefinition :: Lens' DeregisterJobDefinition Text+djdJobDefinition = lens _djdJobDefinition (\ s a -> s{_djdJobDefinition = a});++instance AWSRequest DeregisterJobDefinition where+ type Rs DeregisterJobDefinition =+ DeregisterJobDefinitionResponse+ request = postJSON batch+ response+ = receiveEmpty+ (\ s h x ->+ DeregisterJobDefinitionResponse' <$>+ (pure (fromEnum s)))++instance Hashable DeregisterJobDefinition where++instance NFData DeregisterJobDefinition where++instance ToHeaders DeregisterJobDefinition where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeregisterJobDefinition where+ toJSON DeregisterJobDefinition'{..}+ = object+ (catMaybes+ [Just ("jobDefinition" .= _djdJobDefinition)])++instance ToPath DeregisterJobDefinition where+ toPath = const "/v1/deregisterjobdefinition"++instance ToQuery DeregisterJobDefinition where+ toQuery = const mempty++-- | /See:/ 'deregisterJobDefinitionResponse' smart constructor.+newtype DeregisterJobDefinitionResponse = DeregisterJobDefinitionResponse'+ { _derrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeregisterJobDefinitionResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'derrsResponseStatus' - -- | The response status code.+deregisterJobDefinitionResponse+ :: Int -- ^ 'derrsResponseStatus'+ -> DeregisterJobDefinitionResponse+deregisterJobDefinitionResponse pResponseStatus_ =+ DeregisterJobDefinitionResponse' {_derrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+derrsResponseStatus :: Lens' DeregisterJobDefinitionResponse Int+derrsResponseStatus = lens _derrsResponseStatus (\ s a -> s{_derrsResponseStatus = a});++instance NFData DeregisterJobDefinitionResponse where
+ gen/Network/AWS/Batch/DescribeComputeEnvironments.hs view
@@ -0,0 +1,170 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.DescribeComputeEnvironments+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes one or more of your compute environments.+--+--+-- If you are using an unmanaged compute environment, you can use the @DescribeComputeEnvironment@ operation to determine the @ecsClusterArn@ that you should launch your Amazon ECS container instances into.+--+module Network.AWS.Batch.DescribeComputeEnvironments+ (+ -- * Creating a Request+ describeComputeEnvironments+ , DescribeComputeEnvironments+ -- * Request Lenses+ , dceComputeEnvironments+ , dceNextToken+ , dceMaxResults++ -- * Destructuring the Response+ , describeComputeEnvironmentsResponse+ , DescribeComputeEnvironmentsResponse+ -- * Response Lenses+ , drsComputeEnvironments+ , drsNextToken+ , drsResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeComputeEnvironments' smart constructor.+data DescribeComputeEnvironments = DescribeComputeEnvironments'+ { _dceComputeEnvironments :: !(Maybe [Text])+ , _dceNextToken :: !(Maybe Text)+ , _dceMaxResults :: !(Maybe Int)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeComputeEnvironments' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dceComputeEnvironments' - A list of up to 100 compute environment names or full Amazon Resource Name (ARN) entries.+--+-- * 'dceNextToken' - The @nextToken@ value returned from a previous paginated @DescribeComputeEnvironments@ request where @maxResults@ was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the @nextToken@ value. This value is @null@ when there are no more results to return.+--+-- * 'dceMaxResults' - The maximum number of cluster results returned by @DescribeComputeEnvironments@ in paginated output. When this parameter is used, @DescribeComputeEnvironments@ only returns @maxResults@ results in a single page along with a @nextToken@ response element. The remaining results of the initial request can be seen by sending another @DescribeComputeEnvironments@ request with the returned @nextToken@ value. This value can be between 1 and 100. If this parameter is not used, then @DescribeComputeEnvironments@ returns up to 100 results and a @nextToken@ value if applicable.+describeComputeEnvironments+ :: DescribeComputeEnvironments+describeComputeEnvironments =+ DescribeComputeEnvironments'+ { _dceComputeEnvironments = Nothing+ , _dceNextToken = Nothing+ , _dceMaxResults = Nothing+ }+++-- | A list of up to 100 compute environment names or full Amazon Resource Name (ARN) entries.+dceComputeEnvironments :: Lens' DescribeComputeEnvironments [Text]+dceComputeEnvironments = lens _dceComputeEnvironments (\ s a -> s{_dceComputeEnvironments = a}) . _Default . _Coerce;++-- | The @nextToken@ value returned from a previous paginated @DescribeComputeEnvironments@ request where @maxResults@ was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the @nextToken@ value. This value is @null@ when there are no more results to return.+dceNextToken :: Lens' DescribeComputeEnvironments (Maybe Text)+dceNextToken = lens _dceNextToken (\ s a -> s{_dceNextToken = a});++-- | The maximum number of cluster results returned by @DescribeComputeEnvironments@ in paginated output. When this parameter is used, @DescribeComputeEnvironments@ only returns @maxResults@ results in a single page along with a @nextToken@ response element. The remaining results of the initial request can be seen by sending another @DescribeComputeEnvironments@ request with the returned @nextToken@ value. This value can be between 1 and 100. If this parameter is not used, then @DescribeComputeEnvironments@ returns up to 100 results and a @nextToken@ value if applicable.+dceMaxResults :: Lens' DescribeComputeEnvironments (Maybe Int)+dceMaxResults = lens _dceMaxResults (\ s a -> s{_dceMaxResults = a});++instance AWSRequest DescribeComputeEnvironments where+ type Rs DescribeComputeEnvironments =+ DescribeComputeEnvironmentsResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ DescribeComputeEnvironmentsResponse' <$>+ (x .?> "computeEnvironments" .!@ mempty) <*>+ (x .?> "nextToken")+ <*> (pure (fromEnum s)))++instance Hashable DescribeComputeEnvironments where++instance NFData DescribeComputeEnvironments where++instance ToHeaders DescribeComputeEnvironments where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeComputeEnvironments where+ toJSON DescribeComputeEnvironments'{..}+ = object+ (catMaybes+ [("computeEnvironments" .=) <$>+ _dceComputeEnvironments,+ ("nextToken" .=) <$> _dceNextToken,+ ("maxResults" .=) <$> _dceMaxResults])++instance ToPath DescribeComputeEnvironments where+ toPath = const "/v1/describecomputeenvironments"++instance ToQuery DescribeComputeEnvironments where+ toQuery = const mempty++-- | /See:/ 'describeComputeEnvironmentsResponse' smart constructor.+data DescribeComputeEnvironmentsResponse = DescribeComputeEnvironmentsResponse'+ { _drsComputeEnvironments :: !(Maybe [ComputeEnvironmentDetail])+ , _drsNextToken :: !(Maybe Text)+ , _drsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeComputeEnvironmentsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drsComputeEnvironments' - The list of compute environments.+--+-- * 'drsNextToken' - The @nextToken@ value to include in a future @DescribeComputeEnvironments@ request. When the results of a @DescribeJobDefinitions@ request exceed @maxResults@ , this value can be used to retrieve the next page of results. This value is @null@ when there are no more results to return.+--+-- * 'drsResponseStatus' - -- | The response status code.+describeComputeEnvironmentsResponse+ :: Int -- ^ 'drsResponseStatus'+ -> DescribeComputeEnvironmentsResponse+describeComputeEnvironmentsResponse pResponseStatus_ =+ DescribeComputeEnvironmentsResponse'+ { _drsComputeEnvironments = Nothing+ , _drsNextToken = Nothing+ , _drsResponseStatus = pResponseStatus_+ }+++-- | The list of compute environments.+drsComputeEnvironments :: Lens' DescribeComputeEnvironmentsResponse [ComputeEnvironmentDetail]+drsComputeEnvironments = lens _drsComputeEnvironments (\ s a -> s{_drsComputeEnvironments = a}) . _Default . _Coerce;++-- | The @nextToken@ value to include in a future @DescribeComputeEnvironments@ request. When the results of a @DescribeJobDefinitions@ request exceed @maxResults@ , this value can be used to retrieve the next page of results. This value is @null@ when there are no more results to return.+drsNextToken :: Lens' DescribeComputeEnvironmentsResponse (Maybe Text)+drsNextToken = lens _drsNextToken (\ s a -> s{_drsNextToken = a});++-- | -- | The response status code.+drsResponseStatus :: Lens' DescribeComputeEnvironmentsResponse Int+drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});++instance NFData DescribeComputeEnvironmentsResponse+ where
+ gen/Network/AWS/Batch/DescribeJobDefinitions.hs view
@@ -0,0 +1,186 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.DescribeJobDefinitions+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes a list of job definitions. You can specify a @status@ (such as @ACTIVE@ ) to only return job definitions that match that status.+--+--+module Network.AWS.Batch.DescribeJobDefinitions+ (+ -- * Creating a Request+ describeJobDefinitions+ , DescribeJobDefinitions+ -- * Request Lenses+ , djdStatus+ , djdJobDefinitionName+ , djdJobDefinitions+ , djdNextToken+ , djdMaxResults++ -- * Destructuring the Response+ , describeJobDefinitionsResponse+ , DescribeJobDefinitionsResponse+ -- * Response Lenses+ , djdrsJobDefinitions+ , djdrsNextToken+ , djdrsResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeJobDefinitions' smart constructor.+data DescribeJobDefinitions = DescribeJobDefinitions'+ { _djdStatus :: !(Maybe Text)+ , _djdJobDefinitionName :: !(Maybe Text)+ , _djdJobDefinitions :: !(Maybe [Text])+ , _djdNextToken :: !(Maybe Text)+ , _djdMaxResults :: !(Maybe Int)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeJobDefinitions' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'djdStatus' - The status with which to filter job definitions.+--+-- * 'djdJobDefinitionName' - The name of the job definition to describe.+--+-- * 'djdJobDefinitions' - A space-separated list of up to 100 job definition names or full Amazon Resource Name (ARN) entries.+--+-- * 'djdNextToken' - The @nextToken@ value returned from a previous paginated @DescribeJobDefinitions@ request where @maxResults@ was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the @nextToken@ value. This value is @null@ when there are no more results to return.+--+-- * 'djdMaxResults' - The maximum number of results returned by @DescribeJobDefinitions@ in paginated output. When this parameter is used, @DescribeJobDefinitions@ only returns @maxResults@ results in a single page along with a @nextToken@ response element. The remaining results of the initial request can be seen by sending another @DescribeJobDefinitions@ request with the returned @nextToken@ value. This value can be between 1 and 100. If this parameter is not used, then @DescribeJobDefinitions@ returns up to 100 results and a @nextToken@ value if applicable.+describeJobDefinitions+ :: DescribeJobDefinitions+describeJobDefinitions =+ DescribeJobDefinitions'+ { _djdStatus = Nothing+ , _djdJobDefinitionName = Nothing+ , _djdJobDefinitions = Nothing+ , _djdNextToken = Nothing+ , _djdMaxResults = Nothing+ }+++-- | The status with which to filter job definitions.+djdStatus :: Lens' DescribeJobDefinitions (Maybe Text)+djdStatus = lens _djdStatus (\ s a -> s{_djdStatus = a});++-- | The name of the job definition to describe.+djdJobDefinitionName :: Lens' DescribeJobDefinitions (Maybe Text)+djdJobDefinitionName = lens _djdJobDefinitionName (\ s a -> s{_djdJobDefinitionName = a});++-- | A space-separated list of up to 100 job definition names or full Amazon Resource Name (ARN) entries.+djdJobDefinitions :: Lens' DescribeJobDefinitions [Text]+djdJobDefinitions = lens _djdJobDefinitions (\ s a -> s{_djdJobDefinitions = a}) . _Default . _Coerce;++-- | The @nextToken@ value returned from a previous paginated @DescribeJobDefinitions@ request where @maxResults@ was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the @nextToken@ value. This value is @null@ when there are no more results to return.+djdNextToken :: Lens' DescribeJobDefinitions (Maybe Text)+djdNextToken = lens _djdNextToken (\ s a -> s{_djdNextToken = a});++-- | The maximum number of results returned by @DescribeJobDefinitions@ in paginated output. When this parameter is used, @DescribeJobDefinitions@ only returns @maxResults@ results in a single page along with a @nextToken@ response element. The remaining results of the initial request can be seen by sending another @DescribeJobDefinitions@ request with the returned @nextToken@ value. This value can be between 1 and 100. If this parameter is not used, then @DescribeJobDefinitions@ returns up to 100 results and a @nextToken@ value if applicable.+djdMaxResults :: Lens' DescribeJobDefinitions (Maybe Int)+djdMaxResults = lens _djdMaxResults (\ s a -> s{_djdMaxResults = a});++instance AWSRequest DescribeJobDefinitions where+ type Rs DescribeJobDefinitions =+ DescribeJobDefinitionsResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ DescribeJobDefinitionsResponse' <$>+ (x .?> "jobDefinitions" .!@ mempty) <*>+ (x .?> "nextToken")+ <*> (pure (fromEnum s)))++instance Hashable DescribeJobDefinitions where++instance NFData DescribeJobDefinitions where++instance ToHeaders DescribeJobDefinitions where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeJobDefinitions where+ toJSON DescribeJobDefinitions'{..}+ = object+ (catMaybes+ [("status" .=) <$> _djdStatus,+ ("jobDefinitionName" .=) <$> _djdJobDefinitionName,+ ("jobDefinitions" .=) <$> _djdJobDefinitions,+ ("nextToken" .=) <$> _djdNextToken,+ ("maxResults" .=) <$> _djdMaxResults])++instance ToPath DescribeJobDefinitions where+ toPath = const "/v1/describejobdefinitions"++instance ToQuery DescribeJobDefinitions where+ toQuery = const mempty++-- | /See:/ 'describeJobDefinitionsResponse' smart constructor.+data DescribeJobDefinitionsResponse = DescribeJobDefinitionsResponse'+ { _djdrsJobDefinitions :: !(Maybe [JobDefinition])+ , _djdrsNextToken :: !(Maybe Text)+ , _djdrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeJobDefinitionsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'djdrsJobDefinitions' - The list of job definitions.+--+-- * 'djdrsNextToken' - The @nextToken@ value to include in a future @DescribeJobDefinitions@ request. When the results of a @DescribeJobDefinitions@ request exceed @maxResults@ , this value can be used to retrieve the next page of results. This value is @null@ when there are no more results to return.+--+-- * 'djdrsResponseStatus' - -- | The response status code.+describeJobDefinitionsResponse+ :: Int -- ^ 'djdrsResponseStatus'+ -> DescribeJobDefinitionsResponse+describeJobDefinitionsResponse pResponseStatus_ =+ DescribeJobDefinitionsResponse'+ { _djdrsJobDefinitions = Nothing+ , _djdrsNextToken = Nothing+ , _djdrsResponseStatus = pResponseStatus_+ }+++-- | The list of job definitions.+djdrsJobDefinitions :: Lens' DescribeJobDefinitionsResponse [JobDefinition]+djdrsJobDefinitions = lens _djdrsJobDefinitions (\ s a -> s{_djdrsJobDefinitions = a}) . _Default . _Coerce;++-- | The @nextToken@ value to include in a future @DescribeJobDefinitions@ request. When the results of a @DescribeJobDefinitions@ request exceed @maxResults@ , this value can be used to retrieve the next page of results. This value is @null@ when there are no more results to return.+djdrsNextToken :: Lens' DescribeJobDefinitionsResponse (Maybe Text)+djdrsNextToken = lens _djdrsNextToken (\ s a -> s{_djdrsNextToken = a});++-- | -- | The response status code.+djdrsResponseStatus :: Lens' DescribeJobDefinitionsResponse Int+djdrsResponseStatus = lens _djdrsResponseStatus (\ s a -> s{_djdrsResponseStatus = a});++instance NFData DescribeJobDefinitionsResponse where
+ gen/Network/AWS/Batch/DescribeJobQueues.hs view
@@ -0,0 +1,162 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.DescribeJobQueues+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes one or more of your job queues.+--+--+module Network.AWS.Batch.DescribeJobQueues+ (+ -- * Creating a Request+ describeJobQueues+ , DescribeJobQueues+ -- * Request Lenses+ , djqNextToken+ , djqJobQueues+ , djqMaxResults++ -- * Destructuring the Response+ , describeJobQueuesResponse+ , DescribeJobQueuesResponse+ -- * Response Lenses+ , djqsrsNextToken+ , djqsrsJobQueues+ , djqsrsResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeJobQueues' smart constructor.+data DescribeJobQueues = DescribeJobQueues'+ { _djqNextToken :: !(Maybe Text)+ , _djqJobQueues :: !(Maybe [Text])+ , _djqMaxResults :: !(Maybe Int)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeJobQueues' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'djqNextToken' - The @nextToken@ value returned from a previous paginated @DescribeJobQueues@ request where @maxResults@ was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the @nextToken@ value. This value is @null@ when there are no more results to return.+--+-- * 'djqJobQueues' - A list of up to 100 queue names or full queue Amazon Resource Name (ARN) entries.+--+-- * 'djqMaxResults' - The maximum number of results returned by @DescribeJobQueues@ in paginated output. When this parameter is used, @DescribeJobQueues@ only returns @maxResults@ results in a single page along with a @nextToken@ response element. The remaining results of the initial request can be seen by sending another @DescribeJobQueues@ request with the returned @nextToken@ value. This value can be between 1 and 100. If this parameter is not used, then @DescribeJobQueues@ returns up to 100 results and a @nextToken@ value if applicable.+describeJobQueues+ :: DescribeJobQueues+describeJobQueues =+ DescribeJobQueues'+ {_djqNextToken = Nothing, _djqJobQueues = Nothing, _djqMaxResults = Nothing}+++-- | The @nextToken@ value returned from a previous paginated @DescribeJobQueues@ request where @maxResults@ was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the @nextToken@ value. This value is @null@ when there are no more results to return.+djqNextToken :: Lens' DescribeJobQueues (Maybe Text)+djqNextToken = lens _djqNextToken (\ s a -> s{_djqNextToken = a});++-- | A list of up to 100 queue names or full queue Amazon Resource Name (ARN) entries.+djqJobQueues :: Lens' DescribeJobQueues [Text]+djqJobQueues = lens _djqJobQueues (\ s a -> s{_djqJobQueues = a}) . _Default . _Coerce;++-- | The maximum number of results returned by @DescribeJobQueues@ in paginated output. When this parameter is used, @DescribeJobQueues@ only returns @maxResults@ results in a single page along with a @nextToken@ response element. The remaining results of the initial request can be seen by sending another @DescribeJobQueues@ request with the returned @nextToken@ value. This value can be between 1 and 100. If this parameter is not used, then @DescribeJobQueues@ returns up to 100 results and a @nextToken@ value if applicable.+djqMaxResults :: Lens' DescribeJobQueues (Maybe Int)+djqMaxResults = lens _djqMaxResults (\ s a -> s{_djqMaxResults = a});++instance AWSRequest DescribeJobQueues where+ type Rs DescribeJobQueues = DescribeJobQueuesResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ DescribeJobQueuesResponse' <$>+ (x .?> "nextToken") <*>+ (x .?> "jobQueues" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable DescribeJobQueues where++instance NFData DescribeJobQueues where++instance ToHeaders DescribeJobQueues where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeJobQueues where+ toJSON DescribeJobQueues'{..}+ = object+ (catMaybes+ [("nextToken" .=) <$> _djqNextToken,+ ("jobQueues" .=) <$> _djqJobQueues,+ ("maxResults" .=) <$> _djqMaxResults])++instance ToPath DescribeJobQueues where+ toPath = const "/v1/describejobqueues"++instance ToQuery DescribeJobQueues where+ toQuery = const mempty++-- | /See:/ 'describeJobQueuesResponse' smart constructor.+data DescribeJobQueuesResponse = DescribeJobQueuesResponse'+ { _djqsrsNextToken :: !(Maybe Text)+ , _djqsrsJobQueues :: !(Maybe [JobQueueDetail])+ , _djqsrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeJobQueuesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'djqsrsNextToken' - The @nextToken@ value to include in a future @DescribeJobQueues@ request. When the results of a @DescribeJobQueues@ request exceed @maxResults@ , this value can be used to retrieve the next page of results. This value is @null@ when there are no more results to return.+--+-- * 'djqsrsJobQueues' - The list of job queues.+--+-- * 'djqsrsResponseStatus' - -- | The response status code.+describeJobQueuesResponse+ :: Int -- ^ 'djqsrsResponseStatus'+ -> DescribeJobQueuesResponse+describeJobQueuesResponse pResponseStatus_ =+ DescribeJobQueuesResponse'+ { _djqsrsNextToken = Nothing+ , _djqsrsJobQueues = Nothing+ , _djqsrsResponseStatus = pResponseStatus_+ }+++-- | The @nextToken@ value to include in a future @DescribeJobQueues@ request. When the results of a @DescribeJobQueues@ request exceed @maxResults@ , this value can be used to retrieve the next page of results. This value is @null@ when there are no more results to return.+djqsrsNextToken :: Lens' DescribeJobQueuesResponse (Maybe Text)+djqsrsNextToken = lens _djqsrsNextToken (\ s a -> s{_djqsrsNextToken = a});++-- | The list of job queues.+djqsrsJobQueues :: Lens' DescribeJobQueuesResponse [JobQueueDetail]+djqsrsJobQueues = lens _djqsrsJobQueues (\ s a -> s{_djqsrsJobQueues = a}) . _Default . _Coerce;++-- | -- | The response status code.+djqsrsResponseStatus :: Lens' DescribeJobQueuesResponse Int+djqsrsResponseStatus = lens _djqsrsResponseStatus (\ s a -> s{_djqsrsResponseStatus = a});++instance NFData DescribeJobQueuesResponse where
+ gen/Network/AWS/Batch/DescribeJobs.hs view
@@ -0,0 +1,127 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.DescribeJobs+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes a list of AWS Batch jobs.+--+--+module Network.AWS.Batch.DescribeJobs+ (+ -- * Creating a Request+ describeJobs+ , DescribeJobs+ -- * Request Lenses+ , djJobs++ -- * Destructuring the Response+ , describeJobsResponse+ , DescribeJobsResponse+ -- * Response Lenses+ , djrsJobs+ , djrsResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeJobs' smart constructor.+newtype DescribeJobs = DescribeJobs'+ { _djJobs :: [Text]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeJobs' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'djJobs' - A space-separated list of up to 100 job IDs.+describeJobs+ :: DescribeJobs+describeJobs = DescribeJobs' {_djJobs = mempty}+++-- | A space-separated list of up to 100 job IDs.+djJobs :: Lens' DescribeJobs [Text]+djJobs = lens _djJobs (\ s a -> s{_djJobs = a}) . _Coerce;++instance AWSRequest DescribeJobs where+ type Rs DescribeJobs = DescribeJobsResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ DescribeJobsResponse' <$>+ (x .?> "jobs" .!@ mempty) <*> (pure (fromEnum s)))++instance Hashable DescribeJobs where++instance NFData DescribeJobs where++instance ToHeaders DescribeJobs where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeJobs where+ toJSON DescribeJobs'{..}+ = object (catMaybes [Just ("jobs" .= _djJobs)])++instance ToPath DescribeJobs where+ toPath = const "/v1/describejobs"++instance ToQuery DescribeJobs where+ toQuery = const mempty++-- | /See:/ 'describeJobsResponse' smart constructor.+data DescribeJobsResponse = DescribeJobsResponse'+ { _djrsJobs :: !(Maybe [JobDetail])+ , _djrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeJobsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'djrsJobs' - The list of jobs.+--+-- * 'djrsResponseStatus' - -- | The response status code.+describeJobsResponse+ :: Int -- ^ 'djrsResponseStatus'+ -> DescribeJobsResponse+describeJobsResponse pResponseStatus_ =+ DescribeJobsResponse'+ {_djrsJobs = Nothing, _djrsResponseStatus = pResponseStatus_}+++-- | The list of jobs.+djrsJobs :: Lens' DescribeJobsResponse [JobDetail]+djrsJobs = lens _djrsJobs (\ s a -> s{_djrsJobs = a}) . _Default . _Coerce;++-- | -- | The response status code.+djrsResponseStatus :: Lens' DescribeJobsResponse Int+djrsResponseStatus = lens _djrsResponseStatus (\ s a -> s{_djrsResponseStatus = a});++instance NFData DescribeJobsResponse where
+ gen/Network/AWS/Batch/ListJobs.hs view
@@ -0,0 +1,175 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.ListJobs+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of task jobs for a specified job queue. You can filter the results by job status with the @jobStatus@ parameter. If you do not specify a status, only @RUNNING@ jobs are returned.+--+--+module Network.AWS.Batch.ListJobs+ (+ -- * Creating a Request+ listJobs+ , ListJobs+ -- * Request Lenses+ , ljNextToken+ , ljJobStatus+ , ljMaxResults+ , ljJobQueue++ -- * Destructuring the Response+ , listJobsResponse+ , ListJobsResponse+ -- * Response Lenses+ , ljrsNextToken+ , ljrsResponseStatus+ , ljrsJobSummaryList+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listJobs' smart constructor.+data ListJobs = ListJobs'+ { _ljNextToken :: !(Maybe Text)+ , _ljJobStatus :: !(Maybe JobStatus)+ , _ljMaxResults :: !(Maybe Int)+ , _ljJobQueue :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListJobs' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ljNextToken' - The @nextToken@ value returned from a previous paginated @ListJobs@ request where @maxResults@ was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the @nextToken@ value. This value is @null@ when there are no more results to return.+--+-- * 'ljJobStatus' - The job status with which to filter jobs in the specified queue. If you do not specify a status, only @RUNNING@ jobs are returned.+--+-- * 'ljMaxResults' - The maximum number of results returned by @ListJobs@ in paginated output. When this parameter is used, @ListJobs@ only returns @maxResults@ results in a single page along with a @nextToken@ response element. The remaining results of the initial request can be seen by sending another @ListJobs@ request with the returned @nextToken@ value. This value can be between 1 and 100. If this parameter is not used, then @ListJobs@ returns up to 100 results and a @nextToken@ value if applicable.+--+-- * 'ljJobQueue' - The name or full Amazon Resource Name (ARN) of the job queue with which to list jobs.+listJobs+ :: Text -- ^ 'ljJobQueue'+ -> ListJobs+listJobs pJobQueue_ =+ ListJobs'+ { _ljNextToken = Nothing+ , _ljJobStatus = Nothing+ , _ljMaxResults = Nothing+ , _ljJobQueue = pJobQueue_+ }+++-- | The @nextToken@ value returned from a previous paginated @ListJobs@ request where @maxResults@ was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the @nextToken@ value. This value is @null@ when there are no more results to return.+ljNextToken :: Lens' ListJobs (Maybe Text)+ljNextToken = lens _ljNextToken (\ s a -> s{_ljNextToken = a});++-- | The job status with which to filter jobs in the specified queue. If you do not specify a status, only @RUNNING@ jobs are returned.+ljJobStatus :: Lens' ListJobs (Maybe JobStatus)+ljJobStatus = lens _ljJobStatus (\ s a -> s{_ljJobStatus = a});++-- | The maximum number of results returned by @ListJobs@ in paginated output. When this parameter is used, @ListJobs@ only returns @maxResults@ results in a single page along with a @nextToken@ response element. The remaining results of the initial request can be seen by sending another @ListJobs@ request with the returned @nextToken@ value. This value can be between 1 and 100. If this parameter is not used, then @ListJobs@ returns up to 100 results and a @nextToken@ value if applicable.+ljMaxResults :: Lens' ListJobs (Maybe Int)+ljMaxResults = lens _ljMaxResults (\ s a -> s{_ljMaxResults = a});++-- | The name or full Amazon Resource Name (ARN) of the job queue with which to list jobs.+ljJobQueue :: Lens' ListJobs Text+ljJobQueue = lens _ljJobQueue (\ s a -> s{_ljJobQueue = a});++instance AWSRequest ListJobs where+ type Rs ListJobs = ListJobsResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ ListJobsResponse' <$>+ (x .?> "nextToken") <*> (pure (fromEnum s)) <*>+ (x .?> "jobSummaryList" .!@ mempty))++instance Hashable ListJobs where++instance NFData ListJobs where++instance ToHeaders ListJobs where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListJobs where+ toJSON ListJobs'{..}+ = object+ (catMaybes+ [("nextToken" .=) <$> _ljNextToken,+ ("jobStatus" .=) <$> _ljJobStatus,+ ("maxResults" .=) <$> _ljMaxResults,+ Just ("jobQueue" .= _ljJobQueue)])++instance ToPath ListJobs where+ toPath = const "/v1/listjobs"++instance ToQuery ListJobs where+ toQuery = const mempty++-- | /See:/ 'listJobsResponse' smart constructor.+data ListJobsResponse = ListJobsResponse'+ { _ljrsNextToken :: !(Maybe Text)+ , _ljrsResponseStatus :: !Int+ , _ljrsJobSummaryList :: ![JobSummary]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListJobsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ljrsNextToken' - The @nextToken@ value to include in a future @ListJobs@ request. When the results of a @ListJobs@ request exceed @maxResults@ , this value can be used to retrieve the next page of results. This value is @null@ when there are no more results to return.+--+-- * 'ljrsResponseStatus' - -- | The response status code.+--+-- * 'ljrsJobSummaryList' - A list of job summaries that match the request.+listJobsResponse+ :: Int -- ^ 'ljrsResponseStatus'+ -> ListJobsResponse+listJobsResponse pResponseStatus_ =+ ListJobsResponse'+ { _ljrsNextToken = Nothing+ , _ljrsResponseStatus = pResponseStatus_+ , _ljrsJobSummaryList = mempty+ }+++-- | The @nextToken@ value to include in a future @ListJobs@ request. When the results of a @ListJobs@ request exceed @maxResults@ , this value can be used to retrieve the next page of results. This value is @null@ when there are no more results to return.+ljrsNextToken :: Lens' ListJobsResponse (Maybe Text)+ljrsNextToken = lens _ljrsNextToken (\ s a -> s{_ljrsNextToken = a});++-- | -- | The response status code.+ljrsResponseStatus :: Lens' ListJobsResponse Int+ljrsResponseStatus = lens _ljrsResponseStatus (\ s a -> s{_ljrsResponseStatus = a});++-- | A list of job summaries that match the request.+ljrsJobSummaryList :: Lens' ListJobsResponse [JobSummary]+ljrsJobSummaryList = lens _ljrsJobSummaryList (\ s a -> s{_ljrsJobSummaryList = a}) . _Coerce;++instance NFData ListJobsResponse where
+ gen/Network/AWS/Batch/RegisterJobDefinition.hs view
@@ -0,0 +1,201 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.RegisterJobDefinition+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Registers an AWS Batch job definition.+--+--+module Network.AWS.Batch.RegisterJobDefinition+ (+ -- * Creating a Request+ registerJobDefinition+ , RegisterJobDefinition+ -- * Request Lenses+ , rjdRetryStrategy+ , rjdParameters+ , rjdContainerProperties+ , rjdJobDefinitionName+ , rjdType++ -- * Destructuring the Response+ , registerJobDefinitionResponse+ , RegisterJobDefinitionResponse+ -- * Response Lenses+ , rjdrsResponseStatus+ , rjdrsJobDefinitionName+ , rjdrsJobDefinitionARN+ , rjdrsRevision+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'registerJobDefinition' smart constructor.+data RegisterJobDefinition = RegisterJobDefinition'+ { _rjdRetryStrategy :: !(Maybe RetryStrategy)+ , _rjdParameters :: !(Maybe (Map Text Text))+ , _rjdContainerProperties :: !(Maybe ContainerProperties)+ , _rjdJobDefinitionName :: !Text+ , _rjdType :: !JobDefinitionType+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RegisterJobDefinition' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rjdRetryStrategy' - The retry strategy to use for failed jobs that are submitted with this job definition. Any retry strategy that is specified during a 'SubmitJob' operation overrides the retry strategy defined here.+--+-- * 'rjdParameters' - Default parameter substitution placeholders to set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a @SubmitJob@ request override any corresponding parameter defaults from the job definition.+--+-- * 'rjdContainerProperties' - An object with various properties specific for container-based jobs. This parameter is required if the @type@ parameter is @container@ .+--+-- * 'rjdJobDefinitionName' - The name of the job definition to register. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.+--+-- * 'rjdType' - The type of job definition.+registerJobDefinition+ :: Text -- ^ 'rjdJobDefinitionName'+ -> JobDefinitionType -- ^ 'rjdType'+ -> RegisterJobDefinition+registerJobDefinition pJobDefinitionName_ pType_ =+ RegisterJobDefinition'+ { _rjdRetryStrategy = Nothing+ , _rjdParameters = Nothing+ , _rjdContainerProperties = Nothing+ , _rjdJobDefinitionName = pJobDefinitionName_+ , _rjdType = pType_+ }+++-- | The retry strategy to use for failed jobs that are submitted with this job definition. Any retry strategy that is specified during a 'SubmitJob' operation overrides the retry strategy defined here.+rjdRetryStrategy :: Lens' RegisterJobDefinition (Maybe RetryStrategy)+rjdRetryStrategy = lens _rjdRetryStrategy (\ s a -> s{_rjdRetryStrategy = a});++-- | Default parameter substitution placeholders to set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a @SubmitJob@ request override any corresponding parameter defaults from the job definition.+rjdParameters :: Lens' RegisterJobDefinition (HashMap Text Text)+rjdParameters = lens _rjdParameters (\ s a -> s{_rjdParameters = a}) . _Default . _Map;++-- | An object with various properties specific for container-based jobs. This parameter is required if the @type@ parameter is @container@ .+rjdContainerProperties :: Lens' RegisterJobDefinition (Maybe ContainerProperties)+rjdContainerProperties = lens _rjdContainerProperties (\ s a -> s{_rjdContainerProperties = a});++-- | The name of the job definition to register. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.+rjdJobDefinitionName :: Lens' RegisterJobDefinition Text+rjdJobDefinitionName = lens _rjdJobDefinitionName (\ s a -> s{_rjdJobDefinitionName = a});++-- | The type of job definition.+rjdType :: Lens' RegisterJobDefinition JobDefinitionType+rjdType = lens _rjdType (\ s a -> s{_rjdType = a});++instance AWSRequest RegisterJobDefinition where+ type Rs RegisterJobDefinition =+ RegisterJobDefinitionResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ RegisterJobDefinitionResponse' <$>+ (pure (fromEnum s)) <*> (x .:> "jobDefinitionName")+ <*> (x .:> "jobDefinitionArn")+ <*> (x .:> "revision"))++instance Hashable RegisterJobDefinition where++instance NFData RegisterJobDefinition where++instance ToHeaders RegisterJobDefinition where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON RegisterJobDefinition where+ toJSON RegisterJobDefinition'{..}+ = object+ (catMaybes+ [("retryStrategy" .=) <$> _rjdRetryStrategy,+ ("parameters" .=) <$> _rjdParameters,+ ("containerProperties" .=) <$>+ _rjdContainerProperties,+ Just ("jobDefinitionName" .= _rjdJobDefinitionName),+ Just ("type" .= _rjdType)])++instance ToPath RegisterJobDefinition where+ toPath = const "/v1/registerjobdefinition"++instance ToQuery RegisterJobDefinition where+ toQuery = const mempty++-- | /See:/ 'registerJobDefinitionResponse' smart constructor.+data RegisterJobDefinitionResponse = RegisterJobDefinitionResponse'+ { _rjdrsResponseStatus :: !Int+ , _rjdrsJobDefinitionName :: !Text+ , _rjdrsJobDefinitionARN :: !Text+ , _rjdrsRevision :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RegisterJobDefinitionResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rjdrsResponseStatus' - -- | The response status code.+--+-- * 'rjdrsJobDefinitionName' - The name of the job definition.+--+-- * 'rjdrsJobDefinitionARN' - The Amazon Resource Name (ARN) of the job definition.+--+-- * 'rjdrsRevision' - The revision of the job definition.+registerJobDefinitionResponse+ :: Int -- ^ 'rjdrsResponseStatus'+ -> Text -- ^ 'rjdrsJobDefinitionName'+ -> Text -- ^ 'rjdrsJobDefinitionARN'+ -> Int -- ^ 'rjdrsRevision'+ -> RegisterJobDefinitionResponse+registerJobDefinitionResponse pResponseStatus_ pJobDefinitionName_ pJobDefinitionARN_ pRevision_ =+ RegisterJobDefinitionResponse'+ { _rjdrsResponseStatus = pResponseStatus_+ , _rjdrsJobDefinitionName = pJobDefinitionName_+ , _rjdrsJobDefinitionARN = pJobDefinitionARN_+ , _rjdrsRevision = pRevision_+ }+++-- | -- | The response status code.+rjdrsResponseStatus :: Lens' RegisterJobDefinitionResponse Int+rjdrsResponseStatus = lens _rjdrsResponseStatus (\ s a -> s{_rjdrsResponseStatus = a});++-- | The name of the job definition.+rjdrsJobDefinitionName :: Lens' RegisterJobDefinitionResponse Text+rjdrsJobDefinitionName = lens _rjdrsJobDefinitionName (\ s a -> s{_rjdrsJobDefinitionName = a});++-- | The Amazon Resource Name (ARN) of the job definition.+rjdrsJobDefinitionARN :: Lens' RegisterJobDefinitionResponse Text+rjdrsJobDefinitionARN = lens _rjdrsJobDefinitionARN (\ s a -> s{_rjdrsJobDefinitionARN = a});++-- | The revision of the job definition.+rjdrsRevision :: Lens' RegisterJobDefinitionResponse Int+rjdrsRevision = lens _rjdrsRevision (\ s a -> s{_rjdrsRevision = a});++instance NFData RegisterJobDefinitionResponse where
+ gen/Network/AWS/Batch/SubmitJob.hs view
@@ -0,0 +1,209 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.SubmitJob+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Submits an AWS Batch job from a job definition. Parameters specified during 'SubmitJob' override parameters defined in the job definition.+--+--+module Network.AWS.Batch.SubmitJob+ (+ -- * Creating a Request+ submitJob+ , SubmitJob+ -- * Request Lenses+ , sjContainerOverrides+ , sjRetryStrategy+ , sjDependsOn+ , sjParameters+ , sjJobName+ , sjJobQueue+ , sjJobDefinition++ -- * Destructuring the Response+ , submitJobResponse+ , SubmitJobResponse+ -- * Response Lenses+ , sjrsResponseStatus+ , sjrsJobName+ , sjrsJobId+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'submitJob' smart constructor.+data SubmitJob = SubmitJob'+ { _sjContainerOverrides :: !(Maybe ContainerOverrides)+ , _sjRetryStrategy :: !(Maybe RetryStrategy)+ , _sjDependsOn :: !(Maybe [JobDependency])+ , _sjParameters :: !(Maybe (Map Text Text))+ , _sjJobName :: !Text+ , _sjJobQueue :: !Text+ , _sjJobDefinition :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'SubmitJob' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sjContainerOverrides' - A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive. You can override the default command for a container (that is specified in the job definition or the Docker image) with a @command@ override. You can also override existing environment variables (that are specified in the job definition or Docker image) on a container or add new environment variables to it with an @environment@ override.+--+-- * 'sjRetryStrategy' - The retry strategy to use for failed jobs from this 'SubmitJob' operation. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.+--+-- * 'sjDependsOn' - A list of job IDs on which this job depends. A job can depend upon a maximum of 20 jobs.+--+-- * 'sjParameters' - Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters in a @SubmitJob@ request override any corresponding parameter defaults from the job definition.+--+-- * 'sjJobName' - The name of the job. The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.+--+-- * 'sjJobQueue' - The job queue into which the job will be submitted. You can specify either the name or the Amazon Resource Name (ARN) of the queue.+--+-- * 'sjJobDefinition' - The job definition used by this job. This value can be either a @name:revision@ or the Amazon Resource Name (ARN) for the job definition.+submitJob+ :: Text -- ^ 'sjJobName'+ -> Text -- ^ 'sjJobQueue'+ -> Text -- ^ 'sjJobDefinition'+ -> SubmitJob+submitJob pJobName_ pJobQueue_ pJobDefinition_ =+ SubmitJob'+ { _sjContainerOverrides = Nothing+ , _sjRetryStrategy = Nothing+ , _sjDependsOn = Nothing+ , _sjParameters = Nothing+ , _sjJobName = pJobName_+ , _sjJobQueue = pJobQueue_+ , _sjJobDefinition = pJobDefinition_+ }+++-- | A list of container overrides in JSON format that specify the name of a container in the specified job definition and the overrides it should receive. You can override the default command for a container (that is specified in the job definition or the Docker image) with a @command@ override. You can also override existing environment variables (that are specified in the job definition or Docker image) on a container or add new environment variables to it with an @environment@ override.+sjContainerOverrides :: Lens' SubmitJob (Maybe ContainerOverrides)+sjContainerOverrides = lens _sjContainerOverrides (\ s a -> s{_sjContainerOverrides = a});++-- | The retry strategy to use for failed jobs from this 'SubmitJob' operation. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.+sjRetryStrategy :: Lens' SubmitJob (Maybe RetryStrategy)+sjRetryStrategy = lens _sjRetryStrategy (\ s a -> s{_sjRetryStrategy = a});++-- | A list of job IDs on which this job depends. A job can depend upon a maximum of 20 jobs.+sjDependsOn :: Lens' SubmitJob [JobDependency]+sjDependsOn = lens _sjDependsOn (\ s a -> s{_sjDependsOn = a}) . _Default . _Coerce;++-- | Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters in a @SubmitJob@ request override any corresponding parameter defaults from the job definition.+sjParameters :: Lens' SubmitJob (HashMap Text Text)+sjParameters = lens _sjParameters (\ s a -> s{_sjParameters = a}) . _Default . _Map;++-- | The name of the job. The first character must be alphanumeric, and up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.+sjJobName :: Lens' SubmitJob Text+sjJobName = lens _sjJobName (\ s a -> s{_sjJobName = a});++-- | The job queue into which the job will be submitted. You can specify either the name or the Amazon Resource Name (ARN) of the queue.+sjJobQueue :: Lens' SubmitJob Text+sjJobQueue = lens _sjJobQueue (\ s a -> s{_sjJobQueue = a});++-- | The job definition used by this job. This value can be either a @name:revision@ or the Amazon Resource Name (ARN) for the job definition.+sjJobDefinition :: Lens' SubmitJob Text+sjJobDefinition = lens _sjJobDefinition (\ s a -> s{_sjJobDefinition = a});++instance AWSRequest SubmitJob where+ type Rs SubmitJob = SubmitJobResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ SubmitJobResponse' <$>+ (pure (fromEnum s)) <*> (x .:> "jobName") <*>+ (x .:> "jobId"))++instance Hashable SubmitJob where++instance NFData SubmitJob where++instance ToHeaders SubmitJob where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON SubmitJob where+ toJSON SubmitJob'{..}+ = object+ (catMaybes+ [("containerOverrides" .=) <$> _sjContainerOverrides,+ ("retryStrategy" .=) <$> _sjRetryStrategy,+ ("dependsOn" .=) <$> _sjDependsOn,+ ("parameters" .=) <$> _sjParameters,+ Just ("jobName" .= _sjJobName),+ Just ("jobQueue" .= _sjJobQueue),+ Just ("jobDefinition" .= _sjJobDefinition)])++instance ToPath SubmitJob where+ toPath = const "/v1/submitjob"++instance ToQuery SubmitJob where+ toQuery = const mempty++-- | /See:/ 'submitJobResponse' smart constructor.+data SubmitJobResponse = SubmitJobResponse'+ { _sjrsResponseStatus :: !Int+ , _sjrsJobName :: !Text+ , _sjrsJobId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'SubmitJobResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sjrsResponseStatus' - -- | The response status code.+--+-- * 'sjrsJobName' - The name of the job.+--+-- * 'sjrsJobId' - The unique identifier for the job.+submitJobResponse+ :: Int -- ^ 'sjrsResponseStatus'+ -> Text -- ^ 'sjrsJobName'+ -> Text -- ^ 'sjrsJobId'+ -> SubmitJobResponse+submitJobResponse pResponseStatus_ pJobName_ pJobId_ =+ SubmitJobResponse'+ { _sjrsResponseStatus = pResponseStatus_+ , _sjrsJobName = pJobName_+ , _sjrsJobId = pJobId_+ }+++-- | -- | The response status code.+sjrsResponseStatus :: Lens' SubmitJobResponse Int+sjrsResponseStatus = lens _sjrsResponseStatus (\ s a -> s{_sjrsResponseStatus = a});++-- | The name of the job.+sjrsJobName :: Lens' SubmitJobResponse Text+sjrsJobName = lens _sjrsJobName (\ s a -> s{_sjrsJobName = a});++-- | The unique identifier for the job.+sjrsJobId :: Lens' SubmitJobResponse Text+sjrsJobId = lens _sjrsJobId (\ s a -> s{_sjrsJobId = a});++instance NFData SubmitJobResponse where
+ gen/Network/AWS/Batch/TerminateJob.hs view
@@ -0,0 +1,131 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.TerminateJob+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Terminates a job in a job queue. Jobs that are in the @STARTING@ or @RUNNING@ state are terminated, which causes them to transition to @FAILED@ . Jobs that have not progressed to the @STARTING@ state are cancelled.+--+--+module Network.AWS.Batch.TerminateJob+ (+ -- * Creating a Request+ terminateJob+ , TerminateJob+ -- * Request Lenses+ , tjJobId+ , tjReason++ -- * Destructuring the Response+ , terminateJobResponse+ , TerminateJobResponse+ -- * Response Lenses+ , tjrsResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'terminateJob' smart constructor.+data TerminateJob = TerminateJob'+ { _tjJobId :: !Text+ , _tjReason :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'TerminateJob' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tjJobId' - The AWS Batch job ID of the job to terminate.+--+-- * 'tjReason' - A message to attach to the job that explains the reason for cancelling it. This message is returned by future 'DescribeJobs' operations on the job. This message is also recorded in the AWS Batch activity logs.+terminateJob+ :: Text -- ^ 'tjJobId'+ -> Text -- ^ 'tjReason'+ -> TerminateJob+terminateJob pJobId_ pReason_ =+ TerminateJob' {_tjJobId = pJobId_, _tjReason = pReason_}+++-- | The AWS Batch job ID of the job to terminate.+tjJobId :: Lens' TerminateJob Text+tjJobId = lens _tjJobId (\ s a -> s{_tjJobId = a});++-- | A message to attach to the job that explains the reason for cancelling it. This message is returned by future 'DescribeJobs' operations on the job. This message is also recorded in the AWS Batch activity logs.+tjReason :: Lens' TerminateJob Text+tjReason = lens _tjReason (\ s a -> s{_tjReason = a});++instance AWSRequest TerminateJob where+ type Rs TerminateJob = TerminateJobResponse+ request = postJSON batch+ response+ = receiveEmpty+ (\ s h x ->+ TerminateJobResponse' <$> (pure (fromEnum s)))++instance Hashable TerminateJob where++instance NFData TerminateJob where++instance ToHeaders TerminateJob where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON TerminateJob where+ toJSON TerminateJob'{..}+ = object+ (catMaybes+ [Just ("jobId" .= _tjJobId),+ Just ("reason" .= _tjReason)])++instance ToPath TerminateJob where+ toPath = const "/v1/terminatejob"++instance ToQuery TerminateJob where+ toQuery = const mempty++-- | /See:/ 'terminateJobResponse' smart constructor.+newtype TerminateJobResponse = TerminateJobResponse'+ { _tjrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'TerminateJobResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tjrsResponseStatus' - -- | The response status code.+terminateJobResponse+ :: Int -- ^ 'tjrsResponseStatus'+ -> TerminateJobResponse+terminateJobResponse pResponseStatus_ =+ TerminateJobResponse' {_tjrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+tjrsResponseStatus :: Lens' TerminateJobResponse Int+tjrsResponseStatus = lens _tjrsResponseStatus (\ s a -> s{_tjrsResponseStatus = a});++instance NFData TerminateJobResponse where
+ gen/Network/AWS/Batch/Types.hs view
@@ -0,0 +1,295 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.Types+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.Batch.Types+ (+ -- * Service Configuration+ batch++ -- * Errors+ , _ServerException+ , _ClientException++ -- * CEState+ , CEState (..)++ -- * CEStatus+ , CEStatus (..)++ -- * CEType+ , CEType (..)++ -- * CRType+ , CRType (..)++ -- * JQState+ , JQState (..)++ -- * JQStatus+ , JQStatus (..)++ -- * JobDefinitionType+ , JobDefinitionType (..)++ -- * JobStatus+ , JobStatus (..)++ -- * AttemptContainerDetail+ , AttemptContainerDetail+ , attemptContainerDetail+ , acdTaskARN+ , acdContainerInstanceARN+ , acdReason+ , acdLogStreamName+ , acdExitCode++ -- * AttemptDetail+ , AttemptDetail+ , attemptDetail+ , adStoppedAt+ , adStartedAt+ , adContainer+ , adStatusReason++ -- * ComputeEnvironmentDetail+ , ComputeEnvironmentDetail+ , computeEnvironmentDetail+ , cedStatus+ , cedState+ , cedComputeResources+ , cedStatusReason+ , cedType+ , cedServiceRole+ , cedComputeEnvironmentName+ , cedComputeEnvironmentARN+ , cedEcsClusterARN++ -- * ComputeEnvironmentOrder+ , ComputeEnvironmentOrder+ , computeEnvironmentOrder+ , ceoOrder+ , ceoComputeEnvironment++ -- * ComputeResource+ , ComputeResource+ , computeResource+ , crEc2KeyPair+ , crBidPercentage+ , crSpotIAMFleetRole+ , crImageId+ , crDesiredvCPUs+ , crTags+ , crType+ , crMinvCPUs+ , crMaxvCPUs+ , crInstanceTypes+ , crSubnets+ , crSecurityGroupIds+ , crInstanceRole++ -- * ComputeResourceUpdate+ , ComputeResourceUpdate+ , computeResourceUpdate+ , cruMinvCPUs+ , cruMaxvCPUs+ , cruDesiredvCPUs++ -- * ContainerDetail+ , ContainerDetail+ , containerDetail+ , cdImage+ , cdCommand+ , cdEnvironment+ , cdTaskARN+ , cdUlimits+ , cdContainerInstanceARN+ , cdPrivileged+ , cdJobRoleARN+ , cdMemory+ , cdUser+ , cdReason+ , cdLogStreamName+ , cdMountPoints+ , cdExitCode+ , cdVcpus+ , cdReadonlyRootFilesystem+ , cdVolumes++ -- * ContainerOverrides+ , ContainerOverrides+ , containerOverrides+ , coCommand+ , coEnvironment+ , coMemory+ , coVcpus++ -- * ContainerProperties+ , ContainerProperties+ , containerProperties+ , cpCommand+ , cpEnvironment+ , cpUlimits+ , cpPrivileged+ , cpJobRoleARN+ , cpUser+ , cpMountPoints+ , cpReadonlyRootFilesystem+ , cpVolumes+ , cpImage+ , cpVcpus+ , cpMemory++ -- * Host+ , Host+ , host+ , hSourcePath++ -- * JobDefinition+ , JobDefinition+ , jobDefinition+ , jStatus+ , jRetryStrategy+ , jParameters+ , jContainerProperties+ , jJobDefinitionName+ , jJobDefinitionARN+ , jRevision+ , jType++ -- * JobDependency+ , JobDependency+ , jobDependency+ , jJobId++ -- * JobDetail+ , JobDetail+ , jobDetail+ , jdStoppedAt+ , jdCreatedAt+ , jdRetryStrategy+ , jdAttempts+ , jdDependsOn+ , jdContainer+ , jdParameters+ , jdStatusReason+ , jdJobName+ , jdJobId+ , jdJobQueue+ , jdStatus+ , jdStartedAt+ , jdJobDefinition++ -- * JobQueueDetail+ , JobQueueDetail+ , jobQueueDetail+ , jqdStatus+ , jqdStatusReason+ , jqdJobQueueName+ , jqdJobQueueARN+ , jqdState+ , jqdPriority+ , jqdComputeEnvironmentOrder++ -- * JobSummary+ , JobSummary+ , jobSummary+ , jsJobId+ , jsJobName++ -- * KeyValuePair+ , KeyValuePair+ , keyValuePair+ , kvpValue+ , kvpName++ -- * MountPoint+ , MountPoint+ , mountPoint+ , mpContainerPath+ , mpSourceVolume+ , mpReadOnly++ -- * RetryStrategy+ , RetryStrategy+ , retryStrategy+ , rsAttempts++ -- * Ulimit+ , Ulimit+ , ulimit+ , uHardLimit+ , uName+ , uSoftLimit++ -- * Volume+ , Volume+ , volume+ , vName+ , vHost+ ) where++import Network.AWS.Batch.Types.Product+import Network.AWS.Batch.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Sign.V4++-- | API version @2016-08-10@ of the Amazon Batch SDK configuration.+batch :: Service+batch =+ Service+ { _svcAbbrev = "Batch"+ , _svcSigner = v4+ , _svcPrefix = "batch"+ , _svcVersion = "2016-08-10"+ , _svcEndpoint = defaultEndpoint batch+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "Batch"+ , _svcRetry = retry+ }+ where+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasCode "ThrottledException" . hasStatus 400) e =+ Just "throttled_exception"+ | has (hasStatus 429) e = Just "too_many_requests"+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | has (hasStatus 504) e = Just "gateway_timeout"+ | has (hasStatus 502) e = Just "bad_gateway"+ | has (hasStatus 503) e = Just "service_unavailable"+ | has (hasStatus 500) e = Just "general_server_error"+ | has (hasStatus 509) e = Just "limit_exceeded"+ | otherwise = Nothing+++-- | These errors are usually caused by a server issue.+--+--+_ServerException :: AsError a => Getting (First ServiceError) a ServiceError+_ServerException = _MatchServiceError batch "ServerException" . hasStatus 500+++-- | These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permission to use the action or resource, or specifying an identifier that is not valid.+--+--+_ClientException :: AsError a => Getting (First ServiceError) a ServiceError+_ClientException = _MatchServiceError batch "ClientException" . hasStatus 400+
+ gen/Network/AWS/Batch/Types/Product.hs view
@@ -0,0 +1,1680 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.Types.Product+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.Batch.Types.Product where++import Network.AWS.Batch.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude++-- | An object representing the details of a container that is part of a job attempt.+--+--+--+-- /See:/ 'attemptContainerDetail' smart constructor.+data AttemptContainerDetail = AttemptContainerDetail'+ { _acdTaskARN :: !(Maybe Text)+ , _acdContainerInstanceARN :: !(Maybe Text)+ , _acdReason :: !(Maybe Text)+ , _acdLogStreamName :: !(Maybe Text)+ , _acdExitCode :: !(Maybe Int)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AttemptContainerDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'acdTaskARN' - The Amazon Resource Name (ARN) of the Amazon ECS task that is associated with the job attempt. Each container attempt receives a task ARN when they reach the @STARTING@ status.+--+-- * 'acdContainerInstanceARN' - The Amazon Resource Name (ARN) of the Amazon ECS container instance that hosts the job attempt.+--+-- * 'acdReason' - A short (255 max characters) human-readable string to provide additional details about a running or stopped container.+--+-- * 'acdLogStreamName' - The name of the CloudWatch Logs log stream associated with the container. The log group for AWS Batch jobs is @/aws/batch/job@ . Each container attempt receives a log stream name when they reach the @RUNNING@ status.+--+-- * 'acdExitCode' - The exit code for the job attempt. A non-zero exit code is considered a failure.+attemptContainerDetail+ :: AttemptContainerDetail+attemptContainerDetail =+ AttemptContainerDetail'+ { _acdTaskARN = Nothing+ , _acdContainerInstanceARN = Nothing+ , _acdReason = Nothing+ , _acdLogStreamName = Nothing+ , _acdExitCode = Nothing+ }+++-- | The Amazon Resource Name (ARN) of the Amazon ECS task that is associated with the job attempt. Each container attempt receives a task ARN when they reach the @STARTING@ status.+acdTaskARN :: Lens' AttemptContainerDetail (Maybe Text)+acdTaskARN = lens _acdTaskARN (\ s a -> s{_acdTaskARN = a});++-- | The Amazon Resource Name (ARN) of the Amazon ECS container instance that hosts the job attempt.+acdContainerInstanceARN :: Lens' AttemptContainerDetail (Maybe Text)+acdContainerInstanceARN = lens _acdContainerInstanceARN (\ s a -> s{_acdContainerInstanceARN = a});++-- | A short (255 max characters) human-readable string to provide additional details about a running or stopped container.+acdReason :: Lens' AttemptContainerDetail (Maybe Text)+acdReason = lens _acdReason (\ s a -> s{_acdReason = a});++-- | The name of the CloudWatch Logs log stream associated with the container. The log group for AWS Batch jobs is @/aws/batch/job@ . Each container attempt receives a log stream name when they reach the @RUNNING@ status.+acdLogStreamName :: Lens' AttemptContainerDetail (Maybe Text)+acdLogStreamName = lens _acdLogStreamName (\ s a -> s{_acdLogStreamName = a});++-- | The exit code for the job attempt. A non-zero exit code is considered a failure.+acdExitCode :: Lens' AttemptContainerDetail (Maybe Int)+acdExitCode = lens _acdExitCode (\ s a -> s{_acdExitCode = a});++instance FromJSON AttemptContainerDetail where+ parseJSON+ = withObject "AttemptContainerDetail"+ (\ x ->+ AttemptContainerDetail' <$>+ (x .:? "taskArn") <*> (x .:? "containerInstanceArn")+ <*> (x .:? "reason")+ <*> (x .:? "logStreamName")+ <*> (x .:? "exitCode"))++instance Hashable AttemptContainerDetail where++instance NFData AttemptContainerDetail where++-- | An object representing a job attempt.+--+--+--+-- /See:/ 'attemptDetail' smart constructor.+data AttemptDetail = AttemptDetail'+ { _adStoppedAt :: !(Maybe Integer)+ , _adStartedAt :: !(Maybe Integer)+ , _adContainer :: !(Maybe AttemptContainerDetail)+ , _adStatusReason :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AttemptDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'adStoppedAt' - The Unix timestamp for when the attempt was stopped (when the task transitioned from the @RUNNING@ state to the @STOPPED@ state).+--+-- * 'adStartedAt' - The Unix timestamp for when the attempt was started (when the task transitioned from the @PENDING@ state to the @RUNNING@ state).+--+-- * 'adContainer' - Details about the container in this job attempt.+--+-- * 'adStatusReason' - A short, human-readable string to provide additional details about the current status of the job attempt.+attemptDetail+ :: AttemptDetail+attemptDetail =+ AttemptDetail'+ { _adStoppedAt = Nothing+ , _adStartedAt = Nothing+ , _adContainer = Nothing+ , _adStatusReason = Nothing+ }+++-- | The Unix timestamp for when the attempt was stopped (when the task transitioned from the @RUNNING@ state to the @STOPPED@ state).+adStoppedAt :: Lens' AttemptDetail (Maybe Integer)+adStoppedAt = lens _adStoppedAt (\ s a -> s{_adStoppedAt = a});++-- | The Unix timestamp for when the attempt was started (when the task transitioned from the @PENDING@ state to the @RUNNING@ state).+adStartedAt :: Lens' AttemptDetail (Maybe Integer)+adStartedAt = lens _adStartedAt (\ s a -> s{_adStartedAt = a});++-- | Details about the container in this job attempt.+adContainer :: Lens' AttemptDetail (Maybe AttemptContainerDetail)+adContainer = lens _adContainer (\ s a -> s{_adContainer = a});++-- | A short, human-readable string to provide additional details about the current status of the job attempt.+adStatusReason :: Lens' AttemptDetail (Maybe Text)+adStatusReason = lens _adStatusReason (\ s a -> s{_adStatusReason = a});++instance FromJSON AttemptDetail where+ parseJSON+ = withObject "AttemptDetail"+ (\ x ->+ AttemptDetail' <$>+ (x .:? "stoppedAt") <*> (x .:? "startedAt") <*>+ (x .:? "container")+ <*> (x .:? "statusReason"))++instance Hashable AttemptDetail where++instance NFData AttemptDetail where++-- | An object representing an AWS Batch compute environment.+--+--+--+-- /See:/ 'computeEnvironmentDetail' smart constructor.+data ComputeEnvironmentDetail = ComputeEnvironmentDetail'+ { _cedStatus :: !(Maybe CEStatus)+ , _cedState :: !(Maybe CEState)+ , _cedComputeResources :: !(Maybe ComputeResource)+ , _cedStatusReason :: !(Maybe Text)+ , _cedType :: !(Maybe CEType)+ , _cedServiceRole :: !(Maybe Text)+ , _cedComputeEnvironmentName :: !Text+ , _cedComputeEnvironmentARN :: !Text+ , _cedEcsClusterARN :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ComputeEnvironmentDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cedStatus' - The current status of the compute environment (for example, @CREATING@ or @VALID@ ).+--+-- * 'cedState' - The state of the compute environment. The valid values are @ENABLED@ or @DISABLED@ . An @ENABLED@ state indicates that you can register instances with the compute environment and that the associated instances can accept jobs.+--+-- * 'cedComputeResources' - The compute resources defined for the compute environment.+--+-- * 'cedStatusReason' - A short, human-readable string to provide additional details about the current status of the compute environment.+--+-- * 'cedType' - The type of the compute environment.+--+-- * 'cedServiceRole' - The service role associated with the compute environment that allows AWS Batch to make calls to AWS API operations on your behalf.+--+-- * 'cedComputeEnvironmentName' - The name of the compute environment.+--+-- * 'cedComputeEnvironmentARN' - The Amazon Resource Name (ARN) of the compute environment.+--+-- * 'cedEcsClusterARN' - The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.+computeEnvironmentDetail+ :: Text -- ^ 'cedComputeEnvironmentName'+ -> Text -- ^ 'cedComputeEnvironmentARN'+ -> Text -- ^ 'cedEcsClusterARN'+ -> ComputeEnvironmentDetail+computeEnvironmentDetail pComputeEnvironmentName_ pComputeEnvironmentARN_ pEcsClusterARN_ =+ ComputeEnvironmentDetail'+ { _cedStatus = Nothing+ , _cedState = Nothing+ , _cedComputeResources = Nothing+ , _cedStatusReason = Nothing+ , _cedType = Nothing+ , _cedServiceRole = Nothing+ , _cedComputeEnvironmentName = pComputeEnvironmentName_+ , _cedComputeEnvironmentARN = pComputeEnvironmentARN_+ , _cedEcsClusterARN = pEcsClusterARN_+ }+++-- | The current status of the compute environment (for example, @CREATING@ or @VALID@ ).+cedStatus :: Lens' ComputeEnvironmentDetail (Maybe CEStatus)+cedStatus = lens _cedStatus (\ s a -> s{_cedStatus = a});++-- | The state of the compute environment. The valid values are @ENABLED@ or @DISABLED@ . An @ENABLED@ state indicates that you can register instances with the compute environment and that the associated instances can accept jobs.+cedState :: Lens' ComputeEnvironmentDetail (Maybe CEState)+cedState = lens _cedState (\ s a -> s{_cedState = a});++-- | The compute resources defined for the compute environment.+cedComputeResources :: Lens' ComputeEnvironmentDetail (Maybe ComputeResource)+cedComputeResources = lens _cedComputeResources (\ s a -> s{_cedComputeResources = a});++-- | A short, human-readable string to provide additional details about the current status of the compute environment.+cedStatusReason :: Lens' ComputeEnvironmentDetail (Maybe Text)+cedStatusReason = lens _cedStatusReason (\ s a -> s{_cedStatusReason = a});++-- | The type of the compute environment.+cedType :: Lens' ComputeEnvironmentDetail (Maybe CEType)+cedType = lens _cedType (\ s a -> s{_cedType = a});++-- | The service role associated with the compute environment that allows AWS Batch to make calls to AWS API operations on your behalf.+cedServiceRole :: Lens' ComputeEnvironmentDetail (Maybe Text)+cedServiceRole = lens _cedServiceRole (\ s a -> s{_cedServiceRole = a});++-- | The name of the compute environment.+cedComputeEnvironmentName :: Lens' ComputeEnvironmentDetail Text+cedComputeEnvironmentName = lens _cedComputeEnvironmentName (\ s a -> s{_cedComputeEnvironmentName = a});++-- | The Amazon Resource Name (ARN) of the compute environment.+cedComputeEnvironmentARN :: Lens' ComputeEnvironmentDetail Text+cedComputeEnvironmentARN = lens _cedComputeEnvironmentARN (\ s a -> s{_cedComputeEnvironmentARN = a});++-- | The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.+cedEcsClusterARN :: Lens' ComputeEnvironmentDetail Text+cedEcsClusterARN = lens _cedEcsClusterARN (\ s a -> s{_cedEcsClusterARN = a});++instance FromJSON ComputeEnvironmentDetail where+ parseJSON+ = withObject "ComputeEnvironmentDetail"+ (\ x ->+ ComputeEnvironmentDetail' <$>+ (x .:? "status") <*> (x .:? "state") <*>+ (x .:? "computeResources")+ <*> (x .:? "statusReason")+ <*> (x .:? "type")+ <*> (x .:? "serviceRole")+ <*> (x .: "computeEnvironmentName")+ <*> (x .: "computeEnvironmentArn")+ <*> (x .: "ecsClusterArn"))++instance Hashable ComputeEnvironmentDetail where++instance NFData ComputeEnvironmentDetail where++-- | The order in which compute environments are tried for job placement within a queue. Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first.+--+--+--+-- /See:/ 'computeEnvironmentOrder' smart constructor.+data ComputeEnvironmentOrder = ComputeEnvironmentOrder'+ { _ceoOrder :: !Int+ , _ceoComputeEnvironment :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ComputeEnvironmentOrder' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ceoOrder' - The order of the compute environment.+--+-- * 'ceoComputeEnvironment' - The Amazon Resource Name (ARN) of the compute environment.+computeEnvironmentOrder+ :: Int -- ^ 'ceoOrder'+ -> Text -- ^ 'ceoComputeEnvironment'+ -> ComputeEnvironmentOrder+computeEnvironmentOrder pOrder_ pComputeEnvironment_ =+ ComputeEnvironmentOrder'+ {_ceoOrder = pOrder_, _ceoComputeEnvironment = pComputeEnvironment_}+++-- | The order of the compute environment.+ceoOrder :: Lens' ComputeEnvironmentOrder Int+ceoOrder = lens _ceoOrder (\ s a -> s{_ceoOrder = a});++-- | The Amazon Resource Name (ARN) of the compute environment.+ceoComputeEnvironment :: Lens' ComputeEnvironmentOrder Text+ceoComputeEnvironment = lens _ceoComputeEnvironment (\ s a -> s{_ceoComputeEnvironment = a});++instance FromJSON ComputeEnvironmentOrder where+ parseJSON+ = withObject "ComputeEnvironmentOrder"+ (\ x ->+ ComputeEnvironmentOrder' <$>+ (x .: "order") <*> (x .: "computeEnvironment"))++instance Hashable ComputeEnvironmentOrder where++instance NFData ComputeEnvironmentOrder where++instance ToJSON ComputeEnvironmentOrder where+ toJSON ComputeEnvironmentOrder'{..}+ = object+ (catMaybes+ [Just ("order" .= _ceoOrder),+ Just+ ("computeEnvironment" .= _ceoComputeEnvironment)])++-- | An object representing an AWS Batch compute resource.+--+--+--+-- /See:/ 'computeResource' smart constructor.+data ComputeResource = ComputeResource'+ { _crEc2KeyPair :: !(Maybe Text)+ , _crBidPercentage :: !(Maybe Int)+ , _crSpotIAMFleetRole :: !(Maybe Text)+ , _crImageId :: !(Maybe Text)+ , _crDesiredvCPUs :: !(Maybe Int)+ , _crTags :: !(Maybe (Map Text Text))+ , _crType :: !CRType+ , _crMinvCPUs :: !Int+ , _crMaxvCPUs :: !Int+ , _crInstanceTypes :: ![Text]+ , _crSubnets :: ![Text]+ , _crSecurityGroupIds :: ![Text]+ , _crInstanceRole :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ComputeResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'crEc2KeyPair' - The EC2 key pair that is used for instances launched in the compute environment.+--+-- * 'crBidPercentage' - The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that instance type before instances are launched. For example, if your bid percentage is 20%, then the Spot price must be below 20% of the current On-Demand price for that EC2 instance.+--+-- * 'crSpotIAMFleetRole' - The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a @SPOT@ compute environment.+--+-- * 'crImageId' - The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.+--+-- * 'crDesiredvCPUs' - The desired number of EC2 vCPUS in the compute environment.+--+-- * 'crTags' - Key-value pair tags to be applied to resources that are launched in the compute environment.+--+-- * 'crType' - The type of compute environment.+--+-- * 'crMinvCPUs' - The minimum number of EC2 vCPUs that an environment should maintain.+--+-- * 'crMaxvCPUs' - The maximum number of EC2 vCPUs that an environment can reach.+--+-- * 'crInstanceTypes' - The instances types that may be launched. You can specify instance families to launch any instance type within those families (for example, @c4@ or @p3@ ), or you can specify specific sizes within a family (such as @c4.8xlarge@ ). You can also choose @optimal@ to pick instance types (from the latest C, M, and R instance families) on the fly that match the demand of your job queues.+--+-- * 'crSubnets' - The VPC subnets into which the compute resources are launched.+--+-- * 'crSecurityGroupIds' - The EC2 security group that is associated with instances launched in the compute environment.+--+-- * 'crInstanceRole' - The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment. You can specify the short name or full Amazon Resource Name (ARN) of an instance profile. For example, @ecsInstanceRole@ or @arn:aws:iam::<aws_account_id>:instance-profile/ecsInstanceRole@ . For more information, see <http://docs.aws.amazon.com/batch/latest/userguide/instance_IAM_role.html Amazon ECS Instance Role> in the /AWS Batch User Guide/ .+computeResource+ :: CRType -- ^ 'crType'+ -> Int -- ^ 'crMinvCPUs'+ -> Int -- ^ 'crMaxvCPUs'+ -> Text -- ^ 'crInstanceRole'+ -> ComputeResource+computeResource pType_ pMinvCPUs_ pMaxvCPUs_ pInstanceRole_ =+ ComputeResource'+ { _crEc2KeyPair = Nothing+ , _crBidPercentage = Nothing+ , _crSpotIAMFleetRole = Nothing+ , _crImageId = Nothing+ , _crDesiredvCPUs = Nothing+ , _crTags = Nothing+ , _crType = pType_+ , _crMinvCPUs = pMinvCPUs_+ , _crMaxvCPUs = pMaxvCPUs_+ , _crInstanceTypes = mempty+ , _crSubnets = mempty+ , _crSecurityGroupIds = mempty+ , _crInstanceRole = pInstanceRole_+ }+++-- | The EC2 key pair that is used for instances launched in the compute environment.+crEc2KeyPair :: Lens' ComputeResource (Maybe Text)+crEc2KeyPair = lens _crEc2KeyPair (\ s a -> s{_crEc2KeyPair = a});++-- | The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that instance type before instances are launched. For example, if your bid percentage is 20%, then the Spot price must be below 20% of the current On-Demand price for that EC2 instance.+crBidPercentage :: Lens' ComputeResource (Maybe Int)+crBidPercentage = lens _crBidPercentage (\ s a -> s{_crBidPercentage = a});++-- | The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a @SPOT@ compute environment.+crSpotIAMFleetRole :: Lens' ComputeResource (Maybe Text)+crSpotIAMFleetRole = lens _crSpotIAMFleetRole (\ s a -> s{_crSpotIAMFleetRole = a});++-- | The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.+crImageId :: Lens' ComputeResource (Maybe Text)+crImageId = lens _crImageId (\ s a -> s{_crImageId = a});++-- | The desired number of EC2 vCPUS in the compute environment.+crDesiredvCPUs :: Lens' ComputeResource (Maybe Int)+crDesiredvCPUs = lens _crDesiredvCPUs (\ s a -> s{_crDesiredvCPUs = a});++-- | Key-value pair tags to be applied to resources that are launched in the compute environment.+crTags :: Lens' ComputeResource (HashMap Text Text)+crTags = lens _crTags (\ s a -> s{_crTags = a}) . _Default . _Map;++-- | The type of compute environment.+crType :: Lens' ComputeResource CRType+crType = lens _crType (\ s a -> s{_crType = a});++-- | The minimum number of EC2 vCPUs that an environment should maintain.+crMinvCPUs :: Lens' ComputeResource Int+crMinvCPUs = lens _crMinvCPUs (\ s a -> s{_crMinvCPUs = a});++-- | The maximum number of EC2 vCPUs that an environment can reach.+crMaxvCPUs :: Lens' ComputeResource Int+crMaxvCPUs = lens _crMaxvCPUs (\ s a -> s{_crMaxvCPUs = a});++-- | The instances types that may be launched. You can specify instance families to launch any instance type within those families (for example, @c4@ or @p3@ ), or you can specify specific sizes within a family (such as @c4.8xlarge@ ). You can also choose @optimal@ to pick instance types (from the latest C, M, and R instance families) on the fly that match the demand of your job queues.+crInstanceTypes :: Lens' ComputeResource [Text]+crInstanceTypes = lens _crInstanceTypes (\ s a -> s{_crInstanceTypes = a}) . _Coerce;++-- | The VPC subnets into which the compute resources are launched.+crSubnets :: Lens' ComputeResource [Text]+crSubnets = lens _crSubnets (\ s a -> s{_crSubnets = a}) . _Coerce;++-- | The EC2 security group that is associated with instances launched in the compute environment.+crSecurityGroupIds :: Lens' ComputeResource [Text]+crSecurityGroupIds = lens _crSecurityGroupIds (\ s a -> s{_crSecurityGroupIds = a}) . _Coerce;++-- | The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment. You can specify the short name or full Amazon Resource Name (ARN) of an instance profile. For example, @ecsInstanceRole@ or @arn:aws:iam::<aws_account_id>:instance-profile/ecsInstanceRole@ . For more information, see <http://docs.aws.amazon.com/batch/latest/userguide/instance_IAM_role.html Amazon ECS Instance Role> in the /AWS Batch User Guide/ .+crInstanceRole :: Lens' ComputeResource Text+crInstanceRole = lens _crInstanceRole (\ s a -> s{_crInstanceRole = a});++instance FromJSON ComputeResource where+ parseJSON+ = withObject "ComputeResource"+ (\ x ->+ ComputeResource' <$>+ (x .:? "ec2KeyPair") <*> (x .:? "bidPercentage") <*>+ (x .:? "spotIamFleetRole")+ <*> (x .:? "imageId")+ <*> (x .:? "desiredvCpus")+ <*> (x .:? "tags" .!= mempty)+ <*> (x .: "type")+ <*> (x .: "minvCpus")+ <*> (x .: "maxvCpus")+ <*> (x .:? "instanceTypes" .!= mempty)+ <*> (x .:? "subnets" .!= mempty)+ <*> (x .:? "securityGroupIds" .!= mempty)+ <*> (x .: "instanceRole"))++instance Hashable ComputeResource where++instance NFData ComputeResource where++instance ToJSON ComputeResource where+ toJSON ComputeResource'{..}+ = object+ (catMaybes+ [("ec2KeyPair" .=) <$> _crEc2KeyPair,+ ("bidPercentage" .=) <$> _crBidPercentage,+ ("spotIamFleetRole" .=) <$> _crSpotIAMFleetRole,+ ("imageId" .=) <$> _crImageId,+ ("desiredvCpus" .=) <$> _crDesiredvCPUs,+ ("tags" .=) <$> _crTags, Just ("type" .= _crType),+ Just ("minvCpus" .= _crMinvCPUs),+ Just ("maxvCpus" .= _crMaxvCPUs),+ Just ("instanceTypes" .= _crInstanceTypes),+ Just ("subnets" .= _crSubnets),+ Just ("securityGroupIds" .= _crSecurityGroupIds),+ Just ("instanceRole" .= _crInstanceRole)])++-- | An object representing the attributes of a compute environment that can be updated.+--+--+--+-- /See:/ 'computeResourceUpdate' smart constructor.+data ComputeResourceUpdate = ComputeResourceUpdate'+ { _cruMinvCPUs :: !(Maybe Int)+ , _cruMaxvCPUs :: !(Maybe Int)+ , _cruDesiredvCPUs :: !(Maybe Int)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ComputeResourceUpdate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cruMinvCPUs' - The minimum number of EC2 vCPUs that an environment should maintain.+--+-- * 'cruMaxvCPUs' - The maximum number of EC2 vCPUs that an environment can reach.+--+-- * 'cruDesiredvCPUs' - The desired number of EC2 vCPUS in the compute environment.+computeResourceUpdate+ :: ComputeResourceUpdate+computeResourceUpdate =+ ComputeResourceUpdate'+ {_cruMinvCPUs = Nothing, _cruMaxvCPUs = Nothing, _cruDesiredvCPUs = Nothing}+++-- | The minimum number of EC2 vCPUs that an environment should maintain.+cruMinvCPUs :: Lens' ComputeResourceUpdate (Maybe Int)+cruMinvCPUs = lens _cruMinvCPUs (\ s a -> s{_cruMinvCPUs = a});++-- | The maximum number of EC2 vCPUs that an environment can reach.+cruMaxvCPUs :: Lens' ComputeResourceUpdate (Maybe Int)+cruMaxvCPUs = lens _cruMaxvCPUs (\ s a -> s{_cruMaxvCPUs = a});++-- | The desired number of EC2 vCPUS in the compute environment.+cruDesiredvCPUs :: Lens' ComputeResourceUpdate (Maybe Int)+cruDesiredvCPUs = lens _cruDesiredvCPUs (\ s a -> s{_cruDesiredvCPUs = a});++instance Hashable ComputeResourceUpdate where++instance NFData ComputeResourceUpdate where++instance ToJSON ComputeResourceUpdate where+ toJSON ComputeResourceUpdate'{..}+ = object+ (catMaybes+ [("minvCpus" .=) <$> _cruMinvCPUs,+ ("maxvCpus" .=) <$> _cruMaxvCPUs,+ ("desiredvCpus" .=) <$> _cruDesiredvCPUs])++-- | An object representing the details of a container that is part of a job.+--+--+--+-- /See:/ 'containerDetail' smart constructor.+data ContainerDetail = ContainerDetail'+ { _cdImage :: !(Maybe Text)+ , _cdCommand :: !(Maybe [Text])+ , _cdEnvironment :: !(Maybe [KeyValuePair])+ , _cdTaskARN :: !(Maybe Text)+ , _cdUlimits :: !(Maybe [Ulimit])+ , _cdContainerInstanceARN :: !(Maybe Text)+ , _cdPrivileged :: !(Maybe Bool)+ , _cdJobRoleARN :: !(Maybe Text)+ , _cdMemory :: !(Maybe Int)+ , _cdUser :: !(Maybe Text)+ , _cdReason :: !(Maybe Text)+ , _cdLogStreamName :: !(Maybe Text)+ , _cdMountPoints :: !(Maybe [MountPoint])+ , _cdExitCode :: !(Maybe Int)+ , _cdVcpus :: !(Maybe Int)+ , _cdReadonlyRootFilesystem :: !(Maybe Bool)+ , _cdVolumes :: !(Maybe [Volume])+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ContainerDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cdImage' - The image used to start the container.+--+-- * 'cdCommand' - The command that is passed to the container.+--+-- * 'cdEnvironment' - The environment variables to pass to a container.+--+-- * 'cdTaskARN' - The Amazon Resource Name (ARN) of the Amazon ECS task that is associated with the container job. Each container attempt receives a task ARN when they reach the @STARTING@ status.+--+-- * 'cdUlimits' - A list of @ulimit@ values to set in the container.+--+-- * 'cdContainerInstanceARN' - The Amazon Resource Name (ARN) of the container instance on which the container is running.+--+-- * 'cdPrivileged' - When this parameter is true, the container is given elevated privileges on the host container instance (similar to the @root@ user).+--+-- * 'cdJobRoleARN' - The Amazon Resource Name (ARN) associated with the job upon execution.+--+-- * 'cdMemory' - The number of MiB of memory reserved for the job.+--+-- * 'cdUser' - The user name to use inside the container.+--+-- * 'cdReason' - A short (255 max characters) human-readable string to provide additional details about a running or stopped container.+--+-- * 'cdLogStreamName' - The name of the CloudWatch Logs log stream associated with the container. The log group for AWS Batch jobs is @/aws/batch/job@ . Each container attempt receives a log stream name when they reach the @RUNNING@ status.+--+-- * 'cdMountPoints' - The mount points for data volumes in your container.+--+-- * 'cdExitCode' - The exit code to return upon completion.+--+-- * 'cdVcpus' - The number of VCPUs allocated for the job.+--+-- * 'cdReadonlyRootFilesystem' - When this parameter is true, the container is given read-only access to its root file system.+--+-- * 'cdVolumes' - A list of volumes associated with the job.+containerDetail+ :: ContainerDetail+containerDetail =+ ContainerDetail'+ { _cdImage = Nothing+ , _cdCommand = Nothing+ , _cdEnvironment = Nothing+ , _cdTaskARN = Nothing+ , _cdUlimits = Nothing+ , _cdContainerInstanceARN = Nothing+ , _cdPrivileged = Nothing+ , _cdJobRoleARN = Nothing+ , _cdMemory = Nothing+ , _cdUser = Nothing+ , _cdReason = Nothing+ , _cdLogStreamName = Nothing+ , _cdMountPoints = Nothing+ , _cdExitCode = Nothing+ , _cdVcpus = Nothing+ , _cdReadonlyRootFilesystem = Nothing+ , _cdVolumes = Nothing+ }+++-- | The image used to start the container.+cdImage :: Lens' ContainerDetail (Maybe Text)+cdImage = lens _cdImage (\ s a -> s{_cdImage = a});++-- | The command that is passed to the container.+cdCommand :: Lens' ContainerDetail [Text]+cdCommand = lens _cdCommand (\ s a -> s{_cdCommand = a}) . _Default . _Coerce;++-- | The environment variables to pass to a container.+cdEnvironment :: Lens' ContainerDetail [KeyValuePair]+cdEnvironment = lens _cdEnvironment (\ s a -> s{_cdEnvironment = a}) . _Default . _Coerce;++-- | The Amazon Resource Name (ARN) of the Amazon ECS task that is associated with the container job. Each container attempt receives a task ARN when they reach the @STARTING@ status.+cdTaskARN :: Lens' ContainerDetail (Maybe Text)+cdTaskARN = lens _cdTaskARN (\ s a -> s{_cdTaskARN = a});++-- | A list of @ulimit@ values to set in the container.+cdUlimits :: Lens' ContainerDetail [Ulimit]+cdUlimits = lens _cdUlimits (\ s a -> s{_cdUlimits = a}) . _Default . _Coerce;++-- | The Amazon Resource Name (ARN) of the container instance on which the container is running.+cdContainerInstanceARN :: Lens' ContainerDetail (Maybe Text)+cdContainerInstanceARN = lens _cdContainerInstanceARN (\ s a -> s{_cdContainerInstanceARN = a});++-- | When this parameter is true, the container is given elevated privileges on the host container instance (similar to the @root@ user).+cdPrivileged :: Lens' ContainerDetail (Maybe Bool)+cdPrivileged = lens _cdPrivileged (\ s a -> s{_cdPrivileged = a});++-- | The Amazon Resource Name (ARN) associated with the job upon execution.+cdJobRoleARN :: Lens' ContainerDetail (Maybe Text)+cdJobRoleARN = lens _cdJobRoleARN (\ s a -> s{_cdJobRoleARN = a});++-- | The number of MiB of memory reserved for the job.+cdMemory :: Lens' ContainerDetail (Maybe Int)+cdMemory = lens _cdMemory (\ s a -> s{_cdMemory = a});++-- | The user name to use inside the container.+cdUser :: Lens' ContainerDetail (Maybe Text)+cdUser = lens _cdUser (\ s a -> s{_cdUser = a});++-- | A short (255 max characters) human-readable string to provide additional details about a running or stopped container.+cdReason :: Lens' ContainerDetail (Maybe Text)+cdReason = lens _cdReason (\ s a -> s{_cdReason = a});++-- | The name of the CloudWatch Logs log stream associated with the container. The log group for AWS Batch jobs is @/aws/batch/job@ . Each container attempt receives a log stream name when they reach the @RUNNING@ status.+cdLogStreamName :: Lens' ContainerDetail (Maybe Text)+cdLogStreamName = lens _cdLogStreamName (\ s a -> s{_cdLogStreamName = a});++-- | The mount points for data volumes in your container.+cdMountPoints :: Lens' ContainerDetail [MountPoint]+cdMountPoints = lens _cdMountPoints (\ s a -> s{_cdMountPoints = a}) . _Default . _Coerce;++-- | The exit code to return upon completion.+cdExitCode :: Lens' ContainerDetail (Maybe Int)+cdExitCode = lens _cdExitCode (\ s a -> s{_cdExitCode = a});++-- | The number of VCPUs allocated for the job.+cdVcpus :: Lens' ContainerDetail (Maybe Int)+cdVcpus = lens _cdVcpus (\ s a -> s{_cdVcpus = a});++-- | When this parameter is true, the container is given read-only access to its root file system.+cdReadonlyRootFilesystem :: Lens' ContainerDetail (Maybe Bool)+cdReadonlyRootFilesystem = lens _cdReadonlyRootFilesystem (\ s a -> s{_cdReadonlyRootFilesystem = a});++-- | A list of volumes associated with the job.+cdVolumes :: Lens' ContainerDetail [Volume]+cdVolumes = lens _cdVolumes (\ s a -> s{_cdVolumes = a}) . _Default . _Coerce;++instance FromJSON ContainerDetail where+ parseJSON+ = withObject "ContainerDetail"+ (\ x ->+ ContainerDetail' <$>+ (x .:? "image") <*> (x .:? "command" .!= mempty) <*>+ (x .:? "environment" .!= mempty)+ <*> (x .:? "taskArn")+ <*> (x .:? "ulimits" .!= mempty)+ <*> (x .:? "containerInstanceArn")+ <*> (x .:? "privileged")+ <*> (x .:? "jobRoleArn")+ <*> (x .:? "memory")+ <*> (x .:? "user")+ <*> (x .:? "reason")+ <*> (x .:? "logStreamName")+ <*> (x .:? "mountPoints" .!= mempty)+ <*> (x .:? "exitCode")+ <*> (x .:? "vcpus")+ <*> (x .:? "readonlyRootFilesystem")+ <*> (x .:? "volumes" .!= mempty))++instance Hashable ContainerDetail where++instance NFData ContainerDetail where++-- | The overrides that should be sent to a container.+--+--+--+-- /See:/ 'containerOverrides' smart constructor.+data ContainerOverrides = ContainerOverrides'+ { _coCommand :: !(Maybe [Text])+ , _coEnvironment :: !(Maybe [KeyValuePair])+ , _coMemory :: !(Maybe Int)+ , _coVcpus :: !(Maybe Int)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ContainerOverrides' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'coCommand' - The command to send to the container that overrides the default command from the Docker image or the job definition.+--+-- * 'coEnvironment' - The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition.+--+-- * 'coMemory' - The number of MiB of memory reserved for the job. This value overrides the value set in the job definition.+--+-- * 'coVcpus' - The number of vCPUs to reserve for the container. This value overrides the value set in the job definition.+containerOverrides+ :: ContainerOverrides+containerOverrides =+ ContainerOverrides'+ { _coCommand = Nothing+ , _coEnvironment = Nothing+ , _coMemory = Nothing+ , _coVcpus = Nothing+ }+++-- | The command to send to the container that overrides the default command from the Docker image or the job definition.+coCommand :: Lens' ContainerOverrides [Text]+coCommand = lens _coCommand (\ s a -> s{_coCommand = a}) . _Default . _Coerce;++-- | The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition.+coEnvironment :: Lens' ContainerOverrides [KeyValuePair]+coEnvironment = lens _coEnvironment (\ s a -> s{_coEnvironment = a}) . _Default . _Coerce;++-- | The number of MiB of memory reserved for the job. This value overrides the value set in the job definition.+coMemory :: Lens' ContainerOverrides (Maybe Int)+coMemory = lens _coMemory (\ s a -> s{_coMemory = a});++-- | The number of vCPUs to reserve for the container. This value overrides the value set in the job definition.+coVcpus :: Lens' ContainerOverrides (Maybe Int)+coVcpus = lens _coVcpus (\ s a -> s{_coVcpus = a});++instance Hashable ContainerOverrides where++instance NFData ContainerOverrides where++instance ToJSON ContainerOverrides where+ toJSON ContainerOverrides'{..}+ = object+ (catMaybes+ [("command" .=) <$> _coCommand,+ ("environment" .=) <$> _coEnvironment,+ ("memory" .=) <$> _coMemory,+ ("vcpus" .=) <$> _coVcpus])++-- | Container properties are used in job definitions to describe the container that is launched as part of a job.+--+--+--+-- /See:/ 'containerProperties' smart constructor.+data ContainerProperties = ContainerProperties'+ { _cpCommand :: !(Maybe [Text])+ , _cpEnvironment :: !(Maybe [KeyValuePair])+ , _cpUlimits :: !(Maybe [Ulimit])+ , _cpPrivileged :: !(Maybe Bool)+ , _cpJobRoleARN :: !(Maybe Text)+ , _cpUser :: !(Maybe Text)+ , _cpMountPoints :: !(Maybe [MountPoint])+ , _cpReadonlyRootFilesystem :: !(Maybe Bool)+ , _cpVolumes :: !(Maybe [Volume])+ , _cpImage :: !Text+ , _cpVcpus :: !Int+ , _cpMemory :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ContainerProperties' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cpCommand' - The command that is passed to the container. This parameter maps to @Cmd@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @COMMAND@ parameter to <https://docs.docker.com/engine/reference/run/ docker run> . For more information, see <https://docs.docker.com/engine/reference/builder/#cmd https://docs.docker.com/engine/reference/builder/#cmd> .+--+-- * 'cpEnvironment' - The environment variables to pass to a container. This parameter maps to @Env@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--env@ option to <https://docs.docker.com/engine/reference/run/ docker run> . /Important:/ We do not recommend using plain text environment variables for sensitive information, such as credential data.+--+-- * 'cpUlimits' - A list of @ulimits@ to set in the container. This parameter maps to @Ulimits@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--ulimit@ option to <https://docs.docker.com/engine/reference/run/ docker run> .+--+-- * 'cpPrivileged' - When this parameter is true, the container is given elevated privileges on the host container instance (similar to the @root@ user). This parameter maps to @Privileged@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--privileged@ option to <https://docs.docker.com/engine/reference/run/ docker run> .+--+-- * 'cpJobRoleARN' - The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions.+--+-- * 'cpUser' - The user name to use inside the container. This parameter maps to @User@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--user@ option to <https://docs.docker.com/engine/reference/run/ docker run> .+--+-- * 'cpMountPoints' - The mount points for data volumes in your container. This parameter maps to @Volumes@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--volume@ option to <https://docs.docker.com/engine/reference/run/ docker run> .+--+-- * 'cpReadonlyRootFilesystem' - When this parameter is true, the container is given read-only access to its root file system. This parameter maps to @ReadonlyRootfs@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--read-only@ option to @docker run@ .+--+-- * 'cpVolumes' - A list of data volumes used in a job.+--+-- * 'cpImage' - The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with @/repository-url/ //image/ :/tag/ @ . Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to @Image@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @IMAGE@ parameter of <https://docs.docker.com/engine/reference/run/ docker run> . * Images in Amazon ECR repositories use the full registry and repository URI (for example, @012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@ ). * Images in official repositories on Docker Hub use a single name (for example, @ubuntu@ or @mongo@ ). * Images in other repositories on Docker Hub are qualified with an organization name (for example, @amazon/amazon-ecs-agent@ ). * Images in other online repositories are qualified further by a domain name (for example, @quay.io/assemblyline/ubuntu@ ).+--+-- * 'cpVcpus' - The number of vCPUs reserved for the container. This parameter maps to @CpuShares@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--cpu-shares@ option to <https://docs.docker.com/engine/reference/run/ docker run> . Each vCPU is equivalent to 1,024 CPU shares. You must specify at least 1 vCPU.+--+-- * 'cpMemory' - The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the memory specified here, the container is killed. This parameter maps to @Memory@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--memory@ option to <https://docs.docker.com/engine/reference/run/ docker run> . You must specify at least 4 MiB of memory for a job.+containerProperties+ :: Text -- ^ 'cpImage'+ -> Int -- ^ 'cpVcpus'+ -> Int -- ^ 'cpMemory'+ -> ContainerProperties+containerProperties pImage_ pVcpus_ pMemory_ =+ ContainerProperties'+ { _cpCommand = Nothing+ , _cpEnvironment = Nothing+ , _cpUlimits = Nothing+ , _cpPrivileged = Nothing+ , _cpJobRoleARN = Nothing+ , _cpUser = Nothing+ , _cpMountPoints = Nothing+ , _cpReadonlyRootFilesystem = Nothing+ , _cpVolumes = Nothing+ , _cpImage = pImage_+ , _cpVcpus = pVcpus_+ , _cpMemory = pMemory_+ }+++-- | The command that is passed to the container. This parameter maps to @Cmd@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @COMMAND@ parameter to <https://docs.docker.com/engine/reference/run/ docker run> . For more information, see <https://docs.docker.com/engine/reference/builder/#cmd https://docs.docker.com/engine/reference/builder/#cmd> .+cpCommand :: Lens' ContainerProperties [Text]+cpCommand = lens _cpCommand (\ s a -> s{_cpCommand = a}) . _Default . _Coerce;++-- | The environment variables to pass to a container. This parameter maps to @Env@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--env@ option to <https://docs.docker.com/engine/reference/run/ docker run> . /Important:/ We do not recommend using plain text environment variables for sensitive information, such as credential data.+cpEnvironment :: Lens' ContainerProperties [KeyValuePair]+cpEnvironment = lens _cpEnvironment (\ s a -> s{_cpEnvironment = a}) . _Default . _Coerce;++-- | A list of @ulimits@ to set in the container. This parameter maps to @Ulimits@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--ulimit@ option to <https://docs.docker.com/engine/reference/run/ docker run> .+cpUlimits :: Lens' ContainerProperties [Ulimit]+cpUlimits = lens _cpUlimits (\ s a -> s{_cpUlimits = a}) . _Default . _Coerce;++-- | When this parameter is true, the container is given elevated privileges on the host container instance (similar to the @root@ user). This parameter maps to @Privileged@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--privileged@ option to <https://docs.docker.com/engine/reference/run/ docker run> .+cpPrivileged :: Lens' ContainerProperties (Maybe Bool)+cpPrivileged = lens _cpPrivileged (\ s a -> s{_cpPrivileged = a});++-- | The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions.+cpJobRoleARN :: Lens' ContainerProperties (Maybe Text)+cpJobRoleARN = lens _cpJobRoleARN (\ s a -> s{_cpJobRoleARN = a});++-- | The user name to use inside the container. This parameter maps to @User@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--user@ option to <https://docs.docker.com/engine/reference/run/ docker run> .+cpUser :: Lens' ContainerProperties (Maybe Text)+cpUser = lens _cpUser (\ s a -> s{_cpUser = a});++-- | The mount points for data volumes in your container. This parameter maps to @Volumes@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--volume@ option to <https://docs.docker.com/engine/reference/run/ docker run> .+cpMountPoints :: Lens' ContainerProperties [MountPoint]+cpMountPoints = lens _cpMountPoints (\ s a -> s{_cpMountPoints = a}) . _Default . _Coerce;++-- | When this parameter is true, the container is given read-only access to its root file system. This parameter maps to @ReadonlyRootfs@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--read-only@ option to @docker run@ .+cpReadonlyRootFilesystem :: Lens' ContainerProperties (Maybe Bool)+cpReadonlyRootFilesystem = lens _cpReadonlyRootFilesystem (\ s a -> s{_cpReadonlyRootFilesystem = a});++-- | A list of data volumes used in a job.+cpVolumes :: Lens' ContainerProperties [Volume]+cpVolumes = lens _cpVolumes (\ s a -> s{_cpVolumes = a}) . _Default . _Coerce;++-- | The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with @/repository-url/ //image/ :/tag/ @ . Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to @Image@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @IMAGE@ parameter of <https://docs.docker.com/engine/reference/run/ docker run> . * Images in Amazon ECR repositories use the full registry and repository URI (for example, @012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@ ). * Images in official repositories on Docker Hub use a single name (for example, @ubuntu@ or @mongo@ ). * Images in other repositories on Docker Hub are qualified with an organization name (for example, @amazon/amazon-ecs-agent@ ). * Images in other online repositories are qualified further by a domain name (for example, @quay.io/assemblyline/ubuntu@ ).+cpImage :: Lens' ContainerProperties Text+cpImage = lens _cpImage (\ s a -> s{_cpImage = a});++-- | The number of vCPUs reserved for the container. This parameter maps to @CpuShares@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--cpu-shares@ option to <https://docs.docker.com/engine/reference/run/ docker run> . Each vCPU is equivalent to 1,024 CPU shares. You must specify at least 1 vCPU.+cpVcpus :: Lens' ContainerProperties Int+cpVcpus = lens _cpVcpus (\ s a -> s{_cpVcpus = a});++-- | The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the memory specified here, the container is killed. This parameter maps to @Memory@ in the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container Create a container> section of the <https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/ Docker Remote API> and the @--memory@ option to <https://docs.docker.com/engine/reference/run/ docker run> . You must specify at least 4 MiB of memory for a job.+cpMemory :: Lens' ContainerProperties Int+cpMemory = lens _cpMemory (\ s a -> s{_cpMemory = a});++instance FromJSON ContainerProperties where+ parseJSON+ = withObject "ContainerProperties"+ (\ x ->+ ContainerProperties' <$>+ (x .:? "command" .!= mempty) <*>+ (x .:? "environment" .!= mempty)+ <*> (x .:? "ulimits" .!= mempty)+ <*> (x .:? "privileged")+ <*> (x .:? "jobRoleArn")+ <*> (x .:? "user")+ <*> (x .:? "mountPoints" .!= mempty)+ <*> (x .:? "readonlyRootFilesystem")+ <*> (x .:? "volumes" .!= mempty)+ <*> (x .: "image")+ <*> (x .: "vcpus")+ <*> (x .: "memory"))++instance Hashable ContainerProperties where++instance NFData ContainerProperties where++instance ToJSON ContainerProperties where+ toJSON ContainerProperties'{..}+ = object+ (catMaybes+ [("command" .=) <$> _cpCommand,+ ("environment" .=) <$> _cpEnvironment,+ ("ulimits" .=) <$> _cpUlimits,+ ("privileged" .=) <$> _cpPrivileged,+ ("jobRoleArn" .=) <$> _cpJobRoleARN,+ ("user" .=) <$> _cpUser,+ ("mountPoints" .=) <$> _cpMountPoints,+ ("readonlyRootFilesystem" .=) <$>+ _cpReadonlyRootFilesystem,+ ("volumes" .=) <$> _cpVolumes,+ Just ("image" .= _cpImage),+ Just ("vcpus" .= _cpVcpus),+ Just ("memory" .= _cpMemory)])++-- | The contents of the @host@ parameter determine whether your data volume persists on the host container instance and where it is stored. If the host parameter is empty, then the Docker daemon assigns a host path for your data volume, but the data is not guaranteed to persist after the containers associated with it stop running.+--+--+--+-- /See:/ 'host' smart constructor.+newtype Host = Host'+ { _hSourcePath :: Maybe Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Host' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'hSourcePath' - The path on the host container instance that is presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If the @host@ parameter contains a @sourcePath@ file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the @sourcePath@ value does not exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.+host+ :: Host+host = Host' {_hSourcePath = Nothing}+++-- | The path on the host container instance that is presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If the @host@ parameter contains a @sourcePath@ file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the @sourcePath@ value does not exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.+hSourcePath :: Lens' Host (Maybe Text)+hSourcePath = lens _hSourcePath (\ s a -> s{_hSourcePath = a});++instance FromJSON Host where+ parseJSON+ = withObject "Host"+ (\ x -> Host' <$> (x .:? "sourcePath"))++instance Hashable Host where++instance NFData Host where++instance ToJSON Host where+ toJSON Host'{..}+ = object+ (catMaybes [("sourcePath" .=) <$> _hSourcePath])++-- | An object representing an AWS Batch job definition.+--+--+--+-- /See:/ 'jobDefinition' smart constructor.+data JobDefinition = JobDefinition'+ { _jStatus :: !(Maybe Text)+ , _jRetryStrategy :: !(Maybe RetryStrategy)+ , _jParameters :: !(Maybe (Map Text Text))+ , _jContainerProperties :: !(Maybe ContainerProperties)+ , _jJobDefinitionName :: !Text+ , _jJobDefinitionARN :: !Text+ , _jRevision :: !Int+ , _jType :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'JobDefinition' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jStatus' - The status of the job definition.+--+-- * 'jRetryStrategy' - The retry strategy to use for failed jobs that are submitted with this job definition.+--+-- * 'jParameters' - Default parameters or parameter substitution placeholders that are set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a @SubmitJob@ request override any corresponding parameter defaults from the job definition.+--+-- * 'jContainerProperties' - An object with various properties specific to container-based jobs.+--+-- * 'jJobDefinitionName' - The name of the job definition.+--+-- * 'jJobDefinitionARN' - The Amazon Resource Name (ARN) for the job definition.+--+-- * 'jRevision' - The revision of the job definition.+--+-- * 'jType' - The type of job definition.+jobDefinition+ :: Text -- ^ 'jJobDefinitionName'+ -> Text -- ^ 'jJobDefinitionARN'+ -> Int -- ^ 'jRevision'+ -> Text -- ^ 'jType'+ -> JobDefinition+jobDefinition pJobDefinitionName_ pJobDefinitionARN_ pRevision_ pType_ =+ JobDefinition'+ { _jStatus = Nothing+ , _jRetryStrategy = Nothing+ , _jParameters = Nothing+ , _jContainerProperties = Nothing+ , _jJobDefinitionName = pJobDefinitionName_+ , _jJobDefinitionARN = pJobDefinitionARN_+ , _jRevision = pRevision_+ , _jType = pType_+ }+++-- | The status of the job definition.+jStatus :: Lens' JobDefinition (Maybe Text)+jStatus = lens _jStatus (\ s a -> s{_jStatus = a});++-- | The retry strategy to use for failed jobs that are submitted with this job definition.+jRetryStrategy :: Lens' JobDefinition (Maybe RetryStrategy)+jRetryStrategy = lens _jRetryStrategy (\ s a -> s{_jRetryStrategy = a});++-- | Default parameters or parameter substitution placeholders that are set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a @SubmitJob@ request override any corresponding parameter defaults from the job definition.+jParameters :: Lens' JobDefinition (HashMap Text Text)+jParameters = lens _jParameters (\ s a -> s{_jParameters = a}) . _Default . _Map;++-- | An object with various properties specific to container-based jobs.+jContainerProperties :: Lens' JobDefinition (Maybe ContainerProperties)+jContainerProperties = lens _jContainerProperties (\ s a -> s{_jContainerProperties = a});++-- | The name of the job definition.+jJobDefinitionName :: Lens' JobDefinition Text+jJobDefinitionName = lens _jJobDefinitionName (\ s a -> s{_jJobDefinitionName = a});++-- | The Amazon Resource Name (ARN) for the job definition.+jJobDefinitionARN :: Lens' JobDefinition Text+jJobDefinitionARN = lens _jJobDefinitionARN (\ s a -> s{_jJobDefinitionARN = a});++-- | The revision of the job definition.+jRevision :: Lens' JobDefinition Int+jRevision = lens _jRevision (\ s a -> s{_jRevision = a});++-- | The type of job definition.+jType :: Lens' JobDefinition Text+jType = lens _jType (\ s a -> s{_jType = a});++instance FromJSON JobDefinition where+ parseJSON+ = withObject "JobDefinition"+ (\ x ->+ JobDefinition' <$>+ (x .:? "status") <*> (x .:? "retryStrategy") <*>+ (x .:? "parameters" .!= mempty)+ <*> (x .:? "containerProperties")+ <*> (x .: "jobDefinitionName")+ <*> (x .: "jobDefinitionArn")+ <*> (x .: "revision")+ <*> (x .: "type"))++instance Hashable JobDefinition where++instance NFData JobDefinition where++-- | An object representing an AWS Batch job dependency.+--+--+--+-- /See:/ 'jobDependency' smart constructor.+newtype JobDependency = JobDependency'+ { _jJobId :: Maybe Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'JobDependency' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jJobId' - The job ID of the AWS Batch job associated with this dependency.+jobDependency+ :: JobDependency+jobDependency = JobDependency' {_jJobId = Nothing}+++-- | The job ID of the AWS Batch job associated with this dependency.+jJobId :: Lens' JobDependency (Maybe Text)+jJobId = lens _jJobId (\ s a -> s{_jJobId = a});++instance FromJSON JobDependency where+ parseJSON+ = withObject "JobDependency"+ (\ x -> JobDependency' <$> (x .:? "jobId"))++instance Hashable JobDependency where++instance NFData JobDependency where++instance ToJSON JobDependency where+ toJSON JobDependency'{..}+ = object (catMaybes [("jobId" .=) <$> _jJobId])++-- | An object representing an AWS Batch job.+--+--+--+-- /See:/ 'jobDetail' smart constructor.+data JobDetail = JobDetail'+ { _jdStoppedAt :: !(Maybe Integer)+ , _jdCreatedAt :: !(Maybe Integer)+ , _jdRetryStrategy :: !(Maybe RetryStrategy)+ , _jdAttempts :: !(Maybe [AttemptDetail])+ , _jdDependsOn :: !(Maybe [JobDependency])+ , _jdContainer :: !(Maybe ContainerDetail)+ , _jdParameters :: !(Maybe (Map Text Text))+ , _jdStatusReason :: !(Maybe Text)+ , _jdJobName :: !Text+ , _jdJobId :: !Text+ , _jdJobQueue :: !Text+ , _jdStatus :: !JobStatus+ , _jdStartedAt :: !Integer+ , _jdJobDefinition :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'JobDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jdStoppedAt' - The Unix timestamp for when the job was stopped (when the task transitioned from the @RUNNING@ state to the @STOPPED@ state).+--+-- * 'jdCreatedAt' - The Unix timestamp for when the job was created (when the task entered the @PENDING@ state).+--+-- * 'jdRetryStrategy' - The retry strategy to use for this job if an attempt fails.+--+-- * 'jdAttempts' - A list of job attempts associated with this job.+--+-- * 'jdDependsOn' - A list of job names or IDs on which this job depends.+--+-- * 'jdContainer' - An object representing the details of the container that is associated with the job.+--+-- * 'jdParameters' - Additional parameters passed to the job that replace parameter substitution placeholders or override any corresponding parameter defaults from the job definition.+--+-- * 'jdStatusReason' - A short, human-readable string to provide additional details about the current status of the job.+--+-- * 'jdJobName' - The name of the job.+--+-- * 'jdJobId' - The ID for the job.+--+-- * 'jdJobQueue' - The Amazon Resource Name (ARN) of the job queue with which the job is associated.+--+-- * 'jdStatus' - The current status for the job.+--+-- * 'jdStartedAt' - The Unix timestamp for when the job was started (when the task transitioned from the @PENDING@ state to the @RUNNING@ state).+--+-- * 'jdJobDefinition' - The job definition that is used by this job.+jobDetail+ :: Text -- ^ 'jdJobName'+ -> Text -- ^ 'jdJobId'+ -> Text -- ^ 'jdJobQueue'+ -> JobStatus -- ^ 'jdStatus'+ -> Integer -- ^ 'jdStartedAt'+ -> Text -- ^ 'jdJobDefinition'+ -> JobDetail+jobDetail pJobName_ pJobId_ pJobQueue_ pStatus_ pStartedAt_ pJobDefinition_ =+ JobDetail'+ { _jdStoppedAt = Nothing+ , _jdCreatedAt = Nothing+ , _jdRetryStrategy = Nothing+ , _jdAttempts = Nothing+ , _jdDependsOn = Nothing+ , _jdContainer = Nothing+ , _jdParameters = Nothing+ , _jdStatusReason = Nothing+ , _jdJobName = pJobName_+ , _jdJobId = pJobId_+ , _jdJobQueue = pJobQueue_+ , _jdStatus = pStatus_+ , _jdStartedAt = pStartedAt_+ , _jdJobDefinition = pJobDefinition_+ }+++-- | The Unix timestamp for when the job was stopped (when the task transitioned from the @RUNNING@ state to the @STOPPED@ state).+jdStoppedAt :: Lens' JobDetail (Maybe Integer)+jdStoppedAt = lens _jdStoppedAt (\ s a -> s{_jdStoppedAt = a});++-- | The Unix timestamp for when the job was created (when the task entered the @PENDING@ state).+jdCreatedAt :: Lens' JobDetail (Maybe Integer)+jdCreatedAt = lens _jdCreatedAt (\ s a -> s{_jdCreatedAt = a});++-- | The retry strategy to use for this job if an attempt fails.+jdRetryStrategy :: Lens' JobDetail (Maybe RetryStrategy)+jdRetryStrategy = lens _jdRetryStrategy (\ s a -> s{_jdRetryStrategy = a});++-- | A list of job attempts associated with this job.+jdAttempts :: Lens' JobDetail [AttemptDetail]+jdAttempts = lens _jdAttempts (\ s a -> s{_jdAttempts = a}) . _Default . _Coerce;++-- | A list of job names or IDs on which this job depends.+jdDependsOn :: Lens' JobDetail [JobDependency]+jdDependsOn = lens _jdDependsOn (\ s a -> s{_jdDependsOn = a}) . _Default . _Coerce;++-- | An object representing the details of the container that is associated with the job.+jdContainer :: Lens' JobDetail (Maybe ContainerDetail)+jdContainer = lens _jdContainer (\ s a -> s{_jdContainer = a});++-- | Additional parameters passed to the job that replace parameter substitution placeholders or override any corresponding parameter defaults from the job definition.+jdParameters :: Lens' JobDetail (HashMap Text Text)+jdParameters = lens _jdParameters (\ s a -> s{_jdParameters = a}) . _Default . _Map;++-- | A short, human-readable string to provide additional details about the current status of the job.+jdStatusReason :: Lens' JobDetail (Maybe Text)+jdStatusReason = lens _jdStatusReason (\ s a -> s{_jdStatusReason = a});++-- | The name of the job.+jdJobName :: Lens' JobDetail Text+jdJobName = lens _jdJobName (\ s a -> s{_jdJobName = a});++-- | The ID for the job.+jdJobId :: Lens' JobDetail Text+jdJobId = lens _jdJobId (\ s a -> s{_jdJobId = a});++-- | The Amazon Resource Name (ARN) of the job queue with which the job is associated.+jdJobQueue :: Lens' JobDetail Text+jdJobQueue = lens _jdJobQueue (\ s a -> s{_jdJobQueue = a});++-- | The current status for the job.+jdStatus :: Lens' JobDetail JobStatus+jdStatus = lens _jdStatus (\ s a -> s{_jdStatus = a});++-- | The Unix timestamp for when the job was started (when the task transitioned from the @PENDING@ state to the @RUNNING@ state).+jdStartedAt :: Lens' JobDetail Integer+jdStartedAt = lens _jdStartedAt (\ s a -> s{_jdStartedAt = a});++-- | The job definition that is used by this job.+jdJobDefinition :: Lens' JobDetail Text+jdJobDefinition = lens _jdJobDefinition (\ s a -> s{_jdJobDefinition = a});++instance FromJSON JobDetail where+ parseJSON+ = withObject "JobDetail"+ (\ x ->+ JobDetail' <$>+ (x .:? "stoppedAt") <*> (x .:? "createdAt") <*>+ (x .:? "retryStrategy")+ <*> (x .:? "attempts" .!= mempty)+ <*> (x .:? "dependsOn" .!= mempty)+ <*> (x .:? "container")+ <*> (x .:? "parameters" .!= mempty)+ <*> (x .:? "statusReason")+ <*> (x .: "jobName")+ <*> (x .: "jobId")+ <*> (x .: "jobQueue")+ <*> (x .: "status")+ <*> (x .: "startedAt")+ <*> (x .: "jobDefinition"))++instance Hashable JobDetail where++instance NFData JobDetail where++-- | An object representing the details of an AWS Batch job queue.+--+--+--+-- /See:/ 'jobQueueDetail' smart constructor.+data JobQueueDetail = JobQueueDetail'+ { _jqdStatus :: !(Maybe JQStatus)+ , _jqdStatusReason :: !(Maybe Text)+ , _jqdJobQueueName :: !Text+ , _jqdJobQueueARN :: !Text+ , _jqdState :: !JQState+ , _jqdPriority :: !Int+ , _jqdComputeEnvironmentOrder :: ![ComputeEnvironmentOrder]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'JobQueueDetail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jqdStatus' - The status of the job queue (for example, @CREATING@ or @VALID@ ).+--+-- * 'jqdStatusReason' - A short, human-readable string to provide additional details about the current status of the job queue.+--+-- * 'jqdJobQueueName' - The name of the job queue.+--+-- * 'jqdJobQueueARN' - The Amazon Resource Name (ARN) of the job queue.+--+-- * 'jqdState' - Describes the ability of the queue to accept new jobs.+--+-- * 'jqdPriority' - The priority of the job queue.+--+-- * 'jqdComputeEnvironmentOrder' - The compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.+jobQueueDetail+ :: Text -- ^ 'jqdJobQueueName'+ -> Text -- ^ 'jqdJobQueueARN'+ -> JQState -- ^ 'jqdState'+ -> Int -- ^ 'jqdPriority'+ -> JobQueueDetail+jobQueueDetail pJobQueueName_ pJobQueueARN_ pState_ pPriority_ =+ JobQueueDetail'+ { _jqdStatus = Nothing+ , _jqdStatusReason = Nothing+ , _jqdJobQueueName = pJobQueueName_+ , _jqdJobQueueARN = pJobQueueARN_+ , _jqdState = pState_+ , _jqdPriority = pPriority_+ , _jqdComputeEnvironmentOrder = mempty+ }+++-- | The status of the job queue (for example, @CREATING@ or @VALID@ ).+jqdStatus :: Lens' JobQueueDetail (Maybe JQStatus)+jqdStatus = lens _jqdStatus (\ s a -> s{_jqdStatus = a});++-- | A short, human-readable string to provide additional details about the current status of the job queue.+jqdStatusReason :: Lens' JobQueueDetail (Maybe Text)+jqdStatusReason = lens _jqdStatusReason (\ s a -> s{_jqdStatusReason = a});++-- | The name of the job queue.+jqdJobQueueName :: Lens' JobQueueDetail Text+jqdJobQueueName = lens _jqdJobQueueName (\ s a -> s{_jqdJobQueueName = a});++-- | The Amazon Resource Name (ARN) of the job queue.+jqdJobQueueARN :: Lens' JobQueueDetail Text+jqdJobQueueARN = lens _jqdJobQueueARN (\ s a -> s{_jqdJobQueueARN = a});++-- | Describes the ability of the queue to accept new jobs.+jqdState :: Lens' JobQueueDetail JQState+jqdState = lens _jqdState (\ s a -> s{_jqdState = a});++-- | The priority of the job queue.+jqdPriority :: Lens' JobQueueDetail Int+jqdPriority = lens _jqdPriority (\ s a -> s{_jqdPriority = a});++-- | The compute environments that are attached to the job queue and the order in which job placement is preferred. Compute environments are selected for job placement in ascending order.+jqdComputeEnvironmentOrder :: Lens' JobQueueDetail [ComputeEnvironmentOrder]+jqdComputeEnvironmentOrder = lens _jqdComputeEnvironmentOrder (\ s a -> s{_jqdComputeEnvironmentOrder = a}) . _Coerce;++instance FromJSON JobQueueDetail where+ parseJSON+ = withObject "JobQueueDetail"+ (\ x ->+ JobQueueDetail' <$>+ (x .:? "status") <*> (x .:? "statusReason") <*>+ (x .: "jobQueueName")+ <*> (x .: "jobQueueArn")+ <*> (x .: "state")+ <*> (x .: "priority")+ <*> (x .:? "computeEnvironmentOrder" .!= mempty))++instance Hashable JobQueueDetail where++instance NFData JobQueueDetail where++-- | An object representing summary details of a job.+--+--+--+-- /See:/ 'jobSummary' smart constructor.+data JobSummary = JobSummary'+ { _jsJobId :: !Text+ , _jsJobName :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'JobSummary' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'jsJobId' - The ID of the job.+--+-- * 'jsJobName' - The name of the job.+jobSummary+ :: Text -- ^ 'jsJobId'+ -> Text -- ^ 'jsJobName'+ -> JobSummary+jobSummary pJobId_ pJobName_ =+ JobSummary' {_jsJobId = pJobId_, _jsJobName = pJobName_}+++-- | The ID of the job.+jsJobId :: Lens' JobSummary Text+jsJobId = lens _jsJobId (\ s a -> s{_jsJobId = a});++-- | The name of the job.+jsJobName :: Lens' JobSummary Text+jsJobName = lens _jsJobName (\ s a -> s{_jsJobName = a});++instance FromJSON JobSummary where+ parseJSON+ = withObject "JobSummary"+ (\ x ->+ JobSummary' <$> (x .: "jobId") <*> (x .: "jobName"))++instance Hashable JobSummary where++instance NFData JobSummary where++-- | A key-value pair object.+--+--+--+-- /See:/ 'keyValuePair' smart constructor.+data KeyValuePair = KeyValuePair'+ { _kvpValue :: !(Maybe Text)+ , _kvpName :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'KeyValuePair' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'kvpValue' - The value of the key value pair. For environment variables, this is the value of the environment variable.+--+-- * 'kvpName' - The name of the key value pair. For environment variables, this is the name of the environment variable.+keyValuePair+ :: KeyValuePair+keyValuePair = KeyValuePair' {_kvpValue = Nothing, _kvpName = Nothing}+++-- | The value of the key value pair. For environment variables, this is the value of the environment variable.+kvpValue :: Lens' KeyValuePair (Maybe Text)+kvpValue = lens _kvpValue (\ s a -> s{_kvpValue = a});++-- | The name of the key value pair. For environment variables, this is the name of the environment variable.+kvpName :: Lens' KeyValuePair (Maybe Text)+kvpName = lens _kvpName (\ s a -> s{_kvpName = a});++instance FromJSON KeyValuePair where+ parseJSON+ = withObject "KeyValuePair"+ (\ x ->+ KeyValuePair' <$> (x .:? "value") <*> (x .:? "name"))++instance Hashable KeyValuePair where++instance NFData KeyValuePair where++instance ToJSON KeyValuePair where+ toJSON KeyValuePair'{..}+ = object+ (catMaybes+ [("value" .=) <$> _kvpValue,+ ("name" .=) <$> _kvpName])++-- | Details on a Docker volume mount point that is used in a job's container properties.+--+--+--+-- /See:/ 'mountPoint' smart constructor.+data MountPoint = MountPoint'+ { _mpContainerPath :: !(Maybe Text)+ , _mpSourceVolume :: !(Maybe Text)+ , _mpReadOnly :: !(Maybe Bool)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'MountPoint' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'mpContainerPath' - The path on the container at which to mount the host volume.+--+-- * 'mpSourceVolume' - The name of the volume to mount.+--+-- * 'mpReadOnly' - If this value is @true@ , the container has read-only access to the volume; otherwise, the container can write to the volume. The default value is @false@ .+mountPoint+ :: MountPoint+mountPoint =+ MountPoint'+ {_mpContainerPath = Nothing, _mpSourceVolume = Nothing, _mpReadOnly = Nothing}+++-- | The path on the container at which to mount the host volume.+mpContainerPath :: Lens' MountPoint (Maybe Text)+mpContainerPath = lens _mpContainerPath (\ s a -> s{_mpContainerPath = a});++-- | The name of the volume to mount.+mpSourceVolume :: Lens' MountPoint (Maybe Text)+mpSourceVolume = lens _mpSourceVolume (\ s a -> s{_mpSourceVolume = a});++-- | If this value is @true@ , the container has read-only access to the volume; otherwise, the container can write to the volume. The default value is @false@ .+mpReadOnly :: Lens' MountPoint (Maybe Bool)+mpReadOnly = lens _mpReadOnly (\ s a -> s{_mpReadOnly = a});++instance FromJSON MountPoint where+ parseJSON+ = withObject "MountPoint"+ (\ x ->+ MountPoint' <$>+ (x .:? "containerPath") <*> (x .:? "sourceVolume")+ <*> (x .:? "readOnly"))++instance Hashable MountPoint where++instance NFData MountPoint where++instance ToJSON MountPoint where+ toJSON MountPoint'{..}+ = object+ (catMaybes+ [("containerPath" .=) <$> _mpContainerPath,+ ("sourceVolume" .=) <$> _mpSourceVolume,+ ("readOnly" .=) <$> _mpReadOnly])++-- | The retry strategy associated with a job.+--+--+--+-- /See:/ 'retryStrategy' smart constructor.+newtype RetryStrategy = RetryStrategy'+ { _rsAttempts :: Maybe Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RetryStrategy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rsAttempts' - The number of times to move a job to the @RUNNABLE@ status. You may specify between 1 and 10 attempts. If @attempts@ is greater than one, the job is retried if it fails until it has moved to @RUNNABLE@ that many times.+retryStrategy+ :: RetryStrategy+retryStrategy = RetryStrategy' {_rsAttempts = Nothing}+++-- | The number of times to move a job to the @RUNNABLE@ status. You may specify between 1 and 10 attempts. If @attempts@ is greater than one, the job is retried if it fails until it has moved to @RUNNABLE@ that many times.+rsAttempts :: Lens' RetryStrategy (Maybe Int)+rsAttempts = lens _rsAttempts (\ s a -> s{_rsAttempts = a});++instance FromJSON RetryStrategy where+ parseJSON+ = withObject "RetryStrategy"+ (\ x -> RetryStrategy' <$> (x .:? "attempts"))++instance Hashable RetryStrategy where++instance NFData RetryStrategy where++instance ToJSON RetryStrategy where+ toJSON RetryStrategy'{..}+ = object+ (catMaybes [("attempts" .=) <$> _rsAttempts])++-- | The @ulimit@ settings to pass to the container.+--+--+--+-- /See:/ 'ulimit' smart constructor.+data Ulimit = Ulimit'+ { _uHardLimit :: !Int+ , _uName :: !Text+ , _uSoftLimit :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Ulimit' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uHardLimit' - The hard limit for the @ulimit@ type.+--+-- * 'uName' - The @type@ of the @ulimit@ .+--+-- * 'uSoftLimit' - The soft limit for the @ulimit@ type.+ulimit+ :: Int -- ^ 'uHardLimit'+ -> Text -- ^ 'uName'+ -> Int -- ^ 'uSoftLimit'+ -> Ulimit+ulimit pHardLimit_ pName_ pSoftLimit_ =+ Ulimit'+ {_uHardLimit = pHardLimit_, _uName = pName_, _uSoftLimit = pSoftLimit_}+++-- | The hard limit for the @ulimit@ type.+uHardLimit :: Lens' Ulimit Int+uHardLimit = lens _uHardLimit (\ s a -> s{_uHardLimit = a});++-- | The @type@ of the @ulimit@ .+uName :: Lens' Ulimit Text+uName = lens _uName (\ s a -> s{_uName = a});++-- | The soft limit for the @ulimit@ type.+uSoftLimit :: Lens' Ulimit Int+uSoftLimit = lens _uSoftLimit (\ s a -> s{_uSoftLimit = a});++instance FromJSON Ulimit where+ parseJSON+ = withObject "Ulimit"+ (\ x ->+ Ulimit' <$>+ (x .: "hardLimit") <*> (x .: "name") <*>+ (x .: "softLimit"))++instance Hashable Ulimit where++instance NFData Ulimit where++instance ToJSON Ulimit where+ toJSON Ulimit'{..}+ = object+ (catMaybes+ [Just ("hardLimit" .= _uHardLimit),+ Just ("name" .= _uName),+ Just ("softLimit" .= _uSoftLimit)])++-- | A data volume used in a job's container properties.+--+--+--+-- /See:/ 'volume' smart constructor.+data Volume = Volume'+ { _vName :: !(Maybe Text)+ , _vHost :: !(Maybe Host)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Volume' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'vName' - The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. This name is referenced in the @sourceVolume@ parameter of container definition @mountPoints@ .+--+-- * 'vHost' - The contents of the @host@ parameter determine whether your data volume persists on the host container instance and where it is stored. If the host parameter is empty, then the Docker daemon assigns a host path for your data volume, but the data is not guaranteed to persist after the containers associated with it stop running.+volume+ :: Volume+volume = Volume' {_vName = Nothing, _vHost = Nothing}+++-- | The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. This name is referenced in the @sourceVolume@ parameter of container definition @mountPoints@ .+vName :: Lens' Volume (Maybe Text)+vName = lens _vName (\ s a -> s{_vName = a});++-- | The contents of the @host@ parameter determine whether your data volume persists on the host container instance and where it is stored. If the host parameter is empty, then the Docker daemon assigns a host path for your data volume, but the data is not guaranteed to persist after the containers associated with it stop running.+vHost :: Lens' Volume (Maybe Host)+vHost = lens _vHost (\ s a -> s{_vHost = a});++instance FromJSON Volume where+ parseJSON+ = withObject "Volume"+ (\ x ->+ Volume' <$> (x .:? "name") <*> (x .:? "host"))++instance Hashable Volume where++instance NFData Volume where++instance ToJSON Volume where+ toJSON Volume'{..}+ = object+ (catMaybes+ [("name" .=) <$> _vName, ("host" .=) <$> _vHost])
+ gen/Network/AWS/Batch/Types/Sum.hs view
@@ -0,0 +1,287 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.Types.Sum+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.Batch.Types.Sum where++import Network.AWS.Prelude++data CEState+ = Disabled+ | Enabled+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText CEState where+ parser = takeLowerText >>= \case+ "disabled" -> pure Disabled+ "enabled" -> pure Enabled+ e -> fromTextError $ "Failure parsing CEState from value: '" <> e+ <> "'. Accepted values: disabled, enabled"++instance ToText CEState where+ toText = \case+ Disabled -> "DISABLED"+ Enabled -> "ENABLED"++instance Hashable CEState+instance NFData CEState+instance ToByteString CEState+instance ToQuery CEState+instance ToHeader CEState++instance ToJSON CEState where+ toJSON = toJSONText++instance FromJSON CEState where+ parseJSON = parseJSONText "CEState"++data CEStatus+ = CESCreating+ | CESDeleted+ | CESDeleting+ | CESInvalid+ | CESUpdating+ | CESValid+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText CEStatus where+ parser = takeLowerText >>= \case+ "creating" -> pure CESCreating+ "deleted" -> pure CESDeleted+ "deleting" -> pure CESDeleting+ "invalid" -> pure CESInvalid+ "updating" -> pure CESUpdating+ "valid" -> pure CESValid+ e -> fromTextError $ "Failure parsing CEStatus from value: '" <> e+ <> "'. Accepted values: creating, deleted, deleting, invalid, updating, valid"++instance ToText CEStatus where+ toText = \case+ CESCreating -> "CREATING"+ CESDeleted -> "DELETED"+ CESDeleting -> "DELETING"+ CESInvalid -> "INVALID"+ CESUpdating -> "UPDATING"+ CESValid -> "VALID"++instance Hashable CEStatus+instance NFData CEStatus+instance ToByteString CEStatus+instance ToQuery CEStatus+instance ToHeader CEStatus++instance FromJSON CEStatus where+ parseJSON = parseJSONText "CEStatus"++data CEType+ = Managed+ | Unmanaged+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText CEType where+ parser = takeLowerText >>= \case+ "managed" -> pure Managed+ "unmanaged" -> pure Unmanaged+ e -> fromTextError $ "Failure parsing CEType from value: '" <> e+ <> "'. Accepted values: managed, unmanaged"++instance ToText CEType where+ toText = \case+ Managed -> "MANAGED"+ Unmanaged -> "UNMANAGED"++instance Hashable CEType+instance NFData CEType+instance ToByteString CEType+instance ToQuery CEType+instance ToHeader CEType++instance ToJSON CEType where+ toJSON = toJSONText++instance FromJSON CEType where+ parseJSON = parseJSONText "CEType"++data CRType+ = EC2+ | Spot+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText CRType where+ parser = takeLowerText >>= \case+ "ec2" -> pure EC2+ "spot" -> pure Spot+ e -> fromTextError $ "Failure parsing CRType from value: '" <> e+ <> "'. Accepted values: ec2, spot"++instance ToText CRType where+ toText = \case+ EC2 -> "EC2"+ Spot -> "SPOT"++instance Hashable CRType+instance NFData CRType+instance ToByteString CRType+instance ToQuery CRType+instance ToHeader CRType++instance ToJSON CRType where+ toJSON = toJSONText++instance FromJSON CRType where+ parseJSON = parseJSONText "CRType"++data JQState+ = JQSDisabled+ | JQSEnabled+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText JQState where+ parser = takeLowerText >>= \case+ "disabled" -> pure JQSDisabled+ "enabled" -> pure JQSEnabled+ e -> fromTextError $ "Failure parsing JQState from value: '" <> e+ <> "'. Accepted values: disabled, enabled"++instance ToText JQState where+ toText = \case+ JQSDisabled -> "DISABLED"+ JQSEnabled -> "ENABLED"++instance Hashable JQState+instance NFData JQState+instance ToByteString JQState+instance ToQuery JQState+instance ToHeader JQState++instance ToJSON JQState where+ toJSON = toJSONText++instance FromJSON JQState where+ parseJSON = parseJSONText "JQState"++data JQStatus+ = Creating+ | Deleted+ | Deleting+ | Invalid+ | Updating+ | Valid+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText JQStatus where+ parser = takeLowerText >>= \case+ "creating" -> pure Creating+ "deleted" -> pure Deleted+ "deleting" -> pure Deleting+ "invalid" -> pure Invalid+ "updating" -> pure Updating+ "valid" -> pure Valid+ e -> fromTextError $ "Failure parsing JQStatus from value: '" <> e+ <> "'. Accepted values: creating, deleted, deleting, invalid, updating, valid"++instance ToText JQStatus where+ toText = \case+ Creating -> "CREATING"+ Deleted -> "DELETED"+ Deleting -> "DELETING"+ Invalid -> "INVALID"+ Updating -> "UPDATING"+ Valid -> "VALID"++instance Hashable JQStatus+instance NFData JQStatus+instance ToByteString JQStatus+instance ToQuery JQStatus+instance ToHeader JQStatus++instance FromJSON JQStatus where+ parseJSON = parseJSONText "JQStatus"++data JobDefinitionType =+ Container+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText JobDefinitionType where+ parser = takeLowerText >>= \case+ "container" -> pure Container+ e -> fromTextError $ "Failure parsing JobDefinitionType from value: '" <> e+ <> "'. Accepted values: container"++instance ToText JobDefinitionType where+ toText = \case+ Container -> "container"++instance Hashable JobDefinitionType+instance NFData JobDefinitionType+instance ToByteString JobDefinitionType+instance ToQuery JobDefinitionType+instance ToHeader JobDefinitionType++instance ToJSON JobDefinitionType where+ toJSON = toJSONText++data JobStatus+ = Failed+ | Pending+ | Runnable+ | Running+ | Starting+ | Submitted+ | Succeeded+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText JobStatus where+ parser = takeLowerText >>= \case+ "failed" -> pure Failed+ "pending" -> pure Pending+ "runnable" -> pure Runnable+ "running" -> pure Running+ "starting" -> pure Starting+ "submitted" -> pure Submitted+ "succeeded" -> pure Succeeded+ e -> fromTextError $ "Failure parsing JobStatus from value: '" <> e+ <> "'. Accepted values: failed, pending, runnable, running, starting, submitted, succeeded"++instance ToText JobStatus where+ toText = \case+ Failed -> "FAILED"+ Pending -> "PENDING"+ Runnable -> "RUNNABLE"+ Running -> "RUNNING"+ Starting -> "STARTING"+ Submitted -> "SUBMITTED"+ Succeeded -> "SUCCEEDED"++instance Hashable JobStatus+instance NFData JobStatus+instance ToByteString JobStatus+instance ToQuery JobStatus+instance ToHeader JobStatus++instance ToJSON JobStatus where+ toJSON = toJSONText++instance FromJSON JobStatus where+ parseJSON = parseJSONText "JobStatus"
+ gen/Network/AWS/Batch/UpdateComputeEnvironment.hs view
@@ -0,0 +1,179 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.UpdateComputeEnvironment+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates an AWS Batch compute environment.+--+--+module Network.AWS.Batch.UpdateComputeEnvironment+ (+ -- * Creating a Request+ updateComputeEnvironment+ , UpdateComputeEnvironment+ -- * Request Lenses+ , uceState+ , uceComputeResources+ , uceServiceRole+ , uceComputeEnvironment++ -- * Destructuring the Response+ , updateComputeEnvironmentResponse+ , UpdateComputeEnvironmentResponse+ -- * Response Lenses+ , ucersComputeEnvironmentName+ , ucersComputeEnvironmentARN+ , ucersResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'updateComputeEnvironment' smart constructor.+data UpdateComputeEnvironment = UpdateComputeEnvironment'+ { _uceState :: !(Maybe CEState)+ , _uceComputeResources :: !(Maybe ComputeResourceUpdate)+ , _uceServiceRole :: !(Maybe Text)+ , _uceComputeEnvironment :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateComputeEnvironment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uceState' - The state of the compute environment. Compute environments in the @ENABLED@ state can accept jobs from a queue and scale in or out automatically based on the workload demand of its associated queues.+--+-- * 'uceComputeResources' - Details of the compute resources managed by the compute environment. Required for a managed compute environment.+--+-- * 'uceServiceRole' - The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf. If your specified role has a path other than @/@ , then you must either specify the full role ARN (this is recommended) or prefix the role name with the path.+--+-- * 'uceComputeEnvironment' - The name or full Amazon Resource Name (ARN) of the compute environment to update.+updateComputeEnvironment+ :: Text -- ^ 'uceComputeEnvironment'+ -> UpdateComputeEnvironment+updateComputeEnvironment pComputeEnvironment_ =+ UpdateComputeEnvironment'+ { _uceState = Nothing+ , _uceComputeResources = Nothing+ , _uceServiceRole = Nothing+ , _uceComputeEnvironment = pComputeEnvironment_+ }+++-- | The state of the compute environment. Compute environments in the @ENABLED@ state can accept jobs from a queue and scale in or out automatically based on the workload demand of its associated queues.+uceState :: Lens' UpdateComputeEnvironment (Maybe CEState)+uceState = lens _uceState (\ s a -> s{_uceState = a});++-- | Details of the compute resources managed by the compute environment. Required for a managed compute environment.+uceComputeResources :: Lens' UpdateComputeEnvironment (Maybe ComputeResourceUpdate)+uceComputeResources = lens _uceComputeResources (\ s a -> s{_uceComputeResources = a});++-- | The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf. If your specified role has a path other than @/@ , then you must either specify the full role ARN (this is recommended) or prefix the role name with the path.+uceServiceRole :: Lens' UpdateComputeEnvironment (Maybe Text)+uceServiceRole = lens _uceServiceRole (\ s a -> s{_uceServiceRole = a});++-- | The name or full Amazon Resource Name (ARN) of the compute environment to update.+uceComputeEnvironment :: Lens' UpdateComputeEnvironment Text+uceComputeEnvironment = lens _uceComputeEnvironment (\ s a -> s{_uceComputeEnvironment = a});++instance AWSRequest UpdateComputeEnvironment where+ type Rs UpdateComputeEnvironment =+ UpdateComputeEnvironmentResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ UpdateComputeEnvironmentResponse' <$>+ (x .?> "computeEnvironmentName") <*>+ (x .?> "computeEnvironmentArn")+ <*> (pure (fromEnum s)))++instance Hashable UpdateComputeEnvironment where++instance NFData UpdateComputeEnvironment where++instance ToHeaders UpdateComputeEnvironment where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateComputeEnvironment where+ toJSON UpdateComputeEnvironment'{..}+ = object+ (catMaybes+ [("state" .=) <$> _uceState,+ ("computeResources" .=) <$> _uceComputeResources,+ ("serviceRole" .=) <$> _uceServiceRole,+ Just+ ("computeEnvironment" .= _uceComputeEnvironment)])++instance ToPath UpdateComputeEnvironment where+ toPath = const "/v1/updatecomputeenvironment"++instance ToQuery UpdateComputeEnvironment where+ toQuery = const mempty++-- | /See:/ 'updateComputeEnvironmentResponse' smart constructor.+data UpdateComputeEnvironmentResponse = UpdateComputeEnvironmentResponse'+ { _ucersComputeEnvironmentName :: !(Maybe Text)+ , _ucersComputeEnvironmentARN :: !(Maybe Text)+ , _ucersResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateComputeEnvironmentResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ucersComputeEnvironmentName' - The name of compute environment.+--+-- * 'ucersComputeEnvironmentARN' - The Amazon Resource Name (ARN) of the compute environment.+--+-- * 'ucersResponseStatus' - -- | The response status code.+updateComputeEnvironmentResponse+ :: Int -- ^ 'ucersResponseStatus'+ -> UpdateComputeEnvironmentResponse+updateComputeEnvironmentResponse pResponseStatus_ =+ UpdateComputeEnvironmentResponse'+ { _ucersComputeEnvironmentName = Nothing+ , _ucersComputeEnvironmentARN = Nothing+ , _ucersResponseStatus = pResponseStatus_+ }+++-- | The name of compute environment.+ucersComputeEnvironmentName :: Lens' UpdateComputeEnvironmentResponse (Maybe Text)+ucersComputeEnvironmentName = lens _ucersComputeEnvironmentName (\ s a -> s{_ucersComputeEnvironmentName = a});++-- | The Amazon Resource Name (ARN) of the compute environment.+ucersComputeEnvironmentARN :: Lens' UpdateComputeEnvironmentResponse (Maybe Text)+ucersComputeEnvironmentARN = lens _ucersComputeEnvironmentARN (\ s a -> s{_ucersComputeEnvironmentARN = a});++-- | -- | The response status code.+ucersResponseStatus :: Lens' UpdateComputeEnvironmentResponse Int+ucersResponseStatus = lens _ucersResponseStatus (\ s a -> s{_ucersResponseStatus = a});++instance NFData UpdateComputeEnvironmentResponse+ where
+ gen/Network/AWS/Batch/UpdateJobQueue.hs view
@@ -0,0 +1,176 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.UpdateJobQueue+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a job queue.+--+--+module Network.AWS.Batch.UpdateJobQueue+ (+ -- * Creating a Request+ updateJobQueue+ , UpdateJobQueue+ -- * Request Lenses+ , ujqState+ , ujqPriority+ , ujqComputeEnvironmentOrder+ , ujqJobQueue++ -- * Destructuring the Response+ , updateJobQueueResponse+ , UpdateJobQueueResponse+ -- * Response Lenses+ , ujqrsJobQueueARN+ , ujqrsJobQueueName+ , ujqrsResponseStatus+ ) where++import Network.AWS.Batch.Types+import Network.AWS.Batch.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'updateJobQueue' smart constructor.+data UpdateJobQueue = UpdateJobQueue'+ { _ujqState :: !(Maybe JQState)+ , _ujqPriority :: !(Maybe Int)+ , _ujqComputeEnvironmentOrder :: !(Maybe [ComputeEnvironmentOrder])+ , _ujqJobQueue :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateJobQueue' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ujqState' - Describes the queue's ability to accept new jobs.+--+-- * 'ujqPriority' - The priority of the job queue. Job queues with a higher priority (or a higher integer value for the @priority@ parameter) are evaluated first when associated with same compute environment. Priority is determined in descending order, for example, a job queue with a priority value of @10@ is given scheduling preference over a job queue with a priority value of @1@ .+--+-- * 'ujqComputeEnvironmentOrder' - Details the set of compute environments mapped to a job queue and their order relative to each other. This is one of the parameters used by the job scheduler to determine which compute environment should execute a given job.+--+-- * 'ujqJobQueue' - The name or the Amazon Resource Name (ARN) of the job queue.+updateJobQueue+ :: Text -- ^ 'ujqJobQueue'+ -> UpdateJobQueue+updateJobQueue pJobQueue_ =+ UpdateJobQueue'+ { _ujqState = Nothing+ , _ujqPriority = Nothing+ , _ujqComputeEnvironmentOrder = Nothing+ , _ujqJobQueue = pJobQueue_+ }+++-- | Describes the queue's ability to accept new jobs.+ujqState :: Lens' UpdateJobQueue (Maybe JQState)+ujqState = lens _ujqState (\ s a -> s{_ujqState = a});++-- | The priority of the job queue. Job queues with a higher priority (or a higher integer value for the @priority@ parameter) are evaluated first when associated with same compute environment. Priority is determined in descending order, for example, a job queue with a priority value of @10@ is given scheduling preference over a job queue with a priority value of @1@ .+ujqPriority :: Lens' UpdateJobQueue (Maybe Int)+ujqPriority = lens _ujqPriority (\ s a -> s{_ujqPriority = a});++-- | Details the set of compute environments mapped to a job queue and their order relative to each other. This is one of the parameters used by the job scheduler to determine which compute environment should execute a given job.+ujqComputeEnvironmentOrder :: Lens' UpdateJobQueue [ComputeEnvironmentOrder]+ujqComputeEnvironmentOrder = lens _ujqComputeEnvironmentOrder (\ s a -> s{_ujqComputeEnvironmentOrder = a}) . _Default . _Coerce;++-- | The name or the Amazon Resource Name (ARN) of the job queue.+ujqJobQueue :: Lens' UpdateJobQueue Text+ujqJobQueue = lens _ujqJobQueue (\ s a -> s{_ujqJobQueue = a});++instance AWSRequest UpdateJobQueue where+ type Rs UpdateJobQueue = UpdateJobQueueResponse+ request = postJSON batch+ response+ = receiveJSON+ (\ s h x ->+ UpdateJobQueueResponse' <$>+ (x .?> "jobQueueArn") <*> (x .?> "jobQueueName") <*>+ (pure (fromEnum s)))++instance Hashable UpdateJobQueue where++instance NFData UpdateJobQueue where++instance ToHeaders UpdateJobQueue where+ toHeaders+ = const+ (mconcat+ ["Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateJobQueue where+ toJSON UpdateJobQueue'{..}+ = object+ (catMaybes+ [("state" .=) <$> _ujqState,+ ("priority" .=) <$> _ujqPriority,+ ("computeEnvironmentOrder" .=) <$>+ _ujqComputeEnvironmentOrder,+ Just ("jobQueue" .= _ujqJobQueue)])++instance ToPath UpdateJobQueue where+ toPath = const "/v1/updatejobqueue"++instance ToQuery UpdateJobQueue where+ toQuery = const mempty++-- | /See:/ 'updateJobQueueResponse' smart constructor.+data UpdateJobQueueResponse = UpdateJobQueueResponse'+ { _ujqrsJobQueueARN :: !(Maybe Text)+ , _ujqrsJobQueueName :: !(Maybe Text)+ , _ujqrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateJobQueueResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ujqrsJobQueueARN' - The Amazon Resource Name (ARN) of the job queue.+--+-- * 'ujqrsJobQueueName' - The name of the job queue.+--+-- * 'ujqrsResponseStatus' - -- | The response status code.+updateJobQueueResponse+ :: Int -- ^ 'ujqrsResponseStatus'+ -> UpdateJobQueueResponse+updateJobQueueResponse pResponseStatus_ =+ UpdateJobQueueResponse'+ { _ujqrsJobQueueARN = Nothing+ , _ujqrsJobQueueName = Nothing+ , _ujqrsResponseStatus = pResponseStatus_+ }+++-- | The Amazon Resource Name (ARN) of the job queue.+ujqrsJobQueueARN :: Lens' UpdateJobQueueResponse (Maybe Text)+ujqrsJobQueueARN = lens _ujqrsJobQueueARN (\ s a -> s{_ujqrsJobQueueARN = a});++-- | The name of the job queue.+ujqrsJobQueueName :: Lens' UpdateJobQueueResponse (Maybe Text)+ujqrsJobQueueName = lens _ujqrsJobQueueName (\ s a -> s{_ujqrsJobQueueName = a});++-- | -- | The response status code.+ujqrsResponseStatus :: Lens' UpdateJobQueueResponse Int+ujqrsResponseStatus = lens _ujqrsResponseStatus (\ s a -> s{_ujqrsResponseStatus = a});++instance NFData UpdateJobQueueResponse where
+ gen/Network/AWS/Batch/Waiters.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Batch.Waiters+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.Batch.Waiters where++import Network.AWS.Batch.Types+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Waiter
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.Batch+import Test.AWS.Batch.Internal++main :: IO ()+main = defaultMain $ testGroup "Batch"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/Batch.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.AWS.Batch+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Batch+ ( tests+ , fixtures+ ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/Batch/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module : Test.AWS.Batch.Internal+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Batch.Internal where
+ test/Test/AWS/Gen/Batch.hs view
@@ -0,0 +1,327 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.AWS.Gen.Batch+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.Batch where++import Data.Proxy+import Network.AWS.Batch+import Test.AWS.Batch.Internal+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ requestCreateComputeEnvironment $+-- createComputeEnvironment+--+-- , requestRegisterJobDefinition $+-- registerJobDefinition+--+-- , requestSubmitJob $+-- submitJob+--+-- , requestListJobs $+-- listJobs+--+-- , requestTerminateJob $+-- terminateJob+--+-- , requestDescribeJobs $+-- describeJobs+--+-- , requestDeleteComputeEnvironment $+-- deleteComputeEnvironment+--+-- , requestUpdateComputeEnvironment $+-- updateComputeEnvironment+--+-- , requestDescribeJobDefinitions $+-- describeJobDefinitions+--+-- , requestUpdateJobQueue $+-- updateJobQueue+--+-- , requestDeleteJobQueue $+-- deleteJobQueue+--+-- , requestCreateJobQueue $+-- createJobQueue+--+-- , requestDeregisterJobDefinition $+-- deregisterJobDefinition+--+-- , requestDescribeJobQueues $+-- describeJobQueues+--+-- , requestDescribeComputeEnvironments $+-- describeComputeEnvironments+--+-- , requestCancelJob $+-- cancelJob+--+-- ]++-- , testGroup "response"+-- [ responseCreateComputeEnvironment $+-- createComputeEnvironmentResponse+--+-- , responseRegisterJobDefinition $+-- registerJobDefinitionResponse+--+-- , responseSubmitJob $+-- submitJobResponse+--+-- , responseListJobs $+-- listJobsResponse+--+-- , responseTerminateJob $+-- terminateJobResponse+--+-- , responseDescribeJobs $+-- describeJobsResponse+--+-- , responseDeleteComputeEnvironment $+-- deleteComputeEnvironmentResponse+--+-- , responseUpdateComputeEnvironment $+-- updateComputeEnvironmentResponse+--+-- , responseDescribeJobDefinitions $+-- describeJobDefinitionsResponse+--+-- , responseUpdateJobQueue $+-- updateJobQueueResponse+--+-- , responseDeleteJobQueue $+-- deleteJobQueueResponse+--+-- , responseCreateJobQueue $+-- createJobQueueResponse+--+-- , responseDeregisterJobDefinition $+-- deregisterJobDefinitionResponse+--+-- , responseDescribeJobQueues $+-- describeJobQueuesResponse+--+-- , responseDescribeComputeEnvironments $+-- describeComputeEnvironmentsResponse+--+-- , responseCancelJob $+-- cancelJobResponse+--+-- ]+-- ]++-- Requests++requestCreateComputeEnvironment :: CreateComputeEnvironment -> TestTree+requestCreateComputeEnvironment = req+ "CreateComputeEnvironment"+ "fixture/CreateComputeEnvironment.yaml"++requestRegisterJobDefinition :: RegisterJobDefinition -> TestTree+requestRegisterJobDefinition = req+ "RegisterJobDefinition"+ "fixture/RegisterJobDefinition.yaml"++requestSubmitJob :: SubmitJob -> TestTree+requestSubmitJob = req+ "SubmitJob"+ "fixture/SubmitJob.yaml"++requestListJobs :: ListJobs -> TestTree+requestListJobs = req+ "ListJobs"+ "fixture/ListJobs.yaml"++requestTerminateJob :: TerminateJob -> TestTree+requestTerminateJob = req+ "TerminateJob"+ "fixture/TerminateJob.yaml"++requestDescribeJobs :: DescribeJobs -> TestTree+requestDescribeJobs = req+ "DescribeJobs"+ "fixture/DescribeJobs.yaml"++requestDeleteComputeEnvironment :: DeleteComputeEnvironment -> TestTree+requestDeleteComputeEnvironment = req+ "DeleteComputeEnvironment"+ "fixture/DeleteComputeEnvironment.yaml"++requestUpdateComputeEnvironment :: UpdateComputeEnvironment -> TestTree+requestUpdateComputeEnvironment = req+ "UpdateComputeEnvironment"+ "fixture/UpdateComputeEnvironment.yaml"++requestDescribeJobDefinitions :: DescribeJobDefinitions -> TestTree+requestDescribeJobDefinitions = req+ "DescribeJobDefinitions"+ "fixture/DescribeJobDefinitions.yaml"++requestUpdateJobQueue :: UpdateJobQueue -> TestTree+requestUpdateJobQueue = req+ "UpdateJobQueue"+ "fixture/UpdateJobQueue.yaml"++requestDeleteJobQueue :: DeleteJobQueue -> TestTree+requestDeleteJobQueue = req+ "DeleteJobQueue"+ "fixture/DeleteJobQueue.yaml"++requestCreateJobQueue :: CreateJobQueue -> TestTree+requestCreateJobQueue = req+ "CreateJobQueue"+ "fixture/CreateJobQueue.yaml"++requestDeregisterJobDefinition :: DeregisterJobDefinition -> TestTree+requestDeregisterJobDefinition = req+ "DeregisterJobDefinition"+ "fixture/DeregisterJobDefinition.yaml"++requestDescribeJobQueues :: DescribeJobQueues -> TestTree+requestDescribeJobQueues = req+ "DescribeJobQueues"+ "fixture/DescribeJobQueues.yaml"++requestDescribeComputeEnvironments :: DescribeComputeEnvironments -> TestTree+requestDescribeComputeEnvironments = req+ "DescribeComputeEnvironments"+ "fixture/DescribeComputeEnvironments.yaml"++requestCancelJob :: CancelJob -> TestTree+requestCancelJob = req+ "CancelJob"+ "fixture/CancelJob.yaml"++-- Responses++responseCreateComputeEnvironment :: CreateComputeEnvironmentResponse -> TestTree+responseCreateComputeEnvironment = res+ "CreateComputeEnvironmentResponse"+ "fixture/CreateComputeEnvironmentResponse.proto"+ batch+ (Proxy :: Proxy CreateComputeEnvironment)++responseRegisterJobDefinition :: RegisterJobDefinitionResponse -> TestTree+responseRegisterJobDefinition = res+ "RegisterJobDefinitionResponse"+ "fixture/RegisterJobDefinitionResponse.proto"+ batch+ (Proxy :: Proxy RegisterJobDefinition)++responseSubmitJob :: SubmitJobResponse -> TestTree+responseSubmitJob = res+ "SubmitJobResponse"+ "fixture/SubmitJobResponse.proto"+ batch+ (Proxy :: Proxy SubmitJob)++responseListJobs :: ListJobsResponse -> TestTree+responseListJobs = res+ "ListJobsResponse"+ "fixture/ListJobsResponse.proto"+ batch+ (Proxy :: Proxy ListJobs)++responseTerminateJob :: TerminateJobResponse -> TestTree+responseTerminateJob = res+ "TerminateJobResponse"+ "fixture/TerminateJobResponse.proto"+ batch+ (Proxy :: Proxy TerminateJob)++responseDescribeJobs :: DescribeJobsResponse -> TestTree+responseDescribeJobs = res+ "DescribeJobsResponse"+ "fixture/DescribeJobsResponse.proto"+ batch+ (Proxy :: Proxy DescribeJobs)++responseDeleteComputeEnvironment :: DeleteComputeEnvironmentResponse -> TestTree+responseDeleteComputeEnvironment = res+ "DeleteComputeEnvironmentResponse"+ "fixture/DeleteComputeEnvironmentResponse.proto"+ batch+ (Proxy :: Proxy DeleteComputeEnvironment)++responseUpdateComputeEnvironment :: UpdateComputeEnvironmentResponse -> TestTree+responseUpdateComputeEnvironment = res+ "UpdateComputeEnvironmentResponse"+ "fixture/UpdateComputeEnvironmentResponse.proto"+ batch+ (Proxy :: Proxy UpdateComputeEnvironment)++responseDescribeJobDefinitions :: DescribeJobDefinitionsResponse -> TestTree+responseDescribeJobDefinitions = res+ "DescribeJobDefinitionsResponse"+ "fixture/DescribeJobDefinitionsResponse.proto"+ batch+ (Proxy :: Proxy DescribeJobDefinitions)++responseUpdateJobQueue :: UpdateJobQueueResponse -> TestTree+responseUpdateJobQueue = res+ "UpdateJobQueueResponse"+ "fixture/UpdateJobQueueResponse.proto"+ batch+ (Proxy :: Proxy UpdateJobQueue)++responseDeleteJobQueue :: DeleteJobQueueResponse -> TestTree+responseDeleteJobQueue = res+ "DeleteJobQueueResponse"+ "fixture/DeleteJobQueueResponse.proto"+ batch+ (Proxy :: Proxy DeleteJobQueue)++responseCreateJobQueue :: CreateJobQueueResponse -> TestTree+responseCreateJobQueue = res+ "CreateJobQueueResponse"+ "fixture/CreateJobQueueResponse.proto"+ batch+ (Proxy :: Proxy CreateJobQueue)++responseDeregisterJobDefinition :: DeregisterJobDefinitionResponse -> TestTree+responseDeregisterJobDefinition = res+ "DeregisterJobDefinitionResponse"+ "fixture/DeregisterJobDefinitionResponse.proto"+ batch+ (Proxy :: Proxy DeregisterJobDefinition)++responseDescribeJobQueues :: DescribeJobQueuesResponse -> TestTree+responseDescribeJobQueues = res+ "DescribeJobQueuesResponse"+ "fixture/DescribeJobQueuesResponse.proto"+ batch+ (Proxy :: Proxy DescribeJobQueues)++responseDescribeComputeEnvironments :: DescribeComputeEnvironmentsResponse -> TestTree+responseDescribeComputeEnvironments = res+ "DescribeComputeEnvironmentsResponse"+ "fixture/DescribeComputeEnvironmentsResponse.proto"+ batch+ (Proxy :: Proxy DescribeComputeEnvironments)++responseCancelJob :: CancelJobResponse -> TestTree+responseCancelJob = res+ "CancelJobResponse"+ "fixture/CancelJobResponse.proto"+ batch+ (Proxy :: Proxy CancelJob)