packages feed

amazonka-redshift-serverless (empty) → 2.0

raw patch · 153 files changed

+14847/−0 lines, 153 filesdep +amazonka-coredep +amazonka-redshift-serverlessdep +amazonka-test

Dependencies added: amazonka-core, amazonka-redshift-serverless, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers

Files

+ 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 Redshift Serverless SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2021-04-21@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-redshift-serverless)+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.RedshiftServerLess](http://hackage.haskell.org/package/amazonka-redshift-serverless/docs/Amazonka-RedshiftServerLess.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-redshift-serverless` 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-redshift-serverless.cabal view
@@ -0,0 +1,144 @@+cabal-version:      2.2+name:               amazonka-redshift-serverless+version:            2.0+synopsis:           Amazon Redshift Serverless 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 @2021-04-21@ 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.RedshiftServerLess.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.RedshiftServerLess" 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-redshift-serverless++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.RedshiftServerLess+    Amazonka.RedshiftServerLess.ConvertRecoveryPointToSnapshot+    Amazonka.RedshiftServerLess.CreateEndpointAccess+    Amazonka.RedshiftServerLess.CreateNamespace+    Amazonka.RedshiftServerLess.CreateSnapshot+    Amazonka.RedshiftServerLess.CreateUsageLimit+    Amazonka.RedshiftServerLess.CreateWorkgroup+    Amazonka.RedshiftServerLess.DeleteEndpointAccess+    Amazonka.RedshiftServerLess.DeleteNamespace+    Amazonka.RedshiftServerLess.DeleteResourcePolicy+    Amazonka.RedshiftServerLess.DeleteSnapshot+    Amazonka.RedshiftServerLess.DeleteUsageLimit+    Amazonka.RedshiftServerLess.DeleteWorkgroup+    Amazonka.RedshiftServerLess.GetCredentials+    Amazonka.RedshiftServerLess.GetEndpointAccess+    Amazonka.RedshiftServerLess.GetNamespace+    Amazonka.RedshiftServerLess.GetRecoveryPoint+    Amazonka.RedshiftServerLess.GetResourcePolicy+    Amazonka.RedshiftServerLess.GetSnapshot+    Amazonka.RedshiftServerLess.GetTableRestoreStatus+    Amazonka.RedshiftServerLess.GetUsageLimit+    Amazonka.RedshiftServerLess.GetWorkgroup+    Amazonka.RedshiftServerLess.Lens+    Amazonka.RedshiftServerLess.ListEndpointAccess+    Amazonka.RedshiftServerLess.ListNamespaces+    Amazonka.RedshiftServerLess.ListRecoveryPoints+    Amazonka.RedshiftServerLess.ListSnapshots+    Amazonka.RedshiftServerLess.ListTableRestoreStatus+    Amazonka.RedshiftServerLess.ListTagsForResource+    Amazonka.RedshiftServerLess.ListUsageLimits+    Amazonka.RedshiftServerLess.ListWorkgroups+    Amazonka.RedshiftServerLess.PutResourcePolicy+    Amazonka.RedshiftServerLess.RestoreFromRecoveryPoint+    Amazonka.RedshiftServerLess.RestoreFromSnapshot+    Amazonka.RedshiftServerLess.RestoreTableFromSnapshot+    Amazonka.RedshiftServerLess.TagResource+    Amazonka.RedshiftServerLess.Types+    Amazonka.RedshiftServerLess.Types.ConfigParameter+    Amazonka.RedshiftServerLess.Types.Endpoint+    Amazonka.RedshiftServerLess.Types.EndpointAccess+    Amazonka.RedshiftServerLess.Types.LogExport+    Amazonka.RedshiftServerLess.Types.Namespace+    Amazonka.RedshiftServerLess.Types.NamespaceStatus+    Amazonka.RedshiftServerLess.Types.NetworkInterface+    Amazonka.RedshiftServerLess.Types.RecoveryPoint+    Amazonka.RedshiftServerLess.Types.ResourcePolicy+    Amazonka.RedshiftServerLess.Types.Snapshot+    Amazonka.RedshiftServerLess.Types.SnapshotStatus+    Amazonka.RedshiftServerLess.Types.TableRestoreStatus+    Amazonka.RedshiftServerLess.Types.Tag+    Amazonka.RedshiftServerLess.Types.UsageLimit+    Amazonka.RedshiftServerLess.Types.UsageLimitBreachAction+    Amazonka.RedshiftServerLess.Types.UsageLimitPeriod+    Amazonka.RedshiftServerLess.Types.UsageLimitUsageType+    Amazonka.RedshiftServerLess.Types.VpcEndpoint+    Amazonka.RedshiftServerLess.Types.VpcSecurityGroupMembership+    Amazonka.RedshiftServerLess.Types.Workgroup+    Amazonka.RedshiftServerLess.Types.WorkgroupStatus+    Amazonka.RedshiftServerLess.UntagResource+    Amazonka.RedshiftServerLess.UpdateEndpointAccess+    Amazonka.RedshiftServerLess.UpdateNamespace+    Amazonka.RedshiftServerLess.UpdateSnapshot+    Amazonka.RedshiftServerLess.UpdateUsageLimit+    Amazonka.RedshiftServerLess.UpdateWorkgroup+    Amazonka.RedshiftServerLess.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-redshift-serverless-test+  type:             exitcode-stdio-1.0+  default-language: Haskell2010+  hs-source-dirs:   test+  main-is:          Main.hs+  ghc-options:      -Wall -threaded++  -- This section is encoded by the template and any modules added by+  -- hand outside these namespaces will not correctly be added to the+  -- distribution package.+  other-modules:+    Test.Amazonka.Gen.RedshiftServerLess+    Test.Amazonka.RedshiftServerLess+    Test.Amazonka.RedshiftServerLess.Internal++  build-depends:+    , amazonka-core                 >=2.0 && <2.1+    , amazonka-redshift-serverless+    , amazonka-test                 >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/ConvertRecoveryPointToSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/ConvertRecoveryPointToSnapshotResponse.proto view
+ fixture/CreateEndpointAccess.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/CreateEndpointAccessResponse.proto view
+ fixture/CreateNamespace.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/CreateNamespaceResponse.proto view
+ fixture/CreateSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/CreateSnapshotResponse.proto view
+ fixture/CreateUsageLimit.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/CreateUsageLimitResponse.proto view
+ fixture/CreateWorkgroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/CreateWorkgroupResponse.proto view
+ fixture/DeleteEndpointAccess.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/DeleteEndpointAccessResponse.proto view
+ fixture/DeleteNamespace.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/DeleteNamespaceResponse.proto view
+ fixture/DeleteResourcePolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/DeleteResourcePolicyResponse.proto view
+ fixture/DeleteSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/DeleteSnapshotResponse.proto view
+ fixture/DeleteUsageLimit.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/DeleteUsageLimitResponse.proto view
+ fixture/DeleteWorkgroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/DeleteWorkgroupResponse.proto view
+ fixture/GetCredentials.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/GetCredentialsResponse.proto view
+ fixture/GetEndpointAccess.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/GetEndpointAccessResponse.proto view
+ fixture/GetNamespace.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/GetNamespaceResponse.proto view
+ fixture/GetRecoveryPoint.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/GetRecoveryPointResponse.proto view
+ fixture/GetResourcePolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/GetResourcePolicyResponse.proto view
+ fixture/GetSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/GetSnapshotResponse.proto view
+ fixture/GetTableRestoreStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/GetTableRestoreStatusResponse.proto view
+ fixture/GetUsageLimit.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/GetUsageLimitResponse.proto view
+ fixture/GetWorkgroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/GetWorkgroupResponse.proto view
+ fixture/ListEndpointAccess.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/ListEndpointAccessResponse.proto view
+ fixture/ListNamespaces.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/ListNamespacesResponse.proto view
+ fixture/ListRecoveryPoints.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/ListRecoveryPointsResponse.proto view
+ fixture/ListSnapshots.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/ListSnapshotsResponse.proto view
+ fixture/ListTableRestoreStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/ListTableRestoreStatusResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/ListUsageLimits.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/ListUsageLimitsResponse.proto view
+ fixture/ListWorkgroups.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/ListWorkgroupsResponse.proto view
+ fixture/PutResourcePolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/PutResourcePolicyResponse.proto view
+ fixture/RestoreFromRecoveryPoint.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/RestoreFromRecoveryPointResponse.proto view
+ fixture/RestoreFromSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/RestoreFromSnapshotResponse.proto view
+ fixture/RestoreTableFromSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/RestoreTableFromSnapshotResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/TagResourceResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/UpdateEndpointAccess.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/UpdateEndpointAccessResponse.proto view
+ fixture/UpdateNamespace.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/UpdateNamespaceResponse.proto view
+ fixture/UpdateSnapshot.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/UpdateSnapshotResponse.proto view
+ fixture/UpdateUsageLimit.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/UpdateUsageLimitResponse.proto view
+ fixture/UpdateWorkgroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/redshift-serverless/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  redshift-serverless.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/UpdateWorkgroupResponse.proto view
+ gen/Amazonka/RedshiftServerLess.hs view
@@ -0,0 +1,461 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.RedshiftServerLess+-- 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 @2021-04-21@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- This is an interface reference for Amazon Redshift Serverless. It+-- contains documentation for one of the programming or command line+-- interfaces you can use to manage Amazon Redshift Serverless.+--+-- Amazon Redshift Serverless automatically provisions data warehouse+-- capacity and intelligently scales the underlying resources based on+-- workload demands. Amazon Redshift Serverless adjusts capacity in seconds+-- to deliver consistently high performance and simplified operations for+-- even the most demanding and volatile workloads. Amazon Redshift+-- Serverless lets you focus on using your data to acquire new insights for+-- your business and customers.+--+-- To learn more about Amazon Redshift Serverless, see+-- <https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-whatis.html What is Amazon Redshift Serverless>.+module Amazonka.RedshiftServerLess+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** AccessDeniedException+    _AccessDeniedException,++    -- ** ConflictException+    _ConflictException,++    -- ** InsufficientCapacityException+    _InsufficientCapacityException,++    -- ** InternalServerException+    _InternalServerException,++    -- ** InvalidPaginationException+    _InvalidPaginationException,++    -- ** ResourceNotFoundException+    _ResourceNotFoundException,++    -- ** ServiceQuotaExceededException+    _ServiceQuotaExceededException,++    -- ** ThrottlingException+    _ThrottlingException,++    -- ** TooManyTagsException+    _TooManyTagsException,++    -- ** ValidationException+    _ValidationException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** ConvertRecoveryPointToSnapshot+    ConvertRecoveryPointToSnapshot (ConvertRecoveryPointToSnapshot'),+    newConvertRecoveryPointToSnapshot,+    ConvertRecoveryPointToSnapshotResponse (ConvertRecoveryPointToSnapshotResponse'),+    newConvertRecoveryPointToSnapshotResponse,++    -- ** CreateEndpointAccess+    CreateEndpointAccess (CreateEndpointAccess'),+    newCreateEndpointAccess,+    CreateEndpointAccessResponse (CreateEndpointAccessResponse'),+    newCreateEndpointAccessResponse,++    -- ** CreateNamespace+    CreateNamespace (CreateNamespace'),+    newCreateNamespace,+    CreateNamespaceResponse (CreateNamespaceResponse'),+    newCreateNamespaceResponse,++    -- ** CreateSnapshot+    CreateSnapshot (CreateSnapshot'),+    newCreateSnapshot,+    CreateSnapshotResponse (CreateSnapshotResponse'),+    newCreateSnapshotResponse,++    -- ** CreateUsageLimit+    CreateUsageLimit (CreateUsageLimit'),+    newCreateUsageLimit,+    CreateUsageLimitResponse (CreateUsageLimitResponse'),+    newCreateUsageLimitResponse,++    -- ** CreateWorkgroup+    CreateWorkgroup (CreateWorkgroup'),+    newCreateWorkgroup,+    CreateWorkgroupResponse (CreateWorkgroupResponse'),+    newCreateWorkgroupResponse,++    -- ** DeleteEndpointAccess+    DeleteEndpointAccess (DeleteEndpointAccess'),+    newDeleteEndpointAccess,+    DeleteEndpointAccessResponse (DeleteEndpointAccessResponse'),+    newDeleteEndpointAccessResponse,++    -- ** DeleteNamespace+    DeleteNamespace (DeleteNamespace'),+    newDeleteNamespace,+    DeleteNamespaceResponse (DeleteNamespaceResponse'),+    newDeleteNamespaceResponse,++    -- ** DeleteResourcePolicy+    DeleteResourcePolicy (DeleteResourcePolicy'),+    newDeleteResourcePolicy,+    DeleteResourcePolicyResponse (DeleteResourcePolicyResponse'),+    newDeleteResourcePolicyResponse,++    -- ** DeleteSnapshot+    DeleteSnapshot (DeleteSnapshot'),+    newDeleteSnapshot,+    DeleteSnapshotResponse (DeleteSnapshotResponse'),+    newDeleteSnapshotResponse,++    -- ** DeleteUsageLimit+    DeleteUsageLimit (DeleteUsageLimit'),+    newDeleteUsageLimit,+    DeleteUsageLimitResponse (DeleteUsageLimitResponse'),+    newDeleteUsageLimitResponse,++    -- ** DeleteWorkgroup+    DeleteWorkgroup (DeleteWorkgroup'),+    newDeleteWorkgroup,+    DeleteWorkgroupResponse (DeleteWorkgroupResponse'),+    newDeleteWorkgroupResponse,++    -- ** GetCredentials+    GetCredentials (GetCredentials'),+    newGetCredentials,+    GetCredentialsResponse (GetCredentialsResponse'),+    newGetCredentialsResponse,++    -- ** GetEndpointAccess+    GetEndpointAccess (GetEndpointAccess'),+    newGetEndpointAccess,+    GetEndpointAccessResponse (GetEndpointAccessResponse'),+    newGetEndpointAccessResponse,++    -- ** GetNamespace+    GetNamespace (GetNamespace'),+    newGetNamespace,+    GetNamespaceResponse (GetNamespaceResponse'),+    newGetNamespaceResponse,++    -- ** GetRecoveryPoint+    GetRecoveryPoint (GetRecoveryPoint'),+    newGetRecoveryPoint,+    GetRecoveryPointResponse (GetRecoveryPointResponse'),+    newGetRecoveryPointResponse,++    -- ** GetResourcePolicy+    GetResourcePolicy (GetResourcePolicy'),+    newGetResourcePolicy,+    GetResourcePolicyResponse (GetResourcePolicyResponse'),+    newGetResourcePolicyResponse,++    -- ** GetSnapshot+    GetSnapshot (GetSnapshot'),+    newGetSnapshot,+    GetSnapshotResponse (GetSnapshotResponse'),+    newGetSnapshotResponse,++    -- ** GetTableRestoreStatus+    GetTableRestoreStatus (GetTableRestoreStatus'),+    newGetTableRestoreStatus,+    GetTableRestoreStatusResponse (GetTableRestoreStatusResponse'),+    newGetTableRestoreStatusResponse,++    -- ** GetUsageLimit+    GetUsageLimit (GetUsageLimit'),+    newGetUsageLimit,+    GetUsageLimitResponse (GetUsageLimitResponse'),+    newGetUsageLimitResponse,++    -- ** GetWorkgroup+    GetWorkgroup (GetWorkgroup'),+    newGetWorkgroup,+    GetWorkgroupResponse (GetWorkgroupResponse'),+    newGetWorkgroupResponse,++    -- ** ListEndpointAccess (Paginated)+    ListEndpointAccess (ListEndpointAccess'),+    newListEndpointAccess,+    ListEndpointAccessResponse (ListEndpointAccessResponse'),+    newListEndpointAccessResponse,++    -- ** ListNamespaces (Paginated)+    ListNamespaces (ListNamespaces'),+    newListNamespaces,+    ListNamespacesResponse (ListNamespacesResponse'),+    newListNamespacesResponse,++    -- ** ListRecoveryPoints (Paginated)+    ListRecoveryPoints (ListRecoveryPoints'),+    newListRecoveryPoints,+    ListRecoveryPointsResponse (ListRecoveryPointsResponse'),+    newListRecoveryPointsResponse,++    -- ** ListSnapshots (Paginated)+    ListSnapshots (ListSnapshots'),+    newListSnapshots,+    ListSnapshotsResponse (ListSnapshotsResponse'),+    newListSnapshotsResponse,++    -- ** ListTableRestoreStatus (Paginated)+    ListTableRestoreStatus (ListTableRestoreStatus'),+    newListTableRestoreStatus,+    ListTableRestoreStatusResponse (ListTableRestoreStatusResponse'),+    newListTableRestoreStatusResponse,++    -- ** ListTagsForResource+    ListTagsForResource (ListTagsForResource'),+    newListTagsForResource,+    ListTagsForResourceResponse (ListTagsForResourceResponse'),+    newListTagsForResourceResponse,++    -- ** ListUsageLimits (Paginated)+    ListUsageLimits (ListUsageLimits'),+    newListUsageLimits,+    ListUsageLimitsResponse (ListUsageLimitsResponse'),+    newListUsageLimitsResponse,++    -- ** ListWorkgroups (Paginated)+    ListWorkgroups (ListWorkgroups'),+    newListWorkgroups,+    ListWorkgroupsResponse (ListWorkgroupsResponse'),+    newListWorkgroupsResponse,++    -- ** PutResourcePolicy+    PutResourcePolicy (PutResourcePolicy'),+    newPutResourcePolicy,+    PutResourcePolicyResponse (PutResourcePolicyResponse'),+    newPutResourcePolicyResponse,++    -- ** RestoreFromRecoveryPoint+    RestoreFromRecoveryPoint (RestoreFromRecoveryPoint'),+    newRestoreFromRecoveryPoint,+    RestoreFromRecoveryPointResponse (RestoreFromRecoveryPointResponse'),+    newRestoreFromRecoveryPointResponse,++    -- ** RestoreFromSnapshot+    RestoreFromSnapshot (RestoreFromSnapshot'),+    newRestoreFromSnapshot,+    RestoreFromSnapshotResponse (RestoreFromSnapshotResponse'),+    newRestoreFromSnapshotResponse,++    -- ** RestoreTableFromSnapshot+    RestoreTableFromSnapshot (RestoreTableFromSnapshot'),+    newRestoreTableFromSnapshot,+    RestoreTableFromSnapshotResponse (RestoreTableFromSnapshotResponse'),+    newRestoreTableFromSnapshotResponse,++    -- ** TagResource+    TagResource (TagResource'),+    newTagResource,+    TagResourceResponse (TagResourceResponse'),+    newTagResourceResponse,++    -- ** UntagResource+    UntagResource (UntagResource'),+    newUntagResource,+    UntagResourceResponse (UntagResourceResponse'),+    newUntagResourceResponse,++    -- ** UpdateEndpointAccess+    UpdateEndpointAccess (UpdateEndpointAccess'),+    newUpdateEndpointAccess,+    UpdateEndpointAccessResponse (UpdateEndpointAccessResponse'),+    newUpdateEndpointAccessResponse,++    -- ** UpdateNamespace+    UpdateNamespace (UpdateNamespace'),+    newUpdateNamespace,+    UpdateNamespaceResponse (UpdateNamespaceResponse'),+    newUpdateNamespaceResponse,++    -- ** UpdateSnapshot+    UpdateSnapshot (UpdateSnapshot'),+    newUpdateSnapshot,+    UpdateSnapshotResponse (UpdateSnapshotResponse'),+    newUpdateSnapshotResponse,++    -- ** UpdateUsageLimit+    UpdateUsageLimit (UpdateUsageLimit'),+    newUpdateUsageLimit,+    UpdateUsageLimitResponse (UpdateUsageLimitResponse'),+    newUpdateUsageLimitResponse,++    -- ** UpdateWorkgroup+    UpdateWorkgroup (UpdateWorkgroup'),+    newUpdateWorkgroup,+    UpdateWorkgroupResponse (UpdateWorkgroupResponse'),+    newUpdateWorkgroupResponse,++    -- * Types++    -- ** LogExport+    LogExport (..),++    -- ** NamespaceStatus+    NamespaceStatus (..),++    -- ** SnapshotStatus+    SnapshotStatus (..),++    -- ** UsageLimitBreachAction+    UsageLimitBreachAction (..),++    -- ** UsageLimitPeriod+    UsageLimitPeriod (..),++    -- ** UsageLimitUsageType+    UsageLimitUsageType (..),++    -- ** WorkgroupStatus+    WorkgroupStatus (..),++    -- ** ConfigParameter+    ConfigParameter (ConfigParameter'),+    newConfigParameter,++    -- ** Endpoint+    Endpoint (Endpoint'),+    newEndpoint,++    -- ** EndpointAccess+    EndpointAccess (EndpointAccess'),+    newEndpointAccess,++    -- ** Namespace+    Namespace (Namespace'),+    newNamespace,++    -- ** NetworkInterface+    NetworkInterface (NetworkInterface'),+    newNetworkInterface,++    -- ** RecoveryPoint+    RecoveryPoint (RecoveryPoint'),+    newRecoveryPoint,++    -- ** ResourcePolicy+    ResourcePolicy (ResourcePolicy'),+    newResourcePolicy,++    -- ** Snapshot+    Snapshot (Snapshot'),+    newSnapshot,++    -- ** TableRestoreStatus+    TableRestoreStatus (TableRestoreStatus'),+    newTableRestoreStatus,++    -- ** Tag+    Tag (Tag'),+    newTag,++    -- ** UsageLimit+    UsageLimit (UsageLimit'),+    newUsageLimit,++    -- ** VpcEndpoint+    VpcEndpoint (VpcEndpoint'),+    newVpcEndpoint,++    -- ** VpcSecurityGroupMembership+    VpcSecurityGroupMembership (VpcSecurityGroupMembership'),+    newVpcSecurityGroupMembership,++    -- ** Workgroup+    Workgroup (Workgroup'),+    newWorkgroup,+  )+where++import Amazonka.RedshiftServerLess.ConvertRecoveryPointToSnapshot+import Amazonka.RedshiftServerLess.CreateEndpointAccess+import Amazonka.RedshiftServerLess.CreateNamespace+import Amazonka.RedshiftServerLess.CreateSnapshot+import Amazonka.RedshiftServerLess.CreateUsageLimit+import Amazonka.RedshiftServerLess.CreateWorkgroup+import Amazonka.RedshiftServerLess.DeleteEndpointAccess+import Amazonka.RedshiftServerLess.DeleteNamespace+import Amazonka.RedshiftServerLess.DeleteResourcePolicy+import Amazonka.RedshiftServerLess.DeleteSnapshot+import Amazonka.RedshiftServerLess.DeleteUsageLimit+import Amazonka.RedshiftServerLess.DeleteWorkgroup+import Amazonka.RedshiftServerLess.GetCredentials+import Amazonka.RedshiftServerLess.GetEndpointAccess+import Amazonka.RedshiftServerLess.GetNamespace+import Amazonka.RedshiftServerLess.GetRecoveryPoint+import Amazonka.RedshiftServerLess.GetResourcePolicy+import Amazonka.RedshiftServerLess.GetSnapshot+import Amazonka.RedshiftServerLess.GetTableRestoreStatus+import Amazonka.RedshiftServerLess.GetUsageLimit+import Amazonka.RedshiftServerLess.GetWorkgroup+import Amazonka.RedshiftServerLess.Lens+import Amazonka.RedshiftServerLess.ListEndpointAccess+import Amazonka.RedshiftServerLess.ListNamespaces+import Amazonka.RedshiftServerLess.ListRecoveryPoints+import Amazonka.RedshiftServerLess.ListSnapshots+import Amazonka.RedshiftServerLess.ListTableRestoreStatus+import Amazonka.RedshiftServerLess.ListTagsForResource+import Amazonka.RedshiftServerLess.ListUsageLimits+import Amazonka.RedshiftServerLess.ListWorkgroups+import Amazonka.RedshiftServerLess.PutResourcePolicy+import Amazonka.RedshiftServerLess.RestoreFromRecoveryPoint+import Amazonka.RedshiftServerLess.RestoreFromSnapshot+import Amazonka.RedshiftServerLess.RestoreTableFromSnapshot+import Amazonka.RedshiftServerLess.TagResource+import Amazonka.RedshiftServerLess.Types+import Amazonka.RedshiftServerLess.UntagResource+import Amazonka.RedshiftServerLess.UpdateEndpointAccess+import Amazonka.RedshiftServerLess.UpdateNamespace+import Amazonka.RedshiftServerLess.UpdateSnapshot+import Amazonka.RedshiftServerLess.UpdateUsageLimit+import Amazonka.RedshiftServerLess.UpdateWorkgroup+import Amazonka.RedshiftServerLess.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 'RedshiftServerLess'.++-- $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/RedshiftServerLess/ConvertRecoveryPointToSnapshot.hs view
@@ -0,0 +1,245 @@+{-# 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.RedshiftServerLess.ConvertRecoveryPointToSnapshot+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Converts a recovery point to a snapshot. For more information about+-- recovery points and snapshots, see+-- <https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-snapshots-recovery.html Working with snapshots and recovery points>.+module Amazonka.RedshiftServerLess.ConvertRecoveryPointToSnapshot+  ( -- * Creating a Request+    ConvertRecoveryPointToSnapshot (..),+    newConvertRecoveryPointToSnapshot,++    -- * Request Lenses+    convertRecoveryPointToSnapshot_retentionPeriod,+    convertRecoveryPointToSnapshot_tags,+    convertRecoveryPointToSnapshot_recoveryPointId,+    convertRecoveryPointToSnapshot_snapshotName,++    -- * Destructuring the Response+    ConvertRecoveryPointToSnapshotResponse (..),+    newConvertRecoveryPointToSnapshotResponse,++    -- * Response Lenses+    convertRecoveryPointToSnapshotResponse_snapshot,+    convertRecoveryPointToSnapshotResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newConvertRecoveryPointToSnapshot' smart constructor.+data ConvertRecoveryPointToSnapshot = ConvertRecoveryPointToSnapshot'+  { -- | How long to retain the snapshot.+    retentionPeriod :: Prelude.Maybe Prelude.Int,+    -- | An array of+    -- <https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html Tag objects>+    -- to associate with the created snapshot.+    tags :: Prelude.Maybe [Tag],+    -- | The unique identifier of the recovery point.+    recoveryPointId :: Prelude.Text,+    -- | The name of the snapshot.+    snapshotName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ConvertRecoveryPointToSnapshot' 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:+--+-- 'retentionPeriod', 'convertRecoveryPointToSnapshot_retentionPeriod' - How long to retain the snapshot.+--+-- 'tags', 'convertRecoveryPointToSnapshot_tags' - An array of+-- <https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html Tag objects>+-- to associate with the created snapshot.+--+-- 'recoveryPointId', 'convertRecoveryPointToSnapshot_recoveryPointId' - The unique identifier of the recovery point.+--+-- 'snapshotName', 'convertRecoveryPointToSnapshot_snapshotName' - The name of the snapshot.+newConvertRecoveryPointToSnapshot ::+  -- | 'recoveryPointId'+  Prelude.Text ->+  -- | 'snapshotName'+  Prelude.Text ->+  ConvertRecoveryPointToSnapshot+newConvertRecoveryPointToSnapshot+  pRecoveryPointId_+  pSnapshotName_ =+    ConvertRecoveryPointToSnapshot'+      { retentionPeriod =+          Prelude.Nothing,+        tags = Prelude.Nothing,+        recoveryPointId = pRecoveryPointId_,+        snapshotName = pSnapshotName_+      }++-- | How long to retain the snapshot.+convertRecoveryPointToSnapshot_retentionPeriod :: Lens.Lens' ConvertRecoveryPointToSnapshot (Prelude.Maybe Prelude.Int)+convertRecoveryPointToSnapshot_retentionPeriod = Lens.lens (\ConvertRecoveryPointToSnapshot' {retentionPeriod} -> retentionPeriod) (\s@ConvertRecoveryPointToSnapshot' {} a -> s {retentionPeriod = a} :: ConvertRecoveryPointToSnapshot)++-- | An array of+-- <https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html Tag objects>+-- to associate with the created snapshot.+convertRecoveryPointToSnapshot_tags :: Lens.Lens' ConvertRecoveryPointToSnapshot (Prelude.Maybe [Tag])+convertRecoveryPointToSnapshot_tags = Lens.lens (\ConvertRecoveryPointToSnapshot' {tags} -> tags) (\s@ConvertRecoveryPointToSnapshot' {} a -> s {tags = a} :: ConvertRecoveryPointToSnapshot) Prelude.. Lens.mapping Lens.coerced++-- | The unique identifier of the recovery point.+convertRecoveryPointToSnapshot_recoveryPointId :: Lens.Lens' ConvertRecoveryPointToSnapshot Prelude.Text+convertRecoveryPointToSnapshot_recoveryPointId = Lens.lens (\ConvertRecoveryPointToSnapshot' {recoveryPointId} -> recoveryPointId) (\s@ConvertRecoveryPointToSnapshot' {} a -> s {recoveryPointId = a} :: ConvertRecoveryPointToSnapshot)++-- | The name of the snapshot.+convertRecoveryPointToSnapshot_snapshotName :: Lens.Lens' ConvertRecoveryPointToSnapshot Prelude.Text+convertRecoveryPointToSnapshot_snapshotName = Lens.lens (\ConvertRecoveryPointToSnapshot' {snapshotName} -> snapshotName) (\s@ConvertRecoveryPointToSnapshot' {} a -> s {snapshotName = a} :: ConvertRecoveryPointToSnapshot)++instance+  Core.AWSRequest+    ConvertRecoveryPointToSnapshot+  where+  type+    AWSResponse ConvertRecoveryPointToSnapshot =+      ConvertRecoveryPointToSnapshotResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ConvertRecoveryPointToSnapshotResponse'+            Prelude.<$> (x Data..?> "snapshot")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    ConvertRecoveryPointToSnapshot+  where+  hashWithSalt+    _salt+    ConvertRecoveryPointToSnapshot' {..} =+      _salt+        `Prelude.hashWithSalt` retentionPeriod+        `Prelude.hashWithSalt` tags+        `Prelude.hashWithSalt` recoveryPointId+        `Prelude.hashWithSalt` snapshotName++instance+  Prelude.NFData+    ConvertRecoveryPointToSnapshot+  where+  rnf ConvertRecoveryPointToSnapshot' {..} =+    Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf recoveryPointId+      `Prelude.seq` Prelude.rnf snapshotName++instance+  Data.ToHeaders+    ConvertRecoveryPointToSnapshot+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.ConvertRecoveryPointToSnapshot" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ConvertRecoveryPointToSnapshot where+  toJSON ConvertRecoveryPointToSnapshot' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("retentionPeriod" Data..=)+              Prelude.<$> retentionPeriod,+            ("tags" Data..=) Prelude.<$> tags,+            Prelude.Just+              ("recoveryPointId" Data..= recoveryPointId),+            Prelude.Just ("snapshotName" Data..= snapshotName)+          ]+      )++instance Data.ToPath ConvertRecoveryPointToSnapshot where+  toPath = Prelude.const "/"++instance Data.ToQuery ConvertRecoveryPointToSnapshot where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newConvertRecoveryPointToSnapshotResponse' smart constructor.+data ConvertRecoveryPointToSnapshotResponse = ConvertRecoveryPointToSnapshotResponse'+  { -- | The snapshot converted from the recovery point.+    snapshot :: Prelude.Maybe Snapshot,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ConvertRecoveryPointToSnapshotResponse' 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:+--+-- 'snapshot', 'convertRecoveryPointToSnapshotResponse_snapshot' - The snapshot converted from the recovery point.+--+-- 'httpStatus', 'convertRecoveryPointToSnapshotResponse_httpStatus' - The response's http status code.+newConvertRecoveryPointToSnapshotResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ConvertRecoveryPointToSnapshotResponse+newConvertRecoveryPointToSnapshotResponse+  pHttpStatus_ =+    ConvertRecoveryPointToSnapshotResponse'+      { snapshot =+          Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The snapshot converted from the recovery point.+convertRecoveryPointToSnapshotResponse_snapshot :: Lens.Lens' ConvertRecoveryPointToSnapshotResponse (Prelude.Maybe Snapshot)+convertRecoveryPointToSnapshotResponse_snapshot = Lens.lens (\ConvertRecoveryPointToSnapshotResponse' {snapshot} -> snapshot) (\s@ConvertRecoveryPointToSnapshotResponse' {} a -> s {snapshot = a} :: ConvertRecoveryPointToSnapshotResponse)++-- | The response's http status code.+convertRecoveryPointToSnapshotResponse_httpStatus :: Lens.Lens' ConvertRecoveryPointToSnapshotResponse Prelude.Int+convertRecoveryPointToSnapshotResponse_httpStatus = Lens.lens (\ConvertRecoveryPointToSnapshotResponse' {httpStatus} -> httpStatus) (\s@ConvertRecoveryPointToSnapshotResponse' {} a -> s {httpStatus = a} :: ConvertRecoveryPointToSnapshotResponse)++instance+  Prelude.NFData+    ConvertRecoveryPointToSnapshotResponse+  where+  rnf ConvertRecoveryPointToSnapshotResponse' {..} =+    Prelude.rnf snapshot+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/CreateEndpointAccess.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.RedshiftServerLess.CreateEndpointAccess+-- 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 an Amazon Redshift Serverless managed VPC endpoint.+module Amazonka.RedshiftServerLess.CreateEndpointAccess+  ( -- * Creating a Request+    CreateEndpointAccess (..),+    newCreateEndpointAccess,++    -- * Request Lenses+    createEndpointAccess_vpcSecurityGroupIds,+    createEndpointAccess_endpointName,+    createEndpointAccess_subnetIds,+    createEndpointAccess_workgroupName,++    -- * Destructuring the Response+    CreateEndpointAccessResponse (..),+    newCreateEndpointAccessResponse,++    -- * Response Lenses+    createEndpointAccessResponse_endpoint,+    createEndpointAccessResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateEndpointAccess' smart constructor.+data CreateEndpointAccess = CreateEndpointAccess'+  { -- | The unique identifiers of the security group that defines the ports,+    -- protocols, and sources for inbound traffic that you are authorizing into+    -- your endpoint.+    vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],+    -- | The name of the VPC endpoint. An endpoint name must contain 1-30+    -- characters. Valid characters are A-Z, a-z, 0-9, and hyphen(-). The first+    -- character must be a letter. The name can\'t contain two consecutive+    -- hyphens or end with a hyphen.+    endpointName :: Prelude.Text,+    -- | The unique identifers of subnets from which Amazon Redshift Serverless+    -- chooses one to deploy a VPC endpoint.+    subnetIds :: [Prelude.Text],+    -- | The name of the workgroup to associate with the VPC endpoint.+    workgroupName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateEndpointAccess' 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:+--+-- 'vpcSecurityGroupIds', 'createEndpointAccess_vpcSecurityGroupIds' - The unique identifiers of the security group that defines the ports,+-- protocols, and sources for inbound traffic that you are authorizing into+-- your endpoint.+--+-- 'endpointName', 'createEndpointAccess_endpointName' - The name of the VPC endpoint. An endpoint name must contain 1-30+-- characters. Valid characters are A-Z, a-z, 0-9, and hyphen(-). The first+-- character must be a letter. The name can\'t contain two consecutive+-- hyphens or end with a hyphen.+--+-- 'subnetIds', 'createEndpointAccess_subnetIds' - The unique identifers of subnets from which Amazon Redshift Serverless+-- chooses one to deploy a VPC endpoint.+--+-- 'workgroupName', 'createEndpointAccess_workgroupName' - The name of the workgroup to associate with the VPC endpoint.+newCreateEndpointAccess ::+  -- | 'endpointName'+  Prelude.Text ->+  -- | 'workgroupName'+  Prelude.Text ->+  CreateEndpointAccess+newCreateEndpointAccess+  pEndpointName_+  pWorkgroupName_ =+    CreateEndpointAccess'+      { vpcSecurityGroupIds =+          Prelude.Nothing,+        endpointName = pEndpointName_,+        subnetIds = Prelude.mempty,+        workgroupName = pWorkgroupName_+      }++-- | The unique identifiers of the security group that defines the ports,+-- protocols, and sources for inbound traffic that you are authorizing into+-- your endpoint.+createEndpointAccess_vpcSecurityGroupIds :: Lens.Lens' CreateEndpointAccess (Prelude.Maybe [Prelude.Text])+createEndpointAccess_vpcSecurityGroupIds = Lens.lens (\CreateEndpointAccess' {vpcSecurityGroupIds} -> vpcSecurityGroupIds) (\s@CreateEndpointAccess' {} a -> s {vpcSecurityGroupIds = a} :: CreateEndpointAccess) Prelude.. Lens.mapping Lens.coerced++-- | The name of the VPC endpoint. An endpoint name must contain 1-30+-- characters. Valid characters are A-Z, a-z, 0-9, and hyphen(-). The first+-- character must be a letter. The name can\'t contain two consecutive+-- hyphens or end with a hyphen.+createEndpointAccess_endpointName :: Lens.Lens' CreateEndpointAccess Prelude.Text+createEndpointAccess_endpointName = Lens.lens (\CreateEndpointAccess' {endpointName} -> endpointName) (\s@CreateEndpointAccess' {} a -> s {endpointName = a} :: CreateEndpointAccess)++-- | The unique identifers of subnets from which Amazon Redshift Serverless+-- chooses one to deploy a VPC endpoint.+createEndpointAccess_subnetIds :: Lens.Lens' CreateEndpointAccess [Prelude.Text]+createEndpointAccess_subnetIds = Lens.lens (\CreateEndpointAccess' {subnetIds} -> subnetIds) (\s@CreateEndpointAccess' {} a -> s {subnetIds = a} :: CreateEndpointAccess) Prelude.. Lens.coerced++-- | The name of the workgroup to associate with the VPC endpoint.+createEndpointAccess_workgroupName :: Lens.Lens' CreateEndpointAccess Prelude.Text+createEndpointAccess_workgroupName = Lens.lens (\CreateEndpointAccess' {workgroupName} -> workgroupName) (\s@CreateEndpointAccess' {} a -> s {workgroupName = a} :: CreateEndpointAccess)++instance Core.AWSRequest CreateEndpointAccess where+  type+    AWSResponse CreateEndpointAccess =+      CreateEndpointAccessResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateEndpointAccessResponse'+            Prelude.<$> (x Data..?> "endpoint")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateEndpointAccess where+  hashWithSalt _salt CreateEndpointAccess' {..} =+    _salt+      `Prelude.hashWithSalt` vpcSecurityGroupIds+      `Prelude.hashWithSalt` endpointName+      `Prelude.hashWithSalt` subnetIds+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData CreateEndpointAccess where+  rnf CreateEndpointAccess' {..} =+    Prelude.rnf vpcSecurityGroupIds+      `Prelude.seq` Prelude.rnf endpointName+      `Prelude.seq` Prelude.rnf subnetIds+      `Prelude.seq` Prelude.rnf workgroupName++instance Data.ToHeaders CreateEndpointAccess where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.CreateEndpointAccess" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateEndpointAccess where+  toJSON CreateEndpointAccess' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("vpcSecurityGroupIds" Data..=)+              Prelude.<$> vpcSecurityGroupIds,+            Prelude.Just ("endpointName" Data..= endpointName),+            Prelude.Just ("subnetIds" Data..= subnetIds),+            Prelude.Just+              ("workgroupName" Data..= workgroupName)+          ]+      )++instance Data.ToPath CreateEndpointAccess where+  toPath = Prelude.const "/"++instance Data.ToQuery CreateEndpointAccess where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateEndpointAccessResponse' smart constructor.+data CreateEndpointAccessResponse = CreateEndpointAccessResponse'+  { -- | The created VPC endpoint.+    endpoint :: Prelude.Maybe EndpointAccess,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateEndpointAccessResponse' 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:+--+-- 'endpoint', 'createEndpointAccessResponse_endpoint' - The created VPC endpoint.+--+-- 'httpStatus', 'createEndpointAccessResponse_httpStatus' - The response's http status code.+newCreateEndpointAccessResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateEndpointAccessResponse+newCreateEndpointAccessResponse pHttpStatus_ =+  CreateEndpointAccessResponse'+    { endpoint =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The created VPC endpoint.+createEndpointAccessResponse_endpoint :: Lens.Lens' CreateEndpointAccessResponse (Prelude.Maybe EndpointAccess)+createEndpointAccessResponse_endpoint = Lens.lens (\CreateEndpointAccessResponse' {endpoint} -> endpoint) (\s@CreateEndpointAccessResponse' {} a -> s {endpoint = a} :: CreateEndpointAccessResponse)++-- | The response's http status code.+createEndpointAccessResponse_httpStatus :: Lens.Lens' CreateEndpointAccessResponse Prelude.Int+createEndpointAccessResponse_httpStatus = Lens.lens (\CreateEndpointAccessResponse' {httpStatus} -> httpStatus) (\s@CreateEndpointAccessResponse' {} a -> s {httpStatus = a} :: CreateEndpointAccessResponse)++instance Prelude.NFData CreateEndpointAccessResponse where+  rnf CreateEndpointAccessResponse' {..} =+    Prelude.rnf endpoint+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/CreateNamespace.hs view
@@ -0,0 +1,296 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.CreateNamespace+-- 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 namespace in Amazon Redshift Serverless.+module Amazonka.RedshiftServerLess.CreateNamespace+  ( -- * Creating a Request+    CreateNamespace (..),+    newCreateNamespace,++    -- * Request Lenses+    createNamespace_adminUserPassword,+    createNamespace_adminUsername,+    createNamespace_dbName,+    createNamespace_defaultIamRoleArn,+    createNamespace_iamRoles,+    createNamespace_kmsKeyId,+    createNamespace_logExports,+    createNamespace_tags,+    createNamespace_namespaceName,++    -- * Destructuring the Response+    CreateNamespaceResponse (..),+    newCreateNamespaceResponse,++    -- * Response Lenses+    createNamespaceResponse_namespace,+    createNamespaceResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateNamespace' smart constructor.+data CreateNamespace = CreateNamespace'+  { -- | The password of the administrator for the first database created in the+    -- namespace.+    adminUserPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The username of the administrator for the first database created in the+    -- namespace.+    adminUsername :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The name of the first database created in the namespace.+    dbName :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the IAM role to set as a default in+    -- the namespace.+    defaultIamRoleArn :: Prelude.Maybe Prelude.Text,+    -- | A list of IAM roles to associate with the namespace.+    iamRoles :: Prelude.Maybe [Prelude.Text],+    -- | The ID of the Amazon Web Services Key Management Service key used to+    -- encrypt your data.+    kmsKeyId :: Prelude.Maybe Prelude.Text,+    -- | The types of logs the namespace can export. Available export types are+    -- @userlog@, @connectionlog@, and @useractivitylog@.+    logExports :: Prelude.Maybe [LogExport],+    -- | A list of tag instances.+    tags :: Prelude.Maybe [Tag],+    -- | The name of the namespace.+    namespaceName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateNamespace' 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', 'createNamespace_adminUserPassword' - The password of the administrator for the first database created in the+-- namespace.+--+-- 'adminUsername', 'createNamespace_adminUsername' - The username of the administrator for the first database created in the+-- namespace.+--+-- 'dbName', 'createNamespace_dbName' - The name of the first database created in the namespace.+--+-- 'defaultIamRoleArn', 'createNamespace_defaultIamRoleArn' - The Amazon Resource Name (ARN) of the IAM role to set as a default in+-- the namespace.+--+-- 'iamRoles', 'createNamespace_iamRoles' - A list of IAM roles to associate with the namespace.+--+-- 'kmsKeyId', 'createNamespace_kmsKeyId' - The ID of the Amazon Web Services Key Management Service key used to+-- encrypt your data.+--+-- 'logExports', 'createNamespace_logExports' - The types of logs the namespace can export. Available export types are+-- @userlog@, @connectionlog@, and @useractivitylog@.+--+-- 'tags', 'createNamespace_tags' - A list of tag instances.+--+-- 'namespaceName', 'createNamespace_namespaceName' - The name of the namespace.+newCreateNamespace ::+  -- | 'namespaceName'+  Prelude.Text ->+  CreateNamespace+newCreateNamespace pNamespaceName_ =+  CreateNamespace'+    { adminUserPassword =+        Prelude.Nothing,+      adminUsername = Prelude.Nothing,+      dbName = Prelude.Nothing,+      defaultIamRoleArn = Prelude.Nothing,+      iamRoles = Prelude.Nothing,+      kmsKeyId = Prelude.Nothing,+      logExports = Prelude.Nothing,+      tags = Prelude.Nothing,+      namespaceName = pNamespaceName_+    }++-- | The password of the administrator for the first database created in the+-- namespace.+createNamespace_adminUserPassword :: Lens.Lens' CreateNamespace (Prelude.Maybe Prelude.Text)+createNamespace_adminUserPassword = Lens.lens (\CreateNamespace' {adminUserPassword} -> adminUserPassword) (\s@CreateNamespace' {} a -> s {adminUserPassword = a} :: CreateNamespace) Prelude.. Lens.mapping Data._Sensitive++-- | The username of the administrator for the first database created in the+-- namespace.+createNamespace_adminUsername :: Lens.Lens' CreateNamespace (Prelude.Maybe Prelude.Text)+createNamespace_adminUsername = Lens.lens (\CreateNamespace' {adminUsername} -> adminUsername) (\s@CreateNamespace' {} a -> s {adminUsername = a} :: CreateNamespace) Prelude.. Lens.mapping Data._Sensitive++-- | The name of the first database created in the namespace.+createNamespace_dbName :: Lens.Lens' CreateNamespace (Prelude.Maybe Prelude.Text)+createNamespace_dbName = Lens.lens (\CreateNamespace' {dbName} -> dbName) (\s@CreateNamespace' {} a -> s {dbName = a} :: CreateNamespace)++-- | The Amazon Resource Name (ARN) of the IAM role to set as a default in+-- the namespace.+createNamespace_defaultIamRoleArn :: Lens.Lens' CreateNamespace (Prelude.Maybe Prelude.Text)+createNamespace_defaultIamRoleArn = Lens.lens (\CreateNamespace' {defaultIamRoleArn} -> defaultIamRoleArn) (\s@CreateNamespace' {} a -> s {defaultIamRoleArn = a} :: CreateNamespace)++-- | A list of IAM roles to associate with the namespace.+createNamespace_iamRoles :: Lens.Lens' CreateNamespace (Prelude.Maybe [Prelude.Text])+createNamespace_iamRoles = Lens.lens (\CreateNamespace' {iamRoles} -> iamRoles) (\s@CreateNamespace' {} a -> s {iamRoles = a} :: CreateNamespace) Prelude.. Lens.mapping Lens.coerced++-- | The ID of the Amazon Web Services Key Management Service key used to+-- encrypt your data.+createNamespace_kmsKeyId :: Lens.Lens' CreateNamespace (Prelude.Maybe Prelude.Text)+createNamespace_kmsKeyId = Lens.lens (\CreateNamespace' {kmsKeyId} -> kmsKeyId) (\s@CreateNamespace' {} a -> s {kmsKeyId = a} :: CreateNamespace)++-- | The types of logs the namespace can export. Available export types are+-- @userlog@, @connectionlog@, and @useractivitylog@.+createNamespace_logExports :: Lens.Lens' CreateNamespace (Prelude.Maybe [LogExport])+createNamespace_logExports = Lens.lens (\CreateNamespace' {logExports} -> logExports) (\s@CreateNamespace' {} a -> s {logExports = a} :: CreateNamespace) Prelude.. Lens.mapping Lens.coerced++-- | A list of tag instances.+createNamespace_tags :: Lens.Lens' CreateNamespace (Prelude.Maybe [Tag])+createNamespace_tags = Lens.lens (\CreateNamespace' {tags} -> tags) (\s@CreateNamespace' {} a -> s {tags = a} :: CreateNamespace) Prelude.. Lens.mapping Lens.coerced++-- | The name of the namespace.+createNamespace_namespaceName :: Lens.Lens' CreateNamespace Prelude.Text+createNamespace_namespaceName = Lens.lens (\CreateNamespace' {namespaceName} -> namespaceName) (\s@CreateNamespace' {} a -> s {namespaceName = a} :: CreateNamespace)++instance Core.AWSRequest CreateNamespace where+  type+    AWSResponse CreateNamespace =+      CreateNamespaceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateNamespaceResponse'+            Prelude.<$> (x Data..?> "namespace")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateNamespace where+  hashWithSalt _salt CreateNamespace' {..} =+    _salt+      `Prelude.hashWithSalt` adminUserPassword+      `Prelude.hashWithSalt` adminUsername+      `Prelude.hashWithSalt` dbName+      `Prelude.hashWithSalt` defaultIamRoleArn+      `Prelude.hashWithSalt` iamRoles+      `Prelude.hashWithSalt` kmsKeyId+      `Prelude.hashWithSalt` logExports+      `Prelude.hashWithSalt` tags+      `Prelude.hashWithSalt` namespaceName++instance Prelude.NFData CreateNamespace where+  rnf CreateNamespace' {..} =+    Prelude.rnf adminUserPassword+      `Prelude.seq` Prelude.rnf adminUsername+      `Prelude.seq` Prelude.rnf dbName+      `Prelude.seq` Prelude.rnf defaultIamRoleArn+      `Prelude.seq` Prelude.rnf iamRoles+      `Prelude.seq` Prelude.rnf kmsKeyId+      `Prelude.seq` Prelude.rnf logExports+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf namespaceName++instance Data.ToHeaders CreateNamespace where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.CreateNamespace" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateNamespace where+  toJSON CreateNamespace' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("adminUserPassword" Data..=)+              Prelude.<$> adminUserPassword,+            ("adminUsername" Data..=) Prelude.<$> adminUsername,+            ("dbName" Data..=) Prelude.<$> dbName,+            ("defaultIamRoleArn" Data..=)+              Prelude.<$> defaultIamRoleArn,+            ("iamRoles" Data..=) Prelude.<$> iamRoles,+            ("kmsKeyId" Data..=) Prelude.<$> kmsKeyId,+            ("logExports" Data..=) Prelude.<$> logExports,+            ("tags" Data..=) Prelude.<$> tags,+            Prelude.Just+              ("namespaceName" Data..= namespaceName)+          ]+      )++instance Data.ToPath CreateNamespace where+  toPath = Prelude.const "/"++instance Data.ToQuery CreateNamespace where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateNamespaceResponse' smart constructor.+data CreateNamespaceResponse = CreateNamespaceResponse'+  { -- | The created namespace object.+    namespace :: Prelude.Maybe Namespace,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateNamespaceResponse' 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:+--+-- 'namespace', 'createNamespaceResponse_namespace' - The created namespace object.+--+-- 'httpStatus', 'createNamespaceResponse_httpStatus' - The response's http status code.+newCreateNamespaceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateNamespaceResponse+newCreateNamespaceResponse pHttpStatus_ =+  CreateNamespaceResponse'+    { namespace =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The created namespace object.+createNamespaceResponse_namespace :: Lens.Lens' CreateNamespaceResponse (Prelude.Maybe Namespace)+createNamespaceResponse_namespace = Lens.lens (\CreateNamespaceResponse' {namespace} -> namespace) (\s@CreateNamespaceResponse' {} a -> s {namespace = a} :: CreateNamespaceResponse)++-- | The response's http status code.+createNamespaceResponse_httpStatus :: Lens.Lens' CreateNamespaceResponse Prelude.Int+createNamespaceResponse_httpStatus = Lens.lens (\CreateNamespaceResponse' {httpStatus} -> httpStatus) (\s@CreateNamespaceResponse' {} a -> s {httpStatus = a} :: CreateNamespaceResponse)++instance Prelude.NFData CreateNamespaceResponse where+  rnf CreateNamespaceResponse' {..} =+    Prelude.rnf namespace+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/CreateSnapshot.hs view
@@ -0,0 +1,222 @@+{-# 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.RedshiftServerLess.CreateSnapshot+-- 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 all databases in a namespace. For more information+-- about snapshots, see+-- <https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-snapshots-recovery.html Working with snapshots and recovery points>.+module Amazonka.RedshiftServerLess.CreateSnapshot+  ( -- * Creating a Request+    CreateSnapshot (..),+    newCreateSnapshot,++    -- * Request Lenses+    createSnapshot_retentionPeriod,+    createSnapshot_tags,+    createSnapshot_namespaceName,+    createSnapshot_snapshotName,++    -- * Destructuring the Response+    CreateSnapshotResponse (..),+    newCreateSnapshotResponse,++    -- * Response Lenses+    createSnapshotResponse_snapshot,+    createSnapshotResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateSnapshot' smart constructor.+data CreateSnapshot = CreateSnapshot'+  { -- | How long to retain the created snapshot.+    retentionPeriod :: Prelude.Maybe Prelude.Int,+    -- | An array of+    -- <https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html Tag objects>+    -- to associate with the snapshot.+    tags :: Prelude.Maybe [Tag],+    -- | The namespace to create a snapshot for.+    namespaceName :: Prelude.Text,+    -- | The name of the snapshot.+    snapshotName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateSnapshot' 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:+--+-- 'retentionPeriod', 'createSnapshot_retentionPeriod' - How long to retain the created snapshot.+--+-- 'tags', 'createSnapshot_tags' - An array of+-- <https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html Tag objects>+-- to associate with the snapshot.+--+-- 'namespaceName', 'createSnapshot_namespaceName' - The namespace to create a snapshot for.+--+-- 'snapshotName', 'createSnapshot_snapshotName' - The name of the snapshot.+newCreateSnapshot ::+  -- | 'namespaceName'+  Prelude.Text ->+  -- | 'snapshotName'+  Prelude.Text ->+  CreateSnapshot+newCreateSnapshot pNamespaceName_ pSnapshotName_ =+  CreateSnapshot'+    { retentionPeriod = Prelude.Nothing,+      tags = Prelude.Nothing,+      namespaceName = pNamespaceName_,+      snapshotName = pSnapshotName_+    }++-- | How long to retain the created snapshot.+createSnapshot_retentionPeriod :: Lens.Lens' CreateSnapshot (Prelude.Maybe Prelude.Int)+createSnapshot_retentionPeriod = Lens.lens (\CreateSnapshot' {retentionPeriod} -> retentionPeriod) (\s@CreateSnapshot' {} a -> s {retentionPeriod = a} :: CreateSnapshot)++-- | An array of+-- <https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html Tag objects>+-- to associate with the snapshot.+createSnapshot_tags :: Lens.Lens' CreateSnapshot (Prelude.Maybe [Tag])+createSnapshot_tags = Lens.lens (\CreateSnapshot' {tags} -> tags) (\s@CreateSnapshot' {} a -> s {tags = a} :: CreateSnapshot) Prelude.. Lens.mapping Lens.coerced++-- | The namespace to create a snapshot for.+createSnapshot_namespaceName :: Lens.Lens' CreateSnapshot Prelude.Text+createSnapshot_namespaceName = Lens.lens (\CreateSnapshot' {namespaceName} -> namespaceName) (\s@CreateSnapshot' {} a -> s {namespaceName = a} :: CreateSnapshot)++-- | The name of the snapshot.+createSnapshot_snapshotName :: Lens.Lens' CreateSnapshot Prelude.Text+createSnapshot_snapshotName = Lens.lens (\CreateSnapshot' {snapshotName} -> snapshotName) (\s@CreateSnapshot' {} a -> s {snapshotName = a} :: CreateSnapshot)++instance Core.AWSRequest CreateSnapshot where+  type+    AWSResponse CreateSnapshot =+      CreateSnapshotResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateSnapshotResponse'+            Prelude.<$> (x Data..?> "snapshot")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateSnapshot where+  hashWithSalt _salt CreateSnapshot' {..} =+    _salt+      `Prelude.hashWithSalt` retentionPeriod+      `Prelude.hashWithSalt` tags+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` snapshotName++instance Prelude.NFData CreateSnapshot where+  rnf CreateSnapshot' {..} =+    Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf snapshotName++instance Data.ToHeaders CreateSnapshot where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.CreateSnapshot" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateSnapshot where+  toJSON CreateSnapshot' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("retentionPeriod" Data..=)+              Prelude.<$> retentionPeriod,+            ("tags" Data..=) Prelude.<$> tags,+            Prelude.Just ("namespaceName" Data..= namespaceName),+            Prelude.Just ("snapshotName" Data..= snapshotName)+          ]+      )++instance Data.ToPath CreateSnapshot where+  toPath = Prelude.const "/"++instance Data.ToQuery CreateSnapshot where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateSnapshotResponse' smart constructor.+data CreateSnapshotResponse = CreateSnapshotResponse'+  { -- | The created snapshot object.+    snapshot :: Prelude.Maybe Snapshot,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateSnapshotResponse' 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:+--+-- 'snapshot', 'createSnapshotResponse_snapshot' - The created snapshot object.+--+-- 'httpStatus', 'createSnapshotResponse_httpStatus' - The response's http status code.+newCreateSnapshotResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateSnapshotResponse+newCreateSnapshotResponse pHttpStatus_ =+  CreateSnapshotResponse'+    { snapshot = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The created snapshot object.+createSnapshotResponse_snapshot :: Lens.Lens' CreateSnapshotResponse (Prelude.Maybe Snapshot)+createSnapshotResponse_snapshot = Lens.lens (\CreateSnapshotResponse' {snapshot} -> snapshot) (\s@CreateSnapshotResponse' {} a -> s {snapshot = a} :: CreateSnapshotResponse)++-- | The response's http status code.+createSnapshotResponse_httpStatus :: Lens.Lens' CreateSnapshotResponse Prelude.Int+createSnapshotResponse_httpStatus = Lens.lens (\CreateSnapshotResponse' {httpStatus} -> httpStatus) (\s@CreateSnapshotResponse' {} a -> s {httpStatus = a} :: CreateSnapshotResponse)++instance Prelude.NFData CreateSnapshotResponse where+  rnf CreateSnapshotResponse' {..} =+    Prelude.rnf snapshot+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/CreateUsageLimit.hs view
@@ -0,0 +1,255 @@+{-# 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.RedshiftServerLess.CreateUsageLimit+-- 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 usage limit for a specified Amazon Redshift Serverless usage+-- type. The usage limit is identified by the returned usage limit+-- identifier.+module Amazonka.RedshiftServerLess.CreateUsageLimit+  ( -- * Creating a Request+    CreateUsageLimit (..),+    newCreateUsageLimit,++    -- * Request Lenses+    createUsageLimit_breachAction,+    createUsageLimit_period,+    createUsageLimit_amount,+    createUsageLimit_resourceArn,+    createUsageLimit_usageType,++    -- * Destructuring the Response+    CreateUsageLimitResponse (..),+    newCreateUsageLimitResponse,++    -- * Response Lenses+    createUsageLimitResponse_usageLimit,+    createUsageLimitResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateUsageLimit' smart constructor.+data CreateUsageLimit = CreateUsageLimit'+  { -- | The action that Amazon Redshift Serverless takes when the limit is+    -- reached. The default is log.+    breachAction :: Prelude.Maybe UsageLimitBreachAction,+    -- | The time period that the amount applies to. A weekly period begins on+    -- Sunday. The default is monthly.+    period :: Prelude.Maybe UsageLimitPeriod,+    -- | The limit amount. If time-based, this amount is in Redshift Processing+    -- Units (RPU) consumed per hour. If data-based, this amount is in+    -- terabytes (TB) of data transferred between Regions in cross-account+    -- sharing. The value must be a positive number.+    amount :: Prelude.Integer,+    -- | The Amazon Resource Name (ARN) of the Amazon Redshift Serverless+    -- resource to create the usage limit for.+    resourceArn :: Prelude.Text,+    -- | The type of Amazon Redshift Serverless usage to create a usage limit+    -- for.+    usageType :: UsageLimitUsageType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateUsageLimit' 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:+--+-- 'breachAction', 'createUsageLimit_breachAction' - The action that Amazon Redshift Serverless takes when the limit is+-- reached. The default is log.+--+-- 'period', 'createUsageLimit_period' - The time period that the amount applies to. A weekly period begins on+-- Sunday. The default is monthly.+--+-- 'amount', 'createUsageLimit_amount' - The limit amount. If time-based, this amount is in Redshift Processing+-- Units (RPU) consumed per hour. If data-based, this amount is in+-- terabytes (TB) of data transferred between Regions in cross-account+-- sharing. The value must be a positive number.+--+-- 'resourceArn', 'createUsageLimit_resourceArn' - The Amazon Resource Name (ARN) of the Amazon Redshift Serverless+-- resource to create the usage limit for.+--+-- 'usageType', 'createUsageLimit_usageType' - The type of Amazon Redshift Serverless usage to create a usage limit+-- for.+newCreateUsageLimit ::+  -- | 'amount'+  Prelude.Integer ->+  -- | 'resourceArn'+  Prelude.Text ->+  -- | 'usageType'+  UsageLimitUsageType ->+  CreateUsageLimit+newCreateUsageLimit+  pAmount_+  pResourceArn_+  pUsageType_ =+    CreateUsageLimit'+      { breachAction = Prelude.Nothing,+        period = Prelude.Nothing,+        amount = pAmount_,+        resourceArn = pResourceArn_,+        usageType = pUsageType_+      }++-- | The action that Amazon Redshift Serverless takes when the limit is+-- reached. The default is log.+createUsageLimit_breachAction :: Lens.Lens' CreateUsageLimit (Prelude.Maybe UsageLimitBreachAction)+createUsageLimit_breachAction = Lens.lens (\CreateUsageLimit' {breachAction} -> breachAction) (\s@CreateUsageLimit' {} a -> s {breachAction = a} :: CreateUsageLimit)++-- | The time period that the amount applies to. A weekly period begins on+-- Sunday. The default is monthly.+createUsageLimit_period :: Lens.Lens' CreateUsageLimit (Prelude.Maybe UsageLimitPeriod)+createUsageLimit_period = Lens.lens (\CreateUsageLimit' {period} -> period) (\s@CreateUsageLimit' {} a -> s {period = a} :: CreateUsageLimit)++-- | The limit amount. If time-based, this amount is in Redshift Processing+-- Units (RPU) consumed per hour. If data-based, this amount is in+-- terabytes (TB) of data transferred between Regions in cross-account+-- sharing. The value must be a positive number.+createUsageLimit_amount :: Lens.Lens' CreateUsageLimit Prelude.Integer+createUsageLimit_amount = Lens.lens (\CreateUsageLimit' {amount} -> amount) (\s@CreateUsageLimit' {} a -> s {amount = a} :: CreateUsageLimit)++-- | The Amazon Resource Name (ARN) of the Amazon Redshift Serverless+-- resource to create the usage limit for.+createUsageLimit_resourceArn :: Lens.Lens' CreateUsageLimit Prelude.Text+createUsageLimit_resourceArn = Lens.lens (\CreateUsageLimit' {resourceArn} -> resourceArn) (\s@CreateUsageLimit' {} a -> s {resourceArn = a} :: CreateUsageLimit)++-- | The type of Amazon Redshift Serverless usage to create a usage limit+-- for.+createUsageLimit_usageType :: Lens.Lens' CreateUsageLimit UsageLimitUsageType+createUsageLimit_usageType = Lens.lens (\CreateUsageLimit' {usageType} -> usageType) (\s@CreateUsageLimit' {} a -> s {usageType = a} :: CreateUsageLimit)++instance Core.AWSRequest CreateUsageLimit where+  type+    AWSResponse CreateUsageLimit =+      CreateUsageLimitResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateUsageLimitResponse'+            Prelude.<$> (x Data..?> "usageLimit")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateUsageLimit where+  hashWithSalt _salt CreateUsageLimit' {..} =+    _salt+      `Prelude.hashWithSalt` breachAction+      `Prelude.hashWithSalt` period+      `Prelude.hashWithSalt` amount+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` usageType++instance Prelude.NFData CreateUsageLimit where+  rnf CreateUsageLimit' {..} =+    Prelude.rnf breachAction+      `Prelude.seq` Prelude.rnf period+      `Prelude.seq` Prelude.rnf amount+      `Prelude.seq` Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf usageType++instance Data.ToHeaders CreateUsageLimit where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.CreateUsageLimit" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateUsageLimit where+  toJSON CreateUsageLimit' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("breachAction" Data..=) Prelude.<$> breachAction,+            ("period" Data..=) Prelude.<$> period,+            Prelude.Just ("amount" Data..= amount),+            Prelude.Just ("resourceArn" Data..= resourceArn),+            Prelude.Just ("usageType" Data..= usageType)+          ]+      )++instance Data.ToPath CreateUsageLimit where+  toPath = Prelude.const "/"++instance Data.ToQuery CreateUsageLimit where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateUsageLimitResponse' smart constructor.+data CreateUsageLimitResponse = CreateUsageLimitResponse'+  { -- | The returned usage limit object.+    usageLimit :: Prelude.Maybe UsageLimit,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateUsageLimitResponse' 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:+--+-- 'usageLimit', 'createUsageLimitResponse_usageLimit' - The returned usage limit object.+--+-- 'httpStatus', 'createUsageLimitResponse_httpStatus' - The response's http status code.+newCreateUsageLimitResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateUsageLimitResponse+newCreateUsageLimitResponse pHttpStatus_ =+  CreateUsageLimitResponse'+    { usageLimit =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The returned usage limit object.+createUsageLimitResponse_usageLimit :: Lens.Lens' CreateUsageLimitResponse (Prelude.Maybe UsageLimit)+createUsageLimitResponse_usageLimit = Lens.lens (\CreateUsageLimitResponse' {usageLimit} -> usageLimit) (\s@CreateUsageLimitResponse' {} a -> s {usageLimit = a} :: CreateUsageLimitResponse)++-- | The response's http status code.+createUsageLimitResponse_httpStatus :: Lens.Lens' CreateUsageLimitResponse Prelude.Int+createUsageLimitResponse_httpStatus = Lens.lens (\CreateUsageLimitResponse' {httpStatus} -> httpStatus) (\s@CreateUsageLimitResponse' {} a -> s {httpStatus = a} :: CreateUsageLimitResponse)++instance Prelude.NFData CreateUsageLimitResponse where+  rnf CreateUsageLimitResponse' {..} =+    Prelude.rnf usageLimit+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/CreateWorkgroup.hs view
@@ -0,0 +1,318 @@+{-# 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.RedshiftServerLess.CreateWorkgroup+-- 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 an workgroup in Amazon Redshift Serverless.+module Amazonka.RedshiftServerLess.CreateWorkgroup+  ( -- * Creating a Request+    CreateWorkgroup (..),+    newCreateWorkgroup,++    -- * Request Lenses+    createWorkgroup_baseCapacity,+    createWorkgroup_configParameters,+    createWorkgroup_enhancedVpcRouting,+    createWorkgroup_port,+    createWorkgroup_publiclyAccessible,+    createWorkgroup_securityGroupIds,+    createWorkgroup_subnetIds,+    createWorkgroup_tags,+    createWorkgroup_namespaceName,+    createWorkgroup_workgroupName,++    -- * Destructuring the Response+    CreateWorkgroupResponse (..),+    newCreateWorkgroupResponse,++    -- * Response Lenses+    createWorkgroupResponse_workgroup,+    createWorkgroupResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateWorkgroup' smart constructor.+data CreateWorkgroup = CreateWorkgroup'+  { -- | The base data warehouse capacity of the workgroup in Redshift Processing+    -- Units (RPUs).+    baseCapacity :: Prelude.Maybe Prelude.Int,+    -- | An array of parameters to set for more control over a serverless+    -- database. The options are @datestyle@, @enable_user_activity_logging@,+    -- @query_group@, @search_path@, and @max_query_execution_time@.+    configParameters :: Prelude.Maybe [ConfigParameter],+    -- | The value that specifies whether to turn on enhanced virtual private+    -- cloud (VPC) routing, which forces Amazon Redshift Serverless to route+    -- traffic through your VPC instead of over the internet.+    enhancedVpcRouting :: Prelude.Maybe Prelude.Bool,+    -- | The custom port to use when connecting to a workgroup. Valid port ranges+    -- are 5431-5455 and 8191-8215. The default is 5439.+    port :: Prelude.Maybe Prelude.Int,+    -- | A value that specifies whether the workgroup can be accessed from a+    -- public network.+    publiclyAccessible :: Prelude.Maybe Prelude.Bool,+    -- | An array of security group IDs to associate with the workgroup.+    securityGroupIds :: Prelude.Maybe [Prelude.Text],+    -- | An array of VPC subnet IDs to associate with the workgroup.+    subnetIds :: Prelude.Maybe [Prelude.Text],+    -- | A array of tag instances.+    tags :: Prelude.Maybe [Tag],+    -- | The name of the namespace to associate with the workgroup.+    namespaceName :: Prelude.Text,+    -- | The name of the created workgroup.+    workgroupName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateWorkgroup' 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:+--+-- 'baseCapacity', 'createWorkgroup_baseCapacity' - The base data warehouse capacity of the workgroup in Redshift Processing+-- Units (RPUs).+--+-- 'configParameters', 'createWorkgroup_configParameters' - An array of parameters to set for more control over a serverless+-- database. The options are @datestyle@, @enable_user_activity_logging@,+-- @query_group@, @search_path@, and @max_query_execution_time@.+--+-- 'enhancedVpcRouting', 'createWorkgroup_enhancedVpcRouting' - The value that specifies whether to turn on enhanced virtual private+-- cloud (VPC) routing, which forces Amazon Redshift Serverless to route+-- traffic through your VPC instead of over the internet.+--+-- 'port', 'createWorkgroup_port' - The custom port to use when connecting to a workgroup. Valid port ranges+-- are 5431-5455 and 8191-8215. The default is 5439.+--+-- 'publiclyAccessible', 'createWorkgroup_publiclyAccessible' - A value that specifies whether the workgroup can be accessed from a+-- public network.+--+-- 'securityGroupIds', 'createWorkgroup_securityGroupIds' - An array of security group IDs to associate with the workgroup.+--+-- 'subnetIds', 'createWorkgroup_subnetIds' - An array of VPC subnet IDs to associate with the workgroup.+--+-- 'tags', 'createWorkgroup_tags' - A array of tag instances.+--+-- 'namespaceName', 'createWorkgroup_namespaceName' - The name of the namespace to associate with the workgroup.+--+-- 'workgroupName', 'createWorkgroup_workgroupName' - The name of the created workgroup.+newCreateWorkgroup ::+  -- | 'namespaceName'+  Prelude.Text ->+  -- | 'workgroupName'+  Prelude.Text ->+  CreateWorkgroup+newCreateWorkgroup pNamespaceName_ pWorkgroupName_ =+  CreateWorkgroup'+    { baseCapacity = Prelude.Nothing,+      configParameters = Prelude.Nothing,+      enhancedVpcRouting = Prelude.Nothing,+      port = Prelude.Nothing,+      publiclyAccessible = Prelude.Nothing,+      securityGroupIds = Prelude.Nothing,+      subnetIds = Prelude.Nothing,+      tags = Prelude.Nothing,+      namespaceName = pNamespaceName_,+      workgroupName = pWorkgroupName_+    }++-- | The base data warehouse capacity of the workgroup in Redshift Processing+-- Units (RPUs).+createWorkgroup_baseCapacity :: Lens.Lens' CreateWorkgroup (Prelude.Maybe Prelude.Int)+createWorkgroup_baseCapacity = Lens.lens (\CreateWorkgroup' {baseCapacity} -> baseCapacity) (\s@CreateWorkgroup' {} a -> s {baseCapacity = a} :: CreateWorkgroup)++-- | An array of parameters to set for more control over a serverless+-- database. The options are @datestyle@, @enable_user_activity_logging@,+-- @query_group@, @search_path@, and @max_query_execution_time@.+createWorkgroup_configParameters :: Lens.Lens' CreateWorkgroup (Prelude.Maybe [ConfigParameter])+createWorkgroup_configParameters = Lens.lens (\CreateWorkgroup' {configParameters} -> configParameters) (\s@CreateWorkgroup' {} a -> s {configParameters = a} :: CreateWorkgroup) Prelude.. Lens.mapping Lens.coerced++-- | The value that specifies whether to turn on enhanced virtual private+-- cloud (VPC) routing, which forces Amazon Redshift Serverless to route+-- traffic through your VPC instead of over the internet.+createWorkgroup_enhancedVpcRouting :: Lens.Lens' CreateWorkgroup (Prelude.Maybe Prelude.Bool)+createWorkgroup_enhancedVpcRouting = Lens.lens (\CreateWorkgroup' {enhancedVpcRouting} -> enhancedVpcRouting) (\s@CreateWorkgroup' {} a -> s {enhancedVpcRouting = a} :: CreateWorkgroup)++-- | The custom port to use when connecting to a workgroup. Valid port ranges+-- are 5431-5455 and 8191-8215. The default is 5439.+createWorkgroup_port :: Lens.Lens' CreateWorkgroup (Prelude.Maybe Prelude.Int)+createWorkgroup_port = Lens.lens (\CreateWorkgroup' {port} -> port) (\s@CreateWorkgroup' {} a -> s {port = a} :: CreateWorkgroup)++-- | A value that specifies whether the workgroup can be accessed from a+-- public network.+createWorkgroup_publiclyAccessible :: Lens.Lens' CreateWorkgroup (Prelude.Maybe Prelude.Bool)+createWorkgroup_publiclyAccessible = Lens.lens (\CreateWorkgroup' {publiclyAccessible} -> publiclyAccessible) (\s@CreateWorkgroup' {} a -> s {publiclyAccessible = a} :: CreateWorkgroup)++-- | An array of security group IDs to associate with the workgroup.+createWorkgroup_securityGroupIds :: Lens.Lens' CreateWorkgroup (Prelude.Maybe [Prelude.Text])+createWorkgroup_securityGroupIds = Lens.lens (\CreateWorkgroup' {securityGroupIds} -> securityGroupIds) (\s@CreateWorkgroup' {} a -> s {securityGroupIds = a} :: CreateWorkgroup) Prelude.. Lens.mapping Lens.coerced++-- | An array of VPC subnet IDs to associate with the workgroup.+createWorkgroup_subnetIds :: Lens.Lens' CreateWorkgroup (Prelude.Maybe [Prelude.Text])+createWorkgroup_subnetIds = Lens.lens (\CreateWorkgroup' {subnetIds} -> subnetIds) (\s@CreateWorkgroup' {} a -> s {subnetIds = a} :: CreateWorkgroup) Prelude.. Lens.mapping Lens.coerced++-- | A array of tag instances.+createWorkgroup_tags :: Lens.Lens' CreateWorkgroup (Prelude.Maybe [Tag])+createWorkgroup_tags = Lens.lens (\CreateWorkgroup' {tags} -> tags) (\s@CreateWorkgroup' {} a -> s {tags = a} :: CreateWorkgroup) Prelude.. Lens.mapping Lens.coerced++-- | The name of the namespace to associate with the workgroup.+createWorkgroup_namespaceName :: Lens.Lens' CreateWorkgroup Prelude.Text+createWorkgroup_namespaceName = Lens.lens (\CreateWorkgroup' {namespaceName} -> namespaceName) (\s@CreateWorkgroup' {} a -> s {namespaceName = a} :: CreateWorkgroup)++-- | The name of the created workgroup.+createWorkgroup_workgroupName :: Lens.Lens' CreateWorkgroup Prelude.Text+createWorkgroup_workgroupName = Lens.lens (\CreateWorkgroup' {workgroupName} -> workgroupName) (\s@CreateWorkgroup' {} a -> s {workgroupName = a} :: CreateWorkgroup)++instance Core.AWSRequest CreateWorkgroup where+  type+    AWSResponse CreateWorkgroup =+      CreateWorkgroupResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateWorkgroupResponse'+            Prelude.<$> (x Data..?> "workgroup")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateWorkgroup where+  hashWithSalt _salt CreateWorkgroup' {..} =+    _salt+      `Prelude.hashWithSalt` baseCapacity+      `Prelude.hashWithSalt` configParameters+      `Prelude.hashWithSalt` enhancedVpcRouting+      `Prelude.hashWithSalt` port+      `Prelude.hashWithSalt` publiclyAccessible+      `Prelude.hashWithSalt` securityGroupIds+      `Prelude.hashWithSalt` subnetIds+      `Prelude.hashWithSalt` tags+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData CreateWorkgroup where+  rnf CreateWorkgroup' {..} =+    Prelude.rnf baseCapacity+      `Prelude.seq` Prelude.rnf configParameters+      `Prelude.seq` Prelude.rnf enhancedVpcRouting+      `Prelude.seq` Prelude.rnf port+      `Prelude.seq` Prelude.rnf publiclyAccessible+      `Prelude.seq` Prelude.rnf securityGroupIds+      `Prelude.seq` Prelude.rnf subnetIds+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf workgroupName++instance Data.ToHeaders CreateWorkgroup where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.CreateWorkgroup" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateWorkgroup where+  toJSON CreateWorkgroup' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("baseCapacity" Data..=) Prelude.<$> baseCapacity,+            ("configParameters" Data..=)+              Prelude.<$> configParameters,+            ("enhancedVpcRouting" Data..=)+              Prelude.<$> enhancedVpcRouting,+            ("port" Data..=) Prelude.<$> port,+            ("publiclyAccessible" Data..=)+              Prelude.<$> publiclyAccessible,+            ("securityGroupIds" Data..=)+              Prelude.<$> securityGroupIds,+            ("subnetIds" Data..=) Prelude.<$> subnetIds,+            ("tags" Data..=) Prelude.<$> tags,+            Prelude.Just ("namespaceName" Data..= namespaceName),+            Prelude.Just+              ("workgroupName" Data..= workgroupName)+          ]+      )++instance Data.ToPath CreateWorkgroup where+  toPath = Prelude.const "/"++instance Data.ToQuery CreateWorkgroup where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateWorkgroupResponse' smart constructor.+data CreateWorkgroupResponse = CreateWorkgroupResponse'+  { -- | The created workgroup object.+    workgroup :: Prelude.Maybe Workgroup,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateWorkgroupResponse' 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:+--+-- 'workgroup', 'createWorkgroupResponse_workgroup' - The created workgroup object.+--+-- 'httpStatus', 'createWorkgroupResponse_httpStatus' - The response's http status code.+newCreateWorkgroupResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateWorkgroupResponse+newCreateWorkgroupResponse pHttpStatus_ =+  CreateWorkgroupResponse'+    { workgroup =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The created workgroup object.+createWorkgroupResponse_workgroup :: Lens.Lens' CreateWorkgroupResponse (Prelude.Maybe Workgroup)+createWorkgroupResponse_workgroup = Lens.lens (\CreateWorkgroupResponse' {workgroup} -> workgroup) (\s@CreateWorkgroupResponse' {} a -> s {workgroup = a} :: CreateWorkgroupResponse)++-- | The response's http status code.+createWorkgroupResponse_httpStatus :: Lens.Lens' CreateWorkgroupResponse Prelude.Int+createWorkgroupResponse_httpStatus = Lens.lens (\CreateWorkgroupResponse' {httpStatus} -> httpStatus) (\s@CreateWorkgroupResponse' {} a -> s {httpStatus = a} :: CreateWorkgroupResponse)++instance Prelude.NFData CreateWorkgroupResponse where+  rnf CreateWorkgroupResponse' {..} =+    Prelude.rnf workgroup+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/DeleteEndpointAccess.hs view
@@ -0,0 +1,172 @@+{-# 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.RedshiftServerLess.DeleteEndpointAccess+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes an Amazon Redshift Serverless managed VPC endpoint.+module Amazonka.RedshiftServerLess.DeleteEndpointAccess+  ( -- * Creating a Request+    DeleteEndpointAccess (..),+    newDeleteEndpointAccess,++    -- * Request Lenses+    deleteEndpointAccess_endpointName,++    -- * Destructuring the Response+    DeleteEndpointAccessResponse (..),+    newDeleteEndpointAccessResponse,++    -- * Response Lenses+    deleteEndpointAccessResponse_endpoint,+    deleteEndpointAccessResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteEndpointAccess' smart constructor.+data DeleteEndpointAccess = DeleteEndpointAccess'+  { -- | The name of the VPC endpoint to delete.+    endpointName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteEndpointAccess' 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:+--+-- 'endpointName', 'deleteEndpointAccess_endpointName' - The name of the VPC endpoint to delete.+newDeleteEndpointAccess ::+  -- | 'endpointName'+  Prelude.Text ->+  DeleteEndpointAccess+newDeleteEndpointAccess pEndpointName_ =+  DeleteEndpointAccess'+    { endpointName =+        pEndpointName_+    }++-- | The name of the VPC endpoint to delete.+deleteEndpointAccess_endpointName :: Lens.Lens' DeleteEndpointAccess Prelude.Text+deleteEndpointAccess_endpointName = Lens.lens (\DeleteEndpointAccess' {endpointName} -> endpointName) (\s@DeleteEndpointAccess' {} a -> s {endpointName = a} :: DeleteEndpointAccess)++instance Core.AWSRequest DeleteEndpointAccess where+  type+    AWSResponse DeleteEndpointAccess =+      DeleteEndpointAccessResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DeleteEndpointAccessResponse'+            Prelude.<$> (x Data..?> "endpoint")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteEndpointAccess where+  hashWithSalt _salt DeleteEndpointAccess' {..} =+    _salt `Prelude.hashWithSalt` endpointName++instance Prelude.NFData DeleteEndpointAccess where+  rnf DeleteEndpointAccess' {..} =+    Prelude.rnf endpointName++instance Data.ToHeaders DeleteEndpointAccess where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.DeleteEndpointAccess" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteEndpointAccess where+  toJSON DeleteEndpointAccess' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("endpointName" Data..= endpointName)]+      )++instance Data.ToPath DeleteEndpointAccess where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteEndpointAccess where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteEndpointAccessResponse' smart constructor.+data DeleteEndpointAccessResponse = DeleteEndpointAccessResponse'+  { -- | The deleted VPC endpoint.+    endpoint :: Prelude.Maybe EndpointAccess,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteEndpointAccessResponse' 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:+--+-- 'endpoint', 'deleteEndpointAccessResponse_endpoint' - The deleted VPC endpoint.+--+-- 'httpStatus', 'deleteEndpointAccessResponse_httpStatus' - The response's http status code.+newDeleteEndpointAccessResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteEndpointAccessResponse+newDeleteEndpointAccessResponse pHttpStatus_ =+  DeleteEndpointAccessResponse'+    { endpoint =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The deleted VPC endpoint.+deleteEndpointAccessResponse_endpoint :: Lens.Lens' DeleteEndpointAccessResponse (Prelude.Maybe EndpointAccess)+deleteEndpointAccessResponse_endpoint = Lens.lens (\DeleteEndpointAccessResponse' {endpoint} -> endpoint) (\s@DeleteEndpointAccessResponse' {} a -> s {endpoint = a} :: DeleteEndpointAccessResponse)++-- | The response's http status code.+deleteEndpointAccessResponse_httpStatus :: Lens.Lens' DeleteEndpointAccessResponse Prelude.Int+deleteEndpointAccessResponse_httpStatus = Lens.lens (\DeleteEndpointAccessResponse' {httpStatus} -> httpStatus) (\s@DeleteEndpointAccessResponse' {} a -> s {httpStatus = a} :: DeleteEndpointAccessResponse)++instance Prelude.NFData DeleteEndpointAccessResponse where+  rnf DeleteEndpointAccessResponse' {..} =+    Prelude.rnf endpoint+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/DeleteNamespace.hs view
@@ -0,0 +1,206 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.DeleteNamespace+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a namespace from Amazon Redshift Serverless. Before you delete+-- the namespace, you can create a final snapshot that has all of the data+-- within the namespace.+module Amazonka.RedshiftServerLess.DeleteNamespace+  ( -- * Creating a Request+    DeleteNamespace (..),+    newDeleteNamespace,++    -- * Request Lenses+    deleteNamespace_finalSnapshotName,+    deleteNamespace_finalSnapshotRetentionPeriod,+    deleteNamespace_namespaceName,++    -- * Destructuring the Response+    DeleteNamespaceResponse (..),+    newDeleteNamespaceResponse,++    -- * Response Lenses+    deleteNamespaceResponse_httpStatus,+    deleteNamespaceResponse_namespace,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteNamespace' smart constructor.+data DeleteNamespace = DeleteNamespace'+  { -- | The name of the snapshot to be created before the namespace is deleted.+    finalSnapshotName :: Prelude.Maybe Prelude.Text,+    -- | How long to retain the final snapshot.+    finalSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,+    -- | The name of the namespace to delete.+    namespaceName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteNamespace' 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:+--+-- 'finalSnapshotName', 'deleteNamespace_finalSnapshotName' - The name of the snapshot to be created before the namespace is deleted.+--+-- 'finalSnapshotRetentionPeriod', 'deleteNamespace_finalSnapshotRetentionPeriod' - How long to retain the final snapshot.+--+-- 'namespaceName', 'deleteNamespace_namespaceName' - The name of the namespace to delete.+newDeleteNamespace ::+  -- | 'namespaceName'+  Prelude.Text ->+  DeleteNamespace+newDeleteNamespace pNamespaceName_ =+  DeleteNamespace'+    { finalSnapshotName =+        Prelude.Nothing,+      finalSnapshotRetentionPeriod = Prelude.Nothing,+      namespaceName = pNamespaceName_+    }++-- | The name of the snapshot to be created before the namespace is deleted.+deleteNamespace_finalSnapshotName :: Lens.Lens' DeleteNamespace (Prelude.Maybe Prelude.Text)+deleteNamespace_finalSnapshotName = Lens.lens (\DeleteNamespace' {finalSnapshotName} -> finalSnapshotName) (\s@DeleteNamespace' {} a -> s {finalSnapshotName = a} :: DeleteNamespace)++-- | How long to retain the final snapshot.+deleteNamespace_finalSnapshotRetentionPeriod :: Lens.Lens' DeleteNamespace (Prelude.Maybe Prelude.Int)+deleteNamespace_finalSnapshotRetentionPeriod = Lens.lens (\DeleteNamespace' {finalSnapshotRetentionPeriod} -> finalSnapshotRetentionPeriod) (\s@DeleteNamespace' {} a -> s {finalSnapshotRetentionPeriod = a} :: DeleteNamespace)++-- | The name of the namespace to delete.+deleteNamespace_namespaceName :: Lens.Lens' DeleteNamespace Prelude.Text+deleteNamespace_namespaceName = Lens.lens (\DeleteNamespace' {namespaceName} -> namespaceName) (\s@DeleteNamespace' {} a -> s {namespaceName = a} :: DeleteNamespace)++instance Core.AWSRequest DeleteNamespace where+  type+    AWSResponse DeleteNamespace =+      DeleteNamespaceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DeleteNamespaceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "namespace")+      )++instance Prelude.Hashable DeleteNamespace where+  hashWithSalt _salt DeleteNamespace' {..} =+    _salt+      `Prelude.hashWithSalt` finalSnapshotName+      `Prelude.hashWithSalt` finalSnapshotRetentionPeriod+      `Prelude.hashWithSalt` namespaceName++instance Prelude.NFData DeleteNamespace where+  rnf DeleteNamespace' {..} =+    Prelude.rnf finalSnapshotName+      `Prelude.seq` Prelude.rnf finalSnapshotRetentionPeriod+      `Prelude.seq` Prelude.rnf namespaceName++instance Data.ToHeaders DeleteNamespace where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.DeleteNamespace" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteNamespace where+  toJSON DeleteNamespace' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("finalSnapshotName" Data..=)+              Prelude.<$> finalSnapshotName,+            ("finalSnapshotRetentionPeriod" Data..=)+              Prelude.<$> finalSnapshotRetentionPeriod,+            Prelude.Just+              ("namespaceName" Data..= namespaceName)+          ]+      )++instance Data.ToPath DeleteNamespace where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteNamespace where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteNamespaceResponse' smart constructor.+data DeleteNamespaceResponse = DeleteNamespaceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The deleted namespace object.+    namespace :: Namespace+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteNamespaceResponse' 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', 'deleteNamespaceResponse_httpStatus' - The response's http status code.+--+-- 'namespace', 'deleteNamespaceResponse_namespace' - The deleted namespace object.+newDeleteNamespaceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'namespace'+  Namespace ->+  DeleteNamespaceResponse+newDeleteNamespaceResponse pHttpStatus_ pNamespace_ =+  DeleteNamespaceResponse'+    { httpStatus = pHttpStatus_,+      namespace = pNamespace_+    }++-- | The response's http status code.+deleteNamespaceResponse_httpStatus :: Lens.Lens' DeleteNamespaceResponse Prelude.Int+deleteNamespaceResponse_httpStatus = Lens.lens (\DeleteNamespaceResponse' {httpStatus} -> httpStatus) (\s@DeleteNamespaceResponse' {} a -> s {httpStatus = a} :: DeleteNamespaceResponse)++-- | The deleted namespace object.+deleteNamespaceResponse_namespace :: Lens.Lens' DeleteNamespaceResponse Namespace+deleteNamespaceResponse_namespace = Lens.lens (\DeleteNamespaceResponse' {namespace} -> namespace) (\s@DeleteNamespaceResponse' {} a -> s {namespace = a} :: DeleteNamespaceResponse)++instance Prelude.NFData DeleteNamespaceResponse where+  rnf DeleteNamespaceResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf namespace
+ gen/Amazonka/RedshiftServerLess/DeleteResourcePolicy.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.RedshiftServerLess.DeleteResourcePolicy+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified resource policy.+module Amazonka.RedshiftServerLess.DeleteResourcePolicy+  ( -- * Creating a Request+    DeleteResourcePolicy (..),+    newDeleteResourcePolicy,++    -- * Request Lenses+    deleteResourcePolicy_resourceArn,++    -- * Destructuring the Response+    DeleteResourcePolicyResponse (..),+    newDeleteResourcePolicyResponse,++    -- * Response Lenses+    deleteResourcePolicyResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteResourcePolicy' smart constructor.+data DeleteResourcePolicy = DeleteResourcePolicy'+  { -- | The Amazon Resource Name (ARN) of the policy to delete.+    resourceArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteResourcePolicy' 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', 'deleteResourcePolicy_resourceArn' - The Amazon Resource Name (ARN) of the policy to delete.+newDeleteResourcePolicy ::+  -- | 'resourceArn'+  Prelude.Text ->+  DeleteResourcePolicy+newDeleteResourcePolicy pResourceArn_ =+  DeleteResourcePolicy' {resourceArn = pResourceArn_}++-- | The Amazon Resource Name (ARN) of the policy to delete.+deleteResourcePolicy_resourceArn :: Lens.Lens' DeleteResourcePolicy Prelude.Text+deleteResourcePolicy_resourceArn = Lens.lens (\DeleteResourcePolicy' {resourceArn} -> resourceArn) (\s@DeleteResourcePolicy' {} a -> s {resourceArn = a} :: DeleteResourcePolicy)++instance Core.AWSRequest DeleteResourcePolicy where+  type+    AWSResponse DeleteResourcePolicy =+      DeleteResourcePolicyResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          DeleteResourcePolicyResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteResourcePolicy where+  hashWithSalt _salt DeleteResourcePolicy' {..} =+    _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData DeleteResourcePolicy where+  rnf DeleteResourcePolicy' {..} =+    Prelude.rnf resourceArn++instance Data.ToHeaders DeleteResourcePolicy where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.DeleteResourcePolicy" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteResourcePolicy where+  toJSON DeleteResourcePolicy' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("resourceArn" Data..= resourceArn)]+      )++instance Data.ToPath DeleteResourcePolicy where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteResourcePolicy where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteResourcePolicyResponse' smart constructor.+data DeleteResourcePolicyResponse = DeleteResourcePolicyResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteResourcePolicyResponse' 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', 'deleteResourcePolicyResponse_httpStatus' - The response's http status code.+newDeleteResourcePolicyResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteResourcePolicyResponse+newDeleteResourcePolicyResponse pHttpStatus_ =+  DeleteResourcePolicyResponse'+    { httpStatus =+        pHttpStatus_+    }++-- | The response's http status code.+deleteResourcePolicyResponse_httpStatus :: Lens.Lens' DeleteResourcePolicyResponse Prelude.Int+deleteResourcePolicyResponse_httpStatus = Lens.lens (\DeleteResourcePolicyResponse' {httpStatus} -> httpStatus) (\s@DeleteResourcePolicyResponse' {} a -> s {httpStatus = a} :: DeleteResourcePolicyResponse)++instance Prelude.NFData DeleteResourcePolicyResponse where+  rnf DeleteResourcePolicyResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/DeleteSnapshot.hs view
@@ -0,0 +1,167 @@+{-# 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.RedshiftServerLess.DeleteSnapshot+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a snapshot from Amazon Redshift Serverless.+module Amazonka.RedshiftServerLess.DeleteSnapshot+  ( -- * Creating a Request+    DeleteSnapshot (..),+    newDeleteSnapshot,++    -- * Request Lenses+    deleteSnapshot_snapshotName,++    -- * Destructuring the Response+    DeleteSnapshotResponse (..),+    newDeleteSnapshotResponse,++    -- * Response Lenses+    deleteSnapshotResponse_snapshot,+    deleteSnapshotResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteSnapshot' smart constructor.+data DeleteSnapshot = DeleteSnapshot'+  { -- | The name of the snapshot to be deleted.+    snapshotName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteSnapshot' 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:+--+-- 'snapshotName', 'deleteSnapshot_snapshotName' - The name of the snapshot to be deleted.+newDeleteSnapshot ::+  -- | 'snapshotName'+  Prelude.Text ->+  DeleteSnapshot+newDeleteSnapshot pSnapshotName_ =+  DeleteSnapshot' {snapshotName = pSnapshotName_}++-- | The name of the snapshot to be deleted.+deleteSnapshot_snapshotName :: Lens.Lens' DeleteSnapshot Prelude.Text+deleteSnapshot_snapshotName = Lens.lens (\DeleteSnapshot' {snapshotName} -> snapshotName) (\s@DeleteSnapshot' {} a -> s {snapshotName = a} :: DeleteSnapshot)++instance Core.AWSRequest DeleteSnapshot where+  type+    AWSResponse DeleteSnapshot =+      DeleteSnapshotResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DeleteSnapshotResponse'+            Prelude.<$> (x Data..?> "snapshot")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteSnapshot where+  hashWithSalt _salt DeleteSnapshot' {..} =+    _salt `Prelude.hashWithSalt` snapshotName++instance Prelude.NFData DeleteSnapshot where+  rnf DeleteSnapshot' {..} = Prelude.rnf snapshotName++instance Data.ToHeaders DeleteSnapshot where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.DeleteSnapshot" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteSnapshot where+  toJSON DeleteSnapshot' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("snapshotName" Data..= snapshotName)]+      )++instance Data.ToPath DeleteSnapshot where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteSnapshot where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteSnapshotResponse' smart constructor.+data DeleteSnapshotResponse = DeleteSnapshotResponse'+  { -- | The deleted snapshot object.+    snapshot :: Prelude.Maybe Snapshot,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteSnapshotResponse' 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:+--+-- 'snapshot', 'deleteSnapshotResponse_snapshot' - The deleted snapshot object.+--+-- 'httpStatus', 'deleteSnapshotResponse_httpStatus' - The response's http status code.+newDeleteSnapshotResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteSnapshotResponse+newDeleteSnapshotResponse pHttpStatus_ =+  DeleteSnapshotResponse'+    { snapshot = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The deleted snapshot object.+deleteSnapshotResponse_snapshot :: Lens.Lens' DeleteSnapshotResponse (Prelude.Maybe Snapshot)+deleteSnapshotResponse_snapshot = Lens.lens (\DeleteSnapshotResponse' {snapshot} -> snapshot) (\s@DeleteSnapshotResponse' {} a -> s {snapshot = a} :: DeleteSnapshotResponse)++-- | The response's http status code.+deleteSnapshotResponse_httpStatus :: Lens.Lens' DeleteSnapshotResponse Prelude.Int+deleteSnapshotResponse_httpStatus = Lens.lens (\DeleteSnapshotResponse' {httpStatus} -> httpStatus) (\s@DeleteSnapshotResponse' {} a -> s {httpStatus = a} :: DeleteSnapshotResponse)++instance Prelude.NFData DeleteSnapshotResponse where+  rnf DeleteSnapshotResponse' {..} =+    Prelude.rnf snapshot+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/DeleteUsageLimit.hs view
@@ -0,0 +1,168 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.DeleteUsageLimit+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a usage limit from Amazon Redshift Serverless.+module Amazonka.RedshiftServerLess.DeleteUsageLimit+  ( -- * Creating a Request+    DeleteUsageLimit (..),+    newDeleteUsageLimit,++    -- * Request Lenses+    deleteUsageLimit_usageLimitId,++    -- * Destructuring the Response+    DeleteUsageLimitResponse (..),+    newDeleteUsageLimitResponse,++    -- * Response Lenses+    deleteUsageLimitResponse_usageLimit,+    deleteUsageLimitResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteUsageLimit' smart constructor.+data DeleteUsageLimit = DeleteUsageLimit'+  { -- | The unique identifier of the usage limit to delete.+    usageLimitId :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteUsageLimit' 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:+--+-- 'usageLimitId', 'deleteUsageLimit_usageLimitId' - The unique identifier of the usage limit to delete.+newDeleteUsageLimit ::+  -- | 'usageLimitId'+  Prelude.Text ->+  DeleteUsageLimit+newDeleteUsageLimit pUsageLimitId_ =+  DeleteUsageLimit' {usageLimitId = pUsageLimitId_}++-- | The unique identifier of the usage limit to delete.+deleteUsageLimit_usageLimitId :: Lens.Lens' DeleteUsageLimit Prelude.Text+deleteUsageLimit_usageLimitId = Lens.lens (\DeleteUsageLimit' {usageLimitId} -> usageLimitId) (\s@DeleteUsageLimit' {} a -> s {usageLimitId = a} :: DeleteUsageLimit)++instance Core.AWSRequest DeleteUsageLimit where+  type+    AWSResponse DeleteUsageLimit =+      DeleteUsageLimitResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DeleteUsageLimitResponse'+            Prelude.<$> (x Data..?> "usageLimit")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteUsageLimit where+  hashWithSalt _salt DeleteUsageLimit' {..} =+    _salt `Prelude.hashWithSalt` usageLimitId++instance Prelude.NFData DeleteUsageLimit where+  rnf DeleteUsageLimit' {..} = Prelude.rnf usageLimitId++instance Data.ToHeaders DeleteUsageLimit where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.DeleteUsageLimit" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteUsageLimit where+  toJSON DeleteUsageLimit' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("usageLimitId" Data..= usageLimitId)]+      )++instance Data.ToPath DeleteUsageLimit where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteUsageLimit where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteUsageLimitResponse' smart constructor.+data DeleteUsageLimitResponse = DeleteUsageLimitResponse'+  { -- | The deleted usage limit object.+    usageLimit :: Prelude.Maybe UsageLimit,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteUsageLimitResponse' 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:+--+-- 'usageLimit', 'deleteUsageLimitResponse_usageLimit' - The deleted usage limit object.+--+-- 'httpStatus', 'deleteUsageLimitResponse_httpStatus' - The response's http status code.+newDeleteUsageLimitResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteUsageLimitResponse+newDeleteUsageLimitResponse pHttpStatus_ =+  DeleteUsageLimitResponse'+    { usageLimit =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The deleted usage limit object.+deleteUsageLimitResponse_usageLimit :: Lens.Lens' DeleteUsageLimitResponse (Prelude.Maybe UsageLimit)+deleteUsageLimitResponse_usageLimit = Lens.lens (\DeleteUsageLimitResponse' {usageLimit} -> usageLimit) (\s@DeleteUsageLimitResponse' {} a -> s {usageLimit = a} :: DeleteUsageLimitResponse)++-- | The response's http status code.+deleteUsageLimitResponse_httpStatus :: Lens.Lens' DeleteUsageLimitResponse Prelude.Int+deleteUsageLimitResponse_httpStatus = Lens.lens (\DeleteUsageLimitResponse' {httpStatus} -> httpStatus) (\s@DeleteUsageLimitResponse' {} a -> s {httpStatus = a} :: DeleteUsageLimitResponse)++instance Prelude.NFData DeleteUsageLimitResponse where+  rnf DeleteUsageLimitResponse' {..} =+    Prelude.rnf usageLimit+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/DeleteWorkgroup.hs view
@@ -0,0 +1,171 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.DeleteWorkgroup+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a workgroup.+module Amazonka.RedshiftServerLess.DeleteWorkgroup+  ( -- * Creating a Request+    DeleteWorkgroup (..),+    newDeleteWorkgroup,++    -- * Request Lenses+    deleteWorkgroup_workgroupName,++    -- * Destructuring the Response+    DeleteWorkgroupResponse (..),+    newDeleteWorkgroupResponse,++    -- * Response Lenses+    deleteWorkgroupResponse_httpStatus,+    deleteWorkgroupResponse_workgroup,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteWorkgroup' smart constructor.+data DeleteWorkgroup = DeleteWorkgroup'+  { -- | The name of the workgroup to be deleted.+    workgroupName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteWorkgroup' 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:+--+-- 'workgroupName', 'deleteWorkgroup_workgroupName' - The name of the workgroup to be deleted.+newDeleteWorkgroup ::+  -- | 'workgroupName'+  Prelude.Text ->+  DeleteWorkgroup+newDeleteWorkgroup pWorkgroupName_ =+  DeleteWorkgroup' {workgroupName = pWorkgroupName_}++-- | The name of the workgroup to be deleted.+deleteWorkgroup_workgroupName :: Lens.Lens' DeleteWorkgroup Prelude.Text+deleteWorkgroup_workgroupName = Lens.lens (\DeleteWorkgroup' {workgroupName} -> workgroupName) (\s@DeleteWorkgroup' {} a -> s {workgroupName = a} :: DeleteWorkgroup)++instance Core.AWSRequest DeleteWorkgroup where+  type+    AWSResponse DeleteWorkgroup =+      DeleteWorkgroupResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DeleteWorkgroupResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "workgroup")+      )++instance Prelude.Hashable DeleteWorkgroup where+  hashWithSalt _salt DeleteWorkgroup' {..} =+    _salt `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData DeleteWorkgroup where+  rnf DeleteWorkgroup' {..} = Prelude.rnf workgroupName++instance Data.ToHeaders DeleteWorkgroup where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.DeleteWorkgroup" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteWorkgroup where+  toJSON DeleteWorkgroup' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("workgroupName" Data..= workgroupName)+          ]+      )++instance Data.ToPath DeleteWorkgroup where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteWorkgroup where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteWorkgroupResponse' smart constructor.+data DeleteWorkgroupResponse = DeleteWorkgroupResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The deleted workgroup object.+    workgroup :: Workgroup+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteWorkgroupResponse' 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', 'deleteWorkgroupResponse_httpStatus' - The response's http status code.+--+-- 'workgroup', 'deleteWorkgroupResponse_workgroup' - The deleted workgroup object.+newDeleteWorkgroupResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'workgroup'+  Workgroup ->+  DeleteWorkgroupResponse+newDeleteWorkgroupResponse pHttpStatus_ pWorkgroup_ =+  DeleteWorkgroupResponse'+    { httpStatus = pHttpStatus_,+      workgroup = pWorkgroup_+    }++-- | The response's http status code.+deleteWorkgroupResponse_httpStatus :: Lens.Lens' DeleteWorkgroupResponse Prelude.Int+deleteWorkgroupResponse_httpStatus = Lens.lens (\DeleteWorkgroupResponse' {httpStatus} -> httpStatus) (\s@DeleteWorkgroupResponse' {} a -> s {httpStatus = a} :: DeleteWorkgroupResponse)++-- | The deleted workgroup object.+deleteWorkgroupResponse_workgroup :: Lens.Lens' DeleteWorkgroupResponse Workgroup+deleteWorkgroupResponse_workgroup = Lens.lens (\DeleteWorkgroupResponse' {workgroup} -> workgroup) (\s@DeleteWorkgroupResponse' {} a -> s {workgroup = a} :: DeleteWorkgroupResponse)++instance Prelude.NFData DeleteWorkgroupResponse where+  rnf DeleteWorkgroupResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf workgroup
+ gen/Amazonka/RedshiftServerLess/GetCredentials.hs view
@@ -0,0 +1,310 @@+{-# 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.RedshiftServerLess.GetCredentials+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a database user name and temporary password with temporary+-- authorization to log in to Amazon Redshift Serverless.+--+-- By default, the temporary credentials expire in 900 seconds. You can+-- optionally specify a duration between 900 seconds (15 minutes) and 3600+-- seconds (60 minutes).+--+-- >  <p>The Identity and Access Management (IAM) user or role that runs GetCredentials must have an IAM policy attached that allows access to all necessary actions and resources.</p> <p>If the <code>DbName</code> parameter is specified, the IAM policy must allow access to the resource dbname for the specified database name.</p>+module Amazonka.RedshiftServerLess.GetCredentials+  ( -- * Creating a Request+    GetCredentials (..),+    newGetCredentials,++    -- * Request Lenses+    getCredentials_dbName,+    getCredentials_durationSeconds,+    getCredentials_workgroupName,++    -- * Destructuring the Response+    GetCredentialsResponse (..),+    newGetCredentialsResponse,++    -- * Response Lenses+    getCredentialsResponse_dbPassword,+    getCredentialsResponse_dbUser,+    getCredentialsResponse_expiration,+    getCredentialsResponse_nextRefreshTime,+    getCredentialsResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetCredentials' smart constructor.+data GetCredentials = GetCredentials'+  { -- | The name of the database to get temporary authorization to log on to.+    --+    -- Constraints:+    --+    -- -   Must be 1 to 64 alphanumeric characters or hyphens.+    --+    -- -   Must contain only uppercase or lowercase letters, numbers,+    --     underscore, plus sign, period (dot), at symbol (\@), or hyphen.+    --+    -- -   The first character must be a letter.+    --+    -- -   Must not contain a colon ( : ) or slash ( \/ ).+    --+    -- -   Cannot be a reserved word. A list of reserved words can be found in+    --     <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>+    --     in the Amazon Redshift Database Developer Guide+    dbName :: Prelude.Maybe Prelude.Text,+    -- | The number of seconds until the returned temporary password expires. The+    -- minimum is 900 seconds, and the maximum is 3600 seconds.+    durationSeconds :: Prelude.Maybe Prelude.Int,+    -- | The name of the workgroup associated with the database.+    workgroupName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetCredentials' 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:+--+-- 'dbName', 'getCredentials_dbName' - The name of the database to get temporary authorization to log on to.+--+-- Constraints:+--+-- -   Must be 1 to 64 alphanumeric characters or hyphens.+--+-- -   Must contain only uppercase or lowercase letters, numbers,+--     underscore, plus sign, period (dot), at symbol (\@), or hyphen.+--+-- -   The first character must be a letter.+--+-- -   Must not contain a colon ( : ) or slash ( \/ ).+--+-- -   Cannot be a reserved word. A list of reserved words can be found in+--     <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>+--     in the Amazon Redshift Database Developer Guide+--+-- 'durationSeconds', 'getCredentials_durationSeconds' - The number of seconds until the returned temporary password expires. The+-- minimum is 900 seconds, and the maximum is 3600 seconds.+--+-- 'workgroupName', 'getCredentials_workgroupName' - The name of the workgroup associated with the database.+newGetCredentials ::+  -- | 'workgroupName'+  Prelude.Text ->+  GetCredentials+newGetCredentials pWorkgroupName_ =+  GetCredentials'+    { dbName = Prelude.Nothing,+      durationSeconds = Prelude.Nothing,+      workgroupName = pWorkgroupName_+    }++-- | The name of the database to get temporary authorization to log on to.+--+-- Constraints:+--+-- -   Must be 1 to 64 alphanumeric characters or hyphens.+--+-- -   Must contain only uppercase or lowercase letters, numbers,+--     underscore, plus sign, period (dot), at symbol (\@), or hyphen.+--+-- -   The first character must be a letter.+--+-- -   Must not contain a colon ( : ) or slash ( \/ ).+--+-- -   Cannot be a reserved word. A list of reserved words can be found in+--     <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>+--     in the Amazon Redshift Database Developer Guide+getCredentials_dbName :: Lens.Lens' GetCredentials (Prelude.Maybe Prelude.Text)+getCredentials_dbName = Lens.lens (\GetCredentials' {dbName} -> dbName) (\s@GetCredentials' {} a -> s {dbName = a} :: GetCredentials)++-- | The number of seconds until the returned temporary password expires. The+-- minimum is 900 seconds, and the maximum is 3600 seconds.+getCredentials_durationSeconds :: Lens.Lens' GetCredentials (Prelude.Maybe Prelude.Int)+getCredentials_durationSeconds = Lens.lens (\GetCredentials' {durationSeconds} -> durationSeconds) (\s@GetCredentials' {} a -> s {durationSeconds = a} :: GetCredentials)++-- | The name of the workgroup associated with the database.+getCredentials_workgroupName :: Lens.Lens' GetCredentials Prelude.Text+getCredentials_workgroupName = Lens.lens (\GetCredentials' {workgroupName} -> workgroupName) (\s@GetCredentials' {} a -> s {workgroupName = a} :: GetCredentials)++instance Core.AWSRequest GetCredentials where+  type+    AWSResponse GetCredentials =+      GetCredentialsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetCredentialsResponse'+            Prelude.<$> (x Data..?> "dbPassword")+            Prelude.<*> (x Data..?> "dbUser")+            Prelude.<*> (x Data..?> "expiration")+            Prelude.<*> (x Data..?> "nextRefreshTime")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetCredentials where+  hashWithSalt _salt GetCredentials' {..} =+    _salt+      `Prelude.hashWithSalt` dbName+      `Prelude.hashWithSalt` durationSeconds+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData GetCredentials where+  rnf GetCredentials' {..} =+    Prelude.rnf dbName+      `Prelude.seq` Prelude.rnf durationSeconds+      `Prelude.seq` Prelude.rnf workgroupName++instance Data.ToHeaders GetCredentials where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.GetCredentials" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetCredentials where+  toJSON GetCredentials' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("dbName" Data..=) Prelude.<$> dbName,+            ("durationSeconds" Data..=)+              Prelude.<$> durationSeconds,+            Prelude.Just+              ("workgroupName" Data..= workgroupName)+          ]+      )++instance Data.ToPath GetCredentials where+  toPath = Prelude.const "/"++instance Data.ToQuery GetCredentials where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetCredentialsResponse' smart constructor.+data GetCredentialsResponse = GetCredentialsResponse'+  { -- | A temporary password that authorizes the user name returned by @DbUser@+    -- to log on to the database @DbName@.+    dbPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | A database user name that is authorized to log on to the database+    -- @DbName@ using the password @DbPassword@. If the specified @DbUser@+    -- exists in the database, the new user name has the same database+    -- privileges as the the user named in @DbUser@. By default, the user is+    -- added to PUBLIC.+    dbUser :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The date and time the password in @DbPassword@ expires.+    expiration :: Prelude.Maybe Data.POSIX,+    -- | The date and time of when the @DbUser@ and @DbPassword@ authorization+    -- refreshes.+    nextRefreshTime :: Prelude.Maybe Data.POSIX,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetCredentialsResponse' 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:+--+-- 'dbPassword', 'getCredentialsResponse_dbPassword' - A temporary password that authorizes the user name returned by @DbUser@+-- to log on to the database @DbName@.+--+-- 'dbUser', 'getCredentialsResponse_dbUser' - A database user name that is authorized to log on to the database+-- @DbName@ using the password @DbPassword@. If the specified @DbUser@+-- exists in the database, the new user name has the same database+-- privileges as the the user named in @DbUser@. By default, the user is+-- added to PUBLIC.+--+-- 'expiration', 'getCredentialsResponse_expiration' - The date and time the password in @DbPassword@ expires.+--+-- 'nextRefreshTime', 'getCredentialsResponse_nextRefreshTime' - The date and time of when the @DbUser@ and @DbPassword@ authorization+-- refreshes.+--+-- 'httpStatus', 'getCredentialsResponse_httpStatus' - The response's http status code.+newGetCredentialsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetCredentialsResponse+newGetCredentialsResponse pHttpStatus_ =+  GetCredentialsResponse'+    { dbPassword =+        Prelude.Nothing,+      dbUser = Prelude.Nothing,+      expiration = Prelude.Nothing,+      nextRefreshTime = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A temporary password that authorizes the user name returned by @DbUser@+-- to log on to the database @DbName@.+getCredentialsResponse_dbPassword :: Lens.Lens' GetCredentialsResponse (Prelude.Maybe Prelude.Text)+getCredentialsResponse_dbPassword = Lens.lens (\GetCredentialsResponse' {dbPassword} -> dbPassword) (\s@GetCredentialsResponse' {} a -> s {dbPassword = a} :: GetCredentialsResponse) Prelude.. Lens.mapping Data._Sensitive++-- | A database user name that is authorized to log on to the database+-- @DbName@ using the password @DbPassword@. If the specified @DbUser@+-- exists in the database, the new user name has the same database+-- privileges as the the user named in @DbUser@. By default, the user is+-- added to PUBLIC.+getCredentialsResponse_dbUser :: Lens.Lens' GetCredentialsResponse (Prelude.Maybe Prelude.Text)+getCredentialsResponse_dbUser = Lens.lens (\GetCredentialsResponse' {dbUser} -> dbUser) (\s@GetCredentialsResponse' {} a -> s {dbUser = a} :: GetCredentialsResponse) Prelude.. Lens.mapping Data._Sensitive++-- | The date and time the password in @DbPassword@ expires.+getCredentialsResponse_expiration :: Lens.Lens' GetCredentialsResponse (Prelude.Maybe Prelude.UTCTime)+getCredentialsResponse_expiration = Lens.lens (\GetCredentialsResponse' {expiration} -> expiration) (\s@GetCredentialsResponse' {} a -> s {expiration = a} :: GetCredentialsResponse) Prelude.. Lens.mapping Data._Time++-- | The date and time of when the @DbUser@ and @DbPassword@ authorization+-- refreshes.+getCredentialsResponse_nextRefreshTime :: Lens.Lens' GetCredentialsResponse (Prelude.Maybe Prelude.UTCTime)+getCredentialsResponse_nextRefreshTime = Lens.lens (\GetCredentialsResponse' {nextRefreshTime} -> nextRefreshTime) (\s@GetCredentialsResponse' {} a -> s {nextRefreshTime = a} :: GetCredentialsResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+getCredentialsResponse_httpStatus :: Lens.Lens' GetCredentialsResponse Prelude.Int+getCredentialsResponse_httpStatus = Lens.lens (\GetCredentialsResponse' {httpStatus} -> httpStatus) (\s@GetCredentialsResponse' {} a -> s {httpStatus = a} :: GetCredentialsResponse)++instance Prelude.NFData GetCredentialsResponse where+  rnf GetCredentialsResponse' {..} =+    Prelude.rnf dbPassword+      `Prelude.seq` Prelude.rnf dbUser+      `Prelude.seq` Prelude.rnf expiration+      `Prelude.seq` Prelude.rnf nextRefreshTime+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/GetEndpointAccess.hs view
@@ -0,0 +1,168 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.GetEndpointAccess+-- 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, such as the name, about a VPC endpoint.+module Amazonka.RedshiftServerLess.GetEndpointAccess+  ( -- * Creating a Request+    GetEndpointAccess (..),+    newGetEndpointAccess,++    -- * Request Lenses+    getEndpointAccess_endpointName,++    -- * Destructuring the Response+    GetEndpointAccessResponse (..),+    newGetEndpointAccessResponse,++    -- * Response Lenses+    getEndpointAccessResponse_endpoint,+    getEndpointAccessResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetEndpointAccess' smart constructor.+data GetEndpointAccess = GetEndpointAccess'+  { -- | The name of the VPC endpoint to return information for.+    endpointName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEndpointAccess' 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:+--+-- 'endpointName', 'getEndpointAccess_endpointName' - The name of the VPC endpoint to return information for.+newGetEndpointAccess ::+  -- | 'endpointName'+  Prelude.Text ->+  GetEndpointAccess+newGetEndpointAccess pEndpointName_ =+  GetEndpointAccess' {endpointName = pEndpointName_}++-- | The name of the VPC endpoint to return information for.+getEndpointAccess_endpointName :: Lens.Lens' GetEndpointAccess Prelude.Text+getEndpointAccess_endpointName = Lens.lens (\GetEndpointAccess' {endpointName} -> endpointName) (\s@GetEndpointAccess' {} a -> s {endpointName = a} :: GetEndpointAccess)++instance Core.AWSRequest GetEndpointAccess where+  type+    AWSResponse GetEndpointAccess =+      GetEndpointAccessResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetEndpointAccessResponse'+            Prelude.<$> (x Data..?> "endpoint")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetEndpointAccess where+  hashWithSalt _salt GetEndpointAccess' {..} =+    _salt `Prelude.hashWithSalt` endpointName++instance Prelude.NFData GetEndpointAccess where+  rnf GetEndpointAccess' {..} = Prelude.rnf endpointName++instance Data.ToHeaders GetEndpointAccess where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.GetEndpointAccess" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetEndpointAccess where+  toJSON GetEndpointAccess' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("endpointName" Data..= endpointName)]+      )++instance Data.ToPath GetEndpointAccess where+  toPath = Prelude.const "/"++instance Data.ToQuery GetEndpointAccess where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetEndpointAccessResponse' smart constructor.+data GetEndpointAccessResponse = GetEndpointAccessResponse'+  { -- | The returned VPC endpoint.+    endpoint :: Prelude.Maybe EndpointAccess,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEndpointAccessResponse' 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:+--+-- 'endpoint', 'getEndpointAccessResponse_endpoint' - The returned VPC endpoint.+--+-- 'httpStatus', 'getEndpointAccessResponse_httpStatus' - The response's http status code.+newGetEndpointAccessResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetEndpointAccessResponse+newGetEndpointAccessResponse pHttpStatus_ =+  GetEndpointAccessResponse'+    { endpoint =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The returned VPC endpoint.+getEndpointAccessResponse_endpoint :: Lens.Lens' GetEndpointAccessResponse (Prelude.Maybe EndpointAccess)+getEndpointAccessResponse_endpoint = Lens.lens (\GetEndpointAccessResponse' {endpoint} -> endpoint) (\s@GetEndpointAccessResponse' {} a -> s {endpoint = a} :: GetEndpointAccessResponse)++-- | The response's http status code.+getEndpointAccessResponse_httpStatus :: Lens.Lens' GetEndpointAccessResponse Prelude.Int+getEndpointAccessResponse_httpStatus = Lens.lens (\GetEndpointAccessResponse' {httpStatus} -> httpStatus) (\s@GetEndpointAccessResponse' {} a -> s {httpStatus = a} :: GetEndpointAccessResponse)++instance Prelude.NFData GetEndpointAccessResponse where+  rnf GetEndpointAccessResponse' {..} =+    Prelude.rnf endpoint+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/GetNamespace.hs view
@@ -0,0 +1,169 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.GetNamespace+-- 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 namespace in Amazon Redshift Serverless.+module Amazonka.RedshiftServerLess.GetNamespace+  ( -- * Creating a Request+    GetNamespace (..),+    newGetNamespace,++    -- * Request Lenses+    getNamespace_namespaceName,++    -- * Destructuring the Response+    GetNamespaceResponse (..),+    newGetNamespaceResponse,++    -- * Response Lenses+    getNamespaceResponse_httpStatus,+    getNamespaceResponse_namespace,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetNamespace' smart constructor.+data GetNamespace = GetNamespace'+  { -- | The name of the namespace to retrieve information for.+    namespaceName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetNamespace' 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:+--+-- 'namespaceName', 'getNamespace_namespaceName' - The name of the namespace to retrieve information for.+newGetNamespace ::+  -- | 'namespaceName'+  Prelude.Text ->+  GetNamespace+newGetNamespace pNamespaceName_ =+  GetNamespace' {namespaceName = pNamespaceName_}++-- | The name of the namespace to retrieve information for.+getNamespace_namespaceName :: Lens.Lens' GetNamespace Prelude.Text+getNamespace_namespaceName = Lens.lens (\GetNamespace' {namespaceName} -> namespaceName) (\s@GetNamespace' {} a -> s {namespaceName = a} :: GetNamespace)++instance Core.AWSRequest GetNamespace where+  type AWSResponse GetNamespace = GetNamespaceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetNamespaceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "namespace")+      )++instance Prelude.Hashable GetNamespace where+  hashWithSalt _salt GetNamespace' {..} =+    _salt `Prelude.hashWithSalt` namespaceName++instance Prelude.NFData GetNamespace where+  rnf GetNamespace' {..} = Prelude.rnf namespaceName++instance Data.ToHeaders GetNamespace where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.GetNamespace" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetNamespace where+  toJSON GetNamespace' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("namespaceName" Data..= namespaceName)+          ]+      )++instance Data.ToPath GetNamespace where+  toPath = Prelude.const "/"++instance Data.ToQuery GetNamespace where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetNamespaceResponse' smart constructor.+data GetNamespaceResponse = GetNamespaceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The returned namespace object.+    namespace :: Namespace+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetNamespaceResponse' 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', 'getNamespaceResponse_httpStatus' - The response's http status code.+--+-- 'namespace', 'getNamespaceResponse_namespace' - The returned namespace object.+newGetNamespaceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'namespace'+  Namespace ->+  GetNamespaceResponse+newGetNamespaceResponse pHttpStatus_ pNamespace_ =+  GetNamespaceResponse'+    { httpStatus = pHttpStatus_,+      namespace = pNamespace_+    }++-- | The response's http status code.+getNamespaceResponse_httpStatus :: Lens.Lens' GetNamespaceResponse Prelude.Int+getNamespaceResponse_httpStatus = Lens.lens (\GetNamespaceResponse' {httpStatus} -> httpStatus) (\s@GetNamespaceResponse' {} a -> s {httpStatus = a} :: GetNamespaceResponse)++-- | The returned namespace object.+getNamespaceResponse_namespace :: Lens.Lens' GetNamespaceResponse Namespace+getNamespaceResponse_namespace = Lens.lens (\GetNamespaceResponse' {namespace} -> namespace) (\s@GetNamespaceResponse' {} a -> s {namespace = a} :: GetNamespaceResponse)++instance Prelude.NFData GetNamespaceResponse where+  rnf GetNamespaceResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf namespace
+ gen/Amazonka/RedshiftServerLess/GetRecoveryPoint.hs view
@@ -0,0 +1,174 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.GetRecoveryPoint+-- 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 recovery point.+module Amazonka.RedshiftServerLess.GetRecoveryPoint+  ( -- * Creating a Request+    GetRecoveryPoint (..),+    newGetRecoveryPoint,++    -- * Request Lenses+    getRecoveryPoint_recoveryPointId,++    -- * Destructuring the Response+    GetRecoveryPointResponse (..),+    newGetRecoveryPointResponse,++    -- * Response Lenses+    getRecoveryPointResponse_recoveryPoint,+    getRecoveryPointResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetRecoveryPoint' smart constructor.+data GetRecoveryPoint = GetRecoveryPoint'+  { -- | The unique identifier of the recovery point to return information for.+    recoveryPointId :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRecoveryPoint' 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:+--+-- 'recoveryPointId', 'getRecoveryPoint_recoveryPointId' - The unique identifier of the recovery point to return information for.+newGetRecoveryPoint ::+  -- | 'recoveryPointId'+  Prelude.Text ->+  GetRecoveryPoint+newGetRecoveryPoint pRecoveryPointId_ =+  GetRecoveryPoint'+    { recoveryPointId =+        pRecoveryPointId_+    }++-- | The unique identifier of the recovery point to return information for.+getRecoveryPoint_recoveryPointId :: Lens.Lens' GetRecoveryPoint Prelude.Text+getRecoveryPoint_recoveryPointId = Lens.lens (\GetRecoveryPoint' {recoveryPointId} -> recoveryPointId) (\s@GetRecoveryPoint' {} a -> s {recoveryPointId = a} :: GetRecoveryPoint)++instance Core.AWSRequest GetRecoveryPoint where+  type+    AWSResponse GetRecoveryPoint =+      GetRecoveryPointResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetRecoveryPointResponse'+            Prelude.<$> (x Data..?> "recoveryPoint")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetRecoveryPoint where+  hashWithSalt _salt GetRecoveryPoint' {..} =+    _salt `Prelude.hashWithSalt` recoveryPointId++instance Prelude.NFData GetRecoveryPoint where+  rnf GetRecoveryPoint' {..} =+    Prelude.rnf recoveryPointId++instance Data.ToHeaders GetRecoveryPoint where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.GetRecoveryPoint" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetRecoveryPoint where+  toJSON GetRecoveryPoint' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("recoveryPointId" Data..= recoveryPointId)+          ]+      )++instance Data.ToPath GetRecoveryPoint where+  toPath = Prelude.const "/"++instance Data.ToQuery GetRecoveryPoint where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetRecoveryPointResponse' smart constructor.+data GetRecoveryPointResponse = GetRecoveryPointResponse'+  { -- | The returned recovery point object.+    recoveryPoint :: Prelude.Maybe RecoveryPoint,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRecoveryPointResponse' 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:+--+-- 'recoveryPoint', 'getRecoveryPointResponse_recoveryPoint' - The returned recovery point object.+--+-- 'httpStatus', 'getRecoveryPointResponse_httpStatus' - The response's http status code.+newGetRecoveryPointResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetRecoveryPointResponse+newGetRecoveryPointResponse pHttpStatus_ =+  GetRecoveryPointResponse'+    { recoveryPoint =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The returned recovery point object.+getRecoveryPointResponse_recoveryPoint :: Lens.Lens' GetRecoveryPointResponse (Prelude.Maybe RecoveryPoint)+getRecoveryPointResponse_recoveryPoint = Lens.lens (\GetRecoveryPointResponse' {recoveryPoint} -> recoveryPoint) (\s@GetRecoveryPointResponse' {} a -> s {recoveryPoint = a} :: GetRecoveryPointResponse)++-- | The response's http status code.+getRecoveryPointResponse_httpStatus :: Lens.Lens' GetRecoveryPointResponse Prelude.Int+getRecoveryPointResponse_httpStatus = Lens.lens (\GetRecoveryPointResponse' {httpStatus} -> httpStatus) (\s@GetRecoveryPointResponse' {} a -> s {httpStatus = a} :: GetRecoveryPointResponse)++instance Prelude.NFData GetRecoveryPointResponse where+  rnf GetRecoveryPointResponse' {..} =+    Prelude.rnf recoveryPoint+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/GetResourcePolicy.hs view
@@ -0,0 +1,168 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.GetResourcePolicy+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a resource policy.+module Amazonka.RedshiftServerLess.GetResourcePolicy+  ( -- * Creating a Request+    GetResourcePolicy (..),+    newGetResourcePolicy,++    -- * Request Lenses+    getResourcePolicy_resourceArn,++    -- * Destructuring the Response+    GetResourcePolicyResponse (..),+    newGetResourcePolicyResponse,++    -- * Response Lenses+    getResourcePolicyResponse_resourcePolicy,+    getResourcePolicyResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetResourcePolicy' smart constructor.+data GetResourcePolicy = GetResourcePolicy'+  { -- | The Amazon Resource Name (ARN) of the resource to return.+    resourceArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourcePolicy' 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', 'getResourcePolicy_resourceArn' - The Amazon Resource Name (ARN) of the resource to return.+newGetResourcePolicy ::+  -- | 'resourceArn'+  Prelude.Text ->+  GetResourcePolicy+newGetResourcePolicy pResourceArn_ =+  GetResourcePolicy' {resourceArn = pResourceArn_}++-- | The Amazon Resource Name (ARN) of the resource to return.+getResourcePolicy_resourceArn :: Lens.Lens' GetResourcePolicy Prelude.Text+getResourcePolicy_resourceArn = Lens.lens (\GetResourcePolicy' {resourceArn} -> resourceArn) (\s@GetResourcePolicy' {} a -> s {resourceArn = a} :: GetResourcePolicy)++instance Core.AWSRequest GetResourcePolicy where+  type+    AWSResponse GetResourcePolicy =+      GetResourcePolicyResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetResourcePolicyResponse'+            Prelude.<$> (x Data..?> "resourcePolicy")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetResourcePolicy where+  hashWithSalt _salt GetResourcePolicy' {..} =+    _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData GetResourcePolicy where+  rnf GetResourcePolicy' {..} = Prelude.rnf resourceArn++instance Data.ToHeaders GetResourcePolicy where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.GetResourcePolicy" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetResourcePolicy where+  toJSON GetResourcePolicy' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("resourceArn" Data..= resourceArn)]+      )++instance Data.ToPath GetResourcePolicy where+  toPath = Prelude.const "/"++instance Data.ToQuery GetResourcePolicy where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetResourcePolicyResponse' smart constructor.+data GetResourcePolicyResponse = GetResourcePolicyResponse'+  { -- | The returned resource policy.+    resourcePolicy :: Prelude.Maybe ResourcePolicy,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourcePolicyResponse' 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:+--+-- 'resourcePolicy', 'getResourcePolicyResponse_resourcePolicy' - The returned resource policy.+--+-- 'httpStatus', 'getResourcePolicyResponse_httpStatus' - The response's http status code.+newGetResourcePolicyResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetResourcePolicyResponse+newGetResourcePolicyResponse pHttpStatus_ =+  GetResourcePolicyResponse'+    { resourcePolicy =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The returned resource policy.+getResourcePolicyResponse_resourcePolicy :: Lens.Lens' GetResourcePolicyResponse (Prelude.Maybe ResourcePolicy)+getResourcePolicyResponse_resourcePolicy = Lens.lens (\GetResourcePolicyResponse' {resourcePolicy} -> resourcePolicy) (\s@GetResourcePolicyResponse' {} a -> s {resourcePolicy = a} :: GetResourcePolicyResponse)++-- | The response's http status code.+getResourcePolicyResponse_httpStatus :: Lens.Lens' GetResourcePolicyResponse Prelude.Int+getResourcePolicyResponse_httpStatus = Lens.lens (\GetResourcePolicyResponse' {httpStatus} -> httpStatus) (\s@GetResourcePolicyResponse' {} a -> s {httpStatus = a} :: GetResourcePolicyResponse)++instance Prelude.NFData GetResourcePolicyResponse where+  rnf GetResourcePolicyResponse' {..} =+    Prelude.rnf resourcePolicy+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/GetSnapshot.hs view
@@ -0,0 +1,197 @@+{-# 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.RedshiftServerLess.GetSnapshot+-- 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 snapshot.+module Amazonka.RedshiftServerLess.GetSnapshot+  ( -- * Creating a Request+    GetSnapshot (..),+    newGetSnapshot,++    -- * Request Lenses+    getSnapshot_ownerAccount,+    getSnapshot_snapshotArn,+    getSnapshot_snapshotName,++    -- * Destructuring the Response+    GetSnapshotResponse (..),+    newGetSnapshotResponse,++    -- * Response Lenses+    getSnapshotResponse_snapshot,+    getSnapshotResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetSnapshot' smart constructor.+data GetSnapshot = GetSnapshot'+  { -- | The owner Amazon Web Services account of a snapshot shared with another+    -- user.+    ownerAccount :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the snapshot to return.+    snapshotArn :: Prelude.Maybe Prelude.Text,+    -- | The name of the snapshot to return.+    snapshotName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSnapshot' 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:+--+-- 'ownerAccount', 'getSnapshot_ownerAccount' - The owner Amazon Web Services account of a snapshot shared with another+-- user.+--+-- 'snapshotArn', 'getSnapshot_snapshotArn' - The Amazon Resource Name (ARN) of the snapshot to return.+--+-- 'snapshotName', 'getSnapshot_snapshotName' - The name of the snapshot to return.+newGetSnapshot ::+  GetSnapshot+newGetSnapshot =+  GetSnapshot'+    { ownerAccount = Prelude.Nothing,+      snapshotArn = Prelude.Nothing,+      snapshotName = Prelude.Nothing+    }++-- | The owner Amazon Web Services account of a snapshot shared with another+-- user.+getSnapshot_ownerAccount :: Lens.Lens' GetSnapshot (Prelude.Maybe Prelude.Text)+getSnapshot_ownerAccount = Lens.lens (\GetSnapshot' {ownerAccount} -> ownerAccount) (\s@GetSnapshot' {} a -> s {ownerAccount = a} :: GetSnapshot)++-- | The Amazon Resource Name (ARN) of the snapshot to return.+getSnapshot_snapshotArn :: Lens.Lens' GetSnapshot (Prelude.Maybe Prelude.Text)+getSnapshot_snapshotArn = Lens.lens (\GetSnapshot' {snapshotArn} -> snapshotArn) (\s@GetSnapshot' {} a -> s {snapshotArn = a} :: GetSnapshot)++-- | The name of the snapshot to return.+getSnapshot_snapshotName :: Lens.Lens' GetSnapshot (Prelude.Maybe Prelude.Text)+getSnapshot_snapshotName = Lens.lens (\GetSnapshot' {snapshotName} -> snapshotName) (\s@GetSnapshot' {} a -> s {snapshotName = a} :: GetSnapshot)++instance Core.AWSRequest GetSnapshot where+  type AWSResponse GetSnapshot = GetSnapshotResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetSnapshotResponse'+            Prelude.<$> (x Data..?> "snapshot")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetSnapshot where+  hashWithSalt _salt GetSnapshot' {..} =+    _salt+      `Prelude.hashWithSalt` ownerAccount+      `Prelude.hashWithSalt` snapshotArn+      `Prelude.hashWithSalt` snapshotName++instance Prelude.NFData GetSnapshot where+  rnf GetSnapshot' {..} =+    Prelude.rnf ownerAccount+      `Prelude.seq` Prelude.rnf snapshotArn+      `Prelude.seq` Prelude.rnf snapshotName++instance Data.ToHeaders GetSnapshot where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.GetSnapshot" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetSnapshot where+  toJSON GetSnapshot' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ownerAccount" Data..=) Prelude.<$> ownerAccount,+            ("snapshotArn" Data..=) Prelude.<$> snapshotArn,+            ("snapshotName" Data..=) Prelude.<$> snapshotName+          ]+      )++instance Data.ToPath GetSnapshot where+  toPath = Prelude.const "/"++instance Data.ToQuery GetSnapshot where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetSnapshotResponse' smart constructor.+data GetSnapshotResponse = GetSnapshotResponse'+  { -- | The returned snapshot object.+    snapshot :: Prelude.Maybe Snapshot,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSnapshotResponse' 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:+--+-- 'snapshot', 'getSnapshotResponse_snapshot' - The returned snapshot object.+--+-- 'httpStatus', 'getSnapshotResponse_httpStatus' - The response's http status code.+newGetSnapshotResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetSnapshotResponse+newGetSnapshotResponse pHttpStatus_ =+  GetSnapshotResponse'+    { snapshot = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The returned snapshot object.+getSnapshotResponse_snapshot :: Lens.Lens' GetSnapshotResponse (Prelude.Maybe Snapshot)+getSnapshotResponse_snapshot = Lens.lens (\GetSnapshotResponse' {snapshot} -> snapshot) (\s@GetSnapshotResponse' {} a -> s {snapshot = a} :: GetSnapshotResponse)++-- | The response's http status code.+getSnapshotResponse_httpStatus :: Lens.Lens' GetSnapshotResponse Prelude.Int+getSnapshotResponse_httpStatus = Lens.lens (\GetSnapshotResponse' {httpStatus} -> httpStatus) (\s@GetSnapshotResponse' {} a -> s {httpStatus = a} :: GetSnapshotResponse)++instance Prelude.NFData GetSnapshotResponse where+  rnf GetSnapshotResponse' {..} =+    Prelude.rnf snapshot+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/GetTableRestoreStatus.hs view
@@ -0,0 +1,179 @@+{-# 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.RedshiftServerLess.GetTableRestoreStatus+-- 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 @TableRestoreStatus@ object.+module Amazonka.RedshiftServerLess.GetTableRestoreStatus+  ( -- * Creating a Request+    GetTableRestoreStatus (..),+    newGetTableRestoreStatus,++    -- * Request Lenses+    getTableRestoreStatus_tableRestoreRequestId,++    -- * Destructuring the Response+    GetTableRestoreStatusResponse (..),+    newGetTableRestoreStatusResponse,++    -- * Response Lenses+    getTableRestoreStatusResponse_tableRestoreStatus,+    getTableRestoreStatusResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetTableRestoreStatus' smart constructor.+data GetTableRestoreStatus = GetTableRestoreStatus'+  { -- | The ID of the @RestoreTableFromSnapshot@ request to return status for.+    tableRestoreRequestId :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetTableRestoreStatus' 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:+--+-- 'tableRestoreRequestId', 'getTableRestoreStatus_tableRestoreRequestId' - The ID of the @RestoreTableFromSnapshot@ request to return status for.+newGetTableRestoreStatus ::+  -- | 'tableRestoreRequestId'+  Prelude.Text ->+  GetTableRestoreStatus+newGetTableRestoreStatus pTableRestoreRequestId_ =+  GetTableRestoreStatus'+    { tableRestoreRequestId =+        pTableRestoreRequestId_+    }++-- | The ID of the @RestoreTableFromSnapshot@ request to return status for.+getTableRestoreStatus_tableRestoreRequestId :: Lens.Lens' GetTableRestoreStatus Prelude.Text+getTableRestoreStatus_tableRestoreRequestId = Lens.lens (\GetTableRestoreStatus' {tableRestoreRequestId} -> tableRestoreRequestId) (\s@GetTableRestoreStatus' {} a -> s {tableRestoreRequestId = a} :: GetTableRestoreStatus)++instance Core.AWSRequest GetTableRestoreStatus where+  type+    AWSResponse GetTableRestoreStatus =+      GetTableRestoreStatusResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetTableRestoreStatusResponse'+            Prelude.<$> (x Data..?> "tableRestoreStatus")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetTableRestoreStatus where+  hashWithSalt _salt GetTableRestoreStatus' {..} =+    _salt `Prelude.hashWithSalt` tableRestoreRequestId++instance Prelude.NFData GetTableRestoreStatus where+  rnf GetTableRestoreStatus' {..} =+    Prelude.rnf tableRestoreRequestId++instance Data.ToHeaders GetTableRestoreStatus where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.GetTableRestoreStatus" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetTableRestoreStatus where+  toJSON GetTableRestoreStatus' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ( "tableRestoreRequestId"+                  Data..= tableRestoreRequestId+              )+          ]+      )++instance Data.ToPath GetTableRestoreStatus where+  toPath = Prelude.const "/"++instance Data.ToQuery GetTableRestoreStatus where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetTableRestoreStatusResponse' smart constructor.+data GetTableRestoreStatusResponse = GetTableRestoreStatusResponse'+  { -- | The returned @TableRestoreStatus@ object that contains information about+    -- the status of your @RestoreTableFromSnapshot@ request.+    tableRestoreStatus :: Prelude.Maybe TableRestoreStatus,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetTableRestoreStatusResponse' 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:+--+-- 'tableRestoreStatus', 'getTableRestoreStatusResponse_tableRestoreStatus' - The returned @TableRestoreStatus@ object that contains information about+-- the status of your @RestoreTableFromSnapshot@ request.+--+-- 'httpStatus', 'getTableRestoreStatusResponse_httpStatus' - The response's http status code.+newGetTableRestoreStatusResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetTableRestoreStatusResponse+newGetTableRestoreStatusResponse pHttpStatus_ =+  GetTableRestoreStatusResponse'+    { tableRestoreStatus =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The returned @TableRestoreStatus@ object that contains information about+-- the status of your @RestoreTableFromSnapshot@ request.+getTableRestoreStatusResponse_tableRestoreStatus :: Lens.Lens' GetTableRestoreStatusResponse (Prelude.Maybe TableRestoreStatus)+getTableRestoreStatusResponse_tableRestoreStatus = Lens.lens (\GetTableRestoreStatusResponse' {tableRestoreStatus} -> tableRestoreStatus) (\s@GetTableRestoreStatusResponse' {} a -> s {tableRestoreStatus = a} :: GetTableRestoreStatusResponse)++-- | The response's http status code.+getTableRestoreStatusResponse_httpStatus :: Lens.Lens' GetTableRestoreStatusResponse Prelude.Int+getTableRestoreStatusResponse_httpStatus = Lens.lens (\GetTableRestoreStatusResponse' {httpStatus} -> httpStatus) (\s@GetTableRestoreStatusResponse' {} a -> s {httpStatus = a} :: GetTableRestoreStatusResponse)++instance Prelude.NFData GetTableRestoreStatusResponse where+  rnf GetTableRestoreStatusResponse' {..} =+    Prelude.rnf tableRestoreStatus+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/GetUsageLimit.hs view
@@ -0,0 +1,168 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.GetUsageLimit+-- 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 usage limit.+module Amazonka.RedshiftServerLess.GetUsageLimit+  ( -- * Creating a Request+    GetUsageLimit (..),+    newGetUsageLimit,++    -- * Request Lenses+    getUsageLimit_usageLimitId,++    -- * Destructuring the Response+    GetUsageLimitResponse (..),+    newGetUsageLimitResponse,++    -- * Response Lenses+    getUsageLimitResponse_usageLimit,+    getUsageLimitResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetUsageLimit' smart constructor.+data GetUsageLimit = GetUsageLimit'+  { -- | The unique identifier of the usage limit to return information for.+    usageLimitId :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetUsageLimit' 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:+--+-- 'usageLimitId', 'getUsageLimit_usageLimitId' - The unique identifier of the usage limit to return information for.+newGetUsageLimit ::+  -- | 'usageLimitId'+  Prelude.Text ->+  GetUsageLimit+newGetUsageLimit pUsageLimitId_ =+  GetUsageLimit' {usageLimitId = pUsageLimitId_}++-- | The unique identifier of the usage limit to return information for.+getUsageLimit_usageLimitId :: Lens.Lens' GetUsageLimit Prelude.Text+getUsageLimit_usageLimitId = Lens.lens (\GetUsageLimit' {usageLimitId} -> usageLimitId) (\s@GetUsageLimit' {} a -> s {usageLimitId = a} :: GetUsageLimit)++instance Core.AWSRequest GetUsageLimit where+  type+    AWSResponse GetUsageLimit =+      GetUsageLimitResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetUsageLimitResponse'+            Prelude.<$> (x Data..?> "usageLimit")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetUsageLimit where+  hashWithSalt _salt GetUsageLimit' {..} =+    _salt `Prelude.hashWithSalt` usageLimitId++instance Prelude.NFData GetUsageLimit where+  rnf GetUsageLimit' {..} = Prelude.rnf usageLimitId++instance Data.ToHeaders GetUsageLimit where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.GetUsageLimit" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetUsageLimit where+  toJSON GetUsageLimit' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("usageLimitId" Data..= usageLimitId)]+      )++instance Data.ToPath GetUsageLimit where+  toPath = Prelude.const "/"++instance Data.ToQuery GetUsageLimit where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetUsageLimitResponse' smart constructor.+data GetUsageLimitResponse = GetUsageLimitResponse'+  { -- | The returned usage limit object.+    usageLimit :: Prelude.Maybe UsageLimit,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetUsageLimitResponse' 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:+--+-- 'usageLimit', 'getUsageLimitResponse_usageLimit' - The returned usage limit object.+--+-- 'httpStatus', 'getUsageLimitResponse_httpStatus' - The response's http status code.+newGetUsageLimitResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetUsageLimitResponse+newGetUsageLimitResponse pHttpStatus_ =+  GetUsageLimitResponse'+    { usageLimit =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The returned usage limit object.+getUsageLimitResponse_usageLimit :: Lens.Lens' GetUsageLimitResponse (Prelude.Maybe UsageLimit)+getUsageLimitResponse_usageLimit = Lens.lens (\GetUsageLimitResponse' {usageLimit} -> usageLimit) (\s@GetUsageLimitResponse' {} a -> s {usageLimit = a} :: GetUsageLimitResponse)++-- | The response's http status code.+getUsageLimitResponse_httpStatus :: Lens.Lens' GetUsageLimitResponse Prelude.Int+getUsageLimitResponse_httpStatus = Lens.lens (\GetUsageLimitResponse' {httpStatus} -> httpStatus) (\s@GetUsageLimitResponse' {} a -> s {httpStatus = a} :: GetUsageLimitResponse)++instance Prelude.NFData GetUsageLimitResponse where+  rnf GetUsageLimitResponse' {..} =+    Prelude.rnf usageLimit+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/GetWorkgroup.hs view
@@ -0,0 +1,169 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.GetWorkgroup+-- 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 workgroup.+module Amazonka.RedshiftServerLess.GetWorkgroup+  ( -- * Creating a Request+    GetWorkgroup (..),+    newGetWorkgroup,++    -- * Request Lenses+    getWorkgroup_workgroupName,++    -- * Destructuring the Response+    GetWorkgroupResponse (..),+    newGetWorkgroupResponse,++    -- * Response Lenses+    getWorkgroupResponse_httpStatus,+    getWorkgroupResponse_workgroup,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetWorkgroup' smart constructor.+data GetWorkgroup = GetWorkgroup'+  { -- | The name of the workgroup to return information for.+    workgroupName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetWorkgroup' 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:+--+-- 'workgroupName', 'getWorkgroup_workgroupName' - The name of the workgroup to return information for.+newGetWorkgroup ::+  -- | 'workgroupName'+  Prelude.Text ->+  GetWorkgroup+newGetWorkgroup pWorkgroupName_ =+  GetWorkgroup' {workgroupName = pWorkgroupName_}++-- | The name of the workgroup to return information for.+getWorkgroup_workgroupName :: Lens.Lens' GetWorkgroup Prelude.Text+getWorkgroup_workgroupName = Lens.lens (\GetWorkgroup' {workgroupName} -> workgroupName) (\s@GetWorkgroup' {} a -> s {workgroupName = a} :: GetWorkgroup)++instance Core.AWSRequest GetWorkgroup where+  type AWSResponse GetWorkgroup = GetWorkgroupResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetWorkgroupResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "workgroup")+      )++instance Prelude.Hashable GetWorkgroup where+  hashWithSalt _salt GetWorkgroup' {..} =+    _salt `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData GetWorkgroup where+  rnf GetWorkgroup' {..} = Prelude.rnf workgroupName++instance Data.ToHeaders GetWorkgroup where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.GetWorkgroup" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetWorkgroup where+  toJSON GetWorkgroup' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("workgroupName" Data..= workgroupName)+          ]+      )++instance Data.ToPath GetWorkgroup where+  toPath = Prelude.const "/"++instance Data.ToQuery GetWorkgroup where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetWorkgroupResponse' smart constructor.+data GetWorkgroupResponse = GetWorkgroupResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The returned workgroup object.+    workgroup :: Workgroup+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetWorkgroupResponse' 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', 'getWorkgroupResponse_httpStatus' - The response's http status code.+--+-- 'workgroup', 'getWorkgroupResponse_workgroup' - The returned workgroup object.+newGetWorkgroupResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'workgroup'+  Workgroup ->+  GetWorkgroupResponse+newGetWorkgroupResponse pHttpStatus_ pWorkgroup_ =+  GetWorkgroupResponse'+    { httpStatus = pHttpStatus_,+      workgroup = pWorkgroup_+    }++-- | The response's http status code.+getWorkgroupResponse_httpStatus :: Lens.Lens' GetWorkgroupResponse Prelude.Int+getWorkgroupResponse_httpStatus = Lens.lens (\GetWorkgroupResponse' {httpStatus} -> httpStatus) (\s@GetWorkgroupResponse' {} a -> s {httpStatus = a} :: GetWorkgroupResponse)++-- | The returned workgroup object.+getWorkgroupResponse_workgroup :: Lens.Lens' GetWorkgroupResponse Workgroup+getWorkgroupResponse_workgroup = Lens.lens (\GetWorkgroupResponse' {workgroup} -> workgroup) (\s@GetWorkgroupResponse' {} a -> s {workgroup = a} :: GetWorkgroupResponse)++instance Prelude.NFData GetWorkgroupResponse where+  rnf GetWorkgroupResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf workgroup
+ gen/Amazonka/RedshiftServerLess/Lens.hs view
@@ -0,0 +1,506 @@+{-# 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.RedshiftServerLess.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.RedshiftServerLess.Lens+  ( -- * Operations++    -- ** ConvertRecoveryPointToSnapshot+    convertRecoveryPointToSnapshot_retentionPeriod,+    convertRecoveryPointToSnapshot_tags,+    convertRecoveryPointToSnapshot_recoveryPointId,+    convertRecoveryPointToSnapshot_snapshotName,+    convertRecoveryPointToSnapshotResponse_snapshot,+    convertRecoveryPointToSnapshotResponse_httpStatus,++    -- ** CreateEndpointAccess+    createEndpointAccess_vpcSecurityGroupIds,+    createEndpointAccess_endpointName,+    createEndpointAccess_subnetIds,+    createEndpointAccess_workgroupName,+    createEndpointAccessResponse_endpoint,+    createEndpointAccessResponse_httpStatus,++    -- ** CreateNamespace+    createNamespace_adminUserPassword,+    createNamespace_adminUsername,+    createNamespace_dbName,+    createNamespace_defaultIamRoleArn,+    createNamespace_iamRoles,+    createNamespace_kmsKeyId,+    createNamespace_logExports,+    createNamespace_tags,+    createNamespace_namespaceName,+    createNamespaceResponse_namespace,+    createNamespaceResponse_httpStatus,++    -- ** CreateSnapshot+    createSnapshot_retentionPeriod,+    createSnapshot_tags,+    createSnapshot_namespaceName,+    createSnapshot_snapshotName,+    createSnapshotResponse_snapshot,+    createSnapshotResponse_httpStatus,++    -- ** CreateUsageLimit+    createUsageLimit_breachAction,+    createUsageLimit_period,+    createUsageLimit_amount,+    createUsageLimit_resourceArn,+    createUsageLimit_usageType,+    createUsageLimitResponse_usageLimit,+    createUsageLimitResponse_httpStatus,++    -- ** CreateWorkgroup+    createWorkgroup_baseCapacity,+    createWorkgroup_configParameters,+    createWorkgroup_enhancedVpcRouting,+    createWorkgroup_port,+    createWorkgroup_publiclyAccessible,+    createWorkgroup_securityGroupIds,+    createWorkgroup_subnetIds,+    createWorkgroup_tags,+    createWorkgroup_namespaceName,+    createWorkgroup_workgroupName,+    createWorkgroupResponse_workgroup,+    createWorkgroupResponse_httpStatus,++    -- ** DeleteEndpointAccess+    deleteEndpointAccess_endpointName,+    deleteEndpointAccessResponse_endpoint,+    deleteEndpointAccessResponse_httpStatus,++    -- ** DeleteNamespace+    deleteNamespace_finalSnapshotName,+    deleteNamespace_finalSnapshotRetentionPeriod,+    deleteNamespace_namespaceName,+    deleteNamespaceResponse_httpStatus,+    deleteNamespaceResponse_namespace,++    -- ** DeleteResourcePolicy+    deleteResourcePolicy_resourceArn,+    deleteResourcePolicyResponse_httpStatus,++    -- ** DeleteSnapshot+    deleteSnapshot_snapshotName,+    deleteSnapshotResponse_snapshot,+    deleteSnapshotResponse_httpStatus,++    -- ** DeleteUsageLimit+    deleteUsageLimit_usageLimitId,+    deleteUsageLimitResponse_usageLimit,+    deleteUsageLimitResponse_httpStatus,++    -- ** DeleteWorkgroup+    deleteWorkgroup_workgroupName,+    deleteWorkgroupResponse_httpStatus,+    deleteWorkgroupResponse_workgroup,++    -- ** GetCredentials+    getCredentials_dbName,+    getCredentials_durationSeconds,+    getCredentials_workgroupName,+    getCredentialsResponse_dbPassword,+    getCredentialsResponse_dbUser,+    getCredentialsResponse_expiration,+    getCredentialsResponse_nextRefreshTime,+    getCredentialsResponse_httpStatus,++    -- ** GetEndpointAccess+    getEndpointAccess_endpointName,+    getEndpointAccessResponse_endpoint,+    getEndpointAccessResponse_httpStatus,++    -- ** GetNamespace+    getNamespace_namespaceName,+    getNamespaceResponse_httpStatus,+    getNamespaceResponse_namespace,++    -- ** GetRecoveryPoint+    getRecoveryPoint_recoveryPointId,+    getRecoveryPointResponse_recoveryPoint,+    getRecoveryPointResponse_httpStatus,++    -- ** GetResourcePolicy+    getResourcePolicy_resourceArn,+    getResourcePolicyResponse_resourcePolicy,+    getResourcePolicyResponse_httpStatus,++    -- ** GetSnapshot+    getSnapshot_ownerAccount,+    getSnapshot_snapshotArn,+    getSnapshot_snapshotName,+    getSnapshotResponse_snapshot,+    getSnapshotResponse_httpStatus,++    -- ** GetTableRestoreStatus+    getTableRestoreStatus_tableRestoreRequestId,+    getTableRestoreStatusResponse_tableRestoreStatus,+    getTableRestoreStatusResponse_httpStatus,++    -- ** GetUsageLimit+    getUsageLimit_usageLimitId,+    getUsageLimitResponse_usageLimit,+    getUsageLimitResponse_httpStatus,++    -- ** GetWorkgroup+    getWorkgroup_workgroupName,+    getWorkgroupResponse_httpStatus,+    getWorkgroupResponse_workgroup,++    -- ** ListEndpointAccess+    listEndpointAccess_maxResults,+    listEndpointAccess_nextToken,+    listEndpointAccess_vpcId,+    listEndpointAccess_workgroupName,+    listEndpointAccessResponse_nextToken,+    listEndpointAccessResponse_httpStatus,+    listEndpointAccessResponse_endpoints,++    -- ** ListNamespaces+    listNamespaces_maxResults,+    listNamespaces_nextToken,+    listNamespacesResponse_nextToken,+    listNamespacesResponse_httpStatus,+    listNamespacesResponse_namespaces,++    -- ** ListRecoveryPoints+    listRecoveryPoints_endTime,+    listRecoveryPoints_maxResults,+    listRecoveryPoints_namespaceArn,+    listRecoveryPoints_namespaceName,+    listRecoveryPoints_nextToken,+    listRecoveryPoints_startTime,+    listRecoveryPointsResponse_nextToken,+    listRecoveryPointsResponse_recoveryPoints,+    listRecoveryPointsResponse_httpStatus,++    -- ** ListSnapshots+    listSnapshots_endTime,+    listSnapshots_maxResults,+    listSnapshots_namespaceArn,+    listSnapshots_namespaceName,+    listSnapshots_nextToken,+    listSnapshots_ownerAccount,+    listSnapshots_startTime,+    listSnapshotsResponse_nextToken,+    listSnapshotsResponse_snapshots,+    listSnapshotsResponse_httpStatus,++    -- ** ListTableRestoreStatus+    listTableRestoreStatus_maxResults,+    listTableRestoreStatus_namespaceName,+    listTableRestoreStatus_nextToken,+    listTableRestoreStatus_workgroupName,+    listTableRestoreStatusResponse_nextToken,+    listTableRestoreStatusResponse_tableRestoreStatuses,+    listTableRestoreStatusResponse_httpStatus,++    -- ** ListTagsForResource+    listTagsForResource_resourceArn,+    listTagsForResourceResponse_tags,+    listTagsForResourceResponse_httpStatus,++    -- ** ListUsageLimits+    listUsageLimits_maxResults,+    listUsageLimits_nextToken,+    listUsageLimits_resourceArn,+    listUsageLimits_usageType,+    listUsageLimitsResponse_nextToken,+    listUsageLimitsResponse_usageLimits,+    listUsageLimitsResponse_httpStatus,++    -- ** ListWorkgroups+    listWorkgroups_maxResults,+    listWorkgroups_nextToken,+    listWorkgroupsResponse_nextToken,+    listWorkgroupsResponse_httpStatus,+    listWorkgroupsResponse_workgroups,++    -- ** PutResourcePolicy+    putResourcePolicy_policy,+    putResourcePolicy_resourceArn,+    putResourcePolicyResponse_resourcePolicy,+    putResourcePolicyResponse_httpStatus,++    -- ** RestoreFromRecoveryPoint+    restoreFromRecoveryPoint_namespaceName,+    restoreFromRecoveryPoint_recoveryPointId,+    restoreFromRecoveryPoint_workgroupName,+    restoreFromRecoveryPointResponse_namespace,+    restoreFromRecoveryPointResponse_recoveryPointId,+    restoreFromRecoveryPointResponse_httpStatus,++    -- ** RestoreFromSnapshot+    restoreFromSnapshot_ownerAccount,+    restoreFromSnapshot_snapshotArn,+    restoreFromSnapshot_snapshotName,+    restoreFromSnapshot_namespaceName,+    restoreFromSnapshot_workgroupName,+    restoreFromSnapshotResponse_namespace,+    restoreFromSnapshotResponse_ownerAccount,+    restoreFromSnapshotResponse_snapshotName,+    restoreFromSnapshotResponse_httpStatus,++    -- ** RestoreTableFromSnapshot+    restoreTableFromSnapshot_activateCaseSensitiveIdentifier,+    restoreTableFromSnapshot_sourceSchemaName,+    restoreTableFromSnapshot_targetDatabaseName,+    restoreTableFromSnapshot_targetSchemaName,+    restoreTableFromSnapshot_namespaceName,+    restoreTableFromSnapshot_newTableName,+    restoreTableFromSnapshot_snapshotName,+    restoreTableFromSnapshot_sourceDatabaseName,+    restoreTableFromSnapshot_sourceTableName,+    restoreTableFromSnapshot_workgroupName,+    restoreTableFromSnapshotResponse_tableRestoreStatus,+    restoreTableFromSnapshotResponse_httpStatus,++    -- ** TagResource+    tagResource_resourceArn,+    tagResource_tags,+    tagResourceResponse_httpStatus,++    -- ** UntagResource+    untagResource_resourceArn,+    untagResource_tagKeys,+    untagResourceResponse_httpStatus,++    -- ** UpdateEndpointAccess+    updateEndpointAccess_vpcSecurityGroupIds,+    updateEndpointAccess_endpointName,+    updateEndpointAccessResponse_endpoint,+    updateEndpointAccessResponse_httpStatus,++    -- ** UpdateNamespace+    updateNamespace_adminUserPassword,+    updateNamespace_adminUsername,+    updateNamespace_defaultIamRoleArn,+    updateNamespace_iamRoles,+    updateNamespace_kmsKeyId,+    updateNamespace_logExports,+    updateNamespace_namespaceName,+    updateNamespaceResponse_httpStatus,+    updateNamespaceResponse_namespace,++    -- ** UpdateSnapshot+    updateSnapshot_retentionPeriod,+    updateSnapshot_snapshotName,+    updateSnapshotResponse_snapshot,+    updateSnapshotResponse_httpStatus,++    -- ** UpdateUsageLimit+    updateUsageLimit_amount,+    updateUsageLimit_breachAction,+    updateUsageLimit_usageLimitId,+    updateUsageLimitResponse_usageLimit,+    updateUsageLimitResponse_httpStatus,++    -- ** UpdateWorkgroup+    updateWorkgroup_baseCapacity,+    updateWorkgroup_configParameters,+    updateWorkgroup_enhancedVpcRouting,+    updateWorkgroup_port,+    updateWorkgroup_publiclyAccessible,+    updateWorkgroup_securityGroupIds,+    updateWorkgroup_subnetIds,+    updateWorkgroup_workgroupName,+    updateWorkgroupResponse_httpStatus,+    updateWorkgroupResponse_workgroup,++    -- * Types++    -- ** ConfigParameter+    configParameter_parameterKey,+    configParameter_parameterValue,++    -- ** Endpoint+    endpoint_address,+    endpoint_port,+    endpoint_vpcEndpoints,++    -- ** EndpointAccess+    endpointAccess_address,+    endpointAccess_endpointArn,+    endpointAccess_endpointCreateTime,+    endpointAccess_endpointName,+    endpointAccess_endpointStatus,+    endpointAccess_port,+    endpointAccess_subnetIds,+    endpointAccess_vpcEndpoint,+    endpointAccess_vpcSecurityGroups,+    endpointAccess_workgroupName,++    -- ** Namespace+    namespace_adminUsername,+    namespace_creationDate,+    namespace_dbName,+    namespace_defaultIamRoleArn,+    namespace_iamRoles,+    namespace_kmsKeyId,+    namespace_logExports,+    namespace_namespaceArn,+    namespace_namespaceId,+    namespace_namespaceName,+    namespace_status,++    -- ** NetworkInterface+    networkInterface_availabilityZone,+    networkInterface_networkInterfaceId,+    networkInterface_privateIpAddress,+    networkInterface_subnetId,++    -- ** RecoveryPoint+    recoveryPoint_namespaceArn,+    recoveryPoint_namespaceName,+    recoveryPoint_recoveryPointCreateTime,+    recoveryPoint_recoveryPointId,+    recoveryPoint_totalSizeInMegaBytes,+    recoveryPoint_workgroupName,++    -- ** ResourcePolicy+    resourcePolicy_policy,+    resourcePolicy_resourceArn,++    -- ** Snapshot+    snapshot_accountsWithProvisionedRestoreAccess,+    snapshot_accountsWithRestoreAccess,+    snapshot_actualIncrementalBackupSizeInMegaBytes,+    snapshot_adminUsername,+    snapshot_backupProgressInMegaBytes,+    snapshot_currentBackupRateInMegaBytesPerSecond,+    snapshot_elapsedTimeInSeconds,+    snapshot_estimatedSecondsToCompletion,+    snapshot_kmsKeyId,+    snapshot_namespaceArn,+    snapshot_namespaceName,+    snapshot_ownerAccount,+    snapshot_snapshotArn,+    snapshot_snapshotCreateTime,+    snapshot_snapshotName,+    snapshot_snapshotRemainingDays,+    snapshot_snapshotRetentionPeriod,+    snapshot_snapshotRetentionStartTime,+    snapshot_status,+    snapshot_totalBackupSizeInMegaBytes,++    -- ** TableRestoreStatus+    tableRestoreStatus_message,+    tableRestoreStatus_namespaceName,+    tableRestoreStatus_newTableName,+    tableRestoreStatus_progressInMegaBytes,+    tableRestoreStatus_requestTime,+    tableRestoreStatus_snapshotName,+    tableRestoreStatus_sourceDatabaseName,+    tableRestoreStatus_sourceSchemaName,+    tableRestoreStatus_sourceTableName,+    tableRestoreStatus_status,+    tableRestoreStatus_tableRestoreRequestId,+    tableRestoreStatus_targetDatabaseName,+    tableRestoreStatus_targetSchemaName,+    tableRestoreStatus_totalDataInMegaBytes,+    tableRestoreStatus_workgroupName,++    -- ** Tag+    tag_key,+    tag_value,++    -- ** UsageLimit+    usageLimit_amount,+    usageLimit_breachAction,+    usageLimit_period,+    usageLimit_resourceArn,+    usageLimit_usageLimitArn,+    usageLimit_usageLimitId,+    usageLimit_usageType,++    -- ** VpcEndpoint+    vpcEndpoint_networkInterfaces,+    vpcEndpoint_vpcEndpointId,+    vpcEndpoint_vpcId,++    -- ** VpcSecurityGroupMembership+    vpcSecurityGroupMembership_status,+    vpcSecurityGroupMembership_vpcSecurityGroupId,++    -- ** Workgroup+    workgroup_baseCapacity,+    workgroup_configParameters,+    workgroup_creationDate,+    workgroup_endpoint,+    workgroup_enhancedVpcRouting,+    workgroup_namespaceName,+    workgroup_port,+    workgroup_publiclyAccessible,+    workgroup_securityGroupIds,+    workgroup_status,+    workgroup_subnetIds,+    workgroup_workgroupArn,+    workgroup_workgroupId,+    workgroup_workgroupName,+  )+where++import Amazonka.RedshiftServerLess.ConvertRecoveryPointToSnapshot+import Amazonka.RedshiftServerLess.CreateEndpointAccess+import Amazonka.RedshiftServerLess.CreateNamespace+import Amazonka.RedshiftServerLess.CreateSnapshot+import Amazonka.RedshiftServerLess.CreateUsageLimit+import Amazonka.RedshiftServerLess.CreateWorkgroup+import Amazonka.RedshiftServerLess.DeleteEndpointAccess+import Amazonka.RedshiftServerLess.DeleteNamespace+import Amazonka.RedshiftServerLess.DeleteResourcePolicy+import Amazonka.RedshiftServerLess.DeleteSnapshot+import Amazonka.RedshiftServerLess.DeleteUsageLimit+import Amazonka.RedshiftServerLess.DeleteWorkgroup+import Amazonka.RedshiftServerLess.GetCredentials+import Amazonka.RedshiftServerLess.GetEndpointAccess+import Amazonka.RedshiftServerLess.GetNamespace+import Amazonka.RedshiftServerLess.GetRecoveryPoint+import Amazonka.RedshiftServerLess.GetResourcePolicy+import Amazonka.RedshiftServerLess.GetSnapshot+import Amazonka.RedshiftServerLess.GetTableRestoreStatus+import Amazonka.RedshiftServerLess.GetUsageLimit+import Amazonka.RedshiftServerLess.GetWorkgroup+import Amazonka.RedshiftServerLess.ListEndpointAccess+import Amazonka.RedshiftServerLess.ListNamespaces+import Amazonka.RedshiftServerLess.ListRecoveryPoints+import Amazonka.RedshiftServerLess.ListSnapshots+import Amazonka.RedshiftServerLess.ListTableRestoreStatus+import Amazonka.RedshiftServerLess.ListTagsForResource+import Amazonka.RedshiftServerLess.ListUsageLimits+import Amazonka.RedshiftServerLess.ListWorkgroups+import Amazonka.RedshiftServerLess.PutResourcePolicy+import Amazonka.RedshiftServerLess.RestoreFromRecoveryPoint+import Amazonka.RedshiftServerLess.RestoreFromSnapshot+import Amazonka.RedshiftServerLess.RestoreTableFromSnapshot+import Amazonka.RedshiftServerLess.TagResource+import Amazonka.RedshiftServerLess.Types.ConfigParameter+import Amazonka.RedshiftServerLess.Types.Endpoint+import Amazonka.RedshiftServerLess.Types.EndpointAccess+import Amazonka.RedshiftServerLess.Types.Namespace+import Amazonka.RedshiftServerLess.Types.NetworkInterface+import Amazonka.RedshiftServerLess.Types.RecoveryPoint+import Amazonka.RedshiftServerLess.Types.ResourcePolicy+import Amazonka.RedshiftServerLess.Types.Snapshot+import Amazonka.RedshiftServerLess.Types.TableRestoreStatus+import Amazonka.RedshiftServerLess.Types.Tag+import Amazonka.RedshiftServerLess.Types.UsageLimit+import Amazonka.RedshiftServerLess.Types.VpcEndpoint+import Amazonka.RedshiftServerLess.Types.VpcSecurityGroupMembership+import Amazonka.RedshiftServerLess.Types.Workgroup+import Amazonka.RedshiftServerLess.UntagResource+import Amazonka.RedshiftServerLess.UpdateEndpointAccess+import Amazonka.RedshiftServerLess.UpdateNamespace+import Amazonka.RedshiftServerLess.UpdateSnapshot+import Amazonka.RedshiftServerLess.UpdateUsageLimit+import Amazonka.RedshiftServerLess.UpdateWorkgroup
+ gen/Amazonka/RedshiftServerLess/ListEndpointAccess.hs view
@@ -0,0 +1,261 @@+{-# 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.RedshiftServerLess.ListEndpointAccess+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an array of @EndpointAccess@ objects and relevant information.+--+-- This operation returns paginated results.+module Amazonka.RedshiftServerLess.ListEndpointAccess+  ( -- * Creating a Request+    ListEndpointAccess (..),+    newListEndpointAccess,++    -- * Request Lenses+    listEndpointAccess_maxResults,+    listEndpointAccess_nextToken,+    listEndpointAccess_vpcId,+    listEndpointAccess_workgroupName,++    -- * Destructuring the Response+    ListEndpointAccessResponse (..),+    newListEndpointAccessResponse,++    -- * Response Lenses+    listEndpointAccessResponse_nextToken,+    listEndpointAccessResponse_httpStatus,+    listEndpointAccessResponse_endpoints,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListEndpointAccess' smart constructor.+data ListEndpointAccess = ListEndpointAccess'+  { -- | An optional parameter that specifies the maximum number of results to+    -- return. You can use @nextToken@ to display the next page of results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | If your initial @ListEndpointAccess@ operation returns a @nextToken@,+    -- you can include the returned @nextToken@ in following+    -- @ListEndpointAccess@ operations, which returns results in the next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The unique identifier of the virtual private cloud with access to Amazon+    -- Redshift Serverless.+    vpcId :: Prelude.Maybe Prelude.Text,+    -- | The name of the workgroup associated with the VPC endpoint to return.+    workgroupName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListEndpointAccess' 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', 'listEndpointAccess_maxResults' - An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+--+-- 'nextToken', 'listEndpointAccess_nextToken' - If your initial @ListEndpointAccess@ operation returns a @nextToken@,+-- you can include the returned @nextToken@ in following+-- @ListEndpointAccess@ operations, which returns results in the next page.+--+-- 'vpcId', 'listEndpointAccess_vpcId' - The unique identifier of the virtual private cloud with access to Amazon+-- Redshift Serverless.+--+-- 'workgroupName', 'listEndpointAccess_workgroupName' - The name of the workgroup associated with the VPC endpoint to return.+newListEndpointAccess ::+  ListEndpointAccess+newListEndpointAccess =+  ListEndpointAccess'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      vpcId = Prelude.Nothing,+      workgroupName = Prelude.Nothing+    }++-- | An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+listEndpointAccess_maxResults :: Lens.Lens' ListEndpointAccess (Prelude.Maybe Prelude.Natural)+listEndpointAccess_maxResults = Lens.lens (\ListEndpointAccess' {maxResults} -> maxResults) (\s@ListEndpointAccess' {} a -> s {maxResults = a} :: ListEndpointAccess)++-- | If your initial @ListEndpointAccess@ operation returns a @nextToken@,+-- you can include the returned @nextToken@ in following+-- @ListEndpointAccess@ operations, which returns results in the next page.+listEndpointAccess_nextToken :: Lens.Lens' ListEndpointAccess (Prelude.Maybe Prelude.Text)+listEndpointAccess_nextToken = Lens.lens (\ListEndpointAccess' {nextToken} -> nextToken) (\s@ListEndpointAccess' {} a -> s {nextToken = a} :: ListEndpointAccess)++-- | The unique identifier of the virtual private cloud with access to Amazon+-- Redshift Serverless.+listEndpointAccess_vpcId :: Lens.Lens' ListEndpointAccess (Prelude.Maybe Prelude.Text)+listEndpointAccess_vpcId = Lens.lens (\ListEndpointAccess' {vpcId} -> vpcId) (\s@ListEndpointAccess' {} a -> s {vpcId = a} :: ListEndpointAccess)++-- | The name of the workgroup associated with the VPC endpoint to return.+listEndpointAccess_workgroupName :: Lens.Lens' ListEndpointAccess (Prelude.Maybe Prelude.Text)+listEndpointAccess_workgroupName = Lens.lens (\ListEndpointAccess' {workgroupName} -> workgroupName) (\s@ListEndpointAccess' {} a -> s {workgroupName = a} :: ListEndpointAccess)++instance Core.AWSPager ListEndpointAccess where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listEndpointAccessResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        (rs Lens.^. listEndpointAccessResponse_endpoints) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listEndpointAccess_nextToken+          Lens..~ rs+          Lens.^? listEndpointAccessResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListEndpointAccess where+  type+    AWSResponse ListEndpointAccess =+      ListEndpointAccessResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListEndpointAccessResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..?> "endpoints" Core..!@ Prelude.mempty)+      )++instance Prelude.Hashable ListEndpointAccess where+  hashWithSalt _salt ListEndpointAccess' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` vpcId+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData ListEndpointAccess where+  rnf ListEndpointAccess' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf vpcId+      `Prelude.seq` Prelude.rnf workgroupName++instance Data.ToHeaders ListEndpointAccess where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.ListEndpointAccess" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListEndpointAccess where+  toJSON ListEndpointAccess' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("vpcId" Data..=) Prelude.<$> vpcId,+            ("workgroupName" Data..=) Prelude.<$> workgroupName+          ]+      )++instance Data.ToPath ListEndpointAccess where+  toPath = Prelude.const "/"++instance Data.ToQuery ListEndpointAccess where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListEndpointAccessResponse' smart constructor.+data ListEndpointAccessResponse = ListEndpointAccessResponse'+  { -- | When @nextToken@ is returned, there are more results available. The+    -- value of @nextToken@ is a unique pagination token for each page. Make+    -- the call again using the returned token to retrieve the next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The returned VPC endpoints.+    endpoints :: [EndpointAccess]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListEndpointAccessResponse' 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', 'listEndpointAccessResponse_nextToken' - When @nextToken@ is returned, there are more results available. The+-- value of @nextToken@ is a unique pagination token for each page. Make+-- the call again using the returned token to retrieve the next page.+--+-- 'httpStatus', 'listEndpointAccessResponse_httpStatus' - The response's http status code.+--+-- 'endpoints', 'listEndpointAccessResponse_endpoints' - The returned VPC endpoints.+newListEndpointAccessResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListEndpointAccessResponse+newListEndpointAccessResponse pHttpStatus_ =+  ListEndpointAccessResponse'+    { nextToken =+        Prelude.Nothing,+      httpStatus = pHttpStatus_,+      endpoints = Prelude.mempty+    }++-- | When @nextToken@ is returned, there are more results available. The+-- value of @nextToken@ is a unique pagination token for each page. Make+-- the call again using the returned token to retrieve the next page.+listEndpointAccessResponse_nextToken :: Lens.Lens' ListEndpointAccessResponse (Prelude.Maybe Prelude.Text)+listEndpointAccessResponse_nextToken = Lens.lens (\ListEndpointAccessResponse' {nextToken} -> nextToken) (\s@ListEndpointAccessResponse' {} a -> s {nextToken = a} :: ListEndpointAccessResponse)++-- | The response's http status code.+listEndpointAccessResponse_httpStatus :: Lens.Lens' ListEndpointAccessResponse Prelude.Int+listEndpointAccessResponse_httpStatus = Lens.lens (\ListEndpointAccessResponse' {httpStatus} -> httpStatus) (\s@ListEndpointAccessResponse' {} a -> s {httpStatus = a} :: ListEndpointAccessResponse)++-- | The returned VPC endpoints.+listEndpointAccessResponse_endpoints :: Lens.Lens' ListEndpointAccessResponse [EndpointAccess]+listEndpointAccessResponse_endpoints = Lens.lens (\ListEndpointAccessResponse' {endpoints} -> endpoints) (\s@ListEndpointAccessResponse' {} a -> s {endpoints = a} :: ListEndpointAccessResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListEndpointAccessResponse where+  rnf ListEndpointAccessResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf endpoints
+ gen/Amazonka/RedshiftServerLess/ListNamespaces.hs view
@@ -0,0 +1,232 @@+{-# 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.RedshiftServerLess.ListNamespaces+-- 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 list of specified namespaces.+--+-- This operation returns paginated results.+module Amazonka.RedshiftServerLess.ListNamespaces+  ( -- * Creating a Request+    ListNamespaces (..),+    newListNamespaces,++    -- * Request Lenses+    listNamespaces_maxResults,+    listNamespaces_nextToken,++    -- * Destructuring the Response+    ListNamespacesResponse (..),+    newListNamespacesResponse,++    -- * Response Lenses+    listNamespacesResponse_nextToken,+    listNamespacesResponse_httpStatus,+    listNamespacesResponse_namespaces,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListNamespaces' smart constructor.+data ListNamespaces = ListNamespaces'+  { -- | An optional parameter that specifies the maximum number of results to+    -- return. You can use @nextToken@ to display the next page of results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | If your initial @ListNamespaces@ operation returns a @nextToken@, you+    -- can include the returned @nextToken@ in following @ListNamespaces@+    -- operations, which returns results in the next page.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListNamespaces' 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', 'listNamespaces_maxResults' - An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+--+-- 'nextToken', 'listNamespaces_nextToken' - If your initial @ListNamespaces@ operation returns a @nextToken@, you+-- can include the returned @nextToken@ in following @ListNamespaces@+-- operations, which returns results in the next page.+newListNamespaces ::+  ListNamespaces+newListNamespaces =+  ListNamespaces'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+listNamespaces_maxResults :: Lens.Lens' ListNamespaces (Prelude.Maybe Prelude.Natural)+listNamespaces_maxResults = Lens.lens (\ListNamespaces' {maxResults} -> maxResults) (\s@ListNamespaces' {} a -> s {maxResults = a} :: ListNamespaces)++-- | If your initial @ListNamespaces@ operation returns a @nextToken@, you+-- can include the returned @nextToken@ in following @ListNamespaces@+-- operations, which returns results in the next page.+listNamespaces_nextToken :: Lens.Lens' ListNamespaces (Prelude.Maybe Prelude.Text)+listNamespaces_nextToken = Lens.lens (\ListNamespaces' {nextToken} -> nextToken) (\s@ListNamespaces' {} a -> s {nextToken = a} :: ListNamespaces)++instance Core.AWSPager ListNamespaces where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listNamespacesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        (rs Lens.^. listNamespacesResponse_namespaces) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listNamespaces_nextToken+          Lens..~ rs+          Lens.^? listNamespacesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListNamespaces where+  type+    AWSResponse ListNamespaces =+      ListNamespacesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListNamespacesResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..?> "namespaces" Core..!@ Prelude.mempty)+      )++instance Prelude.Hashable ListNamespaces where+  hashWithSalt _salt ListNamespaces' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListNamespaces where+  rnf ListNamespaces' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListNamespaces where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.ListNamespaces" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListNamespaces where+  toJSON ListNamespaces' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath ListNamespaces where+  toPath = Prelude.const "/"++instance Data.ToQuery ListNamespaces where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListNamespacesResponse' smart constructor.+data ListNamespacesResponse = ListNamespacesResponse'+  { -- | When @nextToken@ is returned, there are more results available. The+    -- value of @nextToken@ is a unique pagination token for each page. Make+    -- the call again using the returned token to retrieve the next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The list of returned namespaces.+    namespaces :: [Namespace]+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListNamespacesResponse' 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', 'listNamespacesResponse_nextToken' - When @nextToken@ is returned, there are more results available. The+-- value of @nextToken@ is a unique pagination token for each page. Make+-- the call again using the returned token to retrieve the next page.+--+-- 'httpStatus', 'listNamespacesResponse_httpStatus' - The response's http status code.+--+-- 'namespaces', 'listNamespacesResponse_namespaces' - The list of returned namespaces.+newListNamespacesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListNamespacesResponse+newListNamespacesResponse pHttpStatus_ =+  ListNamespacesResponse'+    { nextToken =+        Prelude.Nothing,+      httpStatus = pHttpStatus_,+      namespaces = Prelude.mempty+    }++-- | When @nextToken@ is returned, there are more results available. The+-- value of @nextToken@ is a unique pagination token for each page. Make+-- the call again using the returned token to retrieve the next page.+listNamespacesResponse_nextToken :: Lens.Lens' ListNamespacesResponse (Prelude.Maybe Prelude.Text)+listNamespacesResponse_nextToken = Lens.lens (\ListNamespacesResponse' {nextToken} -> nextToken) (\s@ListNamespacesResponse' {} a -> s {nextToken = a} :: ListNamespacesResponse)++-- | The response's http status code.+listNamespacesResponse_httpStatus :: Lens.Lens' ListNamespacesResponse Prelude.Int+listNamespacesResponse_httpStatus = Lens.lens (\ListNamespacesResponse' {httpStatus} -> httpStatus) (\s@ListNamespacesResponse' {} a -> s {httpStatus = a} :: ListNamespacesResponse)++-- | The list of returned namespaces.+listNamespacesResponse_namespaces :: Lens.Lens' ListNamespacesResponse [Namespace]+listNamespacesResponse_namespaces = Lens.lens (\ListNamespacesResponse' {namespaces} -> namespaces) (\s@ListNamespacesResponse' {} a -> s {namespaces = a} :: ListNamespacesResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListNamespacesResponse where+  rnf ListNamespacesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf namespaces
+ gen/Amazonka/RedshiftServerLess/ListRecoveryPoints.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.RedshiftServerLess.ListRecoveryPoints+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an array of recovery points.+--+-- This operation returns paginated results.+module Amazonka.RedshiftServerLess.ListRecoveryPoints+  ( -- * Creating a Request+    ListRecoveryPoints (..),+    newListRecoveryPoints,++    -- * Request Lenses+    listRecoveryPoints_endTime,+    listRecoveryPoints_maxResults,+    listRecoveryPoints_namespaceArn,+    listRecoveryPoints_namespaceName,+    listRecoveryPoints_nextToken,+    listRecoveryPoints_startTime,++    -- * Destructuring the Response+    ListRecoveryPointsResponse (..),+    newListRecoveryPointsResponse,++    -- * Response Lenses+    listRecoveryPointsResponse_nextToken,+    listRecoveryPointsResponse_recoveryPoints,+    listRecoveryPointsResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListRecoveryPoints' smart constructor.+data ListRecoveryPoints = ListRecoveryPoints'+  { -- | The time when creation of the recovery point finished.+    endTime :: Prelude.Maybe Data.POSIX,+    -- | An optional parameter that specifies the maximum number of results to+    -- return. You can use @nextToken@ to display the next page of results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The Amazon Resource Name (ARN) of the namespace from which to list+    -- recovery points.+    namespaceArn :: Prelude.Maybe Prelude.Text,+    -- | The name of the namespace to list recovery points for.+    namespaceName :: Prelude.Maybe Prelude.Text,+    -- | If your initial @ListRecoveryPoints@ operation returns a @nextToken@,+    -- you can include the returned @nextToken@ in following+    -- @ListRecoveryPoints@ operations, which returns results in the next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The time when the recovery point\'s creation was initiated.+    startTime :: Prelude.Maybe Data.POSIX+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRecoveryPoints' 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:+--+-- 'endTime', 'listRecoveryPoints_endTime' - The time when creation of the recovery point finished.+--+-- 'maxResults', 'listRecoveryPoints_maxResults' - An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+--+-- 'namespaceArn', 'listRecoveryPoints_namespaceArn' - The Amazon Resource Name (ARN) of the namespace from which to list+-- recovery points.+--+-- 'namespaceName', 'listRecoveryPoints_namespaceName' - The name of the namespace to list recovery points for.+--+-- 'nextToken', 'listRecoveryPoints_nextToken' - If your initial @ListRecoveryPoints@ operation returns a @nextToken@,+-- you can include the returned @nextToken@ in following+-- @ListRecoveryPoints@ operations, which returns results in the next page.+--+-- 'startTime', 'listRecoveryPoints_startTime' - The time when the recovery point\'s creation was initiated.+newListRecoveryPoints ::+  ListRecoveryPoints+newListRecoveryPoints =+  ListRecoveryPoints'+    { endTime = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      namespaceArn = Prelude.Nothing,+      namespaceName = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      startTime = Prelude.Nothing+    }++-- | The time when creation of the recovery point finished.+listRecoveryPoints_endTime :: Lens.Lens' ListRecoveryPoints (Prelude.Maybe Prelude.UTCTime)+listRecoveryPoints_endTime = Lens.lens (\ListRecoveryPoints' {endTime} -> endTime) (\s@ListRecoveryPoints' {} a -> s {endTime = a} :: ListRecoveryPoints) Prelude.. Lens.mapping Data._Time++-- | An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+listRecoveryPoints_maxResults :: Lens.Lens' ListRecoveryPoints (Prelude.Maybe Prelude.Natural)+listRecoveryPoints_maxResults = Lens.lens (\ListRecoveryPoints' {maxResults} -> maxResults) (\s@ListRecoveryPoints' {} a -> s {maxResults = a} :: ListRecoveryPoints)++-- | The Amazon Resource Name (ARN) of the namespace from which to list+-- recovery points.+listRecoveryPoints_namespaceArn :: Lens.Lens' ListRecoveryPoints (Prelude.Maybe Prelude.Text)+listRecoveryPoints_namespaceArn = Lens.lens (\ListRecoveryPoints' {namespaceArn} -> namespaceArn) (\s@ListRecoveryPoints' {} a -> s {namespaceArn = a} :: ListRecoveryPoints)++-- | The name of the namespace to list recovery points for.+listRecoveryPoints_namespaceName :: Lens.Lens' ListRecoveryPoints (Prelude.Maybe Prelude.Text)+listRecoveryPoints_namespaceName = Lens.lens (\ListRecoveryPoints' {namespaceName} -> namespaceName) (\s@ListRecoveryPoints' {} a -> s {namespaceName = a} :: ListRecoveryPoints)++-- | If your initial @ListRecoveryPoints@ operation returns a @nextToken@,+-- you can include the returned @nextToken@ in following+-- @ListRecoveryPoints@ operations, which returns results in the next page.+listRecoveryPoints_nextToken :: Lens.Lens' ListRecoveryPoints (Prelude.Maybe Prelude.Text)+listRecoveryPoints_nextToken = Lens.lens (\ListRecoveryPoints' {nextToken} -> nextToken) (\s@ListRecoveryPoints' {} a -> s {nextToken = a} :: ListRecoveryPoints)++-- | The time when the recovery point\'s creation was initiated.+listRecoveryPoints_startTime :: Lens.Lens' ListRecoveryPoints (Prelude.Maybe Prelude.UTCTime)+listRecoveryPoints_startTime = Lens.lens (\ListRecoveryPoints' {startTime} -> startTime) (\s@ListRecoveryPoints' {} a -> s {startTime = a} :: ListRecoveryPoints) Prelude.. Lens.mapping Data._Time++instance Core.AWSPager ListRecoveryPoints where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listRecoveryPointsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listRecoveryPointsResponse_recoveryPoints+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listRecoveryPoints_nextToken+          Lens..~ rs+          Lens.^? listRecoveryPointsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListRecoveryPoints where+  type+    AWSResponse ListRecoveryPoints =+      ListRecoveryPointsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListRecoveryPointsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "recoveryPoints" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListRecoveryPoints where+  hashWithSalt _salt ListRecoveryPoints' {..} =+    _salt+      `Prelude.hashWithSalt` endTime+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` namespaceArn+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` startTime++instance Prelude.NFData ListRecoveryPoints where+  rnf ListRecoveryPoints' {..} =+    Prelude.rnf endTime+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf namespaceArn+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf startTime++instance Data.ToHeaders ListRecoveryPoints where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.ListRecoveryPoints" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListRecoveryPoints where+  toJSON ListRecoveryPoints' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("endTime" Data..=) Prelude.<$> endTime,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("namespaceArn" Data..=) Prelude.<$> namespaceArn,+            ("namespaceName" Data..=) Prelude.<$> namespaceName,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("startTime" Data..=) Prelude.<$> startTime+          ]+      )++instance Data.ToPath ListRecoveryPoints where+  toPath = Prelude.const "/"++instance Data.ToQuery ListRecoveryPoints where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListRecoveryPointsResponse' smart constructor.+data ListRecoveryPointsResponse = ListRecoveryPointsResponse'+  { -- | If @nextToken@ is returned, there are more results available. The value+    -- of @nextToken@ is a unique pagination token for each page. Make the call+    -- again using the returned token to retrieve the next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The returned recovery point objects.+    recoveryPoints :: Prelude.Maybe [RecoveryPoint],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRecoveryPointsResponse' 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', 'listRecoveryPointsResponse_nextToken' - If @nextToken@ is returned, there are more results available. The value+-- of @nextToken@ is a unique pagination token for each page. Make the call+-- again using the returned token to retrieve the next page.+--+-- 'recoveryPoints', 'listRecoveryPointsResponse_recoveryPoints' - The returned recovery point objects.+--+-- 'httpStatus', 'listRecoveryPointsResponse_httpStatus' - The response's http status code.+newListRecoveryPointsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListRecoveryPointsResponse+newListRecoveryPointsResponse pHttpStatus_ =+  ListRecoveryPointsResponse'+    { nextToken =+        Prelude.Nothing,+      recoveryPoints = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If @nextToken@ is returned, there are more results available. The value+-- of @nextToken@ is a unique pagination token for each page. Make the call+-- again using the returned token to retrieve the next page.+listRecoveryPointsResponse_nextToken :: Lens.Lens' ListRecoveryPointsResponse (Prelude.Maybe Prelude.Text)+listRecoveryPointsResponse_nextToken = Lens.lens (\ListRecoveryPointsResponse' {nextToken} -> nextToken) (\s@ListRecoveryPointsResponse' {} a -> s {nextToken = a} :: ListRecoveryPointsResponse)++-- | The returned recovery point objects.+listRecoveryPointsResponse_recoveryPoints :: Lens.Lens' ListRecoveryPointsResponse (Prelude.Maybe [RecoveryPoint])+listRecoveryPointsResponse_recoveryPoints = Lens.lens (\ListRecoveryPointsResponse' {recoveryPoints} -> recoveryPoints) (\s@ListRecoveryPointsResponse' {} a -> s {recoveryPoints = a} :: ListRecoveryPointsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listRecoveryPointsResponse_httpStatus :: Lens.Lens' ListRecoveryPointsResponse Prelude.Int+listRecoveryPointsResponse_httpStatus = Lens.lens (\ListRecoveryPointsResponse' {httpStatus} -> httpStatus) (\s@ListRecoveryPointsResponse' {} a -> s {httpStatus = a} :: ListRecoveryPointsResponse)++instance Prelude.NFData ListRecoveryPointsResponse where+  rnf ListRecoveryPointsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf recoveryPoints+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/ListSnapshots.hs view
@@ -0,0 +1,302 @@+{-# 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.RedshiftServerLess.ListSnapshots+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of snapshots.+--+-- This operation returns paginated results.+module Amazonka.RedshiftServerLess.ListSnapshots+  ( -- * Creating a Request+    ListSnapshots (..),+    newListSnapshots,++    -- * Request Lenses+    listSnapshots_endTime,+    listSnapshots_maxResults,+    listSnapshots_namespaceArn,+    listSnapshots_namespaceName,+    listSnapshots_nextToken,+    listSnapshots_ownerAccount,+    listSnapshots_startTime,++    -- * Destructuring the Response+    ListSnapshotsResponse (..),+    newListSnapshotsResponse,++    -- * Response Lenses+    listSnapshotsResponse_nextToken,+    listSnapshotsResponse_snapshots,+    listSnapshotsResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListSnapshots' smart constructor.+data ListSnapshots = ListSnapshots'+  { -- | The timestamp showing when the snapshot creation finished.+    endTime :: Prelude.Maybe Data.POSIX,+    -- | An optional parameter that specifies the maximum number of results to+    -- return. You can use @nextToken@ to display the next page of results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The Amazon Resource Name (ARN) of the namespace from which to list all+    -- snapshots.+    namespaceArn :: Prelude.Maybe Prelude.Text,+    -- | The namespace from which to list all snapshots.+    namespaceName :: Prelude.Maybe Prelude.Text,+    -- | If @nextToken@ is returned, there are more results available. The value+    -- of @nextToken@ is a unique pagination token for each page. Make the call+    -- again using the returned token to retrieve the next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The owner Amazon Web Services account of the snapshot.+    ownerAccount :: Prelude.Maybe Prelude.Text,+    -- | The time when the creation of the snapshot was initiated.+    startTime :: Prelude.Maybe Data.POSIX+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSnapshots' 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:+--+-- 'endTime', 'listSnapshots_endTime' - The timestamp showing when the snapshot creation finished.+--+-- 'maxResults', 'listSnapshots_maxResults' - An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+--+-- 'namespaceArn', 'listSnapshots_namespaceArn' - The Amazon Resource Name (ARN) of the namespace from which to list all+-- snapshots.+--+-- 'namespaceName', 'listSnapshots_namespaceName' - The namespace from which to list all snapshots.+--+-- 'nextToken', 'listSnapshots_nextToken' - If @nextToken@ is returned, there are more results available. The value+-- of @nextToken@ is a unique pagination token for each page. Make the call+-- again using the returned token to retrieve the next page.+--+-- 'ownerAccount', 'listSnapshots_ownerAccount' - The owner Amazon Web Services account of the snapshot.+--+-- 'startTime', 'listSnapshots_startTime' - The time when the creation of the snapshot was initiated.+newListSnapshots ::+  ListSnapshots+newListSnapshots =+  ListSnapshots'+    { endTime = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      namespaceArn = Prelude.Nothing,+      namespaceName = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      ownerAccount = Prelude.Nothing,+      startTime = Prelude.Nothing+    }++-- | The timestamp showing when the snapshot creation finished.+listSnapshots_endTime :: Lens.Lens' ListSnapshots (Prelude.Maybe Prelude.UTCTime)+listSnapshots_endTime = Lens.lens (\ListSnapshots' {endTime} -> endTime) (\s@ListSnapshots' {} a -> s {endTime = a} :: ListSnapshots) Prelude.. Lens.mapping Data._Time++-- | An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+listSnapshots_maxResults :: Lens.Lens' ListSnapshots (Prelude.Maybe Prelude.Natural)+listSnapshots_maxResults = Lens.lens (\ListSnapshots' {maxResults} -> maxResults) (\s@ListSnapshots' {} a -> s {maxResults = a} :: ListSnapshots)++-- | The Amazon Resource Name (ARN) of the namespace from which to list all+-- snapshots.+listSnapshots_namespaceArn :: Lens.Lens' ListSnapshots (Prelude.Maybe Prelude.Text)+listSnapshots_namespaceArn = Lens.lens (\ListSnapshots' {namespaceArn} -> namespaceArn) (\s@ListSnapshots' {} a -> s {namespaceArn = a} :: ListSnapshots)++-- | The namespace from which to list all snapshots.+listSnapshots_namespaceName :: Lens.Lens' ListSnapshots (Prelude.Maybe Prelude.Text)+listSnapshots_namespaceName = Lens.lens (\ListSnapshots' {namespaceName} -> namespaceName) (\s@ListSnapshots' {} a -> s {namespaceName = a} :: ListSnapshots)++-- | If @nextToken@ is returned, there are more results available. The value+-- of @nextToken@ is a unique pagination token for each page. Make the call+-- again using the returned token to retrieve the next page.+listSnapshots_nextToken :: Lens.Lens' ListSnapshots (Prelude.Maybe Prelude.Text)+listSnapshots_nextToken = Lens.lens (\ListSnapshots' {nextToken} -> nextToken) (\s@ListSnapshots' {} a -> s {nextToken = a} :: ListSnapshots)++-- | The owner Amazon Web Services account of the snapshot.+listSnapshots_ownerAccount :: Lens.Lens' ListSnapshots (Prelude.Maybe Prelude.Text)+listSnapshots_ownerAccount = Lens.lens (\ListSnapshots' {ownerAccount} -> ownerAccount) (\s@ListSnapshots' {} a -> s {ownerAccount = a} :: ListSnapshots)++-- | The time when the creation of the snapshot was initiated.+listSnapshots_startTime :: Lens.Lens' ListSnapshots (Prelude.Maybe Prelude.UTCTime)+listSnapshots_startTime = Lens.lens (\ListSnapshots' {startTime} -> startTime) (\s@ListSnapshots' {} a -> s {startTime = a} :: ListSnapshots) Prelude.. Lens.mapping Data._Time++instance Core.AWSPager ListSnapshots where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listSnapshotsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listSnapshotsResponse_snapshots+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listSnapshots_nextToken+          Lens..~ rs+          Lens.^? listSnapshotsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListSnapshots where+  type+    AWSResponse ListSnapshots =+      ListSnapshotsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListSnapshotsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "snapshots" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListSnapshots where+  hashWithSalt _salt ListSnapshots' {..} =+    _salt+      `Prelude.hashWithSalt` endTime+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` namespaceArn+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` ownerAccount+      `Prelude.hashWithSalt` startTime++instance Prelude.NFData ListSnapshots where+  rnf ListSnapshots' {..} =+    Prelude.rnf endTime+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf namespaceArn+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf ownerAccount+      `Prelude.seq` Prelude.rnf startTime++instance Data.ToHeaders ListSnapshots where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.ListSnapshots" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListSnapshots where+  toJSON ListSnapshots' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("endTime" Data..=) Prelude.<$> endTime,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("namespaceArn" Data..=) Prelude.<$> namespaceArn,+            ("namespaceName" Data..=) Prelude.<$> namespaceName,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("ownerAccount" Data..=) Prelude.<$> ownerAccount,+            ("startTime" Data..=) Prelude.<$> startTime+          ]+      )++instance Data.ToPath ListSnapshots where+  toPath = Prelude.const "/"++instance Data.ToQuery ListSnapshots where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListSnapshotsResponse' smart constructor.+data ListSnapshotsResponse = ListSnapshotsResponse'+  { -- | If @nextToken@ is returned, there are more results available. The value+    -- of @nextToken@ is a unique pagination token for each page. Make the call+    -- again using the returned token to retrieve the next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | All of the returned snapshot objects.+    snapshots :: Prelude.Maybe [Snapshot],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSnapshotsResponse' 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', 'listSnapshotsResponse_nextToken' - If @nextToken@ is returned, there are more results available. The value+-- of @nextToken@ is a unique pagination token for each page. Make the call+-- again using the returned token to retrieve the next page.+--+-- 'snapshots', 'listSnapshotsResponse_snapshots' - All of the returned snapshot objects.+--+-- 'httpStatus', 'listSnapshotsResponse_httpStatus' - The response's http status code.+newListSnapshotsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListSnapshotsResponse+newListSnapshotsResponse pHttpStatus_ =+  ListSnapshotsResponse'+    { nextToken = Prelude.Nothing,+      snapshots = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If @nextToken@ is returned, there are more results available. The value+-- of @nextToken@ is a unique pagination token for each page. Make the call+-- again using the returned token to retrieve the next page.+listSnapshotsResponse_nextToken :: Lens.Lens' ListSnapshotsResponse (Prelude.Maybe Prelude.Text)+listSnapshotsResponse_nextToken = Lens.lens (\ListSnapshotsResponse' {nextToken} -> nextToken) (\s@ListSnapshotsResponse' {} a -> s {nextToken = a} :: ListSnapshotsResponse)++-- | All of the returned snapshot objects.+listSnapshotsResponse_snapshots :: Lens.Lens' ListSnapshotsResponse (Prelude.Maybe [Snapshot])+listSnapshotsResponse_snapshots = Lens.lens (\ListSnapshotsResponse' {snapshots} -> snapshots) (\s@ListSnapshotsResponse' {} a -> s {snapshots = a} :: ListSnapshotsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listSnapshotsResponse_httpStatus :: Lens.Lens' ListSnapshotsResponse Prelude.Int+listSnapshotsResponse_httpStatus = Lens.lens (\ListSnapshotsResponse' {httpStatus} -> httpStatus) (\s@ListSnapshotsResponse' {} a -> s {httpStatus = a} :: ListSnapshotsResponse)++instance Prelude.NFData ListSnapshotsResponse where+  rnf ListSnapshotsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf snapshots+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/ListTableRestoreStatus.hs view
@@ -0,0 +1,280 @@+{-# 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.RedshiftServerLess.ListTableRestoreStatus+-- 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 an array of @TableRestoreStatus@ objects.+--+-- This operation returns paginated results.+module Amazonka.RedshiftServerLess.ListTableRestoreStatus+  ( -- * Creating a Request+    ListTableRestoreStatus (..),+    newListTableRestoreStatus,++    -- * Request Lenses+    listTableRestoreStatus_maxResults,+    listTableRestoreStatus_namespaceName,+    listTableRestoreStatus_nextToken,+    listTableRestoreStatus_workgroupName,++    -- * Destructuring the Response+    ListTableRestoreStatusResponse (..),+    newListTableRestoreStatusResponse,++    -- * Response Lenses+    listTableRestoreStatusResponse_nextToken,+    listTableRestoreStatusResponse_tableRestoreStatuses,+    listTableRestoreStatusResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTableRestoreStatus' smart constructor.+data ListTableRestoreStatus = ListTableRestoreStatus'+  { -- | An optional parameter that specifies the maximum number of results to+    -- return. You can use nextToken to display the next page of results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The namespace from which to list all of the statuses of+    -- @RestoreTableFromSnapshot@ operations .+    namespaceName :: Prelude.Maybe Prelude.Text,+    -- | If your initial @ListTableRestoreStatus@ operation returns a nextToken,+    -- you can include the returned @nextToken@ in following+    -- @ListTableRestoreStatus@ operations. This will return results on the+    -- next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The workgroup from which to list all of the statuses of+    -- @RestoreTableFromSnapshot@ operations.+    workgroupName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTableRestoreStatus' 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', 'listTableRestoreStatus_maxResults' - An optional parameter that specifies the maximum number of results to+-- return. You can use nextToken to display the next page of results.+--+-- 'namespaceName', 'listTableRestoreStatus_namespaceName' - The namespace from which to list all of the statuses of+-- @RestoreTableFromSnapshot@ operations .+--+-- 'nextToken', 'listTableRestoreStatus_nextToken' - If your initial @ListTableRestoreStatus@ operation returns a nextToken,+-- you can include the returned @nextToken@ in following+-- @ListTableRestoreStatus@ operations. This will return results on the+-- next page.+--+-- 'workgroupName', 'listTableRestoreStatus_workgroupName' - The workgroup from which to list all of the statuses of+-- @RestoreTableFromSnapshot@ operations.+newListTableRestoreStatus ::+  ListTableRestoreStatus+newListTableRestoreStatus =+  ListTableRestoreStatus'+    { maxResults =+        Prelude.Nothing,+      namespaceName = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      workgroupName = Prelude.Nothing+    }++-- | An optional parameter that specifies the maximum number of results to+-- return. You can use nextToken to display the next page of results.+listTableRestoreStatus_maxResults :: Lens.Lens' ListTableRestoreStatus (Prelude.Maybe Prelude.Natural)+listTableRestoreStatus_maxResults = Lens.lens (\ListTableRestoreStatus' {maxResults} -> maxResults) (\s@ListTableRestoreStatus' {} a -> s {maxResults = a} :: ListTableRestoreStatus)++-- | The namespace from which to list all of the statuses of+-- @RestoreTableFromSnapshot@ operations .+listTableRestoreStatus_namespaceName :: Lens.Lens' ListTableRestoreStatus (Prelude.Maybe Prelude.Text)+listTableRestoreStatus_namespaceName = Lens.lens (\ListTableRestoreStatus' {namespaceName} -> namespaceName) (\s@ListTableRestoreStatus' {} a -> s {namespaceName = a} :: ListTableRestoreStatus)++-- | If your initial @ListTableRestoreStatus@ operation returns a nextToken,+-- you can include the returned @nextToken@ in following+-- @ListTableRestoreStatus@ operations. This will return results on the+-- next page.+listTableRestoreStatus_nextToken :: Lens.Lens' ListTableRestoreStatus (Prelude.Maybe Prelude.Text)+listTableRestoreStatus_nextToken = Lens.lens (\ListTableRestoreStatus' {nextToken} -> nextToken) (\s@ListTableRestoreStatus' {} a -> s {nextToken = a} :: ListTableRestoreStatus)++-- | The workgroup from which to list all of the statuses of+-- @RestoreTableFromSnapshot@ operations.+listTableRestoreStatus_workgroupName :: Lens.Lens' ListTableRestoreStatus (Prelude.Maybe Prelude.Text)+listTableRestoreStatus_workgroupName = Lens.lens (\ListTableRestoreStatus' {workgroupName} -> workgroupName) (\s@ListTableRestoreStatus' {} a -> s {workgroupName = a} :: ListTableRestoreStatus)++instance Core.AWSPager ListTableRestoreStatus where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listTableRestoreStatusResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listTableRestoreStatusResponse_tableRestoreStatuses+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listTableRestoreStatus_nextToken+          Lens..~ rs+          Lens.^? listTableRestoreStatusResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListTableRestoreStatus where+  type+    AWSResponse ListTableRestoreStatus =+      ListTableRestoreStatusResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListTableRestoreStatusResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> ( x+                            Data..?> "tableRestoreStatuses"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListTableRestoreStatus where+  hashWithSalt _salt ListTableRestoreStatus' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData ListTableRestoreStatus where+  rnf ListTableRestoreStatus' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf workgroupName++instance Data.ToHeaders ListTableRestoreStatus where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.ListTableRestoreStatus" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListTableRestoreStatus where+  toJSON ListTableRestoreStatus' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("namespaceName" Data..=) Prelude.<$> namespaceName,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("workgroupName" Data..=) Prelude.<$> workgroupName+          ]+      )++instance Data.ToPath ListTableRestoreStatus where+  toPath = Prelude.const "/"++instance Data.ToQuery ListTableRestoreStatus where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTableRestoreStatusResponse' smart constructor.+data ListTableRestoreStatusResponse = ListTableRestoreStatusResponse'+  { -- | If your initial @ListTableRestoreStatus@ operation returns a+    -- @nextToken@, you can include the returned @nextToken@ in following+    -- @ListTableRestoreStatus@ operations. This will returns results on the+    -- next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The array of returned @TableRestoreStatus@ objects.+    tableRestoreStatuses :: Prelude.Maybe [TableRestoreStatus],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTableRestoreStatusResponse' 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', 'listTableRestoreStatusResponse_nextToken' - If your initial @ListTableRestoreStatus@ operation returns a+-- @nextToken@, you can include the returned @nextToken@ in following+-- @ListTableRestoreStatus@ operations. This will returns results on the+-- next page.+--+-- 'tableRestoreStatuses', 'listTableRestoreStatusResponse_tableRestoreStatuses' - The array of returned @TableRestoreStatus@ objects.+--+-- 'httpStatus', 'listTableRestoreStatusResponse_httpStatus' - The response's http status code.+newListTableRestoreStatusResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListTableRestoreStatusResponse+newListTableRestoreStatusResponse pHttpStatus_ =+  ListTableRestoreStatusResponse'+    { nextToken =+        Prelude.Nothing,+      tableRestoreStatuses = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If your initial @ListTableRestoreStatus@ operation returns a+-- @nextToken@, you can include the returned @nextToken@ in following+-- @ListTableRestoreStatus@ operations. This will returns results on the+-- next page.+listTableRestoreStatusResponse_nextToken :: Lens.Lens' ListTableRestoreStatusResponse (Prelude.Maybe Prelude.Text)+listTableRestoreStatusResponse_nextToken = Lens.lens (\ListTableRestoreStatusResponse' {nextToken} -> nextToken) (\s@ListTableRestoreStatusResponse' {} a -> s {nextToken = a} :: ListTableRestoreStatusResponse)++-- | The array of returned @TableRestoreStatus@ objects.+listTableRestoreStatusResponse_tableRestoreStatuses :: Lens.Lens' ListTableRestoreStatusResponse (Prelude.Maybe [TableRestoreStatus])+listTableRestoreStatusResponse_tableRestoreStatuses = Lens.lens (\ListTableRestoreStatusResponse' {tableRestoreStatuses} -> tableRestoreStatuses) (\s@ListTableRestoreStatusResponse' {} a -> s {tableRestoreStatuses = a} :: ListTableRestoreStatusResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTableRestoreStatusResponse_httpStatus :: Lens.Lens' ListTableRestoreStatusResponse Prelude.Int+listTableRestoreStatusResponse_httpStatus = Lens.lens (\ListTableRestoreStatusResponse' {httpStatus} -> httpStatus) (\s@ListTableRestoreStatusResponse' {} a -> s {httpStatus = a} :: ListTableRestoreStatusResponse)++instance+  Prelude.NFData+    ListTableRestoreStatusResponse+  where+  rnf ListTableRestoreStatusResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf tableRestoreStatuses+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/ListTagsForResource.hs view
@@ -0,0 +1,169 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.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 the tags assigned to a resource.+module Amazonka.RedshiftServerLess.ListTagsForResource+  ( -- * Creating a Request+    ListTagsForResource (..),+    newListTagsForResource,++    -- * Request Lenses+    listTagsForResource_resourceArn,++    -- * Destructuring the Response+    ListTagsForResourceResponse (..),+    newListTagsForResourceResponse,++    -- * Response Lenses+    listTagsForResourceResponse_tags,+    listTagsForResourceResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+  { -- | The Amazon Resource Name (ARN) of the resource to list tags for.+    resourceArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'listTagsForResource_resourceArn' - The Amazon Resource Name (ARN) of the resource to list tags for.+newListTagsForResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  ListTagsForResource+newListTagsForResource pResourceArn_ =+  ListTagsForResource' {resourceArn = pResourceArn_}++-- | The Amazon Resource Name (ARN) of the resource to list tags for.+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.postJSON (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+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.ListTagsForResource" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListTagsForResource where+  toJSON ListTagsForResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("resourceArn" Data..= resourceArn)]+      )++instance Data.ToPath ListTagsForResource where+  toPath = Prelude.const "/"++instance Data.ToQuery ListTagsForResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+  { -- | A map of the key-value pairs assigned to the resource.+    tags :: Prelude.Maybe [Tag],+    -- | 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' - A map of the key-value pairs assigned to the resource.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+  ListTagsForResourceResponse'+    { tags =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | A map of the key-value pairs assigned to the resource.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe [Tag])+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/RedshiftServerLess/ListUsageLimits.hs view
@@ -0,0 +1,268 @@+{-# 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.RedshiftServerLess.ListUsageLimits+-- 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 usage limits within Amazon Redshift Serverless.+--+-- This operation returns paginated results.+module Amazonka.RedshiftServerLess.ListUsageLimits+  ( -- * Creating a Request+    ListUsageLimits (..),+    newListUsageLimits,++    -- * Request Lenses+    listUsageLimits_maxResults,+    listUsageLimits_nextToken,+    listUsageLimits_resourceArn,+    listUsageLimits_usageType,++    -- * Destructuring the Response+    ListUsageLimitsResponse (..),+    newListUsageLimitsResponse,++    -- * Response Lenses+    listUsageLimitsResponse_nextToken,+    listUsageLimitsResponse_usageLimits,+    listUsageLimitsResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListUsageLimits' smart constructor.+data ListUsageLimits = ListUsageLimits'+  { -- | An optional parameter that specifies the maximum number of results to+    -- return. You can use @nextToken@ to get the next page of results. The+    -- default is 100.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | If your initial @ListUsageLimits@ operation returns a @nextToken@, you+    -- can include the returned @nextToken@ in following @ListUsageLimits@+    -- operations, which returns results in the next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) associated with the resource whose usage+    -- limits you want to list.+    resourceArn :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Redshift Serverless feature whose limits you want to see.+    usageType :: Prelude.Maybe UsageLimitUsageType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListUsageLimits' 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', 'listUsageLimits_maxResults' - An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to get the next page of results. The+-- default is 100.+--+-- 'nextToken', 'listUsageLimits_nextToken' - If your initial @ListUsageLimits@ operation returns a @nextToken@, you+-- can include the returned @nextToken@ in following @ListUsageLimits@+-- operations, which returns results in the next page.+--+-- 'resourceArn', 'listUsageLimits_resourceArn' - The Amazon Resource Name (ARN) associated with the resource whose usage+-- limits you want to list.+--+-- 'usageType', 'listUsageLimits_usageType' - The Amazon Redshift Serverless feature whose limits you want to see.+newListUsageLimits ::+  ListUsageLimits+newListUsageLimits =+  ListUsageLimits'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      resourceArn = Prelude.Nothing,+      usageType = Prelude.Nothing+    }++-- | An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to get the next page of results. The+-- default is 100.+listUsageLimits_maxResults :: Lens.Lens' ListUsageLimits (Prelude.Maybe Prelude.Natural)+listUsageLimits_maxResults = Lens.lens (\ListUsageLimits' {maxResults} -> maxResults) (\s@ListUsageLimits' {} a -> s {maxResults = a} :: ListUsageLimits)++-- | If your initial @ListUsageLimits@ operation returns a @nextToken@, you+-- can include the returned @nextToken@ in following @ListUsageLimits@+-- operations, which returns results in the next page.+listUsageLimits_nextToken :: Lens.Lens' ListUsageLimits (Prelude.Maybe Prelude.Text)+listUsageLimits_nextToken = Lens.lens (\ListUsageLimits' {nextToken} -> nextToken) (\s@ListUsageLimits' {} a -> s {nextToken = a} :: ListUsageLimits)++-- | The Amazon Resource Name (ARN) associated with the resource whose usage+-- limits you want to list.+listUsageLimits_resourceArn :: Lens.Lens' ListUsageLimits (Prelude.Maybe Prelude.Text)+listUsageLimits_resourceArn = Lens.lens (\ListUsageLimits' {resourceArn} -> resourceArn) (\s@ListUsageLimits' {} a -> s {resourceArn = a} :: ListUsageLimits)++-- | The Amazon Redshift Serverless feature whose limits you want to see.+listUsageLimits_usageType :: Lens.Lens' ListUsageLimits (Prelude.Maybe UsageLimitUsageType)+listUsageLimits_usageType = Lens.lens (\ListUsageLimits' {usageType} -> usageType) (\s@ListUsageLimits' {} a -> s {usageType = a} :: ListUsageLimits)++instance Core.AWSPager ListUsageLimits where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listUsageLimitsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listUsageLimitsResponse_usageLimits+            Prelude.. Lens._Just+            Prelude.. Lens.to Prelude.toList+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listUsageLimits_nextToken+          Lens..~ rs+          Lens.^? listUsageLimitsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListUsageLimits where+  type+    AWSResponse ListUsageLimits =+      ListUsageLimitsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListUsageLimitsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "usageLimits")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListUsageLimits where+  hashWithSalt _salt ListUsageLimits' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` usageType++instance Prelude.NFData ListUsageLimits where+  rnf ListUsageLimits' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf usageType++instance Data.ToHeaders ListUsageLimits where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.ListUsageLimits" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListUsageLimits where+  toJSON ListUsageLimits' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("resourceArn" Data..=) Prelude.<$> resourceArn,+            ("usageType" Data..=) Prelude.<$> usageType+          ]+      )++instance Data.ToPath ListUsageLimits where+  toPath = Prelude.const "/"++instance Data.ToQuery ListUsageLimits where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListUsageLimitsResponse' smart constructor.+data ListUsageLimitsResponse = ListUsageLimitsResponse'+  { -- | When @nextToken@ is returned, there are more results available. The+    -- value of @nextToken@ is a unique pagination token for each page. Make+    -- the call again using the returned token to retrieve the next page.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of returned usage limit objects.+    usageLimits :: Prelude.Maybe (Prelude.NonEmpty UsageLimit),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListUsageLimitsResponse' 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', 'listUsageLimitsResponse_nextToken' - When @nextToken@ is returned, there are more results available. The+-- value of @nextToken@ is a unique pagination token for each page. Make+-- the call again using the returned token to retrieve the next page.+--+-- 'usageLimits', 'listUsageLimitsResponse_usageLimits' - An array of returned usage limit objects.+--+-- 'httpStatus', 'listUsageLimitsResponse_httpStatus' - The response's http status code.+newListUsageLimitsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListUsageLimitsResponse+newListUsageLimitsResponse pHttpStatus_ =+  ListUsageLimitsResponse'+    { nextToken =+        Prelude.Nothing,+      usageLimits = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | When @nextToken@ is returned, there are more results available. The+-- value of @nextToken@ is a unique pagination token for each page. Make+-- the call again using the returned token to retrieve the next page.+listUsageLimitsResponse_nextToken :: Lens.Lens' ListUsageLimitsResponse (Prelude.Maybe Prelude.Text)+listUsageLimitsResponse_nextToken = Lens.lens (\ListUsageLimitsResponse' {nextToken} -> nextToken) (\s@ListUsageLimitsResponse' {} a -> s {nextToken = a} :: ListUsageLimitsResponse)++-- | An array of returned usage limit objects.+listUsageLimitsResponse_usageLimits :: Lens.Lens' ListUsageLimitsResponse (Prelude.Maybe (Prelude.NonEmpty UsageLimit))+listUsageLimitsResponse_usageLimits = Lens.lens (\ListUsageLimitsResponse' {usageLimits} -> usageLimits) (\s@ListUsageLimitsResponse' {} a -> s {usageLimits = a} :: ListUsageLimitsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listUsageLimitsResponse_httpStatus :: Lens.Lens' ListUsageLimitsResponse Prelude.Int+listUsageLimitsResponse_httpStatus = Lens.lens (\ListUsageLimitsResponse' {httpStatus} -> httpStatus) (\s@ListUsageLimitsResponse' {} a -> s {httpStatus = a} :: ListUsageLimitsResponse)++instance Prelude.NFData ListUsageLimitsResponse where+  rnf ListUsageLimitsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf usageLimits+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/ListWorkgroups.hs view
@@ -0,0 +1,232 @@+{-# 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.RedshiftServerLess.ListWorkgroups+-- 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 list of specified workgroups.+--+-- This operation returns paginated results.+module Amazonka.RedshiftServerLess.ListWorkgroups+  ( -- * Creating a Request+    ListWorkgroups (..),+    newListWorkgroups,++    -- * Request Lenses+    listWorkgroups_maxResults,+    listWorkgroups_nextToken,++    -- * Destructuring the Response+    ListWorkgroupsResponse (..),+    newListWorkgroupsResponse,++    -- * Response Lenses+    listWorkgroupsResponse_nextToken,+    listWorkgroupsResponse_httpStatus,+    listWorkgroupsResponse_workgroups,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListWorkgroups' smart constructor.+data ListWorkgroups = ListWorkgroups'+  { -- | An optional parameter that specifies the maximum number of results to+    -- return. You can use @nextToken@ to display the next page of results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | If your initial ListWorkgroups operation returns a @nextToken@, you can+    -- include the returned @nextToken@ in following ListNamespaces operations,+    -- which returns results in the next page.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListWorkgroups' 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', 'listWorkgroups_maxResults' - An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+--+-- 'nextToken', 'listWorkgroups_nextToken' - If your initial ListWorkgroups operation returns a @nextToken@, you can+-- include the returned @nextToken@ in following ListNamespaces operations,+-- which returns results in the next page.+newListWorkgroups ::+  ListWorkgroups+newListWorkgroups =+  ListWorkgroups'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | An optional parameter that specifies the maximum number of results to+-- return. You can use @nextToken@ to display the next page of results.+listWorkgroups_maxResults :: Lens.Lens' ListWorkgroups (Prelude.Maybe Prelude.Natural)+listWorkgroups_maxResults = Lens.lens (\ListWorkgroups' {maxResults} -> maxResults) (\s@ListWorkgroups' {} a -> s {maxResults = a} :: ListWorkgroups)++-- | If your initial ListWorkgroups operation returns a @nextToken@, you can+-- include the returned @nextToken@ in following ListNamespaces operations,+-- which returns results in the next page.+listWorkgroups_nextToken :: Lens.Lens' ListWorkgroups (Prelude.Maybe Prelude.Text)+listWorkgroups_nextToken = Lens.lens (\ListWorkgroups' {nextToken} -> nextToken) (\s@ListWorkgroups' {} a -> s {nextToken = a} :: ListWorkgroups)++instance Core.AWSPager ListWorkgroups where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listWorkgroupsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        (rs Lens.^. listWorkgroupsResponse_workgroups) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listWorkgroups_nextToken+          Lens..~ rs+          Lens.^? listWorkgroupsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListWorkgroups where+  type+    AWSResponse ListWorkgroups =+      ListWorkgroupsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListWorkgroupsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..?> "workgroups" Core..!@ Prelude.mempty)+      )++instance Prelude.Hashable ListWorkgroups where+  hashWithSalt _salt ListWorkgroups' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListWorkgroups where+  rnf ListWorkgroups' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListWorkgroups where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.ListWorkgroups" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListWorkgroups where+  toJSON ListWorkgroups' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath ListWorkgroups where+  toPath = Prelude.const "/"++instance Data.ToQuery ListWorkgroups where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListWorkgroupsResponse' smart constructor.+data ListWorkgroupsResponse = ListWorkgroupsResponse'+  { -- | If @nextToken@ is returned, there are more results available. The value+    -- of @nextToken@ is a unique pagination token for each page. To retrieve+    -- the next page, make the call again using the returned token.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The returned array of workgroups.+    workgroups :: [Workgroup]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListWorkgroupsResponse' 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', 'listWorkgroupsResponse_nextToken' - If @nextToken@ is returned, there are more results available. The value+-- of @nextToken@ is a unique pagination token for each page. To retrieve+-- the next page, make the call again using the returned token.+--+-- 'httpStatus', 'listWorkgroupsResponse_httpStatus' - The response's http status code.+--+-- 'workgroups', 'listWorkgroupsResponse_workgroups' - The returned array of workgroups.+newListWorkgroupsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListWorkgroupsResponse+newListWorkgroupsResponse pHttpStatus_ =+  ListWorkgroupsResponse'+    { nextToken =+        Prelude.Nothing,+      httpStatus = pHttpStatus_,+      workgroups = Prelude.mempty+    }++-- | If @nextToken@ is returned, there are more results available. The value+-- of @nextToken@ is a unique pagination token for each page. To retrieve+-- the next page, make the call again using the returned token.+listWorkgroupsResponse_nextToken :: Lens.Lens' ListWorkgroupsResponse (Prelude.Maybe Prelude.Text)+listWorkgroupsResponse_nextToken = Lens.lens (\ListWorkgroupsResponse' {nextToken} -> nextToken) (\s@ListWorkgroupsResponse' {} a -> s {nextToken = a} :: ListWorkgroupsResponse)++-- | The response's http status code.+listWorkgroupsResponse_httpStatus :: Lens.Lens' ListWorkgroupsResponse Prelude.Int+listWorkgroupsResponse_httpStatus = Lens.lens (\ListWorkgroupsResponse' {httpStatus} -> httpStatus) (\s@ListWorkgroupsResponse' {} a -> s {httpStatus = a} :: ListWorkgroupsResponse)++-- | The returned array of workgroups.+listWorkgroupsResponse_workgroups :: Lens.Lens' ListWorkgroupsResponse [Workgroup]+listWorkgroupsResponse_workgroups = Lens.lens (\ListWorkgroupsResponse' {workgroups} -> workgroups) (\s@ListWorkgroupsResponse' {} a -> s {workgroups = a} :: ListWorkgroupsResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListWorkgroupsResponse where+  rnf ListWorkgroupsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf workgroups
+ gen/Amazonka/RedshiftServerLess/PutResourcePolicy.hs view
@@ -0,0 +1,201 @@+{-# 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.RedshiftServerLess.PutResourcePolicy+-- 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 or updates a resource policy. Currently, you can use policies to+-- share snapshots across Amazon Web Services accounts.+module Amazonka.RedshiftServerLess.PutResourcePolicy+  ( -- * Creating a Request+    PutResourcePolicy (..),+    newPutResourcePolicy,++    -- * Request Lenses+    putResourcePolicy_policy,+    putResourcePolicy_resourceArn,++    -- * Destructuring the Response+    PutResourcePolicyResponse (..),+    newPutResourcePolicyResponse,++    -- * Response Lenses+    putResourcePolicyResponse_resourcePolicy,+    putResourcePolicyResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newPutResourcePolicy' smart constructor.+data PutResourcePolicy = PutResourcePolicy'+  { -- | The policy to create or update. For example, the following policy grants+    -- a user authorization to restore a snapshot.+    --+    -- @\"{\\\"Version\\\": \\\"2012-10-17\\\", \\\"Statement\\\" : [{ \\\"Sid\\\": \\\"AllowUserRestoreFromSnapshot\\\", \\\"Principal\\\":{\\\"AWS\\\": [\\\"739247239426\\\"]}, \\\"Action\\\": [\\\"redshift-serverless:RestoreFromSnapshot\\\"] , \\\"Effect\\\": \\\"Allow\\\" }]}\"@+    policy :: Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the account to create or update a+    -- resource policy for.+    resourceArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutResourcePolicy' 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:+--+-- 'policy', 'putResourcePolicy_policy' - The policy to create or update. For example, the following policy grants+-- a user authorization to restore a snapshot.+--+-- @\"{\\\"Version\\\": \\\"2012-10-17\\\", \\\"Statement\\\" : [{ \\\"Sid\\\": \\\"AllowUserRestoreFromSnapshot\\\", \\\"Principal\\\":{\\\"AWS\\\": [\\\"739247239426\\\"]}, \\\"Action\\\": [\\\"redshift-serverless:RestoreFromSnapshot\\\"] , \\\"Effect\\\": \\\"Allow\\\" }]}\"@+--+-- 'resourceArn', 'putResourcePolicy_resourceArn' - The Amazon Resource Name (ARN) of the account to create or update a+-- resource policy for.+newPutResourcePolicy ::+  -- | 'policy'+  Prelude.Text ->+  -- | 'resourceArn'+  Prelude.Text ->+  PutResourcePolicy+newPutResourcePolicy pPolicy_ pResourceArn_ =+  PutResourcePolicy'+    { policy = pPolicy_,+      resourceArn = pResourceArn_+    }++-- | The policy to create or update. For example, the following policy grants+-- a user authorization to restore a snapshot.+--+-- @\"{\\\"Version\\\": \\\"2012-10-17\\\", \\\"Statement\\\" : [{ \\\"Sid\\\": \\\"AllowUserRestoreFromSnapshot\\\", \\\"Principal\\\":{\\\"AWS\\\": [\\\"739247239426\\\"]}, \\\"Action\\\": [\\\"redshift-serverless:RestoreFromSnapshot\\\"] , \\\"Effect\\\": \\\"Allow\\\" }]}\"@+putResourcePolicy_policy :: Lens.Lens' PutResourcePolicy Prelude.Text+putResourcePolicy_policy = Lens.lens (\PutResourcePolicy' {policy} -> policy) (\s@PutResourcePolicy' {} a -> s {policy = a} :: PutResourcePolicy)++-- | The Amazon Resource Name (ARN) of the account to create or update a+-- resource policy for.+putResourcePolicy_resourceArn :: Lens.Lens' PutResourcePolicy Prelude.Text+putResourcePolicy_resourceArn = Lens.lens (\PutResourcePolicy' {resourceArn} -> resourceArn) (\s@PutResourcePolicy' {} a -> s {resourceArn = a} :: PutResourcePolicy)++instance Core.AWSRequest PutResourcePolicy where+  type+    AWSResponse PutResourcePolicy =+      PutResourcePolicyResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          PutResourcePolicyResponse'+            Prelude.<$> (x Data..?> "resourcePolicy")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable PutResourcePolicy where+  hashWithSalt _salt PutResourcePolicy' {..} =+    _salt+      `Prelude.hashWithSalt` policy+      `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData PutResourcePolicy where+  rnf PutResourcePolicy' {..} =+    Prelude.rnf policy+      `Prelude.seq` Prelude.rnf resourceArn++instance Data.ToHeaders PutResourcePolicy where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.PutResourcePolicy" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON PutResourcePolicy where+  toJSON PutResourcePolicy' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("policy" Data..= policy),+            Prelude.Just ("resourceArn" Data..= resourceArn)+          ]+      )++instance Data.ToPath PutResourcePolicy where+  toPath = Prelude.const "/"++instance Data.ToQuery PutResourcePolicy where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutResourcePolicyResponse' smart constructor.+data PutResourcePolicyResponse = PutResourcePolicyResponse'+  { -- | The policy that was created or updated.+    resourcePolicy :: Prelude.Maybe ResourcePolicy,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutResourcePolicyResponse' 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:+--+-- 'resourcePolicy', 'putResourcePolicyResponse_resourcePolicy' - The policy that was created or updated.+--+-- 'httpStatus', 'putResourcePolicyResponse_httpStatus' - The response's http status code.+newPutResourcePolicyResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  PutResourcePolicyResponse+newPutResourcePolicyResponse pHttpStatus_ =+  PutResourcePolicyResponse'+    { resourcePolicy =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The policy that was created or updated.+putResourcePolicyResponse_resourcePolicy :: Lens.Lens' PutResourcePolicyResponse (Prelude.Maybe ResourcePolicy)+putResourcePolicyResponse_resourcePolicy = Lens.lens (\PutResourcePolicyResponse' {resourcePolicy} -> resourcePolicy) (\s@PutResourcePolicyResponse' {} a -> s {resourcePolicy = a} :: PutResourcePolicyResponse)++-- | The response's http status code.+putResourcePolicyResponse_httpStatus :: Lens.Lens' PutResourcePolicyResponse Prelude.Int+putResourcePolicyResponse_httpStatus = Lens.lens (\PutResourcePolicyResponse' {httpStatus} -> httpStatus) (\s@PutResourcePolicyResponse' {} a -> s {httpStatus = a} :: PutResourcePolicyResponse)++instance Prelude.NFData PutResourcePolicyResponse where+  rnf PutResourcePolicyResponse' {..} =+    Prelude.rnf resourcePolicy+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/RestoreFromRecoveryPoint.hs view
@@ -0,0 +1,225 @@+{-# 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.RedshiftServerLess.RestoreFromRecoveryPoint+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Restore the data from a recovery point.+module Amazonka.RedshiftServerLess.RestoreFromRecoveryPoint+  ( -- * Creating a Request+    RestoreFromRecoveryPoint (..),+    newRestoreFromRecoveryPoint,++    -- * Request Lenses+    restoreFromRecoveryPoint_namespaceName,+    restoreFromRecoveryPoint_recoveryPointId,+    restoreFromRecoveryPoint_workgroupName,++    -- * Destructuring the Response+    RestoreFromRecoveryPointResponse (..),+    newRestoreFromRecoveryPointResponse,++    -- * Response Lenses+    restoreFromRecoveryPointResponse_namespace,+    restoreFromRecoveryPointResponse_recoveryPointId,+    restoreFromRecoveryPointResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newRestoreFromRecoveryPoint' smart constructor.+data RestoreFromRecoveryPoint = RestoreFromRecoveryPoint'+  { -- | The name of the namespace to restore data into.+    namespaceName :: Prelude.Text,+    -- | The unique identifier of the recovery point to restore from.+    recoveryPointId :: Prelude.Text,+    -- | The name of the workgroup used to restore data.+    workgroupName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RestoreFromRecoveryPoint' 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:+--+-- 'namespaceName', 'restoreFromRecoveryPoint_namespaceName' - The name of the namespace to restore data into.+--+-- 'recoveryPointId', 'restoreFromRecoveryPoint_recoveryPointId' - The unique identifier of the recovery point to restore from.+--+-- 'workgroupName', 'restoreFromRecoveryPoint_workgroupName' - The name of the workgroup used to restore data.+newRestoreFromRecoveryPoint ::+  -- | 'namespaceName'+  Prelude.Text ->+  -- | 'recoveryPointId'+  Prelude.Text ->+  -- | 'workgroupName'+  Prelude.Text ->+  RestoreFromRecoveryPoint+newRestoreFromRecoveryPoint+  pNamespaceName_+  pRecoveryPointId_+  pWorkgroupName_ =+    RestoreFromRecoveryPoint'+      { namespaceName =+          pNamespaceName_,+        recoveryPointId = pRecoveryPointId_,+        workgroupName = pWorkgroupName_+      }++-- | The name of the namespace to restore data into.+restoreFromRecoveryPoint_namespaceName :: Lens.Lens' RestoreFromRecoveryPoint Prelude.Text+restoreFromRecoveryPoint_namespaceName = Lens.lens (\RestoreFromRecoveryPoint' {namespaceName} -> namespaceName) (\s@RestoreFromRecoveryPoint' {} a -> s {namespaceName = a} :: RestoreFromRecoveryPoint)++-- | The unique identifier of the recovery point to restore from.+restoreFromRecoveryPoint_recoveryPointId :: Lens.Lens' RestoreFromRecoveryPoint Prelude.Text+restoreFromRecoveryPoint_recoveryPointId = Lens.lens (\RestoreFromRecoveryPoint' {recoveryPointId} -> recoveryPointId) (\s@RestoreFromRecoveryPoint' {} a -> s {recoveryPointId = a} :: RestoreFromRecoveryPoint)++-- | The name of the workgroup used to restore data.+restoreFromRecoveryPoint_workgroupName :: Lens.Lens' RestoreFromRecoveryPoint Prelude.Text+restoreFromRecoveryPoint_workgroupName = Lens.lens (\RestoreFromRecoveryPoint' {workgroupName} -> workgroupName) (\s@RestoreFromRecoveryPoint' {} a -> s {workgroupName = a} :: RestoreFromRecoveryPoint)++instance Core.AWSRequest RestoreFromRecoveryPoint where+  type+    AWSResponse RestoreFromRecoveryPoint =+      RestoreFromRecoveryPointResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          RestoreFromRecoveryPointResponse'+            Prelude.<$> (x Data..?> "namespace")+            Prelude.<*> (x Data..?> "recoveryPointId")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable RestoreFromRecoveryPoint where+  hashWithSalt _salt RestoreFromRecoveryPoint' {..} =+    _salt+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` recoveryPointId+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData RestoreFromRecoveryPoint where+  rnf RestoreFromRecoveryPoint' {..} =+    Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf recoveryPointId+      `Prelude.seq` Prelude.rnf workgroupName++instance Data.ToHeaders RestoreFromRecoveryPoint where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.RestoreFromRecoveryPoint" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON RestoreFromRecoveryPoint where+  toJSON RestoreFromRecoveryPoint' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("namespaceName" Data..= namespaceName),+            Prelude.Just+              ("recoveryPointId" Data..= recoveryPointId),+            Prelude.Just+              ("workgroupName" Data..= workgroupName)+          ]+      )++instance Data.ToPath RestoreFromRecoveryPoint where+  toPath = Prelude.const "/"++instance Data.ToQuery RestoreFromRecoveryPoint where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newRestoreFromRecoveryPointResponse' smart constructor.+data RestoreFromRecoveryPointResponse = RestoreFromRecoveryPointResponse'+  { -- | The namespace that data was restored into.+    namespace :: Prelude.Maybe Namespace,+    -- | The unique identifier of the recovery point used for the restore.+    recoveryPointId :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RestoreFromRecoveryPointResponse' 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:+--+-- 'namespace', 'restoreFromRecoveryPointResponse_namespace' - The namespace that data was restored into.+--+-- 'recoveryPointId', 'restoreFromRecoveryPointResponse_recoveryPointId' - The unique identifier of the recovery point used for the restore.+--+-- 'httpStatus', 'restoreFromRecoveryPointResponse_httpStatus' - The response's http status code.+newRestoreFromRecoveryPointResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  RestoreFromRecoveryPointResponse+newRestoreFromRecoveryPointResponse pHttpStatus_ =+  RestoreFromRecoveryPointResponse'+    { namespace =+        Prelude.Nothing,+      recoveryPointId = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The namespace that data was restored into.+restoreFromRecoveryPointResponse_namespace :: Lens.Lens' RestoreFromRecoveryPointResponse (Prelude.Maybe Namespace)+restoreFromRecoveryPointResponse_namespace = Lens.lens (\RestoreFromRecoveryPointResponse' {namespace} -> namespace) (\s@RestoreFromRecoveryPointResponse' {} a -> s {namespace = a} :: RestoreFromRecoveryPointResponse)++-- | The unique identifier of the recovery point used for the restore.+restoreFromRecoveryPointResponse_recoveryPointId :: Lens.Lens' RestoreFromRecoveryPointResponse (Prelude.Maybe Prelude.Text)+restoreFromRecoveryPointResponse_recoveryPointId = Lens.lens (\RestoreFromRecoveryPointResponse' {recoveryPointId} -> recoveryPointId) (\s@RestoreFromRecoveryPointResponse' {} a -> s {recoveryPointId = a} :: RestoreFromRecoveryPointResponse)++-- | The response's http status code.+restoreFromRecoveryPointResponse_httpStatus :: Lens.Lens' RestoreFromRecoveryPointResponse Prelude.Int+restoreFromRecoveryPointResponse_httpStatus = Lens.lens (\RestoreFromRecoveryPointResponse' {httpStatus} -> httpStatus) (\s@RestoreFromRecoveryPointResponse' {} a -> s {httpStatus = a} :: RestoreFromRecoveryPointResponse)++instance+  Prelude.NFData+    RestoreFromRecoveryPointResponse+  where+  rnf RestoreFromRecoveryPointResponse' {..} =+    Prelude.rnf namespace+      `Prelude.seq` Prelude.rnf recoveryPointId+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/RestoreFromSnapshot.hs view
@@ -0,0 +1,275 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.RestoreFromSnapshot+-- 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 namespace from a snapshot.+module Amazonka.RedshiftServerLess.RestoreFromSnapshot+  ( -- * Creating a Request+    RestoreFromSnapshot (..),+    newRestoreFromSnapshot,++    -- * Request Lenses+    restoreFromSnapshot_ownerAccount,+    restoreFromSnapshot_snapshotArn,+    restoreFromSnapshot_snapshotName,+    restoreFromSnapshot_namespaceName,+    restoreFromSnapshot_workgroupName,++    -- * Destructuring the Response+    RestoreFromSnapshotResponse (..),+    newRestoreFromSnapshotResponse,++    -- * Response Lenses+    restoreFromSnapshotResponse_namespace,+    restoreFromSnapshotResponse_ownerAccount,+    restoreFromSnapshotResponse_snapshotName,+    restoreFromSnapshotResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newRestoreFromSnapshot' smart constructor.+data RestoreFromSnapshot = RestoreFromSnapshot'+  { -- | The Amazon Web Services account that owns the snapshot.+    ownerAccount :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the snapshot to restore from. Required+    -- if restoring from Amazon Redshift Serverless to a provisioned cluster.+    -- Must not be specified at the same time as @snapshotName@.+    --+    -- The format of the ARN is+    -- arn:aws:redshift:\<region>:\<account_id>:snapshot:\<cluster_identifier>\/\<snapshot_identifier>.+    snapshotArn :: Prelude.Maybe Prelude.Text,+    -- | The name of the snapshot to restore from. Must not be specified at the+    -- same time as @snapshotArn@.+    snapshotName :: Prelude.Maybe Prelude.Text,+    -- | The name of the namespace to restore the snapshot to.+    namespaceName :: Prelude.Text,+    -- | The name of the workgroup used to restore the snapshot.+    workgroupName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RestoreFromSnapshot' 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:+--+-- 'ownerAccount', 'restoreFromSnapshot_ownerAccount' - The Amazon Web Services account that owns the snapshot.+--+-- 'snapshotArn', 'restoreFromSnapshot_snapshotArn' - The Amazon Resource Name (ARN) of the snapshot to restore from. Required+-- if restoring from Amazon Redshift Serverless to a provisioned cluster.+-- Must not be specified at the same time as @snapshotName@.+--+-- The format of the ARN is+-- arn:aws:redshift:\<region>:\<account_id>:snapshot:\<cluster_identifier>\/\<snapshot_identifier>.+--+-- 'snapshotName', 'restoreFromSnapshot_snapshotName' - The name of the snapshot to restore from. Must not be specified at the+-- same time as @snapshotArn@.+--+-- 'namespaceName', 'restoreFromSnapshot_namespaceName' - The name of the namespace to restore the snapshot to.+--+-- 'workgroupName', 'restoreFromSnapshot_workgroupName' - The name of the workgroup used to restore the snapshot.+newRestoreFromSnapshot ::+  -- | 'namespaceName'+  Prelude.Text ->+  -- | 'workgroupName'+  Prelude.Text ->+  RestoreFromSnapshot+newRestoreFromSnapshot+  pNamespaceName_+  pWorkgroupName_ =+    RestoreFromSnapshot'+      { ownerAccount =+          Prelude.Nothing,+        snapshotArn = Prelude.Nothing,+        snapshotName = Prelude.Nothing,+        namespaceName = pNamespaceName_,+        workgroupName = pWorkgroupName_+      }++-- | The Amazon Web Services account that owns the snapshot.+restoreFromSnapshot_ownerAccount :: Lens.Lens' RestoreFromSnapshot (Prelude.Maybe Prelude.Text)+restoreFromSnapshot_ownerAccount = Lens.lens (\RestoreFromSnapshot' {ownerAccount} -> ownerAccount) (\s@RestoreFromSnapshot' {} a -> s {ownerAccount = a} :: RestoreFromSnapshot)++-- | The Amazon Resource Name (ARN) of the snapshot to restore from. Required+-- if restoring from Amazon Redshift Serverless to a provisioned cluster.+-- Must not be specified at the same time as @snapshotName@.+--+-- The format of the ARN is+-- arn:aws:redshift:\<region>:\<account_id>:snapshot:\<cluster_identifier>\/\<snapshot_identifier>.+restoreFromSnapshot_snapshotArn :: Lens.Lens' RestoreFromSnapshot (Prelude.Maybe Prelude.Text)+restoreFromSnapshot_snapshotArn = Lens.lens (\RestoreFromSnapshot' {snapshotArn} -> snapshotArn) (\s@RestoreFromSnapshot' {} a -> s {snapshotArn = a} :: RestoreFromSnapshot)++-- | The name of the snapshot to restore from. Must not be specified at the+-- same time as @snapshotArn@.+restoreFromSnapshot_snapshotName :: Lens.Lens' RestoreFromSnapshot (Prelude.Maybe Prelude.Text)+restoreFromSnapshot_snapshotName = Lens.lens (\RestoreFromSnapshot' {snapshotName} -> snapshotName) (\s@RestoreFromSnapshot' {} a -> s {snapshotName = a} :: RestoreFromSnapshot)++-- | The name of the namespace to restore the snapshot to.+restoreFromSnapshot_namespaceName :: Lens.Lens' RestoreFromSnapshot Prelude.Text+restoreFromSnapshot_namespaceName = Lens.lens (\RestoreFromSnapshot' {namespaceName} -> namespaceName) (\s@RestoreFromSnapshot' {} a -> s {namespaceName = a} :: RestoreFromSnapshot)++-- | The name of the workgroup used to restore the snapshot.+restoreFromSnapshot_workgroupName :: Lens.Lens' RestoreFromSnapshot Prelude.Text+restoreFromSnapshot_workgroupName = Lens.lens (\RestoreFromSnapshot' {workgroupName} -> workgroupName) (\s@RestoreFromSnapshot' {} a -> s {workgroupName = a} :: RestoreFromSnapshot)++instance Core.AWSRequest RestoreFromSnapshot where+  type+    AWSResponse RestoreFromSnapshot =+      RestoreFromSnapshotResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          RestoreFromSnapshotResponse'+            Prelude.<$> (x Data..?> "namespace")+            Prelude.<*> (x Data..?> "ownerAccount")+            Prelude.<*> (x Data..?> "snapshotName")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable RestoreFromSnapshot where+  hashWithSalt _salt RestoreFromSnapshot' {..} =+    _salt+      `Prelude.hashWithSalt` ownerAccount+      `Prelude.hashWithSalt` snapshotArn+      `Prelude.hashWithSalt` snapshotName+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData RestoreFromSnapshot where+  rnf RestoreFromSnapshot' {..} =+    Prelude.rnf ownerAccount+      `Prelude.seq` Prelude.rnf snapshotArn+      `Prelude.seq` Prelude.rnf snapshotName+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf workgroupName++instance Data.ToHeaders RestoreFromSnapshot where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.RestoreFromSnapshot" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON RestoreFromSnapshot where+  toJSON RestoreFromSnapshot' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ownerAccount" Data..=) Prelude.<$> ownerAccount,+            ("snapshotArn" Data..=) Prelude.<$> snapshotArn,+            ("snapshotName" Data..=) Prelude.<$> snapshotName,+            Prelude.Just ("namespaceName" Data..= namespaceName),+            Prelude.Just+              ("workgroupName" Data..= workgroupName)+          ]+      )++instance Data.ToPath RestoreFromSnapshot where+  toPath = Prelude.const "/"++instance Data.ToQuery RestoreFromSnapshot where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newRestoreFromSnapshotResponse' smart constructor.+data RestoreFromSnapshotResponse = RestoreFromSnapshotResponse'+  { namespace :: Prelude.Maybe Namespace,+    -- | The owner Amazon Web Services; account of the snapshot that was+    -- restored.+    ownerAccount :: Prelude.Maybe Prelude.Text,+    -- | The name of the snapshot used to restore the namespace.+    snapshotName :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RestoreFromSnapshotResponse' 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:+--+-- 'namespace', 'restoreFromSnapshotResponse_namespace' - Undocumented member.+--+-- 'ownerAccount', 'restoreFromSnapshotResponse_ownerAccount' - The owner Amazon Web Services; account of the snapshot that was+-- restored.+--+-- 'snapshotName', 'restoreFromSnapshotResponse_snapshotName' - The name of the snapshot used to restore the namespace.+--+-- 'httpStatus', 'restoreFromSnapshotResponse_httpStatus' - The response's http status code.+newRestoreFromSnapshotResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  RestoreFromSnapshotResponse+newRestoreFromSnapshotResponse pHttpStatus_ =+  RestoreFromSnapshotResponse'+    { namespace =+        Prelude.Nothing,+      ownerAccount = Prelude.Nothing,+      snapshotName = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Undocumented member.+restoreFromSnapshotResponse_namespace :: Lens.Lens' RestoreFromSnapshotResponse (Prelude.Maybe Namespace)+restoreFromSnapshotResponse_namespace = Lens.lens (\RestoreFromSnapshotResponse' {namespace} -> namespace) (\s@RestoreFromSnapshotResponse' {} a -> s {namespace = a} :: RestoreFromSnapshotResponse)++-- | The owner Amazon Web Services; account of the snapshot that was+-- restored.+restoreFromSnapshotResponse_ownerAccount :: Lens.Lens' RestoreFromSnapshotResponse (Prelude.Maybe Prelude.Text)+restoreFromSnapshotResponse_ownerAccount = Lens.lens (\RestoreFromSnapshotResponse' {ownerAccount} -> ownerAccount) (\s@RestoreFromSnapshotResponse' {} a -> s {ownerAccount = a} :: RestoreFromSnapshotResponse)++-- | The name of the snapshot used to restore the namespace.+restoreFromSnapshotResponse_snapshotName :: Lens.Lens' RestoreFromSnapshotResponse (Prelude.Maybe Prelude.Text)+restoreFromSnapshotResponse_snapshotName = Lens.lens (\RestoreFromSnapshotResponse' {snapshotName} -> snapshotName) (\s@RestoreFromSnapshotResponse' {} a -> s {snapshotName = a} :: RestoreFromSnapshotResponse)++-- | The response's http status code.+restoreFromSnapshotResponse_httpStatus :: Lens.Lens' RestoreFromSnapshotResponse Prelude.Int+restoreFromSnapshotResponse_httpStatus = Lens.lens (\RestoreFromSnapshotResponse' {httpStatus} -> httpStatus) (\s@RestoreFromSnapshotResponse' {} a -> s {httpStatus = a} :: RestoreFromSnapshotResponse)++instance Prelude.NFData RestoreFromSnapshotResponse where+  rnf RestoreFromSnapshotResponse' {..} =+    Prelude.rnf namespace+      `Prelude.seq` Prelude.rnf ownerAccount+      `Prelude.seq` Prelude.rnf snapshotName+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/RestoreTableFromSnapshot.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.RedshiftServerLess.RestoreTableFromSnapshot+-- 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 table from a snapshot to your Amazon Redshift Serverless+-- instance.+module Amazonka.RedshiftServerLess.RestoreTableFromSnapshot+  ( -- * Creating a Request+    RestoreTableFromSnapshot (..),+    newRestoreTableFromSnapshot,++    -- * Request Lenses+    restoreTableFromSnapshot_activateCaseSensitiveIdentifier,+    restoreTableFromSnapshot_sourceSchemaName,+    restoreTableFromSnapshot_targetDatabaseName,+    restoreTableFromSnapshot_targetSchemaName,+    restoreTableFromSnapshot_namespaceName,+    restoreTableFromSnapshot_newTableName,+    restoreTableFromSnapshot_snapshotName,+    restoreTableFromSnapshot_sourceDatabaseName,+    restoreTableFromSnapshot_sourceTableName,+    restoreTableFromSnapshot_workgroupName,++    -- * Destructuring the Response+    RestoreTableFromSnapshotResponse (..),+    newRestoreTableFromSnapshotResponse,++    -- * Response Lenses+    restoreTableFromSnapshotResponse_tableRestoreStatus,+    restoreTableFromSnapshotResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newRestoreTableFromSnapshot' smart constructor.+data RestoreTableFromSnapshot = RestoreTableFromSnapshot'+  { -- | Indicates whether name identifiers for database, schema, and table are+    -- case sensitive. If true, the names are case sensitive. If false, the+    -- names are not case sensitive. The default is false.+    activateCaseSensitiveIdentifier :: Prelude.Maybe Prelude.Bool,+    -- | The name of the source schema that contains the table being restored.+    sourceSchemaName :: Prelude.Maybe Prelude.Text,+    -- | The name of the database to restore the table to.+    targetDatabaseName :: Prelude.Maybe Prelude.Text,+    -- | The name of the schema to restore the table to.+    targetSchemaName :: Prelude.Maybe Prelude.Text,+    -- | The namespace of the snapshot to restore from.+    namespaceName :: Prelude.Text,+    -- | The name of the table to create from the restore operation.+    newTableName' :: Prelude.Text,+    -- | The name of the snapshot to restore the table from.+    snapshotName :: Prelude.Text,+    -- | The name of the source database that contains the table being restored.+    sourceDatabaseName :: Prelude.Text,+    -- | The name of the source table being restored.+    sourceTableName :: Prelude.Text,+    -- | The workgroup to restore the table to.+    workgroupName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RestoreTableFromSnapshot' 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:+--+-- 'activateCaseSensitiveIdentifier', 'restoreTableFromSnapshot_activateCaseSensitiveIdentifier' - Indicates whether name identifiers for database, schema, and table are+-- case sensitive. If true, the names are case sensitive. If false, the+-- names are not case sensitive. The default is false.+--+-- 'sourceSchemaName', 'restoreTableFromSnapshot_sourceSchemaName' - The name of the source schema that contains the table being restored.+--+-- 'targetDatabaseName', 'restoreTableFromSnapshot_targetDatabaseName' - The name of the database to restore the table to.+--+-- 'targetSchemaName', 'restoreTableFromSnapshot_targetSchemaName' - The name of the schema to restore the table to.+--+-- 'namespaceName', 'restoreTableFromSnapshot_namespaceName' - The namespace of the snapshot to restore from.+--+-- 'newTableName'', 'restoreTableFromSnapshot_newTableName' - The name of the table to create from the restore operation.+--+-- 'snapshotName', 'restoreTableFromSnapshot_snapshotName' - The name of the snapshot to restore the table from.+--+-- 'sourceDatabaseName', 'restoreTableFromSnapshot_sourceDatabaseName' - The name of the source database that contains the table being restored.+--+-- 'sourceTableName', 'restoreTableFromSnapshot_sourceTableName' - The name of the source table being restored.+--+-- 'workgroupName', 'restoreTableFromSnapshot_workgroupName' - The workgroup to restore the table to.+newRestoreTableFromSnapshot ::+  -- | 'namespaceName'+  Prelude.Text ->+  -- | 'newTableName''+  Prelude.Text ->+  -- | 'snapshotName'+  Prelude.Text ->+  -- | 'sourceDatabaseName'+  Prelude.Text ->+  -- | 'sourceTableName'+  Prelude.Text ->+  -- | 'workgroupName'+  Prelude.Text ->+  RestoreTableFromSnapshot+newRestoreTableFromSnapshot+  pNamespaceName_+  pNewTableName_+  pSnapshotName_+  pSourceDatabaseName_+  pSourceTableName_+  pWorkgroupName_ =+    RestoreTableFromSnapshot'+      { activateCaseSensitiveIdentifier =+          Prelude.Nothing,+        sourceSchemaName = Prelude.Nothing,+        targetDatabaseName = Prelude.Nothing,+        targetSchemaName = Prelude.Nothing,+        namespaceName = pNamespaceName_,+        newTableName' = pNewTableName_,+        snapshotName = pSnapshotName_,+        sourceDatabaseName = pSourceDatabaseName_,+        sourceTableName = pSourceTableName_,+        workgroupName = pWorkgroupName_+      }++-- | Indicates whether name identifiers for database, schema, and table are+-- case sensitive. If true, the names are case sensitive. If false, the+-- names are not case sensitive. The default is false.+restoreTableFromSnapshot_activateCaseSensitiveIdentifier :: Lens.Lens' RestoreTableFromSnapshot (Prelude.Maybe Prelude.Bool)+restoreTableFromSnapshot_activateCaseSensitiveIdentifier = Lens.lens (\RestoreTableFromSnapshot' {activateCaseSensitiveIdentifier} -> activateCaseSensitiveIdentifier) (\s@RestoreTableFromSnapshot' {} a -> s {activateCaseSensitiveIdentifier = a} :: RestoreTableFromSnapshot)++-- | The name of the source schema that contains the table being restored.+restoreTableFromSnapshot_sourceSchemaName :: Lens.Lens' RestoreTableFromSnapshot (Prelude.Maybe Prelude.Text)+restoreTableFromSnapshot_sourceSchemaName = Lens.lens (\RestoreTableFromSnapshot' {sourceSchemaName} -> sourceSchemaName) (\s@RestoreTableFromSnapshot' {} a -> s {sourceSchemaName = a} :: RestoreTableFromSnapshot)++-- | The name of the database to restore the table to.+restoreTableFromSnapshot_targetDatabaseName :: Lens.Lens' RestoreTableFromSnapshot (Prelude.Maybe Prelude.Text)+restoreTableFromSnapshot_targetDatabaseName = Lens.lens (\RestoreTableFromSnapshot' {targetDatabaseName} -> targetDatabaseName) (\s@RestoreTableFromSnapshot' {} a -> s {targetDatabaseName = a} :: RestoreTableFromSnapshot)++-- | The name of the schema to restore the table to.+restoreTableFromSnapshot_targetSchemaName :: Lens.Lens' RestoreTableFromSnapshot (Prelude.Maybe Prelude.Text)+restoreTableFromSnapshot_targetSchemaName = Lens.lens (\RestoreTableFromSnapshot' {targetSchemaName} -> targetSchemaName) (\s@RestoreTableFromSnapshot' {} a -> s {targetSchemaName = a} :: RestoreTableFromSnapshot)++-- | The namespace of the snapshot to restore from.+restoreTableFromSnapshot_namespaceName :: Lens.Lens' RestoreTableFromSnapshot Prelude.Text+restoreTableFromSnapshot_namespaceName = Lens.lens (\RestoreTableFromSnapshot' {namespaceName} -> namespaceName) (\s@RestoreTableFromSnapshot' {} a -> s {namespaceName = a} :: RestoreTableFromSnapshot)++-- | The name of the table to create from the restore operation.+restoreTableFromSnapshot_newTableName :: Lens.Lens' RestoreTableFromSnapshot Prelude.Text+restoreTableFromSnapshot_newTableName = Lens.lens (\RestoreTableFromSnapshot' {newTableName'} -> newTableName') (\s@RestoreTableFromSnapshot' {} a -> s {newTableName' = a} :: RestoreTableFromSnapshot)++-- | The name of the snapshot to restore the table from.+restoreTableFromSnapshot_snapshotName :: Lens.Lens' RestoreTableFromSnapshot Prelude.Text+restoreTableFromSnapshot_snapshotName = Lens.lens (\RestoreTableFromSnapshot' {snapshotName} -> snapshotName) (\s@RestoreTableFromSnapshot' {} a -> s {snapshotName = a} :: RestoreTableFromSnapshot)++-- | The name of the source database that contains the table being restored.+restoreTableFromSnapshot_sourceDatabaseName :: Lens.Lens' RestoreTableFromSnapshot Prelude.Text+restoreTableFromSnapshot_sourceDatabaseName = Lens.lens (\RestoreTableFromSnapshot' {sourceDatabaseName} -> sourceDatabaseName) (\s@RestoreTableFromSnapshot' {} a -> s {sourceDatabaseName = a} :: RestoreTableFromSnapshot)++-- | The name of the source table being restored.+restoreTableFromSnapshot_sourceTableName :: Lens.Lens' RestoreTableFromSnapshot Prelude.Text+restoreTableFromSnapshot_sourceTableName = Lens.lens (\RestoreTableFromSnapshot' {sourceTableName} -> sourceTableName) (\s@RestoreTableFromSnapshot' {} a -> s {sourceTableName = a} :: RestoreTableFromSnapshot)++-- | The workgroup to restore the table to.+restoreTableFromSnapshot_workgroupName :: Lens.Lens' RestoreTableFromSnapshot Prelude.Text+restoreTableFromSnapshot_workgroupName = Lens.lens (\RestoreTableFromSnapshot' {workgroupName} -> workgroupName) (\s@RestoreTableFromSnapshot' {} a -> s {workgroupName = a} :: RestoreTableFromSnapshot)++instance Core.AWSRequest RestoreTableFromSnapshot where+  type+    AWSResponse RestoreTableFromSnapshot =+      RestoreTableFromSnapshotResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          RestoreTableFromSnapshotResponse'+            Prelude.<$> (x Data..?> "tableRestoreStatus")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable RestoreTableFromSnapshot where+  hashWithSalt _salt RestoreTableFromSnapshot' {..} =+    _salt+      `Prelude.hashWithSalt` activateCaseSensitiveIdentifier+      `Prelude.hashWithSalt` sourceSchemaName+      `Prelude.hashWithSalt` targetDatabaseName+      `Prelude.hashWithSalt` targetSchemaName+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` newTableName'+      `Prelude.hashWithSalt` snapshotName+      `Prelude.hashWithSalt` sourceDatabaseName+      `Prelude.hashWithSalt` sourceTableName+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData RestoreTableFromSnapshot where+  rnf RestoreTableFromSnapshot' {..} =+    Prelude.rnf activateCaseSensitiveIdentifier+      `Prelude.seq` Prelude.rnf sourceSchemaName+      `Prelude.seq` Prelude.rnf targetDatabaseName+      `Prelude.seq` Prelude.rnf targetSchemaName+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf newTableName'+      `Prelude.seq` Prelude.rnf snapshotName+      `Prelude.seq` Prelude.rnf sourceDatabaseName+      `Prelude.seq` Prelude.rnf sourceTableName+      `Prelude.seq` Prelude.rnf workgroupName++instance Data.ToHeaders RestoreTableFromSnapshot where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.RestoreTableFromSnapshot" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON RestoreTableFromSnapshot where+  toJSON RestoreTableFromSnapshot' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("activateCaseSensitiveIdentifier" Data..=)+              Prelude.<$> activateCaseSensitiveIdentifier,+            ("sourceSchemaName" Data..=)+              Prelude.<$> sourceSchemaName,+            ("targetDatabaseName" Data..=)+              Prelude.<$> targetDatabaseName,+            ("targetSchemaName" Data..=)+              Prelude.<$> targetSchemaName,+            Prelude.Just ("namespaceName" Data..= namespaceName),+            Prelude.Just ("newTableName" Data..= newTableName'),+            Prelude.Just ("snapshotName" Data..= snapshotName),+            Prelude.Just+              ("sourceDatabaseName" Data..= sourceDatabaseName),+            Prelude.Just+              ("sourceTableName" Data..= sourceTableName),+            Prelude.Just+              ("workgroupName" Data..= workgroupName)+          ]+      )++instance Data.ToPath RestoreTableFromSnapshot where+  toPath = Prelude.const "/"++instance Data.ToQuery RestoreTableFromSnapshot where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newRestoreTableFromSnapshotResponse' smart constructor.+data RestoreTableFromSnapshotResponse = RestoreTableFromSnapshotResponse'+  { -- | The TableRestoreStatus object that contains the status of the restore+    -- operation.+    tableRestoreStatus :: Prelude.Maybe TableRestoreStatus,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RestoreTableFromSnapshotResponse' 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:+--+-- 'tableRestoreStatus', 'restoreTableFromSnapshotResponse_tableRestoreStatus' - The TableRestoreStatus object that contains the status of the restore+-- operation.+--+-- 'httpStatus', 'restoreTableFromSnapshotResponse_httpStatus' - The response's http status code.+newRestoreTableFromSnapshotResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  RestoreTableFromSnapshotResponse+newRestoreTableFromSnapshotResponse pHttpStatus_ =+  RestoreTableFromSnapshotResponse'+    { tableRestoreStatus =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The TableRestoreStatus object that contains the status of the restore+-- operation.+restoreTableFromSnapshotResponse_tableRestoreStatus :: Lens.Lens' RestoreTableFromSnapshotResponse (Prelude.Maybe TableRestoreStatus)+restoreTableFromSnapshotResponse_tableRestoreStatus = Lens.lens (\RestoreTableFromSnapshotResponse' {tableRestoreStatus} -> tableRestoreStatus) (\s@RestoreTableFromSnapshotResponse' {} a -> s {tableRestoreStatus = a} :: RestoreTableFromSnapshotResponse)++-- | The response's http status code.+restoreTableFromSnapshotResponse_httpStatus :: Lens.Lens' RestoreTableFromSnapshotResponse Prelude.Int+restoreTableFromSnapshotResponse_httpStatus = Lens.lens (\RestoreTableFromSnapshotResponse' {httpStatus} -> httpStatus) (\s@RestoreTableFromSnapshotResponse' {} a -> s {httpStatus = a} :: RestoreTableFromSnapshotResponse)++instance+  Prelude.NFData+    RestoreTableFromSnapshotResponse+  where+  rnf RestoreTableFromSnapshotResponse' {..} =+    Prelude.rnf tableRestoreStatus+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/TagResource.hs view
@@ -0,0 +1,168 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.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)+--+-- Assigns one or more tags to a resource.+module Amazonka.RedshiftServerLess.TagResource+  ( -- * Creating a Request+    TagResource (..),+    newTagResource,++    -- * Request Lenses+    tagResource_resourceArn,+    tagResource_tags,++    -- * Destructuring the Response+    TagResourceResponse (..),+    newTagResourceResponse,++    -- * Response Lenses+    tagResourceResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+  { -- | The Amazon Resource Name (ARN) of the resource to tag.+    resourceArn :: Prelude.Text,+    -- | The map of the key-value pairs used to tag the resource.+    tags :: [Tag]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'tagResource_resourceArn' - The Amazon Resource Name (ARN) of the resource to tag.+--+-- 'tags', 'tagResource_tags' - The map of the key-value pairs used to tag the resource.+newTagResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  TagResource+newTagResource pResourceArn_ =+  TagResource'+    { resourceArn = pResourceArn_,+      tags = Prelude.mempty+    }++-- | The Amazon Resource Name (ARN) of the resource to tag.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | The map of the key-value pairs used to tag the resource.+tagResource_tags :: Lens.Lens' TagResource [Tag]+tagResource_tags = Lens.lens (\TagResource' {tags} -> tags) (\s@TagResource' {} a -> s {tags = a} :: TagResource) Prelude.. Lens.coerced++instance Core.AWSRequest TagResource where+  type AWSResponse TagResource = TagResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          TagResourceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable TagResource where+  hashWithSalt _salt TagResource' {..} =+    _salt+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+  rnf TagResource' {..} =+    Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders TagResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.TagResource" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON TagResource where+  toJSON TagResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("resourceArn" Data..= resourceArn),+            Prelude.Just ("tags" Data..= tags)+          ]+      )++instance Data.ToPath TagResource where+  toPath = Prelude.const "/"++instance Data.ToQuery TagResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'tagResourceResponse_httpStatus' - The response's http status code.+newTagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  TagResourceResponse+newTagResourceResponse pHttpStatus_ =+  TagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+tagResourceResponse_httpStatus :: Lens.Lens' TagResourceResponse Prelude.Int+tagResourceResponse_httpStatus = Lens.lens (\TagResourceResponse' {httpStatus} -> httpStatus) (\s@TagResourceResponse' {} a -> s {httpStatus = a} :: TagResourceResponse)++instance Prelude.NFData TagResourceResponse where+  rnf TagResourceResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/Types.hs view
@@ -0,0 +1,378 @@+{-# 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.RedshiftServerLess.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.RedshiftServerLess.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _AccessDeniedException,+    _ConflictException,+    _InsufficientCapacityException,+    _InternalServerException,+    _InvalidPaginationException,+    _ResourceNotFoundException,+    _ServiceQuotaExceededException,+    _ThrottlingException,+    _TooManyTagsException,+    _ValidationException,++    -- * LogExport+    LogExport (..),++    -- * NamespaceStatus+    NamespaceStatus (..),++    -- * SnapshotStatus+    SnapshotStatus (..),++    -- * UsageLimitBreachAction+    UsageLimitBreachAction (..),++    -- * UsageLimitPeriod+    UsageLimitPeriod (..),++    -- * UsageLimitUsageType+    UsageLimitUsageType (..),++    -- * WorkgroupStatus+    WorkgroupStatus (..),++    -- * ConfigParameter+    ConfigParameter (..),+    newConfigParameter,+    configParameter_parameterKey,+    configParameter_parameterValue,++    -- * Endpoint+    Endpoint (..),+    newEndpoint,+    endpoint_address,+    endpoint_port,+    endpoint_vpcEndpoints,++    -- * EndpointAccess+    EndpointAccess (..),+    newEndpointAccess,+    endpointAccess_address,+    endpointAccess_endpointArn,+    endpointAccess_endpointCreateTime,+    endpointAccess_endpointName,+    endpointAccess_endpointStatus,+    endpointAccess_port,+    endpointAccess_subnetIds,+    endpointAccess_vpcEndpoint,+    endpointAccess_vpcSecurityGroups,+    endpointAccess_workgroupName,++    -- * Namespace+    Namespace (..),+    newNamespace,+    namespace_adminUsername,+    namespace_creationDate,+    namespace_dbName,+    namespace_defaultIamRoleArn,+    namespace_iamRoles,+    namespace_kmsKeyId,+    namespace_logExports,+    namespace_namespaceArn,+    namespace_namespaceId,+    namespace_namespaceName,+    namespace_status,++    -- * NetworkInterface+    NetworkInterface (..),+    newNetworkInterface,+    networkInterface_availabilityZone,+    networkInterface_networkInterfaceId,+    networkInterface_privateIpAddress,+    networkInterface_subnetId,++    -- * RecoveryPoint+    RecoveryPoint (..),+    newRecoveryPoint,+    recoveryPoint_namespaceArn,+    recoveryPoint_namespaceName,+    recoveryPoint_recoveryPointCreateTime,+    recoveryPoint_recoveryPointId,+    recoveryPoint_totalSizeInMegaBytes,+    recoveryPoint_workgroupName,++    -- * ResourcePolicy+    ResourcePolicy (..),+    newResourcePolicy,+    resourcePolicy_policy,+    resourcePolicy_resourceArn,++    -- * Snapshot+    Snapshot (..),+    newSnapshot,+    snapshot_accountsWithProvisionedRestoreAccess,+    snapshot_accountsWithRestoreAccess,+    snapshot_actualIncrementalBackupSizeInMegaBytes,+    snapshot_adminUsername,+    snapshot_backupProgressInMegaBytes,+    snapshot_currentBackupRateInMegaBytesPerSecond,+    snapshot_elapsedTimeInSeconds,+    snapshot_estimatedSecondsToCompletion,+    snapshot_kmsKeyId,+    snapshot_namespaceArn,+    snapshot_namespaceName,+    snapshot_ownerAccount,+    snapshot_snapshotArn,+    snapshot_snapshotCreateTime,+    snapshot_snapshotName,+    snapshot_snapshotRemainingDays,+    snapshot_snapshotRetentionPeriod,+    snapshot_snapshotRetentionStartTime,+    snapshot_status,+    snapshot_totalBackupSizeInMegaBytes,++    -- * TableRestoreStatus+    TableRestoreStatus (..),+    newTableRestoreStatus,+    tableRestoreStatus_message,+    tableRestoreStatus_namespaceName,+    tableRestoreStatus_newTableName,+    tableRestoreStatus_progressInMegaBytes,+    tableRestoreStatus_requestTime,+    tableRestoreStatus_snapshotName,+    tableRestoreStatus_sourceDatabaseName,+    tableRestoreStatus_sourceSchemaName,+    tableRestoreStatus_sourceTableName,+    tableRestoreStatus_status,+    tableRestoreStatus_tableRestoreRequestId,+    tableRestoreStatus_targetDatabaseName,+    tableRestoreStatus_targetSchemaName,+    tableRestoreStatus_totalDataInMegaBytes,+    tableRestoreStatus_workgroupName,++    -- * Tag+    Tag (..),+    newTag,+    tag_key,+    tag_value,++    -- * UsageLimit+    UsageLimit (..),+    newUsageLimit,+    usageLimit_amount,+    usageLimit_breachAction,+    usageLimit_period,+    usageLimit_resourceArn,+    usageLimit_usageLimitArn,+    usageLimit_usageLimitId,+    usageLimit_usageType,++    -- * VpcEndpoint+    VpcEndpoint (..),+    newVpcEndpoint,+    vpcEndpoint_networkInterfaces,+    vpcEndpoint_vpcEndpointId,+    vpcEndpoint_vpcId,++    -- * VpcSecurityGroupMembership+    VpcSecurityGroupMembership (..),+    newVpcSecurityGroupMembership,+    vpcSecurityGroupMembership_status,+    vpcSecurityGroupMembership_vpcSecurityGroupId,++    -- * Workgroup+    Workgroup (..),+    newWorkgroup,+    workgroup_baseCapacity,+    workgroup_configParameters,+    workgroup_creationDate,+    workgroup_endpoint,+    workgroup_enhancedVpcRouting,+    workgroup_namespaceName,+    workgroup_port,+    workgroup_publiclyAccessible,+    workgroup_securityGroupIds,+    workgroup_status,+    workgroup_subnetIds,+    workgroup_workgroupArn,+    workgroup_workgroupId,+    workgroup_workgroupName,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types.ConfigParameter+import Amazonka.RedshiftServerLess.Types.Endpoint+import Amazonka.RedshiftServerLess.Types.EndpointAccess+import Amazonka.RedshiftServerLess.Types.LogExport+import Amazonka.RedshiftServerLess.Types.Namespace+import Amazonka.RedshiftServerLess.Types.NamespaceStatus+import Amazonka.RedshiftServerLess.Types.NetworkInterface+import Amazonka.RedshiftServerLess.Types.RecoveryPoint+import Amazonka.RedshiftServerLess.Types.ResourcePolicy+import Amazonka.RedshiftServerLess.Types.Snapshot+import Amazonka.RedshiftServerLess.Types.SnapshotStatus+import Amazonka.RedshiftServerLess.Types.TableRestoreStatus+import Amazonka.RedshiftServerLess.Types.Tag+import Amazonka.RedshiftServerLess.Types.UsageLimit+import Amazonka.RedshiftServerLess.Types.UsageLimitBreachAction+import Amazonka.RedshiftServerLess.Types.UsageLimitPeriod+import Amazonka.RedshiftServerLess.Types.UsageLimitUsageType+import Amazonka.RedshiftServerLess.Types.VpcEndpoint+import Amazonka.RedshiftServerLess.Types.VpcSecurityGroupMembership+import Amazonka.RedshiftServerLess.Types.Workgroup+import Amazonka.RedshiftServerLess.Types.WorkgroupStatus+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2021-04-21@ of the Amazon Redshift Serverless SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "RedshiftServerLess",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "redshift-serverless",+      Core.signingName = "redshift-serverless",+      Core.version = "2021-04-21",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error =+        Core.parseJSONError "RedshiftServerLess",+      Core.retry = retry+    }+  where+    retry =+      Core.Exponential+        { Core.base = 5.0e-2,+          Core.growth = 2,+          Core.attempts = 5,+          Core.check = check+        }+    check e+      | Lens.has (Core.hasStatus 502) e =+          Prelude.Just "bad_gateway"+      | Lens.has (Core.hasStatus 504) e =+          Prelude.Just "gateway_timeout"+      | Lens.has (Core.hasStatus 500) e =+          Prelude.Just "general_server_error"+      | Lens.has (Core.hasStatus 509) e =+          Prelude.Just "limit_exceeded"+      | Lens.has+          ( Core.hasCode "RequestThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "request_throttled_exception"+      | Lens.has (Core.hasStatus 503) e =+          Prelude.Just "service_unavailable"+      | Lens.has+          ( Core.hasCode "ThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttled_exception"+      | Lens.has+          ( Core.hasCode "Throttling"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling"+      | Lens.has+          ( Core.hasCode "ThrottlingException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling_exception"+      | Lens.has+          ( Core.hasCode+              "ProvisionedThroughputExceededException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throughput_exceeded"+      | Lens.has (Core.hasStatus 429) e =+          Prelude.Just "too_many_requests"+      | Prelude.otherwise = Prelude.Nothing++-- | You do not have sufficient access to perform this action.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+  Core._MatchServiceError+    defaultService+    "AccessDeniedException"++-- | The submitted action has conflicts.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+  Core._MatchServiceError+    defaultService+    "ConflictException"++-- | There is an insufficient capacity to perform the action.+_InsufficientCapacityException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InsufficientCapacityException =+  Core._MatchServiceError+    defaultService+    "InsufficientCapacityException"++-- | The request processing has failed because of an unknown error, exception+-- or failure.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+  Core._MatchServiceError+    defaultService+    "InternalServerException"++-- | The provided pagination token is invalid.+_InvalidPaginationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidPaginationException =+  Core._MatchServiceError+    defaultService+    "InvalidPaginationException"++-- | The resource could not be found.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceNotFoundException"++-- | The service limit was exceeded.+_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+  Core._MatchServiceError+    defaultService+    "ServiceQuotaExceededException"++-- | The request was denied due to request throttling.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+  Core._MatchServiceError+    defaultService+    "ThrottlingException"++-- | The request exceeded the number of tags allowed for a resource.+_TooManyTagsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TooManyTagsException =+  Core._MatchServiceError+    defaultService+    "TooManyTagsException"++-- | The input failed to satisfy the constraints specified by an AWS service.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+  Core._MatchServiceError+    defaultService+    "ValidationException"
+ gen/Amazonka/RedshiftServerLess/Types/ConfigParameter.hs view
@@ -0,0 +1,101 @@+{-# 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.RedshiftServerLess.Types.ConfigParameter+-- 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.RedshiftServerLess.Types.ConfigParameter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | An array of key-value pairs to set for advanced control over Amazon+-- Redshift Serverless.+--+-- /See:/ 'newConfigParameter' smart constructor.+data ConfigParameter = ConfigParameter'+  { -- | The key of the parameter. The options are @datestyle@,+    -- @enable_user_activity_logging@, @query_group@, @search_path@, and+    -- @max_query_execution_time@.+    parameterKey :: Prelude.Maybe Prelude.Text,+    -- | The value of the parameter to set.+    parameterValue :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ConfigParameter' 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:+--+-- 'parameterKey', 'configParameter_parameterKey' - The key of the parameter. The options are @datestyle@,+-- @enable_user_activity_logging@, @query_group@, @search_path@, and+-- @max_query_execution_time@.+--+-- 'parameterValue', 'configParameter_parameterValue' - The value of the parameter to set.+newConfigParameter ::+  ConfigParameter+newConfigParameter =+  ConfigParameter'+    { parameterKey = Prelude.Nothing,+      parameterValue = Prelude.Nothing+    }++-- | The key of the parameter. The options are @datestyle@,+-- @enable_user_activity_logging@, @query_group@, @search_path@, and+-- @max_query_execution_time@.+configParameter_parameterKey :: Lens.Lens' ConfigParameter (Prelude.Maybe Prelude.Text)+configParameter_parameterKey = Lens.lens (\ConfigParameter' {parameterKey} -> parameterKey) (\s@ConfigParameter' {} a -> s {parameterKey = a} :: ConfigParameter)++-- | The value of the parameter to set.+configParameter_parameterValue :: Lens.Lens' ConfigParameter (Prelude.Maybe Prelude.Text)+configParameter_parameterValue = Lens.lens (\ConfigParameter' {parameterValue} -> parameterValue) (\s@ConfigParameter' {} a -> s {parameterValue = a} :: ConfigParameter)++instance Data.FromJSON ConfigParameter where+  parseJSON =+    Data.withObject+      "ConfigParameter"+      ( \x ->+          ConfigParameter'+            Prelude.<$> (x Data..:? "parameterKey")+            Prelude.<*> (x Data..:? "parameterValue")+      )++instance Prelude.Hashable ConfigParameter where+  hashWithSalt _salt ConfigParameter' {..} =+    _salt+      `Prelude.hashWithSalt` parameterKey+      `Prelude.hashWithSalt` parameterValue++instance Prelude.NFData ConfigParameter where+  rnf ConfigParameter' {..} =+    Prelude.rnf parameterKey+      `Prelude.seq` Prelude.rnf parameterValue++instance Data.ToJSON ConfigParameter where+  toJSON ConfigParameter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("parameterKey" Data..=) Prelude.<$> parameterKey,+            ("parameterValue" Data..=)+              Prelude.<$> parameterValue+          ]+      )
+ gen/Amazonka/RedshiftServerLess/Types/Endpoint.hs view
@@ -0,0 +1,97 @@+{-# 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.RedshiftServerLess.Types.Endpoint+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.RedshiftServerLess.Types.Endpoint where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types.VpcEndpoint++-- | The VPC endpoint object.+--+-- /See:/ 'newEndpoint' smart constructor.+data Endpoint = Endpoint'+  { -- | The DNS address of the VPC endpoint.+    address :: Prelude.Maybe Prelude.Text,+    -- | The port that Amazon Redshift Serverless listens on.+    port :: Prelude.Maybe Prelude.Int,+    -- | An array of @VpcEndpoint@ objects.+    vpcEndpoints :: Prelude.Maybe [VpcEndpoint]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Endpoint' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'address', 'endpoint_address' - The DNS address of the VPC endpoint.+--+-- 'port', 'endpoint_port' - The port that Amazon Redshift Serverless listens on.+--+-- 'vpcEndpoints', 'endpoint_vpcEndpoints' - An array of @VpcEndpoint@ objects.+newEndpoint ::+  Endpoint+newEndpoint =+  Endpoint'+    { address = Prelude.Nothing,+      port = Prelude.Nothing,+      vpcEndpoints = Prelude.Nothing+    }++-- | The DNS address of the VPC endpoint.+endpoint_address :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)+endpoint_address = Lens.lens (\Endpoint' {address} -> address) (\s@Endpoint' {} a -> s {address = a} :: Endpoint)++-- | The port that Amazon Redshift Serverless listens on.+endpoint_port :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Int)+endpoint_port = Lens.lens (\Endpoint' {port} -> port) (\s@Endpoint' {} a -> s {port = a} :: Endpoint)++-- | An array of @VpcEndpoint@ objects.+endpoint_vpcEndpoints :: Lens.Lens' Endpoint (Prelude.Maybe [VpcEndpoint])+endpoint_vpcEndpoints = Lens.lens (\Endpoint' {vpcEndpoints} -> vpcEndpoints) (\s@Endpoint' {} a -> s {vpcEndpoints = a} :: Endpoint) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON Endpoint where+  parseJSON =+    Data.withObject+      "Endpoint"+      ( \x ->+          Endpoint'+            Prelude.<$> (x Data..:? "address")+            Prelude.<*> (x Data..:? "port")+            Prelude.<*> (x Data..:? "vpcEndpoints" Data..!= Prelude.mempty)+      )++instance Prelude.Hashable Endpoint where+  hashWithSalt _salt Endpoint' {..} =+    _salt+      `Prelude.hashWithSalt` address+      `Prelude.hashWithSalt` port+      `Prelude.hashWithSalt` vpcEndpoints++instance Prelude.NFData Endpoint where+  rnf Endpoint' {..} =+    Prelude.rnf address+      `Prelude.seq` Prelude.rnf port+      `Prelude.seq` Prelude.rnf vpcEndpoints
+ gen/Amazonka/RedshiftServerLess/Types/EndpointAccess.hs view
@@ -0,0 +1,191 @@+{-# 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.RedshiftServerLess.Types.EndpointAccess+-- 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.RedshiftServerLess.Types.EndpointAccess where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types.VpcEndpoint+import Amazonka.RedshiftServerLess.Types.VpcSecurityGroupMembership++-- | Information about an Amazon Redshift Serverless VPC endpoint.+--+-- /See:/ 'newEndpointAccess' smart constructor.+data EndpointAccess = EndpointAccess'+  { -- | The DNS address of the endpoint.+    address :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the VPC endpoint.+    endpointArn :: Prelude.Maybe Prelude.Text,+    -- | The time that the endpoint was created.+    endpointCreateTime :: Prelude.Maybe Data.ISO8601,+    -- | The name of the VPC endpoint.+    endpointName :: Prelude.Maybe Prelude.Text,+    -- | The status of the VPC endpoint.+    endpointStatus :: Prelude.Maybe Prelude.Text,+    -- | The port number on which Amazon Redshift Serverless accepts incoming+    -- connections.+    port :: Prelude.Maybe Prelude.Int,+    -- | The unique identifier of subnets where Amazon Redshift Serverless choose+    -- to deploy the VPC endpoint.+    subnetIds :: Prelude.Maybe [Prelude.Text],+    -- | The connection endpoint for connecting to Amazon Redshift Serverless.+    vpcEndpoint :: Prelude.Maybe VpcEndpoint,+    -- | The security groups associated with the endpoint.+    vpcSecurityGroups :: Prelude.Maybe [VpcSecurityGroupMembership],+    -- | The name of the workgroup associated with the endpoint.+    workgroupName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EndpointAccess' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'address', 'endpointAccess_address' - The DNS address of the endpoint.+--+-- 'endpointArn', 'endpointAccess_endpointArn' - The Amazon Resource Name (ARN) of the VPC endpoint.+--+-- 'endpointCreateTime', 'endpointAccess_endpointCreateTime' - The time that the endpoint was created.+--+-- 'endpointName', 'endpointAccess_endpointName' - The name of the VPC endpoint.+--+-- 'endpointStatus', 'endpointAccess_endpointStatus' - The status of the VPC endpoint.+--+-- 'port', 'endpointAccess_port' - The port number on which Amazon Redshift Serverless accepts incoming+-- connections.+--+-- 'subnetIds', 'endpointAccess_subnetIds' - The unique identifier of subnets where Amazon Redshift Serverless choose+-- to deploy the VPC endpoint.+--+-- 'vpcEndpoint', 'endpointAccess_vpcEndpoint' - The connection endpoint for connecting to Amazon Redshift Serverless.+--+-- 'vpcSecurityGroups', 'endpointAccess_vpcSecurityGroups' - The security groups associated with the endpoint.+--+-- 'workgroupName', 'endpointAccess_workgroupName' - The name of the workgroup associated with the endpoint.+newEndpointAccess ::+  EndpointAccess+newEndpointAccess =+  EndpointAccess'+    { address = Prelude.Nothing,+      endpointArn = Prelude.Nothing,+      endpointCreateTime = Prelude.Nothing,+      endpointName = Prelude.Nothing,+      endpointStatus = Prelude.Nothing,+      port = Prelude.Nothing,+      subnetIds = Prelude.Nothing,+      vpcEndpoint = Prelude.Nothing,+      vpcSecurityGroups = Prelude.Nothing,+      workgroupName = Prelude.Nothing+    }++-- | The DNS address of the endpoint.+endpointAccess_address :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)+endpointAccess_address = Lens.lens (\EndpointAccess' {address} -> address) (\s@EndpointAccess' {} a -> s {address = a} :: EndpointAccess)++-- | The Amazon Resource Name (ARN) of the VPC endpoint.+endpointAccess_endpointArn :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)+endpointAccess_endpointArn = Lens.lens (\EndpointAccess' {endpointArn} -> endpointArn) (\s@EndpointAccess' {} a -> s {endpointArn = a} :: EndpointAccess)++-- | The time that the endpoint was created.+endpointAccess_endpointCreateTime :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.UTCTime)+endpointAccess_endpointCreateTime = Lens.lens (\EndpointAccess' {endpointCreateTime} -> endpointCreateTime) (\s@EndpointAccess' {} a -> s {endpointCreateTime = a} :: EndpointAccess) Prelude.. Lens.mapping Data._Time++-- | The name of the VPC endpoint.+endpointAccess_endpointName :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)+endpointAccess_endpointName = Lens.lens (\EndpointAccess' {endpointName} -> endpointName) (\s@EndpointAccess' {} a -> s {endpointName = a} :: EndpointAccess)++-- | The status of the VPC endpoint.+endpointAccess_endpointStatus :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)+endpointAccess_endpointStatus = Lens.lens (\EndpointAccess' {endpointStatus} -> endpointStatus) (\s@EndpointAccess' {} a -> s {endpointStatus = a} :: EndpointAccess)++-- | The port number on which Amazon Redshift Serverless accepts incoming+-- connections.+endpointAccess_port :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Int)+endpointAccess_port = Lens.lens (\EndpointAccess' {port} -> port) (\s@EndpointAccess' {} a -> s {port = a} :: EndpointAccess)++-- | The unique identifier of subnets where Amazon Redshift Serverless choose+-- to deploy the VPC endpoint.+endpointAccess_subnetIds :: Lens.Lens' EndpointAccess (Prelude.Maybe [Prelude.Text])+endpointAccess_subnetIds = Lens.lens (\EndpointAccess' {subnetIds} -> subnetIds) (\s@EndpointAccess' {} a -> s {subnetIds = a} :: EndpointAccess) Prelude.. Lens.mapping Lens.coerced++-- | The connection endpoint for connecting to Amazon Redshift Serverless.+endpointAccess_vpcEndpoint :: Lens.Lens' EndpointAccess (Prelude.Maybe VpcEndpoint)+endpointAccess_vpcEndpoint = Lens.lens (\EndpointAccess' {vpcEndpoint} -> vpcEndpoint) (\s@EndpointAccess' {} a -> s {vpcEndpoint = a} :: EndpointAccess)++-- | The security groups associated with the endpoint.+endpointAccess_vpcSecurityGroups :: Lens.Lens' EndpointAccess (Prelude.Maybe [VpcSecurityGroupMembership])+endpointAccess_vpcSecurityGroups = Lens.lens (\EndpointAccess' {vpcSecurityGroups} -> vpcSecurityGroups) (\s@EndpointAccess' {} a -> s {vpcSecurityGroups = a} :: EndpointAccess) Prelude.. Lens.mapping Lens.coerced++-- | The name of the workgroup associated with the endpoint.+endpointAccess_workgroupName :: Lens.Lens' EndpointAccess (Prelude.Maybe Prelude.Text)+endpointAccess_workgroupName = Lens.lens (\EndpointAccess' {workgroupName} -> workgroupName) (\s@EndpointAccess' {} a -> s {workgroupName = a} :: EndpointAccess)++instance Data.FromJSON EndpointAccess where+  parseJSON =+    Data.withObject+      "EndpointAccess"+      ( \x ->+          EndpointAccess'+            Prelude.<$> (x Data..:? "address")+            Prelude.<*> (x Data..:? "endpointArn")+            Prelude.<*> (x Data..:? "endpointCreateTime")+            Prelude.<*> (x Data..:? "endpointName")+            Prelude.<*> (x Data..:? "endpointStatus")+            Prelude.<*> (x Data..:? "port")+            Prelude.<*> (x Data..:? "subnetIds" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "vpcEndpoint")+            Prelude.<*> ( x+                            Data..:? "vpcSecurityGroups"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "workgroupName")+      )++instance Prelude.Hashable EndpointAccess where+  hashWithSalt _salt EndpointAccess' {..} =+    _salt+      `Prelude.hashWithSalt` address+      `Prelude.hashWithSalt` endpointArn+      `Prelude.hashWithSalt` endpointCreateTime+      `Prelude.hashWithSalt` endpointName+      `Prelude.hashWithSalt` endpointStatus+      `Prelude.hashWithSalt` port+      `Prelude.hashWithSalt` subnetIds+      `Prelude.hashWithSalt` vpcEndpoint+      `Prelude.hashWithSalt` vpcSecurityGroups+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData EndpointAccess where+  rnf EndpointAccess' {..} =+    Prelude.rnf address+      `Prelude.seq` Prelude.rnf endpointArn+      `Prelude.seq` Prelude.rnf endpointCreateTime+      `Prelude.seq` Prelude.rnf endpointName+      `Prelude.seq` Prelude.rnf endpointStatus+      `Prelude.seq` Prelude.rnf port+      `Prelude.seq` Prelude.rnf subnetIds+      `Prelude.seq` Prelude.rnf vpcEndpoint+      `Prelude.seq` Prelude.rnf vpcSecurityGroups+      `Prelude.seq` Prelude.rnf workgroupName
+ gen/Amazonka/RedshiftServerLess/Types/LogExport.hs view
@@ -0,0 +1,76 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.LogExport+-- 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.RedshiftServerLess.Types.LogExport+  ( LogExport+      ( ..,+        LogExport_Connectionlog,+        LogExport_Useractivitylog,+        LogExport_Userlog+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LogExport = LogExport'+  { fromLogExport ::+      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 LogExport_Connectionlog :: LogExport+pattern LogExport_Connectionlog = LogExport' "connectionlog"++pattern LogExport_Useractivitylog :: LogExport+pattern LogExport_Useractivitylog = LogExport' "useractivitylog"++pattern LogExport_Userlog :: LogExport+pattern LogExport_Userlog = LogExport' "userlog"++{-# COMPLETE+  LogExport_Connectionlog,+  LogExport_Useractivitylog,+  LogExport_Userlog,+  LogExport'+  #-}
+ gen/Amazonka/RedshiftServerLess/Types/Namespace.hs view
@@ -0,0 +1,218 @@+{-# 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.RedshiftServerLess.Types.Namespace+-- 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.RedshiftServerLess.Types.Namespace where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types.LogExport+import Amazonka.RedshiftServerLess.Types.NamespaceStatus++-- | A collection of database objects and users.+--+-- /See:/ 'newNamespace' smart constructor.+data Namespace = Namespace'+  { -- | The username of the administrator for the first database created in the+    -- namespace.+    adminUsername :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The date of when the namespace was created.+    creationDate :: Prelude.Maybe Data.ISO8601,+    -- | The name of the first database created in the namespace.+    dbName :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the IAM role to set as a default in+    -- the namespace.+    defaultIamRoleArn :: Prelude.Maybe Prelude.Text,+    -- | A list of IAM roles to associate with the namespace.+    iamRoles :: Prelude.Maybe [Prelude.Text],+    -- | The ID of the Amazon Web Services Key Management Service key used to+    -- encrypt your data.+    kmsKeyId :: Prelude.Maybe Prelude.Text,+    -- | The types of logs the namespace can export. Available export types are+    -- User log, Connection log, and User activity log.+    logExports :: Prelude.Maybe [LogExport],+    -- | The Amazon Resource Name (ARN) associated with a namespace.+    namespaceArn :: Prelude.Maybe Prelude.Text,+    -- | The unique identifier of a namespace.+    namespaceId :: Prelude.Maybe Prelude.Text,+    -- | The name of the namespace. Must be between 3-64 alphanumeric characters+    -- in lowercase, and it cannot be a reserved word. A list of reserved words+    -- can be found in+    -- <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>+    -- in the Amazon Redshift Database Developer Guide.+    namespaceName :: Prelude.Maybe Prelude.Text,+    -- | The status of the namespace.+    status :: Prelude.Maybe NamespaceStatus+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Namespace' 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', 'namespace_adminUsername' - The username of the administrator for the first database created in the+-- namespace.+--+-- 'creationDate', 'namespace_creationDate' - The date of when the namespace was created.+--+-- 'dbName', 'namespace_dbName' - The name of the first database created in the namespace.+--+-- 'defaultIamRoleArn', 'namespace_defaultIamRoleArn' - The Amazon Resource Name (ARN) of the IAM role to set as a default in+-- the namespace.+--+-- 'iamRoles', 'namespace_iamRoles' - A list of IAM roles to associate with the namespace.+--+-- 'kmsKeyId', 'namespace_kmsKeyId' - The ID of the Amazon Web Services Key Management Service key used to+-- encrypt your data.+--+-- 'logExports', 'namespace_logExports' - The types of logs the namespace can export. Available export types are+-- User log, Connection log, and User activity log.+--+-- 'namespaceArn', 'namespace_namespaceArn' - The Amazon Resource Name (ARN) associated with a namespace.+--+-- 'namespaceId', 'namespace_namespaceId' - The unique identifier of a namespace.+--+-- 'namespaceName', 'namespace_namespaceName' - The name of the namespace. Must be between 3-64 alphanumeric characters+-- in lowercase, and it cannot be a reserved word. A list of reserved words+-- can be found in+-- <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>+-- in the Amazon Redshift Database Developer Guide.+--+-- 'status', 'namespace_status' - The status of the namespace.+newNamespace ::+  Namespace+newNamespace =+  Namespace'+    { adminUsername = Prelude.Nothing,+      creationDate = Prelude.Nothing,+      dbName = Prelude.Nothing,+      defaultIamRoleArn = Prelude.Nothing,+      iamRoles = Prelude.Nothing,+      kmsKeyId = Prelude.Nothing,+      logExports = Prelude.Nothing,+      namespaceArn = Prelude.Nothing,+      namespaceId = Prelude.Nothing,+      namespaceName = Prelude.Nothing,+      status = Prelude.Nothing+    }++-- | The username of the administrator for the first database created in the+-- namespace.+namespace_adminUsername :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)+namespace_adminUsername = Lens.lens (\Namespace' {adminUsername} -> adminUsername) (\s@Namespace' {} a -> s {adminUsername = a} :: Namespace) Prelude.. Lens.mapping Data._Sensitive++-- | The date of when the namespace was created.+namespace_creationDate :: Lens.Lens' Namespace (Prelude.Maybe Prelude.UTCTime)+namespace_creationDate = Lens.lens (\Namespace' {creationDate} -> creationDate) (\s@Namespace' {} a -> s {creationDate = a} :: Namespace) Prelude.. Lens.mapping Data._Time++-- | The name of the first database created in the namespace.+namespace_dbName :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)+namespace_dbName = Lens.lens (\Namespace' {dbName} -> dbName) (\s@Namespace' {} a -> s {dbName = a} :: Namespace)++-- | The Amazon Resource Name (ARN) of the IAM role to set as a default in+-- the namespace.+namespace_defaultIamRoleArn :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)+namespace_defaultIamRoleArn = Lens.lens (\Namespace' {defaultIamRoleArn} -> defaultIamRoleArn) (\s@Namespace' {} a -> s {defaultIamRoleArn = a} :: Namespace)++-- | A list of IAM roles to associate with the namespace.+namespace_iamRoles :: Lens.Lens' Namespace (Prelude.Maybe [Prelude.Text])+namespace_iamRoles = Lens.lens (\Namespace' {iamRoles} -> iamRoles) (\s@Namespace' {} a -> s {iamRoles = a} :: Namespace) Prelude.. Lens.mapping Lens.coerced++-- | The ID of the Amazon Web Services Key Management Service key used to+-- encrypt your data.+namespace_kmsKeyId :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)+namespace_kmsKeyId = Lens.lens (\Namespace' {kmsKeyId} -> kmsKeyId) (\s@Namespace' {} a -> s {kmsKeyId = a} :: Namespace)++-- | The types of logs the namespace can export. Available export types are+-- User log, Connection log, and User activity log.+namespace_logExports :: Lens.Lens' Namespace (Prelude.Maybe [LogExport])+namespace_logExports = Lens.lens (\Namespace' {logExports} -> logExports) (\s@Namespace' {} a -> s {logExports = a} :: Namespace) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) associated with a namespace.+namespace_namespaceArn :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)+namespace_namespaceArn = Lens.lens (\Namespace' {namespaceArn} -> namespaceArn) (\s@Namespace' {} a -> s {namespaceArn = a} :: Namespace)++-- | The unique identifier of a namespace.+namespace_namespaceId :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)+namespace_namespaceId = Lens.lens (\Namespace' {namespaceId} -> namespaceId) (\s@Namespace' {} a -> s {namespaceId = a} :: Namespace)++-- | The name of the namespace. Must be between 3-64 alphanumeric characters+-- in lowercase, and it cannot be a reserved word. A list of reserved words+-- can be found in+-- <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>+-- in the Amazon Redshift Database Developer Guide.+namespace_namespaceName :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)+namespace_namespaceName = Lens.lens (\Namespace' {namespaceName} -> namespaceName) (\s@Namespace' {} a -> s {namespaceName = a} :: Namespace)++-- | The status of the namespace.+namespace_status :: Lens.Lens' Namespace (Prelude.Maybe NamespaceStatus)+namespace_status = Lens.lens (\Namespace' {status} -> status) (\s@Namespace' {} a -> s {status = a} :: Namespace)++instance Data.FromJSON Namespace where+  parseJSON =+    Data.withObject+      "Namespace"+      ( \x ->+          Namespace'+            Prelude.<$> (x Data..:? "adminUsername")+            Prelude.<*> (x Data..:? "creationDate")+            Prelude.<*> (x Data..:? "dbName")+            Prelude.<*> (x Data..:? "defaultIamRoleArn")+            Prelude.<*> (x Data..:? "iamRoles" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "kmsKeyId")+            Prelude.<*> (x Data..:? "logExports" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "namespaceArn")+            Prelude.<*> (x Data..:? "namespaceId")+            Prelude.<*> (x Data..:? "namespaceName")+            Prelude.<*> (x Data..:? "status")+      )++instance Prelude.Hashable Namespace where+  hashWithSalt _salt Namespace' {..} =+    _salt+      `Prelude.hashWithSalt` adminUsername+      `Prelude.hashWithSalt` creationDate+      `Prelude.hashWithSalt` dbName+      `Prelude.hashWithSalt` defaultIamRoleArn+      `Prelude.hashWithSalt` iamRoles+      `Prelude.hashWithSalt` kmsKeyId+      `Prelude.hashWithSalt` logExports+      `Prelude.hashWithSalt` namespaceArn+      `Prelude.hashWithSalt` namespaceId+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` status++instance Prelude.NFData Namespace where+  rnf Namespace' {..} =+    Prelude.rnf adminUsername+      `Prelude.seq` Prelude.rnf creationDate+      `Prelude.seq` Prelude.rnf dbName+      `Prelude.seq` Prelude.rnf defaultIamRoleArn+      `Prelude.seq` Prelude.rnf iamRoles+      `Prelude.seq` Prelude.rnf kmsKeyId+      `Prelude.seq` Prelude.rnf logExports+      `Prelude.seq` Prelude.rnf namespaceArn+      `Prelude.seq` Prelude.rnf namespaceId+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/RedshiftServerLess/Types/NamespaceStatus.hs view
@@ -0,0 +1,76 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.NamespaceStatus+-- 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.RedshiftServerLess.Types.NamespaceStatus+  ( NamespaceStatus+      ( ..,+        NamespaceStatus_AVAILABLE,+        NamespaceStatus_DELETING,+        NamespaceStatus_MODIFYING+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype NamespaceStatus = NamespaceStatus'+  { fromNamespaceStatus ::+      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 NamespaceStatus_AVAILABLE :: NamespaceStatus+pattern NamespaceStatus_AVAILABLE = NamespaceStatus' "AVAILABLE"++pattern NamespaceStatus_DELETING :: NamespaceStatus+pattern NamespaceStatus_DELETING = NamespaceStatus' "DELETING"++pattern NamespaceStatus_MODIFYING :: NamespaceStatus+pattern NamespaceStatus_MODIFYING = NamespaceStatus' "MODIFYING"++{-# COMPLETE+  NamespaceStatus_AVAILABLE,+  NamespaceStatus_DELETING,+  NamespaceStatus_MODIFYING,+  NamespaceStatus'+  #-}
+ gen/Amazonka/RedshiftServerLess/Types/NetworkInterface.hs view
@@ -0,0 +1,110 @@+{-# 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.RedshiftServerLess.Types.NetworkInterface+-- 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.RedshiftServerLess.Types.NetworkInterface where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Contains information about a network interface in an Amazon Redshift+-- Serverless managed VPC endpoint.+--+-- /See:/ 'newNetworkInterface' smart constructor.+data NetworkInterface = NetworkInterface'+  { -- | The availability Zone.+    availabilityZone :: Prelude.Maybe Prelude.Text,+    -- | The unique identifier of the network interface.+    networkInterfaceId :: Prelude.Maybe Prelude.Text,+    -- | The IPv4 address of the network interface within the subnet.+    privateIpAddress :: Prelude.Maybe Prelude.Text,+    -- | The unique identifier of the subnet.+    subnetId :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'NetworkInterface' 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:+--+-- 'availabilityZone', 'networkInterface_availabilityZone' - The availability Zone.+--+-- 'networkInterfaceId', 'networkInterface_networkInterfaceId' - The unique identifier of the network interface.+--+-- 'privateIpAddress', 'networkInterface_privateIpAddress' - The IPv4 address of the network interface within the subnet.+--+-- 'subnetId', 'networkInterface_subnetId' - The unique identifier of the subnet.+newNetworkInterface ::+  NetworkInterface+newNetworkInterface =+  NetworkInterface'+    { availabilityZone =+        Prelude.Nothing,+      networkInterfaceId = Prelude.Nothing,+      privateIpAddress = Prelude.Nothing,+      subnetId = Prelude.Nothing+    }++-- | The availability Zone.+networkInterface_availabilityZone :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)+networkInterface_availabilityZone = Lens.lens (\NetworkInterface' {availabilityZone} -> availabilityZone) (\s@NetworkInterface' {} a -> s {availabilityZone = a} :: NetworkInterface)++-- | The unique identifier of the network interface.+networkInterface_networkInterfaceId :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)+networkInterface_networkInterfaceId = Lens.lens (\NetworkInterface' {networkInterfaceId} -> networkInterfaceId) (\s@NetworkInterface' {} a -> s {networkInterfaceId = a} :: NetworkInterface)++-- | The IPv4 address of the network interface within the subnet.+networkInterface_privateIpAddress :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)+networkInterface_privateIpAddress = Lens.lens (\NetworkInterface' {privateIpAddress} -> privateIpAddress) (\s@NetworkInterface' {} a -> s {privateIpAddress = a} :: NetworkInterface)++-- | The unique identifier of the subnet.+networkInterface_subnetId :: Lens.Lens' NetworkInterface (Prelude.Maybe Prelude.Text)+networkInterface_subnetId = Lens.lens (\NetworkInterface' {subnetId} -> subnetId) (\s@NetworkInterface' {} a -> s {subnetId = a} :: NetworkInterface)++instance Data.FromJSON NetworkInterface where+  parseJSON =+    Data.withObject+      "NetworkInterface"+      ( \x ->+          NetworkInterface'+            Prelude.<$> (x Data..:? "availabilityZone")+            Prelude.<*> (x Data..:? "networkInterfaceId")+            Prelude.<*> (x Data..:? "privateIpAddress")+            Prelude.<*> (x Data..:? "subnetId")+      )++instance Prelude.Hashable NetworkInterface where+  hashWithSalt _salt NetworkInterface' {..} =+    _salt+      `Prelude.hashWithSalt` availabilityZone+      `Prelude.hashWithSalt` networkInterfaceId+      `Prelude.hashWithSalt` privateIpAddress+      `Prelude.hashWithSalt` subnetId++instance Prelude.NFData NetworkInterface where+  rnf NetworkInterface' {..} =+    Prelude.rnf availabilityZone+      `Prelude.seq` Prelude.rnf networkInterfaceId+      `Prelude.seq` Prelude.rnf privateIpAddress+      `Prelude.seq` Prelude.rnf subnetId
+ gen/Amazonka/RedshiftServerLess/Types/RecoveryPoint.hs view
@@ -0,0 +1,136 @@+{-# 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.RedshiftServerLess.Types.RecoveryPoint+-- 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.RedshiftServerLess.Types.RecoveryPoint where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The automatically created recovery point of a namespace. Recovery points+-- are created every 30 minutes and kept for 24 hours.+--+-- /See:/ 'newRecoveryPoint' smart constructor.+data RecoveryPoint = RecoveryPoint'+  { -- | The Amazon Resource Name (ARN) of the namespace the recovery point is+    -- associated with.+    namespaceArn :: Prelude.Maybe Prelude.Text,+    -- | The name of the namespace the recovery point is associated with.+    namespaceName :: Prelude.Maybe Prelude.Text,+    -- | The time the recovery point is created.+    recoveryPointCreateTime :: Prelude.Maybe Data.ISO8601,+    -- | The unique identifier of the recovery point.+    recoveryPointId :: Prelude.Maybe Prelude.Text,+    -- | The total size of the data in the recovery point in megabytes.+    totalSizeInMegaBytes :: Prelude.Maybe Prelude.Double,+    -- | The name of the workgroup the recovery point is associated with.+    workgroupName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecoveryPoint' 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:+--+-- 'namespaceArn', 'recoveryPoint_namespaceArn' - The Amazon Resource Name (ARN) of the namespace the recovery point is+-- associated with.+--+-- 'namespaceName', 'recoveryPoint_namespaceName' - The name of the namespace the recovery point is associated with.+--+-- 'recoveryPointCreateTime', 'recoveryPoint_recoveryPointCreateTime' - The time the recovery point is created.+--+-- 'recoveryPointId', 'recoveryPoint_recoveryPointId' - The unique identifier of the recovery point.+--+-- 'totalSizeInMegaBytes', 'recoveryPoint_totalSizeInMegaBytes' - The total size of the data in the recovery point in megabytes.+--+-- 'workgroupName', 'recoveryPoint_workgroupName' - The name of the workgroup the recovery point is associated with.+newRecoveryPoint ::+  RecoveryPoint+newRecoveryPoint =+  RecoveryPoint'+    { namespaceArn = Prelude.Nothing,+      namespaceName = Prelude.Nothing,+      recoveryPointCreateTime = Prelude.Nothing,+      recoveryPointId = Prelude.Nothing,+      totalSizeInMegaBytes = Prelude.Nothing,+      workgroupName = Prelude.Nothing+    }++-- | The Amazon Resource Name (ARN) of the namespace the recovery point is+-- associated with.+recoveryPoint_namespaceArn :: Lens.Lens' RecoveryPoint (Prelude.Maybe Prelude.Text)+recoveryPoint_namespaceArn = Lens.lens (\RecoveryPoint' {namespaceArn} -> namespaceArn) (\s@RecoveryPoint' {} a -> s {namespaceArn = a} :: RecoveryPoint)++-- | The name of the namespace the recovery point is associated with.+recoveryPoint_namespaceName :: Lens.Lens' RecoveryPoint (Prelude.Maybe Prelude.Text)+recoveryPoint_namespaceName = Lens.lens (\RecoveryPoint' {namespaceName} -> namespaceName) (\s@RecoveryPoint' {} a -> s {namespaceName = a} :: RecoveryPoint)++-- | The time the recovery point is created.+recoveryPoint_recoveryPointCreateTime :: Lens.Lens' RecoveryPoint (Prelude.Maybe Prelude.UTCTime)+recoveryPoint_recoveryPointCreateTime = Lens.lens (\RecoveryPoint' {recoveryPointCreateTime} -> recoveryPointCreateTime) (\s@RecoveryPoint' {} a -> s {recoveryPointCreateTime = a} :: RecoveryPoint) Prelude.. Lens.mapping Data._Time++-- | The unique identifier of the recovery point.+recoveryPoint_recoveryPointId :: Lens.Lens' RecoveryPoint (Prelude.Maybe Prelude.Text)+recoveryPoint_recoveryPointId = Lens.lens (\RecoveryPoint' {recoveryPointId} -> recoveryPointId) (\s@RecoveryPoint' {} a -> s {recoveryPointId = a} :: RecoveryPoint)++-- | The total size of the data in the recovery point in megabytes.+recoveryPoint_totalSizeInMegaBytes :: Lens.Lens' RecoveryPoint (Prelude.Maybe Prelude.Double)+recoveryPoint_totalSizeInMegaBytes = Lens.lens (\RecoveryPoint' {totalSizeInMegaBytes} -> totalSizeInMegaBytes) (\s@RecoveryPoint' {} a -> s {totalSizeInMegaBytes = a} :: RecoveryPoint)++-- | The name of the workgroup the recovery point is associated with.+recoveryPoint_workgroupName :: Lens.Lens' RecoveryPoint (Prelude.Maybe Prelude.Text)+recoveryPoint_workgroupName = Lens.lens (\RecoveryPoint' {workgroupName} -> workgroupName) (\s@RecoveryPoint' {} a -> s {workgroupName = a} :: RecoveryPoint)++instance Data.FromJSON RecoveryPoint where+  parseJSON =+    Data.withObject+      "RecoveryPoint"+      ( \x ->+          RecoveryPoint'+            Prelude.<$> (x Data..:? "namespaceArn")+            Prelude.<*> (x Data..:? "namespaceName")+            Prelude.<*> (x Data..:? "recoveryPointCreateTime")+            Prelude.<*> (x Data..:? "recoveryPointId")+            Prelude.<*> (x Data..:? "totalSizeInMegaBytes")+            Prelude.<*> (x Data..:? "workgroupName")+      )++instance Prelude.Hashable RecoveryPoint where+  hashWithSalt _salt RecoveryPoint' {..} =+    _salt+      `Prelude.hashWithSalt` namespaceArn+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` recoveryPointCreateTime+      `Prelude.hashWithSalt` recoveryPointId+      `Prelude.hashWithSalt` totalSizeInMegaBytes+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData RecoveryPoint where+  rnf RecoveryPoint' {..} =+    Prelude.rnf namespaceArn+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf recoveryPointCreateTime+      `Prelude.seq` Prelude.rnf recoveryPointId+      `Prelude.seq` Prelude.rnf totalSizeInMegaBytes+      `Prelude.seq` Prelude.rnf workgroupName
+ gen/Amazonka/RedshiftServerLess/Types/ResourcePolicy.hs view
@@ -0,0 +1,85 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.ResourcePolicy+-- 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.RedshiftServerLess.Types.ResourcePolicy where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The resource policy object. Currently, you can use policies to share+-- snapshots across Amazon Web Services accounts.+--+-- /See:/ 'newResourcePolicy' smart constructor.+data ResourcePolicy = ResourcePolicy'+  { -- | The resource policy.+    policy :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the policy.+    resourceArn :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourcePolicy' 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:+--+-- 'policy', 'resourcePolicy_policy' - The resource policy.+--+-- 'resourceArn', 'resourcePolicy_resourceArn' - The Amazon Resource Name (ARN) of the policy.+newResourcePolicy ::+  ResourcePolicy+newResourcePolicy =+  ResourcePolicy'+    { policy = Prelude.Nothing,+      resourceArn = Prelude.Nothing+    }++-- | The resource policy.+resourcePolicy_policy :: Lens.Lens' ResourcePolicy (Prelude.Maybe Prelude.Text)+resourcePolicy_policy = Lens.lens (\ResourcePolicy' {policy} -> policy) (\s@ResourcePolicy' {} a -> s {policy = a} :: ResourcePolicy)++-- | The Amazon Resource Name (ARN) of the policy.+resourcePolicy_resourceArn :: Lens.Lens' ResourcePolicy (Prelude.Maybe Prelude.Text)+resourcePolicy_resourceArn = Lens.lens (\ResourcePolicy' {resourceArn} -> resourceArn) (\s@ResourcePolicy' {} a -> s {resourceArn = a} :: ResourcePolicy)++instance Data.FromJSON ResourcePolicy where+  parseJSON =+    Data.withObject+      "ResourcePolicy"+      ( \x ->+          ResourcePolicy'+            Prelude.<$> (x Data..:? "policy")+            Prelude.<*> (x Data..:? "resourceArn")+      )++instance Prelude.Hashable ResourcePolicy where+  hashWithSalt _salt ResourcePolicy' {..} =+    _salt+      `Prelude.hashWithSalt` policy+      `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ResourcePolicy where+  rnf ResourcePolicy' {..} =+    Prelude.rnf policy+      `Prelude.seq` Prelude.rnf resourceArn
+ gen/Amazonka/RedshiftServerLess/Types/Snapshot.hs view
@@ -0,0 +1,324 @@+{-# 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.RedshiftServerLess.Types.Snapshot+-- 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.RedshiftServerLess.Types.Snapshot where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types.SnapshotStatus++-- | A snapshot object that contains databases.+--+-- /See:/ 'newSnapshot' smart constructor.+data Snapshot = Snapshot'+  { -- | All of the Amazon Web Services accounts that have access to restore a+    -- snapshot to a provisioned cluster.+    accountsWithProvisionedRestoreAccess :: Prelude.Maybe [Prelude.Text],+    -- | All of the Amazon Web Services accounts that have access to restore a+    -- snapshot to a namespace.+    accountsWithRestoreAccess :: Prelude.Maybe [Prelude.Text],+    -- | The size of the incremental backup in megabytes.+    actualIncrementalBackupSizeInMegaBytes :: Prelude.Maybe Prelude.Double,+    -- | The username of the database within a snapshot.+    adminUsername :: Prelude.Maybe Prelude.Text,+    -- | The size in megabytes of the data that has been backed up to a snapshot.+    backupProgressInMegaBytes :: Prelude.Maybe Prelude.Double,+    -- | The rate at which data is backed up into a snapshot in megabytes per+    -- second.+    currentBackupRateInMegaBytesPerSecond :: Prelude.Maybe Prelude.Double,+    -- | The amount of time it took to back up data into a snapshot.+    elapsedTimeInSeconds :: Prelude.Maybe Prelude.Integer,+    -- | The estimated amount of seconds until the snapshot completes backup.+    estimatedSecondsToCompletion :: Prelude.Maybe Prelude.Integer,+    -- | The unique identifier of the KMS key used to encrypt the snapshot.+    kmsKeyId :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the namespace the snapshot was created+    -- from.+    namespaceArn :: Prelude.Maybe Prelude.Text,+    -- | The name of the namepsace.+    namespaceName :: Prelude.Maybe Prelude.Text,+    -- | The owner Amazon Web Services; account of the snapshot.+    ownerAccount :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the snapshot.+    snapshotArn :: Prelude.Maybe Prelude.Text,+    -- | The timestamp of when the snapshot was created.+    snapshotCreateTime :: Prelude.Maybe Data.ISO8601,+    -- | The name of the snapshot.+    snapshotName :: Prelude.Maybe Prelude.Text,+    -- | The amount of days until the snapshot is deleted.+    snapshotRemainingDays :: Prelude.Maybe Prelude.Int,+    -- | The period of time, in days, of how long the snapshot is retained.+    snapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,+    -- | The timestamp of when data within the snapshot started getting retained.+    snapshotRetentionStartTime :: Prelude.Maybe Data.ISO8601,+    -- | The status of the snapshot.+    status :: Prelude.Maybe SnapshotStatus,+    -- | The total size, in megabytes, of how big the snapshot is.+    totalBackupSizeInMegaBytes :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Snapshot' 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:+--+-- 'accountsWithProvisionedRestoreAccess', 'snapshot_accountsWithProvisionedRestoreAccess' - All of the Amazon Web Services accounts that have access to restore a+-- snapshot to a provisioned cluster.+--+-- 'accountsWithRestoreAccess', 'snapshot_accountsWithRestoreAccess' - All of the Amazon Web Services accounts that have access to restore a+-- snapshot to a namespace.+--+-- 'actualIncrementalBackupSizeInMegaBytes', 'snapshot_actualIncrementalBackupSizeInMegaBytes' - The size of the incremental backup in megabytes.+--+-- 'adminUsername', 'snapshot_adminUsername' - The username of the database within a snapshot.+--+-- 'backupProgressInMegaBytes', 'snapshot_backupProgressInMegaBytes' - The size in megabytes of the data that has been backed up to a snapshot.+--+-- 'currentBackupRateInMegaBytesPerSecond', 'snapshot_currentBackupRateInMegaBytesPerSecond' - The rate at which data is backed up into a snapshot in megabytes per+-- second.+--+-- 'elapsedTimeInSeconds', 'snapshot_elapsedTimeInSeconds' - The amount of time it took to back up data into a snapshot.+--+-- 'estimatedSecondsToCompletion', 'snapshot_estimatedSecondsToCompletion' - The estimated amount of seconds until the snapshot completes backup.+--+-- 'kmsKeyId', 'snapshot_kmsKeyId' - The unique identifier of the KMS key used to encrypt the snapshot.+--+-- 'namespaceArn', 'snapshot_namespaceArn' - The Amazon Resource Name (ARN) of the namespace the snapshot was created+-- from.+--+-- 'namespaceName', 'snapshot_namespaceName' - The name of the namepsace.+--+-- 'ownerAccount', 'snapshot_ownerAccount' - The owner Amazon Web Services; account of the snapshot.+--+-- 'snapshotArn', 'snapshot_snapshotArn' - The Amazon Resource Name (ARN) of the snapshot.+--+-- 'snapshotCreateTime', 'snapshot_snapshotCreateTime' - The timestamp of when the snapshot was created.+--+-- 'snapshotName', 'snapshot_snapshotName' - The name of the snapshot.+--+-- 'snapshotRemainingDays', 'snapshot_snapshotRemainingDays' - The amount of days until the snapshot is deleted.+--+-- 'snapshotRetentionPeriod', 'snapshot_snapshotRetentionPeriod' - The period of time, in days, of how long the snapshot is retained.+--+-- 'snapshotRetentionStartTime', 'snapshot_snapshotRetentionStartTime' - The timestamp of when data within the snapshot started getting retained.+--+-- 'status', 'snapshot_status' - The status of the snapshot.+--+-- 'totalBackupSizeInMegaBytes', 'snapshot_totalBackupSizeInMegaBytes' - The total size, in megabytes, of how big the snapshot is.+newSnapshot ::+  Snapshot+newSnapshot =+  Snapshot'+    { accountsWithProvisionedRestoreAccess =+        Prelude.Nothing,+      accountsWithRestoreAccess = Prelude.Nothing,+      actualIncrementalBackupSizeInMegaBytes =+        Prelude.Nothing,+      adminUsername = Prelude.Nothing,+      backupProgressInMegaBytes = Prelude.Nothing,+      currentBackupRateInMegaBytesPerSecond =+        Prelude.Nothing,+      elapsedTimeInSeconds = Prelude.Nothing,+      estimatedSecondsToCompletion = Prelude.Nothing,+      kmsKeyId = Prelude.Nothing,+      namespaceArn = Prelude.Nothing,+      namespaceName = Prelude.Nothing,+      ownerAccount = Prelude.Nothing,+      snapshotArn = Prelude.Nothing,+      snapshotCreateTime = Prelude.Nothing,+      snapshotName = Prelude.Nothing,+      snapshotRemainingDays = Prelude.Nothing,+      snapshotRetentionPeriod = Prelude.Nothing,+      snapshotRetentionStartTime = Prelude.Nothing,+      status = Prelude.Nothing,+      totalBackupSizeInMegaBytes = Prelude.Nothing+    }++-- | All of the Amazon Web Services accounts that have access to restore a+-- snapshot to a provisioned cluster.+snapshot_accountsWithProvisionedRestoreAccess :: Lens.Lens' Snapshot (Prelude.Maybe [Prelude.Text])+snapshot_accountsWithProvisionedRestoreAccess = Lens.lens (\Snapshot' {accountsWithProvisionedRestoreAccess} -> accountsWithProvisionedRestoreAccess) (\s@Snapshot' {} a -> s {accountsWithProvisionedRestoreAccess = a} :: Snapshot) Prelude.. Lens.mapping Lens.coerced++-- | All of the Amazon Web Services accounts that have access to restore a+-- snapshot to a namespace.+snapshot_accountsWithRestoreAccess :: Lens.Lens' Snapshot (Prelude.Maybe [Prelude.Text])+snapshot_accountsWithRestoreAccess = Lens.lens (\Snapshot' {accountsWithRestoreAccess} -> accountsWithRestoreAccess) (\s@Snapshot' {} a -> s {accountsWithRestoreAccess = a} :: Snapshot) Prelude.. Lens.mapping Lens.coerced++-- | The size of the incremental backup in megabytes.+snapshot_actualIncrementalBackupSizeInMegaBytes :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Double)+snapshot_actualIncrementalBackupSizeInMegaBytes = Lens.lens (\Snapshot' {actualIncrementalBackupSizeInMegaBytes} -> actualIncrementalBackupSizeInMegaBytes) (\s@Snapshot' {} a -> s {actualIncrementalBackupSizeInMegaBytes = a} :: Snapshot)++-- | The username of the database within a snapshot.+snapshot_adminUsername :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)+snapshot_adminUsername = Lens.lens (\Snapshot' {adminUsername} -> adminUsername) (\s@Snapshot' {} a -> s {adminUsername = a} :: Snapshot)++-- | The size in megabytes of the data that has been backed up to a snapshot.+snapshot_backupProgressInMegaBytes :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Double)+snapshot_backupProgressInMegaBytes = Lens.lens (\Snapshot' {backupProgressInMegaBytes} -> backupProgressInMegaBytes) (\s@Snapshot' {} a -> s {backupProgressInMegaBytes = a} :: Snapshot)++-- | The rate at which data is backed up into a snapshot in megabytes per+-- second.+snapshot_currentBackupRateInMegaBytesPerSecond :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Double)+snapshot_currentBackupRateInMegaBytesPerSecond = Lens.lens (\Snapshot' {currentBackupRateInMegaBytesPerSecond} -> currentBackupRateInMegaBytesPerSecond) (\s@Snapshot' {} a -> s {currentBackupRateInMegaBytesPerSecond = a} :: Snapshot)++-- | The amount of time it took to back up data into a snapshot.+snapshot_elapsedTimeInSeconds :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Integer)+snapshot_elapsedTimeInSeconds = Lens.lens (\Snapshot' {elapsedTimeInSeconds} -> elapsedTimeInSeconds) (\s@Snapshot' {} a -> s {elapsedTimeInSeconds = a} :: Snapshot)++-- | The estimated amount of seconds until the snapshot completes backup.+snapshot_estimatedSecondsToCompletion :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Integer)+snapshot_estimatedSecondsToCompletion = Lens.lens (\Snapshot' {estimatedSecondsToCompletion} -> estimatedSecondsToCompletion) (\s@Snapshot' {} a -> s {estimatedSecondsToCompletion = a} :: Snapshot)++-- | The unique identifier of the KMS key used to encrypt the snapshot.+snapshot_kmsKeyId :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)+snapshot_kmsKeyId = Lens.lens (\Snapshot' {kmsKeyId} -> kmsKeyId) (\s@Snapshot' {} a -> s {kmsKeyId = a} :: Snapshot)++-- | The Amazon Resource Name (ARN) of the namespace the snapshot was created+-- from.+snapshot_namespaceArn :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)+snapshot_namespaceArn = Lens.lens (\Snapshot' {namespaceArn} -> namespaceArn) (\s@Snapshot' {} a -> s {namespaceArn = a} :: Snapshot)++-- | The name of the namepsace.+snapshot_namespaceName :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)+snapshot_namespaceName = Lens.lens (\Snapshot' {namespaceName} -> namespaceName) (\s@Snapshot' {} a -> s {namespaceName = a} :: Snapshot)++-- | The owner Amazon Web Services; account of the snapshot.+snapshot_ownerAccount :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)+snapshot_ownerAccount = Lens.lens (\Snapshot' {ownerAccount} -> ownerAccount) (\s@Snapshot' {} a -> s {ownerAccount = a} :: Snapshot)++-- | The Amazon Resource Name (ARN) of the snapshot.+snapshot_snapshotArn :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)+snapshot_snapshotArn = Lens.lens (\Snapshot' {snapshotArn} -> snapshotArn) (\s@Snapshot' {} a -> s {snapshotArn = a} :: Snapshot)++-- | The timestamp of when the snapshot was created.+snapshot_snapshotCreateTime :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.UTCTime)+snapshot_snapshotCreateTime = Lens.lens (\Snapshot' {snapshotCreateTime} -> snapshotCreateTime) (\s@Snapshot' {} a -> s {snapshotCreateTime = a} :: Snapshot) Prelude.. Lens.mapping Data._Time++-- | The name of the snapshot.+snapshot_snapshotName :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)+snapshot_snapshotName = Lens.lens (\Snapshot' {snapshotName} -> snapshotName) (\s@Snapshot' {} a -> s {snapshotName = a} :: Snapshot)++-- | The amount of days until the snapshot is deleted.+snapshot_snapshotRemainingDays :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Int)+snapshot_snapshotRemainingDays = Lens.lens (\Snapshot' {snapshotRemainingDays} -> snapshotRemainingDays) (\s@Snapshot' {} a -> s {snapshotRemainingDays = a} :: Snapshot)++-- | The period of time, in days, of how long the snapshot is retained.+snapshot_snapshotRetentionPeriod :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Int)+snapshot_snapshotRetentionPeriod = Lens.lens (\Snapshot' {snapshotRetentionPeriod} -> snapshotRetentionPeriod) (\s@Snapshot' {} a -> s {snapshotRetentionPeriod = a} :: Snapshot)++-- | The timestamp of when data within the snapshot started getting retained.+snapshot_snapshotRetentionStartTime :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.UTCTime)+snapshot_snapshotRetentionStartTime = Lens.lens (\Snapshot' {snapshotRetentionStartTime} -> snapshotRetentionStartTime) (\s@Snapshot' {} a -> s {snapshotRetentionStartTime = a} :: Snapshot) Prelude.. Lens.mapping Data._Time++-- | The status of the snapshot.+snapshot_status :: Lens.Lens' Snapshot (Prelude.Maybe SnapshotStatus)+snapshot_status = Lens.lens (\Snapshot' {status} -> status) (\s@Snapshot' {} a -> s {status = a} :: Snapshot)++-- | The total size, in megabytes, of how big the snapshot is.+snapshot_totalBackupSizeInMegaBytes :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Double)+snapshot_totalBackupSizeInMegaBytes = Lens.lens (\Snapshot' {totalBackupSizeInMegaBytes} -> totalBackupSizeInMegaBytes) (\s@Snapshot' {} a -> s {totalBackupSizeInMegaBytes = a} :: Snapshot)++instance Data.FromJSON Snapshot where+  parseJSON =+    Data.withObject+      "Snapshot"+      ( \x ->+          Snapshot'+            Prelude.<$> ( x+                            Data..:? "accountsWithProvisionedRestoreAccess"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> ( x+                            Data..:? "accountsWithRestoreAccess"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "actualIncrementalBackupSizeInMegaBytes")+            Prelude.<*> (x Data..:? "adminUsername")+            Prelude.<*> (x Data..:? "backupProgressInMegaBytes")+            Prelude.<*> (x Data..:? "currentBackupRateInMegaBytesPerSecond")+            Prelude.<*> (x Data..:? "elapsedTimeInSeconds")+            Prelude.<*> (x Data..:? "estimatedSecondsToCompletion")+            Prelude.<*> (x Data..:? "kmsKeyId")+            Prelude.<*> (x Data..:? "namespaceArn")+            Prelude.<*> (x Data..:? "namespaceName")+            Prelude.<*> (x Data..:? "ownerAccount")+            Prelude.<*> (x Data..:? "snapshotArn")+            Prelude.<*> (x Data..:? "snapshotCreateTime")+            Prelude.<*> (x Data..:? "snapshotName")+            Prelude.<*> (x Data..:? "snapshotRemainingDays")+            Prelude.<*> (x Data..:? "snapshotRetentionPeriod")+            Prelude.<*> (x Data..:? "snapshotRetentionStartTime")+            Prelude.<*> (x Data..:? "status")+            Prelude.<*> (x Data..:? "totalBackupSizeInMegaBytes")+      )++instance Prelude.Hashable Snapshot where+  hashWithSalt _salt Snapshot' {..} =+    _salt+      `Prelude.hashWithSalt` accountsWithProvisionedRestoreAccess+      `Prelude.hashWithSalt` accountsWithRestoreAccess+      `Prelude.hashWithSalt` actualIncrementalBackupSizeInMegaBytes+      `Prelude.hashWithSalt` adminUsername+      `Prelude.hashWithSalt` backupProgressInMegaBytes+      `Prelude.hashWithSalt` currentBackupRateInMegaBytesPerSecond+      `Prelude.hashWithSalt` elapsedTimeInSeconds+      `Prelude.hashWithSalt` estimatedSecondsToCompletion+      `Prelude.hashWithSalt` kmsKeyId+      `Prelude.hashWithSalt` namespaceArn+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` ownerAccount+      `Prelude.hashWithSalt` snapshotArn+      `Prelude.hashWithSalt` snapshotCreateTime+      `Prelude.hashWithSalt` snapshotName+      `Prelude.hashWithSalt` snapshotRemainingDays+      `Prelude.hashWithSalt` snapshotRetentionPeriod+      `Prelude.hashWithSalt` snapshotRetentionStartTime+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` totalBackupSizeInMegaBytes++instance Prelude.NFData Snapshot where+  rnf Snapshot' {..} =+    Prelude.rnf accountsWithProvisionedRestoreAccess+      `Prelude.seq` Prelude.rnf accountsWithRestoreAccess+      `Prelude.seq` Prelude.rnf actualIncrementalBackupSizeInMegaBytes+      `Prelude.seq` Prelude.rnf adminUsername+      `Prelude.seq` Prelude.rnf backupProgressInMegaBytes+      `Prelude.seq` Prelude.rnf currentBackupRateInMegaBytesPerSecond+      `Prelude.seq` Prelude.rnf elapsedTimeInSeconds+      `Prelude.seq` Prelude.rnf estimatedSecondsToCompletion+      `Prelude.seq` Prelude.rnf kmsKeyId+      `Prelude.seq` Prelude.rnf namespaceArn+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf ownerAccount+      `Prelude.seq` Prelude.rnf snapshotArn+      `Prelude.seq` Prelude.rnf snapshotCreateTime+      `Prelude.seq` Prelude.rnf snapshotName+      `Prelude.seq` Prelude.rnf snapshotRemainingDays+      `Prelude.seq` Prelude.rnf snapshotRetentionPeriod+      `Prelude.seq` Prelude.rnf+        snapshotRetentionStartTime+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf+        totalBackupSizeInMegaBytes
+ gen/Amazonka/RedshiftServerLess/Types/SnapshotStatus.hs view
@@ -0,0 +1,91 @@+{-# 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.RedshiftServerLess.Types.SnapshotStatus+-- 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.RedshiftServerLess.Types.SnapshotStatus+  ( SnapshotStatus+      ( ..,+        SnapshotStatus_AVAILABLE,+        SnapshotStatus_CANCELLED,+        SnapshotStatus_COPYING,+        SnapshotStatus_CREATING,+        SnapshotStatus_DELETED,+        SnapshotStatus_FAILED+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype SnapshotStatus = SnapshotStatus'+  { fromSnapshotStatus ::+      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 SnapshotStatus_AVAILABLE :: SnapshotStatus+pattern SnapshotStatus_AVAILABLE = SnapshotStatus' "AVAILABLE"++pattern SnapshotStatus_CANCELLED :: SnapshotStatus+pattern SnapshotStatus_CANCELLED = SnapshotStatus' "CANCELLED"++pattern SnapshotStatus_COPYING :: SnapshotStatus+pattern SnapshotStatus_COPYING = SnapshotStatus' "COPYING"++pattern SnapshotStatus_CREATING :: SnapshotStatus+pattern SnapshotStatus_CREATING = SnapshotStatus' "CREATING"++pattern SnapshotStatus_DELETED :: SnapshotStatus+pattern SnapshotStatus_DELETED = SnapshotStatus' "DELETED"++pattern SnapshotStatus_FAILED :: SnapshotStatus+pattern SnapshotStatus_FAILED = SnapshotStatus' "FAILED"++{-# COMPLETE+  SnapshotStatus_AVAILABLE,+  SnapshotStatus_CANCELLED,+  SnapshotStatus_COPYING,+  SnapshotStatus_CREATING,+  SnapshotStatus_DELETED,+  SnapshotStatus_FAILED,+  SnapshotStatus'+  #-}
+ gen/Amazonka/RedshiftServerLess/Types/TableRestoreStatus.hs view
@@ -0,0 +1,252 @@+{-# 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.RedshiftServerLess.Types.TableRestoreStatus+-- 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.RedshiftServerLess.Types.TableRestoreStatus where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Contains information about a table restore request.+--+-- /See:/ 'newTableRestoreStatus' smart constructor.+data TableRestoreStatus = TableRestoreStatus'+  { -- | A description of the status of the table restore request. Status values+    -- include @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@, @IN_PROGRESS@.+    message :: Prelude.Maybe Prelude.Text,+    -- | The namespace of the table being restored from.+    namespaceName :: Prelude.Maybe Prelude.Text,+    -- | The name of the table to create from the restore operation.+    newTableName' :: Prelude.Maybe Prelude.Text,+    -- | The amount of data restored to the new table so far, in megabytes (MB).+    progressInMegaBytes :: Prelude.Maybe Prelude.Integer,+    -- | The time that the table restore request was made, in Universal+    -- Coordinated Time (UTC).+    requestTime :: Prelude.Maybe Data.POSIX,+    -- | The name of the snapshot being restored from.+    snapshotName :: Prelude.Maybe Prelude.Text,+    -- | The name of the source database being restored from.+    sourceDatabaseName :: Prelude.Maybe Prelude.Text,+    -- | The name of the source schema being restored from.+    sourceSchemaName :: Prelude.Maybe Prelude.Text,+    -- | The name of the source table being restored from.+    sourceTableName :: Prelude.Maybe Prelude.Text,+    -- | A value that describes the current state of the table restore request.+    -- Possible values include @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@,+    -- @IN_PROGRESS@.+    status :: Prelude.Maybe Prelude.Text,+    -- | The ID of the RestoreTableFromSnapshot request.+    tableRestoreRequestId :: Prelude.Maybe Prelude.Text,+    -- | The name of the database to restore to.+    targetDatabaseName :: Prelude.Maybe Prelude.Text,+    -- | The name of the schema to restore to.+    targetSchemaName :: Prelude.Maybe Prelude.Text,+    -- | The total amount of data to restore to the new table, in megabytes (MB).+    totalDataInMegaBytes :: Prelude.Maybe Prelude.Integer,+    -- | The name of the workgroup being restored from.+    workgroupName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TableRestoreStatus' 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:+--+-- 'message', 'tableRestoreStatus_message' - A description of the status of the table restore request. Status values+-- include @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@, @IN_PROGRESS@.+--+-- 'namespaceName', 'tableRestoreStatus_namespaceName' - The namespace of the table being restored from.+--+-- 'newTableName'', 'tableRestoreStatus_newTableName' - The name of the table to create from the restore operation.+--+-- 'progressInMegaBytes', 'tableRestoreStatus_progressInMegaBytes' - The amount of data restored to the new table so far, in megabytes (MB).+--+-- 'requestTime', 'tableRestoreStatus_requestTime' - The time that the table restore request was made, in Universal+-- Coordinated Time (UTC).+--+-- 'snapshotName', 'tableRestoreStatus_snapshotName' - The name of the snapshot being restored from.+--+-- 'sourceDatabaseName', 'tableRestoreStatus_sourceDatabaseName' - The name of the source database being restored from.+--+-- 'sourceSchemaName', 'tableRestoreStatus_sourceSchemaName' - The name of the source schema being restored from.+--+-- 'sourceTableName', 'tableRestoreStatus_sourceTableName' - The name of the source table being restored from.+--+-- 'status', 'tableRestoreStatus_status' - A value that describes the current state of the table restore request.+-- Possible values include @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@,+-- @IN_PROGRESS@.+--+-- 'tableRestoreRequestId', 'tableRestoreStatus_tableRestoreRequestId' - The ID of the RestoreTableFromSnapshot request.+--+-- 'targetDatabaseName', 'tableRestoreStatus_targetDatabaseName' - The name of the database to restore to.+--+-- 'targetSchemaName', 'tableRestoreStatus_targetSchemaName' - The name of the schema to restore to.+--+-- 'totalDataInMegaBytes', 'tableRestoreStatus_totalDataInMegaBytes' - The total amount of data to restore to the new table, in megabytes (MB).+--+-- 'workgroupName', 'tableRestoreStatus_workgroupName' - The name of the workgroup being restored from.+newTableRestoreStatus ::+  TableRestoreStatus+newTableRestoreStatus =+  TableRestoreStatus'+    { message = Prelude.Nothing,+      namespaceName = Prelude.Nothing,+      newTableName' = Prelude.Nothing,+      progressInMegaBytes = Prelude.Nothing,+      requestTime = Prelude.Nothing,+      snapshotName = Prelude.Nothing,+      sourceDatabaseName = Prelude.Nothing,+      sourceSchemaName = Prelude.Nothing,+      sourceTableName = Prelude.Nothing,+      status = Prelude.Nothing,+      tableRestoreRequestId = Prelude.Nothing,+      targetDatabaseName = Prelude.Nothing,+      targetSchemaName = Prelude.Nothing,+      totalDataInMegaBytes = Prelude.Nothing,+      workgroupName = Prelude.Nothing+    }++-- | A description of the status of the table restore request. Status values+-- include @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@, @IN_PROGRESS@.+tableRestoreStatus_message :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_message = Lens.lens (\TableRestoreStatus' {message} -> message) (\s@TableRestoreStatus' {} a -> s {message = a} :: TableRestoreStatus)++-- | The namespace of the table being restored from.+tableRestoreStatus_namespaceName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_namespaceName = Lens.lens (\TableRestoreStatus' {namespaceName} -> namespaceName) (\s@TableRestoreStatus' {} a -> s {namespaceName = a} :: TableRestoreStatus)++-- | The name of the table to create from the restore operation.+tableRestoreStatus_newTableName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_newTableName = Lens.lens (\TableRestoreStatus' {newTableName'} -> newTableName') (\s@TableRestoreStatus' {} a -> s {newTableName' = a} :: TableRestoreStatus)++-- | The amount of data restored to the new table so far, in megabytes (MB).+tableRestoreStatus_progressInMegaBytes :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Integer)+tableRestoreStatus_progressInMegaBytes = Lens.lens (\TableRestoreStatus' {progressInMegaBytes} -> progressInMegaBytes) (\s@TableRestoreStatus' {} a -> s {progressInMegaBytes = a} :: TableRestoreStatus)++-- | The time that the table restore request was made, in Universal+-- Coordinated Time (UTC).+tableRestoreStatus_requestTime :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.UTCTime)+tableRestoreStatus_requestTime = Lens.lens (\TableRestoreStatus' {requestTime} -> requestTime) (\s@TableRestoreStatus' {} a -> s {requestTime = a} :: TableRestoreStatus) Prelude.. Lens.mapping Data._Time++-- | The name of the snapshot being restored from.+tableRestoreStatus_snapshotName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_snapshotName = Lens.lens (\TableRestoreStatus' {snapshotName} -> snapshotName) (\s@TableRestoreStatus' {} a -> s {snapshotName = a} :: TableRestoreStatus)++-- | The name of the source database being restored from.+tableRestoreStatus_sourceDatabaseName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_sourceDatabaseName = Lens.lens (\TableRestoreStatus' {sourceDatabaseName} -> sourceDatabaseName) (\s@TableRestoreStatus' {} a -> s {sourceDatabaseName = a} :: TableRestoreStatus)++-- | The name of the source schema being restored from.+tableRestoreStatus_sourceSchemaName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_sourceSchemaName = Lens.lens (\TableRestoreStatus' {sourceSchemaName} -> sourceSchemaName) (\s@TableRestoreStatus' {} a -> s {sourceSchemaName = a} :: TableRestoreStatus)++-- | The name of the source table being restored from.+tableRestoreStatus_sourceTableName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_sourceTableName = Lens.lens (\TableRestoreStatus' {sourceTableName} -> sourceTableName) (\s@TableRestoreStatus' {} a -> s {sourceTableName = a} :: TableRestoreStatus)++-- | A value that describes the current state of the table restore request.+-- Possible values include @SUCCEEDED@, @FAILED@, @CANCELED@, @PENDING@,+-- @IN_PROGRESS@.+tableRestoreStatus_status :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_status = Lens.lens (\TableRestoreStatus' {status} -> status) (\s@TableRestoreStatus' {} a -> s {status = a} :: TableRestoreStatus)++-- | The ID of the RestoreTableFromSnapshot request.+tableRestoreStatus_tableRestoreRequestId :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_tableRestoreRequestId = Lens.lens (\TableRestoreStatus' {tableRestoreRequestId} -> tableRestoreRequestId) (\s@TableRestoreStatus' {} a -> s {tableRestoreRequestId = a} :: TableRestoreStatus)++-- | The name of the database to restore to.+tableRestoreStatus_targetDatabaseName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_targetDatabaseName = Lens.lens (\TableRestoreStatus' {targetDatabaseName} -> targetDatabaseName) (\s@TableRestoreStatus' {} a -> s {targetDatabaseName = a} :: TableRestoreStatus)++-- | The name of the schema to restore to.+tableRestoreStatus_targetSchemaName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_targetSchemaName = Lens.lens (\TableRestoreStatus' {targetSchemaName} -> targetSchemaName) (\s@TableRestoreStatus' {} a -> s {targetSchemaName = a} :: TableRestoreStatus)++-- | The total amount of data to restore to the new table, in megabytes (MB).+tableRestoreStatus_totalDataInMegaBytes :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Integer)+tableRestoreStatus_totalDataInMegaBytes = Lens.lens (\TableRestoreStatus' {totalDataInMegaBytes} -> totalDataInMegaBytes) (\s@TableRestoreStatus' {} a -> s {totalDataInMegaBytes = a} :: TableRestoreStatus)++-- | The name of the workgroup being restored from.+tableRestoreStatus_workgroupName :: Lens.Lens' TableRestoreStatus (Prelude.Maybe Prelude.Text)+tableRestoreStatus_workgroupName = Lens.lens (\TableRestoreStatus' {workgroupName} -> workgroupName) (\s@TableRestoreStatus' {} a -> s {workgroupName = a} :: TableRestoreStatus)++instance Data.FromJSON TableRestoreStatus where+  parseJSON =+    Data.withObject+      "TableRestoreStatus"+      ( \x ->+          TableRestoreStatus'+            Prelude.<$> (x Data..:? "message")+            Prelude.<*> (x Data..:? "namespaceName")+            Prelude.<*> (x Data..:? "newTableName")+            Prelude.<*> (x Data..:? "progressInMegaBytes")+            Prelude.<*> (x Data..:? "requestTime")+            Prelude.<*> (x Data..:? "snapshotName")+            Prelude.<*> (x Data..:? "sourceDatabaseName")+            Prelude.<*> (x Data..:? "sourceSchemaName")+            Prelude.<*> (x Data..:? "sourceTableName")+            Prelude.<*> (x Data..:? "status")+            Prelude.<*> (x Data..:? "tableRestoreRequestId")+            Prelude.<*> (x Data..:? "targetDatabaseName")+            Prelude.<*> (x Data..:? "targetSchemaName")+            Prelude.<*> (x Data..:? "totalDataInMegaBytes")+            Prelude.<*> (x Data..:? "workgroupName")+      )++instance Prelude.Hashable TableRestoreStatus where+  hashWithSalt _salt TableRestoreStatus' {..} =+    _salt+      `Prelude.hashWithSalt` message+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` newTableName'+      `Prelude.hashWithSalt` progressInMegaBytes+      `Prelude.hashWithSalt` requestTime+      `Prelude.hashWithSalt` snapshotName+      `Prelude.hashWithSalt` sourceDatabaseName+      `Prelude.hashWithSalt` sourceSchemaName+      `Prelude.hashWithSalt` sourceTableName+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` tableRestoreRequestId+      `Prelude.hashWithSalt` targetDatabaseName+      `Prelude.hashWithSalt` targetSchemaName+      `Prelude.hashWithSalt` totalDataInMegaBytes+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData TableRestoreStatus where+  rnf TableRestoreStatus' {..} =+    Prelude.rnf message+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf newTableName'+      `Prelude.seq` Prelude.rnf progressInMegaBytes+      `Prelude.seq` Prelude.rnf requestTime+      `Prelude.seq` Prelude.rnf snapshotName+      `Prelude.seq` Prelude.rnf sourceDatabaseName+      `Prelude.seq` Prelude.rnf sourceSchemaName+      `Prelude.seq` Prelude.rnf sourceTableName+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf tableRestoreRequestId+      `Prelude.seq` Prelude.rnf targetDatabaseName+      `Prelude.seq` Prelude.rnf targetSchemaName+      `Prelude.seq` Prelude.rnf totalDataInMegaBytes+      `Prelude.seq` Prelude.rnf workgroupName
+ gen/Amazonka/RedshiftServerLess/Types/Tag.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.Tag+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.RedshiftServerLess.Types.Tag where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A map of key-value pairs.+--+-- /See:/ 'newTag' smart constructor.+data Tag = Tag'+  { -- | The key to use in the tag.+    key :: Prelude.Text,+    -- | The value of the tag.+    value :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Tag' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'key', 'tag_key' - The key to use in the tag.+--+-- 'value', 'tag_value' - The value of the tag.+newTag ::+  -- | 'key'+  Prelude.Text ->+  -- | 'value'+  Prelude.Text ->+  Tag+newTag pKey_ pValue_ =+  Tag' {key = pKey_, value = pValue_}++-- | The key to use in the tag.+tag_key :: Lens.Lens' Tag Prelude.Text+tag_key = Lens.lens (\Tag' {key} -> key) (\s@Tag' {} a -> s {key = a} :: Tag)++-- | The value of the tag.+tag_value :: Lens.Lens' Tag Prelude.Text+tag_value = Lens.lens (\Tag' {value} -> value) (\s@Tag' {} a -> s {value = a} :: Tag)++instance Data.FromJSON Tag where+  parseJSON =+    Data.withObject+      "Tag"+      ( \x ->+          Tag'+            Prelude.<$> (x Data..: "key")+            Prelude.<*> (x Data..: "value")+      )++instance Prelude.Hashable Tag where+  hashWithSalt _salt Tag' {..} =+    _salt+      `Prelude.hashWithSalt` key+      `Prelude.hashWithSalt` value++instance Prelude.NFData Tag where+  rnf Tag' {..} =+    Prelude.rnf key `Prelude.seq` Prelude.rnf value++instance Data.ToJSON Tag where+  toJSON Tag' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("key" Data..= key),+            Prelude.Just ("value" Data..= value)+          ]+      )
+ gen/Amazonka/RedshiftServerLess/Types/UsageLimit.hs view
@@ -0,0 +1,165 @@+{-# 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.RedshiftServerLess.Types.UsageLimit+-- 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.RedshiftServerLess.Types.UsageLimit where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types.UsageLimitBreachAction+import Amazonka.RedshiftServerLess.Types.UsageLimitPeriod+import Amazonka.RedshiftServerLess.Types.UsageLimitUsageType++-- | The usage limit object.+--+-- /See:/ 'newUsageLimit' smart constructor.+data UsageLimit = UsageLimit'+  { -- | The limit amount. If time-based, this amount is in RPUs consumed per+    -- hour. If data-based, this amount is in terabytes (TB). The value must be+    -- a positive number.+    amount :: Prelude.Maybe Prelude.Integer,+    -- | The action that Amazon Redshift Serverless takes when the limit is+    -- reached.+    breachAction :: Prelude.Maybe UsageLimitBreachAction,+    -- | The time period that the amount applies to. A weekly period begins on+    -- Sunday. The default is monthly.+    period :: Prelude.Maybe UsageLimitPeriod,+    -- | The Amazon Resource Name (ARN) that identifies the Amazon Redshift+    -- Serverless resource.+    resourceArn :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the resource associated with the usage+    -- limit.+    usageLimitArn :: Prelude.Maybe Prelude.Text,+    -- | The identifier of the usage limit.+    usageLimitId :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Redshift Serverless feature to limit.+    usageType :: Prelude.Maybe UsageLimitUsageType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UsageLimit' 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:+--+-- 'amount', 'usageLimit_amount' - The limit amount. If time-based, this amount is in RPUs consumed per+-- hour. If data-based, this amount is in terabytes (TB). The value must be+-- a positive number.+--+-- 'breachAction', 'usageLimit_breachAction' - The action that Amazon Redshift Serverless takes when the limit is+-- reached.+--+-- 'period', 'usageLimit_period' - The time period that the amount applies to. A weekly period begins on+-- Sunday. The default is monthly.+--+-- 'resourceArn', 'usageLimit_resourceArn' - The Amazon Resource Name (ARN) that identifies the Amazon Redshift+-- Serverless resource.+--+-- 'usageLimitArn', 'usageLimit_usageLimitArn' - The Amazon Resource Name (ARN) of the resource associated with the usage+-- limit.+--+-- 'usageLimitId', 'usageLimit_usageLimitId' - The identifier of the usage limit.+--+-- 'usageType', 'usageLimit_usageType' - The Amazon Redshift Serverless feature to limit.+newUsageLimit ::+  UsageLimit+newUsageLimit =+  UsageLimit'+    { amount = Prelude.Nothing,+      breachAction = Prelude.Nothing,+      period = Prelude.Nothing,+      resourceArn = Prelude.Nothing,+      usageLimitArn = Prelude.Nothing,+      usageLimitId = Prelude.Nothing,+      usageType = Prelude.Nothing+    }++-- | The limit amount. If time-based, this amount is in RPUs consumed per+-- hour. If data-based, this amount is in terabytes (TB). The value must be+-- a positive number.+usageLimit_amount :: Lens.Lens' UsageLimit (Prelude.Maybe Prelude.Integer)+usageLimit_amount = Lens.lens (\UsageLimit' {amount} -> amount) (\s@UsageLimit' {} a -> s {amount = a} :: UsageLimit)++-- | The action that Amazon Redshift Serverless takes when the limit is+-- reached.+usageLimit_breachAction :: Lens.Lens' UsageLimit (Prelude.Maybe UsageLimitBreachAction)+usageLimit_breachAction = Lens.lens (\UsageLimit' {breachAction} -> breachAction) (\s@UsageLimit' {} a -> s {breachAction = a} :: UsageLimit)++-- | The time period that the amount applies to. A weekly period begins on+-- Sunday. The default is monthly.+usageLimit_period :: Lens.Lens' UsageLimit (Prelude.Maybe UsageLimitPeriod)+usageLimit_period = Lens.lens (\UsageLimit' {period} -> period) (\s@UsageLimit' {} a -> s {period = a} :: UsageLimit)++-- | The Amazon Resource Name (ARN) that identifies the Amazon Redshift+-- Serverless resource.+usageLimit_resourceArn :: Lens.Lens' UsageLimit (Prelude.Maybe Prelude.Text)+usageLimit_resourceArn = Lens.lens (\UsageLimit' {resourceArn} -> resourceArn) (\s@UsageLimit' {} a -> s {resourceArn = a} :: UsageLimit)++-- | The Amazon Resource Name (ARN) of the resource associated with the usage+-- limit.+usageLimit_usageLimitArn :: Lens.Lens' UsageLimit (Prelude.Maybe Prelude.Text)+usageLimit_usageLimitArn = Lens.lens (\UsageLimit' {usageLimitArn} -> usageLimitArn) (\s@UsageLimit' {} a -> s {usageLimitArn = a} :: UsageLimit)++-- | The identifier of the usage limit.+usageLimit_usageLimitId :: Lens.Lens' UsageLimit (Prelude.Maybe Prelude.Text)+usageLimit_usageLimitId = Lens.lens (\UsageLimit' {usageLimitId} -> usageLimitId) (\s@UsageLimit' {} a -> s {usageLimitId = a} :: UsageLimit)++-- | The Amazon Redshift Serverless feature to limit.+usageLimit_usageType :: Lens.Lens' UsageLimit (Prelude.Maybe UsageLimitUsageType)+usageLimit_usageType = Lens.lens (\UsageLimit' {usageType} -> usageType) (\s@UsageLimit' {} a -> s {usageType = a} :: UsageLimit)++instance Data.FromJSON UsageLimit where+  parseJSON =+    Data.withObject+      "UsageLimit"+      ( \x ->+          UsageLimit'+            Prelude.<$> (x Data..:? "amount")+            Prelude.<*> (x Data..:? "breachAction")+            Prelude.<*> (x Data..:? "period")+            Prelude.<*> (x Data..:? "resourceArn")+            Prelude.<*> (x Data..:? "usageLimitArn")+            Prelude.<*> (x Data..:? "usageLimitId")+            Prelude.<*> (x Data..:? "usageType")+      )++instance Prelude.Hashable UsageLimit where+  hashWithSalt _salt UsageLimit' {..} =+    _salt+      `Prelude.hashWithSalt` amount+      `Prelude.hashWithSalt` breachAction+      `Prelude.hashWithSalt` period+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` usageLimitArn+      `Prelude.hashWithSalt` usageLimitId+      `Prelude.hashWithSalt` usageType++instance Prelude.NFData UsageLimit where+  rnf UsageLimit' {..} =+    Prelude.rnf amount+      `Prelude.seq` Prelude.rnf breachAction+      `Prelude.seq` Prelude.rnf period+      `Prelude.seq` Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf usageLimitArn+      `Prelude.seq` Prelude.rnf usageLimitId+      `Prelude.seq` Prelude.rnf usageType
+ gen/Amazonka/RedshiftServerLess/Types/UsageLimitBreachAction.hs view
@@ -0,0 +1,76 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.UsageLimitBreachAction+-- 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.RedshiftServerLess.Types.UsageLimitBreachAction+  ( UsageLimitBreachAction+      ( ..,+        UsageLimitBreachAction_Deactivate,+        UsageLimitBreachAction_Emit_metric,+        UsageLimitBreachAction_Log+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype UsageLimitBreachAction = UsageLimitBreachAction'+  { fromUsageLimitBreachAction ::+      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 UsageLimitBreachAction_Deactivate :: UsageLimitBreachAction+pattern UsageLimitBreachAction_Deactivate = UsageLimitBreachAction' "deactivate"++pattern UsageLimitBreachAction_Emit_metric :: UsageLimitBreachAction+pattern UsageLimitBreachAction_Emit_metric = UsageLimitBreachAction' "emit-metric"++pattern UsageLimitBreachAction_Log :: UsageLimitBreachAction+pattern UsageLimitBreachAction_Log = UsageLimitBreachAction' "log"++{-# COMPLETE+  UsageLimitBreachAction_Deactivate,+  UsageLimitBreachAction_Emit_metric,+  UsageLimitBreachAction_Log,+  UsageLimitBreachAction'+  #-}
+ gen/Amazonka/RedshiftServerLess/Types/UsageLimitPeriod.hs view
@@ -0,0 +1,76 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.UsageLimitPeriod+-- 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.RedshiftServerLess.Types.UsageLimitPeriod+  ( UsageLimitPeriod+      ( ..,+        UsageLimitPeriod_Daily,+        UsageLimitPeriod_Monthly,+        UsageLimitPeriod_Weekly+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype UsageLimitPeriod = UsageLimitPeriod'+  { fromUsageLimitPeriod ::+      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 UsageLimitPeriod_Daily :: UsageLimitPeriod+pattern UsageLimitPeriod_Daily = UsageLimitPeriod' "daily"++pattern UsageLimitPeriod_Monthly :: UsageLimitPeriod+pattern UsageLimitPeriod_Monthly = UsageLimitPeriod' "monthly"++pattern UsageLimitPeriod_Weekly :: UsageLimitPeriod+pattern UsageLimitPeriod_Weekly = UsageLimitPeriod' "weekly"++{-# COMPLETE+  UsageLimitPeriod_Daily,+  UsageLimitPeriod_Monthly,+  UsageLimitPeriod_Weekly,+  UsageLimitPeriod'+  #-}
+ gen/Amazonka/RedshiftServerLess/Types/UsageLimitUsageType.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.UsageLimitUsageType+-- 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.RedshiftServerLess.Types.UsageLimitUsageType+  ( UsageLimitUsageType+      ( ..,+        UsageLimitUsageType_Cross_region_datasharing,+        UsageLimitUsageType_Serverless_compute+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype UsageLimitUsageType = UsageLimitUsageType'+  { fromUsageLimitUsageType ::+      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 UsageLimitUsageType_Cross_region_datasharing :: UsageLimitUsageType+pattern UsageLimitUsageType_Cross_region_datasharing = UsageLimitUsageType' "cross-region-datasharing"++pattern UsageLimitUsageType_Serverless_compute :: UsageLimitUsageType+pattern UsageLimitUsageType_Serverless_compute = UsageLimitUsageType' "serverless-compute"++{-# COMPLETE+  UsageLimitUsageType_Cross_region_datasharing,+  UsageLimitUsageType_Serverless_compute,+  UsageLimitUsageType'+  #-}
+ gen/Amazonka/RedshiftServerLess/Types/VpcEndpoint.hs view
@@ -0,0 +1,104 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.VpcEndpoint+-- 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.RedshiftServerLess.Types.VpcEndpoint where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types.NetworkInterface++-- | The connection endpoint for connecting to Amazon Redshift Serverless+-- through the proxy.+--+-- /See:/ 'newVpcEndpoint' smart constructor.+data VpcEndpoint = VpcEndpoint'+  { -- | One or more network interfaces of the endpoint. Also known as an+    -- interface endpoint.+    networkInterfaces :: Prelude.Maybe [NetworkInterface],+    -- | The connection endpoint ID for connecting to Amazon Redshift Serverless.+    vpcEndpointId :: Prelude.Maybe Prelude.Text,+    -- | The VPC identifier that the endpoint is associated with.+    vpcId :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VpcEndpoint' 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:+--+-- 'networkInterfaces', 'vpcEndpoint_networkInterfaces' - One or more network interfaces of the endpoint. Also known as an+-- interface endpoint.+--+-- 'vpcEndpointId', 'vpcEndpoint_vpcEndpointId' - The connection endpoint ID for connecting to Amazon Redshift Serverless.+--+-- 'vpcId', 'vpcEndpoint_vpcId' - The VPC identifier that the endpoint is associated with.+newVpcEndpoint ::+  VpcEndpoint+newVpcEndpoint =+  VpcEndpoint'+    { networkInterfaces = Prelude.Nothing,+      vpcEndpointId = Prelude.Nothing,+      vpcId = Prelude.Nothing+    }++-- | One or more network interfaces of the endpoint. Also known as an+-- interface endpoint.+vpcEndpoint_networkInterfaces :: Lens.Lens' VpcEndpoint (Prelude.Maybe [NetworkInterface])+vpcEndpoint_networkInterfaces = Lens.lens (\VpcEndpoint' {networkInterfaces} -> networkInterfaces) (\s@VpcEndpoint' {} a -> s {networkInterfaces = a} :: VpcEndpoint) Prelude.. Lens.mapping Lens.coerced++-- | The connection endpoint ID for connecting to Amazon Redshift Serverless.+vpcEndpoint_vpcEndpointId :: Lens.Lens' VpcEndpoint (Prelude.Maybe Prelude.Text)+vpcEndpoint_vpcEndpointId = Lens.lens (\VpcEndpoint' {vpcEndpointId} -> vpcEndpointId) (\s@VpcEndpoint' {} a -> s {vpcEndpointId = a} :: VpcEndpoint)++-- | The VPC identifier that the endpoint is associated with.+vpcEndpoint_vpcId :: Lens.Lens' VpcEndpoint (Prelude.Maybe Prelude.Text)+vpcEndpoint_vpcId = Lens.lens (\VpcEndpoint' {vpcId} -> vpcId) (\s@VpcEndpoint' {} a -> s {vpcId = a} :: VpcEndpoint)++instance Data.FromJSON VpcEndpoint where+  parseJSON =+    Data.withObject+      "VpcEndpoint"+      ( \x ->+          VpcEndpoint'+            Prelude.<$> ( x+                            Data..:? "networkInterfaces"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "vpcEndpointId")+            Prelude.<*> (x Data..:? "vpcId")+      )++instance Prelude.Hashable VpcEndpoint where+  hashWithSalt _salt VpcEndpoint' {..} =+    _salt+      `Prelude.hashWithSalt` networkInterfaces+      `Prelude.hashWithSalt` vpcEndpointId+      `Prelude.hashWithSalt` vpcId++instance Prelude.NFData VpcEndpoint where+  rnf VpcEndpoint' {..} =+    Prelude.rnf networkInterfaces+      `Prelude.seq` Prelude.rnf vpcEndpointId+      `Prelude.seq` Prelude.rnf vpcId
+ gen/Amazonka/RedshiftServerLess/Types/VpcSecurityGroupMembership.hs view
@@ -0,0 +1,85 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.VpcSecurityGroupMembership+-- 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.RedshiftServerLess.Types.VpcSecurityGroupMembership where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the members of a VPC security group.+--+-- /See:/ 'newVpcSecurityGroupMembership' smart constructor.+data VpcSecurityGroupMembership = VpcSecurityGroupMembership'+  { -- | The status of the VPC security group.+    status :: Prelude.Maybe Prelude.Text,+    -- | The unique identifier of the VPC security group.+    vpcSecurityGroupId :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VpcSecurityGroupMembership' 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:+--+-- 'status', 'vpcSecurityGroupMembership_status' - The status of the VPC security group.+--+-- 'vpcSecurityGroupId', 'vpcSecurityGroupMembership_vpcSecurityGroupId' - The unique identifier of the VPC security group.+newVpcSecurityGroupMembership ::+  VpcSecurityGroupMembership+newVpcSecurityGroupMembership =+  VpcSecurityGroupMembership'+    { status =+        Prelude.Nothing,+      vpcSecurityGroupId = Prelude.Nothing+    }++-- | The status of the VPC security group.+vpcSecurityGroupMembership_status :: Lens.Lens' VpcSecurityGroupMembership (Prelude.Maybe Prelude.Text)+vpcSecurityGroupMembership_status = Lens.lens (\VpcSecurityGroupMembership' {status} -> status) (\s@VpcSecurityGroupMembership' {} a -> s {status = a} :: VpcSecurityGroupMembership)++-- | The unique identifier of the VPC security group.+vpcSecurityGroupMembership_vpcSecurityGroupId :: Lens.Lens' VpcSecurityGroupMembership (Prelude.Maybe Prelude.Text)+vpcSecurityGroupMembership_vpcSecurityGroupId = Lens.lens (\VpcSecurityGroupMembership' {vpcSecurityGroupId} -> vpcSecurityGroupId) (\s@VpcSecurityGroupMembership' {} a -> s {vpcSecurityGroupId = a} :: VpcSecurityGroupMembership)++instance Data.FromJSON VpcSecurityGroupMembership where+  parseJSON =+    Data.withObject+      "VpcSecurityGroupMembership"+      ( \x ->+          VpcSecurityGroupMembership'+            Prelude.<$> (x Data..:? "status")+            Prelude.<*> (x Data..:? "vpcSecurityGroupId")+      )++instance Prelude.Hashable VpcSecurityGroupMembership where+  hashWithSalt _salt VpcSecurityGroupMembership' {..} =+    _salt+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` vpcSecurityGroupId++instance Prelude.NFData VpcSecurityGroupMembership where+  rnf VpcSecurityGroupMembership' {..} =+    Prelude.rnf status+      `Prelude.seq` Prelude.rnf vpcSecurityGroupId
+ gen/Amazonka/RedshiftServerLess/Types/Workgroup.hs view
@@ -0,0 +1,258 @@+{-# 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.RedshiftServerLess.Types.Workgroup+-- 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.RedshiftServerLess.Types.Workgroup where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types.ConfigParameter+import Amazonka.RedshiftServerLess.Types.Endpoint+import Amazonka.RedshiftServerLess.Types.WorkgroupStatus++-- | The collection of computing resources from which an endpoint is created.+--+-- /See:/ 'newWorkgroup' smart constructor.+data Workgroup = Workgroup'+  { -- | The base data warehouse capacity of the workgroup in Redshift Processing+    -- Units (RPUs).+    baseCapacity :: Prelude.Maybe Prelude.Int,+    -- | An array of parameters to set for finer control over a database. The+    -- options are @datestyle@, @enable_user_activity_logging@, @query_group@,+    -- @search_path@, and @max_query_execution_time@.+    configParameters :: Prelude.Maybe [ConfigParameter],+    -- | The creation date of the workgroup.+    creationDate :: Prelude.Maybe Data.ISO8601,+    -- | The endpoint that is created from the workgroup.+    endpoint :: Prelude.Maybe Endpoint,+    -- | The value that specifies whether to enable enhanced virtual private+    -- cloud (VPC) routing, which forces Amazon Redshift Serverless to route+    -- traffic through your VPC.+    enhancedVpcRouting :: Prelude.Maybe Prelude.Bool,+    -- | The namespace the workgroup is associated with.+    namespaceName :: Prelude.Maybe Prelude.Text,+    -- | The custom port to use when connecting to a workgroup. Valid port ranges+    -- are 5431-5455 and 8191-8215. The default is 5439.+    port :: Prelude.Maybe Prelude.Int,+    -- | A value that specifies whether the workgroup can be accessible from a+    -- public network+    publiclyAccessible :: Prelude.Maybe Prelude.Bool,+    -- | An array of security group IDs to associate with the workgroup.+    securityGroupIds :: Prelude.Maybe [Prelude.Text],+    -- | The status of the workgroup.+    status :: Prelude.Maybe WorkgroupStatus,+    -- | An array of subnet IDs the workgroup is associated with.+    subnetIds :: Prelude.Maybe [Prelude.Text],+    -- | The Amazon Resource Name (ARN) that links to the workgroup.+    workgroupArn :: Prelude.Maybe Prelude.Text,+    -- | The unique identifier of the workgroup.+    workgroupId :: Prelude.Maybe Prelude.Text,+    -- | The name of the workgroup.+    workgroupName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Workgroup' 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:+--+-- 'baseCapacity', 'workgroup_baseCapacity' - The base data warehouse capacity of the workgroup in Redshift Processing+-- Units (RPUs).+--+-- 'configParameters', 'workgroup_configParameters' - An array of parameters to set for finer control over a database. The+-- options are @datestyle@, @enable_user_activity_logging@, @query_group@,+-- @search_path@, and @max_query_execution_time@.+--+-- 'creationDate', 'workgroup_creationDate' - The creation date of the workgroup.+--+-- 'endpoint', 'workgroup_endpoint' - The endpoint that is created from the workgroup.+--+-- 'enhancedVpcRouting', 'workgroup_enhancedVpcRouting' - The value that specifies whether to enable enhanced virtual private+-- cloud (VPC) routing, which forces Amazon Redshift Serverless to route+-- traffic through your VPC.+--+-- 'namespaceName', 'workgroup_namespaceName' - The namespace the workgroup is associated with.+--+-- 'port', 'workgroup_port' - The custom port to use when connecting to a workgroup. Valid port ranges+-- are 5431-5455 and 8191-8215. The default is 5439.+--+-- 'publiclyAccessible', 'workgroup_publiclyAccessible' - A value that specifies whether the workgroup can be accessible from a+-- public network+--+-- 'securityGroupIds', 'workgroup_securityGroupIds' - An array of security group IDs to associate with the workgroup.+--+-- 'status', 'workgroup_status' - The status of the workgroup.+--+-- 'subnetIds', 'workgroup_subnetIds' - An array of subnet IDs the workgroup is associated with.+--+-- 'workgroupArn', 'workgroup_workgroupArn' - The Amazon Resource Name (ARN) that links to the workgroup.+--+-- 'workgroupId', 'workgroup_workgroupId' - The unique identifier of the workgroup.+--+-- 'workgroupName', 'workgroup_workgroupName' - The name of the workgroup.+newWorkgroup ::+  Workgroup+newWorkgroup =+  Workgroup'+    { baseCapacity = Prelude.Nothing,+      configParameters = Prelude.Nothing,+      creationDate = Prelude.Nothing,+      endpoint = Prelude.Nothing,+      enhancedVpcRouting = Prelude.Nothing,+      namespaceName = Prelude.Nothing,+      port = Prelude.Nothing,+      publiclyAccessible = Prelude.Nothing,+      securityGroupIds = Prelude.Nothing,+      status = Prelude.Nothing,+      subnetIds = Prelude.Nothing,+      workgroupArn = Prelude.Nothing,+      workgroupId = Prelude.Nothing,+      workgroupName = Prelude.Nothing+    }++-- | The base data warehouse capacity of the workgroup in Redshift Processing+-- Units (RPUs).+workgroup_baseCapacity :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Int)+workgroup_baseCapacity = Lens.lens (\Workgroup' {baseCapacity} -> baseCapacity) (\s@Workgroup' {} a -> s {baseCapacity = a} :: Workgroup)++-- | An array of parameters to set for finer control over a database. The+-- options are @datestyle@, @enable_user_activity_logging@, @query_group@,+-- @search_path@, and @max_query_execution_time@.+workgroup_configParameters :: Lens.Lens' Workgroup (Prelude.Maybe [ConfigParameter])+workgroup_configParameters = Lens.lens (\Workgroup' {configParameters} -> configParameters) (\s@Workgroup' {} a -> s {configParameters = a} :: Workgroup) Prelude.. Lens.mapping Lens.coerced++-- | The creation date of the workgroup.+workgroup_creationDate :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.UTCTime)+workgroup_creationDate = Lens.lens (\Workgroup' {creationDate} -> creationDate) (\s@Workgroup' {} a -> s {creationDate = a} :: Workgroup) Prelude.. Lens.mapping Data._Time++-- | The endpoint that is created from the workgroup.+workgroup_endpoint :: Lens.Lens' Workgroup (Prelude.Maybe Endpoint)+workgroup_endpoint = Lens.lens (\Workgroup' {endpoint} -> endpoint) (\s@Workgroup' {} a -> s {endpoint = a} :: Workgroup)++-- | The value that specifies whether to enable enhanced virtual private+-- cloud (VPC) routing, which forces Amazon Redshift Serverless to route+-- traffic through your VPC.+workgroup_enhancedVpcRouting :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Bool)+workgroup_enhancedVpcRouting = Lens.lens (\Workgroup' {enhancedVpcRouting} -> enhancedVpcRouting) (\s@Workgroup' {} a -> s {enhancedVpcRouting = a} :: Workgroup)++-- | The namespace the workgroup is associated with.+workgroup_namespaceName :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Text)+workgroup_namespaceName = Lens.lens (\Workgroup' {namespaceName} -> namespaceName) (\s@Workgroup' {} a -> s {namespaceName = a} :: Workgroup)++-- | The custom port to use when connecting to a workgroup. Valid port ranges+-- are 5431-5455 and 8191-8215. The default is 5439.+workgroup_port :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Int)+workgroup_port = Lens.lens (\Workgroup' {port} -> port) (\s@Workgroup' {} a -> s {port = a} :: Workgroup)++-- | A value that specifies whether the workgroup can be accessible from a+-- public network+workgroup_publiclyAccessible :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Bool)+workgroup_publiclyAccessible = Lens.lens (\Workgroup' {publiclyAccessible} -> publiclyAccessible) (\s@Workgroup' {} a -> s {publiclyAccessible = a} :: Workgroup)++-- | An array of security group IDs to associate with the workgroup.+workgroup_securityGroupIds :: Lens.Lens' Workgroup (Prelude.Maybe [Prelude.Text])+workgroup_securityGroupIds = Lens.lens (\Workgroup' {securityGroupIds} -> securityGroupIds) (\s@Workgroup' {} a -> s {securityGroupIds = a} :: Workgroup) Prelude.. Lens.mapping Lens.coerced++-- | The status of the workgroup.+workgroup_status :: Lens.Lens' Workgroup (Prelude.Maybe WorkgroupStatus)+workgroup_status = Lens.lens (\Workgroup' {status} -> status) (\s@Workgroup' {} a -> s {status = a} :: Workgroup)++-- | An array of subnet IDs the workgroup is associated with.+workgroup_subnetIds :: Lens.Lens' Workgroup (Prelude.Maybe [Prelude.Text])+workgroup_subnetIds = Lens.lens (\Workgroup' {subnetIds} -> subnetIds) (\s@Workgroup' {} a -> s {subnetIds = a} :: Workgroup) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) that links to the workgroup.+workgroup_workgroupArn :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Text)+workgroup_workgroupArn = Lens.lens (\Workgroup' {workgroupArn} -> workgroupArn) (\s@Workgroup' {} a -> s {workgroupArn = a} :: Workgroup)++-- | The unique identifier of the workgroup.+workgroup_workgroupId :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Text)+workgroup_workgroupId = Lens.lens (\Workgroup' {workgroupId} -> workgroupId) (\s@Workgroup' {} a -> s {workgroupId = a} :: Workgroup)++-- | The name of the workgroup.+workgroup_workgroupName :: Lens.Lens' Workgroup (Prelude.Maybe Prelude.Text)+workgroup_workgroupName = Lens.lens (\Workgroup' {workgroupName} -> workgroupName) (\s@Workgroup' {} a -> s {workgroupName = a} :: Workgroup)++instance Data.FromJSON Workgroup where+  parseJSON =+    Data.withObject+      "Workgroup"+      ( \x ->+          Workgroup'+            Prelude.<$> (x Data..:? "baseCapacity")+            Prelude.<*> ( x+                            Data..:? "configParameters"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "creationDate")+            Prelude.<*> (x Data..:? "endpoint")+            Prelude.<*> (x Data..:? "enhancedVpcRouting")+            Prelude.<*> (x Data..:? "namespaceName")+            Prelude.<*> (x Data..:? "port")+            Prelude.<*> (x Data..:? "publiclyAccessible")+            Prelude.<*> ( x+                            Data..:? "securityGroupIds"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "status")+            Prelude.<*> (x Data..:? "subnetIds" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "workgroupArn")+            Prelude.<*> (x Data..:? "workgroupId")+            Prelude.<*> (x Data..:? "workgroupName")+      )++instance Prelude.Hashable Workgroup where+  hashWithSalt _salt Workgroup' {..} =+    _salt+      `Prelude.hashWithSalt` baseCapacity+      `Prelude.hashWithSalt` configParameters+      `Prelude.hashWithSalt` creationDate+      `Prelude.hashWithSalt` endpoint+      `Prelude.hashWithSalt` enhancedVpcRouting+      `Prelude.hashWithSalt` namespaceName+      `Prelude.hashWithSalt` port+      `Prelude.hashWithSalt` publiclyAccessible+      `Prelude.hashWithSalt` securityGroupIds+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` subnetIds+      `Prelude.hashWithSalt` workgroupArn+      `Prelude.hashWithSalt` workgroupId+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData Workgroup where+  rnf Workgroup' {..} =+    Prelude.rnf baseCapacity+      `Prelude.seq` Prelude.rnf configParameters+      `Prelude.seq` Prelude.rnf creationDate+      `Prelude.seq` Prelude.rnf endpoint+      `Prelude.seq` Prelude.rnf enhancedVpcRouting+      `Prelude.seq` Prelude.rnf namespaceName+      `Prelude.seq` Prelude.rnf port+      `Prelude.seq` Prelude.rnf publiclyAccessible+      `Prelude.seq` Prelude.rnf securityGroupIds+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf subnetIds+      `Prelude.seq` Prelude.rnf workgroupArn+      `Prelude.seq` Prelude.rnf workgroupId+      `Prelude.seq` Prelude.rnf workgroupName
+ gen/Amazonka/RedshiftServerLess/Types/WorkgroupStatus.hs view
@@ -0,0 +1,81 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.Types.WorkgroupStatus+-- 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.RedshiftServerLess.Types.WorkgroupStatus+  ( WorkgroupStatus+      ( ..,+        WorkgroupStatus_AVAILABLE,+        WorkgroupStatus_CREATING,+        WorkgroupStatus_DELETING,+        WorkgroupStatus_MODIFYING+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype WorkgroupStatus = WorkgroupStatus'+  { fromWorkgroupStatus ::+      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 WorkgroupStatus_AVAILABLE :: WorkgroupStatus+pattern WorkgroupStatus_AVAILABLE = WorkgroupStatus' "AVAILABLE"++pattern WorkgroupStatus_CREATING :: WorkgroupStatus+pattern WorkgroupStatus_CREATING = WorkgroupStatus' "CREATING"++pattern WorkgroupStatus_DELETING :: WorkgroupStatus+pattern WorkgroupStatus_DELETING = WorkgroupStatus' "DELETING"++pattern WorkgroupStatus_MODIFYING :: WorkgroupStatus+pattern WorkgroupStatus_MODIFYING = WorkgroupStatus' "MODIFYING"++{-# COMPLETE+  WorkgroupStatus_AVAILABLE,+  WorkgroupStatus_CREATING,+  WorkgroupStatus_DELETING,+  WorkgroupStatus_MODIFYING,+  WorkgroupStatus'+  #-}
+ gen/Amazonka/RedshiftServerLess/UntagResource.hs view
@@ -0,0 +1,171 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RedshiftServerLess.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 a tag or set of tags from a resource.+module Amazonka.RedshiftServerLess.UntagResource+  ( -- * Creating a Request+    UntagResource (..),+    newUntagResource,++    -- * Request Lenses+    untagResource_resourceArn,+    untagResource_tagKeys,++    -- * Destructuring the Response+    UntagResourceResponse (..),+    newUntagResourceResponse,++    -- * Response Lenses+    untagResourceResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+  { -- | The Amazon Resource Name (ARN) of the resource to remove tags from.+    resourceArn :: Prelude.Text,+    -- | The tag or set of tags to remove from the 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 Amazon Resource Name (ARN) of the resource to remove tags from.+--+-- 'tagKeys', 'untagResource_tagKeys' - The tag or set of tags to remove from the resource.+newUntagResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  UntagResource+newUntagResource pResourceArn_ =+  UntagResource'+    { resourceArn = pResourceArn_,+      tagKeys = Prelude.mempty+    }++-- | The Amazon Resource Name (ARN) of the resource to remove tags from.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | The tag or set of tags to remove from the resource.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+  type+    AWSResponse UntagResource =+      UntagResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          UntagResourceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UntagResource where+  hashWithSalt _salt UntagResource' {..} =+    _salt+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+  rnf UntagResource' {..} =+    Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf tagKeys++instance Data.ToHeaders UntagResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.UntagResource" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UntagResource where+  toJSON UntagResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("resourceArn" Data..= resourceArn),+            Prelude.Just ("tagKeys" Data..= tagKeys)+          ]+      )++instance Data.ToPath UntagResource where+  toPath = Prelude.const "/"++instance Data.ToQuery UntagResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+  UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+  rnf UntagResourceResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/UpdateEndpointAccess.hs view
@@ -0,0 +1,191 @@+{-# 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.RedshiftServerLess.UpdateEndpointAccess+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates an Amazon Redshift Serverless managed endpoint.+module Amazonka.RedshiftServerLess.UpdateEndpointAccess+  ( -- * Creating a Request+    UpdateEndpointAccess (..),+    newUpdateEndpointAccess,++    -- * Request Lenses+    updateEndpointAccess_vpcSecurityGroupIds,+    updateEndpointAccess_endpointName,++    -- * Destructuring the Response+    UpdateEndpointAccessResponse (..),+    newUpdateEndpointAccessResponse,++    -- * Response Lenses+    updateEndpointAccessResponse_endpoint,+    updateEndpointAccessResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateEndpointAccess' smart constructor.+data UpdateEndpointAccess = UpdateEndpointAccess'+  { -- | The list of VPC security groups associated with the endpoint after the+    -- endpoint is modified.+    vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],+    -- | The name of the VPC endpoint to update.+    endpointName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateEndpointAccess' 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:+--+-- 'vpcSecurityGroupIds', 'updateEndpointAccess_vpcSecurityGroupIds' - The list of VPC security groups associated with the endpoint after the+-- endpoint is modified.+--+-- 'endpointName', 'updateEndpointAccess_endpointName' - The name of the VPC endpoint to update.+newUpdateEndpointAccess ::+  -- | 'endpointName'+  Prelude.Text ->+  UpdateEndpointAccess+newUpdateEndpointAccess pEndpointName_ =+  UpdateEndpointAccess'+    { vpcSecurityGroupIds =+        Prelude.Nothing,+      endpointName = pEndpointName_+    }++-- | The list of VPC security groups associated with the endpoint after the+-- endpoint is modified.+updateEndpointAccess_vpcSecurityGroupIds :: Lens.Lens' UpdateEndpointAccess (Prelude.Maybe [Prelude.Text])+updateEndpointAccess_vpcSecurityGroupIds = Lens.lens (\UpdateEndpointAccess' {vpcSecurityGroupIds} -> vpcSecurityGroupIds) (\s@UpdateEndpointAccess' {} a -> s {vpcSecurityGroupIds = a} :: UpdateEndpointAccess) Prelude.. Lens.mapping Lens.coerced++-- | The name of the VPC endpoint to update.+updateEndpointAccess_endpointName :: Lens.Lens' UpdateEndpointAccess Prelude.Text+updateEndpointAccess_endpointName = Lens.lens (\UpdateEndpointAccess' {endpointName} -> endpointName) (\s@UpdateEndpointAccess' {} a -> s {endpointName = a} :: UpdateEndpointAccess)++instance Core.AWSRequest UpdateEndpointAccess where+  type+    AWSResponse UpdateEndpointAccess =+      UpdateEndpointAccessResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateEndpointAccessResponse'+            Prelude.<$> (x Data..?> "endpoint")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UpdateEndpointAccess where+  hashWithSalt _salt UpdateEndpointAccess' {..} =+    _salt+      `Prelude.hashWithSalt` vpcSecurityGroupIds+      `Prelude.hashWithSalt` endpointName++instance Prelude.NFData UpdateEndpointAccess where+  rnf UpdateEndpointAccess' {..} =+    Prelude.rnf vpcSecurityGroupIds+      `Prelude.seq` Prelude.rnf endpointName++instance Data.ToHeaders UpdateEndpointAccess where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.UpdateEndpointAccess" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateEndpointAccess where+  toJSON UpdateEndpointAccess' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("vpcSecurityGroupIds" Data..=)+              Prelude.<$> vpcSecurityGroupIds,+            Prelude.Just ("endpointName" Data..= endpointName)+          ]+      )++instance Data.ToPath UpdateEndpointAccess where+  toPath = Prelude.const "/"++instance Data.ToQuery UpdateEndpointAccess where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateEndpointAccessResponse' smart constructor.+data UpdateEndpointAccessResponse = UpdateEndpointAccessResponse'+  { -- | The updated VPC endpoint.+    endpoint :: Prelude.Maybe EndpointAccess,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateEndpointAccessResponse' 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:+--+-- 'endpoint', 'updateEndpointAccessResponse_endpoint' - The updated VPC endpoint.+--+-- 'httpStatus', 'updateEndpointAccessResponse_httpStatus' - The response's http status code.+newUpdateEndpointAccessResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UpdateEndpointAccessResponse+newUpdateEndpointAccessResponse pHttpStatus_ =+  UpdateEndpointAccessResponse'+    { endpoint =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The updated VPC endpoint.+updateEndpointAccessResponse_endpoint :: Lens.Lens' UpdateEndpointAccessResponse (Prelude.Maybe EndpointAccess)+updateEndpointAccessResponse_endpoint = Lens.lens (\UpdateEndpointAccessResponse' {endpoint} -> endpoint) (\s@UpdateEndpointAccessResponse' {} a -> s {endpoint = a} :: UpdateEndpointAccessResponse)++-- | The response's http status code.+updateEndpointAccessResponse_httpStatus :: Lens.Lens' UpdateEndpointAccessResponse Prelude.Int+updateEndpointAccessResponse_httpStatus = Lens.lens (\UpdateEndpointAccessResponse' {httpStatus} -> httpStatus) (\s@UpdateEndpointAccessResponse' {} a -> s {httpStatus = a} :: UpdateEndpointAccessResponse)++instance Prelude.NFData UpdateEndpointAccessResponse where+  rnf UpdateEndpointAccessResponse' {..} =+    Prelude.rnf endpoint+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/UpdateNamespace.hs view
@@ -0,0 +1,271 @@+{-# 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.RedshiftServerLess.UpdateNamespace+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a namespace with the specified settings.+module Amazonka.RedshiftServerLess.UpdateNamespace+  ( -- * Creating a Request+    UpdateNamespace (..),+    newUpdateNamespace,++    -- * Request Lenses+    updateNamespace_adminUserPassword,+    updateNamespace_adminUsername,+    updateNamespace_defaultIamRoleArn,+    updateNamespace_iamRoles,+    updateNamespace_kmsKeyId,+    updateNamespace_logExports,+    updateNamespace_namespaceName,++    -- * Destructuring the Response+    UpdateNamespaceResponse (..),+    newUpdateNamespaceResponse,++    -- * Response Lenses+    updateNamespaceResponse_httpStatus,+    updateNamespaceResponse_namespace,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateNamespace' smart constructor.+data UpdateNamespace = UpdateNamespace'+  { -- | The password of the administrator for the first database created in the+    -- namespace.+    adminUserPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The username of the administrator for the first database created in the+    -- namespace.+    adminUsername :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The Amazon Resource Name (ARN) of the IAM role to set as a default in+    -- the namespace.+    defaultIamRoleArn :: Prelude.Maybe Prelude.Text,+    -- | A list of IAM roles to associate with the namespace.+    iamRoles :: Prelude.Maybe [Prelude.Text],+    -- | The ID of the Amazon Web Services Key Management Service key used to+    -- encrypt your data.+    kmsKeyId :: Prelude.Maybe Prelude.Text,+    -- | The types of logs the namespace can export. The export types are+    -- @userlog@, @connectionlog@, and @useractivitylog@.+    logExports :: Prelude.Maybe [LogExport],+    -- | The name of the namespace.+    namespaceName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateNamespace' 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', 'updateNamespace_adminUserPassword' - The password of the administrator for the first database created in the+-- namespace.+--+-- 'adminUsername', 'updateNamespace_adminUsername' - The username of the administrator for the first database created in the+-- namespace.+--+-- 'defaultIamRoleArn', 'updateNamespace_defaultIamRoleArn' - The Amazon Resource Name (ARN) of the IAM role to set as a default in+-- the namespace.+--+-- 'iamRoles', 'updateNamespace_iamRoles' - A list of IAM roles to associate with the namespace.+--+-- 'kmsKeyId', 'updateNamespace_kmsKeyId' - The ID of the Amazon Web Services Key Management Service key used to+-- encrypt your data.+--+-- 'logExports', 'updateNamespace_logExports' - The types of logs the namespace can export. The export types are+-- @userlog@, @connectionlog@, and @useractivitylog@.+--+-- 'namespaceName', 'updateNamespace_namespaceName' - The name of the namespace.+newUpdateNamespace ::+  -- | 'namespaceName'+  Prelude.Text ->+  UpdateNamespace+newUpdateNamespace pNamespaceName_ =+  UpdateNamespace'+    { adminUserPassword =+        Prelude.Nothing,+      adminUsername = Prelude.Nothing,+      defaultIamRoleArn = Prelude.Nothing,+      iamRoles = Prelude.Nothing,+      kmsKeyId = Prelude.Nothing,+      logExports = Prelude.Nothing,+      namespaceName = pNamespaceName_+    }++-- | The password of the administrator for the first database created in the+-- namespace.+updateNamespace_adminUserPassword :: Lens.Lens' UpdateNamespace (Prelude.Maybe Prelude.Text)+updateNamespace_adminUserPassword = Lens.lens (\UpdateNamespace' {adminUserPassword} -> adminUserPassword) (\s@UpdateNamespace' {} a -> s {adminUserPassword = a} :: UpdateNamespace) Prelude.. Lens.mapping Data._Sensitive++-- | The username of the administrator for the first database created in the+-- namespace.+updateNamespace_adminUsername :: Lens.Lens' UpdateNamespace (Prelude.Maybe Prelude.Text)+updateNamespace_adminUsername = Lens.lens (\UpdateNamespace' {adminUsername} -> adminUsername) (\s@UpdateNamespace' {} a -> s {adminUsername = a} :: UpdateNamespace) Prelude.. Lens.mapping Data._Sensitive++-- | The Amazon Resource Name (ARN) of the IAM role to set as a default in+-- the namespace.+updateNamespace_defaultIamRoleArn :: Lens.Lens' UpdateNamespace (Prelude.Maybe Prelude.Text)+updateNamespace_defaultIamRoleArn = Lens.lens (\UpdateNamespace' {defaultIamRoleArn} -> defaultIamRoleArn) (\s@UpdateNamespace' {} a -> s {defaultIamRoleArn = a} :: UpdateNamespace)++-- | A list of IAM roles to associate with the namespace.+updateNamespace_iamRoles :: Lens.Lens' UpdateNamespace (Prelude.Maybe [Prelude.Text])+updateNamespace_iamRoles = Lens.lens (\UpdateNamespace' {iamRoles} -> iamRoles) (\s@UpdateNamespace' {} a -> s {iamRoles = a} :: UpdateNamespace) Prelude.. Lens.mapping Lens.coerced++-- | The ID of the Amazon Web Services Key Management Service key used to+-- encrypt your data.+updateNamespace_kmsKeyId :: Lens.Lens' UpdateNamespace (Prelude.Maybe Prelude.Text)+updateNamespace_kmsKeyId = Lens.lens (\UpdateNamespace' {kmsKeyId} -> kmsKeyId) (\s@UpdateNamespace' {} a -> s {kmsKeyId = a} :: UpdateNamespace)++-- | The types of logs the namespace can export. The export types are+-- @userlog@, @connectionlog@, and @useractivitylog@.+updateNamespace_logExports :: Lens.Lens' UpdateNamespace (Prelude.Maybe [LogExport])+updateNamespace_logExports = Lens.lens (\UpdateNamespace' {logExports} -> logExports) (\s@UpdateNamespace' {} a -> s {logExports = a} :: UpdateNamespace) Prelude.. Lens.mapping Lens.coerced++-- | The name of the namespace.+updateNamespace_namespaceName :: Lens.Lens' UpdateNamespace Prelude.Text+updateNamespace_namespaceName = Lens.lens (\UpdateNamespace' {namespaceName} -> namespaceName) (\s@UpdateNamespace' {} a -> s {namespaceName = a} :: UpdateNamespace)++instance Core.AWSRequest UpdateNamespace where+  type+    AWSResponse UpdateNamespace =+      UpdateNamespaceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateNamespaceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "namespace")+      )++instance Prelude.Hashable UpdateNamespace where+  hashWithSalt _salt UpdateNamespace' {..} =+    _salt+      `Prelude.hashWithSalt` adminUserPassword+      `Prelude.hashWithSalt` adminUsername+      `Prelude.hashWithSalt` defaultIamRoleArn+      `Prelude.hashWithSalt` iamRoles+      `Prelude.hashWithSalt` kmsKeyId+      `Prelude.hashWithSalt` logExports+      `Prelude.hashWithSalt` namespaceName++instance Prelude.NFData UpdateNamespace where+  rnf UpdateNamespace' {..} =+    Prelude.rnf adminUserPassword+      `Prelude.seq` Prelude.rnf adminUsername+      `Prelude.seq` Prelude.rnf defaultIamRoleArn+      `Prelude.seq` Prelude.rnf iamRoles+      `Prelude.seq` Prelude.rnf kmsKeyId+      `Prelude.seq` Prelude.rnf logExports+      `Prelude.seq` Prelude.rnf namespaceName++instance Data.ToHeaders UpdateNamespace where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.UpdateNamespace" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateNamespace where+  toJSON UpdateNamespace' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("adminUserPassword" Data..=)+              Prelude.<$> adminUserPassword,+            ("adminUsername" Data..=) Prelude.<$> adminUsername,+            ("defaultIamRoleArn" Data..=)+              Prelude.<$> defaultIamRoleArn,+            ("iamRoles" Data..=) Prelude.<$> iamRoles,+            ("kmsKeyId" Data..=) Prelude.<$> kmsKeyId,+            ("logExports" Data..=) Prelude.<$> logExports,+            Prelude.Just+              ("namespaceName" Data..= namespaceName)+          ]+      )++instance Data.ToPath UpdateNamespace where+  toPath = Prelude.const "/"++instance Data.ToQuery UpdateNamespace where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateNamespaceResponse' smart constructor.+data UpdateNamespaceResponse = UpdateNamespaceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | A list of tag instances.+    namespace :: Namespace+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateNamespaceResponse' 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', 'updateNamespaceResponse_httpStatus' - The response's http status code.+--+-- 'namespace', 'updateNamespaceResponse_namespace' - A list of tag instances.+newUpdateNamespaceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'namespace'+  Namespace ->+  UpdateNamespaceResponse+newUpdateNamespaceResponse pHttpStatus_ pNamespace_ =+  UpdateNamespaceResponse'+    { httpStatus = pHttpStatus_,+      namespace = pNamespace_+    }++-- | The response's http status code.+updateNamespaceResponse_httpStatus :: Lens.Lens' UpdateNamespaceResponse Prelude.Int+updateNamespaceResponse_httpStatus = Lens.lens (\UpdateNamespaceResponse' {httpStatus} -> httpStatus) (\s@UpdateNamespaceResponse' {} a -> s {httpStatus = a} :: UpdateNamespaceResponse)++-- | A list of tag instances.+updateNamespaceResponse_namespace :: Lens.Lens' UpdateNamespaceResponse Namespace+updateNamespaceResponse_namespace = Lens.lens (\UpdateNamespaceResponse' {namespace} -> namespace) (\s@UpdateNamespaceResponse' {} a -> s {namespace = a} :: UpdateNamespaceResponse)++instance Prelude.NFData UpdateNamespaceResponse where+  rnf UpdateNamespaceResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf namespace
+ gen/Amazonka/RedshiftServerLess/UpdateSnapshot.hs view
@@ -0,0 +1,186 @@+{-# 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.RedshiftServerLess.UpdateSnapshot+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a snapshot.+module Amazonka.RedshiftServerLess.UpdateSnapshot+  ( -- * Creating a Request+    UpdateSnapshot (..),+    newUpdateSnapshot,++    -- * Request Lenses+    updateSnapshot_retentionPeriod,+    updateSnapshot_snapshotName,++    -- * Destructuring the Response+    UpdateSnapshotResponse (..),+    newUpdateSnapshotResponse,++    -- * Response Lenses+    updateSnapshotResponse_snapshot,+    updateSnapshotResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateSnapshot' smart constructor.+data UpdateSnapshot = UpdateSnapshot'+  { -- | The new retention period of the snapshot.+    retentionPeriod :: Prelude.Maybe Prelude.Int,+    -- | The name of the snapshot.+    snapshotName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateSnapshot' 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:+--+-- 'retentionPeriod', 'updateSnapshot_retentionPeriod' - The new retention period of the snapshot.+--+-- 'snapshotName', 'updateSnapshot_snapshotName' - The name of the snapshot.+newUpdateSnapshot ::+  -- | 'snapshotName'+  Prelude.Text ->+  UpdateSnapshot+newUpdateSnapshot pSnapshotName_ =+  UpdateSnapshot'+    { retentionPeriod = Prelude.Nothing,+      snapshotName = pSnapshotName_+    }++-- | The new retention period of the snapshot.+updateSnapshot_retentionPeriod :: Lens.Lens' UpdateSnapshot (Prelude.Maybe Prelude.Int)+updateSnapshot_retentionPeriod = Lens.lens (\UpdateSnapshot' {retentionPeriod} -> retentionPeriod) (\s@UpdateSnapshot' {} a -> s {retentionPeriod = a} :: UpdateSnapshot)++-- | The name of the snapshot.+updateSnapshot_snapshotName :: Lens.Lens' UpdateSnapshot Prelude.Text+updateSnapshot_snapshotName = Lens.lens (\UpdateSnapshot' {snapshotName} -> snapshotName) (\s@UpdateSnapshot' {} a -> s {snapshotName = a} :: UpdateSnapshot)++instance Core.AWSRequest UpdateSnapshot where+  type+    AWSResponse UpdateSnapshot =+      UpdateSnapshotResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateSnapshotResponse'+            Prelude.<$> (x Data..?> "snapshot")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UpdateSnapshot where+  hashWithSalt _salt UpdateSnapshot' {..} =+    _salt+      `Prelude.hashWithSalt` retentionPeriod+      `Prelude.hashWithSalt` snapshotName++instance Prelude.NFData UpdateSnapshot where+  rnf UpdateSnapshot' {..} =+    Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf snapshotName++instance Data.ToHeaders UpdateSnapshot where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.UpdateSnapshot" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateSnapshot where+  toJSON UpdateSnapshot' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("retentionPeriod" Data..=)+              Prelude.<$> retentionPeriod,+            Prelude.Just ("snapshotName" Data..= snapshotName)+          ]+      )++instance Data.ToPath UpdateSnapshot where+  toPath = Prelude.const "/"++instance Data.ToQuery UpdateSnapshot where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateSnapshotResponse' smart constructor.+data UpdateSnapshotResponse = UpdateSnapshotResponse'+  { -- | The updated snapshot object.+    snapshot :: Prelude.Maybe Snapshot,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateSnapshotResponse' 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:+--+-- 'snapshot', 'updateSnapshotResponse_snapshot' - The updated snapshot object.+--+-- 'httpStatus', 'updateSnapshotResponse_httpStatus' - The response's http status code.+newUpdateSnapshotResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UpdateSnapshotResponse+newUpdateSnapshotResponse pHttpStatus_ =+  UpdateSnapshotResponse'+    { snapshot = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The updated snapshot object.+updateSnapshotResponse_snapshot :: Lens.Lens' UpdateSnapshotResponse (Prelude.Maybe Snapshot)+updateSnapshotResponse_snapshot = Lens.lens (\UpdateSnapshotResponse' {snapshot} -> snapshot) (\s@UpdateSnapshotResponse' {} a -> s {snapshot = a} :: UpdateSnapshotResponse)++-- | The response's http status code.+updateSnapshotResponse_httpStatus :: Lens.Lens' UpdateSnapshotResponse Prelude.Int+updateSnapshotResponse_httpStatus = Lens.lens (\UpdateSnapshotResponse' {httpStatus} -> httpStatus) (\s@UpdateSnapshotResponse' {} a -> s {httpStatus = a} :: UpdateSnapshotResponse)++instance Prelude.NFData UpdateSnapshotResponse where+  rnf UpdateSnapshotResponse' {..} =+    Prelude.rnf snapshot+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/UpdateUsageLimit.hs view
@@ -0,0 +1,212 @@+{-# 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.RedshiftServerLess.UpdateUsageLimit+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Update a usage limit in Amazon Redshift Serverless. You can\'t update+-- the usage type or period of a usage limit.+module Amazonka.RedshiftServerLess.UpdateUsageLimit+  ( -- * Creating a Request+    UpdateUsageLimit (..),+    newUpdateUsageLimit,++    -- * Request Lenses+    updateUsageLimit_amount,+    updateUsageLimit_breachAction,+    updateUsageLimit_usageLimitId,++    -- * Destructuring the Response+    UpdateUsageLimitResponse (..),+    newUpdateUsageLimitResponse,++    -- * Response Lenses+    updateUsageLimitResponse_usageLimit,+    updateUsageLimitResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateUsageLimit' smart constructor.+data UpdateUsageLimit = UpdateUsageLimit'+  { -- | The new limit amount. If time-based, this amount is in Redshift+    -- Processing Units (RPU) consumed per hour. If data-based, this amount is+    -- in terabytes (TB) of data transferred between Regions in cross-account+    -- sharing. The value must be a positive number.+    amount :: Prelude.Maybe Prelude.Integer,+    -- | The new action that Amazon Redshift Serverless takes when the limit is+    -- reached.+    breachAction :: Prelude.Maybe UsageLimitBreachAction,+    -- | The identifier of the usage limit to update.+    usageLimitId :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateUsageLimit' 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:+--+-- 'amount', 'updateUsageLimit_amount' - The new limit amount. If time-based, this amount is in Redshift+-- Processing Units (RPU) consumed per hour. If data-based, this amount is+-- in terabytes (TB) of data transferred between Regions in cross-account+-- sharing. The value must be a positive number.+--+-- 'breachAction', 'updateUsageLimit_breachAction' - The new action that Amazon Redshift Serverless takes when the limit is+-- reached.+--+-- 'usageLimitId', 'updateUsageLimit_usageLimitId' - The identifier of the usage limit to update.+newUpdateUsageLimit ::+  -- | 'usageLimitId'+  Prelude.Text ->+  UpdateUsageLimit+newUpdateUsageLimit pUsageLimitId_ =+  UpdateUsageLimit'+    { amount = Prelude.Nothing,+      breachAction = Prelude.Nothing,+      usageLimitId = pUsageLimitId_+    }++-- | The new limit amount. If time-based, this amount is in Redshift+-- Processing Units (RPU) consumed per hour. If data-based, this amount is+-- in terabytes (TB) of data transferred between Regions in cross-account+-- sharing. The value must be a positive number.+updateUsageLimit_amount :: Lens.Lens' UpdateUsageLimit (Prelude.Maybe Prelude.Integer)+updateUsageLimit_amount = Lens.lens (\UpdateUsageLimit' {amount} -> amount) (\s@UpdateUsageLimit' {} a -> s {amount = a} :: UpdateUsageLimit)++-- | The new action that Amazon Redshift Serverless takes when the limit is+-- reached.+updateUsageLimit_breachAction :: Lens.Lens' UpdateUsageLimit (Prelude.Maybe UsageLimitBreachAction)+updateUsageLimit_breachAction = Lens.lens (\UpdateUsageLimit' {breachAction} -> breachAction) (\s@UpdateUsageLimit' {} a -> s {breachAction = a} :: UpdateUsageLimit)++-- | The identifier of the usage limit to update.+updateUsageLimit_usageLimitId :: Lens.Lens' UpdateUsageLimit Prelude.Text+updateUsageLimit_usageLimitId = Lens.lens (\UpdateUsageLimit' {usageLimitId} -> usageLimitId) (\s@UpdateUsageLimit' {} a -> s {usageLimitId = a} :: UpdateUsageLimit)++instance Core.AWSRequest UpdateUsageLimit where+  type+    AWSResponse UpdateUsageLimit =+      UpdateUsageLimitResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateUsageLimitResponse'+            Prelude.<$> (x Data..?> "usageLimit")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UpdateUsageLimit where+  hashWithSalt _salt UpdateUsageLimit' {..} =+    _salt+      `Prelude.hashWithSalt` amount+      `Prelude.hashWithSalt` breachAction+      `Prelude.hashWithSalt` usageLimitId++instance Prelude.NFData UpdateUsageLimit where+  rnf UpdateUsageLimit' {..} =+    Prelude.rnf amount+      `Prelude.seq` Prelude.rnf breachAction+      `Prelude.seq` Prelude.rnf usageLimitId++instance Data.ToHeaders UpdateUsageLimit where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.UpdateUsageLimit" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateUsageLimit where+  toJSON UpdateUsageLimit' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("amount" Data..=) Prelude.<$> amount,+            ("breachAction" Data..=) Prelude.<$> breachAction,+            Prelude.Just ("usageLimitId" Data..= usageLimitId)+          ]+      )++instance Data.ToPath UpdateUsageLimit where+  toPath = Prelude.const "/"++instance Data.ToQuery UpdateUsageLimit where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateUsageLimitResponse' smart constructor.+data UpdateUsageLimitResponse = UpdateUsageLimitResponse'+  { -- | The updated usage limit object.+    usageLimit :: Prelude.Maybe UsageLimit,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateUsageLimitResponse' 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:+--+-- 'usageLimit', 'updateUsageLimitResponse_usageLimit' - The updated usage limit object.+--+-- 'httpStatus', 'updateUsageLimitResponse_httpStatus' - The response's http status code.+newUpdateUsageLimitResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UpdateUsageLimitResponse+newUpdateUsageLimitResponse pHttpStatus_ =+  UpdateUsageLimitResponse'+    { usageLimit =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The updated usage limit object.+updateUsageLimitResponse_usageLimit :: Lens.Lens' UpdateUsageLimitResponse (Prelude.Maybe UsageLimit)+updateUsageLimitResponse_usageLimit = Lens.lens (\UpdateUsageLimitResponse' {usageLimit} -> usageLimit) (\s@UpdateUsageLimitResponse' {} a -> s {usageLimit = a} :: UpdateUsageLimitResponse)++-- | The response's http status code.+updateUsageLimitResponse_httpStatus :: Lens.Lens' UpdateUsageLimitResponse Prelude.Int+updateUsageLimitResponse_httpStatus = Lens.lens (\UpdateUsageLimitResponse' {httpStatus} -> httpStatus) (\s@UpdateUsageLimitResponse' {} a -> s {httpStatus = a} :: UpdateUsageLimitResponse)++instance Prelude.NFData UpdateUsageLimitResponse where+  rnf UpdateUsageLimitResponse' {..} =+    Prelude.rnf usageLimit+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RedshiftServerLess/UpdateWorkgroup.hs view
@@ -0,0 +1,291 @@+{-# 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.RedshiftServerLess.UpdateWorkgroup+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a workgroup with the specified configuration settings.+module Amazonka.RedshiftServerLess.UpdateWorkgroup+  ( -- * Creating a Request+    UpdateWorkgroup (..),+    newUpdateWorkgroup,++    -- * Request Lenses+    updateWorkgroup_baseCapacity,+    updateWorkgroup_configParameters,+    updateWorkgroup_enhancedVpcRouting,+    updateWorkgroup_port,+    updateWorkgroup_publiclyAccessible,+    updateWorkgroup_securityGroupIds,+    updateWorkgroup_subnetIds,+    updateWorkgroup_workgroupName,++    -- * Destructuring the Response+    UpdateWorkgroupResponse (..),+    newUpdateWorkgroupResponse,++    -- * Response Lenses+    updateWorkgroupResponse_httpStatus,+    updateWorkgroupResponse_workgroup,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateWorkgroup' smart constructor.+data UpdateWorkgroup = UpdateWorkgroup'+  { -- | The new base data warehouse capacity in Redshift Processing Units+    -- (RPUs).+    baseCapacity :: Prelude.Maybe Prelude.Int,+    -- | An array of parameters to set for advanced control over a database. The+    -- options are @datestyle@, @enable_user_activity_logging@, @query_group@,+    -- @search_path@, and @max_query_execution_time@.+    configParameters :: Prelude.Maybe [ConfigParameter],+    -- | The value that specifies whether to turn on enhanced virtual private+    -- cloud (VPC) routing, which forces Amazon Redshift Serverless to route+    -- traffic through your VPC.+    enhancedVpcRouting :: Prelude.Maybe Prelude.Bool,+    -- | The custom port to use when connecting to a workgroup. Valid port ranges+    -- are 5431-5455 and 8191-8215. The default is 5439.+    port :: Prelude.Maybe Prelude.Int,+    -- | A value that specifies whether the workgroup can be accessible from a+    -- public network.+    publiclyAccessible :: Prelude.Maybe Prelude.Bool,+    -- | An array of security group IDs to associate with the workgroup.+    securityGroupIds :: Prelude.Maybe [Prelude.Text],+    -- | An array of VPC subnet IDs to associate with the workgroup.+    subnetIds :: Prelude.Maybe [Prelude.Text],+    -- | The name of the workgroup to update.+    workgroupName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateWorkgroup' 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:+--+-- 'baseCapacity', 'updateWorkgroup_baseCapacity' - The new base data warehouse capacity in Redshift Processing Units+-- (RPUs).+--+-- 'configParameters', 'updateWorkgroup_configParameters' - An array of parameters to set for advanced control over a database. The+-- options are @datestyle@, @enable_user_activity_logging@, @query_group@,+-- @search_path@, and @max_query_execution_time@.+--+-- 'enhancedVpcRouting', 'updateWorkgroup_enhancedVpcRouting' - The value that specifies whether to turn on enhanced virtual private+-- cloud (VPC) routing, which forces Amazon Redshift Serverless to route+-- traffic through your VPC.+--+-- 'port', 'updateWorkgroup_port' - The custom port to use when connecting to a workgroup. Valid port ranges+-- are 5431-5455 and 8191-8215. The default is 5439.+--+-- 'publiclyAccessible', 'updateWorkgroup_publiclyAccessible' - A value that specifies whether the workgroup can be accessible from a+-- public network.+--+-- 'securityGroupIds', 'updateWorkgroup_securityGroupIds' - An array of security group IDs to associate with the workgroup.+--+-- 'subnetIds', 'updateWorkgroup_subnetIds' - An array of VPC subnet IDs to associate with the workgroup.+--+-- 'workgroupName', 'updateWorkgroup_workgroupName' - The name of the workgroup to update.+newUpdateWorkgroup ::+  -- | 'workgroupName'+  Prelude.Text ->+  UpdateWorkgroup+newUpdateWorkgroup pWorkgroupName_ =+  UpdateWorkgroup'+    { baseCapacity = Prelude.Nothing,+      configParameters = Prelude.Nothing,+      enhancedVpcRouting = Prelude.Nothing,+      port = Prelude.Nothing,+      publiclyAccessible = Prelude.Nothing,+      securityGroupIds = Prelude.Nothing,+      subnetIds = Prelude.Nothing,+      workgroupName = pWorkgroupName_+    }++-- | The new base data warehouse capacity in Redshift Processing Units+-- (RPUs).+updateWorkgroup_baseCapacity :: Lens.Lens' UpdateWorkgroup (Prelude.Maybe Prelude.Int)+updateWorkgroup_baseCapacity = Lens.lens (\UpdateWorkgroup' {baseCapacity} -> baseCapacity) (\s@UpdateWorkgroup' {} a -> s {baseCapacity = a} :: UpdateWorkgroup)++-- | An array of parameters to set for advanced control over a database. The+-- options are @datestyle@, @enable_user_activity_logging@, @query_group@,+-- @search_path@, and @max_query_execution_time@.+updateWorkgroup_configParameters :: Lens.Lens' UpdateWorkgroup (Prelude.Maybe [ConfigParameter])+updateWorkgroup_configParameters = Lens.lens (\UpdateWorkgroup' {configParameters} -> configParameters) (\s@UpdateWorkgroup' {} a -> s {configParameters = a} :: UpdateWorkgroup) Prelude.. Lens.mapping Lens.coerced++-- | The value that specifies whether to turn on enhanced virtual private+-- cloud (VPC) routing, which forces Amazon Redshift Serverless to route+-- traffic through your VPC.+updateWorkgroup_enhancedVpcRouting :: Lens.Lens' UpdateWorkgroup (Prelude.Maybe Prelude.Bool)+updateWorkgroup_enhancedVpcRouting = Lens.lens (\UpdateWorkgroup' {enhancedVpcRouting} -> enhancedVpcRouting) (\s@UpdateWorkgroup' {} a -> s {enhancedVpcRouting = a} :: UpdateWorkgroup)++-- | The custom port to use when connecting to a workgroup. Valid port ranges+-- are 5431-5455 and 8191-8215. The default is 5439.+updateWorkgroup_port :: Lens.Lens' UpdateWorkgroup (Prelude.Maybe Prelude.Int)+updateWorkgroup_port = Lens.lens (\UpdateWorkgroup' {port} -> port) (\s@UpdateWorkgroup' {} a -> s {port = a} :: UpdateWorkgroup)++-- | A value that specifies whether the workgroup can be accessible from a+-- public network.+updateWorkgroup_publiclyAccessible :: Lens.Lens' UpdateWorkgroup (Prelude.Maybe Prelude.Bool)+updateWorkgroup_publiclyAccessible = Lens.lens (\UpdateWorkgroup' {publiclyAccessible} -> publiclyAccessible) (\s@UpdateWorkgroup' {} a -> s {publiclyAccessible = a} :: UpdateWorkgroup)++-- | An array of security group IDs to associate with the workgroup.+updateWorkgroup_securityGroupIds :: Lens.Lens' UpdateWorkgroup (Prelude.Maybe [Prelude.Text])+updateWorkgroup_securityGroupIds = Lens.lens (\UpdateWorkgroup' {securityGroupIds} -> securityGroupIds) (\s@UpdateWorkgroup' {} a -> s {securityGroupIds = a} :: UpdateWorkgroup) Prelude.. Lens.mapping Lens.coerced++-- | An array of VPC subnet IDs to associate with the workgroup.+updateWorkgroup_subnetIds :: Lens.Lens' UpdateWorkgroup (Prelude.Maybe [Prelude.Text])+updateWorkgroup_subnetIds = Lens.lens (\UpdateWorkgroup' {subnetIds} -> subnetIds) (\s@UpdateWorkgroup' {} a -> s {subnetIds = a} :: UpdateWorkgroup) Prelude.. Lens.mapping Lens.coerced++-- | The name of the workgroup to update.+updateWorkgroup_workgroupName :: Lens.Lens' UpdateWorkgroup Prelude.Text+updateWorkgroup_workgroupName = Lens.lens (\UpdateWorkgroup' {workgroupName} -> workgroupName) (\s@UpdateWorkgroup' {} a -> s {workgroupName = a} :: UpdateWorkgroup)++instance Core.AWSRequest UpdateWorkgroup where+  type+    AWSResponse UpdateWorkgroup =+      UpdateWorkgroupResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateWorkgroupResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "workgroup")+      )++instance Prelude.Hashable UpdateWorkgroup where+  hashWithSalt _salt UpdateWorkgroup' {..} =+    _salt+      `Prelude.hashWithSalt` baseCapacity+      `Prelude.hashWithSalt` configParameters+      `Prelude.hashWithSalt` enhancedVpcRouting+      `Prelude.hashWithSalt` port+      `Prelude.hashWithSalt` publiclyAccessible+      `Prelude.hashWithSalt` securityGroupIds+      `Prelude.hashWithSalt` subnetIds+      `Prelude.hashWithSalt` workgroupName++instance Prelude.NFData UpdateWorkgroup where+  rnf UpdateWorkgroup' {..} =+    Prelude.rnf baseCapacity+      `Prelude.seq` Prelude.rnf configParameters+      `Prelude.seq` Prelude.rnf enhancedVpcRouting+      `Prelude.seq` Prelude.rnf port+      `Prelude.seq` Prelude.rnf publiclyAccessible+      `Prelude.seq` Prelude.rnf securityGroupIds+      `Prelude.seq` Prelude.rnf subnetIds+      `Prelude.seq` Prelude.rnf workgroupName++instance Data.ToHeaders UpdateWorkgroup where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "RedshiftServerless.UpdateWorkgroup" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateWorkgroup where+  toJSON UpdateWorkgroup' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("baseCapacity" Data..=) Prelude.<$> baseCapacity,+            ("configParameters" Data..=)+              Prelude.<$> configParameters,+            ("enhancedVpcRouting" Data..=)+              Prelude.<$> enhancedVpcRouting,+            ("port" Data..=) Prelude.<$> port,+            ("publiclyAccessible" Data..=)+              Prelude.<$> publiclyAccessible,+            ("securityGroupIds" Data..=)+              Prelude.<$> securityGroupIds,+            ("subnetIds" Data..=) Prelude.<$> subnetIds,+            Prelude.Just+              ("workgroupName" Data..= workgroupName)+          ]+      )++instance Data.ToPath UpdateWorkgroup where+  toPath = Prelude.const "/"++instance Data.ToQuery UpdateWorkgroup where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateWorkgroupResponse' smart constructor.+data UpdateWorkgroupResponse = UpdateWorkgroupResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The updated workgroup object.+    workgroup :: Workgroup+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateWorkgroupResponse' 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', 'updateWorkgroupResponse_httpStatus' - The response's http status code.+--+-- 'workgroup', 'updateWorkgroupResponse_workgroup' - The updated workgroup object.+newUpdateWorkgroupResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'workgroup'+  Workgroup ->+  UpdateWorkgroupResponse+newUpdateWorkgroupResponse pHttpStatus_ pWorkgroup_ =+  UpdateWorkgroupResponse'+    { httpStatus = pHttpStatus_,+      workgroup = pWorkgroup_+    }++-- | The response's http status code.+updateWorkgroupResponse_httpStatus :: Lens.Lens' UpdateWorkgroupResponse Prelude.Int+updateWorkgroupResponse_httpStatus = Lens.lens (\UpdateWorkgroupResponse' {httpStatus} -> httpStatus) (\s@UpdateWorkgroupResponse' {} a -> s {httpStatus = a} :: UpdateWorkgroupResponse)++-- | The updated workgroup object.+updateWorkgroupResponse_workgroup :: Lens.Lens' UpdateWorkgroupResponse Workgroup+updateWorkgroupResponse_workgroup = Lens.lens (\UpdateWorkgroupResponse' {workgroup} -> workgroup) (\s@UpdateWorkgroupResponse' {} a -> s {workgroup = a} :: UpdateWorkgroupResponse)++instance Prelude.NFData UpdateWorkgroupResponse where+  rnf UpdateWorkgroupResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf workgroup
+ gen/Amazonka/RedshiftServerLess/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.RedshiftServerLess.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.RedshiftServerLess.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.RedshiftServerLess.Lens+import Amazonka.RedshiftServerLess.Types
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,23 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Main+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Main (main) where++import Test.Amazonka.RedshiftServerLess+import Test.Amazonka.RedshiftServerLess.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "RedshiftServerLess"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/Gen/RedshiftServerLess.hs view
@@ -0,0 +1,838 @@+{-# 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.RedshiftServerLess+-- 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.RedshiftServerLess where++import Amazonka.RedshiftServerLess+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.RedshiftServerLess.Internal+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+--     [ testGroup "request"+--         [ requestConvertRecoveryPointToSnapshot $+--             newConvertRecoveryPointToSnapshot+--+--         , requestCreateEndpointAccess $+--             newCreateEndpointAccess+--+--         , requestCreateNamespace $+--             newCreateNamespace+--+--         , requestCreateSnapshot $+--             newCreateSnapshot+--+--         , requestCreateUsageLimit $+--             newCreateUsageLimit+--+--         , requestCreateWorkgroup $+--             newCreateWorkgroup+--+--         , requestDeleteEndpointAccess $+--             newDeleteEndpointAccess+--+--         , requestDeleteNamespace $+--             newDeleteNamespace+--+--         , requestDeleteResourcePolicy $+--             newDeleteResourcePolicy+--+--         , requestDeleteSnapshot $+--             newDeleteSnapshot+--+--         , requestDeleteUsageLimit $+--             newDeleteUsageLimit+--+--         , requestDeleteWorkgroup $+--             newDeleteWorkgroup+--+--         , requestGetCredentials $+--             newGetCredentials+--+--         , requestGetEndpointAccess $+--             newGetEndpointAccess+--+--         , requestGetNamespace $+--             newGetNamespace+--+--         , requestGetRecoveryPoint $+--             newGetRecoveryPoint+--+--         , requestGetResourcePolicy $+--             newGetResourcePolicy+--+--         , requestGetSnapshot $+--             newGetSnapshot+--+--         , requestGetTableRestoreStatus $+--             newGetTableRestoreStatus+--+--         , requestGetUsageLimit $+--             newGetUsageLimit+--+--         , requestGetWorkgroup $+--             newGetWorkgroup+--+--         , requestListEndpointAccess $+--             newListEndpointAccess+--+--         , requestListNamespaces $+--             newListNamespaces+--+--         , requestListRecoveryPoints $+--             newListRecoveryPoints+--+--         , requestListSnapshots $+--             newListSnapshots+--+--         , requestListTableRestoreStatus $+--             newListTableRestoreStatus+--+--         , requestListTagsForResource $+--             newListTagsForResource+--+--         , requestListUsageLimits $+--             newListUsageLimits+--+--         , requestListWorkgroups $+--             newListWorkgroups+--+--         , requestPutResourcePolicy $+--             newPutResourcePolicy+--+--         , requestRestoreFromRecoveryPoint $+--             newRestoreFromRecoveryPoint+--+--         , requestRestoreFromSnapshot $+--             newRestoreFromSnapshot+--+--         , requestRestoreTableFromSnapshot $+--             newRestoreTableFromSnapshot+--+--         , requestTagResource $+--             newTagResource+--+--         , requestUntagResource $+--             newUntagResource+--+--         , requestUpdateEndpointAccess $+--             newUpdateEndpointAccess+--+--         , requestUpdateNamespace $+--             newUpdateNamespace+--+--         , requestUpdateSnapshot $+--             newUpdateSnapshot+--+--         , requestUpdateUsageLimit $+--             newUpdateUsageLimit+--+--         , requestUpdateWorkgroup $+--             newUpdateWorkgroup+--+--           ]++--     , testGroup "response"+--         [ responseConvertRecoveryPointToSnapshot $+--             newConvertRecoveryPointToSnapshotResponse+--+--         , responseCreateEndpointAccess $+--             newCreateEndpointAccessResponse+--+--         , responseCreateNamespace $+--             newCreateNamespaceResponse+--+--         , responseCreateSnapshot $+--             newCreateSnapshotResponse+--+--         , responseCreateUsageLimit $+--             newCreateUsageLimitResponse+--+--         , responseCreateWorkgroup $+--             newCreateWorkgroupResponse+--+--         , responseDeleteEndpointAccess $+--             newDeleteEndpointAccessResponse+--+--         , responseDeleteNamespace $+--             newDeleteNamespaceResponse+--+--         , responseDeleteResourcePolicy $+--             newDeleteResourcePolicyResponse+--+--         , responseDeleteSnapshot $+--             newDeleteSnapshotResponse+--+--         , responseDeleteUsageLimit $+--             newDeleteUsageLimitResponse+--+--         , responseDeleteWorkgroup $+--             newDeleteWorkgroupResponse+--+--         , responseGetCredentials $+--             newGetCredentialsResponse+--+--         , responseGetEndpointAccess $+--             newGetEndpointAccessResponse+--+--         , responseGetNamespace $+--             newGetNamespaceResponse+--+--         , responseGetRecoveryPoint $+--             newGetRecoveryPointResponse+--+--         , responseGetResourcePolicy $+--             newGetResourcePolicyResponse+--+--         , responseGetSnapshot $+--             newGetSnapshotResponse+--+--         , responseGetTableRestoreStatus $+--             newGetTableRestoreStatusResponse+--+--         , responseGetUsageLimit $+--             newGetUsageLimitResponse+--+--         , responseGetWorkgroup $+--             newGetWorkgroupResponse+--+--         , responseListEndpointAccess $+--             newListEndpointAccessResponse+--+--         , responseListNamespaces $+--             newListNamespacesResponse+--+--         , responseListRecoveryPoints $+--             newListRecoveryPointsResponse+--+--         , responseListSnapshots $+--             newListSnapshotsResponse+--+--         , responseListTableRestoreStatus $+--             newListTableRestoreStatusResponse+--+--         , responseListTagsForResource $+--             newListTagsForResourceResponse+--+--         , responseListUsageLimits $+--             newListUsageLimitsResponse+--+--         , responseListWorkgroups $+--             newListWorkgroupsResponse+--+--         , responsePutResourcePolicy $+--             newPutResourcePolicyResponse+--+--         , responseRestoreFromRecoveryPoint $+--             newRestoreFromRecoveryPointResponse+--+--         , responseRestoreFromSnapshot $+--             newRestoreFromSnapshotResponse+--+--         , responseRestoreTableFromSnapshot $+--             newRestoreTableFromSnapshotResponse+--+--         , responseTagResource $+--             newTagResourceResponse+--+--         , responseUntagResource $+--             newUntagResourceResponse+--+--         , responseUpdateEndpointAccess $+--             newUpdateEndpointAccessResponse+--+--         , responseUpdateNamespace $+--             newUpdateNamespaceResponse+--+--         , responseUpdateSnapshot $+--             newUpdateSnapshotResponse+--+--         , responseUpdateUsageLimit $+--             newUpdateUsageLimitResponse+--+--         , responseUpdateWorkgroup $+--             newUpdateWorkgroupResponse+--+--           ]+--     ]++-- Requests++requestConvertRecoveryPointToSnapshot :: ConvertRecoveryPointToSnapshot -> TestTree+requestConvertRecoveryPointToSnapshot =+  req+    "ConvertRecoveryPointToSnapshot"+    "fixture/ConvertRecoveryPointToSnapshot.yaml"++requestCreateEndpointAccess :: CreateEndpointAccess -> TestTree+requestCreateEndpointAccess =+  req+    "CreateEndpointAccess"+    "fixture/CreateEndpointAccess.yaml"++requestCreateNamespace :: CreateNamespace -> TestTree+requestCreateNamespace =+  req+    "CreateNamespace"+    "fixture/CreateNamespace.yaml"++requestCreateSnapshot :: CreateSnapshot -> TestTree+requestCreateSnapshot =+  req+    "CreateSnapshot"+    "fixture/CreateSnapshot.yaml"++requestCreateUsageLimit :: CreateUsageLimit -> TestTree+requestCreateUsageLimit =+  req+    "CreateUsageLimit"+    "fixture/CreateUsageLimit.yaml"++requestCreateWorkgroup :: CreateWorkgroup -> TestTree+requestCreateWorkgroup =+  req+    "CreateWorkgroup"+    "fixture/CreateWorkgroup.yaml"++requestDeleteEndpointAccess :: DeleteEndpointAccess -> TestTree+requestDeleteEndpointAccess =+  req+    "DeleteEndpointAccess"+    "fixture/DeleteEndpointAccess.yaml"++requestDeleteNamespace :: DeleteNamespace -> TestTree+requestDeleteNamespace =+  req+    "DeleteNamespace"+    "fixture/DeleteNamespace.yaml"++requestDeleteResourcePolicy :: DeleteResourcePolicy -> TestTree+requestDeleteResourcePolicy =+  req+    "DeleteResourcePolicy"+    "fixture/DeleteResourcePolicy.yaml"++requestDeleteSnapshot :: DeleteSnapshot -> TestTree+requestDeleteSnapshot =+  req+    "DeleteSnapshot"+    "fixture/DeleteSnapshot.yaml"++requestDeleteUsageLimit :: DeleteUsageLimit -> TestTree+requestDeleteUsageLimit =+  req+    "DeleteUsageLimit"+    "fixture/DeleteUsageLimit.yaml"++requestDeleteWorkgroup :: DeleteWorkgroup -> TestTree+requestDeleteWorkgroup =+  req+    "DeleteWorkgroup"+    "fixture/DeleteWorkgroup.yaml"++requestGetCredentials :: GetCredentials -> TestTree+requestGetCredentials =+  req+    "GetCredentials"+    "fixture/GetCredentials.yaml"++requestGetEndpointAccess :: GetEndpointAccess -> TestTree+requestGetEndpointAccess =+  req+    "GetEndpointAccess"+    "fixture/GetEndpointAccess.yaml"++requestGetNamespace :: GetNamespace -> TestTree+requestGetNamespace =+  req+    "GetNamespace"+    "fixture/GetNamespace.yaml"++requestGetRecoveryPoint :: GetRecoveryPoint -> TestTree+requestGetRecoveryPoint =+  req+    "GetRecoveryPoint"+    "fixture/GetRecoveryPoint.yaml"++requestGetResourcePolicy :: GetResourcePolicy -> TestTree+requestGetResourcePolicy =+  req+    "GetResourcePolicy"+    "fixture/GetResourcePolicy.yaml"++requestGetSnapshot :: GetSnapshot -> TestTree+requestGetSnapshot =+  req+    "GetSnapshot"+    "fixture/GetSnapshot.yaml"++requestGetTableRestoreStatus :: GetTableRestoreStatus -> TestTree+requestGetTableRestoreStatus =+  req+    "GetTableRestoreStatus"+    "fixture/GetTableRestoreStatus.yaml"++requestGetUsageLimit :: GetUsageLimit -> TestTree+requestGetUsageLimit =+  req+    "GetUsageLimit"+    "fixture/GetUsageLimit.yaml"++requestGetWorkgroup :: GetWorkgroup -> TestTree+requestGetWorkgroup =+  req+    "GetWorkgroup"+    "fixture/GetWorkgroup.yaml"++requestListEndpointAccess :: ListEndpointAccess -> TestTree+requestListEndpointAccess =+  req+    "ListEndpointAccess"+    "fixture/ListEndpointAccess.yaml"++requestListNamespaces :: ListNamespaces -> TestTree+requestListNamespaces =+  req+    "ListNamespaces"+    "fixture/ListNamespaces.yaml"++requestListRecoveryPoints :: ListRecoveryPoints -> TestTree+requestListRecoveryPoints =+  req+    "ListRecoveryPoints"+    "fixture/ListRecoveryPoints.yaml"++requestListSnapshots :: ListSnapshots -> TestTree+requestListSnapshots =+  req+    "ListSnapshots"+    "fixture/ListSnapshots.yaml"++requestListTableRestoreStatus :: ListTableRestoreStatus -> TestTree+requestListTableRestoreStatus =+  req+    "ListTableRestoreStatus"+    "fixture/ListTableRestoreStatus.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+  req+    "ListTagsForResource"+    "fixture/ListTagsForResource.yaml"++requestListUsageLimits :: ListUsageLimits -> TestTree+requestListUsageLimits =+  req+    "ListUsageLimits"+    "fixture/ListUsageLimits.yaml"++requestListWorkgroups :: ListWorkgroups -> TestTree+requestListWorkgroups =+  req+    "ListWorkgroups"+    "fixture/ListWorkgroups.yaml"++requestPutResourcePolicy :: PutResourcePolicy -> TestTree+requestPutResourcePolicy =+  req+    "PutResourcePolicy"+    "fixture/PutResourcePolicy.yaml"++requestRestoreFromRecoveryPoint :: RestoreFromRecoveryPoint -> TestTree+requestRestoreFromRecoveryPoint =+  req+    "RestoreFromRecoveryPoint"+    "fixture/RestoreFromRecoveryPoint.yaml"++requestRestoreFromSnapshot :: RestoreFromSnapshot -> TestTree+requestRestoreFromSnapshot =+  req+    "RestoreFromSnapshot"+    "fixture/RestoreFromSnapshot.yaml"++requestRestoreTableFromSnapshot :: RestoreTableFromSnapshot -> TestTree+requestRestoreTableFromSnapshot =+  req+    "RestoreTableFromSnapshot"+    "fixture/RestoreTableFromSnapshot.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+  req+    "TagResource"+    "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+  req+    "UntagResource"+    "fixture/UntagResource.yaml"++requestUpdateEndpointAccess :: UpdateEndpointAccess -> TestTree+requestUpdateEndpointAccess =+  req+    "UpdateEndpointAccess"+    "fixture/UpdateEndpointAccess.yaml"++requestUpdateNamespace :: UpdateNamespace -> TestTree+requestUpdateNamespace =+  req+    "UpdateNamespace"+    "fixture/UpdateNamespace.yaml"++requestUpdateSnapshot :: UpdateSnapshot -> TestTree+requestUpdateSnapshot =+  req+    "UpdateSnapshot"+    "fixture/UpdateSnapshot.yaml"++requestUpdateUsageLimit :: UpdateUsageLimit -> TestTree+requestUpdateUsageLimit =+  req+    "UpdateUsageLimit"+    "fixture/UpdateUsageLimit.yaml"++requestUpdateWorkgroup :: UpdateWorkgroup -> TestTree+requestUpdateWorkgroup =+  req+    "UpdateWorkgroup"+    "fixture/UpdateWorkgroup.yaml"++-- Responses++responseConvertRecoveryPointToSnapshot :: ConvertRecoveryPointToSnapshotResponse -> TestTree+responseConvertRecoveryPointToSnapshot =+  res+    "ConvertRecoveryPointToSnapshotResponse"+    "fixture/ConvertRecoveryPointToSnapshotResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ConvertRecoveryPointToSnapshot)++responseCreateEndpointAccess :: CreateEndpointAccessResponse -> TestTree+responseCreateEndpointAccess =+  res+    "CreateEndpointAccessResponse"+    "fixture/CreateEndpointAccessResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateEndpointAccess)++responseCreateNamespace :: CreateNamespaceResponse -> TestTree+responseCreateNamespace =+  res+    "CreateNamespaceResponse"+    "fixture/CreateNamespaceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateNamespace)++responseCreateSnapshot :: CreateSnapshotResponse -> TestTree+responseCreateSnapshot =+  res+    "CreateSnapshotResponse"+    "fixture/CreateSnapshotResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateSnapshot)++responseCreateUsageLimit :: CreateUsageLimitResponse -> TestTree+responseCreateUsageLimit =+  res+    "CreateUsageLimitResponse"+    "fixture/CreateUsageLimitResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateUsageLimit)++responseCreateWorkgroup :: CreateWorkgroupResponse -> TestTree+responseCreateWorkgroup =+  res+    "CreateWorkgroupResponse"+    "fixture/CreateWorkgroupResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateWorkgroup)++responseDeleteEndpointAccess :: DeleteEndpointAccessResponse -> TestTree+responseDeleteEndpointAccess =+  res+    "DeleteEndpointAccessResponse"+    "fixture/DeleteEndpointAccessResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteEndpointAccess)++responseDeleteNamespace :: DeleteNamespaceResponse -> TestTree+responseDeleteNamespace =+  res+    "DeleteNamespaceResponse"+    "fixture/DeleteNamespaceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteNamespace)++responseDeleteResourcePolicy :: DeleteResourcePolicyResponse -> TestTree+responseDeleteResourcePolicy =+  res+    "DeleteResourcePolicyResponse"+    "fixture/DeleteResourcePolicyResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteResourcePolicy)++responseDeleteSnapshot :: DeleteSnapshotResponse -> TestTree+responseDeleteSnapshot =+  res+    "DeleteSnapshotResponse"+    "fixture/DeleteSnapshotResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteSnapshot)++responseDeleteUsageLimit :: DeleteUsageLimitResponse -> TestTree+responseDeleteUsageLimit =+  res+    "DeleteUsageLimitResponse"+    "fixture/DeleteUsageLimitResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteUsageLimit)++responseDeleteWorkgroup :: DeleteWorkgroupResponse -> TestTree+responseDeleteWorkgroup =+  res+    "DeleteWorkgroupResponse"+    "fixture/DeleteWorkgroupResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteWorkgroup)++responseGetCredentials :: GetCredentialsResponse -> TestTree+responseGetCredentials =+  res+    "GetCredentialsResponse"+    "fixture/GetCredentialsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetCredentials)++responseGetEndpointAccess :: GetEndpointAccessResponse -> TestTree+responseGetEndpointAccess =+  res+    "GetEndpointAccessResponse"+    "fixture/GetEndpointAccessResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetEndpointAccess)++responseGetNamespace :: GetNamespaceResponse -> TestTree+responseGetNamespace =+  res+    "GetNamespaceResponse"+    "fixture/GetNamespaceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetNamespace)++responseGetRecoveryPoint :: GetRecoveryPointResponse -> TestTree+responseGetRecoveryPoint =+  res+    "GetRecoveryPointResponse"+    "fixture/GetRecoveryPointResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetRecoveryPoint)++responseGetResourcePolicy :: GetResourcePolicyResponse -> TestTree+responseGetResourcePolicy =+  res+    "GetResourcePolicyResponse"+    "fixture/GetResourcePolicyResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetResourcePolicy)++responseGetSnapshot :: GetSnapshotResponse -> TestTree+responseGetSnapshot =+  res+    "GetSnapshotResponse"+    "fixture/GetSnapshotResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetSnapshot)++responseGetTableRestoreStatus :: GetTableRestoreStatusResponse -> TestTree+responseGetTableRestoreStatus =+  res+    "GetTableRestoreStatusResponse"+    "fixture/GetTableRestoreStatusResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetTableRestoreStatus)++responseGetUsageLimit :: GetUsageLimitResponse -> TestTree+responseGetUsageLimit =+  res+    "GetUsageLimitResponse"+    "fixture/GetUsageLimitResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetUsageLimit)++responseGetWorkgroup :: GetWorkgroupResponse -> TestTree+responseGetWorkgroup =+  res+    "GetWorkgroupResponse"+    "fixture/GetWorkgroupResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetWorkgroup)++responseListEndpointAccess :: ListEndpointAccessResponse -> TestTree+responseListEndpointAccess =+  res+    "ListEndpointAccessResponse"+    "fixture/ListEndpointAccessResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListEndpointAccess)++responseListNamespaces :: ListNamespacesResponse -> TestTree+responseListNamespaces =+  res+    "ListNamespacesResponse"+    "fixture/ListNamespacesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListNamespaces)++responseListRecoveryPoints :: ListRecoveryPointsResponse -> TestTree+responseListRecoveryPoints =+  res+    "ListRecoveryPointsResponse"+    "fixture/ListRecoveryPointsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListRecoveryPoints)++responseListSnapshots :: ListSnapshotsResponse -> TestTree+responseListSnapshots =+  res+    "ListSnapshotsResponse"+    "fixture/ListSnapshotsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListSnapshots)++responseListTableRestoreStatus :: ListTableRestoreStatusResponse -> TestTree+responseListTableRestoreStatus =+  res+    "ListTableRestoreStatusResponse"+    "fixture/ListTableRestoreStatusResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListTableRestoreStatus)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+  res+    "ListTagsForResourceResponse"+    "fixture/ListTagsForResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseListUsageLimits :: ListUsageLimitsResponse -> TestTree+responseListUsageLimits =+  res+    "ListUsageLimitsResponse"+    "fixture/ListUsageLimitsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListUsageLimits)++responseListWorkgroups :: ListWorkgroupsResponse -> TestTree+responseListWorkgroups =+  res+    "ListWorkgroupsResponse"+    "fixture/ListWorkgroupsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListWorkgroups)++responsePutResourcePolicy :: PutResourcePolicyResponse -> TestTree+responsePutResourcePolicy =+  res+    "PutResourcePolicyResponse"+    "fixture/PutResourcePolicyResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy PutResourcePolicy)++responseRestoreFromRecoveryPoint :: RestoreFromRecoveryPointResponse -> TestTree+responseRestoreFromRecoveryPoint =+  res+    "RestoreFromRecoveryPointResponse"+    "fixture/RestoreFromRecoveryPointResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy RestoreFromRecoveryPoint)++responseRestoreFromSnapshot :: RestoreFromSnapshotResponse -> TestTree+responseRestoreFromSnapshot =+  res+    "RestoreFromSnapshotResponse"+    "fixture/RestoreFromSnapshotResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy RestoreFromSnapshot)++responseRestoreTableFromSnapshot :: RestoreTableFromSnapshotResponse -> TestTree+responseRestoreTableFromSnapshot =+  res+    "RestoreTableFromSnapshotResponse"+    "fixture/RestoreTableFromSnapshotResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy RestoreTableFromSnapshot)++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)++responseUpdateEndpointAccess :: UpdateEndpointAccessResponse -> TestTree+responseUpdateEndpointAccess =+  res+    "UpdateEndpointAccessResponse"+    "fixture/UpdateEndpointAccessResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateEndpointAccess)++responseUpdateNamespace :: UpdateNamespaceResponse -> TestTree+responseUpdateNamespace =+  res+    "UpdateNamespaceResponse"+    "fixture/UpdateNamespaceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateNamespace)++responseUpdateSnapshot :: UpdateSnapshotResponse -> TestTree+responseUpdateSnapshot =+  res+    "UpdateSnapshotResponse"+    "fixture/UpdateSnapshotResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateSnapshot)++responseUpdateUsageLimit :: UpdateUsageLimitResponse -> TestTree+responseUpdateUsageLimit =+  res+    "UpdateUsageLimitResponse"+    "fixture/UpdateUsageLimitResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateUsageLimit)++responseUpdateWorkgroup :: UpdateWorkgroupResponse -> TestTree+responseUpdateWorkgroup =+  res+    "UpdateWorkgroupResponse"+    "fixture/UpdateWorkgroupResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateWorkgroup)
+ test/Test/Amazonka/RedshiftServerLess.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.RedshiftServerLess+-- 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.RedshiftServerLess+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/RedshiftServerLess/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.RedshiftServerLess.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.RedshiftServerLess.Internal where