packages feed

amazonka-ram (empty) → 2.0

raw patch · 106 files changed

+12654/−0 lines, 106 filesdep +amazonka-coredep +amazonka-ramdep +amazonka-test

Dependencies added: amazonka-core, amazonka-ram, 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 Resource Access Manager SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2018-01-04@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-ram)+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.RAM](http://hackage.haskell.org/package/amazonka-ram/docs/Amazonka-RAM.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-ram` 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-ram.cabal view
@@ -0,0 +1,127 @@+cabal-version:      2.2+name:               amazonka-ram+version:            2.0+synopsis:           Amazon Resource Access Manager SDK.+homepage:           https://github.com/brendanhay/amazonka+bug-reports:        https://github.com/brendanhay/amazonka/issues+license:            MPL-2.0+license-file:       LICENSE+author:             Brendan Hay+maintainer:+  Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>++copyright:          Copyright (c) 2013-2023 Brendan Hay+category:           AWS+build-type:         Simple+extra-source-files:+  fixture/*.proto+  fixture/*.yaml+  README.md+  src/.gitkeep++description:+  Derived from API version @2018-01-04@ 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.RAM.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.RAM" 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-ram++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.RAM+    Amazonka.RAM.AcceptResourceShareInvitation+    Amazonka.RAM.AssociateResourceShare+    Amazonka.RAM.AssociateResourceSharePermission+    Amazonka.RAM.CreateResourceShare+    Amazonka.RAM.DeleteResourceShare+    Amazonka.RAM.DisassociateResourceShare+    Amazonka.RAM.DisassociateResourceSharePermission+    Amazonka.RAM.EnableSharingWithAwsOrganization+    Amazonka.RAM.GetPermission+    Amazonka.RAM.GetResourcePolicies+    Amazonka.RAM.GetResourceShareAssociations+    Amazonka.RAM.GetResourceShareInvitations+    Amazonka.RAM.GetResourceShares+    Amazonka.RAM.Lens+    Amazonka.RAM.ListPendingInvitationResources+    Amazonka.RAM.ListPermissions+    Amazonka.RAM.ListPermissionVersions+    Amazonka.RAM.ListPrincipals+    Amazonka.RAM.ListResources+    Amazonka.RAM.ListResourceSharePermissions+    Amazonka.RAM.ListResourceTypes+    Amazonka.RAM.PromoteResourceShareCreatedFromPolicy+    Amazonka.RAM.RejectResourceShareInvitation+    Amazonka.RAM.TagResource+    Amazonka.RAM.Types+    Amazonka.RAM.Types.Principal+    Amazonka.RAM.Types.Resource+    Amazonka.RAM.Types.ResourceOwner+    Amazonka.RAM.Types.ResourceRegionScope+    Amazonka.RAM.Types.ResourceRegionScopeFilter+    Amazonka.RAM.Types.ResourceShare+    Amazonka.RAM.Types.ResourceShareAssociation+    Amazonka.RAM.Types.ResourceShareAssociationStatus+    Amazonka.RAM.Types.ResourceShareAssociationType+    Amazonka.RAM.Types.ResourceShareFeatureSet+    Amazonka.RAM.Types.ResourceShareInvitation+    Amazonka.RAM.Types.ResourceShareInvitationStatus+    Amazonka.RAM.Types.ResourceSharePermissionDetail+    Amazonka.RAM.Types.ResourceSharePermissionSummary+    Amazonka.RAM.Types.ResourceShareStatus+    Amazonka.RAM.Types.ResourceStatus+    Amazonka.RAM.Types.ServiceNameAndResourceType+    Amazonka.RAM.Types.Tag+    Amazonka.RAM.Types.TagFilter+    Amazonka.RAM.UntagResource+    Amazonka.RAM.UpdateResourceShare+    Amazonka.RAM.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-ram-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.RAM+    Test.Amazonka.RAM+    Test.Amazonka.RAM.Internal++  build-depends:+    , amazonka-core         >=2.0 && <2.1+    , amazonka-ram+    , amazonka-test         >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/AcceptResourceShareInvitation.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/AcceptResourceShareInvitationResponse.proto view
+ fixture/AssociateResourceShare.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/AssociateResourceSharePermission.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/AssociateResourceSharePermissionResponse.proto view
+ fixture/AssociateResourceShareResponse.proto view
+ fixture/CreateResourceShare.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/CreateResourceShareResponse.proto view
+ fixture/DeleteResourceShare.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/DeleteResourceShareResponse.proto view
+ fixture/DisassociateResourceShare.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/DisassociateResourceSharePermission.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/DisassociateResourceSharePermissionResponse.proto view
+ fixture/DisassociateResourceShareResponse.proto view
+ fixture/EnableSharingWithAwsOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/EnableSharingWithAwsOrganizationResponse.proto view
+ fixture/GetPermission.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/GetPermissionResponse.proto view
+ fixture/GetResourcePolicies.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/GetResourcePoliciesResponse.proto view
+ fixture/GetResourceShareAssociations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/GetResourceShareAssociationsResponse.proto view
+ fixture/GetResourceShareInvitations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/GetResourceShareInvitationsResponse.proto view
+ fixture/GetResourceShares.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/GetResourceSharesResponse.proto view
+ fixture/ListPendingInvitationResources.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/ListPendingInvitationResourcesResponse.proto view
+ fixture/ListPermissionVersions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/ListPermissionVersionsResponse.proto view
+ fixture/ListPermissions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/ListPermissionsResponse.proto view
+ fixture/ListPrincipals.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/ListPrincipalsResponse.proto view
+ fixture/ListResourceSharePermissions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/ListResourceSharePermissionsResponse.proto view
+ fixture/ListResourceTypes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/ListResourceTypesResponse.proto view
+ fixture/ListResources.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/ListResourcesResponse.proto view
+ fixture/PromoteResourceShareCreatedFromPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/PromoteResourceShareCreatedFromPolicyResponse.proto view
+ fixture/RejectResourceShareInvitation.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/RejectResourceShareInvitationResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/TagResourceResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/UpdateResourceShare.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/ram/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  ram.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/UpdateResourceShareResponse.proto view
+ gen/Amazonka/RAM.hs view
@@ -0,0 +1,384 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.RAM+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2018-01-04@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- This is the /Resource Access Manager API Reference/. This documentation+-- provides descriptions and syntax for each of the actions and data types+-- in RAM. RAM is a service that helps you securely share your Amazon Web+-- Services resources across Amazon Web Services accounts. If you have+-- multiple Amazon Web Services accounts, you can use RAM to share those+-- resources with other accounts. If you use Organizations to manage your+-- accounts, then you share your resources with your organization or+-- organizational units (OUs). For supported resource types, you can also+-- share resources with individual Identity and Access Management (IAM)+-- roles an users.+--+-- To learn more about RAM, see the following resources:+--+-- -   <http://aws.amazon.com/ram Resource Access Manager product page>+--+-- -   <https://docs.aws.amazon.com/ram/latest/userguide/ Resource Access Manager User Guide>+module Amazonka.RAM+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** IdempotentParameterMismatchException+    _IdempotentParameterMismatchException,++    -- ** InvalidClientTokenException+    _InvalidClientTokenException,++    -- ** InvalidMaxResultsException+    _InvalidMaxResultsException,++    -- ** InvalidNextTokenException+    _InvalidNextTokenException,++    -- ** InvalidParameterException+    _InvalidParameterException,++    -- ** InvalidResourceTypeException+    _InvalidResourceTypeException,++    -- ** InvalidStateTransitionException+    _InvalidStateTransitionException,++    -- ** MalformedArnException+    _MalformedArnException,++    -- ** MissingRequiredParameterException+    _MissingRequiredParameterException,++    -- ** OperationNotPermittedException+    _OperationNotPermittedException,++    -- ** ResourceArnNotFoundException+    _ResourceArnNotFoundException,++    -- ** ResourceShareInvitationAlreadyAcceptedException+    _ResourceShareInvitationAlreadyAcceptedException,++    -- ** ResourceShareInvitationAlreadyRejectedException+    _ResourceShareInvitationAlreadyRejectedException,++    -- ** ResourceShareInvitationArnNotFoundException+    _ResourceShareInvitationArnNotFoundException,++    -- ** ResourceShareInvitationExpiredException+    _ResourceShareInvitationExpiredException,++    -- ** ResourceShareLimitExceededException+    _ResourceShareLimitExceededException,++    -- ** ServerInternalException+    _ServerInternalException,++    -- ** ServiceUnavailableException+    _ServiceUnavailableException,++    -- ** TagLimitExceededException+    _TagLimitExceededException,++    -- ** TagPolicyViolationException+    _TagPolicyViolationException,++    -- ** ThrottlingException+    _ThrottlingException,++    -- ** UnknownResourceException+    _UnknownResourceException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** AcceptResourceShareInvitation+    AcceptResourceShareInvitation (AcceptResourceShareInvitation'),+    newAcceptResourceShareInvitation,+    AcceptResourceShareInvitationResponse (AcceptResourceShareInvitationResponse'),+    newAcceptResourceShareInvitationResponse,++    -- ** AssociateResourceShare+    AssociateResourceShare (AssociateResourceShare'),+    newAssociateResourceShare,+    AssociateResourceShareResponse (AssociateResourceShareResponse'),+    newAssociateResourceShareResponse,++    -- ** AssociateResourceSharePermission+    AssociateResourceSharePermission (AssociateResourceSharePermission'),+    newAssociateResourceSharePermission,+    AssociateResourceSharePermissionResponse (AssociateResourceSharePermissionResponse'),+    newAssociateResourceSharePermissionResponse,++    -- ** CreateResourceShare+    CreateResourceShare (CreateResourceShare'),+    newCreateResourceShare,+    CreateResourceShareResponse (CreateResourceShareResponse'),+    newCreateResourceShareResponse,++    -- ** DeleteResourceShare+    DeleteResourceShare (DeleteResourceShare'),+    newDeleteResourceShare,+    DeleteResourceShareResponse (DeleteResourceShareResponse'),+    newDeleteResourceShareResponse,++    -- ** DisassociateResourceShare+    DisassociateResourceShare (DisassociateResourceShare'),+    newDisassociateResourceShare,+    DisassociateResourceShareResponse (DisassociateResourceShareResponse'),+    newDisassociateResourceShareResponse,++    -- ** DisassociateResourceSharePermission+    DisassociateResourceSharePermission (DisassociateResourceSharePermission'),+    newDisassociateResourceSharePermission,+    DisassociateResourceSharePermissionResponse (DisassociateResourceSharePermissionResponse'),+    newDisassociateResourceSharePermissionResponse,++    -- ** EnableSharingWithAwsOrganization+    EnableSharingWithAwsOrganization (EnableSharingWithAwsOrganization'),+    newEnableSharingWithAwsOrganization,+    EnableSharingWithAwsOrganizationResponse (EnableSharingWithAwsOrganizationResponse'),+    newEnableSharingWithAwsOrganizationResponse,++    -- ** GetPermission+    GetPermission (GetPermission'),+    newGetPermission,+    GetPermissionResponse (GetPermissionResponse'),+    newGetPermissionResponse,++    -- ** GetResourcePolicies (Paginated)+    GetResourcePolicies (GetResourcePolicies'),+    newGetResourcePolicies,+    GetResourcePoliciesResponse (GetResourcePoliciesResponse'),+    newGetResourcePoliciesResponse,++    -- ** GetResourceShareAssociations (Paginated)+    GetResourceShareAssociations (GetResourceShareAssociations'),+    newGetResourceShareAssociations,+    GetResourceShareAssociationsResponse (GetResourceShareAssociationsResponse'),+    newGetResourceShareAssociationsResponse,++    -- ** GetResourceShareInvitations (Paginated)+    GetResourceShareInvitations (GetResourceShareInvitations'),+    newGetResourceShareInvitations,+    GetResourceShareInvitationsResponse (GetResourceShareInvitationsResponse'),+    newGetResourceShareInvitationsResponse,++    -- ** GetResourceShares (Paginated)+    GetResourceShares (GetResourceShares'),+    newGetResourceShares,+    GetResourceSharesResponse (GetResourceSharesResponse'),+    newGetResourceSharesResponse,++    -- ** ListPendingInvitationResources+    ListPendingInvitationResources (ListPendingInvitationResources'),+    newListPendingInvitationResources,+    ListPendingInvitationResourcesResponse (ListPendingInvitationResourcesResponse'),+    newListPendingInvitationResourcesResponse,++    -- ** ListPermissionVersions+    ListPermissionVersions (ListPermissionVersions'),+    newListPermissionVersions,+    ListPermissionVersionsResponse (ListPermissionVersionsResponse'),+    newListPermissionVersionsResponse,++    -- ** ListPermissions+    ListPermissions (ListPermissions'),+    newListPermissions,+    ListPermissionsResponse (ListPermissionsResponse'),+    newListPermissionsResponse,++    -- ** ListPrincipals (Paginated)+    ListPrincipals (ListPrincipals'),+    newListPrincipals,+    ListPrincipalsResponse (ListPrincipalsResponse'),+    newListPrincipalsResponse,++    -- ** ListResourceSharePermissions+    ListResourceSharePermissions (ListResourceSharePermissions'),+    newListResourceSharePermissions,+    ListResourceSharePermissionsResponse (ListResourceSharePermissionsResponse'),+    newListResourceSharePermissionsResponse,++    -- ** ListResourceTypes+    ListResourceTypes (ListResourceTypes'),+    newListResourceTypes,+    ListResourceTypesResponse (ListResourceTypesResponse'),+    newListResourceTypesResponse,++    -- ** ListResources (Paginated)+    ListResources (ListResources'),+    newListResources,+    ListResourcesResponse (ListResourcesResponse'),+    newListResourcesResponse,++    -- ** PromoteResourceShareCreatedFromPolicy+    PromoteResourceShareCreatedFromPolicy (PromoteResourceShareCreatedFromPolicy'),+    newPromoteResourceShareCreatedFromPolicy,+    PromoteResourceShareCreatedFromPolicyResponse (PromoteResourceShareCreatedFromPolicyResponse'),+    newPromoteResourceShareCreatedFromPolicyResponse,++    -- ** RejectResourceShareInvitation+    RejectResourceShareInvitation (RejectResourceShareInvitation'),+    newRejectResourceShareInvitation,+    RejectResourceShareInvitationResponse (RejectResourceShareInvitationResponse'),+    newRejectResourceShareInvitationResponse,++    -- ** TagResource+    TagResource (TagResource'),+    newTagResource,+    TagResourceResponse (TagResourceResponse'),+    newTagResourceResponse,++    -- ** UntagResource+    UntagResource (UntagResource'),+    newUntagResource,+    UntagResourceResponse (UntagResourceResponse'),+    newUntagResourceResponse,++    -- ** UpdateResourceShare+    UpdateResourceShare (UpdateResourceShare'),+    newUpdateResourceShare,+    UpdateResourceShareResponse (UpdateResourceShareResponse'),+    newUpdateResourceShareResponse,++    -- * Types++    -- ** ResourceOwner+    ResourceOwner (..),++    -- ** ResourceRegionScope+    ResourceRegionScope (..),++    -- ** ResourceRegionScopeFilter+    ResourceRegionScopeFilter (..),++    -- ** ResourceShareAssociationStatus+    ResourceShareAssociationStatus (..),++    -- ** ResourceShareAssociationType+    ResourceShareAssociationType (..),++    -- ** ResourceShareFeatureSet+    ResourceShareFeatureSet (..),++    -- ** ResourceShareInvitationStatus+    ResourceShareInvitationStatus (..),++    -- ** ResourceShareStatus+    ResourceShareStatus (..),++    -- ** ResourceStatus+    ResourceStatus (..),++    -- ** Principal+    Principal (Principal'),+    newPrincipal,++    -- ** Resource+    Resource (Resource'),+    newResource,++    -- ** ResourceShare+    ResourceShare (ResourceShare'),+    newResourceShare,++    -- ** ResourceShareAssociation+    ResourceShareAssociation (ResourceShareAssociation'),+    newResourceShareAssociation,++    -- ** ResourceShareInvitation+    ResourceShareInvitation (ResourceShareInvitation'),+    newResourceShareInvitation,++    -- ** ResourceSharePermissionDetail+    ResourceSharePermissionDetail (ResourceSharePermissionDetail'),+    newResourceSharePermissionDetail,++    -- ** ResourceSharePermissionSummary+    ResourceSharePermissionSummary (ResourceSharePermissionSummary'),+    newResourceSharePermissionSummary,++    -- ** ServiceNameAndResourceType+    ServiceNameAndResourceType (ServiceNameAndResourceType'),+    newServiceNameAndResourceType,++    -- ** Tag+    Tag (Tag'),+    newTag,++    -- ** TagFilter+    TagFilter (TagFilter'),+    newTagFilter,+  )+where++import Amazonka.RAM.AcceptResourceShareInvitation+import Amazonka.RAM.AssociateResourceShare+import Amazonka.RAM.AssociateResourceSharePermission+import Amazonka.RAM.CreateResourceShare+import Amazonka.RAM.DeleteResourceShare+import Amazonka.RAM.DisassociateResourceShare+import Amazonka.RAM.DisassociateResourceSharePermission+import Amazonka.RAM.EnableSharingWithAwsOrganization+import Amazonka.RAM.GetPermission+import Amazonka.RAM.GetResourcePolicies+import Amazonka.RAM.GetResourceShareAssociations+import Amazonka.RAM.GetResourceShareInvitations+import Amazonka.RAM.GetResourceShares+import Amazonka.RAM.Lens+import Amazonka.RAM.ListPendingInvitationResources+import Amazonka.RAM.ListPermissionVersions+import Amazonka.RAM.ListPermissions+import Amazonka.RAM.ListPrincipals+import Amazonka.RAM.ListResourceSharePermissions+import Amazonka.RAM.ListResourceTypes+import Amazonka.RAM.ListResources+import Amazonka.RAM.PromoteResourceShareCreatedFromPolicy+import Amazonka.RAM.RejectResourceShareInvitation+import Amazonka.RAM.TagResource+import Amazonka.RAM.Types+import Amazonka.RAM.UntagResource+import Amazonka.RAM.UpdateResourceShare+import Amazonka.RAM.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 'RAM'.++-- $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/RAM/AcceptResourceShareInvitation.hs view
@@ -0,0 +1,259 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RAM.AcceptResourceShareInvitation+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Accepts an invitation to a resource share from another Amazon Web+-- Services account. After you accept the invitation, the resources+-- included in the resource share are available to interact with in the+-- relevant Amazon Web Services Management Consoles and tools.+module Amazonka.RAM.AcceptResourceShareInvitation+  ( -- * Creating a Request+    AcceptResourceShareInvitation (..),+    newAcceptResourceShareInvitation,++    -- * Request Lenses+    acceptResourceShareInvitation_clientToken,+    acceptResourceShareInvitation_resourceShareInvitationArn,++    -- * Destructuring the Response+    AcceptResourceShareInvitationResponse (..),+    newAcceptResourceShareInvitationResponse,++    -- * Response Lenses+    acceptResourceShareInvitationResponse_clientToken,+    acceptResourceShareInvitationResponse_resourceShareInvitation,+    acceptResourceShareInvitationResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newAcceptResourceShareInvitation' smart constructor.+data AcceptResourceShareInvitation = AcceptResourceShareInvitation'+  { -- | Specifies a unique, case-sensitive identifier that you provide to ensure+    -- the idempotency of the request. This lets you safely retry the request+    -- without accidentally performing the same operation a second time.+    -- Passing the same value to a later call to an operation requires that you+    -- also pass the same value for all other parameters. We recommend that you+    -- use a+    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+    --+    -- If you don\'t provide this value, then Amazon Web Services generates a+    -- random one for you.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the invitation that you want to accept.+    resourceShareInvitationArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AcceptResourceShareInvitation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'acceptResourceShareInvitation_clientToken' - Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+--+-- 'resourceShareInvitationArn', 'acceptResourceShareInvitation_resourceShareInvitationArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the invitation that you want to accept.+newAcceptResourceShareInvitation ::+  -- | 'resourceShareInvitationArn'+  Prelude.Text ->+  AcceptResourceShareInvitation+newAcceptResourceShareInvitation+  pResourceShareInvitationArn_ =+    AcceptResourceShareInvitation'+      { clientToken =+          Prelude.Nothing,+        resourceShareInvitationArn =+          pResourceShareInvitationArn_+      }++-- | Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+acceptResourceShareInvitation_clientToken :: Lens.Lens' AcceptResourceShareInvitation (Prelude.Maybe Prelude.Text)+acceptResourceShareInvitation_clientToken = Lens.lens (\AcceptResourceShareInvitation' {clientToken} -> clientToken) (\s@AcceptResourceShareInvitation' {} a -> s {clientToken = a} :: AcceptResourceShareInvitation)++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the invitation that you want to accept.+acceptResourceShareInvitation_resourceShareInvitationArn :: Lens.Lens' AcceptResourceShareInvitation Prelude.Text+acceptResourceShareInvitation_resourceShareInvitationArn = Lens.lens (\AcceptResourceShareInvitation' {resourceShareInvitationArn} -> resourceShareInvitationArn) (\s@AcceptResourceShareInvitation' {} a -> s {resourceShareInvitationArn = a} :: AcceptResourceShareInvitation)++instance+  Core.AWSRequest+    AcceptResourceShareInvitation+  where+  type+    AWSResponse AcceptResourceShareInvitation =+      AcceptResourceShareInvitationResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          AcceptResourceShareInvitationResponse'+            Prelude.<$> (x Data..?> "clientToken")+            Prelude.<*> (x Data..?> "resourceShareInvitation")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    AcceptResourceShareInvitation+  where+  hashWithSalt _salt AcceptResourceShareInvitation' {..} =+    _salt+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` resourceShareInvitationArn++instance Prelude.NFData AcceptResourceShareInvitation where+  rnf AcceptResourceShareInvitation' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShareInvitationArn++instance Data.ToHeaders AcceptResourceShareInvitation where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON AcceptResourceShareInvitation where+  toJSON AcceptResourceShareInvitation' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("clientToken" Data..=) Prelude.<$> clientToken,+            Prelude.Just+              ( "resourceShareInvitationArn"+                  Data..= resourceShareInvitationArn+              )+          ]+      )++instance Data.ToPath AcceptResourceShareInvitation where+  toPath =+    Prelude.const "/acceptresourceshareinvitation"++instance Data.ToQuery AcceptResourceShareInvitation where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newAcceptResourceShareInvitationResponse' smart constructor.+data AcceptResourceShareInvitationResponse = AcceptResourceShareInvitationResponse'+  { -- | The idempotency identifier associated with this request. If you want to+    -- repeat the same operation in an idempotent manner then you must include+    -- this value in the @clientToken@ request parameter of that later call.+    -- All other parameters must also have the same values that you used in the+    -- first call.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | An object that contains information about the specified invitation.+    resourceShareInvitation :: Prelude.Maybe ResourceShareInvitation,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AcceptResourceShareInvitationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'acceptResourceShareInvitationResponse_clientToken' - The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+--+-- 'resourceShareInvitation', 'acceptResourceShareInvitationResponse_resourceShareInvitation' - An object that contains information about the specified invitation.+--+-- 'httpStatus', 'acceptResourceShareInvitationResponse_httpStatus' - The response's http status code.+newAcceptResourceShareInvitationResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  AcceptResourceShareInvitationResponse+newAcceptResourceShareInvitationResponse pHttpStatus_ =+  AcceptResourceShareInvitationResponse'+    { clientToken =+        Prelude.Nothing,+      resourceShareInvitation =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+acceptResourceShareInvitationResponse_clientToken :: Lens.Lens' AcceptResourceShareInvitationResponse (Prelude.Maybe Prelude.Text)+acceptResourceShareInvitationResponse_clientToken = Lens.lens (\AcceptResourceShareInvitationResponse' {clientToken} -> clientToken) (\s@AcceptResourceShareInvitationResponse' {} a -> s {clientToken = a} :: AcceptResourceShareInvitationResponse)++-- | An object that contains information about the specified invitation.+acceptResourceShareInvitationResponse_resourceShareInvitation :: Lens.Lens' AcceptResourceShareInvitationResponse (Prelude.Maybe ResourceShareInvitation)+acceptResourceShareInvitationResponse_resourceShareInvitation = Lens.lens (\AcceptResourceShareInvitationResponse' {resourceShareInvitation} -> resourceShareInvitation) (\s@AcceptResourceShareInvitationResponse' {} a -> s {resourceShareInvitation = a} :: AcceptResourceShareInvitationResponse)++-- | The response's http status code.+acceptResourceShareInvitationResponse_httpStatus :: Lens.Lens' AcceptResourceShareInvitationResponse Prelude.Int+acceptResourceShareInvitationResponse_httpStatus = Lens.lens (\AcceptResourceShareInvitationResponse' {httpStatus} -> httpStatus) (\s@AcceptResourceShareInvitationResponse' {} a -> s {httpStatus = a} :: AcceptResourceShareInvitationResponse)++instance+  Prelude.NFData+    AcceptResourceShareInvitationResponse+  where+  rnf AcceptResourceShareInvitationResponse' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShareInvitation+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/AssociateResourceShare.hs view
@@ -0,0 +1,370 @@+{-# 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.RAM.AssociateResourceShare+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds the specified list of principals and list of resources to a+-- resource share. Principals that already have access to this resource+-- share immediately receive access to the added resources. Newly added+-- principals immediately receive access to the resources shared in this+-- resource share.+module Amazonka.RAM.AssociateResourceShare+  ( -- * Creating a Request+    AssociateResourceShare (..),+    newAssociateResourceShare,++    -- * Request Lenses+    associateResourceShare_clientToken,+    associateResourceShare_principals,+    associateResourceShare_resourceArns,+    associateResourceShare_resourceShareArn,++    -- * Destructuring the Response+    AssociateResourceShareResponse (..),+    newAssociateResourceShareResponse,++    -- * Response Lenses+    associateResourceShareResponse_clientToken,+    associateResourceShareResponse_resourceShareAssociations,+    associateResourceShareResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newAssociateResourceShare' smart constructor.+data AssociateResourceShare = AssociateResourceShare'+  { -- | Specifies a unique, case-sensitive identifier that you provide to ensure+    -- the idempotency of the request. This lets you safely retry the request+    -- without accidentally performing the same operation a second time.+    -- Passing the same value to a later call to an operation requires that you+    -- also pass the same value for all other parameters. We recommend that you+    -- use a+    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+    --+    -- If you don\'t provide this value, then Amazon Web Services generates a+    -- random one for you.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies a list of principals to whom you want to the resource share.+    -- This can be @null@ if you want to add only resources.+    --+    -- What the principals can do with the resources in the share is determined+    -- by the RAM permissions that you associate with the resource share. See+    -- AssociateResourceSharePermission.+    --+    -- You can include the following values:+    --+    -- -   An Amazon Web Services account ID, for example: @123456789012@+    --+    -- -   An+    --     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    --     of an organization in Organizations, for example:+    --     @organizations::123456789012:organization\/o-exampleorgid@+    --+    -- -   An ARN of an organizational unit (OU) in Organizations, for example:+    --     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+    --+    -- -   An ARN of an IAM role, for example:+    --     @iam::123456789012:role\/rolename@+    --+    -- -   An ARN of an IAM user, for example:+    --     @iam::123456789012user\/username@+    --+    -- Not all resource types can be shared with IAM roles and users. For more+    -- information, see+    -- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+    -- in the /Resource Access Manager User Guide/.+    principals :: Prelude.Maybe [Prelude.Text],+    -- | Specifies a list of+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    -- of the resources that you want to share. This can be @null@ if you want+    -- to add only principals.+    resourceArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share that you want to add principals or resources to.+    resourceShareArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateResourceShare' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'associateResourceShare_clientToken' - Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+--+-- 'principals', 'associateResourceShare_principals' - Specifies a list of principals to whom you want to the resource share.+-- This can be @null@ if you want to add only resources.+--+-- What the principals can do with the resources in the share is determined+-- by the RAM permissions that you associate with the resource share. See+-- AssociateResourceSharePermission.+--+-- You can include the following values:+--+-- -   An Amazon Web Services account ID, for example: @123456789012@+--+-- -   An+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of an organization in Organizations, for example:+--     @organizations::123456789012:organization\/o-exampleorgid@+--+-- -   An ARN of an organizational unit (OU) in Organizations, for example:+--     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+--+-- -   An ARN of an IAM role, for example:+--     @iam::123456789012:role\/rolename@+--+-- -   An ARN of an IAM user, for example:+--     @iam::123456789012user\/username@+--+-- Not all resource types can be shared with IAM roles and users. For more+-- information, see+-- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+-- in the /Resource Access Manager User Guide/.+--+-- 'resourceArns', 'associateResourceShare_resourceArns' - Specifies a list of+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the resources that you want to share. This can be @null@ if you want+-- to add only principals.+--+-- 'resourceShareArn', 'associateResourceShare_resourceShareArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to add principals or resources to.+newAssociateResourceShare ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  AssociateResourceShare+newAssociateResourceShare pResourceShareArn_ =+  AssociateResourceShare'+    { clientToken =+        Prelude.Nothing,+      principals = Prelude.Nothing,+      resourceArns = Prelude.Nothing,+      resourceShareArn = pResourceShareArn_+    }++-- | Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+associateResourceShare_clientToken :: Lens.Lens' AssociateResourceShare (Prelude.Maybe Prelude.Text)+associateResourceShare_clientToken = Lens.lens (\AssociateResourceShare' {clientToken} -> clientToken) (\s@AssociateResourceShare' {} a -> s {clientToken = a} :: AssociateResourceShare)++-- | Specifies a list of principals to whom you want to the resource share.+-- This can be @null@ if you want to add only resources.+--+-- What the principals can do with the resources in the share is determined+-- by the RAM permissions that you associate with the resource share. See+-- AssociateResourceSharePermission.+--+-- You can include the following values:+--+-- -   An Amazon Web Services account ID, for example: @123456789012@+--+-- -   An+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of an organization in Organizations, for example:+--     @organizations::123456789012:organization\/o-exampleorgid@+--+-- -   An ARN of an organizational unit (OU) in Organizations, for example:+--     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+--+-- -   An ARN of an IAM role, for example:+--     @iam::123456789012:role\/rolename@+--+-- -   An ARN of an IAM user, for example:+--     @iam::123456789012user\/username@+--+-- Not all resource types can be shared with IAM roles and users. For more+-- information, see+-- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+-- in the /Resource Access Manager User Guide/.+associateResourceShare_principals :: Lens.Lens' AssociateResourceShare (Prelude.Maybe [Prelude.Text])+associateResourceShare_principals = Lens.lens (\AssociateResourceShare' {principals} -> principals) (\s@AssociateResourceShare' {} a -> s {principals = a} :: AssociateResourceShare) Prelude.. Lens.mapping Lens.coerced++-- | Specifies a list of+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the resources that you want to share. This can be @null@ if you want+-- to add only principals.+associateResourceShare_resourceArns :: Lens.Lens' AssociateResourceShare (Prelude.Maybe [Prelude.Text])+associateResourceShare_resourceArns = Lens.lens (\AssociateResourceShare' {resourceArns} -> resourceArns) (\s@AssociateResourceShare' {} a -> s {resourceArns = a} :: AssociateResourceShare) Prelude.. Lens.mapping Lens.coerced++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to add principals or resources to.+associateResourceShare_resourceShareArn :: Lens.Lens' AssociateResourceShare Prelude.Text+associateResourceShare_resourceShareArn = Lens.lens (\AssociateResourceShare' {resourceShareArn} -> resourceShareArn) (\s@AssociateResourceShare' {} a -> s {resourceShareArn = a} :: AssociateResourceShare)++instance Core.AWSRequest AssociateResourceShare where+  type+    AWSResponse AssociateResourceShare =+      AssociateResourceShareResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          AssociateResourceShareResponse'+            Prelude.<$> (x Data..?> "clientToken")+            Prelude.<*> ( x+                            Data..?> "resourceShareAssociations"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable AssociateResourceShare where+  hashWithSalt _salt AssociateResourceShare' {..} =+    _salt+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` principals+      `Prelude.hashWithSalt` resourceArns+      `Prelude.hashWithSalt` resourceShareArn++instance Prelude.NFData AssociateResourceShare where+  rnf AssociateResourceShare' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf principals+      `Prelude.seq` Prelude.rnf resourceArns+      `Prelude.seq` Prelude.rnf resourceShareArn++instance Data.ToHeaders AssociateResourceShare where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON AssociateResourceShare where+  toJSON AssociateResourceShare' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("clientToken" Data..=) Prelude.<$> clientToken,+            ("principals" Data..=) Prelude.<$> principals,+            ("resourceArns" Data..=) Prelude.<$> resourceArns,+            Prelude.Just+              ("resourceShareArn" Data..= resourceShareArn)+          ]+      )++instance Data.ToPath AssociateResourceShare where+  toPath = Prelude.const "/associateresourceshare"++instance Data.ToQuery AssociateResourceShare where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newAssociateResourceShareResponse' smart constructor.+data AssociateResourceShareResponse = AssociateResourceShareResponse'+  { -- | The idempotency identifier associated with this request. If you want to+    -- repeat the same operation in an idempotent manner then you must include+    -- this value in the @clientToken@ request parameter of that later call.+    -- All other parameters must also have the same values that you used in the+    -- first call.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain information about the associations.+    resourceShareAssociations :: Prelude.Maybe [ResourceShareAssociation],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateResourceShareResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'associateResourceShareResponse_clientToken' - The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+--+-- 'resourceShareAssociations', 'associateResourceShareResponse_resourceShareAssociations' - An array of objects that contain information about the associations.+--+-- 'httpStatus', 'associateResourceShareResponse_httpStatus' - The response's http status code.+newAssociateResourceShareResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  AssociateResourceShareResponse+newAssociateResourceShareResponse pHttpStatus_ =+  AssociateResourceShareResponse'+    { clientToken =+        Prelude.Nothing,+      resourceShareAssociations = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+associateResourceShareResponse_clientToken :: Lens.Lens' AssociateResourceShareResponse (Prelude.Maybe Prelude.Text)+associateResourceShareResponse_clientToken = Lens.lens (\AssociateResourceShareResponse' {clientToken} -> clientToken) (\s@AssociateResourceShareResponse' {} a -> s {clientToken = a} :: AssociateResourceShareResponse)++-- | An array of objects that contain information about the associations.+associateResourceShareResponse_resourceShareAssociations :: Lens.Lens' AssociateResourceShareResponse (Prelude.Maybe [ResourceShareAssociation])+associateResourceShareResponse_resourceShareAssociations = Lens.lens (\AssociateResourceShareResponse' {resourceShareAssociations} -> resourceShareAssociations) (\s@AssociateResourceShareResponse' {} a -> s {resourceShareAssociations = a} :: AssociateResourceShareResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+associateResourceShareResponse_httpStatus :: Lens.Lens' AssociateResourceShareResponse Prelude.Int+associateResourceShareResponse_httpStatus = Lens.lens (\AssociateResourceShareResponse' {httpStatus} -> httpStatus) (\s@AssociateResourceShareResponse' {} a -> s {httpStatus = a} :: AssociateResourceShareResponse)++instance+  Prelude.NFData+    AssociateResourceShareResponse+  where+  rnf AssociateResourceShareResponse' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShareAssociations+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/AssociateResourceSharePermission.hs view
@@ -0,0 +1,372 @@+{-# 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.RAM.AssociateResourceSharePermission+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds or replaces the RAM permission for a resource type included in a+-- resource share. You can have exactly one permission associated with each+-- resource type in the resource share. You can add a new RAM permission+-- only if there are currently no resources of that resource type currently+-- in the resource share.+module Amazonka.RAM.AssociateResourceSharePermission+  ( -- * Creating a Request+    AssociateResourceSharePermission (..),+    newAssociateResourceSharePermission,++    -- * Request Lenses+    associateResourceSharePermission_clientToken,+    associateResourceSharePermission_permissionVersion,+    associateResourceSharePermission_replace,+    associateResourceSharePermission_resourceShareArn,+    associateResourceSharePermission_permissionArn,++    -- * Destructuring the Response+    AssociateResourceSharePermissionResponse (..),+    newAssociateResourceSharePermissionResponse,++    -- * Response Lenses+    associateResourceSharePermissionResponse_clientToken,+    associateResourceSharePermissionResponse_returnValue,+    associateResourceSharePermissionResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newAssociateResourceSharePermission' smart constructor.+data AssociateResourceSharePermission = AssociateResourceSharePermission'+  { -- | Specifies a unique, case-sensitive identifier that you provide to ensure+    -- the idempotency of the request. This lets you safely retry the request+    -- without accidentally performing the same operation a second time.+    -- Passing the same value to a later call to an operation requires that you+    -- also pass the same value for all other parameters. We recommend that you+    -- use a+    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+    --+    -- If you don\'t provide this value, then Amazon Web Services generates a+    -- random one for you.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies the version of the RAM permission to associate with the+    -- resource share. If you don\'t specify this parameter, the operation uses+    -- the version designated as the default. You can use the+    -- ListPermissionVersions operation to discover the available versions of a+    -- permission.+    permissionVersion :: Prelude.Maybe Prelude.Int,+    -- | Specifies whether the specified permission should replace or add to the+    -- existing permission associated with the resource share. Use @true@ to+    -- replace the current permissions. Use @false@ to add the permission to+    -- the current permission. The default value is @false@.+    --+    -- A resource share can have only one permission per resource type. If a+    -- resource share already has a permission for the specified resource type+    -- and you don\'t set @replace@ to @true@ then the operation returns an+    -- error. This helps prevent accidental overwriting of a permission.+    replace :: Prelude.Maybe Prelude.Bool,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share to which you want to add or replace permissions.+    resourceShareArn :: Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the RAM permission to associate with the resource share. To find the+    -- ARN for a permission, use either the ListPermissions operation or go to+    -- the+    -- <https://console.aws.amazon.com/ram/home#Permissions: Permissions library>+    -- page in the RAM console and then choose the name of the permission. The+    -- ARN is displayed on the detail page.+    permissionArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateResourceSharePermission' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'associateResourceSharePermission_clientToken' - Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+--+-- 'permissionVersion', 'associateResourceSharePermission_permissionVersion' - Specifies the version of the RAM permission to associate with the+-- resource share. If you don\'t specify this parameter, the operation uses+-- the version designated as the default. You can use the+-- ListPermissionVersions operation to discover the available versions of a+-- permission.+--+-- 'replace', 'associateResourceSharePermission_replace' - Specifies whether the specified permission should replace or add to the+-- existing permission associated with the resource share. Use @true@ to+-- replace the current permissions. Use @false@ to add the permission to+-- the current permission. The default value is @false@.+--+-- A resource share can have only one permission per resource type. If a+-- resource share already has a permission for the specified resource type+-- and you don\'t set @replace@ to @true@ then the operation returns an+-- error. This helps prevent accidental overwriting of a permission.+--+-- 'resourceShareArn', 'associateResourceSharePermission_resourceShareArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share to which you want to add or replace permissions.+--+-- 'permissionArn', 'associateResourceSharePermission_permissionArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the RAM permission to associate with the resource share. To find the+-- ARN for a permission, use either the ListPermissions operation or go to+-- the+-- <https://console.aws.amazon.com/ram/home#Permissions: Permissions library>+-- page in the RAM console and then choose the name of the permission. The+-- ARN is displayed on the detail page.+newAssociateResourceSharePermission ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  -- | 'permissionArn'+  Prelude.Text ->+  AssociateResourceSharePermission+newAssociateResourceSharePermission+  pResourceShareArn_+  pPermissionArn_ =+    AssociateResourceSharePermission'+      { clientToken =+          Prelude.Nothing,+        permissionVersion = Prelude.Nothing,+        replace = Prelude.Nothing,+        resourceShareArn = pResourceShareArn_,+        permissionArn = pPermissionArn_+      }++-- | Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+associateResourceSharePermission_clientToken :: Lens.Lens' AssociateResourceSharePermission (Prelude.Maybe Prelude.Text)+associateResourceSharePermission_clientToken = Lens.lens (\AssociateResourceSharePermission' {clientToken} -> clientToken) (\s@AssociateResourceSharePermission' {} a -> s {clientToken = a} :: AssociateResourceSharePermission)++-- | Specifies the version of the RAM permission to associate with the+-- resource share. If you don\'t specify this parameter, the operation uses+-- the version designated as the default. You can use the+-- ListPermissionVersions operation to discover the available versions of a+-- permission.+associateResourceSharePermission_permissionVersion :: Lens.Lens' AssociateResourceSharePermission (Prelude.Maybe Prelude.Int)+associateResourceSharePermission_permissionVersion = Lens.lens (\AssociateResourceSharePermission' {permissionVersion} -> permissionVersion) (\s@AssociateResourceSharePermission' {} a -> s {permissionVersion = a} :: AssociateResourceSharePermission)++-- | Specifies whether the specified permission should replace or add to the+-- existing permission associated with the resource share. Use @true@ to+-- replace the current permissions. Use @false@ to add the permission to+-- the current permission. The default value is @false@.+--+-- A resource share can have only one permission per resource type. If a+-- resource share already has a permission for the specified resource type+-- and you don\'t set @replace@ to @true@ then the operation returns an+-- error. This helps prevent accidental overwriting of a permission.+associateResourceSharePermission_replace :: Lens.Lens' AssociateResourceSharePermission (Prelude.Maybe Prelude.Bool)+associateResourceSharePermission_replace = Lens.lens (\AssociateResourceSharePermission' {replace} -> replace) (\s@AssociateResourceSharePermission' {} a -> s {replace = a} :: AssociateResourceSharePermission)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share to which you want to add or replace permissions.+associateResourceSharePermission_resourceShareArn :: Lens.Lens' AssociateResourceSharePermission Prelude.Text+associateResourceSharePermission_resourceShareArn = Lens.lens (\AssociateResourceSharePermission' {resourceShareArn} -> resourceShareArn) (\s@AssociateResourceSharePermission' {} a -> s {resourceShareArn = a} :: AssociateResourceSharePermission)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the RAM permission to associate with the resource share. To find the+-- ARN for a permission, use either the ListPermissions operation or go to+-- the+-- <https://console.aws.amazon.com/ram/home#Permissions: Permissions library>+-- page in the RAM console and then choose the name of the permission. The+-- ARN is displayed on the detail page.+associateResourceSharePermission_permissionArn :: Lens.Lens' AssociateResourceSharePermission Prelude.Text+associateResourceSharePermission_permissionArn = Lens.lens (\AssociateResourceSharePermission' {permissionArn} -> permissionArn) (\s@AssociateResourceSharePermission' {} a -> s {permissionArn = a} :: AssociateResourceSharePermission)++instance+  Core.AWSRequest+    AssociateResourceSharePermission+  where+  type+    AWSResponse AssociateResourceSharePermission =+      AssociateResourceSharePermissionResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          AssociateResourceSharePermissionResponse'+            Prelude.<$> (x Data..?> "clientToken")+            Prelude.<*> (x Data..?> "returnValue")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    AssociateResourceSharePermission+  where+  hashWithSalt+    _salt+    AssociateResourceSharePermission' {..} =+      _salt+        `Prelude.hashWithSalt` clientToken+        `Prelude.hashWithSalt` permissionVersion+        `Prelude.hashWithSalt` replace+        `Prelude.hashWithSalt` resourceShareArn+        `Prelude.hashWithSalt` permissionArn++instance+  Prelude.NFData+    AssociateResourceSharePermission+  where+  rnf AssociateResourceSharePermission' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf permissionVersion+      `Prelude.seq` Prelude.rnf replace+      `Prelude.seq` Prelude.rnf resourceShareArn+      `Prelude.seq` Prelude.rnf permissionArn++instance+  Data.ToHeaders+    AssociateResourceSharePermission+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON AssociateResourceSharePermission where+  toJSON AssociateResourceSharePermission' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("clientToken" Data..=) Prelude.<$> clientToken,+            ("permissionVersion" Data..=)+              Prelude.<$> permissionVersion,+            ("replace" Data..=) Prelude.<$> replace,+            Prelude.Just+              ("resourceShareArn" Data..= resourceShareArn),+            Prelude.Just+              ("permissionArn" Data..= permissionArn)+          ]+      )++instance Data.ToPath AssociateResourceSharePermission where+  toPath =+    Prelude.const "/associateresourcesharepermission"++instance+  Data.ToQuery+    AssociateResourceSharePermission+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newAssociateResourceSharePermissionResponse' smart constructor.+data AssociateResourceSharePermissionResponse = AssociateResourceSharePermissionResponse'+  { -- | The idempotency identifier associated with this request. If you want to+    -- repeat the same operation in an idempotent manner then you must include+    -- this value in the @clientToken@ request parameter of that later call.+    -- All other parameters must also have the same values that you used in the+    -- first call.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | A return value of @true@ indicates that the request succeeded. A value+    -- of @false@ indicates that the request failed.+    returnValue :: Prelude.Maybe Prelude.Bool,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateResourceSharePermissionResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'associateResourceSharePermissionResponse_clientToken' - The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+--+-- 'returnValue', 'associateResourceSharePermissionResponse_returnValue' - A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+--+-- 'httpStatus', 'associateResourceSharePermissionResponse_httpStatus' - The response's http status code.+newAssociateResourceSharePermissionResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  AssociateResourceSharePermissionResponse+newAssociateResourceSharePermissionResponse+  pHttpStatus_ =+    AssociateResourceSharePermissionResponse'+      { clientToken =+          Prelude.Nothing,+        returnValue = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+associateResourceSharePermissionResponse_clientToken :: Lens.Lens' AssociateResourceSharePermissionResponse (Prelude.Maybe Prelude.Text)+associateResourceSharePermissionResponse_clientToken = Lens.lens (\AssociateResourceSharePermissionResponse' {clientToken} -> clientToken) (\s@AssociateResourceSharePermissionResponse' {} a -> s {clientToken = a} :: AssociateResourceSharePermissionResponse)++-- | A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+associateResourceSharePermissionResponse_returnValue :: Lens.Lens' AssociateResourceSharePermissionResponse (Prelude.Maybe Prelude.Bool)+associateResourceSharePermissionResponse_returnValue = Lens.lens (\AssociateResourceSharePermissionResponse' {returnValue} -> returnValue) (\s@AssociateResourceSharePermissionResponse' {} a -> s {returnValue = a} :: AssociateResourceSharePermissionResponse)++-- | The response's http status code.+associateResourceSharePermissionResponse_httpStatus :: Lens.Lens' AssociateResourceSharePermissionResponse Prelude.Int+associateResourceSharePermissionResponse_httpStatus = Lens.lens (\AssociateResourceSharePermissionResponse' {httpStatus} -> httpStatus) (\s@AssociateResourceSharePermissionResponse' {} a -> s {httpStatus = a} :: AssociateResourceSharePermissionResponse)++instance+  Prelude.NFData+    AssociateResourceSharePermissionResponse+  where+  rnf AssociateResourceSharePermissionResponse' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf returnValue+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/CreateResourceShare.hs view
@@ -0,0 +1,424 @@+{-# 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.RAM.CreateResourceShare+-- 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 resource share. You can provide a list of the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- for the resources that you want to share, a list of principals you want+-- to share the resources with, and the permissions to grant those+-- principals.+--+-- Sharing a resource makes it available for use by principals outside of+-- the Amazon Web Services account that created the resource. Sharing+-- doesn\'t change any permissions or quotas that apply to the resource in+-- the account that created it.+module Amazonka.RAM.CreateResourceShare+  ( -- * Creating a Request+    CreateResourceShare (..),+    newCreateResourceShare,++    -- * Request Lenses+    createResourceShare_allowExternalPrincipals,+    createResourceShare_clientToken,+    createResourceShare_permissionArns,+    createResourceShare_principals,+    createResourceShare_resourceArns,+    createResourceShare_tags,+    createResourceShare_name,++    -- * Destructuring the Response+    CreateResourceShareResponse (..),+    newCreateResourceShareResponse,++    -- * Response Lenses+    createResourceShareResponse_clientToken,+    createResourceShareResponse_resourceShare,+    createResourceShareResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateResourceShare' smart constructor.+data CreateResourceShare = CreateResourceShare'+  { -- | Specifies whether principals outside your organization in Organizations+    -- can be associated with a resource share. A value of @true@ lets you+    -- share with individual Amazon Web Services accounts that are /not/ in+    -- your organization. A value of @false@ only has meaning if your account+    -- is a member of an Amazon Web Services Organization. The default value is+    -- @true@.+    allowExternalPrincipals :: Prelude.Maybe Prelude.Bool,+    -- | Specifies a unique, case-sensitive identifier that you provide to ensure+    -- the idempotency of the request. This lets you safely retry the request+    -- without accidentally performing the same operation a second time.+    -- Passing the same value to a later call to an operation requires that you+    -- also pass the same value for all other parameters. We recommend that you+    -- use a+    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+    --+    -- If you don\'t provide this value, then Amazon Web Services generates a+    -- random one for you.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    -- of the RAM permission to associate with the resource share. If you do+    -- not specify an ARN for the permission, RAM automatically attaches the+    -- default version of the permission for each resource type. You can+    -- associate only one permission with each resource type included in the+    -- resource share.+    permissionArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies a list of one or more principals to associate with the+    -- resource share.+    --+    -- You can include the following values:+    --+    -- -   An Amazon Web Services account ID, for example: @123456789012@+    --+    -- -   An+    --     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    --     of an organization in Organizations, for example:+    --     @organizations::123456789012:organization\/o-exampleorgid@+    --+    -- -   An ARN of an organizational unit (OU) in Organizations, for example:+    --     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+    --+    -- -   An ARN of an IAM role, for example:+    --     @iam::123456789012:role\/rolename@+    --+    -- -   An ARN of an IAM user, for example:+    --     @iam::123456789012user\/username@+    --+    -- Not all resource types can be shared with IAM roles and users. For more+    -- information, see+    -- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+    -- in the /Resource Access Manager User Guide/.+    principals :: Prelude.Maybe [Prelude.Text],+    -- | Specifies a list of one or more ARNs of the resources to associate with+    -- the resource share.+    resourceArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies one or more tags to attach to the resource share itself. It+    -- doesn\'t attach the tags to the resources associated with the resource+    -- share.+    tags :: Prelude.Maybe [Tag],+    -- | Specifies the name of the resource share.+    name :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateResourceShare' 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:+--+-- 'allowExternalPrincipals', 'createResourceShare_allowExternalPrincipals' - Specifies whether principals outside your organization in Organizations+-- can be associated with a resource share. A value of @true@ lets you+-- share with individual Amazon Web Services accounts that are /not/ in+-- your organization. A value of @false@ only has meaning if your account+-- is a member of an Amazon Web Services Organization. The default value is+-- @true@.+--+-- 'clientToken', 'createResourceShare_clientToken' - Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+--+-- 'permissionArns', 'createResourceShare_permissionArns' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the RAM permission to associate with the resource share. If you do+-- not specify an ARN for the permission, RAM automatically attaches the+-- default version of the permission for each resource type. You can+-- associate only one permission with each resource type included in the+-- resource share.+--+-- 'principals', 'createResourceShare_principals' - Specifies a list of one or more principals to associate with the+-- resource share.+--+-- You can include the following values:+--+-- -   An Amazon Web Services account ID, for example: @123456789012@+--+-- -   An+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of an organization in Organizations, for example:+--     @organizations::123456789012:organization\/o-exampleorgid@+--+-- -   An ARN of an organizational unit (OU) in Organizations, for example:+--     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+--+-- -   An ARN of an IAM role, for example:+--     @iam::123456789012:role\/rolename@+--+-- -   An ARN of an IAM user, for example:+--     @iam::123456789012user\/username@+--+-- Not all resource types can be shared with IAM roles and users. For more+-- information, see+-- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+-- in the /Resource Access Manager User Guide/.+--+-- 'resourceArns', 'createResourceShare_resourceArns' - Specifies a list of one or more ARNs of the resources to associate with+-- the resource share.+--+-- 'tags', 'createResourceShare_tags' - Specifies one or more tags to attach to the resource share itself. It+-- doesn\'t attach the tags to the resources associated with the resource+-- share.+--+-- 'name', 'createResourceShare_name' - Specifies the name of the resource share.+newCreateResourceShare ::+  -- | 'name'+  Prelude.Text ->+  CreateResourceShare+newCreateResourceShare pName_ =+  CreateResourceShare'+    { allowExternalPrincipals =+        Prelude.Nothing,+      clientToken = Prelude.Nothing,+      permissionArns = Prelude.Nothing,+      principals = Prelude.Nothing,+      resourceArns = Prelude.Nothing,+      tags = Prelude.Nothing,+      name = pName_+    }++-- | Specifies whether principals outside your organization in Organizations+-- can be associated with a resource share. A value of @true@ lets you+-- share with individual Amazon Web Services accounts that are /not/ in+-- your organization. A value of @false@ only has meaning if your account+-- is a member of an Amazon Web Services Organization. The default value is+-- @true@.+createResourceShare_allowExternalPrincipals :: Lens.Lens' CreateResourceShare (Prelude.Maybe Prelude.Bool)+createResourceShare_allowExternalPrincipals = Lens.lens (\CreateResourceShare' {allowExternalPrincipals} -> allowExternalPrincipals) (\s@CreateResourceShare' {} a -> s {allowExternalPrincipals = a} :: CreateResourceShare)++-- | Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+createResourceShare_clientToken :: Lens.Lens' CreateResourceShare (Prelude.Maybe Prelude.Text)+createResourceShare_clientToken = Lens.lens (\CreateResourceShare' {clientToken} -> clientToken) (\s@CreateResourceShare' {} a -> s {clientToken = a} :: CreateResourceShare)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the RAM permission to associate with the resource share. If you do+-- not specify an ARN for the permission, RAM automatically attaches the+-- default version of the permission for each resource type. You can+-- associate only one permission with each resource type included in the+-- resource share.+createResourceShare_permissionArns :: Lens.Lens' CreateResourceShare (Prelude.Maybe [Prelude.Text])+createResourceShare_permissionArns = Lens.lens (\CreateResourceShare' {permissionArns} -> permissionArns) (\s@CreateResourceShare' {} a -> s {permissionArns = a} :: CreateResourceShare) Prelude.. Lens.mapping Lens.coerced++-- | Specifies a list of one or more principals to associate with the+-- resource share.+--+-- You can include the following values:+--+-- -   An Amazon Web Services account ID, for example: @123456789012@+--+-- -   An+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of an organization in Organizations, for example:+--     @organizations::123456789012:organization\/o-exampleorgid@+--+-- -   An ARN of an organizational unit (OU) in Organizations, for example:+--     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+--+-- -   An ARN of an IAM role, for example:+--     @iam::123456789012:role\/rolename@+--+-- -   An ARN of an IAM user, for example:+--     @iam::123456789012user\/username@+--+-- Not all resource types can be shared with IAM roles and users. For more+-- information, see+-- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+-- in the /Resource Access Manager User Guide/.+createResourceShare_principals :: Lens.Lens' CreateResourceShare (Prelude.Maybe [Prelude.Text])+createResourceShare_principals = Lens.lens (\CreateResourceShare' {principals} -> principals) (\s@CreateResourceShare' {} a -> s {principals = a} :: CreateResourceShare) Prelude.. Lens.mapping Lens.coerced++-- | Specifies a list of one or more ARNs of the resources to associate with+-- the resource share.+createResourceShare_resourceArns :: Lens.Lens' CreateResourceShare (Prelude.Maybe [Prelude.Text])+createResourceShare_resourceArns = Lens.lens (\CreateResourceShare' {resourceArns} -> resourceArns) (\s@CreateResourceShare' {} a -> s {resourceArns = a} :: CreateResourceShare) Prelude.. Lens.mapping Lens.coerced++-- | Specifies one or more tags to attach to the resource share itself. It+-- doesn\'t attach the tags to the resources associated with the resource+-- share.+createResourceShare_tags :: Lens.Lens' CreateResourceShare (Prelude.Maybe [Tag])+createResourceShare_tags = Lens.lens (\CreateResourceShare' {tags} -> tags) (\s@CreateResourceShare' {} a -> s {tags = a} :: CreateResourceShare) Prelude.. Lens.mapping Lens.coerced++-- | Specifies the name of the resource share.+createResourceShare_name :: Lens.Lens' CreateResourceShare Prelude.Text+createResourceShare_name = Lens.lens (\CreateResourceShare' {name} -> name) (\s@CreateResourceShare' {} a -> s {name = a} :: CreateResourceShare)++instance Core.AWSRequest CreateResourceShare where+  type+    AWSResponse CreateResourceShare =+      CreateResourceShareResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateResourceShareResponse'+            Prelude.<$> (x Data..?> "clientToken")+            Prelude.<*> (x Data..?> "resourceShare")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateResourceShare where+  hashWithSalt _salt CreateResourceShare' {..} =+    _salt+      `Prelude.hashWithSalt` allowExternalPrincipals+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` permissionArns+      `Prelude.hashWithSalt` principals+      `Prelude.hashWithSalt` resourceArns+      `Prelude.hashWithSalt` tags+      `Prelude.hashWithSalt` name++instance Prelude.NFData CreateResourceShare where+  rnf CreateResourceShare' {..} =+    Prelude.rnf allowExternalPrincipals+      `Prelude.seq` Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf permissionArns+      `Prelude.seq` Prelude.rnf principals+      `Prelude.seq` Prelude.rnf resourceArns+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders CreateResourceShare where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateResourceShare where+  toJSON CreateResourceShare' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("allowExternalPrincipals" Data..=)+              Prelude.<$> allowExternalPrincipals,+            ("clientToken" Data..=) Prelude.<$> clientToken,+            ("permissionArns" Data..=)+              Prelude.<$> permissionArns,+            ("principals" Data..=) Prelude.<$> principals,+            ("resourceArns" Data..=) Prelude.<$> resourceArns,+            ("tags" Data..=) Prelude.<$> tags,+            Prelude.Just ("name" Data..= name)+          ]+      )++instance Data.ToPath CreateResourceShare where+  toPath = Prelude.const "/createresourceshare"++instance Data.ToQuery CreateResourceShare where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateResourceShareResponse' smart constructor.+data CreateResourceShareResponse = CreateResourceShareResponse'+  { -- | The idempotency identifier associated with this request. If you want to+    -- repeat the same operation in an idempotent manner then you must include+    -- this value in the @clientToken@ request parameter of that later call.+    -- All other parameters must also have the same values that you used in the+    -- first call.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | An object with information about the new resource share.+    resourceShare :: Prelude.Maybe ResourceShare,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateResourceShareResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'createResourceShareResponse_clientToken' - The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+--+-- 'resourceShare', 'createResourceShareResponse_resourceShare' - An object with information about the new resource share.+--+-- 'httpStatus', 'createResourceShareResponse_httpStatus' - The response's http status code.+newCreateResourceShareResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateResourceShareResponse+newCreateResourceShareResponse pHttpStatus_ =+  CreateResourceShareResponse'+    { clientToken =+        Prelude.Nothing,+      resourceShare = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+createResourceShareResponse_clientToken :: Lens.Lens' CreateResourceShareResponse (Prelude.Maybe Prelude.Text)+createResourceShareResponse_clientToken = Lens.lens (\CreateResourceShareResponse' {clientToken} -> clientToken) (\s@CreateResourceShareResponse' {} a -> s {clientToken = a} :: CreateResourceShareResponse)++-- | An object with information about the new resource share.+createResourceShareResponse_resourceShare :: Lens.Lens' CreateResourceShareResponse (Prelude.Maybe ResourceShare)+createResourceShareResponse_resourceShare = Lens.lens (\CreateResourceShareResponse' {resourceShare} -> resourceShare) (\s@CreateResourceShareResponse' {} a -> s {resourceShare = a} :: CreateResourceShareResponse)++-- | The response's http status code.+createResourceShareResponse_httpStatus :: Lens.Lens' CreateResourceShareResponse Prelude.Int+createResourceShareResponse_httpStatus = Lens.lens (\CreateResourceShareResponse' {httpStatus} -> httpStatus) (\s@CreateResourceShareResponse' {} a -> s {httpStatus = a} :: CreateResourceShareResponse)++instance Prelude.NFData CreateResourceShareResponse where+  rnf CreateResourceShareResponse' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShare+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/DeleteResourceShare.hs view
@@ -0,0 +1,240 @@+{-# 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.RAM.DeleteResourceShare+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified resource share. This doesn\'t delete any of the+-- resources that were associated with the resource share; it only stops+-- the sharing of those resources outside of the Amazon Web Services+-- account that created them.+module Amazonka.RAM.DeleteResourceShare+  ( -- * Creating a Request+    DeleteResourceShare (..),+    newDeleteResourceShare,++    -- * Request Lenses+    deleteResourceShare_clientToken,+    deleteResourceShare_resourceShareArn,++    -- * Destructuring the Response+    DeleteResourceShareResponse (..),+    newDeleteResourceShareResponse,++    -- * Response Lenses+    deleteResourceShareResponse_clientToken,+    deleteResourceShareResponse_returnValue,+    deleteResourceShareResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteResourceShare' smart constructor.+data DeleteResourceShare = DeleteResourceShare'+  { -- | Specifies a unique, case-sensitive identifier that you provide to ensure+    -- the idempotency of the request. This lets you safely retry the request+    -- without accidentally performing the same operation a second time.+    -- Passing the same value to a later call to an operation requires that you+    -- also pass the same value for all other parameters. We recommend that you+    -- use a+    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+    --+    -- If you don\'t provide this value, then Amazon Web Services generates a+    -- random one for you.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share to delete.+    resourceShareArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteResourceShare' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'deleteResourceShare_clientToken' - Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+--+-- 'resourceShareArn', 'deleteResourceShare_resourceShareArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share to delete.+newDeleteResourceShare ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  DeleteResourceShare+newDeleteResourceShare pResourceShareArn_ =+  DeleteResourceShare'+    { clientToken = Prelude.Nothing,+      resourceShareArn = pResourceShareArn_+    }++-- | Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+deleteResourceShare_clientToken :: Lens.Lens' DeleteResourceShare (Prelude.Maybe Prelude.Text)+deleteResourceShare_clientToken = Lens.lens (\DeleteResourceShare' {clientToken} -> clientToken) (\s@DeleteResourceShare' {} a -> s {clientToken = a} :: DeleteResourceShare)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share to delete.+deleteResourceShare_resourceShareArn :: Lens.Lens' DeleteResourceShare Prelude.Text+deleteResourceShare_resourceShareArn = Lens.lens (\DeleteResourceShare' {resourceShareArn} -> resourceShareArn) (\s@DeleteResourceShare' {} a -> s {resourceShareArn = a} :: DeleteResourceShare)++instance Core.AWSRequest DeleteResourceShare where+  type+    AWSResponse DeleteResourceShare =+      DeleteResourceShareResponse+  request overrides =+    Request.delete (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DeleteResourceShareResponse'+            Prelude.<$> (x Data..?> "clientToken")+            Prelude.<*> (x Data..?> "returnValue")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteResourceShare where+  hashWithSalt _salt DeleteResourceShare' {..} =+    _salt+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` resourceShareArn++instance Prelude.NFData DeleteResourceShare where+  rnf DeleteResourceShare' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShareArn++instance Data.ToHeaders DeleteResourceShare where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath DeleteResourceShare where+  toPath = Prelude.const "/deleteresourceshare"++instance Data.ToQuery DeleteResourceShare where+  toQuery DeleteResourceShare' {..} =+    Prelude.mconcat+      [ "clientToken" Data.=: clientToken,+        "resourceShareArn" Data.=: resourceShareArn+      ]++-- | /See:/ 'newDeleteResourceShareResponse' smart constructor.+data DeleteResourceShareResponse = DeleteResourceShareResponse'+  { -- | The idempotency identifier associated with this request. If you want to+    -- repeat the same operation in an idempotent manner then you must include+    -- this value in the @clientToken@ request parameter of that later call.+    -- All other parameters must also have the same values that you used in the+    -- first call.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | A return value of @true@ indicates that the request succeeded. A value+    -- of @false@ indicates that the request failed.+    returnValue :: Prelude.Maybe Prelude.Bool,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteResourceShareResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'deleteResourceShareResponse_clientToken' - The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+--+-- 'returnValue', 'deleteResourceShareResponse_returnValue' - A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+--+-- 'httpStatus', 'deleteResourceShareResponse_httpStatus' - The response's http status code.+newDeleteResourceShareResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteResourceShareResponse+newDeleteResourceShareResponse pHttpStatus_ =+  DeleteResourceShareResponse'+    { clientToken =+        Prelude.Nothing,+      returnValue = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+deleteResourceShareResponse_clientToken :: Lens.Lens' DeleteResourceShareResponse (Prelude.Maybe Prelude.Text)+deleteResourceShareResponse_clientToken = Lens.lens (\DeleteResourceShareResponse' {clientToken} -> clientToken) (\s@DeleteResourceShareResponse' {} a -> s {clientToken = a} :: DeleteResourceShareResponse)++-- | A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+deleteResourceShareResponse_returnValue :: Lens.Lens' DeleteResourceShareResponse (Prelude.Maybe Prelude.Bool)+deleteResourceShareResponse_returnValue = Lens.lens (\DeleteResourceShareResponse' {returnValue} -> returnValue) (\s@DeleteResourceShareResponse' {} a -> s {returnValue = a} :: DeleteResourceShareResponse)++-- | The response's http status code.+deleteResourceShareResponse_httpStatus :: Lens.Lens' DeleteResourceShareResponse Prelude.Int+deleteResourceShareResponse_httpStatus = Lens.lens (\DeleteResourceShareResponse' {httpStatus} -> httpStatus) (\s@DeleteResourceShareResponse' {} a -> s {httpStatus = a} :: DeleteResourceShareResponse)++instance Prelude.NFData DeleteResourceShareResponse where+  rnf DeleteResourceShareResponse' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf returnValue+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/DisassociateResourceShare.hs view
@@ -0,0 +1,365 @@+{-# 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.RAM.DisassociateResourceShare+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Disassociates the specified principals or resources from the specified+-- resource share.+module Amazonka.RAM.DisassociateResourceShare+  ( -- * Creating a Request+    DisassociateResourceShare (..),+    newDisassociateResourceShare,++    -- * Request Lenses+    disassociateResourceShare_clientToken,+    disassociateResourceShare_principals,+    disassociateResourceShare_resourceArns,+    disassociateResourceShare_resourceShareArn,++    -- * Destructuring the Response+    DisassociateResourceShareResponse (..),+    newDisassociateResourceShareResponse,++    -- * Response Lenses+    disassociateResourceShareResponse_clientToken,+    disassociateResourceShareResponse_resourceShareAssociations,+    disassociateResourceShareResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisassociateResourceShare' smart constructor.+data DisassociateResourceShare = DisassociateResourceShare'+  { -- | Specifies a unique, case-sensitive identifier that you provide to ensure+    -- the idempotency of the request. This lets you safely retry the request+    -- without accidentally performing the same operation a second time.+    -- Passing the same value to a later call to an operation requires that you+    -- also pass the same value for all other parameters. We recommend that you+    -- use a+    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+    --+    -- If you don\'t provide this value, then Amazon Web Services generates a+    -- random one for you.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies a list of one or more principals that no longer are to have+    -- access to the resources in this resource share.+    --+    -- You can include the following values:+    --+    -- -   An Amazon Web Services account ID, for example: @123456789012@+    --+    -- -   An+    --     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    --     of an organization in Organizations, for example:+    --     @organizations::123456789012:organization\/o-exampleorgid@+    --+    -- -   An ARN of an organizational unit (OU) in Organizations, for example:+    --     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+    --+    -- -   An ARN of an IAM role, for example:+    --     @iam::123456789012:role\/rolename@+    --+    -- -   An ARN of an IAM user, for example:+    --     @iam::123456789012user\/username@+    --+    -- Not all resource types can be shared with IAM roles and users. For more+    -- information, see+    -- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+    -- in the /Resource Access Manager User Guide/.+    principals :: Prelude.Maybe [Prelude.Text],+    -- | Specifies a list of+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    -- for one or more resources that you want to remove from the resource+    -- share. After the operation runs, these resources are no longer shared+    -- with principals outside of the Amazon Web Services account that created+    -- the resources.+    resourceArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share that you want to remove resources from.+    resourceShareArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateResourceShare' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'disassociateResourceShare_clientToken' - Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+--+-- 'principals', 'disassociateResourceShare_principals' - Specifies a list of one or more principals that no longer are to have+-- access to the resources in this resource share.+--+-- You can include the following values:+--+-- -   An Amazon Web Services account ID, for example: @123456789012@+--+-- -   An+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of an organization in Organizations, for example:+--     @organizations::123456789012:organization\/o-exampleorgid@+--+-- -   An ARN of an organizational unit (OU) in Organizations, for example:+--     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+--+-- -   An ARN of an IAM role, for example:+--     @iam::123456789012:role\/rolename@+--+-- -   An ARN of an IAM user, for example:+--     @iam::123456789012user\/username@+--+-- Not all resource types can be shared with IAM roles and users. For more+-- information, see+-- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+-- in the /Resource Access Manager User Guide/.+--+-- 'resourceArns', 'disassociateResourceShare_resourceArns' - Specifies a list of+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- for one or more resources that you want to remove from the resource+-- share. After the operation runs, these resources are no longer shared+-- with principals outside of the Amazon Web Services account that created+-- the resources.+--+-- 'resourceShareArn', 'disassociateResourceShare_resourceShareArn' - Specifies+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to remove resources from.+newDisassociateResourceShare ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  DisassociateResourceShare+newDisassociateResourceShare pResourceShareArn_ =+  DisassociateResourceShare'+    { clientToken =+        Prelude.Nothing,+      principals = Prelude.Nothing,+      resourceArns = Prelude.Nothing,+      resourceShareArn = pResourceShareArn_+    }++-- | Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+disassociateResourceShare_clientToken :: Lens.Lens' DisassociateResourceShare (Prelude.Maybe Prelude.Text)+disassociateResourceShare_clientToken = Lens.lens (\DisassociateResourceShare' {clientToken} -> clientToken) (\s@DisassociateResourceShare' {} a -> s {clientToken = a} :: DisassociateResourceShare)++-- | Specifies a list of one or more principals that no longer are to have+-- access to the resources in this resource share.+--+-- You can include the following values:+--+-- -   An Amazon Web Services account ID, for example: @123456789012@+--+-- -   An+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of an organization in Organizations, for example:+--     @organizations::123456789012:organization\/o-exampleorgid@+--+-- -   An ARN of an organizational unit (OU) in Organizations, for example:+--     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+--+-- -   An ARN of an IAM role, for example:+--     @iam::123456789012:role\/rolename@+--+-- -   An ARN of an IAM user, for example:+--     @iam::123456789012user\/username@+--+-- Not all resource types can be shared with IAM roles and users. For more+-- information, see+-- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+-- in the /Resource Access Manager User Guide/.+disassociateResourceShare_principals :: Lens.Lens' DisassociateResourceShare (Prelude.Maybe [Prelude.Text])+disassociateResourceShare_principals = Lens.lens (\DisassociateResourceShare' {principals} -> principals) (\s@DisassociateResourceShare' {} a -> s {principals = a} :: DisassociateResourceShare) Prelude.. Lens.mapping Lens.coerced++-- | Specifies a list of+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- for one or more resources that you want to remove from the resource+-- share. After the operation runs, these resources are no longer shared+-- with principals outside of the Amazon Web Services account that created+-- the resources.+disassociateResourceShare_resourceArns :: Lens.Lens' DisassociateResourceShare (Prelude.Maybe [Prelude.Text])+disassociateResourceShare_resourceArns = Lens.lens (\DisassociateResourceShare' {resourceArns} -> resourceArns) (\s@DisassociateResourceShare' {} a -> s {resourceArns = a} :: DisassociateResourceShare) Prelude.. Lens.mapping Lens.coerced++-- | Specifies+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to remove resources from.+disassociateResourceShare_resourceShareArn :: Lens.Lens' DisassociateResourceShare Prelude.Text+disassociateResourceShare_resourceShareArn = Lens.lens (\DisassociateResourceShare' {resourceShareArn} -> resourceShareArn) (\s@DisassociateResourceShare' {} a -> s {resourceShareArn = a} :: DisassociateResourceShare)++instance Core.AWSRequest DisassociateResourceShare where+  type+    AWSResponse DisassociateResourceShare =+      DisassociateResourceShareResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DisassociateResourceShareResponse'+            Prelude.<$> (x Data..?> "clientToken")+            Prelude.<*> ( x+                            Data..?> "resourceShareAssociations"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DisassociateResourceShare where+  hashWithSalt _salt DisassociateResourceShare' {..} =+    _salt+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` principals+      `Prelude.hashWithSalt` resourceArns+      `Prelude.hashWithSalt` resourceShareArn++instance Prelude.NFData DisassociateResourceShare where+  rnf DisassociateResourceShare' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf principals+      `Prelude.seq` Prelude.rnf resourceArns+      `Prelude.seq` Prelude.rnf resourceShareArn++instance Data.ToHeaders DisassociateResourceShare where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DisassociateResourceShare where+  toJSON DisassociateResourceShare' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("clientToken" Data..=) Prelude.<$> clientToken,+            ("principals" Data..=) Prelude.<$> principals,+            ("resourceArns" Data..=) Prelude.<$> resourceArns,+            Prelude.Just+              ("resourceShareArn" Data..= resourceShareArn)+          ]+      )++instance Data.ToPath DisassociateResourceShare where+  toPath = Prelude.const "/disassociateresourceshare"++instance Data.ToQuery DisassociateResourceShare where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisassociateResourceShareResponse' smart constructor.+data DisassociateResourceShareResponse = DisassociateResourceShareResponse'+  { -- | The idempotency identifier associated with this request. If you want to+    -- repeat the same operation in an idempotent manner then you must include+    -- this value in the @clientToken@ request parameter of that later call.+    -- All other parameters must also have the same values that you used in the+    -- first call.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain information about the updated+    -- associations for this resource share.+    resourceShareAssociations :: Prelude.Maybe [ResourceShareAssociation],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateResourceShareResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'disassociateResourceShareResponse_clientToken' - The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+--+-- 'resourceShareAssociations', 'disassociateResourceShareResponse_resourceShareAssociations' - An array of objects that contain information about the updated+-- associations for this resource share.+--+-- 'httpStatus', 'disassociateResourceShareResponse_httpStatus' - The response's http status code.+newDisassociateResourceShareResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DisassociateResourceShareResponse+newDisassociateResourceShareResponse pHttpStatus_ =+  DisassociateResourceShareResponse'+    { clientToken =+        Prelude.Nothing,+      resourceShareAssociations =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+disassociateResourceShareResponse_clientToken :: Lens.Lens' DisassociateResourceShareResponse (Prelude.Maybe Prelude.Text)+disassociateResourceShareResponse_clientToken = Lens.lens (\DisassociateResourceShareResponse' {clientToken} -> clientToken) (\s@DisassociateResourceShareResponse' {} a -> s {clientToken = a} :: DisassociateResourceShareResponse)++-- | An array of objects that contain information about the updated+-- associations for this resource share.+disassociateResourceShareResponse_resourceShareAssociations :: Lens.Lens' DisassociateResourceShareResponse (Prelude.Maybe [ResourceShareAssociation])+disassociateResourceShareResponse_resourceShareAssociations = Lens.lens (\DisassociateResourceShareResponse' {resourceShareAssociations} -> resourceShareAssociations) (\s@DisassociateResourceShareResponse' {} a -> s {resourceShareAssociations = a} :: DisassociateResourceShareResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+disassociateResourceShareResponse_httpStatus :: Lens.Lens' DisassociateResourceShareResponse Prelude.Int+disassociateResourceShareResponse_httpStatus = Lens.lens (\DisassociateResourceShareResponse' {httpStatus} -> httpStatus) (\s@DisassociateResourceShareResponse' {} a -> s {httpStatus = a} :: DisassociateResourceShareResponse)++instance+  Prelude.NFData+    DisassociateResourceShareResponse+  where+  rnf DisassociateResourceShareResponse' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShareAssociations+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/DisassociateResourceSharePermission.hs view
@@ -0,0 +1,303 @@+{-# 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.RAM.DisassociateResourceSharePermission+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Disassociates an RAM permission from a resource share. Permission+-- changes take effect immediately. You can remove a RAM permission from a+-- resource share only if there are currently no resources of the relevant+-- resource type currently attached to the resource share.+module Amazonka.RAM.DisassociateResourceSharePermission+  ( -- * Creating a Request+    DisassociateResourceSharePermission (..),+    newDisassociateResourceSharePermission,++    -- * Request Lenses+    disassociateResourceSharePermission_clientToken,+    disassociateResourceSharePermission_resourceShareArn,+    disassociateResourceSharePermission_permissionArn,++    -- * Destructuring the Response+    DisassociateResourceSharePermissionResponse (..),+    newDisassociateResourceSharePermissionResponse,++    -- * Response Lenses+    disassociateResourceSharePermissionResponse_clientToken,+    disassociateResourceSharePermissionResponse_returnValue,+    disassociateResourceSharePermissionResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisassociateResourceSharePermission' smart constructor.+data DisassociateResourceSharePermission = DisassociateResourceSharePermission'+  { -- | Specifies a unique, case-sensitive identifier that you provide to ensure+    -- the idempotency of the request. This lets you safely retry the request+    -- without accidentally performing the same operation a second time.+    -- Passing the same value to a later call to an operation requires that you+    -- also pass the same value for all other parameters. We recommend that you+    -- use a+    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+    --+    -- If you don\'t provide this value, then Amazon Web Services generates a+    -- random one for you.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share from which you want to disassociate a permission.+    resourceShareArn :: Prelude.Text,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the permission to disassociate from the resource share. Changes to+    -- permissions take effect immediately.+    permissionArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateResourceSharePermission' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'disassociateResourceSharePermission_clientToken' - Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+--+-- 'resourceShareArn', 'disassociateResourceSharePermission_resourceShareArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share from which you want to disassociate a permission.+--+-- 'permissionArn', 'disassociateResourceSharePermission_permissionArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the permission to disassociate from the resource share. Changes to+-- permissions take effect immediately.+newDisassociateResourceSharePermission ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  -- | 'permissionArn'+  Prelude.Text ->+  DisassociateResourceSharePermission+newDisassociateResourceSharePermission+  pResourceShareArn_+  pPermissionArn_ =+    DisassociateResourceSharePermission'+      { clientToken =+          Prelude.Nothing,+        resourceShareArn = pResourceShareArn_,+        permissionArn = pPermissionArn_+      }++-- | Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+disassociateResourceSharePermission_clientToken :: Lens.Lens' DisassociateResourceSharePermission (Prelude.Maybe Prelude.Text)+disassociateResourceSharePermission_clientToken = Lens.lens (\DisassociateResourceSharePermission' {clientToken} -> clientToken) (\s@DisassociateResourceSharePermission' {} a -> s {clientToken = a} :: DisassociateResourceSharePermission)++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share from which you want to disassociate a permission.+disassociateResourceSharePermission_resourceShareArn :: Lens.Lens' DisassociateResourceSharePermission Prelude.Text+disassociateResourceSharePermission_resourceShareArn = Lens.lens (\DisassociateResourceSharePermission' {resourceShareArn} -> resourceShareArn) (\s@DisassociateResourceSharePermission' {} a -> s {resourceShareArn = a} :: DisassociateResourceSharePermission)++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the permission to disassociate from the resource share. Changes to+-- permissions take effect immediately.+disassociateResourceSharePermission_permissionArn :: Lens.Lens' DisassociateResourceSharePermission Prelude.Text+disassociateResourceSharePermission_permissionArn = Lens.lens (\DisassociateResourceSharePermission' {permissionArn} -> permissionArn) (\s@DisassociateResourceSharePermission' {} a -> s {permissionArn = a} :: DisassociateResourceSharePermission)++instance+  Core.AWSRequest+    DisassociateResourceSharePermission+  where+  type+    AWSResponse DisassociateResourceSharePermission =+      DisassociateResourceSharePermissionResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DisassociateResourceSharePermissionResponse'+            Prelude.<$> (x Data..?> "clientToken")+            Prelude.<*> (x Data..?> "returnValue")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    DisassociateResourceSharePermission+  where+  hashWithSalt+    _salt+    DisassociateResourceSharePermission' {..} =+      _salt+        `Prelude.hashWithSalt` clientToken+        `Prelude.hashWithSalt` resourceShareArn+        `Prelude.hashWithSalt` permissionArn++instance+  Prelude.NFData+    DisassociateResourceSharePermission+  where+  rnf DisassociateResourceSharePermission' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShareArn+      `Prelude.seq` Prelude.rnf permissionArn++instance+  Data.ToHeaders+    DisassociateResourceSharePermission+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance+  Data.ToJSON+    DisassociateResourceSharePermission+  where+  toJSON DisassociateResourceSharePermission' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("clientToken" Data..=) Prelude.<$> clientToken,+            Prelude.Just+              ("resourceShareArn" Data..= resourceShareArn),+            Prelude.Just+              ("permissionArn" Data..= permissionArn)+          ]+      )++instance+  Data.ToPath+    DisassociateResourceSharePermission+  where+  toPath =+    Prelude.const+      "/disassociateresourcesharepermission"++instance+  Data.ToQuery+    DisassociateResourceSharePermission+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisassociateResourceSharePermissionResponse' smart constructor.+data DisassociateResourceSharePermissionResponse = DisassociateResourceSharePermissionResponse'+  { -- | The idempotency identifier associated with this request. If you want to+    -- repeat the same operation in an idempotent manner then you must include+    -- this value in the @clientToken@ request parameter of that later call.+    -- All other parameters must also have the same values that you used in the+    -- first call.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | A return value of @true@ indicates that the request succeeded. A value+    -- of @false@ indicates that the request failed.+    returnValue :: Prelude.Maybe Prelude.Bool,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateResourceSharePermissionResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'disassociateResourceSharePermissionResponse_clientToken' - The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+--+-- 'returnValue', 'disassociateResourceSharePermissionResponse_returnValue' - A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+--+-- 'httpStatus', 'disassociateResourceSharePermissionResponse_httpStatus' - The response's http status code.+newDisassociateResourceSharePermissionResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DisassociateResourceSharePermissionResponse+newDisassociateResourceSharePermissionResponse+  pHttpStatus_ =+    DisassociateResourceSharePermissionResponse'+      { clientToken =+          Prelude.Nothing,+        returnValue = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+disassociateResourceSharePermissionResponse_clientToken :: Lens.Lens' DisassociateResourceSharePermissionResponse (Prelude.Maybe Prelude.Text)+disassociateResourceSharePermissionResponse_clientToken = Lens.lens (\DisassociateResourceSharePermissionResponse' {clientToken} -> clientToken) (\s@DisassociateResourceSharePermissionResponse' {} a -> s {clientToken = a} :: DisassociateResourceSharePermissionResponse)++-- | A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+disassociateResourceSharePermissionResponse_returnValue :: Lens.Lens' DisassociateResourceSharePermissionResponse (Prelude.Maybe Prelude.Bool)+disassociateResourceSharePermissionResponse_returnValue = Lens.lens (\DisassociateResourceSharePermissionResponse' {returnValue} -> returnValue) (\s@DisassociateResourceSharePermissionResponse' {} a -> s {returnValue = a} :: DisassociateResourceSharePermissionResponse)++-- | The response's http status code.+disassociateResourceSharePermissionResponse_httpStatus :: Lens.Lens' DisassociateResourceSharePermissionResponse Prelude.Int+disassociateResourceSharePermissionResponse_httpStatus = Lens.lens (\DisassociateResourceSharePermissionResponse' {httpStatus} -> httpStatus) (\s@DisassociateResourceSharePermissionResponse' {} a -> s {httpStatus = a} :: DisassociateResourceSharePermissionResponse)++instance+  Prelude.NFData+    DisassociateResourceSharePermissionResponse+  where+  rnf DisassociateResourceSharePermissionResponse' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf returnValue+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/EnableSharingWithAwsOrganization.hs view
@@ -0,0 +1,178 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RAM.EnableSharingWithAwsOrganization+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Enables resource sharing within your organization in Organizations.+-- Calling this operation enables RAM to retrieve information about the+-- organization and its structure. This lets you share resources with all+-- of the accounts in an organization by specifying the organization\'s ID,+-- or all of the accounts in an organizational unit (OU) by specifying the+-- OU\'s ID. Until you enable sharing within the organization, you can+-- specify only individual Amazon Web Services accounts, or for supported+-- resource types, IAM users and roles.+--+-- You must call this operation from an IAM user or role in the+-- organization\'s management account.+module Amazonka.RAM.EnableSharingWithAwsOrganization+  ( -- * Creating a Request+    EnableSharingWithAwsOrganization (..),+    newEnableSharingWithAwsOrganization,++    -- * Destructuring the Response+    EnableSharingWithAwsOrganizationResponse (..),+    newEnableSharingWithAwsOrganizationResponse,++    -- * Response Lenses+    enableSharingWithAwsOrganizationResponse_returnValue,+    enableSharingWithAwsOrganizationResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newEnableSharingWithAwsOrganization' smart constructor.+data EnableSharingWithAwsOrganization = EnableSharingWithAwsOrganization'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnableSharingWithAwsOrganization' 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.+newEnableSharingWithAwsOrganization ::+  EnableSharingWithAwsOrganization+newEnableSharingWithAwsOrganization =+  EnableSharingWithAwsOrganization'++instance+  Core.AWSRequest+    EnableSharingWithAwsOrganization+  where+  type+    AWSResponse EnableSharingWithAwsOrganization =+      EnableSharingWithAwsOrganizationResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          EnableSharingWithAwsOrganizationResponse'+            Prelude.<$> (x Data..?> "returnValue")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    EnableSharingWithAwsOrganization+  where+  hashWithSalt _salt _ =+    _salt `Prelude.hashWithSalt` ()++instance+  Prelude.NFData+    EnableSharingWithAwsOrganization+  where+  rnf _ = ()++instance+  Data.ToHeaders+    EnableSharingWithAwsOrganization+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON EnableSharingWithAwsOrganization where+  toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath EnableSharingWithAwsOrganization where+  toPath =+    Prelude.const "/enablesharingwithawsorganization"++instance+  Data.ToQuery+    EnableSharingWithAwsOrganization+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newEnableSharingWithAwsOrganizationResponse' smart constructor.+data EnableSharingWithAwsOrganizationResponse = EnableSharingWithAwsOrganizationResponse'+  { -- | A return value of @true@ indicates that the request succeeded. A value+    -- of @false@ indicates that the request failed.+    returnValue :: Prelude.Maybe Prelude.Bool,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnableSharingWithAwsOrganizationResponse' 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:+--+-- 'returnValue', 'enableSharingWithAwsOrganizationResponse_returnValue' - A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+--+-- 'httpStatus', 'enableSharingWithAwsOrganizationResponse_httpStatus' - The response's http status code.+newEnableSharingWithAwsOrganizationResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  EnableSharingWithAwsOrganizationResponse+newEnableSharingWithAwsOrganizationResponse+  pHttpStatus_ =+    EnableSharingWithAwsOrganizationResponse'+      { returnValue =+          Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+enableSharingWithAwsOrganizationResponse_returnValue :: Lens.Lens' EnableSharingWithAwsOrganizationResponse (Prelude.Maybe Prelude.Bool)+enableSharingWithAwsOrganizationResponse_returnValue = Lens.lens (\EnableSharingWithAwsOrganizationResponse' {returnValue} -> returnValue) (\s@EnableSharingWithAwsOrganizationResponse' {} a -> s {returnValue = a} :: EnableSharingWithAwsOrganizationResponse)++-- | The response's http status code.+enableSharingWithAwsOrganizationResponse_httpStatus :: Lens.Lens' EnableSharingWithAwsOrganizationResponse Prelude.Int+enableSharingWithAwsOrganizationResponse_httpStatus = Lens.lens (\EnableSharingWithAwsOrganizationResponse' {httpStatus} -> httpStatus) (\s@EnableSharingWithAwsOrganizationResponse' {} a -> s {httpStatus = a} :: EnableSharingWithAwsOrganizationResponse)++instance+  Prelude.NFData+    EnableSharingWithAwsOrganizationResponse+  where+  rnf EnableSharingWithAwsOrganizationResponse' {..} =+    Prelude.rnf returnValue+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/GetPermission.hs view
@@ -0,0 +1,208 @@+{-# 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.RAM.GetPermission+-- 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 the contents of an RAM permission in JSON format.+module Amazonka.RAM.GetPermission+  ( -- * Creating a Request+    GetPermission (..),+    newGetPermission,++    -- * Request Lenses+    getPermission_permissionVersion,+    getPermission_permissionArn,++    -- * Destructuring the Response+    GetPermissionResponse (..),+    newGetPermissionResponse,++    -- * Response Lenses+    getPermissionResponse_permission,+    getPermissionResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetPermission' smart constructor.+data GetPermission = GetPermission'+  { -- | Specifies identifier for the version of the RAM permission to retrieve.+    -- If you don\'t specify this parameter, the operation retrieves the+    -- default version.+    permissionVersion :: Prelude.Maybe Prelude.Int,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the permission whose contents you want to retrieve. To find the ARN+    -- for a permission, use either the ListPermissions operation or go to the+    -- <https://console.aws.amazon.com/ram/home#Permissions: Permissions library>+    -- page in the RAM console and then choose the name of the permission. The+    -- ARN is displayed on the detail page.+    permissionArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetPermission' 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:+--+-- 'permissionVersion', 'getPermission_permissionVersion' - Specifies identifier for the version of the RAM permission to retrieve.+-- If you don\'t specify this parameter, the operation retrieves the+-- default version.+--+-- 'permissionArn', 'getPermission_permissionArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the permission whose contents you want to retrieve. To find the ARN+-- for a permission, use either the ListPermissions operation or go to the+-- <https://console.aws.amazon.com/ram/home#Permissions: Permissions library>+-- page in the RAM console and then choose the name of the permission. The+-- ARN is displayed on the detail page.+newGetPermission ::+  -- | 'permissionArn'+  Prelude.Text ->+  GetPermission+newGetPermission pPermissionArn_ =+  GetPermission'+    { permissionVersion = Prelude.Nothing,+      permissionArn = pPermissionArn_+    }++-- | Specifies identifier for the version of the RAM permission to retrieve.+-- If you don\'t specify this parameter, the operation retrieves the+-- default version.+getPermission_permissionVersion :: Lens.Lens' GetPermission (Prelude.Maybe Prelude.Int)+getPermission_permissionVersion = Lens.lens (\GetPermission' {permissionVersion} -> permissionVersion) (\s@GetPermission' {} a -> s {permissionVersion = a} :: GetPermission)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the permission whose contents you want to retrieve. To find the ARN+-- for a permission, use either the ListPermissions operation or go to the+-- <https://console.aws.amazon.com/ram/home#Permissions: Permissions library>+-- page in the RAM console and then choose the name of the permission. The+-- ARN is displayed on the detail page.+getPermission_permissionArn :: Lens.Lens' GetPermission Prelude.Text+getPermission_permissionArn = Lens.lens (\GetPermission' {permissionArn} -> permissionArn) (\s@GetPermission' {} a -> s {permissionArn = a} :: GetPermission)++instance Core.AWSRequest GetPermission where+  type+    AWSResponse GetPermission =+      GetPermissionResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetPermissionResponse'+            Prelude.<$> (x Data..?> "permission")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetPermission where+  hashWithSalt _salt GetPermission' {..} =+    _salt+      `Prelude.hashWithSalt` permissionVersion+      `Prelude.hashWithSalt` permissionArn++instance Prelude.NFData GetPermission where+  rnf GetPermission' {..} =+    Prelude.rnf permissionVersion+      `Prelude.seq` Prelude.rnf permissionArn++instance Data.ToHeaders GetPermission where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetPermission where+  toJSON GetPermission' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("permissionVersion" Data..=)+              Prelude.<$> permissionVersion,+            Prelude.Just+              ("permissionArn" Data..= permissionArn)+          ]+      )++instance Data.ToPath GetPermission where+  toPath = Prelude.const "/getpermission"++instance Data.ToQuery GetPermission where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetPermissionResponse' smart constructor.+data GetPermissionResponse = GetPermissionResponse'+  { -- | An object that contains information about the permission.+    permission :: Prelude.Maybe ResourceSharePermissionDetail,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetPermissionResponse' 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:+--+-- 'permission', 'getPermissionResponse_permission' - An object that contains information about the permission.+--+-- 'httpStatus', 'getPermissionResponse_httpStatus' - The response's http status code.+newGetPermissionResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetPermissionResponse+newGetPermissionResponse pHttpStatus_ =+  GetPermissionResponse'+    { permission =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | An object that contains information about the permission.+getPermissionResponse_permission :: Lens.Lens' GetPermissionResponse (Prelude.Maybe ResourceSharePermissionDetail)+getPermissionResponse_permission = Lens.lens (\GetPermissionResponse' {permission} -> permission) (\s@GetPermissionResponse' {} a -> s {permission = a} :: GetPermissionResponse)++-- | The response's http status code.+getPermissionResponse_httpStatus :: Lens.Lens' GetPermissionResponse Prelude.Int+getPermissionResponse_httpStatus = Lens.lens (\GetPermissionResponse' {httpStatus} -> httpStatus) (\s@GetPermissionResponse' {} a -> s {httpStatus = a} :: GetPermissionResponse)++instance Prelude.NFData GetPermissionResponse where+  rnf GetPermissionResponse' {..} =+    Prelude.rnf permission+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/GetResourcePolicies.hs view
@@ -0,0 +1,303 @@+{-# 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.RAM.GetResourcePolicies+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the resource policies for the specified resources that you own+-- and have shared.+--+-- This operation returns paginated results.+module Amazonka.RAM.GetResourcePolicies+  ( -- * Creating a Request+    GetResourcePolicies (..),+    newGetResourcePolicies,++    -- * Request Lenses+    getResourcePolicies_maxResults,+    getResourcePolicies_nextToken,+    getResourcePolicies_principal,+    getResourcePolicies_resourceArns,++    -- * Destructuring the Response+    GetResourcePoliciesResponse (..),+    newGetResourcePoliciesResponse,++    -- * Response Lenses+    getResourcePoliciesResponse_nextToken,+    getResourcePoliciesResponse_policies,+    getResourcePoliciesResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetResourcePolicies' smart constructor.+data GetResourcePolicies = GetResourcePolicies'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies the principal.+    principal :: Prelude.Maybe Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    -- of the resources whose policies you want to retrieve.+    resourceArns :: [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourcePolicies' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'getResourcePolicies_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'getResourcePolicies_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'principal', 'getResourcePolicies_principal' - Specifies the principal.+--+-- 'resourceArns', 'getResourcePolicies_resourceArns' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the resources whose policies you want to retrieve.+newGetResourcePolicies ::+  GetResourcePolicies+newGetResourcePolicies =+  GetResourcePolicies'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      principal = Prelude.Nothing,+      resourceArns = Prelude.mempty+    }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+getResourcePolicies_maxResults :: Lens.Lens' GetResourcePolicies (Prelude.Maybe Prelude.Natural)+getResourcePolicies_maxResults = Lens.lens (\GetResourcePolicies' {maxResults} -> maxResults) (\s@GetResourcePolicies' {} a -> s {maxResults = a} :: GetResourcePolicies)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+getResourcePolicies_nextToken :: Lens.Lens' GetResourcePolicies (Prelude.Maybe Prelude.Text)+getResourcePolicies_nextToken = Lens.lens (\GetResourcePolicies' {nextToken} -> nextToken) (\s@GetResourcePolicies' {} a -> s {nextToken = a} :: GetResourcePolicies)++-- | Specifies the principal.+getResourcePolicies_principal :: Lens.Lens' GetResourcePolicies (Prelude.Maybe Prelude.Text)+getResourcePolicies_principal = Lens.lens (\GetResourcePolicies' {principal} -> principal) (\s@GetResourcePolicies' {} a -> s {principal = a} :: GetResourcePolicies)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the resources whose policies you want to retrieve.+getResourcePolicies_resourceArns :: Lens.Lens' GetResourcePolicies [Prelude.Text]+getResourcePolicies_resourceArns = Lens.lens (\GetResourcePolicies' {resourceArns} -> resourceArns) (\s@GetResourcePolicies' {} a -> s {resourceArns = a} :: GetResourcePolicies) Prelude.. Lens.coerced++instance Core.AWSPager GetResourcePolicies where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? getResourcePoliciesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? getResourcePoliciesResponse_policies+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& getResourcePolicies_nextToken+          Lens..~ rs+          Lens.^? getResourcePoliciesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest GetResourcePolicies where+  type+    AWSResponse GetResourcePolicies =+      GetResourcePoliciesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetResourcePoliciesResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "policies" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetResourcePolicies where+  hashWithSalt _salt GetResourcePolicies' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` principal+      `Prelude.hashWithSalt` resourceArns++instance Prelude.NFData GetResourcePolicies where+  rnf GetResourcePolicies' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf principal+      `Prelude.seq` Prelude.rnf resourceArns++instance Data.ToHeaders GetResourcePolicies where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetResourcePolicies where+  toJSON GetResourcePolicies' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("principal" Data..=) Prelude.<$> principal,+            Prelude.Just ("resourceArns" Data..= resourceArns)+          ]+      )++instance Data.ToPath GetResourcePolicies where+  toPath = Prelude.const "/getresourcepolicies"++instance Data.ToQuery GetResourcePolicies where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetResourcePoliciesResponse' smart constructor.+data GetResourcePoliciesResponse = GetResourcePoliciesResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of resource policy documents in JSON format.+    policies :: Prelude.Maybe [Prelude.Text],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourcePoliciesResponse' 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', 'getResourcePoliciesResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'policies', 'getResourcePoliciesResponse_policies' - An array of resource policy documents in JSON format.+--+-- 'httpStatus', 'getResourcePoliciesResponse_httpStatus' - The response's http status code.+newGetResourcePoliciesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetResourcePoliciesResponse+newGetResourcePoliciesResponse pHttpStatus_ =+  GetResourcePoliciesResponse'+    { nextToken =+        Prelude.Nothing,+      policies = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+getResourcePoliciesResponse_nextToken :: Lens.Lens' GetResourcePoliciesResponse (Prelude.Maybe Prelude.Text)+getResourcePoliciesResponse_nextToken = Lens.lens (\GetResourcePoliciesResponse' {nextToken} -> nextToken) (\s@GetResourcePoliciesResponse' {} a -> s {nextToken = a} :: GetResourcePoliciesResponse)++-- | An array of resource policy documents in JSON format.+getResourcePoliciesResponse_policies :: Lens.Lens' GetResourcePoliciesResponse (Prelude.Maybe [Prelude.Text])+getResourcePoliciesResponse_policies = Lens.lens (\GetResourcePoliciesResponse' {policies} -> policies) (\s@GetResourcePoliciesResponse' {} a -> s {policies = a} :: GetResourcePoliciesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getResourcePoliciesResponse_httpStatus :: Lens.Lens' GetResourcePoliciesResponse Prelude.Int+getResourcePoliciesResponse_httpStatus = Lens.lens (\GetResourcePoliciesResponse' {httpStatus} -> httpStatus) (\s@GetResourcePoliciesResponse' {} a -> s {httpStatus = a} :: GetResourcePoliciesResponse)++instance Prelude.NFData GetResourcePoliciesResponse where+  rnf GetResourcePoliciesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf policies+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/GetResourceShareAssociations.hs view
@@ -0,0 +1,413 @@+{-# 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.RAM.GetResourceShareAssociations+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the resource and principal associations for resource shares+-- that you own.+--+-- This operation returns paginated results.+module Amazonka.RAM.GetResourceShareAssociations+  ( -- * Creating a Request+    GetResourceShareAssociations (..),+    newGetResourceShareAssociations,++    -- * Request Lenses+    getResourceShareAssociations_associationStatus,+    getResourceShareAssociations_maxResults,+    getResourceShareAssociations_nextToken,+    getResourceShareAssociations_principal,+    getResourceShareAssociations_resourceArn,+    getResourceShareAssociations_resourceShareArns,+    getResourceShareAssociations_associationType,++    -- * Destructuring the Response+    GetResourceShareAssociationsResponse (..),+    newGetResourceShareAssociationsResponse,++    -- * Response Lenses+    getResourceShareAssociationsResponse_nextToken,+    getResourceShareAssociationsResponse_resourceShareAssociations,+    getResourceShareAssociationsResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetResourceShareAssociations' smart constructor.+data GetResourceShareAssociations = GetResourceShareAssociations'+  { -- | Specifies that you want to retrieve only associations with this status.+    associationStatus :: Prelude.Maybe ResourceShareAssociationStatus,+    -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies the ID of the principal whose resource shares you want to+    -- retrieve. This can be an Amazon Web Services account ID, an organization+    -- ID, an organizational unit ID, or the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of an individual IAM user or role.+    --+    -- You cannot specify this parameter if the association type is @RESOURCE@.+    principal :: Prelude.Maybe Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource whose resource shares you want to retrieve.+    --+    -- You cannot specify this parameter if the association type is+    -- @PRINCIPAL@.+    resourceArn :: Prelude.Maybe Prelude.Text,+    -- | Specifies a list of+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    -- of the resource share whose associations you want to retrieve.+    resourceShareArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies whether you want to retrieve the associations that involve a+    -- specified resource or principal.+    --+    -- -   @PRINCIPAL@ – list the principals that are associated with the+    --     specified resource share.+    --+    -- -   @RESOURCE@ – list the resources that are associated with the+    --     specified resource share.+    associationType :: ResourceShareAssociationType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourceShareAssociations' 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:+--+-- 'associationStatus', 'getResourceShareAssociations_associationStatus' - Specifies that you want to retrieve only associations with this status.+--+-- 'maxResults', 'getResourceShareAssociations_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'getResourceShareAssociations_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'principal', 'getResourceShareAssociations_principal' - Specifies the ID of the principal whose resource shares you want to+-- retrieve. This can be an Amazon Web Services account ID, an organization+-- ID, an organizational unit ID, or the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of an individual IAM user or role.+--+-- You cannot specify this parameter if the association type is @RESOURCE@.+--+-- 'resourceArn', 'getResourceShareAssociations_resourceArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource whose resource shares you want to retrieve.+--+-- You cannot specify this parameter if the association type is+-- @PRINCIPAL@.+--+-- 'resourceShareArns', 'getResourceShareAssociations_resourceShareArns' - Specifies a list of+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the resource share whose associations you want to retrieve.+--+-- 'associationType', 'getResourceShareAssociations_associationType' - Specifies whether you want to retrieve the associations that involve a+-- specified resource or principal.+--+-- -   @PRINCIPAL@ – list the principals that are associated with the+--     specified resource share.+--+-- -   @RESOURCE@ – list the resources that are associated with the+--     specified resource share.+newGetResourceShareAssociations ::+  -- | 'associationType'+  ResourceShareAssociationType ->+  GetResourceShareAssociations+newGetResourceShareAssociations pAssociationType_ =+  GetResourceShareAssociations'+    { associationStatus =+        Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      principal = Prelude.Nothing,+      resourceArn = Prelude.Nothing,+      resourceShareArns = Prelude.Nothing,+      associationType = pAssociationType_+    }++-- | Specifies that you want to retrieve only associations with this status.+getResourceShareAssociations_associationStatus :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe ResourceShareAssociationStatus)+getResourceShareAssociations_associationStatus = Lens.lens (\GetResourceShareAssociations' {associationStatus} -> associationStatus) (\s@GetResourceShareAssociations' {} a -> s {associationStatus = a} :: GetResourceShareAssociations)++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+getResourceShareAssociations_maxResults :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe Prelude.Natural)+getResourceShareAssociations_maxResults = Lens.lens (\GetResourceShareAssociations' {maxResults} -> maxResults) (\s@GetResourceShareAssociations' {} a -> s {maxResults = a} :: GetResourceShareAssociations)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+getResourceShareAssociations_nextToken :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe Prelude.Text)+getResourceShareAssociations_nextToken = Lens.lens (\GetResourceShareAssociations' {nextToken} -> nextToken) (\s@GetResourceShareAssociations' {} a -> s {nextToken = a} :: GetResourceShareAssociations)++-- | Specifies the ID of the principal whose resource shares you want to+-- retrieve. This can be an Amazon Web Services account ID, an organization+-- ID, an organizational unit ID, or the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of an individual IAM user or role.+--+-- You cannot specify this parameter if the association type is @RESOURCE@.+getResourceShareAssociations_principal :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe Prelude.Text)+getResourceShareAssociations_principal = Lens.lens (\GetResourceShareAssociations' {principal} -> principal) (\s@GetResourceShareAssociations' {} a -> s {principal = a} :: GetResourceShareAssociations)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource whose resource shares you want to retrieve.+--+-- You cannot specify this parameter if the association type is+-- @PRINCIPAL@.+getResourceShareAssociations_resourceArn :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe Prelude.Text)+getResourceShareAssociations_resourceArn = Lens.lens (\GetResourceShareAssociations' {resourceArn} -> resourceArn) (\s@GetResourceShareAssociations' {} a -> s {resourceArn = a} :: GetResourceShareAssociations)++-- | Specifies a list of+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the resource share whose associations you want to retrieve.+getResourceShareAssociations_resourceShareArns :: Lens.Lens' GetResourceShareAssociations (Prelude.Maybe [Prelude.Text])+getResourceShareAssociations_resourceShareArns = Lens.lens (\GetResourceShareAssociations' {resourceShareArns} -> resourceShareArns) (\s@GetResourceShareAssociations' {} a -> s {resourceShareArns = a} :: GetResourceShareAssociations) Prelude.. Lens.mapping Lens.coerced++-- | Specifies whether you want to retrieve the associations that involve a+-- specified resource or principal.+--+-- -   @PRINCIPAL@ – list the principals that are associated with the+--     specified resource share.+--+-- -   @RESOURCE@ – list the resources that are associated with the+--     specified resource share.+getResourceShareAssociations_associationType :: Lens.Lens' GetResourceShareAssociations ResourceShareAssociationType+getResourceShareAssociations_associationType = Lens.lens (\GetResourceShareAssociations' {associationType} -> associationType) (\s@GetResourceShareAssociations' {} a -> s {associationType = a} :: GetResourceShareAssociations)++instance Core.AWSPager GetResourceShareAssociations where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? getResourceShareAssociationsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? getResourceShareAssociationsResponse_resourceShareAssociations+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& getResourceShareAssociations_nextToken+          Lens..~ rs+          Lens.^? getResourceShareAssociationsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest GetResourceShareAssociations where+  type+    AWSResponse GetResourceShareAssociations =+      GetResourceShareAssociationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetResourceShareAssociationsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> ( x+                            Data..?> "resourceShareAssociations"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetResourceShareAssociations+  where+  hashWithSalt _salt GetResourceShareAssociations' {..} =+    _salt+      `Prelude.hashWithSalt` associationStatus+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` principal+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` resourceShareArns+      `Prelude.hashWithSalt` associationType++instance Prelude.NFData GetResourceShareAssociations where+  rnf GetResourceShareAssociations' {..} =+    Prelude.rnf associationStatus+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf principal+      `Prelude.seq` Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf resourceShareArns+      `Prelude.seq` Prelude.rnf associationType++instance Data.ToHeaders GetResourceShareAssociations where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetResourceShareAssociations where+  toJSON GetResourceShareAssociations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("associationStatus" Data..=)+              Prelude.<$> associationStatus,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("principal" Data..=) Prelude.<$> principal,+            ("resourceArn" Data..=) Prelude.<$> resourceArn,+            ("resourceShareArns" Data..=)+              Prelude.<$> resourceShareArns,+            Prelude.Just+              ("associationType" Data..= associationType)+          ]+      )++instance Data.ToPath GetResourceShareAssociations where+  toPath =+    Prelude.const "/getresourceshareassociations"++instance Data.ToQuery GetResourceShareAssociations where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetResourceShareAssociationsResponse' smart constructor.+data GetResourceShareAssociationsResponse = GetResourceShareAssociationsResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain the details about the associations.+    resourceShareAssociations :: Prelude.Maybe [ResourceShareAssociation],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourceShareAssociationsResponse' 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', 'getResourceShareAssociationsResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'resourceShareAssociations', 'getResourceShareAssociationsResponse_resourceShareAssociations' - An array of objects that contain the details about the associations.+--+-- 'httpStatus', 'getResourceShareAssociationsResponse_httpStatus' - The response's http status code.+newGetResourceShareAssociationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetResourceShareAssociationsResponse+newGetResourceShareAssociationsResponse pHttpStatus_ =+  GetResourceShareAssociationsResponse'+    { nextToken =+        Prelude.Nothing,+      resourceShareAssociations =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+getResourceShareAssociationsResponse_nextToken :: Lens.Lens' GetResourceShareAssociationsResponse (Prelude.Maybe Prelude.Text)+getResourceShareAssociationsResponse_nextToken = Lens.lens (\GetResourceShareAssociationsResponse' {nextToken} -> nextToken) (\s@GetResourceShareAssociationsResponse' {} a -> s {nextToken = a} :: GetResourceShareAssociationsResponse)++-- | An array of objects that contain the details about the associations.+getResourceShareAssociationsResponse_resourceShareAssociations :: Lens.Lens' GetResourceShareAssociationsResponse (Prelude.Maybe [ResourceShareAssociation])+getResourceShareAssociationsResponse_resourceShareAssociations = Lens.lens (\GetResourceShareAssociationsResponse' {resourceShareAssociations} -> resourceShareAssociations) (\s@GetResourceShareAssociationsResponse' {} a -> s {resourceShareAssociations = a} :: GetResourceShareAssociationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getResourceShareAssociationsResponse_httpStatus :: Lens.Lens' GetResourceShareAssociationsResponse Prelude.Int+getResourceShareAssociationsResponse_httpStatus = Lens.lens (\GetResourceShareAssociationsResponse' {httpStatus} -> httpStatus) (\s@GetResourceShareAssociationsResponse' {} a -> s {httpStatus = a} :: GetResourceShareAssociationsResponse)++instance+  Prelude.NFData+    GetResourceShareAssociationsResponse+  where+  rnf GetResourceShareAssociationsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceShareAssociations+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/GetResourceShareInvitations.hs view
@@ -0,0 +1,319 @@+{-# 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.RAM.GetResourceShareInvitations+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves details about invitations that you have received for resource+-- shares.+--+-- This operation returns paginated results.+module Amazonka.RAM.GetResourceShareInvitations+  ( -- * Creating a Request+    GetResourceShareInvitations (..),+    newGetResourceShareInvitations,++    -- * Request Lenses+    getResourceShareInvitations_maxResults,+    getResourceShareInvitations_nextToken,+    getResourceShareInvitations_resourceShareArns,+    getResourceShareInvitations_resourceShareInvitationArns,++    -- * Destructuring the Response+    GetResourceShareInvitationsResponse (..),+    newGetResourceShareInvitationsResponse,++    -- * Response Lenses+    getResourceShareInvitationsResponse_nextToken,+    getResourceShareInvitationsResponse_resourceShareInvitations,+    getResourceShareInvitationsResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetResourceShareInvitations' smart constructor.+data GetResourceShareInvitations = GetResourceShareInvitations'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want details about invitations only for the resource+    -- shares described by this list of+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    resourceShareArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    -- of the resource share invitations you want information about.+    resourceShareInvitationArns :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourceShareInvitations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'getResourceShareInvitations_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'getResourceShareInvitations_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'resourceShareArns', 'getResourceShareInvitations_resourceShareArns' - Specifies that you want details about invitations only for the resource+-- shares described by this list of+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+--+-- 'resourceShareInvitationArns', 'getResourceShareInvitations_resourceShareInvitationArns' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the resource share invitations you want information about.+newGetResourceShareInvitations ::+  GetResourceShareInvitations+newGetResourceShareInvitations =+  GetResourceShareInvitations'+    { maxResults =+        Prelude.Nothing,+      nextToken = Prelude.Nothing,+      resourceShareArns = Prelude.Nothing,+      resourceShareInvitationArns = Prelude.Nothing+    }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+getResourceShareInvitations_maxResults :: Lens.Lens' GetResourceShareInvitations (Prelude.Maybe Prelude.Natural)+getResourceShareInvitations_maxResults = Lens.lens (\GetResourceShareInvitations' {maxResults} -> maxResults) (\s@GetResourceShareInvitations' {} a -> s {maxResults = a} :: GetResourceShareInvitations)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+getResourceShareInvitations_nextToken :: Lens.Lens' GetResourceShareInvitations (Prelude.Maybe Prelude.Text)+getResourceShareInvitations_nextToken = Lens.lens (\GetResourceShareInvitations' {nextToken} -> nextToken) (\s@GetResourceShareInvitations' {} a -> s {nextToken = a} :: GetResourceShareInvitations)++-- | Specifies that you want details about invitations only for the resource+-- shares described by this list of+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+getResourceShareInvitations_resourceShareArns :: Lens.Lens' GetResourceShareInvitations (Prelude.Maybe [Prelude.Text])+getResourceShareInvitations_resourceShareArns = Lens.lens (\GetResourceShareInvitations' {resourceShareArns} -> resourceShareArns) (\s@GetResourceShareInvitations' {} a -> s {resourceShareArns = a} :: GetResourceShareInvitations) Prelude.. Lens.mapping Lens.coerced++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of the resource share invitations you want information about.+getResourceShareInvitations_resourceShareInvitationArns :: Lens.Lens' GetResourceShareInvitations (Prelude.Maybe [Prelude.Text])+getResourceShareInvitations_resourceShareInvitationArns = Lens.lens (\GetResourceShareInvitations' {resourceShareInvitationArns} -> resourceShareInvitationArns) (\s@GetResourceShareInvitations' {} a -> s {resourceShareInvitationArns = a} :: GetResourceShareInvitations) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSPager GetResourceShareInvitations where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? getResourceShareInvitationsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? getResourceShareInvitationsResponse_resourceShareInvitations+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& getResourceShareInvitations_nextToken+          Lens..~ rs+          Lens.^? getResourceShareInvitationsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest GetResourceShareInvitations where+  type+    AWSResponse GetResourceShareInvitations =+      GetResourceShareInvitationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetResourceShareInvitationsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> ( x+                            Data..?> "resourceShareInvitations"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetResourceShareInvitations where+  hashWithSalt _salt GetResourceShareInvitations' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` resourceShareArns+      `Prelude.hashWithSalt` resourceShareInvitationArns++instance Prelude.NFData GetResourceShareInvitations where+  rnf GetResourceShareInvitations' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceShareArns+      `Prelude.seq` Prelude.rnf resourceShareInvitationArns++instance Data.ToHeaders GetResourceShareInvitations where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetResourceShareInvitations where+  toJSON GetResourceShareInvitations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("resourceShareArns" Data..=)+              Prelude.<$> resourceShareArns,+            ("resourceShareInvitationArns" Data..=)+              Prelude.<$> resourceShareInvitationArns+          ]+      )++instance Data.ToPath GetResourceShareInvitations where+  toPath = Prelude.const "/getresourceshareinvitations"++instance Data.ToQuery GetResourceShareInvitations where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetResourceShareInvitationsResponse' smart constructor.+data GetResourceShareInvitationsResponse = GetResourceShareInvitationsResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain the details about the invitations.+    resourceShareInvitations :: Prelude.Maybe [ResourceShareInvitation],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourceShareInvitationsResponse' 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', 'getResourceShareInvitationsResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'resourceShareInvitations', 'getResourceShareInvitationsResponse_resourceShareInvitations' - An array of objects that contain the details about the invitations.+--+-- 'httpStatus', 'getResourceShareInvitationsResponse_httpStatus' - The response's http status code.+newGetResourceShareInvitationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetResourceShareInvitationsResponse+newGetResourceShareInvitationsResponse pHttpStatus_ =+  GetResourceShareInvitationsResponse'+    { nextToken =+        Prelude.Nothing,+      resourceShareInvitations =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+getResourceShareInvitationsResponse_nextToken :: Lens.Lens' GetResourceShareInvitationsResponse (Prelude.Maybe Prelude.Text)+getResourceShareInvitationsResponse_nextToken = Lens.lens (\GetResourceShareInvitationsResponse' {nextToken} -> nextToken) (\s@GetResourceShareInvitationsResponse' {} a -> s {nextToken = a} :: GetResourceShareInvitationsResponse)++-- | An array of objects that contain the details about the invitations.+getResourceShareInvitationsResponse_resourceShareInvitations :: Lens.Lens' GetResourceShareInvitationsResponse (Prelude.Maybe [ResourceShareInvitation])+getResourceShareInvitationsResponse_resourceShareInvitations = Lens.lens (\GetResourceShareInvitationsResponse' {resourceShareInvitations} -> resourceShareInvitations) (\s@GetResourceShareInvitationsResponse' {} a -> s {resourceShareInvitations = a} :: GetResourceShareInvitationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getResourceShareInvitationsResponse_httpStatus :: Lens.Lens' GetResourceShareInvitationsResponse Prelude.Int+getResourceShareInvitationsResponse_httpStatus = Lens.lens (\GetResourceShareInvitationsResponse' {httpStatus} -> httpStatus) (\s@GetResourceShareInvitationsResponse' {} a -> s {httpStatus = a} :: GetResourceShareInvitationsResponse)++instance+  Prelude.NFData+    GetResourceShareInvitationsResponse+  where+  rnf GetResourceShareInvitationsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceShareInvitations+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/GetResourceShares.hs view
@@ -0,0 +1,399 @@+{-# 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.RAM.GetResourceShares+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves details about the resource shares that you own or that are+-- shared with you.+--+-- This operation returns paginated results.+module Amazonka.RAM.GetResourceShares+  ( -- * Creating a Request+    GetResourceShares (..),+    newGetResourceShares,++    -- * Request Lenses+    getResourceShares_maxResults,+    getResourceShares_name,+    getResourceShares_nextToken,+    getResourceShares_permissionArn,+    getResourceShares_resourceShareArns,+    getResourceShares_resourceShareStatus,+    getResourceShares_tagFilters,+    getResourceShares_resourceOwner,++    -- * Destructuring the Response+    GetResourceSharesResponse (..),+    newGetResourceSharesResponse,++    -- * Response Lenses+    getResourceSharesResponse_nextToken,+    getResourceSharesResponse_resourceShares,+    getResourceSharesResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetResourceShares' smart constructor.+data GetResourceShares = GetResourceShares'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies the name of an individual resource share that you want to+    -- retrieve details about.+    name :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want to retrieve details of only those resource+    -- shares that use the RAM permission with this+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>.+    permissionArn :: Prelude.Maybe Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+    -- of individual resource shares that you want information about.+    resourceShareArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies that you want to retrieve details of only those resource+    -- shares that have this status.+    resourceShareStatus :: Prelude.Maybe ResourceShareStatus,+    -- | Specifies that you want to retrieve details of only those resource+    -- shares that match the specified tag keys and values.+    tagFilters :: Prelude.Maybe [TagFilter],+    -- | Specifies that you want to retrieve details of only those resource+    -- shares that match the following:+    --+    -- -   __@SELF@__ – resource shares that your account shares with other+    --     accounts+    --+    -- -   __@OTHER-ACCOUNTS@__ – resource shares that other accounts share+    --     with your account+    resourceOwner :: ResourceOwner+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourceShares' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'getResourceShares_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'name', 'getResourceShares_name' - Specifies the name of an individual resource share that you want to+-- retrieve details about.+--+-- 'nextToken', 'getResourceShares_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'permissionArn', 'getResourceShares_permissionArn' - Specifies that you want to retrieve details of only those resource+-- shares that use the RAM permission with this+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>.+--+-- 'resourceShareArns', 'getResourceShares_resourceShareArns' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of individual resource shares that you want information about.+--+-- 'resourceShareStatus', 'getResourceShares_resourceShareStatus' - Specifies that you want to retrieve details of only those resource+-- shares that have this status.+--+-- 'tagFilters', 'getResourceShares_tagFilters' - Specifies that you want to retrieve details of only those resource+-- shares that match the specified tag keys and values.+--+-- 'resourceOwner', 'getResourceShares_resourceOwner' - Specifies that you want to retrieve details of only those resource+-- shares that match the following:+--+-- -   __@SELF@__ – resource shares that your account shares with other+--     accounts+--+-- -   __@OTHER-ACCOUNTS@__ – resource shares that other accounts share+--     with your account+newGetResourceShares ::+  -- | 'resourceOwner'+  ResourceOwner ->+  GetResourceShares+newGetResourceShares pResourceOwner_ =+  GetResourceShares'+    { maxResults = Prelude.Nothing,+      name = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      permissionArn = Prelude.Nothing,+      resourceShareArns = Prelude.Nothing,+      resourceShareStatus = Prelude.Nothing,+      tagFilters = Prelude.Nothing,+      resourceOwner = pResourceOwner_+    }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+getResourceShares_maxResults :: Lens.Lens' GetResourceShares (Prelude.Maybe Prelude.Natural)+getResourceShares_maxResults = Lens.lens (\GetResourceShares' {maxResults} -> maxResults) (\s@GetResourceShares' {} a -> s {maxResults = a} :: GetResourceShares)++-- | Specifies the name of an individual resource share that you want to+-- retrieve details about.+getResourceShares_name :: Lens.Lens' GetResourceShares (Prelude.Maybe Prelude.Text)+getResourceShares_name = Lens.lens (\GetResourceShares' {name} -> name) (\s@GetResourceShares' {} a -> s {name = a} :: GetResourceShares)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+getResourceShares_nextToken :: Lens.Lens' GetResourceShares (Prelude.Maybe Prelude.Text)+getResourceShares_nextToken = Lens.lens (\GetResourceShares' {nextToken} -> nextToken) (\s@GetResourceShares' {} a -> s {nextToken = a} :: GetResourceShares)++-- | Specifies that you want to retrieve details of only those resource+-- shares that use the RAM permission with this+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>.+getResourceShares_permissionArn :: Lens.Lens' GetResourceShares (Prelude.Maybe Prelude.Text)+getResourceShares_permissionArn = Lens.lens (\GetResourceShares' {permissionArn} -> permissionArn) (\s@GetResourceShares' {} a -> s {permissionArn = a} :: GetResourceShares)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>+-- of individual resource shares that you want information about.+getResourceShares_resourceShareArns :: Lens.Lens' GetResourceShares (Prelude.Maybe [Prelude.Text])+getResourceShares_resourceShareArns = Lens.lens (\GetResourceShares' {resourceShareArns} -> resourceShareArns) (\s@GetResourceShares' {} a -> s {resourceShareArns = a} :: GetResourceShares) Prelude.. Lens.mapping Lens.coerced++-- | Specifies that you want to retrieve details of only those resource+-- shares that have this status.+getResourceShares_resourceShareStatus :: Lens.Lens' GetResourceShares (Prelude.Maybe ResourceShareStatus)+getResourceShares_resourceShareStatus = Lens.lens (\GetResourceShares' {resourceShareStatus} -> resourceShareStatus) (\s@GetResourceShares' {} a -> s {resourceShareStatus = a} :: GetResourceShares)++-- | Specifies that you want to retrieve details of only those resource+-- shares that match the specified tag keys and values.+getResourceShares_tagFilters :: Lens.Lens' GetResourceShares (Prelude.Maybe [TagFilter])+getResourceShares_tagFilters = Lens.lens (\GetResourceShares' {tagFilters} -> tagFilters) (\s@GetResourceShares' {} a -> s {tagFilters = a} :: GetResourceShares) Prelude.. Lens.mapping Lens.coerced++-- | Specifies that you want to retrieve details of only those resource+-- shares that match the following:+--+-- -   __@SELF@__ – resource shares that your account shares with other+--     accounts+--+-- -   __@OTHER-ACCOUNTS@__ – resource shares that other accounts share+--     with your account+getResourceShares_resourceOwner :: Lens.Lens' GetResourceShares ResourceOwner+getResourceShares_resourceOwner = Lens.lens (\GetResourceShares' {resourceOwner} -> resourceOwner) (\s@GetResourceShares' {} a -> s {resourceOwner = a} :: GetResourceShares)++instance Core.AWSPager GetResourceShares where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? getResourceSharesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? getResourceSharesResponse_resourceShares+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& getResourceShares_nextToken+          Lens..~ rs+          Lens.^? getResourceSharesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest GetResourceShares where+  type+    AWSResponse GetResourceShares =+      GetResourceSharesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetResourceSharesResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "resourceShares" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetResourceShares where+  hashWithSalt _salt GetResourceShares' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` permissionArn+      `Prelude.hashWithSalt` resourceShareArns+      `Prelude.hashWithSalt` resourceShareStatus+      `Prelude.hashWithSalt` tagFilters+      `Prelude.hashWithSalt` resourceOwner++instance Prelude.NFData GetResourceShares where+  rnf GetResourceShares' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf permissionArn+      `Prelude.seq` Prelude.rnf resourceShareArns+      `Prelude.seq` Prelude.rnf resourceShareStatus+      `Prelude.seq` Prelude.rnf tagFilters+      `Prelude.seq` Prelude.rnf resourceOwner++instance Data.ToHeaders GetResourceShares where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetResourceShares where+  toJSON GetResourceShares' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("name" Data..=) Prelude.<$> name,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("permissionArn" Data..=) Prelude.<$> permissionArn,+            ("resourceShareArns" Data..=)+              Prelude.<$> resourceShareArns,+            ("resourceShareStatus" Data..=)+              Prelude.<$> resourceShareStatus,+            ("tagFilters" Data..=) Prelude.<$> tagFilters,+            Prelude.Just+              ("resourceOwner" Data..= resourceOwner)+          ]+      )++instance Data.ToPath GetResourceShares where+  toPath = Prelude.const "/getresourceshares"++instance Data.ToQuery GetResourceShares where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetResourceSharesResponse' smart constructor.+data GetResourceSharesResponse = GetResourceSharesResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain the information about the resource+    -- shares.+    resourceShares :: Prelude.Maybe [ResourceShare],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourceSharesResponse' 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', 'getResourceSharesResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'resourceShares', 'getResourceSharesResponse_resourceShares' - An array of objects that contain the information about the resource+-- shares.+--+-- 'httpStatus', 'getResourceSharesResponse_httpStatus' - The response's http status code.+newGetResourceSharesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetResourceSharesResponse+newGetResourceSharesResponse pHttpStatus_ =+  GetResourceSharesResponse'+    { nextToken =+        Prelude.Nothing,+      resourceShares = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+getResourceSharesResponse_nextToken :: Lens.Lens' GetResourceSharesResponse (Prelude.Maybe Prelude.Text)+getResourceSharesResponse_nextToken = Lens.lens (\GetResourceSharesResponse' {nextToken} -> nextToken) (\s@GetResourceSharesResponse' {} a -> s {nextToken = a} :: GetResourceSharesResponse)++-- | An array of objects that contain the information about the resource+-- shares.+getResourceSharesResponse_resourceShares :: Lens.Lens' GetResourceSharesResponse (Prelude.Maybe [ResourceShare])+getResourceSharesResponse_resourceShares = Lens.lens (\GetResourceSharesResponse' {resourceShares} -> resourceShares) (\s@GetResourceSharesResponse' {} a -> s {resourceShares = a} :: GetResourceSharesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getResourceSharesResponse_httpStatus :: Lens.Lens' GetResourceSharesResponse Prelude.Int+getResourceSharesResponse_httpStatus = Lens.lens (\GetResourceSharesResponse' {httpStatus} -> httpStatus) (\s@GetResourceSharesResponse' {} a -> s {httpStatus = a} :: GetResourceSharesResponse)++instance Prelude.NFData GetResourceSharesResponse where+  rnf GetResourceSharesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceShares+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/Lens.hs view
@@ -0,0 +1,354 @@+{-# 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.RAM.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.RAM.Lens+  ( -- * Operations++    -- ** AcceptResourceShareInvitation+    acceptResourceShareInvitation_clientToken,+    acceptResourceShareInvitation_resourceShareInvitationArn,+    acceptResourceShareInvitationResponse_clientToken,+    acceptResourceShareInvitationResponse_resourceShareInvitation,+    acceptResourceShareInvitationResponse_httpStatus,++    -- ** AssociateResourceShare+    associateResourceShare_clientToken,+    associateResourceShare_principals,+    associateResourceShare_resourceArns,+    associateResourceShare_resourceShareArn,+    associateResourceShareResponse_clientToken,+    associateResourceShareResponse_resourceShareAssociations,+    associateResourceShareResponse_httpStatus,++    -- ** AssociateResourceSharePermission+    associateResourceSharePermission_clientToken,+    associateResourceSharePermission_permissionVersion,+    associateResourceSharePermission_replace,+    associateResourceSharePermission_resourceShareArn,+    associateResourceSharePermission_permissionArn,+    associateResourceSharePermissionResponse_clientToken,+    associateResourceSharePermissionResponse_returnValue,+    associateResourceSharePermissionResponse_httpStatus,++    -- ** CreateResourceShare+    createResourceShare_allowExternalPrincipals,+    createResourceShare_clientToken,+    createResourceShare_permissionArns,+    createResourceShare_principals,+    createResourceShare_resourceArns,+    createResourceShare_tags,+    createResourceShare_name,+    createResourceShareResponse_clientToken,+    createResourceShareResponse_resourceShare,+    createResourceShareResponse_httpStatus,++    -- ** DeleteResourceShare+    deleteResourceShare_clientToken,+    deleteResourceShare_resourceShareArn,+    deleteResourceShareResponse_clientToken,+    deleteResourceShareResponse_returnValue,+    deleteResourceShareResponse_httpStatus,++    -- ** DisassociateResourceShare+    disassociateResourceShare_clientToken,+    disassociateResourceShare_principals,+    disassociateResourceShare_resourceArns,+    disassociateResourceShare_resourceShareArn,+    disassociateResourceShareResponse_clientToken,+    disassociateResourceShareResponse_resourceShareAssociations,+    disassociateResourceShareResponse_httpStatus,++    -- ** DisassociateResourceSharePermission+    disassociateResourceSharePermission_clientToken,+    disassociateResourceSharePermission_resourceShareArn,+    disassociateResourceSharePermission_permissionArn,+    disassociateResourceSharePermissionResponse_clientToken,+    disassociateResourceSharePermissionResponse_returnValue,+    disassociateResourceSharePermissionResponse_httpStatus,++    -- ** EnableSharingWithAwsOrganization+    enableSharingWithAwsOrganizationResponse_returnValue,+    enableSharingWithAwsOrganizationResponse_httpStatus,++    -- ** GetPermission+    getPermission_permissionVersion,+    getPermission_permissionArn,+    getPermissionResponse_permission,+    getPermissionResponse_httpStatus,++    -- ** GetResourcePolicies+    getResourcePolicies_maxResults,+    getResourcePolicies_nextToken,+    getResourcePolicies_principal,+    getResourcePolicies_resourceArns,+    getResourcePoliciesResponse_nextToken,+    getResourcePoliciesResponse_policies,+    getResourcePoliciesResponse_httpStatus,++    -- ** GetResourceShareAssociations+    getResourceShareAssociations_associationStatus,+    getResourceShareAssociations_maxResults,+    getResourceShareAssociations_nextToken,+    getResourceShareAssociations_principal,+    getResourceShareAssociations_resourceArn,+    getResourceShareAssociations_resourceShareArns,+    getResourceShareAssociations_associationType,+    getResourceShareAssociationsResponse_nextToken,+    getResourceShareAssociationsResponse_resourceShareAssociations,+    getResourceShareAssociationsResponse_httpStatus,++    -- ** GetResourceShareInvitations+    getResourceShareInvitations_maxResults,+    getResourceShareInvitations_nextToken,+    getResourceShareInvitations_resourceShareArns,+    getResourceShareInvitations_resourceShareInvitationArns,+    getResourceShareInvitationsResponse_nextToken,+    getResourceShareInvitationsResponse_resourceShareInvitations,+    getResourceShareInvitationsResponse_httpStatus,++    -- ** GetResourceShares+    getResourceShares_maxResults,+    getResourceShares_name,+    getResourceShares_nextToken,+    getResourceShares_permissionArn,+    getResourceShares_resourceShareArns,+    getResourceShares_resourceShareStatus,+    getResourceShares_tagFilters,+    getResourceShares_resourceOwner,+    getResourceSharesResponse_nextToken,+    getResourceSharesResponse_resourceShares,+    getResourceSharesResponse_httpStatus,++    -- ** ListPendingInvitationResources+    listPendingInvitationResources_maxResults,+    listPendingInvitationResources_nextToken,+    listPendingInvitationResources_resourceRegionScope,+    listPendingInvitationResources_resourceShareInvitationArn,+    listPendingInvitationResourcesResponse_nextToken,+    listPendingInvitationResourcesResponse_resources,+    listPendingInvitationResourcesResponse_httpStatus,++    -- ** ListPermissionVersions+    listPermissionVersions_maxResults,+    listPermissionVersions_nextToken,+    listPermissionVersions_permissionArn,+    listPermissionVersionsResponse_nextToken,+    listPermissionVersionsResponse_permissions,+    listPermissionVersionsResponse_httpStatus,++    -- ** ListPermissions+    listPermissions_maxResults,+    listPermissions_nextToken,+    listPermissions_resourceType,+    listPermissionsResponse_nextToken,+    listPermissionsResponse_permissions,+    listPermissionsResponse_httpStatus,++    -- ** ListPrincipals+    listPrincipals_maxResults,+    listPrincipals_nextToken,+    listPrincipals_principals,+    listPrincipals_resourceArn,+    listPrincipals_resourceShareArns,+    listPrincipals_resourceType,+    listPrincipals_resourceOwner,+    listPrincipalsResponse_nextToken,+    listPrincipalsResponse_principals,+    listPrincipalsResponse_httpStatus,++    -- ** ListResourceSharePermissions+    listResourceSharePermissions_maxResults,+    listResourceSharePermissions_nextToken,+    listResourceSharePermissions_resourceShareArn,+    listResourceSharePermissionsResponse_nextToken,+    listResourceSharePermissionsResponse_permissions,+    listResourceSharePermissionsResponse_httpStatus,++    -- ** ListResourceTypes+    listResourceTypes_maxResults,+    listResourceTypes_nextToken,+    listResourceTypes_resourceRegionScope,+    listResourceTypesResponse_nextToken,+    listResourceTypesResponse_resourceTypes,+    listResourceTypesResponse_httpStatus,++    -- ** ListResources+    listResources_maxResults,+    listResources_nextToken,+    listResources_principal,+    listResources_resourceArns,+    listResources_resourceRegionScope,+    listResources_resourceShareArns,+    listResources_resourceType,+    listResources_resourceOwner,+    listResourcesResponse_nextToken,+    listResourcesResponse_resources,+    listResourcesResponse_httpStatus,++    -- ** PromoteResourceShareCreatedFromPolicy+    promoteResourceShareCreatedFromPolicy_resourceShareArn,+    promoteResourceShareCreatedFromPolicyResponse_returnValue,+    promoteResourceShareCreatedFromPolicyResponse_httpStatus,++    -- ** RejectResourceShareInvitation+    rejectResourceShareInvitation_clientToken,+    rejectResourceShareInvitation_resourceShareInvitationArn,+    rejectResourceShareInvitationResponse_clientToken,+    rejectResourceShareInvitationResponse_resourceShareInvitation,+    rejectResourceShareInvitationResponse_httpStatus,++    -- ** TagResource+    tagResource_resourceShareArn,+    tagResource_tags,+    tagResourceResponse_httpStatus,++    -- ** UntagResource+    untagResource_resourceShareArn,+    untagResource_tagKeys,+    untagResourceResponse_httpStatus,++    -- ** UpdateResourceShare+    updateResourceShare_allowExternalPrincipals,+    updateResourceShare_clientToken,+    updateResourceShare_name,+    updateResourceShare_resourceShareArn,+    updateResourceShareResponse_clientToken,+    updateResourceShareResponse_resourceShare,+    updateResourceShareResponse_httpStatus,++    -- * Types++    -- ** Principal+    principal_creationTime,+    principal_external,+    principal_id,+    principal_lastUpdatedTime,+    principal_resourceShareArn,++    -- ** Resource+    resource_arn,+    resource_creationTime,+    resource_lastUpdatedTime,+    resource_resourceGroupArn,+    resource_resourceRegionScope,+    resource_resourceShareArn,+    resource_status,+    resource_statusMessage,+    resource_type,++    -- ** ResourceShare+    resourceShare_allowExternalPrincipals,+    resourceShare_creationTime,+    resourceShare_featureSet,+    resourceShare_lastUpdatedTime,+    resourceShare_name,+    resourceShare_owningAccountId,+    resourceShare_resourceShareArn,+    resourceShare_status,+    resourceShare_statusMessage,+    resourceShare_tags,++    -- ** ResourceShareAssociation+    resourceShareAssociation_associatedEntity,+    resourceShareAssociation_associationType,+    resourceShareAssociation_creationTime,+    resourceShareAssociation_external,+    resourceShareAssociation_lastUpdatedTime,+    resourceShareAssociation_resourceShareArn,+    resourceShareAssociation_resourceShareName,+    resourceShareAssociation_status,+    resourceShareAssociation_statusMessage,++    -- ** ResourceShareInvitation+    resourceShareInvitation_invitationTimestamp,+    resourceShareInvitation_receiverAccountId,+    resourceShareInvitation_receiverArn,+    resourceShareInvitation_resourceShareArn,+    resourceShareInvitation_resourceShareAssociations,+    resourceShareInvitation_resourceShareInvitationArn,+    resourceShareInvitation_resourceShareName,+    resourceShareInvitation_senderAccountId,+    resourceShareInvitation_status,++    -- ** ResourceSharePermissionDetail+    resourceSharePermissionDetail_arn,+    resourceSharePermissionDetail_creationTime,+    resourceSharePermissionDetail_defaultVersion,+    resourceSharePermissionDetail_isResourceTypeDefault,+    resourceSharePermissionDetail_lastUpdatedTime,+    resourceSharePermissionDetail_name,+    resourceSharePermissionDetail_permission,+    resourceSharePermissionDetail_resourceType,+    resourceSharePermissionDetail_version,++    -- ** ResourceSharePermissionSummary+    resourceSharePermissionSummary_arn,+    resourceSharePermissionSummary_creationTime,+    resourceSharePermissionSummary_defaultVersion,+    resourceSharePermissionSummary_isResourceTypeDefault,+    resourceSharePermissionSummary_lastUpdatedTime,+    resourceSharePermissionSummary_name,+    resourceSharePermissionSummary_resourceType,+    resourceSharePermissionSummary_status,+    resourceSharePermissionSummary_version,++    -- ** ServiceNameAndResourceType+    serviceNameAndResourceType_resourceRegionScope,+    serviceNameAndResourceType_resourceType,+    serviceNameAndResourceType_serviceName,++    -- ** Tag+    tag_key,+    tag_value,++    -- ** TagFilter+    tagFilter_tagKey,+    tagFilter_tagValues,+  )+where++import Amazonka.RAM.AcceptResourceShareInvitation+import Amazonka.RAM.AssociateResourceShare+import Amazonka.RAM.AssociateResourceSharePermission+import Amazonka.RAM.CreateResourceShare+import Amazonka.RAM.DeleteResourceShare+import Amazonka.RAM.DisassociateResourceShare+import Amazonka.RAM.DisassociateResourceSharePermission+import Amazonka.RAM.EnableSharingWithAwsOrganization+import Amazonka.RAM.GetPermission+import Amazonka.RAM.GetResourcePolicies+import Amazonka.RAM.GetResourceShareAssociations+import Amazonka.RAM.GetResourceShareInvitations+import Amazonka.RAM.GetResourceShares+import Amazonka.RAM.ListPendingInvitationResources+import Amazonka.RAM.ListPermissionVersions+import Amazonka.RAM.ListPermissions+import Amazonka.RAM.ListPrincipals+import Amazonka.RAM.ListResourceSharePermissions+import Amazonka.RAM.ListResourceTypes+import Amazonka.RAM.ListResources+import Amazonka.RAM.PromoteResourceShareCreatedFromPolicy+import Amazonka.RAM.RejectResourceShareInvitation+import Amazonka.RAM.TagResource+import Amazonka.RAM.Types.Principal+import Amazonka.RAM.Types.Resource+import Amazonka.RAM.Types.ResourceShare+import Amazonka.RAM.Types.ResourceShareAssociation+import Amazonka.RAM.Types.ResourceShareInvitation+import Amazonka.RAM.Types.ResourceSharePermissionDetail+import Amazonka.RAM.Types.ResourceSharePermissionSummary+import Amazonka.RAM.Types.ServiceNameAndResourceType+import Amazonka.RAM.Types.Tag+import Amazonka.RAM.Types.TagFilter+import Amazonka.RAM.UntagResource+import Amazonka.RAM.UpdateResourceShare
+ gen/Amazonka/RAM/ListPendingInvitationResources.hs view
@@ -0,0 +1,350 @@+{-# 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.RAM.ListPendingInvitationResources+-- 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 resources in a resource share that is shared with you but for+-- which the invitation is still @PENDING@. That means that you haven\'t+-- accepted or rejected the invitation and the invitation hasn\'t expired.+module Amazonka.RAM.ListPendingInvitationResources+  ( -- * Creating a Request+    ListPendingInvitationResources (..),+    newListPendingInvitationResources,++    -- * Request Lenses+    listPendingInvitationResources_maxResults,+    listPendingInvitationResources_nextToken,+    listPendingInvitationResources_resourceRegionScope,+    listPendingInvitationResources_resourceShareInvitationArn,++    -- * Destructuring the Response+    ListPendingInvitationResourcesResponse (..),+    newListPendingInvitationResourcesResponse,++    -- * Response Lenses+    listPendingInvitationResourcesResponse_nextToken,+    listPendingInvitationResourcesResponse_resources,+    listPendingInvitationResourcesResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListPendingInvitationResources' smart constructor.+data ListPendingInvitationResources = ListPendingInvitationResources'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want the results to include only resources that have+    -- the specified scope.+    --+    -- -   @ALL@ – the results include both global and regional resources or+    --     resource types.+    --+    -- -   @GLOBAL@ – the results include only global resources or resource+    --     types.+    --+    -- -   @REGIONAL@ – the results include only regional resources or resource+    --     types.+    --+    -- The default value is @ALL@.+    resourceRegionScope :: Prelude.Maybe ResourceRegionScopeFilter,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the invitation. You can use GetResourceShareInvitations to find the+    -- ARN of the invitation.+    resourceShareInvitationArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPendingInvitationResources' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listPendingInvitationResources_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'listPendingInvitationResources_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'resourceRegionScope', 'listPendingInvitationResources_resourceRegionScope' - Specifies that you want the results to include only resources that have+-- the specified scope.+--+-- -   @ALL@ – the results include both global and regional resources or+--     resource types.+--+-- -   @GLOBAL@ – the results include only global resources or resource+--     types.+--+-- -   @REGIONAL@ – the results include only regional resources or resource+--     types.+--+-- The default value is @ALL@.+--+-- 'resourceShareInvitationArn', 'listPendingInvitationResources_resourceShareInvitationArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the invitation. You can use GetResourceShareInvitations to find the+-- ARN of the invitation.+newListPendingInvitationResources ::+  -- | 'resourceShareInvitationArn'+  Prelude.Text ->+  ListPendingInvitationResources+newListPendingInvitationResources+  pResourceShareInvitationArn_ =+    ListPendingInvitationResources'+      { maxResults =+          Prelude.Nothing,+        nextToken = Prelude.Nothing,+        resourceRegionScope = Prelude.Nothing,+        resourceShareInvitationArn =+          pResourceShareInvitationArn_+      }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+listPendingInvitationResources_maxResults :: Lens.Lens' ListPendingInvitationResources (Prelude.Maybe Prelude.Natural)+listPendingInvitationResources_maxResults = Lens.lens (\ListPendingInvitationResources' {maxResults} -> maxResults) (\s@ListPendingInvitationResources' {} a -> s {maxResults = a} :: ListPendingInvitationResources)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+listPendingInvitationResources_nextToken :: Lens.Lens' ListPendingInvitationResources (Prelude.Maybe Prelude.Text)+listPendingInvitationResources_nextToken = Lens.lens (\ListPendingInvitationResources' {nextToken} -> nextToken) (\s@ListPendingInvitationResources' {} a -> s {nextToken = a} :: ListPendingInvitationResources)++-- | Specifies that you want the results to include only resources that have+-- the specified scope.+--+-- -   @ALL@ – the results include both global and regional resources or+--     resource types.+--+-- -   @GLOBAL@ – the results include only global resources or resource+--     types.+--+-- -   @REGIONAL@ – the results include only regional resources or resource+--     types.+--+-- The default value is @ALL@.+listPendingInvitationResources_resourceRegionScope :: Lens.Lens' ListPendingInvitationResources (Prelude.Maybe ResourceRegionScopeFilter)+listPendingInvitationResources_resourceRegionScope = Lens.lens (\ListPendingInvitationResources' {resourceRegionScope} -> resourceRegionScope) (\s@ListPendingInvitationResources' {} a -> s {resourceRegionScope = a} :: ListPendingInvitationResources)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the invitation. You can use GetResourceShareInvitations to find the+-- ARN of the invitation.+listPendingInvitationResources_resourceShareInvitationArn :: Lens.Lens' ListPendingInvitationResources Prelude.Text+listPendingInvitationResources_resourceShareInvitationArn = Lens.lens (\ListPendingInvitationResources' {resourceShareInvitationArn} -> resourceShareInvitationArn) (\s@ListPendingInvitationResources' {} a -> s {resourceShareInvitationArn = a} :: ListPendingInvitationResources)++instance+  Core.AWSRequest+    ListPendingInvitationResources+  where+  type+    AWSResponse ListPendingInvitationResources =+      ListPendingInvitationResourcesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListPendingInvitationResourcesResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "resources" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    ListPendingInvitationResources+  where+  hashWithSalt+    _salt+    ListPendingInvitationResources' {..} =+      _salt+        `Prelude.hashWithSalt` maxResults+        `Prelude.hashWithSalt` nextToken+        `Prelude.hashWithSalt` resourceRegionScope+        `Prelude.hashWithSalt` resourceShareInvitationArn++instance+  Prelude.NFData+    ListPendingInvitationResources+  where+  rnf ListPendingInvitationResources' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceRegionScope+      `Prelude.seq` Prelude.rnf resourceShareInvitationArn++instance+  Data.ToHeaders+    ListPendingInvitationResources+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListPendingInvitationResources where+  toJSON ListPendingInvitationResources' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("resourceRegionScope" Data..=)+              Prelude.<$> resourceRegionScope,+            Prelude.Just+              ( "resourceShareInvitationArn"+                  Data..= resourceShareInvitationArn+              )+          ]+      )++instance Data.ToPath ListPendingInvitationResources where+  toPath =+    Prelude.const "/listpendinginvitationresources"++instance Data.ToQuery ListPendingInvitationResources where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListPendingInvitationResourcesResponse' smart constructor.+data ListPendingInvitationResourcesResponse = ListPendingInvitationResourcesResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain the information about the resources+    -- included the specified resource share.+    resources :: Prelude.Maybe [Resource],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPendingInvitationResourcesResponse' 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', 'listPendingInvitationResourcesResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'resources', 'listPendingInvitationResourcesResponse_resources' - An array of objects that contain the information about the resources+-- included the specified resource share.+--+-- 'httpStatus', 'listPendingInvitationResourcesResponse_httpStatus' - The response's http status code.+newListPendingInvitationResourcesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListPendingInvitationResourcesResponse+newListPendingInvitationResourcesResponse+  pHttpStatus_ =+    ListPendingInvitationResourcesResponse'+      { nextToken =+          Prelude.Nothing,+        resources = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+listPendingInvitationResourcesResponse_nextToken :: Lens.Lens' ListPendingInvitationResourcesResponse (Prelude.Maybe Prelude.Text)+listPendingInvitationResourcesResponse_nextToken = Lens.lens (\ListPendingInvitationResourcesResponse' {nextToken} -> nextToken) (\s@ListPendingInvitationResourcesResponse' {} a -> s {nextToken = a} :: ListPendingInvitationResourcesResponse)++-- | An array of objects that contain the information about the resources+-- included the specified resource share.+listPendingInvitationResourcesResponse_resources :: Lens.Lens' ListPendingInvitationResourcesResponse (Prelude.Maybe [Resource])+listPendingInvitationResourcesResponse_resources = Lens.lens (\ListPendingInvitationResourcesResponse' {resources} -> resources) (\s@ListPendingInvitationResourcesResponse' {} a -> s {resources = a} :: ListPendingInvitationResourcesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listPendingInvitationResourcesResponse_httpStatus :: Lens.Lens' ListPendingInvitationResourcesResponse Prelude.Int+listPendingInvitationResourcesResponse_httpStatus = Lens.lens (\ListPendingInvitationResourcesResponse' {httpStatus} -> httpStatus) (\s@ListPendingInvitationResourcesResponse' {} a -> s {httpStatus = a} :: ListPendingInvitationResourcesResponse)++instance+  Prelude.NFData+    ListPendingInvitationResourcesResponse+  where+  rnf ListPendingInvitationResourcesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resources+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/ListPermissionVersions.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.RAM.ListPermissionVersions+-- 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 available versions of the specified RAM permission.+module Amazonka.RAM.ListPermissionVersions+  ( -- * Creating a Request+    ListPermissionVersions (..),+    newListPermissionVersions,++    -- * Request Lenses+    listPermissionVersions_maxResults,+    listPermissionVersions_nextToken,+    listPermissionVersions_permissionArn,++    -- * Destructuring the Response+    ListPermissionVersionsResponse (..),+    newListPermissionVersionsResponse,++    -- * Response Lenses+    listPermissionVersionsResponse_nextToken,+    listPermissionVersionsResponse_permissions,+    listPermissionVersionsResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListPermissionVersions' smart constructor.+data ListPermissionVersions = ListPermissionVersions'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the RAM permission whose versions you want to list. You can use the+    -- @permissionVersion@ parameter on the AssociateResourceSharePermission+    -- operation to specify a non-default version to attach.+    permissionArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPermissionVersions' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listPermissionVersions_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'listPermissionVersions_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'permissionArn', 'listPermissionVersions_permissionArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the RAM permission whose versions you want to list. You can use the+-- @permissionVersion@ parameter on the AssociateResourceSharePermission+-- operation to specify a non-default version to attach.+newListPermissionVersions ::+  -- | 'permissionArn'+  Prelude.Text ->+  ListPermissionVersions+newListPermissionVersions pPermissionArn_ =+  ListPermissionVersions'+    { maxResults =+        Prelude.Nothing,+      nextToken = Prelude.Nothing,+      permissionArn = pPermissionArn_+    }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+listPermissionVersions_maxResults :: Lens.Lens' ListPermissionVersions (Prelude.Maybe Prelude.Natural)+listPermissionVersions_maxResults = Lens.lens (\ListPermissionVersions' {maxResults} -> maxResults) (\s@ListPermissionVersions' {} a -> s {maxResults = a} :: ListPermissionVersions)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+listPermissionVersions_nextToken :: Lens.Lens' ListPermissionVersions (Prelude.Maybe Prelude.Text)+listPermissionVersions_nextToken = Lens.lens (\ListPermissionVersions' {nextToken} -> nextToken) (\s@ListPermissionVersions' {} a -> s {nextToken = a} :: ListPermissionVersions)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the RAM permission whose versions you want to list. You can use the+-- @permissionVersion@ parameter on the AssociateResourceSharePermission+-- operation to specify a non-default version to attach.+listPermissionVersions_permissionArn :: Lens.Lens' ListPermissionVersions Prelude.Text+listPermissionVersions_permissionArn = Lens.lens (\ListPermissionVersions' {permissionArn} -> permissionArn) (\s@ListPermissionVersions' {} a -> s {permissionArn = a} :: ListPermissionVersions)++instance Core.AWSRequest ListPermissionVersions where+  type+    AWSResponse ListPermissionVersions =+      ListPermissionVersionsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListPermissionVersionsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "permissions" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListPermissionVersions where+  hashWithSalt _salt ListPermissionVersions' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` permissionArn++instance Prelude.NFData ListPermissionVersions where+  rnf ListPermissionVersions' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf permissionArn++instance Data.ToHeaders ListPermissionVersions where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListPermissionVersions where+  toJSON ListPermissionVersions' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            Prelude.Just+              ("permissionArn" Data..= permissionArn)+          ]+      )++instance Data.ToPath ListPermissionVersions where+  toPath = Prelude.const "/listpermissionversions"++instance Data.ToQuery ListPermissionVersions where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListPermissionVersionsResponse' smart constructor.+data ListPermissionVersionsResponse = ListPermissionVersionsResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain details for each of the available+    -- versions.+    permissions :: Prelude.Maybe [ResourceSharePermissionSummary],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPermissionVersionsResponse' 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', 'listPermissionVersionsResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'permissions', 'listPermissionVersionsResponse_permissions' - An array of objects that contain details for each of the available+-- versions.+--+-- 'httpStatus', 'listPermissionVersionsResponse_httpStatus' - The response's http status code.+newListPermissionVersionsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListPermissionVersionsResponse+newListPermissionVersionsResponse pHttpStatus_ =+  ListPermissionVersionsResponse'+    { nextToken =+        Prelude.Nothing,+      permissions = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+listPermissionVersionsResponse_nextToken :: Lens.Lens' ListPermissionVersionsResponse (Prelude.Maybe Prelude.Text)+listPermissionVersionsResponse_nextToken = Lens.lens (\ListPermissionVersionsResponse' {nextToken} -> nextToken) (\s@ListPermissionVersionsResponse' {} a -> s {nextToken = a} :: ListPermissionVersionsResponse)++-- | An array of objects that contain details for each of the available+-- versions.+listPermissionVersionsResponse_permissions :: Lens.Lens' ListPermissionVersionsResponse (Prelude.Maybe [ResourceSharePermissionSummary])+listPermissionVersionsResponse_permissions = Lens.lens (\ListPermissionVersionsResponse' {permissions} -> permissions) (\s@ListPermissionVersionsResponse' {} a -> s {permissions = a} :: ListPermissionVersionsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listPermissionVersionsResponse_httpStatus :: Lens.Lens' ListPermissionVersionsResponse Prelude.Int+listPermissionVersionsResponse_httpStatus = Lens.lens (\ListPermissionVersionsResponse' {httpStatus} -> httpStatus) (\s@ListPermissionVersionsResponse' {} a -> s {httpStatus = a} :: ListPermissionVersionsResponse)++instance+  Prelude.NFData+    ListPermissionVersionsResponse+  where+  rnf ListPermissionVersionsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf permissions+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/ListPermissions.hs view
@@ -0,0 +1,269 @@+{-# 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.RAM.ListPermissions+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a list of available RAM permissions that you can use for the+-- supported resource types.+module Amazonka.RAM.ListPermissions+  ( -- * Creating a Request+    ListPermissions (..),+    newListPermissions,++    -- * Request Lenses+    listPermissions_maxResults,+    listPermissions_nextToken,+    listPermissions_resourceType,++    -- * Destructuring the Response+    ListPermissionsResponse (..),+    newListPermissionsResponse,++    -- * Response Lenses+    listPermissionsResponse_nextToken,+    listPermissionsResponse_permissions,+    listPermissionsResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListPermissions' smart constructor.+data ListPermissions = ListPermissions'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want to list permissions for only the specified+    -- resource type. For example, to list only permissions that apply to EC2+    -- subnets, specify @ec2:Subnet@. You can use the ListResourceTypes+    -- operation to get the specific string required.+    resourceType :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPermissions' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listPermissions_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'listPermissions_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'resourceType', 'listPermissions_resourceType' - Specifies that you want to list permissions for only the specified+-- resource type. For example, to list only permissions that apply to EC2+-- subnets, specify @ec2:Subnet@. You can use the ListResourceTypes+-- operation to get the specific string required.+newListPermissions ::+  ListPermissions+newListPermissions =+  ListPermissions'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      resourceType = Prelude.Nothing+    }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+listPermissions_maxResults :: Lens.Lens' ListPermissions (Prelude.Maybe Prelude.Natural)+listPermissions_maxResults = Lens.lens (\ListPermissions' {maxResults} -> maxResults) (\s@ListPermissions' {} a -> s {maxResults = a} :: ListPermissions)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+listPermissions_nextToken :: Lens.Lens' ListPermissions (Prelude.Maybe Prelude.Text)+listPermissions_nextToken = Lens.lens (\ListPermissions' {nextToken} -> nextToken) (\s@ListPermissions' {} a -> s {nextToken = a} :: ListPermissions)++-- | Specifies that you want to list permissions for only the specified+-- resource type. For example, to list only permissions that apply to EC2+-- subnets, specify @ec2:Subnet@. You can use the ListResourceTypes+-- operation to get the specific string required.+listPermissions_resourceType :: Lens.Lens' ListPermissions (Prelude.Maybe Prelude.Text)+listPermissions_resourceType = Lens.lens (\ListPermissions' {resourceType} -> resourceType) (\s@ListPermissions' {} a -> s {resourceType = a} :: ListPermissions)++instance Core.AWSRequest ListPermissions where+  type+    AWSResponse ListPermissions =+      ListPermissionsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListPermissionsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "permissions" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListPermissions where+  hashWithSalt _salt ListPermissions' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` resourceType++instance Prelude.NFData ListPermissions where+  rnf ListPermissions' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceType++instance Data.ToHeaders ListPermissions where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListPermissions where+  toJSON ListPermissions' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("resourceType" Data..=) Prelude.<$> resourceType+          ]+      )++instance Data.ToPath ListPermissions where+  toPath = Prelude.const "/listpermissions"++instance Data.ToQuery ListPermissions where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListPermissionsResponse' smart constructor.+data ListPermissionsResponse = ListPermissionsResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects with information about the permissions.+    permissions :: Prelude.Maybe [ResourceSharePermissionSummary],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPermissionsResponse' 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', 'listPermissionsResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'permissions', 'listPermissionsResponse_permissions' - An array of objects with information about the permissions.+--+-- 'httpStatus', 'listPermissionsResponse_httpStatus' - The response's http status code.+newListPermissionsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListPermissionsResponse+newListPermissionsResponse pHttpStatus_ =+  ListPermissionsResponse'+    { nextToken =+        Prelude.Nothing,+      permissions = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+listPermissionsResponse_nextToken :: Lens.Lens' ListPermissionsResponse (Prelude.Maybe Prelude.Text)+listPermissionsResponse_nextToken = Lens.lens (\ListPermissionsResponse' {nextToken} -> nextToken) (\s@ListPermissionsResponse' {} a -> s {nextToken = a} :: ListPermissionsResponse)++-- | An array of objects with information about the permissions.+listPermissionsResponse_permissions :: Lens.Lens' ListPermissionsResponse (Prelude.Maybe [ResourceSharePermissionSummary])+listPermissionsResponse_permissions = Lens.lens (\ListPermissionsResponse' {permissions} -> permissions) (\s@ListPermissionsResponse' {} a -> s {permissions = a} :: ListPermissionsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listPermissionsResponse_httpStatus :: Lens.Lens' ListPermissionsResponse Prelude.Int+listPermissionsResponse_httpStatus = Lens.lens (\ListPermissionsResponse' {httpStatus} -> httpStatus) (\s@ListPermissionsResponse' {} a -> s {httpStatus = a} :: ListPermissionsResponse)++instance Prelude.NFData ListPermissionsResponse where+  rnf ListPermissionsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf permissions+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/ListPrincipals.hs view
@@ -0,0 +1,454 @@+{-# 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.RAM.ListPrincipals+-- 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 principals that you are sharing resources with or that are+-- sharing resources with you.+--+-- This operation returns paginated results.+module Amazonka.RAM.ListPrincipals+  ( -- * Creating a Request+    ListPrincipals (..),+    newListPrincipals,++    -- * Request Lenses+    listPrincipals_maxResults,+    listPrincipals_nextToken,+    listPrincipals_principals,+    listPrincipals_resourceArn,+    listPrincipals_resourceShareArns,+    listPrincipals_resourceType,+    listPrincipals_resourceOwner,++    -- * Destructuring the Response+    ListPrincipalsResponse (..),+    newListPrincipalsResponse,++    -- * Response Lenses+    listPrincipalsResponse_nextToken,+    listPrincipalsResponse_principals,+    listPrincipalsResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListPrincipals' smart constructor.+data ListPrincipals = ListPrincipals'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want to list information for only the listed+    -- principals.+    --+    -- You can include the following values:+    --+    -- -   An Amazon Web Services account ID, for example: @123456789012@+    --+    -- -   An+    --     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    --     of an organization in Organizations, for example:+    --     @organizations::123456789012:organization\/o-exampleorgid@+    --+    -- -   An ARN of an organizational unit (OU) in Organizations, for example:+    --     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+    --+    -- -   An ARN of an IAM role, for example:+    --     @iam::123456789012:role\/rolename@+    --+    -- -   An ARN of an IAM user, for example:+    --     @iam::123456789012user\/username@+    --+    -- Not all resource types can be shared with IAM roles and users. For more+    -- information, see+    -- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+    -- in the /Resource Access Manager User Guide/.+    principals :: Prelude.Maybe [Prelude.Text],+    -- | Specifies that you want to list principal information for the resource+    -- share with the specified+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>.+    resourceArn :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want to list information for only principals+    -- associated with the resource shares specified by a list the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>.+    resourceShareArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies that you want to list information for only principals+    -- associated with resource shares that include the specified resource+    -- type.+    --+    -- For a list of valid values, query the ListResourceTypes operation.+    resourceType :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want to list information for only resource shares+    -- that match the following:+    --+    -- -   __@SELF@__ – principals that your account is sharing resources with+    --+    -- -   __@OTHER-ACCOUNTS@__ – principals that are sharing resources with+    --     your account+    resourceOwner :: ResourceOwner+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPrincipals' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listPrincipals_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'listPrincipals_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'principals', 'listPrincipals_principals' - Specifies that you want to list information for only the listed+-- principals.+--+-- You can include the following values:+--+-- -   An Amazon Web Services account ID, for example: @123456789012@+--+-- -   An+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of an organization in Organizations, for example:+--     @organizations::123456789012:organization\/o-exampleorgid@+--+-- -   An ARN of an organizational unit (OU) in Organizations, for example:+--     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+--+-- -   An ARN of an IAM role, for example:+--     @iam::123456789012:role\/rolename@+--+-- -   An ARN of an IAM user, for example:+--     @iam::123456789012user\/username@+--+-- Not all resource types can be shared with IAM roles and users. For more+-- information, see+-- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+-- in the /Resource Access Manager User Guide/.+--+-- 'resourceArn', 'listPrincipals_resourceArn' - Specifies that you want to list principal information for the resource+-- share with the specified+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>.+--+-- 'resourceShareArns', 'listPrincipals_resourceShareArns' - Specifies that you want to list information for only principals+-- associated with the resource shares specified by a list the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>.+--+-- 'resourceType', 'listPrincipals_resourceType' - Specifies that you want to list information for only principals+-- associated with resource shares that include the specified resource+-- type.+--+-- For a list of valid values, query the ListResourceTypes operation.+--+-- 'resourceOwner', 'listPrincipals_resourceOwner' - Specifies that you want to list information for only resource shares+-- that match the following:+--+-- -   __@SELF@__ – principals that your account is sharing resources with+--+-- -   __@OTHER-ACCOUNTS@__ – principals that are sharing resources with+--     your account+newListPrincipals ::+  -- | 'resourceOwner'+  ResourceOwner ->+  ListPrincipals+newListPrincipals pResourceOwner_ =+  ListPrincipals'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      principals = Prelude.Nothing,+      resourceArn = Prelude.Nothing,+      resourceShareArns = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      resourceOwner = pResourceOwner_+    }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+listPrincipals_maxResults :: Lens.Lens' ListPrincipals (Prelude.Maybe Prelude.Natural)+listPrincipals_maxResults = Lens.lens (\ListPrincipals' {maxResults} -> maxResults) (\s@ListPrincipals' {} a -> s {maxResults = a} :: ListPrincipals)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+listPrincipals_nextToken :: Lens.Lens' ListPrincipals (Prelude.Maybe Prelude.Text)+listPrincipals_nextToken = Lens.lens (\ListPrincipals' {nextToken} -> nextToken) (\s@ListPrincipals' {} a -> s {nextToken = a} :: ListPrincipals)++-- | Specifies that you want to list information for only the listed+-- principals.+--+-- You can include the following values:+--+-- -   An Amazon Web Services account ID, for example: @123456789012@+--+-- -   An+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of an organization in Organizations, for example:+--     @organizations::123456789012:organization\/o-exampleorgid@+--+-- -   An ARN of an organizational unit (OU) in Organizations, for example:+--     @organizations::123456789012:ou\/o-exampleorgid\/ou-examplerootid-exampleouid123@+--+-- -   An ARN of an IAM role, for example:+--     @iam::123456789012:role\/rolename@+--+-- -   An ARN of an IAM user, for example:+--     @iam::123456789012user\/username@+--+-- Not all resource types can be shared with IAM roles and users. For more+-- information, see+-- <https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types Sharing with IAM roles and users>+-- in the /Resource Access Manager User Guide/.+listPrincipals_principals :: Lens.Lens' ListPrincipals (Prelude.Maybe [Prelude.Text])+listPrincipals_principals = Lens.lens (\ListPrincipals' {principals} -> principals) (\s@ListPrincipals' {} a -> s {principals = a} :: ListPrincipals) Prelude.. Lens.mapping Lens.coerced++-- | Specifies that you want to list principal information for the resource+-- share with the specified+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>.+listPrincipals_resourceArn :: Lens.Lens' ListPrincipals (Prelude.Maybe Prelude.Text)+listPrincipals_resourceArn = Lens.lens (\ListPrincipals' {resourceArn} -> resourceArn) (\s@ListPrincipals' {} a -> s {resourceArn = a} :: ListPrincipals)++-- | Specifies that you want to list information for only principals+-- associated with the resource shares specified by a list the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>.+listPrincipals_resourceShareArns :: Lens.Lens' ListPrincipals (Prelude.Maybe [Prelude.Text])+listPrincipals_resourceShareArns = Lens.lens (\ListPrincipals' {resourceShareArns} -> resourceShareArns) (\s@ListPrincipals' {} a -> s {resourceShareArns = a} :: ListPrincipals) Prelude.. Lens.mapping Lens.coerced++-- | Specifies that you want to list information for only principals+-- associated with resource shares that include the specified resource+-- type.+--+-- For a list of valid values, query the ListResourceTypes operation.+listPrincipals_resourceType :: Lens.Lens' ListPrincipals (Prelude.Maybe Prelude.Text)+listPrincipals_resourceType = Lens.lens (\ListPrincipals' {resourceType} -> resourceType) (\s@ListPrincipals' {} a -> s {resourceType = a} :: ListPrincipals)++-- | Specifies that you want to list information for only resource shares+-- that match the following:+--+-- -   __@SELF@__ – principals that your account is sharing resources with+--+-- -   __@OTHER-ACCOUNTS@__ – principals that are sharing resources with+--     your account+listPrincipals_resourceOwner :: Lens.Lens' ListPrincipals ResourceOwner+listPrincipals_resourceOwner = Lens.lens (\ListPrincipals' {resourceOwner} -> resourceOwner) (\s@ListPrincipals' {} a -> s {resourceOwner = a} :: ListPrincipals)++instance Core.AWSPager ListPrincipals where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listPrincipalsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listPrincipalsResponse_principals+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listPrincipals_nextToken+          Lens..~ rs+          Lens.^? listPrincipalsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListPrincipals where+  type+    AWSResponse ListPrincipals =+      ListPrincipalsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListPrincipalsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "principals" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListPrincipals where+  hashWithSalt _salt ListPrincipals' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` principals+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` resourceShareArns+      `Prelude.hashWithSalt` resourceType+      `Prelude.hashWithSalt` resourceOwner++instance Prelude.NFData ListPrincipals where+  rnf ListPrincipals' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf principals+      `Prelude.seq` Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf resourceShareArns+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf resourceOwner++instance Data.ToHeaders ListPrincipals where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListPrincipals where+  toJSON ListPrincipals' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("principals" Data..=) Prelude.<$> principals,+            ("resourceArn" Data..=) Prelude.<$> resourceArn,+            ("resourceShareArns" Data..=)+              Prelude.<$> resourceShareArns,+            ("resourceType" Data..=) Prelude.<$> resourceType,+            Prelude.Just+              ("resourceOwner" Data..= resourceOwner)+          ]+      )++instance Data.ToPath ListPrincipals where+  toPath = Prelude.const "/listprincipals"++instance Data.ToQuery ListPrincipals where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListPrincipalsResponse' smart constructor.+data ListPrincipalsResponse = ListPrincipalsResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain the details about the principals.+    principals :: Prelude.Maybe [Principal],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListPrincipalsResponse' 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', 'listPrincipalsResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'principals', 'listPrincipalsResponse_principals' - An array of objects that contain the details about the principals.+--+-- 'httpStatus', 'listPrincipalsResponse_httpStatus' - The response's http status code.+newListPrincipalsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListPrincipalsResponse+newListPrincipalsResponse pHttpStatus_ =+  ListPrincipalsResponse'+    { nextToken =+        Prelude.Nothing,+      principals = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+listPrincipalsResponse_nextToken :: Lens.Lens' ListPrincipalsResponse (Prelude.Maybe Prelude.Text)+listPrincipalsResponse_nextToken = Lens.lens (\ListPrincipalsResponse' {nextToken} -> nextToken) (\s@ListPrincipalsResponse' {} a -> s {nextToken = a} :: ListPrincipalsResponse)++-- | An array of objects that contain the details about the principals.+listPrincipalsResponse_principals :: Lens.Lens' ListPrincipalsResponse (Prelude.Maybe [Principal])+listPrincipalsResponse_principals = Lens.lens (\ListPrincipalsResponse' {principals} -> principals) (\s@ListPrincipalsResponse' {} a -> s {principals = a} :: ListPrincipalsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listPrincipalsResponse_httpStatus :: Lens.Lens' ListPrincipalsResponse Prelude.Int+listPrincipalsResponse_httpStatus = Lens.lens (\ListPrincipalsResponse' {httpStatus} -> httpStatus) (\s@ListPrincipalsResponse' {} a -> s {httpStatus = a} :: ListPrincipalsResponse)++instance Prelude.NFData ListPrincipalsResponse where+  rnf ListPrincipalsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf principals+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/ListResourceSharePermissions.hs view
@@ -0,0 +1,282 @@+{-# 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.RAM.ListResourceSharePermissions+-- 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 RAM permissions that are associated with a resource share.+module Amazonka.RAM.ListResourceSharePermissions+  ( -- * Creating a Request+    ListResourceSharePermissions (..),+    newListResourceSharePermissions,++    -- * Request Lenses+    listResourceSharePermissions_maxResults,+    listResourceSharePermissions_nextToken,+    listResourceSharePermissions_resourceShareArn,++    -- * Destructuring the Response+    ListResourceSharePermissionsResponse (..),+    newListResourceSharePermissionsResponse,++    -- * Response Lenses+    listResourceSharePermissionsResponse_nextToken,+    listResourceSharePermissionsResponse_permissions,+    listResourceSharePermissionsResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListResourceSharePermissions' smart constructor.+data ListResourceSharePermissions = ListResourceSharePermissions'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share for which you want to retrieve the associated+    -- permissions.+    resourceShareArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResourceSharePermissions' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listResourceSharePermissions_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'listResourceSharePermissions_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'resourceShareArn', 'listResourceSharePermissions_resourceShareArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share for which you want to retrieve the associated+-- permissions.+newListResourceSharePermissions ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  ListResourceSharePermissions+newListResourceSharePermissions pResourceShareArn_ =+  ListResourceSharePermissions'+    { maxResults =+        Prelude.Nothing,+      nextToken = Prelude.Nothing,+      resourceShareArn = pResourceShareArn_+    }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+listResourceSharePermissions_maxResults :: Lens.Lens' ListResourceSharePermissions (Prelude.Maybe Prelude.Natural)+listResourceSharePermissions_maxResults = Lens.lens (\ListResourceSharePermissions' {maxResults} -> maxResults) (\s@ListResourceSharePermissions' {} a -> s {maxResults = a} :: ListResourceSharePermissions)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+listResourceSharePermissions_nextToken :: Lens.Lens' ListResourceSharePermissions (Prelude.Maybe Prelude.Text)+listResourceSharePermissions_nextToken = Lens.lens (\ListResourceSharePermissions' {nextToken} -> nextToken) (\s@ListResourceSharePermissions' {} a -> s {nextToken = a} :: ListResourceSharePermissions)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share for which you want to retrieve the associated+-- permissions.+listResourceSharePermissions_resourceShareArn :: Lens.Lens' ListResourceSharePermissions Prelude.Text+listResourceSharePermissions_resourceShareArn = Lens.lens (\ListResourceSharePermissions' {resourceShareArn} -> resourceShareArn) (\s@ListResourceSharePermissions' {} a -> s {resourceShareArn = a} :: ListResourceSharePermissions)++instance Core.AWSRequest ListResourceSharePermissions where+  type+    AWSResponse ListResourceSharePermissions =+      ListResourceSharePermissionsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListResourceSharePermissionsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "permissions" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    ListResourceSharePermissions+  where+  hashWithSalt _salt ListResourceSharePermissions' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` resourceShareArn++instance Prelude.NFData ListResourceSharePermissions where+  rnf ListResourceSharePermissions' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceShareArn++instance Data.ToHeaders ListResourceSharePermissions where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListResourceSharePermissions where+  toJSON ListResourceSharePermissions' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            Prelude.Just+              ("resourceShareArn" Data..= resourceShareArn)+          ]+      )++instance Data.ToPath ListResourceSharePermissions where+  toPath =+    Prelude.const "/listresourcesharepermissions"++instance Data.ToQuery ListResourceSharePermissions where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListResourceSharePermissionsResponse' smart constructor.+data ListResourceSharePermissionsResponse = ListResourceSharePermissionsResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that describe the permissions associated with the+    -- resource share.+    permissions :: Prelude.Maybe [ResourceSharePermissionSummary],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResourceSharePermissionsResponse' 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', 'listResourceSharePermissionsResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'permissions', 'listResourceSharePermissionsResponse_permissions' - An array of objects that describe the permissions associated with the+-- resource share.+--+-- 'httpStatus', 'listResourceSharePermissionsResponse_httpStatus' - The response's http status code.+newListResourceSharePermissionsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListResourceSharePermissionsResponse+newListResourceSharePermissionsResponse pHttpStatus_ =+  ListResourceSharePermissionsResponse'+    { nextToken =+        Prelude.Nothing,+      permissions = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+listResourceSharePermissionsResponse_nextToken :: Lens.Lens' ListResourceSharePermissionsResponse (Prelude.Maybe Prelude.Text)+listResourceSharePermissionsResponse_nextToken = Lens.lens (\ListResourceSharePermissionsResponse' {nextToken} -> nextToken) (\s@ListResourceSharePermissionsResponse' {} a -> s {nextToken = a} :: ListResourceSharePermissionsResponse)++-- | An array of objects that describe the permissions associated with the+-- resource share.+listResourceSharePermissionsResponse_permissions :: Lens.Lens' ListResourceSharePermissionsResponse (Prelude.Maybe [ResourceSharePermissionSummary])+listResourceSharePermissionsResponse_permissions = Lens.lens (\ListResourceSharePermissionsResponse' {permissions} -> permissions) (\s@ListResourceSharePermissionsResponse' {} a -> s {permissions = a} :: ListResourceSharePermissionsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listResourceSharePermissionsResponse_httpStatus :: Lens.Lens' ListResourceSharePermissionsResponse Prelude.Int+listResourceSharePermissionsResponse_httpStatus = Lens.lens (\ListResourceSharePermissionsResponse' {httpStatus} -> httpStatus) (\s@ListResourceSharePermissionsResponse' {} a -> s {httpStatus = a} :: ListResourceSharePermissionsResponse)++instance+  Prelude.NFData+    ListResourceSharePermissionsResponse+  where+  rnf ListResourceSharePermissionsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf permissions+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/ListResourceTypes.hs view
@@ -0,0 +1,299 @@+{-# 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.RAM.ListResourceTypes+-- 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 resource types that can be shared by RAM.+module Amazonka.RAM.ListResourceTypes+  ( -- * Creating a Request+    ListResourceTypes (..),+    newListResourceTypes,++    -- * Request Lenses+    listResourceTypes_maxResults,+    listResourceTypes_nextToken,+    listResourceTypes_resourceRegionScope,++    -- * Destructuring the Response+    ListResourceTypesResponse (..),+    newListResourceTypesResponse,++    -- * Response Lenses+    listResourceTypesResponse_nextToken,+    listResourceTypesResponse_resourceTypes,+    listResourceTypesResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListResourceTypes' smart constructor.+data ListResourceTypes = ListResourceTypes'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want the results to include only resources that have+    -- the specified scope.+    --+    -- -   @ALL@ – the results include both global and regional resources or+    --     resource types.+    --+    -- -   @GLOBAL@ – the results include only global resources or resource+    --     types.+    --+    -- -   @REGIONAL@ – the results include only regional resources or resource+    --     types.+    --+    -- The default value is @ALL@.+    resourceRegionScope :: Prelude.Maybe ResourceRegionScopeFilter+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResourceTypes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listResourceTypes_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'listResourceTypes_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'resourceRegionScope', 'listResourceTypes_resourceRegionScope' - Specifies that you want the results to include only resources that have+-- the specified scope.+--+-- -   @ALL@ – the results include both global and regional resources or+--     resource types.+--+-- -   @GLOBAL@ – the results include only global resources or resource+--     types.+--+-- -   @REGIONAL@ – the results include only regional resources or resource+--     types.+--+-- The default value is @ALL@.+newListResourceTypes ::+  ListResourceTypes+newListResourceTypes =+  ListResourceTypes'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      resourceRegionScope = Prelude.Nothing+    }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+listResourceTypes_maxResults :: Lens.Lens' ListResourceTypes (Prelude.Maybe Prelude.Natural)+listResourceTypes_maxResults = Lens.lens (\ListResourceTypes' {maxResults} -> maxResults) (\s@ListResourceTypes' {} a -> s {maxResults = a} :: ListResourceTypes)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+listResourceTypes_nextToken :: Lens.Lens' ListResourceTypes (Prelude.Maybe Prelude.Text)+listResourceTypes_nextToken = Lens.lens (\ListResourceTypes' {nextToken} -> nextToken) (\s@ListResourceTypes' {} a -> s {nextToken = a} :: ListResourceTypes)++-- | Specifies that you want the results to include only resources that have+-- the specified scope.+--+-- -   @ALL@ – the results include both global and regional resources or+--     resource types.+--+-- -   @GLOBAL@ – the results include only global resources or resource+--     types.+--+-- -   @REGIONAL@ – the results include only regional resources or resource+--     types.+--+-- The default value is @ALL@.+listResourceTypes_resourceRegionScope :: Lens.Lens' ListResourceTypes (Prelude.Maybe ResourceRegionScopeFilter)+listResourceTypes_resourceRegionScope = Lens.lens (\ListResourceTypes' {resourceRegionScope} -> resourceRegionScope) (\s@ListResourceTypes' {} a -> s {resourceRegionScope = a} :: ListResourceTypes)++instance Core.AWSRequest ListResourceTypes where+  type+    AWSResponse ListResourceTypes =+      ListResourceTypesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListResourceTypesResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "resourceTypes" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListResourceTypes where+  hashWithSalt _salt ListResourceTypes' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` resourceRegionScope++instance Prelude.NFData ListResourceTypes where+  rnf ListResourceTypes' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceRegionScope++instance Data.ToHeaders ListResourceTypes where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListResourceTypes where+  toJSON ListResourceTypes' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("resourceRegionScope" Data..=)+              Prelude.<$> resourceRegionScope+          ]+      )++instance Data.ToPath ListResourceTypes where+  toPath = Prelude.const "/listresourcetypes"++instance Data.ToQuery ListResourceTypes where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListResourceTypesResponse' smart constructor.+data ListResourceTypesResponse = ListResourceTypesResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain information about the resource types+    -- that can be shared using RAM.+    resourceTypes :: Prelude.Maybe [ServiceNameAndResourceType],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResourceTypesResponse' 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', 'listResourceTypesResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'resourceTypes', 'listResourceTypesResponse_resourceTypes' - An array of objects that contain information about the resource types+-- that can be shared using RAM.+--+-- 'httpStatus', 'listResourceTypesResponse_httpStatus' - The response's http status code.+newListResourceTypesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListResourceTypesResponse+newListResourceTypesResponse pHttpStatus_ =+  ListResourceTypesResponse'+    { nextToken =+        Prelude.Nothing,+      resourceTypes = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+listResourceTypesResponse_nextToken :: Lens.Lens' ListResourceTypesResponse (Prelude.Maybe Prelude.Text)+listResourceTypesResponse_nextToken = Lens.lens (\ListResourceTypesResponse' {nextToken} -> nextToken) (\s@ListResourceTypesResponse' {} a -> s {nextToken = a} :: ListResourceTypesResponse)++-- | An array of objects that contain information about the resource types+-- that can be shared using RAM.+listResourceTypesResponse_resourceTypes :: Lens.Lens' ListResourceTypesResponse (Prelude.Maybe [ServiceNameAndResourceType])+listResourceTypesResponse_resourceTypes = Lens.lens (\ListResourceTypesResponse' {resourceTypes} -> resourceTypes) (\s@ListResourceTypesResponse' {} a -> s {resourceTypes = a} :: ListResourceTypesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listResourceTypesResponse_httpStatus :: Lens.Lens' ListResourceTypesResponse Prelude.Int+listResourceTypesResponse_httpStatus = Lens.lens (\ListResourceTypesResponse' {httpStatus} -> httpStatus) (\s@ListResourceTypesResponse' {} a -> s {httpStatus = a} :: ListResourceTypesResponse)++instance Prelude.NFData ListResourceTypesResponse where+  rnf ListResourceTypesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceTypes+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/ListResources.hs view
@@ -0,0 +1,431 @@+{-# 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.RAM.ListResources+-- 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 resources that you added to a resource share or the resources+-- that are shared with you.+--+-- This operation returns paginated results.+module Amazonka.RAM.ListResources+  ( -- * Creating a Request+    ListResources (..),+    newListResources,++    -- * Request Lenses+    listResources_maxResults,+    listResources_nextToken,+    listResources_principal,+    listResources_resourceArns,+    listResources_resourceRegionScope,+    listResources_resourceShareArns,+    listResources_resourceType,+    listResources_resourceOwner,++    -- * Destructuring the Response+    ListResourcesResponse (..),+    newListResourcesResponse,++    -- * Response Lenses+    listResourcesResponse_nextToken,+    listResourcesResponse_resources,+    listResourcesResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListResources' smart constructor.+data ListResources = ListResources'+  { -- | Specifies the total number of results that you want included on each+    -- page of the response. If you do not include this parameter, it defaults+    -- to a value that is specific to the operation. If additional items exist+    -- beyond the number you specify, the @NextToken@ response element is+    -- returned with a value (not null). Include the specified value as the+    -- @NextToken@ request parameter in the next call to the operation to get+    -- the next part of the results. Note that the service might return fewer+    -- results than the maximum even when there are more results available. You+    -- should check @NextToken@ after every operation to ensure that you+    -- receive all of the results.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Specifies that you want to receive the next page of results. Valid only+    -- if you received a @NextToken@ response in the previous request. If you+    -- did, it indicates that more output is available. Set this parameter to+    -- the value provided by the previous call\'s @NextToken@ response to+    -- request the next page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want to list only the resource shares that are+    -- associated with the specified principal.+    principal :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want to list only the resource shares that include+    -- resources with the specified+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>.+    resourceArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies that you want the results to include only resources that have+    -- the specified scope.+    --+    -- -   @ALL@ – the results include both global and regional resources or+    --     resource types.+    --+    -- -   @GLOBAL@ – the results include only global resources or resource+    --     types.+    --+    -- -   @REGIONAL@ – the results include only regional resources or resource+    --     types.+    --+    -- The default value is @ALL@.+    resourceRegionScope :: Prelude.Maybe ResourceRegionScopeFilter,+    -- | Specifies that you want to list only resources in the resource shares+    -- identified by the specified+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>.+    resourceShareArns :: Prelude.Maybe [Prelude.Text],+    -- | Specifies that you want to list only the resource shares that include+    -- resources of the specified resource type.+    --+    -- For valid values, query the ListResourceTypes operation.+    resourceType :: Prelude.Maybe Prelude.Text,+    -- | Specifies that you want to list only the resource shares that match the+    -- following:+    --+    -- -   __@SELF@__ – resources that your account shares with other accounts+    --+    -- -   __@OTHER-ACCOUNTS@__ – resources that other accounts share with your+    --     account+    resourceOwner :: ResourceOwner+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResources' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listResources_maxResults' - Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+--+-- 'nextToken', 'listResources_nextToken' - Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+--+-- 'principal', 'listResources_principal' - Specifies that you want to list only the resource shares that are+-- associated with the specified principal.+--+-- 'resourceArns', 'listResources_resourceArns' - Specifies that you want to list only the resource shares that include+-- resources with the specified+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>.+--+-- 'resourceRegionScope', 'listResources_resourceRegionScope' - Specifies that you want the results to include only resources that have+-- the specified scope.+--+-- -   @ALL@ – the results include both global and regional resources or+--     resource types.+--+-- -   @GLOBAL@ – the results include only global resources or resource+--     types.+--+-- -   @REGIONAL@ – the results include only regional resources or resource+--     types.+--+-- The default value is @ALL@.+--+-- 'resourceShareArns', 'listResources_resourceShareArns' - Specifies that you want to list only resources in the resource shares+-- identified by the specified+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>.+--+-- 'resourceType', 'listResources_resourceType' - Specifies that you want to list only the resource shares that include+-- resources of the specified resource type.+--+-- For valid values, query the ListResourceTypes operation.+--+-- 'resourceOwner', 'listResources_resourceOwner' - Specifies that you want to list only the resource shares that match the+-- following:+--+-- -   __@SELF@__ – resources that your account shares with other accounts+--+-- -   __@OTHER-ACCOUNTS@__ – resources that other accounts share with your+--     account+newListResources ::+  -- | 'resourceOwner'+  ResourceOwner ->+  ListResources+newListResources pResourceOwner_ =+  ListResources'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      principal = Prelude.Nothing,+      resourceArns = Prelude.Nothing,+      resourceRegionScope = Prelude.Nothing,+      resourceShareArns = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      resourceOwner = pResourceOwner_+    }++-- | Specifies the total number of results that you want included on each+-- page of the response. If you do not include this parameter, it defaults+-- to a value that is specific to the operation. If additional items exist+-- beyond the number you specify, the @NextToken@ response element is+-- returned with a value (not null). Include the specified value as the+-- @NextToken@ request parameter in the next call to the operation to get+-- the next part of the results. Note that the service might return fewer+-- results than the maximum even when there are more results available. You+-- should check @NextToken@ after every operation to ensure that you+-- receive all of the results.+listResources_maxResults :: Lens.Lens' ListResources (Prelude.Maybe Prelude.Natural)+listResources_maxResults = Lens.lens (\ListResources' {maxResults} -> maxResults) (\s@ListResources' {} a -> s {maxResults = a} :: ListResources)++-- | Specifies that you want to receive the next page of results. Valid only+-- if you received a @NextToken@ response in the previous request. If you+-- did, it indicates that more output is available. Set this parameter to+-- the value provided by the previous call\'s @NextToken@ response to+-- request the next page of results.+listResources_nextToken :: Lens.Lens' ListResources (Prelude.Maybe Prelude.Text)+listResources_nextToken = Lens.lens (\ListResources' {nextToken} -> nextToken) (\s@ListResources' {} a -> s {nextToken = a} :: ListResources)++-- | Specifies that you want to list only the resource shares that are+-- associated with the specified principal.+listResources_principal :: Lens.Lens' ListResources (Prelude.Maybe Prelude.Text)+listResources_principal = Lens.lens (\ListResources' {principal} -> principal) (\s@ListResources' {} a -> s {principal = a} :: ListResources)++-- | Specifies that you want to list only the resource shares that include+-- resources with the specified+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>.+listResources_resourceArns :: Lens.Lens' ListResources (Prelude.Maybe [Prelude.Text])+listResources_resourceArns = Lens.lens (\ListResources' {resourceArns} -> resourceArns) (\s@ListResources' {} a -> s {resourceArns = a} :: ListResources) Prelude.. Lens.mapping Lens.coerced++-- | Specifies that you want the results to include only resources that have+-- the specified scope.+--+-- -   @ALL@ – the results include both global and regional resources or+--     resource types.+--+-- -   @GLOBAL@ – the results include only global resources or resource+--     types.+--+-- -   @REGIONAL@ – the results include only regional resources or resource+--     types.+--+-- The default value is @ALL@.+listResources_resourceRegionScope :: Lens.Lens' ListResources (Prelude.Maybe ResourceRegionScopeFilter)+listResources_resourceRegionScope = Lens.lens (\ListResources' {resourceRegionScope} -> resourceRegionScope) (\s@ListResources' {} a -> s {resourceRegionScope = a} :: ListResources)++-- | Specifies that you want to list only resources in the resource shares+-- identified by the specified+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>.+listResources_resourceShareArns :: Lens.Lens' ListResources (Prelude.Maybe [Prelude.Text])+listResources_resourceShareArns = Lens.lens (\ListResources' {resourceShareArns} -> resourceShareArns) (\s@ListResources' {} a -> s {resourceShareArns = a} :: ListResources) Prelude.. Lens.mapping Lens.coerced++-- | Specifies that you want to list only the resource shares that include+-- resources of the specified resource type.+--+-- For valid values, query the ListResourceTypes operation.+listResources_resourceType :: Lens.Lens' ListResources (Prelude.Maybe Prelude.Text)+listResources_resourceType = Lens.lens (\ListResources' {resourceType} -> resourceType) (\s@ListResources' {} a -> s {resourceType = a} :: ListResources)++-- | Specifies that you want to list only the resource shares that match the+-- following:+--+-- -   __@SELF@__ – resources that your account shares with other accounts+--+-- -   __@OTHER-ACCOUNTS@__ – resources that other accounts share with your+--     account+listResources_resourceOwner :: Lens.Lens' ListResources ResourceOwner+listResources_resourceOwner = Lens.lens (\ListResources' {resourceOwner} -> resourceOwner) (\s@ListResources' {} a -> s {resourceOwner = a} :: ListResources)++instance Core.AWSPager ListResources where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listResourcesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listResourcesResponse_resources+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listResources_nextToken+          Lens..~ rs+          Lens.^? listResourcesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListResources where+  type+    AWSResponse ListResources =+      ListResourcesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListResourcesResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> (x Data..?> "resources" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListResources where+  hashWithSalt _salt ListResources' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` principal+      `Prelude.hashWithSalt` resourceArns+      `Prelude.hashWithSalt` resourceRegionScope+      `Prelude.hashWithSalt` resourceShareArns+      `Prelude.hashWithSalt` resourceType+      `Prelude.hashWithSalt` resourceOwner++instance Prelude.NFData ListResources where+  rnf ListResources' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf principal+      `Prelude.seq` Prelude.rnf resourceArns+      `Prelude.seq` Prelude.rnf resourceRegionScope+      `Prelude.seq` Prelude.rnf resourceShareArns+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf resourceOwner++instance Data.ToHeaders ListResources where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListResources where+  toJSON ListResources' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("principal" Data..=) Prelude.<$> principal,+            ("resourceArns" Data..=) Prelude.<$> resourceArns,+            ("resourceRegionScope" Data..=)+              Prelude.<$> resourceRegionScope,+            ("resourceShareArns" Data..=)+              Prelude.<$> resourceShareArns,+            ("resourceType" Data..=) Prelude.<$> resourceType,+            Prelude.Just+              ("resourceOwner" Data..= resourceOwner)+          ]+      )++instance Data.ToPath ListResources where+  toPath = Prelude.const "/listresources"++instance Data.ToQuery ListResources where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListResourcesResponse' smart constructor.+data ListResourcesResponse = ListResourcesResponse'+  { -- | If present, this value indicates that more output is available than is+    -- included in the current response. Use this value in the @NextToken@+    -- request parameter in a subsequent call to the operation to get the next+    -- part of the output. You should repeat this until the @NextToken@+    -- response element comes back as @null@. This indicates that this is the+    -- last page of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that contain information about the resources.+    resources :: Prelude.Maybe [Resource],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResourcesResponse' 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', 'listResourcesResponse_nextToken' - If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+--+-- 'resources', 'listResourcesResponse_resources' - An array of objects that contain information about the resources.+--+-- 'httpStatus', 'listResourcesResponse_httpStatus' - The response's http status code.+newListResourcesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListResourcesResponse+newListResourcesResponse pHttpStatus_ =+  ListResourcesResponse'+    { nextToken = Prelude.Nothing,+      resources = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If present, this value indicates that more output is available than is+-- included in the current response. Use this value in the @NextToken@+-- request parameter in a subsequent call to the operation to get the next+-- part of the output. You should repeat this until the @NextToken@+-- response element comes back as @null@. This indicates that this is the+-- last page of results.+listResourcesResponse_nextToken :: Lens.Lens' ListResourcesResponse (Prelude.Maybe Prelude.Text)+listResourcesResponse_nextToken = Lens.lens (\ListResourcesResponse' {nextToken} -> nextToken) (\s@ListResourcesResponse' {} a -> s {nextToken = a} :: ListResourcesResponse)++-- | An array of objects that contain information about the resources.+listResourcesResponse_resources :: Lens.Lens' ListResourcesResponse (Prelude.Maybe [Resource])+listResourcesResponse_resources = Lens.lens (\ListResourcesResponse' {resources} -> resources) (\s@ListResourcesResponse' {} a -> s {resources = a} :: ListResourcesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listResourcesResponse_httpStatus :: Lens.Lens' ListResourcesResponse Prelude.Int+listResourcesResponse_httpStatus = Lens.lens (\ListResourcesResponse' {httpStatus} -> httpStatus) (\s@ListResourcesResponse' {} a -> s {httpStatus = a} :: ListResourcesResponse)++instance Prelude.NFData ListResourcesResponse where+  rnf ListResourcesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resources+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/PromoteResourceShareCreatedFromPolicy.hs view
@@ -0,0 +1,215 @@+{-# 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.RAM.PromoteResourceShareCreatedFromPolicy+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- When you attach a resource-based permission policy to a resource, it+-- automatically creates a resource share. However, resource shares created+-- this way are visible only to the resource share owner, and the resource+-- share can\'t be modified in RAM.+--+-- You can use this operation to promote the resource share to a full RAM+-- resource share. When you promote a resource share, you can then manage+-- the resource share in RAM and it becomes visible to all of the+-- principals you shared it with.+module Amazonka.RAM.PromoteResourceShareCreatedFromPolicy+  ( -- * Creating a Request+    PromoteResourceShareCreatedFromPolicy (..),+    newPromoteResourceShareCreatedFromPolicy,++    -- * Request Lenses+    promoteResourceShareCreatedFromPolicy_resourceShareArn,++    -- * Destructuring the Response+    PromoteResourceShareCreatedFromPolicyResponse (..),+    newPromoteResourceShareCreatedFromPolicyResponse,++    -- * Response Lenses+    promoteResourceShareCreatedFromPolicyResponse_returnValue,+    promoteResourceShareCreatedFromPolicyResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newPromoteResourceShareCreatedFromPolicy' smart constructor.+data PromoteResourceShareCreatedFromPolicy = PromoteResourceShareCreatedFromPolicy'+  { -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share to promote.+    resourceShareArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PromoteResourceShareCreatedFromPolicy' 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:+--+-- 'resourceShareArn', 'promoteResourceShareCreatedFromPolicy_resourceShareArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share to promote.+newPromoteResourceShareCreatedFromPolicy ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  PromoteResourceShareCreatedFromPolicy+newPromoteResourceShareCreatedFromPolicy+  pResourceShareArn_ =+    PromoteResourceShareCreatedFromPolicy'+      { resourceShareArn =+          pResourceShareArn_+      }++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share to promote.+promoteResourceShareCreatedFromPolicy_resourceShareArn :: Lens.Lens' PromoteResourceShareCreatedFromPolicy Prelude.Text+promoteResourceShareCreatedFromPolicy_resourceShareArn = Lens.lens (\PromoteResourceShareCreatedFromPolicy' {resourceShareArn} -> resourceShareArn) (\s@PromoteResourceShareCreatedFromPolicy' {} a -> s {resourceShareArn = a} :: PromoteResourceShareCreatedFromPolicy)++instance+  Core.AWSRequest+    PromoteResourceShareCreatedFromPolicy+  where+  type+    AWSResponse+      PromoteResourceShareCreatedFromPolicy =+      PromoteResourceShareCreatedFromPolicyResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          PromoteResourceShareCreatedFromPolicyResponse'+            Prelude.<$> (x Data..?> "returnValue")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    PromoteResourceShareCreatedFromPolicy+  where+  hashWithSalt+    _salt+    PromoteResourceShareCreatedFromPolicy' {..} =+      _salt `Prelude.hashWithSalt` resourceShareArn++instance+  Prelude.NFData+    PromoteResourceShareCreatedFromPolicy+  where+  rnf PromoteResourceShareCreatedFromPolicy' {..} =+    Prelude.rnf resourceShareArn++instance+  Data.ToHeaders+    PromoteResourceShareCreatedFromPolicy+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance+  Data.ToJSON+    PromoteResourceShareCreatedFromPolicy+  where+  toJSON = Prelude.const (Data.Object Prelude.mempty)++instance+  Data.ToPath+    PromoteResourceShareCreatedFromPolicy+  where+  toPath =+    Prelude.const+      "/promoteresourcesharecreatedfrompolicy"++instance+  Data.ToQuery+    PromoteResourceShareCreatedFromPolicy+  where+  toQuery PromoteResourceShareCreatedFromPolicy' {..} =+    Prelude.mconcat+      ["resourceShareArn" Data.=: resourceShareArn]++-- | /See:/ 'newPromoteResourceShareCreatedFromPolicyResponse' smart constructor.+data PromoteResourceShareCreatedFromPolicyResponse = PromoteResourceShareCreatedFromPolicyResponse'+  { -- | A return value of @true@ indicates that the request succeeded. A value+    -- of @false@ indicates that the request failed.+    returnValue :: Prelude.Maybe Prelude.Bool,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PromoteResourceShareCreatedFromPolicyResponse' 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:+--+-- 'returnValue', 'promoteResourceShareCreatedFromPolicyResponse_returnValue' - A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+--+-- 'httpStatus', 'promoteResourceShareCreatedFromPolicyResponse_httpStatus' - The response's http status code.+newPromoteResourceShareCreatedFromPolicyResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  PromoteResourceShareCreatedFromPolicyResponse+newPromoteResourceShareCreatedFromPolicyResponse+  pHttpStatus_ =+    PromoteResourceShareCreatedFromPolicyResponse'+      { returnValue =+          Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | A return value of @true@ indicates that the request succeeded. A value+-- of @false@ indicates that the request failed.+promoteResourceShareCreatedFromPolicyResponse_returnValue :: Lens.Lens' PromoteResourceShareCreatedFromPolicyResponse (Prelude.Maybe Prelude.Bool)+promoteResourceShareCreatedFromPolicyResponse_returnValue = Lens.lens (\PromoteResourceShareCreatedFromPolicyResponse' {returnValue} -> returnValue) (\s@PromoteResourceShareCreatedFromPolicyResponse' {} a -> s {returnValue = a} :: PromoteResourceShareCreatedFromPolicyResponse)++-- | The response's http status code.+promoteResourceShareCreatedFromPolicyResponse_httpStatus :: Lens.Lens' PromoteResourceShareCreatedFromPolicyResponse Prelude.Int+promoteResourceShareCreatedFromPolicyResponse_httpStatus = Lens.lens (\PromoteResourceShareCreatedFromPolicyResponse' {httpStatus} -> httpStatus) (\s@PromoteResourceShareCreatedFromPolicyResponse' {} a -> s {httpStatus = a} :: PromoteResourceShareCreatedFromPolicyResponse)++instance+  Prelude.NFData+    PromoteResourceShareCreatedFromPolicyResponse+  where+  rnf+    PromoteResourceShareCreatedFromPolicyResponse' {..} =+      Prelude.rnf returnValue+        `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/RejectResourceShareInvitation.hs view
@@ -0,0 +1,257 @@+{-# 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.RAM.RejectResourceShareInvitation+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Rejects an invitation to a resource share from another Amazon Web+-- Services account.+module Amazonka.RAM.RejectResourceShareInvitation+  ( -- * Creating a Request+    RejectResourceShareInvitation (..),+    newRejectResourceShareInvitation,++    -- * Request Lenses+    rejectResourceShareInvitation_clientToken,+    rejectResourceShareInvitation_resourceShareInvitationArn,++    -- * Destructuring the Response+    RejectResourceShareInvitationResponse (..),+    newRejectResourceShareInvitationResponse,++    -- * Response Lenses+    rejectResourceShareInvitationResponse_clientToken,+    rejectResourceShareInvitationResponse_resourceShareInvitation,+    rejectResourceShareInvitationResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newRejectResourceShareInvitation' smart constructor.+data RejectResourceShareInvitation = RejectResourceShareInvitation'+  { -- | Specifies a unique, case-sensitive identifier that you provide to ensure+    -- the idempotency of the request. This lets you safely retry the request+    -- without accidentally performing the same operation a second time.+    -- Passing the same value to a later call to an operation requires that you+    -- also pass the same value for all other parameters. We recommend that you+    -- use a+    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+    --+    -- If you don\'t provide this value, then Amazon Web Services generates a+    -- random one for you.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the invitation that you want to reject.+    resourceShareInvitationArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RejectResourceShareInvitation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'rejectResourceShareInvitation_clientToken' - Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+--+-- 'resourceShareInvitationArn', 'rejectResourceShareInvitation_resourceShareInvitationArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the invitation that you want to reject.+newRejectResourceShareInvitation ::+  -- | 'resourceShareInvitationArn'+  Prelude.Text ->+  RejectResourceShareInvitation+newRejectResourceShareInvitation+  pResourceShareInvitationArn_ =+    RejectResourceShareInvitation'+      { clientToken =+          Prelude.Nothing,+        resourceShareInvitationArn =+          pResourceShareInvitationArn_+      }++-- | Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+rejectResourceShareInvitation_clientToken :: Lens.Lens' RejectResourceShareInvitation (Prelude.Maybe Prelude.Text)+rejectResourceShareInvitation_clientToken = Lens.lens (\RejectResourceShareInvitation' {clientToken} -> clientToken) (\s@RejectResourceShareInvitation' {} a -> s {clientToken = a} :: RejectResourceShareInvitation)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the invitation that you want to reject.+rejectResourceShareInvitation_resourceShareInvitationArn :: Lens.Lens' RejectResourceShareInvitation Prelude.Text+rejectResourceShareInvitation_resourceShareInvitationArn = Lens.lens (\RejectResourceShareInvitation' {resourceShareInvitationArn} -> resourceShareInvitationArn) (\s@RejectResourceShareInvitation' {} a -> s {resourceShareInvitationArn = a} :: RejectResourceShareInvitation)++instance+  Core.AWSRequest+    RejectResourceShareInvitation+  where+  type+    AWSResponse RejectResourceShareInvitation =+      RejectResourceShareInvitationResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          RejectResourceShareInvitationResponse'+            Prelude.<$> (x Data..?> "clientToken")+            Prelude.<*> (x Data..?> "resourceShareInvitation")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    RejectResourceShareInvitation+  where+  hashWithSalt _salt RejectResourceShareInvitation' {..} =+    _salt+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` resourceShareInvitationArn++instance Prelude.NFData RejectResourceShareInvitation where+  rnf RejectResourceShareInvitation' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShareInvitationArn++instance Data.ToHeaders RejectResourceShareInvitation where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON RejectResourceShareInvitation where+  toJSON RejectResourceShareInvitation' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("clientToken" Data..=) Prelude.<$> clientToken,+            Prelude.Just+              ( "resourceShareInvitationArn"+                  Data..= resourceShareInvitationArn+              )+          ]+      )++instance Data.ToPath RejectResourceShareInvitation where+  toPath =+    Prelude.const "/rejectresourceshareinvitation"++instance Data.ToQuery RejectResourceShareInvitation where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newRejectResourceShareInvitationResponse' smart constructor.+data RejectResourceShareInvitationResponse = RejectResourceShareInvitationResponse'+  { -- | The idempotency identifier associated with this request. If you want to+    -- repeat the same operation in an idempotent manner then you must include+    -- this value in the @clientToken@ request parameter of that later call.+    -- All other parameters must also have the same values that you used in the+    -- first call.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | An object that contains the details about the rejected invitation.+    resourceShareInvitation :: Prelude.Maybe ResourceShareInvitation,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RejectResourceShareInvitationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'rejectResourceShareInvitationResponse_clientToken' - The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+--+-- 'resourceShareInvitation', 'rejectResourceShareInvitationResponse_resourceShareInvitation' - An object that contains the details about the rejected invitation.+--+-- 'httpStatus', 'rejectResourceShareInvitationResponse_httpStatus' - The response's http status code.+newRejectResourceShareInvitationResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  RejectResourceShareInvitationResponse+newRejectResourceShareInvitationResponse pHttpStatus_ =+  RejectResourceShareInvitationResponse'+    { clientToken =+        Prelude.Nothing,+      resourceShareInvitation =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+rejectResourceShareInvitationResponse_clientToken :: Lens.Lens' RejectResourceShareInvitationResponse (Prelude.Maybe Prelude.Text)+rejectResourceShareInvitationResponse_clientToken = Lens.lens (\RejectResourceShareInvitationResponse' {clientToken} -> clientToken) (\s@RejectResourceShareInvitationResponse' {} a -> s {clientToken = a} :: RejectResourceShareInvitationResponse)++-- | An object that contains the details about the rejected invitation.+rejectResourceShareInvitationResponse_resourceShareInvitation :: Lens.Lens' RejectResourceShareInvitationResponse (Prelude.Maybe ResourceShareInvitation)+rejectResourceShareInvitationResponse_resourceShareInvitation = Lens.lens (\RejectResourceShareInvitationResponse' {resourceShareInvitation} -> resourceShareInvitation) (\s@RejectResourceShareInvitationResponse' {} a -> s {resourceShareInvitation = a} :: RejectResourceShareInvitationResponse)++-- | The response's http status code.+rejectResourceShareInvitationResponse_httpStatus :: Lens.Lens' RejectResourceShareInvitationResponse Prelude.Int+rejectResourceShareInvitationResponse_httpStatus = Lens.lens (\RejectResourceShareInvitationResponse' {httpStatus} -> httpStatus) (\s@RejectResourceShareInvitationResponse' {} a -> s {httpStatus = a} :: RejectResourceShareInvitationResponse)++instance+  Prelude.NFData+    RejectResourceShareInvitationResponse+  where+  rnf RejectResourceShareInvitationResponse' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShareInvitation+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/TagResource.hs view
@@ -0,0 +1,179 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RAM.TagResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds the specified tag keys and values to the specified resource share.+-- The tags are attached only to the resource share, not to the resources+-- that are in the resource share.+module Amazonka.RAM.TagResource+  ( -- * Creating a Request+    TagResource (..),+    newTagResource,++    -- * Request Lenses+    tagResource_resourceShareArn,+    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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+  { -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share that you want to add tags to.+    resourceShareArn :: Prelude.Text,+    -- | A list of one or more tag key and value pairs. The tag key must be+    -- present and not be an empty string. The tag value must be present but+    -- can be an empty string.+    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:+--+-- 'resourceShareArn', 'tagResource_resourceShareArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to add tags to.+--+-- 'tags', 'tagResource_tags' - A list of one or more tag key and value pairs. The tag key must be+-- present and not be an empty string. The tag value must be present but+-- can be an empty string.+newTagResource ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  TagResource+newTagResource pResourceShareArn_ =+  TagResource'+    { resourceShareArn = pResourceShareArn_,+      tags = Prelude.mempty+    }++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to add tags to.+tagResource_resourceShareArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceShareArn = Lens.lens (\TagResource' {resourceShareArn} -> resourceShareArn) (\s@TagResource' {} a -> s {resourceShareArn = a} :: TagResource)++-- | A list of one or more tag key and value pairs. The tag key must be+-- present and not be an empty string. The tag value must be present but+-- can be an empty string.+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` resourceShareArn+      `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+  rnf TagResource' {..} =+    Prelude.rnf resourceShareArn+      `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+              ("resourceShareArn" Data..= resourceShareArn),+            Prelude.Just ("tags" Data..= tags)+          ]+      )++instance Data.ToPath TagResource where+  toPath = Prelude.const "/tagresource"++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/RAM/Types.hs view
@@ -0,0 +1,453 @@+{-# 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.RAM.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.RAM.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _IdempotentParameterMismatchException,+    _InvalidClientTokenException,+    _InvalidMaxResultsException,+    _InvalidNextTokenException,+    _InvalidParameterException,+    _InvalidResourceTypeException,+    _InvalidStateTransitionException,+    _MalformedArnException,+    _MissingRequiredParameterException,+    _OperationNotPermittedException,+    _ResourceArnNotFoundException,+    _ResourceShareInvitationAlreadyAcceptedException,+    _ResourceShareInvitationAlreadyRejectedException,+    _ResourceShareInvitationArnNotFoundException,+    _ResourceShareInvitationExpiredException,+    _ResourceShareLimitExceededException,+    _ServerInternalException,+    _ServiceUnavailableException,+    _TagLimitExceededException,+    _TagPolicyViolationException,+    _ThrottlingException,+    _UnknownResourceException,++    -- * ResourceOwner+    ResourceOwner (..),++    -- * ResourceRegionScope+    ResourceRegionScope (..),++    -- * ResourceRegionScopeFilter+    ResourceRegionScopeFilter (..),++    -- * ResourceShareAssociationStatus+    ResourceShareAssociationStatus (..),++    -- * ResourceShareAssociationType+    ResourceShareAssociationType (..),++    -- * ResourceShareFeatureSet+    ResourceShareFeatureSet (..),++    -- * ResourceShareInvitationStatus+    ResourceShareInvitationStatus (..),++    -- * ResourceShareStatus+    ResourceShareStatus (..),++    -- * ResourceStatus+    ResourceStatus (..),++    -- * Principal+    Principal (..),+    newPrincipal,+    principal_creationTime,+    principal_external,+    principal_id,+    principal_lastUpdatedTime,+    principal_resourceShareArn,++    -- * Resource+    Resource (..),+    newResource,+    resource_arn,+    resource_creationTime,+    resource_lastUpdatedTime,+    resource_resourceGroupArn,+    resource_resourceRegionScope,+    resource_resourceShareArn,+    resource_status,+    resource_statusMessage,+    resource_type,++    -- * ResourceShare+    ResourceShare (..),+    newResourceShare,+    resourceShare_allowExternalPrincipals,+    resourceShare_creationTime,+    resourceShare_featureSet,+    resourceShare_lastUpdatedTime,+    resourceShare_name,+    resourceShare_owningAccountId,+    resourceShare_resourceShareArn,+    resourceShare_status,+    resourceShare_statusMessage,+    resourceShare_tags,++    -- * ResourceShareAssociation+    ResourceShareAssociation (..),+    newResourceShareAssociation,+    resourceShareAssociation_associatedEntity,+    resourceShareAssociation_associationType,+    resourceShareAssociation_creationTime,+    resourceShareAssociation_external,+    resourceShareAssociation_lastUpdatedTime,+    resourceShareAssociation_resourceShareArn,+    resourceShareAssociation_resourceShareName,+    resourceShareAssociation_status,+    resourceShareAssociation_statusMessage,++    -- * ResourceShareInvitation+    ResourceShareInvitation (..),+    newResourceShareInvitation,+    resourceShareInvitation_invitationTimestamp,+    resourceShareInvitation_receiverAccountId,+    resourceShareInvitation_receiverArn,+    resourceShareInvitation_resourceShareArn,+    resourceShareInvitation_resourceShareAssociations,+    resourceShareInvitation_resourceShareInvitationArn,+    resourceShareInvitation_resourceShareName,+    resourceShareInvitation_senderAccountId,+    resourceShareInvitation_status,++    -- * ResourceSharePermissionDetail+    ResourceSharePermissionDetail (..),+    newResourceSharePermissionDetail,+    resourceSharePermissionDetail_arn,+    resourceSharePermissionDetail_creationTime,+    resourceSharePermissionDetail_defaultVersion,+    resourceSharePermissionDetail_isResourceTypeDefault,+    resourceSharePermissionDetail_lastUpdatedTime,+    resourceSharePermissionDetail_name,+    resourceSharePermissionDetail_permission,+    resourceSharePermissionDetail_resourceType,+    resourceSharePermissionDetail_version,++    -- * ResourceSharePermissionSummary+    ResourceSharePermissionSummary (..),+    newResourceSharePermissionSummary,+    resourceSharePermissionSummary_arn,+    resourceSharePermissionSummary_creationTime,+    resourceSharePermissionSummary_defaultVersion,+    resourceSharePermissionSummary_isResourceTypeDefault,+    resourceSharePermissionSummary_lastUpdatedTime,+    resourceSharePermissionSummary_name,+    resourceSharePermissionSummary_resourceType,+    resourceSharePermissionSummary_status,+    resourceSharePermissionSummary_version,++    -- * ServiceNameAndResourceType+    ServiceNameAndResourceType (..),+    newServiceNameAndResourceType,+    serviceNameAndResourceType_resourceRegionScope,+    serviceNameAndResourceType_resourceType,+    serviceNameAndResourceType_serviceName,++    -- * Tag+    Tag (..),+    newTag,+    tag_key,+    tag_value,++    -- * TagFilter+    TagFilter (..),+    newTagFilter,+    tagFilter_tagKey,+    tagFilter_tagValues,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import Amazonka.RAM.Types.Principal+import Amazonka.RAM.Types.Resource+import Amazonka.RAM.Types.ResourceOwner+import Amazonka.RAM.Types.ResourceRegionScope+import Amazonka.RAM.Types.ResourceRegionScopeFilter+import Amazonka.RAM.Types.ResourceShare+import Amazonka.RAM.Types.ResourceShareAssociation+import Amazonka.RAM.Types.ResourceShareAssociationStatus+import Amazonka.RAM.Types.ResourceShareAssociationType+import Amazonka.RAM.Types.ResourceShareFeatureSet+import Amazonka.RAM.Types.ResourceShareInvitation+import Amazonka.RAM.Types.ResourceShareInvitationStatus+import Amazonka.RAM.Types.ResourceSharePermissionDetail+import Amazonka.RAM.Types.ResourceSharePermissionSummary+import Amazonka.RAM.Types.ResourceShareStatus+import Amazonka.RAM.Types.ResourceStatus+import Amazonka.RAM.Types.ServiceNameAndResourceType+import Amazonka.RAM.Types.Tag+import Amazonka.RAM.Types.TagFilter+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2018-01-04@ of the Amazon Resource Access Manager SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "RAM",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "ram",+      Core.signingName = "ram",+      Core.version = "2018-01-04",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseJSONError "RAM",+      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 client token input parameter was matched one used with a previous+-- call to the operation, but at least one of the other input parameters is+-- different from the previous call.+_IdempotentParameterMismatchException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_IdempotentParameterMismatchException =+  Core._MatchServiceError+    defaultService+    "IdempotentParameterMismatchException"+    Prelude.. Core.hasStatus 400++-- | The client token is not valid.+_InvalidClientTokenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidClientTokenException =+  Core._MatchServiceError+    defaultService+    "InvalidClientTokenException"+    Prelude.. Core.hasStatus 400++-- | The specified value for @MaxResults@ is not valid.+_InvalidMaxResultsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidMaxResultsException =+  Core._MatchServiceError+    defaultService+    "InvalidMaxResultsException"+    Prelude.. Core.hasStatus 400++-- | The specified value for @NextToken@ is not valid.+_InvalidNextTokenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidNextTokenException =+  Core._MatchServiceError+    defaultService+    "InvalidNextTokenException"+    Prelude.. Core.hasStatus 400++-- | A parameter is not valid.+_InvalidParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidParameterException =+  Core._MatchServiceError+    defaultService+    "InvalidParameterException"+    Prelude.. Core.hasStatus 400++-- | The specified resource type is not valid.+_InvalidResourceTypeException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidResourceTypeException =+  Core._MatchServiceError+    defaultService+    "InvalidResourceTypeException"+    Prelude.. Core.hasStatus 400++-- | The requested state transition is not valid.+_InvalidStateTransitionException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidStateTransitionException =+  Core._MatchServiceError+    defaultService+    "InvalidStateTransitionException"+    Prelude.. Core.hasStatus 400++-- | The format of an Amazon Resource Name (ARN) is not valid.+_MalformedArnException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_MalformedArnException =+  Core._MatchServiceError+    defaultService+    "MalformedArnException"+    Prelude.. Core.hasStatus 400++-- | A required input parameter is missing.+_MissingRequiredParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_MissingRequiredParameterException =+  Core._MatchServiceError+    defaultService+    "MissingRequiredParameterException"+    Prelude.. Core.hasStatus 400++-- | The requested operation is not permitted.+_OperationNotPermittedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_OperationNotPermittedException =+  Core._MatchServiceError+    defaultService+    "OperationNotPermittedException"+    Prelude.. Core.hasStatus 400++-- | The specified Amazon Resource Name (ARN) was not found.+_ResourceArnNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceArnNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceArnNotFoundException"+    Prelude.. Core.hasStatus 400++-- | The specified invitation was already accepted.+_ResourceShareInvitationAlreadyAcceptedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceShareInvitationAlreadyAcceptedException =+  Core._MatchServiceError+    defaultService+    "ResourceShareInvitationAlreadyAcceptedException"+    Prelude.. Core.hasStatus 400++-- | The specified invitation was already rejected.+_ResourceShareInvitationAlreadyRejectedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceShareInvitationAlreadyRejectedException =+  Core._MatchServiceError+    defaultService+    "ResourceShareInvitationAlreadyRejectedException"+    Prelude.. Core.hasStatus 400++-- | The specified Amazon Resource Name (ARN) for an invitation was not+-- found.+_ResourceShareInvitationArnNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceShareInvitationArnNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceShareInvitationArnNotFoundException"+    Prelude.. Core.hasStatus 400++-- | The specified invitation is expired.+_ResourceShareInvitationExpiredException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceShareInvitationExpiredException =+  Core._MatchServiceError+    defaultService+    "ResourceShareInvitationExpiredException"+    Prelude.. Core.hasStatus 400++-- | This request would exceed the limit for resource shares for your+-- account.+_ResourceShareLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceShareLimitExceededException =+  Core._MatchServiceError+    defaultService+    "ResourceShareLimitExceededException"+    Prelude.. Core.hasStatus 400++-- | The service could not respond to the request due to an internal problem.+_ServerInternalException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServerInternalException =+  Core._MatchServiceError+    defaultService+    "ServerInternalException"+    Prelude.. Core.hasStatus 500++-- | The service is not available.+_ServiceUnavailableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceUnavailableException =+  Core._MatchServiceError+    defaultService+    "ServiceUnavailableException"+    Prelude.. Core.hasStatus 503++-- | This request would exceed the limit for tags for your account.+_TagLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TagLimitExceededException =+  Core._MatchServiceError+    defaultService+    "TagLimitExceededException"+    Prelude.. Core.hasStatus 400++-- | The specified tag key is a reserved word and can\'t be used.+_TagPolicyViolationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TagPolicyViolationException =+  Core._MatchServiceError+    defaultService+    "TagPolicyViolationException"+    Prelude.. Core.hasStatus 400++-- | You exceeded the rate at which you are allowed to perform this+-- operation. Please try again later.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+  Core._MatchServiceError+    defaultService+    "ThrottlingException"+    Prelude.. Core.hasStatus 429++-- | A specified resource was not found.+_UnknownResourceException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_UnknownResourceException =+  Core._MatchServiceError+    defaultService+    "UnknownResourceException"+    Prelude.. Core.hasStatus 400
+ gen/Amazonka/RAM/Types/Principal.hs view
@@ -0,0 +1,135 @@+{-# 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.RAM.Types.Principal+-- 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.RAM.Types.Principal where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a principal for use with Resource Access Manager.+--+-- /See:/ 'newPrincipal' smart constructor.+data Principal = Principal'+  { -- | The date and time when the principal was associated with the resource+    -- share.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | Indicates whether the principal belongs to the same organization in+    -- Organizations as the Amazon Web Services account that owns the resource+    -- share.+    external :: Prelude.Maybe Prelude.Bool,+    -- | The ID of the principal.+    id :: Prelude.Maybe Prelude.Text,+    -- | The date and time when the association was last updated.+    lastUpdatedTime :: Prelude.Maybe Data.POSIX,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of a resource share the principal is associated with.+    resourceShareArn :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Principal' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTime', 'principal_creationTime' - The date and time when the principal was associated with the resource+-- share.+--+-- 'external', 'principal_external' - Indicates whether the principal belongs to the same organization in+-- Organizations as the Amazon Web Services account that owns the resource+-- share.+--+-- 'id', 'principal_id' - The ID of the principal.+--+-- 'lastUpdatedTime', 'principal_lastUpdatedTime' - The date and time when the association was last updated.+--+-- 'resourceShareArn', 'principal_resourceShareArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of a resource share the principal is associated with.+newPrincipal ::+  Principal+newPrincipal =+  Principal'+    { creationTime = Prelude.Nothing,+      external = Prelude.Nothing,+      id = Prelude.Nothing,+      lastUpdatedTime = Prelude.Nothing,+      resourceShareArn = Prelude.Nothing+    }++-- | The date and time when the principal was associated with the resource+-- share.+principal_creationTime :: Lens.Lens' Principal (Prelude.Maybe Prelude.UTCTime)+principal_creationTime = Lens.lens (\Principal' {creationTime} -> creationTime) (\s@Principal' {} a -> s {creationTime = a} :: Principal) Prelude.. Lens.mapping Data._Time++-- | Indicates whether the principal belongs to the same organization in+-- Organizations as the Amazon Web Services account that owns the resource+-- share.+principal_external :: Lens.Lens' Principal (Prelude.Maybe Prelude.Bool)+principal_external = Lens.lens (\Principal' {external} -> external) (\s@Principal' {} a -> s {external = a} :: Principal)++-- | The ID of the principal.+principal_id :: Lens.Lens' Principal (Prelude.Maybe Prelude.Text)+principal_id = Lens.lens (\Principal' {id} -> id) (\s@Principal' {} a -> s {id = a} :: Principal)++-- | The date and time when the association was last updated.+principal_lastUpdatedTime :: Lens.Lens' Principal (Prelude.Maybe Prelude.UTCTime)+principal_lastUpdatedTime = Lens.lens (\Principal' {lastUpdatedTime} -> lastUpdatedTime) (\s@Principal' {} a -> s {lastUpdatedTime = a} :: Principal) Prelude.. Lens.mapping Data._Time++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of a resource share the principal is associated with.+principal_resourceShareArn :: Lens.Lens' Principal (Prelude.Maybe Prelude.Text)+principal_resourceShareArn = Lens.lens (\Principal' {resourceShareArn} -> resourceShareArn) (\s@Principal' {} a -> s {resourceShareArn = a} :: Principal)++instance Data.FromJSON Principal where+  parseJSON =+    Data.withObject+      "Principal"+      ( \x ->+          Principal'+            Prelude.<$> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "external")+            Prelude.<*> (x Data..:? "id")+            Prelude.<*> (x Data..:? "lastUpdatedTime")+            Prelude.<*> (x Data..:? "resourceShareArn")+      )++instance Prelude.Hashable Principal where+  hashWithSalt _salt Principal' {..} =+    _salt+      `Prelude.hashWithSalt` creationTime+      `Prelude.hashWithSalt` external+      `Prelude.hashWithSalt` id+      `Prelude.hashWithSalt` lastUpdatedTime+      `Prelude.hashWithSalt` resourceShareArn++instance Prelude.NFData Principal where+  rnf Principal' {..} =+    Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf external+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf lastUpdatedTime+      `Prelude.seq` Prelude.rnf resourceShareArn
+ gen/Amazonka/RAM/Types/Resource.hs view
@@ -0,0 +1,218 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RAM.Types.Resource+-- 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.RAM.Types.Resource 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.RAM.Types.ResourceRegionScope+import Amazonka.RAM.Types.ResourceStatus++-- | Describes a resource associated with a resource share in RAM.+--+-- /See:/ 'newResource' smart constructor.+data Resource = Resource'+  { -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The date and time when the resource was associated with the resource+    -- share.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | The date an time when the association was last updated.+    lastUpdatedTime :: Prelude.Maybe Data.POSIX,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource group. This value is available only if the resource is+    -- part of a resource group.+    resourceGroupArn :: Prelude.Maybe Prelude.Text,+    -- | Specifies the scope of visibility of this resource:+    --+    -- -   __REGIONAL__ – The resource can be accessed only by using requests+    --     that target the Amazon Web Services Region in which the resource+    --     exists.+    --+    -- -   __GLOBAL__ – The resource can be accessed from any Amazon Web+    --     Services Region.+    resourceRegionScope :: Prelude.Maybe ResourceRegionScope,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share this resource is associated with.+    resourceShareArn :: Prelude.Maybe Prelude.Text,+    -- | The current status of the resource.+    status :: Prelude.Maybe ResourceStatus,+    -- | A message about the status of the resource.+    statusMessage :: Prelude.Maybe Prelude.Text,+    -- | The resource type. This takes the form of:+    -- @service-code@:@resource-code@+    type' :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Resource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'resource_arn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource.+--+-- 'creationTime', 'resource_creationTime' - The date and time when the resource was associated with the resource+-- share.+--+-- 'lastUpdatedTime', 'resource_lastUpdatedTime' - The date an time when the association was last updated.+--+-- 'resourceGroupArn', 'resource_resourceGroupArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource group. This value is available only if the resource is+-- part of a resource group.+--+-- 'resourceRegionScope', 'resource_resourceRegionScope' - Specifies the scope of visibility of this resource:+--+-- -   __REGIONAL__ – The resource can be accessed only by using requests+--     that target the Amazon Web Services Region in which the resource+--     exists.+--+-- -   __GLOBAL__ – The resource can be accessed from any Amazon Web+--     Services Region.+--+-- 'resourceShareArn', 'resource_resourceShareArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share this resource is associated with.+--+-- 'status', 'resource_status' - The current status of the resource.+--+-- 'statusMessage', 'resource_statusMessage' - A message about the status of the resource.+--+-- 'type'', 'resource_type' - The resource type. This takes the form of:+-- @service-code@:@resource-code@+newResource ::+  Resource+newResource =+  Resource'+    { arn = Prelude.Nothing,+      creationTime = Prelude.Nothing,+      lastUpdatedTime = Prelude.Nothing,+      resourceGroupArn = Prelude.Nothing,+      resourceRegionScope = Prelude.Nothing,+      resourceShareArn = Prelude.Nothing,+      status = Prelude.Nothing,+      statusMessage = Prelude.Nothing,+      type' = Prelude.Nothing+    }++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource.+resource_arn :: Lens.Lens' Resource (Prelude.Maybe Prelude.Text)+resource_arn = Lens.lens (\Resource' {arn} -> arn) (\s@Resource' {} a -> s {arn = a} :: Resource)++-- | The date and time when the resource was associated with the resource+-- share.+resource_creationTime :: Lens.Lens' Resource (Prelude.Maybe Prelude.UTCTime)+resource_creationTime = Lens.lens (\Resource' {creationTime} -> creationTime) (\s@Resource' {} a -> s {creationTime = a} :: Resource) Prelude.. Lens.mapping Data._Time++-- | The date an time when the association was last updated.+resource_lastUpdatedTime :: Lens.Lens' Resource (Prelude.Maybe Prelude.UTCTime)+resource_lastUpdatedTime = Lens.lens (\Resource' {lastUpdatedTime} -> lastUpdatedTime) (\s@Resource' {} a -> s {lastUpdatedTime = a} :: Resource) Prelude.. Lens.mapping Data._Time++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource group. This value is available only if the resource is+-- part of a resource group.+resource_resourceGroupArn :: Lens.Lens' Resource (Prelude.Maybe Prelude.Text)+resource_resourceGroupArn = Lens.lens (\Resource' {resourceGroupArn} -> resourceGroupArn) (\s@Resource' {} a -> s {resourceGroupArn = a} :: Resource)++-- | Specifies the scope of visibility of this resource:+--+-- -   __REGIONAL__ – The resource can be accessed only by using requests+--     that target the Amazon Web Services Region in which the resource+--     exists.+--+-- -   __GLOBAL__ – The resource can be accessed from any Amazon Web+--     Services Region.+resource_resourceRegionScope :: Lens.Lens' Resource (Prelude.Maybe ResourceRegionScope)+resource_resourceRegionScope = Lens.lens (\Resource' {resourceRegionScope} -> resourceRegionScope) (\s@Resource' {} a -> s {resourceRegionScope = a} :: Resource)++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share this resource is associated with.+resource_resourceShareArn :: Lens.Lens' Resource (Prelude.Maybe Prelude.Text)+resource_resourceShareArn = Lens.lens (\Resource' {resourceShareArn} -> resourceShareArn) (\s@Resource' {} a -> s {resourceShareArn = a} :: Resource)++-- | The current status of the resource.+resource_status :: Lens.Lens' Resource (Prelude.Maybe ResourceStatus)+resource_status = Lens.lens (\Resource' {status} -> status) (\s@Resource' {} a -> s {status = a} :: Resource)++-- | A message about the status of the resource.+resource_statusMessage :: Lens.Lens' Resource (Prelude.Maybe Prelude.Text)+resource_statusMessage = Lens.lens (\Resource' {statusMessage} -> statusMessage) (\s@Resource' {} a -> s {statusMessage = a} :: Resource)++-- | The resource type. This takes the form of:+-- @service-code@:@resource-code@+resource_type :: Lens.Lens' Resource (Prelude.Maybe Prelude.Text)+resource_type = Lens.lens (\Resource' {type'} -> type') (\s@Resource' {} a -> s {type' = a} :: Resource)++instance Data.FromJSON Resource where+  parseJSON =+    Data.withObject+      "Resource"+      ( \x ->+          Resource'+            Prelude.<$> (x Data..:? "arn")+            Prelude.<*> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "lastUpdatedTime")+            Prelude.<*> (x Data..:? "resourceGroupArn")+            Prelude.<*> (x Data..:? "resourceRegionScope")+            Prelude.<*> (x Data..:? "resourceShareArn")+            Prelude.<*> (x Data..:? "status")+            Prelude.<*> (x Data..:? "statusMessage")+            Prelude.<*> (x Data..:? "type")+      )++instance Prelude.Hashable Resource where+  hashWithSalt _salt Resource' {..} =+    _salt+      `Prelude.hashWithSalt` arn+      `Prelude.hashWithSalt` creationTime+      `Prelude.hashWithSalt` lastUpdatedTime+      `Prelude.hashWithSalt` resourceGroupArn+      `Prelude.hashWithSalt` resourceRegionScope+      `Prelude.hashWithSalt` resourceShareArn+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` statusMessage+      `Prelude.hashWithSalt` type'++instance Prelude.NFData Resource where+  rnf Resource' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf lastUpdatedTime+      `Prelude.seq` Prelude.rnf resourceGroupArn+      `Prelude.seq` Prelude.rnf resourceRegionScope+      `Prelude.seq` Prelude.rnf resourceShareArn+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf statusMessage+      `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/RAM/Types/ResourceOwner.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.RAM.Types.ResourceOwner+-- 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.RAM.Types.ResourceOwner+  ( ResourceOwner+      ( ..,+        ResourceOwner_OTHER_ACCOUNTS,+        ResourceOwner_SELF+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceOwner = ResourceOwner'+  { fromResourceOwner ::+      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 ResourceOwner_OTHER_ACCOUNTS :: ResourceOwner+pattern ResourceOwner_OTHER_ACCOUNTS = ResourceOwner' "OTHER-ACCOUNTS"++pattern ResourceOwner_SELF :: ResourceOwner+pattern ResourceOwner_SELF = ResourceOwner' "SELF"++{-# COMPLETE+  ResourceOwner_OTHER_ACCOUNTS,+  ResourceOwner_SELF,+  ResourceOwner'+  #-}
+ gen/Amazonka/RAM/Types/ResourceRegionScope.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.RAM.Types.ResourceRegionScope+-- 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.RAM.Types.ResourceRegionScope+  ( ResourceRegionScope+      ( ..,+        ResourceRegionScope_GLOBAL,+        ResourceRegionScope_REGIONAL+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceRegionScope = ResourceRegionScope'+  { fromResourceRegionScope ::+      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 ResourceRegionScope_GLOBAL :: ResourceRegionScope+pattern ResourceRegionScope_GLOBAL = ResourceRegionScope' "GLOBAL"++pattern ResourceRegionScope_REGIONAL :: ResourceRegionScope+pattern ResourceRegionScope_REGIONAL = ResourceRegionScope' "REGIONAL"++{-# COMPLETE+  ResourceRegionScope_GLOBAL,+  ResourceRegionScope_REGIONAL,+  ResourceRegionScope'+  #-}
+ gen/Amazonka/RAM/Types/ResourceRegionScopeFilter.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.RAM.Types.ResourceRegionScopeFilter+-- 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.RAM.Types.ResourceRegionScopeFilter+  ( ResourceRegionScopeFilter+      ( ..,+        ResourceRegionScopeFilter_ALL,+        ResourceRegionScopeFilter_GLOBAL,+        ResourceRegionScopeFilter_REGIONAL+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceRegionScopeFilter = ResourceRegionScopeFilter'+  { fromResourceRegionScopeFilter ::+      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 ResourceRegionScopeFilter_ALL :: ResourceRegionScopeFilter+pattern ResourceRegionScopeFilter_ALL = ResourceRegionScopeFilter' "ALL"++pattern ResourceRegionScopeFilter_GLOBAL :: ResourceRegionScopeFilter+pattern ResourceRegionScopeFilter_GLOBAL = ResourceRegionScopeFilter' "GLOBAL"++pattern ResourceRegionScopeFilter_REGIONAL :: ResourceRegionScopeFilter+pattern ResourceRegionScopeFilter_REGIONAL = ResourceRegionScopeFilter' "REGIONAL"++{-# COMPLETE+  ResourceRegionScopeFilter_ALL,+  ResourceRegionScopeFilter_GLOBAL,+  ResourceRegionScopeFilter_REGIONAL,+  ResourceRegionScopeFilter'+  #-}
+ gen/Amazonka/RAM/Types/ResourceShare.hs view
@@ -0,0 +1,241 @@+{-# 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.RAM.Types.ResourceShare+-- 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.RAM.Types.ResourceShare 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.RAM.Types.ResourceShareFeatureSet+import Amazonka.RAM.Types.ResourceShareStatus+import Amazonka.RAM.Types.Tag++-- | Describes a resource share in RAM.+--+-- /See:/ 'newResourceShare' smart constructor.+data ResourceShare = ResourceShare'+  { -- | Indicates whether principals outside your organization in Organizations+    -- can be associated with a resource share.+    allowExternalPrincipals :: Prelude.Maybe Prelude.Bool,+    -- | The date and time when the resource share was created.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | Indicates how the resource share was created. Possible values include:+    --+    -- -   @CREATED_FROM_POLICY@ - Indicates that the resource share was+    --     created from an Identity and Access Management (IAM) resource-based+    --     permission policy attached to the resource. This type of resource+    --     share is visible only to the Amazon Web Services account that+    --     created it. You can\'t modify it in RAM unless you promote it. For+    --     more information, see PromoteResourceShareCreatedFromPolicy.+    --+    -- -   @PROMOTING_TO_STANDARD@ - The resource share is in the process of+    --     being promoted. For more information, see+    --     PromoteResourceShareCreatedFromPolicy.+    --+    -- -   @STANDARD@ - Indicates that the resource share was created in RAM+    --     using the console or APIs. These resource shares are visible to all+    --     principals you share the resource share with. You can modify these+    --     resource shares in RAM using the console or APIs.+    featureSet :: Prelude.Maybe ResourceShareFeatureSet,+    -- | The date and time when the resource share was last updated.+    lastUpdatedTime :: Prelude.Maybe Data.POSIX,+    -- | The name of the resource share.+    name :: Prelude.Maybe Prelude.Text,+    -- | The ID of the Amazon Web Services account that owns the resource share.+    owningAccountId :: Prelude.Maybe Prelude.Text,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share+    resourceShareArn :: Prelude.Maybe Prelude.Text,+    -- | The current status of the resource share.+    status :: Prelude.Maybe ResourceShareStatus,+    -- | A message about the status of the resource share.+    statusMessage :: Prelude.Maybe Prelude.Text,+    -- | The tag key and value pairs attached to the resource share.+    tags :: Prelude.Maybe [Tag]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceShare' 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:+--+-- 'allowExternalPrincipals', 'resourceShare_allowExternalPrincipals' - Indicates whether principals outside your organization in Organizations+-- can be associated with a resource share.+--+-- 'creationTime', 'resourceShare_creationTime' - The date and time when the resource share was created.+--+-- 'featureSet', 'resourceShare_featureSet' - Indicates how the resource share was created. Possible values include:+--+-- -   @CREATED_FROM_POLICY@ - Indicates that the resource share was+--     created from an Identity and Access Management (IAM) resource-based+--     permission policy attached to the resource. This type of resource+--     share is visible only to the Amazon Web Services account that+--     created it. You can\'t modify it in RAM unless you promote it. For+--     more information, see PromoteResourceShareCreatedFromPolicy.+--+-- -   @PROMOTING_TO_STANDARD@ - The resource share is in the process of+--     being promoted. For more information, see+--     PromoteResourceShareCreatedFromPolicy.+--+-- -   @STANDARD@ - Indicates that the resource share was created in RAM+--     using the console or APIs. These resource shares are visible to all+--     principals you share the resource share with. You can modify these+--     resource shares in RAM using the console or APIs.+--+-- 'lastUpdatedTime', 'resourceShare_lastUpdatedTime' - The date and time when the resource share was last updated.+--+-- 'name', 'resourceShare_name' - The name of the resource share.+--+-- 'owningAccountId', 'resourceShare_owningAccountId' - The ID of the Amazon Web Services account that owns the resource share.+--+-- 'resourceShareArn', 'resourceShare_resourceShareArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share+--+-- 'status', 'resourceShare_status' - The current status of the resource share.+--+-- 'statusMessage', 'resourceShare_statusMessage' - A message about the status of the resource share.+--+-- 'tags', 'resourceShare_tags' - The tag key and value pairs attached to the resource share.+newResourceShare ::+  ResourceShare+newResourceShare =+  ResourceShare'+    { allowExternalPrincipals =+        Prelude.Nothing,+      creationTime = Prelude.Nothing,+      featureSet = Prelude.Nothing,+      lastUpdatedTime = Prelude.Nothing,+      name = Prelude.Nothing,+      owningAccountId = Prelude.Nothing,+      resourceShareArn = Prelude.Nothing,+      status = Prelude.Nothing,+      statusMessage = Prelude.Nothing,+      tags = Prelude.Nothing+    }++-- | Indicates whether principals outside your organization in Organizations+-- can be associated with a resource share.+resourceShare_allowExternalPrincipals :: Lens.Lens' ResourceShare (Prelude.Maybe Prelude.Bool)+resourceShare_allowExternalPrincipals = Lens.lens (\ResourceShare' {allowExternalPrincipals} -> allowExternalPrincipals) (\s@ResourceShare' {} a -> s {allowExternalPrincipals = a} :: ResourceShare)++-- | The date and time when the resource share was created.+resourceShare_creationTime :: Lens.Lens' ResourceShare (Prelude.Maybe Prelude.UTCTime)+resourceShare_creationTime = Lens.lens (\ResourceShare' {creationTime} -> creationTime) (\s@ResourceShare' {} a -> s {creationTime = a} :: ResourceShare) Prelude.. Lens.mapping Data._Time++-- | Indicates how the resource share was created. Possible values include:+--+-- -   @CREATED_FROM_POLICY@ - Indicates that the resource share was+--     created from an Identity and Access Management (IAM) resource-based+--     permission policy attached to the resource. This type of resource+--     share is visible only to the Amazon Web Services account that+--     created it. You can\'t modify it in RAM unless you promote it. For+--     more information, see PromoteResourceShareCreatedFromPolicy.+--+-- -   @PROMOTING_TO_STANDARD@ - The resource share is in the process of+--     being promoted. For more information, see+--     PromoteResourceShareCreatedFromPolicy.+--+-- -   @STANDARD@ - Indicates that the resource share was created in RAM+--     using the console or APIs. These resource shares are visible to all+--     principals you share the resource share with. You can modify these+--     resource shares in RAM using the console or APIs.+resourceShare_featureSet :: Lens.Lens' ResourceShare (Prelude.Maybe ResourceShareFeatureSet)+resourceShare_featureSet = Lens.lens (\ResourceShare' {featureSet} -> featureSet) (\s@ResourceShare' {} a -> s {featureSet = a} :: ResourceShare)++-- | The date and time when the resource share was last updated.+resourceShare_lastUpdatedTime :: Lens.Lens' ResourceShare (Prelude.Maybe Prelude.UTCTime)+resourceShare_lastUpdatedTime = Lens.lens (\ResourceShare' {lastUpdatedTime} -> lastUpdatedTime) (\s@ResourceShare' {} a -> s {lastUpdatedTime = a} :: ResourceShare) Prelude.. Lens.mapping Data._Time++-- | The name of the resource share.+resourceShare_name :: Lens.Lens' ResourceShare (Prelude.Maybe Prelude.Text)+resourceShare_name = Lens.lens (\ResourceShare' {name} -> name) (\s@ResourceShare' {} a -> s {name = a} :: ResourceShare)++-- | The ID of the Amazon Web Services account that owns the resource share.+resourceShare_owningAccountId :: Lens.Lens' ResourceShare (Prelude.Maybe Prelude.Text)+resourceShare_owningAccountId = Lens.lens (\ResourceShare' {owningAccountId} -> owningAccountId) (\s@ResourceShare' {} a -> s {owningAccountId = a} :: ResourceShare)++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share+resourceShare_resourceShareArn :: Lens.Lens' ResourceShare (Prelude.Maybe Prelude.Text)+resourceShare_resourceShareArn = Lens.lens (\ResourceShare' {resourceShareArn} -> resourceShareArn) (\s@ResourceShare' {} a -> s {resourceShareArn = a} :: ResourceShare)++-- | The current status of the resource share.+resourceShare_status :: Lens.Lens' ResourceShare (Prelude.Maybe ResourceShareStatus)+resourceShare_status = Lens.lens (\ResourceShare' {status} -> status) (\s@ResourceShare' {} a -> s {status = a} :: ResourceShare)++-- | A message about the status of the resource share.+resourceShare_statusMessage :: Lens.Lens' ResourceShare (Prelude.Maybe Prelude.Text)+resourceShare_statusMessage = Lens.lens (\ResourceShare' {statusMessage} -> statusMessage) (\s@ResourceShare' {} a -> s {statusMessage = a} :: ResourceShare)++-- | The tag key and value pairs attached to the resource share.+resourceShare_tags :: Lens.Lens' ResourceShare (Prelude.Maybe [Tag])+resourceShare_tags = Lens.lens (\ResourceShare' {tags} -> tags) (\s@ResourceShare' {} a -> s {tags = a} :: ResourceShare) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON ResourceShare where+  parseJSON =+    Data.withObject+      "ResourceShare"+      ( \x ->+          ResourceShare'+            Prelude.<$> (x Data..:? "allowExternalPrincipals")+            Prelude.<*> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "featureSet")+            Prelude.<*> (x Data..:? "lastUpdatedTime")+            Prelude.<*> (x Data..:? "name")+            Prelude.<*> (x Data..:? "owningAccountId")+            Prelude.<*> (x Data..:? "resourceShareArn")+            Prelude.<*> (x Data..:? "status")+            Prelude.<*> (x Data..:? "statusMessage")+            Prelude.<*> (x Data..:? "tags" Data..!= Prelude.mempty)+      )++instance Prelude.Hashable ResourceShare where+  hashWithSalt _salt ResourceShare' {..} =+    _salt+      `Prelude.hashWithSalt` allowExternalPrincipals+      `Prelude.hashWithSalt` creationTime+      `Prelude.hashWithSalt` featureSet+      `Prelude.hashWithSalt` lastUpdatedTime+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` owningAccountId+      `Prelude.hashWithSalt` resourceShareArn+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` statusMessage+      `Prelude.hashWithSalt` tags++instance Prelude.NFData ResourceShare where+  rnf ResourceShare' {..} =+    Prelude.rnf allowExternalPrincipals+      `Prelude.seq` Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf featureSet+      `Prelude.seq` Prelude.rnf lastUpdatedTime+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf owningAccountId+      `Prelude.seq` Prelude.rnf resourceShareArn+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf statusMessage+      `Prelude.seq` Prelude.rnf tags
+ gen/Amazonka/RAM/Types/ResourceShareAssociation.hs view
@@ -0,0 +1,238 @@+{-# 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.RAM.Types.ResourceShareAssociation+-- 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.RAM.Types.ResourceShareAssociation 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.RAM.Types.ResourceShareAssociationStatus+import Amazonka.RAM.Types.ResourceShareAssociationType++-- | Describes an association with a resource share and either a principal or+-- a resource.+--+-- /See:/ 'newResourceShareAssociation' smart constructor.+data ResourceShareAssociation = ResourceShareAssociation'+  { -- | The associated entity. This can be either of the following:+    --+    -- -   For a resource association, this is the+    --     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    --     of the resource.+    --+    -- -   For principal associations, this is one of the following:+    --+    --     -   The ID of an Amazon Web Services account+    --+    --     -   The+    --         <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    --         of an organization in Organizations+    --+    --     -   The ARN of an organizational unit (OU) in Organizations+    --+    --     -   The ARN of an IAM role+    --+    --     -   The ARN of an IAM user+    associatedEntity :: Prelude.Maybe Prelude.Text,+    -- | The type of entity included in this association.+    associationType :: Prelude.Maybe ResourceShareAssociationType,+    -- | The date and time when the association was created.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | Indicates whether the principal belongs to the same organization in+    -- Organizations as the Amazon Web Services account that owns the resource+    -- share.+    external :: Prelude.Maybe Prelude.Bool,+    -- | The date and time when the association was last updated.+    lastUpdatedTime :: Prelude.Maybe Data.POSIX,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share.+    resourceShareArn :: Prelude.Maybe Prelude.Text,+    -- | The name of the resource share.+    resourceShareName :: Prelude.Maybe Prelude.Text,+    -- | The current status of the association.+    status :: Prelude.Maybe ResourceShareAssociationStatus,+    -- | A message about the status of the association.+    statusMessage :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceShareAssociation' 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:+--+-- 'associatedEntity', 'resourceShareAssociation_associatedEntity' - The associated entity. This can be either of the following:+--+-- -   For a resource association, this is the+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of the resource.+--+-- -   For principal associations, this is one of the following:+--+--     -   The ID of an Amazon Web Services account+--+--     -   The+--         <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--         of an organization in Organizations+--+--     -   The ARN of an organizational unit (OU) in Organizations+--+--     -   The ARN of an IAM role+--+--     -   The ARN of an IAM user+--+-- 'associationType', 'resourceShareAssociation_associationType' - The type of entity included in this association.+--+-- 'creationTime', 'resourceShareAssociation_creationTime' - The date and time when the association was created.+--+-- 'external', 'resourceShareAssociation_external' - Indicates whether the principal belongs to the same organization in+-- Organizations as the Amazon Web Services account that owns the resource+-- share.+--+-- 'lastUpdatedTime', 'resourceShareAssociation_lastUpdatedTime' - The date and time when the association was last updated.+--+-- 'resourceShareArn', 'resourceShareAssociation_resourceShareArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share.+--+-- 'resourceShareName', 'resourceShareAssociation_resourceShareName' - The name of the resource share.+--+-- 'status', 'resourceShareAssociation_status' - The current status of the association.+--+-- 'statusMessage', 'resourceShareAssociation_statusMessage' - A message about the status of the association.+newResourceShareAssociation ::+  ResourceShareAssociation+newResourceShareAssociation =+  ResourceShareAssociation'+    { associatedEntity =+        Prelude.Nothing,+      associationType = Prelude.Nothing,+      creationTime = Prelude.Nothing,+      external = Prelude.Nothing,+      lastUpdatedTime = Prelude.Nothing,+      resourceShareArn = Prelude.Nothing,+      resourceShareName = Prelude.Nothing,+      status = Prelude.Nothing,+      statusMessage = Prelude.Nothing+    }++-- | The associated entity. This can be either of the following:+--+-- -   For a resource association, this is the+--     <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--     of the resource.+--+-- -   For principal associations, this is one of the following:+--+--     -   The ID of an Amazon Web Services account+--+--     -   The+--         <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+--         of an organization in Organizations+--+--     -   The ARN of an organizational unit (OU) in Organizations+--+--     -   The ARN of an IAM role+--+--     -   The ARN of an IAM user+resourceShareAssociation_associatedEntity :: Lens.Lens' ResourceShareAssociation (Prelude.Maybe Prelude.Text)+resourceShareAssociation_associatedEntity = Lens.lens (\ResourceShareAssociation' {associatedEntity} -> associatedEntity) (\s@ResourceShareAssociation' {} a -> s {associatedEntity = a} :: ResourceShareAssociation)++-- | The type of entity included in this association.+resourceShareAssociation_associationType :: Lens.Lens' ResourceShareAssociation (Prelude.Maybe ResourceShareAssociationType)+resourceShareAssociation_associationType = Lens.lens (\ResourceShareAssociation' {associationType} -> associationType) (\s@ResourceShareAssociation' {} a -> s {associationType = a} :: ResourceShareAssociation)++-- | The date and time when the association was created.+resourceShareAssociation_creationTime :: Lens.Lens' ResourceShareAssociation (Prelude.Maybe Prelude.UTCTime)+resourceShareAssociation_creationTime = Lens.lens (\ResourceShareAssociation' {creationTime} -> creationTime) (\s@ResourceShareAssociation' {} a -> s {creationTime = a} :: ResourceShareAssociation) Prelude.. Lens.mapping Data._Time++-- | Indicates whether the principal belongs to the same organization in+-- Organizations as the Amazon Web Services account that owns the resource+-- share.+resourceShareAssociation_external :: Lens.Lens' ResourceShareAssociation (Prelude.Maybe Prelude.Bool)+resourceShareAssociation_external = Lens.lens (\ResourceShareAssociation' {external} -> external) (\s@ResourceShareAssociation' {} a -> s {external = a} :: ResourceShareAssociation)++-- | The date and time when the association was last updated.+resourceShareAssociation_lastUpdatedTime :: Lens.Lens' ResourceShareAssociation (Prelude.Maybe Prelude.UTCTime)+resourceShareAssociation_lastUpdatedTime = Lens.lens (\ResourceShareAssociation' {lastUpdatedTime} -> lastUpdatedTime) (\s@ResourceShareAssociation' {} a -> s {lastUpdatedTime = a} :: ResourceShareAssociation) Prelude.. Lens.mapping Data._Time++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share.+resourceShareAssociation_resourceShareArn :: Lens.Lens' ResourceShareAssociation (Prelude.Maybe Prelude.Text)+resourceShareAssociation_resourceShareArn = Lens.lens (\ResourceShareAssociation' {resourceShareArn} -> resourceShareArn) (\s@ResourceShareAssociation' {} a -> s {resourceShareArn = a} :: ResourceShareAssociation)++-- | The name of the resource share.+resourceShareAssociation_resourceShareName :: Lens.Lens' ResourceShareAssociation (Prelude.Maybe Prelude.Text)+resourceShareAssociation_resourceShareName = Lens.lens (\ResourceShareAssociation' {resourceShareName} -> resourceShareName) (\s@ResourceShareAssociation' {} a -> s {resourceShareName = a} :: ResourceShareAssociation)++-- | The current status of the association.+resourceShareAssociation_status :: Lens.Lens' ResourceShareAssociation (Prelude.Maybe ResourceShareAssociationStatus)+resourceShareAssociation_status = Lens.lens (\ResourceShareAssociation' {status} -> status) (\s@ResourceShareAssociation' {} a -> s {status = a} :: ResourceShareAssociation)++-- | A message about the status of the association.+resourceShareAssociation_statusMessage :: Lens.Lens' ResourceShareAssociation (Prelude.Maybe Prelude.Text)+resourceShareAssociation_statusMessage = Lens.lens (\ResourceShareAssociation' {statusMessage} -> statusMessage) (\s@ResourceShareAssociation' {} a -> s {statusMessage = a} :: ResourceShareAssociation)++instance Data.FromJSON ResourceShareAssociation where+  parseJSON =+    Data.withObject+      "ResourceShareAssociation"+      ( \x ->+          ResourceShareAssociation'+            Prelude.<$> (x Data..:? "associatedEntity")+            Prelude.<*> (x Data..:? "associationType")+            Prelude.<*> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "external")+            Prelude.<*> (x Data..:? "lastUpdatedTime")+            Prelude.<*> (x Data..:? "resourceShareArn")+            Prelude.<*> (x Data..:? "resourceShareName")+            Prelude.<*> (x Data..:? "status")+            Prelude.<*> (x Data..:? "statusMessage")+      )++instance Prelude.Hashable ResourceShareAssociation where+  hashWithSalt _salt ResourceShareAssociation' {..} =+    _salt+      `Prelude.hashWithSalt` associatedEntity+      `Prelude.hashWithSalt` associationType+      `Prelude.hashWithSalt` creationTime+      `Prelude.hashWithSalt` external+      `Prelude.hashWithSalt` lastUpdatedTime+      `Prelude.hashWithSalt` resourceShareArn+      `Prelude.hashWithSalt` resourceShareName+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` statusMessage++instance Prelude.NFData ResourceShareAssociation where+  rnf ResourceShareAssociation' {..} =+    Prelude.rnf associatedEntity+      `Prelude.seq` Prelude.rnf associationType+      `Prelude.seq` Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf external+      `Prelude.seq` Prelude.rnf lastUpdatedTime+      `Prelude.seq` Prelude.rnf resourceShareArn+      `Prelude.seq` Prelude.rnf resourceShareName+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf statusMessage
+ gen/Amazonka/RAM/Types/ResourceShareAssociationStatus.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RAM.Types.ResourceShareAssociationStatus+-- 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.RAM.Types.ResourceShareAssociationStatus+  ( ResourceShareAssociationStatus+      ( ..,+        ResourceShareAssociationStatus_ASSOCIATED,+        ResourceShareAssociationStatus_ASSOCIATING,+        ResourceShareAssociationStatus_DISASSOCIATED,+        ResourceShareAssociationStatus_DISASSOCIATING,+        ResourceShareAssociationStatus_FAILED+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceShareAssociationStatus = ResourceShareAssociationStatus'+  { fromResourceShareAssociationStatus ::+      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 ResourceShareAssociationStatus_ASSOCIATED :: ResourceShareAssociationStatus+pattern ResourceShareAssociationStatus_ASSOCIATED = ResourceShareAssociationStatus' "ASSOCIATED"++pattern ResourceShareAssociationStatus_ASSOCIATING :: ResourceShareAssociationStatus+pattern ResourceShareAssociationStatus_ASSOCIATING = ResourceShareAssociationStatus' "ASSOCIATING"++pattern ResourceShareAssociationStatus_DISASSOCIATED :: ResourceShareAssociationStatus+pattern ResourceShareAssociationStatus_DISASSOCIATED = ResourceShareAssociationStatus' "DISASSOCIATED"++pattern ResourceShareAssociationStatus_DISASSOCIATING :: ResourceShareAssociationStatus+pattern ResourceShareAssociationStatus_DISASSOCIATING = ResourceShareAssociationStatus' "DISASSOCIATING"++pattern ResourceShareAssociationStatus_FAILED :: ResourceShareAssociationStatus+pattern ResourceShareAssociationStatus_FAILED = ResourceShareAssociationStatus' "FAILED"++{-# COMPLETE+  ResourceShareAssociationStatus_ASSOCIATED,+  ResourceShareAssociationStatus_ASSOCIATING,+  ResourceShareAssociationStatus_DISASSOCIATED,+  ResourceShareAssociationStatus_DISASSOCIATING,+  ResourceShareAssociationStatus_FAILED,+  ResourceShareAssociationStatus'+  #-}
+ gen/Amazonka/RAM/Types/ResourceShareAssociationType.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.RAM.Types.ResourceShareAssociationType+-- 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.RAM.Types.ResourceShareAssociationType+  ( ResourceShareAssociationType+      ( ..,+        ResourceShareAssociationType_PRINCIPAL,+        ResourceShareAssociationType_RESOURCE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceShareAssociationType = ResourceShareAssociationType'+  { fromResourceShareAssociationType ::+      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 ResourceShareAssociationType_PRINCIPAL :: ResourceShareAssociationType+pattern ResourceShareAssociationType_PRINCIPAL = ResourceShareAssociationType' "PRINCIPAL"++pattern ResourceShareAssociationType_RESOURCE :: ResourceShareAssociationType+pattern ResourceShareAssociationType_RESOURCE = ResourceShareAssociationType' "RESOURCE"++{-# COMPLETE+  ResourceShareAssociationType_PRINCIPAL,+  ResourceShareAssociationType_RESOURCE,+  ResourceShareAssociationType'+  #-}
+ gen/Amazonka/RAM/Types/ResourceShareFeatureSet.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.RAM.Types.ResourceShareFeatureSet+-- 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.RAM.Types.ResourceShareFeatureSet+  ( ResourceShareFeatureSet+      ( ..,+        ResourceShareFeatureSet_CREATED_FROM_POLICY,+        ResourceShareFeatureSet_PROMOTING_TO_STANDARD,+        ResourceShareFeatureSet_STANDARD+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceShareFeatureSet = ResourceShareFeatureSet'+  { fromResourceShareFeatureSet ::+      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 ResourceShareFeatureSet_CREATED_FROM_POLICY :: ResourceShareFeatureSet+pattern ResourceShareFeatureSet_CREATED_FROM_POLICY = ResourceShareFeatureSet' "CREATED_FROM_POLICY"++pattern ResourceShareFeatureSet_PROMOTING_TO_STANDARD :: ResourceShareFeatureSet+pattern ResourceShareFeatureSet_PROMOTING_TO_STANDARD = ResourceShareFeatureSet' "PROMOTING_TO_STANDARD"++pattern ResourceShareFeatureSet_STANDARD :: ResourceShareFeatureSet+pattern ResourceShareFeatureSet_STANDARD = ResourceShareFeatureSet' "STANDARD"++{-# COMPLETE+  ResourceShareFeatureSet_CREATED_FROM_POLICY,+  ResourceShareFeatureSet_PROMOTING_TO_STANDARD,+  ResourceShareFeatureSet_STANDARD,+  ResourceShareFeatureSet'+  #-}
+ gen/Amazonka/RAM/Types/ResourceShareInvitation.hs view
@@ -0,0 +1,196 @@+{-# 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.RAM.Types.ResourceShareInvitation+-- 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.RAM.Types.ResourceShareInvitation 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.RAM.Types.ResourceShareAssociation+import Amazonka.RAM.Types.ResourceShareInvitationStatus++-- | Describes an invitation for an Amazon Web Services account to join a+-- resource share.+--+-- /See:/ 'newResourceShareInvitation' smart constructor.+data ResourceShareInvitation = ResourceShareInvitation'+  { -- | The date and time when the invitation was sent.+    invitationTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The ID of the Amazon Web Services account that received the invitation.+    receiverAccountId :: Prelude.Maybe Prelude.Text,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the IAM user or role that received the invitation.+    receiverArn :: Prelude.Maybe Prelude.Text,+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share+    resourceShareArn :: Prelude.Maybe Prelude.Text,+    -- | To view the resources associated with a pending resource share+    -- invitation, use ListPendingInvitationResources.+    resourceShareAssociations :: Prelude.Maybe [ResourceShareAssociation],+    -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the invitation.+    resourceShareInvitationArn :: Prelude.Maybe Prelude.Text,+    -- | The name of the resource share.+    resourceShareName :: Prelude.Maybe Prelude.Text,+    -- | The ID of the Amazon Web Services account that sent the invitation.+    senderAccountId :: Prelude.Maybe Prelude.Text,+    -- | The current status of the invitation.+    status :: Prelude.Maybe ResourceShareInvitationStatus+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceShareInvitation' 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:+--+-- 'invitationTimestamp', 'resourceShareInvitation_invitationTimestamp' - The date and time when the invitation was sent.+--+-- 'receiverAccountId', 'resourceShareInvitation_receiverAccountId' - The ID of the Amazon Web Services account that received the invitation.+--+-- 'receiverArn', 'resourceShareInvitation_receiverArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the IAM user or role that received the invitation.+--+-- 'resourceShareArn', 'resourceShareInvitation_resourceShareArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share+--+-- 'resourceShareAssociations', 'resourceShareInvitation_resourceShareAssociations' - To view the resources associated with a pending resource share+-- invitation, use ListPendingInvitationResources.+--+-- 'resourceShareInvitationArn', 'resourceShareInvitation_resourceShareInvitationArn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the invitation.+--+-- 'resourceShareName', 'resourceShareInvitation_resourceShareName' - The name of the resource share.+--+-- 'senderAccountId', 'resourceShareInvitation_senderAccountId' - The ID of the Amazon Web Services account that sent the invitation.+--+-- 'status', 'resourceShareInvitation_status' - The current status of the invitation.+newResourceShareInvitation ::+  ResourceShareInvitation+newResourceShareInvitation =+  ResourceShareInvitation'+    { invitationTimestamp =+        Prelude.Nothing,+      receiverAccountId = Prelude.Nothing,+      receiverArn = Prelude.Nothing,+      resourceShareArn = Prelude.Nothing,+      resourceShareAssociations = Prelude.Nothing,+      resourceShareInvitationArn = Prelude.Nothing,+      resourceShareName = Prelude.Nothing,+      senderAccountId = Prelude.Nothing,+      status = Prelude.Nothing+    }++-- | The date and time when the invitation was sent.+resourceShareInvitation_invitationTimestamp :: Lens.Lens' ResourceShareInvitation (Prelude.Maybe Prelude.UTCTime)+resourceShareInvitation_invitationTimestamp = Lens.lens (\ResourceShareInvitation' {invitationTimestamp} -> invitationTimestamp) (\s@ResourceShareInvitation' {} a -> s {invitationTimestamp = a} :: ResourceShareInvitation) Prelude.. Lens.mapping Data._Time++-- | The ID of the Amazon Web Services account that received the invitation.+resourceShareInvitation_receiverAccountId :: Lens.Lens' ResourceShareInvitation (Prelude.Maybe Prelude.Text)+resourceShareInvitation_receiverAccountId = Lens.lens (\ResourceShareInvitation' {receiverAccountId} -> receiverAccountId) (\s@ResourceShareInvitation' {} a -> s {receiverAccountId = a} :: ResourceShareInvitation)++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the IAM user or role that received the invitation.+resourceShareInvitation_receiverArn :: Lens.Lens' ResourceShareInvitation (Prelude.Maybe Prelude.Text)+resourceShareInvitation_receiverArn = Lens.lens (\ResourceShareInvitation' {receiverArn} -> receiverArn) (\s@ResourceShareInvitation' {} a -> s {receiverArn = a} :: ResourceShareInvitation)++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share+resourceShareInvitation_resourceShareArn :: Lens.Lens' ResourceShareInvitation (Prelude.Maybe Prelude.Text)+resourceShareInvitation_resourceShareArn = Lens.lens (\ResourceShareInvitation' {resourceShareArn} -> resourceShareArn) (\s@ResourceShareInvitation' {} a -> s {resourceShareArn = a} :: ResourceShareInvitation)++-- | To view the resources associated with a pending resource share+-- invitation, use ListPendingInvitationResources.+resourceShareInvitation_resourceShareAssociations :: Lens.Lens' ResourceShareInvitation (Prelude.Maybe [ResourceShareAssociation])+resourceShareInvitation_resourceShareAssociations = Lens.lens (\ResourceShareInvitation' {resourceShareAssociations} -> resourceShareAssociations) (\s@ResourceShareInvitation' {} a -> s {resourceShareAssociations = a} :: ResourceShareInvitation) Prelude.. Lens.mapping Lens.coerced++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the invitation.+resourceShareInvitation_resourceShareInvitationArn :: Lens.Lens' ResourceShareInvitation (Prelude.Maybe Prelude.Text)+resourceShareInvitation_resourceShareInvitationArn = Lens.lens (\ResourceShareInvitation' {resourceShareInvitationArn} -> resourceShareInvitationArn) (\s@ResourceShareInvitation' {} a -> s {resourceShareInvitationArn = a} :: ResourceShareInvitation)++-- | The name of the resource share.+resourceShareInvitation_resourceShareName :: Lens.Lens' ResourceShareInvitation (Prelude.Maybe Prelude.Text)+resourceShareInvitation_resourceShareName = Lens.lens (\ResourceShareInvitation' {resourceShareName} -> resourceShareName) (\s@ResourceShareInvitation' {} a -> s {resourceShareName = a} :: ResourceShareInvitation)++-- | The ID of the Amazon Web Services account that sent the invitation.+resourceShareInvitation_senderAccountId :: Lens.Lens' ResourceShareInvitation (Prelude.Maybe Prelude.Text)+resourceShareInvitation_senderAccountId = Lens.lens (\ResourceShareInvitation' {senderAccountId} -> senderAccountId) (\s@ResourceShareInvitation' {} a -> s {senderAccountId = a} :: ResourceShareInvitation)++-- | The current status of the invitation.+resourceShareInvitation_status :: Lens.Lens' ResourceShareInvitation (Prelude.Maybe ResourceShareInvitationStatus)+resourceShareInvitation_status = Lens.lens (\ResourceShareInvitation' {status} -> status) (\s@ResourceShareInvitation' {} a -> s {status = a} :: ResourceShareInvitation)++instance Data.FromJSON ResourceShareInvitation where+  parseJSON =+    Data.withObject+      "ResourceShareInvitation"+      ( \x ->+          ResourceShareInvitation'+            Prelude.<$> (x Data..:? "invitationTimestamp")+            Prelude.<*> (x Data..:? "receiverAccountId")+            Prelude.<*> (x Data..:? "receiverArn")+            Prelude.<*> (x Data..:? "resourceShareArn")+            Prelude.<*> ( x+                            Data..:? "resourceShareAssociations"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "resourceShareInvitationArn")+            Prelude.<*> (x Data..:? "resourceShareName")+            Prelude.<*> (x Data..:? "senderAccountId")+            Prelude.<*> (x Data..:? "status")+      )++instance Prelude.Hashable ResourceShareInvitation where+  hashWithSalt _salt ResourceShareInvitation' {..} =+    _salt+      `Prelude.hashWithSalt` invitationTimestamp+      `Prelude.hashWithSalt` receiverAccountId+      `Prelude.hashWithSalt` receiverArn+      `Prelude.hashWithSalt` resourceShareArn+      `Prelude.hashWithSalt` resourceShareAssociations+      `Prelude.hashWithSalt` resourceShareInvitationArn+      `Prelude.hashWithSalt` resourceShareName+      `Prelude.hashWithSalt` senderAccountId+      `Prelude.hashWithSalt` status++instance Prelude.NFData ResourceShareInvitation where+  rnf ResourceShareInvitation' {..} =+    Prelude.rnf invitationTimestamp+      `Prelude.seq` Prelude.rnf receiverAccountId+      `Prelude.seq` Prelude.rnf receiverArn+      `Prelude.seq` Prelude.rnf resourceShareArn+      `Prelude.seq` Prelude.rnf resourceShareAssociations+      `Prelude.seq` Prelude.rnf resourceShareInvitationArn+      `Prelude.seq` Prelude.rnf resourceShareName+      `Prelude.seq` Prelude.rnf senderAccountId+      `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/RAM/Types/ResourceShareInvitationStatus.hs view
@@ -0,0 +1,81 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RAM.Types.ResourceShareInvitationStatus+-- 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.RAM.Types.ResourceShareInvitationStatus+  ( ResourceShareInvitationStatus+      ( ..,+        ResourceShareInvitationStatus_ACCEPTED,+        ResourceShareInvitationStatus_EXPIRED,+        ResourceShareInvitationStatus_PENDING,+        ResourceShareInvitationStatus_REJECTED+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceShareInvitationStatus = ResourceShareInvitationStatus'+  { fromResourceShareInvitationStatus ::+      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 ResourceShareInvitationStatus_ACCEPTED :: ResourceShareInvitationStatus+pattern ResourceShareInvitationStatus_ACCEPTED = ResourceShareInvitationStatus' "ACCEPTED"++pattern ResourceShareInvitationStatus_EXPIRED :: ResourceShareInvitationStatus+pattern ResourceShareInvitationStatus_EXPIRED = ResourceShareInvitationStatus' "EXPIRED"++pattern ResourceShareInvitationStatus_PENDING :: ResourceShareInvitationStatus+pattern ResourceShareInvitationStatus_PENDING = ResourceShareInvitationStatus' "PENDING"++pattern ResourceShareInvitationStatus_REJECTED :: ResourceShareInvitationStatus+pattern ResourceShareInvitationStatus_REJECTED = ResourceShareInvitationStatus' "REJECTED"++{-# COMPLETE+  ResourceShareInvitationStatus_ACCEPTED,+  ResourceShareInvitationStatus_EXPIRED,+  ResourceShareInvitationStatus_PENDING,+  ResourceShareInvitationStatus_REJECTED,+  ResourceShareInvitationStatus'+  #-}
+ gen/Amazonka/RAM/Types/ResourceSharePermissionDetail.hs view
@@ -0,0 +1,196 @@+{-# 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.RAM.Types.ResourceSharePermissionDetail+-- 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.RAM.Types.ResourceSharePermissionDetail 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 an RAM permission.+--+-- /See:/ 'newResourceSharePermissionDetail' smart constructor.+data ResourceSharePermissionDetail = ResourceSharePermissionDetail'+  { -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of this RAM permission.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The date and time when the permission was created.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | Specifies whether the version of the permission represented in this+    -- structure is the default version for this permission.+    defaultVersion :: Prelude.Maybe Prelude.Bool,+    -- | Specifies whether the version of the permission represented in this+    -- structure is the default version for all resources of this resource+    -- type.+    isResourceTypeDefault :: Prelude.Maybe Prelude.Bool,+    -- | The date and time when the permission was last updated.+    lastUpdatedTime :: Prelude.Maybe Data.POSIX,+    -- | The name of this permission.+    name :: Prelude.Maybe Prelude.Text,+    -- | The permission\'s effect and actions in JSON format. The @effect@+    -- indicates whether the specified actions are allowed or denied. The+    -- @actions@ list the operations to which the principal is granted or+    -- denied access.+    permission :: Prelude.Maybe Prelude.Text,+    -- | The resource type to which this permission applies.+    resourceType :: Prelude.Maybe Prelude.Text,+    -- | The version of the permission represented in this structure.+    version :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceSharePermissionDetail' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'resourceSharePermissionDetail_arn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of this RAM permission.+--+-- 'creationTime', 'resourceSharePermissionDetail_creationTime' - The date and time when the permission was created.+--+-- 'defaultVersion', 'resourceSharePermissionDetail_defaultVersion' - Specifies whether the version of the permission represented in this+-- structure is the default version for this permission.+--+-- 'isResourceTypeDefault', 'resourceSharePermissionDetail_isResourceTypeDefault' - Specifies whether the version of the permission represented in this+-- structure is the default version for all resources of this resource+-- type.+--+-- 'lastUpdatedTime', 'resourceSharePermissionDetail_lastUpdatedTime' - The date and time when the permission was last updated.+--+-- 'name', 'resourceSharePermissionDetail_name' - The name of this permission.+--+-- 'permission', 'resourceSharePermissionDetail_permission' - The permission\'s effect and actions in JSON format. The @effect@+-- indicates whether the specified actions are allowed or denied. The+-- @actions@ list the operations to which the principal is granted or+-- denied access.+--+-- 'resourceType', 'resourceSharePermissionDetail_resourceType' - The resource type to which this permission applies.+--+-- 'version', 'resourceSharePermissionDetail_version' - The version of the permission represented in this structure.+newResourceSharePermissionDetail ::+  ResourceSharePermissionDetail+newResourceSharePermissionDetail =+  ResourceSharePermissionDetail'+    { arn =+        Prelude.Nothing,+      creationTime = Prelude.Nothing,+      defaultVersion = Prelude.Nothing,+      isResourceTypeDefault = Prelude.Nothing,+      lastUpdatedTime = Prelude.Nothing,+      name = Prelude.Nothing,+      permission = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      version = Prelude.Nothing+    }++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of this RAM permission.+resourceSharePermissionDetail_arn :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Text)+resourceSharePermissionDetail_arn = Lens.lens (\ResourceSharePermissionDetail' {arn} -> arn) (\s@ResourceSharePermissionDetail' {} a -> s {arn = a} :: ResourceSharePermissionDetail)++-- | The date and time when the permission was created.+resourceSharePermissionDetail_creationTime :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.UTCTime)+resourceSharePermissionDetail_creationTime = Lens.lens (\ResourceSharePermissionDetail' {creationTime} -> creationTime) (\s@ResourceSharePermissionDetail' {} a -> s {creationTime = a} :: ResourceSharePermissionDetail) Prelude.. Lens.mapping Data._Time++-- | Specifies whether the version of the permission represented in this+-- structure is the default version for this permission.+resourceSharePermissionDetail_defaultVersion :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Bool)+resourceSharePermissionDetail_defaultVersion = Lens.lens (\ResourceSharePermissionDetail' {defaultVersion} -> defaultVersion) (\s@ResourceSharePermissionDetail' {} a -> s {defaultVersion = a} :: ResourceSharePermissionDetail)++-- | Specifies whether the version of the permission represented in this+-- structure is the default version for all resources of this resource+-- type.+resourceSharePermissionDetail_isResourceTypeDefault :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Bool)+resourceSharePermissionDetail_isResourceTypeDefault = Lens.lens (\ResourceSharePermissionDetail' {isResourceTypeDefault} -> isResourceTypeDefault) (\s@ResourceSharePermissionDetail' {} a -> s {isResourceTypeDefault = a} :: ResourceSharePermissionDetail)++-- | The date and time when the permission was last updated.+resourceSharePermissionDetail_lastUpdatedTime :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.UTCTime)+resourceSharePermissionDetail_lastUpdatedTime = Lens.lens (\ResourceSharePermissionDetail' {lastUpdatedTime} -> lastUpdatedTime) (\s@ResourceSharePermissionDetail' {} a -> s {lastUpdatedTime = a} :: ResourceSharePermissionDetail) Prelude.. Lens.mapping Data._Time++-- | The name of this permission.+resourceSharePermissionDetail_name :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Text)+resourceSharePermissionDetail_name = Lens.lens (\ResourceSharePermissionDetail' {name} -> name) (\s@ResourceSharePermissionDetail' {} a -> s {name = a} :: ResourceSharePermissionDetail)++-- | The permission\'s effect and actions in JSON format. The @effect@+-- indicates whether the specified actions are allowed or denied. The+-- @actions@ list the operations to which the principal is granted or+-- denied access.+resourceSharePermissionDetail_permission :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Text)+resourceSharePermissionDetail_permission = Lens.lens (\ResourceSharePermissionDetail' {permission} -> permission) (\s@ResourceSharePermissionDetail' {} a -> s {permission = a} :: ResourceSharePermissionDetail)++-- | The resource type to which this permission applies.+resourceSharePermissionDetail_resourceType :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Text)+resourceSharePermissionDetail_resourceType = Lens.lens (\ResourceSharePermissionDetail' {resourceType} -> resourceType) (\s@ResourceSharePermissionDetail' {} a -> s {resourceType = a} :: ResourceSharePermissionDetail)++-- | The version of the permission represented in this structure.+resourceSharePermissionDetail_version :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Text)+resourceSharePermissionDetail_version = Lens.lens (\ResourceSharePermissionDetail' {version} -> version) (\s@ResourceSharePermissionDetail' {} a -> s {version = a} :: ResourceSharePermissionDetail)++instance Data.FromJSON ResourceSharePermissionDetail where+  parseJSON =+    Data.withObject+      "ResourceSharePermissionDetail"+      ( \x ->+          ResourceSharePermissionDetail'+            Prelude.<$> (x Data..:? "arn")+            Prelude.<*> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "defaultVersion")+            Prelude.<*> (x Data..:? "isResourceTypeDefault")+            Prelude.<*> (x Data..:? "lastUpdatedTime")+            Prelude.<*> (x Data..:? "name")+            Prelude.<*> (x Data..:? "permission")+            Prelude.<*> (x Data..:? "resourceType")+            Prelude.<*> (x Data..:? "version")+      )++instance+  Prelude.Hashable+    ResourceSharePermissionDetail+  where+  hashWithSalt _salt ResourceSharePermissionDetail' {..} =+    _salt+      `Prelude.hashWithSalt` arn+      `Prelude.hashWithSalt` creationTime+      `Prelude.hashWithSalt` defaultVersion+      `Prelude.hashWithSalt` isResourceTypeDefault+      `Prelude.hashWithSalt` lastUpdatedTime+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` permission+      `Prelude.hashWithSalt` resourceType+      `Prelude.hashWithSalt` version++instance Prelude.NFData ResourceSharePermissionDetail where+  rnf ResourceSharePermissionDetail' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf defaultVersion+      `Prelude.seq` Prelude.rnf isResourceTypeDefault+      `Prelude.seq` Prelude.rnf lastUpdatedTime+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf permission+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf version
+ gen/Amazonka/RAM/Types/ResourceSharePermissionSummary.hs view
@@ -0,0 +1,193 @@+{-# 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.RAM.Types.ResourceSharePermissionSummary+-- 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.RAM.Types.ResourceSharePermissionSummary 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 an RAM permission that is associated with a resource+-- share and any of its resources of a specified type.+--+-- /See:/ 'newResourceSharePermissionSummary' smart constructor.+data ResourceSharePermissionSummary = ResourceSharePermissionSummary'+  { -- | The+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the permission you want information about.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The date and time when the permission was created.+    creationTime :: Prelude.Maybe Data.POSIX,+    -- | Specifies whether the version of the permission represented in this+    -- structure is the default version for this permission.+    defaultVersion :: Prelude.Maybe Prelude.Bool,+    -- | Specifies whether the version of the permission represented in this+    -- structure is the default version for all resources of this resource+    -- type.+    isResourceTypeDefault :: Prelude.Maybe Prelude.Bool,+    -- | The date and time when the permission was last updated.+    lastUpdatedTime :: Prelude.Maybe Data.POSIX,+    -- | The name of this permission.+    name :: Prelude.Maybe Prelude.Text,+    -- | The type of resource to which this permission applies.+    resourceType :: Prelude.Maybe Prelude.Text,+    -- | The current status of the permission.+    status :: Prelude.Maybe Prelude.Text,+    -- | The version of the permission represented in this structure.+    version :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceSharePermissionSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'resourceSharePermissionSummary_arn' - The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the permission you want information about.+--+-- 'creationTime', 'resourceSharePermissionSummary_creationTime' - The date and time when the permission was created.+--+-- 'defaultVersion', 'resourceSharePermissionSummary_defaultVersion' - Specifies whether the version of the permission represented in this+-- structure is the default version for this permission.+--+-- 'isResourceTypeDefault', 'resourceSharePermissionSummary_isResourceTypeDefault' - Specifies whether the version of the permission represented in this+-- structure is the default version for all resources of this resource+-- type.+--+-- 'lastUpdatedTime', 'resourceSharePermissionSummary_lastUpdatedTime' - The date and time when the permission was last updated.+--+-- 'name', 'resourceSharePermissionSummary_name' - The name of this permission.+--+-- 'resourceType', 'resourceSharePermissionSummary_resourceType' - The type of resource to which this permission applies.+--+-- 'status', 'resourceSharePermissionSummary_status' - The current status of the permission.+--+-- 'version', 'resourceSharePermissionSummary_version' - The version of the permission represented in this structure.+newResourceSharePermissionSummary ::+  ResourceSharePermissionSummary+newResourceSharePermissionSummary =+  ResourceSharePermissionSummary'+    { arn =+        Prelude.Nothing,+      creationTime = Prelude.Nothing,+      defaultVersion = Prelude.Nothing,+      isResourceTypeDefault = Prelude.Nothing,+      lastUpdatedTime = Prelude.Nothing,+      name = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      status = Prelude.Nothing,+      version = Prelude.Nothing+    }++-- | The+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the permission you want information about.+resourceSharePermissionSummary_arn :: Lens.Lens' ResourceSharePermissionSummary (Prelude.Maybe Prelude.Text)+resourceSharePermissionSummary_arn = Lens.lens (\ResourceSharePermissionSummary' {arn} -> arn) (\s@ResourceSharePermissionSummary' {} a -> s {arn = a} :: ResourceSharePermissionSummary)++-- | The date and time when the permission was created.+resourceSharePermissionSummary_creationTime :: Lens.Lens' ResourceSharePermissionSummary (Prelude.Maybe Prelude.UTCTime)+resourceSharePermissionSummary_creationTime = Lens.lens (\ResourceSharePermissionSummary' {creationTime} -> creationTime) (\s@ResourceSharePermissionSummary' {} a -> s {creationTime = a} :: ResourceSharePermissionSummary) Prelude.. Lens.mapping Data._Time++-- | Specifies whether the version of the permission represented in this+-- structure is the default version for this permission.+resourceSharePermissionSummary_defaultVersion :: Lens.Lens' ResourceSharePermissionSummary (Prelude.Maybe Prelude.Bool)+resourceSharePermissionSummary_defaultVersion = Lens.lens (\ResourceSharePermissionSummary' {defaultVersion} -> defaultVersion) (\s@ResourceSharePermissionSummary' {} a -> s {defaultVersion = a} :: ResourceSharePermissionSummary)++-- | Specifies whether the version of the permission represented in this+-- structure is the default version for all resources of this resource+-- type.+resourceSharePermissionSummary_isResourceTypeDefault :: Lens.Lens' ResourceSharePermissionSummary (Prelude.Maybe Prelude.Bool)+resourceSharePermissionSummary_isResourceTypeDefault = Lens.lens (\ResourceSharePermissionSummary' {isResourceTypeDefault} -> isResourceTypeDefault) (\s@ResourceSharePermissionSummary' {} a -> s {isResourceTypeDefault = a} :: ResourceSharePermissionSummary)++-- | The date and time when the permission was last updated.+resourceSharePermissionSummary_lastUpdatedTime :: Lens.Lens' ResourceSharePermissionSummary (Prelude.Maybe Prelude.UTCTime)+resourceSharePermissionSummary_lastUpdatedTime = Lens.lens (\ResourceSharePermissionSummary' {lastUpdatedTime} -> lastUpdatedTime) (\s@ResourceSharePermissionSummary' {} a -> s {lastUpdatedTime = a} :: ResourceSharePermissionSummary) Prelude.. Lens.mapping Data._Time++-- | The name of this permission.+resourceSharePermissionSummary_name :: Lens.Lens' ResourceSharePermissionSummary (Prelude.Maybe Prelude.Text)+resourceSharePermissionSummary_name = Lens.lens (\ResourceSharePermissionSummary' {name} -> name) (\s@ResourceSharePermissionSummary' {} a -> s {name = a} :: ResourceSharePermissionSummary)++-- | The type of resource to which this permission applies.+resourceSharePermissionSummary_resourceType :: Lens.Lens' ResourceSharePermissionSummary (Prelude.Maybe Prelude.Text)+resourceSharePermissionSummary_resourceType = Lens.lens (\ResourceSharePermissionSummary' {resourceType} -> resourceType) (\s@ResourceSharePermissionSummary' {} a -> s {resourceType = a} :: ResourceSharePermissionSummary)++-- | The current status of the permission.+resourceSharePermissionSummary_status :: Lens.Lens' ResourceSharePermissionSummary (Prelude.Maybe Prelude.Text)+resourceSharePermissionSummary_status = Lens.lens (\ResourceSharePermissionSummary' {status} -> status) (\s@ResourceSharePermissionSummary' {} a -> s {status = a} :: ResourceSharePermissionSummary)++-- | The version of the permission represented in this structure.+resourceSharePermissionSummary_version :: Lens.Lens' ResourceSharePermissionSummary (Prelude.Maybe Prelude.Text)+resourceSharePermissionSummary_version = Lens.lens (\ResourceSharePermissionSummary' {version} -> version) (\s@ResourceSharePermissionSummary' {} a -> s {version = a} :: ResourceSharePermissionSummary)++instance Data.FromJSON ResourceSharePermissionSummary where+  parseJSON =+    Data.withObject+      "ResourceSharePermissionSummary"+      ( \x ->+          ResourceSharePermissionSummary'+            Prelude.<$> (x Data..:? "arn")+            Prelude.<*> (x Data..:? "creationTime")+            Prelude.<*> (x Data..:? "defaultVersion")+            Prelude.<*> (x Data..:? "isResourceTypeDefault")+            Prelude.<*> (x Data..:? "lastUpdatedTime")+            Prelude.<*> (x Data..:? "name")+            Prelude.<*> (x Data..:? "resourceType")+            Prelude.<*> (x Data..:? "status")+            Prelude.<*> (x Data..:? "version")+      )++instance+  Prelude.Hashable+    ResourceSharePermissionSummary+  where+  hashWithSalt+    _salt+    ResourceSharePermissionSummary' {..} =+      _salt+        `Prelude.hashWithSalt` arn+        `Prelude.hashWithSalt` creationTime+        `Prelude.hashWithSalt` defaultVersion+        `Prelude.hashWithSalt` isResourceTypeDefault+        `Prelude.hashWithSalt` lastUpdatedTime+        `Prelude.hashWithSalt` name+        `Prelude.hashWithSalt` resourceType+        `Prelude.hashWithSalt` status+        `Prelude.hashWithSalt` version++instance+  Prelude.NFData+    ResourceSharePermissionSummary+  where+  rnf ResourceSharePermissionSummary' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf creationTime+      `Prelude.seq` Prelude.rnf defaultVersion+      `Prelude.seq` Prelude.rnf isResourceTypeDefault+      `Prelude.seq` Prelude.rnf lastUpdatedTime+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf version
+ gen/Amazonka/RAM/Types/ResourceShareStatus.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RAM.Types.ResourceShareStatus+-- 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.RAM.Types.ResourceShareStatus+  ( ResourceShareStatus+      ( ..,+        ResourceShareStatus_ACTIVE,+        ResourceShareStatus_DELETED,+        ResourceShareStatus_DELETING,+        ResourceShareStatus_FAILED,+        ResourceShareStatus_PENDING+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceShareStatus = ResourceShareStatus'+  { fromResourceShareStatus ::+      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 ResourceShareStatus_ACTIVE :: ResourceShareStatus+pattern ResourceShareStatus_ACTIVE = ResourceShareStatus' "ACTIVE"++pattern ResourceShareStatus_DELETED :: ResourceShareStatus+pattern ResourceShareStatus_DELETED = ResourceShareStatus' "DELETED"++pattern ResourceShareStatus_DELETING :: ResourceShareStatus+pattern ResourceShareStatus_DELETING = ResourceShareStatus' "DELETING"++pattern ResourceShareStatus_FAILED :: ResourceShareStatus+pattern ResourceShareStatus_FAILED = ResourceShareStatus' "FAILED"++pattern ResourceShareStatus_PENDING :: ResourceShareStatus+pattern ResourceShareStatus_PENDING = ResourceShareStatus' "PENDING"++{-# COMPLETE+  ResourceShareStatus_ACTIVE,+  ResourceShareStatus_DELETED,+  ResourceShareStatus_DELETING,+  ResourceShareStatus_FAILED,+  ResourceShareStatus_PENDING,+  ResourceShareStatus'+  #-}
+ gen/Amazonka/RAM/Types/ResourceStatus.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.RAM.Types.ResourceStatus+-- 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.RAM.Types.ResourceStatus+  ( ResourceStatus+      ( ..,+        ResourceStatus_AVAILABLE,+        ResourceStatus_LIMIT_EXCEEDED,+        ResourceStatus_PENDING,+        ResourceStatus_UNAVAILABLE,+        ResourceStatus_ZONAL_RESOURCE_INACCESSIBLE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceStatus = ResourceStatus'+  { fromResourceStatus ::+      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 ResourceStatus_AVAILABLE :: ResourceStatus+pattern ResourceStatus_AVAILABLE = ResourceStatus' "AVAILABLE"++pattern ResourceStatus_LIMIT_EXCEEDED :: ResourceStatus+pattern ResourceStatus_LIMIT_EXCEEDED = ResourceStatus' "LIMIT_EXCEEDED"++pattern ResourceStatus_PENDING :: ResourceStatus+pattern ResourceStatus_PENDING = ResourceStatus' "PENDING"++pattern ResourceStatus_UNAVAILABLE :: ResourceStatus+pattern ResourceStatus_UNAVAILABLE = ResourceStatus' "UNAVAILABLE"++pattern ResourceStatus_ZONAL_RESOURCE_INACCESSIBLE :: ResourceStatus+pattern ResourceStatus_ZONAL_RESOURCE_INACCESSIBLE = ResourceStatus' "ZONAL_RESOURCE_INACCESSIBLE"++{-# COMPLETE+  ResourceStatus_AVAILABLE,+  ResourceStatus_LIMIT_EXCEEDED,+  ResourceStatus_PENDING,+  ResourceStatus_UNAVAILABLE,+  ResourceStatus_ZONAL_RESOURCE_INACCESSIBLE,+  ResourceStatus'+  #-}
+ gen/Amazonka/RAM/Types/ServiceNameAndResourceType.hs view
@@ -0,0 +1,123 @@+{-# 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.RAM.Types.ServiceNameAndResourceType+-- 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.RAM.Types.ServiceNameAndResourceType 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.RAM.Types.ResourceRegionScope++-- | Information about a shareable resource type and the Amazon Web Services+-- service to which resources of that type belong.+--+-- /See:/ 'newServiceNameAndResourceType' smart constructor.+data ServiceNameAndResourceType = ServiceNameAndResourceType'+  { -- | Specifies the scope of visibility of resources of this type:+    --+    -- -   __REGIONAL__ – The resource can be accessed only by using requests+    --     that target the Amazon Web Services Region in which the resource+    --     exists.+    --+    -- -   __GLOBAL__ – The resource can be accessed from any Amazon Web+    --     Services Region.+    resourceRegionScope :: Prelude.Maybe ResourceRegionScope,+    -- | The type of the resource.+    resourceType :: Prelude.Maybe Prelude.Text,+    -- | The name of the Amazon Web Services service to which resources of this+    -- type belong.+    serviceName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ServiceNameAndResourceType' 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:+--+-- 'resourceRegionScope', 'serviceNameAndResourceType_resourceRegionScope' - Specifies the scope of visibility of resources of this type:+--+-- -   __REGIONAL__ – The resource can be accessed only by using requests+--     that target the Amazon Web Services Region in which the resource+--     exists.+--+-- -   __GLOBAL__ – The resource can be accessed from any Amazon Web+--     Services Region.+--+-- 'resourceType', 'serviceNameAndResourceType_resourceType' - The type of the resource.+--+-- 'serviceName', 'serviceNameAndResourceType_serviceName' - The name of the Amazon Web Services service to which resources of this+-- type belong.+newServiceNameAndResourceType ::+  ServiceNameAndResourceType+newServiceNameAndResourceType =+  ServiceNameAndResourceType'+    { resourceRegionScope =+        Prelude.Nothing,+      resourceType = Prelude.Nothing,+      serviceName = Prelude.Nothing+    }++-- | Specifies the scope of visibility of resources of this type:+--+-- -   __REGIONAL__ – The resource can be accessed only by using requests+--     that target the Amazon Web Services Region in which the resource+--     exists.+--+-- -   __GLOBAL__ – The resource can be accessed from any Amazon Web+--     Services Region.+serviceNameAndResourceType_resourceRegionScope :: Lens.Lens' ServiceNameAndResourceType (Prelude.Maybe ResourceRegionScope)+serviceNameAndResourceType_resourceRegionScope = Lens.lens (\ServiceNameAndResourceType' {resourceRegionScope} -> resourceRegionScope) (\s@ServiceNameAndResourceType' {} a -> s {resourceRegionScope = a} :: ServiceNameAndResourceType)++-- | The type of the resource.+serviceNameAndResourceType_resourceType :: Lens.Lens' ServiceNameAndResourceType (Prelude.Maybe Prelude.Text)+serviceNameAndResourceType_resourceType = Lens.lens (\ServiceNameAndResourceType' {resourceType} -> resourceType) (\s@ServiceNameAndResourceType' {} a -> s {resourceType = a} :: ServiceNameAndResourceType)++-- | The name of the Amazon Web Services service to which resources of this+-- type belong.+serviceNameAndResourceType_serviceName :: Lens.Lens' ServiceNameAndResourceType (Prelude.Maybe Prelude.Text)+serviceNameAndResourceType_serviceName = Lens.lens (\ServiceNameAndResourceType' {serviceName} -> serviceName) (\s@ServiceNameAndResourceType' {} a -> s {serviceName = a} :: ServiceNameAndResourceType)++instance Data.FromJSON ServiceNameAndResourceType where+  parseJSON =+    Data.withObject+      "ServiceNameAndResourceType"+      ( \x ->+          ServiceNameAndResourceType'+            Prelude.<$> (x Data..:? "resourceRegionScope")+            Prelude.<*> (x Data..:? "resourceType")+            Prelude.<*> (x Data..:? "serviceName")+      )++instance Prelude.Hashable ServiceNameAndResourceType where+  hashWithSalt _salt ServiceNameAndResourceType' {..} =+    _salt+      `Prelude.hashWithSalt` resourceRegionScope+      `Prelude.hashWithSalt` resourceType+      `Prelude.hashWithSalt` serviceName++instance Prelude.NFData ServiceNameAndResourceType where+  rnf ServiceNameAndResourceType' {..} =+    Prelude.rnf resourceRegionScope+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf serviceName
+ gen/Amazonka/RAM/Types/Tag.hs view
@@ -0,0 +1,105 @@+{-# 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.RAM.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.RAM.Types.Tag where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure containing a tag. A tag is metadata that you can attach to+-- your resources to help organize and categorize them. You can also use+-- them to help you secure your resources. For more information, see+-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html Controlling access to Amazon Web Services resources using tags>.+--+-- For more information about tags, see+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>+-- in the /Amazon Web Services General Reference Guide/.+--+-- /See:/ 'newTag' smart constructor.+data Tag = Tag'+  { -- | The key, or name, attached to the tag. Every tag must have a key. Key+    -- names are case sensitive.+    key :: Prelude.Maybe Prelude.Text,+    -- | The string value attached to the tag. The value can be an empty string.+    -- Key values are case sensitive.+    value :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Tag' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'key', 'tag_key' - The key, or name, attached to the tag. Every tag must have a key. Key+-- names are case sensitive.+--+-- 'value', 'tag_value' - The string value attached to the tag. The value can be an empty string.+-- Key values are case sensitive.+newTag ::+  Tag+newTag =+  Tag'+    { key = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The key, or name, attached to the tag. Every tag must have a key. Key+-- names are case sensitive.+tag_key :: Lens.Lens' Tag (Prelude.Maybe Prelude.Text)+tag_key = Lens.lens (\Tag' {key} -> key) (\s@Tag' {} a -> s {key = a} :: Tag)++-- | The string value attached to the tag. The value can be an empty string.+-- Key values are case sensitive.+tag_value :: Lens.Lens' Tag (Prelude.Maybe 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+          [ ("key" Data..=) Prelude.<$> key,+            ("value" Data..=) Prelude.<$> value+          ]+      )
+ gen/Amazonka/RAM/Types/TagFilter.hs view
@@ -0,0 +1,87 @@+{-# 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.RAM.Types.TagFilter+-- 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.RAM.Types.TagFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A tag key and optional list of possible values that you can use to+-- filter results for tagged resources.+--+-- /See:/ 'newTagFilter' smart constructor.+data TagFilter = TagFilter'+  { -- | The tag key. This must have a valid string value and can\'t be empty.+    tagKey :: Prelude.Maybe Prelude.Text,+    -- | A list of zero or more tag values. If no values are provided, then the+    -- filter matches any tag with the specified key, regardless of its value.+    tagValues :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagFilter' 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:+--+-- 'tagKey', 'tagFilter_tagKey' - The tag key. This must have a valid string value and can\'t be empty.+--+-- 'tagValues', 'tagFilter_tagValues' - A list of zero or more tag values. If no values are provided, then the+-- filter matches any tag with the specified key, regardless of its value.+newTagFilter ::+  TagFilter+newTagFilter =+  TagFilter'+    { tagKey = Prelude.Nothing,+      tagValues = Prelude.Nothing+    }++-- | The tag key. This must have a valid string value and can\'t be empty.+tagFilter_tagKey :: Lens.Lens' TagFilter (Prelude.Maybe Prelude.Text)+tagFilter_tagKey = Lens.lens (\TagFilter' {tagKey} -> tagKey) (\s@TagFilter' {} a -> s {tagKey = a} :: TagFilter)++-- | A list of zero or more tag values. If no values are provided, then the+-- filter matches any tag with the specified key, regardless of its value.+tagFilter_tagValues :: Lens.Lens' TagFilter (Prelude.Maybe [Prelude.Text])+tagFilter_tagValues = Lens.lens (\TagFilter' {tagValues} -> tagValues) (\s@TagFilter' {} a -> s {tagValues = a} :: TagFilter) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable TagFilter where+  hashWithSalt _salt TagFilter' {..} =+    _salt+      `Prelude.hashWithSalt` tagKey+      `Prelude.hashWithSalt` tagValues++instance Prelude.NFData TagFilter where+  rnf TagFilter' {..} =+    Prelude.rnf tagKey+      `Prelude.seq` Prelude.rnf tagValues++instance Data.ToJSON TagFilter where+  toJSON TagFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("tagKey" Data..=) Prelude.<$> tagKey,+            ("tagValues" Data..=) Prelude.<$> tagValues+          ]+      )
+ gen/Amazonka/RAM/UntagResource.hs view
@@ -0,0 +1,182 @@+{-# 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.RAM.UntagResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes the specified tag key and value pairs from the specified+-- resource share.+module Amazonka.RAM.UntagResource+  ( -- * Creating a Request+    UntagResource (..),+    newUntagResource,++    -- * Request Lenses+    untagResource_resourceShareArn,+    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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+  { -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share that you want to remove tags from. The tags are+    -- removed from the resource share, not the resources in the resource+    -- share.+    resourceShareArn :: Prelude.Text,+    -- | Specifies a list of one or more tag keys that you want to remove.+    tagKeys :: [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceShareArn', 'untagResource_resourceShareArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to remove tags from. The tags are+-- removed from the resource share, not the resources in the resource+-- share.+--+-- 'tagKeys', 'untagResource_tagKeys' - Specifies a list of one or more tag keys that you want to remove.+newUntagResource ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  UntagResource+newUntagResource pResourceShareArn_ =+  UntagResource'+    { resourceShareArn =+        pResourceShareArn_,+      tagKeys = Prelude.mempty+    }++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to remove tags from. The tags are+-- removed from the resource share, not the resources in the resource+-- share.+untagResource_resourceShareArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceShareArn = Lens.lens (\UntagResource' {resourceShareArn} -> resourceShareArn) (\s@UntagResource' {} a -> s {resourceShareArn = a} :: UntagResource)++-- | Specifies a list of one or more tag keys that you want to remove.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+  type+    AWSResponse UntagResource =+      UntagResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          UntagResourceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UntagResource where+  hashWithSalt _salt UntagResource' {..} =+    _salt+      `Prelude.hashWithSalt` resourceShareArn+      `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+  rnf UntagResource' {..} =+    Prelude.rnf resourceShareArn+      `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.ToJSON UntagResource where+  toJSON UntagResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("resourceShareArn" Data..= resourceShareArn),+            Prelude.Just ("tagKeys" Data..= tagKeys)+          ]+      )++instance Data.ToPath UntagResource where+  toPath = Prelude.const "/untagresource"++instance Data.ToQuery UntagResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+  UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+  rnf UntagResourceResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/RAM/UpdateResourceShare.hs view
@@ -0,0 +1,274 @@+{-# 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.RAM.UpdateResourceShare+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Modifies some of the properties of the specified resource share.+module Amazonka.RAM.UpdateResourceShare+  ( -- * Creating a Request+    UpdateResourceShare (..),+    newUpdateResourceShare,++    -- * Request Lenses+    updateResourceShare_allowExternalPrincipals,+    updateResourceShare_clientToken,+    updateResourceShare_name,+    updateResourceShare_resourceShareArn,++    -- * Destructuring the Response+    UpdateResourceShareResponse (..),+    newUpdateResourceShareResponse,++    -- * Response Lenses+    updateResourceShareResponse_clientToken,+    updateResourceShareResponse_resourceShare,+    updateResourceShareResponse_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.RAM.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateResourceShare' smart constructor.+data UpdateResourceShare = UpdateResourceShare'+  { -- | Specifies whether principals outside your organization in Organizations+    -- can be associated with a resource share.+    allowExternalPrincipals :: Prelude.Maybe Prelude.Bool,+    -- | Specifies a unique, case-sensitive identifier that you provide to ensure+    -- the idempotency of the request. This lets you safely retry the request+    -- without accidentally performing the same operation a second time.+    -- Passing the same value to a later call to an operation requires that you+    -- also pass the same value for all other parameters. We recommend that you+    -- use a+    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+    --+    -- If you don\'t provide this value, then Amazon Web Services generates a+    -- random one for you.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | If specified, the new name that you want to attach to the resource+    -- share.+    name :: Prelude.Maybe Prelude.Text,+    -- | Specifies the+    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+    -- of the resource share that you want to modify.+    resourceShareArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateResourceShare' 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:+--+-- 'allowExternalPrincipals', 'updateResourceShare_allowExternalPrincipals' - Specifies whether principals outside your organization in Organizations+-- can be associated with a resource share.+--+-- 'clientToken', 'updateResourceShare_clientToken' - Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+--+-- 'name', 'updateResourceShare_name' - If specified, the new name that you want to attach to the resource+-- share.+--+-- 'resourceShareArn', 'updateResourceShare_resourceShareArn' - Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to modify.+newUpdateResourceShare ::+  -- | 'resourceShareArn'+  Prelude.Text ->+  UpdateResourceShare+newUpdateResourceShare pResourceShareArn_ =+  UpdateResourceShare'+    { allowExternalPrincipals =+        Prelude.Nothing,+      clientToken = Prelude.Nothing,+      name = Prelude.Nothing,+      resourceShareArn = pResourceShareArn_+    }++-- | Specifies whether principals outside your organization in Organizations+-- can be associated with a resource share.+updateResourceShare_allowExternalPrincipals :: Lens.Lens' UpdateResourceShare (Prelude.Maybe Prelude.Bool)+updateResourceShare_allowExternalPrincipals = Lens.lens (\UpdateResourceShare' {allowExternalPrincipals} -> allowExternalPrincipals) (\s@UpdateResourceShare' {} a -> s {allowExternalPrincipals = a} :: UpdateResourceShare)++-- | Specifies a unique, case-sensitive identifier that you provide to ensure+-- the idempotency of the request. This lets you safely retry the request+-- without accidentally performing the same operation a second time.+-- Passing the same value to a later call to an operation requires that you+-- also pass the same value for all other parameters. We recommend that you+-- use a+-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID type of value.>.+--+-- If you don\'t provide this value, then Amazon Web Services generates a+-- random one for you.+updateResourceShare_clientToken :: Lens.Lens' UpdateResourceShare (Prelude.Maybe Prelude.Text)+updateResourceShare_clientToken = Lens.lens (\UpdateResourceShare' {clientToken} -> clientToken) (\s@UpdateResourceShare' {} a -> s {clientToken = a} :: UpdateResourceShare)++-- | If specified, the new name that you want to attach to the resource+-- share.+updateResourceShare_name :: Lens.Lens' UpdateResourceShare (Prelude.Maybe Prelude.Text)+updateResourceShare_name = Lens.lens (\UpdateResourceShare' {name} -> name) (\s@UpdateResourceShare' {} a -> s {name = a} :: UpdateResourceShare)++-- | Specifies the+-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resoure Name (ARN)>+-- of the resource share that you want to modify.+updateResourceShare_resourceShareArn :: Lens.Lens' UpdateResourceShare Prelude.Text+updateResourceShare_resourceShareArn = Lens.lens (\UpdateResourceShare' {resourceShareArn} -> resourceShareArn) (\s@UpdateResourceShare' {} a -> s {resourceShareArn = a} :: UpdateResourceShare)++instance Core.AWSRequest UpdateResourceShare where+  type+    AWSResponse UpdateResourceShare =+      UpdateResourceShareResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateResourceShareResponse'+            Prelude.<$> (x Data..?> "clientToken")+            Prelude.<*> (x Data..?> "resourceShare")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UpdateResourceShare where+  hashWithSalt _salt UpdateResourceShare' {..} =+    _salt+      `Prelude.hashWithSalt` allowExternalPrincipals+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` resourceShareArn++instance Prelude.NFData UpdateResourceShare where+  rnf UpdateResourceShare' {..} =+    Prelude.rnf allowExternalPrincipals+      `Prelude.seq` Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf resourceShareArn++instance Data.ToHeaders UpdateResourceShare where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateResourceShare where+  toJSON UpdateResourceShare' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("allowExternalPrincipals" Data..=)+              Prelude.<$> allowExternalPrincipals,+            ("clientToken" Data..=) Prelude.<$> clientToken,+            ("name" Data..=) Prelude.<$> name,+            Prelude.Just+              ("resourceShareArn" Data..= resourceShareArn)+          ]+      )++instance Data.ToPath UpdateResourceShare where+  toPath = Prelude.const "/updateresourceshare"++instance Data.ToQuery UpdateResourceShare where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateResourceShareResponse' smart constructor.+data UpdateResourceShareResponse = UpdateResourceShareResponse'+  { -- | The idempotency identifier associated with this request. If you want to+    -- repeat the same operation in an idempotent manner then you must include+    -- this value in the @clientToken@ request parameter of that later call.+    -- All other parameters must also have the same values that you used in the+    -- first call.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | Information about the resource share.+    resourceShare :: Prelude.Maybe ResourceShare,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateResourceShareResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'updateResourceShareResponse_clientToken' - The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+--+-- 'resourceShare', 'updateResourceShareResponse_resourceShare' - Information about the resource share.+--+-- 'httpStatus', 'updateResourceShareResponse_httpStatus' - The response's http status code.+newUpdateResourceShareResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UpdateResourceShareResponse+newUpdateResourceShareResponse pHttpStatus_ =+  UpdateResourceShareResponse'+    { clientToken =+        Prelude.Nothing,+      resourceShare = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The idempotency identifier associated with this request. If you want to+-- repeat the same operation in an idempotent manner then you must include+-- this value in the @clientToken@ request parameter of that later call.+-- All other parameters must also have the same values that you used in the+-- first call.+updateResourceShareResponse_clientToken :: Lens.Lens' UpdateResourceShareResponse (Prelude.Maybe Prelude.Text)+updateResourceShareResponse_clientToken = Lens.lens (\UpdateResourceShareResponse' {clientToken} -> clientToken) (\s@UpdateResourceShareResponse' {} a -> s {clientToken = a} :: UpdateResourceShareResponse)++-- | Information about the resource share.+updateResourceShareResponse_resourceShare :: Lens.Lens' UpdateResourceShareResponse (Prelude.Maybe ResourceShare)+updateResourceShareResponse_resourceShare = Lens.lens (\UpdateResourceShareResponse' {resourceShare} -> resourceShare) (\s@UpdateResourceShareResponse' {} a -> s {resourceShare = a} :: UpdateResourceShareResponse)++-- | The response's http status code.+updateResourceShareResponse_httpStatus :: Lens.Lens' UpdateResourceShareResponse Prelude.Int+updateResourceShareResponse_httpStatus = Lens.lens (\UpdateResourceShareResponse' {httpStatus} -> httpStatus) (\s@UpdateResourceShareResponse' {} a -> s {httpStatus = a} :: UpdateResourceShareResponse)++instance Prelude.NFData UpdateResourceShareResponse where+  rnf UpdateResourceShareResponse' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf resourceShare+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RAM/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.RAM.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.RAM.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.RAM.Lens+import Amazonka.RAM.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.RAM+import Test.Amazonka.RAM.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "RAM"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/Gen/RAM.hs view
@@ -0,0 +1,538 @@+{-# 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.RAM+-- 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.RAM where++import Amazonka.RAM+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.RAM.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"+--         [ requestAcceptResourceShareInvitation $+--             newAcceptResourceShareInvitation+--+--         , requestAssociateResourceShare $+--             newAssociateResourceShare+--+--         , requestAssociateResourceSharePermission $+--             newAssociateResourceSharePermission+--+--         , requestCreateResourceShare $+--             newCreateResourceShare+--+--         , requestDeleteResourceShare $+--             newDeleteResourceShare+--+--         , requestDisassociateResourceShare $+--             newDisassociateResourceShare+--+--         , requestDisassociateResourceSharePermission $+--             newDisassociateResourceSharePermission+--+--         , requestEnableSharingWithAwsOrganization $+--             newEnableSharingWithAwsOrganization+--+--         , requestGetPermission $+--             newGetPermission+--+--         , requestGetResourcePolicies $+--             newGetResourcePolicies+--+--         , requestGetResourceShareAssociations $+--             newGetResourceShareAssociations+--+--         , requestGetResourceShareInvitations $+--             newGetResourceShareInvitations+--+--         , requestGetResourceShares $+--             newGetResourceShares+--+--         , requestListPendingInvitationResources $+--             newListPendingInvitationResources+--+--         , requestListPermissionVersions $+--             newListPermissionVersions+--+--         , requestListPermissions $+--             newListPermissions+--+--         , requestListPrincipals $+--             newListPrincipals+--+--         , requestListResourceSharePermissions $+--             newListResourceSharePermissions+--+--         , requestListResourceTypes $+--             newListResourceTypes+--+--         , requestListResources $+--             newListResources+--+--         , requestPromoteResourceShareCreatedFromPolicy $+--             newPromoteResourceShareCreatedFromPolicy+--+--         , requestRejectResourceShareInvitation $+--             newRejectResourceShareInvitation+--+--         , requestTagResource $+--             newTagResource+--+--         , requestUntagResource $+--             newUntagResource+--+--         , requestUpdateResourceShare $+--             newUpdateResourceShare+--+--           ]++--     , testGroup "response"+--         [ responseAcceptResourceShareInvitation $+--             newAcceptResourceShareInvitationResponse+--+--         , responseAssociateResourceShare $+--             newAssociateResourceShareResponse+--+--         , responseAssociateResourceSharePermission $+--             newAssociateResourceSharePermissionResponse+--+--         , responseCreateResourceShare $+--             newCreateResourceShareResponse+--+--         , responseDeleteResourceShare $+--             newDeleteResourceShareResponse+--+--         , responseDisassociateResourceShare $+--             newDisassociateResourceShareResponse+--+--         , responseDisassociateResourceSharePermission $+--             newDisassociateResourceSharePermissionResponse+--+--         , responseEnableSharingWithAwsOrganization $+--             newEnableSharingWithAwsOrganizationResponse+--+--         , responseGetPermission $+--             newGetPermissionResponse+--+--         , responseGetResourcePolicies $+--             newGetResourcePoliciesResponse+--+--         , responseGetResourceShareAssociations $+--             newGetResourceShareAssociationsResponse+--+--         , responseGetResourceShareInvitations $+--             newGetResourceShareInvitationsResponse+--+--         , responseGetResourceShares $+--             newGetResourceSharesResponse+--+--         , responseListPendingInvitationResources $+--             newListPendingInvitationResourcesResponse+--+--         , responseListPermissionVersions $+--             newListPermissionVersionsResponse+--+--         , responseListPermissions $+--             newListPermissionsResponse+--+--         , responseListPrincipals $+--             newListPrincipalsResponse+--+--         , responseListResourceSharePermissions $+--             newListResourceSharePermissionsResponse+--+--         , responseListResourceTypes $+--             newListResourceTypesResponse+--+--         , responseListResources $+--             newListResourcesResponse+--+--         , responsePromoteResourceShareCreatedFromPolicy $+--             newPromoteResourceShareCreatedFromPolicyResponse+--+--         , responseRejectResourceShareInvitation $+--             newRejectResourceShareInvitationResponse+--+--         , responseTagResource $+--             newTagResourceResponse+--+--         , responseUntagResource $+--             newUntagResourceResponse+--+--         , responseUpdateResourceShare $+--             newUpdateResourceShareResponse+--+--           ]+--     ]++-- Requests++requestAcceptResourceShareInvitation :: AcceptResourceShareInvitation -> TestTree+requestAcceptResourceShareInvitation =+  req+    "AcceptResourceShareInvitation"+    "fixture/AcceptResourceShareInvitation.yaml"++requestAssociateResourceShare :: AssociateResourceShare -> TestTree+requestAssociateResourceShare =+  req+    "AssociateResourceShare"+    "fixture/AssociateResourceShare.yaml"++requestAssociateResourceSharePermission :: AssociateResourceSharePermission -> TestTree+requestAssociateResourceSharePermission =+  req+    "AssociateResourceSharePermission"+    "fixture/AssociateResourceSharePermission.yaml"++requestCreateResourceShare :: CreateResourceShare -> TestTree+requestCreateResourceShare =+  req+    "CreateResourceShare"+    "fixture/CreateResourceShare.yaml"++requestDeleteResourceShare :: DeleteResourceShare -> TestTree+requestDeleteResourceShare =+  req+    "DeleteResourceShare"+    "fixture/DeleteResourceShare.yaml"++requestDisassociateResourceShare :: DisassociateResourceShare -> TestTree+requestDisassociateResourceShare =+  req+    "DisassociateResourceShare"+    "fixture/DisassociateResourceShare.yaml"++requestDisassociateResourceSharePermission :: DisassociateResourceSharePermission -> TestTree+requestDisassociateResourceSharePermission =+  req+    "DisassociateResourceSharePermission"+    "fixture/DisassociateResourceSharePermission.yaml"++requestEnableSharingWithAwsOrganization :: EnableSharingWithAwsOrganization -> TestTree+requestEnableSharingWithAwsOrganization =+  req+    "EnableSharingWithAwsOrganization"+    "fixture/EnableSharingWithAwsOrganization.yaml"++requestGetPermission :: GetPermission -> TestTree+requestGetPermission =+  req+    "GetPermission"+    "fixture/GetPermission.yaml"++requestGetResourcePolicies :: GetResourcePolicies -> TestTree+requestGetResourcePolicies =+  req+    "GetResourcePolicies"+    "fixture/GetResourcePolicies.yaml"++requestGetResourceShareAssociations :: GetResourceShareAssociations -> TestTree+requestGetResourceShareAssociations =+  req+    "GetResourceShareAssociations"+    "fixture/GetResourceShareAssociations.yaml"++requestGetResourceShareInvitations :: GetResourceShareInvitations -> TestTree+requestGetResourceShareInvitations =+  req+    "GetResourceShareInvitations"+    "fixture/GetResourceShareInvitations.yaml"++requestGetResourceShares :: GetResourceShares -> TestTree+requestGetResourceShares =+  req+    "GetResourceShares"+    "fixture/GetResourceShares.yaml"++requestListPendingInvitationResources :: ListPendingInvitationResources -> TestTree+requestListPendingInvitationResources =+  req+    "ListPendingInvitationResources"+    "fixture/ListPendingInvitationResources.yaml"++requestListPermissionVersions :: ListPermissionVersions -> TestTree+requestListPermissionVersions =+  req+    "ListPermissionVersions"+    "fixture/ListPermissionVersions.yaml"++requestListPermissions :: ListPermissions -> TestTree+requestListPermissions =+  req+    "ListPermissions"+    "fixture/ListPermissions.yaml"++requestListPrincipals :: ListPrincipals -> TestTree+requestListPrincipals =+  req+    "ListPrincipals"+    "fixture/ListPrincipals.yaml"++requestListResourceSharePermissions :: ListResourceSharePermissions -> TestTree+requestListResourceSharePermissions =+  req+    "ListResourceSharePermissions"+    "fixture/ListResourceSharePermissions.yaml"++requestListResourceTypes :: ListResourceTypes -> TestTree+requestListResourceTypes =+  req+    "ListResourceTypes"+    "fixture/ListResourceTypes.yaml"++requestListResources :: ListResources -> TestTree+requestListResources =+  req+    "ListResources"+    "fixture/ListResources.yaml"++requestPromoteResourceShareCreatedFromPolicy :: PromoteResourceShareCreatedFromPolicy -> TestTree+requestPromoteResourceShareCreatedFromPolicy =+  req+    "PromoteResourceShareCreatedFromPolicy"+    "fixture/PromoteResourceShareCreatedFromPolicy.yaml"++requestRejectResourceShareInvitation :: RejectResourceShareInvitation -> TestTree+requestRejectResourceShareInvitation =+  req+    "RejectResourceShareInvitation"+    "fixture/RejectResourceShareInvitation.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+  req+    "TagResource"+    "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+  req+    "UntagResource"+    "fixture/UntagResource.yaml"++requestUpdateResourceShare :: UpdateResourceShare -> TestTree+requestUpdateResourceShare =+  req+    "UpdateResourceShare"+    "fixture/UpdateResourceShare.yaml"++-- Responses++responseAcceptResourceShareInvitation :: AcceptResourceShareInvitationResponse -> TestTree+responseAcceptResourceShareInvitation =+  res+    "AcceptResourceShareInvitationResponse"+    "fixture/AcceptResourceShareInvitationResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy AcceptResourceShareInvitation)++responseAssociateResourceShare :: AssociateResourceShareResponse -> TestTree+responseAssociateResourceShare =+  res+    "AssociateResourceShareResponse"+    "fixture/AssociateResourceShareResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy AssociateResourceShare)++responseAssociateResourceSharePermission :: AssociateResourceSharePermissionResponse -> TestTree+responseAssociateResourceSharePermission =+  res+    "AssociateResourceSharePermissionResponse"+    "fixture/AssociateResourceSharePermissionResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy AssociateResourceSharePermission)++responseCreateResourceShare :: CreateResourceShareResponse -> TestTree+responseCreateResourceShare =+  res+    "CreateResourceShareResponse"+    "fixture/CreateResourceShareResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateResourceShare)++responseDeleteResourceShare :: DeleteResourceShareResponse -> TestTree+responseDeleteResourceShare =+  res+    "DeleteResourceShareResponse"+    "fixture/DeleteResourceShareResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteResourceShare)++responseDisassociateResourceShare :: DisassociateResourceShareResponse -> TestTree+responseDisassociateResourceShare =+  res+    "DisassociateResourceShareResponse"+    "fixture/DisassociateResourceShareResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DisassociateResourceShare)++responseDisassociateResourceSharePermission :: DisassociateResourceSharePermissionResponse -> TestTree+responseDisassociateResourceSharePermission =+  res+    "DisassociateResourceSharePermissionResponse"+    "fixture/DisassociateResourceSharePermissionResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DisassociateResourceSharePermission)++responseEnableSharingWithAwsOrganization :: EnableSharingWithAwsOrganizationResponse -> TestTree+responseEnableSharingWithAwsOrganization =+  res+    "EnableSharingWithAwsOrganizationResponse"+    "fixture/EnableSharingWithAwsOrganizationResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy EnableSharingWithAwsOrganization)++responseGetPermission :: GetPermissionResponse -> TestTree+responseGetPermission =+  res+    "GetPermissionResponse"+    "fixture/GetPermissionResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetPermission)++responseGetResourcePolicies :: GetResourcePoliciesResponse -> TestTree+responseGetResourcePolicies =+  res+    "GetResourcePoliciesResponse"+    "fixture/GetResourcePoliciesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetResourcePolicies)++responseGetResourceShareAssociations :: GetResourceShareAssociationsResponse -> TestTree+responseGetResourceShareAssociations =+  res+    "GetResourceShareAssociationsResponse"+    "fixture/GetResourceShareAssociationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetResourceShareAssociations)++responseGetResourceShareInvitations :: GetResourceShareInvitationsResponse -> TestTree+responseGetResourceShareInvitations =+  res+    "GetResourceShareInvitationsResponse"+    "fixture/GetResourceShareInvitationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetResourceShareInvitations)++responseGetResourceShares :: GetResourceSharesResponse -> TestTree+responseGetResourceShares =+  res+    "GetResourceSharesResponse"+    "fixture/GetResourceSharesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetResourceShares)++responseListPendingInvitationResources :: ListPendingInvitationResourcesResponse -> TestTree+responseListPendingInvitationResources =+  res+    "ListPendingInvitationResourcesResponse"+    "fixture/ListPendingInvitationResourcesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListPendingInvitationResources)++responseListPermissionVersions :: ListPermissionVersionsResponse -> TestTree+responseListPermissionVersions =+  res+    "ListPermissionVersionsResponse"+    "fixture/ListPermissionVersionsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListPermissionVersions)++responseListPermissions :: ListPermissionsResponse -> TestTree+responseListPermissions =+  res+    "ListPermissionsResponse"+    "fixture/ListPermissionsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListPermissions)++responseListPrincipals :: ListPrincipalsResponse -> TestTree+responseListPrincipals =+  res+    "ListPrincipalsResponse"+    "fixture/ListPrincipalsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListPrincipals)++responseListResourceSharePermissions :: ListResourceSharePermissionsResponse -> TestTree+responseListResourceSharePermissions =+  res+    "ListResourceSharePermissionsResponse"+    "fixture/ListResourceSharePermissionsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListResourceSharePermissions)++responseListResourceTypes :: ListResourceTypesResponse -> TestTree+responseListResourceTypes =+  res+    "ListResourceTypesResponse"+    "fixture/ListResourceTypesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListResourceTypes)++responseListResources :: ListResourcesResponse -> TestTree+responseListResources =+  res+    "ListResourcesResponse"+    "fixture/ListResourcesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListResources)++responsePromoteResourceShareCreatedFromPolicy :: PromoteResourceShareCreatedFromPolicyResponse -> TestTree+responsePromoteResourceShareCreatedFromPolicy =+  res+    "PromoteResourceShareCreatedFromPolicyResponse"+    "fixture/PromoteResourceShareCreatedFromPolicyResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy PromoteResourceShareCreatedFromPolicy)++responseRejectResourceShareInvitation :: RejectResourceShareInvitationResponse -> TestTree+responseRejectResourceShareInvitation =+  res+    "RejectResourceShareInvitationResponse"+    "fixture/RejectResourceShareInvitationResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy RejectResourceShareInvitation)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+  res+    "TagResourceResponse"+    "fixture/TagResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy TagResource)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+  res+    "UntagResourceResponse"+    "fixture/UntagResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdateResourceShare :: UpdateResourceShareResponse -> TestTree+responseUpdateResourceShare =+  res+    "UpdateResourceShareResponse"+    "fixture/UpdateResourceShareResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateResourceShare)
+ test/Test/Amazonka/RAM.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.RAM+-- 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.RAM+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/RAM/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.RAM.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.RAM.Internal where