amazonka-athena (empty) → 1.5.0
raw patch · 47 files changed
+3951/−0 lines, 47 filesdep +amazonka-athenadep +amazonka-coredep +amazonka-testsetup-changed
Dependencies added: amazonka-athena, 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-athena.cabal +96/−0
- fixture/BatchGetNamedQuery.yaml +10/−0
- fixture/BatchGetNamedQueryResponse.proto +0/−0
- fixture/BatchGetQueryExecution.yaml +10/−0
- fixture/BatchGetQueryExecutionResponse.proto +0/−0
- fixture/CreateNamedQuery.yaml +10/−0
- fixture/CreateNamedQueryResponse.proto +0/−0
- fixture/DeleteNamedQuery.yaml +10/−0
- fixture/DeleteNamedQueryResponse.proto +0/−0
- fixture/GetNamedQuery.yaml +10/−0
- fixture/GetNamedQueryResponse.proto +0/−0
- fixture/GetQueryExecution.yaml +10/−0
- fixture/GetQueryExecutionResponse.proto +0/−0
- fixture/GetQueryResults.yaml +10/−0
- fixture/GetQueryResultsResponse.proto +0/−0
- fixture/ListNamedQueries.yaml +10/−0
- fixture/ListNamedQueriesResponse.proto +0/−0
- fixture/ListQueryExecutions.yaml +10/−0
- fixture/ListQueryExecutionsResponse.proto +0/−0
- fixture/StartQueryExecution.yaml +10/−0
- fixture/StartQueryExecutionResponse.proto +0/−0
- fixture/StopQueryExecution.yaml +10/−0
- fixture/StopQueryExecutionResponse.proto +0/−0
- gen/Network/AWS/Athena.hs +228/−0
- gen/Network/AWS/Athena/BatchGetNamedQuery.hs +147/−0
- gen/Network/AWS/Athena/BatchGetQueryExecution.hs +150/−0
- gen/Network/AWS/Athena/CreateNamedQuery.hs +180/−0
- gen/Network/AWS/Athena/DeleteNamedQuery.hs +125/−0
- gen/Network/AWS/Athena/GetNamedQuery.hs +133/−0
- gen/Network/AWS/Athena/GetQueryExecution.hs +133/−0
- gen/Network/AWS/Athena/GetQueryResults.hs +178/−0
- gen/Network/AWS/Athena/ListNamedQueries.hs +165/−0
- gen/Network/AWS/Athena/ListQueryExecutions.hs +166/−0
- gen/Network/AWS/Athena/StartQueryExecution.hs +171/−0
- gen/Network/AWS/Athena/StopQueryExecution.hs +126/−0
- gen/Network/AWS/Athena/Types.hs +194/−0
- gen/Network/AWS/Athena/Types/Product.hs +808/−0
- gen/Network/AWS/Athena/Types/Sum.hs +119/−0
- gen/Network/AWS/Athena/Waiters.hs +21/−0
- src/.gitkeep +0/−0
- test/Main.hs +21/−0
- test/Test/AWS/Athena.hs +20/−0
- test/Test/AWS/Athena/Internal.hs +9/−0
- test/Test/AWS/Gen/Athena.hs +237/−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 Athena 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-athena)+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.Athena](http://hackage.haskell.org/package/amazonka-athena/docs/Network-AWS-Athena.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-athena` 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-athena.cabal view
@@ -0,0 +1,96 @@+name: amazonka-athena+version: 1.5.0+synopsis: Amazon Athena 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.Athena" 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-athena++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.Athena+ , Network.AWS.Athena.BatchGetNamedQuery+ , Network.AWS.Athena.BatchGetQueryExecution+ , Network.AWS.Athena.CreateNamedQuery+ , Network.AWS.Athena.DeleteNamedQuery+ , Network.AWS.Athena.GetNamedQuery+ , Network.AWS.Athena.GetQueryExecution+ , Network.AWS.Athena.GetQueryResults+ , Network.AWS.Athena.ListNamedQueries+ , Network.AWS.Athena.ListQueryExecutions+ , Network.AWS.Athena.StartQueryExecution+ , Network.AWS.Athena.StopQueryExecution+ , Network.AWS.Athena.Types+ , Network.AWS.Athena.Waiters++ other-modules:+ Network.AWS.Athena.Types.Product+ , Network.AWS.Athena.Types.Sum++ build-depends:+ amazonka-core == 1.5.0.*+ , base >= 4.7 && < 5++test-suite amazonka-athena-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.Athena+ , Test.AWS.Gen.Athena+ , Test.AWS.Athena.Internal++ build-depends:+ amazonka-core == 1.5.0.*+ , amazonka-test == 1.5.0.*+ , amazonka-athena+ , base+ , bytestring+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/BatchGetNamedQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/BatchGetNamedQueryResponse.proto view
+ fixture/BatchGetQueryExecution.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/BatchGetQueryExecutionResponse.proto view
+ fixture/CreateNamedQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/CreateNamedQueryResponse.proto view
+ fixture/DeleteNamedQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/DeleteNamedQueryResponse.proto view
+ fixture/GetNamedQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/GetNamedQueryResponse.proto view
+ fixture/GetQueryExecution.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/GetQueryExecutionResponse.proto view
+ fixture/GetQueryResults.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/GetQueryResultsResponse.proto view
+ fixture/ListNamedQueries.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/ListNamedQueriesResponse.proto view
+ fixture/ListQueryExecutions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/ListQueryExecutionsResponse.proto view
+ fixture/StartQueryExecution.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/StartQueryExecutionResponse.proto view
+ fixture/StopQueryExecution.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/athena/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: athena.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/StopQueryExecutionResponse.proto view
+ gen/Network/AWS/Athena.hs view
@@ -0,0 +1,228 @@+{-# 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.Athena+-- 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)+--+-- Amazon Athena is an interactive query service that lets you use standard SQL to analyze data directly in Amazon S3. You can point Athena at your data in Amazon S3 and run ad-hoc queries and get results in seconds. Athena is serverless, so there is no infrastructure to set up or manage. You pay only for the queries you run. Athena scales automatically—executing queries in parallel—so results are fast, even with large datasets and complex queries. For more information, see <http://docs.aws.amazon.com/athena/latest/ug/what-is.html What is Amazon Athena> in the /Amazon Athena User Guide/ .+--+--+-- For code samples using the AWS SDK for Java, see <http://docs.aws.amazon.com/athena/latest/ug/code-samples.html Examples and Code Samples> in the /Amazon Athena User Guide/ .+--+module Network.AWS.Athena+ (+ -- * Service Configuration+ athena++ -- * Errors+ -- $errors++ -- ** InvalidRequestException+ , _InvalidRequestException++ -- ** TooManyRequestsException+ , _TooManyRequestsException++ -- ** InternalServerException+ , _InternalServerException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** GetNamedQuery+ , module Network.AWS.Athena.GetNamedQuery++ -- ** CreateNamedQuery+ , module Network.AWS.Athena.CreateNamedQuery++ -- ** ListNamedQueries (Paginated)+ , module Network.AWS.Athena.ListNamedQueries++ -- ** DeleteNamedQuery+ , module Network.AWS.Athena.DeleteNamedQuery++ -- ** StartQueryExecution+ , module Network.AWS.Athena.StartQueryExecution++ -- ** BatchGetNamedQuery+ , module Network.AWS.Athena.BatchGetNamedQuery++ -- ** GetQueryExecution+ , module Network.AWS.Athena.GetQueryExecution++ -- ** BatchGetQueryExecution+ , module Network.AWS.Athena.BatchGetQueryExecution++ -- ** StopQueryExecution+ , module Network.AWS.Athena.StopQueryExecution++ -- ** GetQueryResults (Paginated)+ , module Network.AWS.Athena.GetQueryResults++ -- ** ListQueryExecutions (Paginated)+ , module Network.AWS.Athena.ListQueryExecutions++ -- * Types++ -- ** ColumnNullable+ , ColumnNullable (..)++ -- ** EncryptionOption+ , EncryptionOption (..)++ -- ** QueryExecutionState+ , QueryExecutionState (..)++ -- ** ColumnInfo+ , ColumnInfo+ , columnInfo+ , ciScale+ , ciPrecision+ , ciSchemaName+ , ciCatalogName+ , ciCaseSensitive+ , ciLabel+ , ciTableName+ , ciNullable+ , ciName+ , ciType++ -- ** Datum+ , Datum+ , datum+ , dVarCharValue++ -- ** EncryptionConfiguration+ , EncryptionConfiguration+ , encryptionConfiguration+ , ecKMSKey+ , ecEncryptionOption++ -- ** NamedQuery+ , NamedQuery+ , namedQuery+ , nqNamedQueryId+ , nqDescription+ , nqName+ , nqDatabase+ , nqQueryString++ -- ** QueryExecution+ , QueryExecution+ , queryExecution+ , qeStatus+ , qeQueryExecutionContext+ , qeResultConfiguration+ , qeQuery+ , qeStatistics+ , qeQueryExecutionId++ -- ** QueryExecutionContext+ , QueryExecutionContext+ , queryExecutionContext+ , qecDatabase++ -- ** QueryExecutionStatistics+ , QueryExecutionStatistics+ , queryExecutionStatistics+ , qesEngineExecutionTimeInMillis+ , qesDataScannedInBytes++ -- ** QueryExecutionStatus+ , QueryExecutionStatus+ , queryExecutionStatus+ , qesState+ , qesStateChangeReason+ , qesSubmissionDateTime+ , qesCompletionDateTime++ -- ** ResultConfiguration+ , ResultConfiguration+ , resultConfiguration+ , rcEncryptionConfiguration+ , rcOutputLocation++ -- ** ResultSet+ , ResultSet+ , resultSet+ , rsRows+ , rsResultSetMetadata++ -- ** ResultSetMetadata+ , ResultSetMetadata+ , resultSetMetadata+ , rsmColumnInfo++ -- ** Row+ , Row+ , row+ , rowData++ -- ** UnprocessedNamedQueryId+ , UnprocessedNamedQueryId+ , unprocessedNamedQueryId+ , unqiNamedQueryId+ , unqiErrorCode+ , unqiErrorMessage++ -- ** UnprocessedQueryExecutionId+ , UnprocessedQueryExecutionId+ , unprocessedQueryExecutionId+ , uqeiErrorCode+ , uqeiQueryExecutionId+ , uqeiErrorMessage+ ) where++import Network.AWS.Athena.BatchGetNamedQuery+import Network.AWS.Athena.BatchGetQueryExecution+import Network.AWS.Athena.CreateNamedQuery+import Network.AWS.Athena.DeleteNamedQuery+import Network.AWS.Athena.GetNamedQuery+import Network.AWS.Athena.GetQueryExecution+import Network.AWS.Athena.GetQueryResults+import Network.AWS.Athena.ListNamedQueries+import Network.AWS.Athena.ListQueryExecutions+import Network.AWS.Athena.StartQueryExecution+import Network.AWS.Athena.StopQueryExecution+import Network.AWS.Athena.Types+import Network.AWS.Athena.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 'Athena'.+-}++{- $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/Athena/BatchGetNamedQuery.hs view
@@ -0,0 +1,147 @@+{-# 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.Athena.BatchGetNamedQuery+-- 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 the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings. Use 'ListNamedQueries' to get the list of named query IDs. If information could not be retrieved for a submitted query ID, information about the query ID submitted is listed under 'UnprocessedNamedQueryId' . Named queries are different from executed queries. Use 'BatchGetQueryExecution' to get details about each unique query execution, and 'ListQueryExecutions' to get a list of query execution IDs.+--+--+module Network.AWS.Athena.BatchGetNamedQuery+ (+ -- * Creating a Request+ batchGetNamedQuery+ , BatchGetNamedQuery+ -- * Request Lenses+ , bgnqNamedQueryIds++ -- * Destructuring the Response+ , batchGetNamedQueryResponse+ , BatchGetNamedQueryResponse+ -- * Response Lenses+ , bgnqrsNamedQueries+ , bgnqrsUnprocessedNamedQueryIds+ , bgnqrsResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'batchGetNamedQuery' smart constructor.+newtype BatchGetNamedQuery = BatchGetNamedQuery'+ { _bgnqNamedQueryIds :: List1 Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'BatchGetNamedQuery' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bgnqNamedQueryIds' - An array of query IDs.+batchGetNamedQuery+ :: NonEmpty Text -- ^ 'bgnqNamedQueryIds'+ -> BatchGetNamedQuery+batchGetNamedQuery pNamedQueryIds_ =+ BatchGetNamedQuery' {_bgnqNamedQueryIds = _List1 # pNamedQueryIds_}+++-- | An array of query IDs.+bgnqNamedQueryIds :: Lens' BatchGetNamedQuery (NonEmpty Text)+bgnqNamedQueryIds = lens _bgnqNamedQueryIds (\ s a -> s{_bgnqNamedQueryIds = a}) . _List1;++instance AWSRequest BatchGetNamedQuery where+ type Rs BatchGetNamedQuery =+ BatchGetNamedQueryResponse+ request = postJSON athena+ response+ = receiveJSON+ (\ s h x ->+ BatchGetNamedQueryResponse' <$>+ (x .?> "NamedQueries" .!@ mempty) <*>+ (x .?> "UnprocessedNamedQueryIds" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable BatchGetNamedQuery where++instance NFData BatchGetNamedQuery where++instance ToHeaders BatchGetNamedQuery where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.BatchGetNamedQuery" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON BatchGetNamedQuery where+ toJSON BatchGetNamedQuery'{..}+ = object+ (catMaybes+ [Just ("NamedQueryIds" .= _bgnqNamedQueryIds)])++instance ToPath BatchGetNamedQuery where+ toPath = const "/"++instance ToQuery BatchGetNamedQuery where+ toQuery = const mempty++-- | /See:/ 'batchGetNamedQueryResponse' smart constructor.+data BatchGetNamedQueryResponse = BatchGetNamedQueryResponse'+ { _bgnqrsNamedQueries :: !(Maybe [NamedQuery])+ , _bgnqrsUnprocessedNamedQueryIds :: !(Maybe [UnprocessedNamedQueryId])+ , _bgnqrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'BatchGetNamedQueryResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bgnqrsNamedQueries' - Information about the named query IDs submitted.+--+-- * 'bgnqrsUnprocessedNamedQueryIds' - Information about provided query IDs.+--+-- * 'bgnqrsResponseStatus' - -- | The response status code.+batchGetNamedQueryResponse+ :: Int -- ^ 'bgnqrsResponseStatus'+ -> BatchGetNamedQueryResponse+batchGetNamedQueryResponse pResponseStatus_ =+ BatchGetNamedQueryResponse'+ { _bgnqrsNamedQueries = Nothing+ , _bgnqrsUnprocessedNamedQueryIds = Nothing+ , _bgnqrsResponseStatus = pResponseStatus_+ }+++-- | Information about the named query IDs submitted.+bgnqrsNamedQueries :: Lens' BatchGetNamedQueryResponse [NamedQuery]+bgnqrsNamedQueries = lens _bgnqrsNamedQueries (\ s a -> s{_bgnqrsNamedQueries = a}) . _Default . _Coerce;++-- | Information about provided query IDs.+bgnqrsUnprocessedNamedQueryIds :: Lens' BatchGetNamedQueryResponse [UnprocessedNamedQueryId]+bgnqrsUnprocessedNamedQueryIds = lens _bgnqrsUnprocessedNamedQueryIds (\ s a -> s{_bgnqrsUnprocessedNamedQueryIds = a}) . _Default . _Coerce;++-- | -- | The response status code.+bgnqrsResponseStatus :: Lens' BatchGetNamedQueryResponse Int+bgnqrsResponseStatus = lens _bgnqrsResponseStatus (\ s a -> s{_bgnqrsResponseStatus = a});++instance NFData BatchGetNamedQueryResponse where
+ gen/Network/AWS/Athena/BatchGetQueryExecution.hs view
@@ -0,0 +1,150 @@+{-# 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.Athena.BatchGetQueryExecution+-- 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 the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. To get a list of query execution IDs, use 'ListQueryExecutions' . Query executions are different from named (saved) queries. Use 'BatchGetNamedQuery' to get details about named queries.+--+--+module Network.AWS.Athena.BatchGetQueryExecution+ (+ -- * Creating a Request+ batchGetQueryExecution+ , BatchGetQueryExecution+ -- * Request Lenses+ , bgqeQueryExecutionIds++ -- * Destructuring the Response+ , batchGetQueryExecutionResponse+ , BatchGetQueryExecutionResponse+ -- * Response Lenses+ , bgqersUnprocessedQueryExecutionIds+ , bgqersQueryExecutions+ , bgqersResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'batchGetQueryExecution' smart constructor.+newtype BatchGetQueryExecution = BatchGetQueryExecution'+ { _bgqeQueryExecutionIds :: List1 Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'BatchGetQueryExecution' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bgqeQueryExecutionIds' - An array of query execution IDs.+batchGetQueryExecution+ :: NonEmpty Text -- ^ 'bgqeQueryExecutionIds'+ -> BatchGetQueryExecution+batchGetQueryExecution pQueryExecutionIds_ =+ BatchGetQueryExecution'+ {_bgqeQueryExecutionIds = _List1 # pQueryExecutionIds_}+++-- | An array of query execution IDs.+bgqeQueryExecutionIds :: Lens' BatchGetQueryExecution (NonEmpty Text)+bgqeQueryExecutionIds = lens _bgqeQueryExecutionIds (\ s a -> s{_bgqeQueryExecutionIds = a}) . _List1;++instance AWSRequest BatchGetQueryExecution where+ type Rs BatchGetQueryExecution =+ BatchGetQueryExecutionResponse+ request = postJSON athena+ response+ = receiveJSON+ (\ s h x ->+ BatchGetQueryExecutionResponse' <$>+ (x .?> "UnprocessedQueryExecutionIds" .!@ mempty) <*>+ (x .?> "QueryExecutions" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable BatchGetQueryExecution where++instance NFData BatchGetQueryExecution where++instance ToHeaders BatchGetQueryExecution where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.BatchGetQueryExecution" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON BatchGetQueryExecution where+ toJSON BatchGetQueryExecution'{..}+ = object+ (catMaybes+ [Just+ ("QueryExecutionIds" .= _bgqeQueryExecutionIds)])++instance ToPath BatchGetQueryExecution where+ toPath = const "/"++instance ToQuery BatchGetQueryExecution where+ toQuery = const mempty++-- | /See:/ 'batchGetQueryExecutionResponse' smart constructor.+data BatchGetQueryExecutionResponse = BatchGetQueryExecutionResponse'+ { _bgqersUnprocessedQueryExecutionIds :: !(Maybe [UnprocessedQueryExecutionId])+ , _bgqersQueryExecutions :: !(Maybe [QueryExecution])+ , _bgqersResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'BatchGetQueryExecutionResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bgqersUnprocessedQueryExecutionIds' - Information about the query executions that failed to run.+--+-- * 'bgqersQueryExecutions' - Information about a query execution.+--+-- * 'bgqersResponseStatus' - -- | The response status code.+batchGetQueryExecutionResponse+ :: Int -- ^ 'bgqersResponseStatus'+ -> BatchGetQueryExecutionResponse+batchGetQueryExecutionResponse pResponseStatus_ =+ BatchGetQueryExecutionResponse'+ { _bgqersUnprocessedQueryExecutionIds = Nothing+ , _bgqersQueryExecutions = Nothing+ , _bgqersResponseStatus = pResponseStatus_+ }+++-- | Information about the query executions that failed to run.+bgqersUnprocessedQueryExecutionIds :: Lens' BatchGetQueryExecutionResponse [UnprocessedQueryExecutionId]+bgqersUnprocessedQueryExecutionIds = lens _bgqersUnprocessedQueryExecutionIds (\ s a -> s{_bgqersUnprocessedQueryExecutionIds = a}) . _Default . _Coerce;++-- | Information about a query execution.+bgqersQueryExecutions :: Lens' BatchGetQueryExecutionResponse [QueryExecution]+bgqersQueryExecutions = lens _bgqersQueryExecutions (\ s a -> s{_bgqersQueryExecutions = a}) . _Default . _Coerce;++-- | -- | The response status code.+bgqersResponseStatus :: Lens' BatchGetQueryExecutionResponse Int+bgqersResponseStatus = lens _bgqersResponseStatus (\ s a -> s{_bgqersResponseStatus = a});++instance NFData BatchGetQueryExecutionResponse where
+ gen/Network/AWS/Athena/CreateNamedQuery.hs view
@@ -0,0 +1,180 @@+{-# 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.Athena.CreateNamedQuery+-- 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 a named query.+--+--+-- For code samples using the AWS SDK for Java, see <http://docs.aws.amazon.com/athena/latest/ug/code-samples.html Examples and Code Samples> in the /Amazon Athena User Guide/ .+--+module Network.AWS.Athena.CreateNamedQuery+ (+ -- * Creating a Request+ createNamedQuery+ , CreateNamedQuery+ -- * Request Lenses+ , cnqClientRequestToken+ , cnqDescription+ , cnqName+ , cnqDatabase+ , cnqQueryString++ -- * Destructuring the Response+ , createNamedQueryResponse+ , CreateNamedQueryResponse+ -- * Response Lenses+ , cnqrsNamedQueryId+ , cnqrsResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createNamedQuery' smart constructor.+data CreateNamedQuery = CreateNamedQuery'+ { _cnqClientRequestToken :: !(Maybe Text)+ , _cnqDescription :: !(Maybe Text)+ , _cnqName :: !Text+ , _cnqDatabase :: !Text+ , _cnqQueryString :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateNamedQuery' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cnqClientRequestToken' - A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another @CreateNamedQuery@ request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the @QueryString@ , an error is returned. /Important:/ This token is listed as not required because AWS SDKs (for example the AWS SDK for Java) auto-generate the token for users. If you are not using the AWS SDK or the AWS CLI, you must provide this token or the action will fail.+--+-- * 'cnqDescription' - A brief explanation of the query.+--+-- * 'cnqName' - The plain language name for the query.+--+-- * 'cnqDatabase' - The database to which the query belongs.+--+-- * 'cnqQueryString' - The text of the query itself. In other words, all query statements.+createNamedQuery+ :: Text -- ^ 'cnqName'+ -> Text -- ^ 'cnqDatabase'+ -> Text -- ^ 'cnqQueryString'+ -> CreateNamedQuery+createNamedQuery pName_ pDatabase_ pQueryString_ =+ CreateNamedQuery'+ { _cnqClientRequestToken = Nothing+ , _cnqDescription = Nothing+ , _cnqName = pName_+ , _cnqDatabase = pDatabase_+ , _cnqQueryString = pQueryString_+ }+++-- | A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another @CreateNamedQuery@ request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the @QueryString@ , an error is returned. /Important:/ This token is listed as not required because AWS SDKs (for example the AWS SDK for Java) auto-generate the token for users. If you are not using the AWS SDK or the AWS CLI, you must provide this token or the action will fail.+cnqClientRequestToken :: Lens' CreateNamedQuery (Maybe Text)+cnqClientRequestToken = lens _cnqClientRequestToken (\ s a -> s{_cnqClientRequestToken = a});++-- | A brief explanation of the query.+cnqDescription :: Lens' CreateNamedQuery (Maybe Text)+cnqDescription = lens _cnqDescription (\ s a -> s{_cnqDescription = a});++-- | The plain language name for the query.+cnqName :: Lens' CreateNamedQuery Text+cnqName = lens _cnqName (\ s a -> s{_cnqName = a});++-- | The database to which the query belongs.+cnqDatabase :: Lens' CreateNamedQuery Text+cnqDatabase = lens _cnqDatabase (\ s a -> s{_cnqDatabase = a});++-- | The text of the query itself. In other words, all query statements.+cnqQueryString :: Lens' CreateNamedQuery Text+cnqQueryString = lens _cnqQueryString (\ s a -> s{_cnqQueryString = a});++instance AWSRequest CreateNamedQuery where+ type Rs CreateNamedQuery = CreateNamedQueryResponse+ request = postJSON athena+ response+ = receiveJSON+ (\ s h x ->+ CreateNamedQueryResponse' <$>+ (x .?> "NamedQueryId") <*> (pure (fromEnum s)))++instance Hashable CreateNamedQuery where++instance NFData CreateNamedQuery where++instance ToHeaders CreateNamedQuery where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.CreateNamedQuery" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateNamedQuery where+ toJSON CreateNamedQuery'{..}+ = object+ (catMaybes+ [("ClientRequestToken" .=) <$>+ _cnqClientRequestToken,+ ("Description" .=) <$> _cnqDescription,+ Just ("Name" .= _cnqName),+ Just ("Database" .= _cnqDatabase),+ Just ("QueryString" .= _cnqQueryString)])++instance ToPath CreateNamedQuery where+ toPath = const "/"++instance ToQuery CreateNamedQuery where+ toQuery = const mempty++-- | /See:/ 'createNamedQueryResponse' smart constructor.+data CreateNamedQueryResponse = CreateNamedQueryResponse'+ { _cnqrsNamedQueryId :: !(Maybe Text)+ , _cnqrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateNamedQueryResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cnqrsNamedQueryId' - The unique ID of the query.+--+-- * 'cnqrsResponseStatus' - -- | The response status code.+createNamedQueryResponse+ :: Int -- ^ 'cnqrsResponseStatus'+ -> CreateNamedQueryResponse+createNamedQueryResponse pResponseStatus_ =+ CreateNamedQueryResponse'+ {_cnqrsNamedQueryId = Nothing, _cnqrsResponseStatus = pResponseStatus_}+++-- | The unique ID of the query.+cnqrsNamedQueryId :: Lens' CreateNamedQueryResponse (Maybe Text)+cnqrsNamedQueryId = lens _cnqrsNamedQueryId (\ s a -> s{_cnqrsNamedQueryId = a});++-- | -- | The response status code.+cnqrsResponseStatus :: Lens' CreateNamedQueryResponse Int+cnqrsResponseStatus = lens _cnqrsResponseStatus (\ s a -> s{_cnqrsResponseStatus = a});++instance NFData CreateNamedQueryResponse where
+ gen/Network/AWS/Athena/DeleteNamedQuery.hs view
@@ -0,0 +1,125 @@+{-# 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.Athena.DeleteNamedQuery+-- 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 a named query.+--+--+-- For code samples using the AWS SDK for Java, see <http://docs.aws.amazon.com/athena/latest/ug/code-samples.html Examples and Code Samples> in the /Amazon Athena User Guide/ .+--+module Network.AWS.Athena.DeleteNamedQuery+ (+ -- * Creating a Request+ deleteNamedQuery+ , DeleteNamedQuery+ -- * Request Lenses+ , dnqNamedQueryId++ -- * Destructuring the Response+ , deleteNamedQueryResponse+ , DeleteNamedQueryResponse+ -- * Response Lenses+ , dnqrsResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteNamedQuery' smart constructor.+newtype DeleteNamedQuery = DeleteNamedQuery'+ { _dnqNamedQueryId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteNamedQuery' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dnqNamedQueryId' - The unique ID of the query to delete.+deleteNamedQuery+ :: Text -- ^ 'dnqNamedQueryId'+ -> DeleteNamedQuery+deleteNamedQuery pNamedQueryId_ =+ DeleteNamedQuery' {_dnqNamedQueryId = pNamedQueryId_}+++-- | The unique ID of the query to delete.+dnqNamedQueryId :: Lens' DeleteNamedQuery Text+dnqNamedQueryId = lens _dnqNamedQueryId (\ s a -> s{_dnqNamedQueryId = a});++instance AWSRequest DeleteNamedQuery where+ type Rs DeleteNamedQuery = DeleteNamedQueryResponse+ request = postJSON athena+ response+ = receiveEmpty+ (\ s h x ->+ DeleteNamedQueryResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteNamedQuery where++instance NFData DeleteNamedQuery where++instance ToHeaders DeleteNamedQuery where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.DeleteNamedQuery" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteNamedQuery where+ toJSON DeleteNamedQuery'{..}+ = object+ (catMaybes+ [Just ("NamedQueryId" .= _dnqNamedQueryId)])++instance ToPath DeleteNamedQuery where+ toPath = const "/"++instance ToQuery DeleteNamedQuery where+ toQuery = const mempty++-- | /See:/ 'deleteNamedQueryResponse' smart constructor.+newtype DeleteNamedQueryResponse = DeleteNamedQueryResponse'+ { _dnqrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteNamedQueryResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dnqrsResponseStatus' - -- | The response status code.+deleteNamedQueryResponse+ :: Int -- ^ 'dnqrsResponseStatus'+ -> DeleteNamedQueryResponse+deleteNamedQueryResponse pResponseStatus_ =+ DeleteNamedQueryResponse' {_dnqrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dnqrsResponseStatus :: Lens' DeleteNamedQueryResponse Int+dnqrsResponseStatus = lens _dnqrsResponseStatus (\ s a -> s{_dnqrsResponseStatus = a});++instance NFData DeleteNamedQueryResponse where
+ gen/Network/AWS/Athena/GetNamedQuery.hs view
@@ -0,0 +1,133 @@+{-# 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.Athena.GetNamedQuery+-- 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 information about a single query.+--+--+module Network.AWS.Athena.GetNamedQuery+ (+ -- * Creating a Request+ getNamedQuery+ , GetNamedQuery+ -- * Request Lenses+ , gnqNamedQueryId++ -- * Destructuring the Response+ , getNamedQueryResponse+ , GetNamedQueryResponse+ -- * Response Lenses+ , gnqrsNamedQuery+ , gnqrsResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getNamedQuery' smart constructor.+newtype GetNamedQuery = GetNamedQuery'+ { _gnqNamedQueryId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetNamedQuery' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gnqNamedQueryId' - The unique ID of the query. Use 'ListNamedQueries' to get query IDs.+getNamedQuery+ :: Text -- ^ 'gnqNamedQueryId'+ -> GetNamedQuery+getNamedQuery pNamedQueryId_ =+ GetNamedQuery' {_gnqNamedQueryId = pNamedQueryId_}+++-- | The unique ID of the query. Use 'ListNamedQueries' to get query IDs.+gnqNamedQueryId :: Lens' GetNamedQuery Text+gnqNamedQueryId = lens _gnqNamedQueryId (\ s a -> s{_gnqNamedQueryId = a});++instance AWSRequest GetNamedQuery where+ type Rs GetNamedQuery = GetNamedQueryResponse+ request = postJSON athena+ response+ = receiveJSON+ (\ s h x ->+ GetNamedQueryResponse' <$>+ (x .?> "NamedQuery") <*> (pure (fromEnum s)))++instance Hashable GetNamedQuery where++instance NFData GetNamedQuery where++instance ToHeaders GetNamedQuery where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.GetNamedQuery" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetNamedQuery where+ toJSON GetNamedQuery'{..}+ = object+ (catMaybes+ [Just ("NamedQueryId" .= _gnqNamedQueryId)])++instance ToPath GetNamedQuery where+ toPath = const "/"++instance ToQuery GetNamedQuery where+ toQuery = const mempty++-- | /See:/ 'getNamedQueryResponse' smart constructor.+data GetNamedQueryResponse = GetNamedQueryResponse'+ { _gnqrsNamedQuery :: !(Maybe NamedQuery)+ , _gnqrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetNamedQueryResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gnqrsNamedQuery' - Information about the query.+--+-- * 'gnqrsResponseStatus' - -- | The response status code.+getNamedQueryResponse+ :: Int -- ^ 'gnqrsResponseStatus'+ -> GetNamedQueryResponse+getNamedQueryResponse pResponseStatus_ =+ GetNamedQueryResponse'+ {_gnqrsNamedQuery = Nothing, _gnqrsResponseStatus = pResponseStatus_}+++-- | Information about the query.+gnqrsNamedQuery :: Lens' GetNamedQueryResponse (Maybe NamedQuery)+gnqrsNamedQuery = lens _gnqrsNamedQuery (\ s a -> s{_gnqrsNamedQuery = a});++-- | -- | The response status code.+gnqrsResponseStatus :: Lens' GetNamedQueryResponse Int+gnqrsResponseStatus = lens _gnqrsResponseStatus (\ s a -> s{_gnqrsResponseStatus = a});++instance NFData GetNamedQueryResponse where
+ gen/Network/AWS/Athena/GetQueryExecution.hs view
@@ -0,0 +1,133 @@+{-# 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.Athena.GetQueryExecution+-- 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 information about a single execution of a query. Each time a query executes, information about the query execution is saved with a unique ID.+--+--+module Network.AWS.Athena.GetQueryExecution+ (+ -- * Creating a Request+ getQueryExecution+ , GetQueryExecution+ -- * Request Lenses+ , gqeQueryExecutionId++ -- * Destructuring the Response+ , getQueryExecutionResponse+ , GetQueryExecutionResponse+ -- * Response Lenses+ , gqersQueryExecution+ , gqersResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getQueryExecution' smart constructor.+newtype GetQueryExecution = GetQueryExecution'+ { _gqeQueryExecutionId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetQueryExecution' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gqeQueryExecutionId' - The unique ID of the query execution.+getQueryExecution+ :: Text -- ^ 'gqeQueryExecutionId'+ -> GetQueryExecution+getQueryExecution pQueryExecutionId_ =+ GetQueryExecution' {_gqeQueryExecutionId = pQueryExecutionId_}+++-- | The unique ID of the query execution.+gqeQueryExecutionId :: Lens' GetQueryExecution Text+gqeQueryExecutionId = lens _gqeQueryExecutionId (\ s a -> s{_gqeQueryExecutionId = a});++instance AWSRequest GetQueryExecution where+ type Rs GetQueryExecution = GetQueryExecutionResponse+ request = postJSON athena+ response+ = receiveJSON+ (\ s h x ->+ GetQueryExecutionResponse' <$>+ (x .?> "QueryExecution") <*> (pure (fromEnum s)))++instance Hashable GetQueryExecution where++instance NFData GetQueryExecution where++instance ToHeaders GetQueryExecution where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.GetQueryExecution" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetQueryExecution where+ toJSON GetQueryExecution'{..}+ = object+ (catMaybes+ [Just ("QueryExecutionId" .= _gqeQueryExecutionId)])++instance ToPath GetQueryExecution where+ toPath = const "/"++instance ToQuery GetQueryExecution where+ toQuery = const mempty++-- | /See:/ 'getQueryExecutionResponse' smart constructor.+data GetQueryExecutionResponse = GetQueryExecutionResponse'+ { _gqersQueryExecution :: !(Maybe QueryExecution)+ , _gqersResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetQueryExecutionResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gqersQueryExecution' - Information about the query execution.+--+-- * 'gqersResponseStatus' - -- | The response status code.+getQueryExecutionResponse+ :: Int -- ^ 'gqersResponseStatus'+ -> GetQueryExecutionResponse+getQueryExecutionResponse pResponseStatus_ =+ GetQueryExecutionResponse'+ {_gqersQueryExecution = Nothing, _gqersResponseStatus = pResponseStatus_}+++-- | Information about the query execution.+gqersQueryExecution :: Lens' GetQueryExecutionResponse (Maybe QueryExecution)+gqersQueryExecution = lens _gqersQueryExecution (\ s a -> s{_gqersQueryExecution = a});++-- | -- | The response status code.+gqersResponseStatus :: Lens' GetQueryExecutionResponse Int+gqersResponseStatus = lens _gqersResponseStatus (\ s a -> s{_gqersResponseStatus = a});++instance NFData GetQueryExecutionResponse where
+ gen/Network/AWS/Athena/GetQueryResults.hs view
@@ -0,0 +1,178 @@+{-# 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.Athena.GetQueryResults+-- 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 the results of a single query execution specified by @QueryExecutionId@ . This request does not execute the query but returns results. Use 'StartQueryExecution' to run a query.+--+--+--+-- This operation returns paginated results.+module Network.AWS.Athena.GetQueryResults+ (+ -- * Creating a Request+ getQueryResults+ , GetQueryResults+ -- * Request Lenses+ , gqrNextToken+ , gqrMaxResults+ , gqrQueryExecutionId++ -- * Destructuring the Response+ , getQueryResultsResponse+ , GetQueryResultsResponse+ -- * Response Lenses+ , gqrrsNextToken+ , gqrrsResultSet+ , gqrrsResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getQueryResults' smart constructor.+data GetQueryResults = GetQueryResults'+ { _gqrNextToken :: !(Maybe Text)+ , _gqrMaxResults :: !(Maybe Nat)+ , _gqrQueryExecutionId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetQueryResults' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gqrNextToken' - The token that specifies where to start pagination if a previous request was truncated.+--+-- * 'gqrMaxResults' - The maximum number of results (rows) to return in this request.+--+-- * 'gqrQueryExecutionId' - The unique ID of the query execution.+getQueryResults+ :: Text -- ^ 'gqrQueryExecutionId'+ -> GetQueryResults+getQueryResults pQueryExecutionId_ =+ GetQueryResults'+ { _gqrNextToken = Nothing+ , _gqrMaxResults = Nothing+ , _gqrQueryExecutionId = pQueryExecutionId_+ }+++-- | The token that specifies where to start pagination if a previous request was truncated.+gqrNextToken :: Lens' GetQueryResults (Maybe Text)+gqrNextToken = lens _gqrNextToken (\ s a -> s{_gqrNextToken = a});++-- | The maximum number of results (rows) to return in this request.+gqrMaxResults :: Lens' GetQueryResults (Maybe Natural)+gqrMaxResults = lens _gqrMaxResults (\ s a -> s{_gqrMaxResults = a}) . mapping _Nat;++-- | The unique ID of the query execution.+gqrQueryExecutionId :: Lens' GetQueryResults Text+gqrQueryExecutionId = lens _gqrQueryExecutionId (\ s a -> s{_gqrQueryExecutionId = a});++instance AWSPager GetQueryResults where+ page rq rs+ | stop (rs ^. gqrrsNextToken) = Nothing+ | stop (rs ^? gqrrsResultSet . _Just . rsRows) =+ Nothing+ | otherwise =+ Just $ rq & gqrNextToken .~ rs ^. gqrrsNextToken++instance AWSRequest GetQueryResults where+ type Rs GetQueryResults = GetQueryResultsResponse+ request = postJSON athena+ response+ = receiveJSON+ (\ s h x ->+ GetQueryResultsResponse' <$>+ (x .?> "NextToken") <*> (x .?> "ResultSet") <*>+ (pure (fromEnum s)))++instance Hashable GetQueryResults where++instance NFData GetQueryResults where++instance ToHeaders GetQueryResults where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.GetQueryResults" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetQueryResults where+ toJSON GetQueryResults'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _gqrNextToken,+ ("MaxResults" .=) <$> _gqrMaxResults,+ Just ("QueryExecutionId" .= _gqrQueryExecutionId)])++instance ToPath GetQueryResults where+ toPath = const "/"++instance ToQuery GetQueryResults where+ toQuery = const mempty++-- | /See:/ 'getQueryResultsResponse' smart constructor.+data GetQueryResultsResponse = GetQueryResultsResponse'+ { _gqrrsNextToken :: !(Maybe Text)+ , _gqrrsResultSet :: !(Maybe ResultSet)+ , _gqrrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetQueryResultsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gqrrsNextToken' - A token to be used by the next request if this request is truncated.+--+-- * 'gqrrsResultSet' - The results of the query execution.+--+-- * 'gqrrsResponseStatus' - -- | The response status code.+getQueryResultsResponse+ :: Int -- ^ 'gqrrsResponseStatus'+ -> GetQueryResultsResponse+getQueryResultsResponse pResponseStatus_ =+ GetQueryResultsResponse'+ { _gqrrsNextToken = Nothing+ , _gqrrsResultSet = Nothing+ , _gqrrsResponseStatus = pResponseStatus_+ }+++-- | A token to be used by the next request if this request is truncated.+gqrrsNextToken :: Lens' GetQueryResultsResponse (Maybe Text)+gqrrsNextToken = lens _gqrrsNextToken (\ s a -> s{_gqrrsNextToken = a});++-- | The results of the query execution.+gqrrsResultSet :: Lens' GetQueryResultsResponse (Maybe ResultSet)+gqrrsResultSet = lens _gqrrsResultSet (\ s a -> s{_gqrrsResultSet = a});++-- | -- | The response status code.+gqrrsResponseStatus :: Lens' GetQueryResultsResponse Int+gqrrsResponseStatus = lens _gqrrsResponseStatus (\ s a -> s{_gqrrsResponseStatus = a});++instance NFData GetQueryResultsResponse where
+ gen/Network/AWS/Athena/ListNamedQueries.hs view
@@ -0,0 +1,165 @@+{-# 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.Athena.ListNamedQueries+-- 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)+--+-- Provides a list of all available query IDs.+--+--+-- For code samples using the AWS SDK for Java, see <http://docs.aws.amazon.com/athena/latest/ug/code-samples.html Examples and Code Samples> in the /Amazon Athena User Guide/ .+--+--+-- This operation returns paginated results.+module Network.AWS.Athena.ListNamedQueries+ (+ -- * Creating a Request+ listNamedQueries+ , ListNamedQueries+ -- * Request Lenses+ , lnqNextToken+ , lnqMaxResults++ -- * Destructuring the Response+ , listNamedQueriesResponse+ , ListNamedQueriesResponse+ -- * Response Lenses+ , lnqrsNextToken+ , lnqrsNamedQueryIds+ , lnqrsResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listNamedQueries' smart constructor.+data ListNamedQueries = ListNamedQueries'+ { _lnqNextToken :: !(Maybe Text)+ , _lnqMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListNamedQueries' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lnqNextToken' - The token that specifies where to start pagination if a previous request was truncated.+--+-- * 'lnqMaxResults' - The maximum number of queries to return in this request.+listNamedQueries+ :: ListNamedQueries+listNamedQueries =+ ListNamedQueries' {_lnqNextToken = Nothing, _lnqMaxResults = Nothing}+++-- | The token that specifies where to start pagination if a previous request was truncated.+lnqNextToken :: Lens' ListNamedQueries (Maybe Text)+lnqNextToken = lens _lnqNextToken (\ s a -> s{_lnqNextToken = a});++-- | The maximum number of queries to return in this request.+lnqMaxResults :: Lens' ListNamedQueries (Maybe Natural)+lnqMaxResults = lens _lnqMaxResults (\ s a -> s{_lnqMaxResults = a}) . mapping _Nat;++instance AWSPager ListNamedQueries where+ page rq rs+ | stop (rs ^. lnqrsNextToken) = Nothing+ | stop (rs ^. lnqrsNamedQueryIds) = Nothing+ | otherwise =+ Just $ rq & lnqNextToken .~ rs ^. lnqrsNextToken++instance AWSRequest ListNamedQueries where+ type Rs ListNamedQueries = ListNamedQueriesResponse+ request = postJSON athena+ response+ = receiveJSON+ (\ s h x ->+ ListNamedQueriesResponse' <$>+ (x .?> "NextToken") <*> (x .?> "NamedQueryIds") <*>+ (pure (fromEnum s)))++instance Hashable ListNamedQueries where++instance NFData ListNamedQueries where++instance ToHeaders ListNamedQueries where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.ListNamedQueries" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListNamedQueries where+ toJSON ListNamedQueries'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lnqNextToken,+ ("MaxResults" .=) <$> _lnqMaxResults])++instance ToPath ListNamedQueries where+ toPath = const "/"++instance ToQuery ListNamedQueries where+ toQuery = const mempty++-- | /See:/ 'listNamedQueriesResponse' smart constructor.+data ListNamedQueriesResponse = ListNamedQueriesResponse'+ { _lnqrsNextToken :: !(Maybe Text)+ , _lnqrsNamedQueryIds :: !(Maybe (List1 Text))+ , _lnqrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListNamedQueriesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lnqrsNextToken' - A token to be used by the next request if this request is truncated.+--+-- * 'lnqrsNamedQueryIds' - The list of unique query IDs.+--+-- * 'lnqrsResponseStatus' - -- | The response status code.+listNamedQueriesResponse+ :: Int -- ^ 'lnqrsResponseStatus'+ -> ListNamedQueriesResponse+listNamedQueriesResponse pResponseStatus_ =+ ListNamedQueriesResponse'+ { _lnqrsNextToken = Nothing+ , _lnqrsNamedQueryIds = Nothing+ , _lnqrsResponseStatus = pResponseStatus_+ }+++-- | A token to be used by the next request if this request is truncated.+lnqrsNextToken :: Lens' ListNamedQueriesResponse (Maybe Text)+lnqrsNextToken = lens _lnqrsNextToken (\ s a -> s{_lnqrsNextToken = a});++-- | The list of unique query IDs.+lnqrsNamedQueryIds :: Lens' ListNamedQueriesResponse (Maybe (NonEmpty Text))+lnqrsNamedQueryIds = lens _lnqrsNamedQueryIds (\ s a -> s{_lnqrsNamedQueryIds = a}) . mapping _List1;++-- | -- | The response status code.+lnqrsResponseStatus :: Lens' ListNamedQueriesResponse Int+lnqrsResponseStatus = lens _lnqrsResponseStatus (\ s a -> s{_lnqrsResponseStatus = a});++instance NFData ListNamedQueriesResponse where
+ gen/Network/AWS/Athena/ListQueryExecutions.hs view
@@ -0,0 +1,166 @@+{-# 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.Athena.ListQueryExecutions+-- 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)+--+-- Provides a list of all available query execution IDs.+--+--+-- For code samples using the AWS SDK for Java, see <http://docs.aws.amazon.com/athena/latest/ug/code-samples.html Examples and Code Samples> in the /Amazon Athena User Guide/ .+--+--+-- This operation returns paginated results.+module Network.AWS.Athena.ListQueryExecutions+ (+ -- * Creating a Request+ listQueryExecutions+ , ListQueryExecutions+ -- * Request Lenses+ , lqeNextToken+ , lqeMaxResults++ -- * Destructuring the Response+ , listQueryExecutionsResponse+ , ListQueryExecutionsResponse+ -- * Response Lenses+ , lqersQueryExecutionIds+ , lqersNextToken+ , lqersResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listQueryExecutions' smart constructor.+data ListQueryExecutions = ListQueryExecutions'+ { _lqeNextToken :: !(Maybe Text)+ , _lqeMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListQueryExecutions' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lqeNextToken' - The token that specifies where to start pagination if a previous request was truncated.+--+-- * 'lqeMaxResults' - The maximum number of query executions to return in this request.+listQueryExecutions+ :: ListQueryExecutions+listQueryExecutions =+ ListQueryExecutions' {_lqeNextToken = Nothing, _lqeMaxResults = Nothing}+++-- | The token that specifies where to start pagination if a previous request was truncated.+lqeNextToken :: Lens' ListQueryExecutions (Maybe Text)+lqeNextToken = lens _lqeNextToken (\ s a -> s{_lqeNextToken = a});++-- | The maximum number of query executions to return in this request.+lqeMaxResults :: Lens' ListQueryExecutions (Maybe Natural)+lqeMaxResults = lens _lqeMaxResults (\ s a -> s{_lqeMaxResults = a}) . mapping _Nat;++instance AWSPager ListQueryExecutions where+ page rq rs+ | stop (rs ^. lqersNextToken) = Nothing+ | stop (rs ^. lqersQueryExecutionIds) = Nothing+ | otherwise =+ Just $ rq & lqeNextToken .~ rs ^. lqersNextToken++instance AWSRequest ListQueryExecutions where+ type Rs ListQueryExecutions =+ ListQueryExecutionsResponse+ request = postJSON athena+ response+ = receiveJSON+ (\ s h x ->+ ListQueryExecutionsResponse' <$>+ (x .?> "QueryExecutionIds") <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListQueryExecutions where++instance NFData ListQueryExecutions where++instance ToHeaders ListQueryExecutions where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.ListQueryExecutions" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListQueryExecutions where+ toJSON ListQueryExecutions'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lqeNextToken,+ ("MaxResults" .=) <$> _lqeMaxResults])++instance ToPath ListQueryExecutions where+ toPath = const "/"++instance ToQuery ListQueryExecutions where+ toQuery = const mempty++-- | /See:/ 'listQueryExecutionsResponse' smart constructor.+data ListQueryExecutionsResponse = ListQueryExecutionsResponse'+ { _lqersQueryExecutionIds :: !(Maybe (List1 Text))+ , _lqersNextToken :: !(Maybe Text)+ , _lqersResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListQueryExecutionsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lqersQueryExecutionIds' - The unique IDs of each query execution as an array of strings.+--+-- * 'lqersNextToken' - A token to be used by the next request if this request is truncated.+--+-- * 'lqersResponseStatus' - -- | The response status code.+listQueryExecutionsResponse+ :: Int -- ^ 'lqersResponseStatus'+ -> ListQueryExecutionsResponse+listQueryExecutionsResponse pResponseStatus_ =+ ListQueryExecutionsResponse'+ { _lqersQueryExecutionIds = Nothing+ , _lqersNextToken = Nothing+ , _lqersResponseStatus = pResponseStatus_+ }+++-- | The unique IDs of each query execution as an array of strings.+lqersQueryExecutionIds :: Lens' ListQueryExecutionsResponse (Maybe (NonEmpty Text))+lqersQueryExecutionIds = lens _lqersQueryExecutionIds (\ s a -> s{_lqersQueryExecutionIds = a}) . mapping _List1;++-- | A token to be used by the next request if this request is truncated.+lqersNextToken :: Lens' ListQueryExecutionsResponse (Maybe Text)+lqersNextToken = lens _lqersNextToken (\ s a -> s{_lqersNextToken = a});++-- | -- | The response status code.+lqersResponseStatus :: Lens' ListQueryExecutionsResponse Int+lqersResponseStatus = lens _lqersResponseStatus (\ s a -> s{_lqersResponseStatus = a});++instance NFData ListQueryExecutionsResponse where
+ gen/Network/AWS/Athena/StartQueryExecution.hs view
@@ -0,0 +1,171 @@+{-# 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.Athena.StartQueryExecution+-- 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)+--+-- Runs (executes) the SQL query statements contained in the @Query@ string.+--+--+-- For code samples using the AWS SDK for Java, see <http://docs.aws.amazon.com/athena/latest/ug/code-samples.html Examples and Code Samples> in the /Amazon Athena User Guide/ .+--+module Network.AWS.Athena.StartQueryExecution+ (+ -- * Creating a Request+ startQueryExecution+ , StartQueryExecution+ -- * Request Lenses+ , sqeQueryExecutionContext+ , sqeClientRequestToken+ , sqeQueryString+ , sqeResultConfiguration++ -- * Destructuring the Response+ , startQueryExecutionResponse+ , StartQueryExecutionResponse+ -- * Response Lenses+ , sqersQueryExecutionId+ , sqersResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'startQueryExecution' smart constructor.+data StartQueryExecution = StartQueryExecution'+ { _sqeQueryExecutionContext :: !(Maybe QueryExecutionContext)+ , _sqeClientRequestToken :: !(Maybe Text)+ , _sqeQueryString :: !Text+ , _sqeResultConfiguration :: !ResultConfiguration+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'StartQueryExecution' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sqeQueryExecutionContext' - The database within which the query executes.+--+-- * 'sqeClientRequestToken' - A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another @StartQueryExecution@ request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the @QueryString@ , an error is returned. /Important:/ This token is listed as not required because AWS SDKs (for example the AWS SDK for Java) auto-generate the token for users. If you are not using the AWS SDK or the AWS CLI, you must provide this token or the action will fail.+--+-- * 'sqeQueryString' - The SQL query statements to be executed.+--+-- * 'sqeResultConfiguration' - Specifies information about where and how to save the results of the query execution.+startQueryExecution+ :: Text -- ^ 'sqeQueryString'+ -> ResultConfiguration -- ^ 'sqeResultConfiguration'+ -> StartQueryExecution+startQueryExecution pQueryString_ pResultConfiguration_ =+ StartQueryExecution'+ { _sqeQueryExecutionContext = Nothing+ , _sqeClientRequestToken = Nothing+ , _sqeQueryString = pQueryString_+ , _sqeResultConfiguration = pResultConfiguration_+ }+++-- | The database within which the query executes.+sqeQueryExecutionContext :: Lens' StartQueryExecution (Maybe QueryExecutionContext)+sqeQueryExecutionContext = lens _sqeQueryExecutionContext (\ s a -> s{_sqeQueryExecutionContext = a});++-- | A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another @StartQueryExecution@ request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the @QueryString@ , an error is returned. /Important:/ This token is listed as not required because AWS SDKs (for example the AWS SDK for Java) auto-generate the token for users. If you are not using the AWS SDK or the AWS CLI, you must provide this token or the action will fail.+sqeClientRequestToken :: Lens' StartQueryExecution (Maybe Text)+sqeClientRequestToken = lens _sqeClientRequestToken (\ s a -> s{_sqeClientRequestToken = a});++-- | The SQL query statements to be executed.+sqeQueryString :: Lens' StartQueryExecution Text+sqeQueryString = lens _sqeQueryString (\ s a -> s{_sqeQueryString = a});++-- | Specifies information about where and how to save the results of the query execution.+sqeResultConfiguration :: Lens' StartQueryExecution ResultConfiguration+sqeResultConfiguration = lens _sqeResultConfiguration (\ s a -> s{_sqeResultConfiguration = a});++instance AWSRequest StartQueryExecution where+ type Rs StartQueryExecution =+ StartQueryExecutionResponse+ request = postJSON athena+ response+ = receiveJSON+ (\ s h x ->+ StartQueryExecutionResponse' <$>+ (x .?> "QueryExecutionId") <*> (pure (fromEnum s)))++instance Hashable StartQueryExecution where++instance NFData StartQueryExecution where++instance ToHeaders StartQueryExecution where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.StartQueryExecution" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON StartQueryExecution where+ toJSON StartQueryExecution'{..}+ = object+ (catMaybes+ [("QueryExecutionContext" .=) <$>+ _sqeQueryExecutionContext,+ ("ClientRequestToken" .=) <$> _sqeClientRequestToken,+ Just ("QueryString" .= _sqeQueryString),+ Just+ ("ResultConfiguration" .= _sqeResultConfiguration)])++instance ToPath StartQueryExecution where+ toPath = const "/"++instance ToQuery StartQueryExecution where+ toQuery = const mempty++-- | /See:/ 'startQueryExecutionResponse' smart constructor.+data StartQueryExecutionResponse = StartQueryExecutionResponse'+ { _sqersQueryExecutionId :: !(Maybe Text)+ , _sqersResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'StartQueryExecutionResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sqersQueryExecutionId' - The unique ID of the query that ran as a result of this request.+--+-- * 'sqersResponseStatus' - -- | The response status code.+startQueryExecutionResponse+ :: Int -- ^ 'sqersResponseStatus'+ -> StartQueryExecutionResponse+startQueryExecutionResponse pResponseStatus_ =+ StartQueryExecutionResponse'+ {_sqersQueryExecutionId = Nothing, _sqersResponseStatus = pResponseStatus_}+++-- | The unique ID of the query that ran as a result of this request.+sqersQueryExecutionId :: Lens' StartQueryExecutionResponse (Maybe Text)+sqersQueryExecutionId = lens _sqersQueryExecutionId (\ s a -> s{_sqersQueryExecutionId = a});++-- | -- | The response status code.+sqersResponseStatus :: Lens' StartQueryExecutionResponse Int+sqersResponseStatus = lens _sqersResponseStatus (\ s a -> s{_sqersResponseStatus = a});++instance NFData StartQueryExecutionResponse where
+ gen/Network/AWS/Athena/StopQueryExecution.hs view
@@ -0,0 +1,126 @@+{-# 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.Athena.StopQueryExecution+-- 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)+--+-- Stops a query execution.+--+--+-- For code samples using the AWS SDK for Java, see <http://docs.aws.amazon.com/athena/latest/ug/code-samples.html Examples and Code Samples> in the /Amazon Athena User Guide/ .+--+module Network.AWS.Athena.StopQueryExecution+ (+ -- * Creating a Request+ stopQueryExecution+ , StopQueryExecution+ -- * Request Lenses+ , sqeQueryExecutionId++ -- * Destructuring the Response+ , stopQueryExecutionResponse+ , StopQueryExecutionResponse+ -- * Response Lenses+ , srsResponseStatus+ ) where++import Network.AWS.Athena.Types+import Network.AWS.Athena.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'stopQueryExecution' smart constructor.+newtype StopQueryExecution = StopQueryExecution'+ { _sqeQueryExecutionId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'StopQueryExecution' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sqeQueryExecutionId' - The unique ID of the query execution to stop.+stopQueryExecution+ :: Text -- ^ 'sqeQueryExecutionId'+ -> StopQueryExecution+stopQueryExecution pQueryExecutionId_ =+ StopQueryExecution' {_sqeQueryExecutionId = pQueryExecutionId_}+++-- | The unique ID of the query execution to stop.+sqeQueryExecutionId :: Lens' StopQueryExecution Text+sqeQueryExecutionId = lens _sqeQueryExecutionId (\ s a -> s{_sqeQueryExecutionId = a});++instance AWSRequest StopQueryExecution where+ type Rs StopQueryExecution =+ StopQueryExecutionResponse+ request = postJSON athena+ response+ = receiveEmpty+ (\ s h x ->+ StopQueryExecutionResponse' <$> (pure (fromEnum s)))++instance Hashable StopQueryExecution where++instance NFData StopQueryExecution where++instance ToHeaders StopQueryExecution where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AmazonAthena.StopQueryExecution" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON StopQueryExecution where+ toJSON StopQueryExecution'{..}+ = object+ (catMaybes+ [Just ("QueryExecutionId" .= _sqeQueryExecutionId)])++instance ToPath StopQueryExecution where+ toPath = const "/"++instance ToQuery StopQueryExecution where+ toQuery = const mempty++-- | /See:/ 'stopQueryExecutionResponse' smart constructor.+newtype StopQueryExecutionResponse = StopQueryExecutionResponse'+ { _srsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'StopQueryExecutionResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'srsResponseStatus' - -- | The response status code.+stopQueryExecutionResponse+ :: Int -- ^ 'srsResponseStatus'+ -> StopQueryExecutionResponse+stopQueryExecutionResponse pResponseStatus_ =+ StopQueryExecutionResponse' {_srsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+srsResponseStatus :: Lens' StopQueryExecutionResponse Int+srsResponseStatus = lens _srsResponseStatus (\ s a -> s{_srsResponseStatus = a});++instance NFData StopQueryExecutionResponse where
+ gen/Network/AWS/Athena/Types.hs view
@@ -0,0 +1,194 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Athena.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.Athena.Types+ (+ -- * Service Configuration+ athena++ -- * Errors+ , _InvalidRequestException+ , _TooManyRequestsException+ , _InternalServerException++ -- * ColumnNullable+ , ColumnNullable (..)++ -- * EncryptionOption+ , EncryptionOption (..)++ -- * QueryExecutionState+ , QueryExecutionState (..)++ -- * ColumnInfo+ , ColumnInfo+ , columnInfo+ , ciScale+ , ciPrecision+ , ciSchemaName+ , ciCatalogName+ , ciCaseSensitive+ , ciLabel+ , ciTableName+ , ciNullable+ , ciName+ , ciType++ -- * Datum+ , Datum+ , datum+ , dVarCharValue++ -- * EncryptionConfiguration+ , EncryptionConfiguration+ , encryptionConfiguration+ , ecKMSKey+ , ecEncryptionOption++ -- * NamedQuery+ , NamedQuery+ , namedQuery+ , nqNamedQueryId+ , nqDescription+ , nqName+ , nqDatabase+ , nqQueryString++ -- * QueryExecution+ , QueryExecution+ , queryExecution+ , qeStatus+ , qeQueryExecutionContext+ , qeResultConfiguration+ , qeQuery+ , qeStatistics+ , qeQueryExecutionId++ -- * QueryExecutionContext+ , QueryExecutionContext+ , queryExecutionContext+ , qecDatabase++ -- * QueryExecutionStatistics+ , QueryExecutionStatistics+ , queryExecutionStatistics+ , qesEngineExecutionTimeInMillis+ , qesDataScannedInBytes++ -- * QueryExecutionStatus+ , QueryExecutionStatus+ , queryExecutionStatus+ , qesState+ , qesStateChangeReason+ , qesSubmissionDateTime+ , qesCompletionDateTime++ -- * ResultConfiguration+ , ResultConfiguration+ , resultConfiguration+ , rcEncryptionConfiguration+ , rcOutputLocation++ -- * ResultSet+ , ResultSet+ , resultSet+ , rsRows+ , rsResultSetMetadata++ -- * ResultSetMetadata+ , ResultSetMetadata+ , resultSetMetadata+ , rsmColumnInfo++ -- * Row+ , Row+ , row+ , rowData++ -- * UnprocessedNamedQueryId+ , UnprocessedNamedQueryId+ , unprocessedNamedQueryId+ , unqiNamedQueryId+ , unqiErrorCode+ , unqiErrorMessage++ -- * UnprocessedQueryExecutionId+ , UnprocessedQueryExecutionId+ , unprocessedQueryExecutionId+ , uqeiErrorCode+ , uqeiQueryExecutionId+ , uqeiErrorMessage+ ) where++import Network.AWS.Athena.Types.Product+import Network.AWS.Athena.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Sign.V4++-- | API version @2017-05-18@ of the Amazon Athena SDK configuration.+athena :: Service+athena =+ Service+ { _svcAbbrev = "Athena"+ , _svcSigner = v4+ , _svcPrefix = "athena"+ , _svcVersion = "2017-05-18"+ , _svcEndpoint = defaultEndpoint athena+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "Athena"+ , _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+++-- | Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.+--+--+_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidRequestException = _MatchServiceError athena "InvalidRequestException"+++-- | Indicates that the request was throttled.+--+--+_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError+_TooManyRequestsException = _MatchServiceError athena "TooManyRequestsException"+++-- | Indicates a platform issue, which may be due to a transient condition or outage.+--+--+_InternalServerException :: AsError a => Getting (First ServiceError) a ServiceError+_InternalServerException = _MatchServiceError athena "InternalServerException"+
+ gen/Network/AWS/Athena/Types/Product.hs view
@@ -0,0 +1,808 @@+{-# 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.Athena.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.Athena.Types.Product where++import Network.AWS.Athena.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude++-- | Information about the columns in a query execution result.+--+--+--+-- /See:/ 'columnInfo' smart constructor.+data ColumnInfo = ColumnInfo'+ { _ciScale :: !(Maybe Int)+ , _ciPrecision :: !(Maybe Int)+ , _ciSchemaName :: !(Maybe Text)+ , _ciCatalogName :: !(Maybe Text)+ , _ciCaseSensitive :: !(Maybe Bool)+ , _ciLabel :: !(Maybe Text)+ , _ciTableName :: !(Maybe Text)+ , _ciNullable :: !(Maybe ColumnNullable)+ , _ciName :: !Text+ , _ciType :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ColumnInfo' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ciScale' - For @DECIMAL@ data types, specifies the total number of digits in the fractional part of the value. Defaults to 0.+--+-- * 'ciPrecision' - For @DECIMAL@ data types, specifies the total number of digits, up to 38. For performance reasons, we recommend up to 18 digits.+--+-- * 'ciSchemaName' - The schema name (database name) to which the query results belong.+--+-- * 'ciCatalogName' - The catalog to which the query results belong.+--+-- * 'ciCaseSensitive' - Indicates whether values in the column are case-sensitive.+--+-- * 'ciLabel' - A column label.+--+-- * 'ciTableName' - The table name for the query results.+--+-- * 'ciNullable' - Indicates the column's nullable status.+--+-- * 'ciName' - The name of the column.+--+-- * 'ciType' - The data type of the column.+columnInfo+ :: Text -- ^ 'ciName'+ -> Text -- ^ 'ciType'+ -> ColumnInfo+columnInfo pName_ pType_ =+ ColumnInfo'+ { _ciScale = Nothing+ , _ciPrecision = Nothing+ , _ciSchemaName = Nothing+ , _ciCatalogName = Nothing+ , _ciCaseSensitive = Nothing+ , _ciLabel = Nothing+ , _ciTableName = Nothing+ , _ciNullable = Nothing+ , _ciName = pName_+ , _ciType = pType_+ }+++-- | For @DECIMAL@ data types, specifies the total number of digits in the fractional part of the value. Defaults to 0.+ciScale :: Lens' ColumnInfo (Maybe Int)+ciScale = lens _ciScale (\ s a -> s{_ciScale = a});++-- | For @DECIMAL@ data types, specifies the total number of digits, up to 38. For performance reasons, we recommend up to 18 digits.+ciPrecision :: Lens' ColumnInfo (Maybe Int)+ciPrecision = lens _ciPrecision (\ s a -> s{_ciPrecision = a});++-- | The schema name (database name) to which the query results belong.+ciSchemaName :: Lens' ColumnInfo (Maybe Text)+ciSchemaName = lens _ciSchemaName (\ s a -> s{_ciSchemaName = a});++-- | The catalog to which the query results belong.+ciCatalogName :: Lens' ColumnInfo (Maybe Text)+ciCatalogName = lens _ciCatalogName (\ s a -> s{_ciCatalogName = a});++-- | Indicates whether values in the column are case-sensitive.+ciCaseSensitive :: Lens' ColumnInfo (Maybe Bool)+ciCaseSensitive = lens _ciCaseSensitive (\ s a -> s{_ciCaseSensitive = a});++-- | A column label.+ciLabel :: Lens' ColumnInfo (Maybe Text)+ciLabel = lens _ciLabel (\ s a -> s{_ciLabel = a});++-- | The table name for the query results.+ciTableName :: Lens' ColumnInfo (Maybe Text)+ciTableName = lens _ciTableName (\ s a -> s{_ciTableName = a});++-- | Indicates the column's nullable status.+ciNullable :: Lens' ColumnInfo (Maybe ColumnNullable)+ciNullable = lens _ciNullable (\ s a -> s{_ciNullable = a});++-- | The name of the column.+ciName :: Lens' ColumnInfo Text+ciName = lens _ciName (\ s a -> s{_ciName = a});++-- | The data type of the column.+ciType :: Lens' ColumnInfo Text+ciType = lens _ciType (\ s a -> s{_ciType = a});++instance FromJSON ColumnInfo where+ parseJSON+ = withObject "ColumnInfo"+ (\ x ->+ ColumnInfo' <$>+ (x .:? "Scale") <*> (x .:? "Precision") <*>+ (x .:? "SchemaName")+ <*> (x .:? "CatalogName")+ <*> (x .:? "CaseSensitive")+ <*> (x .:? "Label")+ <*> (x .:? "TableName")+ <*> (x .:? "Nullable")+ <*> (x .: "Name")+ <*> (x .: "Type"))++instance Hashable ColumnInfo where++instance NFData ColumnInfo where++-- | A piece of data (a field in the table).+--+--+--+-- /See:/ 'datum' smart constructor.+newtype Datum = Datum'+ { _dVarCharValue :: Maybe Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Datum' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dVarCharValue' - The value of the datum.+datum+ :: Datum+datum = Datum' {_dVarCharValue = Nothing}+++-- | The value of the datum.+dVarCharValue :: Lens' Datum (Maybe Text)+dVarCharValue = lens _dVarCharValue (\ s a -> s{_dVarCharValue = a});++instance FromJSON Datum where+ parseJSON+ = withObject "Datum"+ (\ x -> Datum' <$> (x .:? "VarCharValue"))++instance Hashable Datum where++instance NFData Datum where++-- | If query results are encrypted in Amazon S3, indicates the Amazon S3 encryption option used.+--+--+--+-- /See:/ 'encryptionConfiguration' smart constructor.+data EncryptionConfiguration = EncryptionConfiguration'+ { _ecKMSKey :: !(Maybe Text)+ , _ecEncryptionOption :: !EncryptionOption+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'EncryptionConfiguration' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ecKMSKey' - For @SSE-KMS@ and @CSE-KMS@ , this is the KMS key ARN or ID.+--+-- * 'ecEncryptionOption' - Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (@SSE-S3@ ), server-side encryption with KMS-managed keys (@SSE-KMS@ ), or client-side encryption with KMS-managed keys (CSE-KMS) is used.+encryptionConfiguration+ :: EncryptionOption -- ^ 'ecEncryptionOption'+ -> EncryptionConfiguration+encryptionConfiguration pEncryptionOption_ =+ EncryptionConfiguration'+ {_ecKMSKey = Nothing, _ecEncryptionOption = pEncryptionOption_}+++-- | For @SSE-KMS@ and @CSE-KMS@ , this is the KMS key ARN or ID.+ecKMSKey :: Lens' EncryptionConfiguration (Maybe Text)+ecKMSKey = lens _ecKMSKey (\ s a -> s{_ecKMSKey = a});++-- | Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (@SSE-S3@ ), server-side encryption with KMS-managed keys (@SSE-KMS@ ), or client-side encryption with KMS-managed keys (CSE-KMS) is used.+ecEncryptionOption :: Lens' EncryptionConfiguration EncryptionOption+ecEncryptionOption = lens _ecEncryptionOption (\ s a -> s{_ecEncryptionOption = a});++instance FromJSON EncryptionConfiguration where+ parseJSON+ = withObject "EncryptionConfiguration"+ (\ x ->+ EncryptionConfiguration' <$>+ (x .:? "KmsKey") <*> (x .: "EncryptionOption"))++instance Hashable EncryptionConfiguration where++instance NFData EncryptionConfiguration where++instance ToJSON EncryptionConfiguration where+ toJSON EncryptionConfiguration'{..}+ = object+ (catMaybes+ [("KmsKey" .=) <$> _ecKMSKey,+ Just ("EncryptionOption" .= _ecEncryptionOption)])++-- | A query, where @QueryString@ is the SQL query statements that comprise the query.+--+--+--+-- /See:/ 'namedQuery' smart constructor.+data NamedQuery = NamedQuery'+ { _nqNamedQueryId :: !(Maybe Text)+ , _nqDescription :: !(Maybe Text)+ , _nqName :: !Text+ , _nqDatabase :: !Text+ , _nqQueryString :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'NamedQuery' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'nqNamedQueryId' - The unique identifier of the query.+--+-- * 'nqDescription' - A brief description of the query.+--+-- * 'nqName' - The plain-language name of the query.+--+-- * 'nqDatabase' - The database to which the query belongs.+--+-- * 'nqQueryString' - The SQL query statements that comprise the query.+namedQuery+ :: Text -- ^ 'nqName'+ -> Text -- ^ 'nqDatabase'+ -> Text -- ^ 'nqQueryString'+ -> NamedQuery+namedQuery pName_ pDatabase_ pQueryString_ =+ NamedQuery'+ { _nqNamedQueryId = Nothing+ , _nqDescription = Nothing+ , _nqName = pName_+ , _nqDatabase = pDatabase_+ , _nqQueryString = pQueryString_+ }+++-- | The unique identifier of the query.+nqNamedQueryId :: Lens' NamedQuery (Maybe Text)+nqNamedQueryId = lens _nqNamedQueryId (\ s a -> s{_nqNamedQueryId = a});++-- | A brief description of the query.+nqDescription :: Lens' NamedQuery (Maybe Text)+nqDescription = lens _nqDescription (\ s a -> s{_nqDescription = a});++-- | The plain-language name of the query.+nqName :: Lens' NamedQuery Text+nqName = lens _nqName (\ s a -> s{_nqName = a});++-- | The database to which the query belongs.+nqDatabase :: Lens' NamedQuery Text+nqDatabase = lens _nqDatabase (\ s a -> s{_nqDatabase = a});++-- | The SQL query statements that comprise the query.+nqQueryString :: Lens' NamedQuery Text+nqQueryString = lens _nqQueryString (\ s a -> s{_nqQueryString = a});++instance FromJSON NamedQuery where+ parseJSON+ = withObject "NamedQuery"+ (\ x ->+ NamedQuery' <$>+ (x .:? "NamedQueryId") <*> (x .:? "Description") <*>+ (x .: "Name")+ <*> (x .: "Database")+ <*> (x .: "QueryString"))++instance Hashable NamedQuery where++instance NFData NamedQuery where++-- | Information about a single instance of a query execution.+--+--+--+-- /See:/ 'queryExecution' smart constructor.+data QueryExecution = QueryExecution'+ { _qeStatus :: !(Maybe QueryExecutionStatus)+ , _qeQueryExecutionContext :: !(Maybe QueryExecutionContext)+ , _qeResultConfiguration :: !(Maybe ResultConfiguration)+ , _qeQuery :: !(Maybe Text)+ , _qeStatistics :: !(Maybe QueryExecutionStatistics)+ , _qeQueryExecutionId :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'QueryExecution' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'qeStatus' - The completion date, current state, submission time, and state change reason (if applicable) for the query execution.+--+-- * 'qeQueryExecutionContext' - The database in which the query execution occurred.+--+-- * 'qeResultConfiguration' - The location in Amazon S3 where query results were stored and the encryption option, if any, used for query results.+--+-- * 'qeQuery' - The SQL query statements which the query execution ran.+--+-- * 'qeStatistics' - The amount of data scanned during the query execution and the amount of time that it took to execute.+--+-- * 'qeQueryExecutionId' - The unique identifier for each query execution.+queryExecution+ :: QueryExecution+queryExecution =+ QueryExecution'+ { _qeStatus = Nothing+ , _qeQueryExecutionContext = Nothing+ , _qeResultConfiguration = Nothing+ , _qeQuery = Nothing+ , _qeStatistics = Nothing+ , _qeQueryExecutionId = Nothing+ }+++-- | The completion date, current state, submission time, and state change reason (if applicable) for the query execution.+qeStatus :: Lens' QueryExecution (Maybe QueryExecutionStatus)+qeStatus = lens _qeStatus (\ s a -> s{_qeStatus = a});++-- | The database in which the query execution occurred.+qeQueryExecutionContext :: Lens' QueryExecution (Maybe QueryExecutionContext)+qeQueryExecutionContext = lens _qeQueryExecutionContext (\ s a -> s{_qeQueryExecutionContext = a});++-- | The location in Amazon S3 where query results were stored and the encryption option, if any, used for query results.+qeResultConfiguration :: Lens' QueryExecution (Maybe ResultConfiguration)+qeResultConfiguration = lens _qeResultConfiguration (\ s a -> s{_qeResultConfiguration = a});++-- | The SQL query statements which the query execution ran.+qeQuery :: Lens' QueryExecution (Maybe Text)+qeQuery = lens _qeQuery (\ s a -> s{_qeQuery = a});++-- | The amount of data scanned during the query execution and the amount of time that it took to execute.+qeStatistics :: Lens' QueryExecution (Maybe QueryExecutionStatistics)+qeStatistics = lens _qeStatistics (\ s a -> s{_qeStatistics = a});++-- | The unique identifier for each query execution.+qeQueryExecutionId :: Lens' QueryExecution (Maybe Text)+qeQueryExecutionId = lens _qeQueryExecutionId (\ s a -> s{_qeQueryExecutionId = a});++instance FromJSON QueryExecution where+ parseJSON+ = withObject "QueryExecution"+ (\ x ->+ QueryExecution' <$>+ (x .:? "Status") <*> (x .:? "QueryExecutionContext")+ <*> (x .:? "ResultConfiguration")+ <*> (x .:? "Query")+ <*> (x .:? "Statistics")+ <*> (x .:? "QueryExecutionId"))++instance Hashable QueryExecution where++instance NFData QueryExecution where++-- | The database in which the query execution occurs.+--+--+--+-- /See:/ 'queryExecutionContext' smart constructor.+newtype QueryExecutionContext = QueryExecutionContext'+ { _qecDatabase :: Maybe Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'QueryExecutionContext' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'qecDatabase' - The name of the database.+queryExecutionContext+ :: QueryExecutionContext+queryExecutionContext = QueryExecutionContext' {_qecDatabase = Nothing}+++-- | The name of the database.+qecDatabase :: Lens' QueryExecutionContext (Maybe Text)+qecDatabase = lens _qecDatabase (\ s a -> s{_qecDatabase = a});++instance FromJSON QueryExecutionContext where+ parseJSON+ = withObject "QueryExecutionContext"+ (\ x ->+ QueryExecutionContext' <$> (x .:? "Database"))++instance Hashable QueryExecutionContext where++instance NFData QueryExecutionContext where++instance ToJSON QueryExecutionContext where+ toJSON QueryExecutionContext'{..}+ = object+ (catMaybes [("Database" .=) <$> _qecDatabase])++-- | The amount of data scanned during the query execution and the amount of time that it took to execute.+--+--+--+-- /See:/ 'queryExecutionStatistics' smart constructor.+data QueryExecutionStatistics = QueryExecutionStatistics'+ { _qesEngineExecutionTimeInMillis :: !(Maybe Integer)+ , _qesDataScannedInBytes :: !(Maybe Integer)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'QueryExecutionStatistics' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'qesEngineExecutionTimeInMillis' - The number of milliseconds that the query took to execute.+--+-- * 'qesDataScannedInBytes' - The number of bytes in the data that was queried.+queryExecutionStatistics+ :: QueryExecutionStatistics+queryExecutionStatistics =+ QueryExecutionStatistics'+ {_qesEngineExecutionTimeInMillis = Nothing, _qesDataScannedInBytes = Nothing}+++-- | The number of milliseconds that the query took to execute.+qesEngineExecutionTimeInMillis :: Lens' QueryExecutionStatistics (Maybe Integer)+qesEngineExecutionTimeInMillis = lens _qesEngineExecutionTimeInMillis (\ s a -> s{_qesEngineExecutionTimeInMillis = a});++-- | The number of bytes in the data that was queried.+qesDataScannedInBytes :: Lens' QueryExecutionStatistics (Maybe Integer)+qesDataScannedInBytes = lens _qesDataScannedInBytes (\ s a -> s{_qesDataScannedInBytes = a});++instance FromJSON QueryExecutionStatistics where+ parseJSON+ = withObject "QueryExecutionStatistics"+ (\ x ->+ QueryExecutionStatistics' <$>+ (x .:? "EngineExecutionTimeInMillis") <*>+ (x .:? "DataScannedInBytes"))++instance Hashable QueryExecutionStatistics where++instance NFData QueryExecutionStatistics where++-- | The completion date, current state, submission time, and state change reason (if applicable) for the query execution.+--+--+--+-- /See:/ 'queryExecutionStatus' smart constructor.+data QueryExecutionStatus = QueryExecutionStatus'+ { _qesState :: !(Maybe QueryExecutionState)+ , _qesStateChangeReason :: !(Maybe Text)+ , _qesSubmissionDateTime :: !(Maybe POSIX)+ , _qesCompletionDateTime :: !(Maybe POSIX)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'QueryExecutionStatus' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'qesState' - The state of query execution. @SUBMITTED@ indicates that the query is queued for execution. @RUNNING@ indicates that the query is scanning data and returning results. @SUCCEEDED@ indicates that the query completed without error. @FAILED@ indicates that the query experienced an error and did not complete processing. @CANCELLED@ indicates that user input interrupted query execution.+--+-- * 'qesStateChangeReason' - Further detail about the status of the query.+--+-- * 'qesSubmissionDateTime' - The date and time that the query was submitted.+--+-- * 'qesCompletionDateTime' - The date and time that the query completed.+queryExecutionStatus+ :: QueryExecutionStatus+queryExecutionStatus =+ QueryExecutionStatus'+ { _qesState = Nothing+ , _qesStateChangeReason = Nothing+ , _qesSubmissionDateTime = Nothing+ , _qesCompletionDateTime = Nothing+ }+++-- | The state of query execution. @SUBMITTED@ indicates that the query is queued for execution. @RUNNING@ indicates that the query is scanning data and returning results. @SUCCEEDED@ indicates that the query completed without error. @FAILED@ indicates that the query experienced an error and did not complete processing. @CANCELLED@ indicates that user input interrupted query execution.+qesState :: Lens' QueryExecutionStatus (Maybe QueryExecutionState)+qesState = lens _qesState (\ s a -> s{_qesState = a});++-- | Further detail about the status of the query.+qesStateChangeReason :: Lens' QueryExecutionStatus (Maybe Text)+qesStateChangeReason = lens _qesStateChangeReason (\ s a -> s{_qesStateChangeReason = a});++-- | The date and time that the query was submitted.+qesSubmissionDateTime :: Lens' QueryExecutionStatus (Maybe UTCTime)+qesSubmissionDateTime = lens _qesSubmissionDateTime (\ s a -> s{_qesSubmissionDateTime = a}) . mapping _Time;++-- | The date and time that the query completed.+qesCompletionDateTime :: Lens' QueryExecutionStatus (Maybe UTCTime)+qesCompletionDateTime = lens _qesCompletionDateTime (\ s a -> s{_qesCompletionDateTime = a}) . mapping _Time;++instance FromJSON QueryExecutionStatus where+ parseJSON+ = withObject "QueryExecutionStatus"+ (\ x ->+ QueryExecutionStatus' <$>+ (x .:? "State") <*> (x .:? "StateChangeReason") <*>+ (x .:? "SubmissionDateTime")+ <*> (x .:? "CompletionDateTime"))++instance Hashable QueryExecutionStatus where++instance NFData QueryExecutionStatus where++-- | The location in Amazon S3 where query results are stored and the encryption option, if any, used for query results.+--+--+--+-- /See:/ 'resultConfiguration' smart constructor.+data ResultConfiguration = ResultConfiguration'+ { _rcEncryptionConfiguration :: !(Maybe EncryptionConfiguration)+ , _rcOutputLocation :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ResultConfiguration' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rcEncryptionConfiguration' - If query results are encrypted in S3, indicates the S3 encryption option used (for example, @SSE-KMS@ or @CSE-KMS@ and key information.+--+-- * 'rcOutputLocation' - The location in S3 where query results are stored.+resultConfiguration+ :: Text -- ^ 'rcOutputLocation'+ -> ResultConfiguration+resultConfiguration pOutputLocation_ =+ ResultConfiguration'+ {_rcEncryptionConfiguration = Nothing, _rcOutputLocation = pOutputLocation_}+++-- | If query results are encrypted in S3, indicates the S3 encryption option used (for example, @SSE-KMS@ or @CSE-KMS@ and key information.+rcEncryptionConfiguration :: Lens' ResultConfiguration (Maybe EncryptionConfiguration)+rcEncryptionConfiguration = lens _rcEncryptionConfiguration (\ s a -> s{_rcEncryptionConfiguration = a});++-- | The location in S3 where query results are stored.+rcOutputLocation :: Lens' ResultConfiguration Text+rcOutputLocation = lens _rcOutputLocation (\ s a -> s{_rcOutputLocation = a});++instance FromJSON ResultConfiguration where+ parseJSON+ = withObject "ResultConfiguration"+ (\ x ->+ ResultConfiguration' <$>+ (x .:? "EncryptionConfiguration") <*>+ (x .: "OutputLocation"))++instance Hashable ResultConfiguration where++instance NFData ResultConfiguration where++instance ToJSON ResultConfiguration where+ toJSON ResultConfiguration'{..}+ = object+ (catMaybes+ [("EncryptionConfiguration" .=) <$>+ _rcEncryptionConfiguration,+ Just ("OutputLocation" .= _rcOutputLocation)])++-- | The metadata and rows that comprise a query result set. The metadata describes the column structure and data types.+--+--+--+-- /See:/ 'resultSet' smart constructor.+data ResultSet = ResultSet'+ { _rsRows :: !(Maybe [Row])+ , _rsResultSetMetadata :: !(Maybe ResultSetMetadata)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ResultSet' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rsRows' - The rows in the table.+--+-- * 'rsResultSetMetadata' - The metadata that describes the column structure and data types of a table of query results.+resultSet+ :: ResultSet+resultSet = ResultSet' {_rsRows = Nothing, _rsResultSetMetadata = Nothing}+++-- | The rows in the table.+rsRows :: Lens' ResultSet [Row]+rsRows = lens _rsRows (\ s a -> s{_rsRows = a}) . _Default . _Coerce;++-- | The metadata that describes the column structure and data types of a table of query results.+rsResultSetMetadata :: Lens' ResultSet (Maybe ResultSetMetadata)+rsResultSetMetadata = lens _rsResultSetMetadata (\ s a -> s{_rsResultSetMetadata = a});++instance FromJSON ResultSet where+ parseJSON+ = withObject "ResultSet"+ (\ x ->+ ResultSet' <$>+ (x .:? "Rows" .!= mempty) <*>+ (x .:? "ResultSetMetadata"))++instance Hashable ResultSet where++instance NFData ResultSet where++-- | The metadata that describes the column structure and data types of a table of query results.+--+--+--+-- /See:/ 'resultSetMetadata' smart constructor.+newtype ResultSetMetadata = ResultSetMetadata'+ { _rsmColumnInfo :: Maybe [ColumnInfo]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ResultSetMetadata' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rsmColumnInfo' - Information about the columns in a query execution result.+resultSetMetadata+ :: ResultSetMetadata+resultSetMetadata = ResultSetMetadata' {_rsmColumnInfo = Nothing}+++-- | Information about the columns in a query execution result.+rsmColumnInfo :: Lens' ResultSetMetadata [ColumnInfo]+rsmColumnInfo = lens _rsmColumnInfo (\ s a -> s{_rsmColumnInfo = a}) . _Default . _Coerce;++instance FromJSON ResultSetMetadata where+ parseJSON+ = withObject "ResultSetMetadata"+ (\ x ->+ ResultSetMetadata' <$>+ (x .:? "ColumnInfo" .!= mempty))++instance Hashable ResultSetMetadata where++instance NFData ResultSetMetadata where++-- | The rows that comprise a query result table.+--+--+--+-- /See:/ 'row' smart constructor.+newtype Row = Row'+ { _rowData :: Maybe [Datum]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Row' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rowData' - The data that populates a row in a query result table.+row+ :: Row+row = Row' {_rowData = Nothing}+++-- | The data that populates a row in a query result table.+rowData :: Lens' Row [Datum]+rowData = lens _rowData (\ s a -> s{_rowData = a}) . _Default . _Coerce;++instance FromJSON Row where+ parseJSON+ = withObject "Row"+ (\ x -> Row' <$> (x .:? "Data" .!= mempty))++instance Hashable Row where++instance NFData Row where++-- | Information about a named query ID that could not be processed.+--+--+--+-- /See:/ 'unprocessedNamedQueryId' smart constructor.+data UnprocessedNamedQueryId = UnprocessedNamedQueryId'+ { _unqiNamedQueryId :: !(Maybe Text)+ , _unqiErrorCode :: !(Maybe Text)+ , _unqiErrorMessage :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UnprocessedNamedQueryId' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'unqiNamedQueryId' - The unique identifier of the named query.+--+-- * 'unqiErrorCode' - The error code returned when the processing request for the named query failed, if applicable.+--+-- * 'unqiErrorMessage' - The error message returned when the processing request for the named query failed, if applicable.+unprocessedNamedQueryId+ :: UnprocessedNamedQueryId+unprocessedNamedQueryId =+ UnprocessedNamedQueryId'+ { _unqiNamedQueryId = Nothing+ , _unqiErrorCode = Nothing+ , _unqiErrorMessage = Nothing+ }+++-- | The unique identifier of the named query.+unqiNamedQueryId :: Lens' UnprocessedNamedQueryId (Maybe Text)+unqiNamedQueryId = lens _unqiNamedQueryId (\ s a -> s{_unqiNamedQueryId = a});++-- | The error code returned when the processing request for the named query failed, if applicable.+unqiErrorCode :: Lens' UnprocessedNamedQueryId (Maybe Text)+unqiErrorCode = lens _unqiErrorCode (\ s a -> s{_unqiErrorCode = a});++-- | The error message returned when the processing request for the named query failed, if applicable.+unqiErrorMessage :: Lens' UnprocessedNamedQueryId (Maybe Text)+unqiErrorMessage = lens _unqiErrorMessage (\ s a -> s{_unqiErrorMessage = a});++instance FromJSON UnprocessedNamedQueryId where+ parseJSON+ = withObject "UnprocessedNamedQueryId"+ (\ x ->+ UnprocessedNamedQueryId' <$>+ (x .:? "NamedQueryId") <*> (x .:? "ErrorCode") <*>+ (x .:? "ErrorMessage"))++instance Hashable UnprocessedNamedQueryId where++instance NFData UnprocessedNamedQueryId where++-- | Describes a query execution that failed to process.+--+--+--+-- /See:/ 'unprocessedQueryExecutionId' smart constructor.+data UnprocessedQueryExecutionId = UnprocessedQueryExecutionId'+ { _uqeiErrorCode :: !(Maybe Text)+ , _uqeiQueryExecutionId :: !(Maybe Text)+ , _uqeiErrorMessage :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UnprocessedQueryExecutionId' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uqeiErrorCode' - The error code returned when the query execution failed to process, if applicable.+--+-- * 'uqeiQueryExecutionId' - The unique identifier of the query execution.+--+-- * 'uqeiErrorMessage' - The error message returned when the query execution failed to process, if applicable.+unprocessedQueryExecutionId+ :: UnprocessedQueryExecutionId+unprocessedQueryExecutionId =+ UnprocessedQueryExecutionId'+ { _uqeiErrorCode = Nothing+ , _uqeiQueryExecutionId = Nothing+ , _uqeiErrorMessage = Nothing+ }+++-- | The error code returned when the query execution failed to process, if applicable.+uqeiErrorCode :: Lens' UnprocessedQueryExecutionId (Maybe Text)+uqeiErrorCode = lens _uqeiErrorCode (\ s a -> s{_uqeiErrorCode = a});++-- | The unique identifier of the query execution.+uqeiQueryExecutionId :: Lens' UnprocessedQueryExecutionId (Maybe Text)+uqeiQueryExecutionId = lens _uqeiQueryExecutionId (\ s a -> s{_uqeiQueryExecutionId = a});++-- | The error message returned when the query execution failed to process, if applicable.+uqeiErrorMessage :: Lens' UnprocessedQueryExecutionId (Maybe Text)+uqeiErrorMessage = lens _uqeiErrorMessage (\ s a -> s{_uqeiErrorMessage = a});++instance FromJSON UnprocessedQueryExecutionId where+ parseJSON+ = withObject "UnprocessedQueryExecutionId"+ (\ x ->+ UnprocessedQueryExecutionId' <$>+ (x .:? "ErrorCode") <*> (x .:? "QueryExecutionId")+ <*> (x .:? "ErrorMessage"))++instance Hashable UnprocessedQueryExecutionId where++instance NFData UnprocessedQueryExecutionId where
+ gen/Network/AWS/Athena/Types/Sum.hs view
@@ -0,0 +1,119 @@+{-# 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.Athena.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.Athena.Types.Sum where++import Network.AWS.Prelude++data ColumnNullable+ = NotNull+ | Nullable+ | Unknown+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ColumnNullable where+ parser = takeLowerText >>= \case+ "not_null" -> pure NotNull+ "nullable" -> pure Nullable+ "unknown" -> pure Unknown+ e -> fromTextError $ "Failure parsing ColumnNullable from value: '" <> e+ <> "'. Accepted values: not_null, nullable, unknown"++instance ToText ColumnNullable where+ toText = \case+ NotNull -> "NOT_NULL"+ Nullable -> "NULLABLE"+ Unknown -> "UNKNOWN"++instance Hashable ColumnNullable+instance NFData ColumnNullable+instance ToByteString ColumnNullable+instance ToQuery ColumnNullable+instance ToHeader ColumnNullable++instance FromJSON ColumnNullable where+ parseJSON = parseJSONText "ColumnNullable"++data EncryptionOption+ = CseKMS+ | SseKMS+ | SseS3+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText EncryptionOption where+ parser = takeLowerText >>= \case+ "cse_kms" -> pure CseKMS+ "sse_kms" -> pure SseKMS+ "sse_s3" -> pure SseS3+ e -> fromTextError $ "Failure parsing EncryptionOption from value: '" <> e+ <> "'. Accepted values: cse_kms, sse_kms, sse_s3"++instance ToText EncryptionOption where+ toText = \case+ CseKMS -> "CSE_KMS"+ SseKMS -> "SSE_KMS"+ SseS3 -> "SSE_S3"++instance Hashable EncryptionOption+instance NFData EncryptionOption+instance ToByteString EncryptionOption+instance ToQuery EncryptionOption+instance ToHeader EncryptionOption++instance ToJSON EncryptionOption where+ toJSON = toJSONText++instance FromJSON EncryptionOption where+ parseJSON = parseJSONText "EncryptionOption"++data QueryExecutionState+ = Cancelled+ | Failed+ | Queued+ | Running+ | Succeeded+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText QueryExecutionState where+ parser = takeLowerText >>= \case+ "cancelled" -> pure Cancelled+ "failed" -> pure Failed+ "queued" -> pure Queued+ "running" -> pure Running+ "succeeded" -> pure Succeeded+ e -> fromTextError $ "Failure parsing QueryExecutionState from value: '" <> e+ <> "'. Accepted values: cancelled, failed, queued, running, succeeded"++instance ToText QueryExecutionState where+ toText = \case+ Cancelled -> "CANCELLED"+ Failed -> "FAILED"+ Queued -> "QUEUED"+ Running -> "RUNNING"+ Succeeded -> "SUCCEEDED"++instance Hashable QueryExecutionState+instance NFData QueryExecutionState+instance ToByteString QueryExecutionState+instance ToQuery QueryExecutionState+instance ToHeader QueryExecutionState++instance FromJSON QueryExecutionState where+ parseJSON = parseJSONText "QueryExecutionState"
+ gen/Network/AWS/Athena/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.Athena.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.Athena.Waiters where++import Network.AWS.Athena.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.Athena+import Test.AWS.Athena.Internal++main :: IO ()+main = defaultMain $ testGroup "Athena"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/Athena.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.AWS.Athena+-- 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.Athena+ ( tests+ , fixtures+ ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/Athena/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module : Test.AWS.Athena.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.Athena.Internal where
+ test/Test/AWS/Gen/Athena.hs view
@@ -0,0 +1,237 @@+{-# 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.Athena+-- 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.Athena where++import Data.Proxy+import Network.AWS.Athena+import Test.AWS.Athena.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"+-- [ requestGetNamedQuery $+-- getNamedQuery+--+-- , requestCreateNamedQuery $+-- createNamedQuery+--+-- , requestListNamedQueries $+-- listNamedQueries+--+-- , requestDeleteNamedQuery $+-- deleteNamedQuery+--+-- , requestStartQueryExecution $+-- startQueryExecution+--+-- , requestBatchGetNamedQuery $+-- batchGetNamedQuery+--+-- , requestGetQueryExecution $+-- getQueryExecution+--+-- , requestBatchGetQueryExecution $+-- batchGetQueryExecution+--+-- , requestStopQueryExecution $+-- stopQueryExecution+--+-- , requestGetQueryResults $+-- getQueryResults+--+-- , requestListQueryExecutions $+-- listQueryExecutions+--+-- ]++-- , testGroup "response"+-- [ responseGetNamedQuery $+-- getNamedQueryResponse+--+-- , responseCreateNamedQuery $+-- createNamedQueryResponse+--+-- , responseListNamedQueries $+-- listNamedQueriesResponse+--+-- , responseDeleteNamedQuery $+-- deleteNamedQueryResponse+--+-- , responseStartQueryExecution $+-- startQueryExecutionResponse+--+-- , responseBatchGetNamedQuery $+-- batchGetNamedQueryResponse+--+-- , responseGetQueryExecution $+-- getQueryExecutionResponse+--+-- , responseBatchGetQueryExecution $+-- batchGetQueryExecutionResponse+--+-- , responseStopQueryExecution $+-- stopQueryExecutionResponse+--+-- , responseGetQueryResults $+-- getQueryResultsResponse+--+-- , responseListQueryExecutions $+-- listQueryExecutionsResponse+--+-- ]+-- ]++-- Requests++requestGetNamedQuery :: GetNamedQuery -> TestTree+requestGetNamedQuery = req+ "GetNamedQuery"+ "fixture/GetNamedQuery.yaml"++requestCreateNamedQuery :: CreateNamedQuery -> TestTree+requestCreateNamedQuery = req+ "CreateNamedQuery"+ "fixture/CreateNamedQuery.yaml"++requestListNamedQueries :: ListNamedQueries -> TestTree+requestListNamedQueries = req+ "ListNamedQueries"+ "fixture/ListNamedQueries.yaml"++requestDeleteNamedQuery :: DeleteNamedQuery -> TestTree+requestDeleteNamedQuery = req+ "DeleteNamedQuery"+ "fixture/DeleteNamedQuery.yaml"++requestStartQueryExecution :: StartQueryExecution -> TestTree+requestStartQueryExecution = req+ "StartQueryExecution"+ "fixture/StartQueryExecution.yaml"++requestBatchGetNamedQuery :: BatchGetNamedQuery -> TestTree+requestBatchGetNamedQuery = req+ "BatchGetNamedQuery"+ "fixture/BatchGetNamedQuery.yaml"++requestGetQueryExecution :: GetQueryExecution -> TestTree+requestGetQueryExecution = req+ "GetQueryExecution"+ "fixture/GetQueryExecution.yaml"++requestBatchGetQueryExecution :: BatchGetQueryExecution -> TestTree+requestBatchGetQueryExecution = req+ "BatchGetQueryExecution"+ "fixture/BatchGetQueryExecution.yaml"++requestStopQueryExecution :: StopQueryExecution -> TestTree+requestStopQueryExecution = req+ "StopQueryExecution"+ "fixture/StopQueryExecution.yaml"++requestGetQueryResults :: GetQueryResults -> TestTree+requestGetQueryResults = req+ "GetQueryResults"+ "fixture/GetQueryResults.yaml"++requestListQueryExecutions :: ListQueryExecutions -> TestTree+requestListQueryExecutions = req+ "ListQueryExecutions"+ "fixture/ListQueryExecutions.yaml"++-- Responses++responseGetNamedQuery :: GetNamedQueryResponse -> TestTree+responseGetNamedQuery = res+ "GetNamedQueryResponse"+ "fixture/GetNamedQueryResponse.proto"+ athena+ (Proxy :: Proxy GetNamedQuery)++responseCreateNamedQuery :: CreateNamedQueryResponse -> TestTree+responseCreateNamedQuery = res+ "CreateNamedQueryResponse"+ "fixture/CreateNamedQueryResponse.proto"+ athena+ (Proxy :: Proxy CreateNamedQuery)++responseListNamedQueries :: ListNamedQueriesResponse -> TestTree+responseListNamedQueries = res+ "ListNamedQueriesResponse"+ "fixture/ListNamedQueriesResponse.proto"+ athena+ (Proxy :: Proxy ListNamedQueries)++responseDeleteNamedQuery :: DeleteNamedQueryResponse -> TestTree+responseDeleteNamedQuery = res+ "DeleteNamedQueryResponse"+ "fixture/DeleteNamedQueryResponse.proto"+ athena+ (Proxy :: Proxy DeleteNamedQuery)++responseStartQueryExecution :: StartQueryExecutionResponse -> TestTree+responseStartQueryExecution = res+ "StartQueryExecutionResponse"+ "fixture/StartQueryExecutionResponse.proto"+ athena+ (Proxy :: Proxy StartQueryExecution)++responseBatchGetNamedQuery :: BatchGetNamedQueryResponse -> TestTree+responseBatchGetNamedQuery = res+ "BatchGetNamedQueryResponse"+ "fixture/BatchGetNamedQueryResponse.proto"+ athena+ (Proxy :: Proxy BatchGetNamedQuery)++responseGetQueryExecution :: GetQueryExecutionResponse -> TestTree+responseGetQueryExecution = res+ "GetQueryExecutionResponse"+ "fixture/GetQueryExecutionResponse.proto"+ athena+ (Proxy :: Proxy GetQueryExecution)++responseBatchGetQueryExecution :: BatchGetQueryExecutionResponse -> TestTree+responseBatchGetQueryExecution = res+ "BatchGetQueryExecutionResponse"+ "fixture/BatchGetQueryExecutionResponse.proto"+ athena+ (Proxy :: Proxy BatchGetQueryExecution)++responseStopQueryExecution :: StopQueryExecutionResponse -> TestTree+responseStopQueryExecution = res+ "StopQueryExecutionResponse"+ "fixture/StopQueryExecutionResponse.proto"+ athena+ (Proxy :: Proxy StopQueryExecution)++responseGetQueryResults :: GetQueryResultsResponse -> TestTree+responseGetQueryResults = res+ "GetQueryResultsResponse"+ "fixture/GetQueryResultsResponse.proto"+ athena+ (Proxy :: Proxy GetQueryResults)++responseListQueryExecutions :: ListQueryExecutionsResponse -> TestTree+responseListQueryExecutions = res+ "ListQueryExecutionsResponse"+ "fixture/ListQueryExecutionsResponse.proto"+ athena+ (Proxy :: Proxy ListQueryExecutions)