amazonka-qldb (empty) → 2.0
raw patch · 90 files changed
+9199/−0 lines, 90 filesdep +amazonka-coredep +amazonka-qldbdep +amazonka-test
Dependencies added: amazonka-core, amazonka-qldb, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-qldb.cabal +119/−0
- fixture/CancelJournalKinesisStream.yaml +10/−0
- fixture/CancelJournalKinesisStreamResponse.proto +0/−0
- fixture/CreateLedger.yaml +10/−0
- fixture/CreateLedgerResponse.proto +0/−0
- fixture/DeleteLedger.yaml +10/−0
- fixture/DeleteLedgerResponse.proto +0/−0
- fixture/DescribeJournalKinesisStream.yaml +10/−0
- fixture/DescribeJournalKinesisStreamResponse.proto +0/−0
- fixture/DescribeJournalS3Export.yaml +10/−0
- fixture/DescribeJournalS3ExportResponse.proto +0/−0
- fixture/DescribeLedger.yaml +10/−0
- fixture/DescribeLedgerResponse.proto +0/−0
- fixture/ExportJournalToS.yaml +10/−0
- fixture/ExportJournalToS3.yaml +10/−0
- fixture/ExportJournalToS3Response.proto +0/−0
- fixture/ExportJournalToSResponse.proto +0/−0
- fixture/GetBlock.yaml +10/−0
- fixture/GetBlockResponse.proto +0/−0
- fixture/GetDigest.yaml +10/−0
- fixture/GetDigestResponse.proto +0/−0
- fixture/GetRevision.yaml +10/−0
- fixture/GetRevisionResponse.proto +0/−0
- fixture/ListJournalKinesisStreamsForLedger.yaml +10/−0
- fixture/ListJournalKinesisStreamsForLedgerResponse.proto +0/−0
- fixture/ListJournalS3Exports.yaml +10/−0
- fixture/ListJournalS3ExportsForLedger.yaml +10/−0
- fixture/ListJournalS3ExportsForLedgerResponse.proto +0/−0
- fixture/ListJournalS3ExportsResponse.proto +0/−0
- fixture/ListLedgers.yaml +10/−0
- fixture/ListLedgersResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/StreamJournalToKinesis.yaml +10/−0
- fixture/StreamJournalToKinesisResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateLedger.yaml +10/−0
- fixture/UpdateLedgerPermissionsMode.yaml +10/−0
- fixture/UpdateLedgerPermissionsModeResponse.proto +0/−0
- fixture/UpdateLedgerResponse.proto +0/−0
- gen/Amazonka/QLDB.hs +275/−0
- gen/Amazonka/QLDB/CancelJournalKinesisStream.hs +193/−0
- gen/Amazonka/QLDB/CreateLedger.hs +556/−0
- gen/Amazonka/QLDB/DeleteLedger.hs +122/−0
- gen/Amazonka/QLDB/DescribeJournalKinesisStream.hs +204/−0
- gen/Amazonka/QLDB/DescribeJournalS3Export.hs +206/−0
- gen/Amazonka/QLDB/DescribeLedger.hs +260/−0
- gen/Amazonka/QLDB/ExportJournalToS3.hs +382/−0
- gen/Amazonka/QLDB/GetBlock.hs +252/−0
- gen/Amazonka/QLDB/GetDigest.hs +196/−0
- gen/Amazonka/QLDB/GetRevision.hs +263/−0
- gen/Amazonka/QLDB/Lens.hs +254/−0
- gen/Amazonka/QLDB/ListJournalKinesisStreamsForLedger.hs +275/−0
- gen/Amazonka/QLDB/ListJournalS3Exports.hs +233/−0
- gen/Amazonka/QLDB/ListJournalS3ExportsForLedger.hs +259/−0
- gen/Amazonka/QLDB/ListLedgers.hs +224/−0
- gen/Amazonka/QLDB/ListTagsForResource.hs +168/−0
- gen/Amazonka/QLDB/StreamJournalToKinesis.hs +373/−0
- gen/Amazonka/QLDB/TagResource.hs +184/−0
- gen/Amazonka/QLDB/Types.hs +257/−0
- gen/Amazonka/QLDB/Types/EncryptionStatus.hs +76/−0
- gen/Amazonka/QLDB/Types/ErrorCause.hs +71/−0
- gen/Amazonka/QLDB/Types/ExportStatus.hs +76/−0
- gen/Amazonka/QLDB/Types/JournalKinesisStreamDescription.hs +261/−0
- gen/Amazonka/QLDB/Types/JournalS3ExportDescription.hs +233/−0
- gen/Amazonka/QLDB/Types/KinesisConfiguration.hs +125/−0
- gen/Amazonka/QLDB/Types/LedgerEncryptionDescription.hs +201/−0
- gen/Amazonka/QLDB/Types/LedgerState.hs +81/−0
- gen/Amazonka/QLDB/Types/LedgerSummary.hs +104/−0
- gen/Amazonka/QLDB/Types/OutputFormat.hs +76/−0
- gen/Amazonka/QLDB/Types/PermissionsMode.hs +71/−0
- gen/Amazonka/QLDB/Types/S3EncryptionConfiguration.hs +134/−0
- gen/Amazonka/QLDB/Types/S3ExportConfiguration.hs +183/−0
- gen/Amazonka/QLDB/Types/S3ObjectEncryptionType.hs +76/−0
- gen/Amazonka/QLDB/Types/StreamStatus.hs +86/−0
- gen/Amazonka/QLDB/Types/ValueHolder.hs +74/−0
- gen/Amazonka/QLDB/UntagResource.hs +171/−0
- gen/Amazonka/QLDB/UpdateLedger.hs +415/−0
- gen/Amazonka/QLDB/UpdateLedgerPermissionsMode.hs +296/−0
- gen/Amazonka/QLDB/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Gen/QLDB.hs +438/−0
- test/Test/Amazonka/QLDB.hs +20/−0
- test/Test/Amazonka/QLDB/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 QLDB SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2019-01-02@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-qldb)+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.QLDB](http://hackage.haskell.org/package/amazonka-qldb/docs/Amazonka-QLDB.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-qldb` 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-qldb.cabal view
@@ -0,0 +1,119 @@+cabal-version: 2.2+name: amazonka-qldb+version: 2.0+synopsis: Amazon QLDB 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 @2019-01-02@ 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.QLDB.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.QLDB" 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-qldb++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.QLDB+ Amazonka.QLDB.CancelJournalKinesisStream+ Amazonka.QLDB.CreateLedger+ Amazonka.QLDB.DeleteLedger+ Amazonka.QLDB.DescribeJournalKinesisStream+ Amazonka.QLDB.DescribeJournalS3Export+ Amazonka.QLDB.DescribeLedger+ Amazonka.QLDB.ExportJournalToS3+ Amazonka.QLDB.GetBlock+ Amazonka.QLDB.GetDigest+ Amazonka.QLDB.GetRevision+ Amazonka.QLDB.Lens+ Amazonka.QLDB.ListJournalKinesisStreamsForLedger+ Amazonka.QLDB.ListJournalS3Exports+ Amazonka.QLDB.ListJournalS3ExportsForLedger+ Amazonka.QLDB.ListLedgers+ Amazonka.QLDB.ListTagsForResource+ Amazonka.QLDB.StreamJournalToKinesis+ Amazonka.QLDB.TagResource+ Amazonka.QLDB.Types+ Amazonka.QLDB.Types.EncryptionStatus+ Amazonka.QLDB.Types.ErrorCause+ Amazonka.QLDB.Types.ExportStatus+ Amazonka.QLDB.Types.JournalKinesisStreamDescription+ Amazonka.QLDB.Types.JournalS3ExportDescription+ Amazonka.QLDB.Types.KinesisConfiguration+ Amazonka.QLDB.Types.LedgerEncryptionDescription+ Amazonka.QLDB.Types.LedgerState+ Amazonka.QLDB.Types.LedgerSummary+ Amazonka.QLDB.Types.OutputFormat+ Amazonka.QLDB.Types.PermissionsMode+ Amazonka.QLDB.Types.S3EncryptionConfiguration+ Amazonka.QLDB.Types.S3ExportConfiguration+ Amazonka.QLDB.Types.S3ObjectEncryptionType+ Amazonka.QLDB.Types.StreamStatus+ Amazonka.QLDB.Types.ValueHolder+ Amazonka.QLDB.UntagResource+ Amazonka.QLDB.UpdateLedger+ Amazonka.QLDB.UpdateLedgerPermissionsMode+ Amazonka.QLDB.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-qldb-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.QLDB+ Test.Amazonka.QLDB+ Test.Amazonka.QLDB.Internal++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-qldb+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CancelJournalKinesisStream.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/CancelJournalKinesisStreamResponse.proto view
+ fixture/CreateLedger.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/CreateLedgerResponse.proto view
+ fixture/DeleteLedger.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/DeleteLedgerResponse.proto view
+ fixture/DescribeJournalKinesisStream.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/DescribeJournalKinesisStreamResponse.proto view
+ fixture/DescribeJournalS3Export.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/DescribeJournalS3ExportResponse.proto view
+ fixture/DescribeLedger.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/DescribeLedgerResponse.proto view
+ fixture/ExportJournalToS.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/ExportJournalToS3.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/ExportJournalToS3Response.proto view
+ fixture/ExportJournalToSResponse.proto view
+ fixture/GetBlock.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/GetBlockResponse.proto view
+ fixture/GetDigest.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/GetDigestResponse.proto view
+ fixture/GetRevision.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/GetRevisionResponse.proto view
+ fixture/ListJournalKinesisStreamsForLedger.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/ListJournalKinesisStreamsForLedgerResponse.proto view
+ fixture/ListJournalS3Exports.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/ListJournalS3ExportsForLedger.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/ListJournalS3ExportsForLedgerResponse.proto view
+ fixture/ListJournalS3ExportsResponse.proto view
+ fixture/ListLedgers.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/ListLedgersResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/StreamJournalToKinesis.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/StreamJournalToKinesisResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/UpdateLedger.yaml view
@@ -0,0 +1,10 @@+---+method: PATCH+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/UpdateLedgerPermissionsMode.yaml view
@@ -0,0 +1,10 @@+---+method: PATCH+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/qldb/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: qldb.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/UpdateLedgerPermissionsModeResponse.proto view
+ fixture/UpdateLedgerResponse.proto view
+ gen/Amazonka/QLDB.hs view
@@ -0,0 +1,275 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.QLDB+-- 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 @2019-01-02@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- The control plane for Amazon QLDB+module Amazonka.QLDB+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** InvalidParameterException+ _InvalidParameterException,++ -- ** LimitExceededException+ _LimitExceededException,++ -- ** ResourceAlreadyExistsException+ _ResourceAlreadyExistsException,++ -- ** ResourceInUseException+ _ResourceInUseException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ResourcePreconditionNotMetException+ _ResourcePreconditionNotMetException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** CancelJournalKinesisStream+ CancelJournalKinesisStream (CancelJournalKinesisStream'),+ newCancelJournalKinesisStream,+ CancelJournalKinesisStreamResponse (CancelJournalKinesisStreamResponse'),+ newCancelJournalKinesisStreamResponse,++ -- ** CreateLedger+ CreateLedger (CreateLedger'),+ newCreateLedger,+ CreateLedgerResponse (CreateLedgerResponse'),+ newCreateLedgerResponse,++ -- ** DeleteLedger+ DeleteLedger (DeleteLedger'),+ newDeleteLedger,+ DeleteLedgerResponse (DeleteLedgerResponse'),+ newDeleteLedgerResponse,++ -- ** DescribeJournalKinesisStream+ DescribeJournalKinesisStream (DescribeJournalKinesisStream'),+ newDescribeJournalKinesisStream,+ DescribeJournalKinesisStreamResponse (DescribeJournalKinesisStreamResponse'),+ newDescribeJournalKinesisStreamResponse,++ -- ** DescribeJournalS3Export+ DescribeJournalS3Export (DescribeJournalS3Export'),+ newDescribeJournalS3Export,+ DescribeJournalS3ExportResponse (DescribeJournalS3ExportResponse'),+ newDescribeJournalS3ExportResponse,++ -- ** DescribeLedger+ DescribeLedger (DescribeLedger'),+ newDescribeLedger,+ DescribeLedgerResponse (DescribeLedgerResponse'),+ newDescribeLedgerResponse,++ -- ** ExportJournalToS3+ ExportJournalToS3 (ExportJournalToS3'),+ newExportJournalToS3,+ ExportJournalToS3Response (ExportJournalToS3Response'),+ newExportJournalToS3Response,++ -- ** GetBlock+ GetBlock (GetBlock'),+ newGetBlock,+ GetBlockResponse (GetBlockResponse'),+ newGetBlockResponse,++ -- ** GetDigest+ GetDigest (GetDigest'),+ newGetDigest,+ GetDigestResponse (GetDigestResponse'),+ newGetDigestResponse,++ -- ** GetRevision+ GetRevision (GetRevision'),+ newGetRevision,+ GetRevisionResponse (GetRevisionResponse'),+ newGetRevisionResponse,++ -- ** ListJournalKinesisStreamsForLedger+ ListJournalKinesisStreamsForLedger (ListJournalKinesisStreamsForLedger'),+ newListJournalKinesisStreamsForLedger,+ ListJournalKinesisStreamsForLedgerResponse (ListJournalKinesisStreamsForLedgerResponse'),+ newListJournalKinesisStreamsForLedgerResponse,++ -- ** ListJournalS3Exports+ ListJournalS3Exports (ListJournalS3Exports'),+ newListJournalS3Exports,+ ListJournalS3ExportsResponse (ListJournalS3ExportsResponse'),+ newListJournalS3ExportsResponse,++ -- ** ListJournalS3ExportsForLedger+ ListJournalS3ExportsForLedger (ListJournalS3ExportsForLedger'),+ newListJournalS3ExportsForLedger,+ ListJournalS3ExportsForLedgerResponse (ListJournalS3ExportsForLedgerResponse'),+ newListJournalS3ExportsForLedgerResponse,++ -- ** ListLedgers+ ListLedgers (ListLedgers'),+ newListLedgers,+ ListLedgersResponse (ListLedgersResponse'),+ newListLedgersResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** StreamJournalToKinesis+ StreamJournalToKinesis (StreamJournalToKinesis'),+ newStreamJournalToKinesis,+ StreamJournalToKinesisResponse (StreamJournalToKinesisResponse'),+ newStreamJournalToKinesisResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateLedger+ UpdateLedger (UpdateLedger'),+ newUpdateLedger,+ UpdateLedgerResponse (UpdateLedgerResponse'),+ newUpdateLedgerResponse,++ -- ** UpdateLedgerPermissionsMode+ UpdateLedgerPermissionsMode (UpdateLedgerPermissionsMode'),+ newUpdateLedgerPermissionsMode,+ UpdateLedgerPermissionsModeResponse (UpdateLedgerPermissionsModeResponse'),+ newUpdateLedgerPermissionsModeResponse,++ -- * Types++ -- ** EncryptionStatus+ EncryptionStatus (..),++ -- ** ErrorCause+ ErrorCause (..),++ -- ** ExportStatus+ ExportStatus (..),++ -- ** LedgerState+ LedgerState (..),++ -- ** OutputFormat+ OutputFormat (..),++ -- ** PermissionsMode+ PermissionsMode (..),++ -- ** S3ObjectEncryptionType+ S3ObjectEncryptionType (..),++ -- ** StreamStatus+ StreamStatus (..),++ -- ** JournalKinesisStreamDescription+ JournalKinesisStreamDescription (JournalKinesisStreamDescription'),+ newJournalKinesisStreamDescription,++ -- ** JournalS3ExportDescription+ JournalS3ExportDescription (JournalS3ExportDescription'),+ newJournalS3ExportDescription,++ -- ** KinesisConfiguration+ KinesisConfiguration (KinesisConfiguration'),+ newKinesisConfiguration,++ -- ** LedgerEncryptionDescription+ LedgerEncryptionDescription (LedgerEncryptionDescription'),+ newLedgerEncryptionDescription,++ -- ** LedgerSummary+ LedgerSummary (LedgerSummary'),+ newLedgerSummary,++ -- ** S3EncryptionConfiguration+ S3EncryptionConfiguration (S3EncryptionConfiguration'),+ newS3EncryptionConfiguration,++ -- ** S3ExportConfiguration+ S3ExportConfiguration (S3ExportConfiguration'),+ newS3ExportConfiguration,++ -- ** ValueHolder+ ValueHolder (ValueHolder'),+ newValueHolder,+ )+where++import Amazonka.QLDB.CancelJournalKinesisStream+import Amazonka.QLDB.CreateLedger+import Amazonka.QLDB.DeleteLedger+import Amazonka.QLDB.DescribeJournalKinesisStream+import Amazonka.QLDB.DescribeJournalS3Export+import Amazonka.QLDB.DescribeLedger+import Amazonka.QLDB.ExportJournalToS3+import Amazonka.QLDB.GetBlock+import Amazonka.QLDB.GetDigest+import Amazonka.QLDB.GetRevision+import Amazonka.QLDB.Lens+import Amazonka.QLDB.ListJournalKinesisStreamsForLedger+import Amazonka.QLDB.ListJournalS3Exports+import Amazonka.QLDB.ListJournalS3ExportsForLedger+import Amazonka.QLDB.ListLedgers+import Amazonka.QLDB.ListTagsForResource+import Amazonka.QLDB.StreamJournalToKinesis+import Amazonka.QLDB.TagResource+import Amazonka.QLDB.Types+import Amazonka.QLDB.UntagResource+import Amazonka.QLDB.UpdateLedger+import Amazonka.QLDB.UpdateLedgerPermissionsMode+import Amazonka.QLDB.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 'QLDB'.++-- $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/QLDB/CancelJournalKinesisStream.hs view
@@ -0,0 +1,193 @@+{-# 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.QLDB.CancelJournalKinesisStream+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Ends a given Amazon QLDB journal stream. Before a stream can be+-- canceled, its current status must be @ACTIVE@.+--+-- You can\'t restart a stream after you cancel it. Canceled QLDB stream+-- resources are subject to a 7-day retention period, so they are+-- automatically deleted after this limit expires.+module Amazonka.QLDB.CancelJournalKinesisStream+ ( -- * Creating a Request+ CancelJournalKinesisStream (..),+ newCancelJournalKinesisStream,++ -- * Request Lenses+ cancelJournalKinesisStream_ledgerName,+ cancelJournalKinesisStream_streamId,++ -- * Destructuring the Response+ CancelJournalKinesisStreamResponse (..),+ newCancelJournalKinesisStreamResponse,++ -- * Response Lenses+ cancelJournalKinesisStreamResponse_streamId,+ cancelJournalKinesisStreamResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCancelJournalKinesisStream' smart constructor.+data CancelJournalKinesisStream = CancelJournalKinesisStream'+ { -- | The name of the ledger.+ ledgerName :: Prelude.Text,+ -- | The UUID (represented in Base62-encoded text) of the QLDB journal stream+ -- to be canceled.+ streamId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CancelJournalKinesisStream' 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:+--+-- 'ledgerName', 'cancelJournalKinesisStream_ledgerName' - The name of the ledger.+--+-- 'streamId', 'cancelJournalKinesisStream_streamId' - The UUID (represented in Base62-encoded text) of the QLDB journal stream+-- to be canceled.+newCancelJournalKinesisStream ::+ -- | 'ledgerName'+ Prelude.Text ->+ -- | 'streamId'+ Prelude.Text ->+ CancelJournalKinesisStream+newCancelJournalKinesisStream pLedgerName_ pStreamId_ =+ CancelJournalKinesisStream'+ { ledgerName =+ pLedgerName_,+ streamId = pStreamId_+ }++-- | The name of the ledger.+cancelJournalKinesisStream_ledgerName :: Lens.Lens' CancelJournalKinesisStream Prelude.Text+cancelJournalKinesisStream_ledgerName = Lens.lens (\CancelJournalKinesisStream' {ledgerName} -> ledgerName) (\s@CancelJournalKinesisStream' {} a -> s {ledgerName = a} :: CancelJournalKinesisStream)++-- | The UUID (represented in Base62-encoded text) of the QLDB journal stream+-- to be canceled.+cancelJournalKinesisStream_streamId :: Lens.Lens' CancelJournalKinesisStream Prelude.Text+cancelJournalKinesisStream_streamId = Lens.lens (\CancelJournalKinesisStream' {streamId} -> streamId) (\s@CancelJournalKinesisStream' {} a -> s {streamId = a} :: CancelJournalKinesisStream)++instance Core.AWSRequest CancelJournalKinesisStream where+ type+ AWSResponse CancelJournalKinesisStream =+ CancelJournalKinesisStreamResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CancelJournalKinesisStreamResponse'+ Prelude.<$> (x Data..?> "StreamId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CancelJournalKinesisStream where+ hashWithSalt _salt CancelJournalKinesisStream' {..} =+ _salt+ `Prelude.hashWithSalt` ledgerName+ `Prelude.hashWithSalt` streamId++instance Prelude.NFData CancelJournalKinesisStream where+ rnf CancelJournalKinesisStream' {..} =+ Prelude.rnf ledgerName+ `Prelude.seq` Prelude.rnf streamId++instance Data.ToHeaders CancelJournalKinesisStream where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath CancelJournalKinesisStream where+ toPath CancelJournalKinesisStream' {..} =+ Prelude.mconcat+ [ "/ledgers/",+ Data.toBS ledgerName,+ "/journal-kinesis-streams/",+ Data.toBS streamId+ ]++instance Data.ToQuery CancelJournalKinesisStream where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCancelJournalKinesisStreamResponse' smart constructor.+data CancelJournalKinesisStreamResponse = CancelJournalKinesisStreamResponse'+ { -- | The UUID (Base62-encoded text) of the canceled QLDB journal stream.+ streamId :: 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 'CancelJournalKinesisStreamResponse' 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:+--+-- 'streamId', 'cancelJournalKinesisStreamResponse_streamId' - The UUID (Base62-encoded text) of the canceled QLDB journal stream.+--+-- 'httpStatus', 'cancelJournalKinesisStreamResponse_httpStatus' - The response's http status code.+newCancelJournalKinesisStreamResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CancelJournalKinesisStreamResponse+newCancelJournalKinesisStreamResponse pHttpStatus_ =+ CancelJournalKinesisStreamResponse'+ { streamId =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The UUID (Base62-encoded text) of the canceled QLDB journal stream.+cancelJournalKinesisStreamResponse_streamId :: Lens.Lens' CancelJournalKinesisStreamResponse (Prelude.Maybe Prelude.Text)+cancelJournalKinesisStreamResponse_streamId = Lens.lens (\CancelJournalKinesisStreamResponse' {streamId} -> streamId) (\s@CancelJournalKinesisStreamResponse' {} a -> s {streamId = a} :: CancelJournalKinesisStreamResponse)++-- | The response's http status code.+cancelJournalKinesisStreamResponse_httpStatus :: Lens.Lens' CancelJournalKinesisStreamResponse Prelude.Int+cancelJournalKinesisStreamResponse_httpStatus = Lens.lens (\CancelJournalKinesisStreamResponse' {httpStatus} -> httpStatus) (\s@CancelJournalKinesisStreamResponse' {} a -> s {httpStatus = a} :: CancelJournalKinesisStreamResponse)++instance+ Prelude.NFData+ CancelJournalKinesisStreamResponse+ where+ rnf CancelJournalKinesisStreamResponse' {..} =+ Prelude.rnf streamId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/CreateLedger.hs view
@@ -0,0 +1,556 @@+{-# 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.QLDB.CreateLedger+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a new ledger in your Amazon Web Services account in the current+-- Region.+module Amazonka.QLDB.CreateLedger+ ( -- * Creating a Request+ CreateLedger (..),+ newCreateLedger,++ -- * Request Lenses+ createLedger_deletionProtection,+ createLedger_kmsKey,+ createLedger_tags,+ createLedger_name,+ createLedger_permissionsMode,++ -- * Destructuring the Response+ CreateLedgerResponse (..),+ newCreateLedgerResponse,++ -- * Response Lenses+ createLedgerResponse_arn,+ createLedgerResponse_creationDateTime,+ createLedgerResponse_deletionProtection,+ createLedgerResponse_kmsKeyArn,+ createLedgerResponse_name,+ createLedgerResponse_permissionsMode,+ createLedgerResponse_state,+ createLedgerResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateLedger' smart constructor.+data CreateLedger = CreateLedger'+ { -- | The flag that prevents a ledger from being deleted by any user. If not+ -- provided on ledger creation, this feature is enabled (@true@) by+ -- default.+ --+ -- If deletion protection is enabled, you must first disable it before you+ -- can delete the ledger. You can disable it by calling the @UpdateLedger@+ -- operation to set the flag to @false@.+ deletionProtection :: Prelude.Maybe Prelude.Bool,+ -- | The key in Key Management Service (KMS) to use for encryption of data at+ -- rest in the ledger. For more information, see+ -- <https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html Encryption at rest>+ -- in the /Amazon QLDB Developer Guide/.+ --+ -- Use one of the following options to specify this parameter:+ --+ -- - @AWS_OWNED_KMS_KEY@: Use an KMS key that is owned and managed by+ -- Amazon Web Services on your behalf.+ --+ -- - __Undefined__: By default, use an Amazon Web Services owned KMS key.+ --+ -- - __A valid symmetric customer managed KMS key__: Use the specified+ -- KMS key in your account that you create, own, and manage.+ --+ -- Amazon QLDB does not support asymmetric keys. For more information,+ -- see+ -- <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html Using symmetric and asymmetric keys>+ -- in the /Key Management Service Developer Guide/.+ --+ -- To specify a customer managed KMS key, you can use its key ID, Amazon+ -- Resource Name (ARN), alias name, or alias ARN. When using an alias name,+ -- prefix it with @\"alias\/\"@. To specify a key in a different Amazon Web+ -- Services account, you must use the key ARN or alias ARN.+ --+ -- For example:+ --+ -- - Key ID: @1234abcd-12ab-34cd-56ef-1234567890ab@+ --+ -- - Key ARN:+ -- @arn:aws:kms:us-east-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@+ --+ -- - Alias name: @alias\/ExampleAlias@+ --+ -- - Alias ARN: @arn:aws:kms:us-east-2:111122223333:alias\/ExampleAlias@+ --+ -- For more information, see+ -- <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id Key identifiers (KeyId)>+ -- in the /Key Management Service Developer Guide/.+ kmsKey :: Prelude.Maybe Prelude.Text,+ -- | The key-value pairs to add as tags to the ledger that you want to+ -- create. Tag keys are case sensitive. Tag values are case sensitive and+ -- can be null.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The name of the ledger that you want to create. The name must be unique+ -- among all of the ledgers in your Amazon Web Services account in the+ -- current Region.+ --+ -- Naming constraints for ledger names are defined in+ -- <https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming Quotas in Amazon QLDB>+ -- in the /Amazon QLDB Developer Guide/.+ name :: Prelude.Text,+ -- | The permissions mode to assign to the ledger that you want to create.+ -- This parameter can have one of the following values:+ --+ -- - @ALLOW_ALL@: A legacy permissions mode that enables access control+ -- with API-level granularity for ledgers.+ --+ -- This mode allows users who have the @SendCommand@ API permission for+ -- this ledger to run all PartiQL commands (hence, @ALLOW_ALL@) on any+ -- tables in the specified ledger. This mode disregards any table-level+ -- or command-level IAM permissions policies that you create for the+ -- ledger.+ --+ -- - @STANDARD@: (/Recommended/) A permissions mode that enables access+ -- control with finer granularity for ledgers, tables, and PartiQL+ -- commands.+ --+ -- By default, this mode denies all user requests to run any PartiQL+ -- commands on any tables in this ledger. To allow PartiQL commands to+ -- run, you must create IAM permissions policies for specific table+ -- resources and PartiQL actions, in addition to the @SendCommand@ API+ -- permission for the ledger. For information, see+ -- <https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html Getting started with the standard permissions mode>+ -- in the /Amazon QLDB Developer Guide/.+ --+ -- We strongly recommend using the @STANDARD@ permissions mode to maximize+ -- the security of your ledger data.+ permissionsMode :: PermissionsMode+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateLedger' 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:+--+-- 'deletionProtection', 'createLedger_deletionProtection' - The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+--+-- 'kmsKey', 'createLedger_kmsKey' - The key in Key Management Service (KMS) to use for encryption of data at+-- rest in the ledger. For more information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html Encryption at rest>+-- in the /Amazon QLDB Developer Guide/.+--+-- Use one of the following options to specify this parameter:+--+-- - @AWS_OWNED_KMS_KEY@: Use an KMS key that is owned and managed by+-- Amazon Web Services on your behalf.+--+-- - __Undefined__: By default, use an Amazon Web Services owned KMS key.+--+-- - __A valid symmetric customer managed KMS key__: Use the specified+-- KMS key in your account that you create, own, and manage.+--+-- Amazon QLDB does not support asymmetric keys. For more information,+-- see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html Using symmetric and asymmetric keys>+-- in the /Key Management Service Developer Guide/.+--+-- To specify a customer managed KMS key, you can use its key ID, Amazon+-- Resource Name (ARN), alias name, or alias ARN. When using an alias name,+-- prefix it with @\"alias\/\"@. To specify a key in a different Amazon Web+-- Services account, you must use the key ARN or alias ARN.+--+-- For example:+--+-- - Key ID: @1234abcd-12ab-34cd-56ef-1234567890ab@+--+-- - Key ARN:+-- @arn:aws:kms:us-east-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@+--+-- - Alias name: @alias\/ExampleAlias@+--+-- - Alias ARN: @arn:aws:kms:us-east-2:111122223333:alias\/ExampleAlias@+--+-- For more information, see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id Key identifiers (KeyId)>+-- in the /Key Management Service Developer Guide/.+--+-- 'tags', 'createLedger_tags' - The key-value pairs to add as tags to the ledger that you want to+-- create. Tag keys are case sensitive. Tag values are case sensitive and+-- can be null.+--+-- 'name', 'createLedger_name' - The name of the ledger that you want to create. The name must be unique+-- among all of the ledgers in your Amazon Web Services account in the+-- current Region.+--+-- Naming constraints for ledger names are defined in+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming Quotas in Amazon QLDB>+-- in the /Amazon QLDB Developer Guide/.+--+-- 'permissionsMode', 'createLedger_permissionsMode' - The permissions mode to assign to the ledger that you want to create.+-- This parameter can have one of the following values:+--+-- - @ALLOW_ALL@: A legacy permissions mode that enables access control+-- with API-level granularity for ledgers.+--+-- This mode allows users who have the @SendCommand@ API permission for+-- this ledger to run all PartiQL commands (hence, @ALLOW_ALL@) on any+-- tables in the specified ledger. This mode disregards any table-level+-- or command-level IAM permissions policies that you create for the+-- ledger.+--+-- - @STANDARD@: (/Recommended/) A permissions mode that enables access+-- control with finer granularity for ledgers, tables, and PartiQL+-- commands.+--+-- By default, this mode denies all user requests to run any PartiQL+-- commands on any tables in this ledger. To allow PartiQL commands to+-- run, you must create IAM permissions policies for specific table+-- resources and PartiQL actions, in addition to the @SendCommand@ API+-- permission for the ledger. For information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html Getting started with the standard permissions mode>+-- in the /Amazon QLDB Developer Guide/.+--+-- We strongly recommend using the @STANDARD@ permissions mode to maximize+-- the security of your ledger data.+newCreateLedger ::+ -- | 'name'+ Prelude.Text ->+ -- | 'permissionsMode'+ PermissionsMode ->+ CreateLedger+newCreateLedger pName_ pPermissionsMode_ =+ CreateLedger'+ { deletionProtection = Prelude.Nothing,+ kmsKey = Prelude.Nothing,+ tags = Prelude.Nothing,+ name = pName_,+ permissionsMode = pPermissionsMode_+ }++-- | The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+createLedger_deletionProtection :: Lens.Lens' CreateLedger (Prelude.Maybe Prelude.Bool)+createLedger_deletionProtection = Lens.lens (\CreateLedger' {deletionProtection} -> deletionProtection) (\s@CreateLedger' {} a -> s {deletionProtection = a} :: CreateLedger)++-- | The key in Key Management Service (KMS) to use for encryption of data at+-- rest in the ledger. For more information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html Encryption at rest>+-- in the /Amazon QLDB Developer Guide/.+--+-- Use one of the following options to specify this parameter:+--+-- - @AWS_OWNED_KMS_KEY@: Use an KMS key that is owned and managed by+-- Amazon Web Services on your behalf.+--+-- - __Undefined__: By default, use an Amazon Web Services owned KMS key.+--+-- - __A valid symmetric customer managed KMS key__: Use the specified+-- KMS key in your account that you create, own, and manage.+--+-- Amazon QLDB does not support asymmetric keys. For more information,+-- see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html Using symmetric and asymmetric keys>+-- in the /Key Management Service Developer Guide/.+--+-- To specify a customer managed KMS key, you can use its key ID, Amazon+-- Resource Name (ARN), alias name, or alias ARN. When using an alias name,+-- prefix it with @\"alias\/\"@. To specify a key in a different Amazon Web+-- Services account, you must use the key ARN or alias ARN.+--+-- For example:+--+-- - Key ID: @1234abcd-12ab-34cd-56ef-1234567890ab@+--+-- - Key ARN:+-- @arn:aws:kms:us-east-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@+--+-- - Alias name: @alias\/ExampleAlias@+--+-- - Alias ARN: @arn:aws:kms:us-east-2:111122223333:alias\/ExampleAlias@+--+-- For more information, see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id Key identifiers (KeyId)>+-- in the /Key Management Service Developer Guide/.+createLedger_kmsKey :: Lens.Lens' CreateLedger (Prelude.Maybe Prelude.Text)+createLedger_kmsKey = Lens.lens (\CreateLedger' {kmsKey} -> kmsKey) (\s@CreateLedger' {} a -> s {kmsKey = a} :: CreateLedger)++-- | The key-value pairs to add as tags to the ledger that you want to+-- create. Tag keys are case sensitive. Tag values are case sensitive and+-- can be null.+createLedger_tags :: Lens.Lens' CreateLedger (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createLedger_tags = Lens.lens (\CreateLedger' {tags} -> tags) (\s@CreateLedger' {} a -> s {tags = a} :: CreateLedger) Prelude.. Lens.mapping Lens.coerced++-- | The name of the ledger that you want to create. The name must be unique+-- among all of the ledgers in your Amazon Web Services account in the+-- current Region.+--+-- Naming constraints for ledger names are defined in+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming Quotas in Amazon QLDB>+-- in the /Amazon QLDB Developer Guide/.+createLedger_name :: Lens.Lens' CreateLedger Prelude.Text+createLedger_name = Lens.lens (\CreateLedger' {name} -> name) (\s@CreateLedger' {} a -> s {name = a} :: CreateLedger)++-- | The permissions mode to assign to the ledger that you want to create.+-- This parameter can have one of the following values:+--+-- - @ALLOW_ALL@: A legacy permissions mode that enables access control+-- with API-level granularity for ledgers.+--+-- This mode allows users who have the @SendCommand@ API permission for+-- this ledger to run all PartiQL commands (hence, @ALLOW_ALL@) on any+-- tables in the specified ledger. This mode disregards any table-level+-- or command-level IAM permissions policies that you create for the+-- ledger.+--+-- - @STANDARD@: (/Recommended/) A permissions mode that enables access+-- control with finer granularity for ledgers, tables, and PartiQL+-- commands.+--+-- By default, this mode denies all user requests to run any PartiQL+-- commands on any tables in this ledger. To allow PartiQL commands to+-- run, you must create IAM permissions policies for specific table+-- resources and PartiQL actions, in addition to the @SendCommand@ API+-- permission for the ledger. For information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html Getting started with the standard permissions mode>+-- in the /Amazon QLDB Developer Guide/.+--+-- We strongly recommend using the @STANDARD@ permissions mode to maximize+-- the security of your ledger data.+createLedger_permissionsMode :: Lens.Lens' CreateLedger PermissionsMode+createLedger_permissionsMode = Lens.lens (\CreateLedger' {permissionsMode} -> permissionsMode) (\s@CreateLedger' {} a -> s {permissionsMode = a} :: CreateLedger)++instance Core.AWSRequest CreateLedger where+ type AWSResponse CreateLedger = CreateLedgerResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateLedgerResponse'+ Prelude.<$> (x Data..?> "Arn")+ Prelude.<*> (x Data..?> "CreationDateTime")+ Prelude.<*> (x Data..?> "DeletionProtection")+ Prelude.<*> (x Data..?> "KmsKeyArn")+ Prelude.<*> (x Data..?> "Name")+ Prelude.<*> (x Data..?> "PermissionsMode")+ Prelude.<*> (x Data..?> "State")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateLedger where+ hashWithSalt _salt CreateLedger' {..} =+ _salt+ `Prelude.hashWithSalt` deletionProtection+ `Prelude.hashWithSalt` kmsKey+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` permissionsMode++instance Prelude.NFData CreateLedger where+ rnf CreateLedger' {..} =+ Prelude.rnf deletionProtection+ `Prelude.seq` Prelude.rnf kmsKey+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf permissionsMode++instance Data.ToHeaders CreateLedger where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateLedger where+ toJSON CreateLedger' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DeletionProtection" Data..=)+ Prelude.<$> deletionProtection,+ ("KmsKey" Data..=) Prelude.<$> kmsKey,+ ("Tags" Data..=) Prelude.<$> tags,+ Prelude.Just ("Name" Data..= name),+ Prelude.Just+ ("PermissionsMode" Data..= permissionsMode)+ ]+ )++instance Data.ToPath CreateLedger where+ toPath = Prelude.const "/ledgers"++instance Data.ToQuery CreateLedger where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateLedgerResponse' smart constructor.+data CreateLedgerResponse = CreateLedgerResponse'+ { -- | The Amazon Resource Name (ARN) for the ledger.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The date and time, in epoch time format, when the ledger was created.+ -- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+ -- January 1, 1970 UTC.)+ creationDateTime :: Prelude.Maybe Data.POSIX,+ -- | The flag that prevents a ledger from being deleted by any user. If not+ -- provided on ledger creation, this feature is enabled (@true@) by+ -- default.+ --+ -- If deletion protection is enabled, you must first disable it before you+ -- can delete the ledger. You can disable it by calling the @UpdateLedger@+ -- operation to set the flag to @false@.+ deletionProtection :: Prelude.Maybe Prelude.Bool,+ -- | The ARN of the customer managed KMS key that the ledger uses for+ -- encryption at rest. If this parameter is undefined, the ledger uses an+ -- Amazon Web Services owned KMS key for encryption.+ kmsKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the ledger.+ name :: Prelude.Maybe Prelude.Text,+ -- | The permissions mode of the ledger that you created.+ permissionsMode :: Prelude.Maybe PermissionsMode,+ -- | The current status of the ledger.+ state :: Prelude.Maybe LedgerState,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateLedgerResponse' 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:+--+-- 'arn', 'createLedgerResponse_arn' - The Amazon Resource Name (ARN) for the ledger.+--+-- 'creationDateTime', 'createLedgerResponse_creationDateTime' - The date and time, in epoch time format, when the ledger was created.+-- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+-- January 1, 1970 UTC.)+--+-- 'deletionProtection', 'createLedgerResponse_deletionProtection' - The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+--+-- 'kmsKeyArn', 'createLedgerResponse_kmsKeyArn' - The ARN of the customer managed KMS key that the ledger uses for+-- encryption at rest. If this parameter is undefined, the ledger uses an+-- Amazon Web Services owned KMS key for encryption.+--+-- 'name', 'createLedgerResponse_name' - The name of the ledger.+--+-- 'permissionsMode', 'createLedgerResponse_permissionsMode' - The permissions mode of the ledger that you created.+--+-- 'state', 'createLedgerResponse_state' - The current status of the ledger.+--+-- 'httpStatus', 'createLedgerResponse_httpStatus' - The response's http status code.+newCreateLedgerResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateLedgerResponse+newCreateLedgerResponse pHttpStatus_ =+ CreateLedgerResponse'+ { arn = Prelude.Nothing,+ creationDateTime = Prelude.Nothing,+ deletionProtection = Prelude.Nothing,+ kmsKeyArn = Prelude.Nothing,+ name = Prelude.Nothing,+ permissionsMode = Prelude.Nothing,+ state = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) for the ledger.+createLedgerResponse_arn :: Lens.Lens' CreateLedgerResponse (Prelude.Maybe Prelude.Text)+createLedgerResponse_arn = Lens.lens (\CreateLedgerResponse' {arn} -> arn) (\s@CreateLedgerResponse' {} a -> s {arn = a} :: CreateLedgerResponse)++-- | The date and time, in epoch time format, when the ledger was created.+-- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+-- January 1, 1970 UTC.)+createLedgerResponse_creationDateTime :: Lens.Lens' CreateLedgerResponse (Prelude.Maybe Prelude.UTCTime)+createLedgerResponse_creationDateTime = Lens.lens (\CreateLedgerResponse' {creationDateTime} -> creationDateTime) (\s@CreateLedgerResponse' {} a -> s {creationDateTime = a} :: CreateLedgerResponse) Prelude.. Lens.mapping Data._Time++-- | The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+createLedgerResponse_deletionProtection :: Lens.Lens' CreateLedgerResponse (Prelude.Maybe Prelude.Bool)+createLedgerResponse_deletionProtection = Lens.lens (\CreateLedgerResponse' {deletionProtection} -> deletionProtection) (\s@CreateLedgerResponse' {} a -> s {deletionProtection = a} :: CreateLedgerResponse)++-- | The ARN of the customer managed KMS key that the ledger uses for+-- encryption at rest. If this parameter is undefined, the ledger uses an+-- Amazon Web Services owned KMS key for encryption.+createLedgerResponse_kmsKeyArn :: Lens.Lens' CreateLedgerResponse (Prelude.Maybe Prelude.Text)+createLedgerResponse_kmsKeyArn = Lens.lens (\CreateLedgerResponse' {kmsKeyArn} -> kmsKeyArn) (\s@CreateLedgerResponse' {} a -> s {kmsKeyArn = a} :: CreateLedgerResponse)++-- | The name of the ledger.+createLedgerResponse_name :: Lens.Lens' CreateLedgerResponse (Prelude.Maybe Prelude.Text)+createLedgerResponse_name = Lens.lens (\CreateLedgerResponse' {name} -> name) (\s@CreateLedgerResponse' {} a -> s {name = a} :: CreateLedgerResponse)++-- | The permissions mode of the ledger that you created.+createLedgerResponse_permissionsMode :: Lens.Lens' CreateLedgerResponse (Prelude.Maybe PermissionsMode)+createLedgerResponse_permissionsMode = Lens.lens (\CreateLedgerResponse' {permissionsMode} -> permissionsMode) (\s@CreateLedgerResponse' {} a -> s {permissionsMode = a} :: CreateLedgerResponse)++-- | The current status of the ledger.+createLedgerResponse_state :: Lens.Lens' CreateLedgerResponse (Prelude.Maybe LedgerState)+createLedgerResponse_state = Lens.lens (\CreateLedgerResponse' {state} -> state) (\s@CreateLedgerResponse' {} a -> s {state = a} :: CreateLedgerResponse)++-- | The response's http status code.+createLedgerResponse_httpStatus :: Lens.Lens' CreateLedgerResponse Prelude.Int+createLedgerResponse_httpStatus = Lens.lens (\CreateLedgerResponse' {httpStatus} -> httpStatus) (\s@CreateLedgerResponse' {} a -> s {httpStatus = a} :: CreateLedgerResponse)++instance Prelude.NFData CreateLedgerResponse where+ rnf CreateLedgerResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf creationDateTime+ `Prelude.seq` Prelude.rnf deletionProtection+ `Prelude.seq` Prelude.rnf kmsKeyArn+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf permissionsMode+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/DeleteLedger.hs view
@@ -0,0 +1,122 @@+{-# 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.QLDB.DeleteLedger+-- 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 ledger and all of its contents. This action is irreversible.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+module Amazonka.QLDB.DeleteLedger+ ( -- * Creating a Request+ DeleteLedger (..),+ newDeleteLedger,++ -- * Request Lenses+ deleteLedger_name,++ -- * Destructuring the Response+ DeleteLedgerResponse (..),+ newDeleteLedgerResponse,+ )+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.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteLedger' smart constructor.+data DeleteLedger = DeleteLedger'+ { -- | The name of the ledger that you want to delete.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteLedger' 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', 'deleteLedger_name' - The name of the ledger that you want to delete.+newDeleteLedger ::+ -- | 'name'+ Prelude.Text ->+ DeleteLedger+newDeleteLedger pName_ = DeleteLedger' {name = pName_}++-- | The name of the ledger that you want to delete.+deleteLedger_name :: Lens.Lens' DeleteLedger Prelude.Text+deleteLedger_name = Lens.lens (\DeleteLedger' {name} -> name) (\s@DeleteLedger' {} a -> s {name = a} :: DeleteLedger)++instance Core.AWSRequest DeleteLedger where+ type AWSResponse DeleteLedger = DeleteLedgerResponse+ request overrides =+ Request.delete (overrides defaultService)+ response = Response.receiveNull DeleteLedgerResponse'++instance Prelude.Hashable DeleteLedger where+ hashWithSalt _salt DeleteLedger' {..} =+ _salt `Prelude.hashWithSalt` name++instance Prelude.NFData DeleteLedger where+ rnf DeleteLedger' {..} = Prelude.rnf name++instance Data.ToHeaders DeleteLedger where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteLedger where+ toPath DeleteLedger' {..} =+ Prelude.mconcat ["/ledgers/", Data.toBS name]++instance Data.ToQuery DeleteLedger where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteLedgerResponse' smart constructor.+data DeleteLedgerResponse = DeleteLedgerResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteLedgerResponse' 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.+newDeleteLedgerResponse ::+ DeleteLedgerResponse+newDeleteLedgerResponse = DeleteLedgerResponse'++instance Prelude.NFData DeleteLedgerResponse where+ rnf _ = ()
+ gen/Amazonka/QLDB/DescribeJournalKinesisStream.hs view
@@ -0,0 +1,204 @@+{-# 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.QLDB.DescribeJournalKinesisStream+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns detailed information about a given Amazon QLDB journal stream.+-- The output includes the Amazon Resource Name (ARN), stream name, current+-- status, creation time, and the parameters of the original stream+-- creation request.+--+-- This action does not return any expired journal streams. For more+-- information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/streams.create.html#streams.create.states.expiration Expiration for terminal streams>+-- in the /Amazon QLDB Developer Guide/.+module Amazonka.QLDB.DescribeJournalKinesisStream+ ( -- * Creating a Request+ DescribeJournalKinesisStream (..),+ newDescribeJournalKinesisStream,++ -- * Request Lenses+ describeJournalKinesisStream_ledgerName,+ describeJournalKinesisStream_streamId,++ -- * Destructuring the Response+ DescribeJournalKinesisStreamResponse (..),+ newDescribeJournalKinesisStreamResponse,++ -- * Response Lenses+ describeJournalKinesisStreamResponse_stream,+ describeJournalKinesisStreamResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeJournalKinesisStream' smart constructor.+data DescribeJournalKinesisStream = DescribeJournalKinesisStream'+ { -- | The name of the ledger.+ ledgerName :: Prelude.Text,+ -- | The UUID (represented in Base62-encoded text) of the QLDB journal stream+ -- to describe.+ streamId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeJournalKinesisStream' 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:+--+-- 'ledgerName', 'describeJournalKinesisStream_ledgerName' - The name of the ledger.+--+-- 'streamId', 'describeJournalKinesisStream_streamId' - The UUID (represented in Base62-encoded text) of the QLDB journal stream+-- to describe.+newDescribeJournalKinesisStream ::+ -- | 'ledgerName'+ Prelude.Text ->+ -- | 'streamId'+ Prelude.Text ->+ DescribeJournalKinesisStream+newDescribeJournalKinesisStream+ pLedgerName_+ pStreamId_ =+ DescribeJournalKinesisStream'+ { ledgerName =+ pLedgerName_,+ streamId = pStreamId_+ }++-- | The name of the ledger.+describeJournalKinesisStream_ledgerName :: Lens.Lens' DescribeJournalKinesisStream Prelude.Text+describeJournalKinesisStream_ledgerName = Lens.lens (\DescribeJournalKinesisStream' {ledgerName} -> ledgerName) (\s@DescribeJournalKinesisStream' {} a -> s {ledgerName = a} :: DescribeJournalKinesisStream)++-- | The UUID (represented in Base62-encoded text) of the QLDB journal stream+-- to describe.+describeJournalKinesisStream_streamId :: Lens.Lens' DescribeJournalKinesisStream Prelude.Text+describeJournalKinesisStream_streamId = Lens.lens (\DescribeJournalKinesisStream' {streamId} -> streamId) (\s@DescribeJournalKinesisStream' {} a -> s {streamId = a} :: DescribeJournalKinesisStream)++instance Core.AWSRequest DescribeJournalKinesisStream where+ type+ AWSResponse DescribeJournalKinesisStream =+ DescribeJournalKinesisStreamResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeJournalKinesisStreamResponse'+ Prelude.<$> (x Data..?> "Stream")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ DescribeJournalKinesisStream+ where+ hashWithSalt _salt DescribeJournalKinesisStream' {..} =+ _salt+ `Prelude.hashWithSalt` ledgerName+ `Prelude.hashWithSalt` streamId++instance Prelude.NFData DescribeJournalKinesisStream where+ rnf DescribeJournalKinesisStream' {..} =+ Prelude.rnf ledgerName+ `Prelude.seq` Prelude.rnf streamId++instance Data.ToHeaders DescribeJournalKinesisStream where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeJournalKinesisStream where+ toPath DescribeJournalKinesisStream' {..} =+ Prelude.mconcat+ [ "/ledgers/",+ Data.toBS ledgerName,+ "/journal-kinesis-streams/",+ Data.toBS streamId+ ]++instance Data.ToQuery DescribeJournalKinesisStream where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeJournalKinesisStreamResponse' smart constructor.+data DescribeJournalKinesisStreamResponse = DescribeJournalKinesisStreamResponse'+ { -- | Information about the QLDB journal stream returned by a+ -- @DescribeJournalS3Export@ request.+ stream :: Prelude.Maybe JournalKinesisStreamDescription,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeJournalKinesisStreamResponse' 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:+--+-- 'stream', 'describeJournalKinesisStreamResponse_stream' - Information about the QLDB journal stream returned by a+-- @DescribeJournalS3Export@ request.+--+-- 'httpStatus', 'describeJournalKinesisStreamResponse_httpStatus' - The response's http status code.+newDescribeJournalKinesisStreamResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeJournalKinesisStreamResponse+newDescribeJournalKinesisStreamResponse pHttpStatus_ =+ DescribeJournalKinesisStreamResponse'+ { stream =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Information about the QLDB journal stream returned by a+-- @DescribeJournalS3Export@ request.+describeJournalKinesisStreamResponse_stream :: Lens.Lens' DescribeJournalKinesisStreamResponse (Prelude.Maybe JournalKinesisStreamDescription)+describeJournalKinesisStreamResponse_stream = Lens.lens (\DescribeJournalKinesisStreamResponse' {stream} -> stream) (\s@DescribeJournalKinesisStreamResponse' {} a -> s {stream = a} :: DescribeJournalKinesisStreamResponse)++-- | The response's http status code.+describeJournalKinesisStreamResponse_httpStatus :: Lens.Lens' DescribeJournalKinesisStreamResponse Prelude.Int+describeJournalKinesisStreamResponse_httpStatus = Lens.lens (\DescribeJournalKinesisStreamResponse' {httpStatus} -> httpStatus) (\s@DescribeJournalKinesisStreamResponse' {} a -> s {httpStatus = a} :: DescribeJournalKinesisStreamResponse)++instance+ Prelude.NFData+ DescribeJournalKinesisStreamResponse+ where+ rnf DescribeJournalKinesisStreamResponse' {..} =+ Prelude.rnf stream+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/DescribeJournalS3Export.hs view
@@ -0,0 +1,206 @@+{-# 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.QLDB.DescribeJournalS3Export+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about a journal export job, including the ledger+-- name, export ID, creation time, current status, and the parameters of+-- the original export creation request.+--+-- This action does not return any expired export jobs. For more+-- information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration Export job expiration>+-- in the /Amazon QLDB Developer Guide/.+--+-- If the export job with the given @ExportId@ doesn\'t exist, then throws+-- @ResourceNotFoundException@.+--+-- If the ledger with the given @Name@ doesn\'t exist, then throws+-- @ResourceNotFoundException@.+module Amazonka.QLDB.DescribeJournalS3Export+ ( -- * Creating a Request+ DescribeJournalS3Export (..),+ newDescribeJournalS3Export,++ -- * Request Lenses+ describeJournalS3Export_name,+ describeJournalS3Export_exportId,++ -- * Destructuring the Response+ DescribeJournalS3ExportResponse (..),+ newDescribeJournalS3ExportResponse,++ -- * Response Lenses+ describeJournalS3ExportResponse_httpStatus,+ describeJournalS3ExportResponse_exportDescription,+ )+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.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeJournalS3Export' smart constructor.+data DescribeJournalS3Export = DescribeJournalS3Export'+ { -- | The name of the ledger.+ name :: Prelude.Text,+ -- | The UUID (represented in Base62-encoded text) of the journal export job+ -- to describe.+ exportId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeJournalS3Export' 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', 'describeJournalS3Export_name' - The name of the ledger.+--+-- 'exportId', 'describeJournalS3Export_exportId' - The UUID (represented in Base62-encoded text) of the journal export job+-- to describe.+newDescribeJournalS3Export ::+ -- | 'name'+ Prelude.Text ->+ -- | 'exportId'+ Prelude.Text ->+ DescribeJournalS3Export+newDescribeJournalS3Export pName_ pExportId_ =+ DescribeJournalS3Export'+ { name = pName_,+ exportId = pExportId_+ }++-- | The name of the ledger.+describeJournalS3Export_name :: Lens.Lens' DescribeJournalS3Export Prelude.Text+describeJournalS3Export_name = Lens.lens (\DescribeJournalS3Export' {name} -> name) (\s@DescribeJournalS3Export' {} a -> s {name = a} :: DescribeJournalS3Export)++-- | The UUID (represented in Base62-encoded text) of the journal export job+-- to describe.+describeJournalS3Export_exportId :: Lens.Lens' DescribeJournalS3Export Prelude.Text+describeJournalS3Export_exportId = Lens.lens (\DescribeJournalS3Export' {exportId} -> exportId) (\s@DescribeJournalS3Export' {} a -> s {exportId = a} :: DescribeJournalS3Export)++instance Core.AWSRequest DescribeJournalS3Export where+ type+ AWSResponse DescribeJournalS3Export =+ DescribeJournalS3ExportResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeJournalS3ExportResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "ExportDescription")+ )++instance Prelude.Hashable DescribeJournalS3Export where+ hashWithSalt _salt DescribeJournalS3Export' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` exportId++instance Prelude.NFData DescribeJournalS3Export where+ rnf DescribeJournalS3Export' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf exportId++instance Data.ToHeaders DescribeJournalS3Export where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeJournalS3Export where+ toPath DescribeJournalS3Export' {..} =+ Prelude.mconcat+ [ "/ledgers/",+ Data.toBS name,+ "/journal-s3-exports/",+ Data.toBS exportId+ ]++instance Data.ToQuery DescribeJournalS3Export where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeJournalS3ExportResponse' smart constructor.+data DescribeJournalS3ExportResponse = DescribeJournalS3ExportResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Information about the journal export job returned by a+ -- @DescribeJournalS3Export@ request.+ exportDescription :: JournalS3ExportDescription+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeJournalS3ExportResponse' 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', 'describeJournalS3ExportResponse_httpStatus' - The response's http status code.+--+-- 'exportDescription', 'describeJournalS3ExportResponse_exportDescription' - Information about the journal export job returned by a+-- @DescribeJournalS3Export@ request.+newDescribeJournalS3ExportResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'exportDescription'+ JournalS3ExportDescription ->+ DescribeJournalS3ExportResponse+newDescribeJournalS3ExportResponse+ pHttpStatus_+ pExportDescription_ =+ DescribeJournalS3ExportResponse'+ { httpStatus =+ pHttpStatus_,+ exportDescription = pExportDescription_+ }++-- | The response's http status code.+describeJournalS3ExportResponse_httpStatus :: Lens.Lens' DescribeJournalS3ExportResponse Prelude.Int+describeJournalS3ExportResponse_httpStatus = Lens.lens (\DescribeJournalS3ExportResponse' {httpStatus} -> httpStatus) (\s@DescribeJournalS3ExportResponse' {} a -> s {httpStatus = a} :: DescribeJournalS3ExportResponse)++-- | Information about the journal export job returned by a+-- @DescribeJournalS3Export@ request.+describeJournalS3ExportResponse_exportDescription :: Lens.Lens' DescribeJournalS3ExportResponse JournalS3ExportDescription+describeJournalS3ExportResponse_exportDescription = Lens.lens (\DescribeJournalS3ExportResponse' {exportDescription} -> exportDescription) (\s@DescribeJournalS3ExportResponse' {} a -> s {exportDescription = a} :: DescribeJournalS3ExportResponse)++instance+ Prelude.NFData+ DescribeJournalS3ExportResponse+ where+ rnf DescribeJournalS3ExportResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf exportDescription
+ gen/Amazonka/QLDB/DescribeLedger.hs view
@@ -0,0 +1,260 @@+{-# 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.QLDB.DescribeLedger+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about a ledger, including its state, permissions+-- mode, encryption at rest settings, and when it was created.+module Amazonka.QLDB.DescribeLedger+ ( -- * Creating a Request+ DescribeLedger (..),+ newDescribeLedger,++ -- * Request Lenses+ describeLedger_name,++ -- * Destructuring the Response+ DescribeLedgerResponse (..),+ newDescribeLedgerResponse,++ -- * Response Lenses+ describeLedgerResponse_arn,+ describeLedgerResponse_creationDateTime,+ describeLedgerResponse_deletionProtection,+ describeLedgerResponse_encryptionDescription,+ describeLedgerResponse_name,+ describeLedgerResponse_permissionsMode,+ describeLedgerResponse_state,+ describeLedgerResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeLedger' smart constructor.+data DescribeLedger = DescribeLedger'+ { -- | The name of the ledger that you want to describe.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeLedger' 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', 'describeLedger_name' - The name of the ledger that you want to describe.+newDescribeLedger ::+ -- | 'name'+ Prelude.Text ->+ DescribeLedger+newDescribeLedger pName_ =+ DescribeLedger' {name = pName_}++-- | The name of the ledger that you want to describe.+describeLedger_name :: Lens.Lens' DescribeLedger Prelude.Text+describeLedger_name = Lens.lens (\DescribeLedger' {name} -> name) (\s@DescribeLedger' {} a -> s {name = a} :: DescribeLedger)++instance Core.AWSRequest DescribeLedger where+ type+ AWSResponse DescribeLedger =+ DescribeLedgerResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeLedgerResponse'+ Prelude.<$> (x Data..?> "Arn")+ Prelude.<*> (x Data..?> "CreationDateTime")+ Prelude.<*> (x Data..?> "DeletionProtection")+ Prelude.<*> (x Data..?> "EncryptionDescription")+ Prelude.<*> (x Data..?> "Name")+ Prelude.<*> (x Data..?> "PermissionsMode")+ Prelude.<*> (x Data..?> "State")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeLedger where+ hashWithSalt _salt DescribeLedger' {..} =+ _salt `Prelude.hashWithSalt` name++instance Prelude.NFData DescribeLedger where+ rnf DescribeLedger' {..} = Prelude.rnf name++instance Data.ToHeaders DescribeLedger where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeLedger where+ toPath DescribeLedger' {..} =+ Prelude.mconcat ["/ledgers/", Data.toBS name]++instance Data.ToQuery DescribeLedger where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeLedgerResponse' smart constructor.+data DescribeLedgerResponse = DescribeLedgerResponse'+ { -- | The Amazon Resource Name (ARN) for the ledger.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The date and time, in epoch time format, when the ledger was created.+ -- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+ -- January 1, 1970 UTC.)+ creationDateTime :: Prelude.Maybe Data.POSIX,+ -- | The flag that prevents a ledger from being deleted by any user. If not+ -- provided on ledger creation, this feature is enabled (@true@) by+ -- default.+ --+ -- If deletion protection is enabled, you must first disable it before you+ -- can delete the ledger. You can disable it by calling the @UpdateLedger@+ -- operation to set the flag to @false@.+ deletionProtection :: Prelude.Maybe Prelude.Bool,+ -- | Information about the encryption of data at rest in the ledger. This+ -- includes the current status, the KMS key, and when the key became+ -- inaccessible (in the case of an error).+ encryptionDescription :: Prelude.Maybe LedgerEncryptionDescription,+ -- | The name of the ledger.+ name :: Prelude.Maybe Prelude.Text,+ -- | The permissions mode of the ledger.+ permissionsMode :: Prelude.Maybe PermissionsMode,+ -- | The current status of the ledger.+ state :: Prelude.Maybe LedgerState,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeLedgerResponse' 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:+--+-- 'arn', 'describeLedgerResponse_arn' - The Amazon Resource Name (ARN) for the ledger.+--+-- 'creationDateTime', 'describeLedgerResponse_creationDateTime' - The date and time, in epoch time format, when the ledger was created.+-- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+-- January 1, 1970 UTC.)+--+-- 'deletionProtection', 'describeLedgerResponse_deletionProtection' - The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+--+-- 'encryptionDescription', 'describeLedgerResponse_encryptionDescription' - Information about the encryption of data at rest in the ledger. This+-- includes the current status, the KMS key, and when the key became+-- inaccessible (in the case of an error).+--+-- 'name', 'describeLedgerResponse_name' - The name of the ledger.+--+-- 'permissionsMode', 'describeLedgerResponse_permissionsMode' - The permissions mode of the ledger.+--+-- 'state', 'describeLedgerResponse_state' - The current status of the ledger.+--+-- 'httpStatus', 'describeLedgerResponse_httpStatus' - The response's http status code.+newDescribeLedgerResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeLedgerResponse+newDescribeLedgerResponse pHttpStatus_ =+ DescribeLedgerResponse'+ { arn = Prelude.Nothing,+ creationDateTime = Prelude.Nothing,+ deletionProtection = Prelude.Nothing,+ encryptionDescription = Prelude.Nothing,+ name = Prelude.Nothing,+ permissionsMode = Prelude.Nothing,+ state = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) for the ledger.+describeLedgerResponse_arn :: Lens.Lens' DescribeLedgerResponse (Prelude.Maybe Prelude.Text)+describeLedgerResponse_arn = Lens.lens (\DescribeLedgerResponse' {arn} -> arn) (\s@DescribeLedgerResponse' {} a -> s {arn = a} :: DescribeLedgerResponse)++-- | The date and time, in epoch time format, when the ledger was created.+-- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+-- January 1, 1970 UTC.)+describeLedgerResponse_creationDateTime :: Lens.Lens' DescribeLedgerResponse (Prelude.Maybe Prelude.UTCTime)+describeLedgerResponse_creationDateTime = Lens.lens (\DescribeLedgerResponse' {creationDateTime} -> creationDateTime) (\s@DescribeLedgerResponse' {} a -> s {creationDateTime = a} :: DescribeLedgerResponse) Prelude.. Lens.mapping Data._Time++-- | The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+describeLedgerResponse_deletionProtection :: Lens.Lens' DescribeLedgerResponse (Prelude.Maybe Prelude.Bool)+describeLedgerResponse_deletionProtection = Lens.lens (\DescribeLedgerResponse' {deletionProtection} -> deletionProtection) (\s@DescribeLedgerResponse' {} a -> s {deletionProtection = a} :: DescribeLedgerResponse)++-- | Information about the encryption of data at rest in the ledger. This+-- includes the current status, the KMS key, and when the key became+-- inaccessible (in the case of an error).+describeLedgerResponse_encryptionDescription :: Lens.Lens' DescribeLedgerResponse (Prelude.Maybe LedgerEncryptionDescription)+describeLedgerResponse_encryptionDescription = Lens.lens (\DescribeLedgerResponse' {encryptionDescription} -> encryptionDescription) (\s@DescribeLedgerResponse' {} a -> s {encryptionDescription = a} :: DescribeLedgerResponse)++-- | The name of the ledger.+describeLedgerResponse_name :: Lens.Lens' DescribeLedgerResponse (Prelude.Maybe Prelude.Text)+describeLedgerResponse_name = Lens.lens (\DescribeLedgerResponse' {name} -> name) (\s@DescribeLedgerResponse' {} a -> s {name = a} :: DescribeLedgerResponse)++-- | The permissions mode of the ledger.+describeLedgerResponse_permissionsMode :: Lens.Lens' DescribeLedgerResponse (Prelude.Maybe PermissionsMode)+describeLedgerResponse_permissionsMode = Lens.lens (\DescribeLedgerResponse' {permissionsMode} -> permissionsMode) (\s@DescribeLedgerResponse' {} a -> s {permissionsMode = a} :: DescribeLedgerResponse)++-- | The current status of the ledger.+describeLedgerResponse_state :: Lens.Lens' DescribeLedgerResponse (Prelude.Maybe LedgerState)+describeLedgerResponse_state = Lens.lens (\DescribeLedgerResponse' {state} -> state) (\s@DescribeLedgerResponse' {} a -> s {state = a} :: DescribeLedgerResponse)++-- | The response's http status code.+describeLedgerResponse_httpStatus :: Lens.Lens' DescribeLedgerResponse Prelude.Int+describeLedgerResponse_httpStatus = Lens.lens (\DescribeLedgerResponse' {httpStatus} -> httpStatus) (\s@DescribeLedgerResponse' {} a -> s {httpStatus = a} :: DescribeLedgerResponse)++instance Prelude.NFData DescribeLedgerResponse where+ rnf DescribeLedgerResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf creationDateTime+ `Prelude.seq` Prelude.rnf deletionProtection+ `Prelude.seq` Prelude.rnf encryptionDescription+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf permissionsMode+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/ExportJournalToS3.hs view
@@ -0,0 +1,382 @@+{-# 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.QLDB.ExportJournalToS3+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Exports journal contents within a date and time range from a ledger into+-- a specified Amazon Simple Storage Service (Amazon S3) bucket. A journal+-- export job can write the data objects in either the text or binary+-- representation of Amazon Ion format, or in /JSON Lines/ text format.+--+-- In JSON Lines format, each journal block in the exported data object is+-- a valid JSON object that is delimited by a newline. You can use this+-- format to easily integrate JSON exports with analytics tools such as+-- Glue and Amazon Athena because these services can parse+-- newline-delimited JSON automatically. For more information about the+-- format, see <https://jsonlines.org/ JSON Lines>.+--+-- If the ledger with the given @Name@ doesn\'t exist, then throws+-- @ResourceNotFoundException@.+--+-- If the ledger with the given @Name@ is in @CREATING@ status, then throws+-- @ResourcePreconditionNotMetException@.+--+-- You can initiate up to two concurrent journal export requests for each+-- ledger. Beyond this limit, journal export requests throw+-- @LimitExceededException@.+module Amazonka.QLDB.ExportJournalToS3+ ( -- * Creating a Request+ ExportJournalToS3 (..),+ newExportJournalToS3,++ -- * Request Lenses+ exportJournalToS3_outputFormat,+ exportJournalToS3_name,+ exportJournalToS3_inclusiveStartTime,+ exportJournalToS3_exclusiveEndTime,+ exportJournalToS3_s3ExportConfiguration,+ exportJournalToS3_roleArn,++ -- * Destructuring the Response+ ExportJournalToS3Response (..),+ newExportJournalToS3Response,++ -- * Response Lenses+ exportJournalToS3Response_httpStatus,+ exportJournalToS3Response_exportId,+ )+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.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newExportJournalToS3' smart constructor.+data ExportJournalToS3 = ExportJournalToS3'+ { -- | The output format of your exported journal data. If this parameter is+ -- not specified, the exported data defaults to @ION_TEXT@ format.+ outputFormat :: Prelude.Maybe OutputFormat,+ -- | The name of the ledger.+ name :: Prelude.Text,+ -- | The inclusive start date and time for the range of journal contents to+ -- export.+ --+ -- The @InclusiveStartTime@ must be in @ISO 8601@ date and time format and+ -- in Universal Coordinated Time (UTC). For example:+ -- @2019-06-13T21:36:34Z@.+ --+ -- The @InclusiveStartTime@ must be before @ExclusiveEndTime@.+ --+ -- If you provide an @InclusiveStartTime@ that is before the ledger\'s+ -- @CreationDateTime@, Amazon QLDB defaults it to the ledger\'s+ -- @CreationDateTime@.+ inclusiveStartTime :: Data.POSIX,+ -- | The exclusive end date and time for the range of journal contents to+ -- export.+ --+ -- The @ExclusiveEndTime@ must be in @ISO 8601@ date and time format and in+ -- Universal Coordinated Time (UTC). For example: @2019-06-13T21:36:34Z@.+ --+ -- The @ExclusiveEndTime@ must be less than or equal to the current UTC+ -- date and time.+ exclusiveEndTime :: Data.POSIX,+ -- | The configuration settings of the Amazon S3 bucket destination for your+ -- export request.+ s3ExportConfiguration :: S3ExportConfiguration,+ -- | The Amazon Resource Name (ARN) of the IAM role that grants QLDB+ -- permissions for a journal export job to do the following:+ --+ -- - Write objects into your Amazon Simple Storage Service (Amazon S3)+ -- bucket.+ --+ -- - (Optional) Use your customer managed key in Key Management Service+ -- (KMS) for server-side encryption of your exported data.+ --+ -- To pass a role to QLDB when requesting a journal export, you must have+ -- permissions to perform the @iam:PassRole@ action on the IAM role+ -- resource. This is required for all journal export requests.+ roleArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportJournalToS3' 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:+--+-- 'outputFormat', 'exportJournalToS3_outputFormat' - The output format of your exported journal data. If this parameter is+-- not specified, the exported data defaults to @ION_TEXT@ format.+--+-- 'name', 'exportJournalToS3_name' - The name of the ledger.+--+-- 'inclusiveStartTime', 'exportJournalToS3_inclusiveStartTime' - The inclusive start date and time for the range of journal contents to+-- export.+--+-- The @InclusiveStartTime@ must be in @ISO 8601@ date and time format and+-- in Universal Coordinated Time (UTC). For example:+-- @2019-06-13T21:36:34Z@.+--+-- The @InclusiveStartTime@ must be before @ExclusiveEndTime@.+--+-- If you provide an @InclusiveStartTime@ that is before the ledger\'s+-- @CreationDateTime@, Amazon QLDB defaults it to the ledger\'s+-- @CreationDateTime@.+--+-- 'exclusiveEndTime', 'exportJournalToS3_exclusiveEndTime' - The exclusive end date and time for the range of journal contents to+-- export.+--+-- The @ExclusiveEndTime@ must be in @ISO 8601@ date and time format and in+-- Universal Coordinated Time (UTC). For example: @2019-06-13T21:36:34Z@.+--+-- The @ExclusiveEndTime@ must be less than or equal to the current UTC+-- date and time.+--+-- 's3ExportConfiguration', 'exportJournalToS3_s3ExportConfiguration' - The configuration settings of the Amazon S3 bucket destination for your+-- export request.+--+-- 'roleArn', 'exportJournalToS3_roleArn' - The Amazon Resource Name (ARN) of the IAM role that grants QLDB+-- permissions for a journal export job to do the following:+--+-- - Write objects into your Amazon Simple Storage Service (Amazon S3)+-- bucket.+--+-- - (Optional) Use your customer managed key in Key Management Service+-- (KMS) for server-side encryption of your exported data.+--+-- To pass a role to QLDB when requesting a journal export, you must have+-- permissions to perform the @iam:PassRole@ action on the IAM role+-- resource. This is required for all journal export requests.+newExportJournalToS3 ::+ -- | 'name'+ Prelude.Text ->+ -- | 'inclusiveStartTime'+ Prelude.UTCTime ->+ -- | 'exclusiveEndTime'+ Prelude.UTCTime ->+ -- | 's3ExportConfiguration'+ S3ExportConfiguration ->+ -- | 'roleArn'+ Prelude.Text ->+ ExportJournalToS3+newExportJournalToS3+ pName_+ pInclusiveStartTime_+ pExclusiveEndTime_+ pS3ExportConfiguration_+ pRoleArn_ =+ ExportJournalToS3'+ { outputFormat = Prelude.Nothing,+ name = pName_,+ inclusiveStartTime =+ Data._Time Lens.# pInclusiveStartTime_,+ exclusiveEndTime =+ Data._Time Lens.# pExclusiveEndTime_,+ s3ExportConfiguration = pS3ExportConfiguration_,+ roleArn = pRoleArn_+ }++-- | The output format of your exported journal data. If this parameter is+-- not specified, the exported data defaults to @ION_TEXT@ format.+exportJournalToS3_outputFormat :: Lens.Lens' ExportJournalToS3 (Prelude.Maybe OutputFormat)+exportJournalToS3_outputFormat = Lens.lens (\ExportJournalToS3' {outputFormat} -> outputFormat) (\s@ExportJournalToS3' {} a -> s {outputFormat = a} :: ExportJournalToS3)++-- | The name of the ledger.+exportJournalToS3_name :: Lens.Lens' ExportJournalToS3 Prelude.Text+exportJournalToS3_name = Lens.lens (\ExportJournalToS3' {name} -> name) (\s@ExportJournalToS3' {} a -> s {name = a} :: ExportJournalToS3)++-- | The inclusive start date and time for the range of journal contents to+-- export.+--+-- The @InclusiveStartTime@ must be in @ISO 8601@ date and time format and+-- in Universal Coordinated Time (UTC). For example:+-- @2019-06-13T21:36:34Z@.+--+-- The @InclusiveStartTime@ must be before @ExclusiveEndTime@.+--+-- If you provide an @InclusiveStartTime@ that is before the ledger\'s+-- @CreationDateTime@, Amazon QLDB defaults it to the ledger\'s+-- @CreationDateTime@.+exportJournalToS3_inclusiveStartTime :: Lens.Lens' ExportJournalToS3 Prelude.UTCTime+exportJournalToS3_inclusiveStartTime = Lens.lens (\ExportJournalToS3' {inclusiveStartTime} -> inclusiveStartTime) (\s@ExportJournalToS3' {} a -> s {inclusiveStartTime = a} :: ExportJournalToS3) Prelude.. Data._Time++-- | The exclusive end date and time for the range of journal contents to+-- export.+--+-- The @ExclusiveEndTime@ must be in @ISO 8601@ date and time format and in+-- Universal Coordinated Time (UTC). For example: @2019-06-13T21:36:34Z@.+--+-- The @ExclusiveEndTime@ must be less than or equal to the current UTC+-- date and time.+exportJournalToS3_exclusiveEndTime :: Lens.Lens' ExportJournalToS3 Prelude.UTCTime+exportJournalToS3_exclusiveEndTime = Lens.lens (\ExportJournalToS3' {exclusiveEndTime} -> exclusiveEndTime) (\s@ExportJournalToS3' {} a -> s {exclusiveEndTime = a} :: ExportJournalToS3) Prelude.. Data._Time++-- | The configuration settings of the Amazon S3 bucket destination for your+-- export request.+exportJournalToS3_s3ExportConfiguration :: Lens.Lens' ExportJournalToS3 S3ExportConfiguration+exportJournalToS3_s3ExportConfiguration = Lens.lens (\ExportJournalToS3' {s3ExportConfiguration} -> s3ExportConfiguration) (\s@ExportJournalToS3' {} a -> s {s3ExportConfiguration = a} :: ExportJournalToS3)++-- | The Amazon Resource Name (ARN) of the IAM role that grants QLDB+-- permissions for a journal export job to do the following:+--+-- - Write objects into your Amazon Simple Storage Service (Amazon S3)+-- bucket.+--+-- - (Optional) Use your customer managed key in Key Management Service+-- (KMS) for server-side encryption of your exported data.+--+-- To pass a role to QLDB when requesting a journal export, you must have+-- permissions to perform the @iam:PassRole@ action on the IAM role+-- resource. This is required for all journal export requests.+exportJournalToS3_roleArn :: Lens.Lens' ExportJournalToS3 Prelude.Text+exportJournalToS3_roleArn = Lens.lens (\ExportJournalToS3' {roleArn} -> roleArn) (\s@ExportJournalToS3' {} a -> s {roleArn = a} :: ExportJournalToS3)++instance Core.AWSRequest ExportJournalToS3 where+ type+ AWSResponse ExportJournalToS3 =+ ExportJournalToS3Response+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ExportJournalToS3Response'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "ExportId")+ )++instance Prelude.Hashable ExportJournalToS3 where+ hashWithSalt _salt ExportJournalToS3' {..} =+ _salt+ `Prelude.hashWithSalt` outputFormat+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` inclusiveStartTime+ `Prelude.hashWithSalt` exclusiveEndTime+ `Prelude.hashWithSalt` s3ExportConfiguration+ `Prelude.hashWithSalt` roleArn++instance Prelude.NFData ExportJournalToS3 where+ rnf ExportJournalToS3' {..} =+ Prelude.rnf outputFormat+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf inclusiveStartTime+ `Prelude.seq` Prelude.rnf exclusiveEndTime+ `Prelude.seq` Prelude.rnf s3ExportConfiguration+ `Prelude.seq` Prelude.rnf roleArn++instance Data.ToHeaders ExportJournalToS3 where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ExportJournalToS3 where+ toJSON ExportJournalToS3' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("OutputFormat" Data..=) Prelude.<$> outputFormat,+ Prelude.Just+ ("InclusiveStartTime" Data..= inclusiveStartTime),+ Prelude.Just+ ("ExclusiveEndTime" Data..= exclusiveEndTime),+ Prelude.Just+ ( "S3ExportConfiguration"+ Data..= s3ExportConfiguration+ ),+ Prelude.Just ("RoleArn" Data..= roleArn)+ ]+ )++instance Data.ToPath ExportJournalToS3 where+ toPath ExportJournalToS3' {..} =+ Prelude.mconcat+ ["/ledgers/", Data.toBS name, "/journal-s3-exports"]++instance Data.ToQuery ExportJournalToS3 where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newExportJournalToS3Response' smart constructor.+data ExportJournalToS3Response = ExportJournalToS3Response'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The UUID (represented in Base62-encoded text) that QLDB assigns to each+ -- journal export job.+ --+ -- To describe your export request and check the status of the job, you can+ -- use @ExportId@ to call @DescribeJournalS3Export@.+ exportId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportJournalToS3Response' 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', 'exportJournalToS3Response_httpStatus' - The response's http status code.+--+-- 'exportId', 'exportJournalToS3Response_exportId' - The UUID (represented in Base62-encoded text) that QLDB assigns to each+-- journal export job.+--+-- To describe your export request and check the status of the job, you can+-- use @ExportId@ to call @DescribeJournalS3Export@.+newExportJournalToS3Response ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'exportId'+ Prelude.Text ->+ ExportJournalToS3Response+newExportJournalToS3Response pHttpStatus_ pExportId_ =+ ExportJournalToS3Response'+ { httpStatus =+ pHttpStatus_,+ exportId = pExportId_+ }++-- | The response's http status code.+exportJournalToS3Response_httpStatus :: Lens.Lens' ExportJournalToS3Response Prelude.Int+exportJournalToS3Response_httpStatus = Lens.lens (\ExportJournalToS3Response' {httpStatus} -> httpStatus) (\s@ExportJournalToS3Response' {} a -> s {httpStatus = a} :: ExportJournalToS3Response)++-- | The UUID (represented in Base62-encoded text) that QLDB assigns to each+-- journal export job.+--+-- To describe your export request and check the status of the job, you can+-- use @ExportId@ to call @DescribeJournalS3Export@.+exportJournalToS3Response_exportId :: Lens.Lens' ExportJournalToS3Response Prelude.Text+exportJournalToS3Response_exportId = Lens.lens (\ExportJournalToS3Response' {exportId} -> exportId) (\s@ExportJournalToS3Response' {} a -> s {exportId = a} :: ExportJournalToS3Response)++instance Prelude.NFData ExportJournalToS3Response where+ rnf ExportJournalToS3Response' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf exportId
+ gen/Amazonka/QLDB/GetBlock.hs view
@@ -0,0 +1,252 @@+{-# 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.QLDB.GetBlock+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a block object at a specified address in a journal. Also returns+-- a proof of the specified block for verification if @DigestTipAddress@ is+-- provided.+--+-- For information about the data contents in a block, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/journal-contents.html Journal contents>+-- in the /Amazon QLDB Developer Guide/.+--+-- If the specified ledger doesn\'t exist or is in @DELETING@ status, then+-- throws @ResourceNotFoundException@.+--+-- If the specified ledger is in @CREATING@ status, then throws+-- @ResourcePreconditionNotMetException@.+--+-- If no block exists with the specified address, then throws+-- @InvalidParameterException@.+module Amazonka.QLDB.GetBlock+ ( -- * Creating a Request+ GetBlock (..),+ newGetBlock,++ -- * Request Lenses+ getBlock_digestTipAddress,+ getBlock_name,+ getBlock_blockAddress,++ -- * Destructuring the Response+ GetBlockResponse (..),+ newGetBlockResponse,++ -- * Response Lenses+ getBlockResponse_proof,+ getBlockResponse_httpStatus,+ getBlockResponse_block,+ )+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.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetBlock' smart constructor.+data GetBlock = GetBlock'+ { -- | The latest block location covered by the digest for which to request a+ -- proof. An address is an Amazon Ion structure that has two fields:+ -- @strandId@ and @sequenceNo@.+ --+ -- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:49}@.+ digestTipAddress :: Prelude.Maybe (Data.Sensitive ValueHolder),+ -- | The name of the ledger.+ name :: Prelude.Text,+ -- | The location of the block that you want to request. An address is an+ -- Amazon Ion structure that has two fields: @strandId@ and @sequenceNo@.+ --+ -- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:14}@.+ blockAddress :: Data.Sensitive ValueHolder+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBlock' 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:+--+-- 'digestTipAddress', 'getBlock_digestTipAddress' - The latest block location covered by the digest for which to request a+-- proof. An address is an Amazon Ion structure that has two fields:+-- @strandId@ and @sequenceNo@.+--+-- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:49}@.+--+-- 'name', 'getBlock_name' - The name of the ledger.+--+-- 'blockAddress', 'getBlock_blockAddress' - The location of the block that you want to request. An address is an+-- Amazon Ion structure that has two fields: @strandId@ and @sequenceNo@.+--+-- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:14}@.+newGetBlock ::+ -- | 'name'+ Prelude.Text ->+ -- | 'blockAddress'+ ValueHolder ->+ GetBlock+newGetBlock pName_ pBlockAddress_ =+ GetBlock'+ { digestTipAddress = Prelude.Nothing,+ name = pName_,+ blockAddress = Data._Sensitive Lens.# pBlockAddress_+ }++-- | The latest block location covered by the digest for which to request a+-- proof. An address is an Amazon Ion structure that has two fields:+-- @strandId@ and @sequenceNo@.+--+-- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:49}@.+getBlock_digestTipAddress :: Lens.Lens' GetBlock (Prelude.Maybe ValueHolder)+getBlock_digestTipAddress = Lens.lens (\GetBlock' {digestTipAddress} -> digestTipAddress) (\s@GetBlock' {} a -> s {digestTipAddress = a} :: GetBlock) Prelude.. Lens.mapping Data._Sensitive++-- | The name of the ledger.+getBlock_name :: Lens.Lens' GetBlock Prelude.Text+getBlock_name = Lens.lens (\GetBlock' {name} -> name) (\s@GetBlock' {} a -> s {name = a} :: GetBlock)++-- | The location of the block that you want to request. An address is an+-- Amazon Ion structure that has two fields: @strandId@ and @sequenceNo@.+--+-- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:14}@.+getBlock_blockAddress :: Lens.Lens' GetBlock ValueHolder+getBlock_blockAddress = Lens.lens (\GetBlock' {blockAddress} -> blockAddress) (\s@GetBlock' {} a -> s {blockAddress = a} :: GetBlock) Prelude.. Data._Sensitive++instance Core.AWSRequest GetBlock where+ type AWSResponse GetBlock = GetBlockResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetBlockResponse'+ Prelude.<$> (x Data..?> "Proof")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "Block")+ )++instance Prelude.Hashable GetBlock where+ hashWithSalt _salt GetBlock' {..} =+ _salt+ `Prelude.hashWithSalt` digestTipAddress+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` blockAddress++instance Prelude.NFData GetBlock where+ rnf GetBlock' {..} =+ Prelude.rnf digestTipAddress+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf blockAddress++instance Data.ToHeaders GetBlock where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetBlock where+ toJSON GetBlock' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DigestTipAddress" Data..=)+ Prelude.<$> digestTipAddress,+ Prelude.Just ("BlockAddress" Data..= blockAddress)+ ]+ )++instance Data.ToPath GetBlock where+ toPath GetBlock' {..} =+ Prelude.mconcat+ ["/ledgers/", Data.toBS name, "/block"]++instance Data.ToQuery GetBlock where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetBlockResponse' smart constructor.+data GetBlockResponse = GetBlockResponse'+ { -- | The proof object in Amazon Ion format returned by a @GetBlock@ request.+ -- A proof contains the list of hash values required to recalculate the+ -- specified digest using a Merkle tree, starting with the specified block.+ proof :: Prelude.Maybe (Data.Sensitive ValueHolder),+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The block data object in Amazon Ion format.+ block :: Data.Sensitive ValueHolder+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBlockResponse' 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:+--+-- 'proof', 'getBlockResponse_proof' - The proof object in Amazon Ion format returned by a @GetBlock@ request.+-- A proof contains the list of hash values required to recalculate the+-- specified digest using a Merkle tree, starting with the specified block.+--+-- 'httpStatus', 'getBlockResponse_httpStatus' - The response's http status code.+--+-- 'block', 'getBlockResponse_block' - The block data object in Amazon Ion format.+newGetBlockResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'block'+ ValueHolder ->+ GetBlockResponse+newGetBlockResponse pHttpStatus_ pBlock_ =+ GetBlockResponse'+ { proof = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ block = Data._Sensitive Lens.# pBlock_+ }++-- | The proof object in Amazon Ion format returned by a @GetBlock@ request.+-- A proof contains the list of hash values required to recalculate the+-- specified digest using a Merkle tree, starting with the specified block.+getBlockResponse_proof :: Lens.Lens' GetBlockResponse (Prelude.Maybe ValueHolder)+getBlockResponse_proof = Lens.lens (\GetBlockResponse' {proof} -> proof) (\s@GetBlockResponse' {} a -> s {proof = a} :: GetBlockResponse) Prelude.. Lens.mapping Data._Sensitive++-- | The response's http status code.+getBlockResponse_httpStatus :: Lens.Lens' GetBlockResponse Prelude.Int+getBlockResponse_httpStatus = Lens.lens (\GetBlockResponse' {httpStatus} -> httpStatus) (\s@GetBlockResponse' {} a -> s {httpStatus = a} :: GetBlockResponse)++-- | The block data object in Amazon Ion format.+getBlockResponse_block :: Lens.Lens' GetBlockResponse ValueHolder+getBlockResponse_block = Lens.lens (\GetBlockResponse' {block} -> block) (\s@GetBlockResponse' {} a -> s {block = a} :: GetBlockResponse) Prelude.. Data._Sensitive++instance Prelude.NFData GetBlockResponse where+ rnf GetBlockResponse' {..} =+ Prelude.rnf proof+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf block
+ gen/Amazonka/QLDB/GetDigest.hs view
@@ -0,0 +1,196 @@+{-# 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.QLDB.GetDigest+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the digest of a ledger at the latest committed block in the+-- journal. The response includes a 256-bit hash value and a block address.+module Amazonka.QLDB.GetDigest+ ( -- * Creating a Request+ GetDigest (..),+ newGetDigest,++ -- * Request Lenses+ getDigest_name,++ -- * Destructuring the Response+ GetDigestResponse (..),+ newGetDigestResponse,++ -- * Response Lenses+ getDigestResponse_httpStatus,+ getDigestResponse_digest,+ getDigestResponse_digestTipAddress,+ )+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.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetDigest' smart constructor.+data GetDigest = GetDigest'+ { -- | The name of the ledger.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetDigest' 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', 'getDigest_name' - The name of the ledger.+newGetDigest ::+ -- | 'name'+ Prelude.Text ->+ GetDigest+newGetDigest pName_ = GetDigest' {name = pName_}++-- | The name of the ledger.+getDigest_name :: Lens.Lens' GetDigest Prelude.Text+getDigest_name = Lens.lens (\GetDigest' {name} -> name) (\s@GetDigest' {} a -> s {name = a} :: GetDigest)++instance Core.AWSRequest GetDigest where+ type AWSResponse GetDigest = GetDigestResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetDigestResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "Digest")+ Prelude.<*> (x Data..:> "DigestTipAddress")+ )++instance Prelude.Hashable GetDigest where+ hashWithSalt _salt GetDigest' {..} =+ _salt `Prelude.hashWithSalt` name++instance Prelude.NFData GetDigest where+ rnf GetDigest' {..} = Prelude.rnf name++instance Data.ToHeaders GetDigest where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetDigest where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath GetDigest where+ toPath GetDigest' {..} =+ Prelude.mconcat+ ["/ledgers/", Data.toBS name, "/digest"]++instance Data.ToQuery GetDigest where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetDigestResponse' smart constructor.+data GetDigestResponse = GetDigestResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The 256-bit hash value representing the digest returned by a @GetDigest@+ -- request.+ digest :: Data.Base64,+ -- | The latest block location covered by the digest that you requested. An+ -- address is an Amazon Ion structure that has two fields: @strandId@ and+ -- @sequenceNo@.+ digestTipAddress :: Data.Sensitive ValueHolder+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetDigestResponse' 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', 'getDigestResponse_httpStatus' - The response's http status code.+--+-- 'digest', 'getDigestResponse_digest' - The 256-bit hash value representing the digest returned by a @GetDigest@+-- request.--+-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.+-- -- The underlying isomorphism will encode to Base64 representation during+-- -- serialisation, and decode from Base64 representation during deserialisation.+-- -- This 'Lens' accepts and returns only raw unencoded data.+--+-- 'digestTipAddress', 'getDigestResponse_digestTipAddress' - The latest block location covered by the digest that you requested. An+-- address is an Amazon Ion structure that has two fields: @strandId@ and+-- @sequenceNo@.+newGetDigestResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'digest'+ Prelude.ByteString ->+ -- | 'digestTipAddress'+ ValueHolder ->+ GetDigestResponse+newGetDigestResponse+ pHttpStatus_+ pDigest_+ pDigestTipAddress_ =+ GetDigestResponse'+ { httpStatus = pHttpStatus_,+ digest = Data._Base64 Lens.# pDigest_,+ digestTipAddress =+ Data._Sensitive Lens.# pDigestTipAddress_+ }++-- | The response's http status code.+getDigestResponse_httpStatus :: Lens.Lens' GetDigestResponse Prelude.Int+getDigestResponse_httpStatus = Lens.lens (\GetDigestResponse' {httpStatus} -> httpStatus) (\s@GetDigestResponse' {} a -> s {httpStatus = a} :: GetDigestResponse)++-- | The 256-bit hash value representing the digest returned by a @GetDigest@+-- request.--+-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.+-- -- The underlying isomorphism will encode to Base64 representation during+-- -- serialisation, and decode from Base64 representation during deserialisation.+-- -- This 'Lens' accepts and returns only raw unencoded data.+getDigestResponse_digest :: Lens.Lens' GetDigestResponse Prelude.ByteString+getDigestResponse_digest = Lens.lens (\GetDigestResponse' {digest} -> digest) (\s@GetDigestResponse' {} a -> s {digest = a} :: GetDigestResponse) Prelude.. Data._Base64++-- | The latest block location covered by the digest that you requested. An+-- address is an Amazon Ion structure that has two fields: @strandId@ and+-- @sequenceNo@.+getDigestResponse_digestTipAddress :: Lens.Lens' GetDigestResponse ValueHolder+getDigestResponse_digestTipAddress = Lens.lens (\GetDigestResponse' {digestTipAddress} -> digestTipAddress) (\s@GetDigestResponse' {} a -> s {digestTipAddress = a} :: GetDigestResponse) Prelude.. Data._Sensitive++instance Prelude.NFData GetDigestResponse where+ rnf GetDigestResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf digest+ `Prelude.seq` Prelude.rnf digestTipAddress
+ gen/Amazonka/QLDB/GetRevision.hs view
@@ -0,0 +1,263 @@+{-# 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.QLDB.GetRevision+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a revision data object for a specified document ID and block+-- address. Also returns a proof of the specified revision for verification+-- if @DigestTipAddress@ is provided.+module Amazonka.QLDB.GetRevision+ ( -- * Creating a Request+ GetRevision (..),+ newGetRevision,++ -- * Request Lenses+ getRevision_digestTipAddress,+ getRevision_name,+ getRevision_blockAddress,+ getRevision_documentId,++ -- * Destructuring the Response+ GetRevisionResponse (..),+ newGetRevisionResponse,++ -- * Response Lenses+ getRevisionResponse_proof,+ getRevisionResponse_httpStatus,+ getRevisionResponse_revision,+ )+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.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetRevision' smart constructor.+data GetRevision = GetRevision'+ { -- | The latest block location covered by the digest for which to request a+ -- proof. An address is an Amazon Ion structure that has two fields:+ -- @strandId@ and @sequenceNo@.+ --+ -- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:49}@.+ digestTipAddress :: Prelude.Maybe (Data.Sensitive ValueHolder),+ -- | The name of the ledger.+ name :: Prelude.Text,+ -- | The block location of the document revision to be verified. An address+ -- is an Amazon Ion structure that has two fields: @strandId@ and+ -- @sequenceNo@.+ --+ -- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:14}@.+ blockAddress :: Data.Sensitive ValueHolder,+ -- | The UUID (represented in Base62-encoded text) of the document to be+ -- verified.+ documentId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRevision' 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:+--+-- 'digestTipAddress', 'getRevision_digestTipAddress' - The latest block location covered by the digest for which to request a+-- proof. An address is an Amazon Ion structure that has two fields:+-- @strandId@ and @sequenceNo@.+--+-- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:49}@.+--+-- 'name', 'getRevision_name' - The name of the ledger.+--+-- 'blockAddress', 'getRevision_blockAddress' - The block location of the document revision to be verified. An address+-- is an Amazon Ion structure that has two fields: @strandId@ and+-- @sequenceNo@.+--+-- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:14}@.+--+-- 'documentId', 'getRevision_documentId' - The UUID (represented in Base62-encoded text) of the document to be+-- verified.+newGetRevision ::+ -- | 'name'+ Prelude.Text ->+ -- | 'blockAddress'+ ValueHolder ->+ -- | 'documentId'+ Prelude.Text ->+ GetRevision+newGetRevision pName_ pBlockAddress_ pDocumentId_ =+ GetRevision'+ { digestTipAddress = Prelude.Nothing,+ name = pName_,+ blockAddress = Data._Sensitive Lens.# pBlockAddress_,+ documentId = pDocumentId_+ }++-- | The latest block location covered by the digest for which to request a+-- proof. An address is an Amazon Ion structure that has two fields:+-- @strandId@ and @sequenceNo@.+--+-- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:49}@.+getRevision_digestTipAddress :: Lens.Lens' GetRevision (Prelude.Maybe ValueHolder)+getRevision_digestTipAddress = Lens.lens (\GetRevision' {digestTipAddress} -> digestTipAddress) (\s@GetRevision' {} a -> s {digestTipAddress = a} :: GetRevision) Prelude.. Lens.mapping Data._Sensitive++-- | The name of the ledger.+getRevision_name :: Lens.Lens' GetRevision Prelude.Text+getRevision_name = Lens.lens (\GetRevision' {name} -> name) (\s@GetRevision' {} a -> s {name = a} :: GetRevision)++-- | The block location of the document revision to be verified. An address+-- is an Amazon Ion structure that has two fields: @strandId@ and+-- @sequenceNo@.+--+-- For example: @{strandId:\"BlFTjlSXze9BIh1KOszcE3\",sequenceNo:14}@.+getRevision_blockAddress :: Lens.Lens' GetRevision ValueHolder+getRevision_blockAddress = Lens.lens (\GetRevision' {blockAddress} -> blockAddress) (\s@GetRevision' {} a -> s {blockAddress = a} :: GetRevision) Prelude.. Data._Sensitive++-- | The UUID (represented in Base62-encoded text) of the document to be+-- verified.+getRevision_documentId :: Lens.Lens' GetRevision Prelude.Text+getRevision_documentId = Lens.lens (\GetRevision' {documentId} -> documentId) (\s@GetRevision' {} a -> s {documentId = a} :: GetRevision)++instance Core.AWSRequest GetRevision where+ type AWSResponse GetRevision = GetRevisionResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetRevisionResponse'+ Prelude.<$> (x Data..?> "Proof")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "Revision")+ )++instance Prelude.Hashable GetRevision where+ hashWithSalt _salt GetRevision' {..} =+ _salt+ `Prelude.hashWithSalt` digestTipAddress+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` blockAddress+ `Prelude.hashWithSalt` documentId++instance Prelude.NFData GetRevision where+ rnf GetRevision' {..} =+ Prelude.rnf digestTipAddress+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf blockAddress+ `Prelude.seq` Prelude.rnf documentId++instance Data.ToHeaders GetRevision where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetRevision where+ toJSON GetRevision' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DigestTipAddress" Data..=)+ Prelude.<$> digestTipAddress,+ Prelude.Just ("BlockAddress" Data..= blockAddress),+ Prelude.Just ("DocumentId" Data..= documentId)+ ]+ )++instance Data.ToPath GetRevision where+ toPath GetRevision' {..} =+ Prelude.mconcat+ ["/ledgers/", Data.toBS name, "/revision"]++instance Data.ToQuery GetRevision where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetRevisionResponse' smart constructor.+data GetRevisionResponse = GetRevisionResponse'+ { -- | The proof object in Amazon Ion format returned by a @GetRevision@+ -- request. A proof contains the list of hash values that are required to+ -- recalculate the specified digest using a Merkle tree, starting with the+ -- specified document revision.+ proof :: Prelude.Maybe (Data.Sensitive ValueHolder),+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The document revision data object in Amazon Ion format.+ revision :: Data.Sensitive ValueHolder+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRevisionResponse' 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:+--+-- 'proof', 'getRevisionResponse_proof' - The proof object in Amazon Ion format returned by a @GetRevision@+-- request. A proof contains the list of hash values that are required to+-- recalculate the specified digest using a Merkle tree, starting with the+-- specified document revision.+--+-- 'httpStatus', 'getRevisionResponse_httpStatus' - The response's http status code.+--+-- 'revision', 'getRevisionResponse_revision' - The document revision data object in Amazon Ion format.+newGetRevisionResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'revision'+ ValueHolder ->+ GetRevisionResponse+newGetRevisionResponse pHttpStatus_ pRevision_ =+ GetRevisionResponse'+ { proof = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ revision = Data._Sensitive Lens.# pRevision_+ }++-- | The proof object in Amazon Ion format returned by a @GetRevision@+-- request. A proof contains the list of hash values that are required to+-- recalculate the specified digest using a Merkle tree, starting with the+-- specified document revision.+getRevisionResponse_proof :: Lens.Lens' GetRevisionResponse (Prelude.Maybe ValueHolder)+getRevisionResponse_proof = Lens.lens (\GetRevisionResponse' {proof} -> proof) (\s@GetRevisionResponse' {} a -> s {proof = a} :: GetRevisionResponse) Prelude.. Lens.mapping Data._Sensitive++-- | The response's http status code.+getRevisionResponse_httpStatus :: Lens.Lens' GetRevisionResponse Prelude.Int+getRevisionResponse_httpStatus = Lens.lens (\GetRevisionResponse' {httpStatus} -> httpStatus) (\s@GetRevisionResponse' {} a -> s {httpStatus = a} :: GetRevisionResponse)++-- | The document revision data object in Amazon Ion format.+getRevisionResponse_revision :: Lens.Lens' GetRevisionResponse ValueHolder+getRevisionResponse_revision = Lens.lens (\GetRevisionResponse' {revision} -> revision) (\s@GetRevisionResponse' {} a -> s {revision = a} :: GetRevisionResponse) Prelude.. Data._Sensitive++instance Prelude.NFData GetRevisionResponse where+ rnf GetRevisionResponse' {..} =+ Prelude.rnf proof+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf revision
+ gen/Amazonka/QLDB/Lens.hs view
@@ -0,0 +1,254 @@+{-# 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.QLDB.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.QLDB.Lens+ ( -- * Operations++ -- ** CancelJournalKinesisStream+ cancelJournalKinesisStream_ledgerName,+ cancelJournalKinesisStream_streamId,+ cancelJournalKinesisStreamResponse_streamId,+ cancelJournalKinesisStreamResponse_httpStatus,++ -- ** CreateLedger+ createLedger_deletionProtection,+ createLedger_kmsKey,+ createLedger_tags,+ createLedger_name,+ createLedger_permissionsMode,+ createLedgerResponse_arn,+ createLedgerResponse_creationDateTime,+ createLedgerResponse_deletionProtection,+ createLedgerResponse_kmsKeyArn,+ createLedgerResponse_name,+ createLedgerResponse_permissionsMode,+ createLedgerResponse_state,+ createLedgerResponse_httpStatus,++ -- ** DeleteLedger+ deleteLedger_name,++ -- ** DescribeJournalKinesisStream+ describeJournalKinesisStream_ledgerName,+ describeJournalKinesisStream_streamId,+ describeJournalKinesisStreamResponse_stream,+ describeJournalKinesisStreamResponse_httpStatus,++ -- ** DescribeJournalS3Export+ describeJournalS3Export_name,+ describeJournalS3Export_exportId,+ describeJournalS3ExportResponse_httpStatus,+ describeJournalS3ExportResponse_exportDescription,++ -- ** DescribeLedger+ describeLedger_name,+ describeLedgerResponse_arn,+ describeLedgerResponse_creationDateTime,+ describeLedgerResponse_deletionProtection,+ describeLedgerResponse_encryptionDescription,+ describeLedgerResponse_name,+ describeLedgerResponse_permissionsMode,+ describeLedgerResponse_state,+ describeLedgerResponse_httpStatus,++ -- ** ExportJournalToS3+ exportJournalToS3_outputFormat,+ exportJournalToS3_name,+ exportJournalToS3_inclusiveStartTime,+ exportJournalToS3_exclusiveEndTime,+ exportJournalToS3_s3ExportConfiguration,+ exportJournalToS3_roleArn,+ exportJournalToS3Response_httpStatus,+ exportJournalToS3Response_exportId,++ -- ** GetBlock+ getBlock_digestTipAddress,+ getBlock_name,+ getBlock_blockAddress,+ getBlockResponse_proof,+ getBlockResponse_httpStatus,+ getBlockResponse_block,++ -- ** GetDigest+ getDigest_name,+ getDigestResponse_httpStatus,+ getDigestResponse_digest,+ getDigestResponse_digestTipAddress,++ -- ** GetRevision+ getRevision_digestTipAddress,+ getRevision_name,+ getRevision_blockAddress,+ getRevision_documentId,+ getRevisionResponse_proof,+ getRevisionResponse_httpStatus,+ getRevisionResponse_revision,++ -- ** ListJournalKinesisStreamsForLedger+ listJournalKinesisStreamsForLedger_maxResults,+ listJournalKinesisStreamsForLedger_nextToken,+ listJournalKinesisStreamsForLedger_ledgerName,+ listJournalKinesisStreamsForLedgerResponse_nextToken,+ listJournalKinesisStreamsForLedgerResponse_streams,+ listJournalKinesisStreamsForLedgerResponse_httpStatus,++ -- ** ListJournalS3Exports+ listJournalS3Exports_maxResults,+ listJournalS3Exports_nextToken,+ listJournalS3ExportsResponse_journalS3Exports,+ listJournalS3ExportsResponse_nextToken,+ listJournalS3ExportsResponse_httpStatus,++ -- ** ListJournalS3ExportsForLedger+ listJournalS3ExportsForLedger_maxResults,+ listJournalS3ExportsForLedger_nextToken,+ listJournalS3ExportsForLedger_name,+ listJournalS3ExportsForLedgerResponse_journalS3Exports,+ listJournalS3ExportsForLedgerResponse_nextToken,+ listJournalS3ExportsForLedgerResponse_httpStatus,++ -- ** ListLedgers+ listLedgers_maxResults,+ listLedgers_nextToken,+ listLedgersResponse_ledgers,+ listLedgersResponse_nextToken,+ listLedgersResponse_httpStatus,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,++ -- ** StreamJournalToKinesis+ streamJournalToKinesis_exclusiveEndTime,+ streamJournalToKinesis_tags,+ streamJournalToKinesis_ledgerName,+ streamJournalToKinesis_roleArn,+ streamJournalToKinesis_inclusiveStartTime,+ streamJournalToKinesis_kinesisConfiguration,+ streamJournalToKinesis_streamName,+ streamJournalToKinesisResponse_streamId,+ streamJournalToKinesisResponse_httpStatus,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdateLedger+ updateLedger_deletionProtection,+ updateLedger_kmsKey,+ updateLedger_name,+ updateLedgerResponse_arn,+ updateLedgerResponse_creationDateTime,+ updateLedgerResponse_deletionProtection,+ updateLedgerResponse_encryptionDescription,+ updateLedgerResponse_name,+ updateLedgerResponse_state,+ updateLedgerResponse_httpStatus,++ -- ** UpdateLedgerPermissionsMode+ updateLedgerPermissionsMode_name,+ updateLedgerPermissionsMode_permissionsMode,+ updateLedgerPermissionsModeResponse_arn,+ updateLedgerPermissionsModeResponse_name,+ updateLedgerPermissionsModeResponse_permissionsMode,+ updateLedgerPermissionsModeResponse_httpStatus,++ -- * Types++ -- ** JournalKinesisStreamDescription+ journalKinesisStreamDescription_arn,+ journalKinesisStreamDescription_creationTime,+ journalKinesisStreamDescription_errorCause,+ journalKinesisStreamDescription_exclusiveEndTime,+ journalKinesisStreamDescription_inclusiveStartTime,+ journalKinesisStreamDescription_ledgerName,+ journalKinesisStreamDescription_roleArn,+ journalKinesisStreamDescription_streamId,+ journalKinesisStreamDescription_status,+ journalKinesisStreamDescription_kinesisConfiguration,+ journalKinesisStreamDescription_streamName,++ -- ** JournalS3ExportDescription+ journalS3ExportDescription_outputFormat,+ journalS3ExportDescription_ledgerName,+ journalS3ExportDescription_exportId,+ journalS3ExportDescription_exportCreationTime,+ journalS3ExportDescription_status,+ journalS3ExportDescription_inclusiveStartTime,+ journalS3ExportDescription_exclusiveEndTime,+ journalS3ExportDescription_s3ExportConfiguration,+ journalS3ExportDescription_roleArn,++ -- ** KinesisConfiguration+ kinesisConfiguration_aggregationEnabled,+ kinesisConfiguration_streamArn,++ -- ** LedgerEncryptionDescription+ ledgerEncryptionDescription_inaccessibleKmsKeyDateTime,+ ledgerEncryptionDescription_kmsKeyArn,+ ledgerEncryptionDescription_encryptionStatus,++ -- ** LedgerSummary+ ledgerSummary_creationDateTime,+ ledgerSummary_name,+ ledgerSummary_state,++ -- ** S3EncryptionConfiguration+ s3EncryptionConfiguration_kmsKeyArn,+ s3EncryptionConfiguration_objectEncryptionType,++ -- ** S3ExportConfiguration+ s3ExportConfiguration_bucket,+ s3ExportConfiguration_prefix,+ s3ExportConfiguration_encryptionConfiguration,++ -- ** ValueHolder+ valueHolder_ionText,+ )+where++import Amazonka.QLDB.CancelJournalKinesisStream+import Amazonka.QLDB.CreateLedger+import Amazonka.QLDB.DeleteLedger+import Amazonka.QLDB.DescribeJournalKinesisStream+import Amazonka.QLDB.DescribeJournalS3Export+import Amazonka.QLDB.DescribeLedger+import Amazonka.QLDB.ExportJournalToS3+import Amazonka.QLDB.GetBlock+import Amazonka.QLDB.GetDigest+import Amazonka.QLDB.GetRevision+import Amazonka.QLDB.ListJournalKinesisStreamsForLedger+import Amazonka.QLDB.ListJournalS3Exports+import Amazonka.QLDB.ListJournalS3ExportsForLedger+import Amazonka.QLDB.ListLedgers+import Amazonka.QLDB.ListTagsForResource+import Amazonka.QLDB.StreamJournalToKinesis+import Amazonka.QLDB.TagResource+import Amazonka.QLDB.Types.JournalKinesisStreamDescription+import Amazonka.QLDB.Types.JournalS3ExportDescription+import Amazonka.QLDB.Types.KinesisConfiguration+import Amazonka.QLDB.Types.LedgerEncryptionDescription+import Amazonka.QLDB.Types.LedgerSummary+import Amazonka.QLDB.Types.S3EncryptionConfiguration+import Amazonka.QLDB.Types.S3ExportConfiguration+import Amazonka.QLDB.Types.ValueHolder+import Amazonka.QLDB.UntagResource+import Amazonka.QLDB.UpdateLedger+import Amazonka.QLDB.UpdateLedgerPermissionsMode
+ gen/Amazonka/QLDB/ListJournalKinesisStreamsForLedger.hs view
@@ -0,0 +1,275 @@+{-# 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.QLDB.ListJournalKinesisStreamsForLedger+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an array of all Amazon QLDB journal stream descriptors for a+-- given ledger. The output of each stream descriptor includes the same+-- details that are returned by @DescribeJournalKinesisStream@.+--+-- This action does not return any expired journal streams. For more+-- information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/streams.create.html#streams.create.states.expiration Expiration for terminal streams>+-- in the /Amazon QLDB Developer Guide/.+--+-- This action returns a maximum of @MaxResults@ items. It is paginated so+-- that you can retrieve all the items by calling+-- @ListJournalKinesisStreamsForLedger@ multiple times.+module Amazonka.QLDB.ListJournalKinesisStreamsForLedger+ ( -- * Creating a Request+ ListJournalKinesisStreamsForLedger (..),+ newListJournalKinesisStreamsForLedger,++ -- * Request Lenses+ listJournalKinesisStreamsForLedger_maxResults,+ listJournalKinesisStreamsForLedger_nextToken,+ listJournalKinesisStreamsForLedger_ledgerName,++ -- * Destructuring the Response+ ListJournalKinesisStreamsForLedgerResponse (..),+ newListJournalKinesisStreamsForLedgerResponse,++ -- * Response Lenses+ listJournalKinesisStreamsForLedgerResponse_nextToken,+ listJournalKinesisStreamsForLedgerResponse_streams,+ listJournalKinesisStreamsForLedgerResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListJournalKinesisStreamsForLedger' smart constructor.+data ListJournalKinesisStreamsForLedger = ListJournalKinesisStreamsForLedger'+ { -- | The maximum number of results to return in a single+ -- @ListJournalKinesisStreamsForLedger@ request. (The actual number of+ -- results returned might be fewer.)+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A pagination token, indicating that you want to retrieve the next page+ -- of results. If you received a value for @NextToken@ in the response from+ -- a previous @ListJournalKinesisStreamsForLedger@ call, you should use+ -- that value as input here.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The name of the ledger.+ ledgerName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListJournalKinesisStreamsForLedger' 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', 'listJournalKinesisStreamsForLedger_maxResults' - The maximum number of results to return in a single+-- @ListJournalKinesisStreamsForLedger@ request. (The actual number of+-- results returned might be fewer.)+--+-- 'nextToken', 'listJournalKinesisStreamsForLedger_nextToken' - A pagination token, indicating that you want to retrieve the next page+-- of results. If you received a value for @NextToken@ in the response from+-- a previous @ListJournalKinesisStreamsForLedger@ call, you should use+-- that value as input here.+--+-- 'ledgerName', 'listJournalKinesisStreamsForLedger_ledgerName' - The name of the ledger.+newListJournalKinesisStreamsForLedger ::+ -- | 'ledgerName'+ Prelude.Text ->+ ListJournalKinesisStreamsForLedger+newListJournalKinesisStreamsForLedger pLedgerName_ =+ ListJournalKinesisStreamsForLedger'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ ledgerName = pLedgerName_+ }++-- | The maximum number of results to return in a single+-- @ListJournalKinesisStreamsForLedger@ request. (The actual number of+-- results returned might be fewer.)+listJournalKinesisStreamsForLedger_maxResults :: Lens.Lens' ListJournalKinesisStreamsForLedger (Prelude.Maybe Prelude.Natural)+listJournalKinesisStreamsForLedger_maxResults = Lens.lens (\ListJournalKinesisStreamsForLedger' {maxResults} -> maxResults) (\s@ListJournalKinesisStreamsForLedger' {} a -> s {maxResults = a} :: ListJournalKinesisStreamsForLedger)++-- | A pagination token, indicating that you want to retrieve the next page+-- of results. If you received a value for @NextToken@ in the response from+-- a previous @ListJournalKinesisStreamsForLedger@ call, you should use+-- that value as input here.+listJournalKinesisStreamsForLedger_nextToken :: Lens.Lens' ListJournalKinesisStreamsForLedger (Prelude.Maybe Prelude.Text)+listJournalKinesisStreamsForLedger_nextToken = Lens.lens (\ListJournalKinesisStreamsForLedger' {nextToken} -> nextToken) (\s@ListJournalKinesisStreamsForLedger' {} a -> s {nextToken = a} :: ListJournalKinesisStreamsForLedger)++-- | The name of the ledger.+listJournalKinesisStreamsForLedger_ledgerName :: Lens.Lens' ListJournalKinesisStreamsForLedger Prelude.Text+listJournalKinesisStreamsForLedger_ledgerName = Lens.lens (\ListJournalKinesisStreamsForLedger' {ledgerName} -> ledgerName) (\s@ListJournalKinesisStreamsForLedger' {} a -> s {ledgerName = a} :: ListJournalKinesisStreamsForLedger)++instance+ Core.AWSRequest+ ListJournalKinesisStreamsForLedger+ where+ type+ AWSResponse ListJournalKinesisStreamsForLedger =+ ListJournalKinesisStreamsForLedgerResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListJournalKinesisStreamsForLedgerResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "Streams" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ ListJournalKinesisStreamsForLedger+ where+ hashWithSalt+ _salt+ ListJournalKinesisStreamsForLedger' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` ledgerName++instance+ Prelude.NFData+ ListJournalKinesisStreamsForLedger+ where+ rnf ListJournalKinesisStreamsForLedger' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf ledgerName++instance+ Data.ToHeaders+ ListJournalKinesisStreamsForLedger+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance+ Data.ToPath+ ListJournalKinesisStreamsForLedger+ where+ toPath ListJournalKinesisStreamsForLedger' {..} =+ Prelude.mconcat+ [ "/ledgers/",+ Data.toBS ledgerName,+ "/journal-kinesis-streams"+ ]++instance+ Data.ToQuery+ ListJournalKinesisStreamsForLedger+ where+ toQuery ListJournalKinesisStreamsForLedger' {..} =+ Prelude.mconcat+ [ "max_results" Data.=: maxResults,+ "next_token" Data.=: nextToken+ ]++-- | /See:/ 'newListJournalKinesisStreamsForLedgerResponse' smart constructor.+data ListJournalKinesisStreamsForLedgerResponse = ListJournalKinesisStreamsForLedgerResponse'+ { -- | - If @NextToken@ is empty, the last page of results has been processed+ -- and there are no more results to be retrieved.+ --+ -- - If @NextToken@ is /not/ empty, more results are available. To+ -- retrieve the next page of results, use the value of @NextToken@ in a+ -- subsequent @ListJournalKinesisStreamsForLedger@ call.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The array of QLDB journal stream descriptors that are associated with+ -- the given ledger.+ streams :: Prelude.Maybe [JournalKinesisStreamDescription],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListJournalKinesisStreamsForLedgerResponse' 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', 'listJournalKinesisStreamsForLedgerResponse_nextToken' - - If @NextToken@ is empty, the last page of results has been processed+-- and there are no more results to be retrieved.+--+-- - If @NextToken@ is /not/ empty, more results are available. To+-- retrieve the next page of results, use the value of @NextToken@ in a+-- subsequent @ListJournalKinesisStreamsForLedger@ call.+--+-- 'streams', 'listJournalKinesisStreamsForLedgerResponse_streams' - The array of QLDB journal stream descriptors that are associated with+-- the given ledger.+--+-- 'httpStatus', 'listJournalKinesisStreamsForLedgerResponse_httpStatus' - The response's http status code.+newListJournalKinesisStreamsForLedgerResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListJournalKinesisStreamsForLedgerResponse+newListJournalKinesisStreamsForLedgerResponse+ pHttpStatus_ =+ ListJournalKinesisStreamsForLedgerResponse'+ { nextToken =+ Prelude.Nothing,+ streams = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | - If @NextToken@ is empty, the last page of results has been processed+-- and there are no more results to be retrieved.+--+-- - If @NextToken@ is /not/ empty, more results are available. To+-- retrieve the next page of results, use the value of @NextToken@ in a+-- subsequent @ListJournalKinesisStreamsForLedger@ call.+listJournalKinesisStreamsForLedgerResponse_nextToken :: Lens.Lens' ListJournalKinesisStreamsForLedgerResponse (Prelude.Maybe Prelude.Text)+listJournalKinesisStreamsForLedgerResponse_nextToken = Lens.lens (\ListJournalKinesisStreamsForLedgerResponse' {nextToken} -> nextToken) (\s@ListJournalKinesisStreamsForLedgerResponse' {} a -> s {nextToken = a} :: ListJournalKinesisStreamsForLedgerResponse)++-- | The array of QLDB journal stream descriptors that are associated with+-- the given ledger.+listJournalKinesisStreamsForLedgerResponse_streams :: Lens.Lens' ListJournalKinesisStreamsForLedgerResponse (Prelude.Maybe [JournalKinesisStreamDescription])+listJournalKinesisStreamsForLedgerResponse_streams = Lens.lens (\ListJournalKinesisStreamsForLedgerResponse' {streams} -> streams) (\s@ListJournalKinesisStreamsForLedgerResponse' {} a -> s {streams = a} :: ListJournalKinesisStreamsForLedgerResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listJournalKinesisStreamsForLedgerResponse_httpStatus :: Lens.Lens' ListJournalKinesisStreamsForLedgerResponse Prelude.Int+listJournalKinesisStreamsForLedgerResponse_httpStatus = Lens.lens (\ListJournalKinesisStreamsForLedgerResponse' {httpStatus} -> httpStatus) (\s@ListJournalKinesisStreamsForLedgerResponse' {} a -> s {httpStatus = a} :: ListJournalKinesisStreamsForLedgerResponse)++instance+ Prelude.NFData+ ListJournalKinesisStreamsForLedgerResponse+ where+ rnf ListJournalKinesisStreamsForLedgerResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf streams+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/ListJournalS3Exports.hs view
@@ -0,0 +1,233 @@+{-# 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.QLDB.ListJournalS3Exports+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an array of journal export job descriptions for all ledgers that+-- are associated with the current Amazon Web Services account and Region.+--+-- This action returns a maximum of @MaxResults@ items, and is paginated so+-- that you can retrieve all the items by calling @ListJournalS3Exports@+-- multiple times.+--+-- This action does not return any expired export jobs. For more+-- information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration Export job expiration>+-- in the /Amazon QLDB Developer Guide/.+module Amazonka.QLDB.ListJournalS3Exports+ ( -- * Creating a Request+ ListJournalS3Exports (..),+ newListJournalS3Exports,++ -- * Request Lenses+ listJournalS3Exports_maxResults,+ listJournalS3Exports_nextToken,++ -- * Destructuring the Response+ ListJournalS3ExportsResponse (..),+ newListJournalS3ExportsResponse,++ -- * Response Lenses+ listJournalS3ExportsResponse_journalS3Exports,+ listJournalS3ExportsResponse_nextToken,+ listJournalS3ExportsResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListJournalS3Exports' smart constructor.+data ListJournalS3Exports = ListJournalS3Exports'+ { -- | The maximum number of results to return in a single+ -- @ListJournalS3Exports@ request. (The actual number of results returned+ -- might be fewer.)+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A pagination token, indicating that you want to retrieve the next page+ -- of results. If you received a value for @NextToken@ in the response from+ -- a previous @ListJournalS3Exports@ call, then you should use that value+ -- as input here.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListJournalS3Exports' 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', 'listJournalS3Exports_maxResults' - The maximum number of results to return in a single+-- @ListJournalS3Exports@ request. (The actual number of results returned+-- might be fewer.)+--+-- 'nextToken', 'listJournalS3Exports_nextToken' - A pagination token, indicating that you want to retrieve the next page+-- of results. If you received a value for @NextToken@ in the response from+-- a previous @ListJournalS3Exports@ call, then you should use that value+-- as input here.+newListJournalS3Exports ::+ ListJournalS3Exports+newListJournalS3Exports =+ ListJournalS3Exports'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of results to return in a single+-- @ListJournalS3Exports@ request. (The actual number of results returned+-- might be fewer.)+listJournalS3Exports_maxResults :: Lens.Lens' ListJournalS3Exports (Prelude.Maybe Prelude.Natural)+listJournalS3Exports_maxResults = Lens.lens (\ListJournalS3Exports' {maxResults} -> maxResults) (\s@ListJournalS3Exports' {} a -> s {maxResults = a} :: ListJournalS3Exports)++-- | A pagination token, indicating that you want to retrieve the next page+-- of results. If you received a value for @NextToken@ in the response from+-- a previous @ListJournalS3Exports@ call, then you should use that value+-- as input here.+listJournalS3Exports_nextToken :: Lens.Lens' ListJournalS3Exports (Prelude.Maybe Prelude.Text)+listJournalS3Exports_nextToken = Lens.lens (\ListJournalS3Exports' {nextToken} -> nextToken) (\s@ListJournalS3Exports' {} a -> s {nextToken = a} :: ListJournalS3Exports)++instance Core.AWSRequest ListJournalS3Exports where+ type+ AWSResponse ListJournalS3Exports =+ ListJournalS3ExportsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListJournalS3ExportsResponse'+ Prelude.<$> ( x+ Data..?> "JournalS3Exports"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListJournalS3Exports where+ hashWithSalt _salt ListJournalS3Exports' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListJournalS3Exports where+ rnf ListJournalS3Exports' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListJournalS3Exports where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListJournalS3Exports where+ toPath = Prelude.const "/journal-s3-exports"++instance Data.ToQuery ListJournalS3Exports where+ toQuery ListJournalS3Exports' {..} =+ Prelude.mconcat+ [ "max_results" Data.=: maxResults,+ "next_token" Data.=: nextToken+ ]++-- | /See:/ 'newListJournalS3ExportsResponse' smart constructor.+data ListJournalS3ExportsResponse = ListJournalS3ExportsResponse'+ { -- | The array of journal export job descriptions for all ledgers that are+ -- associated with the current Amazon Web Services account and Region.+ journalS3Exports :: Prelude.Maybe [JournalS3ExportDescription],+ -- | - If @NextToken@ is empty, then the last page of results has been+ -- processed and there are no more results to be retrieved.+ --+ -- - If @NextToken@ is /not/ empty, then there are more results+ -- available. To retrieve the next page of results, use the value of+ -- @NextToken@ in a subsequent @ListJournalS3Exports@ call.+ nextToken :: 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 'ListJournalS3ExportsResponse' 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:+--+-- 'journalS3Exports', 'listJournalS3ExportsResponse_journalS3Exports' - The array of journal export job descriptions for all ledgers that are+-- associated with the current Amazon Web Services account and Region.+--+-- 'nextToken', 'listJournalS3ExportsResponse_nextToken' - - If @NextToken@ is empty, then the last page of results has been+-- processed and there are no more results to be retrieved.+--+-- - If @NextToken@ is /not/ empty, then there are more results+-- available. To retrieve the next page of results, use the value of+-- @NextToken@ in a subsequent @ListJournalS3Exports@ call.+--+-- 'httpStatus', 'listJournalS3ExportsResponse_httpStatus' - The response's http status code.+newListJournalS3ExportsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListJournalS3ExportsResponse+newListJournalS3ExportsResponse pHttpStatus_ =+ ListJournalS3ExportsResponse'+ { journalS3Exports =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The array of journal export job descriptions for all ledgers that are+-- associated with the current Amazon Web Services account and Region.+listJournalS3ExportsResponse_journalS3Exports :: Lens.Lens' ListJournalS3ExportsResponse (Prelude.Maybe [JournalS3ExportDescription])+listJournalS3ExportsResponse_journalS3Exports = Lens.lens (\ListJournalS3ExportsResponse' {journalS3Exports} -> journalS3Exports) (\s@ListJournalS3ExportsResponse' {} a -> s {journalS3Exports = a} :: ListJournalS3ExportsResponse) Prelude.. Lens.mapping Lens.coerced++-- | - If @NextToken@ is empty, then the last page of results has been+-- processed and there are no more results to be retrieved.+--+-- - If @NextToken@ is /not/ empty, then there are more results+-- available. To retrieve the next page of results, use the value of+-- @NextToken@ in a subsequent @ListJournalS3Exports@ call.+listJournalS3ExportsResponse_nextToken :: Lens.Lens' ListJournalS3ExportsResponse (Prelude.Maybe Prelude.Text)+listJournalS3ExportsResponse_nextToken = Lens.lens (\ListJournalS3ExportsResponse' {nextToken} -> nextToken) (\s@ListJournalS3ExportsResponse' {} a -> s {nextToken = a} :: ListJournalS3ExportsResponse)++-- | The response's http status code.+listJournalS3ExportsResponse_httpStatus :: Lens.Lens' ListJournalS3ExportsResponse Prelude.Int+listJournalS3ExportsResponse_httpStatus = Lens.lens (\ListJournalS3ExportsResponse' {httpStatus} -> httpStatus) (\s@ListJournalS3ExportsResponse' {} a -> s {httpStatus = a} :: ListJournalS3ExportsResponse)++instance Prelude.NFData ListJournalS3ExportsResponse where+ rnf ListJournalS3ExportsResponse' {..} =+ Prelude.rnf journalS3Exports+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/ListJournalS3ExportsForLedger.hs view
@@ -0,0 +1,259 @@+{-# 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.QLDB.ListJournalS3ExportsForLedger+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an array of journal export job descriptions for a specified+-- ledger.+--+-- This action returns a maximum of @MaxResults@ items, and is paginated so+-- that you can retrieve all the items by calling+-- @ListJournalS3ExportsForLedger@ multiple times.+--+-- This action does not return any expired export jobs. For more+-- information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration Export job expiration>+-- in the /Amazon QLDB Developer Guide/.+module Amazonka.QLDB.ListJournalS3ExportsForLedger+ ( -- * Creating a Request+ ListJournalS3ExportsForLedger (..),+ newListJournalS3ExportsForLedger,++ -- * Request Lenses+ listJournalS3ExportsForLedger_maxResults,+ listJournalS3ExportsForLedger_nextToken,+ listJournalS3ExportsForLedger_name,++ -- * Destructuring the Response+ ListJournalS3ExportsForLedgerResponse (..),+ newListJournalS3ExportsForLedgerResponse,++ -- * Response Lenses+ listJournalS3ExportsForLedgerResponse_journalS3Exports,+ listJournalS3ExportsForLedgerResponse_nextToken,+ listJournalS3ExportsForLedgerResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListJournalS3ExportsForLedger' smart constructor.+data ListJournalS3ExportsForLedger = ListJournalS3ExportsForLedger'+ { -- | The maximum number of results to return in a single+ -- @ListJournalS3ExportsForLedger@ request. (The actual number of results+ -- returned might be fewer.)+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A pagination token, indicating that you want to retrieve the next page+ -- of results. If you received a value for @NextToken@ in the response from+ -- a previous @ListJournalS3ExportsForLedger@ call, then you should use+ -- that value as input here.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The name of the ledger.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListJournalS3ExportsForLedger' 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', 'listJournalS3ExportsForLedger_maxResults' - The maximum number of results to return in a single+-- @ListJournalS3ExportsForLedger@ request. (The actual number of results+-- returned might be fewer.)+--+-- 'nextToken', 'listJournalS3ExportsForLedger_nextToken' - A pagination token, indicating that you want to retrieve the next page+-- of results. If you received a value for @NextToken@ in the response from+-- a previous @ListJournalS3ExportsForLedger@ call, then you should use+-- that value as input here.+--+-- 'name', 'listJournalS3ExportsForLedger_name' - The name of the ledger.+newListJournalS3ExportsForLedger ::+ -- | 'name'+ Prelude.Text ->+ ListJournalS3ExportsForLedger+newListJournalS3ExportsForLedger pName_ =+ ListJournalS3ExportsForLedger'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ name = pName_+ }++-- | The maximum number of results to return in a single+-- @ListJournalS3ExportsForLedger@ request. (The actual number of results+-- returned might be fewer.)+listJournalS3ExportsForLedger_maxResults :: Lens.Lens' ListJournalS3ExportsForLedger (Prelude.Maybe Prelude.Natural)+listJournalS3ExportsForLedger_maxResults = Lens.lens (\ListJournalS3ExportsForLedger' {maxResults} -> maxResults) (\s@ListJournalS3ExportsForLedger' {} a -> s {maxResults = a} :: ListJournalS3ExportsForLedger)++-- | A pagination token, indicating that you want to retrieve the next page+-- of results. If you received a value for @NextToken@ in the response from+-- a previous @ListJournalS3ExportsForLedger@ call, then you should use+-- that value as input here.+listJournalS3ExportsForLedger_nextToken :: Lens.Lens' ListJournalS3ExportsForLedger (Prelude.Maybe Prelude.Text)+listJournalS3ExportsForLedger_nextToken = Lens.lens (\ListJournalS3ExportsForLedger' {nextToken} -> nextToken) (\s@ListJournalS3ExportsForLedger' {} a -> s {nextToken = a} :: ListJournalS3ExportsForLedger)++-- | The name of the ledger.+listJournalS3ExportsForLedger_name :: Lens.Lens' ListJournalS3ExportsForLedger Prelude.Text+listJournalS3ExportsForLedger_name = Lens.lens (\ListJournalS3ExportsForLedger' {name} -> name) (\s@ListJournalS3ExportsForLedger' {} a -> s {name = a} :: ListJournalS3ExportsForLedger)++instance+ Core.AWSRequest+ ListJournalS3ExportsForLedger+ where+ type+ AWSResponse ListJournalS3ExportsForLedger =+ ListJournalS3ExportsForLedgerResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListJournalS3ExportsForLedgerResponse'+ Prelude.<$> ( x+ Data..?> "JournalS3Exports"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ ListJournalS3ExportsForLedger+ where+ hashWithSalt _salt ListJournalS3ExportsForLedger' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` name++instance Prelude.NFData ListJournalS3ExportsForLedger where+ rnf ListJournalS3ExportsForLedger' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders ListJournalS3ExportsForLedger where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListJournalS3ExportsForLedger where+ toPath ListJournalS3ExportsForLedger' {..} =+ Prelude.mconcat+ ["/ledgers/", Data.toBS name, "/journal-s3-exports"]++instance Data.ToQuery ListJournalS3ExportsForLedger where+ toQuery ListJournalS3ExportsForLedger' {..} =+ Prelude.mconcat+ [ "max_results" Data.=: maxResults,+ "next_token" Data.=: nextToken+ ]++-- | /See:/ 'newListJournalS3ExportsForLedgerResponse' smart constructor.+data ListJournalS3ExportsForLedgerResponse = ListJournalS3ExportsForLedgerResponse'+ { -- | The array of journal export job descriptions that are associated with+ -- the specified ledger.+ journalS3Exports :: Prelude.Maybe [JournalS3ExportDescription],+ -- | - If @NextToken@ is empty, then the last page of results has been+ -- processed and there are no more results to be retrieved.+ --+ -- - If @NextToken@ is /not/ empty, then there are more results+ -- available. To retrieve the next page of results, use the value of+ -- @NextToken@ in a subsequent @ListJournalS3ExportsForLedger@ call.+ nextToken :: 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 'ListJournalS3ExportsForLedgerResponse' 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:+--+-- 'journalS3Exports', 'listJournalS3ExportsForLedgerResponse_journalS3Exports' - The array of journal export job descriptions that are associated with+-- the specified ledger.+--+-- 'nextToken', 'listJournalS3ExportsForLedgerResponse_nextToken' - - If @NextToken@ is empty, then the last page of results has been+-- processed and there are no more results to be retrieved.+--+-- - If @NextToken@ is /not/ empty, then there are more results+-- available. To retrieve the next page of results, use the value of+-- @NextToken@ in a subsequent @ListJournalS3ExportsForLedger@ call.+--+-- 'httpStatus', 'listJournalS3ExportsForLedgerResponse_httpStatus' - The response's http status code.+newListJournalS3ExportsForLedgerResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListJournalS3ExportsForLedgerResponse+newListJournalS3ExportsForLedgerResponse pHttpStatus_ =+ ListJournalS3ExportsForLedgerResponse'+ { journalS3Exports =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The array of journal export job descriptions that are associated with+-- the specified ledger.+listJournalS3ExportsForLedgerResponse_journalS3Exports :: Lens.Lens' ListJournalS3ExportsForLedgerResponse (Prelude.Maybe [JournalS3ExportDescription])+listJournalS3ExportsForLedgerResponse_journalS3Exports = Lens.lens (\ListJournalS3ExportsForLedgerResponse' {journalS3Exports} -> journalS3Exports) (\s@ListJournalS3ExportsForLedgerResponse' {} a -> s {journalS3Exports = a} :: ListJournalS3ExportsForLedgerResponse) Prelude.. Lens.mapping Lens.coerced++-- | - If @NextToken@ is empty, then the last page of results has been+-- processed and there are no more results to be retrieved.+--+-- - If @NextToken@ is /not/ empty, then there are more results+-- available. To retrieve the next page of results, use the value of+-- @NextToken@ in a subsequent @ListJournalS3ExportsForLedger@ call.+listJournalS3ExportsForLedgerResponse_nextToken :: Lens.Lens' ListJournalS3ExportsForLedgerResponse (Prelude.Maybe Prelude.Text)+listJournalS3ExportsForLedgerResponse_nextToken = Lens.lens (\ListJournalS3ExportsForLedgerResponse' {nextToken} -> nextToken) (\s@ListJournalS3ExportsForLedgerResponse' {} a -> s {nextToken = a} :: ListJournalS3ExportsForLedgerResponse)++-- | The response's http status code.+listJournalS3ExportsForLedgerResponse_httpStatus :: Lens.Lens' ListJournalS3ExportsForLedgerResponse Prelude.Int+listJournalS3ExportsForLedgerResponse_httpStatus = Lens.lens (\ListJournalS3ExportsForLedgerResponse' {httpStatus} -> httpStatus) (\s@ListJournalS3ExportsForLedgerResponse' {} a -> s {httpStatus = a} :: ListJournalS3ExportsForLedgerResponse)++instance+ Prelude.NFData+ ListJournalS3ExportsForLedgerResponse+ where+ rnf ListJournalS3ExportsForLedgerResponse' {..} =+ Prelude.rnf journalS3Exports+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/ListLedgers.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.QLDB.ListLedgers+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an array of ledger summaries that are associated with the+-- current Amazon Web Services account and Region.+--+-- This action returns a maximum of 100 items and is paginated so that you+-- can retrieve all the items by calling @ListLedgers@ multiple times.+module Amazonka.QLDB.ListLedgers+ ( -- * Creating a Request+ ListLedgers (..),+ newListLedgers,++ -- * Request Lenses+ listLedgers_maxResults,+ listLedgers_nextToken,++ -- * Destructuring the Response+ ListLedgersResponse (..),+ newListLedgersResponse,++ -- * Response Lenses+ listLedgersResponse_ledgers,+ listLedgersResponse_nextToken,+ listLedgersResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListLedgers' smart constructor.+data ListLedgers = ListLedgers'+ { -- | The maximum number of results to return in a single @ListLedgers@+ -- request. (The actual number of results returned might be fewer.)+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A pagination token, indicating that you want to retrieve the next page+ -- of results. If you received a value for @NextToken@ in the response from+ -- a previous @ListLedgers@ call, then you should use that value as input+ -- here.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListLedgers' 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', 'listLedgers_maxResults' - The maximum number of results to return in a single @ListLedgers@+-- request. (The actual number of results returned might be fewer.)+--+-- 'nextToken', 'listLedgers_nextToken' - A pagination token, indicating that you want to retrieve the next page+-- of results. If you received a value for @NextToken@ in the response from+-- a previous @ListLedgers@ call, then you should use that value as input+-- here.+newListLedgers ::+ ListLedgers+newListLedgers =+ ListLedgers'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of results to return in a single @ListLedgers@+-- request. (The actual number of results returned might be fewer.)+listLedgers_maxResults :: Lens.Lens' ListLedgers (Prelude.Maybe Prelude.Natural)+listLedgers_maxResults = Lens.lens (\ListLedgers' {maxResults} -> maxResults) (\s@ListLedgers' {} a -> s {maxResults = a} :: ListLedgers)++-- | A pagination token, indicating that you want to retrieve the next page+-- of results. If you received a value for @NextToken@ in the response from+-- a previous @ListLedgers@ call, then you should use that value as input+-- here.+listLedgers_nextToken :: Lens.Lens' ListLedgers (Prelude.Maybe Prelude.Text)+listLedgers_nextToken = Lens.lens (\ListLedgers' {nextToken} -> nextToken) (\s@ListLedgers' {} a -> s {nextToken = a} :: ListLedgers)++instance Core.AWSRequest ListLedgers where+ type AWSResponse ListLedgers = ListLedgersResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListLedgersResponse'+ Prelude.<$> (x Data..?> "Ledgers" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListLedgers where+ hashWithSalt _salt ListLedgers' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListLedgers where+ rnf ListLedgers' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListLedgers where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListLedgers where+ toPath = Prelude.const "/ledgers"++instance Data.ToQuery ListLedgers where+ toQuery ListLedgers' {..} =+ Prelude.mconcat+ [ "max_results" Data.=: maxResults,+ "next_token" Data.=: nextToken+ ]++-- | /See:/ 'newListLedgersResponse' smart constructor.+data ListLedgersResponse = ListLedgersResponse'+ { -- | The array of ledger summaries that are associated with the current+ -- Amazon Web Services account and Region.+ ledgers :: Prelude.Maybe [LedgerSummary],+ -- | A pagination token, indicating whether there are more results available:+ --+ -- - If @NextToken@ is empty, then the last page of results has been+ -- processed and there are no more results to be retrieved.+ --+ -- - If @NextToken@ is /not/ empty, then there are more results+ -- available. To retrieve the next page of results, use the value of+ -- @NextToken@ in a subsequent @ListLedgers@ call.+ nextToken :: 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 'ListLedgersResponse' 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:+--+-- 'ledgers', 'listLedgersResponse_ledgers' - The array of ledger summaries that are associated with the current+-- Amazon Web Services account and Region.+--+-- 'nextToken', 'listLedgersResponse_nextToken' - A pagination token, indicating whether there are more results available:+--+-- - If @NextToken@ is empty, then the last page of results has been+-- processed and there are no more results to be retrieved.+--+-- - If @NextToken@ is /not/ empty, then there are more results+-- available. To retrieve the next page of results, use the value of+-- @NextToken@ in a subsequent @ListLedgers@ call.+--+-- 'httpStatus', 'listLedgersResponse_httpStatus' - The response's http status code.+newListLedgersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListLedgersResponse+newListLedgersResponse pHttpStatus_ =+ ListLedgersResponse'+ { ledgers = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The array of ledger summaries that are associated with the current+-- Amazon Web Services account and Region.+listLedgersResponse_ledgers :: Lens.Lens' ListLedgersResponse (Prelude.Maybe [LedgerSummary])+listLedgersResponse_ledgers = Lens.lens (\ListLedgersResponse' {ledgers} -> ledgers) (\s@ListLedgersResponse' {} a -> s {ledgers = a} :: ListLedgersResponse) Prelude.. Lens.mapping Lens.coerced++-- | A pagination token, indicating whether there are more results available:+--+-- - If @NextToken@ is empty, then the last page of results has been+-- processed and there are no more results to be retrieved.+--+-- - If @NextToken@ is /not/ empty, then there are more results+-- available. To retrieve the next page of results, use the value of+-- @NextToken@ in a subsequent @ListLedgers@ call.+listLedgersResponse_nextToken :: Lens.Lens' ListLedgersResponse (Prelude.Maybe Prelude.Text)+listLedgersResponse_nextToken = Lens.lens (\ListLedgersResponse' {nextToken} -> nextToken) (\s@ListLedgersResponse' {} a -> s {nextToken = a} :: ListLedgersResponse)++-- | The response's http status code.+listLedgersResponse_httpStatus :: Lens.Lens' ListLedgersResponse Prelude.Int+listLedgersResponse_httpStatus = Lens.lens (\ListLedgersResponse' {httpStatus} -> httpStatus) (\s@ListLedgersResponse' {} a -> s {httpStatus = a} :: ListLedgersResponse)++instance Prelude.NFData ListLedgersResponse where+ rnf ListLedgersResponse' {..} =+ Prelude.rnf ledgers+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/ListTagsForResource.hs view
@@ -0,0 +1,168 @@+{-# 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.QLDB.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)+--+-- Returns all tags for a specified Amazon QLDB resource.+module Amazonka.QLDB.ListTagsForResource+ ( -- * Creating a Request+ ListTagsForResource (..),+ newListTagsForResource,++ -- * Request Lenses+ listTagsForResource_resourceArn,++ -- * Destructuring the Response+ ListTagsForResourceResponse (..),+ newListTagsForResourceResponse,++ -- * Response Lenses+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+ { -- | The Amazon Resource Name (ARN) for which to list the tags. For example:+ --+ -- @arn:aws:qldb:us-east-1:123456789012:ledger\/exampleLedger@+ 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:+--+-- 'resourceArn', 'listTagsForResource_resourceArn' - The Amazon Resource Name (ARN) for which to list the tags. For example:+--+-- @arn:aws:qldb:us-east-1:123456789012:ledger\/exampleLedger@+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The Amazon Resource Name (ARN) for which to list the tags. For example:+--+-- @arn:aws:qldb:us-east-1:123456789012:ledger\/exampleLedger@+listTagsForResource_resourceArn :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_resourceArn = Lens.lens (\ListTagsForResource' {resourceArn} -> resourceArn) (\s@ListTagsForResource' {} a -> s {resourceArn = a} :: ListTagsForResource)++instance Core.AWSRequest ListTagsForResource where+ type+ AWSResponse ListTagsForResource =+ ListTagsForResourceResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListTagsForResourceResponse'+ Prelude.<$> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListTagsForResource where+ hashWithSalt _salt ListTagsForResource' {..} =+ _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTagsForResource where+ rnf ListTagsForResource' {..} =+ Prelude.rnf resourceArn++instance Data.ToHeaders ListTagsForResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListTagsForResource where+ toPath ListTagsForResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery ListTagsForResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+ { -- | The tags that are currently associated with the specified Amazon QLDB+ -- resource.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ 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:+--+-- 'tags', 'listTagsForResourceResponse_tags' - The tags that are currently associated with the specified Amazon QLDB+-- resource.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { tags =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The tags that are currently associated with the specified Amazon QLDB+-- resource.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | 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)++instance Prelude.NFData ListTagsForResourceResponse where+ rnf ListTagsForResourceResponse' {..} =+ Prelude.rnf tags+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/StreamJournalToKinesis.hs view
@@ -0,0 +1,373 @@+{-# 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.QLDB.StreamJournalToKinesis+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a journal stream for a given Amazon QLDB ledger. The stream+-- captures every document revision that is committed to the ledger\'s+-- journal and delivers the data to a specified Amazon Kinesis Data Streams+-- resource.+module Amazonka.QLDB.StreamJournalToKinesis+ ( -- * Creating a Request+ StreamJournalToKinesis (..),+ newStreamJournalToKinesis,++ -- * Request Lenses+ streamJournalToKinesis_exclusiveEndTime,+ streamJournalToKinesis_tags,+ streamJournalToKinesis_ledgerName,+ streamJournalToKinesis_roleArn,+ streamJournalToKinesis_inclusiveStartTime,+ streamJournalToKinesis_kinesisConfiguration,+ streamJournalToKinesis_streamName,++ -- * Destructuring the Response+ StreamJournalToKinesisResponse (..),+ newStreamJournalToKinesisResponse,++ -- * Response Lenses+ streamJournalToKinesisResponse_streamId,+ streamJournalToKinesisResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newStreamJournalToKinesis' smart constructor.+data StreamJournalToKinesis = StreamJournalToKinesis'+ { -- | The exclusive date and time that specifies when the stream ends. If you+ -- don\'t define this parameter, the stream runs indefinitely until you+ -- cancel it.+ --+ -- The @ExclusiveEndTime@ must be in @ISO 8601@ date and time format and in+ -- Universal Coordinated Time (UTC). For example: @2019-06-13T21:36:34Z@.+ exclusiveEndTime :: Prelude.Maybe Data.POSIX,+ -- | The key-value pairs to add as tags to the stream that you want to+ -- create. Tag keys are case sensitive. Tag values are case sensitive and+ -- can be null.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The name of the ledger.+ ledgerName :: Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the IAM role that grants QLDB+ -- permissions for a journal stream to write data records to a Kinesis Data+ -- Streams resource.+ --+ -- To pass a role to QLDB when requesting a journal stream, you must have+ -- permissions to perform the @iam:PassRole@ action on the IAM role+ -- resource. This is required for all journal stream requests.+ roleArn :: Prelude.Text,+ -- | The inclusive start date and time from which to start streaming journal+ -- data. This parameter must be in @ISO 8601@ date and time format and in+ -- Universal Coordinated Time (UTC). For example: @2019-06-13T21:36:34Z@.+ --+ -- The @InclusiveStartTime@ cannot be in the future and must be before+ -- @ExclusiveEndTime@.+ --+ -- If you provide an @InclusiveStartTime@ that is before the ledger\'s+ -- @CreationDateTime@, QLDB effectively defaults it to the ledger\'s+ -- @CreationDateTime@.+ inclusiveStartTime :: Data.POSIX,+ -- | The configuration settings of the Kinesis Data Streams destination for+ -- your stream request.+ kinesisConfiguration :: KinesisConfiguration,+ -- | The name that you want to assign to the QLDB journal stream.+ -- User-defined names can help identify and indicate the purpose of a+ -- stream.+ --+ -- Your stream name must be unique among other /active/ streams for a given+ -- ledger. Stream names have the same naming constraints as ledger names,+ -- as defined in+ -- <https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming Quotas in Amazon QLDB>+ -- in the /Amazon QLDB Developer Guide/.+ streamName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StreamJournalToKinesis' 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:+--+-- 'exclusiveEndTime', 'streamJournalToKinesis_exclusiveEndTime' - The exclusive date and time that specifies when the stream ends. If you+-- don\'t define this parameter, the stream runs indefinitely until you+-- cancel it.+--+-- The @ExclusiveEndTime@ must be in @ISO 8601@ date and time format and in+-- Universal Coordinated Time (UTC). For example: @2019-06-13T21:36:34Z@.+--+-- 'tags', 'streamJournalToKinesis_tags' - The key-value pairs to add as tags to the stream that you want to+-- create. Tag keys are case sensitive. Tag values are case sensitive and+-- can be null.+--+-- 'ledgerName', 'streamJournalToKinesis_ledgerName' - The name of the ledger.+--+-- 'roleArn', 'streamJournalToKinesis_roleArn' - The Amazon Resource Name (ARN) of the IAM role that grants QLDB+-- permissions for a journal stream to write data records to a Kinesis Data+-- Streams resource.+--+-- To pass a role to QLDB when requesting a journal stream, you must have+-- permissions to perform the @iam:PassRole@ action on the IAM role+-- resource. This is required for all journal stream requests.+--+-- 'inclusiveStartTime', 'streamJournalToKinesis_inclusiveStartTime' - The inclusive start date and time from which to start streaming journal+-- data. This parameter must be in @ISO 8601@ date and time format and in+-- Universal Coordinated Time (UTC). For example: @2019-06-13T21:36:34Z@.+--+-- The @InclusiveStartTime@ cannot be in the future and must be before+-- @ExclusiveEndTime@.+--+-- If you provide an @InclusiveStartTime@ that is before the ledger\'s+-- @CreationDateTime@, QLDB effectively defaults it to the ledger\'s+-- @CreationDateTime@.+--+-- 'kinesisConfiguration', 'streamJournalToKinesis_kinesisConfiguration' - The configuration settings of the Kinesis Data Streams destination for+-- your stream request.+--+-- 'streamName', 'streamJournalToKinesis_streamName' - The name that you want to assign to the QLDB journal stream.+-- User-defined names can help identify and indicate the purpose of a+-- stream.+--+-- Your stream name must be unique among other /active/ streams for a given+-- ledger. Stream names have the same naming constraints as ledger names,+-- as defined in+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming Quotas in Amazon QLDB>+-- in the /Amazon QLDB Developer Guide/.+newStreamJournalToKinesis ::+ -- | 'ledgerName'+ Prelude.Text ->+ -- | 'roleArn'+ Prelude.Text ->+ -- | 'inclusiveStartTime'+ Prelude.UTCTime ->+ -- | 'kinesisConfiguration'+ KinesisConfiguration ->+ -- | 'streamName'+ Prelude.Text ->+ StreamJournalToKinesis+newStreamJournalToKinesis+ pLedgerName_+ pRoleArn_+ pInclusiveStartTime_+ pKinesisConfiguration_+ pStreamName_ =+ StreamJournalToKinesis'+ { exclusiveEndTime =+ Prelude.Nothing,+ tags = Prelude.Nothing,+ ledgerName = pLedgerName_,+ roleArn = pRoleArn_,+ inclusiveStartTime =+ Data._Time Lens.# pInclusiveStartTime_,+ kinesisConfiguration = pKinesisConfiguration_,+ streamName = pStreamName_+ }++-- | The exclusive date and time that specifies when the stream ends. If you+-- don\'t define this parameter, the stream runs indefinitely until you+-- cancel it.+--+-- The @ExclusiveEndTime@ must be in @ISO 8601@ date and time format and in+-- Universal Coordinated Time (UTC). For example: @2019-06-13T21:36:34Z@.+streamJournalToKinesis_exclusiveEndTime :: Lens.Lens' StreamJournalToKinesis (Prelude.Maybe Prelude.UTCTime)+streamJournalToKinesis_exclusiveEndTime = Lens.lens (\StreamJournalToKinesis' {exclusiveEndTime} -> exclusiveEndTime) (\s@StreamJournalToKinesis' {} a -> s {exclusiveEndTime = a} :: StreamJournalToKinesis) Prelude.. Lens.mapping Data._Time++-- | The key-value pairs to add as tags to the stream that you want to+-- create. Tag keys are case sensitive. Tag values are case sensitive and+-- can be null.+streamJournalToKinesis_tags :: Lens.Lens' StreamJournalToKinesis (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+streamJournalToKinesis_tags = Lens.lens (\StreamJournalToKinesis' {tags} -> tags) (\s@StreamJournalToKinesis' {} a -> s {tags = a} :: StreamJournalToKinesis) Prelude.. Lens.mapping Lens.coerced++-- | The name of the ledger.+streamJournalToKinesis_ledgerName :: Lens.Lens' StreamJournalToKinesis Prelude.Text+streamJournalToKinesis_ledgerName = Lens.lens (\StreamJournalToKinesis' {ledgerName} -> ledgerName) (\s@StreamJournalToKinesis' {} a -> s {ledgerName = a} :: StreamJournalToKinesis)++-- | The Amazon Resource Name (ARN) of the IAM role that grants QLDB+-- permissions for a journal stream to write data records to a Kinesis Data+-- Streams resource.+--+-- To pass a role to QLDB when requesting a journal stream, you must have+-- permissions to perform the @iam:PassRole@ action on the IAM role+-- resource. This is required for all journal stream requests.+streamJournalToKinesis_roleArn :: Lens.Lens' StreamJournalToKinesis Prelude.Text+streamJournalToKinesis_roleArn = Lens.lens (\StreamJournalToKinesis' {roleArn} -> roleArn) (\s@StreamJournalToKinesis' {} a -> s {roleArn = a} :: StreamJournalToKinesis)++-- | The inclusive start date and time from which to start streaming journal+-- data. This parameter must be in @ISO 8601@ date and time format and in+-- Universal Coordinated Time (UTC). For example: @2019-06-13T21:36:34Z@.+--+-- The @InclusiveStartTime@ cannot be in the future and must be before+-- @ExclusiveEndTime@.+--+-- If you provide an @InclusiveStartTime@ that is before the ledger\'s+-- @CreationDateTime@, QLDB effectively defaults it to the ledger\'s+-- @CreationDateTime@.+streamJournalToKinesis_inclusiveStartTime :: Lens.Lens' StreamJournalToKinesis Prelude.UTCTime+streamJournalToKinesis_inclusiveStartTime = Lens.lens (\StreamJournalToKinesis' {inclusiveStartTime} -> inclusiveStartTime) (\s@StreamJournalToKinesis' {} a -> s {inclusiveStartTime = a} :: StreamJournalToKinesis) Prelude.. Data._Time++-- | The configuration settings of the Kinesis Data Streams destination for+-- your stream request.+streamJournalToKinesis_kinesisConfiguration :: Lens.Lens' StreamJournalToKinesis KinesisConfiguration+streamJournalToKinesis_kinesisConfiguration = Lens.lens (\StreamJournalToKinesis' {kinesisConfiguration} -> kinesisConfiguration) (\s@StreamJournalToKinesis' {} a -> s {kinesisConfiguration = a} :: StreamJournalToKinesis)++-- | The name that you want to assign to the QLDB journal stream.+-- User-defined names can help identify and indicate the purpose of a+-- stream.+--+-- Your stream name must be unique among other /active/ streams for a given+-- ledger. Stream names have the same naming constraints as ledger names,+-- as defined in+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming Quotas in Amazon QLDB>+-- in the /Amazon QLDB Developer Guide/.+streamJournalToKinesis_streamName :: Lens.Lens' StreamJournalToKinesis Prelude.Text+streamJournalToKinesis_streamName = Lens.lens (\StreamJournalToKinesis' {streamName} -> streamName) (\s@StreamJournalToKinesis' {} a -> s {streamName = a} :: StreamJournalToKinesis)++instance Core.AWSRequest StreamJournalToKinesis where+ type+ AWSResponse StreamJournalToKinesis =+ StreamJournalToKinesisResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ StreamJournalToKinesisResponse'+ Prelude.<$> (x Data..?> "StreamId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable StreamJournalToKinesis where+ hashWithSalt _salt StreamJournalToKinesis' {..} =+ _salt+ `Prelude.hashWithSalt` exclusiveEndTime+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` ledgerName+ `Prelude.hashWithSalt` roleArn+ `Prelude.hashWithSalt` inclusiveStartTime+ `Prelude.hashWithSalt` kinesisConfiguration+ `Prelude.hashWithSalt` streamName++instance Prelude.NFData StreamJournalToKinesis where+ rnf StreamJournalToKinesis' {..} =+ Prelude.rnf exclusiveEndTime+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf ledgerName+ `Prelude.seq` Prelude.rnf roleArn+ `Prelude.seq` Prelude.rnf inclusiveStartTime+ `Prelude.seq` Prelude.rnf kinesisConfiguration+ `Prelude.seq` Prelude.rnf streamName++instance Data.ToHeaders StreamJournalToKinesis where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON StreamJournalToKinesis where+ toJSON StreamJournalToKinesis' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ExclusiveEndTime" Data..=)+ Prelude.<$> exclusiveEndTime,+ ("Tags" Data..=) Prelude.<$> tags,+ Prelude.Just ("RoleArn" Data..= roleArn),+ Prelude.Just+ ("InclusiveStartTime" Data..= inclusiveStartTime),+ Prelude.Just+ ( "KinesisConfiguration"+ Data..= kinesisConfiguration+ ),+ Prelude.Just ("StreamName" Data..= streamName)+ ]+ )++instance Data.ToPath StreamJournalToKinesis where+ toPath StreamJournalToKinesis' {..} =+ Prelude.mconcat+ [ "/ledgers/",+ Data.toBS ledgerName,+ "/journal-kinesis-streams"+ ]++instance Data.ToQuery StreamJournalToKinesis where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newStreamJournalToKinesisResponse' smart constructor.+data StreamJournalToKinesisResponse = StreamJournalToKinesisResponse'+ { -- | The UUID (represented in Base62-encoded text) that QLDB assigns to each+ -- QLDB journal stream.+ streamId :: 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 'StreamJournalToKinesisResponse' 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:+--+-- 'streamId', 'streamJournalToKinesisResponse_streamId' - The UUID (represented in Base62-encoded text) that QLDB assigns to each+-- QLDB journal stream.+--+-- 'httpStatus', 'streamJournalToKinesisResponse_httpStatus' - The response's http status code.+newStreamJournalToKinesisResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ StreamJournalToKinesisResponse+newStreamJournalToKinesisResponse pHttpStatus_ =+ StreamJournalToKinesisResponse'+ { streamId =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The UUID (represented in Base62-encoded text) that QLDB assigns to each+-- QLDB journal stream.+streamJournalToKinesisResponse_streamId :: Lens.Lens' StreamJournalToKinesisResponse (Prelude.Maybe Prelude.Text)+streamJournalToKinesisResponse_streamId = Lens.lens (\StreamJournalToKinesisResponse' {streamId} -> streamId) (\s@StreamJournalToKinesisResponse' {} a -> s {streamId = a} :: StreamJournalToKinesisResponse)++-- | The response's http status code.+streamJournalToKinesisResponse_httpStatus :: Lens.Lens' StreamJournalToKinesisResponse Prelude.Int+streamJournalToKinesisResponse_httpStatus = Lens.lens (\StreamJournalToKinesisResponse' {httpStatus} -> httpStatus) (\s@StreamJournalToKinesisResponse' {} a -> s {httpStatus = a} :: StreamJournalToKinesisResponse)++instance+ Prelude.NFData+ StreamJournalToKinesisResponse+ where+ rnf StreamJournalToKinesisResponse' {..} =+ Prelude.rnf streamId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/TagResource.hs view
@@ -0,0 +1,184 @@+{-# 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.QLDB.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)+--+-- Adds one or more tags to a specified Amazon QLDB resource.+--+-- A resource can have up to 50 tags. If you try to create more than 50+-- tags for a resource, your request fails and returns an error.+module Amazonka.QLDB.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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+ { -- | The Amazon Resource Name (ARN) to which you want to add the tags. For+ -- example:+ --+ -- @arn:aws:qldb:us-east-1:123456789012:ledger\/exampleLedger@+ resourceArn :: Prelude.Text,+ -- | The key-value pairs to add as tags to the specified QLDB resource. Tag+ -- keys are case sensitive. If you specify a key that already exists for+ -- the resource, your request fails and returns an error. Tag values are+ -- case sensitive and can be null.+ tags :: Prelude.HashMap Prelude.Text Prelude.Text+ }+ 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' - The Amazon Resource Name (ARN) to which you want to add the tags. For+-- example:+--+-- @arn:aws:qldb:us-east-1:123456789012:ledger\/exampleLedger@+--+-- 'tags', 'tagResource_tags' - The key-value pairs to add as tags to the specified QLDB resource. Tag+-- keys are case sensitive. If you specify a key that already exists for+-- the resource, your request fails and returns an error. Tag values are+-- case sensitive and can be null.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | The Amazon Resource Name (ARN) to which you want to add the tags. For+-- example:+--+-- @arn:aws:qldb:us-east-1:123456789012:ledger\/exampleLedger@+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | The key-value pairs to add as tags to the specified QLDB resource. Tag+-- keys are case sensitive. If you specify a key that already exists for+-- the resource, your request fails and returns an error. Tag values are+-- case sensitive and can be null.+tagResource_tags :: Lens.Lens' TagResource (Prelude.HashMap Prelude.Text Prelude.Text)+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+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON TagResource where+ toJSON TagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("Tags" Data..= tags)]+ )++instance Data.ToPath TagResource where+ toPath TagResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++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/QLDB/Types.hs view
@@ -0,0 +1,257 @@+{-# 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.QLDB.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.QLDB.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _InvalidParameterException,+ _LimitExceededException,+ _ResourceAlreadyExistsException,+ _ResourceInUseException,+ _ResourceNotFoundException,+ _ResourcePreconditionNotMetException,++ -- * EncryptionStatus+ EncryptionStatus (..),++ -- * ErrorCause+ ErrorCause (..),++ -- * ExportStatus+ ExportStatus (..),++ -- * LedgerState+ LedgerState (..),++ -- * OutputFormat+ OutputFormat (..),++ -- * PermissionsMode+ PermissionsMode (..),++ -- * S3ObjectEncryptionType+ S3ObjectEncryptionType (..),++ -- * StreamStatus+ StreamStatus (..),++ -- * JournalKinesisStreamDescription+ JournalKinesisStreamDescription (..),+ newJournalKinesisStreamDescription,+ journalKinesisStreamDescription_arn,+ journalKinesisStreamDescription_creationTime,+ journalKinesisStreamDescription_errorCause,+ journalKinesisStreamDescription_exclusiveEndTime,+ journalKinesisStreamDescription_inclusiveStartTime,+ journalKinesisStreamDescription_ledgerName,+ journalKinesisStreamDescription_roleArn,+ journalKinesisStreamDescription_streamId,+ journalKinesisStreamDescription_status,+ journalKinesisStreamDescription_kinesisConfiguration,+ journalKinesisStreamDescription_streamName,++ -- * JournalS3ExportDescription+ JournalS3ExportDescription (..),+ newJournalS3ExportDescription,+ journalS3ExportDescription_outputFormat,+ journalS3ExportDescription_ledgerName,+ journalS3ExportDescription_exportId,+ journalS3ExportDescription_exportCreationTime,+ journalS3ExportDescription_status,+ journalS3ExportDescription_inclusiveStartTime,+ journalS3ExportDescription_exclusiveEndTime,+ journalS3ExportDescription_s3ExportConfiguration,+ journalS3ExportDescription_roleArn,++ -- * KinesisConfiguration+ KinesisConfiguration (..),+ newKinesisConfiguration,+ kinesisConfiguration_aggregationEnabled,+ kinesisConfiguration_streamArn,++ -- * LedgerEncryptionDescription+ LedgerEncryptionDescription (..),+ newLedgerEncryptionDescription,+ ledgerEncryptionDescription_inaccessibleKmsKeyDateTime,+ ledgerEncryptionDescription_kmsKeyArn,+ ledgerEncryptionDescription_encryptionStatus,++ -- * LedgerSummary+ LedgerSummary (..),+ newLedgerSummary,+ ledgerSummary_creationDateTime,+ ledgerSummary_name,+ ledgerSummary_state,++ -- * S3EncryptionConfiguration+ S3EncryptionConfiguration (..),+ newS3EncryptionConfiguration,+ s3EncryptionConfiguration_kmsKeyArn,+ s3EncryptionConfiguration_objectEncryptionType,++ -- * S3ExportConfiguration+ S3ExportConfiguration (..),+ newS3ExportConfiguration,+ s3ExportConfiguration_bucket,+ s3ExportConfiguration_prefix,+ s3ExportConfiguration_encryptionConfiguration,++ -- * ValueHolder+ ValueHolder (..),+ newValueHolder,+ valueHolder_ionText,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import Amazonka.QLDB.Types.EncryptionStatus+import Amazonka.QLDB.Types.ErrorCause+import Amazonka.QLDB.Types.ExportStatus+import Amazonka.QLDB.Types.JournalKinesisStreamDescription+import Amazonka.QLDB.Types.JournalS3ExportDescription+import Amazonka.QLDB.Types.KinesisConfiguration+import Amazonka.QLDB.Types.LedgerEncryptionDescription+import Amazonka.QLDB.Types.LedgerState+import Amazonka.QLDB.Types.LedgerSummary+import Amazonka.QLDB.Types.OutputFormat+import Amazonka.QLDB.Types.PermissionsMode+import Amazonka.QLDB.Types.S3EncryptionConfiguration+import Amazonka.QLDB.Types.S3ExportConfiguration+import Amazonka.QLDB.Types.S3ObjectEncryptionType+import Amazonka.QLDB.Types.StreamStatus+import Amazonka.QLDB.Types.ValueHolder+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2019-01-02@ of the Amazon QLDB SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "QLDB",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "qldb",+ Core.signingName = "qldb",+ Core.version = "2019-01-02",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "QLDB",+ 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++-- | One or more parameters in the request aren\'t valid.+_InvalidParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidParameterException =+ Core._MatchServiceError+ defaultService+ "InvalidParameterException"+ Prelude.. Core.hasStatus 400++-- | You have reached the limit on the maximum number of resources allowed.+_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_LimitExceededException =+ Core._MatchServiceError+ defaultService+ "LimitExceededException"+ Prelude.. Core.hasStatus 400++-- | The specified resource already exists.+_ResourceAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceAlreadyExistsException =+ Core._MatchServiceError+ defaultService+ "ResourceAlreadyExistsException"+ Prelude.. Core.hasStatus 409++-- | The specified resource can\'t be modified at this time.+_ResourceInUseException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceInUseException =+ Core._MatchServiceError+ defaultService+ "ResourceInUseException"+ Prelude.. Core.hasStatus 409++-- | The specified resource doesn\'t exist.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"+ Prelude.. Core.hasStatus 404++-- | The operation failed because a condition wasn\'t satisfied in advance.+_ResourcePreconditionNotMetException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourcePreconditionNotMetException =+ Core._MatchServiceError+ defaultService+ "ResourcePreconditionNotMetException"+ Prelude.. Core.hasStatus 412
+ gen/Amazonka/QLDB/Types/EncryptionStatus.hs view
@@ -0,0 +1,76 @@+{-# 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.QLDB.Types.EncryptionStatus+-- 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.QLDB.Types.EncryptionStatus+ ( EncryptionStatus+ ( ..,+ EncryptionStatus_ENABLED,+ EncryptionStatus_KMS_KEY_INACCESSIBLE,+ EncryptionStatus_UPDATING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EncryptionStatus = EncryptionStatus'+ { fromEncryptionStatus ::+ 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 EncryptionStatus_ENABLED :: EncryptionStatus+pattern EncryptionStatus_ENABLED = EncryptionStatus' "ENABLED"++pattern EncryptionStatus_KMS_KEY_INACCESSIBLE :: EncryptionStatus+pattern EncryptionStatus_KMS_KEY_INACCESSIBLE = EncryptionStatus' "KMS_KEY_INACCESSIBLE"++pattern EncryptionStatus_UPDATING :: EncryptionStatus+pattern EncryptionStatus_UPDATING = EncryptionStatus' "UPDATING"++{-# COMPLETE+ EncryptionStatus_ENABLED,+ EncryptionStatus_KMS_KEY_INACCESSIBLE,+ EncryptionStatus_UPDATING,+ EncryptionStatus'+ #-}
+ gen/Amazonka/QLDB/Types/ErrorCause.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.QLDB.Types.ErrorCause+-- 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.QLDB.Types.ErrorCause+ ( ErrorCause+ ( ..,+ ErrorCause_IAM_PERMISSION_REVOKED,+ ErrorCause_KINESIS_STREAM_NOT_FOUND+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ErrorCause = ErrorCause'+ { fromErrorCause ::+ 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 ErrorCause_IAM_PERMISSION_REVOKED :: ErrorCause+pattern ErrorCause_IAM_PERMISSION_REVOKED = ErrorCause' "IAM_PERMISSION_REVOKED"++pattern ErrorCause_KINESIS_STREAM_NOT_FOUND :: ErrorCause+pattern ErrorCause_KINESIS_STREAM_NOT_FOUND = ErrorCause' "KINESIS_STREAM_NOT_FOUND"++{-# COMPLETE+ ErrorCause_IAM_PERMISSION_REVOKED,+ ErrorCause_KINESIS_STREAM_NOT_FOUND,+ ErrorCause'+ #-}
+ gen/Amazonka/QLDB/Types/ExportStatus.hs view
@@ -0,0 +1,76 @@+{-# 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.QLDB.Types.ExportStatus+-- 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.QLDB.Types.ExportStatus+ ( ExportStatus+ ( ..,+ ExportStatus_CANCELLED,+ ExportStatus_COMPLETED,+ ExportStatus_IN_PROGRESS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ExportStatus = ExportStatus'+ { fromExportStatus ::+ 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 ExportStatus_CANCELLED :: ExportStatus+pattern ExportStatus_CANCELLED = ExportStatus' "CANCELLED"++pattern ExportStatus_COMPLETED :: ExportStatus+pattern ExportStatus_COMPLETED = ExportStatus' "COMPLETED"++pattern ExportStatus_IN_PROGRESS :: ExportStatus+pattern ExportStatus_IN_PROGRESS = ExportStatus' "IN_PROGRESS"++{-# COMPLETE+ ExportStatus_CANCELLED,+ ExportStatus_COMPLETED,+ ExportStatus_IN_PROGRESS,+ ExportStatus'+ #-}
+ gen/Amazonka/QLDB/Types/JournalKinesisStreamDescription.hs view
@@ -0,0 +1,261 @@+{-# 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.QLDB.Types.JournalKinesisStreamDescription+-- 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.QLDB.Types.JournalKinesisStreamDescription 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.QLDB.Types.ErrorCause+import Amazonka.QLDB.Types.KinesisConfiguration+import Amazonka.QLDB.Types.StreamStatus++-- | Information about an Amazon QLDB journal stream, including the Amazon+-- Resource Name (ARN), stream name, creation time, current status, and the+-- parameters of the original stream creation request.+--+-- /See:/ 'newJournalKinesisStreamDescription' smart constructor.+data JournalKinesisStreamDescription = JournalKinesisStreamDescription'+ { -- | The Amazon Resource Name (ARN) of the QLDB journal stream.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The date and time, in epoch time format, when the QLDB journal stream+ -- was created. (Epoch time format is the number of seconds elapsed since+ -- 12:00:00 AM January 1, 1970 UTC.)+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | The error message that describes the reason that a stream has a status+ -- of @IMPAIRED@ or @FAILED@. This is not applicable to streams that have+ -- other status values.+ errorCause :: Prelude.Maybe ErrorCause,+ -- | The exclusive date and time that specifies when the stream ends. If this+ -- parameter is undefined, the stream runs indefinitely until you cancel+ -- it.+ exclusiveEndTime :: Prelude.Maybe Data.POSIX,+ -- | The inclusive start date and time from which to start streaming journal+ -- data.+ inclusiveStartTime :: Prelude.Maybe Data.POSIX,+ -- | The name of the ledger.+ ledgerName :: Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the IAM role that grants QLDB+ -- permissions for a journal stream to write data records to a Kinesis Data+ -- Streams resource.+ roleArn :: Prelude.Text,+ -- | The UUID (represented in Base62-encoded text) of the QLDB journal+ -- stream.+ streamId :: Prelude.Text,+ -- | The current state of the QLDB journal stream.+ status :: StreamStatus,+ -- | The configuration settings of the Amazon Kinesis Data Streams+ -- destination for a QLDB journal stream.+ kinesisConfiguration :: KinesisConfiguration,+ -- | The user-defined name of the QLDB journal stream.+ streamName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'JournalKinesisStreamDescription' 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:+--+-- 'arn', 'journalKinesisStreamDescription_arn' - The Amazon Resource Name (ARN) of the QLDB journal stream.+--+-- 'creationTime', 'journalKinesisStreamDescription_creationTime' - The date and time, in epoch time format, when the QLDB journal stream+-- was created. (Epoch time format is the number of seconds elapsed since+-- 12:00:00 AM January 1, 1970 UTC.)+--+-- 'errorCause', 'journalKinesisStreamDescription_errorCause' - The error message that describes the reason that a stream has a status+-- of @IMPAIRED@ or @FAILED@. This is not applicable to streams that have+-- other status values.+--+-- 'exclusiveEndTime', 'journalKinesisStreamDescription_exclusiveEndTime' - The exclusive date and time that specifies when the stream ends. If this+-- parameter is undefined, the stream runs indefinitely until you cancel+-- it.+--+-- 'inclusiveStartTime', 'journalKinesisStreamDescription_inclusiveStartTime' - The inclusive start date and time from which to start streaming journal+-- data.+--+-- 'ledgerName', 'journalKinesisStreamDescription_ledgerName' - The name of the ledger.+--+-- 'roleArn', 'journalKinesisStreamDescription_roleArn' - The Amazon Resource Name (ARN) of the IAM role that grants QLDB+-- permissions for a journal stream to write data records to a Kinesis Data+-- Streams resource.+--+-- 'streamId', 'journalKinesisStreamDescription_streamId' - The UUID (represented in Base62-encoded text) of the QLDB journal+-- stream.+--+-- 'status', 'journalKinesisStreamDescription_status' - The current state of the QLDB journal stream.+--+-- 'kinesisConfiguration', 'journalKinesisStreamDescription_kinesisConfiguration' - The configuration settings of the Amazon Kinesis Data Streams+-- destination for a QLDB journal stream.+--+-- 'streamName', 'journalKinesisStreamDescription_streamName' - The user-defined name of the QLDB journal stream.+newJournalKinesisStreamDescription ::+ -- | 'ledgerName'+ Prelude.Text ->+ -- | 'roleArn'+ Prelude.Text ->+ -- | 'streamId'+ Prelude.Text ->+ -- | 'status'+ StreamStatus ->+ -- | 'kinesisConfiguration'+ KinesisConfiguration ->+ -- | 'streamName'+ Prelude.Text ->+ JournalKinesisStreamDescription+newJournalKinesisStreamDescription+ pLedgerName_+ pRoleArn_+ pStreamId_+ pStatus_+ pKinesisConfiguration_+ pStreamName_ =+ JournalKinesisStreamDescription'+ { arn =+ Prelude.Nothing,+ creationTime = Prelude.Nothing,+ errorCause = Prelude.Nothing,+ exclusiveEndTime = Prelude.Nothing,+ inclusiveStartTime = Prelude.Nothing,+ ledgerName = pLedgerName_,+ roleArn = pRoleArn_,+ streamId = pStreamId_,+ status = pStatus_,+ kinesisConfiguration =+ pKinesisConfiguration_,+ streamName = pStreamName_+ }++-- | The Amazon Resource Name (ARN) of the QLDB journal stream.+journalKinesisStreamDescription_arn :: Lens.Lens' JournalKinesisStreamDescription (Prelude.Maybe Prelude.Text)+journalKinesisStreamDescription_arn = Lens.lens (\JournalKinesisStreamDescription' {arn} -> arn) (\s@JournalKinesisStreamDescription' {} a -> s {arn = a} :: JournalKinesisStreamDescription)++-- | The date and time, in epoch time format, when the QLDB journal stream+-- was created. (Epoch time format is the number of seconds elapsed since+-- 12:00:00 AM January 1, 1970 UTC.)+journalKinesisStreamDescription_creationTime :: Lens.Lens' JournalKinesisStreamDescription (Prelude.Maybe Prelude.UTCTime)+journalKinesisStreamDescription_creationTime = Lens.lens (\JournalKinesisStreamDescription' {creationTime} -> creationTime) (\s@JournalKinesisStreamDescription' {} a -> s {creationTime = a} :: JournalKinesisStreamDescription) Prelude.. Lens.mapping Data._Time++-- | The error message that describes the reason that a stream has a status+-- of @IMPAIRED@ or @FAILED@. This is not applicable to streams that have+-- other status values.+journalKinesisStreamDescription_errorCause :: Lens.Lens' JournalKinesisStreamDescription (Prelude.Maybe ErrorCause)+journalKinesisStreamDescription_errorCause = Lens.lens (\JournalKinesisStreamDescription' {errorCause} -> errorCause) (\s@JournalKinesisStreamDescription' {} a -> s {errorCause = a} :: JournalKinesisStreamDescription)++-- | The exclusive date and time that specifies when the stream ends. If this+-- parameter is undefined, the stream runs indefinitely until you cancel+-- it.+journalKinesisStreamDescription_exclusiveEndTime :: Lens.Lens' JournalKinesisStreamDescription (Prelude.Maybe Prelude.UTCTime)+journalKinesisStreamDescription_exclusiveEndTime = Lens.lens (\JournalKinesisStreamDescription' {exclusiveEndTime} -> exclusiveEndTime) (\s@JournalKinesisStreamDescription' {} a -> s {exclusiveEndTime = a} :: JournalKinesisStreamDescription) Prelude.. Lens.mapping Data._Time++-- | The inclusive start date and time from which to start streaming journal+-- data.+journalKinesisStreamDescription_inclusiveStartTime :: Lens.Lens' JournalKinesisStreamDescription (Prelude.Maybe Prelude.UTCTime)+journalKinesisStreamDescription_inclusiveStartTime = Lens.lens (\JournalKinesisStreamDescription' {inclusiveStartTime} -> inclusiveStartTime) (\s@JournalKinesisStreamDescription' {} a -> s {inclusiveStartTime = a} :: JournalKinesisStreamDescription) Prelude.. Lens.mapping Data._Time++-- | The name of the ledger.+journalKinesisStreamDescription_ledgerName :: Lens.Lens' JournalKinesisStreamDescription Prelude.Text+journalKinesisStreamDescription_ledgerName = Lens.lens (\JournalKinesisStreamDescription' {ledgerName} -> ledgerName) (\s@JournalKinesisStreamDescription' {} a -> s {ledgerName = a} :: JournalKinesisStreamDescription)++-- | The Amazon Resource Name (ARN) of the IAM role that grants QLDB+-- permissions for a journal stream to write data records to a Kinesis Data+-- Streams resource.+journalKinesisStreamDescription_roleArn :: Lens.Lens' JournalKinesisStreamDescription Prelude.Text+journalKinesisStreamDescription_roleArn = Lens.lens (\JournalKinesisStreamDescription' {roleArn} -> roleArn) (\s@JournalKinesisStreamDescription' {} a -> s {roleArn = a} :: JournalKinesisStreamDescription)++-- | The UUID (represented in Base62-encoded text) of the QLDB journal+-- stream.+journalKinesisStreamDescription_streamId :: Lens.Lens' JournalKinesisStreamDescription Prelude.Text+journalKinesisStreamDescription_streamId = Lens.lens (\JournalKinesisStreamDescription' {streamId} -> streamId) (\s@JournalKinesisStreamDescription' {} a -> s {streamId = a} :: JournalKinesisStreamDescription)++-- | The current state of the QLDB journal stream.+journalKinesisStreamDescription_status :: Lens.Lens' JournalKinesisStreamDescription StreamStatus+journalKinesisStreamDescription_status = Lens.lens (\JournalKinesisStreamDescription' {status} -> status) (\s@JournalKinesisStreamDescription' {} a -> s {status = a} :: JournalKinesisStreamDescription)++-- | The configuration settings of the Amazon Kinesis Data Streams+-- destination for a QLDB journal stream.+journalKinesisStreamDescription_kinesisConfiguration :: Lens.Lens' JournalKinesisStreamDescription KinesisConfiguration+journalKinesisStreamDescription_kinesisConfiguration = Lens.lens (\JournalKinesisStreamDescription' {kinesisConfiguration} -> kinesisConfiguration) (\s@JournalKinesisStreamDescription' {} a -> s {kinesisConfiguration = a} :: JournalKinesisStreamDescription)++-- | The user-defined name of the QLDB journal stream.+journalKinesisStreamDescription_streamName :: Lens.Lens' JournalKinesisStreamDescription Prelude.Text+journalKinesisStreamDescription_streamName = Lens.lens (\JournalKinesisStreamDescription' {streamName} -> streamName) (\s@JournalKinesisStreamDescription' {} a -> s {streamName = a} :: JournalKinesisStreamDescription)++instance+ Data.FromJSON+ JournalKinesisStreamDescription+ where+ parseJSON =+ Data.withObject+ "JournalKinesisStreamDescription"+ ( \x ->+ JournalKinesisStreamDescription'+ Prelude.<$> (x Data..:? "Arn")+ Prelude.<*> (x Data..:? "CreationTime")+ Prelude.<*> (x Data..:? "ErrorCause")+ Prelude.<*> (x Data..:? "ExclusiveEndTime")+ Prelude.<*> (x Data..:? "InclusiveStartTime")+ Prelude.<*> (x Data..: "LedgerName")+ Prelude.<*> (x Data..: "RoleArn")+ Prelude.<*> (x Data..: "StreamId")+ Prelude.<*> (x Data..: "Status")+ Prelude.<*> (x Data..: "KinesisConfiguration")+ Prelude.<*> (x Data..: "StreamName")+ )++instance+ Prelude.Hashable+ JournalKinesisStreamDescription+ where+ hashWithSalt+ _salt+ JournalKinesisStreamDescription' {..} =+ _salt+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` creationTime+ `Prelude.hashWithSalt` errorCause+ `Prelude.hashWithSalt` exclusiveEndTime+ `Prelude.hashWithSalt` inclusiveStartTime+ `Prelude.hashWithSalt` ledgerName+ `Prelude.hashWithSalt` roleArn+ `Prelude.hashWithSalt` streamId+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` kinesisConfiguration+ `Prelude.hashWithSalt` streamName++instance+ Prelude.NFData+ JournalKinesisStreamDescription+ where+ rnf JournalKinesisStreamDescription' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf errorCause+ `Prelude.seq` Prelude.rnf exclusiveEndTime+ `Prelude.seq` Prelude.rnf inclusiveStartTime+ `Prelude.seq` Prelude.rnf ledgerName+ `Prelude.seq` Prelude.rnf roleArn+ `Prelude.seq` Prelude.rnf streamId+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf kinesisConfiguration+ `Prelude.seq` Prelude.rnf streamName
+ gen/Amazonka/QLDB/Types/JournalS3ExportDescription.hs view
@@ -0,0 +1,233 @@+{-# 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.QLDB.Types.JournalS3ExportDescription+-- 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.QLDB.Types.JournalS3ExportDescription 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.QLDB.Types.ExportStatus+import Amazonka.QLDB.Types.OutputFormat+import Amazonka.QLDB.Types.S3ExportConfiguration++-- | Information about a journal export job, including the ledger name,+-- export ID, creation time, current status, and the parameters of the+-- original export creation request.+--+-- /See:/ 'newJournalS3ExportDescription' smart constructor.+data JournalS3ExportDescription = JournalS3ExportDescription'+ { -- | The output format of the exported journal data.+ outputFormat :: Prelude.Maybe OutputFormat,+ -- | The name of the ledger.+ ledgerName :: Prelude.Text,+ -- | The UUID (represented in Base62-encoded text) of the journal export job.+ exportId :: Prelude.Text,+ -- | The date and time, in epoch time format, when the export job was+ -- created. (Epoch time format is the number of seconds elapsed since+ -- 12:00:00 AM January 1, 1970 UTC.)+ exportCreationTime :: Data.POSIX,+ -- | The current state of the journal export job.+ status :: ExportStatus,+ -- | The inclusive start date and time for the range of journal contents that+ -- was specified in the original export request.+ inclusiveStartTime :: Data.POSIX,+ -- | The exclusive end date and time for the range of journal contents that+ -- was specified in the original export request.+ exclusiveEndTime :: Data.POSIX,+ s3ExportConfiguration :: S3ExportConfiguration,+ -- | The Amazon Resource Name (ARN) of the IAM role that grants QLDB+ -- permissions for a journal export job to do the following:+ --+ -- - Write objects into your Amazon Simple Storage Service (Amazon S3)+ -- bucket.+ --+ -- - (Optional) Use your customer managed key in Key Management Service+ -- (KMS) for server-side encryption of your exported data.+ roleArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'JournalS3ExportDescription' 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:+--+-- 'outputFormat', 'journalS3ExportDescription_outputFormat' - The output format of the exported journal data.+--+-- 'ledgerName', 'journalS3ExportDescription_ledgerName' - The name of the ledger.+--+-- 'exportId', 'journalS3ExportDescription_exportId' - The UUID (represented in Base62-encoded text) of the journal export job.+--+-- 'exportCreationTime', 'journalS3ExportDescription_exportCreationTime' - The date and time, in epoch time format, when the export job was+-- created. (Epoch time format is the number of seconds elapsed since+-- 12:00:00 AM January 1, 1970 UTC.)+--+-- 'status', 'journalS3ExportDescription_status' - The current state of the journal export job.+--+-- 'inclusiveStartTime', 'journalS3ExportDescription_inclusiveStartTime' - The inclusive start date and time for the range of journal contents that+-- was specified in the original export request.+--+-- 'exclusiveEndTime', 'journalS3ExportDescription_exclusiveEndTime' - The exclusive end date and time for the range of journal contents that+-- was specified in the original export request.+--+-- 's3ExportConfiguration', 'journalS3ExportDescription_s3ExportConfiguration' - Undocumented member.+--+-- 'roleArn', 'journalS3ExportDescription_roleArn' - The Amazon Resource Name (ARN) of the IAM role that grants QLDB+-- permissions for a journal export job to do the following:+--+-- - Write objects into your Amazon Simple Storage Service (Amazon S3)+-- bucket.+--+-- - (Optional) Use your customer managed key in Key Management Service+-- (KMS) for server-side encryption of your exported data.+newJournalS3ExportDescription ::+ -- | 'ledgerName'+ Prelude.Text ->+ -- | 'exportId'+ Prelude.Text ->+ -- | 'exportCreationTime'+ Prelude.UTCTime ->+ -- | 'status'+ ExportStatus ->+ -- | 'inclusiveStartTime'+ Prelude.UTCTime ->+ -- | 'exclusiveEndTime'+ Prelude.UTCTime ->+ -- | 's3ExportConfiguration'+ S3ExportConfiguration ->+ -- | 'roleArn'+ Prelude.Text ->+ JournalS3ExportDescription+newJournalS3ExportDescription+ pLedgerName_+ pExportId_+ pExportCreationTime_+ pStatus_+ pInclusiveStartTime_+ pExclusiveEndTime_+ pS3ExportConfiguration_+ pRoleArn_ =+ JournalS3ExportDescription'+ { outputFormat =+ Prelude.Nothing,+ ledgerName = pLedgerName_,+ exportId = pExportId_,+ exportCreationTime =+ Data._Time Lens.# pExportCreationTime_,+ status = pStatus_,+ inclusiveStartTime =+ Data._Time Lens.# pInclusiveStartTime_,+ exclusiveEndTime =+ Data._Time Lens.# pExclusiveEndTime_,+ s3ExportConfiguration = pS3ExportConfiguration_,+ roleArn = pRoleArn_+ }++-- | The output format of the exported journal data.+journalS3ExportDescription_outputFormat :: Lens.Lens' JournalS3ExportDescription (Prelude.Maybe OutputFormat)+journalS3ExportDescription_outputFormat = Lens.lens (\JournalS3ExportDescription' {outputFormat} -> outputFormat) (\s@JournalS3ExportDescription' {} a -> s {outputFormat = a} :: JournalS3ExportDescription)++-- | The name of the ledger.+journalS3ExportDescription_ledgerName :: Lens.Lens' JournalS3ExportDescription Prelude.Text+journalS3ExportDescription_ledgerName = Lens.lens (\JournalS3ExportDescription' {ledgerName} -> ledgerName) (\s@JournalS3ExportDescription' {} a -> s {ledgerName = a} :: JournalS3ExportDescription)++-- | The UUID (represented in Base62-encoded text) of the journal export job.+journalS3ExportDescription_exportId :: Lens.Lens' JournalS3ExportDescription Prelude.Text+journalS3ExportDescription_exportId = Lens.lens (\JournalS3ExportDescription' {exportId} -> exportId) (\s@JournalS3ExportDescription' {} a -> s {exportId = a} :: JournalS3ExportDescription)++-- | The date and time, in epoch time format, when the export job was+-- created. (Epoch time format is the number of seconds elapsed since+-- 12:00:00 AM January 1, 1970 UTC.)+journalS3ExportDescription_exportCreationTime :: Lens.Lens' JournalS3ExportDescription Prelude.UTCTime+journalS3ExportDescription_exportCreationTime = Lens.lens (\JournalS3ExportDescription' {exportCreationTime} -> exportCreationTime) (\s@JournalS3ExportDescription' {} a -> s {exportCreationTime = a} :: JournalS3ExportDescription) Prelude.. Data._Time++-- | The current state of the journal export job.+journalS3ExportDescription_status :: Lens.Lens' JournalS3ExportDescription ExportStatus+journalS3ExportDescription_status = Lens.lens (\JournalS3ExportDescription' {status} -> status) (\s@JournalS3ExportDescription' {} a -> s {status = a} :: JournalS3ExportDescription)++-- | The inclusive start date and time for the range of journal contents that+-- was specified in the original export request.+journalS3ExportDescription_inclusiveStartTime :: Lens.Lens' JournalS3ExportDescription Prelude.UTCTime+journalS3ExportDescription_inclusiveStartTime = Lens.lens (\JournalS3ExportDescription' {inclusiveStartTime} -> inclusiveStartTime) (\s@JournalS3ExportDescription' {} a -> s {inclusiveStartTime = a} :: JournalS3ExportDescription) Prelude.. Data._Time++-- | The exclusive end date and time for the range of journal contents that+-- was specified in the original export request.+journalS3ExportDescription_exclusiveEndTime :: Lens.Lens' JournalS3ExportDescription Prelude.UTCTime+journalS3ExportDescription_exclusiveEndTime = Lens.lens (\JournalS3ExportDescription' {exclusiveEndTime} -> exclusiveEndTime) (\s@JournalS3ExportDescription' {} a -> s {exclusiveEndTime = a} :: JournalS3ExportDescription) Prelude.. Data._Time++-- | Undocumented member.+journalS3ExportDescription_s3ExportConfiguration :: Lens.Lens' JournalS3ExportDescription S3ExportConfiguration+journalS3ExportDescription_s3ExportConfiguration = Lens.lens (\JournalS3ExportDescription' {s3ExportConfiguration} -> s3ExportConfiguration) (\s@JournalS3ExportDescription' {} a -> s {s3ExportConfiguration = a} :: JournalS3ExportDescription)++-- | The Amazon Resource Name (ARN) of the IAM role that grants QLDB+-- permissions for a journal export job to do the following:+--+-- - Write objects into your Amazon Simple Storage Service (Amazon S3)+-- bucket.+--+-- - (Optional) Use your customer managed key in Key Management Service+-- (KMS) for server-side encryption of your exported data.+journalS3ExportDescription_roleArn :: Lens.Lens' JournalS3ExportDescription Prelude.Text+journalS3ExportDescription_roleArn = Lens.lens (\JournalS3ExportDescription' {roleArn} -> roleArn) (\s@JournalS3ExportDescription' {} a -> s {roleArn = a} :: JournalS3ExportDescription)++instance Data.FromJSON JournalS3ExportDescription where+ parseJSON =+ Data.withObject+ "JournalS3ExportDescription"+ ( \x ->+ JournalS3ExportDescription'+ Prelude.<$> (x Data..:? "OutputFormat")+ Prelude.<*> (x Data..: "LedgerName")+ Prelude.<*> (x Data..: "ExportId")+ Prelude.<*> (x Data..: "ExportCreationTime")+ Prelude.<*> (x Data..: "Status")+ Prelude.<*> (x Data..: "InclusiveStartTime")+ Prelude.<*> (x Data..: "ExclusiveEndTime")+ Prelude.<*> (x Data..: "S3ExportConfiguration")+ Prelude.<*> (x Data..: "RoleArn")+ )++instance Prelude.Hashable JournalS3ExportDescription where+ hashWithSalt _salt JournalS3ExportDescription' {..} =+ _salt+ `Prelude.hashWithSalt` outputFormat+ `Prelude.hashWithSalt` ledgerName+ `Prelude.hashWithSalt` exportId+ `Prelude.hashWithSalt` exportCreationTime+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` inclusiveStartTime+ `Prelude.hashWithSalt` exclusiveEndTime+ `Prelude.hashWithSalt` s3ExportConfiguration+ `Prelude.hashWithSalt` roleArn++instance Prelude.NFData JournalS3ExportDescription where+ rnf JournalS3ExportDescription' {..} =+ Prelude.rnf outputFormat+ `Prelude.seq` Prelude.rnf ledgerName+ `Prelude.seq` Prelude.rnf exportId+ `Prelude.seq` Prelude.rnf exportCreationTime+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf inclusiveStartTime+ `Prelude.seq` Prelude.rnf exclusiveEndTime+ `Prelude.seq` Prelude.rnf s3ExportConfiguration+ `Prelude.seq` Prelude.rnf roleArn
+ gen/Amazonka/QLDB/Types/KinesisConfiguration.hs view
@@ -0,0 +1,125 @@+{-# 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.QLDB.Types.KinesisConfiguration+-- 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.QLDB.Types.KinesisConfiguration 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++-- | The configuration settings of the Amazon Kinesis Data Streams+-- destination for an Amazon QLDB journal stream.+--+-- /See:/ 'newKinesisConfiguration' smart constructor.+data KinesisConfiguration = KinesisConfiguration'+ { -- | Enables QLDB to publish multiple data records in a single Kinesis Data+ -- Streams record, increasing the number of records sent per API call.+ --+ -- /This option is enabled by default./ Record aggregation has important+ -- implications for processing records and requires de-aggregation in your+ -- stream consumer. To learn more, see+ -- <https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html KPL Key Concepts>+ -- and+ -- <https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-consumer-deaggregation.html Consumer De-aggregation>+ -- in the /Amazon Kinesis Data Streams Developer Guide/.+ aggregationEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.+ streamArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'KinesisConfiguration' 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:+--+-- 'aggregationEnabled', 'kinesisConfiguration_aggregationEnabled' - Enables QLDB to publish multiple data records in a single Kinesis Data+-- Streams record, increasing the number of records sent per API call.+--+-- /This option is enabled by default./ Record aggregation has important+-- implications for processing records and requires de-aggregation in your+-- stream consumer. To learn more, see+-- <https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html KPL Key Concepts>+-- and+-- <https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-consumer-deaggregation.html Consumer De-aggregation>+-- in the /Amazon Kinesis Data Streams Developer Guide/.+--+-- 'streamArn', 'kinesisConfiguration_streamArn' - The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.+newKinesisConfiguration ::+ -- | 'streamArn'+ Prelude.Text ->+ KinesisConfiguration+newKinesisConfiguration pStreamArn_ =+ KinesisConfiguration'+ { aggregationEnabled =+ Prelude.Nothing,+ streamArn = pStreamArn_+ }++-- | Enables QLDB to publish multiple data records in a single Kinesis Data+-- Streams record, increasing the number of records sent per API call.+--+-- /This option is enabled by default./ Record aggregation has important+-- implications for processing records and requires de-aggregation in your+-- stream consumer. To learn more, see+-- <https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html KPL Key Concepts>+-- and+-- <https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-consumer-deaggregation.html Consumer De-aggregation>+-- in the /Amazon Kinesis Data Streams Developer Guide/.+kinesisConfiguration_aggregationEnabled :: Lens.Lens' KinesisConfiguration (Prelude.Maybe Prelude.Bool)+kinesisConfiguration_aggregationEnabled = Lens.lens (\KinesisConfiguration' {aggregationEnabled} -> aggregationEnabled) (\s@KinesisConfiguration' {} a -> s {aggregationEnabled = a} :: KinesisConfiguration)++-- | The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.+kinesisConfiguration_streamArn :: Lens.Lens' KinesisConfiguration Prelude.Text+kinesisConfiguration_streamArn = Lens.lens (\KinesisConfiguration' {streamArn} -> streamArn) (\s@KinesisConfiguration' {} a -> s {streamArn = a} :: KinesisConfiguration)++instance Data.FromJSON KinesisConfiguration where+ parseJSON =+ Data.withObject+ "KinesisConfiguration"+ ( \x ->+ KinesisConfiguration'+ Prelude.<$> (x Data..:? "AggregationEnabled")+ Prelude.<*> (x Data..: "StreamArn")+ )++instance Prelude.Hashable KinesisConfiguration where+ hashWithSalt _salt KinesisConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` aggregationEnabled+ `Prelude.hashWithSalt` streamArn++instance Prelude.NFData KinesisConfiguration where+ rnf KinesisConfiguration' {..} =+ Prelude.rnf aggregationEnabled+ `Prelude.seq` Prelude.rnf streamArn++instance Data.ToJSON KinesisConfiguration where+ toJSON KinesisConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("AggregationEnabled" Data..=)+ Prelude.<$> aggregationEnabled,+ Prelude.Just ("StreamArn" Data..= streamArn)+ ]+ )
+ gen/Amazonka/QLDB/Types/LedgerEncryptionDescription.hs view
@@ -0,0 +1,201 @@+{-# 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.QLDB.Types.LedgerEncryptionDescription+-- 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.QLDB.Types.LedgerEncryptionDescription 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.QLDB.Types.EncryptionStatus++-- | Information about the encryption of data at rest in an Amazon QLDB+-- ledger. This includes the current status, the key in Key Management+-- Service (KMS), and when the key became inaccessible (in the case of an+-- error).+--+-- For more information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html Encryption at rest>+-- in the /Amazon QLDB Developer Guide/.+--+-- /See:/ 'newLedgerEncryptionDescription' smart constructor.+data LedgerEncryptionDescription = LedgerEncryptionDescription'+ { -- | The date and time, in epoch time format, when the KMS key first became+ -- inaccessible, in the case of an error. (Epoch time format is the number+ -- of seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.)+ --+ -- This parameter is undefined if the KMS key is accessible.+ inaccessibleKmsKeyDateTime :: Prelude.Maybe Data.POSIX,+ -- | The Amazon Resource Name (ARN) of the customer managed KMS key that the+ -- ledger uses for encryption at rest. If this parameter is undefined, the+ -- ledger uses an Amazon Web Services owned KMS key for encryption.+ kmsKeyArn :: Prelude.Text,+ -- | The current state of encryption at rest for the ledger. This can be one+ -- of the following values:+ --+ -- - @ENABLED@: Encryption is fully enabled using the specified key.+ --+ -- - @UPDATING@: The ledger is actively processing the specified key+ -- change.+ --+ -- Key changes in QLDB are asynchronous. The ledger is fully accessible+ -- without any performance impact while the key change is being+ -- processed. The amount of time it takes to update a key varies+ -- depending on the ledger size.+ --+ -- - @KMS_KEY_INACCESSIBLE@: The specified customer managed KMS key is+ -- not accessible, and the ledger is impaired. Either the key was+ -- disabled or deleted, or the grants on the key were revoked. When a+ -- ledger is impaired, it is not accessible and does not accept any+ -- read or write requests.+ --+ -- An impaired ledger automatically returns to an active state after+ -- you restore the grants on the key, or re-enable the key that was+ -- disabled. However, deleting a customer managed KMS key is+ -- irreversible. After a key is deleted, you can no longer access the+ -- ledgers that are protected with that key, and the data becomes+ -- unrecoverable permanently.+ encryptionStatus :: EncryptionStatus+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LedgerEncryptionDescription' 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:+--+-- 'inaccessibleKmsKeyDateTime', 'ledgerEncryptionDescription_inaccessibleKmsKeyDateTime' - The date and time, in epoch time format, when the KMS key first became+-- inaccessible, in the case of an error. (Epoch time format is the number+-- of seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.)+--+-- This parameter is undefined if the KMS key is accessible.+--+-- 'kmsKeyArn', 'ledgerEncryptionDescription_kmsKeyArn' - The Amazon Resource Name (ARN) of the customer managed KMS key that the+-- ledger uses for encryption at rest. If this parameter is undefined, the+-- ledger uses an Amazon Web Services owned KMS key for encryption.+--+-- 'encryptionStatus', 'ledgerEncryptionDescription_encryptionStatus' - The current state of encryption at rest for the ledger. This can be one+-- of the following values:+--+-- - @ENABLED@: Encryption is fully enabled using the specified key.+--+-- - @UPDATING@: The ledger is actively processing the specified key+-- change.+--+-- Key changes in QLDB are asynchronous. The ledger is fully accessible+-- without any performance impact while the key change is being+-- processed. The amount of time it takes to update a key varies+-- depending on the ledger size.+--+-- - @KMS_KEY_INACCESSIBLE@: The specified customer managed KMS key is+-- not accessible, and the ledger is impaired. Either the key was+-- disabled or deleted, or the grants on the key were revoked. When a+-- ledger is impaired, it is not accessible and does not accept any+-- read or write requests.+--+-- An impaired ledger automatically returns to an active state after+-- you restore the grants on the key, or re-enable the key that was+-- disabled. However, deleting a customer managed KMS key is+-- irreversible. After a key is deleted, you can no longer access the+-- ledgers that are protected with that key, and the data becomes+-- unrecoverable permanently.+newLedgerEncryptionDescription ::+ -- | 'kmsKeyArn'+ Prelude.Text ->+ -- | 'encryptionStatus'+ EncryptionStatus ->+ LedgerEncryptionDescription+newLedgerEncryptionDescription+ pKmsKeyArn_+ pEncryptionStatus_ =+ LedgerEncryptionDescription'+ { inaccessibleKmsKeyDateTime =+ Prelude.Nothing,+ kmsKeyArn = pKmsKeyArn_,+ encryptionStatus = pEncryptionStatus_+ }++-- | The date and time, in epoch time format, when the KMS key first became+-- inaccessible, in the case of an error. (Epoch time format is the number+-- of seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.)+--+-- This parameter is undefined if the KMS key is accessible.+ledgerEncryptionDescription_inaccessibleKmsKeyDateTime :: Lens.Lens' LedgerEncryptionDescription (Prelude.Maybe Prelude.UTCTime)+ledgerEncryptionDescription_inaccessibleKmsKeyDateTime = Lens.lens (\LedgerEncryptionDescription' {inaccessibleKmsKeyDateTime} -> inaccessibleKmsKeyDateTime) (\s@LedgerEncryptionDescription' {} a -> s {inaccessibleKmsKeyDateTime = a} :: LedgerEncryptionDescription) Prelude.. Lens.mapping Data._Time++-- | The Amazon Resource Name (ARN) of the customer managed KMS key that the+-- ledger uses for encryption at rest. If this parameter is undefined, the+-- ledger uses an Amazon Web Services owned KMS key for encryption.+ledgerEncryptionDescription_kmsKeyArn :: Lens.Lens' LedgerEncryptionDescription Prelude.Text+ledgerEncryptionDescription_kmsKeyArn = Lens.lens (\LedgerEncryptionDescription' {kmsKeyArn} -> kmsKeyArn) (\s@LedgerEncryptionDescription' {} a -> s {kmsKeyArn = a} :: LedgerEncryptionDescription)++-- | The current state of encryption at rest for the ledger. This can be one+-- of the following values:+--+-- - @ENABLED@: Encryption is fully enabled using the specified key.+--+-- - @UPDATING@: The ledger is actively processing the specified key+-- change.+--+-- Key changes in QLDB are asynchronous. The ledger is fully accessible+-- without any performance impact while the key change is being+-- processed. The amount of time it takes to update a key varies+-- depending on the ledger size.+--+-- - @KMS_KEY_INACCESSIBLE@: The specified customer managed KMS key is+-- not accessible, and the ledger is impaired. Either the key was+-- disabled or deleted, or the grants on the key were revoked. When a+-- ledger is impaired, it is not accessible and does not accept any+-- read or write requests.+--+-- An impaired ledger automatically returns to an active state after+-- you restore the grants on the key, or re-enable the key that was+-- disabled. However, deleting a customer managed KMS key is+-- irreversible. After a key is deleted, you can no longer access the+-- ledgers that are protected with that key, and the data becomes+-- unrecoverable permanently.+ledgerEncryptionDescription_encryptionStatus :: Lens.Lens' LedgerEncryptionDescription EncryptionStatus+ledgerEncryptionDescription_encryptionStatus = Lens.lens (\LedgerEncryptionDescription' {encryptionStatus} -> encryptionStatus) (\s@LedgerEncryptionDescription' {} a -> s {encryptionStatus = a} :: LedgerEncryptionDescription)++instance Data.FromJSON LedgerEncryptionDescription where+ parseJSON =+ Data.withObject+ "LedgerEncryptionDescription"+ ( \x ->+ LedgerEncryptionDescription'+ Prelude.<$> (x Data..:? "InaccessibleKmsKeyDateTime")+ Prelude.<*> (x Data..: "KmsKeyArn")+ Prelude.<*> (x Data..: "EncryptionStatus")+ )++instance Prelude.Hashable LedgerEncryptionDescription where+ hashWithSalt _salt LedgerEncryptionDescription' {..} =+ _salt+ `Prelude.hashWithSalt` inaccessibleKmsKeyDateTime+ `Prelude.hashWithSalt` kmsKeyArn+ `Prelude.hashWithSalt` encryptionStatus++instance Prelude.NFData LedgerEncryptionDescription where+ rnf LedgerEncryptionDescription' {..} =+ Prelude.rnf inaccessibleKmsKeyDateTime+ `Prelude.seq` Prelude.rnf kmsKeyArn+ `Prelude.seq` Prelude.rnf encryptionStatus
+ gen/Amazonka/QLDB/Types/LedgerState.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.QLDB.Types.LedgerState+-- 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.QLDB.Types.LedgerState+ ( LedgerState+ ( ..,+ LedgerState_ACTIVE,+ LedgerState_CREATING,+ LedgerState_DELETED,+ LedgerState_DELETING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LedgerState = LedgerState'+ { fromLedgerState ::+ 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 LedgerState_ACTIVE :: LedgerState+pattern LedgerState_ACTIVE = LedgerState' "ACTIVE"++pattern LedgerState_CREATING :: LedgerState+pattern LedgerState_CREATING = LedgerState' "CREATING"++pattern LedgerState_DELETED :: LedgerState+pattern LedgerState_DELETED = LedgerState' "DELETED"++pattern LedgerState_DELETING :: LedgerState+pattern LedgerState_DELETING = LedgerState' "DELETING"++{-# COMPLETE+ LedgerState_ACTIVE,+ LedgerState_CREATING,+ LedgerState_DELETED,+ LedgerState_DELETING,+ LedgerState'+ #-}
+ gen/Amazonka/QLDB/Types/LedgerSummary.hs view
@@ -0,0 +1,104 @@+{-# 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.QLDB.Types.LedgerSummary+-- 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.QLDB.Types.LedgerSummary 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.QLDB.Types.LedgerState++-- | Information about a ledger, including its name, state, and when it was+-- created.+--+-- /See:/ 'newLedgerSummary' smart constructor.+data LedgerSummary = LedgerSummary'+ { -- | The date and time, in epoch time format, when the ledger was created.+ -- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+ -- January 1, 1970 UTC.)+ creationDateTime :: Prelude.Maybe Data.POSIX,+ -- | The name of the ledger.+ name :: Prelude.Maybe Prelude.Text,+ -- | The current status of the ledger.+ state :: Prelude.Maybe LedgerState+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LedgerSummary' 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:+--+-- 'creationDateTime', 'ledgerSummary_creationDateTime' - The date and time, in epoch time format, when the ledger was created.+-- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+-- January 1, 1970 UTC.)+--+-- 'name', 'ledgerSummary_name' - The name of the ledger.+--+-- 'state', 'ledgerSummary_state' - The current status of the ledger.+newLedgerSummary ::+ LedgerSummary+newLedgerSummary =+ LedgerSummary'+ { creationDateTime = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing+ }++-- | The date and time, in epoch time format, when the ledger was created.+-- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+-- January 1, 1970 UTC.)+ledgerSummary_creationDateTime :: Lens.Lens' LedgerSummary (Prelude.Maybe Prelude.UTCTime)+ledgerSummary_creationDateTime = Lens.lens (\LedgerSummary' {creationDateTime} -> creationDateTime) (\s@LedgerSummary' {} a -> s {creationDateTime = a} :: LedgerSummary) Prelude.. Lens.mapping Data._Time++-- | The name of the ledger.+ledgerSummary_name :: Lens.Lens' LedgerSummary (Prelude.Maybe Prelude.Text)+ledgerSummary_name = Lens.lens (\LedgerSummary' {name} -> name) (\s@LedgerSummary' {} a -> s {name = a} :: LedgerSummary)++-- | The current status of the ledger.+ledgerSummary_state :: Lens.Lens' LedgerSummary (Prelude.Maybe LedgerState)+ledgerSummary_state = Lens.lens (\LedgerSummary' {state} -> state) (\s@LedgerSummary' {} a -> s {state = a} :: LedgerSummary)++instance Data.FromJSON LedgerSummary where+ parseJSON =+ Data.withObject+ "LedgerSummary"+ ( \x ->+ LedgerSummary'+ Prelude.<$> (x Data..:? "CreationDateTime")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "State")+ )++instance Prelude.Hashable LedgerSummary where+ hashWithSalt _salt LedgerSummary' {..} =+ _salt+ `Prelude.hashWithSalt` creationDateTime+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` state++instance Prelude.NFData LedgerSummary where+ rnf LedgerSummary' {..} =+ Prelude.rnf creationDateTime+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state
+ gen/Amazonka/QLDB/Types/OutputFormat.hs view
@@ -0,0 +1,76 @@+{-# 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.QLDB.Types.OutputFormat+-- 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.QLDB.Types.OutputFormat+ ( OutputFormat+ ( ..,+ OutputFormat_ION_BINARY,+ OutputFormat_ION_TEXT,+ OutputFormat_JSON+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype OutputFormat = OutputFormat'+ { fromOutputFormat ::+ 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 OutputFormat_ION_BINARY :: OutputFormat+pattern OutputFormat_ION_BINARY = OutputFormat' "ION_BINARY"++pattern OutputFormat_ION_TEXT :: OutputFormat+pattern OutputFormat_ION_TEXT = OutputFormat' "ION_TEXT"++pattern OutputFormat_JSON :: OutputFormat+pattern OutputFormat_JSON = OutputFormat' "JSON"++{-# COMPLETE+ OutputFormat_ION_BINARY,+ OutputFormat_ION_TEXT,+ OutputFormat_JSON,+ OutputFormat'+ #-}
+ gen/Amazonka/QLDB/Types/PermissionsMode.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.QLDB.Types.PermissionsMode+-- 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.QLDB.Types.PermissionsMode+ ( PermissionsMode+ ( ..,+ PermissionsMode_ALLOW_ALL,+ PermissionsMode_STANDARD+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PermissionsMode = PermissionsMode'+ { fromPermissionsMode ::+ 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 PermissionsMode_ALLOW_ALL :: PermissionsMode+pattern PermissionsMode_ALLOW_ALL = PermissionsMode' "ALLOW_ALL"++pattern PermissionsMode_STANDARD :: PermissionsMode+pattern PermissionsMode_STANDARD = PermissionsMode' "STANDARD"++{-# COMPLETE+ PermissionsMode_ALLOW_ALL,+ PermissionsMode_STANDARD,+ PermissionsMode'+ #-}
+ gen/Amazonka/QLDB/Types/S3EncryptionConfiguration.hs view
@@ -0,0 +1,134 @@+{-# 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.QLDB.Types.S3EncryptionConfiguration+-- 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.QLDB.Types.S3EncryptionConfiguration 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.QLDB.Types.S3ObjectEncryptionType++-- | The encryption settings that are used by a journal export job to write+-- data in an Amazon Simple Storage Service (Amazon S3) bucket.+--+-- /See:/ 'newS3EncryptionConfiguration' smart constructor.+data S3EncryptionConfiguration = S3EncryptionConfiguration'+ { -- | The Amazon Resource Name (ARN) of a symmetric key in Key Management+ -- Service (KMS). Amazon S3 does not support asymmetric KMS keys.+ --+ -- You must provide a @KmsKeyArn@ if you specify @SSE_KMS@ as the+ -- @ObjectEncryptionType@.+ --+ -- @KmsKeyArn@ is not required if you specify @SSE_S3@ as the+ -- @ObjectEncryptionType@.+ kmsKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The Amazon S3 object encryption type.+ --+ -- To learn more about server-side encryption options in Amazon S3, see+ -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html Protecting Data Using Server-Side Encryption>+ -- in the /Amazon S3 Developer Guide/.+ objectEncryptionType :: S3ObjectEncryptionType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'S3EncryptionConfiguration' 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:+--+-- 'kmsKeyArn', 's3EncryptionConfiguration_kmsKeyArn' - The Amazon Resource Name (ARN) of a symmetric key in Key Management+-- Service (KMS). Amazon S3 does not support asymmetric KMS keys.+--+-- You must provide a @KmsKeyArn@ if you specify @SSE_KMS@ as the+-- @ObjectEncryptionType@.+--+-- @KmsKeyArn@ is not required if you specify @SSE_S3@ as the+-- @ObjectEncryptionType@.+--+-- 'objectEncryptionType', 's3EncryptionConfiguration_objectEncryptionType' - The Amazon S3 object encryption type.+--+-- To learn more about server-side encryption options in Amazon S3, see+-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html Protecting Data Using Server-Side Encryption>+-- in the /Amazon S3 Developer Guide/.+newS3EncryptionConfiguration ::+ -- | 'objectEncryptionType'+ S3ObjectEncryptionType ->+ S3EncryptionConfiguration+newS3EncryptionConfiguration pObjectEncryptionType_ =+ S3EncryptionConfiguration'+ { kmsKeyArn =+ Prelude.Nothing,+ objectEncryptionType = pObjectEncryptionType_+ }++-- | The Amazon Resource Name (ARN) of a symmetric key in Key Management+-- Service (KMS). Amazon S3 does not support asymmetric KMS keys.+--+-- You must provide a @KmsKeyArn@ if you specify @SSE_KMS@ as the+-- @ObjectEncryptionType@.+--+-- @KmsKeyArn@ is not required if you specify @SSE_S3@ as the+-- @ObjectEncryptionType@.+s3EncryptionConfiguration_kmsKeyArn :: Lens.Lens' S3EncryptionConfiguration (Prelude.Maybe Prelude.Text)+s3EncryptionConfiguration_kmsKeyArn = Lens.lens (\S3EncryptionConfiguration' {kmsKeyArn} -> kmsKeyArn) (\s@S3EncryptionConfiguration' {} a -> s {kmsKeyArn = a} :: S3EncryptionConfiguration)++-- | The Amazon S3 object encryption type.+--+-- To learn more about server-side encryption options in Amazon S3, see+-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html Protecting Data Using Server-Side Encryption>+-- in the /Amazon S3 Developer Guide/.+s3EncryptionConfiguration_objectEncryptionType :: Lens.Lens' S3EncryptionConfiguration S3ObjectEncryptionType+s3EncryptionConfiguration_objectEncryptionType = Lens.lens (\S3EncryptionConfiguration' {objectEncryptionType} -> objectEncryptionType) (\s@S3EncryptionConfiguration' {} a -> s {objectEncryptionType = a} :: S3EncryptionConfiguration)++instance Data.FromJSON S3EncryptionConfiguration where+ parseJSON =+ Data.withObject+ "S3EncryptionConfiguration"+ ( \x ->+ S3EncryptionConfiguration'+ Prelude.<$> (x Data..:? "KmsKeyArn")+ Prelude.<*> (x Data..: "ObjectEncryptionType")+ )++instance Prelude.Hashable S3EncryptionConfiguration where+ hashWithSalt _salt S3EncryptionConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` kmsKeyArn+ `Prelude.hashWithSalt` objectEncryptionType++instance Prelude.NFData S3EncryptionConfiguration where+ rnf S3EncryptionConfiguration' {..} =+ Prelude.rnf kmsKeyArn+ `Prelude.seq` Prelude.rnf objectEncryptionType++instance Data.ToJSON S3EncryptionConfiguration where+ toJSON S3EncryptionConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("KmsKeyArn" Data..=) Prelude.<$> kmsKeyArn,+ Prelude.Just+ ( "ObjectEncryptionType"+ Data..= objectEncryptionType+ )+ ]+ )
+ gen/Amazonka/QLDB/Types/S3ExportConfiguration.hs view
@@ -0,0 +1,183 @@+{-# 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.QLDB.Types.S3ExportConfiguration+-- 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.QLDB.Types.S3ExportConfiguration 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.QLDB.Types.S3EncryptionConfiguration++-- | The Amazon Simple Storage Service (Amazon S3) bucket location in which a+-- journal export job writes the journal contents.+--+-- /See:/ 'newS3ExportConfiguration' smart constructor.+data S3ExportConfiguration = S3ExportConfiguration'+ { -- | The Amazon S3 bucket name in which a journal export job writes the+ -- journal contents.+ --+ -- The bucket name must comply with the Amazon S3 bucket naming+ -- conventions. For more information, see+ -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html Bucket Restrictions and Limitations>+ -- in the /Amazon S3 Developer Guide/.+ bucket :: Prelude.Text,+ -- | The prefix for the Amazon S3 bucket in which a journal export job writes+ -- the journal contents.+ --+ -- The prefix must comply with Amazon S3 key naming rules and restrictions.+ -- For more information, see+ -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html Object Key and Metadata>+ -- in the /Amazon S3 Developer Guide/.+ --+ -- The following are examples of valid @Prefix@ values:+ --+ -- - @JournalExports-ForMyLedger\/Testing\/@+ --+ -- - @JournalExports@+ --+ -- - @My:Tests\/@+ prefix :: Prelude.Text,+ -- | The encryption settings that are used by a journal export job to write+ -- data in an Amazon S3 bucket.+ encryptionConfiguration :: S3EncryptionConfiguration+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'S3ExportConfiguration' 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:+--+-- 'bucket', 's3ExportConfiguration_bucket' - The Amazon S3 bucket name in which a journal export job writes the+-- journal contents.+--+-- The bucket name must comply with the Amazon S3 bucket naming+-- conventions. For more information, see+-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html Bucket Restrictions and Limitations>+-- in the /Amazon S3 Developer Guide/.+--+-- 'prefix', 's3ExportConfiguration_prefix' - The prefix for the Amazon S3 bucket in which a journal export job writes+-- the journal contents.+--+-- The prefix must comply with Amazon S3 key naming rules and restrictions.+-- For more information, see+-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html Object Key and Metadata>+-- in the /Amazon S3 Developer Guide/.+--+-- The following are examples of valid @Prefix@ values:+--+-- - @JournalExports-ForMyLedger\/Testing\/@+--+-- - @JournalExports@+--+-- - @My:Tests\/@+--+-- 'encryptionConfiguration', 's3ExportConfiguration_encryptionConfiguration' - The encryption settings that are used by a journal export job to write+-- data in an Amazon S3 bucket.+newS3ExportConfiguration ::+ -- | 'bucket'+ Prelude.Text ->+ -- | 'prefix'+ Prelude.Text ->+ -- | 'encryptionConfiguration'+ S3EncryptionConfiguration ->+ S3ExportConfiguration+newS3ExportConfiguration+ pBucket_+ pPrefix_+ pEncryptionConfiguration_ =+ S3ExportConfiguration'+ { bucket = pBucket_,+ prefix = pPrefix_,+ encryptionConfiguration = pEncryptionConfiguration_+ }++-- | The Amazon S3 bucket name in which a journal export job writes the+-- journal contents.+--+-- The bucket name must comply with the Amazon S3 bucket naming+-- conventions. For more information, see+-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html Bucket Restrictions and Limitations>+-- in the /Amazon S3 Developer Guide/.+s3ExportConfiguration_bucket :: Lens.Lens' S3ExportConfiguration Prelude.Text+s3ExportConfiguration_bucket = Lens.lens (\S3ExportConfiguration' {bucket} -> bucket) (\s@S3ExportConfiguration' {} a -> s {bucket = a} :: S3ExportConfiguration)++-- | The prefix for the Amazon S3 bucket in which a journal export job writes+-- the journal contents.+--+-- The prefix must comply with Amazon S3 key naming rules and restrictions.+-- For more information, see+-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html Object Key and Metadata>+-- in the /Amazon S3 Developer Guide/.+--+-- The following are examples of valid @Prefix@ values:+--+-- - @JournalExports-ForMyLedger\/Testing\/@+--+-- - @JournalExports@+--+-- - @My:Tests\/@+s3ExportConfiguration_prefix :: Lens.Lens' S3ExportConfiguration Prelude.Text+s3ExportConfiguration_prefix = Lens.lens (\S3ExportConfiguration' {prefix} -> prefix) (\s@S3ExportConfiguration' {} a -> s {prefix = a} :: S3ExportConfiguration)++-- | The encryption settings that are used by a journal export job to write+-- data in an Amazon S3 bucket.+s3ExportConfiguration_encryptionConfiguration :: Lens.Lens' S3ExportConfiguration S3EncryptionConfiguration+s3ExportConfiguration_encryptionConfiguration = Lens.lens (\S3ExportConfiguration' {encryptionConfiguration} -> encryptionConfiguration) (\s@S3ExportConfiguration' {} a -> s {encryptionConfiguration = a} :: S3ExportConfiguration)++instance Data.FromJSON S3ExportConfiguration where+ parseJSON =+ Data.withObject+ "S3ExportConfiguration"+ ( \x ->+ S3ExportConfiguration'+ Prelude.<$> (x Data..: "Bucket")+ Prelude.<*> (x Data..: "Prefix")+ Prelude.<*> (x Data..: "EncryptionConfiguration")+ )++instance Prelude.Hashable S3ExportConfiguration where+ hashWithSalt _salt S3ExportConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` bucket+ `Prelude.hashWithSalt` prefix+ `Prelude.hashWithSalt` encryptionConfiguration++instance Prelude.NFData S3ExportConfiguration where+ rnf S3ExportConfiguration' {..} =+ Prelude.rnf bucket+ `Prelude.seq` Prelude.rnf prefix+ `Prelude.seq` Prelude.rnf encryptionConfiguration++instance Data.ToJSON S3ExportConfiguration where+ toJSON S3ExportConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Bucket" Data..= bucket),+ Prelude.Just ("Prefix" Data..= prefix),+ Prelude.Just+ ( "EncryptionConfiguration"+ Data..= encryptionConfiguration+ )+ ]+ )
+ gen/Amazonka/QLDB/Types/S3ObjectEncryptionType.hs view
@@ -0,0 +1,76 @@+{-# 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.QLDB.Types.S3ObjectEncryptionType+-- 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.QLDB.Types.S3ObjectEncryptionType+ ( S3ObjectEncryptionType+ ( ..,+ S3ObjectEncryptionType_NO_ENCRYPTION,+ S3ObjectEncryptionType_SSE_KMS,+ S3ObjectEncryptionType_SSE_S3+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype S3ObjectEncryptionType = S3ObjectEncryptionType'+ { fromS3ObjectEncryptionType ::+ 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 S3ObjectEncryptionType_NO_ENCRYPTION :: S3ObjectEncryptionType+pattern S3ObjectEncryptionType_NO_ENCRYPTION = S3ObjectEncryptionType' "NO_ENCRYPTION"++pattern S3ObjectEncryptionType_SSE_KMS :: S3ObjectEncryptionType+pattern S3ObjectEncryptionType_SSE_KMS = S3ObjectEncryptionType' "SSE_KMS"++pattern S3ObjectEncryptionType_SSE_S3 :: S3ObjectEncryptionType+pattern S3ObjectEncryptionType_SSE_S3 = S3ObjectEncryptionType' "SSE_S3"++{-# COMPLETE+ S3ObjectEncryptionType_NO_ENCRYPTION,+ S3ObjectEncryptionType_SSE_KMS,+ S3ObjectEncryptionType_SSE_S3,+ S3ObjectEncryptionType'+ #-}
+ gen/Amazonka/QLDB/Types/StreamStatus.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.QLDB.Types.StreamStatus+-- 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.QLDB.Types.StreamStatus+ ( StreamStatus+ ( ..,+ StreamStatus_ACTIVE,+ StreamStatus_CANCELED,+ StreamStatus_COMPLETED,+ StreamStatus_FAILED,+ StreamStatus_IMPAIRED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype StreamStatus = StreamStatus'+ { fromStreamStatus ::+ 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 StreamStatus_ACTIVE :: StreamStatus+pattern StreamStatus_ACTIVE = StreamStatus' "ACTIVE"++pattern StreamStatus_CANCELED :: StreamStatus+pattern StreamStatus_CANCELED = StreamStatus' "CANCELED"++pattern StreamStatus_COMPLETED :: StreamStatus+pattern StreamStatus_COMPLETED = StreamStatus' "COMPLETED"++pattern StreamStatus_FAILED :: StreamStatus+pattern StreamStatus_FAILED = StreamStatus' "FAILED"++pattern StreamStatus_IMPAIRED :: StreamStatus+pattern StreamStatus_IMPAIRED = StreamStatus' "IMPAIRED"++{-# COMPLETE+ StreamStatus_ACTIVE,+ StreamStatus_CANCELED,+ StreamStatus_COMPLETED,+ StreamStatus_FAILED,+ StreamStatus_IMPAIRED,+ StreamStatus'+ #-}
+ gen/Amazonka/QLDB/Types/ValueHolder.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.QLDB.Types.ValueHolder+-- 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.QLDB.Types.ValueHolder 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 structure that can contain a value in multiple encoding formats.+--+-- /See:/ 'newValueHolder' smart constructor.+data ValueHolder = ValueHolder'+ { -- | An Amazon Ion plaintext value contained in a @ValueHolder@ structure.+ ionText :: Prelude.Maybe (Data.Sensitive Prelude.Text)+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ValueHolder' 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:+--+-- 'ionText', 'valueHolder_ionText' - An Amazon Ion plaintext value contained in a @ValueHolder@ structure.+newValueHolder ::+ ValueHolder+newValueHolder =+ ValueHolder' {ionText = Prelude.Nothing}++-- | An Amazon Ion plaintext value contained in a @ValueHolder@ structure.+valueHolder_ionText :: Lens.Lens' ValueHolder (Prelude.Maybe Prelude.Text)+valueHolder_ionText = Lens.lens (\ValueHolder' {ionText} -> ionText) (\s@ValueHolder' {} a -> s {ionText = a} :: ValueHolder) Prelude.. Lens.mapping Data._Sensitive++instance Data.FromJSON ValueHolder where+ parseJSON =+ Data.withObject+ "ValueHolder"+ ( \x ->+ ValueHolder' Prelude.<$> (x Data..:? "IonText")+ )++instance Prelude.Hashable ValueHolder where+ hashWithSalt _salt ValueHolder' {..} =+ _salt `Prelude.hashWithSalt` ionText++instance Prelude.NFData ValueHolder where+ rnf ValueHolder' {..} = Prelude.rnf ionText++instance Data.ToJSON ValueHolder where+ toJSON ValueHolder' {..} =+ Data.object+ ( Prelude.catMaybes+ [("IonText" Data..=) Prelude.<$> ionText]+ )
+ gen/Amazonka/QLDB/UntagResource.hs view
@@ -0,0 +1,171 @@+{-# 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.QLDB.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 one or more tags from a specified Amazon QLDB resource. You can+-- specify up to 50 tag keys to remove.+module Amazonka.QLDB.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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+ { -- | The Amazon Resource Name (ARN) from which to remove the tags. For+ -- example:+ --+ -- @arn:aws:qldb:us-east-1:123456789012:ledger\/exampleLedger@+ resourceArn :: Prelude.Text,+ -- | The list of tag keys to remove.+ 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 Amazon Resource Name (ARN) from which to remove the tags. For+-- example:+--+-- @arn:aws:qldb:us-east-1:123456789012:ledger\/exampleLedger@+--+-- 'tagKeys', 'untagResource_tagKeys' - The list of tag keys to remove.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ =+ UntagResource'+ { resourceArn = pResourceArn_,+ tagKeys = Prelude.mempty+ }++-- | The Amazon Resource Name (ARN) from which to remove the tags. For+-- example:+--+-- @arn:aws:qldb:us-east-1:123456789012:ledger\/exampleLedger@+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | The list of tag keys to remove.+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.delete (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+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath UntagResource where+ toPath UntagResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery UntagResource where+ toQuery UntagResource' {..} =+ Prelude.mconcat+ ["tagKeys" Data.=: Data.toQueryList "member" tagKeys]++-- | /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/QLDB/UpdateLedger.hs view
@@ -0,0 +1,415 @@+{-# 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.QLDB.UpdateLedger+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates properties on a ledger.+module Amazonka.QLDB.UpdateLedger+ ( -- * Creating a Request+ UpdateLedger (..),+ newUpdateLedger,++ -- * Request Lenses+ updateLedger_deletionProtection,+ updateLedger_kmsKey,+ updateLedger_name,++ -- * Destructuring the Response+ UpdateLedgerResponse (..),+ newUpdateLedgerResponse,++ -- * Response Lenses+ updateLedgerResponse_arn,+ updateLedgerResponse_creationDateTime,+ updateLedgerResponse_deletionProtection,+ updateLedgerResponse_encryptionDescription,+ updateLedgerResponse_name,+ updateLedgerResponse_state,+ updateLedgerResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateLedger' smart constructor.+data UpdateLedger = UpdateLedger'+ { -- | The flag that prevents a ledger from being deleted by any user. If not+ -- provided on ledger creation, this feature is enabled (@true@) by+ -- default.+ --+ -- If deletion protection is enabled, you must first disable it before you+ -- can delete the ledger. You can disable it by calling the @UpdateLedger@+ -- operation to set the flag to @false@.+ deletionProtection :: Prelude.Maybe Prelude.Bool,+ -- | The key in Key Management Service (KMS) to use for encryption of data at+ -- rest in the ledger. For more information, see+ -- <https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html Encryption at rest>+ -- in the /Amazon QLDB Developer Guide/.+ --+ -- Use one of the following options to specify this parameter:+ --+ -- - @AWS_OWNED_KMS_KEY@: Use an KMS key that is owned and managed by+ -- Amazon Web Services on your behalf.+ --+ -- - __Undefined__: Make no changes to the KMS key of the ledger.+ --+ -- - __A valid symmetric customer managed KMS key__: Use the specified+ -- KMS key in your account that you create, own, and manage.+ --+ -- Amazon QLDB does not support asymmetric keys. For more information,+ -- see+ -- <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html Using symmetric and asymmetric keys>+ -- in the /Key Management Service Developer Guide/.+ --+ -- To specify a customer managed KMS key, you can use its key ID, Amazon+ -- Resource Name (ARN), alias name, or alias ARN. When using an alias name,+ -- prefix it with @\"alias\/\"@. To specify a key in a different Amazon Web+ -- Services account, you must use the key ARN or alias ARN.+ --+ -- For example:+ --+ -- - Key ID: @1234abcd-12ab-34cd-56ef-1234567890ab@+ --+ -- - Key ARN:+ -- @arn:aws:kms:us-east-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@+ --+ -- - Alias name: @alias\/ExampleAlias@+ --+ -- - Alias ARN: @arn:aws:kms:us-east-2:111122223333:alias\/ExampleAlias@+ --+ -- For more information, see+ -- <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id Key identifiers (KeyId)>+ -- in the /Key Management Service Developer Guide/.+ kmsKey :: Prelude.Maybe Prelude.Text,+ -- | The name of the ledger.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateLedger' 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:+--+-- 'deletionProtection', 'updateLedger_deletionProtection' - The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+--+-- 'kmsKey', 'updateLedger_kmsKey' - The key in Key Management Service (KMS) to use for encryption of data at+-- rest in the ledger. For more information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html Encryption at rest>+-- in the /Amazon QLDB Developer Guide/.+--+-- Use one of the following options to specify this parameter:+--+-- - @AWS_OWNED_KMS_KEY@: Use an KMS key that is owned and managed by+-- Amazon Web Services on your behalf.+--+-- - __Undefined__: Make no changes to the KMS key of the ledger.+--+-- - __A valid symmetric customer managed KMS key__: Use the specified+-- KMS key in your account that you create, own, and manage.+--+-- Amazon QLDB does not support asymmetric keys. For more information,+-- see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html Using symmetric and asymmetric keys>+-- in the /Key Management Service Developer Guide/.+--+-- To specify a customer managed KMS key, you can use its key ID, Amazon+-- Resource Name (ARN), alias name, or alias ARN. When using an alias name,+-- prefix it with @\"alias\/\"@. To specify a key in a different Amazon Web+-- Services account, you must use the key ARN or alias ARN.+--+-- For example:+--+-- - Key ID: @1234abcd-12ab-34cd-56ef-1234567890ab@+--+-- - Key ARN:+-- @arn:aws:kms:us-east-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@+--+-- - Alias name: @alias\/ExampleAlias@+--+-- - Alias ARN: @arn:aws:kms:us-east-2:111122223333:alias\/ExampleAlias@+--+-- For more information, see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id Key identifiers (KeyId)>+-- in the /Key Management Service Developer Guide/.+--+-- 'name', 'updateLedger_name' - The name of the ledger.+newUpdateLedger ::+ -- | 'name'+ Prelude.Text ->+ UpdateLedger+newUpdateLedger pName_ =+ UpdateLedger'+ { deletionProtection = Prelude.Nothing,+ kmsKey = Prelude.Nothing,+ name = pName_+ }++-- | The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+updateLedger_deletionProtection :: Lens.Lens' UpdateLedger (Prelude.Maybe Prelude.Bool)+updateLedger_deletionProtection = Lens.lens (\UpdateLedger' {deletionProtection} -> deletionProtection) (\s@UpdateLedger' {} a -> s {deletionProtection = a} :: UpdateLedger)++-- | The key in Key Management Service (KMS) to use for encryption of data at+-- rest in the ledger. For more information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html Encryption at rest>+-- in the /Amazon QLDB Developer Guide/.+--+-- Use one of the following options to specify this parameter:+--+-- - @AWS_OWNED_KMS_KEY@: Use an KMS key that is owned and managed by+-- Amazon Web Services on your behalf.+--+-- - __Undefined__: Make no changes to the KMS key of the ledger.+--+-- - __A valid symmetric customer managed KMS key__: Use the specified+-- KMS key in your account that you create, own, and manage.+--+-- Amazon QLDB does not support asymmetric keys. For more information,+-- see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html Using symmetric and asymmetric keys>+-- in the /Key Management Service Developer Guide/.+--+-- To specify a customer managed KMS key, you can use its key ID, Amazon+-- Resource Name (ARN), alias name, or alias ARN. When using an alias name,+-- prefix it with @\"alias\/\"@. To specify a key in a different Amazon Web+-- Services account, you must use the key ARN or alias ARN.+--+-- For example:+--+-- - Key ID: @1234abcd-12ab-34cd-56ef-1234567890ab@+--+-- - Key ARN:+-- @arn:aws:kms:us-east-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@+--+-- - Alias name: @alias\/ExampleAlias@+--+-- - Alias ARN: @arn:aws:kms:us-east-2:111122223333:alias\/ExampleAlias@+--+-- For more information, see+-- <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id Key identifiers (KeyId)>+-- in the /Key Management Service Developer Guide/.+updateLedger_kmsKey :: Lens.Lens' UpdateLedger (Prelude.Maybe Prelude.Text)+updateLedger_kmsKey = Lens.lens (\UpdateLedger' {kmsKey} -> kmsKey) (\s@UpdateLedger' {} a -> s {kmsKey = a} :: UpdateLedger)++-- | The name of the ledger.+updateLedger_name :: Lens.Lens' UpdateLedger Prelude.Text+updateLedger_name = Lens.lens (\UpdateLedger' {name} -> name) (\s@UpdateLedger' {} a -> s {name = a} :: UpdateLedger)++instance Core.AWSRequest UpdateLedger where+ type AWSResponse UpdateLedger = UpdateLedgerResponse+ request overrides =+ Request.patchJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateLedgerResponse'+ Prelude.<$> (x Data..?> "Arn")+ Prelude.<*> (x Data..?> "CreationDateTime")+ Prelude.<*> (x Data..?> "DeletionProtection")+ Prelude.<*> (x Data..?> "EncryptionDescription")+ Prelude.<*> (x Data..?> "Name")+ Prelude.<*> (x Data..?> "State")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateLedger where+ hashWithSalt _salt UpdateLedger' {..} =+ _salt+ `Prelude.hashWithSalt` deletionProtection+ `Prelude.hashWithSalt` kmsKey+ `Prelude.hashWithSalt` name++instance Prelude.NFData UpdateLedger where+ rnf UpdateLedger' {..} =+ Prelude.rnf deletionProtection+ `Prelude.seq` Prelude.rnf kmsKey+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders UpdateLedger where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateLedger where+ toJSON UpdateLedger' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DeletionProtection" Data..=)+ Prelude.<$> deletionProtection,+ ("KmsKey" Data..=) Prelude.<$> kmsKey+ ]+ )++instance Data.ToPath UpdateLedger where+ toPath UpdateLedger' {..} =+ Prelude.mconcat ["/ledgers/", Data.toBS name]++instance Data.ToQuery UpdateLedger where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateLedgerResponse' smart constructor.+data UpdateLedgerResponse = UpdateLedgerResponse'+ { -- | The Amazon Resource Name (ARN) for the ledger.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The date and time, in epoch time format, when the ledger was created.+ -- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+ -- January 1, 1970 UTC.)+ creationDateTime :: Prelude.Maybe Data.POSIX,+ -- | The flag that prevents a ledger from being deleted by any user. If not+ -- provided on ledger creation, this feature is enabled (@true@) by+ -- default.+ --+ -- If deletion protection is enabled, you must first disable it before you+ -- can delete the ledger. You can disable it by calling the @UpdateLedger@+ -- operation to set the flag to @false@.+ deletionProtection :: Prelude.Maybe Prelude.Bool,+ -- | Information about the encryption of data at rest in the ledger. This+ -- includes the current status, the KMS key, and when the key became+ -- inaccessible (in the case of an error).+ encryptionDescription :: Prelude.Maybe LedgerEncryptionDescription,+ -- | The name of the ledger.+ name :: Prelude.Maybe Prelude.Text,+ -- | The current status of the ledger.+ state :: Prelude.Maybe LedgerState,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateLedgerResponse' 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:+--+-- 'arn', 'updateLedgerResponse_arn' - The Amazon Resource Name (ARN) for the ledger.+--+-- 'creationDateTime', 'updateLedgerResponse_creationDateTime' - The date and time, in epoch time format, when the ledger was created.+-- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+-- January 1, 1970 UTC.)+--+-- 'deletionProtection', 'updateLedgerResponse_deletionProtection' - The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+--+-- 'encryptionDescription', 'updateLedgerResponse_encryptionDescription' - Information about the encryption of data at rest in the ledger. This+-- includes the current status, the KMS key, and when the key became+-- inaccessible (in the case of an error).+--+-- 'name', 'updateLedgerResponse_name' - The name of the ledger.+--+-- 'state', 'updateLedgerResponse_state' - The current status of the ledger.+--+-- 'httpStatus', 'updateLedgerResponse_httpStatus' - The response's http status code.+newUpdateLedgerResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateLedgerResponse+newUpdateLedgerResponse pHttpStatus_ =+ UpdateLedgerResponse'+ { arn = Prelude.Nothing,+ creationDateTime = Prelude.Nothing,+ deletionProtection = Prelude.Nothing,+ encryptionDescription = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) for the ledger.+updateLedgerResponse_arn :: Lens.Lens' UpdateLedgerResponse (Prelude.Maybe Prelude.Text)+updateLedgerResponse_arn = Lens.lens (\UpdateLedgerResponse' {arn} -> arn) (\s@UpdateLedgerResponse' {} a -> s {arn = a} :: UpdateLedgerResponse)++-- | The date and time, in epoch time format, when the ledger was created.+-- (Epoch time format is the number of seconds elapsed since 12:00:00 AM+-- January 1, 1970 UTC.)+updateLedgerResponse_creationDateTime :: Lens.Lens' UpdateLedgerResponse (Prelude.Maybe Prelude.UTCTime)+updateLedgerResponse_creationDateTime = Lens.lens (\UpdateLedgerResponse' {creationDateTime} -> creationDateTime) (\s@UpdateLedgerResponse' {} a -> s {creationDateTime = a} :: UpdateLedgerResponse) Prelude.. Lens.mapping Data._Time++-- | The flag that prevents a ledger from being deleted by any user. If not+-- provided on ledger creation, this feature is enabled (@true@) by+-- default.+--+-- If deletion protection is enabled, you must first disable it before you+-- can delete the ledger. You can disable it by calling the @UpdateLedger@+-- operation to set the flag to @false@.+updateLedgerResponse_deletionProtection :: Lens.Lens' UpdateLedgerResponse (Prelude.Maybe Prelude.Bool)+updateLedgerResponse_deletionProtection = Lens.lens (\UpdateLedgerResponse' {deletionProtection} -> deletionProtection) (\s@UpdateLedgerResponse' {} a -> s {deletionProtection = a} :: UpdateLedgerResponse)++-- | Information about the encryption of data at rest in the ledger. This+-- includes the current status, the KMS key, and when the key became+-- inaccessible (in the case of an error).+updateLedgerResponse_encryptionDescription :: Lens.Lens' UpdateLedgerResponse (Prelude.Maybe LedgerEncryptionDescription)+updateLedgerResponse_encryptionDescription = Lens.lens (\UpdateLedgerResponse' {encryptionDescription} -> encryptionDescription) (\s@UpdateLedgerResponse' {} a -> s {encryptionDescription = a} :: UpdateLedgerResponse)++-- | The name of the ledger.+updateLedgerResponse_name :: Lens.Lens' UpdateLedgerResponse (Prelude.Maybe Prelude.Text)+updateLedgerResponse_name = Lens.lens (\UpdateLedgerResponse' {name} -> name) (\s@UpdateLedgerResponse' {} a -> s {name = a} :: UpdateLedgerResponse)++-- | The current status of the ledger.+updateLedgerResponse_state :: Lens.Lens' UpdateLedgerResponse (Prelude.Maybe LedgerState)+updateLedgerResponse_state = Lens.lens (\UpdateLedgerResponse' {state} -> state) (\s@UpdateLedgerResponse' {} a -> s {state = a} :: UpdateLedgerResponse)++-- | The response's http status code.+updateLedgerResponse_httpStatus :: Lens.Lens' UpdateLedgerResponse Prelude.Int+updateLedgerResponse_httpStatus = Lens.lens (\UpdateLedgerResponse' {httpStatus} -> httpStatus) (\s@UpdateLedgerResponse' {} a -> s {httpStatus = a} :: UpdateLedgerResponse)++instance Prelude.NFData UpdateLedgerResponse where+ rnf UpdateLedgerResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf creationDateTime+ `Prelude.seq` Prelude.rnf deletionProtection+ `Prelude.seq` Prelude.rnf encryptionDescription+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/UpdateLedgerPermissionsMode.hs view
@@ -0,0 +1,296 @@+{-# 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.QLDB.UpdateLedgerPermissionsMode+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates the permissions mode of a ledger.+--+-- Before you switch to the @STANDARD@ permissions mode, you must first+-- create all required IAM policies and table tags to avoid disruption to+-- your users. To learn more, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/ledger-management.basics.html#ledger-mgmt.basics.update-permissions.migrating Migrating to the standard permissions mode>+-- in the /Amazon QLDB Developer Guide/.+module Amazonka.QLDB.UpdateLedgerPermissionsMode+ ( -- * Creating a Request+ UpdateLedgerPermissionsMode (..),+ newUpdateLedgerPermissionsMode,++ -- * Request Lenses+ updateLedgerPermissionsMode_name,+ updateLedgerPermissionsMode_permissionsMode,++ -- * Destructuring the Response+ UpdateLedgerPermissionsModeResponse (..),+ newUpdateLedgerPermissionsModeResponse,++ -- * Response Lenses+ updateLedgerPermissionsModeResponse_arn,+ updateLedgerPermissionsModeResponse_name,+ updateLedgerPermissionsModeResponse_permissionsMode,+ updateLedgerPermissionsModeResponse_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 Amazonka.QLDB.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateLedgerPermissionsMode' smart constructor.+data UpdateLedgerPermissionsMode = UpdateLedgerPermissionsMode'+ { -- | The name of the ledger.+ name :: Prelude.Text,+ -- | The permissions mode to assign to the ledger. This parameter can have+ -- one of the following values:+ --+ -- - @ALLOW_ALL@: A legacy permissions mode that enables access control+ -- with API-level granularity for ledgers.+ --+ -- This mode allows users who have the @SendCommand@ API permission for+ -- this ledger to run all PartiQL commands (hence, @ALLOW_ALL@) on any+ -- tables in the specified ledger. This mode disregards any table-level+ -- or command-level IAM permissions policies that you create for the+ -- ledger.+ --+ -- - @STANDARD@: (/Recommended/) A permissions mode that enables access+ -- control with finer granularity for ledgers, tables, and PartiQL+ -- commands.+ --+ -- By default, this mode denies all user requests to run any PartiQL+ -- commands on any tables in this ledger. To allow PartiQL commands to+ -- run, you must create IAM permissions policies for specific table+ -- resources and PartiQL actions, in addition to the @SendCommand@ API+ -- permission for the ledger. For information, see+ -- <https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html Getting started with the standard permissions mode>+ -- in the /Amazon QLDB Developer Guide/.+ --+ -- We strongly recommend using the @STANDARD@ permissions mode to maximize+ -- the security of your ledger data.+ permissionsMode :: PermissionsMode+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateLedgerPermissionsMode' 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', 'updateLedgerPermissionsMode_name' - The name of the ledger.+--+-- 'permissionsMode', 'updateLedgerPermissionsMode_permissionsMode' - The permissions mode to assign to the ledger. This parameter can have+-- one of the following values:+--+-- - @ALLOW_ALL@: A legacy permissions mode that enables access control+-- with API-level granularity for ledgers.+--+-- This mode allows users who have the @SendCommand@ API permission for+-- this ledger to run all PartiQL commands (hence, @ALLOW_ALL@) on any+-- tables in the specified ledger. This mode disregards any table-level+-- or command-level IAM permissions policies that you create for the+-- ledger.+--+-- - @STANDARD@: (/Recommended/) A permissions mode that enables access+-- control with finer granularity for ledgers, tables, and PartiQL+-- commands.+--+-- By default, this mode denies all user requests to run any PartiQL+-- commands on any tables in this ledger. To allow PartiQL commands to+-- run, you must create IAM permissions policies for specific table+-- resources and PartiQL actions, in addition to the @SendCommand@ API+-- permission for the ledger. For information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html Getting started with the standard permissions mode>+-- in the /Amazon QLDB Developer Guide/.+--+-- We strongly recommend using the @STANDARD@ permissions mode to maximize+-- the security of your ledger data.+newUpdateLedgerPermissionsMode ::+ -- | 'name'+ Prelude.Text ->+ -- | 'permissionsMode'+ PermissionsMode ->+ UpdateLedgerPermissionsMode+newUpdateLedgerPermissionsMode+ pName_+ pPermissionsMode_ =+ UpdateLedgerPermissionsMode'+ { name = pName_,+ permissionsMode = pPermissionsMode_+ }++-- | The name of the ledger.+updateLedgerPermissionsMode_name :: Lens.Lens' UpdateLedgerPermissionsMode Prelude.Text+updateLedgerPermissionsMode_name = Lens.lens (\UpdateLedgerPermissionsMode' {name} -> name) (\s@UpdateLedgerPermissionsMode' {} a -> s {name = a} :: UpdateLedgerPermissionsMode)++-- | The permissions mode to assign to the ledger. This parameter can have+-- one of the following values:+--+-- - @ALLOW_ALL@: A legacy permissions mode that enables access control+-- with API-level granularity for ledgers.+--+-- This mode allows users who have the @SendCommand@ API permission for+-- this ledger to run all PartiQL commands (hence, @ALLOW_ALL@) on any+-- tables in the specified ledger. This mode disregards any table-level+-- or command-level IAM permissions policies that you create for the+-- ledger.+--+-- - @STANDARD@: (/Recommended/) A permissions mode that enables access+-- control with finer granularity for ledgers, tables, and PartiQL+-- commands.+--+-- By default, this mode denies all user requests to run any PartiQL+-- commands on any tables in this ledger. To allow PartiQL commands to+-- run, you must create IAM permissions policies for specific table+-- resources and PartiQL actions, in addition to the @SendCommand@ API+-- permission for the ledger. For information, see+-- <https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html Getting started with the standard permissions mode>+-- in the /Amazon QLDB Developer Guide/.+--+-- We strongly recommend using the @STANDARD@ permissions mode to maximize+-- the security of your ledger data.+updateLedgerPermissionsMode_permissionsMode :: Lens.Lens' UpdateLedgerPermissionsMode PermissionsMode+updateLedgerPermissionsMode_permissionsMode = Lens.lens (\UpdateLedgerPermissionsMode' {permissionsMode} -> permissionsMode) (\s@UpdateLedgerPermissionsMode' {} a -> s {permissionsMode = a} :: UpdateLedgerPermissionsMode)++instance Core.AWSRequest UpdateLedgerPermissionsMode where+ type+ AWSResponse UpdateLedgerPermissionsMode =+ UpdateLedgerPermissionsModeResponse+ request overrides =+ Request.patchJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateLedgerPermissionsModeResponse'+ Prelude.<$> (x Data..?> "Arn")+ Prelude.<*> (x Data..?> "Name")+ Prelude.<*> (x Data..?> "PermissionsMode")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateLedgerPermissionsMode where+ hashWithSalt _salt UpdateLedgerPermissionsMode' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` permissionsMode++instance Prelude.NFData UpdateLedgerPermissionsMode where+ rnf UpdateLedgerPermissionsMode' {..} =+ Prelude.rnf name+ `Prelude.seq` Prelude.rnf permissionsMode++instance Data.ToHeaders UpdateLedgerPermissionsMode where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateLedgerPermissionsMode where+ toJSON UpdateLedgerPermissionsMode' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("PermissionsMode" Data..= permissionsMode)+ ]+ )++instance Data.ToPath UpdateLedgerPermissionsMode where+ toPath UpdateLedgerPermissionsMode' {..} =+ Prelude.mconcat+ ["/ledgers/", Data.toBS name, "/permissions-mode"]++instance Data.ToQuery UpdateLedgerPermissionsMode where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateLedgerPermissionsModeResponse' smart constructor.+data UpdateLedgerPermissionsModeResponse = UpdateLedgerPermissionsModeResponse'+ { -- | The Amazon Resource Name (ARN) for the ledger.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The name of the ledger.+ name :: Prelude.Maybe Prelude.Text,+ -- | The current permissions mode of the ledger.+ permissionsMode :: Prelude.Maybe PermissionsMode,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateLedgerPermissionsModeResponse' 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:+--+-- 'arn', 'updateLedgerPermissionsModeResponse_arn' - The Amazon Resource Name (ARN) for the ledger.+--+-- 'name', 'updateLedgerPermissionsModeResponse_name' - The name of the ledger.+--+-- 'permissionsMode', 'updateLedgerPermissionsModeResponse_permissionsMode' - The current permissions mode of the ledger.+--+-- 'httpStatus', 'updateLedgerPermissionsModeResponse_httpStatus' - The response's http status code.+newUpdateLedgerPermissionsModeResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateLedgerPermissionsModeResponse+newUpdateLedgerPermissionsModeResponse pHttpStatus_ =+ UpdateLedgerPermissionsModeResponse'+ { arn =+ Prelude.Nothing,+ name = Prelude.Nothing,+ permissionsMode = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) for the ledger.+updateLedgerPermissionsModeResponse_arn :: Lens.Lens' UpdateLedgerPermissionsModeResponse (Prelude.Maybe Prelude.Text)+updateLedgerPermissionsModeResponse_arn = Lens.lens (\UpdateLedgerPermissionsModeResponse' {arn} -> arn) (\s@UpdateLedgerPermissionsModeResponse' {} a -> s {arn = a} :: UpdateLedgerPermissionsModeResponse)++-- | The name of the ledger.+updateLedgerPermissionsModeResponse_name :: Lens.Lens' UpdateLedgerPermissionsModeResponse (Prelude.Maybe Prelude.Text)+updateLedgerPermissionsModeResponse_name = Lens.lens (\UpdateLedgerPermissionsModeResponse' {name} -> name) (\s@UpdateLedgerPermissionsModeResponse' {} a -> s {name = a} :: UpdateLedgerPermissionsModeResponse)++-- | The current permissions mode of the ledger.+updateLedgerPermissionsModeResponse_permissionsMode :: Lens.Lens' UpdateLedgerPermissionsModeResponse (Prelude.Maybe PermissionsMode)+updateLedgerPermissionsModeResponse_permissionsMode = Lens.lens (\UpdateLedgerPermissionsModeResponse' {permissionsMode} -> permissionsMode) (\s@UpdateLedgerPermissionsModeResponse' {} a -> s {permissionsMode = a} :: UpdateLedgerPermissionsModeResponse)++-- | The response's http status code.+updateLedgerPermissionsModeResponse_httpStatus :: Lens.Lens' UpdateLedgerPermissionsModeResponse Prelude.Int+updateLedgerPermissionsModeResponse_httpStatus = Lens.lens (\UpdateLedgerPermissionsModeResponse' {httpStatus} -> httpStatus) (\s@UpdateLedgerPermissionsModeResponse' {} a -> s {httpStatus = a} :: UpdateLedgerPermissionsModeResponse)++instance+ Prelude.NFData+ UpdateLedgerPermissionsModeResponse+ where+ rnf UpdateLedgerPermissionsModeResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf permissionsMode+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/QLDB/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.QLDB.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.QLDB.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.QLDB.Lens+import Amazonka.QLDB.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.QLDB+import Test.Amazonka.QLDB.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "QLDB"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Gen/QLDB.hs view
@@ -0,0 +1,438 @@+{-# 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.QLDB+-- 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.QLDB where++import Amazonka.QLDB+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.QLDB.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"+-- [ requestCancelJournalKinesisStream $+-- newCancelJournalKinesisStream+--+-- , requestCreateLedger $+-- newCreateLedger+--+-- , requestDeleteLedger $+-- newDeleteLedger+--+-- , requestDescribeJournalKinesisStream $+-- newDescribeJournalKinesisStream+--+-- , requestDescribeJournalS3Export $+-- newDescribeJournalS3Export+--+-- , requestDescribeLedger $+-- newDescribeLedger+--+-- , requestExportJournalToS3 $+-- newExportJournalToS3+--+-- , requestGetBlock $+-- newGetBlock+--+-- , requestGetDigest $+-- newGetDigest+--+-- , requestGetRevision $+-- newGetRevision+--+-- , requestListJournalKinesisStreamsForLedger $+-- newListJournalKinesisStreamsForLedger+--+-- , requestListJournalS3Exports $+-- newListJournalS3Exports+--+-- , requestListJournalS3ExportsForLedger $+-- newListJournalS3ExportsForLedger+--+-- , requestListLedgers $+-- newListLedgers+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestStreamJournalToKinesis $+-- newStreamJournalToKinesis+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateLedger $+-- newUpdateLedger+--+-- , requestUpdateLedgerPermissionsMode $+-- newUpdateLedgerPermissionsMode+--+-- ]++-- , testGroup "response"+-- [ responseCancelJournalKinesisStream $+-- newCancelJournalKinesisStreamResponse+--+-- , responseCreateLedger $+-- newCreateLedgerResponse+--+-- , responseDeleteLedger $+-- newDeleteLedgerResponse+--+-- , responseDescribeJournalKinesisStream $+-- newDescribeJournalKinesisStreamResponse+--+-- , responseDescribeJournalS3Export $+-- newDescribeJournalS3ExportResponse+--+-- , responseDescribeLedger $+-- newDescribeLedgerResponse+--+-- , responseExportJournalToS3 $+-- newExportJournalToS3Response+--+-- , responseGetBlock $+-- newGetBlockResponse+--+-- , responseGetDigest $+-- newGetDigestResponse+--+-- , responseGetRevision $+-- newGetRevisionResponse+--+-- , responseListJournalKinesisStreamsForLedger $+-- newListJournalKinesisStreamsForLedgerResponse+--+-- , responseListJournalS3Exports $+-- newListJournalS3ExportsResponse+--+-- , responseListJournalS3ExportsForLedger $+-- newListJournalS3ExportsForLedgerResponse+--+-- , responseListLedgers $+-- newListLedgersResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responseStreamJournalToKinesis $+-- newStreamJournalToKinesisResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateLedger $+-- newUpdateLedgerResponse+--+-- , responseUpdateLedgerPermissionsMode $+-- newUpdateLedgerPermissionsModeResponse+--+-- ]+-- ]++-- Requests++requestCancelJournalKinesisStream :: CancelJournalKinesisStream -> TestTree+requestCancelJournalKinesisStream =+ req+ "CancelJournalKinesisStream"+ "fixture/CancelJournalKinesisStream.yaml"++requestCreateLedger :: CreateLedger -> TestTree+requestCreateLedger =+ req+ "CreateLedger"+ "fixture/CreateLedger.yaml"++requestDeleteLedger :: DeleteLedger -> TestTree+requestDeleteLedger =+ req+ "DeleteLedger"+ "fixture/DeleteLedger.yaml"++requestDescribeJournalKinesisStream :: DescribeJournalKinesisStream -> TestTree+requestDescribeJournalKinesisStream =+ req+ "DescribeJournalKinesisStream"+ "fixture/DescribeJournalKinesisStream.yaml"++requestDescribeJournalS3Export :: DescribeJournalS3Export -> TestTree+requestDescribeJournalS3Export =+ req+ "DescribeJournalS3Export"+ "fixture/DescribeJournalS3Export.yaml"++requestDescribeLedger :: DescribeLedger -> TestTree+requestDescribeLedger =+ req+ "DescribeLedger"+ "fixture/DescribeLedger.yaml"++requestExportJournalToS3 :: ExportJournalToS3 -> TestTree+requestExportJournalToS3 =+ req+ "ExportJournalToS3"+ "fixture/ExportJournalToS3.yaml"++requestGetBlock :: GetBlock -> TestTree+requestGetBlock =+ req+ "GetBlock"+ "fixture/GetBlock.yaml"++requestGetDigest :: GetDigest -> TestTree+requestGetDigest =+ req+ "GetDigest"+ "fixture/GetDigest.yaml"++requestGetRevision :: GetRevision -> TestTree+requestGetRevision =+ req+ "GetRevision"+ "fixture/GetRevision.yaml"++requestListJournalKinesisStreamsForLedger :: ListJournalKinesisStreamsForLedger -> TestTree+requestListJournalKinesisStreamsForLedger =+ req+ "ListJournalKinesisStreamsForLedger"+ "fixture/ListJournalKinesisStreamsForLedger.yaml"++requestListJournalS3Exports :: ListJournalS3Exports -> TestTree+requestListJournalS3Exports =+ req+ "ListJournalS3Exports"+ "fixture/ListJournalS3Exports.yaml"++requestListJournalS3ExportsForLedger :: ListJournalS3ExportsForLedger -> TestTree+requestListJournalS3ExportsForLedger =+ req+ "ListJournalS3ExportsForLedger"+ "fixture/ListJournalS3ExportsForLedger.yaml"++requestListLedgers :: ListLedgers -> TestTree+requestListLedgers =+ req+ "ListLedgers"+ "fixture/ListLedgers.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestStreamJournalToKinesis :: StreamJournalToKinesis -> TestTree+requestStreamJournalToKinesis =+ req+ "StreamJournalToKinesis"+ "fixture/StreamJournalToKinesis.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateLedger :: UpdateLedger -> TestTree+requestUpdateLedger =+ req+ "UpdateLedger"+ "fixture/UpdateLedger.yaml"++requestUpdateLedgerPermissionsMode :: UpdateLedgerPermissionsMode -> TestTree+requestUpdateLedgerPermissionsMode =+ req+ "UpdateLedgerPermissionsMode"+ "fixture/UpdateLedgerPermissionsMode.yaml"++-- Responses++responseCancelJournalKinesisStream :: CancelJournalKinesisStreamResponse -> TestTree+responseCancelJournalKinesisStream =+ res+ "CancelJournalKinesisStreamResponse"+ "fixture/CancelJournalKinesisStreamResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CancelJournalKinesisStream)++responseCreateLedger :: CreateLedgerResponse -> TestTree+responseCreateLedger =+ res+ "CreateLedgerResponse"+ "fixture/CreateLedgerResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateLedger)++responseDeleteLedger :: DeleteLedgerResponse -> TestTree+responseDeleteLedger =+ res+ "DeleteLedgerResponse"+ "fixture/DeleteLedgerResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteLedger)++responseDescribeJournalKinesisStream :: DescribeJournalKinesisStreamResponse -> TestTree+responseDescribeJournalKinesisStream =+ res+ "DescribeJournalKinesisStreamResponse"+ "fixture/DescribeJournalKinesisStreamResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeJournalKinesisStream)++responseDescribeJournalS3Export :: DescribeJournalS3ExportResponse -> TestTree+responseDescribeJournalS3Export =+ res+ "DescribeJournalS3ExportResponse"+ "fixture/DescribeJournalS3ExportResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeJournalS3Export)++responseDescribeLedger :: DescribeLedgerResponse -> TestTree+responseDescribeLedger =+ res+ "DescribeLedgerResponse"+ "fixture/DescribeLedgerResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeLedger)++responseExportJournalToS3 :: ExportJournalToS3Response -> TestTree+responseExportJournalToS3 =+ res+ "ExportJournalToS3Response"+ "fixture/ExportJournalToS3Response.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ExportJournalToS3)++responseGetBlock :: GetBlockResponse -> TestTree+responseGetBlock =+ res+ "GetBlockResponse"+ "fixture/GetBlockResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetBlock)++responseGetDigest :: GetDigestResponse -> TestTree+responseGetDigest =+ res+ "GetDigestResponse"+ "fixture/GetDigestResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetDigest)++responseGetRevision :: GetRevisionResponse -> TestTree+responseGetRevision =+ res+ "GetRevisionResponse"+ "fixture/GetRevisionResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetRevision)++responseListJournalKinesisStreamsForLedger :: ListJournalKinesisStreamsForLedgerResponse -> TestTree+responseListJournalKinesisStreamsForLedger =+ res+ "ListJournalKinesisStreamsForLedgerResponse"+ "fixture/ListJournalKinesisStreamsForLedgerResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListJournalKinesisStreamsForLedger)++responseListJournalS3Exports :: ListJournalS3ExportsResponse -> TestTree+responseListJournalS3Exports =+ res+ "ListJournalS3ExportsResponse"+ "fixture/ListJournalS3ExportsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListJournalS3Exports)++responseListJournalS3ExportsForLedger :: ListJournalS3ExportsForLedgerResponse -> TestTree+responseListJournalS3ExportsForLedger =+ res+ "ListJournalS3ExportsForLedgerResponse"+ "fixture/ListJournalS3ExportsForLedgerResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListJournalS3ExportsForLedger)++responseListLedgers :: ListLedgersResponse -> TestTree+responseListLedgers =+ res+ "ListLedgersResponse"+ "fixture/ListLedgersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListLedgers)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseStreamJournalToKinesis :: StreamJournalToKinesisResponse -> TestTree+responseStreamJournalToKinesis =+ res+ "StreamJournalToKinesisResponse"+ "fixture/StreamJournalToKinesisResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy StreamJournalToKinesis)++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)++responseUpdateLedger :: UpdateLedgerResponse -> TestTree+responseUpdateLedger =+ res+ "UpdateLedgerResponse"+ "fixture/UpdateLedgerResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateLedger)++responseUpdateLedgerPermissionsMode :: UpdateLedgerPermissionsModeResponse -> TestTree+responseUpdateLedgerPermissionsMode =+ res+ "UpdateLedgerPermissionsModeResponse"+ "fixture/UpdateLedgerPermissionsModeResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateLedgerPermissionsMode)
+ test/Test/Amazonka/QLDB.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.QLDB+-- 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.QLDB+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/QLDB/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.QLDB.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.QLDB.Internal where