amazonka-docdb-elastic (empty) → 2.0
raw patch · 57 files changed
+5384/−0 lines, 57 filesdep +amazonka-coredep +amazonka-docdb-elasticdep +amazonka-test
Dependencies added: amazonka-core, amazonka-docdb-elastic, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-docdb-elastic.cabal +102/−0
- fixture/CreateCluster.yaml +10/−0
- fixture/CreateClusterResponse.proto +0/−0
- fixture/CreateClusterSnapshot.yaml +10/−0
- fixture/CreateClusterSnapshotResponse.proto +0/−0
- fixture/DeleteCluster.yaml +10/−0
- fixture/DeleteClusterResponse.proto +0/−0
- fixture/DeleteClusterSnapshot.yaml +10/−0
- fixture/DeleteClusterSnapshotResponse.proto +0/−0
- fixture/GetCluster.yaml +10/−0
- fixture/GetClusterResponse.proto +0/−0
- fixture/GetClusterSnapshot.yaml +10/−0
- fixture/GetClusterSnapshotResponse.proto +0/−0
- fixture/ListClusterSnapshots.yaml +10/−0
- fixture/ListClusterSnapshotsResponse.proto +0/−0
- fixture/ListClusters.yaml +10/−0
- fixture/ListClustersResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/RestoreClusterFromSnapshot.yaml +10/−0
- fixture/RestoreClusterFromSnapshotResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateCluster.yaml +10/−0
- fixture/UpdateClusterResponse.proto +0/−0
- gen/Amazonka/DocDbElastic.hs +195/−0
- gen/Amazonka/DocDbElastic/CreateCluster.hs +481/−0
- gen/Amazonka/DocDbElastic/CreateClusterSnapshot.hs +204/−0
- gen/Amazonka/DocDbElastic/DeleteCluster.hs +159/−0
- gen/Amazonka/DocDbElastic/DeleteClusterSnapshot.hs +164/−0
- gen/Amazonka/DocDbElastic/GetCluster.hs +157/−0
- gen/Amazonka/DocDbElastic/GetClusterSnapshot.hs +161/−0
- gen/Amazonka/DocDbElastic/Lens.hs +172/−0
- gen/Amazonka/DocDbElastic/ListClusterSnapshots.hs +237/−0
- gen/Amazonka/DocDbElastic/ListClusters.hs +220/−0
- gen/Amazonka/DocDbElastic/ListTagsForResource.hs +159/−0
- gen/Amazonka/DocDbElastic/RestoreClusterFromSnapshot.hs +290/−0
- gen/Amazonka/DocDbElastic/TagResource.hs +163/−0
- gen/Amazonka/DocDbElastic/Types.hs +221/−0
- gen/Amazonka/DocDbElastic/Types/Auth.hs +68/−0
- gen/Amazonka/DocDbElastic/Types/Cluster.hs +267/−0
- gen/Amazonka/DocDbElastic/Types/ClusterInList.hs +103/−0
- gen/Amazonka/DocDbElastic/Types/ClusterSnapshot.hs +217/−0
- gen/Amazonka/DocDbElastic/Types/ClusterSnapshotInList.hs +139/−0
- gen/Amazonka/DocDbElastic/Types/Status.hs +103/−0
- gen/Amazonka/DocDbElastic/UntagResource.hs +161/−0
- gen/Amazonka/DocDbElastic/UpdateCluster.hs +327/−0
- gen/Amazonka/DocDbElastic/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/DocDbElastic.hs +20/−0
- test/Test/Amazonka/DocDbElastic/Internal.hs +8/−0
- test/Test/Amazonka/Gen/DocDbElastic.hs +298/−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 DocumentDB Elastic Clusters SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2022-11-28@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-docdb-elastic)+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.DocDbElastic](http://hackage.haskell.org/package/amazonka-docdb-elastic/docs/Amazonka-DocDbElastic.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-docdb-elastic` 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-docdb-elastic.cabal view
@@ -0,0 +1,102 @@+cabal-version: 2.2+name: amazonka-docdb-elastic+version: 2.0+synopsis: Amazon DocumentDB Elastic Clusters 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 @2022-11-28@ 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.DocDbElastic.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.DocDbElastic" 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-docdb-elastic++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.DocDbElastic+ Amazonka.DocDbElastic.CreateCluster+ Amazonka.DocDbElastic.CreateClusterSnapshot+ Amazonka.DocDbElastic.DeleteCluster+ Amazonka.DocDbElastic.DeleteClusterSnapshot+ Amazonka.DocDbElastic.GetCluster+ Amazonka.DocDbElastic.GetClusterSnapshot+ Amazonka.DocDbElastic.Lens+ Amazonka.DocDbElastic.ListClusters+ Amazonka.DocDbElastic.ListClusterSnapshots+ Amazonka.DocDbElastic.ListTagsForResource+ Amazonka.DocDbElastic.RestoreClusterFromSnapshot+ Amazonka.DocDbElastic.TagResource+ Amazonka.DocDbElastic.Types+ Amazonka.DocDbElastic.Types.Auth+ Amazonka.DocDbElastic.Types.Cluster+ Amazonka.DocDbElastic.Types.ClusterInList+ Amazonka.DocDbElastic.Types.ClusterSnapshot+ Amazonka.DocDbElastic.Types.ClusterSnapshotInList+ Amazonka.DocDbElastic.Types.Status+ Amazonka.DocDbElastic.UntagResource+ Amazonka.DocDbElastic.UpdateCluster+ Amazonka.DocDbElastic.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-docdb-elastic-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.DocDbElastic+ Test.Amazonka.DocDbElastic.Internal+ Test.Amazonka.Gen.DocDbElastic++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-docdb-elastic+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CreateCluster.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/CreateClusterResponse.proto view
+ fixture/CreateClusterSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/CreateClusterSnapshotResponse.proto view
+ fixture/DeleteCluster.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/DeleteClusterResponse.proto view
+ fixture/DeleteClusterSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/DeleteClusterSnapshotResponse.proto view
+ fixture/GetCluster.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/GetClusterResponse.proto view
+ fixture/GetClusterSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/GetClusterSnapshotResponse.proto view
+ fixture/ListClusterSnapshots.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/ListClusterSnapshotsResponse.proto view
+ fixture/ListClusters.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/ListClustersResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/RestoreClusterFromSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/RestoreClusterFromSnapshotResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/UpdateCluster.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/docdb-elastic/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: docdb-elastic.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/UpdateClusterResponse.proto view
+ gen/Amazonka/DocDbElastic.hs view
@@ -0,0 +1,195 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.DocDbElastic+-- 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 @2022-11-28@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- The new Amazon Elastic DocumentDB service endpoint.+module Amazonka.DocDbElastic+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** AccessDeniedException+ _AccessDeniedException,++ -- ** ConflictException+ _ConflictException,++ -- ** InternalServerException+ _InternalServerException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ServiceQuotaExceededException+ _ServiceQuotaExceededException,++ -- ** ThrottlingException+ _ThrottlingException,++ -- ** ValidationException+ _ValidationException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** CreateCluster+ CreateCluster (CreateCluster'),+ newCreateCluster,+ CreateClusterResponse (CreateClusterResponse'),+ newCreateClusterResponse,++ -- ** CreateClusterSnapshot+ CreateClusterSnapshot (CreateClusterSnapshot'),+ newCreateClusterSnapshot,+ CreateClusterSnapshotResponse (CreateClusterSnapshotResponse'),+ newCreateClusterSnapshotResponse,++ -- ** DeleteCluster+ DeleteCluster (DeleteCluster'),+ newDeleteCluster,+ DeleteClusterResponse (DeleteClusterResponse'),+ newDeleteClusterResponse,++ -- ** DeleteClusterSnapshot+ DeleteClusterSnapshot (DeleteClusterSnapshot'),+ newDeleteClusterSnapshot,+ DeleteClusterSnapshotResponse (DeleteClusterSnapshotResponse'),+ newDeleteClusterSnapshotResponse,++ -- ** GetCluster+ GetCluster (GetCluster'),+ newGetCluster,+ GetClusterResponse (GetClusterResponse'),+ newGetClusterResponse,++ -- ** GetClusterSnapshot+ GetClusterSnapshot (GetClusterSnapshot'),+ newGetClusterSnapshot,+ GetClusterSnapshotResponse (GetClusterSnapshotResponse'),+ newGetClusterSnapshotResponse,++ -- ** ListClusterSnapshots (Paginated)+ ListClusterSnapshots (ListClusterSnapshots'),+ newListClusterSnapshots,+ ListClusterSnapshotsResponse (ListClusterSnapshotsResponse'),+ newListClusterSnapshotsResponse,++ -- ** ListClusters (Paginated)+ ListClusters (ListClusters'),+ newListClusters,+ ListClustersResponse (ListClustersResponse'),+ newListClustersResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** RestoreClusterFromSnapshot+ RestoreClusterFromSnapshot (RestoreClusterFromSnapshot'),+ newRestoreClusterFromSnapshot,+ RestoreClusterFromSnapshotResponse (RestoreClusterFromSnapshotResponse'),+ newRestoreClusterFromSnapshotResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateCluster+ UpdateCluster (UpdateCluster'),+ newUpdateCluster,+ UpdateClusterResponse (UpdateClusterResponse'),+ newUpdateClusterResponse,++ -- * Types++ -- ** Auth+ Auth (..),++ -- ** Status+ Status (..),++ -- ** Cluster+ Cluster (Cluster'),+ newCluster,++ -- ** ClusterInList+ ClusterInList (ClusterInList'),+ newClusterInList,++ -- ** ClusterSnapshot+ ClusterSnapshot (ClusterSnapshot'),+ newClusterSnapshot,++ -- ** ClusterSnapshotInList+ ClusterSnapshotInList (ClusterSnapshotInList'),+ newClusterSnapshotInList,+ )+where++import Amazonka.DocDbElastic.CreateCluster+import Amazonka.DocDbElastic.CreateClusterSnapshot+import Amazonka.DocDbElastic.DeleteCluster+import Amazonka.DocDbElastic.DeleteClusterSnapshot+import Amazonka.DocDbElastic.GetCluster+import Amazonka.DocDbElastic.GetClusterSnapshot+import Amazonka.DocDbElastic.Lens+import Amazonka.DocDbElastic.ListClusterSnapshots+import Amazonka.DocDbElastic.ListClusters+import Amazonka.DocDbElastic.ListTagsForResource+import Amazonka.DocDbElastic.RestoreClusterFromSnapshot+import Amazonka.DocDbElastic.TagResource+import Amazonka.DocDbElastic.Types+import Amazonka.DocDbElastic.UntagResource+import Amazonka.DocDbElastic.UpdateCluster+import Amazonka.DocDbElastic.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 'DocDbElastic'.++-- $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/DocDbElastic/CreateCluster.hs view
@@ -0,0 +1,481 @@+{-# 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.DocDbElastic.CreateCluster+-- 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 Elastic DocumentDB cluster and returns its Cluster+-- structure.+module Amazonka.DocDbElastic.CreateCluster+ ( -- * Creating a Request+ CreateCluster (..),+ newCreateCluster,++ -- * Request Lenses+ createCluster_clientToken,+ createCluster_kmsKeyId,+ createCluster_preferredMaintenanceWindow,+ createCluster_subnetIds,+ createCluster_tags,+ createCluster_vpcSecurityGroupIds,+ createCluster_adminUserName,+ createCluster_adminUserPassword,+ createCluster_authType,+ createCluster_clusterName,+ createCluster_shardCapacity,+ createCluster_shardCount,++ -- * Destructuring the Response+ CreateClusterResponse (..),+ newCreateClusterResponse,++ -- * Response Lenses+ createClusterResponse_httpStatus,+ createClusterResponse_cluster,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateCluster' smart constructor.+data CreateCluster = CreateCluster'+ { -- | The client token for the Elastic DocumentDB cluster.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The KMS key identifier to use to encrypt the new Elastic DocumentDB+ -- cluster.+ --+ -- The KMS key identifier is the Amazon Resource Name (ARN) for the KMS+ -- encryption key. If you are creating a cluster using the same Amazon+ -- account that owns this KMS encryption key, you can use the KMS key alias+ -- instead of the ARN as the KMS encryption key.+ --+ -- If an encryption key is not specified, Elastic DocumentDB uses the+ -- default encryption key that KMS creates for your account. Your account+ -- has a different default encryption key for each Amazon Region.+ kmsKeyId :: Prelude.Maybe Prelude.Text,+ -- | The weekly time range during which system maintenance can occur, in+ -- Universal Coordinated Time (UTC).+ --+ -- /Format/: @ddd:hh24:mi-ddd:hh24:mi@+ --+ -- /Default/: a 30-minute window selected at random from an 8-hour block of+ -- time for each Amazon Web Services Region, occurring on a random day of+ -- the week.+ --+ -- /Valid days/: Mon, Tue, Wed, Thu, Fri, Sat, Sun+ --+ -- /Constraints/: Minimum 30-minute window.+ preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,+ -- | The Amazon EC2 subnet IDs for the new Elastic DocumentDB cluster.+ subnetIds :: Prelude.Maybe [Prelude.Text],+ -- | The tags to be assigned to the new Elastic DocumentDB cluster.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | A list of EC2 VPC security groups to associate with the new Elastic+ -- DocumentDB cluster.+ vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],+ -- | The name of the Elastic DocumentDB cluster administrator.+ --+ -- /Constraints/:+ --+ -- - Must be from 1 to 63 letters or numbers.+ --+ -- - The first character must be a letter.+ --+ -- - Cannot be a reserved word.+ adminUserName :: Prelude.Text,+ -- | The password for the Elastic DocumentDB cluster administrator and can+ -- contain any printable ASCII characters.+ --+ -- /Constraints/:+ --+ -- - Must contain from 8 to 100 characters.+ --+ -- - Cannot contain a forward slash (\/), double quote (\"), or the+ -- \"at\" symbol (\@).+ adminUserPassword :: Data.Sensitive Prelude.Text,+ -- | The authentication type for the Elastic DocumentDB cluster.+ authType :: Auth,+ -- | The name of the new Elastic DocumentDB cluster. This parameter is stored+ -- as a lowercase string.+ --+ -- /Constraints/:+ --+ -- - Must contain from 1 to 63 letters, numbers, or hyphens.+ --+ -- - The first character must be a letter.+ --+ -- - Cannot end with a hyphen or contain two consecutive hyphens.+ --+ -- /Example/: @my-cluster@+ clusterName :: Prelude.Text,+ -- | The capacity of each shard in the new Elastic DocumentDB cluster.+ shardCapacity :: Prelude.Int,+ -- | The number of shards to create in the new Elastic DocumentDB cluster.+ shardCount :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateCluster' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'createCluster_clientToken' - The client token for the Elastic DocumentDB cluster.+--+-- 'kmsKeyId', 'createCluster_kmsKeyId' - The KMS key identifier to use to encrypt the new Elastic DocumentDB+-- cluster.+--+-- The KMS key identifier is the Amazon Resource Name (ARN) for the KMS+-- encryption key. If you are creating a cluster using the same Amazon+-- account that owns this KMS encryption key, you can use the KMS key alias+-- instead of the ARN as the KMS encryption key.+--+-- If an encryption key is not specified, Elastic DocumentDB uses the+-- default encryption key that KMS creates for your account. Your account+-- has a different default encryption key for each Amazon Region.+--+-- 'preferredMaintenanceWindow', 'createCluster_preferredMaintenanceWindow' - The weekly time range during which system maintenance can occur, in+-- Universal Coordinated Time (UTC).+--+-- /Format/: @ddd:hh24:mi-ddd:hh24:mi@+--+-- /Default/: a 30-minute window selected at random from an 8-hour block of+-- time for each Amazon Web Services Region, occurring on a random day of+-- the week.+--+-- /Valid days/: Mon, Tue, Wed, Thu, Fri, Sat, Sun+--+-- /Constraints/: Minimum 30-minute window.+--+-- 'subnetIds', 'createCluster_subnetIds' - The Amazon EC2 subnet IDs for the new Elastic DocumentDB cluster.+--+-- 'tags', 'createCluster_tags' - The tags to be assigned to the new Elastic DocumentDB cluster.+--+-- 'vpcSecurityGroupIds', 'createCluster_vpcSecurityGroupIds' - A list of EC2 VPC security groups to associate with the new Elastic+-- DocumentDB cluster.+--+-- 'adminUserName', 'createCluster_adminUserName' - The name of the Elastic DocumentDB cluster administrator.+--+-- /Constraints/:+--+-- - Must be from 1 to 63 letters or numbers.+--+-- - The first character must be a letter.+--+-- - Cannot be a reserved word.+--+-- 'adminUserPassword', 'createCluster_adminUserPassword' - The password for the Elastic DocumentDB cluster administrator and can+-- contain any printable ASCII characters.+--+-- /Constraints/:+--+-- - Must contain from 8 to 100 characters.+--+-- - Cannot contain a forward slash (\/), double quote (\"), or the+-- \"at\" symbol (\@).+--+-- 'authType', 'createCluster_authType' - The authentication type for the Elastic DocumentDB cluster.+--+-- 'clusterName', 'createCluster_clusterName' - The name of the new Elastic DocumentDB cluster. This parameter is stored+-- as a lowercase string.+--+-- /Constraints/:+--+-- - Must contain from 1 to 63 letters, numbers, or hyphens.+--+-- - The first character must be a letter.+--+-- - Cannot end with a hyphen or contain two consecutive hyphens.+--+-- /Example/: @my-cluster@+--+-- 'shardCapacity', 'createCluster_shardCapacity' - The capacity of each shard in the new Elastic DocumentDB cluster.+--+-- 'shardCount', 'createCluster_shardCount' - The number of shards to create in the new Elastic DocumentDB cluster.+newCreateCluster ::+ -- | 'adminUserName'+ Prelude.Text ->+ -- | 'adminUserPassword'+ Prelude.Text ->+ -- | 'authType'+ Auth ->+ -- | 'clusterName'+ Prelude.Text ->+ -- | 'shardCapacity'+ Prelude.Int ->+ -- | 'shardCount'+ Prelude.Int ->+ CreateCluster+newCreateCluster+ pAdminUserName_+ pAdminUserPassword_+ pAuthType_+ pClusterName_+ pShardCapacity_+ pShardCount_ =+ CreateCluster'+ { clientToken = Prelude.Nothing,+ kmsKeyId = Prelude.Nothing,+ preferredMaintenanceWindow = Prelude.Nothing,+ subnetIds = Prelude.Nothing,+ tags = Prelude.Nothing,+ vpcSecurityGroupIds = Prelude.Nothing,+ adminUserName = pAdminUserName_,+ adminUserPassword =+ Data._Sensitive Lens.# pAdminUserPassword_,+ authType = pAuthType_,+ clusterName = pClusterName_,+ shardCapacity = pShardCapacity_,+ shardCount = pShardCount_+ }++-- | The client token for the Elastic DocumentDB cluster.+createCluster_clientToken :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)+createCluster_clientToken = Lens.lens (\CreateCluster' {clientToken} -> clientToken) (\s@CreateCluster' {} a -> s {clientToken = a} :: CreateCluster)++-- | The KMS key identifier to use to encrypt the new Elastic DocumentDB+-- cluster.+--+-- The KMS key identifier is the Amazon Resource Name (ARN) for the KMS+-- encryption key. If you are creating a cluster using the same Amazon+-- account that owns this KMS encryption key, you can use the KMS key alias+-- instead of the ARN as the KMS encryption key.+--+-- If an encryption key is not specified, Elastic DocumentDB uses the+-- default encryption key that KMS creates for your account. Your account+-- has a different default encryption key for each Amazon Region.+createCluster_kmsKeyId :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)+createCluster_kmsKeyId = Lens.lens (\CreateCluster' {kmsKeyId} -> kmsKeyId) (\s@CreateCluster' {} a -> s {kmsKeyId = a} :: CreateCluster)++-- | The weekly time range during which system maintenance can occur, in+-- Universal Coordinated Time (UTC).+--+-- /Format/: @ddd:hh24:mi-ddd:hh24:mi@+--+-- /Default/: a 30-minute window selected at random from an 8-hour block of+-- time for each Amazon Web Services Region, occurring on a random day of+-- the week.+--+-- /Valid days/: Mon, Tue, Wed, Thu, Fri, Sat, Sun+--+-- /Constraints/: Minimum 30-minute window.+createCluster_preferredMaintenanceWindow :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)+createCluster_preferredMaintenanceWindow = Lens.lens (\CreateCluster' {preferredMaintenanceWindow} -> preferredMaintenanceWindow) (\s@CreateCluster' {} a -> s {preferredMaintenanceWindow = a} :: CreateCluster)++-- | The Amazon EC2 subnet IDs for the new Elastic DocumentDB cluster.+createCluster_subnetIds :: Lens.Lens' CreateCluster (Prelude.Maybe [Prelude.Text])+createCluster_subnetIds = Lens.lens (\CreateCluster' {subnetIds} -> subnetIds) (\s@CreateCluster' {} a -> s {subnetIds = a} :: CreateCluster) Prelude.. Lens.mapping Lens.coerced++-- | The tags to be assigned to the new Elastic DocumentDB cluster.+createCluster_tags :: Lens.Lens' CreateCluster (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createCluster_tags = Lens.lens (\CreateCluster' {tags} -> tags) (\s@CreateCluster' {} a -> s {tags = a} :: CreateCluster) Prelude.. Lens.mapping Lens.coerced++-- | A list of EC2 VPC security groups to associate with the new Elastic+-- DocumentDB cluster.+createCluster_vpcSecurityGroupIds :: Lens.Lens' CreateCluster (Prelude.Maybe [Prelude.Text])+createCluster_vpcSecurityGroupIds = Lens.lens (\CreateCluster' {vpcSecurityGroupIds} -> vpcSecurityGroupIds) (\s@CreateCluster' {} a -> s {vpcSecurityGroupIds = a} :: CreateCluster) Prelude.. Lens.mapping Lens.coerced++-- | The name of the Elastic DocumentDB cluster administrator.+--+-- /Constraints/:+--+-- - Must be from 1 to 63 letters or numbers.+--+-- - The first character must be a letter.+--+-- - Cannot be a reserved word.+createCluster_adminUserName :: Lens.Lens' CreateCluster Prelude.Text+createCluster_adminUserName = Lens.lens (\CreateCluster' {adminUserName} -> adminUserName) (\s@CreateCluster' {} a -> s {adminUserName = a} :: CreateCluster)++-- | The password for the Elastic DocumentDB cluster administrator and can+-- contain any printable ASCII characters.+--+-- /Constraints/:+--+-- - Must contain from 8 to 100 characters.+--+-- - Cannot contain a forward slash (\/), double quote (\"), or the+-- \"at\" symbol (\@).+createCluster_adminUserPassword :: Lens.Lens' CreateCluster Prelude.Text+createCluster_adminUserPassword = Lens.lens (\CreateCluster' {adminUserPassword} -> adminUserPassword) (\s@CreateCluster' {} a -> s {adminUserPassword = a} :: CreateCluster) Prelude.. Data._Sensitive++-- | The authentication type for the Elastic DocumentDB cluster.+createCluster_authType :: Lens.Lens' CreateCluster Auth+createCluster_authType = Lens.lens (\CreateCluster' {authType} -> authType) (\s@CreateCluster' {} a -> s {authType = a} :: CreateCluster)++-- | The name of the new Elastic DocumentDB cluster. This parameter is stored+-- as a lowercase string.+--+-- /Constraints/:+--+-- - Must contain from 1 to 63 letters, numbers, or hyphens.+--+-- - The first character must be a letter.+--+-- - Cannot end with a hyphen or contain two consecutive hyphens.+--+-- /Example/: @my-cluster@+createCluster_clusterName :: Lens.Lens' CreateCluster Prelude.Text+createCluster_clusterName = Lens.lens (\CreateCluster' {clusterName} -> clusterName) (\s@CreateCluster' {} a -> s {clusterName = a} :: CreateCluster)++-- | The capacity of each shard in the new Elastic DocumentDB cluster.+createCluster_shardCapacity :: Lens.Lens' CreateCluster Prelude.Int+createCluster_shardCapacity = Lens.lens (\CreateCluster' {shardCapacity} -> shardCapacity) (\s@CreateCluster' {} a -> s {shardCapacity = a} :: CreateCluster)++-- | The number of shards to create in the new Elastic DocumentDB cluster.+createCluster_shardCount :: Lens.Lens' CreateCluster Prelude.Int+createCluster_shardCount = Lens.lens (\CreateCluster' {shardCount} -> shardCount) (\s@CreateCluster' {} a -> s {shardCount = a} :: CreateCluster)++instance Core.AWSRequest CreateCluster where+ type+ AWSResponse CreateCluster =+ CreateClusterResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateClusterResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "cluster")+ )++instance Prelude.Hashable CreateCluster where+ hashWithSalt _salt CreateCluster' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` kmsKeyId+ `Prelude.hashWithSalt` preferredMaintenanceWindow+ `Prelude.hashWithSalt` subnetIds+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` vpcSecurityGroupIds+ `Prelude.hashWithSalt` adminUserName+ `Prelude.hashWithSalt` adminUserPassword+ `Prelude.hashWithSalt` authType+ `Prelude.hashWithSalt` clusterName+ `Prelude.hashWithSalt` shardCapacity+ `Prelude.hashWithSalt` shardCount++instance Prelude.NFData CreateCluster where+ rnf CreateCluster' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf kmsKeyId+ `Prelude.seq` Prelude.rnf preferredMaintenanceWindow+ `Prelude.seq` Prelude.rnf subnetIds+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf vpcSecurityGroupIds+ `Prelude.seq` Prelude.rnf adminUserName+ `Prelude.seq` Prelude.rnf adminUserPassword+ `Prelude.seq` Prelude.rnf authType+ `Prelude.seq` Prelude.rnf clusterName+ `Prelude.seq` Prelude.rnf shardCapacity+ `Prelude.seq` Prelude.rnf shardCount++instance Data.ToHeaders CreateCluster where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateCluster where+ toJSON CreateCluster' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("clientToken" Data..=) Prelude.<$> clientToken,+ ("kmsKeyId" Data..=) Prelude.<$> kmsKeyId,+ ("preferredMaintenanceWindow" Data..=)+ Prelude.<$> preferredMaintenanceWindow,+ ("subnetIds" Data..=) Prelude.<$> subnetIds,+ ("tags" Data..=) Prelude.<$> tags,+ ("vpcSecurityGroupIds" Data..=)+ Prelude.<$> vpcSecurityGroupIds,+ Prelude.Just ("adminUserName" Data..= adminUserName),+ Prelude.Just+ ("adminUserPassword" Data..= adminUserPassword),+ Prelude.Just ("authType" Data..= authType),+ Prelude.Just ("clusterName" Data..= clusterName),+ Prelude.Just ("shardCapacity" Data..= shardCapacity),+ Prelude.Just ("shardCount" Data..= shardCount)+ ]+ )++instance Data.ToPath CreateCluster where+ toPath = Prelude.const "/cluster"++instance Data.ToQuery CreateCluster where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateClusterResponse' smart constructor.+data CreateClusterResponse = CreateClusterResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The new Elastic DocumentDB cluster that has been created.+ cluster :: Cluster+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateClusterResponse' 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', 'createClusterResponse_httpStatus' - The response's http status code.+--+-- 'cluster', 'createClusterResponse_cluster' - The new Elastic DocumentDB cluster that has been created.+newCreateClusterResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'cluster'+ Cluster ->+ CreateClusterResponse+newCreateClusterResponse pHttpStatus_ pCluster_ =+ CreateClusterResponse'+ { httpStatus = pHttpStatus_,+ cluster = pCluster_+ }++-- | The response's http status code.+createClusterResponse_httpStatus :: Lens.Lens' CreateClusterResponse Prelude.Int+createClusterResponse_httpStatus = Lens.lens (\CreateClusterResponse' {httpStatus} -> httpStatus) (\s@CreateClusterResponse' {} a -> s {httpStatus = a} :: CreateClusterResponse)++-- | The new Elastic DocumentDB cluster that has been created.+createClusterResponse_cluster :: Lens.Lens' CreateClusterResponse Cluster+createClusterResponse_cluster = Lens.lens (\CreateClusterResponse' {cluster} -> cluster) (\s@CreateClusterResponse' {} a -> s {cluster = a} :: CreateClusterResponse)++instance Prelude.NFData CreateClusterResponse where+ rnf CreateClusterResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf cluster
+ gen/Amazonka/DocDbElastic/CreateClusterSnapshot.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.DocDbElastic.CreateClusterSnapshot+-- 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 snapshot of a cluster.+module Amazonka.DocDbElastic.CreateClusterSnapshot+ ( -- * Creating a Request+ CreateClusterSnapshot (..),+ newCreateClusterSnapshot,++ -- * Request Lenses+ createClusterSnapshot_tags,+ createClusterSnapshot_clusterArn,+ createClusterSnapshot_snapshotName,++ -- * Destructuring the Response+ CreateClusterSnapshotResponse (..),+ newCreateClusterSnapshotResponse,++ -- * Response Lenses+ createClusterSnapshotResponse_httpStatus,+ createClusterSnapshotResponse_snapshot,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateClusterSnapshot' smart constructor.+data CreateClusterSnapshot = CreateClusterSnapshot'+ { -- | The tags to be assigned to the new Elastic DocumentDB snapshot.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The arn of the Elastic DocumentDB cluster that the snapshot will be+ -- taken from.+ clusterArn :: Prelude.Text,+ -- | The name of the Elastic DocumentDB snapshot.+ snapshotName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateClusterSnapshot' 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', 'createClusterSnapshot_tags' - The tags to be assigned to the new Elastic DocumentDB snapshot.+--+-- 'clusterArn', 'createClusterSnapshot_clusterArn' - The arn of the Elastic DocumentDB cluster that the snapshot will be+-- taken from.+--+-- 'snapshotName', 'createClusterSnapshot_snapshotName' - The name of the Elastic DocumentDB snapshot.+newCreateClusterSnapshot ::+ -- | 'clusterArn'+ Prelude.Text ->+ -- | 'snapshotName'+ Prelude.Text ->+ CreateClusterSnapshot+newCreateClusterSnapshot pClusterArn_ pSnapshotName_ =+ CreateClusterSnapshot'+ { tags = Prelude.Nothing,+ clusterArn = pClusterArn_,+ snapshotName = pSnapshotName_+ }++-- | The tags to be assigned to the new Elastic DocumentDB snapshot.+createClusterSnapshot_tags :: Lens.Lens' CreateClusterSnapshot (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createClusterSnapshot_tags = Lens.lens (\CreateClusterSnapshot' {tags} -> tags) (\s@CreateClusterSnapshot' {} a -> s {tags = a} :: CreateClusterSnapshot) Prelude.. Lens.mapping Lens.coerced++-- | The arn of the Elastic DocumentDB cluster that the snapshot will be+-- taken from.+createClusterSnapshot_clusterArn :: Lens.Lens' CreateClusterSnapshot Prelude.Text+createClusterSnapshot_clusterArn = Lens.lens (\CreateClusterSnapshot' {clusterArn} -> clusterArn) (\s@CreateClusterSnapshot' {} a -> s {clusterArn = a} :: CreateClusterSnapshot)++-- | The name of the Elastic DocumentDB snapshot.+createClusterSnapshot_snapshotName :: Lens.Lens' CreateClusterSnapshot Prelude.Text+createClusterSnapshot_snapshotName = Lens.lens (\CreateClusterSnapshot' {snapshotName} -> snapshotName) (\s@CreateClusterSnapshot' {} a -> s {snapshotName = a} :: CreateClusterSnapshot)++instance Core.AWSRequest CreateClusterSnapshot where+ type+ AWSResponse CreateClusterSnapshot =+ CreateClusterSnapshotResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateClusterSnapshotResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "snapshot")+ )++instance Prelude.Hashable CreateClusterSnapshot where+ hashWithSalt _salt CreateClusterSnapshot' {..} =+ _salt+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` clusterArn+ `Prelude.hashWithSalt` snapshotName++instance Prelude.NFData CreateClusterSnapshot where+ rnf CreateClusterSnapshot' {..} =+ Prelude.rnf tags+ `Prelude.seq` Prelude.rnf clusterArn+ `Prelude.seq` Prelude.rnf snapshotName++instance Data.ToHeaders CreateClusterSnapshot where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateClusterSnapshot where+ toJSON CreateClusterSnapshot' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("tags" Data..=) Prelude.<$> tags,+ Prelude.Just ("clusterArn" Data..= clusterArn),+ Prelude.Just ("snapshotName" Data..= snapshotName)+ ]+ )++instance Data.ToPath CreateClusterSnapshot where+ toPath = Prelude.const "/cluster-snapshot"++instance Data.ToQuery CreateClusterSnapshot where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateClusterSnapshotResponse' smart constructor.+data CreateClusterSnapshotResponse = CreateClusterSnapshotResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Returns information about the new Elastic DocumentDB snapshot.+ snapshot :: ClusterSnapshot+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateClusterSnapshotResponse' 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', 'createClusterSnapshotResponse_httpStatus' - The response's http status code.+--+-- 'snapshot', 'createClusterSnapshotResponse_snapshot' - Returns information about the new Elastic DocumentDB snapshot.+newCreateClusterSnapshotResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'snapshot'+ ClusterSnapshot ->+ CreateClusterSnapshotResponse+newCreateClusterSnapshotResponse+ pHttpStatus_+ pSnapshot_ =+ CreateClusterSnapshotResponse'+ { httpStatus =+ pHttpStatus_,+ snapshot = pSnapshot_+ }++-- | The response's http status code.+createClusterSnapshotResponse_httpStatus :: Lens.Lens' CreateClusterSnapshotResponse Prelude.Int+createClusterSnapshotResponse_httpStatus = Lens.lens (\CreateClusterSnapshotResponse' {httpStatus} -> httpStatus) (\s@CreateClusterSnapshotResponse' {} a -> s {httpStatus = a} :: CreateClusterSnapshotResponse)++-- | Returns information about the new Elastic DocumentDB snapshot.+createClusterSnapshotResponse_snapshot :: Lens.Lens' CreateClusterSnapshotResponse ClusterSnapshot+createClusterSnapshotResponse_snapshot = Lens.lens (\CreateClusterSnapshotResponse' {snapshot} -> snapshot) (\s@CreateClusterSnapshotResponse' {} a -> s {snapshot = a} :: CreateClusterSnapshotResponse)++instance Prelude.NFData CreateClusterSnapshotResponse where+ rnf CreateClusterSnapshotResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf snapshot
+ gen/Amazonka/DocDbElastic/DeleteCluster.hs view
@@ -0,0 +1,159 @@+{-# 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.DocDbElastic.DeleteCluster+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Delete a Elastic DocumentDB cluster.+module Amazonka.DocDbElastic.DeleteCluster+ ( -- * Creating a Request+ DeleteCluster (..),+ newDeleteCluster,++ -- * Request Lenses+ deleteCluster_clusterArn,++ -- * Destructuring the Response+ DeleteClusterResponse (..),+ newDeleteClusterResponse,++ -- * Response Lenses+ deleteClusterResponse_httpStatus,+ deleteClusterResponse_cluster,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteCluster' smart constructor.+data DeleteCluster = DeleteCluster'+ { -- | The arn of the Elastic DocumentDB cluster that is to be deleted.+ clusterArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteCluster' 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:+--+-- 'clusterArn', 'deleteCluster_clusterArn' - The arn of the Elastic DocumentDB cluster that is to be deleted.+newDeleteCluster ::+ -- | 'clusterArn'+ Prelude.Text ->+ DeleteCluster+newDeleteCluster pClusterArn_ =+ DeleteCluster' {clusterArn = pClusterArn_}++-- | The arn of the Elastic DocumentDB cluster that is to be deleted.+deleteCluster_clusterArn :: Lens.Lens' DeleteCluster Prelude.Text+deleteCluster_clusterArn = Lens.lens (\DeleteCluster' {clusterArn} -> clusterArn) (\s@DeleteCluster' {} a -> s {clusterArn = a} :: DeleteCluster)++instance Core.AWSRequest DeleteCluster where+ type+ AWSResponse DeleteCluster =+ DeleteClusterResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteClusterResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "cluster")+ )++instance Prelude.Hashable DeleteCluster where+ hashWithSalt _salt DeleteCluster' {..} =+ _salt `Prelude.hashWithSalt` clusterArn++instance Prelude.NFData DeleteCluster where+ rnf DeleteCluster' {..} = Prelude.rnf clusterArn++instance Data.ToHeaders DeleteCluster where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteCluster where+ toPath DeleteCluster' {..} =+ Prelude.mconcat ["/cluster/", Data.toBS clusterArn]++instance Data.ToQuery DeleteCluster where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteClusterResponse' smart constructor.+data DeleteClusterResponse = DeleteClusterResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Returns information about the newly deleted Elastic DocumentDB cluster.+ cluster :: Cluster+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteClusterResponse' 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', 'deleteClusterResponse_httpStatus' - The response's http status code.+--+-- 'cluster', 'deleteClusterResponse_cluster' - Returns information about the newly deleted Elastic DocumentDB cluster.+newDeleteClusterResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'cluster'+ Cluster ->+ DeleteClusterResponse+newDeleteClusterResponse pHttpStatus_ pCluster_ =+ DeleteClusterResponse'+ { httpStatus = pHttpStatus_,+ cluster = pCluster_+ }++-- | The response's http status code.+deleteClusterResponse_httpStatus :: Lens.Lens' DeleteClusterResponse Prelude.Int+deleteClusterResponse_httpStatus = Lens.lens (\DeleteClusterResponse' {httpStatus} -> httpStatus) (\s@DeleteClusterResponse' {} a -> s {httpStatus = a} :: DeleteClusterResponse)++-- | Returns information about the newly deleted Elastic DocumentDB cluster.+deleteClusterResponse_cluster :: Lens.Lens' DeleteClusterResponse Cluster+deleteClusterResponse_cluster = Lens.lens (\DeleteClusterResponse' {cluster} -> cluster) (\s@DeleteClusterResponse' {} a -> s {cluster = a} :: DeleteClusterResponse)++instance Prelude.NFData DeleteClusterResponse where+ rnf DeleteClusterResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf cluster
+ gen/Amazonka/DocDbElastic/DeleteClusterSnapshot.hs view
@@ -0,0 +1,164 @@+{-# 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.DocDbElastic.DeleteClusterSnapshot+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Delete a Elastic DocumentDB snapshot.+module Amazonka.DocDbElastic.DeleteClusterSnapshot+ ( -- * Creating a Request+ DeleteClusterSnapshot (..),+ newDeleteClusterSnapshot,++ -- * Request Lenses+ deleteClusterSnapshot_snapshotArn,++ -- * Destructuring the Response+ DeleteClusterSnapshotResponse (..),+ newDeleteClusterSnapshotResponse,++ -- * Response Lenses+ deleteClusterSnapshotResponse_httpStatus,+ deleteClusterSnapshotResponse_snapshot,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteClusterSnapshot' smart constructor.+data DeleteClusterSnapshot = DeleteClusterSnapshot'+ { -- | The arn of the Elastic DocumentDB snapshot that is to be deleted.+ snapshotArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteClusterSnapshot' 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:+--+-- 'snapshotArn', 'deleteClusterSnapshot_snapshotArn' - The arn of the Elastic DocumentDB snapshot that is to be deleted.+newDeleteClusterSnapshot ::+ -- | 'snapshotArn'+ Prelude.Text ->+ DeleteClusterSnapshot+newDeleteClusterSnapshot pSnapshotArn_ =+ DeleteClusterSnapshot' {snapshotArn = pSnapshotArn_}++-- | The arn of the Elastic DocumentDB snapshot that is to be deleted.+deleteClusterSnapshot_snapshotArn :: Lens.Lens' DeleteClusterSnapshot Prelude.Text+deleteClusterSnapshot_snapshotArn = Lens.lens (\DeleteClusterSnapshot' {snapshotArn} -> snapshotArn) (\s@DeleteClusterSnapshot' {} a -> s {snapshotArn = a} :: DeleteClusterSnapshot)++instance Core.AWSRequest DeleteClusterSnapshot where+ type+ AWSResponse DeleteClusterSnapshot =+ DeleteClusterSnapshotResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteClusterSnapshotResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "snapshot")+ )++instance Prelude.Hashable DeleteClusterSnapshot where+ hashWithSalt _salt DeleteClusterSnapshot' {..} =+ _salt `Prelude.hashWithSalt` snapshotArn++instance Prelude.NFData DeleteClusterSnapshot where+ rnf DeleteClusterSnapshot' {..} =+ Prelude.rnf snapshotArn++instance Data.ToHeaders DeleteClusterSnapshot where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteClusterSnapshot where+ toPath DeleteClusterSnapshot' {..} =+ Prelude.mconcat+ ["/cluster-snapshot/", Data.toBS snapshotArn]++instance Data.ToQuery DeleteClusterSnapshot where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteClusterSnapshotResponse' smart constructor.+data DeleteClusterSnapshotResponse = DeleteClusterSnapshotResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Returns information about the newly deleted Elastic DocumentDB snapshot.+ snapshot :: ClusterSnapshot+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteClusterSnapshotResponse' 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', 'deleteClusterSnapshotResponse_httpStatus' - The response's http status code.+--+-- 'snapshot', 'deleteClusterSnapshotResponse_snapshot' - Returns information about the newly deleted Elastic DocumentDB snapshot.+newDeleteClusterSnapshotResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'snapshot'+ ClusterSnapshot ->+ DeleteClusterSnapshotResponse+newDeleteClusterSnapshotResponse+ pHttpStatus_+ pSnapshot_ =+ DeleteClusterSnapshotResponse'+ { httpStatus =+ pHttpStatus_,+ snapshot = pSnapshot_+ }++-- | The response's http status code.+deleteClusterSnapshotResponse_httpStatus :: Lens.Lens' DeleteClusterSnapshotResponse Prelude.Int+deleteClusterSnapshotResponse_httpStatus = Lens.lens (\DeleteClusterSnapshotResponse' {httpStatus} -> httpStatus) (\s@DeleteClusterSnapshotResponse' {} a -> s {httpStatus = a} :: DeleteClusterSnapshotResponse)++-- | Returns information about the newly deleted Elastic DocumentDB snapshot.+deleteClusterSnapshotResponse_snapshot :: Lens.Lens' DeleteClusterSnapshotResponse ClusterSnapshot+deleteClusterSnapshotResponse_snapshot = Lens.lens (\DeleteClusterSnapshotResponse' {snapshot} -> snapshot) (\s@DeleteClusterSnapshotResponse' {} a -> s {snapshot = a} :: DeleteClusterSnapshotResponse)++instance Prelude.NFData DeleteClusterSnapshotResponse where+ rnf DeleteClusterSnapshotResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf snapshot
+ gen/Amazonka/DocDbElastic/GetCluster.hs view
@@ -0,0 +1,157 @@+{-# 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.DocDbElastic.GetCluster+-- 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 specific Elastic DocumentDB cluster.+module Amazonka.DocDbElastic.GetCluster+ ( -- * Creating a Request+ GetCluster (..),+ newGetCluster,++ -- * Request Lenses+ getCluster_clusterArn,++ -- * Destructuring the Response+ GetClusterResponse (..),+ newGetClusterResponse,++ -- * Response Lenses+ getClusterResponse_httpStatus,+ getClusterResponse_cluster,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetCluster' smart constructor.+data GetCluster = GetCluster'+ { -- | The arn of the Elastic DocumentDB cluster.+ clusterArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetCluster' 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:+--+-- 'clusterArn', 'getCluster_clusterArn' - The arn of the Elastic DocumentDB cluster.+newGetCluster ::+ -- | 'clusterArn'+ Prelude.Text ->+ GetCluster+newGetCluster pClusterArn_ =+ GetCluster' {clusterArn = pClusterArn_}++-- | The arn of the Elastic DocumentDB cluster.+getCluster_clusterArn :: Lens.Lens' GetCluster Prelude.Text+getCluster_clusterArn = Lens.lens (\GetCluster' {clusterArn} -> clusterArn) (\s@GetCluster' {} a -> s {clusterArn = a} :: GetCluster)++instance Core.AWSRequest GetCluster where+ type AWSResponse GetCluster = GetClusterResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetClusterResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "cluster")+ )++instance Prelude.Hashable GetCluster where+ hashWithSalt _salt GetCluster' {..} =+ _salt `Prelude.hashWithSalt` clusterArn++instance Prelude.NFData GetCluster where+ rnf GetCluster' {..} = Prelude.rnf clusterArn++instance Data.ToHeaders GetCluster where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetCluster where+ toPath GetCluster' {..} =+ Prelude.mconcat ["/cluster/", Data.toBS clusterArn]++instance Data.ToQuery GetCluster where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetClusterResponse' smart constructor.+data GetClusterResponse = GetClusterResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Returns information about a specific Elastic DocumentDB cluster.+ cluster :: Cluster+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetClusterResponse' 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', 'getClusterResponse_httpStatus' - The response's http status code.+--+-- 'cluster', 'getClusterResponse_cluster' - Returns information about a specific Elastic DocumentDB cluster.+newGetClusterResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'cluster'+ Cluster ->+ GetClusterResponse+newGetClusterResponse pHttpStatus_ pCluster_ =+ GetClusterResponse'+ { httpStatus = pHttpStatus_,+ cluster = pCluster_+ }++-- | The response's http status code.+getClusterResponse_httpStatus :: Lens.Lens' GetClusterResponse Prelude.Int+getClusterResponse_httpStatus = Lens.lens (\GetClusterResponse' {httpStatus} -> httpStatus) (\s@GetClusterResponse' {} a -> s {httpStatus = a} :: GetClusterResponse)++-- | Returns information about a specific Elastic DocumentDB cluster.+getClusterResponse_cluster :: Lens.Lens' GetClusterResponse Cluster+getClusterResponse_cluster = Lens.lens (\GetClusterResponse' {cluster} -> cluster) (\s@GetClusterResponse' {} a -> s {cluster = a} :: GetClusterResponse)++instance Prelude.NFData GetClusterResponse where+ rnf GetClusterResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf cluster
+ gen/Amazonka/DocDbElastic/GetClusterSnapshot.hs view
@@ -0,0 +1,161 @@+{-# 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.DocDbElastic.GetClusterSnapshot+-- 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 specific Elastic DocumentDB snapshot+module Amazonka.DocDbElastic.GetClusterSnapshot+ ( -- * Creating a Request+ GetClusterSnapshot (..),+ newGetClusterSnapshot,++ -- * Request Lenses+ getClusterSnapshot_snapshotArn,++ -- * Destructuring the Response+ GetClusterSnapshotResponse (..),+ newGetClusterSnapshotResponse,++ -- * Response Lenses+ getClusterSnapshotResponse_httpStatus,+ getClusterSnapshotResponse_snapshot,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetClusterSnapshot' smart constructor.+data GetClusterSnapshot = GetClusterSnapshot'+ { -- | The arn of the Elastic DocumentDB snapshot.+ snapshotArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetClusterSnapshot' 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:+--+-- 'snapshotArn', 'getClusterSnapshot_snapshotArn' - The arn of the Elastic DocumentDB snapshot.+newGetClusterSnapshot ::+ -- | 'snapshotArn'+ Prelude.Text ->+ GetClusterSnapshot+newGetClusterSnapshot pSnapshotArn_ =+ GetClusterSnapshot' {snapshotArn = pSnapshotArn_}++-- | The arn of the Elastic DocumentDB snapshot.+getClusterSnapshot_snapshotArn :: Lens.Lens' GetClusterSnapshot Prelude.Text+getClusterSnapshot_snapshotArn = Lens.lens (\GetClusterSnapshot' {snapshotArn} -> snapshotArn) (\s@GetClusterSnapshot' {} a -> s {snapshotArn = a} :: GetClusterSnapshot)++instance Core.AWSRequest GetClusterSnapshot where+ type+ AWSResponse GetClusterSnapshot =+ GetClusterSnapshotResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetClusterSnapshotResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "snapshot")+ )++instance Prelude.Hashable GetClusterSnapshot where+ hashWithSalt _salt GetClusterSnapshot' {..} =+ _salt `Prelude.hashWithSalt` snapshotArn++instance Prelude.NFData GetClusterSnapshot where+ rnf GetClusterSnapshot' {..} = Prelude.rnf snapshotArn++instance Data.ToHeaders GetClusterSnapshot where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetClusterSnapshot where+ toPath GetClusterSnapshot' {..} =+ Prelude.mconcat+ ["/cluster-snapshot/", Data.toBS snapshotArn]++instance Data.ToQuery GetClusterSnapshot where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetClusterSnapshotResponse' smart constructor.+data GetClusterSnapshotResponse = GetClusterSnapshotResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Returns information about a specific Elastic DocumentDB snapshot.+ snapshot :: ClusterSnapshot+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetClusterSnapshotResponse' 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', 'getClusterSnapshotResponse_httpStatus' - The response's http status code.+--+-- 'snapshot', 'getClusterSnapshotResponse_snapshot' - Returns information about a specific Elastic DocumentDB snapshot.+newGetClusterSnapshotResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'snapshot'+ ClusterSnapshot ->+ GetClusterSnapshotResponse+newGetClusterSnapshotResponse pHttpStatus_ pSnapshot_ =+ GetClusterSnapshotResponse'+ { httpStatus =+ pHttpStatus_,+ snapshot = pSnapshot_+ }++-- | The response's http status code.+getClusterSnapshotResponse_httpStatus :: Lens.Lens' GetClusterSnapshotResponse Prelude.Int+getClusterSnapshotResponse_httpStatus = Lens.lens (\GetClusterSnapshotResponse' {httpStatus} -> httpStatus) (\s@GetClusterSnapshotResponse' {} a -> s {httpStatus = a} :: GetClusterSnapshotResponse)++-- | Returns information about a specific Elastic DocumentDB snapshot.+getClusterSnapshotResponse_snapshot :: Lens.Lens' GetClusterSnapshotResponse ClusterSnapshot+getClusterSnapshotResponse_snapshot = Lens.lens (\GetClusterSnapshotResponse' {snapshot} -> snapshot) (\s@GetClusterSnapshotResponse' {} a -> s {snapshot = a} :: GetClusterSnapshotResponse)++instance Prelude.NFData GetClusterSnapshotResponse where+ rnf GetClusterSnapshotResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf snapshot
+ gen/Amazonka/DocDbElastic/Lens.hs view
@@ -0,0 +1,172 @@+{-# 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.DocDbElastic.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.DocDbElastic.Lens+ ( -- * Operations++ -- ** CreateCluster+ createCluster_clientToken,+ createCluster_kmsKeyId,+ createCluster_preferredMaintenanceWindow,+ createCluster_subnetIds,+ createCluster_tags,+ createCluster_vpcSecurityGroupIds,+ createCluster_adminUserName,+ createCluster_adminUserPassword,+ createCluster_authType,+ createCluster_clusterName,+ createCluster_shardCapacity,+ createCluster_shardCount,+ createClusterResponse_httpStatus,+ createClusterResponse_cluster,++ -- ** CreateClusterSnapshot+ createClusterSnapshot_tags,+ createClusterSnapshot_clusterArn,+ createClusterSnapshot_snapshotName,+ createClusterSnapshotResponse_httpStatus,+ createClusterSnapshotResponse_snapshot,++ -- ** DeleteCluster+ deleteCluster_clusterArn,+ deleteClusterResponse_httpStatus,+ deleteClusterResponse_cluster,++ -- ** DeleteClusterSnapshot+ deleteClusterSnapshot_snapshotArn,+ deleteClusterSnapshotResponse_httpStatus,+ deleteClusterSnapshotResponse_snapshot,++ -- ** GetCluster+ getCluster_clusterArn,+ getClusterResponse_httpStatus,+ getClusterResponse_cluster,++ -- ** GetClusterSnapshot+ getClusterSnapshot_snapshotArn,+ getClusterSnapshotResponse_httpStatus,+ getClusterSnapshotResponse_snapshot,++ -- ** ListClusterSnapshots+ listClusterSnapshots_clusterArn,+ listClusterSnapshots_maxResults,+ listClusterSnapshots_nextToken,+ listClusterSnapshotsResponse_nextToken,+ listClusterSnapshotsResponse_snapshots,+ listClusterSnapshotsResponse_httpStatus,++ -- ** ListClusters+ listClusters_maxResults,+ listClusters_nextToken,+ listClustersResponse_clusters,+ listClustersResponse_nextToken,+ listClustersResponse_httpStatus,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,++ -- ** RestoreClusterFromSnapshot+ restoreClusterFromSnapshot_kmsKeyId,+ restoreClusterFromSnapshot_subnetIds,+ restoreClusterFromSnapshot_tags,+ restoreClusterFromSnapshot_vpcSecurityGroupIds,+ restoreClusterFromSnapshot_clusterName,+ restoreClusterFromSnapshot_snapshotArn,+ restoreClusterFromSnapshotResponse_httpStatus,+ restoreClusterFromSnapshotResponse_cluster,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdateCluster+ updateCluster_adminUserPassword,+ updateCluster_authType,+ updateCluster_clientToken,+ updateCluster_preferredMaintenanceWindow,+ updateCluster_shardCapacity,+ updateCluster_shardCount,+ updateCluster_subnetIds,+ updateCluster_vpcSecurityGroupIds,+ updateCluster_clusterArn,+ updateClusterResponse_httpStatus,+ updateClusterResponse_cluster,++ -- * Types++ -- ** Cluster+ cluster_adminUserName,+ cluster_authType,+ cluster_clusterArn,+ cluster_clusterEndpoint,+ cluster_clusterName,+ cluster_createTime,+ cluster_kmsKeyId,+ cluster_preferredMaintenanceWindow,+ cluster_shardCapacity,+ cluster_shardCount,+ cluster_status,+ cluster_subnetIds,+ cluster_vpcSecurityGroupIds,++ -- ** ClusterInList+ clusterInList_clusterArn,+ clusterInList_clusterName,+ clusterInList_status,++ -- ** ClusterSnapshot+ clusterSnapshot_adminUserName,+ clusterSnapshot_clusterArn,+ clusterSnapshot_clusterCreationTime,+ clusterSnapshot_kmsKeyId,+ clusterSnapshot_snapshotArn,+ clusterSnapshot_snapshotCreationTime,+ clusterSnapshot_snapshotName,+ clusterSnapshot_status,+ clusterSnapshot_subnetIds,+ clusterSnapshot_vpcSecurityGroupIds,++ -- ** ClusterSnapshotInList+ clusterSnapshotInList_clusterArn,+ clusterSnapshotInList_snapshotArn,+ clusterSnapshotInList_snapshotCreationTime,+ clusterSnapshotInList_snapshotName,+ clusterSnapshotInList_status,+ )+where++import Amazonka.DocDbElastic.CreateCluster+import Amazonka.DocDbElastic.CreateClusterSnapshot+import Amazonka.DocDbElastic.DeleteCluster+import Amazonka.DocDbElastic.DeleteClusterSnapshot+import Amazonka.DocDbElastic.GetCluster+import Amazonka.DocDbElastic.GetClusterSnapshot+import Amazonka.DocDbElastic.ListClusterSnapshots+import Amazonka.DocDbElastic.ListClusters+import Amazonka.DocDbElastic.ListTagsForResource+import Amazonka.DocDbElastic.RestoreClusterFromSnapshot+import Amazonka.DocDbElastic.TagResource+import Amazonka.DocDbElastic.Types.Cluster+import Amazonka.DocDbElastic.Types.ClusterInList+import Amazonka.DocDbElastic.Types.ClusterSnapshot+import Amazonka.DocDbElastic.Types.ClusterSnapshotInList+import Amazonka.DocDbElastic.UntagResource+import Amazonka.DocDbElastic.UpdateCluster
+ gen/Amazonka/DocDbElastic/ListClusterSnapshots.hs view
@@ -0,0 +1,237 @@+{-# 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.DocDbElastic.ListClusterSnapshots+-- 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 Elastic DocumentDB snapshots for a specified+-- cluster.+--+-- This operation returns paginated results.+module Amazonka.DocDbElastic.ListClusterSnapshots+ ( -- * Creating a Request+ ListClusterSnapshots (..),+ newListClusterSnapshots,++ -- * Request Lenses+ listClusterSnapshots_clusterArn,+ listClusterSnapshots_maxResults,+ listClusterSnapshots_nextToken,++ -- * Destructuring the Response+ ListClusterSnapshotsResponse (..),+ newListClusterSnapshotsResponse,++ -- * Response Lenses+ listClusterSnapshotsResponse_nextToken,+ listClusterSnapshotsResponse_snapshots,+ listClusterSnapshotsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListClusterSnapshots' smart constructor.+data ListClusterSnapshots = ListClusterSnapshots'+ { -- | The arn of the Elastic DocumentDB cluster.+ clusterArn :: Prelude.Maybe Prelude.Text,+ -- | The maximum number of entries to recieve in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The nextToken which is used the get the next page of data.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListClusterSnapshots' 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:+--+-- 'clusterArn', 'listClusterSnapshots_clusterArn' - The arn of the Elastic DocumentDB cluster.+--+-- 'maxResults', 'listClusterSnapshots_maxResults' - The maximum number of entries to recieve in the response.+--+-- 'nextToken', 'listClusterSnapshots_nextToken' - The nextToken which is used the get the next page of data.+newListClusterSnapshots ::+ ListClusterSnapshots+newListClusterSnapshots =+ ListClusterSnapshots'+ { clusterArn = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The arn of the Elastic DocumentDB cluster.+listClusterSnapshots_clusterArn :: Lens.Lens' ListClusterSnapshots (Prelude.Maybe Prelude.Text)+listClusterSnapshots_clusterArn = Lens.lens (\ListClusterSnapshots' {clusterArn} -> clusterArn) (\s@ListClusterSnapshots' {} a -> s {clusterArn = a} :: ListClusterSnapshots)++-- | The maximum number of entries to recieve in the response.+listClusterSnapshots_maxResults :: Lens.Lens' ListClusterSnapshots (Prelude.Maybe Prelude.Natural)+listClusterSnapshots_maxResults = Lens.lens (\ListClusterSnapshots' {maxResults} -> maxResults) (\s@ListClusterSnapshots' {} a -> s {maxResults = a} :: ListClusterSnapshots)++-- | The nextToken which is used the get the next page of data.+listClusterSnapshots_nextToken :: Lens.Lens' ListClusterSnapshots (Prelude.Maybe Prelude.Text)+listClusterSnapshots_nextToken = Lens.lens (\ListClusterSnapshots' {nextToken} -> nextToken) (\s@ListClusterSnapshots' {} a -> s {nextToken = a} :: ListClusterSnapshots)++instance Core.AWSPager ListClusterSnapshots where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listClusterSnapshotsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listClusterSnapshotsResponse_snapshots+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listClusterSnapshots_nextToken+ Lens..~ rs+ Lens.^? listClusterSnapshotsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListClusterSnapshots where+ type+ AWSResponse ListClusterSnapshots =+ ListClusterSnapshotsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListClusterSnapshotsResponse'+ Prelude.<$> (x Data..?> "nextToken")+ Prelude.<*> (x Data..?> "snapshots" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListClusterSnapshots where+ hashWithSalt _salt ListClusterSnapshots' {..} =+ _salt+ `Prelude.hashWithSalt` clusterArn+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListClusterSnapshots where+ rnf ListClusterSnapshots' {..} =+ Prelude.rnf clusterArn+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListClusterSnapshots where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListClusterSnapshots where+ toPath = Prelude.const "/cluster-snapshots"++instance Data.ToQuery ListClusterSnapshots where+ toQuery ListClusterSnapshots' {..} =+ Prelude.mconcat+ [ "clusterArn" Data.=: clusterArn,+ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListClusterSnapshotsResponse' smart constructor.+data ListClusterSnapshotsResponse = ListClusterSnapshotsResponse'+ { -- | The response will provide a nextToken if there is more data beyond the+ -- maxResults.+ --+ -- If there is no more data in the responce, the nextToken will not be+ -- returned.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | A list of Elastic DocumentDB snapshots for a specified cluster.+ snapshots :: Prelude.Maybe [ClusterSnapshotInList],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListClusterSnapshotsResponse' 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', 'listClusterSnapshotsResponse_nextToken' - The response will provide a nextToken if there is more data beyond the+-- maxResults.+--+-- If there is no more data in the responce, the nextToken will not be+-- returned.+--+-- 'snapshots', 'listClusterSnapshotsResponse_snapshots' - A list of Elastic DocumentDB snapshots for a specified cluster.+--+-- 'httpStatus', 'listClusterSnapshotsResponse_httpStatus' - The response's http status code.+newListClusterSnapshotsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListClusterSnapshotsResponse+newListClusterSnapshotsResponse pHttpStatus_ =+ ListClusterSnapshotsResponse'+ { nextToken =+ Prelude.Nothing,+ snapshots = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The response will provide a nextToken if there is more data beyond the+-- maxResults.+--+-- If there is no more data in the responce, the nextToken will not be+-- returned.+listClusterSnapshotsResponse_nextToken :: Lens.Lens' ListClusterSnapshotsResponse (Prelude.Maybe Prelude.Text)+listClusterSnapshotsResponse_nextToken = Lens.lens (\ListClusterSnapshotsResponse' {nextToken} -> nextToken) (\s@ListClusterSnapshotsResponse' {} a -> s {nextToken = a} :: ListClusterSnapshotsResponse)++-- | A list of Elastic DocumentDB snapshots for a specified cluster.+listClusterSnapshotsResponse_snapshots :: Lens.Lens' ListClusterSnapshotsResponse (Prelude.Maybe [ClusterSnapshotInList])+listClusterSnapshotsResponse_snapshots = Lens.lens (\ListClusterSnapshotsResponse' {snapshots} -> snapshots) (\s@ListClusterSnapshotsResponse' {} a -> s {snapshots = a} :: ListClusterSnapshotsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listClusterSnapshotsResponse_httpStatus :: Lens.Lens' ListClusterSnapshotsResponse Prelude.Int+listClusterSnapshotsResponse_httpStatus = Lens.lens (\ListClusterSnapshotsResponse' {httpStatus} -> httpStatus) (\s@ListClusterSnapshotsResponse' {} a -> s {httpStatus = a} :: ListClusterSnapshotsResponse)++instance Prelude.NFData ListClusterSnapshotsResponse where+ rnf ListClusterSnapshotsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf snapshots+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/DocDbElastic/ListClusters.hs view
@@ -0,0 +1,220 @@+{-# 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.DocDbElastic.ListClusters+-- 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 provisioned Elastic DocumentDB clusters.+--+-- This operation returns paginated results.+module Amazonka.DocDbElastic.ListClusters+ ( -- * Creating a Request+ ListClusters (..),+ newListClusters,++ -- * Request Lenses+ listClusters_maxResults,+ listClusters_nextToken,++ -- * Destructuring the Response+ ListClustersResponse (..),+ newListClustersResponse,++ -- * Response Lenses+ listClustersResponse_clusters,+ listClustersResponse_nextToken,+ listClustersResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListClusters' smart constructor.+data ListClusters = ListClusters'+ { -- | The maximum number of entries to recieve in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The nextToken which is used the get the next page of data.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListClusters' 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', 'listClusters_maxResults' - The maximum number of entries to recieve in the response.+--+-- 'nextToken', 'listClusters_nextToken' - The nextToken which is used the get the next page of data.+newListClusters ::+ ListClusters+newListClusters =+ ListClusters'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of entries to recieve in the response.+listClusters_maxResults :: Lens.Lens' ListClusters (Prelude.Maybe Prelude.Natural)+listClusters_maxResults = Lens.lens (\ListClusters' {maxResults} -> maxResults) (\s@ListClusters' {} a -> s {maxResults = a} :: ListClusters)++-- | The nextToken which is used the get the next page of data.+listClusters_nextToken :: Lens.Lens' ListClusters (Prelude.Maybe Prelude.Text)+listClusters_nextToken = Lens.lens (\ListClusters' {nextToken} -> nextToken) (\s@ListClusters' {} a -> s {nextToken = a} :: ListClusters)++instance Core.AWSPager ListClusters where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listClustersResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listClustersResponse_clusters+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listClusters_nextToken+ Lens..~ rs+ Lens.^? listClustersResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListClusters where+ type AWSResponse ListClusters = ListClustersResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListClustersResponse'+ Prelude.<$> (x Data..?> "clusters" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListClusters where+ hashWithSalt _salt ListClusters' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListClusters where+ rnf ListClusters' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListClusters where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListClusters where+ toPath = Prelude.const "/clusters"++instance Data.ToQuery ListClusters where+ toQuery ListClusters' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListClustersResponse' smart constructor.+data ListClustersResponse = ListClustersResponse'+ { -- | A list of Elastic DocumentDB cluster.+ clusters :: Prelude.Maybe [ClusterInList],+ -- | The response will provide a nextToken if there is more data beyond the+ -- maxResults.+ --+ -- If there is no more data in the responce, the nextToken will not be+ -- returned.+ 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 'ListClustersResponse' 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:+--+-- 'clusters', 'listClustersResponse_clusters' - A list of Elastic DocumentDB cluster.+--+-- 'nextToken', 'listClustersResponse_nextToken' - The response will provide a nextToken if there is more data beyond the+-- maxResults.+--+-- If there is no more data in the responce, the nextToken will not be+-- returned.+--+-- 'httpStatus', 'listClustersResponse_httpStatus' - The response's http status code.+newListClustersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListClustersResponse+newListClustersResponse pHttpStatus_ =+ ListClustersResponse'+ { clusters = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A list of Elastic DocumentDB cluster.+listClustersResponse_clusters :: Lens.Lens' ListClustersResponse (Prelude.Maybe [ClusterInList])+listClustersResponse_clusters = Lens.lens (\ListClustersResponse' {clusters} -> clusters) (\s@ListClustersResponse' {} a -> s {clusters = a} :: ListClustersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response will provide a nextToken if there is more data beyond the+-- maxResults.+--+-- If there is no more data in the responce, the nextToken will not be+-- returned.+listClustersResponse_nextToken :: Lens.Lens' ListClustersResponse (Prelude.Maybe Prelude.Text)+listClustersResponse_nextToken = Lens.lens (\ListClustersResponse' {nextToken} -> nextToken) (\s@ListClustersResponse' {} a -> s {nextToken = a} :: ListClustersResponse)++-- | The response's http status code.+listClustersResponse_httpStatus :: Lens.Lens' ListClustersResponse Prelude.Int+listClustersResponse_httpStatus = Lens.lens (\ListClustersResponse' {httpStatus} -> httpStatus) (\s@ListClustersResponse' {} a -> s {httpStatus = a} :: ListClustersResponse)++instance Prelude.NFData ListClustersResponse where+ rnf ListClustersResponse' {..} =+ Prelude.rnf clusters+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/DocDbElastic/ListTagsForResource.hs view
@@ -0,0 +1,159 @@+{-# 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.DocDbElastic.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)+--+-- Lists all tags on a Elastic DocumentDB resource+module Amazonka.DocDbElastic.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 Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+ { -- | The arn of the Elastic DocumentDB resource.+ 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 arn of the Elastic DocumentDB resource.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The arn of the Elastic DocumentDB resource.+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.1" ::+ 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 list of tags for the specified Elastic DocumentDB 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 list of tags for the specified Elastic DocumentDB resource.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { tags =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The list of tags for the specified Elastic DocumentDB 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/DocDbElastic/RestoreClusterFromSnapshot.hs view
@@ -0,0 +1,290 @@+{-# 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.DocDbElastic.RestoreClusterFromSnapshot+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Restores a Elastic DocumentDB cluster from a snapshot.+module Amazonka.DocDbElastic.RestoreClusterFromSnapshot+ ( -- * Creating a Request+ RestoreClusterFromSnapshot (..),+ newRestoreClusterFromSnapshot,++ -- * Request Lenses+ restoreClusterFromSnapshot_kmsKeyId,+ restoreClusterFromSnapshot_subnetIds,+ restoreClusterFromSnapshot_tags,+ restoreClusterFromSnapshot_vpcSecurityGroupIds,+ restoreClusterFromSnapshot_clusterName,+ restoreClusterFromSnapshot_snapshotArn,++ -- * Destructuring the Response+ RestoreClusterFromSnapshotResponse (..),+ newRestoreClusterFromSnapshotResponse,++ -- * Response Lenses+ restoreClusterFromSnapshotResponse_httpStatus,+ restoreClusterFromSnapshotResponse_cluster,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newRestoreClusterFromSnapshot' smart constructor.+data RestoreClusterFromSnapshot = RestoreClusterFromSnapshot'+ { -- | The KMS key identifier to use to encrypt the new Elastic DocumentDB+ -- cluster.+ --+ -- The KMS key identifier is the Amazon Resource Name (ARN) for the KMS+ -- encryption key. If you are creating a cluster using the same Amazon+ -- account that owns this KMS encryption key, you can use the KMS key alias+ -- instead of the ARN as the KMS encryption key.+ --+ -- If an encryption key is not specified here, Elastic DocumentDB uses the+ -- default encryption key that KMS creates for your account. Your account+ -- has a different default encryption key for each Amazon Region.+ kmsKeyId :: Prelude.Maybe Prelude.Text,+ -- | The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.+ subnetIds :: Prelude.Maybe [Prelude.Text],+ -- | A list of the tag names to be assigned to the restored DB cluster, in+ -- the form of an array of key-value pairs in which the key is the tag name+ -- and the value is the key value.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | A list of EC2 VPC security groups to associate with the Elastic+ -- DocumentDB cluster.+ vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],+ -- | The name of the Elastic DocumentDB cluster.+ clusterName :: Prelude.Text,+ -- | The arn of the Elastic DocumentDB snapshot.+ snapshotArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RestoreClusterFromSnapshot' 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:+--+-- 'kmsKeyId', 'restoreClusterFromSnapshot_kmsKeyId' - The KMS key identifier to use to encrypt the new Elastic DocumentDB+-- cluster.+--+-- The KMS key identifier is the Amazon Resource Name (ARN) for the KMS+-- encryption key. If you are creating a cluster using the same Amazon+-- account that owns this KMS encryption key, you can use the KMS key alias+-- instead of the ARN as the KMS encryption key.+--+-- If an encryption key is not specified here, Elastic DocumentDB uses the+-- default encryption key that KMS creates for your account. Your account+-- has a different default encryption key for each Amazon Region.+--+-- 'subnetIds', 'restoreClusterFromSnapshot_subnetIds' - The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.+--+-- 'tags', 'restoreClusterFromSnapshot_tags' - A list of the tag names to be assigned to the restored DB cluster, in+-- the form of an array of key-value pairs in which the key is the tag name+-- and the value is the key value.+--+-- 'vpcSecurityGroupIds', 'restoreClusterFromSnapshot_vpcSecurityGroupIds' - A list of EC2 VPC security groups to associate with the Elastic+-- DocumentDB cluster.+--+-- 'clusterName', 'restoreClusterFromSnapshot_clusterName' - The name of the Elastic DocumentDB cluster.+--+-- 'snapshotArn', 'restoreClusterFromSnapshot_snapshotArn' - The arn of the Elastic DocumentDB snapshot.+newRestoreClusterFromSnapshot ::+ -- | 'clusterName'+ Prelude.Text ->+ -- | 'snapshotArn'+ Prelude.Text ->+ RestoreClusterFromSnapshot+newRestoreClusterFromSnapshot+ pClusterName_+ pSnapshotArn_ =+ RestoreClusterFromSnapshot'+ { kmsKeyId =+ Prelude.Nothing,+ subnetIds = Prelude.Nothing,+ tags = Prelude.Nothing,+ vpcSecurityGroupIds = Prelude.Nothing,+ clusterName = pClusterName_,+ snapshotArn = pSnapshotArn_+ }++-- | The KMS key identifier to use to encrypt the new Elastic DocumentDB+-- cluster.+--+-- The KMS key identifier is the Amazon Resource Name (ARN) for the KMS+-- encryption key. If you are creating a cluster using the same Amazon+-- account that owns this KMS encryption key, you can use the KMS key alias+-- instead of the ARN as the KMS encryption key.+--+-- If an encryption key is not specified here, Elastic DocumentDB uses the+-- default encryption key that KMS creates for your account. Your account+-- has a different default encryption key for each Amazon Region.+restoreClusterFromSnapshot_kmsKeyId :: Lens.Lens' RestoreClusterFromSnapshot (Prelude.Maybe Prelude.Text)+restoreClusterFromSnapshot_kmsKeyId = Lens.lens (\RestoreClusterFromSnapshot' {kmsKeyId} -> kmsKeyId) (\s@RestoreClusterFromSnapshot' {} a -> s {kmsKeyId = a} :: RestoreClusterFromSnapshot)++-- | The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.+restoreClusterFromSnapshot_subnetIds :: Lens.Lens' RestoreClusterFromSnapshot (Prelude.Maybe [Prelude.Text])+restoreClusterFromSnapshot_subnetIds = Lens.lens (\RestoreClusterFromSnapshot' {subnetIds} -> subnetIds) (\s@RestoreClusterFromSnapshot' {} a -> s {subnetIds = a} :: RestoreClusterFromSnapshot) Prelude.. Lens.mapping Lens.coerced++-- | A list of the tag names to be assigned to the restored DB cluster, in+-- the form of an array of key-value pairs in which the key is the tag name+-- and the value is the key value.+restoreClusterFromSnapshot_tags :: Lens.Lens' RestoreClusterFromSnapshot (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+restoreClusterFromSnapshot_tags = Lens.lens (\RestoreClusterFromSnapshot' {tags} -> tags) (\s@RestoreClusterFromSnapshot' {} a -> s {tags = a} :: RestoreClusterFromSnapshot) Prelude.. Lens.mapping Lens.coerced++-- | A list of EC2 VPC security groups to associate with the Elastic+-- DocumentDB cluster.+restoreClusterFromSnapshot_vpcSecurityGroupIds :: Lens.Lens' RestoreClusterFromSnapshot (Prelude.Maybe [Prelude.Text])+restoreClusterFromSnapshot_vpcSecurityGroupIds = Lens.lens (\RestoreClusterFromSnapshot' {vpcSecurityGroupIds} -> vpcSecurityGroupIds) (\s@RestoreClusterFromSnapshot' {} a -> s {vpcSecurityGroupIds = a} :: RestoreClusterFromSnapshot) Prelude.. Lens.mapping Lens.coerced++-- | The name of the Elastic DocumentDB cluster.+restoreClusterFromSnapshot_clusterName :: Lens.Lens' RestoreClusterFromSnapshot Prelude.Text+restoreClusterFromSnapshot_clusterName = Lens.lens (\RestoreClusterFromSnapshot' {clusterName} -> clusterName) (\s@RestoreClusterFromSnapshot' {} a -> s {clusterName = a} :: RestoreClusterFromSnapshot)++-- | The arn of the Elastic DocumentDB snapshot.+restoreClusterFromSnapshot_snapshotArn :: Lens.Lens' RestoreClusterFromSnapshot Prelude.Text+restoreClusterFromSnapshot_snapshotArn = Lens.lens (\RestoreClusterFromSnapshot' {snapshotArn} -> snapshotArn) (\s@RestoreClusterFromSnapshot' {} a -> s {snapshotArn = a} :: RestoreClusterFromSnapshot)++instance Core.AWSRequest RestoreClusterFromSnapshot where+ type+ AWSResponse RestoreClusterFromSnapshot =+ RestoreClusterFromSnapshotResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ RestoreClusterFromSnapshotResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "cluster")+ )++instance Prelude.Hashable RestoreClusterFromSnapshot where+ hashWithSalt _salt RestoreClusterFromSnapshot' {..} =+ _salt+ `Prelude.hashWithSalt` kmsKeyId+ `Prelude.hashWithSalt` subnetIds+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` vpcSecurityGroupIds+ `Prelude.hashWithSalt` clusterName+ `Prelude.hashWithSalt` snapshotArn++instance Prelude.NFData RestoreClusterFromSnapshot where+ rnf RestoreClusterFromSnapshot' {..} =+ Prelude.rnf kmsKeyId+ `Prelude.seq` Prelude.rnf subnetIds+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf vpcSecurityGroupIds+ `Prelude.seq` Prelude.rnf clusterName+ `Prelude.seq` Prelude.rnf snapshotArn++instance Data.ToHeaders RestoreClusterFromSnapshot where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON RestoreClusterFromSnapshot where+ toJSON RestoreClusterFromSnapshot' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("kmsKeyId" Data..=) Prelude.<$> kmsKeyId,+ ("subnetIds" Data..=) Prelude.<$> subnetIds,+ ("tags" Data..=) Prelude.<$> tags,+ ("vpcSecurityGroupIds" Data..=)+ Prelude.<$> vpcSecurityGroupIds,+ Prelude.Just ("clusterName" Data..= clusterName)+ ]+ )++instance Data.ToPath RestoreClusterFromSnapshot where+ toPath RestoreClusterFromSnapshot' {..} =+ Prelude.mconcat+ [ "/cluster-snapshot/",+ Data.toBS snapshotArn,+ "/restore"+ ]++instance Data.ToQuery RestoreClusterFromSnapshot where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newRestoreClusterFromSnapshotResponse' smart constructor.+data RestoreClusterFromSnapshotResponse = RestoreClusterFromSnapshotResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Returns information about a the restored Elastic DocumentDB cluster.+ cluster :: Cluster+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RestoreClusterFromSnapshotResponse' 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', 'restoreClusterFromSnapshotResponse_httpStatus' - The response's http status code.+--+-- 'cluster', 'restoreClusterFromSnapshotResponse_cluster' - Returns information about a the restored Elastic DocumentDB cluster.+newRestoreClusterFromSnapshotResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'cluster'+ Cluster ->+ RestoreClusterFromSnapshotResponse+newRestoreClusterFromSnapshotResponse+ pHttpStatus_+ pCluster_ =+ RestoreClusterFromSnapshotResponse'+ { httpStatus =+ pHttpStatus_,+ cluster = pCluster_+ }++-- | The response's http status code.+restoreClusterFromSnapshotResponse_httpStatus :: Lens.Lens' RestoreClusterFromSnapshotResponse Prelude.Int+restoreClusterFromSnapshotResponse_httpStatus = Lens.lens (\RestoreClusterFromSnapshotResponse' {httpStatus} -> httpStatus) (\s@RestoreClusterFromSnapshotResponse' {} a -> s {httpStatus = a} :: RestoreClusterFromSnapshotResponse)++-- | Returns information about a the restored Elastic DocumentDB cluster.+restoreClusterFromSnapshotResponse_cluster :: Lens.Lens' RestoreClusterFromSnapshotResponse Cluster+restoreClusterFromSnapshotResponse_cluster = Lens.lens (\RestoreClusterFromSnapshotResponse' {cluster} -> cluster) (\s@RestoreClusterFromSnapshotResponse' {} a -> s {cluster = a} :: RestoreClusterFromSnapshotResponse)++instance+ Prelude.NFData+ RestoreClusterFromSnapshotResponse+ where+ rnf RestoreClusterFromSnapshotResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf cluster
+ gen/Amazonka/DocDbElastic/TagResource.hs view
@@ -0,0 +1,163 @@+{-# 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.DocDbElastic.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 metadata tags to a Elastic DocumentDB resource+module Amazonka.DocDbElastic.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 Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+ { -- | The arn of the Elastic DocumentDB resource.+ resourceArn :: Prelude.Text,+ -- | The tags to be assigned to the Elastic DocumentDB resource.+ 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 arn of the Elastic DocumentDB resource.+--+-- 'tags', 'tagResource_tags' - The tags to be assigned to the Elastic DocumentDB resource.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | The arn of the Elastic DocumentDB resource.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | The tags to be assigned to the Elastic DocumentDB resource.+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.1" ::+ 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/DocDbElastic/Types.hs view
@@ -0,0 +1,221 @@+{-# 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.DocDbElastic.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.DocDbElastic.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _AccessDeniedException,+ _ConflictException,+ _InternalServerException,+ _ResourceNotFoundException,+ _ServiceQuotaExceededException,+ _ThrottlingException,+ _ValidationException,++ -- * Auth+ Auth (..),++ -- * Status+ Status (..),++ -- * Cluster+ Cluster (..),+ newCluster,+ cluster_adminUserName,+ cluster_authType,+ cluster_clusterArn,+ cluster_clusterEndpoint,+ cluster_clusterName,+ cluster_createTime,+ cluster_kmsKeyId,+ cluster_preferredMaintenanceWindow,+ cluster_shardCapacity,+ cluster_shardCount,+ cluster_status,+ cluster_subnetIds,+ cluster_vpcSecurityGroupIds,++ -- * ClusterInList+ ClusterInList (..),+ newClusterInList,+ clusterInList_clusterArn,+ clusterInList_clusterName,+ clusterInList_status,++ -- * ClusterSnapshot+ ClusterSnapshot (..),+ newClusterSnapshot,+ clusterSnapshot_adminUserName,+ clusterSnapshot_clusterArn,+ clusterSnapshot_clusterCreationTime,+ clusterSnapshot_kmsKeyId,+ clusterSnapshot_snapshotArn,+ clusterSnapshot_snapshotCreationTime,+ clusterSnapshot_snapshotName,+ clusterSnapshot_status,+ clusterSnapshot_subnetIds,+ clusterSnapshot_vpcSecurityGroupIds,++ -- * ClusterSnapshotInList+ ClusterSnapshotInList (..),+ newClusterSnapshotInList,+ clusterSnapshotInList_clusterArn,+ clusterSnapshotInList_snapshotArn,+ clusterSnapshotInList_snapshotCreationTime,+ clusterSnapshotInList_snapshotName,+ clusterSnapshotInList_status,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import Amazonka.DocDbElastic.Types.Auth+import Amazonka.DocDbElastic.Types.Cluster+import Amazonka.DocDbElastic.Types.ClusterInList+import Amazonka.DocDbElastic.Types.ClusterSnapshot+import Amazonka.DocDbElastic.Types.ClusterSnapshotInList+import Amazonka.DocDbElastic.Types.Status+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2022-11-28@ of the Amazon DocumentDB Elastic Clusters SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "DocDbElastic",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "docdb-elastic",+ Core.signingName = "docdb-elastic",+ Core.version = "2022-11-28",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "DocDbElastic",+ 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++-- | An exception that occurs when there are not sufficient permissions to+-- perform an action.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+ Core._MatchServiceError+ defaultService+ "AccessDeniedException"+ Prelude.. Core.hasStatus 403++-- | There was an access conflict.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"+ Prelude.. Core.hasStatus 409++-- | There was an internal server error.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+ Core._MatchServiceError+ defaultService+ "InternalServerException"+ Prelude.. Core.hasStatus 500++-- | The specified resource could not be located.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"+ Prelude.. Core.hasStatus 404++-- | The service quota for the action was exceeded.+_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+ Core._MatchServiceError+ defaultService+ "ServiceQuotaExceededException"+ Prelude.. Core.hasStatus 402++-- | ThrottlingException will be thrown when request was denied due to+-- request throttling.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+ Core._MatchServiceError+ defaultService+ "ThrottlingException"+ Prelude.. Core.hasStatus 429++-- | A structure defining a validation exception.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+ Core._MatchServiceError+ defaultService+ "ValidationException"+ Prelude.. Core.hasStatus 400
+ gen/Amazonka/DocDbElastic/Types/Auth.hs view
@@ -0,0 +1,68 @@+{-# 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.DocDbElastic.Types.Auth+-- 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.DocDbElastic.Types.Auth+ ( Auth+ ( ..,+ Auth_PLAIN_TEXT,+ Auth_SECRET_ARN+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Auth = Auth' {fromAuth :: 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 Auth_PLAIN_TEXT :: Auth+pattern Auth_PLAIN_TEXT = Auth' "PLAIN_TEXT"++pattern Auth_SECRET_ARN :: Auth+pattern Auth_SECRET_ARN = Auth' "SECRET_ARN"++{-# COMPLETE+ Auth_PLAIN_TEXT,+ Auth_SECRET_ARN,+ Auth'+ #-}
+ gen/Amazonka/DocDbElastic/Types/Cluster.hs view
@@ -0,0 +1,267 @@+{-# 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.DocDbElastic.Types.Cluster+-- 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.DocDbElastic.Types.Cluster where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types.Auth+import Amazonka.DocDbElastic.Types.Status+import qualified Amazonka.Prelude as Prelude++-- | Returns information about a specific Elastic DocumentDB cluster.+--+-- /See:/ 'newCluster' smart constructor.+data Cluster = Cluster'+ { -- | The name of the Elastic DocumentDB cluster administrator.+ adminUserName :: Prelude.Text,+ -- | The authentication type for the Elastic DocumentDB cluster.+ authType :: Auth,+ -- | The arn of the Elastic DocumentDB cluster.+ clusterArn :: Prelude.Text,+ -- | The URL used to connect to the Elastic DocumentDB cluster.+ clusterEndpoint :: Prelude.Text,+ -- | The name of the Elastic DocumentDB cluster.+ clusterName :: Prelude.Text,+ -- | The time when the Elastic DocumentDB cluster was created in Universal+ -- Coordinated Time (UTC).+ createTime :: Prelude.Text,+ -- | The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.+ kmsKeyId :: Prelude.Text,+ -- | The weekly time range during which system maintenance can occur, in+ -- Universal Coordinated Time (UTC).+ --+ -- /Format/: @ddd:hh24:mi-ddd:hh24:mi@+ preferredMaintenanceWindow :: Prelude.Text,+ -- | The capacity of each shard in the Elastic DocumentDB cluster.+ shardCapacity :: Prelude.Int,+ -- | The number of shards in the Elastic DocumentDB cluster.+ shardCount :: Prelude.Int,+ -- | The status of the Elastic DocumentDB cluster.+ status :: Status,+ -- | The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.+ subnetIds :: [Prelude.Text],+ -- | A list of EC2 VPC security groups associated with this cluster.+ vpcSecurityGroupIds :: [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Cluster' 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:+--+-- 'adminUserName', 'cluster_adminUserName' - The name of the Elastic DocumentDB cluster administrator.+--+-- 'authType', 'cluster_authType' - The authentication type for the Elastic DocumentDB cluster.+--+-- 'clusterArn', 'cluster_clusterArn' - The arn of the Elastic DocumentDB cluster.+--+-- 'clusterEndpoint', 'cluster_clusterEndpoint' - The URL used to connect to the Elastic DocumentDB cluster.+--+-- 'clusterName', 'cluster_clusterName' - The name of the Elastic DocumentDB cluster.+--+-- 'createTime', 'cluster_createTime' - The time when the Elastic DocumentDB cluster was created in Universal+-- Coordinated Time (UTC).+--+-- 'kmsKeyId', 'cluster_kmsKeyId' - The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.+--+-- 'preferredMaintenanceWindow', 'cluster_preferredMaintenanceWindow' - The weekly time range during which system maintenance can occur, in+-- Universal Coordinated Time (UTC).+--+-- /Format/: @ddd:hh24:mi-ddd:hh24:mi@+--+-- 'shardCapacity', 'cluster_shardCapacity' - The capacity of each shard in the Elastic DocumentDB cluster.+--+-- 'shardCount', 'cluster_shardCount' - The number of shards in the Elastic DocumentDB cluster.+--+-- 'status', 'cluster_status' - The status of the Elastic DocumentDB cluster.+--+-- 'subnetIds', 'cluster_subnetIds' - The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.+--+-- 'vpcSecurityGroupIds', 'cluster_vpcSecurityGroupIds' - A list of EC2 VPC security groups associated with this cluster.+newCluster ::+ -- | 'adminUserName'+ Prelude.Text ->+ -- | 'authType'+ Auth ->+ -- | 'clusterArn'+ Prelude.Text ->+ -- | 'clusterEndpoint'+ Prelude.Text ->+ -- | 'clusterName'+ Prelude.Text ->+ -- | 'createTime'+ Prelude.Text ->+ -- | 'kmsKeyId'+ Prelude.Text ->+ -- | 'preferredMaintenanceWindow'+ Prelude.Text ->+ -- | 'shardCapacity'+ Prelude.Int ->+ -- | 'shardCount'+ Prelude.Int ->+ -- | 'status'+ Status ->+ Cluster+newCluster+ pAdminUserName_+ pAuthType_+ pClusterArn_+ pClusterEndpoint_+ pClusterName_+ pCreateTime_+ pKmsKeyId_+ pPreferredMaintenanceWindow_+ pShardCapacity_+ pShardCount_+ pStatus_ =+ Cluster'+ { adminUserName = pAdminUserName_,+ authType = pAuthType_,+ clusterArn = pClusterArn_,+ clusterEndpoint = pClusterEndpoint_,+ clusterName = pClusterName_,+ createTime = pCreateTime_,+ kmsKeyId = pKmsKeyId_,+ preferredMaintenanceWindow =+ pPreferredMaintenanceWindow_,+ shardCapacity = pShardCapacity_,+ shardCount = pShardCount_,+ status = pStatus_,+ subnetIds = Prelude.mempty,+ vpcSecurityGroupIds = Prelude.mempty+ }++-- | The name of the Elastic DocumentDB cluster administrator.+cluster_adminUserName :: Lens.Lens' Cluster Prelude.Text+cluster_adminUserName = Lens.lens (\Cluster' {adminUserName} -> adminUserName) (\s@Cluster' {} a -> s {adminUserName = a} :: Cluster)++-- | The authentication type for the Elastic DocumentDB cluster.+cluster_authType :: Lens.Lens' Cluster Auth+cluster_authType = Lens.lens (\Cluster' {authType} -> authType) (\s@Cluster' {} a -> s {authType = a} :: Cluster)++-- | The arn of the Elastic DocumentDB cluster.+cluster_clusterArn :: Lens.Lens' Cluster Prelude.Text+cluster_clusterArn = Lens.lens (\Cluster' {clusterArn} -> clusterArn) (\s@Cluster' {} a -> s {clusterArn = a} :: Cluster)++-- | The URL used to connect to the Elastic DocumentDB cluster.+cluster_clusterEndpoint :: Lens.Lens' Cluster Prelude.Text+cluster_clusterEndpoint = Lens.lens (\Cluster' {clusterEndpoint} -> clusterEndpoint) (\s@Cluster' {} a -> s {clusterEndpoint = a} :: Cluster)++-- | The name of the Elastic DocumentDB cluster.+cluster_clusterName :: Lens.Lens' Cluster Prelude.Text+cluster_clusterName = Lens.lens (\Cluster' {clusterName} -> clusterName) (\s@Cluster' {} a -> s {clusterName = a} :: Cluster)++-- | The time when the Elastic DocumentDB cluster was created in Universal+-- Coordinated Time (UTC).+cluster_createTime :: Lens.Lens' Cluster Prelude.Text+cluster_createTime = Lens.lens (\Cluster' {createTime} -> createTime) (\s@Cluster' {} a -> s {createTime = a} :: Cluster)++-- | The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.+cluster_kmsKeyId :: Lens.Lens' Cluster Prelude.Text+cluster_kmsKeyId = Lens.lens (\Cluster' {kmsKeyId} -> kmsKeyId) (\s@Cluster' {} a -> s {kmsKeyId = a} :: Cluster)++-- | The weekly time range during which system maintenance can occur, in+-- Universal Coordinated Time (UTC).+--+-- /Format/: @ddd:hh24:mi-ddd:hh24:mi@+cluster_preferredMaintenanceWindow :: Lens.Lens' Cluster Prelude.Text+cluster_preferredMaintenanceWindow = Lens.lens (\Cluster' {preferredMaintenanceWindow} -> preferredMaintenanceWindow) (\s@Cluster' {} a -> s {preferredMaintenanceWindow = a} :: Cluster)++-- | The capacity of each shard in the Elastic DocumentDB cluster.+cluster_shardCapacity :: Lens.Lens' Cluster Prelude.Int+cluster_shardCapacity = Lens.lens (\Cluster' {shardCapacity} -> shardCapacity) (\s@Cluster' {} a -> s {shardCapacity = a} :: Cluster)++-- | The number of shards in the Elastic DocumentDB cluster.+cluster_shardCount :: Lens.Lens' Cluster Prelude.Int+cluster_shardCount = Lens.lens (\Cluster' {shardCount} -> shardCount) (\s@Cluster' {} a -> s {shardCount = a} :: Cluster)++-- | The status of the Elastic DocumentDB cluster.+cluster_status :: Lens.Lens' Cluster Status+cluster_status = Lens.lens (\Cluster' {status} -> status) (\s@Cluster' {} a -> s {status = a} :: Cluster)++-- | The Amazon EC2 subnet IDs for the Elastic DocumentDB cluster.+cluster_subnetIds :: Lens.Lens' Cluster [Prelude.Text]+cluster_subnetIds = Lens.lens (\Cluster' {subnetIds} -> subnetIds) (\s@Cluster' {} a -> s {subnetIds = a} :: Cluster) Prelude.. Lens.coerced++-- | A list of EC2 VPC security groups associated with this cluster.+cluster_vpcSecurityGroupIds :: Lens.Lens' Cluster [Prelude.Text]+cluster_vpcSecurityGroupIds = Lens.lens (\Cluster' {vpcSecurityGroupIds} -> vpcSecurityGroupIds) (\s@Cluster' {} a -> s {vpcSecurityGroupIds = a} :: Cluster) Prelude.. Lens.coerced++instance Data.FromJSON Cluster where+ parseJSON =+ Data.withObject+ "Cluster"+ ( \x ->+ Cluster'+ Prelude.<$> (x Data..: "adminUserName")+ Prelude.<*> (x Data..: "authType")+ Prelude.<*> (x Data..: "clusterArn")+ Prelude.<*> (x Data..: "clusterEndpoint")+ Prelude.<*> (x Data..: "clusterName")+ Prelude.<*> (x Data..: "createTime")+ Prelude.<*> (x Data..: "kmsKeyId")+ Prelude.<*> (x Data..: "preferredMaintenanceWindow")+ Prelude.<*> (x Data..: "shardCapacity")+ Prelude.<*> (x Data..: "shardCount")+ Prelude.<*> (x Data..: "status")+ Prelude.<*> (x Data..:? "subnetIds" Data..!= Prelude.mempty)+ Prelude.<*> ( x+ Data..:? "vpcSecurityGroupIds"+ Data..!= Prelude.mempty+ )+ )++instance Prelude.Hashable Cluster where+ hashWithSalt _salt Cluster' {..} =+ _salt+ `Prelude.hashWithSalt` adminUserName+ `Prelude.hashWithSalt` authType+ `Prelude.hashWithSalt` clusterArn+ `Prelude.hashWithSalt` clusterEndpoint+ `Prelude.hashWithSalt` clusterName+ `Prelude.hashWithSalt` createTime+ `Prelude.hashWithSalt` kmsKeyId+ `Prelude.hashWithSalt` preferredMaintenanceWindow+ `Prelude.hashWithSalt` shardCapacity+ `Prelude.hashWithSalt` shardCount+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` subnetIds+ `Prelude.hashWithSalt` vpcSecurityGroupIds++instance Prelude.NFData Cluster where+ rnf Cluster' {..} =+ Prelude.rnf adminUserName+ `Prelude.seq` Prelude.rnf authType+ `Prelude.seq` Prelude.rnf clusterArn+ `Prelude.seq` Prelude.rnf clusterEndpoint+ `Prelude.seq` Prelude.rnf clusterName+ `Prelude.seq` Prelude.rnf createTime+ `Prelude.seq` Prelude.rnf kmsKeyId+ `Prelude.seq` Prelude.rnf preferredMaintenanceWindow+ `Prelude.seq` Prelude.rnf shardCapacity+ `Prelude.seq` Prelude.rnf shardCount+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf subnetIds+ `Prelude.seq` Prelude.rnf vpcSecurityGroupIds
+ gen/Amazonka/DocDbElastic/Types/ClusterInList.hs view
@@ -0,0 +1,103 @@+{-# 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.DocDbElastic.Types.ClusterInList+-- 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.DocDbElastic.Types.ClusterInList where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types.Status+import qualified Amazonka.Prelude as Prelude++-- | A list of Elastic DocumentDB cluster.+--+-- /See:/ 'newClusterInList' smart constructor.+data ClusterInList = ClusterInList'+ { -- | The arn of the Elastic DocumentDB cluster.+ clusterArn :: Prelude.Text,+ -- | The name of the Elastic DocumentDB cluster.+ clusterName :: Prelude.Text,+ -- | The status of the Elastic DocumentDB cluster.+ status :: Status+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ClusterInList' 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:+--+-- 'clusterArn', 'clusterInList_clusterArn' - The arn of the Elastic DocumentDB cluster.+--+-- 'clusterName', 'clusterInList_clusterName' - The name of the Elastic DocumentDB cluster.+--+-- 'status', 'clusterInList_status' - The status of the Elastic DocumentDB cluster.+newClusterInList ::+ -- | 'clusterArn'+ Prelude.Text ->+ -- | 'clusterName'+ Prelude.Text ->+ -- | 'status'+ Status ->+ ClusterInList+newClusterInList pClusterArn_ pClusterName_ pStatus_ =+ ClusterInList'+ { clusterArn = pClusterArn_,+ clusterName = pClusterName_,+ status = pStatus_+ }++-- | The arn of the Elastic DocumentDB cluster.+clusterInList_clusterArn :: Lens.Lens' ClusterInList Prelude.Text+clusterInList_clusterArn = Lens.lens (\ClusterInList' {clusterArn} -> clusterArn) (\s@ClusterInList' {} a -> s {clusterArn = a} :: ClusterInList)++-- | The name of the Elastic DocumentDB cluster.+clusterInList_clusterName :: Lens.Lens' ClusterInList Prelude.Text+clusterInList_clusterName = Lens.lens (\ClusterInList' {clusterName} -> clusterName) (\s@ClusterInList' {} a -> s {clusterName = a} :: ClusterInList)++-- | The status of the Elastic DocumentDB cluster.+clusterInList_status :: Lens.Lens' ClusterInList Status+clusterInList_status = Lens.lens (\ClusterInList' {status} -> status) (\s@ClusterInList' {} a -> s {status = a} :: ClusterInList)++instance Data.FromJSON ClusterInList where+ parseJSON =+ Data.withObject+ "ClusterInList"+ ( \x ->+ ClusterInList'+ Prelude.<$> (x Data..: "clusterArn")+ Prelude.<*> (x Data..: "clusterName")+ Prelude.<*> (x Data..: "status")+ )++instance Prelude.Hashable ClusterInList where+ hashWithSalt _salt ClusterInList' {..} =+ _salt+ `Prelude.hashWithSalt` clusterArn+ `Prelude.hashWithSalt` clusterName+ `Prelude.hashWithSalt` status++instance Prelude.NFData ClusterInList where+ rnf ClusterInList' {..} =+ Prelude.rnf clusterArn+ `Prelude.seq` Prelude.rnf clusterName+ `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/DocDbElastic/Types/ClusterSnapshot.hs view
@@ -0,0 +1,217 @@+{-# 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.DocDbElastic.Types.ClusterSnapshot+-- 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.DocDbElastic.Types.ClusterSnapshot where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types.Status+import qualified Amazonka.Prelude as Prelude++-- | Returns information about a specific Elastic DocumentDB snapshot.+--+-- /See:/ 'newClusterSnapshot' smart constructor.+data ClusterSnapshot = ClusterSnapshot'+ { -- | The name of the Elastic DocumentDB cluster administrator.+ adminUserName :: Prelude.Text,+ -- | The arn of the Elastic DocumentDB cluster.+ clusterArn :: Prelude.Text,+ -- | The time when the Elastic DocumentDB cluster was created in Universal+ -- Coordinated Time (UTC).+ clusterCreationTime :: Prelude.Text,+ -- | The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.+ kmsKeyId :: Prelude.Text,+ -- | The arn of the Elastic DocumentDB snapshot+ snapshotArn :: Prelude.Text,+ -- | The time when the Elastic DocumentDB snapshot was created in Universal+ -- Coordinated Time (UTC).+ snapshotCreationTime :: Prelude.Text,+ -- | The name of the Elastic DocumentDB snapshot.+ snapshotName :: Prelude.Text,+ -- | The status of the Elastic DocumentDB snapshot.+ status :: Status,+ -- | A list of the IDs of subnets associated with the DB cluster snapshot.+ subnetIds :: [Prelude.Text],+ -- | A list of the IDs of the VPC security groups associated with the cluster+ -- snapshot.+ vpcSecurityGroupIds :: [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ClusterSnapshot' 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:+--+-- 'adminUserName', 'clusterSnapshot_adminUserName' - The name of the Elastic DocumentDB cluster administrator.+--+-- 'clusterArn', 'clusterSnapshot_clusterArn' - The arn of the Elastic DocumentDB cluster.+--+-- 'clusterCreationTime', 'clusterSnapshot_clusterCreationTime' - The time when the Elastic DocumentDB cluster was created in Universal+-- Coordinated Time (UTC).+--+-- 'kmsKeyId', 'clusterSnapshot_kmsKeyId' - The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.+--+-- 'snapshotArn', 'clusterSnapshot_snapshotArn' - The arn of the Elastic DocumentDB snapshot+--+-- 'snapshotCreationTime', 'clusterSnapshot_snapshotCreationTime' - The time when the Elastic DocumentDB snapshot was created in Universal+-- Coordinated Time (UTC).+--+-- 'snapshotName', 'clusterSnapshot_snapshotName' - The name of the Elastic DocumentDB snapshot.+--+-- 'status', 'clusterSnapshot_status' - The status of the Elastic DocumentDB snapshot.+--+-- 'subnetIds', 'clusterSnapshot_subnetIds' - A list of the IDs of subnets associated with the DB cluster snapshot.+--+-- 'vpcSecurityGroupIds', 'clusterSnapshot_vpcSecurityGroupIds' - A list of the IDs of the VPC security groups associated with the cluster+-- snapshot.+newClusterSnapshot ::+ -- | 'adminUserName'+ Prelude.Text ->+ -- | 'clusterArn'+ Prelude.Text ->+ -- | 'clusterCreationTime'+ Prelude.Text ->+ -- | 'kmsKeyId'+ Prelude.Text ->+ -- | 'snapshotArn'+ Prelude.Text ->+ -- | 'snapshotCreationTime'+ Prelude.Text ->+ -- | 'snapshotName'+ Prelude.Text ->+ -- | 'status'+ Status ->+ ClusterSnapshot+newClusterSnapshot+ pAdminUserName_+ pClusterArn_+ pClusterCreationTime_+ pKmsKeyId_+ pSnapshotArn_+ pSnapshotCreationTime_+ pSnapshotName_+ pStatus_ =+ ClusterSnapshot'+ { adminUserName = pAdminUserName_,+ clusterArn = pClusterArn_,+ clusterCreationTime = pClusterCreationTime_,+ kmsKeyId = pKmsKeyId_,+ snapshotArn = pSnapshotArn_,+ snapshotCreationTime = pSnapshotCreationTime_,+ snapshotName = pSnapshotName_,+ status = pStatus_,+ subnetIds = Prelude.mempty,+ vpcSecurityGroupIds = Prelude.mempty+ }++-- | The name of the Elastic DocumentDB cluster administrator.+clusterSnapshot_adminUserName :: Lens.Lens' ClusterSnapshot Prelude.Text+clusterSnapshot_adminUserName = Lens.lens (\ClusterSnapshot' {adminUserName} -> adminUserName) (\s@ClusterSnapshot' {} a -> s {adminUserName = a} :: ClusterSnapshot)++-- | The arn of the Elastic DocumentDB cluster.+clusterSnapshot_clusterArn :: Lens.Lens' ClusterSnapshot Prelude.Text+clusterSnapshot_clusterArn = Lens.lens (\ClusterSnapshot' {clusterArn} -> clusterArn) (\s@ClusterSnapshot' {} a -> s {clusterArn = a} :: ClusterSnapshot)++-- | The time when the Elastic DocumentDB cluster was created in Universal+-- Coordinated Time (UTC).+clusterSnapshot_clusterCreationTime :: Lens.Lens' ClusterSnapshot Prelude.Text+clusterSnapshot_clusterCreationTime = Lens.lens (\ClusterSnapshot' {clusterCreationTime} -> clusterCreationTime) (\s@ClusterSnapshot' {} a -> s {clusterCreationTime = a} :: ClusterSnapshot)++-- | The KMS key identifier to use to encrypt the Elastic DocumentDB cluster.+clusterSnapshot_kmsKeyId :: Lens.Lens' ClusterSnapshot Prelude.Text+clusterSnapshot_kmsKeyId = Lens.lens (\ClusterSnapshot' {kmsKeyId} -> kmsKeyId) (\s@ClusterSnapshot' {} a -> s {kmsKeyId = a} :: ClusterSnapshot)++-- | The arn of the Elastic DocumentDB snapshot+clusterSnapshot_snapshotArn :: Lens.Lens' ClusterSnapshot Prelude.Text+clusterSnapshot_snapshotArn = Lens.lens (\ClusterSnapshot' {snapshotArn} -> snapshotArn) (\s@ClusterSnapshot' {} a -> s {snapshotArn = a} :: ClusterSnapshot)++-- | The time when the Elastic DocumentDB snapshot was created in Universal+-- Coordinated Time (UTC).+clusterSnapshot_snapshotCreationTime :: Lens.Lens' ClusterSnapshot Prelude.Text+clusterSnapshot_snapshotCreationTime = Lens.lens (\ClusterSnapshot' {snapshotCreationTime} -> snapshotCreationTime) (\s@ClusterSnapshot' {} a -> s {snapshotCreationTime = a} :: ClusterSnapshot)++-- | The name of the Elastic DocumentDB snapshot.+clusterSnapshot_snapshotName :: Lens.Lens' ClusterSnapshot Prelude.Text+clusterSnapshot_snapshotName = Lens.lens (\ClusterSnapshot' {snapshotName} -> snapshotName) (\s@ClusterSnapshot' {} a -> s {snapshotName = a} :: ClusterSnapshot)++-- | The status of the Elastic DocumentDB snapshot.+clusterSnapshot_status :: Lens.Lens' ClusterSnapshot Status+clusterSnapshot_status = Lens.lens (\ClusterSnapshot' {status} -> status) (\s@ClusterSnapshot' {} a -> s {status = a} :: ClusterSnapshot)++-- | A list of the IDs of subnets associated with the DB cluster snapshot.+clusterSnapshot_subnetIds :: Lens.Lens' ClusterSnapshot [Prelude.Text]+clusterSnapshot_subnetIds = Lens.lens (\ClusterSnapshot' {subnetIds} -> subnetIds) (\s@ClusterSnapshot' {} a -> s {subnetIds = a} :: ClusterSnapshot) Prelude.. Lens.coerced++-- | A list of the IDs of the VPC security groups associated with the cluster+-- snapshot.+clusterSnapshot_vpcSecurityGroupIds :: Lens.Lens' ClusterSnapshot [Prelude.Text]+clusterSnapshot_vpcSecurityGroupIds = Lens.lens (\ClusterSnapshot' {vpcSecurityGroupIds} -> vpcSecurityGroupIds) (\s@ClusterSnapshot' {} a -> s {vpcSecurityGroupIds = a} :: ClusterSnapshot) Prelude.. Lens.coerced++instance Data.FromJSON ClusterSnapshot where+ parseJSON =+ Data.withObject+ "ClusterSnapshot"+ ( \x ->+ ClusterSnapshot'+ Prelude.<$> (x Data..: "adminUserName")+ Prelude.<*> (x Data..: "clusterArn")+ Prelude.<*> (x Data..: "clusterCreationTime")+ Prelude.<*> (x Data..: "kmsKeyId")+ Prelude.<*> (x Data..: "snapshotArn")+ Prelude.<*> (x Data..: "snapshotCreationTime")+ Prelude.<*> (x Data..: "snapshotName")+ Prelude.<*> (x Data..: "status")+ Prelude.<*> (x Data..:? "subnetIds" Data..!= Prelude.mempty)+ Prelude.<*> ( x+ Data..:? "vpcSecurityGroupIds"+ Data..!= Prelude.mempty+ )+ )++instance Prelude.Hashable ClusterSnapshot where+ hashWithSalt _salt ClusterSnapshot' {..} =+ _salt+ `Prelude.hashWithSalt` adminUserName+ `Prelude.hashWithSalt` clusterArn+ `Prelude.hashWithSalt` clusterCreationTime+ `Prelude.hashWithSalt` kmsKeyId+ `Prelude.hashWithSalt` snapshotArn+ `Prelude.hashWithSalt` snapshotCreationTime+ `Prelude.hashWithSalt` snapshotName+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` subnetIds+ `Prelude.hashWithSalt` vpcSecurityGroupIds++instance Prelude.NFData ClusterSnapshot where+ rnf ClusterSnapshot' {..} =+ Prelude.rnf adminUserName+ `Prelude.seq` Prelude.rnf clusterArn+ `Prelude.seq` Prelude.rnf clusterCreationTime+ `Prelude.seq` Prelude.rnf kmsKeyId+ `Prelude.seq` Prelude.rnf snapshotArn+ `Prelude.seq` Prelude.rnf snapshotCreationTime+ `Prelude.seq` Prelude.rnf snapshotName+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf subnetIds+ `Prelude.seq` Prelude.rnf vpcSecurityGroupIds
+ gen/Amazonka/DocDbElastic/Types/ClusterSnapshotInList.hs view
@@ -0,0 +1,139 @@+{-# 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.DocDbElastic.Types.ClusterSnapshotInList+-- 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.DocDbElastic.Types.ClusterSnapshotInList where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types.Status+import qualified Amazonka.Prelude as Prelude++-- | A list of Elastic DocumentDB snapshots.+--+-- /See:/ 'newClusterSnapshotInList' smart constructor.+data ClusterSnapshotInList = ClusterSnapshotInList'+ { -- | The arn of the Elastic DocumentDB cluster.+ clusterArn :: Prelude.Text,+ -- | The arn of the Elastic DocumentDB snapshot+ snapshotArn :: Prelude.Text,+ -- | The time when the Elastic DocumentDB snapshot was created in Universal+ -- Coordinated Time (UTC).+ snapshotCreationTime :: Prelude.Text,+ -- | The name of the Elastic DocumentDB snapshot.+ snapshotName :: Prelude.Text,+ -- | The status of the Elastic DocumentDB snapshot.+ status :: Status+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ClusterSnapshotInList' 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:+--+-- 'clusterArn', 'clusterSnapshotInList_clusterArn' - The arn of the Elastic DocumentDB cluster.+--+-- 'snapshotArn', 'clusterSnapshotInList_snapshotArn' - The arn of the Elastic DocumentDB snapshot+--+-- 'snapshotCreationTime', 'clusterSnapshotInList_snapshotCreationTime' - The time when the Elastic DocumentDB snapshot was created in Universal+-- Coordinated Time (UTC).+--+-- 'snapshotName', 'clusterSnapshotInList_snapshotName' - The name of the Elastic DocumentDB snapshot.+--+-- 'status', 'clusterSnapshotInList_status' - The status of the Elastic DocumentDB snapshot.+newClusterSnapshotInList ::+ -- | 'clusterArn'+ Prelude.Text ->+ -- | 'snapshotArn'+ Prelude.Text ->+ -- | 'snapshotCreationTime'+ Prelude.Text ->+ -- | 'snapshotName'+ Prelude.Text ->+ -- | 'status'+ Status ->+ ClusterSnapshotInList+newClusterSnapshotInList+ pClusterArn_+ pSnapshotArn_+ pSnapshotCreationTime_+ pSnapshotName_+ pStatus_ =+ ClusterSnapshotInList'+ { clusterArn = pClusterArn_,+ snapshotArn = pSnapshotArn_,+ snapshotCreationTime = pSnapshotCreationTime_,+ snapshotName = pSnapshotName_,+ status = pStatus_+ }++-- | The arn of the Elastic DocumentDB cluster.+clusterSnapshotInList_clusterArn :: Lens.Lens' ClusterSnapshotInList Prelude.Text+clusterSnapshotInList_clusterArn = Lens.lens (\ClusterSnapshotInList' {clusterArn} -> clusterArn) (\s@ClusterSnapshotInList' {} a -> s {clusterArn = a} :: ClusterSnapshotInList)++-- | The arn of the Elastic DocumentDB snapshot+clusterSnapshotInList_snapshotArn :: Lens.Lens' ClusterSnapshotInList Prelude.Text+clusterSnapshotInList_snapshotArn = Lens.lens (\ClusterSnapshotInList' {snapshotArn} -> snapshotArn) (\s@ClusterSnapshotInList' {} a -> s {snapshotArn = a} :: ClusterSnapshotInList)++-- | The time when the Elastic DocumentDB snapshot was created in Universal+-- Coordinated Time (UTC).+clusterSnapshotInList_snapshotCreationTime :: Lens.Lens' ClusterSnapshotInList Prelude.Text+clusterSnapshotInList_snapshotCreationTime = Lens.lens (\ClusterSnapshotInList' {snapshotCreationTime} -> snapshotCreationTime) (\s@ClusterSnapshotInList' {} a -> s {snapshotCreationTime = a} :: ClusterSnapshotInList)++-- | The name of the Elastic DocumentDB snapshot.+clusterSnapshotInList_snapshotName :: Lens.Lens' ClusterSnapshotInList Prelude.Text+clusterSnapshotInList_snapshotName = Lens.lens (\ClusterSnapshotInList' {snapshotName} -> snapshotName) (\s@ClusterSnapshotInList' {} a -> s {snapshotName = a} :: ClusterSnapshotInList)++-- | The status of the Elastic DocumentDB snapshot.+clusterSnapshotInList_status :: Lens.Lens' ClusterSnapshotInList Status+clusterSnapshotInList_status = Lens.lens (\ClusterSnapshotInList' {status} -> status) (\s@ClusterSnapshotInList' {} a -> s {status = a} :: ClusterSnapshotInList)++instance Data.FromJSON ClusterSnapshotInList where+ parseJSON =+ Data.withObject+ "ClusterSnapshotInList"+ ( \x ->+ ClusterSnapshotInList'+ Prelude.<$> (x Data..: "clusterArn")+ Prelude.<*> (x Data..: "snapshotArn")+ Prelude.<*> (x Data..: "snapshotCreationTime")+ Prelude.<*> (x Data..: "snapshotName")+ Prelude.<*> (x Data..: "status")+ )++instance Prelude.Hashable ClusterSnapshotInList where+ hashWithSalt _salt ClusterSnapshotInList' {..} =+ _salt+ `Prelude.hashWithSalt` clusterArn+ `Prelude.hashWithSalt` snapshotArn+ `Prelude.hashWithSalt` snapshotCreationTime+ `Prelude.hashWithSalt` snapshotName+ `Prelude.hashWithSalt` status++instance Prelude.NFData ClusterSnapshotInList where+ rnf ClusterSnapshotInList' {..} =+ Prelude.rnf clusterArn+ `Prelude.seq` Prelude.rnf snapshotArn+ `Prelude.seq` Prelude.rnf snapshotCreationTime+ `Prelude.seq` Prelude.rnf snapshotName+ `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/DocDbElastic/Types/Status.hs view
@@ -0,0 +1,103 @@+{-# 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.DocDbElastic.Types.Status+-- 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.DocDbElastic.Types.Status+ ( Status+ ( ..,+ Status_ACTIVE,+ Status_CREATING,+ Status_DELETING,+ Status_INACCESSIBLE_ENCRYPTION_CREDS,+ Status_INVALID_SECURITY_GROUP_ID,+ Status_INVALID_SUBNET_ID,+ Status_IP_ADDRESS_LIMIT_EXCEEDED,+ Status_UPDATING,+ Status_VPC_ENDPOINT_LIMIT_EXCEEDED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Status = Status' {fromStatus :: 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 Status_ACTIVE :: Status+pattern Status_ACTIVE = Status' "ACTIVE"++pattern Status_CREATING :: Status+pattern Status_CREATING = Status' "CREATING"++pattern Status_DELETING :: Status+pattern Status_DELETING = Status' "DELETING"++pattern Status_INACCESSIBLE_ENCRYPTION_CREDS :: Status+pattern Status_INACCESSIBLE_ENCRYPTION_CREDS = Status' "INACCESSIBLE_ENCRYPTION_CREDS"++pattern Status_INVALID_SECURITY_GROUP_ID :: Status+pattern Status_INVALID_SECURITY_GROUP_ID = Status' "INVALID_SECURITY_GROUP_ID"++pattern Status_INVALID_SUBNET_ID :: Status+pattern Status_INVALID_SUBNET_ID = Status' "INVALID_SUBNET_ID"++pattern Status_IP_ADDRESS_LIMIT_EXCEEDED :: Status+pattern Status_IP_ADDRESS_LIMIT_EXCEEDED = Status' "IP_ADDRESS_LIMIT_EXCEEDED"++pattern Status_UPDATING :: Status+pattern Status_UPDATING = Status' "UPDATING"++pattern Status_VPC_ENDPOINT_LIMIT_EXCEEDED :: Status+pattern Status_VPC_ENDPOINT_LIMIT_EXCEEDED = Status' "VPC_ENDPOINT_LIMIT_EXCEEDED"++{-# COMPLETE+ Status_ACTIVE,+ Status_CREATING,+ Status_DELETING,+ Status_INACCESSIBLE_ENCRYPTION_CREDS,+ Status_INVALID_SECURITY_GROUP_ID,+ Status_INVALID_SUBNET_ID,+ Status_IP_ADDRESS_LIMIT_EXCEEDED,+ Status_UPDATING,+ Status_VPC_ENDPOINT_LIMIT_EXCEEDED,+ Status'+ #-}
+ gen/Amazonka/DocDbElastic/UntagResource.hs view
@@ -0,0 +1,161 @@+{-# 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.DocDbElastic.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 metadata tags to a Elastic DocumentDB resource+module Amazonka.DocDbElastic.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 Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+ { -- | The arn of the Elastic DocumentDB resource.+ resourceArn :: Prelude.Text,+ -- | The tag keys to be removed from the Elastic DocumentDB resource.+ tagKeys :: [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'untagResource_resourceArn' - The arn of the Elastic DocumentDB resource.+--+-- 'tagKeys', 'untagResource_tagKeys' - The tag keys to be removed from the Elastic DocumentDB resource.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ =+ UntagResource'+ { resourceArn = pResourceArn_,+ tagKeys = Prelude.mempty+ }++-- | The arn of the Elastic DocumentDB resource.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | The tag keys to be removed from the Elastic DocumentDB resource.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+ type+ AWSResponse UntagResource =+ UntagResourceResponse+ request overrides =+ Request.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.1" ::+ 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/DocDbElastic/UpdateCluster.hs view
@@ -0,0 +1,327 @@+{-# 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.DocDbElastic.UpdateCluster+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Modifies a Elastic DocumentDB cluster. This includes updating+-- admin-username\/password, upgrading API version setting up a backup+-- window and maintenance window+module Amazonka.DocDbElastic.UpdateCluster+ ( -- * Creating a Request+ UpdateCluster (..),+ newUpdateCluster,++ -- * Request Lenses+ updateCluster_adminUserPassword,+ updateCluster_authType,+ updateCluster_clientToken,+ updateCluster_preferredMaintenanceWindow,+ updateCluster_shardCapacity,+ updateCluster_shardCount,+ updateCluster_subnetIds,+ updateCluster_vpcSecurityGroupIds,+ updateCluster_clusterArn,++ -- * Destructuring the Response+ UpdateClusterResponse (..),+ newUpdateClusterResponse,++ -- * Response Lenses+ updateClusterResponse_httpStatus,+ updateClusterResponse_cluster,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateCluster' smart constructor.+data UpdateCluster = UpdateCluster'+ { -- | The password for the Elastic DocumentDB cluster administrator. This+ -- password can contain any printable ASCII character except forward slash+ -- (\/), double quote (\"), or the \"at\" symbol (\@).+ --+ -- /Constraints/: Must contain from 8 to 100 characters.+ adminUserPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | The authentication type for the Elastic DocumentDB cluster.+ authType :: Prelude.Maybe Auth,+ -- | The client token for the Elastic DocumentDB cluster.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The weekly time range during which system maintenance can occur, in+ -- Universal Coordinated Time (UTC).+ --+ -- /Format/: @ddd:hh24:mi-ddd:hh24:mi@+ --+ -- /Default/: a 30-minute window selected at random from an 8-hour block of+ -- time for each Amazon Web Services Region, occurring on a random day of+ -- the week.+ --+ -- /Valid days/: Mon, Tue, Wed, Thu, Fri, Sat, Sun+ --+ -- /Constraints/: Minimum 30-minute window.+ preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,+ -- | The capacity of each shard in the Elastic DocumentDB cluster.+ shardCapacity :: Prelude.Maybe Prelude.Int,+ -- | The number of shards to create in the Elastic DocumentDB cluster.+ shardCount :: Prelude.Maybe Prelude.Int,+ -- | The number of shards to create in the Elastic DocumentDB cluster.+ subnetIds :: Prelude.Maybe [Prelude.Text],+ -- | A list of EC2 VPC security groups to associate with the new Elastic+ -- DocumentDB cluster.+ vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],+ -- | The arn of the Elastic DocumentDB cluster.+ clusterArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateCluster' 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:+--+-- 'adminUserPassword', 'updateCluster_adminUserPassword' - The password for the Elastic DocumentDB cluster administrator. This+-- password can contain any printable ASCII character except forward slash+-- (\/), double quote (\"), or the \"at\" symbol (\@).+--+-- /Constraints/: Must contain from 8 to 100 characters.+--+-- 'authType', 'updateCluster_authType' - The authentication type for the Elastic DocumentDB cluster.+--+-- 'clientToken', 'updateCluster_clientToken' - The client token for the Elastic DocumentDB cluster.+--+-- 'preferredMaintenanceWindow', 'updateCluster_preferredMaintenanceWindow' - The weekly time range during which system maintenance can occur, in+-- Universal Coordinated Time (UTC).+--+-- /Format/: @ddd:hh24:mi-ddd:hh24:mi@+--+-- /Default/: a 30-minute window selected at random from an 8-hour block of+-- time for each Amazon Web Services Region, occurring on a random day of+-- the week.+--+-- /Valid days/: Mon, Tue, Wed, Thu, Fri, Sat, Sun+--+-- /Constraints/: Minimum 30-minute window.+--+-- 'shardCapacity', 'updateCluster_shardCapacity' - The capacity of each shard in the Elastic DocumentDB cluster.+--+-- 'shardCount', 'updateCluster_shardCount' - The number of shards to create in the Elastic DocumentDB cluster.+--+-- 'subnetIds', 'updateCluster_subnetIds' - The number of shards to create in the Elastic DocumentDB cluster.+--+-- 'vpcSecurityGroupIds', 'updateCluster_vpcSecurityGroupIds' - A list of EC2 VPC security groups to associate with the new Elastic+-- DocumentDB cluster.+--+-- 'clusterArn', 'updateCluster_clusterArn' - The arn of the Elastic DocumentDB cluster.+newUpdateCluster ::+ -- | 'clusterArn'+ Prelude.Text ->+ UpdateCluster+newUpdateCluster pClusterArn_ =+ UpdateCluster'+ { adminUserPassword = Prelude.Nothing,+ authType = Prelude.Nothing,+ clientToken = Prelude.Nothing,+ preferredMaintenanceWindow = Prelude.Nothing,+ shardCapacity = Prelude.Nothing,+ shardCount = Prelude.Nothing,+ subnetIds = Prelude.Nothing,+ vpcSecurityGroupIds = Prelude.Nothing,+ clusterArn = pClusterArn_+ }++-- | The password for the Elastic DocumentDB cluster administrator. This+-- password can contain any printable ASCII character except forward slash+-- (\/), double quote (\"), or the \"at\" symbol (\@).+--+-- /Constraints/: Must contain from 8 to 100 characters.+updateCluster_adminUserPassword :: Lens.Lens' UpdateCluster (Prelude.Maybe Prelude.Text)+updateCluster_adminUserPassword = Lens.lens (\UpdateCluster' {adminUserPassword} -> adminUserPassword) (\s@UpdateCluster' {} a -> s {adminUserPassword = a} :: UpdateCluster) Prelude.. Lens.mapping Data._Sensitive++-- | The authentication type for the Elastic DocumentDB cluster.+updateCluster_authType :: Lens.Lens' UpdateCluster (Prelude.Maybe Auth)+updateCluster_authType = Lens.lens (\UpdateCluster' {authType} -> authType) (\s@UpdateCluster' {} a -> s {authType = a} :: UpdateCluster)++-- | The client token for the Elastic DocumentDB cluster.+updateCluster_clientToken :: Lens.Lens' UpdateCluster (Prelude.Maybe Prelude.Text)+updateCluster_clientToken = Lens.lens (\UpdateCluster' {clientToken} -> clientToken) (\s@UpdateCluster' {} a -> s {clientToken = a} :: UpdateCluster)++-- | The weekly time range during which system maintenance can occur, in+-- Universal Coordinated Time (UTC).+--+-- /Format/: @ddd:hh24:mi-ddd:hh24:mi@+--+-- /Default/: a 30-minute window selected at random from an 8-hour block of+-- time for each Amazon Web Services Region, occurring on a random day of+-- the week.+--+-- /Valid days/: Mon, Tue, Wed, Thu, Fri, Sat, Sun+--+-- /Constraints/: Minimum 30-minute window.+updateCluster_preferredMaintenanceWindow :: Lens.Lens' UpdateCluster (Prelude.Maybe Prelude.Text)+updateCluster_preferredMaintenanceWindow = Lens.lens (\UpdateCluster' {preferredMaintenanceWindow} -> preferredMaintenanceWindow) (\s@UpdateCluster' {} a -> s {preferredMaintenanceWindow = a} :: UpdateCluster)++-- | The capacity of each shard in the Elastic DocumentDB cluster.+updateCluster_shardCapacity :: Lens.Lens' UpdateCluster (Prelude.Maybe Prelude.Int)+updateCluster_shardCapacity = Lens.lens (\UpdateCluster' {shardCapacity} -> shardCapacity) (\s@UpdateCluster' {} a -> s {shardCapacity = a} :: UpdateCluster)++-- | The number of shards to create in the Elastic DocumentDB cluster.+updateCluster_shardCount :: Lens.Lens' UpdateCluster (Prelude.Maybe Prelude.Int)+updateCluster_shardCount = Lens.lens (\UpdateCluster' {shardCount} -> shardCount) (\s@UpdateCluster' {} a -> s {shardCount = a} :: UpdateCluster)++-- | The number of shards to create in the Elastic DocumentDB cluster.+updateCluster_subnetIds :: Lens.Lens' UpdateCluster (Prelude.Maybe [Prelude.Text])+updateCluster_subnetIds = Lens.lens (\UpdateCluster' {subnetIds} -> subnetIds) (\s@UpdateCluster' {} a -> s {subnetIds = a} :: UpdateCluster) Prelude.. Lens.mapping Lens.coerced++-- | A list of EC2 VPC security groups to associate with the new Elastic+-- DocumentDB cluster.+updateCluster_vpcSecurityGroupIds :: Lens.Lens' UpdateCluster (Prelude.Maybe [Prelude.Text])+updateCluster_vpcSecurityGroupIds = Lens.lens (\UpdateCluster' {vpcSecurityGroupIds} -> vpcSecurityGroupIds) (\s@UpdateCluster' {} a -> s {vpcSecurityGroupIds = a} :: UpdateCluster) Prelude.. Lens.mapping Lens.coerced++-- | The arn of the Elastic DocumentDB cluster.+updateCluster_clusterArn :: Lens.Lens' UpdateCluster Prelude.Text+updateCluster_clusterArn = Lens.lens (\UpdateCluster' {clusterArn} -> clusterArn) (\s@UpdateCluster' {} a -> s {clusterArn = a} :: UpdateCluster)++instance Core.AWSRequest UpdateCluster where+ type+ AWSResponse UpdateCluster =+ UpdateClusterResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateClusterResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "cluster")+ )++instance Prelude.Hashable UpdateCluster where+ hashWithSalt _salt UpdateCluster' {..} =+ _salt+ `Prelude.hashWithSalt` adminUserPassword+ `Prelude.hashWithSalt` authType+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` preferredMaintenanceWindow+ `Prelude.hashWithSalt` shardCapacity+ `Prelude.hashWithSalt` shardCount+ `Prelude.hashWithSalt` subnetIds+ `Prelude.hashWithSalt` vpcSecurityGroupIds+ `Prelude.hashWithSalt` clusterArn++instance Prelude.NFData UpdateCluster where+ rnf UpdateCluster' {..} =+ Prelude.rnf adminUserPassword+ `Prelude.seq` Prelude.rnf authType+ `Prelude.seq` Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf preferredMaintenanceWindow+ `Prelude.seq` Prelude.rnf shardCapacity+ `Prelude.seq` Prelude.rnf shardCount+ `Prelude.seq` Prelude.rnf subnetIds+ `Prelude.seq` Prelude.rnf vpcSecurityGroupIds+ `Prelude.seq` Prelude.rnf clusterArn++instance Data.ToHeaders UpdateCluster where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateCluster where+ toJSON UpdateCluster' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("adminUserPassword" Data..=)+ Prelude.<$> adminUserPassword,+ ("authType" Data..=) Prelude.<$> authType,+ ("clientToken" Data..=) Prelude.<$> clientToken,+ ("preferredMaintenanceWindow" Data..=)+ Prelude.<$> preferredMaintenanceWindow,+ ("shardCapacity" Data..=) Prelude.<$> shardCapacity,+ ("shardCount" Data..=) Prelude.<$> shardCount,+ ("subnetIds" Data..=) Prelude.<$> subnetIds,+ ("vpcSecurityGroupIds" Data..=)+ Prelude.<$> vpcSecurityGroupIds+ ]+ )++instance Data.ToPath UpdateCluster where+ toPath UpdateCluster' {..} =+ Prelude.mconcat ["/cluster/", Data.toBS clusterArn]++instance Data.ToQuery UpdateCluster where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateClusterResponse' smart constructor.+data UpdateClusterResponse = UpdateClusterResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Returns information about the updated Elastic DocumentDB cluster.+ cluster :: Cluster+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateClusterResponse' 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', 'updateClusterResponse_httpStatus' - The response's http status code.+--+-- 'cluster', 'updateClusterResponse_cluster' - Returns information about the updated Elastic DocumentDB cluster.+newUpdateClusterResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'cluster'+ Cluster ->+ UpdateClusterResponse+newUpdateClusterResponse pHttpStatus_ pCluster_ =+ UpdateClusterResponse'+ { httpStatus = pHttpStatus_,+ cluster = pCluster_+ }++-- | The response's http status code.+updateClusterResponse_httpStatus :: Lens.Lens' UpdateClusterResponse Prelude.Int+updateClusterResponse_httpStatus = Lens.lens (\UpdateClusterResponse' {httpStatus} -> httpStatus) (\s@UpdateClusterResponse' {} a -> s {httpStatus = a} :: UpdateClusterResponse)++-- | Returns information about the updated Elastic DocumentDB cluster.+updateClusterResponse_cluster :: Lens.Lens' UpdateClusterResponse Cluster+updateClusterResponse_cluster = Lens.lens (\UpdateClusterResponse' {cluster} -> cluster) (\s@UpdateClusterResponse' {} a -> s {cluster = a} :: UpdateClusterResponse)++instance Prelude.NFData UpdateClusterResponse where+ rnf UpdateClusterResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf cluster
+ gen/Amazonka/DocDbElastic/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.DocDbElastic.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.DocDbElastic.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.DocDbElastic.Lens+import Amazonka.DocDbElastic.Types+import qualified Amazonka.Prelude as Prelude
+ 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.DocDbElastic+import Test.Amazonka.DocDbElastic.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "DocDbElastic"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/DocDbElastic.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.DocDbElastic+-- 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.DocDbElastic+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/DocDbElastic/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.DocDbElastic.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.DocDbElastic.Internal where
+ test/Test/Amazonka/Gen/DocDbElastic.hs view
@@ -0,0 +1,298 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.Amazonka.Gen.DocDbElastic+-- 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.DocDbElastic where++import Amazonka.DocDbElastic+import qualified Data.Proxy as Proxy+import Test.Amazonka.DocDbElastic.Internal+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ requestCreateCluster $+-- newCreateCluster+--+-- , requestCreateClusterSnapshot $+-- newCreateClusterSnapshot+--+-- , requestDeleteCluster $+-- newDeleteCluster+--+-- , requestDeleteClusterSnapshot $+-- newDeleteClusterSnapshot+--+-- , requestGetCluster $+-- newGetCluster+--+-- , requestGetClusterSnapshot $+-- newGetClusterSnapshot+--+-- , requestListClusterSnapshots $+-- newListClusterSnapshots+--+-- , requestListClusters $+-- newListClusters+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestRestoreClusterFromSnapshot $+-- newRestoreClusterFromSnapshot+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateCluster $+-- newUpdateCluster+--+-- ]++-- , testGroup "response"+-- [ responseCreateCluster $+-- newCreateClusterResponse+--+-- , responseCreateClusterSnapshot $+-- newCreateClusterSnapshotResponse+--+-- , responseDeleteCluster $+-- newDeleteClusterResponse+--+-- , responseDeleteClusterSnapshot $+-- newDeleteClusterSnapshotResponse+--+-- , responseGetCluster $+-- newGetClusterResponse+--+-- , responseGetClusterSnapshot $+-- newGetClusterSnapshotResponse+--+-- , responseListClusterSnapshots $+-- newListClusterSnapshotsResponse+--+-- , responseListClusters $+-- newListClustersResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responseRestoreClusterFromSnapshot $+-- newRestoreClusterFromSnapshotResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateCluster $+-- newUpdateClusterResponse+--+-- ]+-- ]++-- Requests++requestCreateCluster :: CreateCluster -> TestTree+requestCreateCluster =+ req+ "CreateCluster"+ "fixture/CreateCluster.yaml"++requestCreateClusterSnapshot :: CreateClusterSnapshot -> TestTree+requestCreateClusterSnapshot =+ req+ "CreateClusterSnapshot"+ "fixture/CreateClusterSnapshot.yaml"++requestDeleteCluster :: DeleteCluster -> TestTree+requestDeleteCluster =+ req+ "DeleteCluster"+ "fixture/DeleteCluster.yaml"++requestDeleteClusterSnapshot :: DeleteClusterSnapshot -> TestTree+requestDeleteClusterSnapshot =+ req+ "DeleteClusterSnapshot"+ "fixture/DeleteClusterSnapshot.yaml"++requestGetCluster :: GetCluster -> TestTree+requestGetCluster =+ req+ "GetCluster"+ "fixture/GetCluster.yaml"++requestGetClusterSnapshot :: GetClusterSnapshot -> TestTree+requestGetClusterSnapshot =+ req+ "GetClusterSnapshot"+ "fixture/GetClusterSnapshot.yaml"++requestListClusterSnapshots :: ListClusterSnapshots -> TestTree+requestListClusterSnapshots =+ req+ "ListClusterSnapshots"+ "fixture/ListClusterSnapshots.yaml"++requestListClusters :: ListClusters -> TestTree+requestListClusters =+ req+ "ListClusters"+ "fixture/ListClusters.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestRestoreClusterFromSnapshot :: RestoreClusterFromSnapshot -> TestTree+requestRestoreClusterFromSnapshot =+ req+ "RestoreClusterFromSnapshot"+ "fixture/RestoreClusterFromSnapshot.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateCluster :: UpdateCluster -> TestTree+requestUpdateCluster =+ req+ "UpdateCluster"+ "fixture/UpdateCluster.yaml"++-- Responses++responseCreateCluster :: CreateClusterResponse -> TestTree+responseCreateCluster =+ res+ "CreateClusterResponse"+ "fixture/CreateClusterResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateCluster)++responseCreateClusterSnapshot :: CreateClusterSnapshotResponse -> TestTree+responseCreateClusterSnapshot =+ res+ "CreateClusterSnapshotResponse"+ "fixture/CreateClusterSnapshotResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateClusterSnapshot)++responseDeleteCluster :: DeleteClusterResponse -> TestTree+responseDeleteCluster =+ res+ "DeleteClusterResponse"+ "fixture/DeleteClusterResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteCluster)++responseDeleteClusterSnapshot :: DeleteClusterSnapshotResponse -> TestTree+responseDeleteClusterSnapshot =+ res+ "DeleteClusterSnapshotResponse"+ "fixture/DeleteClusterSnapshotResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteClusterSnapshot)++responseGetCluster :: GetClusterResponse -> TestTree+responseGetCluster =+ res+ "GetClusterResponse"+ "fixture/GetClusterResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetCluster)++responseGetClusterSnapshot :: GetClusterSnapshotResponse -> TestTree+responseGetClusterSnapshot =+ res+ "GetClusterSnapshotResponse"+ "fixture/GetClusterSnapshotResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetClusterSnapshot)++responseListClusterSnapshots :: ListClusterSnapshotsResponse -> TestTree+responseListClusterSnapshots =+ res+ "ListClusterSnapshotsResponse"+ "fixture/ListClusterSnapshotsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListClusterSnapshots)++responseListClusters :: ListClustersResponse -> TestTree+responseListClusters =+ res+ "ListClustersResponse"+ "fixture/ListClustersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListClusters)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseRestoreClusterFromSnapshot :: RestoreClusterFromSnapshotResponse -> TestTree+responseRestoreClusterFromSnapshot =+ res+ "RestoreClusterFromSnapshotResponse"+ "fixture/RestoreClusterFromSnapshotResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy RestoreClusterFromSnapshot)++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)++responseUpdateCluster :: UpdateClusterResponse -> TestTree+responseUpdateCluster =+ res+ "UpdateClusterResponse"+ "fixture/UpdateClusterResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateCluster)