packages feed

amazonka-rbin (empty) → 2.0

raw patch · 53 files changed

+5188/−0 lines, 53 filesdep +amazonka-coredep +amazonka-rbindep +amazonka-test

Dependencies added: amazonka-core, amazonka-rbin, 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 Recycle Bin SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2021-06-15@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-rbin)+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.RBin](http://hackage.haskell.org/package/amazonka-rbin/docs/Amazonka-RBin.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-rbin` 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-rbin.cabal view
@@ -0,0 +1,104 @@+cabal-version:      2.2+name:               amazonka-rbin+version:            2.0+synopsis:           Amazon Recycle Bin 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-06-15@ 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.RBin.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.RBin" 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-rbin++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.RBin+    Amazonka.RBin.CreateRule+    Amazonka.RBin.DeleteRule+    Amazonka.RBin.GetRule+    Amazonka.RBin.Lens+    Amazonka.RBin.ListRules+    Amazonka.RBin.ListTagsForResource+    Amazonka.RBin.LockRule+    Amazonka.RBin.TagResource+    Amazonka.RBin.Types+    Amazonka.RBin.Types.LockConfiguration+    Amazonka.RBin.Types.LockState+    Amazonka.RBin.Types.ResourceTag+    Amazonka.RBin.Types.ResourceType+    Amazonka.RBin.Types.RetentionPeriod+    Amazonka.RBin.Types.RetentionPeriodUnit+    Amazonka.RBin.Types.RuleStatus+    Amazonka.RBin.Types.RuleSummary+    Amazonka.RBin.Types.Tag+    Amazonka.RBin.Types.UnlockDelay+    Amazonka.RBin.Types.UnlockDelayUnit+    Amazonka.RBin.UnlockRule+    Amazonka.RBin.UntagResource+    Amazonka.RBin.UpdateRule+    Amazonka.RBin.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-rbin-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.RBin+    Test.Amazonka.RBin+    Test.Amazonka.RBin.Internal++  build-depends:+    , amazonka-core         >=2.0 && <2.1+    , amazonka-rbin+    , amazonka-test         >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/CreateRule.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/CreateRuleResponse.proto view
+ fixture/DeleteRule.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/DeleteRuleResponse.proto view
+ fixture/GetRule.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/GetRuleResponse.proto view
+ fixture/ListRules.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/ListRulesResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/LockRule.yaml view
@@ -0,0 +1,10 @@+---+method: PATCH+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/LockRuleResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/UnlockRule.yaml view
@@ -0,0 +1,10 @@+---+method: PATCH+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/UnlockRuleResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/UpdateRule.yaml view
@@ -0,0 +1,10 @@+---+method: PATCH+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rbin/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rbin.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/UpdateRuleResponse.proto view
+ gen/Amazonka/RBin.hs view
@@ -0,0 +1,203 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.RBin+-- 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-06-15@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- This is the /Recycle Bin API Reference/. This documentation provides+-- descriptions and syntax for each of the actions and data types in+-- Recycle Bin.+--+-- Recycle Bin is a resource recovery feature that enables you to restore+-- accidentally deleted snapshots and EBS-backed AMIs. When using Recycle+-- Bin, if your resources are deleted, they are retained in the Recycle Bin+-- for a time period that you specify.+--+-- You can restore a resource from the Recycle Bin at any time before its+-- retention period expires. After you restore a resource from the Recycle+-- Bin, the resource is removed from the Recycle Bin, and you can then use+-- it in the same way you use any other resource of that type in your+-- account. If the retention period expires and the resource is not+-- restored, the resource is permanently deleted from the Recycle Bin and+-- is no longer available for recovery. For more information about Recycle+-- Bin, see+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-recycle-bin.html Recycle Bin>+-- in the /Amazon Elastic Compute Cloud User Guide/.+module Amazonka.RBin+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** ConflictException+    _ConflictException,++    -- ** InternalServerException+    _InternalServerException,++    -- ** ResourceNotFoundException+    _ResourceNotFoundException,++    -- ** ServiceQuotaExceededException+    _ServiceQuotaExceededException,++    -- ** ValidationException+    _ValidationException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** CreateRule+    CreateRule (CreateRule'),+    newCreateRule,+    CreateRuleResponse (CreateRuleResponse'),+    newCreateRuleResponse,++    -- ** DeleteRule+    DeleteRule (DeleteRule'),+    newDeleteRule,+    DeleteRuleResponse (DeleteRuleResponse'),+    newDeleteRuleResponse,++    -- ** GetRule+    GetRule (GetRule'),+    newGetRule,+    GetRuleResponse (GetRuleResponse'),+    newGetRuleResponse,++    -- ** ListRules (Paginated)+    ListRules (ListRules'),+    newListRules,+    ListRulesResponse (ListRulesResponse'),+    newListRulesResponse,++    -- ** ListTagsForResource+    ListTagsForResource (ListTagsForResource'),+    newListTagsForResource,+    ListTagsForResourceResponse (ListTagsForResourceResponse'),+    newListTagsForResourceResponse,++    -- ** LockRule+    LockRule (LockRule'),+    newLockRule,+    LockRuleResponse (LockRuleResponse'),+    newLockRuleResponse,++    -- ** TagResource+    TagResource (TagResource'),+    newTagResource,+    TagResourceResponse (TagResourceResponse'),+    newTagResourceResponse,++    -- ** UnlockRule+    UnlockRule (UnlockRule'),+    newUnlockRule,+    UnlockRuleResponse (UnlockRuleResponse'),+    newUnlockRuleResponse,++    -- ** UntagResource+    UntagResource (UntagResource'),+    newUntagResource,+    UntagResourceResponse (UntagResourceResponse'),+    newUntagResourceResponse,++    -- ** UpdateRule+    UpdateRule (UpdateRule'),+    newUpdateRule,+    UpdateRuleResponse (UpdateRuleResponse'),+    newUpdateRuleResponse,++    -- * Types++    -- ** LockState+    LockState (..),++    -- ** ResourceType+    ResourceType (..),++    -- ** RetentionPeriodUnit+    RetentionPeriodUnit (..),++    -- ** RuleStatus+    RuleStatus (..),++    -- ** UnlockDelayUnit+    UnlockDelayUnit (..),++    -- ** LockConfiguration+    LockConfiguration (LockConfiguration'),+    newLockConfiguration,++    -- ** ResourceTag+    ResourceTag (ResourceTag'),+    newResourceTag,++    -- ** RetentionPeriod+    RetentionPeriod (RetentionPeriod'),+    newRetentionPeriod,++    -- ** RuleSummary+    RuleSummary (RuleSummary'),+    newRuleSummary,++    -- ** Tag+    Tag (Tag'),+    newTag,++    -- ** UnlockDelay+    UnlockDelay (UnlockDelay'),+    newUnlockDelay,+  )+where++import Amazonka.RBin.CreateRule+import Amazonka.RBin.DeleteRule+import Amazonka.RBin.GetRule+import Amazonka.RBin.Lens+import Amazonka.RBin.ListRules+import Amazonka.RBin.ListTagsForResource+import Amazonka.RBin.LockRule+import Amazonka.RBin.TagResource+import Amazonka.RBin.Types+import Amazonka.RBin.UnlockRule+import Amazonka.RBin.UntagResource+import Amazonka.RBin.UpdateRule+import Amazonka.RBin.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 'RBin'.++-- $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/RBin/CreateRule.hs view
@@ -0,0 +1,437 @@+{-# 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.RBin.CreateRule+-- 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 Recycle Bin retention rule. For more information, see+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-rules.html#recycle-bin-create-rule Create Recycle Bin retention rules>+-- in the /Amazon Elastic Compute Cloud User Guide/.+module Amazonka.RBin.CreateRule+  ( -- * Creating a Request+    CreateRule (..),+    newCreateRule,++    -- * Request Lenses+    createRule_description,+    createRule_lockConfiguration,+    createRule_resourceTags,+    createRule_tags,+    createRule_retentionPeriod,+    createRule_resourceType,++    -- * Destructuring the Response+    CreateRuleResponse (..),+    newCreateRuleResponse,++    -- * Response Lenses+    createRuleResponse_description,+    createRuleResponse_identifier,+    createRuleResponse_lockConfiguration,+    createRuleResponse_lockState,+    createRuleResponse_resourceTags,+    createRuleResponse_resourceType,+    createRuleResponse_retentionPeriod,+    createRuleResponse_status,+    createRuleResponse_tags,+    createRuleResponse_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.RBin.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateRule' smart constructor.+data CreateRule = CreateRule'+  { -- | The retention rule description.+    description :: Prelude.Maybe Prelude.Text,+    -- | Information about the retention rule lock configuration.+    lockConfiguration :: Prelude.Maybe LockConfiguration,+    -- | Specifies the resource tags to use to identify resources that are to be+    -- retained by a tag-level retention rule. For tag-level retention rules,+    -- only deleted resources, of the specified resource type, that have one or+    -- more of the specified tag key and value pairs are retained. If a+    -- resource is deleted, but it does not have any of the specified tag key+    -- and value pairs, it is immediately deleted without being retained by the+    -- retention rule.+    --+    -- You can add the same tag key and value pair to a maximum or five+    -- retention rules.+    --+    -- To create a Region-level retention rule, omit this parameter. A+    -- Region-level retention rule does not have any resource tags specified.+    -- It retains all deleted resources of the specified resource type in the+    -- Region in which the rule is created, even if the resources are not+    -- tagged.+    resourceTags :: Prelude.Maybe [ResourceTag],+    -- | Information about the tags to assign to the retention rule.+    tags :: Prelude.Maybe [Tag],+    -- | Information about the retention period for which the retention rule is+    -- to retain resources.+    retentionPeriod :: RetentionPeriod,+    -- | The resource type to be retained by the retention rule. Currently, only+    -- Amazon EBS snapshots and EBS-backed AMIs are supported. To retain+    -- snapshots, specify @EBS_SNAPSHOT@. To retain EBS-backed AMIs, specify+    -- @EC2_IMAGE@.+    resourceType :: ResourceType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateRule' 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:+--+-- 'description', 'createRule_description' - The retention rule description.+--+-- 'lockConfiguration', 'createRule_lockConfiguration' - Information about the retention rule lock configuration.+--+-- 'resourceTags', 'createRule_resourceTags' - Specifies the resource tags to use to identify resources that are to be+-- retained by a tag-level retention rule. For tag-level retention rules,+-- only deleted resources, of the specified resource type, that have one or+-- more of the specified tag key and value pairs are retained. If a+-- resource is deleted, but it does not have any of the specified tag key+-- and value pairs, it is immediately deleted without being retained by the+-- retention rule.+--+-- You can add the same tag key and value pair to a maximum or five+-- retention rules.+--+-- To create a Region-level retention rule, omit this parameter. A+-- Region-level retention rule does not have any resource tags specified.+-- It retains all deleted resources of the specified resource type in the+-- Region in which the rule is created, even if the resources are not+-- tagged.+--+-- 'tags', 'createRule_tags' - Information about the tags to assign to the retention rule.+--+-- 'retentionPeriod', 'createRule_retentionPeriod' - Information about the retention period for which the retention rule is+-- to retain resources.+--+-- 'resourceType', 'createRule_resourceType' - The resource type to be retained by the retention rule. Currently, only+-- Amazon EBS snapshots and EBS-backed AMIs are supported. To retain+-- snapshots, specify @EBS_SNAPSHOT@. To retain EBS-backed AMIs, specify+-- @EC2_IMAGE@.+newCreateRule ::+  -- | 'retentionPeriod'+  RetentionPeriod ->+  -- | 'resourceType'+  ResourceType ->+  CreateRule+newCreateRule pRetentionPeriod_ pResourceType_ =+  CreateRule'+    { description = Prelude.Nothing,+      lockConfiguration = Prelude.Nothing,+      resourceTags = Prelude.Nothing,+      tags = Prelude.Nothing,+      retentionPeriod = pRetentionPeriod_,+      resourceType = pResourceType_+    }++-- | The retention rule description.+createRule_description :: Lens.Lens' CreateRule (Prelude.Maybe Prelude.Text)+createRule_description = Lens.lens (\CreateRule' {description} -> description) (\s@CreateRule' {} a -> s {description = a} :: CreateRule)++-- | Information about the retention rule lock configuration.+createRule_lockConfiguration :: Lens.Lens' CreateRule (Prelude.Maybe LockConfiguration)+createRule_lockConfiguration = Lens.lens (\CreateRule' {lockConfiguration} -> lockConfiguration) (\s@CreateRule' {} a -> s {lockConfiguration = a} :: CreateRule)++-- | Specifies the resource tags to use to identify resources that are to be+-- retained by a tag-level retention rule. For tag-level retention rules,+-- only deleted resources, of the specified resource type, that have one or+-- more of the specified tag key and value pairs are retained. If a+-- resource is deleted, but it does not have any of the specified tag key+-- and value pairs, it is immediately deleted without being retained by the+-- retention rule.+--+-- You can add the same tag key and value pair to a maximum or five+-- retention rules.+--+-- To create a Region-level retention rule, omit this parameter. A+-- Region-level retention rule does not have any resource tags specified.+-- It retains all deleted resources of the specified resource type in the+-- Region in which the rule is created, even if the resources are not+-- tagged.+createRule_resourceTags :: Lens.Lens' CreateRule (Prelude.Maybe [ResourceTag])+createRule_resourceTags = Lens.lens (\CreateRule' {resourceTags} -> resourceTags) (\s@CreateRule' {} a -> s {resourceTags = a} :: CreateRule) Prelude.. Lens.mapping Lens.coerced++-- | Information about the tags to assign to the retention rule.+createRule_tags :: Lens.Lens' CreateRule (Prelude.Maybe [Tag])+createRule_tags = Lens.lens (\CreateRule' {tags} -> tags) (\s@CreateRule' {} a -> s {tags = a} :: CreateRule) Prelude.. Lens.mapping Lens.coerced++-- | Information about the retention period for which the retention rule is+-- to retain resources.+createRule_retentionPeriod :: Lens.Lens' CreateRule RetentionPeriod+createRule_retentionPeriod = Lens.lens (\CreateRule' {retentionPeriod} -> retentionPeriod) (\s@CreateRule' {} a -> s {retentionPeriod = a} :: CreateRule)++-- | The resource type to be retained by the retention rule. Currently, only+-- Amazon EBS snapshots and EBS-backed AMIs are supported. To retain+-- snapshots, specify @EBS_SNAPSHOT@. To retain EBS-backed AMIs, specify+-- @EC2_IMAGE@.+createRule_resourceType :: Lens.Lens' CreateRule ResourceType+createRule_resourceType = Lens.lens (\CreateRule' {resourceType} -> resourceType) (\s@CreateRule' {} a -> s {resourceType = a} :: CreateRule)++instance Core.AWSRequest CreateRule where+  type AWSResponse CreateRule = CreateRuleResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateRuleResponse'+            Prelude.<$> (x Data..?> "Description")+            Prelude.<*> (x Data..?> "Identifier")+            Prelude.<*> (x Data..?> "LockConfiguration")+            Prelude.<*> (x Data..?> "LockState")+            Prelude.<*> (x Data..?> "ResourceTags" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "ResourceType")+            Prelude.<*> (x Data..?> "RetentionPeriod")+            Prelude.<*> (x Data..?> "Status")+            Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateRule where+  hashWithSalt _salt CreateRule' {..} =+    _salt+      `Prelude.hashWithSalt` description+      `Prelude.hashWithSalt` lockConfiguration+      `Prelude.hashWithSalt` resourceTags+      `Prelude.hashWithSalt` tags+      `Prelude.hashWithSalt` retentionPeriod+      `Prelude.hashWithSalt` resourceType++instance Prelude.NFData CreateRule where+  rnf CreateRule' {..} =+    Prelude.rnf description+      `Prelude.seq` Prelude.rnf lockConfiguration+      `Prelude.seq` Prelude.rnf resourceTags+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf resourceType++instance Data.ToHeaders CreateRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateRule where+  toJSON CreateRule' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("Description" Data..=) Prelude.<$> description,+            ("LockConfiguration" Data..=)+              Prelude.<$> lockConfiguration,+            ("ResourceTags" Data..=) Prelude.<$> resourceTags,+            ("Tags" Data..=) Prelude.<$> tags,+            Prelude.Just+              ("RetentionPeriod" Data..= retentionPeriod),+            Prelude.Just ("ResourceType" Data..= resourceType)+          ]+      )++instance Data.ToPath CreateRule where+  toPath = Prelude.const "/rules"++instance Data.ToQuery CreateRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateRuleResponse' smart constructor.+data CreateRuleResponse = CreateRuleResponse'+  { -- | The retention rule description.+    description :: Prelude.Maybe Prelude.Text,+    -- | The unique ID of the retention rule.+    identifier :: Prelude.Maybe Prelude.Text,+    -- | Information about the retention rule lock configuration.+    lockConfiguration :: Prelude.Maybe LockConfiguration,+    -- | The lock state for the retention rule.+    --+    -- -   @locked@ - The retention rule is locked and can\'t be modified or+    --     deleted.+    --+    -- -   @pending_unlock@ - The retention rule has been unlocked but it is+    --     still within the unlock delay period. The retention rule can be+    --     modified or deleted only after the unlock delay period has expired.+    --+    -- -   @unlocked@ - The retention rule is unlocked and it can be modified+    --     or deleted by any user with the required permissions.+    --+    -- -   @null@ - The retention rule has never been locked. Once a retention+    --     rule has been locked, it can transition between the @locked@ and+    --     @unlocked@ states only; it can never transition back to @null@.+    lockState :: Prelude.Maybe LockState,+    -- | Information about the resource tags used to identify resources that are+    -- retained by the retention rule.+    resourceTags :: Prelude.Maybe [ResourceTag],+    -- | The resource type retained by the retention rule.+    resourceType :: Prelude.Maybe ResourceType,+    retentionPeriod :: Prelude.Maybe RetentionPeriod,+    -- | The state of the retention rule. Only retention rules that are in the+    -- @available@ state retain resources.+    status :: Prelude.Maybe RuleStatus,+    -- | Information about the tags assigned to the retention rule.+    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 'CreateRuleResponse' 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:+--+-- 'description', 'createRuleResponse_description' - The retention rule description.+--+-- 'identifier', 'createRuleResponse_identifier' - The unique ID of the retention rule.+--+-- 'lockConfiguration', 'createRuleResponse_lockConfiguration' - Information about the retention rule lock configuration.+--+-- 'lockState', 'createRuleResponse_lockState' - The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+--+-- 'resourceTags', 'createRuleResponse_resourceTags' - Information about the resource tags used to identify resources that are+-- retained by the retention rule.+--+-- 'resourceType', 'createRuleResponse_resourceType' - The resource type retained by the retention rule.+--+-- 'retentionPeriod', 'createRuleResponse_retentionPeriod' - Undocumented member.+--+-- 'status', 'createRuleResponse_status' - The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+--+-- 'tags', 'createRuleResponse_tags' - Information about the tags assigned to the retention rule.+--+-- 'httpStatus', 'createRuleResponse_httpStatus' - The response's http status code.+newCreateRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateRuleResponse+newCreateRuleResponse pHttpStatus_ =+  CreateRuleResponse'+    { description = Prelude.Nothing,+      identifier = Prelude.Nothing,+      lockConfiguration = Prelude.Nothing,+      lockState = Prelude.Nothing,+      resourceTags = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      retentionPeriod = Prelude.Nothing,+      status = Prelude.Nothing,+      tags = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The retention rule description.+createRuleResponse_description :: Lens.Lens' CreateRuleResponse (Prelude.Maybe Prelude.Text)+createRuleResponse_description = Lens.lens (\CreateRuleResponse' {description} -> description) (\s@CreateRuleResponse' {} a -> s {description = a} :: CreateRuleResponse)++-- | The unique ID of the retention rule.+createRuleResponse_identifier :: Lens.Lens' CreateRuleResponse (Prelude.Maybe Prelude.Text)+createRuleResponse_identifier = Lens.lens (\CreateRuleResponse' {identifier} -> identifier) (\s@CreateRuleResponse' {} a -> s {identifier = a} :: CreateRuleResponse)++-- | Information about the retention rule lock configuration.+createRuleResponse_lockConfiguration :: Lens.Lens' CreateRuleResponse (Prelude.Maybe LockConfiguration)+createRuleResponse_lockConfiguration = Lens.lens (\CreateRuleResponse' {lockConfiguration} -> lockConfiguration) (\s@CreateRuleResponse' {} a -> s {lockConfiguration = a} :: CreateRuleResponse)++-- | The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+createRuleResponse_lockState :: Lens.Lens' CreateRuleResponse (Prelude.Maybe LockState)+createRuleResponse_lockState = Lens.lens (\CreateRuleResponse' {lockState} -> lockState) (\s@CreateRuleResponse' {} a -> s {lockState = a} :: CreateRuleResponse)++-- | Information about the resource tags used to identify resources that are+-- retained by the retention rule.+createRuleResponse_resourceTags :: Lens.Lens' CreateRuleResponse (Prelude.Maybe [ResourceTag])+createRuleResponse_resourceTags = Lens.lens (\CreateRuleResponse' {resourceTags} -> resourceTags) (\s@CreateRuleResponse' {} a -> s {resourceTags = a} :: CreateRuleResponse) Prelude.. Lens.mapping Lens.coerced++-- | The resource type retained by the retention rule.+createRuleResponse_resourceType :: Lens.Lens' CreateRuleResponse (Prelude.Maybe ResourceType)+createRuleResponse_resourceType = Lens.lens (\CreateRuleResponse' {resourceType} -> resourceType) (\s@CreateRuleResponse' {} a -> s {resourceType = a} :: CreateRuleResponse)++-- | Undocumented member.+createRuleResponse_retentionPeriod :: Lens.Lens' CreateRuleResponse (Prelude.Maybe RetentionPeriod)+createRuleResponse_retentionPeriod = Lens.lens (\CreateRuleResponse' {retentionPeriod} -> retentionPeriod) (\s@CreateRuleResponse' {} a -> s {retentionPeriod = a} :: CreateRuleResponse)++-- | The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+createRuleResponse_status :: Lens.Lens' CreateRuleResponse (Prelude.Maybe RuleStatus)+createRuleResponse_status = Lens.lens (\CreateRuleResponse' {status} -> status) (\s@CreateRuleResponse' {} a -> s {status = a} :: CreateRuleResponse)++-- | Information about the tags assigned to the retention rule.+createRuleResponse_tags :: Lens.Lens' CreateRuleResponse (Prelude.Maybe [Tag])+createRuleResponse_tags = Lens.lens (\CreateRuleResponse' {tags} -> tags) (\s@CreateRuleResponse' {} a -> s {tags = a} :: CreateRuleResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+createRuleResponse_httpStatus :: Lens.Lens' CreateRuleResponse Prelude.Int+createRuleResponse_httpStatus = Lens.lens (\CreateRuleResponse' {httpStatus} -> httpStatus) (\s@CreateRuleResponse' {} a -> s {httpStatus = a} :: CreateRuleResponse)++instance Prelude.NFData CreateRuleResponse where+  rnf CreateRuleResponse' {..} =+    Prelude.rnf description+      `Prelude.seq` Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf lockConfiguration+      `Prelude.seq` Prelude.rnf lockState+      `Prelude.seq` Prelude.rnf resourceTags+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RBin/DeleteRule.hs view
@@ -0,0 +1,142 @@+{-# 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.RBin.DeleteRule+-- 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 Recycle Bin retention rule. For more information, see+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-rules.html#recycle-bin-delete-rule Delete Recycle Bin retention rules>+-- in the /Amazon Elastic Compute Cloud User Guide/.+module Amazonka.RBin.DeleteRule+  ( -- * Creating a Request+    DeleteRule (..),+    newDeleteRule,++    -- * Request Lenses+    deleteRule_identifier,++    -- * Destructuring the Response+    DeleteRuleResponse (..),+    newDeleteRuleResponse,++    -- * Response Lenses+    deleteRuleResponse_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.RBin.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteRule' smart constructor.+data DeleteRule = DeleteRule'+  { -- | The unique ID of the retention rule.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRule' 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:+--+-- 'identifier', 'deleteRule_identifier' - The unique ID of the retention rule.+newDeleteRule ::+  -- | 'identifier'+  Prelude.Text ->+  DeleteRule+newDeleteRule pIdentifier_ =+  DeleteRule' {identifier = pIdentifier_}++-- | The unique ID of the retention rule.+deleteRule_identifier :: Lens.Lens' DeleteRule Prelude.Text+deleteRule_identifier = Lens.lens (\DeleteRule' {identifier} -> identifier) (\s@DeleteRule' {} a -> s {identifier = a} :: DeleteRule)++instance Core.AWSRequest DeleteRule where+  type AWSResponse DeleteRule = DeleteRuleResponse+  request overrides =+    Request.delete (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          DeleteRuleResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteRule where+  hashWithSalt _salt DeleteRule' {..} =+    _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData DeleteRule where+  rnf DeleteRule' {..} = Prelude.rnf identifier++instance Data.ToHeaders DeleteRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath DeleteRule where+  toPath DeleteRule' {..} =+    Prelude.mconcat ["/rules/", Data.toBS identifier]++instance Data.ToQuery DeleteRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteRuleResponse' smart constructor.+data DeleteRuleResponse = DeleteRuleResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRuleResponse' 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', 'deleteRuleResponse_httpStatus' - The response's http status code.+newDeleteRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteRuleResponse+newDeleteRuleResponse pHttpStatus_ =+  DeleteRuleResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+deleteRuleResponse_httpStatus :: Lens.Lens' DeleteRuleResponse Prelude.Int+deleteRuleResponse_httpStatus = Lens.lens (\DeleteRuleResponse' {httpStatus} -> httpStatus) (\s@DeleteRuleResponse' {} a -> s {httpStatus = a} :: DeleteRuleResponse)++instance Prelude.NFData DeleteRuleResponse where+  rnf DeleteRuleResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/RBin/GetRule.hs view
@@ -0,0 +1,308 @@+{-# 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.RBin.GetRule+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets information about a Recycle Bin retention rule.+module Amazonka.RBin.GetRule+  ( -- * Creating a Request+    GetRule (..),+    newGetRule,++    -- * Request Lenses+    getRule_identifier,++    -- * Destructuring the Response+    GetRuleResponse (..),+    newGetRuleResponse,++    -- * Response Lenses+    getRuleResponse_description,+    getRuleResponse_identifier,+    getRuleResponse_lockConfiguration,+    getRuleResponse_lockEndTime,+    getRuleResponse_lockState,+    getRuleResponse_resourceTags,+    getRuleResponse_resourceType,+    getRuleResponse_retentionPeriod,+    getRuleResponse_status,+    getRuleResponse_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.RBin.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetRule' smart constructor.+data GetRule = GetRule'+  { -- | The unique ID of the retention rule.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRule' 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:+--+-- 'identifier', 'getRule_identifier' - The unique ID of the retention rule.+newGetRule ::+  -- | 'identifier'+  Prelude.Text ->+  GetRule+newGetRule pIdentifier_ =+  GetRule' {identifier = pIdentifier_}++-- | The unique ID of the retention rule.+getRule_identifier :: Lens.Lens' GetRule Prelude.Text+getRule_identifier = Lens.lens (\GetRule' {identifier} -> identifier) (\s@GetRule' {} a -> s {identifier = a} :: GetRule)++instance Core.AWSRequest GetRule where+  type AWSResponse GetRule = GetRuleResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetRuleResponse'+            Prelude.<$> (x Data..?> "Description")+            Prelude.<*> (x Data..?> "Identifier")+            Prelude.<*> (x Data..?> "LockConfiguration")+            Prelude.<*> (x Data..?> "LockEndTime")+            Prelude.<*> (x Data..?> "LockState")+            Prelude.<*> (x Data..?> "ResourceTags" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "ResourceType")+            Prelude.<*> (x Data..?> "RetentionPeriod")+            Prelude.<*> (x Data..?> "Status")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetRule where+  hashWithSalt _salt GetRule' {..} =+    _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData GetRule where+  rnf GetRule' {..} = Prelude.rnf identifier++instance Data.ToHeaders GetRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath GetRule where+  toPath GetRule' {..} =+    Prelude.mconcat ["/rules/", Data.toBS identifier]++instance Data.ToQuery GetRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetRuleResponse' smart constructor.+data GetRuleResponse = GetRuleResponse'+  { -- | The retention rule description.+    description :: Prelude.Maybe Prelude.Text,+    -- | The unique ID of the retention rule.+    identifier :: Prelude.Maybe Prelude.Text,+    -- | Information about the retention rule lock configuration.+    lockConfiguration :: Prelude.Maybe LockConfiguration,+    -- | The date and time at which the unlock delay is set to expire. Only+    -- returned for retention rules that have been unlocked and that are still+    -- within the unlock delay period.+    lockEndTime :: Prelude.Maybe Data.POSIX,+    -- | The lock state for the retention rule.+    --+    -- -   @locked@ - The retention rule is locked and can\'t be modified or+    --     deleted.+    --+    -- -   @pending_unlock@ - The retention rule has been unlocked but it is+    --     still within the unlock delay period. The retention rule can be+    --     modified or deleted only after the unlock delay period has expired.+    --+    -- -   @unlocked@ - The retention rule is unlocked and it can be modified+    --     or deleted by any user with the required permissions.+    --+    -- -   @null@ - The retention rule has never been locked. Once a retention+    --     rule has been locked, it can transition between the @locked@ and+    --     @unlocked@ states only; it can never transition back to @null@.+    lockState :: Prelude.Maybe LockState,+    -- | Information about the resource tags used to identify resources that are+    -- retained by the retention rule.+    resourceTags :: Prelude.Maybe [ResourceTag],+    -- | The resource type retained by the retention rule.+    resourceType :: Prelude.Maybe ResourceType,+    -- | Information about the retention period for which the retention rule is+    -- to retain resources.+    retentionPeriod :: Prelude.Maybe RetentionPeriod,+    -- | The state of the retention rule. Only retention rules that are in the+    -- @available@ state retain resources.+    status :: Prelude.Maybe RuleStatus,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRuleResponse' 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:+--+-- 'description', 'getRuleResponse_description' - The retention rule description.+--+-- 'identifier', 'getRuleResponse_identifier' - The unique ID of the retention rule.+--+-- 'lockConfiguration', 'getRuleResponse_lockConfiguration' - Information about the retention rule lock configuration.+--+-- 'lockEndTime', 'getRuleResponse_lockEndTime' - The date and time at which the unlock delay is set to expire. Only+-- returned for retention rules that have been unlocked and that are still+-- within the unlock delay period.+--+-- 'lockState', 'getRuleResponse_lockState' - The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+--+-- 'resourceTags', 'getRuleResponse_resourceTags' - Information about the resource tags used to identify resources that are+-- retained by the retention rule.+--+-- 'resourceType', 'getRuleResponse_resourceType' - The resource type retained by the retention rule.+--+-- 'retentionPeriod', 'getRuleResponse_retentionPeriod' - Information about the retention period for which the retention rule is+-- to retain resources.+--+-- 'status', 'getRuleResponse_status' - The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+--+-- 'httpStatus', 'getRuleResponse_httpStatus' - The response's http status code.+newGetRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetRuleResponse+newGetRuleResponse pHttpStatus_ =+  GetRuleResponse'+    { description = Prelude.Nothing,+      identifier = Prelude.Nothing,+      lockConfiguration = Prelude.Nothing,+      lockEndTime = Prelude.Nothing,+      lockState = Prelude.Nothing,+      resourceTags = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      retentionPeriod = Prelude.Nothing,+      status = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The retention rule description.+getRuleResponse_description :: Lens.Lens' GetRuleResponse (Prelude.Maybe Prelude.Text)+getRuleResponse_description = Lens.lens (\GetRuleResponse' {description} -> description) (\s@GetRuleResponse' {} a -> s {description = a} :: GetRuleResponse)++-- | The unique ID of the retention rule.+getRuleResponse_identifier :: Lens.Lens' GetRuleResponse (Prelude.Maybe Prelude.Text)+getRuleResponse_identifier = Lens.lens (\GetRuleResponse' {identifier} -> identifier) (\s@GetRuleResponse' {} a -> s {identifier = a} :: GetRuleResponse)++-- | Information about the retention rule lock configuration.+getRuleResponse_lockConfiguration :: Lens.Lens' GetRuleResponse (Prelude.Maybe LockConfiguration)+getRuleResponse_lockConfiguration = Lens.lens (\GetRuleResponse' {lockConfiguration} -> lockConfiguration) (\s@GetRuleResponse' {} a -> s {lockConfiguration = a} :: GetRuleResponse)++-- | The date and time at which the unlock delay is set to expire. Only+-- returned for retention rules that have been unlocked and that are still+-- within the unlock delay period.+getRuleResponse_lockEndTime :: Lens.Lens' GetRuleResponse (Prelude.Maybe Prelude.UTCTime)+getRuleResponse_lockEndTime = Lens.lens (\GetRuleResponse' {lockEndTime} -> lockEndTime) (\s@GetRuleResponse' {} a -> s {lockEndTime = a} :: GetRuleResponse) Prelude.. Lens.mapping Data._Time++-- | The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+getRuleResponse_lockState :: Lens.Lens' GetRuleResponse (Prelude.Maybe LockState)+getRuleResponse_lockState = Lens.lens (\GetRuleResponse' {lockState} -> lockState) (\s@GetRuleResponse' {} a -> s {lockState = a} :: GetRuleResponse)++-- | Information about the resource tags used to identify resources that are+-- retained by the retention rule.+getRuleResponse_resourceTags :: Lens.Lens' GetRuleResponse (Prelude.Maybe [ResourceTag])+getRuleResponse_resourceTags = Lens.lens (\GetRuleResponse' {resourceTags} -> resourceTags) (\s@GetRuleResponse' {} a -> s {resourceTags = a} :: GetRuleResponse) Prelude.. Lens.mapping Lens.coerced++-- | The resource type retained by the retention rule.+getRuleResponse_resourceType :: Lens.Lens' GetRuleResponse (Prelude.Maybe ResourceType)+getRuleResponse_resourceType = Lens.lens (\GetRuleResponse' {resourceType} -> resourceType) (\s@GetRuleResponse' {} a -> s {resourceType = a} :: GetRuleResponse)++-- | Information about the retention period for which the retention rule is+-- to retain resources.+getRuleResponse_retentionPeriod :: Lens.Lens' GetRuleResponse (Prelude.Maybe RetentionPeriod)+getRuleResponse_retentionPeriod = Lens.lens (\GetRuleResponse' {retentionPeriod} -> retentionPeriod) (\s@GetRuleResponse' {} a -> s {retentionPeriod = a} :: GetRuleResponse)++-- | The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+getRuleResponse_status :: Lens.Lens' GetRuleResponse (Prelude.Maybe RuleStatus)+getRuleResponse_status = Lens.lens (\GetRuleResponse' {status} -> status) (\s@GetRuleResponse' {} a -> s {status = a} :: GetRuleResponse)++-- | The response's http status code.+getRuleResponse_httpStatus :: Lens.Lens' GetRuleResponse Prelude.Int+getRuleResponse_httpStatus = Lens.lens (\GetRuleResponse' {httpStatus} -> httpStatus) (\s@GetRuleResponse' {} a -> s {httpStatus = a} :: GetRuleResponse)++instance Prelude.NFData GetRuleResponse where+  rnf GetRuleResponse' {..} =+    Prelude.rnf description+      `Prelude.seq` Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf lockConfiguration+      `Prelude.seq` Prelude.rnf lockEndTime+      `Prelude.seq` Prelude.rnf lockState+      `Prelude.seq` Prelude.rnf resourceTags+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RBin/Lens.hs view
@@ -0,0 +1,163 @@+{-# 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.RBin.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.RBin.Lens+  ( -- * Operations++    -- ** CreateRule+    createRule_description,+    createRule_lockConfiguration,+    createRule_resourceTags,+    createRule_tags,+    createRule_retentionPeriod,+    createRule_resourceType,+    createRuleResponse_description,+    createRuleResponse_identifier,+    createRuleResponse_lockConfiguration,+    createRuleResponse_lockState,+    createRuleResponse_resourceTags,+    createRuleResponse_resourceType,+    createRuleResponse_retentionPeriod,+    createRuleResponse_status,+    createRuleResponse_tags,+    createRuleResponse_httpStatus,++    -- ** DeleteRule+    deleteRule_identifier,+    deleteRuleResponse_httpStatus,++    -- ** GetRule+    getRule_identifier,+    getRuleResponse_description,+    getRuleResponse_identifier,+    getRuleResponse_lockConfiguration,+    getRuleResponse_lockEndTime,+    getRuleResponse_lockState,+    getRuleResponse_resourceTags,+    getRuleResponse_resourceType,+    getRuleResponse_retentionPeriod,+    getRuleResponse_status,+    getRuleResponse_httpStatus,++    -- ** ListRules+    listRules_lockState,+    listRules_maxResults,+    listRules_nextToken,+    listRules_resourceTags,+    listRules_resourceType,+    listRulesResponse_nextToken,+    listRulesResponse_rules,+    listRulesResponse_httpStatus,++    -- ** ListTagsForResource+    listTagsForResource_resourceArn,+    listTagsForResourceResponse_tags,+    listTagsForResourceResponse_httpStatus,++    -- ** LockRule+    lockRule_identifier,+    lockRule_lockConfiguration,+    lockRuleResponse_description,+    lockRuleResponse_identifier,+    lockRuleResponse_lockConfiguration,+    lockRuleResponse_lockState,+    lockRuleResponse_resourceTags,+    lockRuleResponse_resourceType,+    lockRuleResponse_retentionPeriod,+    lockRuleResponse_status,+    lockRuleResponse_httpStatus,++    -- ** TagResource+    tagResource_resourceArn,+    tagResource_tags,+    tagResourceResponse_httpStatus,++    -- ** UnlockRule+    unlockRule_identifier,+    unlockRuleResponse_description,+    unlockRuleResponse_identifier,+    unlockRuleResponse_lockConfiguration,+    unlockRuleResponse_lockEndTime,+    unlockRuleResponse_lockState,+    unlockRuleResponse_resourceTags,+    unlockRuleResponse_resourceType,+    unlockRuleResponse_retentionPeriod,+    unlockRuleResponse_status,+    unlockRuleResponse_httpStatus,++    -- ** UntagResource+    untagResource_resourceArn,+    untagResource_tagKeys,+    untagResourceResponse_httpStatus,++    -- ** UpdateRule+    updateRule_description,+    updateRule_resourceTags,+    updateRule_resourceType,+    updateRule_retentionPeriod,+    updateRule_identifier,+    updateRuleResponse_description,+    updateRuleResponse_identifier,+    updateRuleResponse_lockEndTime,+    updateRuleResponse_lockState,+    updateRuleResponse_resourceTags,+    updateRuleResponse_resourceType,+    updateRuleResponse_retentionPeriod,+    updateRuleResponse_status,+    updateRuleResponse_httpStatus,++    -- * Types++    -- ** LockConfiguration+    lockConfiguration_unlockDelay,++    -- ** ResourceTag+    resourceTag_resourceTagValue,+    resourceTag_resourceTagKey,++    -- ** RetentionPeriod+    retentionPeriod_retentionPeriodValue,+    retentionPeriod_retentionPeriodUnit,++    -- ** RuleSummary+    ruleSummary_description,+    ruleSummary_identifier,+    ruleSummary_lockState,+    ruleSummary_retentionPeriod,++    -- ** Tag+    tag_key,+    tag_value,++    -- ** UnlockDelay+    unlockDelay_unlockDelayValue,+    unlockDelay_unlockDelayUnit,+  )+where++import Amazonka.RBin.CreateRule+import Amazonka.RBin.DeleteRule+import Amazonka.RBin.GetRule+import Amazonka.RBin.ListRules+import Amazonka.RBin.ListTagsForResource+import Amazonka.RBin.LockRule+import Amazonka.RBin.TagResource+import Amazonka.RBin.Types.LockConfiguration+import Amazonka.RBin.Types.ResourceTag+import Amazonka.RBin.Types.RetentionPeriod+import Amazonka.RBin.Types.RuleSummary+import Amazonka.RBin.Types.Tag+import Amazonka.RBin.Types.UnlockDelay+import Amazonka.RBin.UnlockRule+import Amazonka.RBin.UntagResource+import Amazonka.RBin.UpdateRule
+ gen/Amazonka/RBin/ListRules.hs view
@@ -0,0 +1,281 @@+{-# 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.RBin.ListRules+-- 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 Recycle Bin retention rules in the Region.+--+-- This operation returns paginated results.+module Amazonka.RBin.ListRules+  ( -- * Creating a Request+    ListRules (..),+    newListRules,++    -- * Request Lenses+    listRules_lockState,+    listRules_maxResults,+    listRules_nextToken,+    listRules_resourceTags,+    listRules_resourceType,++    -- * Destructuring the Response+    ListRulesResponse (..),+    newListRulesResponse,++    -- * Response Lenses+    listRulesResponse_nextToken,+    listRulesResponse_rules,+    listRulesResponse_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.RBin.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListRules' smart constructor.+data ListRules = ListRules'+  { -- | The lock state of the retention rules to list. Only retention rules with+    -- the specified lock state are returned.+    lockState :: Prelude.Maybe LockState,+    -- | The maximum number of results to return with a single call. To retrieve+    -- the remaining results, make another call with the returned @NextToken@+    -- value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token for the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Information about the resource tags used to identify resources that are+    -- retained by the retention rule.+    resourceTags :: Prelude.Maybe [ResourceTag],+    -- | The resource type retained by the retention rule. Only retention rules+    -- that retain the specified resource type are listed. Currently, only+    -- Amazon EBS snapshots and EBS-backed AMIs are supported. To list+    -- retention rules that retain snapshots, specify @EBS_SNAPSHOT@. To list+    -- retention rules that retain EBS-backed AMIs, specify @EC2_IMAGE@.+    resourceType :: ResourceType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRules' 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:+--+-- 'lockState', 'listRules_lockState' - The lock state of the retention rules to list. Only retention rules with+-- the specified lock state are returned.+--+-- 'maxResults', 'listRules_maxResults' - The maximum number of results to return with a single call. To retrieve+-- the remaining results, make another call with the returned @NextToken@+-- value.+--+-- 'nextToken', 'listRules_nextToken' - The token for the next page of results.+--+-- 'resourceTags', 'listRules_resourceTags' - Information about the resource tags used to identify resources that are+-- retained by the retention rule.+--+-- 'resourceType', 'listRules_resourceType' - The resource type retained by the retention rule. Only retention rules+-- that retain the specified resource type are listed. Currently, only+-- Amazon EBS snapshots and EBS-backed AMIs are supported. To list+-- retention rules that retain snapshots, specify @EBS_SNAPSHOT@. To list+-- retention rules that retain EBS-backed AMIs, specify @EC2_IMAGE@.+newListRules ::+  -- | 'resourceType'+  ResourceType ->+  ListRules+newListRules pResourceType_ =+  ListRules'+    { lockState = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      resourceTags = Prelude.Nothing,+      resourceType = pResourceType_+    }++-- | The lock state of the retention rules to list. Only retention rules with+-- the specified lock state are returned.+listRules_lockState :: Lens.Lens' ListRules (Prelude.Maybe LockState)+listRules_lockState = Lens.lens (\ListRules' {lockState} -> lockState) (\s@ListRules' {} a -> s {lockState = a} :: ListRules)++-- | The maximum number of results to return with a single call. To retrieve+-- the remaining results, make another call with the returned @NextToken@+-- value.+listRules_maxResults :: Lens.Lens' ListRules (Prelude.Maybe Prelude.Natural)+listRules_maxResults = Lens.lens (\ListRules' {maxResults} -> maxResults) (\s@ListRules' {} a -> s {maxResults = a} :: ListRules)++-- | The token for the next page of results.+listRules_nextToken :: Lens.Lens' ListRules (Prelude.Maybe Prelude.Text)+listRules_nextToken = Lens.lens (\ListRules' {nextToken} -> nextToken) (\s@ListRules' {} a -> s {nextToken = a} :: ListRules)++-- | Information about the resource tags used to identify resources that are+-- retained by the retention rule.+listRules_resourceTags :: Lens.Lens' ListRules (Prelude.Maybe [ResourceTag])+listRules_resourceTags = Lens.lens (\ListRules' {resourceTags} -> resourceTags) (\s@ListRules' {} a -> s {resourceTags = a} :: ListRules) Prelude.. Lens.mapping Lens.coerced++-- | The resource type retained by the retention rule. Only retention rules+-- that retain the specified resource type are listed. Currently, only+-- Amazon EBS snapshots and EBS-backed AMIs are supported. To list+-- retention rules that retain snapshots, specify @EBS_SNAPSHOT@. To list+-- retention rules that retain EBS-backed AMIs, specify @EC2_IMAGE@.+listRules_resourceType :: Lens.Lens' ListRules ResourceType+listRules_resourceType = Lens.lens (\ListRules' {resourceType} -> resourceType) (\s@ListRules' {} a -> s {resourceType = a} :: ListRules)++instance Core.AWSPager ListRules where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listRulesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listRulesResponse_rules+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listRules_nextToken+          Lens..~ rs+          Lens.^? listRulesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListRules where+  type AWSResponse ListRules = ListRulesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListRulesResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> (x Data..?> "Rules" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListRules where+  hashWithSalt _salt ListRules' {..} =+    _salt+      `Prelude.hashWithSalt` lockState+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` resourceTags+      `Prelude.hashWithSalt` resourceType++instance Prelude.NFData ListRules where+  rnf ListRules' {..} =+    Prelude.rnf lockState+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceTags+      `Prelude.seq` Prelude.rnf resourceType++instance Data.ToHeaders ListRules where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListRules where+  toJSON ListRules' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("LockState" Data..=) Prelude.<$> lockState,+            ("MaxResults" Data..=) Prelude.<$> maxResults,+            ("NextToken" Data..=) Prelude.<$> nextToken,+            ("ResourceTags" Data..=) Prelude.<$> resourceTags,+            Prelude.Just ("ResourceType" Data..= resourceType)+          ]+      )++instance Data.ToPath ListRules where+  toPath = Prelude.const "/list-rules"++instance Data.ToQuery ListRules where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListRulesResponse' smart constructor.+data ListRulesResponse = ListRulesResponse'+  { -- | The token to use to retrieve the next page of results. This value is+    -- @null@ when there are no more results to return.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Information about the retention rules.+    rules :: Prelude.Maybe [RuleSummary],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRulesResponse' 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', 'listRulesResponse_nextToken' - The token to use to retrieve the next page of results. This value is+-- @null@ when there are no more results to return.+--+-- 'rules', 'listRulesResponse_rules' - Information about the retention rules.+--+-- 'httpStatus', 'listRulesResponse_httpStatus' - The response's http status code.+newListRulesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListRulesResponse+newListRulesResponse pHttpStatus_ =+  ListRulesResponse'+    { nextToken = Prelude.Nothing,+      rules = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The token to use to retrieve the next page of results. This value is+-- @null@ when there are no more results to return.+listRulesResponse_nextToken :: Lens.Lens' ListRulesResponse (Prelude.Maybe Prelude.Text)+listRulesResponse_nextToken = Lens.lens (\ListRulesResponse' {nextToken} -> nextToken) (\s@ListRulesResponse' {} a -> s {nextToken = a} :: ListRulesResponse)++-- | Information about the retention rules.+listRulesResponse_rules :: Lens.Lens' ListRulesResponse (Prelude.Maybe [RuleSummary])+listRulesResponse_rules = Lens.lens (\ListRulesResponse' {rules} -> rules) (\s@ListRulesResponse' {} a -> s {rules = a} :: ListRulesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listRulesResponse_httpStatus :: Lens.Lens' ListRulesResponse Prelude.Int+listRulesResponse_httpStatus = Lens.lens (\ListRulesResponse' {httpStatus} -> httpStatus) (\s@ListRulesResponse' {} a -> s {httpStatus = a} :: ListRulesResponse)++instance Prelude.NFData ListRulesResponse where+  rnf ListRulesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf rules+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RBin/ListTagsForResource.hs view
@@ -0,0 +1,159 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RBin.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 retention rule.+module Amazonka.RBin.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.RBin.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 retention rule.+    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 retention rule.+newListTagsForResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  ListTagsForResource+newListTagsForResource pResourceArn_ =+  ListTagsForResource' {resourceArn = pResourceArn_}++-- | The Amazon Resource Name (ARN) of the retention rule.+listTagsForResource_resourceArn :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_resourceArn = Lens.lens (\ListTagsForResource' {resourceArn} -> resourceArn) (\s@ListTagsForResource' {} a -> s {resourceArn = a} :: ListTagsForResource)++instance Core.AWSRequest ListTagsForResource where+  type+    AWSResponse ListTagsForResource =+      ListTagsForResourceResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListTagsForResourceResponse'+            Prelude.<$> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListTagsForResource where+  hashWithSalt _salt ListTagsForResource' {..} =+    _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTagsForResource where+  rnf ListTagsForResource' {..} =+    Prelude.rnf resourceArn++instance Data.ToHeaders ListTagsForResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath ListTagsForResource where+  toPath ListTagsForResource' {..} =+    Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery ListTagsForResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+  { -- | Information about the tags assigned to the retention rule.+    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' - Information about the tags assigned to the retention rule.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+  ListTagsForResourceResponse'+    { tags =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Information about the tags assigned to the retention rule.+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/RBin/LockRule.hs view
@@ -0,0 +1,315 @@+{-# 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.RBin.LockRule+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Locks a retention rule. A locked retention rule can\'t be modified or+-- deleted.+module Amazonka.RBin.LockRule+  ( -- * Creating a Request+    LockRule (..),+    newLockRule,++    -- * Request Lenses+    lockRule_identifier,+    lockRule_lockConfiguration,++    -- * Destructuring the Response+    LockRuleResponse (..),+    newLockRuleResponse,++    -- * Response Lenses+    lockRuleResponse_description,+    lockRuleResponse_identifier,+    lockRuleResponse_lockConfiguration,+    lockRuleResponse_lockState,+    lockRuleResponse_resourceTags,+    lockRuleResponse_resourceType,+    lockRuleResponse_retentionPeriod,+    lockRuleResponse_status,+    lockRuleResponse_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.RBin.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newLockRule' smart constructor.+data LockRule = LockRule'+  { -- | The unique ID of the retention rule.+    identifier :: Prelude.Text,+    -- | Information about the retention rule lock configuration.+    lockConfiguration :: LockConfiguration+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LockRule' 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:+--+-- 'identifier', 'lockRule_identifier' - The unique ID of the retention rule.+--+-- 'lockConfiguration', 'lockRule_lockConfiguration' - Information about the retention rule lock configuration.+newLockRule ::+  -- | 'identifier'+  Prelude.Text ->+  -- | 'lockConfiguration'+  LockConfiguration ->+  LockRule+newLockRule pIdentifier_ pLockConfiguration_ =+  LockRule'+    { identifier = pIdentifier_,+      lockConfiguration = pLockConfiguration_+    }++-- | The unique ID of the retention rule.+lockRule_identifier :: Lens.Lens' LockRule Prelude.Text+lockRule_identifier = Lens.lens (\LockRule' {identifier} -> identifier) (\s@LockRule' {} a -> s {identifier = a} :: LockRule)++-- | Information about the retention rule lock configuration.+lockRule_lockConfiguration :: Lens.Lens' LockRule LockConfiguration+lockRule_lockConfiguration = Lens.lens (\LockRule' {lockConfiguration} -> lockConfiguration) (\s@LockRule' {} a -> s {lockConfiguration = a} :: LockRule)++instance Core.AWSRequest LockRule where+  type AWSResponse LockRule = LockRuleResponse+  request overrides =+    Request.patchJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          LockRuleResponse'+            Prelude.<$> (x Data..?> "Description")+            Prelude.<*> (x Data..?> "Identifier")+            Prelude.<*> (x Data..?> "LockConfiguration")+            Prelude.<*> (x Data..?> "LockState")+            Prelude.<*> (x Data..?> "ResourceTags" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "ResourceType")+            Prelude.<*> (x Data..?> "RetentionPeriod")+            Prelude.<*> (x Data..?> "Status")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable LockRule where+  hashWithSalt _salt LockRule' {..} =+    _salt+      `Prelude.hashWithSalt` identifier+      `Prelude.hashWithSalt` lockConfiguration++instance Prelude.NFData LockRule where+  rnf LockRule' {..} =+    Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf lockConfiguration++instance Data.ToHeaders LockRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON LockRule where+  toJSON LockRule' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("LockConfiguration" Data..= lockConfiguration)+          ]+      )++instance Data.ToPath LockRule where+  toPath LockRule' {..} =+    Prelude.mconcat+      ["/rules/", Data.toBS identifier, "/lock"]++instance Data.ToQuery LockRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newLockRuleResponse' smart constructor.+data LockRuleResponse = LockRuleResponse'+  { -- | The retention rule description.+    description :: Prelude.Maybe Prelude.Text,+    -- | The unique ID of the retention rule.+    identifier :: Prelude.Maybe Prelude.Text,+    -- | Information about the retention rule lock configuration.+    lockConfiguration :: Prelude.Maybe LockConfiguration,+    -- | The lock state for the retention rule.+    --+    -- -   @locked@ - The retention rule is locked and can\'t be modified or+    --     deleted.+    --+    -- -   @pending_unlock@ - The retention rule has been unlocked but it is+    --     still within the unlock delay period. The retention rule can be+    --     modified or deleted only after the unlock delay period has expired.+    --+    -- -   @unlocked@ - The retention rule is unlocked and it can be modified+    --     or deleted by any user with the required permissions.+    --+    -- -   @null@ - The retention rule has never been locked. Once a retention+    --     rule has been locked, it can transition between the @locked@ and+    --     @unlocked@ states only; it can never transition back to @null@.+    lockState :: Prelude.Maybe LockState,+    -- | Information about the resource tags used to identify resources that are+    -- retained by the retention rule.+    resourceTags :: Prelude.Maybe [ResourceTag],+    -- | The resource type retained by the retention rule.+    resourceType :: Prelude.Maybe ResourceType,+    retentionPeriod :: Prelude.Maybe RetentionPeriod,+    -- | The state of the retention rule. Only retention rules that are in the+    -- @available@ state retain resources.+    status :: Prelude.Maybe RuleStatus,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LockRuleResponse' 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:+--+-- 'description', 'lockRuleResponse_description' - The retention rule description.+--+-- 'identifier', 'lockRuleResponse_identifier' - The unique ID of the retention rule.+--+-- 'lockConfiguration', 'lockRuleResponse_lockConfiguration' - Information about the retention rule lock configuration.+--+-- 'lockState', 'lockRuleResponse_lockState' - The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+--+-- 'resourceTags', 'lockRuleResponse_resourceTags' - Information about the resource tags used to identify resources that are+-- retained by the retention rule.+--+-- 'resourceType', 'lockRuleResponse_resourceType' - The resource type retained by the retention rule.+--+-- 'retentionPeriod', 'lockRuleResponse_retentionPeriod' - Undocumented member.+--+-- 'status', 'lockRuleResponse_status' - The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+--+-- 'httpStatus', 'lockRuleResponse_httpStatus' - The response's http status code.+newLockRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  LockRuleResponse+newLockRuleResponse pHttpStatus_ =+  LockRuleResponse'+    { description = Prelude.Nothing,+      identifier = Prelude.Nothing,+      lockConfiguration = Prelude.Nothing,+      lockState = Prelude.Nothing,+      resourceTags = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      retentionPeriod = Prelude.Nothing,+      status = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The retention rule description.+lockRuleResponse_description :: Lens.Lens' LockRuleResponse (Prelude.Maybe Prelude.Text)+lockRuleResponse_description = Lens.lens (\LockRuleResponse' {description} -> description) (\s@LockRuleResponse' {} a -> s {description = a} :: LockRuleResponse)++-- | The unique ID of the retention rule.+lockRuleResponse_identifier :: Lens.Lens' LockRuleResponse (Prelude.Maybe Prelude.Text)+lockRuleResponse_identifier = Lens.lens (\LockRuleResponse' {identifier} -> identifier) (\s@LockRuleResponse' {} a -> s {identifier = a} :: LockRuleResponse)++-- | Information about the retention rule lock configuration.+lockRuleResponse_lockConfiguration :: Lens.Lens' LockRuleResponse (Prelude.Maybe LockConfiguration)+lockRuleResponse_lockConfiguration = Lens.lens (\LockRuleResponse' {lockConfiguration} -> lockConfiguration) (\s@LockRuleResponse' {} a -> s {lockConfiguration = a} :: LockRuleResponse)++-- | The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+lockRuleResponse_lockState :: Lens.Lens' LockRuleResponse (Prelude.Maybe LockState)+lockRuleResponse_lockState = Lens.lens (\LockRuleResponse' {lockState} -> lockState) (\s@LockRuleResponse' {} a -> s {lockState = a} :: LockRuleResponse)++-- | Information about the resource tags used to identify resources that are+-- retained by the retention rule.+lockRuleResponse_resourceTags :: Lens.Lens' LockRuleResponse (Prelude.Maybe [ResourceTag])+lockRuleResponse_resourceTags = Lens.lens (\LockRuleResponse' {resourceTags} -> resourceTags) (\s@LockRuleResponse' {} a -> s {resourceTags = a} :: LockRuleResponse) Prelude.. Lens.mapping Lens.coerced++-- | The resource type retained by the retention rule.+lockRuleResponse_resourceType :: Lens.Lens' LockRuleResponse (Prelude.Maybe ResourceType)+lockRuleResponse_resourceType = Lens.lens (\LockRuleResponse' {resourceType} -> resourceType) (\s@LockRuleResponse' {} a -> s {resourceType = a} :: LockRuleResponse)++-- | Undocumented member.+lockRuleResponse_retentionPeriod :: Lens.Lens' LockRuleResponse (Prelude.Maybe RetentionPeriod)+lockRuleResponse_retentionPeriod = Lens.lens (\LockRuleResponse' {retentionPeriod} -> retentionPeriod) (\s@LockRuleResponse' {} a -> s {retentionPeriod = a} :: LockRuleResponse)++-- | The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+lockRuleResponse_status :: Lens.Lens' LockRuleResponse (Prelude.Maybe RuleStatus)+lockRuleResponse_status = Lens.lens (\LockRuleResponse' {status} -> status) (\s@LockRuleResponse' {} a -> s {status = a} :: LockRuleResponse)++-- | The response's http status code.+lockRuleResponse_httpStatus :: Lens.Lens' LockRuleResponse Prelude.Int+lockRuleResponse_httpStatus = Lens.lens (\LockRuleResponse' {httpStatus} -> httpStatus) (\s@LockRuleResponse' {} a -> s {httpStatus = a} :: LockRuleResponse)++instance Prelude.NFData LockRuleResponse where+  rnf LockRuleResponse' {..} =+    Prelude.rnf description+      `Prelude.seq` Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf lockConfiguration+      `Prelude.seq` Prelude.rnf lockState+      `Prelude.seq` Prelude.rnf resourceTags+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RBin/TagResource.hs view
@@ -0,0 +1,163 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RBin.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 tags to the specified retention rule.+module Amazonka.RBin.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.RBin.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 retention rule.+    resourceArn :: Prelude.Text,+    -- | Information about the tags to assign to the retention rule.+    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 retention rule.+--+-- 'tags', 'tagResource_tags' - Information about the tags to assign to the retention rule.+newTagResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  TagResource+newTagResource pResourceArn_ =+  TagResource'+    { resourceArn = pResourceArn_,+      tags = Prelude.mempty+    }++-- | The Amazon Resource Name (ARN) of the retention rule.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | Information about the tags to assign to the retention rule.+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+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON TagResource where+  toJSON TagResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("Tags" Data..= tags)]+      )++instance Data.ToPath TagResource where+  toPath TagResource' {..} =+    Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery TagResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'tagResourceResponse_httpStatus' - The response's http status code.+newTagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  TagResourceResponse+newTagResourceResponse pHttpStatus_ =+  TagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+tagResourceResponse_httpStatus :: Lens.Lens' TagResourceResponse Prelude.Int+tagResourceResponse_httpStatus = Lens.lens (\TagResourceResponse' {httpStatus} -> httpStatus) (\s@TagResourceResponse' {} a -> s {httpStatus = a} :: TagResourceResponse)++instance Prelude.NFData TagResourceResponse where+  rnf TagResourceResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/RBin/Types.hs view
@@ -0,0 +1,206 @@+{-# 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.RBin.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.RBin.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _ConflictException,+    _InternalServerException,+    _ResourceNotFoundException,+    _ServiceQuotaExceededException,+    _ValidationException,++    -- * LockState+    LockState (..),++    -- * ResourceType+    ResourceType (..),++    -- * RetentionPeriodUnit+    RetentionPeriodUnit (..),++    -- * RuleStatus+    RuleStatus (..),++    -- * UnlockDelayUnit+    UnlockDelayUnit (..),++    -- * LockConfiguration+    LockConfiguration (..),+    newLockConfiguration,+    lockConfiguration_unlockDelay,++    -- * ResourceTag+    ResourceTag (..),+    newResourceTag,+    resourceTag_resourceTagValue,+    resourceTag_resourceTagKey,++    -- * RetentionPeriod+    RetentionPeriod (..),+    newRetentionPeriod,+    retentionPeriod_retentionPeriodValue,+    retentionPeriod_retentionPeriodUnit,++    -- * RuleSummary+    RuleSummary (..),+    newRuleSummary,+    ruleSummary_description,+    ruleSummary_identifier,+    ruleSummary_lockState,+    ruleSummary_retentionPeriod,++    -- * Tag+    Tag (..),+    newTag,+    tag_key,+    tag_value,++    -- * UnlockDelay+    UnlockDelay (..),+    newUnlockDelay,+    unlockDelay_unlockDelayValue,+    unlockDelay_unlockDelayUnit,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import Amazonka.RBin.Types.LockConfiguration+import Amazonka.RBin.Types.LockState+import Amazonka.RBin.Types.ResourceTag+import Amazonka.RBin.Types.ResourceType+import Amazonka.RBin.Types.RetentionPeriod+import Amazonka.RBin.Types.RetentionPeriodUnit+import Amazonka.RBin.Types.RuleStatus+import Amazonka.RBin.Types.RuleSummary+import Amazonka.RBin.Types.Tag+import Amazonka.RBin.Types.UnlockDelay+import Amazonka.RBin.Types.UnlockDelayUnit+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2021-06-15@ of the Amazon Recycle Bin SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "RBin",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "rbin",+      Core.signingName = "rbin",+      Core.version = "2021-06-15",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseJSONError "RBin",+      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++-- | The specified retention rule lock request can\'t be completed.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+  Core._MatchServiceError+    defaultService+    "ConflictException"+    Prelude.. Core.hasStatus 409++-- | The service could not respond to the request due to an internal problem.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+  Core._MatchServiceError+    defaultService+    "InternalServerException"+    Prelude.. Core.hasStatus 500++-- | The specified resource was not found.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceNotFoundException"+    Prelude.. Core.hasStatus 404++-- | The request would cause a service quota for the number of tags per+-- resource to be exceeded.+_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+  Core._MatchServiceError+    defaultService+    "ServiceQuotaExceededException"+    Prelude.. Core.hasStatus 402++-- | One or more of the parameters in the request is not valid.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+  Core._MatchServiceError+    defaultService+    "ValidationException"+    Prelude.. Core.hasStatus 400
+ gen/Amazonka/RBin/Types/LockConfiguration.hs view
@@ -0,0 +1,78 @@+{-# 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.RBin.Types.LockConfiguration+-- 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.RBin.Types.LockConfiguration 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.RBin.Types.UnlockDelay++-- | Information about a retention rule lock configuration.+--+-- /See:/ 'newLockConfiguration' smart constructor.+data LockConfiguration = LockConfiguration'+  { -- | Information about the retention rule unlock delay.+    unlockDelay :: UnlockDelay+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LockConfiguration' 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:+--+-- 'unlockDelay', 'lockConfiguration_unlockDelay' - Information about the retention rule unlock delay.+newLockConfiguration ::+  -- | 'unlockDelay'+  UnlockDelay ->+  LockConfiguration+newLockConfiguration pUnlockDelay_ =+  LockConfiguration' {unlockDelay = pUnlockDelay_}++-- | Information about the retention rule unlock delay.+lockConfiguration_unlockDelay :: Lens.Lens' LockConfiguration UnlockDelay+lockConfiguration_unlockDelay = Lens.lens (\LockConfiguration' {unlockDelay} -> unlockDelay) (\s@LockConfiguration' {} a -> s {unlockDelay = a} :: LockConfiguration)++instance Data.FromJSON LockConfiguration where+  parseJSON =+    Data.withObject+      "LockConfiguration"+      ( \x ->+          LockConfiguration'+            Prelude.<$> (x Data..: "UnlockDelay")+      )++instance Prelude.Hashable LockConfiguration where+  hashWithSalt _salt LockConfiguration' {..} =+    _salt `Prelude.hashWithSalt` unlockDelay++instance Prelude.NFData LockConfiguration where+  rnf LockConfiguration' {..} = Prelude.rnf unlockDelay++instance Data.ToJSON LockConfiguration where+  toJSON LockConfiguration' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("UnlockDelay" Data..= unlockDelay)]+      )
+ gen/Amazonka/RBin/Types/LockState.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.RBin.Types.LockState+-- 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.RBin.Types.LockState+  ( LockState+      ( ..,+        LockState_Locked,+        LockState_Pending_unlock,+        LockState_Unlocked+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LockState = LockState'+  { fromLockState ::+      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 LockState_Locked :: LockState+pattern LockState_Locked = LockState' "locked"++pattern LockState_Pending_unlock :: LockState+pattern LockState_Pending_unlock = LockState' "pending_unlock"++pattern LockState_Unlocked :: LockState+pattern LockState_Unlocked = LockState' "unlocked"++{-# COMPLETE+  LockState_Locked,+  LockState_Pending_unlock,+  LockState_Unlocked,+  LockState'+  #-}
+ gen/Amazonka/RBin/Types/ResourceTag.hs view
@@ -0,0 +1,98 @@+{-# 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.RBin.Types.ResourceTag+-- 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.RBin.Types.ResourceTag where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information about the resource tags used to identify resources that are+-- retained by the retention rule.+--+-- /See:/ 'newResourceTag' smart constructor.+data ResourceTag = ResourceTag'+  { -- | The tag value.+    resourceTagValue :: Prelude.Maybe Prelude.Text,+    -- | The tag key.+    resourceTagKey :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceTag' 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:+--+-- 'resourceTagValue', 'resourceTag_resourceTagValue' - The tag value.+--+-- 'resourceTagKey', 'resourceTag_resourceTagKey' - The tag key.+newResourceTag ::+  -- | 'resourceTagKey'+  Prelude.Text ->+  ResourceTag+newResourceTag pResourceTagKey_ =+  ResourceTag'+    { resourceTagValue = Prelude.Nothing,+      resourceTagKey = pResourceTagKey_+    }++-- | The tag value.+resourceTag_resourceTagValue :: Lens.Lens' ResourceTag (Prelude.Maybe Prelude.Text)+resourceTag_resourceTagValue = Lens.lens (\ResourceTag' {resourceTagValue} -> resourceTagValue) (\s@ResourceTag' {} a -> s {resourceTagValue = a} :: ResourceTag)++-- | The tag key.+resourceTag_resourceTagKey :: Lens.Lens' ResourceTag Prelude.Text+resourceTag_resourceTagKey = Lens.lens (\ResourceTag' {resourceTagKey} -> resourceTagKey) (\s@ResourceTag' {} a -> s {resourceTagKey = a} :: ResourceTag)++instance Data.FromJSON ResourceTag where+  parseJSON =+    Data.withObject+      "ResourceTag"+      ( \x ->+          ResourceTag'+            Prelude.<$> (x Data..:? "ResourceTagValue")+            Prelude.<*> (x Data..: "ResourceTagKey")+      )++instance Prelude.Hashable ResourceTag where+  hashWithSalt _salt ResourceTag' {..} =+    _salt+      `Prelude.hashWithSalt` resourceTagValue+      `Prelude.hashWithSalt` resourceTagKey++instance Prelude.NFData ResourceTag where+  rnf ResourceTag' {..} =+    Prelude.rnf resourceTagValue+      `Prelude.seq` Prelude.rnf resourceTagKey++instance Data.ToJSON ResourceTag where+  toJSON ResourceTag' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ResourceTagValue" Data..=)+              Prelude.<$> resourceTagValue,+            Prelude.Just+              ("ResourceTagKey" Data..= resourceTagKey)+          ]+      )
+ gen/Amazonka/RBin/Types/ResourceType.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.RBin.Types.ResourceType+-- 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.RBin.Types.ResourceType+  ( ResourceType+      ( ..,+        ResourceType_EBS_SNAPSHOT,+        ResourceType_EC2_IMAGE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceType = ResourceType'+  { fromResourceType ::+      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 ResourceType_EBS_SNAPSHOT :: ResourceType+pattern ResourceType_EBS_SNAPSHOT = ResourceType' "EBS_SNAPSHOT"++pattern ResourceType_EC2_IMAGE :: ResourceType+pattern ResourceType_EC2_IMAGE = ResourceType' "EC2_IMAGE"++{-# COMPLETE+  ResourceType_EBS_SNAPSHOT,+  ResourceType_EC2_IMAGE,+  ResourceType'+  #-}
+ gen/Amazonka/RBin/Types/RetentionPeriod.hs view
@@ -0,0 +1,115 @@+{-# 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.RBin.Types.RetentionPeriod+-- 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.RBin.Types.RetentionPeriod 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.RBin.Types.RetentionPeriodUnit++-- | Information about the retention period for which the retention rule is+-- to retain resources.+--+-- /See:/ 'newRetentionPeriod' smart constructor.+data RetentionPeriod = RetentionPeriod'+  { -- | The period value for which the retention rule is to retain resources.+    -- The period is measured using the unit specified for+    -- __RetentionPeriodUnit__.+    retentionPeriodValue :: Prelude.Natural,+    -- | The unit of time in which the retention period is measured. Currently,+    -- only @DAYS@ is supported.+    retentionPeriodUnit :: RetentionPeriodUnit+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RetentionPeriod' 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:+--+-- 'retentionPeriodValue', 'retentionPeriod_retentionPeriodValue' - The period value for which the retention rule is to retain resources.+-- The period is measured using the unit specified for+-- __RetentionPeriodUnit__.+--+-- 'retentionPeriodUnit', 'retentionPeriod_retentionPeriodUnit' - The unit of time in which the retention period is measured. Currently,+-- only @DAYS@ is supported.+newRetentionPeriod ::+  -- | 'retentionPeriodValue'+  Prelude.Natural ->+  -- | 'retentionPeriodUnit'+  RetentionPeriodUnit ->+  RetentionPeriod+newRetentionPeriod+  pRetentionPeriodValue_+  pRetentionPeriodUnit_ =+    RetentionPeriod'+      { retentionPeriodValue =+          pRetentionPeriodValue_,+        retentionPeriodUnit = pRetentionPeriodUnit_+      }++-- | The period value for which the retention rule is to retain resources.+-- The period is measured using the unit specified for+-- __RetentionPeriodUnit__.+retentionPeriod_retentionPeriodValue :: Lens.Lens' RetentionPeriod Prelude.Natural+retentionPeriod_retentionPeriodValue = Lens.lens (\RetentionPeriod' {retentionPeriodValue} -> retentionPeriodValue) (\s@RetentionPeriod' {} a -> s {retentionPeriodValue = a} :: RetentionPeriod)++-- | The unit of time in which the retention period is measured. Currently,+-- only @DAYS@ is supported.+retentionPeriod_retentionPeriodUnit :: Lens.Lens' RetentionPeriod RetentionPeriodUnit+retentionPeriod_retentionPeriodUnit = Lens.lens (\RetentionPeriod' {retentionPeriodUnit} -> retentionPeriodUnit) (\s@RetentionPeriod' {} a -> s {retentionPeriodUnit = a} :: RetentionPeriod)++instance Data.FromJSON RetentionPeriod where+  parseJSON =+    Data.withObject+      "RetentionPeriod"+      ( \x ->+          RetentionPeriod'+            Prelude.<$> (x Data..: "RetentionPeriodValue")+            Prelude.<*> (x Data..: "RetentionPeriodUnit")+      )++instance Prelude.Hashable RetentionPeriod where+  hashWithSalt _salt RetentionPeriod' {..} =+    _salt+      `Prelude.hashWithSalt` retentionPeriodValue+      `Prelude.hashWithSalt` retentionPeriodUnit++instance Prelude.NFData RetentionPeriod where+  rnf RetentionPeriod' {..} =+    Prelude.rnf retentionPeriodValue+      `Prelude.seq` Prelude.rnf retentionPeriodUnit++instance Data.ToJSON RetentionPeriod where+  toJSON RetentionPeriod' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ( "RetentionPeriodValue"+                  Data..= retentionPeriodValue+              ),+            Prelude.Just+              ("RetentionPeriodUnit" Data..= retentionPeriodUnit)+          ]+      )
+ gen/Amazonka/RBin/Types/RetentionPeriodUnit.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RBin.Types.RetentionPeriodUnit+-- 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.RBin.Types.RetentionPeriodUnit+  ( RetentionPeriodUnit+      ( ..,+        RetentionPeriodUnit_DAYS+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RetentionPeriodUnit = RetentionPeriodUnit'+  { fromRetentionPeriodUnit ::+      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 RetentionPeriodUnit_DAYS :: RetentionPeriodUnit+pattern RetentionPeriodUnit_DAYS = RetentionPeriodUnit' "DAYS"++{-# COMPLETE+  RetentionPeriodUnit_DAYS,+  RetentionPeriodUnit'+  #-}
+ gen/Amazonka/RBin/Types/RuleStatus.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.RBin.Types.RuleStatus+-- 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.RBin.Types.RuleStatus+  ( RuleStatus+      ( ..,+        RuleStatus_Available,+        RuleStatus_Pending+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RuleStatus = RuleStatus'+  { fromRuleStatus ::+      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 RuleStatus_Available :: RuleStatus+pattern RuleStatus_Available = RuleStatus' "available"++pattern RuleStatus_Pending :: RuleStatus+pattern RuleStatus_Pending = RuleStatus' "pending"++{-# COMPLETE+  RuleStatus_Available,+  RuleStatus_Pending,+  RuleStatus'+  #-}
+ gen/Amazonka/RBin/Types/RuleSummary.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RBin.Types.RuleSummary+-- 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.RBin.Types.RuleSummary 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.RBin.Types.LockState+import Amazonka.RBin.Types.RetentionPeriod++-- | Information about a Recycle Bin retention rule.+--+-- /See:/ 'newRuleSummary' smart constructor.+data RuleSummary = RuleSummary'+  { -- | The retention rule description.+    description :: Prelude.Maybe Prelude.Text,+    -- | The unique ID of the retention rule.+    identifier :: Prelude.Maybe Prelude.Text,+    -- | The lock state for the retention rule.+    --+    -- -   @locked@ - The retention rule is locked and can\'t be modified or+    --     deleted.+    --+    -- -   @pending_unlock@ - The retention rule has been unlocked but it is+    --     still within the unlock delay period. The retention rule can be+    --     modified or deleted only after the unlock delay period has expired.+    --+    -- -   @unlocked@ - The retention rule is unlocked and it can be modified+    --     or deleted by any user with the required permissions.+    --+    -- -   @null@ - The retention rule has never been locked. Once a retention+    --     rule has been locked, it can transition between the @locked@ and+    --     @unlocked@ states only; it can never transition back to @null@.+    lockState :: Prelude.Maybe LockState,+    -- | Information about the retention period for which the retention rule is+    -- to retain resources.+    retentionPeriod :: Prelude.Maybe RetentionPeriod+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RuleSummary' 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:+--+-- 'description', 'ruleSummary_description' - The retention rule description.+--+-- 'identifier', 'ruleSummary_identifier' - The unique ID of the retention rule.+--+-- 'lockState', 'ruleSummary_lockState' - The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+--+-- 'retentionPeriod', 'ruleSummary_retentionPeriod' - Information about the retention period for which the retention rule is+-- to retain resources.+newRuleSummary ::+  RuleSummary+newRuleSummary =+  RuleSummary'+    { description = Prelude.Nothing,+      identifier = Prelude.Nothing,+      lockState = Prelude.Nothing,+      retentionPeriod = Prelude.Nothing+    }++-- | The retention rule description.+ruleSummary_description :: Lens.Lens' RuleSummary (Prelude.Maybe Prelude.Text)+ruleSummary_description = Lens.lens (\RuleSummary' {description} -> description) (\s@RuleSummary' {} a -> s {description = a} :: RuleSummary)++-- | The unique ID of the retention rule.+ruleSummary_identifier :: Lens.Lens' RuleSummary (Prelude.Maybe Prelude.Text)+ruleSummary_identifier = Lens.lens (\RuleSummary' {identifier} -> identifier) (\s@RuleSummary' {} a -> s {identifier = a} :: RuleSummary)++-- | The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+ruleSummary_lockState :: Lens.Lens' RuleSummary (Prelude.Maybe LockState)+ruleSummary_lockState = Lens.lens (\RuleSummary' {lockState} -> lockState) (\s@RuleSummary' {} a -> s {lockState = a} :: RuleSummary)++-- | Information about the retention period for which the retention rule is+-- to retain resources.+ruleSummary_retentionPeriod :: Lens.Lens' RuleSummary (Prelude.Maybe RetentionPeriod)+ruleSummary_retentionPeriod = Lens.lens (\RuleSummary' {retentionPeriod} -> retentionPeriod) (\s@RuleSummary' {} a -> s {retentionPeriod = a} :: RuleSummary)++instance Data.FromJSON RuleSummary where+  parseJSON =+    Data.withObject+      "RuleSummary"+      ( \x ->+          RuleSummary'+            Prelude.<$> (x Data..:? "Description")+            Prelude.<*> (x Data..:? "Identifier")+            Prelude.<*> (x Data..:? "LockState")+            Prelude.<*> (x Data..:? "RetentionPeriod")+      )++instance Prelude.Hashable RuleSummary where+  hashWithSalt _salt RuleSummary' {..} =+    _salt+      `Prelude.hashWithSalt` description+      `Prelude.hashWithSalt` identifier+      `Prelude.hashWithSalt` lockState+      `Prelude.hashWithSalt` retentionPeriod++instance Prelude.NFData RuleSummary where+  rnf RuleSummary' {..} =+    Prelude.rnf description+      `Prelude.seq` Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf lockState+      `Prelude.seq` Prelude.rnf retentionPeriod
+ gen/Amazonka/RBin/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.RBin.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.RBin.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++-- | Information about the tags to assign to the retention rule.+--+-- /See:/ 'newTag' smart constructor.+data Tag = Tag'+  { -- | The tag key.+    key :: Prelude.Text,+    -- | The tag value.+    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 tag key.+--+-- 'value', 'tag_value' - The tag value.+newTag ::+  -- | 'key'+  Prelude.Text ->+  -- | 'value'+  Prelude.Text ->+  Tag+newTag pKey_ pValue_ =+  Tag' {key = pKey_, value = pValue_}++-- | The tag key.+tag_key :: Lens.Lens' Tag Prelude.Text+tag_key = Lens.lens (\Tag' {key} -> key) (\s@Tag' {} a -> s {key = a} :: Tag)++-- | The tag value.+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/RBin/Types/UnlockDelay.hs view
@@ -0,0 +1,109 @@+{-# 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.RBin.Types.UnlockDelay+-- 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.RBin.Types.UnlockDelay 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.RBin.Types.UnlockDelayUnit++-- | Information about the retention rule unlock delay. The unlock delay is+-- the period after which a retention rule can be modified or edited after+-- it has been unlocked by a user with the required permissions. The+-- retention rule can\'t be modified or deleted during the unlock delay.+--+-- /See:/ 'newUnlockDelay' smart constructor.+data UnlockDelay = UnlockDelay'+  { -- | The unlock delay period, measured in the unit specified for+    -- __UnlockDelayUnit__.+    unlockDelayValue :: Prelude.Natural,+    -- | The unit of time in which to measure the unlock delay. Currently, the+    -- unlock delay can be measure only in days.+    unlockDelayUnit :: UnlockDelayUnit+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UnlockDelay' 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:+--+-- 'unlockDelayValue', 'unlockDelay_unlockDelayValue' - The unlock delay period, measured in the unit specified for+-- __UnlockDelayUnit__.+--+-- 'unlockDelayUnit', 'unlockDelay_unlockDelayUnit' - The unit of time in which to measure the unlock delay. Currently, the+-- unlock delay can be measure only in days.+newUnlockDelay ::+  -- | 'unlockDelayValue'+  Prelude.Natural ->+  -- | 'unlockDelayUnit'+  UnlockDelayUnit ->+  UnlockDelay+newUnlockDelay pUnlockDelayValue_ pUnlockDelayUnit_ =+  UnlockDelay'+    { unlockDelayValue = pUnlockDelayValue_,+      unlockDelayUnit = pUnlockDelayUnit_+    }++-- | The unlock delay period, measured in the unit specified for+-- __UnlockDelayUnit__.+unlockDelay_unlockDelayValue :: Lens.Lens' UnlockDelay Prelude.Natural+unlockDelay_unlockDelayValue = Lens.lens (\UnlockDelay' {unlockDelayValue} -> unlockDelayValue) (\s@UnlockDelay' {} a -> s {unlockDelayValue = a} :: UnlockDelay)++-- | The unit of time in which to measure the unlock delay. Currently, the+-- unlock delay can be measure only in days.+unlockDelay_unlockDelayUnit :: Lens.Lens' UnlockDelay UnlockDelayUnit+unlockDelay_unlockDelayUnit = Lens.lens (\UnlockDelay' {unlockDelayUnit} -> unlockDelayUnit) (\s@UnlockDelay' {} a -> s {unlockDelayUnit = a} :: UnlockDelay)++instance Data.FromJSON UnlockDelay where+  parseJSON =+    Data.withObject+      "UnlockDelay"+      ( \x ->+          UnlockDelay'+            Prelude.<$> (x Data..: "UnlockDelayValue")+            Prelude.<*> (x Data..: "UnlockDelayUnit")+      )++instance Prelude.Hashable UnlockDelay where+  hashWithSalt _salt UnlockDelay' {..} =+    _salt+      `Prelude.hashWithSalt` unlockDelayValue+      `Prelude.hashWithSalt` unlockDelayUnit++instance Prelude.NFData UnlockDelay where+  rnf UnlockDelay' {..} =+    Prelude.rnf unlockDelayValue+      `Prelude.seq` Prelude.rnf unlockDelayUnit++instance Data.ToJSON UnlockDelay where+  toJSON UnlockDelay' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("UnlockDelayValue" Data..= unlockDelayValue),+            Prelude.Just+              ("UnlockDelayUnit" Data..= unlockDelayUnit)+          ]+      )
+ gen/Amazonka/RBin/Types/UnlockDelayUnit.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RBin.Types.UnlockDelayUnit+-- 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.RBin.Types.UnlockDelayUnit+  ( UnlockDelayUnit+      ( ..,+        UnlockDelayUnit_DAYS+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype UnlockDelayUnit = UnlockDelayUnit'+  { fromUnlockDelayUnit ::+      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 UnlockDelayUnit_DAYS :: UnlockDelayUnit+pattern UnlockDelayUnit_DAYS = UnlockDelayUnit' "DAYS"++{-# COMPLETE+  UnlockDelayUnit_DAYS,+  UnlockDelayUnit'+  #-}
+ gen/Amazonka/RBin/UnlockRule.hs view
@@ -0,0 +1,309 @@+{-# 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.RBin.UnlockRule+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Unlocks a retention rule. After a retention rule is unlocked, it can be+-- modified or deleted only after the unlock delay period expires.+module Amazonka.RBin.UnlockRule+  ( -- * Creating a Request+    UnlockRule (..),+    newUnlockRule,++    -- * Request Lenses+    unlockRule_identifier,++    -- * Destructuring the Response+    UnlockRuleResponse (..),+    newUnlockRuleResponse,++    -- * Response Lenses+    unlockRuleResponse_description,+    unlockRuleResponse_identifier,+    unlockRuleResponse_lockConfiguration,+    unlockRuleResponse_lockEndTime,+    unlockRuleResponse_lockState,+    unlockRuleResponse_resourceTags,+    unlockRuleResponse_resourceType,+    unlockRuleResponse_retentionPeriod,+    unlockRuleResponse_status,+    unlockRuleResponse_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.RBin.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUnlockRule' smart constructor.+data UnlockRule = UnlockRule'+  { -- | The unique ID of the retention rule.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UnlockRule' 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:+--+-- 'identifier', 'unlockRule_identifier' - The unique ID of the retention rule.+newUnlockRule ::+  -- | 'identifier'+  Prelude.Text ->+  UnlockRule+newUnlockRule pIdentifier_ =+  UnlockRule' {identifier = pIdentifier_}++-- | The unique ID of the retention rule.+unlockRule_identifier :: Lens.Lens' UnlockRule Prelude.Text+unlockRule_identifier = Lens.lens (\UnlockRule' {identifier} -> identifier) (\s@UnlockRule' {} a -> s {identifier = a} :: UnlockRule)++instance Core.AWSRequest UnlockRule where+  type AWSResponse UnlockRule = UnlockRuleResponse+  request overrides =+    Request.patchJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UnlockRuleResponse'+            Prelude.<$> (x Data..?> "Description")+            Prelude.<*> (x Data..?> "Identifier")+            Prelude.<*> (x Data..?> "LockConfiguration")+            Prelude.<*> (x Data..?> "LockEndTime")+            Prelude.<*> (x Data..?> "LockState")+            Prelude.<*> (x Data..?> "ResourceTags" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "ResourceType")+            Prelude.<*> (x Data..?> "RetentionPeriod")+            Prelude.<*> (x Data..?> "Status")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UnlockRule where+  hashWithSalt _salt UnlockRule' {..} =+    _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData UnlockRule where+  rnf UnlockRule' {..} = Prelude.rnf identifier++instance Data.ToHeaders UnlockRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UnlockRule where+  toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath UnlockRule where+  toPath UnlockRule' {..} =+    Prelude.mconcat+      ["/rules/", Data.toBS identifier, "/unlock"]++instance Data.ToQuery UnlockRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUnlockRuleResponse' smart constructor.+data UnlockRuleResponse = UnlockRuleResponse'+  { -- | The retention rule description.+    description :: Prelude.Maybe Prelude.Text,+    -- | The unique ID of the retention rule.+    identifier :: Prelude.Maybe Prelude.Text,+    -- | Information about the retention rule lock configuration.+    lockConfiguration :: Prelude.Maybe LockConfiguration,+    -- | The date and time at which the unlock delay is set to expire. Only+    -- returned for retention rules that have been unlocked and that are still+    -- within the unlock delay period.+    lockEndTime :: Prelude.Maybe Data.POSIX,+    -- | The lock state for the retention rule.+    --+    -- -   @locked@ - The retention rule is locked and can\'t be modified or+    --     deleted.+    --+    -- -   @pending_unlock@ - The retention rule has been unlocked but it is+    --     still within the unlock delay period. The retention rule can be+    --     modified or deleted only after the unlock delay period has expired.+    --+    -- -   @unlocked@ - The retention rule is unlocked and it can be modified+    --     or deleted by any user with the required permissions.+    --+    -- -   @null@ - The retention rule has never been locked. Once a retention+    --     rule has been locked, it can transition between the @locked@ and+    --     @unlocked@ states only; it can never transition back to @null@.+    lockState :: Prelude.Maybe LockState,+    -- | Information about the resource tags used to identify resources that are+    -- retained by the retention rule.+    resourceTags :: Prelude.Maybe [ResourceTag],+    -- | The resource type retained by the retention rule.+    resourceType :: Prelude.Maybe ResourceType,+    retentionPeriod :: Prelude.Maybe RetentionPeriod,+    -- | The state of the retention rule. Only retention rules that are in the+    -- @available@ state retain resources.+    status :: Prelude.Maybe RuleStatus,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UnlockRuleResponse' 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:+--+-- 'description', 'unlockRuleResponse_description' - The retention rule description.+--+-- 'identifier', 'unlockRuleResponse_identifier' - The unique ID of the retention rule.+--+-- 'lockConfiguration', 'unlockRuleResponse_lockConfiguration' - Information about the retention rule lock configuration.+--+-- 'lockEndTime', 'unlockRuleResponse_lockEndTime' - The date and time at which the unlock delay is set to expire. Only+-- returned for retention rules that have been unlocked and that are still+-- within the unlock delay period.+--+-- 'lockState', 'unlockRuleResponse_lockState' - The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+--+-- 'resourceTags', 'unlockRuleResponse_resourceTags' - Information about the resource tags used to identify resources that are+-- retained by the retention rule.+--+-- 'resourceType', 'unlockRuleResponse_resourceType' - The resource type retained by the retention rule.+--+-- 'retentionPeriod', 'unlockRuleResponse_retentionPeriod' - Undocumented member.+--+-- 'status', 'unlockRuleResponse_status' - The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+--+-- 'httpStatus', 'unlockRuleResponse_httpStatus' - The response's http status code.+newUnlockRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UnlockRuleResponse+newUnlockRuleResponse pHttpStatus_ =+  UnlockRuleResponse'+    { description = Prelude.Nothing,+      identifier = Prelude.Nothing,+      lockConfiguration = Prelude.Nothing,+      lockEndTime = Prelude.Nothing,+      lockState = Prelude.Nothing,+      resourceTags = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      retentionPeriod = Prelude.Nothing,+      status = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The retention rule description.+unlockRuleResponse_description :: Lens.Lens' UnlockRuleResponse (Prelude.Maybe Prelude.Text)+unlockRuleResponse_description = Lens.lens (\UnlockRuleResponse' {description} -> description) (\s@UnlockRuleResponse' {} a -> s {description = a} :: UnlockRuleResponse)++-- | The unique ID of the retention rule.+unlockRuleResponse_identifier :: Lens.Lens' UnlockRuleResponse (Prelude.Maybe Prelude.Text)+unlockRuleResponse_identifier = Lens.lens (\UnlockRuleResponse' {identifier} -> identifier) (\s@UnlockRuleResponse' {} a -> s {identifier = a} :: UnlockRuleResponse)++-- | Information about the retention rule lock configuration.+unlockRuleResponse_lockConfiguration :: Lens.Lens' UnlockRuleResponse (Prelude.Maybe LockConfiguration)+unlockRuleResponse_lockConfiguration = Lens.lens (\UnlockRuleResponse' {lockConfiguration} -> lockConfiguration) (\s@UnlockRuleResponse' {} a -> s {lockConfiguration = a} :: UnlockRuleResponse)++-- | The date and time at which the unlock delay is set to expire. Only+-- returned for retention rules that have been unlocked and that are still+-- within the unlock delay period.+unlockRuleResponse_lockEndTime :: Lens.Lens' UnlockRuleResponse (Prelude.Maybe Prelude.UTCTime)+unlockRuleResponse_lockEndTime = Lens.lens (\UnlockRuleResponse' {lockEndTime} -> lockEndTime) (\s@UnlockRuleResponse' {} a -> s {lockEndTime = a} :: UnlockRuleResponse) Prelude.. Lens.mapping Data._Time++-- | The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+unlockRuleResponse_lockState :: Lens.Lens' UnlockRuleResponse (Prelude.Maybe LockState)+unlockRuleResponse_lockState = Lens.lens (\UnlockRuleResponse' {lockState} -> lockState) (\s@UnlockRuleResponse' {} a -> s {lockState = a} :: UnlockRuleResponse)++-- | Information about the resource tags used to identify resources that are+-- retained by the retention rule.+unlockRuleResponse_resourceTags :: Lens.Lens' UnlockRuleResponse (Prelude.Maybe [ResourceTag])+unlockRuleResponse_resourceTags = Lens.lens (\UnlockRuleResponse' {resourceTags} -> resourceTags) (\s@UnlockRuleResponse' {} a -> s {resourceTags = a} :: UnlockRuleResponse) Prelude.. Lens.mapping Lens.coerced++-- | The resource type retained by the retention rule.+unlockRuleResponse_resourceType :: Lens.Lens' UnlockRuleResponse (Prelude.Maybe ResourceType)+unlockRuleResponse_resourceType = Lens.lens (\UnlockRuleResponse' {resourceType} -> resourceType) (\s@UnlockRuleResponse' {} a -> s {resourceType = a} :: UnlockRuleResponse)++-- | Undocumented member.+unlockRuleResponse_retentionPeriod :: Lens.Lens' UnlockRuleResponse (Prelude.Maybe RetentionPeriod)+unlockRuleResponse_retentionPeriod = Lens.lens (\UnlockRuleResponse' {retentionPeriod} -> retentionPeriod) (\s@UnlockRuleResponse' {} a -> s {retentionPeriod = a} :: UnlockRuleResponse)++-- | The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+unlockRuleResponse_status :: Lens.Lens' UnlockRuleResponse (Prelude.Maybe RuleStatus)+unlockRuleResponse_status = Lens.lens (\UnlockRuleResponse' {status} -> status) (\s@UnlockRuleResponse' {} a -> s {status = a} :: UnlockRuleResponse)++-- | The response's http status code.+unlockRuleResponse_httpStatus :: Lens.Lens' UnlockRuleResponse Prelude.Int+unlockRuleResponse_httpStatus = Lens.lens (\UnlockRuleResponse' {httpStatus} -> httpStatus) (\s@UnlockRuleResponse' {} a -> s {httpStatus = a} :: UnlockRuleResponse)++instance Prelude.NFData UnlockRuleResponse where+  rnf UnlockRuleResponse' {..} =+    Prelude.rnf description+      `Prelude.seq` Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf lockConfiguration+      `Prelude.seq` Prelude.rnf lockEndTime+      `Prelude.seq` Prelude.rnf lockState+      `Prelude.seq` Prelude.rnf resourceTags+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RBin/UntagResource.hs view
@@ -0,0 +1,164 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RBin.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)+--+-- Unassigns a tag from a retention rule.+module Amazonka.RBin.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.RBin.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 retention rule.+    resourceArn :: Prelude.Text,+    -- | The tag keys of the tags to unassign. All tags that have the specified+    -- tag key are unassigned.+    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 retention rule.+--+-- 'tagKeys', 'untagResource_tagKeys' - The tag keys of the tags to unassign. All tags that have the specified+-- tag key are unassigned.+newUntagResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  UntagResource+newUntagResource pResourceArn_ =+  UntagResource'+    { resourceArn = pResourceArn_,+      tagKeys = Prelude.mempty+    }++-- | The Amazon Resource Name (ARN) of the retention rule.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | The tag keys of the tags to unassign. All tags that have the specified+-- tag key are unassigned.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+  type+    AWSResponse UntagResource =+      UntagResourceResponse+  request overrides =+    Request.delete (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          UntagResourceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UntagResource where+  hashWithSalt _salt UntagResource' {..} =+    _salt+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+  rnf UntagResource' {..} =+    Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf tagKeys++instance Data.ToHeaders UntagResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath UntagResource where+  toPath UntagResource' {..} =+    Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery UntagResource where+  toQuery UntagResource' {..} =+    Prelude.mconcat+      ["tagKeys" Data.=: Data.toQueryList "member" tagKeys]++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+  UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+  rnf UntagResourceResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/RBin/UpdateRule.hs view
@@ -0,0 +1,412 @@+{-# 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.RBin.UpdateRule+-- 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 existing Recycle Bin retention rule. You can update a+-- retention rule\'s description, resource tags, and retention period at+-- any time after creation. You can\'t update a retention rule\'s resource+-- type after creation. For more information, see+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-rules.html#recycle-bin-update-rule Update Recycle Bin retention rules>+-- in the /Amazon Elastic Compute Cloud User Guide/.+module Amazonka.RBin.UpdateRule+  ( -- * Creating a Request+    UpdateRule (..),+    newUpdateRule,++    -- * Request Lenses+    updateRule_description,+    updateRule_resourceTags,+    updateRule_resourceType,+    updateRule_retentionPeriod,+    updateRule_identifier,++    -- * Destructuring the Response+    UpdateRuleResponse (..),+    newUpdateRuleResponse,++    -- * Response Lenses+    updateRuleResponse_description,+    updateRuleResponse_identifier,+    updateRuleResponse_lockEndTime,+    updateRuleResponse_lockState,+    updateRuleResponse_resourceTags,+    updateRuleResponse_resourceType,+    updateRuleResponse_retentionPeriod,+    updateRuleResponse_status,+    updateRuleResponse_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.RBin.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateRule' smart constructor.+data UpdateRule = UpdateRule'+  { -- | The retention rule description.+    description :: Prelude.Maybe Prelude.Text,+    -- | Specifies the resource tags to use to identify resources that are to be+    -- retained by a tag-level retention rule. For tag-level retention rules,+    -- only deleted resources, of the specified resource type, that have one or+    -- more of the specified tag key and value pairs are retained. If a+    -- resource is deleted, but it does not have any of the specified tag key+    -- and value pairs, it is immediately deleted without being retained by the+    -- retention rule.+    --+    -- You can add the same tag key and value pair to a maximum or five+    -- retention rules.+    --+    -- To create a Region-level retention rule, omit this parameter. A+    -- Region-level retention rule does not have any resource tags specified.+    -- It retains all deleted resources of the specified resource type in the+    -- Region in which the rule is created, even if the resources are not+    -- tagged.+    resourceTags :: Prelude.Maybe [ResourceTag],+    -- | This parameter is currently not supported. You can\'t update a retention+    -- rule\'s resource type after creation.+    resourceType :: Prelude.Maybe ResourceType,+    -- | Information about the retention period for which the retention rule is+    -- to retain resources.+    retentionPeriod :: Prelude.Maybe RetentionPeriod,+    -- | The unique ID of the retention rule.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateRule' 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:+--+-- 'description', 'updateRule_description' - The retention rule description.+--+-- 'resourceTags', 'updateRule_resourceTags' - Specifies the resource tags to use to identify resources that are to be+-- retained by a tag-level retention rule. For tag-level retention rules,+-- only deleted resources, of the specified resource type, that have one or+-- more of the specified tag key and value pairs are retained. If a+-- resource is deleted, but it does not have any of the specified tag key+-- and value pairs, it is immediately deleted without being retained by the+-- retention rule.+--+-- You can add the same tag key and value pair to a maximum or five+-- retention rules.+--+-- To create a Region-level retention rule, omit this parameter. A+-- Region-level retention rule does not have any resource tags specified.+-- It retains all deleted resources of the specified resource type in the+-- Region in which the rule is created, even if the resources are not+-- tagged.+--+-- 'resourceType', 'updateRule_resourceType' - This parameter is currently not supported. You can\'t update a retention+-- rule\'s resource type after creation.+--+-- 'retentionPeriod', 'updateRule_retentionPeriod' - Information about the retention period for which the retention rule is+-- to retain resources.+--+-- 'identifier', 'updateRule_identifier' - The unique ID of the retention rule.+newUpdateRule ::+  -- | 'identifier'+  Prelude.Text ->+  UpdateRule+newUpdateRule pIdentifier_ =+  UpdateRule'+    { description = Prelude.Nothing,+      resourceTags = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      retentionPeriod = Prelude.Nothing,+      identifier = pIdentifier_+    }++-- | The retention rule description.+updateRule_description :: Lens.Lens' UpdateRule (Prelude.Maybe Prelude.Text)+updateRule_description = Lens.lens (\UpdateRule' {description} -> description) (\s@UpdateRule' {} a -> s {description = a} :: UpdateRule)++-- | Specifies the resource tags to use to identify resources that are to be+-- retained by a tag-level retention rule. For tag-level retention rules,+-- only deleted resources, of the specified resource type, that have one or+-- more of the specified tag key and value pairs are retained. If a+-- resource is deleted, but it does not have any of the specified tag key+-- and value pairs, it is immediately deleted without being retained by the+-- retention rule.+--+-- You can add the same tag key and value pair to a maximum or five+-- retention rules.+--+-- To create a Region-level retention rule, omit this parameter. A+-- Region-level retention rule does not have any resource tags specified.+-- It retains all deleted resources of the specified resource type in the+-- Region in which the rule is created, even if the resources are not+-- tagged.+updateRule_resourceTags :: Lens.Lens' UpdateRule (Prelude.Maybe [ResourceTag])+updateRule_resourceTags = Lens.lens (\UpdateRule' {resourceTags} -> resourceTags) (\s@UpdateRule' {} a -> s {resourceTags = a} :: UpdateRule) Prelude.. Lens.mapping Lens.coerced++-- | This parameter is currently not supported. You can\'t update a retention+-- rule\'s resource type after creation.+updateRule_resourceType :: Lens.Lens' UpdateRule (Prelude.Maybe ResourceType)+updateRule_resourceType = Lens.lens (\UpdateRule' {resourceType} -> resourceType) (\s@UpdateRule' {} a -> s {resourceType = a} :: UpdateRule)++-- | Information about the retention period for which the retention rule is+-- to retain resources.+updateRule_retentionPeriod :: Lens.Lens' UpdateRule (Prelude.Maybe RetentionPeriod)+updateRule_retentionPeriod = Lens.lens (\UpdateRule' {retentionPeriod} -> retentionPeriod) (\s@UpdateRule' {} a -> s {retentionPeriod = a} :: UpdateRule)++-- | The unique ID of the retention rule.+updateRule_identifier :: Lens.Lens' UpdateRule Prelude.Text+updateRule_identifier = Lens.lens (\UpdateRule' {identifier} -> identifier) (\s@UpdateRule' {} a -> s {identifier = a} :: UpdateRule)++instance Core.AWSRequest UpdateRule where+  type AWSResponse UpdateRule = UpdateRuleResponse+  request overrides =+    Request.patchJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateRuleResponse'+            Prelude.<$> (x Data..?> "Description")+            Prelude.<*> (x Data..?> "Identifier")+            Prelude.<*> (x Data..?> "LockEndTime")+            Prelude.<*> (x Data..?> "LockState")+            Prelude.<*> (x Data..?> "ResourceTags" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "ResourceType")+            Prelude.<*> (x Data..?> "RetentionPeriod")+            Prelude.<*> (x Data..?> "Status")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UpdateRule where+  hashWithSalt _salt UpdateRule' {..} =+    _salt+      `Prelude.hashWithSalt` description+      `Prelude.hashWithSalt` resourceTags+      `Prelude.hashWithSalt` resourceType+      `Prelude.hashWithSalt` retentionPeriod+      `Prelude.hashWithSalt` identifier++instance Prelude.NFData UpdateRule where+  rnf UpdateRule' {..} =+    Prelude.rnf description+      `Prelude.seq` Prelude.rnf resourceTags+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf identifier++instance Data.ToHeaders UpdateRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateRule where+  toJSON UpdateRule' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("Description" Data..=) Prelude.<$> description,+            ("ResourceTags" Data..=) Prelude.<$> resourceTags,+            ("ResourceType" Data..=) Prelude.<$> resourceType,+            ("RetentionPeriod" Data..=)+              Prelude.<$> retentionPeriod+          ]+      )++instance Data.ToPath UpdateRule where+  toPath UpdateRule' {..} =+    Prelude.mconcat ["/rules/", Data.toBS identifier]++instance Data.ToQuery UpdateRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateRuleResponse' smart constructor.+data UpdateRuleResponse = UpdateRuleResponse'+  { -- | The retention rule description.+    description :: Prelude.Maybe Prelude.Text,+    -- | The unique ID of the retention rule.+    identifier :: Prelude.Maybe Prelude.Text,+    -- | The date and time at which the unlock delay is set to expire. Only+    -- returned for retention rules that have been unlocked and that are still+    -- within the unlock delay period.+    lockEndTime :: Prelude.Maybe Data.POSIX,+    -- | The lock state for the retention rule.+    --+    -- -   @locked@ - The retention rule is locked and can\'t be modified or+    --     deleted.+    --+    -- -   @pending_unlock@ - The retention rule has been unlocked but it is+    --     still within the unlock delay period. The retention rule can be+    --     modified or deleted only after the unlock delay period has expired.+    --+    -- -   @unlocked@ - The retention rule is unlocked and it can be modified+    --     or deleted by any user with the required permissions.+    --+    -- -   @null@ - The retention rule has never been locked. Once a retention+    --     rule has been locked, it can transition between the @locked@ and+    --     @unlocked@ states only; it can never transition back to @null@.+    lockState :: Prelude.Maybe LockState,+    -- | Information about the resource tags used to identify resources that are+    -- retained by the retention rule.+    resourceTags :: Prelude.Maybe [ResourceTag],+    -- | The resource type retained by the retention rule.+    resourceType :: Prelude.Maybe ResourceType,+    retentionPeriod :: Prelude.Maybe RetentionPeriod,+    -- | The state of the retention rule. Only retention rules that are in the+    -- @available@ state retain resources.+    status :: Prelude.Maybe RuleStatus,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateRuleResponse' 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:+--+-- 'description', 'updateRuleResponse_description' - The retention rule description.+--+-- 'identifier', 'updateRuleResponse_identifier' - The unique ID of the retention rule.+--+-- 'lockEndTime', 'updateRuleResponse_lockEndTime' - The date and time at which the unlock delay is set to expire. Only+-- returned for retention rules that have been unlocked and that are still+-- within the unlock delay period.+--+-- 'lockState', 'updateRuleResponse_lockState' - The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+--+-- 'resourceTags', 'updateRuleResponse_resourceTags' - Information about the resource tags used to identify resources that are+-- retained by the retention rule.+--+-- 'resourceType', 'updateRuleResponse_resourceType' - The resource type retained by the retention rule.+--+-- 'retentionPeriod', 'updateRuleResponse_retentionPeriod' - Undocumented member.+--+-- 'status', 'updateRuleResponse_status' - The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+--+-- 'httpStatus', 'updateRuleResponse_httpStatus' - The response's http status code.+newUpdateRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UpdateRuleResponse+newUpdateRuleResponse pHttpStatus_ =+  UpdateRuleResponse'+    { description = Prelude.Nothing,+      identifier = Prelude.Nothing,+      lockEndTime = Prelude.Nothing,+      lockState = Prelude.Nothing,+      resourceTags = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      retentionPeriod = Prelude.Nothing,+      status = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The retention rule description.+updateRuleResponse_description :: Lens.Lens' UpdateRuleResponse (Prelude.Maybe Prelude.Text)+updateRuleResponse_description = Lens.lens (\UpdateRuleResponse' {description} -> description) (\s@UpdateRuleResponse' {} a -> s {description = a} :: UpdateRuleResponse)++-- | The unique ID of the retention rule.+updateRuleResponse_identifier :: Lens.Lens' UpdateRuleResponse (Prelude.Maybe Prelude.Text)+updateRuleResponse_identifier = Lens.lens (\UpdateRuleResponse' {identifier} -> identifier) (\s@UpdateRuleResponse' {} a -> s {identifier = a} :: UpdateRuleResponse)++-- | The date and time at which the unlock delay is set to expire. Only+-- returned for retention rules that have been unlocked and that are still+-- within the unlock delay period.+updateRuleResponse_lockEndTime :: Lens.Lens' UpdateRuleResponse (Prelude.Maybe Prelude.UTCTime)+updateRuleResponse_lockEndTime = Lens.lens (\UpdateRuleResponse' {lockEndTime} -> lockEndTime) (\s@UpdateRuleResponse' {} a -> s {lockEndTime = a} :: UpdateRuleResponse) Prelude.. Lens.mapping Data._Time++-- | The lock state for the retention rule.+--+-- -   @locked@ - The retention rule is locked and can\'t be modified or+--     deleted.+--+-- -   @pending_unlock@ - The retention rule has been unlocked but it is+--     still within the unlock delay period. The retention rule can be+--     modified or deleted only after the unlock delay period has expired.+--+-- -   @unlocked@ - The retention rule is unlocked and it can be modified+--     or deleted by any user with the required permissions.+--+-- -   @null@ - The retention rule has never been locked. Once a retention+--     rule has been locked, it can transition between the @locked@ and+--     @unlocked@ states only; it can never transition back to @null@.+updateRuleResponse_lockState :: Lens.Lens' UpdateRuleResponse (Prelude.Maybe LockState)+updateRuleResponse_lockState = Lens.lens (\UpdateRuleResponse' {lockState} -> lockState) (\s@UpdateRuleResponse' {} a -> s {lockState = a} :: UpdateRuleResponse)++-- | Information about the resource tags used to identify resources that are+-- retained by the retention rule.+updateRuleResponse_resourceTags :: Lens.Lens' UpdateRuleResponse (Prelude.Maybe [ResourceTag])+updateRuleResponse_resourceTags = Lens.lens (\UpdateRuleResponse' {resourceTags} -> resourceTags) (\s@UpdateRuleResponse' {} a -> s {resourceTags = a} :: UpdateRuleResponse) Prelude.. Lens.mapping Lens.coerced++-- | The resource type retained by the retention rule.+updateRuleResponse_resourceType :: Lens.Lens' UpdateRuleResponse (Prelude.Maybe ResourceType)+updateRuleResponse_resourceType = Lens.lens (\UpdateRuleResponse' {resourceType} -> resourceType) (\s@UpdateRuleResponse' {} a -> s {resourceType = a} :: UpdateRuleResponse)++-- | Undocumented member.+updateRuleResponse_retentionPeriod :: Lens.Lens' UpdateRuleResponse (Prelude.Maybe RetentionPeriod)+updateRuleResponse_retentionPeriod = Lens.lens (\UpdateRuleResponse' {retentionPeriod} -> retentionPeriod) (\s@UpdateRuleResponse' {} a -> s {retentionPeriod = a} :: UpdateRuleResponse)++-- | The state of the retention rule. Only retention rules that are in the+-- @available@ state retain resources.+updateRuleResponse_status :: Lens.Lens' UpdateRuleResponse (Prelude.Maybe RuleStatus)+updateRuleResponse_status = Lens.lens (\UpdateRuleResponse' {status} -> status) (\s@UpdateRuleResponse' {} a -> s {status = a} :: UpdateRuleResponse)++-- | The response's http status code.+updateRuleResponse_httpStatus :: Lens.Lens' UpdateRuleResponse Prelude.Int+updateRuleResponse_httpStatus = Lens.lens (\UpdateRuleResponse' {httpStatus} -> httpStatus) (\s@UpdateRuleResponse' {} a -> s {httpStatus = a} :: UpdateRuleResponse)++instance Prelude.NFData UpdateRuleResponse where+  rnf UpdateRuleResponse' {..} =+    Prelude.rnf description+      `Prelude.seq` Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf lockEndTime+      `Prelude.seq` Prelude.rnf lockState+      `Prelude.seq` Prelude.rnf resourceTags+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf retentionPeriod+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RBin/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.RBin.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.RBin.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.RBin.Lens+import Amazonka.RBin.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.RBin+import Test.Amazonka.RBin.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "RBin"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/Gen/RBin.hs view
@@ -0,0 +1,238 @@+{-# 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.RBin+-- 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.RBin where++import Amazonka.RBin+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.RBin.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"+--         [ requestCreateRule $+--             newCreateRule+--+--         , requestDeleteRule $+--             newDeleteRule+--+--         , requestGetRule $+--             newGetRule+--+--         , requestListRules $+--             newListRules+--+--         , requestListTagsForResource $+--             newListTagsForResource+--+--         , requestLockRule $+--             newLockRule+--+--         , requestTagResource $+--             newTagResource+--+--         , requestUnlockRule $+--             newUnlockRule+--+--         , requestUntagResource $+--             newUntagResource+--+--         , requestUpdateRule $+--             newUpdateRule+--+--           ]++--     , testGroup "response"+--         [ responseCreateRule $+--             newCreateRuleResponse+--+--         , responseDeleteRule $+--             newDeleteRuleResponse+--+--         , responseGetRule $+--             newGetRuleResponse+--+--         , responseListRules $+--             newListRulesResponse+--+--         , responseListTagsForResource $+--             newListTagsForResourceResponse+--+--         , responseLockRule $+--             newLockRuleResponse+--+--         , responseTagResource $+--             newTagResourceResponse+--+--         , responseUnlockRule $+--             newUnlockRuleResponse+--+--         , responseUntagResource $+--             newUntagResourceResponse+--+--         , responseUpdateRule $+--             newUpdateRuleResponse+--+--           ]+--     ]++-- Requests++requestCreateRule :: CreateRule -> TestTree+requestCreateRule =+  req+    "CreateRule"+    "fixture/CreateRule.yaml"++requestDeleteRule :: DeleteRule -> TestTree+requestDeleteRule =+  req+    "DeleteRule"+    "fixture/DeleteRule.yaml"++requestGetRule :: GetRule -> TestTree+requestGetRule =+  req+    "GetRule"+    "fixture/GetRule.yaml"++requestListRules :: ListRules -> TestTree+requestListRules =+  req+    "ListRules"+    "fixture/ListRules.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+  req+    "ListTagsForResource"+    "fixture/ListTagsForResource.yaml"++requestLockRule :: LockRule -> TestTree+requestLockRule =+  req+    "LockRule"+    "fixture/LockRule.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+  req+    "TagResource"+    "fixture/TagResource.yaml"++requestUnlockRule :: UnlockRule -> TestTree+requestUnlockRule =+  req+    "UnlockRule"+    "fixture/UnlockRule.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+  req+    "UntagResource"+    "fixture/UntagResource.yaml"++requestUpdateRule :: UpdateRule -> TestTree+requestUpdateRule =+  req+    "UpdateRule"+    "fixture/UpdateRule.yaml"++-- Responses++responseCreateRule :: CreateRuleResponse -> TestTree+responseCreateRule =+  res+    "CreateRuleResponse"+    "fixture/CreateRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateRule)++responseDeleteRule :: DeleteRuleResponse -> TestTree+responseDeleteRule =+  res+    "DeleteRuleResponse"+    "fixture/DeleteRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteRule)++responseGetRule :: GetRuleResponse -> TestTree+responseGetRule =+  res+    "GetRuleResponse"+    "fixture/GetRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetRule)++responseListRules :: ListRulesResponse -> TestTree+responseListRules =+  res+    "ListRulesResponse"+    "fixture/ListRulesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListRules)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+  res+    "ListTagsForResourceResponse"+    "fixture/ListTagsForResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseLockRule :: LockRuleResponse -> TestTree+responseLockRule =+  res+    "LockRuleResponse"+    "fixture/LockRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy LockRule)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+  res+    "TagResourceResponse"+    "fixture/TagResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy TagResource)++responseUnlockRule :: UnlockRuleResponse -> TestTree+responseUnlockRule =+  res+    "UnlockRuleResponse"+    "fixture/UnlockRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UnlockRule)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+  res+    "UntagResourceResponse"+    "fixture/UntagResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdateRule :: UpdateRuleResponse -> TestTree+responseUpdateRule =+  res+    "UpdateRuleResponse"+    "fixture/UpdateRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateRule)
+ test/Test/Amazonka/RBin.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.RBin+-- 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.RBin+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/RBin/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.RBin.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.RBin.Internal where