amazonka-timestream-query (empty) → 2.0
raw patch · 92 files changed
+9074/−0 lines, 92 filesdep +amazonka-coredep +amazonka-testdep +amazonka-timestream-query
Dependencies added: amazonka-core, amazonka-test, amazonka-timestream-query, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-timestream-query.cabal +132/−0
- fixture/CancelQuery.yaml +10/−0
- fixture/CancelQueryResponse.proto +0/−0
- fixture/CreateScheduledQuery.yaml +10/−0
- fixture/CreateScheduledQueryResponse.proto +0/−0
- fixture/DeleteScheduledQuery.yaml +10/−0
- fixture/DeleteScheduledQueryResponse.proto +0/−0
- fixture/DescribeEndpoints.yaml +10/−0
- fixture/DescribeEndpointsResponse.proto +0/−0
- fixture/DescribeScheduledQuery.yaml +10/−0
- fixture/DescribeScheduledQueryResponse.proto +0/−0
- fixture/ExecuteScheduledQuery.yaml +10/−0
- fixture/ExecuteScheduledQueryResponse.proto +0/−0
- fixture/ListScheduledQueries.yaml +10/−0
- fixture/ListScheduledQueriesResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/PrepareQuery.yaml +10/−0
- fixture/PrepareQueryResponse.proto +0/−0
- fixture/Query.yaml +10/−0
- fixture/QueryResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateScheduledQuery.yaml +10/−0
- fixture/UpdateScheduledQueryResponse.proto +0/−0
- gen/Amazonka/TimeStreamQuery.hs +316/−0
- gen/Amazonka/TimeStreamQuery/CancelQuery.hs +178/−0
- gen/Amazonka/TimeStreamQuery/CreateScheduledQuery.hs +419/−0
- gen/Amazonka/TimeStreamQuery/DeleteScheduledQuery.hs +139/−0
- gen/Amazonka/TimeStreamQuery/DescribeEndpoints.hs +169/−0
- gen/Amazonka/TimeStreamQuery/DescribeScheduledQuery.hs +181/−0
- gen/Amazonka/TimeStreamQuery/ExecuteScheduledQuery.hs +174/−0
- gen/Amazonka/TimeStreamQuery/Lens.hs +301/−0
- gen/Amazonka/TimeStreamQuery/ListScheduledQueries.hs +238/−0
- gen/Amazonka/TimeStreamQuery/ListTagsForResource.hs +238/−0
- gen/Amazonka/TimeStreamQuery/PrepareQuery.hs +224/−0
- gen/Amazonka/TimeStreamQuery/Query.hs +501/−0
- gen/Amazonka/TimeStreamQuery/TagResource.hs +173/−0
- gen/Amazonka/TimeStreamQuery/Types.hs +439/−0
- gen/Amazonka/TimeStreamQuery/Types/ColumnInfo.hs +93/−0
- gen/Amazonka/TimeStreamQuery/Types/ColumnInfo.hs-boot +31/−0
- gen/Amazonka/TimeStreamQuery/Types/Datum.hs +128/−0
- gen/Amazonka/TimeStreamQuery/Types/Datum.hs-boot +31/−0
- gen/Amazonka/TimeStreamQuery/Types/DimensionMapping.hs +100/−0
- gen/Amazonka/TimeStreamQuery/Types/DimensionValueType.hs +66/−0
- gen/Amazonka/TimeStreamQuery/Types/Endpoint.hs +89/−0
- gen/Amazonka/TimeStreamQuery/Types/ErrorReportConfiguration.hs +84/−0
- gen/Amazonka/TimeStreamQuery/Types/ErrorReportLocation.hs +74/−0
- gen/Amazonka/TimeStreamQuery/Types/ExecutionStats.hs +129/−0
- gen/Amazonka/TimeStreamQuery/Types/MeasureValueType.hs +86/−0
- gen/Amazonka/TimeStreamQuery/Types/MixedMeasureMapping.hs +155/−0
- gen/Amazonka/TimeStreamQuery/Types/MultiMeasureAttributeMapping.hs +122/−0
- gen/Amazonka/TimeStreamQuery/Types/MultiMeasureMappings.hs +117/−0
- gen/Amazonka/TimeStreamQuery/Types/NotificationConfiguration.hs +86/−0
- gen/Amazonka/TimeStreamQuery/Types/ParameterMapping.hs +84/−0
- gen/Amazonka/TimeStreamQuery/Types/QueryStatus.hs +116/−0
- gen/Amazonka/TimeStreamQuery/Types/Row.hs +68/−0
- gen/Amazonka/TimeStreamQuery/Types/Row.hs-boot +31/−0
- gen/Amazonka/TimeStreamQuery/Types/S3Configuration.hs +119/−0
- gen/Amazonka/TimeStreamQuery/Types/S3EncryptionOption.hs +71/−0
- gen/Amazonka/TimeStreamQuery/Types/S3ReportLocation.hs +84/−0
- gen/Amazonka/TimeStreamQuery/Types/ScalarMeasureValueType.hs +86/−0
- gen/Amazonka/TimeStreamQuery/Types/ScalarType.hs +116/−0
- gen/Amazonka/TimeStreamQuery/Types/ScheduleConfiguration.hs +86/−0
- gen/Amazonka/TimeStreamQuery/Types/ScheduledQuery.hs +178/−0
- gen/Amazonka/TimeStreamQuery/Types/ScheduledQueryDescription.hs +273/−0
- gen/Amazonka/TimeStreamQuery/Types/ScheduledQueryRunStatus.hs +81/−0
- gen/Amazonka/TimeStreamQuery/Types/ScheduledQueryRunSummary.hs +145/−0
- gen/Amazonka/TimeStreamQuery/Types/ScheduledQueryState.hs +71/−0
- gen/Amazonka/TimeStreamQuery/Types/SelectColumn.hs +120/−0
- gen/Amazonka/TimeStreamQuery/Types/SnsConfiguration.hs +79/−0
- gen/Amazonka/TimeStreamQuery/Types/Tag.hs +96/−0
- gen/Amazonka/TimeStreamQuery/Types/TargetConfiguration.hs +90/−0
- gen/Amazonka/TimeStreamQuery/Types/TargetDestination.hs +74/−0
- gen/Amazonka/TimeStreamQuery/Types/TimeSeriesDataPoint.hs +92/−0
- gen/Amazonka/TimeStreamQuery/Types/TimeSeriesDataPoint.hs-boot +31/−0
- gen/Amazonka/TimeStreamQuery/Types/TimestreamConfiguration.hs +192/−0
- gen/Amazonka/TimeStreamQuery/Types/TimestreamDestination.hs +85/−0
- gen/Amazonka/TimeStreamQuery/Types/Type.hs +116/−0
- gen/Amazonka/TimeStreamQuery/Types/Type.hs-boot +31/−0
- gen/Amazonka/TimeStreamQuery/UntagResource.hs +177/−0
- gen/Amazonka/TimeStreamQuery/UpdateScheduledQuery.hs +155/−0
- gen/Amazonka/TimeStreamQuery/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Gen/TimeStreamQuery.hs +298/−0
- test/Test/Amazonka/TimeStreamQuery.hs +20/−0
- test/Test/Amazonka/TimeStreamQuery/Internal.hs +8/−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,44 @@+# Amazon Timestream Query SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2018-11-01@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-timestream-query)+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 [Amazonka.TimeStreamQuery](http://hackage.haskell.org/package/amazonka-timestream-query/docs/Amazonka-TimeStreamQuery.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-timestream-query` 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.
+ amazonka-timestream-query.cabal view
@@ -0,0 +1,132 @@+cabal-version: 2.2+name: amazonka-timestream-query+version: 2.0+synopsis: Amazon Timestream Query 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>, Jack Kelly <jack@jackkelly.name>++copyright: Copyright (c) 2013-2023 Brendan Hay+category: AWS+build-type: Simple+extra-source-files:+ fixture/*.proto+ fixture/*.yaml+ README.md+ src/.gitkeep++description:+ Derived from API version @2018-11-01@ of the AWS service descriptions, licensed under Apache 2.0.+ .+ 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.+ .+ It is recommended to use generic lenses or optics from packages such as <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify optional fields and deconstruct responses.+ .+ Generated lenses can be found in "Amazonka.TimeStreamQuery.Lens" and are+ suitable for use with a lens package such as <http://hackage.haskell.org/package/lens lens> or <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Amazonka.TimeStreamQuery" and the <https://aws.amazon.com/documentation/ AWS documentation> to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-timestream-query++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:+ Amazonka.TimeStreamQuery+ Amazonka.TimeStreamQuery.CancelQuery+ Amazonka.TimeStreamQuery.CreateScheduledQuery+ Amazonka.TimeStreamQuery.DeleteScheduledQuery+ Amazonka.TimeStreamQuery.DescribeEndpoints+ Amazonka.TimeStreamQuery.DescribeScheduledQuery+ Amazonka.TimeStreamQuery.ExecuteScheduledQuery+ Amazonka.TimeStreamQuery.Lens+ Amazonka.TimeStreamQuery.ListScheduledQueries+ Amazonka.TimeStreamQuery.ListTagsForResource+ Amazonka.TimeStreamQuery.PrepareQuery+ Amazonka.TimeStreamQuery.Query+ Amazonka.TimeStreamQuery.TagResource+ Amazonka.TimeStreamQuery.Types+ Amazonka.TimeStreamQuery.Types.ColumnInfo+ Amazonka.TimeStreamQuery.Types.Datum+ Amazonka.TimeStreamQuery.Types.DimensionMapping+ Amazonka.TimeStreamQuery.Types.DimensionValueType+ Amazonka.TimeStreamQuery.Types.Endpoint+ Amazonka.TimeStreamQuery.Types.ErrorReportConfiguration+ Amazonka.TimeStreamQuery.Types.ErrorReportLocation+ Amazonka.TimeStreamQuery.Types.ExecutionStats+ Amazonka.TimeStreamQuery.Types.MeasureValueType+ Amazonka.TimeStreamQuery.Types.MixedMeasureMapping+ Amazonka.TimeStreamQuery.Types.MultiMeasureAttributeMapping+ Amazonka.TimeStreamQuery.Types.MultiMeasureMappings+ Amazonka.TimeStreamQuery.Types.NotificationConfiguration+ Amazonka.TimeStreamQuery.Types.ParameterMapping+ Amazonka.TimeStreamQuery.Types.QueryStatus+ Amazonka.TimeStreamQuery.Types.Row+ Amazonka.TimeStreamQuery.Types.S3Configuration+ Amazonka.TimeStreamQuery.Types.S3EncryptionOption+ Amazonka.TimeStreamQuery.Types.S3ReportLocation+ Amazonka.TimeStreamQuery.Types.ScalarMeasureValueType+ Amazonka.TimeStreamQuery.Types.ScalarType+ Amazonka.TimeStreamQuery.Types.ScheduleConfiguration+ Amazonka.TimeStreamQuery.Types.ScheduledQuery+ Amazonka.TimeStreamQuery.Types.ScheduledQueryDescription+ Amazonka.TimeStreamQuery.Types.ScheduledQueryRunStatus+ Amazonka.TimeStreamQuery.Types.ScheduledQueryRunSummary+ Amazonka.TimeStreamQuery.Types.ScheduledQueryState+ Amazonka.TimeStreamQuery.Types.SelectColumn+ Amazonka.TimeStreamQuery.Types.SnsConfiguration+ Amazonka.TimeStreamQuery.Types.Tag+ Amazonka.TimeStreamQuery.Types.TargetConfiguration+ Amazonka.TimeStreamQuery.Types.TargetDestination+ Amazonka.TimeStreamQuery.Types.TimeSeriesDataPoint+ Amazonka.TimeStreamQuery.Types.TimestreamConfiguration+ Amazonka.TimeStreamQuery.Types.TimestreamDestination+ Amazonka.TimeStreamQuery.Types.Type+ Amazonka.TimeStreamQuery.UntagResource+ Amazonka.TimeStreamQuery.UpdateScheduledQuery+ Amazonka.TimeStreamQuery.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-timestream-query-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.Amazonka.Gen.TimeStreamQuery+ Test.Amazonka.TimeStreamQuery+ Test.Amazonka.TimeStreamQuery.Internal++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-test >=2.0 && <2.1+ , amazonka-timestream-query+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CancelQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/CancelQueryResponse.proto view
+ fixture/CreateScheduledQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/CreateScheduledQueryResponse.proto view
+ fixture/DeleteScheduledQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/DeleteScheduledQueryResponse.proto view
+ fixture/DescribeEndpoints.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/DescribeEndpointsResponse.proto view
+ fixture/DescribeScheduledQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/DescribeScheduledQueryResponse.proto view
+ fixture/ExecuteScheduledQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/ExecuteScheduledQueryResponse.proto view
+ fixture/ListScheduledQueries.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/ListScheduledQueriesResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/ListTagsForResourceResponse.proto view
+ fixture/PrepareQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/PrepareQueryResponse.proto view
+ fixture/Query.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/QueryResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/TagResourceResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/UntagResourceResponse.proto view
+ fixture/UpdateScheduledQuery.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/query.timestream/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: query.timestream.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/UpdateScheduledQueryResponse.proto view
+ gen/Amazonka/TimeStreamQuery.hs view
@@ -0,0 +1,316 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.TimeStreamQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2018-11-01@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Amazon Timestream Query+module Amazonka.TimeStreamQuery+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** AccessDeniedException+ _AccessDeniedException,++ -- ** ConflictException+ _ConflictException,++ -- ** InternalServerException+ _InternalServerException,++ -- ** InvalidEndpointException+ _InvalidEndpointException,++ -- ** QueryExecutionException+ _QueryExecutionException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ServiceQuotaExceededException+ _ServiceQuotaExceededException,++ -- ** ThrottlingException+ _ThrottlingException,++ -- ** ValidationException+ _ValidationException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** CancelQuery+ CancelQuery (CancelQuery'),+ newCancelQuery,+ CancelQueryResponse (CancelQueryResponse'),+ newCancelQueryResponse,++ -- ** CreateScheduledQuery+ CreateScheduledQuery (CreateScheduledQuery'),+ newCreateScheduledQuery,+ CreateScheduledQueryResponse (CreateScheduledQueryResponse'),+ newCreateScheduledQueryResponse,++ -- ** DeleteScheduledQuery+ DeleteScheduledQuery (DeleteScheduledQuery'),+ newDeleteScheduledQuery,+ DeleteScheduledQueryResponse (DeleteScheduledQueryResponse'),+ newDeleteScheduledQueryResponse,++ -- ** DescribeEndpoints+ DescribeEndpoints (DescribeEndpoints'),+ newDescribeEndpoints,+ DescribeEndpointsResponse (DescribeEndpointsResponse'),+ newDescribeEndpointsResponse,++ -- ** DescribeScheduledQuery+ DescribeScheduledQuery (DescribeScheduledQuery'),+ newDescribeScheduledQuery,+ DescribeScheduledQueryResponse (DescribeScheduledQueryResponse'),+ newDescribeScheduledQueryResponse,++ -- ** ExecuteScheduledQuery+ ExecuteScheduledQuery (ExecuteScheduledQuery'),+ newExecuteScheduledQuery,+ ExecuteScheduledQueryResponse (ExecuteScheduledQueryResponse'),+ newExecuteScheduledQueryResponse,++ -- ** ListScheduledQueries (Paginated)+ ListScheduledQueries (ListScheduledQueries'),+ newListScheduledQueries,+ ListScheduledQueriesResponse (ListScheduledQueriesResponse'),+ newListScheduledQueriesResponse,++ -- ** ListTagsForResource (Paginated)+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** PrepareQuery+ PrepareQuery (PrepareQuery'),+ newPrepareQuery,+ PrepareQueryResponse (PrepareQueryResponse'),+ newPrepareQueryResponse,++ -- ** Query (Paginated)+ Query (Query'),+ newQuery,+ QueryResponse (QueryResponse'),+ newQueryResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateScheduledQuery+ UpdateScheduledQuery (UpdateScheduledQuery'),+ newUpdateScheduledQuery,+ UpdateScheduledQueryResponse (UpdateScheduledQueryResponse'),+ newUpdateScheduledQueryResponse,++ -- * Types++ -- ** DimensionValueType+ DimensionValueType (..),++ -- ** MeasureValueType+ MeasureValueType (..),++ -- ** S3EncryptionOption+ S3EncryptionOption (..),++ -- ** ScalarMeasureValueType+ ScalarMeasureValueType (..),++ -- ** ScalarType+ ScalarType (..),++ -- ** ScheduledQueryRunStatus+ ScheduledQueryRunStatus (..),++ -- ** ScheduledQueryState+ ScheduledQueryState (..),++ -- ** ColumnInfo+ ColumnInfo (ColumnInfo'),+ newColumnInfo,++ -- ** Datum+ Datum (Datum'),+ newDatum,++ -- ** DimensionMapping+ DimensionMapping (DimensionMapping'),+ newDimensionMapping,++ -- ** Endpoint+ Endpoint (Endpoint'),+ newEndpoint,++ -- ** ErrorReportConfiguration+ ErrorReportConfiguration (ErrorReportConfiguration'),+ newErrorReportConfiguration,++ -- ** ErrorReportLocation+ ErrorReportLocation (ErrorReportLocation'),+ newErrorReportLocation,++ -- ** ExecutionStats+ ExecutionStats (ExecutionStats'),+ newExecutionStats,++ -- ** MixedMeasureMapping+ MixedMeasureMapping (MixedMeasureMapping'),+ newMixedMeasureMapping,++ -- ** MultiMeasureAttributeMapping+ MultiMeasureAttributeMapping (MultiMeasureAttributeMapping'),+ newMultiMeasureAttributeMapping,++ -- ** MultiMeasureMappings+ MultiMeasureMappings (MultiMeasureMappings'),+ newMultiMeasureMappings,++ -- ** NotificationConfiguration+ NotificationConfiguration (NotificationConfiguration'),+ newNotificationConfiguration,++ -- ** ParameterMapping+ ParameterMapping (ParameterMapping'),+ newParameterMapping,++ -- ** QueryStatus+ QueryStatus (QueryStatus'),+ newQueryStatus,++ -- ** Row+ Row (Row'),+ newRow,++ -- ** S3Configuration+ S3Configuration (S3Configuration'),+ newS3Configuration,++ -- ** S3ReportLocation+ S3ReportLocation (S3ReportLocation'),+ newS3ReportLocation,++ -- ** ScheduleConfiguration+ ScheduleConfiguration (ScheduleConfiguration'),+ newScheduleConfiguration,++ -- ** ScheduledQuery+ ScheduledQuery (ScheduledQuery'),+ newScheduledQuery,++ -- ** ScheduledQueryDescription+ ScheduledQueryDescription (ScheduledQueryDescription'),+ newScheduledQueryDescription,++ -- ** ScheduledQueryRunSummary+ ScheduledQueryRunSummary (ScheduledQueryRunSummary'),+ newScheduledQueryRunSummary,++ -- ** SelectColumn+ SelectColumn (SelectColumn'),+ newSelectColumn,++ -- ** SnsConfiguration+ SnsConfiguration (SnsConfiguration'),+ newSnsConfiguration,++ -- ** Tag+ Tag (Tag'),+ newTag,++ -- ** TargetConfiguration+ TargetConfiguration (TargetConfiguration'),+ newTargetConfiguration,++ -- ** TargetDestination+ TargetDestination (TargetDestination'),+ newTargetDestination,++ -- ** TimeSeriesDataPoint+ TimeSeriesDataPoint (TimeSeriesDataPoint'),+ newTimeSeriesDataPoint,++ -- ** TimestreamConfiguration+ TimestreamConfiguration (TimestreamConfiguration'),+ newTimestreamConfiguration,++ -- ** TimestreamDestination+ TimestreamDestination (TimestreamDestination'),+ newTimestreamDestination,++ -- ** Type+ Type (Type'),+ newType,+ )+where++import Amazonka.TimeStreamQuery.CancelQuery+import Amazonka.TimeStreamQuery.CreateScheduledQuery+import Amazonka.TimeStreamQuery.DeleteScheduledQuery+import Amazonka.TimeStreamQuery.DescribeEndpoints+import Amazonka.TimeStreamQuery.DescribeScheduledQuery+import Amazonka.TimeStreamQuery.ExecuteScheduledQuery+import Amazonka.TimeStreamQuery.Lens+import Amazonka.TimeStreamQuery.ListScheduledQueries+import Amazonka.TimeStreamQuery.ListTagsForResource+import Amazonka.TimeStreamQuery.PrepareQuery+import Amazonka.TimeStreamQuery.Query+import Amazonka.TimeStreamQuery.TagResource+import Amazonka.TimeStreamQuery.Types+import Amazonka.TimeStreamQuery.UntagResource+import Amazonka.TimeStreamQuery.UpdateScheduledQuery+import Amazonka.TimeStreamQuery.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 'TimeStreamQuery'.++-- $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/Amazonka/TimeStreamQuery/CancelQuery.hs view
@@ -0,0 +1,178 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.CancelQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Cancels a query that has been issued. Cancellation is provided only if+-- the query has not completed running before the cancellation request was+-- issued. Because cancellation is an idempotent operation, subsequent+-- cancellation requests will return a @CancellationMessage@, indicating+-- that the query has already been canceled. See+-- <https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.cancel-query.html code sample>+-- for details.+module Amazonka.TimeStreamQuery.CancelQuery+ ( -- * Creating a Request+ CancelQuery (..),+ newCancelQuery,++ -- * Request Lenses+ cancelQuery_queryId,++ -- * Destructuring the Response+ CancelQueryResponse (..),+ newCancelQueryResponse,++ -- * Response Lenses+ cancelQueryResponse_cancellationMessage,+ cancelQueryResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newCancelQuery' smart constructor.+data CancelQuery = CancelQuery'+ { -- | The ID of the query that needs to be cancelled. @QueryID@ is returned as+ -- part of the query result.+ queryId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CancelQuery' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'queryId', 'cancelQuery_queryId' - The ID of the query that needs to be cancelled. @QueryID@ is returned as+-- part of the query result.+newCancelQuery ::+ -- | 'queryId'+ Prelude.Text ->+ CancelQuery+newCancelQuery pQueryId_ =+ CancelQuery' {queryId = pQueryId_}++-- | The ID of the query that needs to be cancelled. @QueryID@ is returned as+-- part of the query result.+cancelQuery_queryId :: Lens.Lens' CancelQuery Prelude.Text+cancelQuery_queryId = Lens.lens (\CancelQuery' {queryId} -> queryId) (\s@CancelQuery' {} a -> s {queryId = a} :: CancelQuery)++instance Core.AWSRequest CancelQuery where+ type AWSResponse CancelQuery = CancelQueryResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CancelQueryResponse'+ Prelude.<$> (x Data..?> "CancellationMessage")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CancelQuery where+ hashWithSalt _salt CancelQuery' {..} =+ _salt `Prelude.hashWithSalt` queryId++instance Prelude.NFData CancelQuery where+ rnf CancelQuery' {..} = Prelude.rnf queryId++instance Data.ToHeaders CancelQuery where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.CancelQuery" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CancelQuery where+ toJSON CancelQuery' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("QueryId" Data..= queryId)]+ )++instance Data.ToPath CancelQuery where+ toPath = Prelude.const "/"++instance Data.ToQuery CancelQuery where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCancelQueryResponse' smart constructor.+data CancelQueryResponse = CancelQueryResponse'+ { -- | A @CancellationMessage@ is returned when a @CancelQuery@ request for the+ -- query specified by @QueryId@ has already been issued.+ cancellationMessage :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CancelQueryResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'cancellationMessage', 'cancelQueryResponse_cancellationMessage' - A @CancellationMessage@ is returned when a @CancelQuery@ request for the+-- query specified by @QueryId@ has already been issued.+--+-- 'httpStatus', 'cancelQueryResponse_httpStatus' - The response's http status code.+newCancelQueryResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CancelQueryResponse+newCancelQueryResponse pHttpStatus_ =+ CancelQueryResponse'+ { cancellationMessage =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A @CancellationMessage@ is returned when a @CancelQuery@ request for the+-- query specified by @QueryId@ has already been issued.+cancelQueryResponse_cancellationMessage :: Lens.Lens' CancelQueryResponse (Prelude.Maybe Prelude.Text)+cancelQueryResponse_cancellationMessage = Lens.lens (\CancelQueryResponse' {cancellationMessage} -> cancellationMessage) (\s@CancelQueryResponse' {} a -> s {cancellationMessage = a} :: CancelQueryResponse)++-- | The response's http status code.+cancelQueryResponse_httpStatus :: Lens.Lens' CancelQueryResponse Prelude.Int+cancelQueryResponse_httpStatus = Lens.lens (\CancelQueryResponse' {httpStatus} -> httpStatus) (\s@CancelQueryResponse' {} a -> s {httpStatus = a} :: CancelQueryResponse)++instance Prelude.NFData CancelQueryResponse where+ rnf CancelQueryResponse' {..} =+ Prelude.rnf cancellationMessage+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/TimeStreamQuery/CreateScheduledQuery.hs view
@@ -0,0 +1,419 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.CreateScheduledQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Create a scheduled query that will be run on your behalf at the+-- configured schedule. Timestream assumes the execution role provided as+-- part of the @ScheduledQueryExecutionRoleArn@ parameter to run the query.+-- You can use the @NotificationConfiguration@ parameter to configure+-- notification for your scheduled query operations.+module Amazonka.TimeStreamQuery.CreateScheduledQuery+ ( -- * Creating a Request+ CreateScheduledQuery (..),+ newCreateScheduledQuery,++ -- * Request Lenses+ createScheduledQuery_clientToken,+ createScheduledQuery_kmsKeyId,+ createScheduledQuery_tags,+ createScheduledQuery_targetConfiguration,+ createScheduledQuery_name,+ createScheduledQuery_queryString,+ createScheduledQuery_scheduleConfiguration,+ createScheduledQuery_notificationConfiguration,+ createScheduledQuery_scheduledQueryExecutionRoleArn,+ createScheduledQuery_errorReportConfiguration,++ -- * Destructuring the Response+ CreateScheduledQueryResponse (..),+ newCreateScheduledQueryResponse,++ -- * Response Lenses+ createScheduledQueryResponse_httpStatus,+ createScheduledQueryResponse_arn,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newCreateScheduledQuery' smart constructor.+data CreateScheduledQuery = CreateScheduledQuery'+ { -- | Using a ClientToken makes the call to CreateScheduledQuery idempotent,+ -- in other words, making the same request repeatedly will produce the same+ -- result. Making multiple identical CreateScheduledQuery requests has the+ -- same effect as making a single request.+ --+ -- - If CreateScheduledQuery is called without a @ClientToken@, the Query+ -- SDK generates a @ClientToken@ on your behalf.+ --+ -- - After 8 hours, any request with the same @ClientToken@ is treated as+ -- a new request.+ clientToken :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | The Amazon KMS key used to encrypt the scheduled query resource,+ -- at-rest. If the Amazon KMS key is not specified, the scheduled query+ -- resource will be encrypted with a Timestream owned Amazon KMS key. To+ -- specify a KMS key, use the key ID, key ARN, alias name, or alias ARN.+ -- When using an alias name, prefix the name with /alias\//+ --+ -- If ErrorReportConfiguration uses @SSE_KMS@ as encryption type, the same+ -- KmsKeyId is used to encrypt the error report at rest.+ kmsKeyId :: Prelude.Maybe Prelude.Text,+ -- | A list of key-value pairs to label the scheduled query.+ tags :: Prelude.Maybe [Tag],+ -- | Configuration used for writing the result of a query.+ targetConfiguration :: Prelude.Maybe TargetConfiguration,+ -- | Name of the scheduled query.+ name :: Prelude.Text,+ -- | The query string to run. Parameter names can be specified in the query+ -- string @\@@ character followed by an identifier. The named Parameter+ -- @\@scheduled_runtime@ is reserved and can be used in the query to get+ -- the time at which the query is scheduled to run.+ --+ -- The timestamp calculated according to the ScheduleConfiguration+ -- parameter, will be the value of @\@scheduled_runtime@ paramater for each+ -- query run. For example, consider an instance of a scheduled query+ -- executing on 2021-12-01 00:00:00. For this instance, the+ -- @\@scheduled_runtime@ parameter is initialized to the timestamp+ -- 2021-12-01 00:00:00 when invoking the query.+ queryString :: Data.Sensitive Prelude.Text,+ -- | The schedule configuration for the query.+ scheduleConfiguration :: ScheduleConfiguration,+ -- | Notification configuration for the scheduled query. A notification is+ -- sent by Timestream when a query run finishes, when the state is updated+ -- or when you delete it.+ notificationConfiguration :: NotificationConfiguration,+ -- | The ARN for the IAM role that Timestream will assume when running the+ -- scheduled query.+ scheduledQueryExecutionRoleArn :: Prelude.Text,+ -- | Configuration for error reporting. Error reports will be generated when+ -- a problem is encountered when writing the query results.+ errorReportConfiguration :: ErrorReportConfiguration+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateScheduledQuery' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'createScheduledQuery_clientToken' - Using a ClientToken makes the call to CreateScheduledQuery idempotent,+-- in other words, making the same request repeatedly will produce the same+-- result. Making multiple identical CreateScheduledQuery requests has the+-- same effect as making a single request.+--+-- - If CreateScheduledQuery is called without a @ClientToken@, the Query+-- SDK generates a @ClientToken@ on your behalf.+--+-- - After 8 hours, any request with the same @ClientToken@ is treated as+-- a new request.+--+-- 'kmsKeyId', 'createScheduledQuery_kmsKeyId' - The Amazon KMS key used to encrypt the scheduled query resource,+-- at-rest. If the Amazon KMS key is not specified, the scheduled query+-- resource will be encrypted with a Timestream owned Amazon KMS key. To+-- specify a KMS key, use the key ID, key ARN, alias name, or alias ARN.+-- When using an alias name, prefix the name with /alias\//+--+-- If ErrorReportConfiguration uses @SSE_KMS@ as encryption type, the same+-- KmsKeyId is used to encrypt the error report at rest.+--+-- 'tags', 'createScheduledQuery_tags' - A list of key-value pairs to label the scheduled query.+--+-- 'targetConfiguration', 'createScheduledQuery_targetConfiguration' - Configuration used for writing the result of a query.+--+-- 'name', 'createScheduledQuery_name' - Name of the scheduled query.+--+-- 'queryString', 'createScheduledQuery_queryString' - The query string to run. Parameter names can be specified in the query+-- string @\@@ character followed by an identifier. The named Parameter+-- @\@scheduled_runtime@ is reserved and can be used in the query to get+-- the time at which the query is scheduled to run.+--+-- The timestamp calculated according to the ScheduleConfiguration+-- parameter, will be the value of @\@scheduled_runtime@ paramater for each+-- query run. For example, consider an instance of a scheduled query+-- executing on 2021-12-01 00:00:00. For this instance, the+-- @\@scheduled_runtime@ parameter is initialized to the timestamp+-- 2021-12-01 00:00:00 when invoking the query.+--+-- 'scheduleConfiguration', 'createScheduledQuery_scheduleConfiguration' - The schedule configuration for the query.+--+-- 'notificationConfiguration', 'createScheduledQuery_notificationConfiguration' - Notification configuration for the scheduled query. A notification is+-- sent by Timestream when a query run finishes, when the state is updated+-- or when you delete it.+--+-- 'scheduledQueryExecutionRoleArn', 'createScheduledQuery_scheduledQueryExecutionRoleArn' - The ARN for the IAM role that Timestream will assume when running the+-- scheduled query.+--+-- 'errorReportConfiguration', 'createScheduledQuery_errorReportConfiguration' - Configuration for error reporting. Error reports will be generated when+-- a problem is encountered when writing the query results.+newCreateScheduledQuery ::+ -- | 'name'+ Prelude.Text ->+ -- | 'queryString'+ Prelude.Text ->+ -- | 'scheduleConfiguration'+ ScheduleConfiguration ->+ -- | 'notificationConfiguration'+ NotificationConfiguration ->+ -- | 'scheduledQueryExecutionRoleArn'+ Prelude.Text ->+ -- | 'errorReportConfiguration'+ ErrorReportConfiguration ->+ CreateScheduledQuery+newCreateScheduledQuery+ pName_+ pQueryString_+ pScheduleConfiguration_+ pNotificationConfiguration_+ pScheduledQueryExecutionRoleArn_+ pErrorReportConfiguration_ =+ CreateScheduledQuery'+ { clientToken =+ Prelude.Nothing,+ kmsKeyId = Prelude.Nothing,+ tags = Prelude.Nothing,+ targetConfiguration = Prelude.Nothing,+ name = pName_,+ queryString = Data._Sensitive Lens.# pQueryString_,+ scheduleConfiguration = pScheduleConfiguration_,+ notificationConfiguration =+ pNotificationConfiguration_,+ scheduledQueryExecutionRoleArn =+ pScheduledQueryExecutionRoleArn_,+ errorReportConfiguration =+ pErrorReportConfiguration_+ }++-- | Using a ClientToken makes the call to CreateScheduledQuery idempotent,+-- in other words, making the same request repeatedly will produce the same+-- result. Making multiple identical CreateScheduledQuery requests has the+-- same effect as making a single request.+--+-- - If CreateScheduledQuery is called without a @ClientToken@, the Query+-- SDK generates a @ClientToken@ on your behalf.+--+-- - After 8 hours, any request with the same @ClientToken@ is treated as+-- a new request.+createScheduledQuery_clientToken :: Lens.Lens' CreateScheduledQuery (Prelude.Maybe Prelude.Text)+createScheduledQuery_clientToken = Lens.lens (\CreateScheduledQuery' {clientToken} -> clientToken) (\s@CreateScheduledQuery' {} a -> s {clientToken = a} :: CreateScheduledQuery) Prelude.. Lens.mapping Data._Sensitive++-- | The Amazon KMS key used to encrypt the scheduled query resource,+-- at-rest. If the Amazon KMS key is not specified, the scheduled query+-- resource will be encrypted with a Timestream owned Amazon KMS key. To+-- specify a KMS key, use the key ID, key ARN, alias name, or alias ARN.+-- When using an alias name, prefix the name with /alias\//+--+-- If ErrorReportConfiguration uses @SSE_KMS@ as encryption type, the same+-- KmsKeyId is used to encrypt the error report at rest.+createScheduledQuery_kmsKeyId :: Lens.Lens' CreateScheduledQuery (Prelude.Maybe Prelude.Text)+createScheduledQuery_kmsKeyId = Lens.lens (\CreateScheduledQuery' {kmsKeyId} -> kmsKeyId) (\s@CreateScheduledQuery' {} a -> s {kmsKeyId = a} :: CreateScheduledQuery)++-- | A list of key-value pairs to label the scheduled query.+createScheduledQuery_tags :: Lens.Lens' CreateScheduledQuery (Prelude.Maybe [Tag])+createScheduledQuery_tags = Lens.lens (\CreateScheduledQuery' {tags} -> tags) (\s@CreateScheduledQuery' {} a -> s {tags = a} :: CreateScheduledQuery) Prelude.. Lens.mapping Lens.coerced++-- | Configuration used for writing the result of a query.+createScheduledQuery_targetConfiguration :: Lens.Lens' CreateScheduledQuery (Prelude.Maybe TargetConfiguration)+createScheduledQuery_targetConfiguration = Lens.lens (\CreateScheduledQuery' {targetConfiguration} -> targetConfiguration) (\s@CreateScheduledQuery' {} a -> s {targetConfiguration = a} :: CreateScheduledQuery)++-- | Name of the scheduled query.+createScheduledQuery_name :: Lens.Lens' CreateScheduledQuery Prelude.Text+createScheduledQuery_name = Lens.lens (\CreateScheduledQuery' {name} -> name) (\s@CreateScheduledQuery' {} a -> s {name = a} :: CreateScheduledQuery)++-- | The query string to run. Parameter names can be specified in the query+-- string @\@@ character followed by an identifier. The named Parameter+-- @\@scheduled_runtime@ is reserved and can be used in the query to get+-- the time at which the query is scheduled to run.+--+-- The timestamp calculated according to the ScheduleConfiguration+-- parameter, will be the value of @\@scheduled_runtime@ paramater for each+-- query run. For example, consider an instance of a scheduled query+-- executing on 2021-12-01 00:00:00. For this instance, the+-- @\@scheduled_runtime@ parameter is initialized to the timestamp+-- 2021-12-01 00:00:00 when invoking the query.+createScheduledQuery_queryString :: Lens.Lens' CreateScheduledQuery Prelude.Text+createScheduledQuery_queryString = Lens.lens (\CreateScheduledQuery' {queryString} -> queryString) (\s@CreateScheduledQuery' {} a -> s {queryString = a} :: CreateScheduledQuery) Prelude.. Data._Sensitive++-- | The schedule configuration for the query.+createScheduledQuery_scheduleConfiguration :: Lens.Lens' CreateScheduledQuery ScheduleConfiguration+createScheduledQuery_scheduleConfiguration = Lens.lens (\CreateScheduledQuery' {scheduleConfiguration} -> scheduleConfiguration) (\s@CreateScheduledQuery' {} a -> s {scheduleConfiguration = a} :: CreateScheduledQuery)++-- | Notification configuration for the scheduled query. A notification is+-- sent by Timestream when a query run finishes, when the state is updated+-- or when you delete it.+createScheduledQuery_notificationConfiguration :: Lens.Lens' CreateScheduledQuery NotificationConfiguration+createScheduledQuery_notificationConfiguration = Lens.lens (\CreateScheduledQuery' {notificationConfiguration} -> notificationConfiguration) (\s@CreateScheduledQuery' {} a -> s {notificationConfiguration = a} :: CreateScheduledQuery)++-- | The ARN for the IAM role that Timestream will assume when running the+-- scheduled query.+createScheduledQuery_scheduledQueryExecutionRoleArn :: Lens.Lens' CreateScheduledQuery Prelude.Text+createScheduledQuery_scheduledQueryExecutionRoleArn = Lens.lens (\CreateScheduledQuery' {scheduledQueryExecutionRoleArn} -> scheduledQueryExecutionRoleArn) (\s@CreateScheduledQuery' {} a -> s {scheduledQueryExecutionRoleArn = a} :: CreateScheduledQuery)++-- | Configuration for error reporting. Error reports will be generated when+-- a problem is encountered when writing the query results.+createScheduledQuery_errorReportConfiguration :: Lens.Lens' CreateScheduledQuery ErrorReportConfiguration+createScheduledQuery_errorReportConfiguration = Lens.lens (\CreateScheduledQuery' {errorReportConfiguration} -> errorReportConfiguration) (\s@CreateScheduledQuery' {} a -> s {errorReportConfiguration = a} :: CreateScheduledQuery)++instance Core.AWSRequest CreateScheduledQuery where+ type+ AWSResponse CreateScheduledQuery =+ CreateScheduledQueryResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateScheduledQueryResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "Arn")+ )++instance Prelude.Hashable CreateScheduledQuery where+ hashWithSalt _salt CreateScheduledQuery' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` kmsKeyId+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` targetConfiguration+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` queryString+ `Prelude.hashWithSalt` scheduleConfiguration+ `Prelude.hashWithSalt` notificationConfiguration+ `Prelude.hashWithSalt` scheduledQueryExecutionRoleArn+ `Prelude.hashWithSalt` errorReportConfiguration++instance Prelude.NFData CreateScheduledQuery where+ rnf CreateScheduledQuery' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf kmsKeyId+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf targetConfiguration+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf queryString+ `Prelude.seq` Prelude.rnf scheduleConfiguration+ `Prelude.seq` Prelude.rnf notificationConfiguration+ `Prelude.seq` Prelude.rnf scheduledQueryExecutionRoleArn+ `Prelude.seq` Prelude.rnf errorReportConfiguration++instance Data.ToHeaders CreateScheduledQuery where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.CreateScheduledQuery" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateScheduledQuery where+ toJSON CreateScheduledQuery' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("KmsKeyId" Data..=) Prelude.<$> kmsKeyId,+ ("Tags" Data..=) Prelude.<$> tags,+ ("TargetConfiguration" Data..=)+ Prelude.<$> targetConfiguration,+ Prelude.Just ("Name" Data..= name),+ Prelude.Just ("QueryString" Data..= queryString),+ Prelude.Just+ ( "ScheduleConfiguration"+ Data..= scheduleConfiguration+ ),+ Prelude.Just+ ( "NotificationConfiguration"+ Data..= notificationConfiguration+ ),+ Prelude.Just+ ( "ScheduledQueryExecutionRoleArn"+ Data..= scheduledQueryExecutionRoleArn+ ),+ Prelude.Just+ ( "ErrorReportConfiguration"+ Data..= errorReportConfiguration+ )+ ]+ )++instance Data.ToPath CreateScheduledQuery where+ toPath = Prelude.const "/"++instance Data.ToQuery CreateScheduledQuery where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateScheduledQueryResponse' smart constructor.+data CreateScheduledQueryResponse = CreateScheduledQueryResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | ARN for the created scheduled query.+ arn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateScheduledQueryResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'createScheduledQueryResponse_httpStatus' - The response's http status code.+--+-- 'arn', 'createScheduledQueryResponse_arn' - ARN for the created scheduled query.+newCreateScheduledQueryResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'arn'+ Prelude.Text ->+ CreateScheduledQueryResponse+newCreateScheduledQueryResponse pHttpStatus_ pArn_ =+ CreateScheduledQueryResponse'+ { httpStatus =+ pHttpStatus_,+ arn = pArn_+ }++-- | The response's http status code.+createScheduledQueryResponse_httpStatus :: Lens.Lens' CreateScheduledQueryResponse Prelude.Int+createScheduledQueryResponse_httpStatus = Lens.lens (\CreateScheduledQueryResponse' {httpStatus} -> httpStatus) (\s@CreateScheduledQueryResponse' {} a -> s {httpStatus = a} :: CreateScheduledQueryResponse)++-- | ARN for the created scheduled query.+createScheduledQueryResponse_arn :: Lens.Lens' CreateScheduledQueryResponse Prelude.Text+createScheduledQueryResponse_arn = Lens.lens (\CreateScheduledQueryResponse' {arn} -> arn) (\s@CreateScheduledQueryResponse' {} a -> s {arn = a} :: CreateScheduledQueryResponse)++instance Prelude.NFData CreateScheduledQueryResponse where+ rnf CreateScheduledQueryResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf arn
+ gen/Amazonka/TimeStreamQuery/DeleteScheduledQuery.hs view
@@ -0,0 +1,139 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.DeleteScheduledQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a given scheduled query. This is an irreversible operation.+module Amazonka.TimeStreamQuery.DeleteScheduledQuery+ ( -- * Creating a Request+ DeleteScheduledQuery (..),+ newDeleteScheduledQuery,++ -- * Request Lenses+ deleteScheduledQuery_scheduledQueryArn,++ -- * Destructuring the Response+ DeleteScheduledQueryResponse (..),+ newDeleteScheduledQueryResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newDeleteScheduledQuery' smart constructor.+data DeleteScheduledQuery = DeleteScheduledQuery'+ { -- | The ARN of the scheduled query.+ scheduledQueryArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteScheduledQuery' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'scheduledQueryArn', 'deleteScheduledQuery_scheduledQueryArn' - The ARN of the scheduled query.+newDeleteScheduledQuery ::+ -- | 'scheduledQueryArn'+ Prelude.Text ->+ DeleteScheduledQuery+newDeleteScheduledQuery pScheduledQueryArn_ =+ DeleteScheduledQuery'+ { scheduledQueryArn =+ pScheduledQueryArn_+ }++-- | The ARN of the scheduled query.+deleteScheduledQuery_scheduledQueryArn :: Lens.Lens' DeleteScheduledQuery Prelude.Text+deleteScheduledQuery_scheduledQueryArn = Lens.lens (\DeleteScheduledQuery' {scheduledQueryArn} -> scheduledQueryArn) (\s@DeleteScheduledQuery' {} a -> s {scheduledQueryArn = a} :: DeleteScheduledQuery)++instance Core.AWSRequest DeleteScheduledQuery where+ type+ AWSResponse DeleteScheduledQuery =+ DeleteScheduledQueryResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull DeleteScheduledQueryResponse'++instance Prelude.Hashable DeleteScheduledQuery where+ hashWithSalt _salt DeleteScheduledQuery' {..} =+ _salt `Prelude.hashWithSalt` scheduledQueryArn++instance Prelude.NFData DeleteScheduledQuery where+ rnf DeleteScheduledQuery' {..} =+ Prelude.rnf scheduledQueryArn++instance Data.ToHeaders DeleteScheduledQuery where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.DeleteScheduledQuery" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteScheduledQuery where+ toJSON DeleteScheduledQuery' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("ScheduledQueryArn" Data..= scheduledQueryArn)+ ]+ )++instance Data.ToPath DeleteScheduledQuery where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteScheduledQuery where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteScheduledQueryResponse' smart constructor.+data DeleteScheduledQueryResponse = DeleteScheduledQueryResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteScheduledQueryResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDeleteScheduledQueryResponse ::+ DeleteScheduledQueryResponse+newDeleteScheduledQueryResponse =+ DeleteScheduledQueryResponse'++instance Prelude.NFData DeleteScheduledQueryResponse where+ rnf _ = ()
+ gen/Amazonka/TimeStreamQuery/DescribeEndpoints.hs view
@@ -0,0 +1,169 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.DescribeEndpoints+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- DescribeEndpoints returns a list of available endpoints to make+-- Timestream API calls against. This API is available through both Write+-- and Query.+--+-- Because the Timestream SDKs are designed to transparently work with the+-- service’s architecture, including the management and mapping of the+-- service endpoints, /it is not recommended that you use this API unless/:+--+-- - You are using+-- <https://docs.aws.amazon.com/timestream/latest/developerguide/VPCEndpoints VPC endpoints (Amazon Web Services PrivateLink) with Timestream>+--+-- - Your application uses a programming language that does not yet have+-- SDK support+--+-- - You require better control over the client-side implementation+--+-- For detailed information on how and when to use and implement+-- DescribeEndpoints, see+-- <https://docs.aws.amazon.com/timestream/latest/developerguide/Using.API.html#Using-API.endpoint-discovery The Endpoint Discovery Pattern>.+module Amazonka.TimeStreamQuery.DescribeEndpoints+ ( -- * Creating a Request+ DescribeEndpoints (..),+ newDescribeEndpoints,++ -- * Destructuring the Response+ DescribeEndpointsResponse (..),+ newDescribeEndpointsResponse,++ -- * Response Lenses+ describeEndpointsResponse_httpStatus,+ describeEndpointsResponse_endpoints,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newDescribeEndpoints' smart constructor.+data DescribeEndpoints = DescribeEndpoints'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeEndpoints' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDescribeEndpoints ::+ DescribeEndpoints+newDescribeEndpoints = DescribeEndpoints'++instance Core.AWSRequest DescribeEndpoints where+ type+ AWSResponse DescribeEndpoints =+ DescribeEndpointsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeEndpointsResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "Endpoints" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable DescribeEndpoints where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance Prelude.NFData DescribeEndpoints where+ rnf _ = ()++instance Data.ToHeaders DescribeEndpoints where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.DescribeEndpoints" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeEndpoints where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath DescribeEndpoints where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeEndpoints where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeEndpointsResponse' smart constructor.+data DescribeEndpointsResponse = DescribeEndpointsResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An @Endpoints@ object is returned when a @DescribeEndpoints@ request is+ -- made.+ endpoints :: [Endpoint]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeEndpointsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'describeEndpointsResponse_httpStatus' - The response's http status code.+--+-- 'endpoints', 'describeEndpointsResponse_endpoints' - An @Endpoints@ object is returned when a @DescribeEndpoints@ request is+-- made.+newDescribeEndpointsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeEndpointsResponse+newDescribeEndpointsResponse pHttpStatus_ =+ DescribeEndpointsResponse'+ { httpStatus =+ pHttpStatus_,+ endpoints = Prelude.mempty+ }++-- | The response's http status code.+describeEndpointsResponse_httpStatus :: Lens.Lens' DescribeEndpointsResponse Prelude.Int+describeEndpointsResponse_httpStatus = Lens.lens (\DescribeEndpointsResponse' {httpStatus} -> httpStatus) (\s@DescribeEndpointsResponse' {} a -> s {httpStatus = a} :: DescribeEndpointsResponse)++-- | An @Endpoints@ object is returned when a @DescribeEndpoints@ request is+-- made.+describeEndpointsResponse_endpoints :: Lens.Lens' DescribeEndpointsResponse [Endpoint]+describeEndpointsResponse_endpoints = Lens.lens (\DescribeEndpointsResponse' {endpoints} -> endpoints) (\s@DescribeEndpointsResponse' {} a -> s {endpoints = a} :: DescribeEndpointsResponse) Prelude.. Lens.coerced++instance Prelude.NFData DescribeEndpointsResponse where+ rnf DescribeEndpointsResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf endpoints
+ gen/Amazonka/TimeStreamQuery/DescribeScheduledQuery.hs view
@@ -0,0 +1,181 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.DescribeScheduledQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Provides detailed information about a scheduled query.+module Amazonka.TimeStreamQuery.DescribeScheduledQuery+ ( -- * Creating a Request+ DescribeScheduledQuery (..),+ newDescribeScheduledQuery,++ -- * Request Lenses+ describeScheduledQuery_scheduledQueryArn,++ -- * Destructuring the Response+ DescribeScheduledQueryResponse (..),+ newDescribeScheduledQueryResponse,++ -- * Response Lenses+ describeScheduledQueryResponse_httpStatus,+ describeScheduledQueryResponse_scheduledQuery,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newDescribeScheduledQuery' smart constructor.+data DescribeScheduledQuery = DescribeScheduledQuery'+ { -- | The ARN of the scheduled query.+ scheduledQueryArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeScheduledQuery' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'scheduledQueryArn', 'describeScheduledQuery_scheduledQueryArn' - The ARN of the scheduled query.+newDescribeScheduledQuery ::+ -- | 'scheduledQueryArn'+ Prelude.Text ->+ DescribeScheduledQuery+newDescribeScheduledQuery pScheduledQueryArn_ =+ DescribeScheduledQuery'+ { scheduledQueryArn =+ pScheduledQueryArn_+ }++-- | The ARN of the scheduled query.+describeScheduledQuery_scheduledQueryArn :: Lens.Lens' DescribeScheduledQuery Prelude.Text+describeScheduledQuery_scheduledQueryArn = Lens.lens (\DescribeScheduledQuery' {scheduledQueryArn} -> scheduledQueryArn) (\s@DescribeScheduledQuery' {} a -> s {scheduledQueryArn = a} :: DescribeScheduledQuery)++instance Core.AWSRequest DescribeScheduledQuery where+ type+ AWSResponse DescribeScheduledQuery =+ DescribeScheduledQueryResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeScheduledQueryResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "ScheduledQuery")+ )++instance Prelude.Hashable DescribeScheduledQuery where+ hashWithSalt _salt DescribeScheduledQuery' {..} =+ _salt `Prelude.hashWithSalt` scheduledQueryArn++instance Prelude.NFData DescribeScheduledQuery where+ rnf DescribeScheduledQuery' {..} =+ Prelude.rnf scheduledQueryArn++instance Data.ToHeaders DescribeScheduledQuery where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.DescribeScheduledQuery" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DescribeScheduledQuery where+ toJSON DescribeScheduledQuery' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("ScheduledQueryArn" Data..= scheduledQueryArn)+ ]+ )++instance Data.ToPath DescribeScheduledQuery where+ toPath = Prelude.const "/"++instance Data.ToQuery DescribeScheduledQuery where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeScheduledQueryResponse' smart constructor.+data DescribeScheduledQueryResponse = DescribeScheduledQueryResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The scheduled query.+ scheduledQuery :: ScheduledQueryDescription+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeScheduledQueryResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'describeScheduledQueryResponse_httpStatus' - The response's http status code.+--+-- 'scheduledQuery', 'describeScheduledQueryResponse_scheduledQuery' - The scheduled query.+newDescribeScheduledQueryResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'scheduledQuery'+ ScheduledQueryDescription ->+ DescribeScheduledQueryResponse+newDescribeScheduledQueryResponse+ pHttpStatus_+ pScheduledQuery_ =+ DescribeScheduledQueryResponse'+ { httpStatus =+ pHttpStatus_,+ scheduledQuery = pScheduledQuery_+ }++-- | The response's http status code.+describeScheduledQueryResponse_httpStatus :: Lens.Lens' DescribeScheduledQueryResponse Prelude.Int+describeScheduledQueryResponse_httpStatus = Lens.lens (\DescribeScheduledQueryResponse' {httpStatus} -> httpStatus) (\s@DescribeScheduledQueryResponse' {} a -> s {httpStatus = a} :: DescribeScheduledQueryResponse)++-- | The scheduled query.+describeScheduledQueryResponse_scheduledQuery :: Lens.Lens' DescribeScheduledQueryResponse ScheduledQueryDescription+describeScheduledQueryResponse_scheduledQuery = Lens.lens (\DescribeScheduledQueryResponse' {scheduledQuery} -> scheduledQuery) (\s@DescribeScheduledQueryResponse' {} a -> s {scheduledQuery = a} :: DescribeScheduledQueryResponse)++instance+ Prelude.NFData+ DescribeScheduledQueryResponse+ where+ rnf DescribeScheduledQueryResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf scheduledQuery
+ gen/Amazonka/TimeStreamQuery/ExecuteScheduledQuery.hs view
@@ -0,0 +1,174 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.ExecuteScheduledQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- You can use this API to run a scheduled query manually.+module Amazonka.TimeStreamQuery.ExecuteScheduledQuery+ ( -- * Creating a Request+ ExecuteScheduledQuery (..),+ newExecuteScheduledQuery,++ -- * Request Lenses+ executeScheduledQuery_clientToken,+ executeScheduledQuery_scheduledQueryArn,+ executeScheduledQuery_invocationTime,++ -- * Destructuring the Response+ ExecuteScheduledQueryResponse (..),+ newExecuteScheduledQueryResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newExecuteScheduledQuery' smart constructor.+data ExecuteScheduledQuery = ExecuteScheduledQuery'+ { -- | Not used.+ clientToken :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | ARN of the scheduled query.+ scheduledQueryArn :: Prelude.Text,+ -- | The timestamp in UTC. Query will be run as if it was invoked at this+ -- timestamp.+ invocationTime :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExecuteScheduledQuery' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'executeScheduledQuery_clientToken' - Not used.+--+-- 'scheduledQueryArn', 'executeScheduledQuery_scheduledQueryArn' - ARN of the scheduled query.+--+-- 'invocationTime', 'executeScheduledQuery_invocationTime' - The timestamp in UTC. Query will be run as if it was invoked at this+-- timestamp.+newExecuteScheduledQuery ::+ -- | 'scheduledQueryArn'+ Prelude.Text ->+ -- | 'invocationTime'+ Prelude.UTCTime ->+ ExecuteScheduledQuery+newExecuteScheduledQuery+ pScheduledQueryArn_+ pInvocationTime_ =+ ExecuteScheduledQuery'+ { clientToken =+ Prelude.Nothing,+ scheduledQueryArn = pScheduledQueryArn_,+ invocationTime = Data._Time Lens.# pInvocationTime_+ }++-- | Not used.+executeScheduledQuery_clientToken :: Lens.Lens' ExecuteScheduledQuery (Prelude.Maybe Prelude.Text)+executeScheduledQuery_clientToken = Lens.lens (\ExecuteScheduledQuery' {clientToken} -> clientToken) (\s@ExecuteScheduledQuery' {} a -> s {clientToken = a} :: ExecuteScheduledQuery) Prelude.. Lens.mapping Data._Sensitive++-- | ARN of the scheduled query.+executeScheduledQuery_scheduledQueryArn :: Lens.Lens' ExecuteScheduledQuery Prelude.Text+executeScheduledQuery_scheduledQueryArn = Lens.lens (\ExecuteScheduledQuery' {scheduledQueryArn} -> scheduledQueryArn) (\s@ExecuteScheduledQuery' {} a -> s {scheduledQueryArn = a} :: ExecuteScheduledQuery)++-- | The timestamp in UTC. Query will be run as if it was invoked at this+-- timestamp.+executeScheduledQuery_invocationTime :: Lens.Lens' ExecuteScheduledQuery Prelude.UTCTime+executeScheduledQuery_invocationTime = Lens.lens (\ExecuteScheduledQuery' {invocationTime} -> invocationTime) (\s@ExecuteScheduledQuery' {} a -> s {invocationTime = a} :: ExecuteScheduledQuery) Prelude.. Data._Time++instance Core.AWSRequest ExecuteScheduledQuery where+ type+ AWSResponse ExecuteScheduledQuery =+ ExecuteScheduledQueryResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull ExecuteScheduledQueryResponse'++instance Prelude.Hashable ExecuteScheduledQuery where+ hashWithSalt _salt ExecuteScheduledQuery' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` scheduledQueryArn+ `Prelude.hashWithSalt` invocationTime++instance Prelude.NFData ExecuteScheduledQuery where+ rnf ExecuteScheduledQuery' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf scheduledQueryArn+ `Prelude.seq` Prelude.rnf invocationTime++instance Data.ToHeaders ExecuteScheduledQuery where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.ExecuteScheduledQuery" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ExecuteScheduledQuery where+ toJSON ExecuteScheduledQuery' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ Prelude.Just+ ("ScheduledQueryArn" Data..= scheduledQueryArn),+ Prelude.Just+ ("InvocationTime" Data..= invocationTime)+ ]+ )++instance Data.ToPath ExecuteScheduledQuery where+ toPath = Prelude.const "/"++instance Data.ToQuery ExecuteScheduledQuery where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newExecuteScheduledQueryResponse' smart constructor.+data ExecuteScheduledQueryResponse = ExecuteScheduledQueryResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExecuteScheduledQueryResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newExecuteScheduledQueryResponse ::+ ExecuteScheduledQueryResponse+newExecuteScheduledQueryResponse =+ ExecuteScheduledQueryResponse'++instance Prelude.NFData ExecuteScheduledQueryResponse where+ rnf _ = ()
+ gen/Amazonka/TimeStreamQuery/Lens.hs view
@@ -0,0 +1,301 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Lens+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Lens+ ( -- * Operations++ -- ** CancelQuery+ cancelQuery_queryId,+ cancelQueryResponse_cancellationMessage,+ cancelQueryResponse_httpStatus,++ -- ** CreateScheduledQuery+ createScheduledQuery_clientToken,+ createScheduledQuery_kmsKeyId,+ createScheduledQuery_tags,+ createScheduledQuery_targetConfiguration,+ createScheduledQuery_name,+ createScheduledQuery_queryString,+ createScheduledQuery_scheduleConfiguration,+ createScheduledQuery_notificationConfiguration,+ createScheduledQuery_scheduledQueryExecutionRoleArn,+ createScheduledQuery_errorReportConfiguration,+ createScheduledQueryResponse_httpStatus,+ createScheduledQueryResponse_arn,++ -- ** DeleteScheduledQuery+ deleteScheduledQuery_scheduledQueryArn,++ -- ** DescribeEndpoints+ describeEndpointsResponse_httpStatus,+ describeEndpointsResponse_endpoints,++ -- ** DescribeScheduledQuery+ describeScheduledQuery_scheduledQueryArn,+ describeScheduledQueryResponse_httpStatus,+ describeScheduledQueryResponse_scheduledQuery,++ -- ** ExecuteScheduledQuery+ executeScheduledQuery_clientToken,+ executeScheduledQuery_scheduledQueryArn,+ executeScheduledQuery_invocationTime,++ -- ** ListScheduledQueries+ listScheduledQueries_maxResults,+ listScheduledQueries_nextToken,+ listScheduledQueriesResponse_nextToken,+ listScheduledQueriesResponse_httpStatus,+ listScheduledQueriesResponse_scheduledQueries,++ -- ** ListTagsForResource+ listTagsForResource_maxResults,+ listTagsForResource_nextToken,+ listTagsForResource_resourceARN,+ listTagsForResourceResponse_nextToken,+ listTagsForResourceResponse_httpStatus,+ listTagsForResourceResponse_tags,++ -- ** PrepareQuery+ prepareQuery_validateOnly,+ prepareQuery_queryString,+ prepareQueryResponse_httpStatus,+ prepareQueryResponse_queryString,+ prepareQueryResponse_columns,+ prepareQueryResponse_parameters,++ -- ** Query+ query_clientToken,+ query_maxRows,+ query_nextToken,+ query_queryString,+ queryResponse_nextToken,+ queryResponse_queryStatus,+ queryResponse_httpStatus,+ queryResponse_queryId,+ queryResponse_rows,+ queryResponse_columnInfo,++ -- ** TagResource+ tagResource_resourceARN,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceARN,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdateScheduledQuery+ updateScheduledQuery_scheduledQueryArn,+ updateScheduledQuery_state,++ -- * Types++ -- ** ColumnInfo+ columnInfo_name,+ columnInfo_type,++ -- ** Datum+ datum_arrayValue,+ datum_nullValue,+ datum_rowValue,+ datum_scalarValue,+ datum_timeSeriesValue,++ -- ** DimensionMapping+ dimensionMapping_name,+ dimensionMapping_dimensionValueType,++ -- ** Endpoint+ endpoint_address,+ endpoint_cachePeriodInMinutes,++ -- ** ErrorReportConfiguration+ errorReportConfiguration_s3Configuration,++ -- ** ErrorReportLocation+ errorReportLocation_s3ReportLocation,++ -- ** ExecutionStats+ executionStats_bytesMetered,+ executionStats_dataWrites,+ executionStats_executionTimeInMillis,+ executionStats_queryResultRows,+ executionStats_recordsIngested,++ -- ** MixedMeasureMapping+ mixedMeasureMapping_measureName,+ mixedMeasureMapping_multiMeasureAttributeMappings,+ mixedMeasureMapping_sourceColumn,+ mixedMeasureMapping_targetMeasureName,+ mixedMeasureMapping_measureValueType,++ -- ** MultiMeasureAttributeMapping+ multiMeasureAttributeMapping_targetMultiMeasureAttributeName,+ multiMeasureAttributeMapping_sourceColumn,+ multiMeasureAttributeMapping_measureValueType,++ -- ** MultiMeasureMappings+ multiMeasureMappings_targetMultiMeasureName,+ multiMeasureMappings_multiMeasureAttributeMappings,++ -- ** NotificationConfiguration+ notificationConfiguration_snsConfiguration,++ -- ** ParameterMapping+ parameterMapping_name,+ parameterMapping_type,++ -- ** QueryStatus+ queryStatus_cumulativeBytesMetered,+ queryStatus_cumulativeBytesScanned,+ queryStatus_progressPercentage,++ -- ** Row+ row_data,++ -- ** S3Configuration+ s3Configuration_encryptionOption,+ s3Configuration_objectKeyPrefix,+ s3Configuration_bucketName,++ -- ** S3ReportLocation+ s3ReportLocation_bucketName,+ s3ReportLocation_objectKey,++ -- ** ScheduleConfiguration+ scheduleConfiguration_scheduleExpression,++ -- ** ScheduledQuery+ scheduledQuery_creationTime,+ scheduledQuery_errorReportConfiguration,+ scheduledQuery_lastRunStatus,+ scheduledQuery_nextInvocationTime,+ scheduledQuery_previousInvocationTime,+ scheduledQuery_targetDestination,+ scheduledQuery_arn,+ scheduledQuery_name,+ scheduledQuery_state,++ -- ** ScheduledQueryDescription+ scheduledQueryDescription_creationTime,+ scheduledQueryDescription_errorReportConfiguration,+ scheduledQueryDescription_kmsKeyId,+ scheduledQueryDescription_lastRunSummary,+ scheduledQueryDescription_nextInvocationTime,+ scheduledQueryDescription_previousInvocationTime,+ scheduledQueryDescription_recentlyFailedRuns,+ scheduledQueryDescription_scheduledQueryExecutionRoleArn,+ scheduledQueryDescription_targetConfiguration,+ scheduledQueryDescription_arn,+ scheduledQueryDescription_name,+ scheduledQueryDescription_queryString,+ scheduledQueryDescription_state,+ scheduledQueryDescription_scheduleConfiguration,+ scheduledQueryDescription_notificationConfiguration,++ -- ** ScheduledQueryRunSummary+ scheduledQueryRunSummary_errorReportLocation,+ scheduledQueryRunSummary_executionStats,+ scheduledQueryRunSummary_failureReason,+ scheduledQueryRunSummary_invocationTime,+ scheduledQueryRunSummary_runStatus,+ scheduledQueryRunSummary_triggerTime,++ -- ** SelectColumn+ selectColumn_aliased,+ selectColumn_databaseName,+ selectColumn_name,+ selectColumn_tableName,+ selectColumn_type,++ -- ** SnsConfiguration+ snsConfiguration_topicArn,++ -- ** Tag+ tag_key,+ tag_value,++ -- ** TargetConfiguration+ targetConfiguration_timestreamConfiguration,++ -- ** TargetDestination+ targetDestination_timestreamDestination,++ -- ** TimeSeriesDataPoint+ timeSeriesDataPoint_time,+ timeSeriesDataPoint_value,++ -- ** TimestreamConfiguration+ timestreamConfiguration_measureNameColumn,+ timestreamConfiguration_mixedMeasureMappings,+ timestreamConfiguration_multiMeasureMappings,+ timestreamConfiguration_databaseName,+ timestreamConfiguration_tableName,+ timestreamConfiguration_timeColumn,+ timestreamConfiguration_dimensionMappings,++ -- ** TimestreamDestination+ timestreamDestination_databaseName,+ timestreamDestination_tableName,++ -- ** Type+ type_arrayColumnInfo,+ type_rowColumnInfo,+ type_scalarType,+ type_timeSeriesMeasureValueColumnInfo,+ )+where++import Amazonka.TimeStreamQuery.CancelQuery+import Amazonka.TimeStreamQuery.CreateScheduledQuery+import Amazonka.TimeStreamQuery.DeleteScheduledQuery+import Amazonka.TimeStreamQuery.DescribeEndpoints+import Amazonka.TimeStreamQuery.DescribeScheduledQuery+import Amazonka.TimeStreamQuery.ExecuteScheduledQuery+import Amazonka.TimeStreamQuery.ListScheduledQueries+import Amazonka.TimeStreamQuery.ListTagsForResource+import Amazonka.TimeStreamQuery.PrepareQuery+import Amazonka.TimeStreamQuery.Query+import Amazonka.TimeStreamQuery.TagResource+import Amazonka.TimeStreamQuery.Types.ColumnInfo+import Amazonka.TimeStreamQuery.Types.Datum+import Amazonka.TimeStreamQuery.Types.DimensionMapping+import Amazonka.TimeStreamQuery.Types.Endpoint+import Amazonka.TimeStreamQuery.Types.ErrorReportConfiguration+import Amazonka.TimeStreamQuery.Types.ErrorReportLocation+import Amazonka.TimeStreamQuery.Types.ExecutionStats+import Amazonka.TimeStreamQuery.Types.MixedMeasureMapping+import Amazonka.TimeStreamQuery.Types.MultiMeasureAttributeMapping+import Amazonka.TimeStreamQuery.Types.MultiMeasureMappings+import Amazonka.TimeStreamQuery.Types.NotificationConfiguration+import Amazonka.TimeStreamQuery.Types.ParameterMapping+import Amazonka.TimeStreamQuery.Types.QueryStatus+import Amazonka.TimeStreamQuery.Types.Row+import Amazonka.TimeStreamQuery.Types.S3Configuration+import Amazonka.TimeStreamQuery.Types.S3ReportLocation+import Amazonka.TimeStreamQuery.Types.ScheduleConfiguration+import Amazonka.TimeStreamQuery.Types.ScheduledQuery+import Amazonka.TimeStreamQuery.Types.ScheduledQueryDescription+import Amazonka.TimeStreamQuery.Types.ScheduledQueryRunSummary+import Amazonka.TimeStreamQuery.Types.SelectColumn+import Amazonka.TimeStreamQuery.Types.SnsConfiguration+import Amazonka.TimeStreamQuery.Types.Tag+import Amazonka.TimeStreamQuery.Types.TargetConfiguration+import Amazonka.TimeStreamQuery.Types.TargetDestination+import Amazonka.TimeStreamQuery.Types.TimeSeriesDataPoint+import Amazonka.TimeStreamQuery.Types.TimestreamConfiguration+import Amazonka.TimeStreamQuery.Types.TimestreamDestination+import Amazonka.TimeStreamQuery.Types.Type+import Amazonka.TimeStreamQuery.UntagResource+import Amazonka.TimeStreamQuery.UpdateScheduledQuery
+ gen/Amazonka/TimeStreamQuery/ListScheduledQueries.hs view
@@ -0,0 +1,238 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.ListScheduledQueries+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets a list of all scheduled queries in the caller\'s Amazon account and+-- Region. @ListScheduledQueries@ is eventually consistent.+--+-- This operation returns paginated results.+module Amazonka.TimeStreamQuery.ListScheduledQueries+ ( -- * Creating a Request+ ListScheduledQueries (..),+ newListScheduledQueries,++ -- * Request Lenses+ listScheduledQueries_maxResults,+ listScheduledQueries_nextToken,++ -- * Destructuring the Response+ ListScheduledQueriesResponse (..),+ newListScheduledQueriesResponse,++ -- * Response Lenses+ listScheduledQueriesResponse_nextToken,+ listScheduledQueriesResponse_httpStatus,+ listScheduledQueriesResponse_scheduledQueries,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newListScheduledQueries' smart constructor.+data ListScheduledQueries = ListScheduledQueries'+ { -- | The maximum number of items to return in the output. If the total number+ -- of items available is more than the value specified, a @NextToken@ is+ -- provided in the output. To resume pagination, provide the @NextToken@+ -- value as the argument to the subsequent call to+ -- @ListScheduledQueriesRequest@.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A pagination token to resume pagination.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListScheduledQueries' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listScheduledQueries_maxResults' - The maximum number of items to return in the output. If the total number+-- of items available is more than the value specified, a @NextToken@ is+-- provided in the output. To resume pagination, provide the @NextToken@+-- value as the argument to the subsequent call to+-- @ListScheduledQueriesRequest@.+--+-- 'nextToken', 'listScheduledQueries_nextToken' - A pagination token to resume pagination.+newListScheduledQueries ::+ ListScheduledQueries+newListScheduledQueries =+ ListScheduledQueries'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of items to return in the output. If the total number+-- of items available is more than the value specified, a @NextToken@ is+-- provided in the output. To resume pagination, provide the @NextToken@+-- value as the argument to the subsequent call to+-- @ListScheduledQueriesRequest@.+listScheduledQueries_maxResults :: Lens.Lens' ListScheduledQueries (Prelude.Maybe Prelude.Natural)+listScheduledQueries_maxResults = Lens.lens (\ListScheduledQueries' {maxResults} -> maxResults) (\s@ListScheduledQueries' {} a -> s {maxResults = a} :: ListScheduledQueries)++-- | A pagination token to resume pagination.+listScheduledQueries_nextToken :: Lens.Lens' ListScheduledQueries (Prelude.Maybe Prelude.Text)+listScheduledQueries_nextToken = Lens.lens (\ListScheduledQueries' {nextToken} -> nextToken) (\s@ListScheduledQueries' {} a -> s {nextToken = a} :: ListScheduledQueries)++instance Core.AWSPager ListScheduledQueries where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listScheduledQueriesResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^. listScheduledQueriesResponse_scheduledQueries+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listScheduledQueries_nextToken+ Lens..~ rs+ Lens.^? listScheduledQueriesResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListScheduledQueries where+ type+ AWSResponse ListScheduledQueries =+ ListScheduledQueriesResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListScheduledQueriesResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> ( x+ Data..?> "ScheduledQueries"+ Core..!@ Prelude.mempty+ )+ )++instance Prelude.Hashable ListScheduledQueries where+ hashWithSalt _salt ListScheduledQueries' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListScheduledQueries where+ rnf ListScheduledQueries' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListScheduledQueries where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.ListScheduledQueries" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListScheduledQueries where+ toJSON ListScheduledQueries' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListScheduledQueries where+ toPath = Prelude.const "/"++instance Data.ToQuery ListScheduledQueries where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListScheduledQueriesResponse' smart constructor.+data ListScheduledQueriesResponse = ListScheduledQueriesResponse'+ { -- | A token to specify where to start paginating. This is the NextToken from+ -- a previously truncated response.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | A list of scheduled queries.+ scheduledQueries :: [ScheduledQuery]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListScheduledQueriesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listScheduledQueriesResponse_nextToken' - A token to specify where to start paginating. This is the NextToken from+-- a previously truncated response.+--+-- 'httpStatus', 'listScheduledQueriesResponse_httpStatus' - The response's http status code.+--+-- 'scheduledQueries', 'listScheduledQueriesResponse_scheduledQueries' - A list of scheduled queries.+newListScheduledQueriesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListScheduledQueriesResponse+newListScheduledQueriesResponse pHttpStatus_ =+ ListScheduledQueriesResponse'+ { nextToken =+ Prelude.Nothing,+ httpStatus = pHttpStatus_,+ scheduledQueries = Prelude.mempty+ }++-- | A token to specify where to start paginating. This is the NextToken from+-- a previously truncated response.+listScheduledQueriesResponse_nextToken :: Lens.Lens' ListScheduledQueriesResponse (Prelude.Maybe Prelude.Text)+listScheduledQueriesResponse_nextToken = Lens.lens (\ListScheduledQueriesResponse' {nextToken} -> nextToken) (\s@ListScheduledQueriesResponse' {} a -> s {nextToken = a} :: ListScheduledQueriesResponse)++-- | The response's http status code.+listScheduledQueriesResponse_httpStatus :: Lens.Lens' ListScheduledQueriesResponse Prelude.Int+listScheduledQueriesResponse_httpStatus = Lens.lens (\ListScheduledQueriesResponse' {httpStatus} -> httpStatus) (\s@ListScheduledQueriesResponse' {} a -> s {httpStatus = a} :: ListScheduledQueriesResponse)++-- | A list of scheduled queries.+listScheduledQueriesResponse_scheduledQueries :: Lens.Lens' ListScheduledQueriesResponse [ScheduledQuery]+listScheduledQueriesResponse_scheduledQueries = Lens.lens (\ListScheduledQueriesResponse' {scheduledQueries} -> scheduledQueries) (\s@ListScheduledQueriesResponse' {} a -> s {scheduledQueries = a} :: ListScheduledQueriesResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListScheduledQueriesResponse where+ rnf ListScheduledQueriesResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf scheduledQueries
+ gen/Amazonka/TimeStreamQuery/ListTagsForResource.hs view
@@ -0,0 +1,238 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.ListTagsForResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- List all tags on a Timestream query resource.+--+-- This operation returns paginated results.+module Amazonka.TimeStreamQuery.ListTagsForResource+ ( -- * Creating a Request+ ListTagsForResource (..),+ newListTagsForResource,++ -- * Request Lenses+ listTagsForResource_maxResults,+ listTagsForResource_nextToken,+ listTagsForResource_resourceARN,++ -- * Destructuring the Response+ ListTagsForResourceResponse (..),+ newListTagsForResourceResponse,++ -- * Response Lenses+ listTagsForResourceResponse_nextToken,+ listTagsForResourceResponse_httpStatus,+ listTagsForResourceResponse_tags,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+ { -- | The maximum number of tags to return.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A pagination token to resume pagination.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The Timestream resource with tags to be listed. This value is an Amazon+ -- Resource Name (ARN).+ resourceARN :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listTagsForResource_maxResults' - The maximum number of tags to return.+--+-- 'nextToken', 'listTagsForResource_nextToken' - A pagination token to resume pagination.+--+-- 'resourceARN', 'listTagsForResource_resourceARN' - The Timestream resource with tags to be listed. This value is an Amazon+-- Resource Name (ARN).+newListTagsForResource ::+ -- | 'resourceARN'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceARN_ =+ ListTagsForResource'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ resourceARN = pResourceARN_+ }++-- | The maximum number of tags to return.+listTagsForResource_maxResults :: Lens.Lens' ListTagsForResource (Prelude.Maybe Prelude.Natural)+listTagsForResource_maxResults = Lens.lens (\ListTagsForResource' {maxResults} -> maxResults) (\s@ListTagsForResource' {} a -> s {maxResults = a} :: ListTagsForResource)++-- | A pagination token to resume pagination.+listTagsForResource_nextToken :: Lens.Lens' ListTagsForResource (Prelude.Maybe Prelude.Text)+listTagsForResource_nextToken = Lens.lens (\ListTagsForResource' {nextToken} -> nextToken) (\s@ListTagsForResource' {} a -> s {nextToken = a} :: ListTagsForResource)++-- | The Timestream resource with tags to be listed. This value is an Amazon+-- Resource Name (ARN).+listTagsForResource_resourceARN :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_resourceARN = Lens.lens (\ListTagsForResource' {resourceARN} -> resourceARN) (\s@ListTagsForResource' {} a -> s {resourceARN = a} :: ListTagsForResource)++instance Core.AWSPager ListTagsForResource where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listTagsForResourceResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ (rs Lens.^. listTagsForResourceResponse_tags) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listTagsForResource_nextToken+ Lens..~ rs+ Lens.^? listTagsForResourceResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListTagsForResource where+ type+ AWSResponse ListTagsForResource =+ ListTagsForResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListTagsForResourceResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable ListTagsForResource where+ hashWithSalt _salt ListTagsForResource' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` resourceARN++instance Prelude.NFData ListTagsForResource where+ rnf ListTagsForResource' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf resourceARN++instance Data.ToHeaders ListTagsForResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.ListTagsForResource" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListTagsForResource where+ toJSON ListTagsForResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ Prelude.Just ("ResourceARN" Data..= resourceARN)+ ]+ )++instance Data.ToPath ListTagsForResource where+ toPath = Prelude.const "/"++instance Data.ToQuery ListTagsForResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+ { -- | A pagination token to resume pagination with a subsequent call to+ -- @ListTagsForResourceResponse@.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The tags currently associated with the Timestream resource.+ tags :: [Tag]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listTagsForResourceResponse_nextToken' - A pagination token to resume pagination with a subsequent call to+-- @ListTagsForResourceResponse@.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+--+-- 'tags', 'listTagsForResourceResponse_tags' - The tags currently associated with the Timestream resource.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { nextToken =+ Prelude.Nothing,+ httpStatus = pHttpStatus_,+ tags = Prelude.mempty+ }++-- | A pagination token to resume pagination with a subsequent call to+-- @ListTagsForResourceResponse@.+listTagsForResourceResponse_nextToken :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe Prelude.Text)+listTagsForResourceResponse_nextToken = Lens.lens (\ListTagsForResourceResponse' {nextToken} -> nextToken) (\s@ListTagsForResourceResponse' {} a -> s {nextToken = a} :: ListTagsForResourceResponse)++-- | The response's http status code.+listTagsForResourceResponse_httpStatus :: Lens.Lens' ListTagsForResourceResponse Prelude.Int+listTagsForResourceResponse_httpStatus = Lens.lens (\ListTagsForResourceResponse' {httpStatus} -> httpStatus) (\s@ListTagsForResourceResponse' {} a -> s {httpStatus = a} :: ListTagsForResourceResponse)++-- | The tags currently associated with the Timestream resource.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse [Tag]+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListTagsForResourceResponse where+ rnf ListTagsForResourceResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf tags
+ gen/Amazonka/TimeStreamQuery/PrepareQuery.hs view
@@ -0,0 +1,224 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.PrepareQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- A synchronous operation that allows you to submit a query with+-- parameters to be stored by Timestream for later running. Timestream only+-- supports using this operation with the+-- @PrepareQueryRequest$ValidateOnly@ set to @true@.+module Amazonka.TimeStreamQuery.PrepareQuery+ ( -- * Creating a Request+ PrepareQuery (..),+ newPrepareQuery,++ -- * Request Lenses+ prepareQuery_validateOnly,+ prepareQuery_queryString,++ -- * Destructuring the Response+ PrepareQueryResponse (..),+ newPrepareQueryResponse,++ -- * Response Lenses+ prepareQueryResponse_httpStatus,+ prepareQueryResponse_queryString,+ prepareQueryResponse_columns,+ prepareQueryResponse_parameters,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newPrepareQuery' smart constructor.+data PrepareQuery = PrepareQuery'+ { -- | By setting this value to @true@, Timestream will only validate that the+ -- query string is a valid Timestream query, and not store the prepared+ -- query for later use.+ validateOnly :: Prelude.Maybe Prelude.Bool,+ -- | The Timestream query string that you want to use as a prepared+ -- statement. Parameter names can be specified in the query string @\@@+ -- character followed by an identifier.+ queryString :: Data.Sensitive Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PrepareQuery' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'validateOnly', 'prepareQuery_validateOnly' - By setting this value to @true@, Timestream will only validate that the+-- query string is a valid Timestream query, and not store the prepared+-- query for later use.+--+-- 'queryString', 'prepareQuery_queryString' - The Timestream query string that you want to use as a prepared+-- statement. Parameter names can be specified in the query string @\@@+-- character followed by an identifier.+newPrepareQuery ::+ -- | 'queryString'+ Prelude.Text ->+ PrepareQuery+newPrepareQuery pQueryString_ =+ PrepareQuery'+ { validateOnly = Prelude.Nothing,+ queryString = Data._Sensitive Lens.# pQueryString_+ }++-- | By setting this value to @true@, Timestream will only validate that the+-- query string is a valid Timestream query, and not store the prepared+-- query for later use.+prepareQuery_validateOnly :: Lens.Lens' PrepareQuery (Prelude.Maybe Prelude.Bool)+prepareQuery_validateOnly = Lens.lens (\PrepareQuery' {validateOnly} -> validateOnly) (\s@PrepareQuery' {} a -> s {validateOnly = a} :: PrepareQuery)++-- | The Timestream query string that you want to use as a prepared+-- statement. Parameter names can be specified in the query string @\@@+-- character followed by an identifier.+prepareQuery_queryString :: Lens.Lens' PrepareQuery Prelude.Text+prepareQuery_queryString = Lens.lens (\PrepareQuery' {queryString} -> queryString) (\s@PrepareQuery' {} a -> s {queryString = a} :: PrepareQuery) Prelude.. Data._Sensitive++instance Core.AWSRequest PrepareQuery where+ type AWSResponse PrepareQuery = PrepareQueryResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ PrepareQueryResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "QueryString")+ Prelude.<*> (x Data..?> "Columns" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "Parameters" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable PrepareQuery where+ hashWithSalt _salt PrepareQuery' {..} =+ _salt+ `Prelude.hashWithSalt` validateOnly+ `Prelude.hashWithSalt` queryString++instance Prelude.NFData PrepareQuery where+ rnf PrepareQuery' {..} =+ Prelude.rnf validateOnly+ `Prelude.seq` Prelude.rnf queryString++instance Data.ToHeaders PrepareQuery where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.PrepareQuery" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PrepareQuery where+ toJSON PrepareQuery' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ValidateOnly" Data..=) Prelude.<$> validateOnly,+ Prelude.Just ("QueryString" Data..= queryString)+ ]+ )++instance Data.ToPath PrepareQuery where+ toPath = Prelude.const "/"++instance Data.ToQuery PrepareQuery where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPrepareQueryResponse' smart constructor.+data PrepareQueryResponse = PrepareQueryResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The query string that you want prepare.+ queryString :: Data.Sensitive Prelude.Text,+ -- | A list of SELECT clause columns of the submitted query string.+ columns :: [SelectColumn],+ -- | A list of parameters used in the submitted query string.+ parameters :: [ParameterMapping]+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PrepareQueryResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'prepareQueryResponse_httpStatus' - The response's http status code.+--+-- 'queryString', 'prepareQueryResponse_queryString' - The query string that you want prepare.+--+-- 'columns', 'prepareQueryResponse_columns' - A list of SELECT clause columns of the submitted query string.+--+-- 'parameters', 'prepareQueryResponse_parameters' - A list of parameters used in the submitted query string.+newPrepareQueryResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'queryString'+ Prelude.Text ->+ PrepareQueryResponse+newPrepareQueryResponse pHttpStatus_ pQueryString_ =+ PrepareQueryResponse'+ { httpStatus = pHttpStatus_,+ queryString = Data._Sensitive Lens.# pQueryString_,+ columns = Prelude.mempty,+ parameters = Prelude.mempty+ }++-- | The response's http status code.+prepareQueryResponse_httpStatus :: Lens.Lens' PrepareQueryResponse Prelude.Int+prepareQueryResponse_httpStatus = Lens.lens (\PrepareQueryResponse' {httpStatus} -> httpStatus) (\s@PrepareQueryResponse' {} a -> s {httpStatus = a} :: PrepareQueryResponse)++-- | The query string that you want prepare.+prepareQueryResponse_queryString :: Lens.Lens' PrepareQueryResponse Prelude.Text+prepareQueryResponse_queryString = Lens.lens (\PrepareQueryResponse' {queryString} -> queryString) (\s@PrepareQueryResponse' {} a -> s {queryString = a} :: PrepareQueryResponse) Prelude.. Data._Sensitive++-- | A list of SELECT clause columns of the submitted query string.+prepareQueryResponse_columns :: Lens.Lens' PrepareQueryResponse [SelectColumn]+prepareQueryResponse_columns = Lens.lens (\PrepareQueryResponse' {columns} -> columns) (\s@PrepareQueryResponse' {} a -> s {columns = a} :: PrepareQueryResponse) Prelude.. Lens.coerced++-- | A list of parameters used in the submitted query string.+prepareQueryResponse_parameters :: Lens.Lens' PrepareQueryResponse [ParameterMapping]+prepareQueryResponse_parameters = Lens.lens (\PrepareQueryResponse' {parameters} -> parameters) (\s@PrepareQueryResponse' {} a -> s {parameters = a} :: PrepareQueryResponse) Prelude.. Lens.coerced++instance Prelude.NFData PrepareQueryResponse where+ rnf PrepareQueryResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf queryString+ `Prelude.seq` Prelude.rnf columns+ `Prelude.seq` Prelude.rnf parameters
+ gen/Amazonka/TimeStreamQuery/Query.hs view
@@ -0,0 +1,501 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Query+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- @Query@ is a synchronous operation that enables you to run a query+-- against your Amazon Timestream data. @Query@ will time out after 60+-- seconds. You must update the default timeout in the SDK to support a+-- timeout of 60 seconds. See the+-- <https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.run-query.html code sample>+-- for details.+--+-- Your query request will fail in the following cases:+--+-- - If you submit a @Query@ request with the same client token outside+-- of the 5-minute idempotency window.+--+-- - If you submit a @Query@ request with the same client token, but+-- change other parameters, within the 5-minute idempotency window.+--+-- - If the size of the row (including the query metadata) exceeds 1 MB,+-- then the query will fail with the following error message:+--+-- @Query aborted as max page response size has been exceeded by the output result row@+--+-- - If the IAM principal of the query initiator and the result reader+-- are not the same and\/or the query initiator and the result reader+-- do not have the same query string in the query requests, the query+-- will fail with an @Invalid pagination token@ error.+--+-- This operation returns paginated results.+module Amazonka.TimeStreamQuery.Query+ ( -- * Creating a Request+ Query (..),+ newQuery,++ -- * Request Lenses+ query_clientToken,+ query_maxRows,+ query_nextToken,+ query_queryString,++ -- * Destructuring the Response+ QueryResponse (..),+ newQueryResponse,++ -- * Response Lenses+ queryResponse_nextToken,+ queryResponse_queryStatus,+ queryResponse_httpStatus,+ queryResponse_queryId,+ queryResponse_rows,+ queryResponse_columnInfo,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newQuery' smart constructor.+data Query = Query'+ { -- | Unique, case-sensitive string of up to 64 ASCII characters specified+ -- when a @Query@ request is made. Providing a @ClientToken@ makes the call+ -- to @Query@ /idempotent/. This means that running the same query+ -- repeatedly will produce the same result. In other words, making multiple+ -- identical @Query@ requests has the same effect as making a single+ -- request. When using @ClientToken@ in a query, note the following:+ --+ -- - If the Query API is instantiated without a @ClientToken@, the Query+ -- SDK generates a @ClientToken@ on your behalf.+ --+ -- - If the @Query@ invocation only contains the @ClientToken@ but does+ -- not include a @NextToken@, that invocation of @Query@ is assumed to+ -- be a new query run.+ --+ -- - If the invocation contains @NextToken@, that particular invocation+ -- is assumed to be a subsequent invocation of a prior call to the+ -- Query API, and a result set is returned.+ --+ -- - After 4 hours, any request with the same @ClientToken@ is treated as+ -- a new request.+ clientToken :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | The total number of rows to be returned in the @Query@ output. The+ -- initial run of @Query@ with a @MaxRows@ value specified will return the+ -- result set of the query in two cases:+ --+ -- - The size of the result is less than @1MB@.+ --+ -- - The number of rows in the result set is less than the value of+ -- @maxRows@.+ --+ -- Otherwise, the initial invocation of @Query@ only returns a @NextToken@,+ -- which can then be used in subsequent calls to fetch the result set. To+ -- resume pagination, provide the @NextToken@ value in the subsequent+ -- command.+ --+ -- If the row size is large (e.g. a row has many columns), Timestream may+ -- return fewer rows to keep the response size from exceeding the 1 MB+ -- limit. If @MaxRows@ is not provided, Timestream will send the necessary+ -- number of rows to meet the 1 MB limit.+ maxRows :: Prelude.Maybe Prelude.Natural,+ -- | A pagination token used to return a set of results. When the @Query@ API+ -- is invoked using @NextToken@, that particular invocation is assumed to+ -- be a subsequent invocation of a prior call to @Query@, and a result set+ -- is returned. However, if the @Query@ invocation only contains the+ -- @ClientToken@, that invocation of @Query@ is assumed to be a new query+ -- run.+ --+ -- Note the following when using NextToken in a query:+ --+ -- - A pagination token can be used for up to five @Query@ invocations,+ -- OR for a duration of up to 1 hour – whichever comes first.+ --+ -- - Using the same @NextToken@ will return the same set of records. To+ -- keep paginating through the result set, you must to use the most+ -- recent @nextToken@.+ --+ -- - Suppose a @Query@ invocation returns two @NextToken@ values,+ -- @TokenA@ and @TokenB@. If @TokenB@ is used in a subsequent @Query@+ -- invocation, then @TokenA@ is invalidated and cannot be reused.+ --+ -- - To request a previous result set from a query after pagination has+ -- begun, you must re-invoke the Query API.+ --+ -- - The latest @NextToken@ should be used to paginate until @null@ is+ -- returned, at which point a new @NextToken@ should be used.+ --+ -- - If the IAM principal of the query initiator and the result reader+ -- are not the same and\/or the query initiator and the result reader+ -- do not have the same query string in the query requests, the query+ -- will fail with an @Invalid pagination token@ error.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The query to be run by Timestream.+ queryString :: Data.Sensitive Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Query' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'query_clientToken' - Unique, case-sensitive string of up to 64 ASCII characters specified+-- when a @Query@ request is made. Providing a @ClientToken@ makes the call+-- to @Query@ /idempotent/. This means that running the same query+-- repeatedly will produce the same result. In other words, making multiple+-- identical @Query@ requests has the same effect as making a single+-- request. When using @ClientToken@ in a query, note the following:+--+-- - If the Query API is instantiated without a @ClientToken@, the Query+-- SDK generates a @ClientToken@ on your behalf.+--+-- - If the @Query@ invocation only contains the @ClientToken@ but does+-- not include a @NextToken@, that invocation of @Query@ is assumed to+-- be a new query run.+--+-- - If the invocation contains @NextToken@, that particular invocation+-- is assumed to be a subsequent invocation of a prior call to the+-- Query API, and a result set is returned.+--+-- - After 4 hours, any request with the same @ClientToken@ is treated as+-- a new request.+--+-- 'maxRows', 'query_maxRows' - The total number of rows to be returned in the @Query@ output. The+-- initial run of @Query@ with a @MaxRows@ value specified will return the+-- result set of the query in two cases:+--+-- - The size of the result is less than @1MB@.+--+-- - The number of rows in the result set is less than the value of+-- @maxRows@.+--+-- Otherwise, the initial invocation of @Query@ only returns a @NextToken@,+-- which can then be used in subsequent calls to fetch the result set. To+-- resume pagination, provide the @NextToken@ value in the subsequent+-- command.+--+-- If the row size is large (e.g. a row has many columns), Timestream may+-- return fewer rows to keep the response size from exceeding the 1 MB+-- limit. If @MaxRows@ is not provided, Timestream will send the necessary+-- number of rows to meet the 1 MB limit.+--+-- 'nextToken', 'query_nextToken' - A pagination token used to return a set of results. When the @Query@ API+-- is invoked using @NextToken@, that particular invocation is assumed to+-- be a subsequent invocation of a prior call to @Query@, and a result set+-- is returned. However, if the @Query@ invocation only contains the+-- @ClientToken@, that invocation of @Query@ is assumed to be a new query+-- run.+--+-- Note the following when using NextToken in a query:+--+-- - A pagination token can be used for up to five @Query@ invocations,+-- OR for a duration of up to 1 hour – whichever comes first.+--+-- - Using the same @NextToken@ will return the same set of records. To+-- keep paginating through the result set, you must to use the most+-- recent @nextToken@.+--+-- - Suppose a @Query@ invocation returns two @NextToken@ values,+-- @TokenA@ and @TokenB@. If @TokenB@ is used in a subsequent @Query@+-- invocation, then @TokenA@ is invalidated and cannot be reused.+--+-- - To request a previous result set from a query after pagination has+-- begun, you must re-invoke the Query API.+--+-- - The latest @NextToken@ should be used to paginate until @null@ is+-- returned, at which point a new @NextToken@ should be used.+--+-- - If the IAM principal of the query initiator and the result reader+-- are not the same and\/or the query initiator and the result reader+-- do not have the same query string in the query requests, the query+-- will fail with an @Invalid pagination token@ error.+--+-- 'queryString', 'query_queryString' - The query to be run by Timestream.+newQuery ::+ -- | 'queryString'+ Prelude.Text ->+ Query+newQuery pQueryString_ =+ Query'+ { clientToken = Prelude.Nothing,+ maxRows = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ queryString = Data._Sensitive Lens.# pQueryString_+ }++-- | Unique, case-sensitive string of up to 64 ASCII characters specified+-- when a @Query@ request is made. Providing a @ClientToken@ makes the call+-- to @Query@ /idempotent/. This means that running the same query+-- repeatedly will produce the same result. In other words, making multiple+-- identical @Query@ requests has the same effect as making a single+-- request. When using @ClientToken@ in a query, note the following:+--+-- - If the Query API is instantiated without a @ClientToken@, the Query+-- SDK generates a @ClientToken@ on your behalf.+--+-- - If the @Query@ invocation only contains the @ClientToken@ but does+-- not include a @NextToken@, that invocation of @Query@ is assumed to+-- be a new query run.+--+-- - If the invocation contains @NextToken@, that particular invocation+-- is assumed to be a subsequent invocation of a prior call to the+-- Query API, and a result set is returned.+--+-- - After 4 hours, any request with the same @ClientToken@ is treated as+-- a new request.+query_clientToken :: Lens.Lens' Query (Prelude.Maybe Prelude.Text)+query_clientToken = Lens.lens (\Query' {clientToken} -> clientToken) (\s@Query' {} a -> s {clientToken = a} :: Query) Prelude.. Lens.mapping Data._Sensitive++-- | The total number of rows to be returned in the @Query@ output. The+-- initial run of @Query@ with a @MaxRows@ value specified will return the+-- result set of the query in two cases:+--+-- - The size of the result is less than @1MB@.+--+-- - The number of rows in the result set is less than the value of+-- @maxRows@.+--+-- Otherwise, the initial invocation of @Query@ only returns a @NextToken@,+-- which can then be used in subsequent calls to fetch the result set. To+-- resume pagination, provide the @NextToken@ value in the subsequent+-- command.+--+-- If the row size is large (e.g. a row has many columns), Timestream may+-- return fewer rows to keep the response size from exceeding the 1 MB+-- limit. If @MaxRows@ is not provided, Timestream will send the necessary+-- number of rows to meet the 1 MB limit.+query_maxRows :: Lens.Lens' Query (Prelude.Maybe Prelude.Natural)+query_maxRows = Lens.lens (\Query' {maxRows} -> maxRows) (\s@Query' {} a -> s {maxRows = a} :: Query)++-- | A pagination token used to return a set of results. When the @Query@ API+-- is invoked using @NextToken@, that particular invocation is assumed to+-- be a subsequent invocation of a prior call to @Query@, and a result set+-- is returned. However, if the @Query@ invocation only contains the+-- @ClientToken@, that invocation of @Query@ is assumed to be a new query+-- run.+--+-- Note the following when using NextToken in a query:+--+-- - A pagination token can be used for up to five @Query@ invocations,+-- OR for a duration of up to 1 hour – whichever comes first.+--+-- - Using the same @NextToken@ will return the same set of records. To+-- keep paginating through the result set, you must to use the most+-- recent @nextToken@.+--+-- - Suppose a @Query@ invocation returns two @NextToken@ values,+-- @TokenA@ and @TokenB@. If @TokenB@ is used in a subsequent @Query@+-- invocation, then @TokenA@ is invalidated and cannot be reused.+--+-- - To request a previous result set from a query after pagination has+-- begun, you must re-invoke the Query API.+--+-- - The latest @NextToken@ should be used to paginate until @null@ is+-- returned, at which point a new @NextToken@ should be used.+--+-- - If the IAM principal of the query initiator and the result reader+-- are not the same and\/or the query initiator and the result reader+-- do not have the same query string in the query requests, the query+-- will fail with an @Invalid pagination token@ error.+query_nextToken :: Lens.Lens' Query (Prelude.Maybe Prelude.Text)+query_nextToken = Lens.lens (\Query' {nextToken} -> nextToken) (\s@Query' {} a -> s {nextToken = a} :: Query)++-- | The query to be run by Timestream.+query_queryString :: Lens.Lens' Query Prelude.Text+query_queryString = Lens.lens (\Query' {queryString} -> queryString) (\s@Query' {} a -> s {queryString = a} :: Query) Prelude.. Data._Sensitive++instance Core.AWSPager Query where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? queryResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop (rs Lens.^. queryResponse_rows) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& query_nextToken+ Lens..~ rs+ Lens.^? queryResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest Query where+ type AWSResponse Query = QueryResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ QueryResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "QueryStatus")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "QueryId")+ Prelude.<*> (x Data..?> "Rows" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "ColumnInfo" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable Query where+ hashWithSalt _salt Query' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` maxRows+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` queryString++instance Prelude.NFData Query where+ rnf Query' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf maxRows+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf queryString++instance Data.ToHeaders Query where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ("Timestream_20181101.Query" :: Prelude.ByteString),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON Query where+ toJSON Query' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("MaxRows" Data..=) Prelude.<$> maxRows,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ Prelude.Just ("QueryString" Data..= queryString)+ ]+ )++instance Data.ToPath Query where+ toPath = Prelude.const "/"++instance Data.ToQuery Query where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newQueryResponse' smart constructor.+data QueryResponse = QueryResponse'+ { -- | A pagination token that can be used again on a @Query@ call to get the+ -- next set of results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | Information about the status of the query, including progress and bytes+ -- scanned.+ queryStatus :: Prelude.Maybe QueryStatus,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | A unique ID for the given query.+ queryId :: Prelude.Text,+ -- | The result set rows returned by the query.+ rows :: [Row],+ -- | The column data types of the returned result set.+ columnInfo :: [ColumnInfo]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'QueryResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'queryResponse_nextToken' - A pagination token that can be used again on a @Query@ call to get the+-- next set of results.+--+-- 'queryStatus', 'queryResponse_queryStatus' - Information about the status of the query, including progress and bytes+-- scanned.+--+-- 'httpStatus', 'queryResponse_httpStatus' - The response's http status code.+--+-- 'queryId', 'queryResponse_queryId' - A unique ID for the given query.+--+-- 'rows', 'queryResponse_rows' - The result set rows returned by the query.+--+-- 'columnInfo', 'queryResponse_columnInfo' - The column data types of the returned result set.+newQueryResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'queryId'+ Prelude.Text ->+ QueryResponse+newQueryResponse pHttpStatus_ pQueryId_ =+ QueryResponse'+ { nextToken = Prelude.Nothing,+ queryStatus = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ queryId = pQueryId_,+ rows = Prelude.mempty,+ columnInfo = Prelude.mempty+ }++-- | A pagination token that can be used again on a @Query@ call to get the+-- next set of results.+queryResponse_nextToken :: Lens.Lens' QueryResponse (Prelude.Maybe Prelude.Text)+queryResponse_nextToken = Lens.lens (\QueryResponse' {nextToken} -> nextToken) (\s@QueryResponse' {} a -> s {nextToken = a} :: QueryResponse)++-- | Information about the status of the query, including progress and bytes+-- scanned.+queryResponse_queryStatus :: Lens.Lens' QueryResponse (Prelude.Maybe QueryStatus)+queryResponse_queryStatus = Lens.lens (\QueryResponse' {queryStatus} -> queryStatus) (\s@QueryResponse' {} a -> s {queryStatus = a} :: QueryResponse)++-- | The response's http status code.+queryResponse_httpStatus :: Lens.Lens' QueryResponse Prelude.Int+queryResponse_httpStatus = Lens.lens (\QueryResponse' {httpStatus} -> httpStatus) (\s@QueryResponse' {} a -> s {httpStatus = a} :: QueryResponse)++-- | A unique ID for the given query.+queryResponse_queryId :: Lens.Lens' QueryResponse Prelude.Text+queryResponse_queryId = Lens.lens (\QueryResponse' {queryId} -> queryId) (\s@QueryResponse' {} a -> s {queryId = a} :: QueryResponse)++-- | The result set rows returned by the query.+queryResponse_rows :: Lens.Lens' QueryResponse [Row]+queryResponse_rows = Lens.lens (\QueryResponse' {rows} -> rows) (\s@QueryResponse' {} a -> s {rows = a} :: QueryResponse) Prelude.. Lens.coerced++-- | The column data types of the returned result set.+queryResponse_columnInfo :: Lens.Lens' QueryResponse [ColumnInfo]+queryResponse_columnInfo = Lens.lens (\QueryResponse' {columnInfo} -> columnInfo) (\s@QueryResponse' {} a -> s {columnInfo = a} :: QueryResponse) Prelude.. Lens.coerced++instance Prelude.NFData QueryResponse where+ rnf QueryResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf queryStatus+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf queryId+ `Prelude.seq` Prelude.rnf rows+ `Prelude.seq` Prelude.rnf columnInfo
+ gen/Amazonka/TimeStreamQuery/TagResource.hs view
@@ -0,0 +1,173 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.TagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Associate a set of tags with a Timestream resource. You can then+-- activate these user-defined tags so that they appear on the Billing and+-- Cost Management console for cost allocation tracking.+module Amazonka.TimeStreamQuery.TagResource+ ( -- * Creating a Request+ TagResource (..),+ newTagResource,++ -- * Request Lenses+ tagResource_resourceARN,+ tagResource_tags,++ -- * Destructuring the Response+ TagResourceResponse (..),+ newTagResourceResponse,++ -- * Response Lenses+ tagResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+ { -- | Identifies the Timestream resource to which tags should be added. This+ -- value is an Amazon Resource Name (ARN).+ resourceARN :: Prelude.Text,+ -- | The tags to be assigned to the Timestream resource.+ tags :: [Tag]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceARN', 'tagResource_resourceARN' - Identifies the Timestream resource to which tags should be added. This+-- value is an Amazon Resource Name (ARN).+--+-- 'tags', 'tagResource_tags' - The tags to be assigned to the Timestream resource.+newTagResource ::+ -- | 'resourceARN'+ Prelude.Text ->+ TagResource+newTagResource pResourceARN_ =+ TagResource'+ { resourceARN = pResourceARN_,+ tags = Prelude.mempty+ }++-- | Identifies the Timestream resource to which tags should be added. This+-- value is an Amazon Resource Name (ARN).+tagResource_resourceARN :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceARN = Lens.lens (\TagResource' {resourceARN} -> resourceARN) (\s@TagResource' {} a -> s {resourceARN = a} :: TagResource)++-- | The tags to be assigned to the Timestream resource.+tagResource_tags :: Lens.Lens' TagResource [Tag]+tagResource_tags = Lens.lens (\TagResource' {tags} -> tags) (\s@TagResource' {} a -> s {tags = a} :: TagResource) Prelude.. Lens.coerced++instance Core.AWSRequest TagResource where+ type AWSResponse TagResource = TagResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ TagResourceResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable TagResource where+ hashWithSalt _salt TagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceARN+ `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+ rnf TagResource' {..} =+ Prelude.rnf resourceARN+ `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders TagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.TagResource" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON TagResource where+ toJSON TagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("ResourceARN" Data..= resourceARN),+ Prelude.Just ("Tags" Data..= tags)+ ]+ )++instance Data.ToPath TagResource where+ toPath = Prelude.const "/"++instance Data.ToQuery TagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'tagResourceResponse_httpStatus' - The response's http status code.+newTagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ TagResourceResponse+newTagResourceResponse pHttpStatus_ =+ TagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+tagResourceResponse_httpStatus :: Lens.Lens' TagResourceResponse Prelude.Int+tagResourceResponse_httpStatus = Lens.lens (\TagResourceResponse' {httpStatus} -> httpStatus) (\s@TagResourceResponse' {} a -> s {httpStatus = a} :: TagResourceResponse)++instance Prelude.NFData TagResourceResponse where+ rnf TagResourceResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/TimeStreamQuery/Types.hs view
@@ -0,0 +1,439 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _AccessDeniedException,+ _ConflictException,+ _InternalServerException,+ _InvalidEndpointException,+ _QueryExecutionException,+ _ResourceNotFoundException,+ _ServiceQuotaExceededException,+ _ThrottlingException,+ _ValidationException,++ -- * DimensionValueType+ DimensionValueType (..),++ -- * MeasureValueType+ MeasureValueType (..),++ -- * S3EncryptionOption+ S3EncryptionOption (..),++ -- * ScalarMeasureValueType+ ScalarMeasureValueType (..),++ -- * ScalarType+ ScalarType (..),++ -- * ScheduledQueryRunStatus+ ScheduledQueryRunStatus (..),++ -- * ScheduledQueryState+ ScheduledQueryState (..),++ -- * ColumnInfo+ ColumnInfo (..),+ newColumnInfo,+ columnInfo_name,+ columnInfo_type,++ -- * Datum+ Datum (..),+ newDatum,+ datum_arrayValue,+ datum_nullValue,+ datum_rowValue,+ datum_scalarValue,+ datum_timeSeriesValue,++ -- * DimensionMapping+ DimensionMapping (..),+ newDimensionMapping,+ dimensionMapping_name,+ dimensionMapping_dimensionValueType,++ -- * Endpoint+ Endpoint (..),+ newEndpoint,+ endpoint_address,+ endpoint_cachePeriodInMinutes,++ -- * ErrorReportConfiguration+ ErrorReportConfiguration (..),+ newErrorReportConfiguration,+ errorReportConfiguration_s3Configuration,++ -- * ErrorReportLocation+ ErrorReportLocation (..),+ newErrorReportLocation,+ errorReportLocation_s3ReportLocation,++ -- * ExecutionStats+ ExecutionStats (..),+ newExecutionStats,+ executionStats_bytesMetered,+ executionStats_dataWrites,+ executionStats_executionTimeInMillis,+ executionStats_queryResultRows,+ executionStats_recordsIngested,++ -- * MixedMeasureMapping+ MixedMeasureMapping (..),+ newMixedMeasureMapping,+ mixedMeasureMapping_measureName,+ mixedMeasureMapping_multiMeasureAttributeMappings,+ mixedMeasureMapping_sourceColumn,+ mixedMeasureMapping_targetMeasureName,+ mixedMeasureMapping_measureValueType,++ -- * MultiMeasureAttributeMapping+ MultiMeasureAttributeMapping (..),+ newMultiMeasureAttributeMapping,+ multiMeasureAttributeMapping_targetMultiMeasureAttributeName,+ multiMeasureAttributeMapping_sourceColumn,+ multiMeasureAttributeMapping_measureValueType,++ -- * MultiMeasureMappings+ MultiMeasureMappings (..),+ newMultiMeasureMappings,+ multiMeasureMappings_targetMultiMeasureName,+ multiMeasureMappings_multiMeasureAttributeMappings,++ -- * NotificationConfiguration+ NotificationConfiguration (..),+ newNotificationConfiguration,+ notificationConfiguration_snsConfiguration,++ -- * ParameterMapping+ ParameterMapping (..),+ newParameterMapping,+ parameterMapping_name,+ parameterMapping_type,++ -- * QueryStatus+ QueryStatus (..),+ newQueryStatus,+ queryStatus_cumulativeBytesMetered,+ queryStatus_cumulativeBytesScanned,+ queryStatus_progressPercentage,++ -- * Row+ Row (..),+ newRow,+ row_data,++ -- * S3Configuration+ S3Configuration (..),+ newS3Configuration,+ s3Configuration_encryptionOption,+ s3Configuration_objectKeyPrefix,+ s3Configuration_bucketName,++ -- * S3ReportLocation+ S3ReportLocation (..),+ newS3ReportLocation,+ s3ReportLocation_bucketName,+ s3ReportLocation_objectKey,++ -- * ScheduleConfiguration+ ScheduleConfiguration (..),+ newScheduleConfiguration,+ scheduleConfiguration_scheduleExpression,++ -- * ScheduledQuery+ ScheduledQuery (..),+ newScheduledQuery,+ scheduledQuery_creationTime,+ scheduledQuery_errorReportConfiguration,+ scheduledQuery_lastRunStatus,+ scheduledQuery_nextInvocationTime,+ scheduledQuery_previousInvocationTime,+ scheduledQuery_targetDestination,+ scheduledQuery_arn,+ scheduledQuery_name,+ scheduledQuery_state,++ -- * ScheduledQueryDescription+ ScheduledQueryDescription (..),+ newScheduledQueryDescription,+ scheduledQueryDescription_creationTime,+ scheduledQueryDescription_errorReportConfiguration,+ scheduledQueryDescription_kmsKeyId,+ scheduledQueryDescription_lastRunSummary,+ scheduledQueryDescription_nextInvocationTime,+ scheduledQueryDescription_previousInvocationTime,+ scheduledQueryDescription_recentlyFailedRuns,+ scheduledQueryDescription_scheduledQueryExecutionRoleArn,+ scheduledQueryDescription_targetConfiguration,+ scheduledQueryDescription_arn,+ scheduledQueryDescription_name,+ scheduledQueryDescription_queryString,+ scheduledQueryDescription_state,+ scheduledQueryDescription_scheduleConfiguration,+ scheduledQueryDescription_notificationConfiguration,++ -- * ScheduledQueryRunSummary+ ScheduledQueryRunSummary (..),+ newScheduledQueryRunSummary,+ scheduledQueryRunSummary_errorReportLocation,+ scheduledQueryRunSummary_executionStats,+ scheduledQueryRunSummary_failureReason,+ scheduledQueryRunSummary_invocationTime,+ scheduledQueryRunSummary_runStatus,+ scheduledQueryRunSummary_triggerTime,++ -- * SelectColumn+ SelectColumn (..),+ newSelectColumn,+ selectColumn_aliased,+ selectColumn_databaseName,+ selectColumn_name,+ selectColumn_tableName,+ selectColumn_type,++ -- * SnsConfiguration+ SnsConfiguration (..),+ newSnsConfiguration,+ snsConfiguration_topicArn,++ -- * Tag+ Tag (..),+ newTag,+ tag_key,+ tag_value,++ -- * TargetConfiguration+ TargetConfiguration (..),+ newTargetConfiguration,+ targetConfiguration_timestreamConfiguration,++ -- * TargetDestination+ TargetDestination (..),+ newTargetDestination,+ targetDestination_timestreamDestination,++ -- * TimeSeriesDataPoint+ TimeSeriesDataPoint (..),+ newTimeSeriesDataPoint,+ timeSeriesDataPoint_time,+ timeSeriesDataPoint_value,++ -- * TimestreamConfiguration+ TimestreamConfiguration (..),+ newTimestreamConfiguration,+ timestreamConfiguration_measureNameColumn,+ timestreamConfiguration_mixedMeasureMappings,+ timestreamConfiguration_multiMeasureMappings,+ timestreamConfiguration_databaseName,+ timestreamConfiguration_tableName,+ timestreamConfiguration_timeColumn,+ timestreamConfiguration_dimensionMappings,++ -- * TimestreamDestination+ TimestreamDestination (..),+ newTimestreamDestination,+ timestreamDestination_databaseName,+ timestreamDestination_tableName,++ -- * Type+ Type (..),+ newType,+ type_arrayColumnInfo,+ type_rowColumnInfo,+ type_scalarType,+ type_timeSeriesMeasureValueColumnInfo,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign+import Amazonka.TimeStreamQuery.Types.ColumnInfo+import Amazonka.TimeStreamQuery.Types.Datum+import Amazonka.TimeStreamQuery.Types.DimensionMapping+import Amazonka.TimeStreamQuery.Types.DimensionValueType+import Amazonka.TimeStreamQuery.Types.Endpoint+import Amazonka.TimeStreamQuery.Types.ErrorReportConfiguration+import Amazonka.TimeStreamQuery.Types.ErrorReportLocation+import Amazonka.TimeStreamQuery.Types.ExecutionStats+import Amazonka.TimeStreamQuery.Types.MeasureValueType+import Amazonka.TimeStreamQuery.Types.MixedMeasureMapping+import Amazonka.TimeStreamQuery.Types.MultiMeasureAttributeMapping+import Amazonka.TimeStreamQuery.Types.MultiMeasureMappings+import Amazonka.TimeStreamQuery.Types.NotificationConfiguration+import Amazonka.TimeStreamQuery.Types.ParameterMapping+import Amazonka.TimeStreamQuery.Types.QueryStatus+import Amazonka.TimeStreamQuery.Types.Row+import Amazonka.TimeStreamQuery.Types.S3Configuration+import Amazonka.TimeStreamQuery.Types.S3EncryptionOption+import Amazonka.TimeStreamQuery.Types.S3ReportLocation+import Amazonka.TimeStreamQuery.Types.ScalarMeasureValueType+import Amazonka.TimeStreamQuery.Types.ScalarType+import Amazonka.TimeStreamQuery.Types.ScheduleConfiguration+import Amazonka.TimeStreamQuery.Types.ScheduledQuery+import Amazonka.TimeStreamQuery.Types.ScheduledQueryDescription+import Amazonka.TimeStreamQuery.Types.ScheduledQueryRunStatus+import Amazonka.TimeStreamQuery.Types.ScheduledQueryRunSummary+import Amazonka.TimeStreamQuery.Types.ScheduledQueryState+import Amazonka.TimeStreamQuery.Types.SelectColumn+import Amazonka.TimeStreamQuery.Types.SnsConfiguration+import Amazonka.TimeStreamQuery.Types.Tag+import Amazonka.TimeStreamQuery.Types.TargetConfiguration+import Amazonka.TimeStreamQuery.Types.TargetDestination+import Amazonka.TimeStreamQuery.Types.TimeSeriesDataPoint+import Amazonka.TimeStreamQuery.Types.TimestreamConfiguration+import Amazonka.TimeStreamQuery.Types.TimestreamDestination+import Amazonka.TimeStreamQuery.Types.Type++-- | API version @2018-11-01@ of the Amazon Timestream Query SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "TimeStreamQuery",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "query.timestream",+ Core.signingName = "timestream",+ Core.version = "2018-11-01",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "TimeStreamQuery",+ Core.retry = retry+ }+ where+ retry =+ Core.Exponential+ { Core.base = 5.0e-2,+ Core.growth = 2,+ Core.attempts = 5,+ Core.check = check+ }+ check e+ | Lens.has (Core.hasStatus 502) e =+ Prelude.Just "bad_gateway"+ | Lens.has (Core.hasStatus 504) e =+ Prelude.Just "gateway_timeout"+ | Lens.has (Core.hasStatus 500) e =+ Prelude.Just "general_server_error"+ | Lens.has (Core.hasStatus 509) e =+ Prelude.Just "limit_exceeded"+ | Lens.has+ ( Core.hasCode "RequestThrottledException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "request_throttled_exception"+ | Lens.has (Core.hasStatus 503) e =+ Prelude.Just "service_unavailable"+ | Lens.has+ ( Core.hasCode "ThrottledException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throttled_exception"+ | Lens.has+ ( Core.hasCode "Throttling"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throttling"+ | Lens.has+ ( Core.hasCode "ThrottlingException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throttling_exception"+ | Lens.has+ ( Core.hasCode+ "ProvisionedThroughputExceededException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throughput_exceeded"+ | Lens.has (Core.hasStatus 429) e =+ Prelude.Just "too_many_requests"+ | Prelude.otherwise = Prelude.Nothing++-- | You are not authorized to perform this action.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+ Core._MatchServiceError+ defaultService+ "AccessDeniedException"++-- | Unable to poll results for a cancelled query.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"++-- | Timestream was unable to fully process this request because of an+-- internal server error.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+ Core._MatchServiceError+ defaultService+ "InternalServerException"++-- | The requested endpoint was not valid.+_InvalidEndpointException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidEndpointException =+ Core._MatchServiceError+ defaultService+ "InvalidEndpointException"++-- | Timestream was unable to run the query successfully.+_QueryExecutionException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_QueryExecutionException =+ Core._MatchServiceError+ defaultService+ "QueryExecutionException"++-- | The requested resource could not be found.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"++-- | You have exceeded the service quota.+_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+ Core._MatchServiceError+ defaultService+ "ServiceQuotaExceededException"++-- | The request was denied due to request throttling.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+ Core._MatchServiceError+ defaultService+ "ThrottlingException"++-- | Invalid or malformed request.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+ Core._MatchServiceError+ defaultService+ "ValidationException"
+ gen/Amazonka/TimeStreamQuery/Types/ColumnInfo.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ColumnInfo+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ColumnInfo where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import {-# SOURCE #-} Amazonka.TimeStreamQuery.Types.Type++-- | Contains the metadata for query results such as the column names, data+-- types, and other attributes.+--+-- /See:/ 'newColumnInfo' smart constructor.+data ColumnInfo = ColumnInfo'+ { -- | The name of the result set column. The name of the result set is+ -- available for columns of all data types except for arrays.+ name :: Prelude.Maybe Prelude.Text,+ -- | The data type of the result set column. The data type can be a scalar or+ -- complex. Scalar data types are integers, strings, doubles, Booleans, and+ -- others. Complex data types are types such as arrays, rows, and others.+ type' :: Type+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ColumnInfo' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'columnInfo_name' - The name of the result set column. The name of the result set is+-- available for columns of all data types except for arrays.+--+-- 'type'', 'columnInfo_type' - The data type of the result set column. The data type can be a scalar or+-- complex. Scalar data types are integers, strings, doubles, Booleans, and+-- others. Complex data types are types such as arrays, rows, and others.+newColumnInfo ::+ -- | 'type''+ Type ->+ ColumnInfo+newColumnInfo pType_ =+ ColumnInfo' {name = Prelude.Nothing, type' = pType_}++-- | The name of the result set column. The name of the result set is+-- available for columns of all data types except for arrays.+columnInfo_name :: Lens.Lens' ColumnInfo (Prelude.Maybe Prelude.Text)+columnInfo_name = Lens.lens (\ColumnInfo' {name} -> name) (\s@ColumnInfo' {} a -> s {name = a} :: ColumnInfo)++-- | The data type of the result set column. The data type can be a scalar or+-- complex. Scalar data types are integers, strings, doubles, Booleans, and+-- others. Complex data types are types such as arrays, rows, and others.+columnInfo_type :: Lens.Lens' ColumnInfo Type+columnInfo_type = Lens.lens (\ColumnInfo' {type'} -> type') (\s@ColumnInfo' {} a -> s {type' = a} :: ColumnInfo)++instance Data.FromJSON ColumnInfo where+ parseJSON =+ Data.withObject+ "ColumnInfo"+ ( \x ->+ ColumnInfo'+ Prelude.<$> (x Data..:? "Name")+ Prelude.<*> (x Data..: "Type")+ )++instance Prelude.Hashable ColumnInfo where+ hashWithSalt _salt ColumnInfo' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` type'++instance Prelude.NFData ColumnInfo where+ rnf ColumnInfo' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/TimeStreamQuery/Types/ColumnInfo.hs-boot view
@@ -0,0 +1,31 @@+{-# OPTIONS_GHC -Wno-missing-methods #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ColumnInfo+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ColumnInfo where++import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++data ColumnInfo++instance Prelude.Eq ColumnInfo++instance Prelude.Read ColumnInfo++instance Prelude.Show ColumnInfo++instance Prelude.Generic ColumnInfo++instance Data.FromJSON ColumnInfo++instance Prelude.NFData ColumnInfo++instance Prelude.Hashable ColumnInfo
+ gen/Amazonka/TimeStreamQuery/Types/Datum.hs view
@@ -0,0 +1,128 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.Datum+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.Datum where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import {-# SOURCE #-} Amazonka.TimeStreamQuery.Types.Row+import {-# SOURCE #-} Amazonka.TimeStreamQuery.Types.TimeSeriesDataPoint++-- | Datum represents a single data point in a query result.+--+-- /See:/ 'newDatum' smart constructor.+data Datum = Datum'+ { -- | Indicates if the data point is an array.+ arrayValue :: Prelude.Maybe [Datum],+ -- | Indicates if the data point is null.+ nullValue :: Prelude.Maybe Prelude.Bool,+ -- | Indicates if the data point is a row.+ rowValue :: Prelude.Maybe Row,+ -- | Indicates if the data point is a scalar value such as integer, string,+ -- double, or Boolean.+ scalarValue :: Prelude.Maybe Prelude.Text,+ -- | Indicates if the data point is a timeseries data type.+ timeSeriesValue :: Prelude.Maybe [TimeSeriesDataPoint]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Datum' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arrayValue', 'datum_arrayValue' - Indicates if the data point is an array.+--+-- 'nullValue', 'datum_nullValue' - Indicates if the data point is null.+--+-- 'rowValue', 'datum_rowValue' - Indicates if the data point is a row.+--+-- 'scalarValue', 'datum_scalarValue' - Indicates if the data point is a scalar value such as integer, string,+-- double, or Boolean.+--+-- 'timeSeriesValue', 'datum_timeSeriesValue' - Indicates if the data point is a timeseries data type.+newDatum ::+ Datum+newDatum =+ Datum'+ { arrayValue = Prelude.Nothing,+ nullValue = Prelude.Nothing,+ rowValue = Prelude.Nothing,+ scalarValue = Prelude.Nothing,+ timeSeriesValue = Prelude.Nothing+ }++-- | Indicates if the data point is an array.+datum_arrayValue :: Lens.Lens' Datum (Prelude.Maybe [Datum])+datum_arrayValue = Lens.lens (\Datum' {arrayValue} -> arrayValue) (\s@Datum' {} a -> s {arrayValue = a} :: Datum) Prelude.. Lens.mapping Lens.coerced++-- | Indicates if the data point is null.+datum_nullValue :: Lens.Lens' Datum (Prelude.Maybe Prelude.Bool)+datum_nullValue = Lens.lens (\Datum' {nullValue} -> nullValue) (\s@Datum' {} a -> s {nullValue = a} :: Datum)++-- | Indicates if the data point is a row.+datum_rowValue :: Lens.Lens' Datum (Prelude.Maybe Row)+datum_rowValue = Lens.lens (\Datum' {rowValue} -> rowValue) (\s@Datum' {} a -> s {rowValue = a} :: Datum)++-- | Indicates if the data point is a scalar value such as integer, string,+-- double, or Boolean.+datum_scalarValue :: Lens.Lens' Datum (Prelude.Maybe Prelude.Text)+datum_scalarValue = Lens.lens (\Datum' {scalarValue} -> scalarValue) (\s@Datum' {} a -> s {scalarValue = a} :: Datum)++-- | Indicates if the data point is a timeseries data type.+datum_timeSeriesValue :: Lens.Lens' Datum (Prelude.Maybe [TimeSeriesDataPoint])+datum_timeSeriesValue = Lens.lens (\Datum' {timeSeriesValue} -> timeSeriesValue) (\s@Datum' {} a -> s {timeSeriesValue = a} :: Datum) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON Datum where+ parseJSON =+ Data.withObject+ "Datum"+ ( \x ->+ Datum'+ Prelude.<$> (x Data..:? "ArrayValue" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "NullValue")+ Prelude.<*> (x Data..:? "RowValue")+ Prelude.<*> (x Data..:? "ScalarValue")+ Prelude.<*> ( x+ Data..:? "TimeSeriesValue"+ Data..!= Prelude.mempty+ )+ )++instance Prelude.Hashable Datum where+ hashWithSalt _salt Datum' {..} =+ _salt+ `Prelude.hashWithSalt` arrayValue+ `Prelude.hashWithSalt` nullValue+ `Prelude.hashWithSalt` rowValue+ `Prelude.hashWithSalt` scalarValue+ `Prelude.hashWithSalt` timeSeriesValue++instance Prelude.NFData Datum where+ rnf Datum' {..} =+ Prelude.rnf arrayValue+ `Prelude.seq` Prelude.rnf nullValue+ `Prelude.seq` Prelude.rnf rowValue+ `Prelude.seq` Prelude.rnf scalarValue+ `Prelude.seq` Prelude.rnf timeSeriesValue
+ gen/Amazonka/TimeStreamQuery/Types/Datum.hs-boot view
@@ -0,0 +1,31 @@+{-# OPTIONS_GHC -Wno-missing-methods #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.Datum+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.Datum where++import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++data Datum++instance Prelude.Eq Datum++instance Prelude.Read Datum++instance Prelude.Show Datum++instance Prelude.Generic Datum++instance Data.FromJSON Datum++instance Prelude.NFData Datum++instance Prelude.Hashable Datum
+ gen/Amazonka/TimeStreamQuery/Types/DimensionMapping.hs view
@@ -0,0 +1,100 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.DimensionMapping+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.DimensionMapping where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.DimensionValueType++-- | This type is used to map column(s) from the query result to a dimension+-- in the destination table.+--+-- /See:/ 'newDimensionMapping' smart constructor.+data DimensionMapping = DimensionMapping'+ { -- | Column name from query result.+ name :: Prelude.Text,+ -- | Type for the dimension.+ dimensionValueType :: DimensionValueType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DimensionMapping' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'dimensionMapping_name' - Column name from query result.+--+-- 'dimensionValueType', 'dimensionMapping_dimensionValueType' - Type for the dimension.+newDimensionMapping ::+ -- | 'name'+ Prelude.Text ->+ -- | 'dimensionValueType'+ DimensionValueType ->+ DimensionMapping+newDimensionMapping pName_ pDimensionValueType_ =+ DimensionMapping'+ { name = pName_,+ dimensionValueType = pDimensionValueType_+ }++-- | Column name from query result.+dimensionMapping_name :: Lens.Lens' DimensionMapping Prelude.Text+dimensionMapping_name = Lens.lens (\DimensionMapping' {name} -> name) (\s@DimensionMapping' {} a -> s {name = a} :: DimensionMapping)++-- | Type for the dimension.+dimensionMapping_dimensionValueType :: Lens.Lens' DimensionMapping DimensionValueType+dimensionMapping_dimensionValueType = Lens.lens (\DimensionMapping' {dimensionValueType} -> dimensionValueType) (\s@DimensionMapping' {} a -> s {dimensionValueType = a} :: DimensionMapping)++instance Data.FromJSON DimensionMapping where+ parseJSON =+ Data.withObject+ "DimensionMapping"+ ( \x ->+ DimensionMapping'+ Prelude.<$> (x Data..: "Name")+ Prelude.<*> (x Data..: "DimensionValueType")+ )++instance Prelude.Hashable DimensionMapping where+ hashWithSalt _salt DimensionMapping' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` dimensionValueType++instance Prelude.NFData DimensionMapping where+ rnf DimensionMapping' {..} =+ Prelude.rnf name+ `Prelude.seq` Prelude.rnf dimensionValueType++instance Data.ToJSON DimensionMapping where+ toJSON DimensionMapping' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Name" Data..= name),+ Prelude.Just+ ("DimensionValueType" Data..= dimensionValueType)+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/DimensionValueType.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.DimensionValueType+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.DimensionValueType+ ( DimensionValueType+ ( ..,+ DimensionValueType_VARCHAR+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype DimensionValueType = DimensionValueType'+ { fromDimensionValueType ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern DimensionValueType_VARCHAR :: DimensionValueType+pattern DimensionValueType_VARCHAR = DimensionValueType' "VARCHAR"++{-# COMPLETE+ DimensionValueType_VARCHAR,+ DimensionValueType'+ #-}
+ gen/Amazonka/TimeStreamQuery/Types/Endpoint.hs view
@@ -0,0 +1,89 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.Endpoint+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.Endpoint where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Represents an available endpoint against which to make API calls+-- against, as well as the TTL for that endpoint.+--+-- /See:/ 'newEndpoint' smart constructor.+data Endpoint = Endpoint'+ { -- | An endpoint address.+ address :: Prelude.Text,+ -- | The TTL for the endpoint, in minutes.+ cachePeriodInMinutes :: Prelude.Integer+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Endpoint' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'address', 'endpoint_address' - An endpoint address.+--+-- 'cachePeriodInMinutes', 'endpoint_cachePeriodInMinutes' - The TTL for the endpoint, in minutes.+newEndpoint ::+ -- | 'address'+ Prelude.Text ->+ -- | 'cachePeriodInMinutes'+ Prelude.Integer ->+ Endpoint+newEndpoint pAddress_ pCachePeriodInMinutes_ =+ Endpoint'+ { address = pAddress_,+ cachePeriodInMinutes = pCachePeriodInMinutes_+ }++-- | An endpoint address.+endpoint_address :: Lens.Lens' Endpoint Prelude.Text+endpoint_address = Lens.lens (\Endpoint' {address} -> address) (\s@Endpoint' {} a -> s {address = a} :: Endpoint)++-- | The TTL for the endpoint, in minutes.+endpoint_cachePeriodInMinutes :: Lens.Lens' Endpoint Prelude.Integer+endpoint_cachePeriodInMinutes = Lens.lens (\Endpoint' {cachePeriodInMinutes} -> cachePeriodInMinutes) (\s@Endpoint' {} a -> s {cachePeriodInMinutes = a} :: Endpoint)++instance Data.FromJSON Endpoint where+ parseJSON =+ Data.withObject+ "Endpoint"+ ( \x ->+ Endpoint'+ Prelude.<$> (x Data..: "Address")+ Prelude.<*> (x Data..: "CachePeriodInMinutes")+ )++instance Prelude.Hashable Endpoint where+ hashWithSalt _salt Endpoint' {..} =+ _salt+ `Prelude.hashWithSalt` address+ `Prelude.hashWithSalt` cachePeriodInMinutes++instance Prelude.NFData Endpoint where+ rnf Endpoint' {..} =+ Prelude.rnf address+ `Prelude.seq` Prelude.rnf cachePeriodInMinutes
+ gen/Amazonka/TimeStreamQuery/Types/ErrorReportConfiguration.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ErrorReportConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ErrorReportConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.S3Configuration++-- | Configuration required for error reporting.+--+-- /See:/ 'newErrorReportConfiguration' smart constructor.+data ErrorReportConfiguration = ErrorReportConfiguration'+ { -- | The S3 configuration for the error reports.+ s3Configuration :: S3Configuration+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ErrorReportConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 's3Configuration', 'errorReportConfiguration_s3Configuration' - The S3 configuration for the error reports.+newErrorReportConfiguration ::+ -- | 's3Configuration'+ S3Configuration ->+ ErrorReportConfiguration+newErrorReportConfiguration pS3Configuration_ =+ ErrorReportConfiguration'+ { s3Configuration =+ pS3Configuration_+ }++-- | The S3 configuration for the error reports.+errorReportConfiguration_s3Configuration :: Lens.Lens' ErrorReportConfiguration S3Configuration+errorReportConfiguration_s3Configuration = Lens.lens (\ErrorReportConfiguration' {s3Configuration} -> s3Configuration) (\s@ErrorReportConfiguration' {} a -> s {s3Configuration = a} :: ErrorReportConfiguration)++instance Data.FromJSON ErrorReportConfiguration where+ parseJSON =+ Data.withObject+ "ErrorReportConfiguration"+ ( \x ->+ ErrorReportConfiguration'+ Prelude.<$> (x Data..: "S3Configuration")+ )++instance Prelude.Hashable ErrorReportConfiguration where+ hashWithSalt _salt ErrorReportConfiguration' {..} =+ _salt `Prelude.hashWithSalt` s3Configuration++instance Prelude.NFData ErrorReportConfiguration where+ rnf ErrorReportConfiguration' {..} =+ Prelude.rnf s3Configuration++instance Data.ToJSON ErrorReportConfiguration where+ toJSON ErrorReportConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("S3Configuration" Data..= s3Configuration)+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/ErrorReportLocation.hs view
@@ -0,0 +1,74 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ErrorReportLocation+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ErrorReportLocation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.S3ReportLocation++-- | This contains the location of the error report for a single scheduled+-- query call.+--+-- /See:/ 'newErrorReportLocation' smart constructor.+data ErrorReportLocation = ErrorReportLocation'+ { -- | The S3 location where error reports are written.+ s3ReportLocation :: Prelude.Maybe S3ReportLocation+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ErrorReportLocation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 's3ReportLocation', 'errorReportLocation_s3ReportLocation' - The S3 location where error reports are written.+newErrorReportLocation ::+ ErrorReportLocation+newErrorReportLocation =+ ErrorReportLocation'+ { s3ReportLocation =+ Prelude.Nothing+ }++-- | The S3 location where error reports are written.+errorReportLocation_s3ReportLocation :: Lens.Lens' ErrorReportLocation (Prelude.Maybe S3ReportLocation)+errorReportLocation_s3ReportLocation = Lens.lens (\ErrorReportLocation' {s3ReportLocation} -> s3ReportLocation) (\s@ErrorReportLocation' {} a -> s {s3ReportLocation = a} :: ErrorReportLocation)++instance Data.FromJSON ErrorReportLocation where+ parseJSON =+ Data.withObject+ "ErrorReportLocation"+ ( \x ->+ ErrorReportLocation'+ Prelude.<$> (x Data..:? "S3ReportLocation")+ )++instance Prelude.Hashable ErrorReportLocation where+ hashWithSalt _salt ErrorReportLocation' {..} =+ _salt `Prelude.hashWithSalt` s3ReportLocation++instance Prelude.NFData ErrorReportLocation where+ rnf ErrorReportLocation' {..} =+ Prelude.rnf s3ReportLocation
+ gen/Amazonka/TimeStreamQuery/Types/ExecutionStats.hs view
@@ -0,0 +1,129 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ExecutionStats+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ExecutionStats where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Statistics for a single scheduled query run.+--+-- /See:/ 'newExecutionStats' smart constructor.+data ExecutionStats = ExecutionStats'+ { -- | Bytes metered for a single scheduled query run.+ bytesMetered :: Prelude.Maybe Prelude.Integer,+ -- | Data writes metered for records ingested in a single scheduled query+ -- run.+ dataWrites :: Prelude.Maybe Prelude.Integer,+ -- | Total time, measured in milliseconds, that was needed for the scheduled+ -- query run to complete.+ executionTimeInMillis :: Prelude.Maybe Prelude.Integer,+ -- | Number of rows present in the output from running a query before+ -- ingestion to destination data source.+ queryResultRows :: Prelude.Maybe Prelude.Integer,+ -- | The number of records ingested for a single scheduled query run.+ recordsIngested :: Prelude.Maybe Prelude.Integer+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExecutionStats' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'bytesMetered', 'executionStats_bytesMetered' - Bytes metered for a single scheduled query run.+--+-- 'dataWrites', 'executionStats_dataWrites' - Data writes metered for records ingested in a single scheduled query+-- run.+--+-- 'executionTimeInMillis', 'executionStats_executionTimeInMillis' - Total time, measured in milliseconds, that was needed for the scheduled+-- query run to complete.+--+-- 'queryResultRows', 'executionStats_queryResultRows' - Number of rows present in the output from running a query before+-- ingestion to destination data source.+--+-- 'recordsIngested', 'executionStats_recordsIngested' - The number of records ingested for a single scheduled query run.+newExecutionStats ::+ ExecutionStats+newExecutionStats =+ ExecutionStats'+ { bytesMetered = Prelude.Nothing,+ dataWrites = Prelude.Nothing,+ executionTimeInMillis = Prelude.Nothing,+ queryResultRows = Prelude.Nothing,+ recordsIngested = Prelude.Nothing+ }++-- | Bytes metered for a single scheduled query run.+executionStats_bytesMetered :: Lens.Lens' ExecutionStats (Prelude.Maybe Prelude.Integer)+executionStats_bytesMetered = Lens.lens (\ExecutionStats' {bytesMetered} -> bytesMetered) (\s@ExecutionStats' {} a -> s {bytesMetered = a} :: ExecutionStats)++-- | Data writes metered for records ingested in a single scheduled query+-- run.+executionStats_dataWrites :: Lens.Lens' ExecutionStats (Prelude.Maybe Prelude.Integer)+executionStats_dataWrites = Lens.lens (\ExecutionStats' {dataWrites} -> dataWrites) (\s@ExecutionStats' {} a -> s {dataWrites = a} :: ExecutionStats)++-- | Total time, measured in milliseconds, that was needed for the scheduled+-- query run to complete.+executionStats_executionTimeInMillis :: Lens.Lens' ExecutionStats (Prelude.Maybe Prelude.Integer)+executionStats_executionTimeInMillis = Lens.lens (\ExecutionStats' {executionTimeInMillis} -> executionTimeInMillis) (\s@ExecutionStats' {} a -> s {executionTimeInMillis = a} :: ExecutionStats)++-- | Number of rows present in the output from running a query before+-- ingestion to destination data source.+executionStats_queryResultRows :: Lens.Lens' ExecutionStats (Prelude.Maybe Prelude.Integer)+executionStats_queryResultRows = Lens.lens (\ExecutionStats' {queryResultRows} -> queryResultRows) (\s@ExecutionStats' {} a -> s {queryResultRows = a} :: ExecutionStats)++-- | The number of records ingested for a single scheduled query run.+executionStats_recordsIngested :: Lens.Lens' ExecutionStats (Prelude.Maybe Prelude.Integer)+executionStats_recordsIngested = Lens.lens (\ExecutionStats' {recordsIngested} -> recordsIngested) (\s@ExecutionStats' {} a -> s {recordsIngested = a} :: ExecutionStats)++instance Data.FromJSON ExecutionStats where+ parseJSON =+ Data.withObject+ "ExecutionStats"+ ( \x ->+ ExecutionStats'+ Prelude.<$> (x Data..:? "BytesMetered")+ Prelude.<*> (x Data..:? "DataWrites")+ Prelude.<*> (x Data..:? "ExecutionTimeInMillis")+ Prelude.<*> (x Data..:? "QueryResultRows")+ Prelude.<*> (x Data..:? "RecordsIngested")+ )++instance Prelude.Hashable ExecutionStats where+ hashWithSalt _salt ExecutionStats' {..} =+ _salt+ `Prelude.hashWithSalt` bytesMetered+ `Prelude.hashWithSalt` dataWrites+ `Prelude.hashWithSalt` executionTimeInMillis+ `Prelude.hashWithSalt` queryResultRows+ `Prelude.hashWithSalt` recordsIngested++instance Prelude.NFData ExecutionStats where+ rnf ExecutionStats' {..} =+ Prelude.rnf bytesMetered+ `Prelude.seq` Prelude.rnf dataWrites+ `Prelude.seq` Prelude.rnf executionTimeInMillis+ `Prelude.seq` Prelude.rnf queryResultRows+ `Prelude.seq` Prelude.rnf recordsIngested
+ gen/Amazonka/TimeStreamQuery/Types/MeasureValueType.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.MeasureValueType+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.MeasureValueType+ ( MeasureValueType+ ( ..,+ MeasureValueType_BIGINT,+ MeasureValueType_BOOLEAN,+ MeasureValueType_DOUBLE,+ MeasureValueType_MULTI,+ MeasureValueType_VARCHAR+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype MeasureValueType = MeasureValueType'+ { fromMeasureValueType ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern MeasureValueType_BIGINT :: MeasureValueType+pattern MeasureValueType_BIGINT = MeasureValueType' "BIGINT"++pattern MeasureValueType_BOOLEAN :: MeasureValueType+pattern MeasureValueType_BOOLEAN = MeasureValueType' "BOOLEAN"++pattern MeasureValueType_DOUBLE :: MeasureValueType+pattern MeasureValueType_DOUBLE = MeasureValueType' "DOUBLE"++pattern MeasureValueType_MULTI :: MeasureValueType+pattern MeasureValueType_MULTI = MeasureValueType' "MULTI"++pattern MeasureValueType_VARCHAR :: MeasureValueType+pattern MeasureValueType_VARCHAR = MeasureValueType' "VARCHAR"++{-# COMPLETE+ MeasureValueType_BIGINT,+ MeasureValueType_BOOLEAN,+ MeasureValueType_DOUBLE,+ MeasureValueType_MULTI,+ MeasureValueType_VARCHAR,+ MeasureValueType'+ #-}
+ gen/Amazonka/TimeStreamQuery/Types/MixedMeasureMapping.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.MixedMeasureMapping+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.MixedMeasureMapping where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.MeasureValueType+import Amazonka.TimeStreamQuery.Types.MultiMeasureAttributeMapping++-- | MixedMeasureMappings are mappings that can be used to ingest data into a+-- mixture of narrow and multi measures in the derived table.+--+-- /See:/ 'newMixedMeasureMapping' smart constructor.+data MixedMeasureMapping = MixedMeasureMapping'+ { -- | Refers to the value of measure_name in a result row. This field is+ -- required if MeasureNameColumn is provided.+ measureName :: Prelude.Maybe Prelude.Text,+ -- | Required when measureValueType is MULTI. Attribute mappings for MULTI+ -- value measures.+ multiMeasureAttributeMappings :: Prelude.Maybe (Prelude.NonEmpty MultiMeasureAttributeMapping),+ -- | This field refers to the source column from which measure-value is to be+ -- read for result materialization.+ sourceColumn :: Prelude.Maybe Prelude.Text,+ -- | Target measure name to be used. If not provided, the target measure name+ -- by default would be measure-name if provided, or sourceColumn otherwise.+ targetMeasureName :: Prelude.Maybe Prelude.Text,+ -- | Type of the value that is to be read from sourceColumn. If the mapping+ -- is for MULTI, use MeasureValueType.MULTI.+ measureValueType :: MeasureValueType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MixedMeasureMapping' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'measureName', 'mixedMeasureMapping_measureName' - Refers to the value of measure_name in a result row. This field is+-- required if MeasureNameColumn is provided.+--+-- 'multiMeasureAttributeMappings', 'mixedMeasureMapping_multiMeasureAttributeMappings' - Required when measureValueType is MULTI. Attribute mappings for MULTI+-- value measures.+--+-- 'sourceColumn', 'mixedMeasureMapping_sourceColumn' - This field refers to the source column from which measure-value is to be+-- read for result materialization.+--+-- 'targetMeasureName', 'mixedMeasureMapping_targetMeasureName' - Target measure name to be used. If not provided, the target measure name+-- by default would be measure-name if provided, or sourceColumn otherwise.+--+-- 'measureValueType', 'mixedMeasureMapping_measureValueType' - Type of the value that is to be read from sourceColumn. If the mapping+-- is for MULTI, use MeasureValueType.MULTI.+newMixedMeasureMapping ::+ -- | 'measureValueType'+ MeasureValueType ->+ MixedMeasureMapping+newMixedMeasureMapping pMeasureValueType_ =+ MixedMeasureMapping'+ { measureName = Prelude.Nothing,+ multiMeasureAttributeMappings = Prelude.Nothing,+ sourceColumn = Prelude.Nothing,+ targetMeasureName = Prelude.Nothing,+ measureValueType = pMeasureValueType_+ }++-- | Refers to the value of measure_name in a result row. This field is+-- required if MeasureNameColumn is provided.+mixedMeasureMapping_measureName :: Lens.Lens' MixedMeasureMapping (Prelude.Maybe Prelude.Text)+mixedMeasureMapping_measureName = Lens.lens (\MixedMeasureMapping' {measureName} -> measureName) (\s@MixedMeasureMapping' {} a -> s {measureName = a} :: MixedMeasureMapping)++-- | Required when measureValueType is MULTI. Attribute mappings for MULTI+-- value measures.+mixedMeasureMapping_multiMeasureAttributeMappings :: Lens.Lens' MixedMeasureMapping (Prelude.Maybe (Prelude.NonEmpty MultiMeasureAttributeMapping))+mixedMeasureMapping_multiMeasureAttributeMappings = Lens.lens (\MixedMeasureMapping' {multiMeasureAttributeMappings} -> multiMeasureAttributeMappings) (\s@MixedMeasureMapping' {} a -> s {multiMeasureAttributeMappings = a} :: MixedMeasureMapping) Prelude.. Lens.mapping Lens.coerced++-- | This field refers to the source column from which measure-value is to be+-- read for result materialization.+mixedMeasureMapping_sourceColumn :: Lens.Lens' MixedMeasureMapping (Prelude.Maybe Prelude.Text)+mixedMeasureMapping_sourceColumn = Lens.lens (\MixedMeasureMapping' {sourceColumn} -> sourceColumn) (\s@MixedMeasureMapping' {} a -> s {sourceColumn = a} :: MixedMeasureMapping)++-- | Target measure name to be used. If not provided, the target measure name+-- by default would be measure-name if provided, or sourceColumn otherwise.+mixedMeasureMapping_targetMeasureName :: Lens.Lens' MixedMeasureMapping (Prelude.Maybe Prelude.Text)+mixedMeasureMapping_targetMeasureName = Lens.lens (\MixedMeasureMapping' {targetMeasureName} -> targetMeasureName) (\s@MixedMeasureMapping' {} a -> s {targetMeasureName = a} :: MixedMeasureMapping)++-- | Type of the value that is to be read from sourceColumn. If the mapping+-- is for MULTI, use MeasureValueType.MULTI.+mixedMeasureMapping_measureValueType :: Lens.Lens' MixedMeasureMapping MeasureValueType+mixedMeasureMapping_measureValueType = Lens.lens (\MixedMeasureMapping' {measureValueType} -> measureValueType) (\s@MixedMeasureMapping' {} a -> s {measureValueType = a} :: MixedMeasureMapping)++instance Data.FromJSON MixedMeasureMapping where+ parseJSON =+ Data.withObject+ "MixedMeasureMapping"+ ( \x ->+ MixedMeasureMapping'+ Prelude.<$> (x Data..:? "MeasureName")+ Prelude.<*> (x Data..:? "MultiMeasureAttributeMappings")+ Prelude.<*> (x Data..:? "SourceColumn")+ Prelude.<*> (x Data..:? "TargetMeasureName")+ Prelude.<*> (x Data..: "MeasureValueType")+ )++instance Prelude.Hashable MixedMeasureMapping where+ hashWithSalt _salt MixedMeasureMapping' {..} =+ _salt+ `Prelude.hashWithSalt` measureName+ `Prelude.hashWithSalt` multiMeasureAttributeMappings+ `Prelude.hashWithSalt` sourceColumn+ `Prelude.hashWithSalt` targetMeasureName+ `Prelude.hashWithSalt` measureValueType++instance Prelude.NFData MixedMeasureMapping where+ rnf MixedMeasureMapping' {..} =+ Prelude.rnf measureName+ `Prelude.seq` Prelude.rnf multiMeasureAttributeMappings+ `Prelude.seq` Prelude.rnf sourceColumn+ `Prelude.seq` Prelude.rnf targetMeasureName+ `Prelude.seq` Prelude.rnf measureValueType++instance Data.ToJSON MixedMeasureMapping where+ toJSON MixedMeasureMapping' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MeasureName" Data..=) Prelude.<$> measureName,+ ("MultiMeasureAttributeMappings" Data..=)+ Prelude.<$> multiMeasureAttributeMappings,+ ("SourceColumn" Data..=) Prelude.<$> sourceColumn,+ ("TargetMeasureName" Data..=)+ Prelude.<$> targetMeasureName,+ Prelude.Just+ ("MeasureValueType" Data..= measureValueType)+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/MultiMeasureAttributeMapping.hs view
@@ -0,0 +1,122 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.MultiMeasureAttributeMapping+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.MultiMeasureAttributeMapping where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.ScalarMeasureValueType++-- | Attribute mapping for MULTI value measures.+--+-- /See:/ 'newMultiMeasureAttributeMapping' smart constructor.+data MultiMeasureAttributeMapping = MultiMeasureAttributeMapping'+ { -- | Custom name to be used for attribute name in derived table. If not+ -- provided, source column name would be used.+ targetMultiMeasureAttributeName :: Prelude.Maybe Prelude.Text,+ -- | Source column from where the attribute value is to be read.+ sourceColumn :: Prelude.Text,+ -- | Type of the attribute to be read from the source column.+ measureValueType :: ScalarMeasureValueType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MultiMeasureAttributeMapping' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'targetMultiMeasureAttributeName', 'multiMeasureAttributeMapping_targetMultiMeasureAttributeName' - Custom name to be used for attribute name in derived table. If not+-- provided, source column name would be used.+--+-- 'sourceColumn', 'multiMeasureAttributeMapping_sourceColumn' - Source column from where the attribute value is to be read.+--+-- 'measureValueType', 'multiMeasureAttributeMapping_measureValueType' - Type of the attribute to be read from the source column.+newMultiMeasureAttributeMapping ::+ -- | 'sourceColumn'+ Prelude.Text ->+ -- | 'measureValueType'+ ScalarMeasureValueType ->+ MultiMeasureAttributeMapping+newMultiMeasureAttributeMapping+ pSourceColumn_+ pMeasureValueType_ =+ MultiMeasureAttributeMapping'+ { targetMultiMeasureAttributeName =+ Prelude.Nothing,+ sourceColumn = pSourceColumn_,+ measureValueType = pMeasureValueType_+ }++-- | Custom name to be used for attribute name in derived table. If not+-- provided, source column name would be used.+multiMeasureAttributeMapping_targetMultiMeasureAttributeName :: Lens.Lens' MultiMeasureAttributeMapping (Prelude.Maybe Prelude.Text)+multiMeasureAttributeMapping_targetMultiMeasureAttributeName = Lens.lens (\MultiMeasureAttributeMapping' {targetMultiMeasureAttributeName} -> targetMultiMeasureAttributeName) (\s@MultiMeasureAttributeMapping' {} a -> s {targetMultiMeasureAttributeName = a} :: MultiMeasureAttributeMapping)++-- | Source column from where the attribute value is to be read.+multiMeasureAttributeMapping_sourceColumn :: Lens.Lens' MultiMeasureAttributeMapping Prelude.Text+multiMeasureAttributeMapping_sourceColumn = Lens.lens (\MultiMeasureAttributeMapping' {sourceColumn} -> sourceColumn) (\s@MultiMeasureAttributeMapping' {} a -> s {sourceColumn = a} :: MultiMeasureAttributeMapping)++-- | Type of the attribute to be read from the source column.+multiMeasureAttributeMapping_measureValueType :: Lens.Lens' MultiMeasureAttributeMapping ScalarMeasureValueType+multiMeasureAttributeMapping_measureValueType = Lens.lens (\MultiMeasureAttributeMapping' {measureValueType} -> measureValueType) (\s@MultiMeasureAttributeMapping' {} a -> s {measureValueType = a} :: MultiMeasureAttributeMapping)++instance Data.FromJSON MultiMeasureAttributeMapping where+ parseJSON =+ Data.withObject+ "MultiMeasureAttributeMapping"+ ( \x ->+ MultiMeasureAttributeMapping'+ Prelude.<$> (x Data..:? "TargetMultiMeasureAttributeName")+ Prelude.<*> (x Data..: "SourceColumn")+ Prelude.<*> (x Data..: "MeasureValueType")+ )++instance+ Prelude.Hashable+ MultiMeasureAttributeMapping+ where+ hashWithSalt _salt MultiMeasureAttributeMapping' {..} =+ _salt+ `Prelude.hashWithSalt` targetMultiMeasureAttributeName+ `Prelude.hashWithSalt` sourceColumn+ `Prelude.hashWithSalt` measureValueType++instance Prelude.NFData MultiMeasureAttributeMapping where+ rnf MultiMeasureAttributeMapping' {..} =+ Prelude.rnf targetMultiMeasureAttributeName+ `Prelude.seq` Prelude.rnf sourceColumn+ `Prelude.seq` Prelude.rnf measureValueType++instance Data.ToJSON MultiMeasureAttributeMapping where+ toJSON MultiMeasureAttributeMapping' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("TargetMultiMeasureAttributeName" Data..=)+ Prelude.<$> targetMultiMeasureAttributeName,+ Prelude.Just ("SourceColumn" Data..= sourceColumn),+ Prelude.Just+ ("MeasureValueType" Data..= measureValueType)+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/MultiMeasureMappings.hs view
@@ -0,0 +1,117 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.MultiMeasureMappings+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.MultiMeasureMappings where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.MultiMeasureAttributeMapping++-- | Only one of MixedMeasureMappings or MultiMeasureMappings is to be+-- provided. MultiMeasureMappings can be used to ingest data as multi+-- measures in the derived table.+--+-- /See:/ 'newMultiMeasureMappings' smart constructor.+data MultiMeasureMappings = MultiMeasureMappings'+ { -- | The name of the target multi-measure name in the derived table. This+ -- input is required when measureNameColumn is not provided. If+ -- MeasureNameColumn is provided, then value from that column will be used+ -- as multi-measure name.+ targetMultiMeasureName :: Prelude.Maybe Prelude.Text,+ -- | Required. Attribute mappings to be used for mapping query results to+ -- ingest data for multi-measure attributes.+ multiMeasureAttributeMappings :: Prelude.NonEmpty MultiMeasureAttributeMapping+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MultiMeasureMappings' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'targetMultiMeasureName', 'multiMeasureMappings_targetMultiMeasureName' - The name of the target multi-measure name in the derived table. This+-- input is required when measureNameColumn is not provided. If+-- MeasureNameColumn is provided, then value from that column will be used+-- as multi-measure name.+--+-- 'multiMeasureAttributeMappings', 'multiMeasureMappings_multiMeasureAttributeMappings' - Required. Attribute mappings to be used for mapping query results to+-- ingest data for multi-measure attributes.+newMultiMeasureMappings ::+ -- | 'multiMeasureAttributeMappings'+ Prelude.NonEmpty MultiMeasureAttributeMapping ->+ MultiMeasureMappings+newMultiMeasureMappings+ pMultiMeasureAttributeMappings_ =+ MultiMeasureMappings'+ { targetMultiMeasureName =+ Prelude.Nothing,+ multiMeasureAttributeMappings =+ Lens.coerced Lens.# pMultiMeasureAttributeMappings_+ }++-- | The name of the target multi-measure name in the derived table. This+-- input is required when measureNameColumn is not provided. If+-- MeasureNameColumn is provided, then value from that column will be used+-- as multi-measure name.+multiMeasureMappings_targetMultiMeasureName :: Lens.Lens' MultiMeasureMappings (Prelude.Maybe Prelude.Text)+multiMeasureMappings_targetMultiMeasureName = Lens.lens (\MultiMeasureMappings' {targetMultiMeasureName} -> targetMultiMeasureName) (\s@MultiMeasureMappings' {} a -> s {targetMultiMeasureName = a} :: MultiMeasureMappings)++-- | Required. Attribute mappings to be used for mapping query results to+-- ingest data for multi-measure attributes.+multiMeasureMappings_multiMeasureAttributeMappings :: Lens.Lens' MultiMeasureMappings (Prelude.NonEmpty MultiMeasureAttributeMapping)+multiMeasureMappings_multiMeasureAttributeMappings = Lens.lens (\MultiMeasureMappings' {multiMeasureAttributeMappings} -> multiMeasureAttributeMappings) (\s@MultiMeasureMappings' {} a -> s {multiMeasureAttributeMappings = a} :: MultiMeasureMappings) Prelude.. Lens.coerced++instance Data.FromJSON MultiMeasureMappings where+ parseJSON =+ Data.withObject+ "MultiMeasureMappings"+ ( \x ->+ MultiMeasureMappings'+ Prelude.<$> (x Data..:? "TargetMultiMeasureName")+ Prelude.<*> (x Data..: "MultiMeasureAttributeMappings")+ )++instance Prelude.Hashable MultiMeasureMappings where+ hashWithSalt _salt MultiMeasureMappings' {..} =+ _salt+ `Prelude.hashWithSalt` targetMultiMeasureName+ `Prelude.hashWithSalt` multiMeasureAttributeMappings++instance Prelude.NFData MultiMeasureMappings where+ rnf MultiMeasureMappings' {..} =+ Prelude.rnf targetMultiMeasureName+ `Prelude.seq` Prelude.rnf multiMeasureAttributeMappings++instance Data.ToJSON MultiMeasureMappings where+ toJSON MultiMeasureMappings' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("TargetMultiMeasureName" Data..=)+ Prelude.<$> targetMultiMeasureName,+ Prelude.Just+ ( "MultiMeasureAttributeMappings"+ Data..= multiMeasureAttributeMappings+ )+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/NotificationConfiguration.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.NotificationConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.NotificationConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.SnsConfiguration++-- | Notification configuration for a scheduled query. A notification is sent+-- by Timestream when a scheduled query is created, its state is updated or+-- when it is deleted.+--+-- /See:/ 'newNotificationConfiguration' smart constructor.+data NotificationConfiguration = NotificationConfiguration'+ { -- | Details on SNS configuration.+ snsConfiguration :: SnsConfiguration+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'NotificationConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'snsConfiguration', 'notificationConfiguration_snsConfiguration' - Details on SNS configuration.+newNotificationConfiguration ::+ -- | 'snsConfiguration'+ SnsConfiguration ->+ NotificationConfiguration+newNotificationConfiguration pSnsConfiguration_ =+ NotificationConfiguration'+ { snsConfiguration =+ pSnsConfiguration_+ }++-- | Details on SNS configuration.+notificationConfiguration_snsConfiguration :: Lens.Lens' NotificationConfiguration SnsConfiguration+notificationConfiguration_snsConfiguration = Lens.lens (\NotificationConfiguration' {snsConfiguration} -> snsConfiguration) (\s@NotificationConfiguration' {} a -> s {snsConfiguration = a} :: NotificationConfiguration)++instance Data.FromJSON NotificationConfiguration where+ parseJSON =+ Data.withObject+ "NotificationConfiguration"+ ( \x ->+ NotificationConfiguration'+ Prelude.<$> (x Data..: "SnsConfiguration")+ )++instance Prelude.Hashable NotificationConfiguration where+ hashWithSalt _salt NotificationConfiguration' {..} =+ _salt `Prelude.hashWithSalt` snsConfiguration++instance Prelude.NFData NotificationConfiguration where+ rnf NotificationConfiguration' {..} =+ Prelude.rnf snsConfiguration++instance Data.ToJSON NotificationConfiguration where+ toJSON NotificationConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("SnsConfiguration" Data..= snsConfiguration)+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/ParameterMapping.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ParameterMapping+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ParameterMapping where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.Type++-- | Mapping for named parameters.+--+-- /See:/ 'newParameterMapping' smart constructor.+data ParameterMapping = ParameterMapping'+ { -- | Parameter name.+ name :: Prelude.Text,+ type' :: Type+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ParameterMapping' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'parameterMapping_name' - Parameter name.+--+-- 'type'', 'parameterMapping_type' - Undocumented member.+newParameterMapping ::+ -- | 'name'+ Prelude.Text ->+ -- | 'type''+ Type ->+ ParameterMapping+newParameterMapping pName_ pType_ =+ ParameterMapping' {name = pName_, type' = pType_}++-- | Parameter name.+parameterMapping_name :: Lens.Lens' ParameterMapping Prelude.Text+parameterMapping_name = Lens.lens (\ParameterMapping' {name} -> name) (\s@ParameterMapping' {} a -> s {name = a} :: ParameterMapping)++-- | Undocumented member.+parameterMapping_type :: Lens.Lens' ParameterMapping Type+parameterMapping_type = Lens.lens (\ParameterMapping' {type'} -> type') (\s@ParameterMapping' {} a -> s {type' = a} :: ParameterMapping)++instance Data.FromJSON ParameterMapping where+ parseJSON =+ Data.withObject+ "ParameterMapping"+ ( \x ->+ ParameterMapping'+ Prelude.<$> (x Data..: "Name")+ Prelude.<*> (x Data..: "Type")+ )++instance Prelude.Hashable ParameterMapping where+ hashWithSalt _salt ParameterMapping' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` type'++instance Prelude.NFData ParameterMapping where+ rnf ParameterMapping' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/TimeStreamQuery/Types/QueryStatus.hs view
@@ -0,0 +1,116 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.QueryStatus+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.QueryStatus where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information about the status of the query, including progress and bytes+-- scanned.+--+-- /See:/ 'newQueryStatus' smart constructor.+data QueryStatus = QueryStatus'+ { -- | The amount of data scanned by the query in bytes that you will be+ -- charged for. This is a cumulative sum and represents the total amount of+ -- data that you will be charged for since the query was started. The+ -- charge is applied only once and is either applied when the query+ -- completes running or when the query is cancelled.+ cumulativeBytesMetered :: Prelude.Maybe Prelude.Integer,+ -- | The amount of data scanned by the query in bytes. This is a cumulative+ -- sum and represents the total amount of bytes scanned since the query was+ -- started.+ cumulativeBytesScanned :: Prelude.Maybe Prelude.Integer,+ -- | The progress of the query, expressed as a percentage.+ progressPercentage :: Prelude.Maybe Prelude.Double+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'QueryStatus' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'cumulativeBytesMetered', 'queryStatus_cumulativeBytesMetered' - The amount of data scanned by the query in bytes that you will be+-- charged for. This is a cumulative sum and represents the total amount of+-- data that you will be charged for since the query was started. The+-- charge is applied only once and is either applied when the query+-- completes running or when the query is cancelled.+--+-- 'cumulativeBytesScanned', 'queryStatus_cumulativeBytesScanned' - The amount of data scanned by the query in bytes. This is a cumulative+-- sum and represents the total amount of bytes scanned since the query was+-- started.+--+-- 'progressPercentage', 'queryStatus_progressPercentage' - The progress of the query, expressed as a percentage.+newQueryStatus ::+ QueryStatus+newQueryStatus =+ QueryStatus'+ { cumulativeBytesMetered =+ Prelude.Nothing,+ cumulativeBytesScanned = Prelude.Nothing,+ progressPercentage = Prelude.Nothing+ }++-- | The amount of data scanned by the query in bytes that you will be+-- charged for. This is a cumulative sum and represents the total amount of+-- data that you will be charged for since the query was started. The+-- charge is applied only once and is either applied when the query+-- completes running or when the query is cancelled.+queryStatus_cumulativeBytesMetered :: Lens.Lens' QueryStatus (Prelude.Maybe Prelude.Integer)+queryStatus_cumulativeBytesMetered = Lens.lens (\QueryStatus' {cumulativeBytesMetered} -> cumulativeBytesMetered) (\s@QueryStatus' {} a -> s {cumulativeBytesMetered = a} :: QueryStatus)++-- | The amount of data scanned by the query in bytes. This is a cumulative+-- sum and represents the total amount of bytes scanned since the query was+-- started.+queryStatus_cumulativeBytesScanned :: Lens.Lens' QueryStatus (Prelude.Maybe Prelude.Integer)+queryStatus_cumulativeBytesScanned = Lens.lens (\QueryStatus' {cumulativeBytesScanned} -> cumulativeBytesScanned) (\s@QueryStatus' {} a -> s {cumulativeBytesScanned = a} :: QueryStatus)++-- | The progress of the query, expressed as a percentage.+queryStatus_progressPercentage :: Lens.Lens' QueryStatus (Prelude.Maybe Prelude.Double)+queryStatus_progressPercentage = Lens.lens (\QueryStatus' {progressPercentage} -> progressPercentage) (\s@QueryStatus' {} a -> s {progressPercentage = a} :: QueryStatus)++instance Data.FromJSON QueryStatus where+ parseJSON =+ Data.withObject+ "QueryStatus"+ ( \x ->+ QueryStatus'+ Prelude.<$> (x Data..:? "CumulativeBytesMetered")+ Prelude.<*> (x Data..:? "CumulativeBytesScanned")+ Prelude.<*> (x Data..:? "ProgressPercentage")+ )++instance Prelude.Hashable QueryStatus where+ hashWithSalt _salt QueryStatus' {..} =+ _salt+ `Prelude.hashWithSalt` cumulativeBytesMetered+ `Prelude.hashWithSalt` cumulativeBytesScanned+ `Prelude.hashWithSalt` progressPercentage++instance Prelude.NFData QueryStatus where+ rnf QueryStatus' {..} =+ Prelude.rnf cumulativeBytesMetered+ `Prelude.seq` Prelude.rnf cumulativeBytesScanned+ `Prelude.seq` Prelude.rnf progressPercentage
+ gen/Amazonka/TimeStreamQuery/Types/Row.hs view
@@ -0,0 +1,68 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.Row+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.Row where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import {-# SOURCE #-} Amazonka.TimeStreamQuery.Types.Datum++-- | Represents a single row in the query results.+--+-- /See:/ 'newRow' smart constructor.+data Row = Row'+ { -- | List of data points in a single row of the result set.+ data' :: [Datum]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Row' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'data'', 'row_data' - List of data points in a single row of the result set.+newRow ::+ Row+newRow = Row' {data' = Prelude.mempty}++-- | List of data points in a single row of the result set.+row_data :: Lens.Lens' Row [Datum]+row_data = Lens.lens (\Row' {data'} -> data') (\s@Row' {} a -> s {data' = a} :: Row) Prelude.. Lens.coerced++instance Data.FromJSON Row where+ parseJSON =+ Data.withObject+ "Row"+ ( \x ->+ Row'+ Prelude.<$> (x Data..:? "Data" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable Row where+ hashWithSalt _salt Row' {..} =+ _salt `Prelude.hashWithSalt` data'++instance Prelude.NFData Row where+ rnf Row' {..} = Prelude.rnf data'
+ gen/Amazonka/TimeStreamQuery/Types/Row.hs-boot view
@@ -0,0 +1,31 @@+{-# OPTIONS_GHC -Wno-missing-methods #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.Row+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.Row where++import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++data Row++instance Prelude.Eq Row++instance Prelude.Read Row++instance Prelude.Show Row++instance Prelude.Generic Row++instance Data.FromJSON Row++instance Prelude.NFData Row++instance Prelude.Hashable Row
+ gen/Amazonka/TimeStreamQuery/Types/S3Configuration.hs view
@@ -0,0 +1,119 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.S3Configuration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.S3Configuration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.S3EncryptionOption++-- | Details on S3 location for error reports that result from running a+-- query.+--+-- /See:/ 'newS3Configuration' smart constructor.+data S3Configuration = S3Configuration'+ { -- | Encryption at rest options for the error reports. If no encryption+ -- option is specified, Timestream will choose SSE_S3 as default.+ encryptionOption :: Prelude.Maybe S3EncryptionOption,+ -- | Prefix for the error report key. Timestream by default adds the+ -- following prefix to the error report path.+ objectKeyPrefix :: Prelude.Maybe Prelude.Text,+ -- | Name of the S3 bucket under which error reports will be created.+ bucketName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'S3Configuration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'encryptionOption', 's3Configuration_encryptionOption' - Encryption at rest options for the error reports. If no encryption+-- option is specified, Timestream will choose SSE_S3 as default.+--+-- 'objectKeyPrefix', 's3Configuration_objectKeyPrefix' - Prefix for the error report key. Timestream by default adds the+-- following prefix to the error report path.+--+-- 'bucketName', 's3Configuration_bucketName' - Name of the S3 bucket under which error reports will be created.+newS3Configuration ::+ -- | 'bucketName'+ Prelude.Text ->+ S3Configuration+newS3Configuration pBucketName_ =+ S3Configuration'+ { encryptionOption =+ Prelude.Nothing,+ objectKeyPrefix = Prelude.Nothing,+ bucketName = pBucketName_+ }++-- | Encryption at rest options for the error reports. If no encryption+-- option is specified, Timestream will choose SSE_S3 as default.+s3Configuration_encryptionOption :: Lens.Lens' S3Configuration (Prelude.Maybe S3EncryptionOption)+s3Configuration_encryptionOption = Lens.lens (\S3Configuration' {encryptionOption} -> encryptionOption) (\s@S3Configuration' {} a -> s {encryptionOption = a} :: S3Configuration)++-- | Prefix for the error report key. Timestream by default adds the+-- following prefix to the error report path.+s3Configuration_objectKeyPrefix :: Lens.Lens' S3Configuration (Prelude.Maybe Prelude.Text)+s3Configuration_objectKeyPrefix = Lens.lens (\S3Configuration' {objectKeyPrefix} -> objectKeyPrefix) (\s@S3Configuration' {} a -> s {objectKeyPrefix = a} :: S3Configuration)++-- | Name of the S3 bucket under which error reports will be created.+s3Configuration_bucketName :: Lens.Lens' S3Configuration Prelude.Text+s3Configuration_bucketName = Lens.lens (\S3Configuration' {bucketName} -> bucketName) (\s@S3Configuration' {} a -> s {bucketName = a} :: S3Configuration)++instance Data.FromJSON S3Configuration where+ parseJSON =+ Data.withObject+ "S3Configuration"+ ( \x ->+ S3Configuration'+ Prelude.<$> (x Data..:? "EncryptionOption")+ Prelude.<*> (x Data..:? "ObjectKeyPrefix")+ Prelude.<*> (x Data..: "BucketName")+ )++instance Prelude.Hashable S3Configuration where+ hashWithSalt _salt S3Configuration' {..} =+ _salt+ `Prelude.hashWithSalt` encryptionOption+ `Prelude.hashWithSalt` objectKeyPrefix+ `Prelude.hashWithSalt` bucketName++instance Prelude.NFData S3Configuration where+ rnf S3Configuration' {..} =+ Prelude.rnf encryptionOption+ `Prelude.seq` Prelude.rnf objectKeyPrefix+ `Prelude.seq` Prelude.rnf bucketName++instance Data.ToJSON S3Configuration where+ toJSON S3Configuration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("EncryptionOption" Data..=)+ Prelude.<$> encryptionOption,+ ("ObjectKeyPrefix" Data..=)+ Prelude.<$> objectKeyPrefix,+ Prelude.Just ("BucketName" Data..= bucketName)+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/S3EncryptionOption.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.S3EncryptionOption+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.S3EncryptionOption+ ( S3EncryptionOption+ ( ..,+ S3EncryptionOption_SSE_KMS,+ S3EncryptionOption_SSE_S3+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype S3EncryptionOption = S3EncryptionOption'+ { fromS3EncryptionOption ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern S3EncryptionOption_SSE_KMS :: S3EncryptionOption+pattern S3EncryptionOption_SSE_KMS = S3EncryptionOption' "SSE_KMS"++pattern S3EncryptionOption_SSE_S3 :: S3EncryptionOption+pattern S3EncryptionOption_SSE_S3 = S3EncryptionOption' "SSE_S3"++{-# COMPLETE+ S3EncryptionOption_SSE_KMS,+ S3EncryptionOption_SSE_S3,+ S3EncryptionOption'+ #-}
+ gen/Amazonka/TimeStreamQuery/Types/S3ReportLocation.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.S3ReportLocation+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.S3ReportLocation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | S3 report location for the scheduled query run.+--+-- /See:/ 'newS3ReportLocation' smart constructor.+data S3ReportLocation = S3ReportLocation'+ { -- | S3 bucket name.+ bucketName :: Prelude.Maybe Prelude.Text,+ -- | S3 key.+ objectKey :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'S3ReportLocation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'bucketName', 's3ReportLocation_bucketName' - S3 bucket name.+--+-- 'objectKey', 's3ReportLocation_objectKey' - S3 key.+newS3ReportLocation ::+ S3ReportLocation+newS3ReportLocation =+ S3ReportLocation'+ { bucketName = Prelude.Nothing,+ objectKey = Prelude.Nothing+ }++-- | S3 bucket name.+s3ReportLocation_bucketName :: Lens.Lens' S3ReportLocation (Prelude.Maybe Prelude.Text)+s3ReportLocation_bucketName = Lens.lens (\S3ReportLocation' {bucketName} -> bucketName) (\s@S3ReportLocation' {} a -> s {bucketName = a} :: S3ReportLocation)++-- | S3 key.+s3ReportLocation_objectKey :: Lens.Lens' S3ReportLocation (Prelude.Maybe Prelude.Text)+s3ReportLocation_objectKey = Lens.lens (\S3ReportLocation' {objectKey} -> objectKey) (\s@S3ReportLocation' {} a -> s {objectKey = a} :: S3ReportLocation)++instance Data.FromJSON S3ReportLocation where+ parseJSON =+ Data.withObject+ "S3ReportLocation"+ ( \x ->+ S3ReportLocation'+ Prelude.<$> (x Data..:? "BucketName")+ Prelude.<*> (x Data..:? "ObjectKey")+ )++instance Prelude.Hashable S3ReportLocation where+ hashWithSalt _salt S3ReportLocation' {..} =+ _salt+ `Prelude.hashWithSalt` bucketName+ `Prelude.hashWithSalt` objectKey++instance Prelude.NFData S3ReportLocation where+ rnf S3ReportLocation' {..} =+ Prelude.rnf bucketName+ `Prelude.seq` Prelude.rnf objectKey
+ gen/Amazonka/TimeStreamQuery/Types/ScalarMeasureValueType.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ScalarMeasureValueType+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ScalarMeasureValueType+ ( ScalarMeasureValueType+ ( ..,+ ScalarMeasureValueType_BIGINT,+ ScalarMeasureValueType_BOOLEAN,+ ScalarMeasureValueType_DOUBLE,+ ScalarMeasureValueType_TIMESTAMP,+ ScalarMeasureValueType_VARCHAR+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScalarMeasureValueType = ScalarMeasureValueType'+ { fromScalarMeasureValueType ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern ScalarMeasureValueType_BIGINT :: ScalarMeasureValueType+pattern ScalarMeasureValueType_BIGINT = ScalarMeasureValueType' "BIGINT"++pattern ScalarMeasureValueType_BOOLEAN :: ScalarMeasureValueType+pattern ScalarMeasureValueType_BOOLEAN = ScalarMeasureValueType' "BOOLEAN"++pattern ScalarMeasureValueType_DOUBLE :: ScalarMeasureValueType+pattern ScalarMeasureValueType_DOUBLE = ScalarMeasureValueType' "DOUBLE"++pattern ScalarMeasureValueType_TIMESTAMP :: ScalarMeasureValueType+pattern ScalarMeasureValueType_TIMESTAMP = ScalarMeasureValueType' "TIMESTAMP"++pattern ScalarMeasureValueType_VARCHAR :: ScalarMeasureValueType+pattern ScalarMeasureValueType_VARCHAR = ScalarMeasureValueType' "VARCHAR"++{-# COMPLETE+ ScalarMeasureValueType_BIGINT,+ ScalarMeasureValueType_BOOLEAN,+ ScalarMeasureValueType_DOUBLE,+ ScalarMeasureValueType_TIMESTAMP,+ ScalarMeasureValueType_VARCHAR,+ ScalarMeasureValueType'+ #-}
+ gen/Amazonka/TimeStreamQuery/Types/ScalarType.hs view
@@ -0,0 +1,116 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ScalarType+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ScalarType+ ( ScalarType+ ( ..,+ ScalarType_BIGINT,+ ScalarType_BOOLEAN,+ ScalarType_DATE,+ ScalarType_DOUBLE,+ ScalarType_INTEGER,+ ScalarType_INTERVAL_DAY_TO_SECOND,+ ScalarType_INTERVAL_YEAR_TO_MONTH,+ ScalarType_TIME,+ ScalarType_TIMESTAMP,+ ScalarType_UNKNOWN,+ ScalarType_VARCHAR+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScalarType = ScalarType'+ { fromScalarType ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern ScalarType_BIGINT :: ScalarType+pattern ScalarType_BIGINT = ScalarType' "BIGINT"++pattern ScalarType_BOOLEAN :: ScalarType+pattern ScalarType_BOOLEAN = ScalarType' "BOOLEAN"++pattern ScalarType_DATE :: ScalarType+pattern ScalarType_DATE = ScalarType' "DATE"++pattern ScalarType_DOUBLE :: ScalarType+pattern ScalarType_DOUBLE = ScalarType' "DOUBLE"++pattern ScalarType_INTEGER :: ScalarType+pattern ScalarType_INTEGER = ScalarType' "INTEGER"++pattern ScalarType_INTERVAL_DAY_TO_SECOND :: ScalarType+pattern ScalarType_INTERVAL_DAY_TO_SECOND = ScalarType' "INTERVAL_DAY_TO_SECOND"++pattern ScalarType_INTERVAL_YEAR_TO_MONTH :: ScalarType+pattern ScalarType_INTERVAL_YEAR_TO_MONTH = ScalarType' "INTERVAL_YEAR_TO_MONTH"++pattern ScalarType_TIME :: ScalarType+pattern ScalarType_TIME = ScalarType' "TIME"++pattern ScalarType_TIMESTAMP :: ScalarType+pattern ScalarType_TIMESTAMP = ScalarType' "TIMESTAMP"++pattern ScalarType_UNKNOWN :: ScalarType+pattern ScalarType_UNKNOWN = ScalarType' "UNKNOWN"++pattern ScalarType_VARCHAR :: ScalarType+pattern ScalarType_VARCHAR = ScalarType' "VARCHAR"++{-# COMPLETE+ ScalarType_BIGINT,+ ScalarType_BOOLEAN,+ ScalarType_DATE,+ ScalarType_DOUBLE,+ ScalarType_INTEGER,+ ScalarType_INTERVAL_DAY_TO_SECOND,+ ScalarType_INTERVAL_YEAR_TO_MONTH,+ ScalarType_TIME,+ ScalarType_TIMESTAMP,+ ScalarType_UNKNOWN,+ ScalarType_VARCHAR,+ ScalarType'+ #-}
+ gen/Amazonka/TimeStreamQuery/Types/ScheduleConfiguration.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ScheduleConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ScheduleConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Configuration of the schedule of the query.+--+-- /See:/ 'newScheduleConfiguration' smart constructor.+data ScheduleConfiguration = ScheduleConfiguration'+ { -- | An expression that denotes when to trigger the scheduled query run. This+ -- can be a cron expression or a rate expression.+ scheduleExpression :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ScheduleConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'scheduleExpression', 'scheduleConfiguration_scheduleExpression' - An expression that denotes when to trigger the scheduled query run. This+-- can be a cron expression or a rate expression.+newScheduleConfiguration ::+ -- | 'scheduleExpression'+ Prelude.Text ->+ ScheduleConfiguration+newScheduleConfiguration pScheduleExpression_ =+ ScheduleConfiguration'+ { scheduleExpression =+ pScheduleExpression_+ }++-- | An expression that denotes when to trigger the scheduled query run. This+-- can be a cron expression or a rate expression.+scheduleConfiguration_scheduleExpression :: Lens.Lens' ScheduleConfiguration Prelude.Text+scheduleConfiguration_scheduleExpression = Lens.lens (\ScheduleConfiguration' {scheduleExpression} -> scheduleExpression) (\s@ScheduleConfiguration' {} a -> s {scheduleExpression = a} :: ScheduleConfiguration)++instance Data.FromJSON ScheduleConfiguration where+ parseJSON =+ Data.withObject+ "ScheduleConfiguration"+ ( \x ->+ ScheduleConfiguration'+ Prelude.<$> (x Data..: "ScheduleExpression")+ )++instance Prelude.Hashable ScheduleConfiguration where+ hashWithSalt _salt ScheduleConfiguration' {..} =+ _salt `Prelude.hashWithSalt` scheduleExpression++instance Prelude.NFData ScheduleConfiguration where+ rnf ScheduleConfiguration' {..} =+ Prelude.rnf scheduleExpression++instance Data.ToJSON ScheduleConfiguration where+ toJSON ScheduleConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("ScheduleExpression" Data..= scheduleExpression)+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/ScheduledQuery.hs view
@@ -0,0 +1,178 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ScheduledQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ScheduledQuery where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.ErrorReportConfiguration+import Amazonka.TimeStreamQuery.Types.ScheduledQueryRunStatus+import Amazonka.TimeStreamQuery.Types.ScheduledQueryState+import Amazonka.TimeStreamQuery.Types.TargetDestination++-- | Scheduled Query+--+-- /See:/ 'newScheduledQuery' smart constructor.+data ScheduledQuery = ScheduledQuery'+ { -- | The creation time of the scheduled query.+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | Configuration for scheduled query error reporting.+ errorReportConfiguration :: Prelude.Maybe ErrorReportConfiguration,+ -- | Status of the last scheduled query run.+ lastRunStatus :: Prelude.Maybe ScheduledQueryRunStatus,+ -- | The next time the scheduled query is to be run.+ nextInvocationTime :: Prelude.Maybe Data.POSIX,+ -- | The last time the scheduled query was run.+ previousInvocationTime :: Prelude.Maybe Data.POSIX,+ -- | Target data source where final scheduled query result will be written.+ targetDestination :: Prelude.Maybe TargetDestination,+ -- | The Amazon Resource Name.+ arn :: Prelude.Text,+ -- | The name of the scheduled query.+ name :: Prelude.Text,+ -- | State of scheduled query.+ state :: ScheduledQueryState+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ScheduledQuery' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTime', 'scheduledQuery_creationTime' - The creation time of the scheduled query.+--+-- 'errorReportConfiguration', 'scheduledQuery_errorReportConfiguration' - Configuration for scheduled query error reporting.+--+-- 'lastRunStatus', 'scheduledQuery_lastRunStatus' - Status of the last scheduled query run.+--+-- 'nextInvocationTime', 'scheduledQuery_nextInvocationTime' - The next time the scheduled query is to be run.+--+-- 'previousInvocationTime', 'scheduledQuery_previousInvocationTime' - The last time the scheduled query was run.+--+-- 'targetDestination', 'scheduledQuery_targetDestination' - Target data source where final scheduled query result will be written.+--+-- 'arn', 'scheduledQuery_arn' - The Amazon Resource Name.+--+-- 'name', 'scheduledQuery_name' - The name of the scheduled query.+--+-- 'state', 'scheduledQuery_state' - State of scheduled query.+newScheduledQuery ::+ -- | 'arn'+ Prelude.Text ->+ -- | 'name'+ Prelude.Text ->+ -- | 'state'+ ScheduledQueryState ->+ ScheduledQuery+newScheduledQuery pArn_ pName_ pState_ =+ ScheduledQuery'+ { creationTime = Prelude.Nothing,+ errorReportConfiguration = Prelude.Nothing,+ lastRunStatus = Prelude.Nothing,+ nextInvocationTime = Prelude.Nothing,+ previousInvocationTime = Prelude.Nothing,+ targetDestination = Prelude.Nothing,+ arn = pArn_,+ name = pName_,+ state = pState_+ }++-- | The creation time of the scheduled query.+scheduledQuery_creationTime :: Lens.Lens' ScheduledQuery (Prelude.Maybe Prelude.UTCTime)+scheduledQuery_creationTime = Lens.lens (\ScheduledQuery' {creationTime} -> creationTime) (\s@ScheduledQuery' {} a -> s {creationTime = a} :: ScheduledQuery) Prelude.. Lens.mapping Data._Time++-- | Configuration for scheduled query error reporting.+scheduledQuery_errorReportConfiguration :: Lens.Lens' ScheduledQuery (Prelude.Maybe ErrorReportConfiguration)+scheduledQuery_errorReportConfiguration = Lens.lens (\ScheduledQuery' {errorReportConfiguration} -> errorReportConfiguration) (\s@ScheduledQuery' {} a -> s {errorReportConfiguration = a} :: ScheduledQuery)++-- | Status of the last scheduled query run.+scheduledQuery_lastRunStatus :: Lens.Lens' ScheduledQuery (Prelude.Maybe ScheduledQueryRunStatus)+scheduledQuery_lastRunStatus = Lens.lens (\ScheduledQuery' {lastRunStatus} -> lastRunStatus) (\s@ScheduledQuery' {} a -> s {lastRunStatus = a} :: ScheduledQuery)++-- | The next time the scheduled query is to be run.+scheduledQuery_nextInvocationTime :: Lens.Lens' ScheduledQuery (Prelude.Maybe Prelude.UTCTime)+scheduledQuery_nextInvocationTime = Lens.lens (\ScheduledQuery' {nextInvocationTime} -> nextInvocationTime) (\s@ScheduledQuery' {} a -> s {nextInvocationTime = a} :: ScheduledQuery) Prelude.. Lens.mapping Data._Time++-- | The last time the scheduled query was run.+scheduledQuery_previousInvocationTime :: Lens.Lens' ScheduledQuery (Prelude.Maybe Prelude.UTCTime)+scheduledQuery_previousInvocationTime = Lens.lens (\ScheduledQuery' {previousInvocationTime} -> previousInvocationTime) (\s@ScheduledQuery' {} a -> s {previousInvocationTime = a} :: ScheduledQuery) Prelude.. Lens.mapping Data._Time++-- | Target data source where final scheduled query result will be written.+scheduledQuery_targetDestination :: Lens.Lens' ScheduledQuery (Prelude.Maybe TargetDestination)+scheduledQuery_targetDestination = Lens.lens (\ScheduledQuery' {targetDestination} -> targetDestination) (\s@ScheduledQuery' {} a -> s {targetDestination = a} :: ScheduledQuery)++-- | The Amazon Resource Name.+scheduledQuery_arn :: Lens.Lens' ScheduledQuery Prelude.Text+scheduledQuery_arn = Lens.lens (\ScheduledQuery' {arn} -> arn) (\s@ScheduledQuery' {} a -> s {arn = a} :: ScheduledQuery)++-- | The name of the scheduled query.+scheduledQuery_name :: Lens.Lens' ScheduledQuery Prelude.Text+scheduledQuery_name = Lens.lens (\ScheduledQuery' {name} -> name) (\s@ScheduledQuery' {} a -> s {name = a} :: ScheduledQuery)++-- | State of scheduled query.+scheduledQuery_state :: Lens.Lens' ScheduledQuery ScheduledQueryState+scheduledQuery_state = Lens.lens (\ScheduledQuery' {state} -> state) (\s@ScheduledQuery' {} a -> s {state = a} :: ScheduledQuery)++instance Data.FromJSON ScheduledQuery where+ parseJSON =+ Data.withObject+ "ScheduledQuery"+ ( \x ->+ ScheduledQuery'+ Prelude.<$> (x Data..:? "CreationTime")+ Prelude.<*> (x Data..:? "ErrorReportConfiguration")+ Prelude.<*> (x Data..:? "LastRunStatus")+ Prelude.<*> (x Data..:? "NextInvocationTime")+ Prelude.<*> (x Data..:? "PreviousInvocationTime")+ Prelude.<*> (x Data..:? "TargetDestination")+ Prelude.<*> (x Data..: "Arn")+ Prelude.<*> (x Data..: "Name")+ Prelude.<*> (x Data..: "State")+ )++instance Prelude.Hashable ScheduledQuery where+ hashWithSalt _salt ScheduledQuery' {..} =+ _salt+ `Prelude.hashWithSalt` creationTime+ `Prelude.hashWithSalt` errorReportConfiguration+ `Prelude.hashWithSalt` lastRunStatus+ `Prelude.hashWithSalt` nextInvocationTime+ `Prelude.hashWithSalt` previousInvocationTime+ `Prelude.hashWithSalt` targetDestination+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` state++instance Prelude.NFData ScheduledQuery where+ rnf ScheduledQuery' {..} =+ Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf errorReportConfiguration+ `Prelude.seq` Prelude.rnf lastRunStatus+ `Prelude.seq` Prelude.rnf nextInvocationTime+ `Prelude.seq` Prelude.rnf previousInvocationTime+ `Prelude.seq` Prelude.rnf targetDestination+ `Prelude.seq` Prelude.rnf arn+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state
+ gen/Amazonka/TimeStreamQuery/Types/ScheduledQueryDescription.hs view
@@ -0,0 +1,273 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ScheduledQueryDescription+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ScheduledQueryDescription where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.ErrorReportConfiguration+import Amazonka.TimeStreamQuery.Types.NotificationConfiguration+import Amazonka.TimeStreamQuery.Types.ScheduleConfiguration+import Amazonka.TimeStreamQuery.Types.ScheduledQueryRunSummary+import Amazonka.TimeStreamQuery.Types.ScheduledQueryState+import Amazonka.TimeStreamQuery.Types.TargetConfiguration++-- | Structure that describes scheduled query.+--+-- /See:/ 'newScheduledQueryDescription' smart constructor.+data ScheduledQueryDescription = ScheduledQueryDescription'+ { -- | Creation time of the scheduled query.+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | Error-reporting configuration for the scheduled query.+ errorReportConfiguration :: Prelude.Maybe ErrorReportConfiguration,+ -- | A customer provided KMS key used to encrypt the scheduled query+ -- resource.+ kmsKeyId :: Prelude.Maybe Prelude.Text,+ -- | Runtime summary for the last scheduled query run.+ lastRunSummary :: Prelude.Maybe ScheduledQueryRunSummary,+ -- | The next time the scheduled query is scheduled to run.+ nextInvocationTime :: Prelude.Maybe Data.POSIX,+ -- | Last time the query was run.+ previousInvocationTime :: Prelude.Maybe Data.POSIX,+ -- | Runtime summary for the last five failed scheduled query runs.+ recentlyFailedRuns :: Prelude.Maybe [ScheduledQueryRunSummary],+ -- | IAM role that Timestream uses to run the schedule query.+ scheduledQueryExecutionRoleArn :: Prelude.Maybe Prelude.Text,+ -- | Scheduled query target store configuration.+ targetConfiguration :: Prelude.Maybe TargetConfiguration,+ -- | Scheduled query ARN.+ arn :: Prelude.Text,+ -- | Name of the scheduled query.+ name :: Prelude.Text,+ -- | The query to be run.+ queryString :: Data.Sensitive Prelude.Text,+ -- | State of the scheduled query.+ state :: ScheduledQueryState,+ -- | Schedule configuration.+ scheduleConfiguration :: ScheduleConfiguration,+ -- | Notification configuration.+ notificationConfiguration :: NotificationConfiguration+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ScheduledQueryDescription' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTime', 'scheduledQueryDescription_creationTime' - Creation time of the scheduled query.+--+-- 'errorReportConfiguration', 'scheduledQueryDescription_errorReportConfiguration' - Error-reporting configuration for the scheduled query.+--+-- 'kmsKeyId', 'scheduledQueryDescription_kmsKeyId' - A customer provided KMS key used to encrypt the scheduled query+-- resource.+--+-- 'lastRunSummary', 'scheduledQueryDescription_lastRunSummary' - Runtime summary for the last scheduled query run.+--+-- 'nextInvocationTime', 'scheduledQueryDescription_nextInvocationTime' - The next time the scheduled query is scheduled to run.+--+-- 'previousInvocationTime', 'scheduledQueryDescription_previousInvocationTime' - Last time the query was run.+--+-- 'recentlyFailedRuns', 'scheduledQueryDescription_recentlyFailedRuns' - Runtime summary for the last five failed scheduled query runs.+--+-- 'scheduledQueryExecutionRoleArn', 'scheduledQueryDescription_scheduledQueryExecutionRoleArn' - IAM role that Timestream uses to run the schedule query.+--+-- 'targetConfiguration', 'scheduledQueryDescription_targetConfiguration' - Scheduled query target store configuration.+--+-- 'arn', 'scheduledQueryDescription_arn' - Scheduled query ARN.+--+-- 'name', 'scheduledQueryDescription_name' - Name of the scheduled query.+--+-- 'queryString', 'scheduledQueryDescription_queryString' - The query to be run.+--+-- 'state', 'scheduledQueryDescription_state' - State of the scheduled query.+--+-- 'scheduleConfiguration', 'scheduledQueryDescription_scheduleConfiguration' - Schedule configuration.+--+-- 'notificationConfiguration', 'scheduledQueryDescription_notificationConfiguration' - Notification configuration.+newScheduledQueryDescription ::+ -- | 'arn'+ Prelude.Text ->+ -- | 'name'+ Prelude.Text ->+ -- | 'queryString'+ Prelude.Text ->+ -- | 'state'+ ScheduledQueryState ->+ -- | 'scheduleConfiguration'+ ScheduleConfiguration ->+ -- | 'notificationConfiguration'+ NotificationConfiguration ->+ ScheduledQueryDescription+newScheduledQueryDescription+ pArn_+ pName_+ pQueryString_+ pState_+ pScheduleConfiguration_+ pNotificationConfiguration_ =+ ScheduledQueryDescription'+ { creationTime =+ Prelude.Nothing,+ errorReportConfiguration = Prelude.Nothing,+ kmsKeyId = Prelude.Nothing,+ lastRunSummary = Prelude.Nothing,+ nextInvocationTime = Prelude.Nothing,+ previousInvocationTime = Prelude.Nothing,+ recentlyFailedRuns = Prelude.Nothing,+ scheduledQueryExecutionRoleArn = Prelude.Nothing,+ targetConfiguration = Prelude.Nothing,+ arn = pArn_,+ name = pName_,+ queryString =+ Data._Sensitive Lens.# pQueryString_,+ state = pState_,+ scheduleConfiguration = pScheduleConfiguration_,+ notificationConfiguration =+ pNotificationConfiguration_+ }++-- | Creation time of the scheduled query.+scheduledQueryDescription_creationTime :: Lens.Lens' ScheduledQueryDescription (Prelude.Maybe Prelude.UTCTime)+scheduledQueryDescription_creationTime = Lens.lens (\ScheduledQueryDescription' {creationTime} -> creationTime) (\s@ScheduledQueryDescription' {} a -> s {creationTime = a} :: ScheduledQueryDescription) Prelude.. Lens.mapping Data._Time++-- | Error-reporting configuration for the scheduled query.+scheduledQueryDescription_errorReportConfiguration :: Lens.Lens' ScheduledQueryDescription (Prelude.Maybe ErrorReportConfiguration)+scheduledQueryDescription_errorReportConfiguration = Lens.lens (\ScheduledQueryDescription' {errorReportConfiguration} -> errorReportConfiguration) (\s@ScheduledQueryDescription' {} a -> s {errorReportConfiguration = a} :: ScheduledQueryDescription)++-- | A customer provided KMS key used to encrypt the scheduled query+-- resource.+scheduledQueryDescription_kmsKeyId :: Lens.Lens' ScheduledQueryDescription (Prelude.Maybe Prelude.Text)+scheduledQueryDescription_kmsKeyId = Lens.lens (\ScheduledQueryDescription' {kmsKeyId} -> kmsKeyId) (\s@ScheduledQueryDescription' {} a -> s {kmsKeyId = a} :: ScheduledQueryDescription)++-- | Runtime summary for the last scheduled query run.+scheduledQueryDescription_lastRunSummary :: Lens.Lens' ScheduledQueryDescription (Prelude.Maybe ScheduledQueryRunSummary)+scheduledQueryDescription_lastRunSummary = Lens.lens (\ScheduledQueryDescription' {lastRunSummary} -> lastRunSummary) (\s@ScheduledQueryDescription' {} a -> s {lastRunSummary = a} :: ScheduledQueryDescription)++-- | The next time the scheduled query is scheduled to run.+scheduledQueryDescription_nextInvocationTime :: Lens.Lens' ScheduledQueryDescription (Prelude.Maybe Prelude.UTCTime)+scheduledQueryDescription_nextInvocationTime = Lens.lens (\ScheduledQueryDescription' {nextInvocationTime} -> nextInvocationTime) (\s@ScheduledQueryDescription' {} a -> s {nextInvocationTime = a} :: ScheduledQueryDescription) Prelude.. Lens.mapping Data._Time++-- | Last time the query was run.+scheduledQueryDescription_previousInvocationTime :: Lens.Lens' ScheduledQueryDescription (Prelude.Maybe Prelude.UTCTime)+scheduledQueryDescription_previousInvocationTime = Lens.lens (\ScheduledQueryDescription' {previousInvocationTime} -> previousInvocationTime) (\s@ScheduledQueryDescription' {} a -> s {previousInvocationTime = a} :: ScheduledQueryDescription) Prelude.. Lens.mapping Data._Time++-- | Runtime summary for the last five failed scheduled query runs.+scheduledQueryDescription_recentlyFailedRuns :: Lens.Lens' ScheduledQueryDescription (Prelude.Maybe [ScheduledQueryRunSummary])+scheduledQueryDescription_recentlyFailedRuns = Lens.lens (\ScheduledQueryDescription' {recentlyFailedRuns} -> recentlyFailedRuns) (\s@ScheduledQueryDescription' {} a -> s {recentlyFailedRuns = a} :: ScheduledQueryDescription) Prelude.. Lens.mapping Lens.coerced++-- | IAM role that Timestream uses to run the schedule query.+scheduledQueryDescription_scheduledQueryExecutionRoleArn :: Lens.Lens' ScheduledQueryDescription (Prelude.Maybe Prelude.Text)+scheduledQueryDescription_scheduledQueryExecutionRoleArn = Lens.lens (\ScheduledQueryDescription' {scheduledQueryExecutionRoleArn} -> scheduledQueryExecutionRoleArn) (\s@ScheduledQueryDescription' {} a -> s {scheduledQueryExecutionRoleArn = a} :: ScheduledQueryDescription)++-- | Scheduled query target store configuration.+scheduledQueryDescription_targetConfiguration :: Lens.Lens' ScheduledQueryDescription (Prelude.Maybe TargetConfiguration)+scheduledQueryDescription_targetConfiguration = Lens.lens (\ScheduledQueryDescription' {targetConfiguration} -> targetConfiguration) (\s@ScheduledQueryDescription' {} a -> s {targetConfiguration = a} :: ScheduledQueryDescription)++-- | Scheduled query ARN.+scheduledQueryDescription_arn :: Lens.Lens' ScheduledQueryDescription Prelude.Text+scheduledQueryDescription_arn = Lens.lens (\ScheduledQueryDescription' {arn} -> arn) (\s@ScheduledQueryDescription' {} a -> s {arn = a} :: ScheduledQueryDescription)++-- | Name of the scheduled query.+scheduledQueryDescription_name :: Lens.Lens' ScheduledQueryDescription Prelude.Text+scheduledQueryDescription_name = Lens.lens (\ScheduledQueryDescription' {name} -> name) (\s@ScheduledQueryDescription' {} a -> s {name = a} :: ScheduledQueryDescription)++-- | The query to be run.+scheduledQueryDescription_queryString :: Lens.Lens' ScheduledQueryDescription Prelude.Text+scheduledQueryDescription_queryString = Lens.lens (\ScheduledQueryDescription' {queryString} -> queryString) (\s@ScheduledQueryDescription' {} a -> s {queryString = a} :: ScheduledQueryDescription) Prelude.. Data._Sensitive++-- | State of the scheduled query.+scheduledQueryDescription_state :: Lens.Lens' ScheduledQueryDescription ScheduledQueryState+scheduledQueryDescription_state = Lens.lens (\ScheduledQueryDescription' {state} -> state) (\s@ScheduledQueryDescription' {} a -> s {state = a} :: ScheduledQueryDescription)++-- | Schedule configuration.+scheduledQueryDescription_scheduleConfiguration :: Lens.Lens' ScheduledQueryDescription ScheduleConfiguration+scheduledQueryDescription_scheduleConfiguration = Lens.lens (\ScheduledQueryDescription' {scheduleConfiguration} -> scheduleConfiguration) (\s@ScheduledQueryDescription' {} a -> s {scheduleConfiguration = a} :: ScheduledQueryDescription)++-- | Notification configuration.+scheduledQueryDescription_notificationConfiguration :: Lens.Lens' ScheduledQueryDescription NotificationConfiguration+scheduledQueryDescription_notificationConfiguration = Lens.lens (\ScheduledQueryDescription' {notificationConfiguration} -> notificationConfiguration) (\s@ScheduledQueryDescription' {} a -> s {notificationConfiguration = a} :: ScheduledQueryDescription)++instance Data.FromJSON ScheduledQueryDescription where+ parseJSON =+ Data.withObject+ "ScheduledQueryDescription"+ ( \x ->+ ScheduledQueryDescription'+ Prelude.<$> (x Data..:? "CreationTime")+ Prelude.<*> (x Data..:? "ErrorReportConfiguration")+ Prelude.<*> (x Data..:? "KmsKeyId")+ Prelude.<*> (x Data..:? "LastRunSummary")+ Prelude.<*> (x Data..:? "NextInvocationTime")+ Prelude.<*> (x Data..:? "PreviousInvocationTime")+ Prelude.<*> ( x+ Data..:? "RecentlyFailedRuns"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "ScheduledQueryExecutionRoleArn")+ Prelude.<*> (x Data..:? "TargetConfiguration")+ Prelude.<*> (x Data..: "Arn")+ Prelude.<*> (x Data..: "Name")+ Prelude.<*> (x Data..: "QueryString")+ Prelude.<*> (x Data..: "State")+ Prelude.<*> (x Data..: "ScheduleConfiguration")+ Prelude.<*> (x Data..: "NotificationConfiguration")+ )++instance Prelude.Hashable ScheduledQueryDescription where+ hashWithSalt _salt ScheduledQueryDescription' {..} =+ _salt+ `Prelude.hashWithSalt` creationTime+ `Prelude.hashWithSalt` errorReportConfiguration+ `Prelude.hashWithSalt` kmsKeyId+ `Prelude.hashWithSalt` lastRunSummary+ `Prelude.hashWithSalt` nextInvocationTime+ `Prelude.hashWithSalt` previousInvocationTime+ `Prelude.hashWithSalt` recentlyFailedRuns+ `Prelude.hashWithSalt` scheduledQueryExecutionRoleArn+ `Prelude.hashWithSalt` targetConfiguration+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` queryString+ `Prelude.hashWithSalt` state+ `Prelude.hashWithSalt` scheduleConfiguration+ `Prelude.hashWithSalt` notificationConfiguration++instance Prelude.NFData ScheduledQueryDescription where+ rnf ScheduledQueryDescription' {..} =+ Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf errorReportConfiguration+ `Prelude.seq` Prelude.rnf kmsKeyId+ `Prelude.seq` Prelude.rnf lastRunSummary+ `Prelude.seq` Prelude.rnf nextInvocationTime+ `Prelude.seq` Prelude.rnf previousInvocationTime+ `Prelude.seq` Prelude.rnf recentlyFailedRuns+ `Prelude.seq` Prelude.rnf scheduledQueryExecutionRoleArn+ `Prelude.seq` Prelude.rnf targetConfiguration+ `Prelude.seq` Prelude.rnf arn+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf queryString+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf scheduleConfiguration+ `Prelude.seq` Prelude.rnf notificationConfiguration
+ gen/Amazonka/TimeStreamQuery/Types/ScheduledQueryRunStatus.hs view
@@ -0,0 +1,81 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ScheduledQueryRunStatus+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ScheduledQueryRunStatus+ ( ScheduledQueryRunStatus+ ( ..,+ ScheduledQueryRunStatus_AUTO_TRIGGER_FAILURE,+ ScheduledQueryRunStatus_AUTO_TRIGGER_SUCCESS,+ ScheduledQueryRunStatus_MANUAL_TRIGGER_FAILURE,+ ScheduledQueryRunStatus_MANUAL_TRIGGER_SUCCESS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScheduledQueryRunStatus = ScheduledQueryRunStatus'+ { fromScheduledQueryRunStatus ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern ScheduledQueryRunStatus_AUTO_TRIGGER_FAILURE :: ScheduledQueryRunStatus+pattern ScheduledQueryRunStatus_AUTO_TRIGGER_FAILURE = ScheduledQueryRunStatus' "AUTO_TRIGGER_FAILURE"++pattern ScheduledQueryRunStatus_AUTO_TRIGGER_SUCCESS :: ScheduledQueryRunStatus+pattern ScheduledQueryRunStatus_AUTO_TRIGGER_SUCCESS = ScheduledQueryRunStatus' "AUTO_TRIGGER_SUCCESS"++pattern ScheduledQueryRunStatus_MANUAL_TRIGGER_FAILURE :: ScheduledQueryRunStatus+pattern ScheduledQueryRunStatus_MANUAL_TRIGGER_FAILURE = ScheduledQueryRunStatus' "MANUAL_TRIGGER_FAILURE"++pattern ScheduledQueryRunStatus_MANUAL_TRIGGER_SUCCESS :: ScheduledQueryRunStatus+pattern ScheduledQueryRunStatus_MANUAL_TRIGGER_SUCCESS = ScheduledQueryRunStatus' "MANUAL_TRIGGER_SUCCESS"++{-# COMPLETE+ ScheduledQueryRunStatus_AUTO_TRIGGER_FAILURE,+ ScheduledQueryRunStatus_AUTO_TRIGGER_SUCCESS,+ ScheduledQueryRunStatus_MANUAL_TRIGGER_FAILURE,+ ScheduledQueryRunStatus_MANUAL_TRIGGER_SUCCESS,+ ScheduledQueryRunStatus'+ #-}
+ gen/Amazonka/TimeStreamQuery/Types/ScheduledQueryRunSummary.hs view
@@ -0,0 +1,145 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ScheduledQueryRunSummary+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ScheduledQueryRunSummary where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.ErrorReportLocation+import Amazonka.TimeStreamQuery.Types.ExecutionStats+import Amazonka.TimeStreamQuery.Types.ScheduledQueryRunStatus++-- | Run summary for the scheduled query+--+-- /See:/ 'newScheduledQueryRunSummary' smart constructor.+data ScheduledQueryRunSummary = ScheduledQueryRunSummary'+ { -- | S3 location for error report.+ errorReportLocation :: Prelude.Maybe ErrorReportLocation,+ -- | Runtime statistics for a scheduled run.+ executionStats :: Prelude.Maybe ExecutionStats,+ -- | Error message for the scheduled query in case of failure. You might have+ -- to look at the error report to get more detailed error reasons.+ failureReason :: Prelude.Maybe Prelude.Text,+ -- | InvocationTime for this run. This is the time at which the query is+ -- scheduled to run. Parameter @\@scheduled_runtime@ can be used in the+ -- query to get the value.+ invocationTime :: Prelude.Maybe Data.POSIX,+ -- | The status of a scheduled query run.+ runStatus :: Prelude.Maybe ScheduledQueryRunStatus,+ -- | The actual time when the query was run.+ triggerTime :: Prelude.Maybe Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ScheduledQueryRunSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'errorReportLocation', 'scheduledQueryRunSummary_errorReportLocation' - S3 location for error report.+--+-- 'executionStats', 'scheduledQueryRunSummary_executionStats' - Runtime statistics for a scheduled run.+--+-- 'failureReason', 'scheduledQueryRunSummary_failureReason' - Error message for the scheduled query in case of failure. You might have+-- to look at the error report to get more detailed error reasons.+--+-- 'invocationTime', 'scheduledQueryRunSummary_invocationTime' - InvocationTime for this run. This is the time at which the query is+-- scheduled to run. Parameter @\@scheduled_runtime@ can be used in the+-- query to get the value.+--+-- 'runStatus', 'scheduledQueryRunSummary_runStatus' - The status of a scheduled query run.+--+-- 'triggerTime', 'scheduledQueryRunSummary_triggerTime' - The actual time when the query was run.+newScheduledQueryRunSummary ::+ ScheduledQueryRunSummary+newScheduledQueryRunSummary =+ ScheduledQueryRunSummary'+ { errorReportLocation =+ Prelude.Nothing,+ executionStats = Prelude.Nothing,+ failureReason = Prelude.Nothing,+ invocationTime = Prelude.Nothing,+ runStatus = Prelude.Nothing,+ triggerTime = Prelude.Nothing+ }++-- | S3 location for error report.+scheduledQueryRunSummary_errorReportLocation :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe ErrorReportLocation)+scheduledQueryRunSummary_errorReportLocation = Lens.lens (\ScheduledQueryRunSummary' {errorReportLocation} -> errorReportLocation) (\s@ScheduledQueryRunSummary' {} a -> s {errorReportLocation = a} :: ScheduledQueryRunSummary)++-- | Runtime statistics for a scheduled run.+scheduledQueryRunSummary_executionStats :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe ExecutionStats)+scheduledQueryRunSummary_executionStats = Lens.lens (\ScheduledQueryRunSummary' {executionStats} -> executionStats) (\s@ScheduledQueryRunSummary' {} a -> s {executionStats = a} :: ScheduledQueryRunSummary)++-- | Error message for the scheduled query in case of failure. You might have+-- to look at the error report to get more detailed error reasons.+scheduledQueryRunSummary_failureReason :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe Prelude.Text)+scheduledQueryRunSummary_failureReason = Lens.lens (\ScheduledQueryRunSummary' {failureReason} -> failureReason) (\s@ScheduledQueryRunSummary' {} a -> s {failureReason = a} :: ScheduledQueryRunSummary)++-- | InvocationTime for this run. This is the time at which the query is+-- scheduled to run. Parameter @\@scheduled_runtime@ can be used in the+-- query to get the value.+scheduledQueryRunSummary_invocationTime :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe Prelude.UTCTime)+scheduledQueryRunSummary_invocationTime = Lens.lens (\ScheduledQueryRunSummary' {invocationTime} -> invocationTime) (\s@ScheduledQueryRunSummary' {} a -> s {invocationTime = a} :: ScheduledQueryRunSummary) Prelude.. Lens.mapping Data._Time++-- | The status of a scheduled query run.+scheduledQueryRunSummary_runStatus :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe ScheduledQueryRunStatus)+scheduledQueryRunSummary_runStatus = Lens.lens (\ScheduledQueryRunSummary' {runStatus} -> runStatus) (\s@ScheduledQueryRunSummary' {} a -> s {runStatus = a} :: ScheduledQueryRunSummary)++-- | The actual time when the query was run.+scheduledQueryRunSummary_triggerTime :: Lens.Lens' ScheduledQueryRunSummary (Prelude.Maybe Prelude.UTCTime)+scheduledQueryRunSummary_triggerTime = Lens.lens (\ScheduledQueryRunSummary' {triggerTime} -> triggerTime) (\s@ScheduledQueryRunSummary' {} a -> s {triggerTime = a} :: ScheduledQueryRunSummary) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON ScheduledQueryRunSummary where+ parseJSON =+ Data.withObject+ "ScheduledQueryRunSummary"+ ( \x ->+ ScheduledQueryRunSummary'+ Prelude.<$> (x Data..:? "ErrorReportLocation")+ Prelude.<*> (x Data..:? "ExecutionStats")+ Prelude.<*> (x Data..:? "FailureReason")+ Prelude.<*> (x Data..:? "InvocationTime")+ Prelude.<*> (x Data..:? "RunStatus")+ Prelude.<*> (x Data..:? "TriggerTime")+ )++instance Prelude.Hashable ScheduledQueryRunSummary where+ hashWithSalt _salt ScheduledQueryRunSummary' {..} =+ _salt+ `Prelude.hashWithSalt` errorReportLocation+ `Prelude.hashWithSalt` executionStats+ `Prelude.hashWithSalt` failureReason+ `Prelude.hashWithSalt` invocationTime+ `Prelude.hashWithSalt` runStatus+ `Prelude.hashWithSalt` triggerTime++instance Prelude.NFData ScheduledQueryRunSummary where+ rnf ScheduledQueryRunSummary' {..} =+ Prelude.rnf errorReportLocation+ `Prelude.seq` Prelude.rnf executionStats+ `Prelude.seq` Prelude.rnf failureReason+ `Prelude.seq` Prelude.rnf invocationTime+ `Prelude.seq` Prelude.rnf runStatus+ `Prelude.seq` Prelude.rnf triggerTime
+ gen/Amazonka/TimeStreamQuery/Types/ScheduledQueryState.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.ScheduledQueryState+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.ScheduledQueryState+ ( ScheduledQueryState+ ( ..,+ ScheduledQueryState_DISABLED,+ ScheduledQueryState_ENABLED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScheduledQueryState = ScheduledQueryState'+ { fromScheduledQueryState ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern ScheduledQueryState_DISABLED :: ScheduledQueryState+pattern ScheduledQueryState_DISABLED = ScheduledQueryState' "DISABLED"++pattern ScheduledQueryState_ENABLED :: ScheduledQueryState+pattern ScheduledQueryState_ENABLED = ScheduledQueryState' "ENABLED"++{-# COMPLETE+ ScheduledQueryState_DISABLED,+ ScheduledQueryState_ENABLED,+ ScheduledQueryState'+ #-}
+ gen/Amazonka/TimeStreamQuery/Types/SelectColumn.hs view
@@ -0,0 +1,120 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.SelectColumn+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.SelectColumn where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.Type++-- | Details of the column that is returned by the query.+--+-- /See:/ 'newSelectColumn' smart constructor.+data SelectColumn = SelectColumn'+ { -- | True, if the column name was aliased by the query. False otherwise.+ aliased :: Prelude.Maybe Prelude.Bool,+ -- | Database that has this column.+ databaseName :: Prelude.Maybe Prelude.Text,+ -- | Name of the column.+ name :: Prelude.Maybe Prelude.Text,+ -- | Table within the database that has this column.+ tableName :: Prelude.Maybe Prelude.Text,+ type' :: Prelude.Maybe Type+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SelectColumn' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'aliased', 'selectColumn_aliased' - True, if the column name was aliased by the query. False otherwise.+--+-- 'databaseName', 'selectColumn_databaseName' - Database that has this column.+--+-- 'name', 'selectColumn_name' - Name of the column.+--+-- 'tableName', 'selectColumn_tableName' - Table within the database that has this column.+--+-- 'type'', 'selectColumn_type' - Undocumented member.+newSelectColumn ::+ SelectColumn+newSelectColumn =+ SelectColumn'+ { aliased = Prelude.Nothing,+ databaseName = Prelude.Nothing,+ name = Prelude.Nothing,+ tableName = Prelude.Nothing,+ type' = Prelude.Nothing+ }++-- | True, if the column name was aliased by the query. False otherwise.+selectColumn_aliased :: Lens.Lens' SelectColumn (Prelude.Maybe Prelude.Bool)+selectColumn_aliased = Lens.lens (\SelectColumn' {aliased} -> aliased) (\s@SelectColumn' {} a -> s {aliased = a} :: SelectColumn)++-- | Database that has this column.+selectColumn_databaseName :: Lens.Lens' SelectColumn (Prelude.Maybe Prelude.Text)+selectColumn_databaseName = Lens.lens (\SelectColumn' {databaseName} -> databaseName) (\s@SelectColumn' {} a -> s {databaseName = a} :: SelectColumn)++-- | Name of the column.+selectColumn_name :: Lens.Lens' SelectColumn (Prelude.Maybe Prelude.Text)+selectColumn_name = Lens.lens (\SelectColumn' {name} -> name) (\s@SelectColumn' {} a -> s {name = a} :: SelectColumn)++-- | Table within the database that has this column.+selectColumn_tableName :: Lens.Lens' SelectColumn (Prelude.Maybe Prelude.Text)+selectColumn_tableName = Lens.lens (\SelectColumn' {tableName} -> tableName) (\s@SelectColumn' {} a -> s {tableName = a} :: SelectColumn)++-- | Undocumented member.+selectColumn_type :: Lens.Lens' SelectColumn (Prelude.Maybe Type)+selectColumn_type = Lens.lens (\SelectColumn' {type'} -> type') (\s@SelectColumn' {} a -> s {type' = a} :: SelectColumn)++instance Data.FromJSON SelectColumn where+ parseJSON =+ Data.withObject+ "SelectColumn"+ ( \x ->+ SelectColumn'+ Prelude.<$> (x Data..:? "Aliased")+ Prelude.<*> (x Data..:? "DatabaseName")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "TableName")+ Prelude.<*> (x Data..:? "Type")+ )++instance Prelude.Hashable SelectColumn where+ hashWithSalt _salt SelectColumn' {..} =+ _salt+ `Prelude.hashWithSalt` aliased+ `Prelude.hashWithSalt` databaseName+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` tableName+ `Prelude.hashWithSalt` type'++instance Prelude.NFData SelectColumn where+ rnf SelectColumn' {..} =+ Prelude.rnf aliased+ `Prelude.seq` Prelude.rnf databaseName+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf tableName+ `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/TimeStreamQuery/Types/SnsConfiguration.hs view
@@ -0,0 +1,79 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.SnsConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.SnsConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Details on SNS that are required to send the notification.+--+-- /See:/ 'newSnsConfiguration' smart constructor.+data SnsConfiguration = SnsConfiguration'+ { -- | SNS topic ARN that the scheduled query status notifications will be sent+ -- to.+ topicArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SnsConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'topicArn', 'snsConfiguration_topicArn' - SNS topic ARN that the scheduled query status notifications will be sent+-- to.+newSnsConfiguration ::+ -- | 'topicArn'+ Prelude.Text ->+ SnsConfiguration+newSnsConfiguration pTopicArn_ =+ SnsConfiguration' {topicArn = pTopicArn_}++-- | SNS topic ARN that the scheduled query status notifications will be sent+-- to.+snsConfiguration_topicArn :: Lens.Lens' SnsConfiguration Prelude.Text+snsConfiguration_topicArn = Lens.lens (\SnsConfiguration' {topicArn} -> topicArn) (\s@SnsConfiguration' {} a -> s {topicArn = a} :: SnsConfiguration)++instance Data.FromJSON SnsConfiguration where+ parseJSON =+ Data.withObject+ "SnsConfiguration"+ ( \x ->+ SnsConfiguration' Prelude.<$> (x Data..: "TopicArn")+ )++instance Prelude.Hashable SnsConfiguration where+ hashWithSalt _salt SnsConfiguration' {..} =+ _salt `Prelude.hashWithSalt` topicArn++instance Prelude.NFData SnsConfiguration where+ rnf SnsConfiguration' {..} = Prelude.rnf topicArn++instance Data.ToJSON SnsConfiguration where+ toJSON SnsConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("TopicArn" Data..= topicArn)]+ )
+ gen/Amazonka/TimeStreamQuery/Types/Tag.hs view
@@ -0,0 +1,96 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.Tag+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.Tag where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A tag is a label that you assign to a Timestream database and\/or table.+-- Each tag consists of a key and an optional value, both of which you+-- define. Tags enable you to categorize databases and\/or tables, for+-- example, by purpose, owner, or environment.+--+-- /See:/ 'newTag' smart constructor.+data Tag = Tag'+ { -- | The key of the tag. Tag keys are case sensitive.+ key :: Prelude.Text,+ -- | The value of the tag. Tag values are case sensitive and can be null.+ value :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Tag' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'key', 'tag_key' - The key of the tag. Tag keys are case sensitive.+--+-- 'value', 'tag_value' - The value of the tag. Tag values are case sensitive and can be null.+newTag ::+ -- | 'key'+ Prelude.Text ->+ -- | 'value'+ Prelude.Text ->+ Tag+newTag pKey_ pValue_ =+ Tag' {key = pKey_, value = pValue_}++-- | The key of the tag. Tag keys are case sensitive.+tag_key :: Lens.Lens' Tag Prelude.Text+tag_key = Lens.lens (\Tag' {key} -> key) (\s@Tag' {} a -> s {key = a} :: Tag)++-- | The value of the tag. Tag values are case sensitive and can be null.+tag_value :: Lens.Lens' Tag Prelude.Text+tag_value = Lens.lens (\Tag' {value} -> value) (\s@Tag' {} a -> s {value = a} :: Tag)++instance Data.FromJSON Tag where+ parseJSON =+ Data.withObject+ "Tag"+ ( \x ->+ Tag'+ Prelude.<$> (x Data..: "Key")+ Prelude.<*> (x Data..: "Value")+ )++instance Prelude.Hashable Tag where+ hashWithSalt _salt Tag' {..} =+ _salt+ `Prelude.hashWithSalt` key+ `Prelude.hashWithSalt` value++instance Prelude.NFData Tag where+ rnf Tag' {..} =+ Prelude.rnf key `Prelude.seq` Prelude.rnf value++instance Data.ToJSON Tag where+ toJSON Tag' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Key" Data..= key),+ Prelude.Just ("Value" Data..= value)+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/TargetConfiguration.hs view
@@ -0,0 +1,90 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.TargetConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.TargetConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.TimestreamConfiguration++-- | Configuration used for writing the output of a query.+--+-- /See:/ 'newTargetConfiguration' smart constructor.+data TargetConfiguration = TargetConfiguration'+ { -- | Configuration needed to write data into the Timestream database and+ -- table.+ timestreamConfiguration :: TimestreamConfiguration+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TargetConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'timestreamConfiguration', 'targetConfiguration_timestreamConfiguration' - Configuration needed to write data into the Timestream database and+-- table.+newTargetConfiguration ::+ -- | 'timestreamConfiguration'+ TimestreamConfiguration ->+ TargetConfiguration+newTargetConfiguration pTimestreamConfiguration_ =+ TargetConfiguration'+ { timestreamConfiguration =+ pTimestreamConfiguration_+ }++-- | Configuration needed to write data into the Timestream database and+-- table.+targetConfiguration_timestreamConfiguration :: Lens.Lens' TargetConfiguration TimestreamConfiguration+targetConfiguration_timestreamConfiguration = Lens.lens (\TargetConfiguration' {timestreamConfiguration} -> timestreamConfiguration) (\s@TargetConfiguration' {} a -> s {timestreamConfiguration = a} :: TargetConfiguration)++instance Data.FromJSON TargetConfiguration where+ parseJSON =+ Data.withObject+ "TargetConfiguration"+ ( \x ->+ TargetConfiguration'+ Prelude.<$> (x Data..: "TimestreamConfiguration")+ )++instance Prelude.Hashable TargetConfiguration where+ hashWithSalt _salt TargetConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` timestreamConfiguration++instance Prelude.NFData TargetConfiguration where+ rnf TargetConfiguration' {..} =+ Prelude.rnf timestreamConfiguration++instance Data.ToJSON TargetConfiguration where+ toJSON TargetConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "TimestreamConfiguration"+ Data..= timestreamConfiguration+ )+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/TargetDestination.hs view
@@ -0,0 +1,74 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.TargetDestination+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.TargetDestination where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.TimestreamDestination++-- | Destination details to write data for a target data source. Current+-- supported data source is Timestream.+--+-- /See:/ 'newTargetDestination' smart constructor.+data TargetDestination = TargetDestination'+ { -- | Query result destination details for Timestream data source.+ timestreamDestination :: Prelude.Maybe TimestreamDestination+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TargetDestination' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'timestreamDestination', 'targetDestination_timestreamDestination' - Query result destination details for Timestream data source.+newTargetDestination ::+ TargetDestination+newTargetDestination =+ TargetDestination'+ { timestreamDestination =+ Prelude.Nothing+ }++-- | Query result destination details for Timestream data source.+targetDestination_timestreamDestination :: Lens.Lens' TargetDestination (Prelude.Maybe TimestreamDestination)+targetDestination_timestreamDestination = Lens.lens (\TargetDestination' {timestreamDestination} -> timestreamDestination) (\s@TargetDestination' {} a -> s {timestreamDestination = a} :: TargetDestination)++instance Data.FromJSON TargetDestination where+ parseJSON =+ Data.withObject+ "TargetDestination"+ ( \x ->+ TargetDestination'+ Prelude.<$> (x Data..:? "TimestreamDestination")+ )++instance Prelude.Hashable TargetDestination where+ hashWithSalt _salt TargetDestination' {..} =+ _salt `Prelude.hashWithSalt` timestreamDestination++instance Prelude.NFData TargetDestination where+ rnf TargetDestination' {..} =+ Prelude.rnf timestreamDestination
+ gen/Amazonka/TimeStreamQuery/Types/TimeSeriesDataPoint.hs view
@@ -0,0 +1,92 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.TimeSeriesDataPoint+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.TimeSeriesDataPoint where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import {-# SOURCE #-} Amazonka.TimeStreamQuery.Types.Datum++-- | The timeseries data type represents the values of a measure over time. A+-- time series is an array of rows of timestamps and measure values, with+-- rows sorted in ascending order of time. A TimeSeriesDataPoint is a+-- single data point in the time series. It represents a tuple of (time,+-- measure value) in a time series.+--+-- /See:/ 'newTimeSeriesDataPoint' smart constructor.+data TimeSeriesDataPoint = TimeSeriesDataPoint'+ { -- | The timestamp when the measure value was collected.+ time :: Prelude.Text,+ -- | The measure value for the data point.+ value :: Datum+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TimeSeriesDataPoint' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'time', 'timeSeriesDataPoint_time' - The timestamp when the measure value was collected.+--+-- 'value', 'timeSeriesDataPoint_value' - The measure value for the data point.+newTimeSeriesDataPoint ::+ -- | 'time'+ Prelude.Text ->+ -- | 'value'+ Datum ->+ TimeSeriesDataPoint+newTimeSeriesDataPoint pTime_ pValue_ =+ TimeSeriesDataPoint'+ { time = pTime_,+ value = pValue_+ }++-- | The timestamp when the measure value was collected.+timeSeriesDataPoint_time :: Lens.Lens' TimeSeriesDataPoint Prelude.Text+timeSeriesDataPoint_time = Lens.lens (\TimeSeriesDataPoint' {time} -> time) (\s@TimeSeriesDataPoint' {} a -> s {time = a} :: TimeSeriesDataPoint)++-- | The measure value for the data point.+timeSeriesDataPoint_value :: Lens.Lens' TimeSeriesDataPoint Datum+timeSeriesDataPoint_value = Lens.lens (\TimeSeriesDataPoint' {value} -> value) (\s@TimeSeriesDataPoint' {} a -> s {value = a} :: TimeSeriesDataPoint)++instance Data.FromJSON TimeSeriesDataPoint where+ parseJSON =+ Data.withObject+ "TimeSeriesDataPoint"+ ( \x ->+ TimeSeriesDataPoint'+ Prelude.<$> (x Data..: "Time")+ Prelude.<*> (x Data..: "Value")+ )++instance Prelude.Hashable TimeSeriesDataPoint where+ hashWithSalt _salt TimeSeriesDataPoint' {..} =+ _salt+ `Prelude.hashWithSalt` time+ `Prelude.hashWithSalt` value++instance Prelude.NFData TimeSeriesDataPoint where+ rnf TimeSeriesDataPoint' {..} =+ Prelude.rnf time `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/TimeStreamQuery/Types/TimeSeriesDataPoint.hs-boot view
@@ -0,0 +1,31 @@+{-# OPTIONS_GHC -Wno-missing-methods #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.TimeSeriesDataPoint+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.TimeSeriesDataPoint where++import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++data TimeSeriesDataPoint++instance Prelude.Eq TimeSeriesDataPoint++instance Prelude.Read TimeSeriesDataPoint++instance Prelude.Show TimeSeriesDataPoint++instance Prelude.Generic TimeSeriesDataPoint++instance Data.FromJSON TimeSeriesDataPoint++instance Prelude.NFData TimeSeriesDataPoint++instance Prelude.Hashable TimeSeriesDataPoint
+ gen/Amazonka/TimeStreamQuery/Types/TimestreamConfiguration.hs view
@@ -0,0 +1,192 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.TimestreamConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.TimestreamConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Types.DimensionMapping+import Amazonka.TimeStreamQuery.Types.MixedMeasureMapping+import Amazonka.TimeStreamQuery.Types.MultiMeasureMappings++-- | Configuration to write data into Timestream database and table. This+-- configuration allows the user to map the query result select columns+-- into the destination table columns.+--+-- /See:/ 'newTimestreamConfiguration' smart constructor.+data TimestreamConfiguration = TimestreamConfiguration'+ { -- | Name of the measure column.+ measureNameColumn :: Prelude.Maybe Prelude.Text,+ -- | Specifies how to map measures to multi-measure records.+ mixedMeasureMappings :: Prelude.Maybe (Prelude.NonEmpty MixedMeasureMapping),+ -- | Multi-measure mappings.+ multiMeasureMappings :: Prelude.Maybe MultiMeasureMappings,+ -- | Name of Timestream database to which the query result will be written.+ databaseName :: Prelude.Text,+ -- | Name of Timestream table that the query result will be written to. The+ -- table should be within the same database that is provided in Timestream+ -- configuration.+ tableName :: Prelude.Text,+ -- | Column from query result that should be used as the time column in+ -- destination table. Column type for this should be TIMESTAMP.+ timeColumn :: Prelude.Text,+ -- | This is to allow mapping column(s) from the query result to the+ -- dimension in the destination table.+ dimensionMappings :: [DimensionMapping]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TimestreamConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'measureNameColumn', 'timestreamConfiguration_measureNameColumn' - Name of the measure column.+--+-- 'mixedMeasureMappings', 'timestreamConfiguration_mixedMeasureMappings' - Specifies how to map measures to multi-measure records.+--+-- 'multiMeasureMappings', 'timestreamConfiguration_multiMeasureMappings' - Multi-measure mappings.+--+-- 'databaseName', 'timestreamConfiguration_databaseName' - Name of Timestream database to which the query result will be written.+--+-- 'tableName', 'timestreamConfiguration_tableName' - Name of Timestream table that the query result will be written to. The+-- table should be within the same database that is provided in Timestream+-- configuration.+--+-- 'timeColumn', 'timestreamConfiguration_timeColumn' - Column from query result that should be used as the time column in+-- destination table. Column type for this should be TIMESTAMP.+--+-- 'dimensionMappings', 'timestreamConfiguration_dimensionMappings' - This is to allow mapping column(s) from the query result to the+-- dimension in the destination table.+newTimestreamConfiguration ::+ -- | 'databaseName'+ Prelude.Text ->+ -- | 'tableName'+ Prelude.Text ->+ -- | 'timeColumn'+ Prelude.Text ->+ TimestreamConfiguration+newTimestreamConfiguration+ pDatabaseName_+ pTableName_+ pTimeColumn_ =+ TimestreamConfiguration'+ { measureNameColumn =+ Prelude.Nothing,+ mixedMeasureMappings = Prelude.Nothing,+ multiMeasureMappings = Prelude.Nothing,+ databaseName = pDatabaseName_,+ tableName = pTableName_,+ timeColumn = pTimeColumn_,+ dimensionMappings = Prelude.mempty+ }++-- | Name of the measure column.+timestreamConfiguration_measureNameColumn :: Lens.Lens' TimestreamConfiguration (Prelude.Maybe Prelude.Text)+timestreamConfiguration_measureNameColumn = Lens.lens (\TimestreamConfiguration' {measureNameColumn} -> measureNameColumn) (\s@TimestreamConfiguration' {} a -> s {measureNameColumn = a} :: TimestreamConfiguration)++-- | Specifies how to map measures to multi-measure records.+timestreamConfiguration_mixedMeasureMappings :: Lens.Lens' TimestreamConfiguration (Prelude.Maybe (Prelude.NonEmpty MixedMeasureMapping))+timestreamConfiguration_mixedMeasureMappings = Lens.lens (\TimestreamConfiguration' {mixedMeasureMappings} -> mixedMeasureMappings) (\s@TimestreamConfiguration' {} a -> s {mixedMeasureMappings = a} :: TimestreamConfiguration) Prelude.. Lens.mapping Lens.coerced++-- | Multi-measure mappings.+timestreamConfiguration_multiMeasureMappings :: Lens.Lens' TimestreamConfiguration (Prelude.Maybe MultiMeasureMappings)+timestreamConfiguration_multiMeasureMappings = Lens.lens (\TimestreamConfiguration' {multiMeasureMappings} -> multiMeasureMappings) (\s@TimestreamConfiguration' {} a -> s {multiMeasureMappings = a} :: TimestreamConfiguration)++-- | Name of Timestream database to which the query result will be written.+timestreamConfiguration_databaseName :: Lens.Lens' TimestreamConfiguration Prelude.Text+timestreamConfiguration_databaseName = Lens.lens (\TimestreamConfiguration' {databaseName} -> databaseName) (\s@TimestreamConfiguration' {} a -> s {databaseName = a} :: TimestreamConfiguration)++-- | Name of Timestream table that the query result will be written to. The+-- table should be within the same database that is provided in Timestream+-- configuration.+timestreamConfiguration_tableName :: Lens.Lens' TimestreamConfiguration Prelude.Text+timestreamConfiguration_tableName = Lens.lens (\TimestreamConfiguration' {tableName} -> tableName) (\s@TimestreamConfiguration' {} a -> s {tableName = a} :: TimestreamConfiguration)++-- | Column from query result that should be used as the time column in+-- destination table. Column type for this should be TIMESTAMP.+timestreamConfiguration_timeColumn :: Lens.Lens' TimestreamConfiguration Prelude.Text+timestreamConfiguration_timeColumn = Lens.lens (\TimestreamConfiguration' {timeColumn} -> timeColumn) (\s@TimestreamConfiguration' {} a -> s {timeColumn = a} :: TimestreamConfiguration)++-- | This is to allow mapping column(s) from the query result to the+-- dimension in the destination table.+timestreamConfiguration_dimensionMappings :: Lens.Lens' TimestreamConfiguration [DimensionMapping]+timestreamConfiguration_dimensionMappings = Lens.lens (\TimestreamConfiguration' {dimensionMappings} -> dimensionMappings) (\s@TimestreamConfiguration' {} a -> s {dimensionMappings = a} :: TimestreamConfiguration) Prelude.. Lens.coerced++instance Data.FromJSON TimestreamConfiguration where+ parseJSON =+ Data.withObject+ "TimestreamConfiguration"+ ( \x ->+ TimestreamConfiguration'+ Prelude.<$> (x Data..:? "MeasureNameColumn")+ Prelude.<*> (x Data..:? "MixedMeasureMappings")+ Prelude.<*> (x Data..:? "MultiMeasureMappings")+ Prelude.<*> (x Data..: "DatabaseName")+ Prelude.<*> (x Data..: "TableName")+ Prelude.<*> (x Data..: "TimeColumn")+ Prelude.<*> ( x+ Data..:? "DimensionMappings"+ Data..!= Prelude.mempty+ )+ )++instance Prelude.Hashable TimestreamConfiguration where+ hashWithSalt _salt TimestreamConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` measureNameColumn+ `Prelude.hashWithSalt` mixedMeasureMappings+ `Prelude.hashWithSalt` multiMeasureMappings+ `Prelude.hashWithSalt` databaseName+ `Prelude.hashWithSalt` tableName+ `Prelude.hashWithSalt` timeColumn+ `Prelude.hashWithSalt` dimensionMappings++instance Prelude.NFData TimestreamConfiguration where+ rnf TimestreamConfiguration' {..} =+ Prelude.rnf measureNameColumn+ `Prelude.seq` Prelude.rnf mixedMeasureMappings+ `Prelude.seq` Prelude.rnf multiMeasureMappings+ `Prelude.seq` Prelude.rnf databaseName+ `Prelude.seq` Prelude.rnf tableName+ `Prelude.seq` Prelude.rnf timeColumn+ `Prelude.seq` Prelude.rnf dimensionMappings++instance Data.ToJSON TimestreamConfiguration where+ toJSON TimestreamConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MeasureNameColumn" Data..=)+ Prelude.<$> measureNameColumn,+ ("MixedMeasureMappings" Data..=)+ Prelude.<$> mixedMeasureMappings,+ ("MultiMeasureMappings" Data..=)+ Prelude.<$> multiMeasureMappings,+ Prelude.Just ("DatabaseName" Data..= databaseName),+ Prelude.Just ("TableName" Data..= tableName),+ Prelude.Just ("TimeColumn" Data..= timeColumn),+ Prelude.Just+ ("DimensionMappings" Data..= dimensionMappings)+ ]+ )
+ gen/Amazonka/TimeStreamQuery/Types/TimestreamDestination.hs view
@@ -0,0 +1,85 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.TimestreamDestination+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.TimestreamDestination where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Destination for scheduled query.+--+-- /See:/ 'newTimestreamDestination' smart constructor.+data TimestreamDestination = TimestreamDestination'+ { -- | Timestream database name.+ databaseName :: Prelude.Maybe Prelude.Text,+ -- | Timestream table name.+ tableName :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TimestreamDestination' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'databaseName', 'timestreamDestination_databaseName' - Timestream database name.+--+-- 'tableName', 'timestreamDestination_tableName' - Timestream table name.+newTimestreamDestination ::+ TimestreamDestination+newTimestreamDestination =+ TimestreamDestination'+ { databaseName =+ Prelude.Nothing,+ tableName = Prelude.Nothing+ }++-- | Timestream database name.+timestreamDestination_databaseName :: Lens.Lens' TimestreamDestination (Prelude.Maybe Prelude.Text)+timestreamDestination_databaseName = Lens.lens (\TimestreamDestination' {databaseName} -> databaseName) (\s@TimestreamDestination' {} a -> s {databaseName = a} :: TimestreamDestination)++-- | Timestream table name.+timestreamDestination_tableName :: Lens.Lens' TimestreamDestination (Prelude.Maybe Prelude.Text)+timestreamDestination_tableName = Lens.lens (\TimestreamDestination' {tableName} -> tableName) (\s@TimestreamDestination' {} a -> s {tableName = a} :: TimestreamDestination)++instance Data.FromJSON TimestreamDestination where+ parseJSON =+ Data.withObject+ "TimestreamDestination"+ ( \x ->+ TimestreamDestination'+ Prelude.<$> (x Data..:? "DatabaseName")+ Prelude.<*> (x Data..:? "TableName")+ )++instance Prelude.Hashable TimestreamDestination where+ hashWithSalt _salt TimestreamDestination' {..} =+ _salt+ `Prelude.hashWithSalt` databaseName+ `Prelude.hashWithSalt` tableName++instance Prelude.NFData TimestreamDestination where+ rnf TimestreamDestination' {..} =+ Prelude.rnf databaseName+ `Prelude.seq` Prelude.rnf tableName
+ gen/Amazonka/TimeStreamQuery/Types/Type.hs view
@@ -0,0 +1,116 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.Type+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.Type where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import {-# SOURCE #-} Amazonka.TimeStreamQuery.Types.ColumnInfo+import Amazonka.TimeStreamQuery.Types.ScalarType++-- | Contains the data type of a column in a query result set. The data type+-- can be scalar or complex. The supported scalar data types are integers,+-- Boolean, string, double, timestamp, date, time, and intervals. The+-- supported complex data types are arrays, rows, and timeseries.+--+-- /See:/ 'newType' smart constructor.+data Type = Type'+ { -- | Indicates if the column is an array.+ arrayColumnInfo :: Prelude.Maybe ColumnInfo,+ -- | Indicates if the column is a row.+ rowColumnInfo :: Prelude.Maybe [ColumnInfo],+ -- | Indicates if the column is of type string, integer, Boolean, double,+ -- timestamp, date, time.+ scalarType :: Prelude.Maybe ScalarType,+ -- | Indicates if the column is a timeseries data type.+ timeSeriesMeasureValueColumnInfo :: Prelude.Maybe ColumnInfo+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Type' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arrayColumnInfo', 'type_arrayColumnInfo' - Indicates if the column is an array.+--+-- 'rowColumnInfo', 'type_rowColumnInfo' - Indicates if the column is a row.+--+-- 'scalarType', 'type_scalarType' - Indicates if the column is of type string, integer, Boolean, double,+-- timestamp, date, time.+--+-- 'timeSeriesMeasureValueColumnInfo', 'type_timeSeriesMeasureValueColumnInfo' - Indicates if the column is a timeseries data type.+newType ::+ Type+newType =+ Type'+ { arrayColumnInfo = Prelude.Nothing,+ rowColumnInfo = Prelude.Nothing,+ scalarType = Prelude.Nothing,+ timeSeriesMeasureValueColumnInfo = Prelude.Nothing+ }++-- | Indicates if the column is an array.+type_arrayColumnInfo :: Lens.Lens' Type (Prelude.Maybe ColumnInfo)+type_arrayColumnInfo = Lens.lens (\Type' {arrayColumnInfo} -> arrayColumnInfo) (\s@Type' {} a -> s {arrayColumnInfo = a} :: Type)++-- | Indicates if the column is a row.+type_rowColumnInfo :: Lens.Lens' Type (Prelude.Maybe [ColumnInfo])+type_rowColumnInfo = Lens.lens (\Type' {rowColumnInfo} -> rowColumnInfo) (\s@Type' {} a -> s {rowColumnInfo = a} :: Type) Prelude.. Lens.mapping Lens.coerced++-- | Indicates if the column is of type string, integer, Boolean, double,+-- timestamp, date, time.+type_scalarType :: Lens.Lens' Type (Prelude.Maybe ScalarType)+type_scalarType = Lens.lens (\Type' {scalarType} -> scalarType) (\s@Type' {} a -> s {scalarType = a} :: Type)++-- | Indicates if the column is a timeseries data type.+type_timeSeriesMeasureValueColumnInfo :: Lens.Lens' Type (Prelude.Maybe ColumnInfo)+type_timeSeriesMeasureValueColumnInfo = Lens.lens (\Type' {timeSeriesMeasureValueColumnInfo} -> timeSeriesMeasureValueColumnInfo) (\s@Type' {} a -> s {timeSeriesMeasureValueColumnInfo = a} :: Type)++instance Data.FromJSON Type where+ parseJSON =+ Data.withObject+ "Type"+ ( \x ->+ Type'+ Prelude.<$> (x Data..:? "ArrayColumnInfo")+ Prelude.<*> (x Data..:? "RowColumnInfo" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "ScalarType")+ Prelude.<*> (x Data..:? "TimeSeriesMeasureValueColumnInfo")+ )++instance Prelude.Hashable Type where+ hashWithSalt _salt Type' {..} =+ _salt+ `Prelude.hashWithSalt` arrayColumnInfo+ `Prelude.hashWithSalt` rowColumnInfo+ `Prelude.hashWithSalt` scalarType+ `Prelude.hashWithSalt` timeSeriesMeasureValueColumnInfo++instance Prelude.NFData Type where+ rnf Type' {..} =+ Prelude.rnf arrayColumnInfo+ `Prelude.seq` Prelude.rnf rowColumnInfo+ `Prelude.seq` Prelude.rnf scalarType+ `Prelude.seq` Prelude.rnf timeSeriesMeasureValueColumnInfo
+ gen/Amazonka/TimeStreamQuery/Types/Type.hs-boot view
@@ -0,0 +1,31 @@+{-# OPTIONS_GHC -Wno-missing-methods #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Types.Type+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Types.Type where++import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++data Type++instance Prelude.Eq Type++instance Prelude.Read Type++instance Prelude.Show Type++instance Prelude.Generic Type++instance Data.FromJSON Type++instance Prelude.NFData Type++instance Prelude.Hashable Type
+ gen/Amazonka/TimeStreamQuery/UntagResource.hs view
@@ -0,0 +1,177 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.UntagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes the association of tags from a Timestream query resource.+module Amazonka.TimeStreamQuery.UntagResource+ ( -- * Creating a Request+ UntagResource (..),+ newUntagResource,++ -- * Request Lenses+ untagResource_resourceARN,+ untagResource_tagKeys,++ -- * Destructuring the Response+ UntagResourceResponse (..),+ newUntagResourceResponse,++ -- * Response Lenses+ untagResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+ { -- | The Timestream resource that the tags will be removed from. This value+ -- is an Amazon Resource Name (ARN).+ resourceARN :: Prelude.Text,+ -- | A list of tags keys. Existing tags of the resource whose keys are+ -- members of this list will be removed from the Timestream resource.+ tagKeys :: [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceARN', 'untagResource_resourceARN' - The Timestream resource that the tags will be removed from. This value+-- is an Amazon Resource Name (ARN).+--+-- 'tagKeys', 'untagResource_tagKeys' - A list of tags keys. Existing tags of the resource whose keys are+-- members of this list will be removed from the Timestream resource.+newUntagResource ::+ -- | 'resourceARN'+ Prelude.Text ->+ UntagResource+newUntagResource pResourceARN_ =+ UntagResource'+ { resourceARN = pResourceARN_,+ tagKeys = Prelude.mempty+ }++-- | The Timestream resource that the tags will be removed from. This value+-- is an Amazon Resource Name (ARN).+untagResource_resourceARN :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceARN = Lens.lens (\UntagResource' {resourceARN} -> resourceARN) (\s@UntagResource' {} a -> s {resourceARN = a} :: UntagResource)++-- | A list of tags keys. Existing tags of the resource whose keys are+-- members of this list will be removed from the Timestream resource.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+ type+ AWSResponse UntagResource =+ UntagResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UntagResourceResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UntagResource where+ hashWithSalt _salt UntagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceARN+ `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+ rnf UntagResource' {..} =+ Prelude.rnf resourceARN+ `Prelude.seq` Prelude.rnf tagKeys++instance Data.ToHeaders UntagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.UntagResource" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UntagResource where+ toJSON UntagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("ResourceARN" Data..= resourceARN),+ Prelude.Just ("TagKeys" Data..= tagKeys)+ ]+ )++instance Data.ToPath UntagResource where+ toPath = Prelude.const "/"++instance Data.ToQuery UntagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+ UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+ rnf UntagResourceResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/TimeStreamQuery/UpdateScheduledQuery.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.UpdateScheduledQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Update a scheduled query.+module Amazonka.TimeStreamQuery.UpdateScheduledQuery+ ( -- * Creating a Request+ UpdateScheduledQuery (..),+ newUpdateScheduledQuery,++ -- * Request Lenses+ updateScheduledQuery_scheduledQueryArn,+ updateScheduledQuery_state,++ -- * Destructuring the Response+ UpdateScheduledQueryResponse (..),+ newUpdateScheduledQueryResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.TimeStreamQuery.Types++-- | /See:/ 'newUpdateScheduledQuery' smart constructor.+data UpdateScheduledQuery = UpdateScheduledQuery'+ { -- | ARN of the scheuled query.+ scheduledQueryArn :: Prelude.Text,+ -- | State of the scheduled query.+ state :: ScheduledQueryState+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateScheduledQuery' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'scheduledQueryArn', 'updateScheduledQuery_scheduledQueryArn' - ARN of the scheuled query.+--+-- 'state', 'updateScheduledQuery_state' - State of the scheduled query.+newUpdateScheduledQuery ::+ -- | 'scheduledQueryArn'+ Prelude.Text ->+ -- | 'state'+ ScheduledQueryState ->+ UpdateScheduledQuery+newUpdateScheduledQuery pScheduledQueryArn_ pState_ =+ UpdateScheduledQuery'+ { scheduledQueryArn =+ pScheduledQueryArn_,+ state = pState_+ }++-- | ARN of the scheuled query.+updateScheduledQuery_scheduledQueryArn :: Lens.Lens' UpdateScheduledQuery Prelude.Text+updateScheduledQuery_scheduledQueryArn = Lens.lens (\UpdateScheduledQuery' {scheduledQueryArn} -> scheduledQueryArn) (\s@UpdateScheduledQuery' {} a -> s {scheduledQueryArn = a} :: UpdateScheduledQuery)++-- | State of the scheduled query.+updateScheduledQuery_state :: Lens.Lens' UpdateScheduledQuery ScheduledQueryState+updateScheduledQuery_state = Lens.lens (\UpdateScheduledQuery' {state} -> state) (\s@UpdateScheduledQuery' {} a -> s {state = a} :: UpdateScheduledQuery)++instance Core.AWSRequest UpdateScheduledQuery where+ type+ AWSResponse UpdateScheduledQuery =+ UpdateScheduledQueryResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull UpdateScheduledQueryResponse'++instance Prelude.Hashable UpdateScheduledQuery where+ hashWithSalt _salt UpdateScheduledQuery' {..} =+ _salt+ `Prelude.hashWithSalt` scheduledQueryArn+ `Prelude.hashWithSalt` state++instance Prelude.NFData UpdateScheduledQuery where+ rnf UpdateScheduledQuery' {..} =+ Prelude.rnf scheduledQueryArn+ `Prelude.seq` Prelude.rnf state++instance Data.ToHeaders UpdateScheduledQuery where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "Timestream_20181101.UpdateScheduledQuery" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateScheduledQuery where+ toJSON UpdateScheduledQuery' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("ScheduledQueryArn" Data..= scheduledQueryArn),+ Prelude.Just ("State" Data..= state)+ ]+ )++instance Data.ToPath UpdateScheduledQuery where+ toPath = Prelude.const "/"++instance Data.ToQuery UpdateScheduledQuery where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateScheduledQueryResponse' smart constructor.+data UpdateScheduledQueryResponse = UpdateScheduledQueryResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateScheduledQueryResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newUpdateScheduledQueryResponse ::+ UpdateScheduledQueryResponse+newUpdateScheduledQueryResponse =+ UpdateScheduledQueryResponse'++instance Prelude.NFData UpdateScheduledQueryResponse where+ rnf _ = ()
+ gen/Amazonka/TimeStreamQuery/Waiters.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.TimeStreamQuery.Waiters+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.TimeStreamQuery.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.TimeStreamQuery.Lens+import Amazonka.TimeStreamQuery.Types
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,23 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Main (main) where++import Test.Amazonka.TimeStreamQuery+import Test.Amazonka.TimeStreamQuery.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "TimeStreamQuery"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Gen/TimeStreamQuery.hs view
@@ -0,0 +1,298 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.Amazonka.Gen.TimeStreamQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.Gen.TimeStreamQuery where++import Amazonka.TimeStreamQuery+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.TimeStreamQuery.Internal+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"+-- [ requestCancelQuery $+-- newCancelQuery+--+-- , requestCreateScheduledQuery $+-- newCreateScheduledQuery+--+-- , requestDeleteScheduledQuery $+-- newDeleteScheduledQuery+--+-- , requestDescribeEndpoints $+-- newDescribeEndpoints+--+-- , requestDescribeScheduledQuery $+-- newDescribeScheduledQuery+--+-- , requestExecuteScheduledQuery $+-- newExecuteScheduledQuery+--+-- , requestListScheduledQueries $+-- newListScheduledQueries+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestPrepareQuery $+-- newPrepareQuery+--+-- , requestQuery $+-- newQuery+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateScheduledQuery $+-- newUpdateScheduledQuery+--+-- ]++-- , testGroup "response"+-- [ responseCancelQuery $+-- newCancelQueryResponse+--+-- , responseCreateScheduledQuery $+-- newCreateScheduledQueryResponse+--+-- , responseDeleteScheduledQuery $+-- newDeleteScheduledQueryResponse+--+-- , responseDescribeEndpoints $+-- newDescribeEndpointsResponse+--+-- , responseDescribeScheduledQuery $+-- newDescribeScheduledQueryResponse+--+-- , responseExecuteScheduledQuery $+-- newExecuteScheduledQueryResponse+--+-- , responseListScheduledQueries $+-- newListScheduledQueriesResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responsePrepareQuery $+-- newPrepareQueryResponse+--+-- , responseQuery $+-- newQueryResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateScheduledQuery $+-- newUpdateScheduledQueryResponse+--+-- ]+-- ]++-- Requests++requestCancelQuery :: CancelQuery -> TestTree+requestCancelQuery =+ req+ "CancelQuery"+ "fixture/CancelQuery.yaml"++requestCreateScheduledQuery :: CreateScheduledQuery -> TestTree+requestCreateScheduledQuery =+ req+ "CreateScheduledQuery"+ "fixture/CreateScheduledQuery.yaml"++requestDeleteScheduledQuery :: DeleteScheduledQuery -> TestTree+requestDeleteScheduledQuery =+ req+ "DeleteScheduledQuery"+ "fixture/DeleteScheduledQuery.yaml"++requestDescribeEndpoints :: DescribeEndpoints -> TestTree+requestDescribeEndpoints =+ req+ "DescribeEndpoints"+ "fixture/DescribeEndpoints.yaml"++requestDescribeScheduledQuery :: DescribeScheduledQuery -> TestTree+requestDescribeScheduledQuery =+ req+ "DescribeScheduledQuery"+ "fixture/DescribeScheduledQuery.yaml"++requestExecuteScheduledQuery :: ExecuteScheduledQuery -> TestTree+requestExecuteScheduledQuery =+ req+ "ExecuteScheduledQuery"+ "fixture/ExecuteScheduledQuery.yaml"++requestListScheduledQueries :: ListScheduledQueries -> TestTree+requestListScheduledQueries =+ req+ "ListScheduledQueries"+ "fixture/ListScheduledQueries.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestPrepareQuery :: PrepareQuery -> TestTree+requestPrepareQuery =+ req+ "PrepareQuery"+ "fixture/PrepareQuery.yaml"++requestQuery :: Query -> TestTree+requestQuery =+ req+ "Query"+ "fixture/Query.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateScheduledQuery :: UpdateScheduledQuery -> TestTree+requestUpdateScheduledQuery =+ req+ "UpdateScheduledQuery"+ "fixture/UpdateScheduledQuery.yaml"++-- Responses++responseCancelQuery :: CancelQueryResponse -> TestTree+responseCancelQuery =+ res+ "CancelQueryResponse"+ "fixture/CancelQueryResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CancelQuery)++responseCreateScheduledQuery :: CreateScheduledQueryResponse -> TestTree+responseCreateScheduledQuery =+ res+ "CreateScheduledQueryResponse"+ "fixture/CreateScheduledQueryResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateScheduledQuery)++responseDeleteScheduledQuery :: DeleteScheduledQueryResponse -> TestTree+responseDeleteScheduledQuery =+ res+ "DeleteScheduledQueryResponse"+ "fixture/DeleteScheduledQueryResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteScheduledQuery)++responseDescribeEndpoints :: DescribeEndpointsResponse -> TestTree+responseDescribeEndpoints =+ res+ "DescribeEndpointsResponse"+ "fixture/DescribeEndpointsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeEndpoints)++responseDescribeScheduledQuery :: DescribeScheduledQueryResponse -> TestTree+responseDescribeScheduledQuery =+ res+ "DescribeScheduledQueryResponse"+ "fixture/DescribeScheduledQueryResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeScheduledQuery)++responseExecuteScheduledQuery :: ExecuteScheduledQueryResponse -> TestTree+responseExecuteScheduledQuery =+ res+ "ExecuteScheduledQueryResponse"+ "fixture/ExecuteScheduledQueryResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ExecuteScheduledQuery)++responseListScheduledQueries :: ListScheduledQueriesResponse -> TestTree+responseListScheduledQueries =+ res+ "ListScheduledQueriesResponse"+ "fixture/ListScheduledQueriesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListScheduledQueries)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responsePrepareQuery :: PrepareQueryResponse -> TestTree+responsePrepareQuery =+ res+ "PrepareQueryResponse"+ "fixture/PrepareQueryResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PrepareQuery)++responseQuery :: QueryResponse -> TestTree+responseQuery =+ res+ "QueryResponse"+ "fixture/QueryResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy Query)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+ res+ "TagResourceResponse"+ "fixture/TagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy TagResource)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+ res+ "UntagResourceResponse"+ "fixture/UntagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdateScheduledQuery :: UpdateScheduledQueryResponse -> TestTree+responseUpdateScheduledQuery =+ res+ "UpdateScheduledQueryResponse"+ "fixture/UpdateScheduledQueryResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateScheduledQuery)
+ test/Test/Amazonka/TimeStreamQuery.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.TimeStreamQuery+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.TimeStreamQuery+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/TimeStreamQuery/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.TimeStreamQuery.Internal+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.TimeStreamQuery.Internal where