packages feed

amazonka-oam (empty) → 2.0

raw patch · 61 files changed

+5437/−0 lines, 61 filesdep +amazonka-coredep +amazonka-oamdep +amazonka-test

Dependencies added: amazonka-core, amazonka-oam, 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 CloudWatch Observability Access Manager SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2022-06-10@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-oam)+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.OAM](http://hackage.haskell.org/package/amazonka-oam/docs/Amazonka-OAM.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-oam` 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-oam.cabal view
@@ -0,0 +1,102 @@+cabal-version:      2.2+name:               amazonka-oam+version:            2.0+synopsis:           Amazon CloudWatch Observability 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 @2022-06-10@ 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.OAM.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.OAM" 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-oam++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.OAM+    Amazonka.OAM.CreateLink+    Amazonka.OAM.CreateSink+    Amazonka.OAM.DeleteLink+    Amazonka.OAM.DeleteSink+    Amazonka.OAM.GetLink+    Amazonka.OAM.GetSink+    Amazonka.OAM.GetSinkPolicy+    Amazonka.OAM.Lens+    Amazonka.OAM.ListAttachedLinks+    Amazonka.OAM.ListLinks+    Amazonka.OAM.ListSinks+    Amazonka.OAM.ListTagsForResource+    Amazonka.OAM.PutSinkPolicy+    Amazonka.OAM.TagResource+    Amazonka.OAM.Types+    Amazonka.OAM.Types.ListAttachedLinksItem+    Amazonka.OAM.Types.ListLinksItem+    Amazonka.OAM.Types.ListSinksItem+    Amazonka.OAM.Types.ResourceType+    Amazonka.OAM.UntagResource+    Amazonka.OAM.UpdateLink+    Amazonka.OAM.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-oam-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.OAM+    Test.Amazonka.OAM+    Test.Amazonka.OAM.Internal++  build-depends:+    , amazonka-core         >=2.0 && <2.1+    , amazonka-oam+    , amazonka-test         >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/CreateLink.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/CreateLinkResponse.proto view
+ fixture/CreateSink.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/CreateSinkResponse.proto view
+ fixture/DeleteLink.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/DeleteLinkResponse.proto view
+ fixture/DeleteSink.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/DeleteSinkResponse.proto view
+ fixture/GetLink.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/GetLinkResponse.proto view
+ fixture/GetSink.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/GetSinkPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/GetSinkPolicyResponse.proto view
+ fixture/GetSinkResponse.proto view
+ fixture/ListAttachedLinks.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/ListAttachedLinksResponse.proto view
+ fixture/ListLinks.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/ListLinksResponse.proto view
+ fixture/ListSinks.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/ListSinksResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/ListTagsForResourceResponse.proto view
+ fixture/PutSinkPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/PutSinkPolicyResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/TagResourceResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/UpdateLink.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/oam/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  oam.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/UpdateLinkResponse.proto view
+ gen/Amazonka/OAM.hs view
@@ -0,0 +1,213 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.OAM+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2022-06-10@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Use Amazon CloudWatch Observability Access Manager to create and manage+-- links between source accounts and monitoring accounts by using+-- /CloudWatch cross-account observability/. With CloudWatch cross-account+-- observability, you can monitor and troubleshoot applications that span+-- multiple accounts within a Region. Seamlessly search, visualize, and+-- analyze your metrics, logs, and traces in any of the linked accounts+-- without account boundaries.+--+-- >  <p>Set up one or more Amazon Web Services accounts as <i>monitoring accounts</i> and link them with multiple <i>source accounts</i>. A monitoring account is a central Amazon Web Services account that can view and interact with observability data generated from source accounts. A source account is an individual Amazon Web Services account that generates observability data for the resources that reside in it. Source accounts share their observability data with the monitoring account. The shared observability data can include metrics in Amazon CloudWatch, logs in Amazon CloudWatch Logs, and traces in X-Ray.</p>+module Amazonka.OAM+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** ConflictException+    _ConflictException,++    -- ** InternalServiceFault+    _InternalServiceFault,++    -- ** InvalidParameterException+    _InvalidParameterException,++    -- ** MissingRequiredParameterException+    _MissingRequiredParameterException,++    -- ** ResourceNotFoundException+    _ResourceNotFoundException,++    -- ** ServiceQuotaExceededException+    _ServiceQuotaExceededException,++    -- ** TooManyTagsException+    _TooManyTagsException,++    -- ** ValidationException+    _ValidationException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** CreateLink+    CreateLink (CreateLink'),+    newCreateLink,+    CreateLinkResponse (CreateLinkResponse'),+    newCreateLinkResponse,++    -- ** CreateSink+    CreateSink (CreateSink'),+    newCreateSink,+    CreateSinkResponse (CreateSinkResponse'),+    newCreateSinkResponse,++    -- ** DeleteLink+    DeleteLink (DeleteLink'),+    newDeleteLink,+    DeleteLinkResponse (DeleteLinkResponse'),+    newDeleteLinkResponse,++    -- ** DeleteSink+    DeleteSink (DeleteSink'),+    newDeleteSink,+    DeleteSinkResponse (DeleteSinkResponse'),+    newDeleteSinkResponse,++    -- ** GetLink+    GetLink (GetLink'),+    newGetLink,+    GetLinkResponse (GetLinkResponse'),+    newGetLinkResponse,++    -- ** GetSink+    GetSink (GetSink'),+    newGetSink,+    GetSinkResponse (GetSinkResponse'),+    newGetSinkResponse,++    -- ** GetSinkPolicy+    GetSinkPolicy (GetSinkPolicy'),+    newGetSinkPolicy,+    GetSinkPolicyResponse (GetSinkPolicyResponse'),+    newGetSinkPolicyResponse,++    -- ** ListAttachedLinks (Paginated)+    ListAttachedLinks (ListAttachedLinks'),+    newListAttachedLinks,+    ListAttachedLinksResponse (ListAttachedLinksResponse'),+    newListAttachedLinksResponse,++    -- ** ListLinks (Paginated)+    ListLinks (ListLinks'),+    newListLinks,+    ListLinksResponse (ListLinksResponse'),+    newListLinksResponse,++    -- ** ListSinks (Paginated)+    ListSinks (ListSinks'),+    newListSinks,+    ListSinksResponse (ListSinksResponse'),+    newListSinksResponse,++    -- ** ListTagsForResource+    ListTagsForResource (ListTagsForResource'),+    newListTagsForResource,+    ListTagsForResourceResponse (ListTagsForResourceResponse'),+    newListTagsForResourceResponse,++    -- ** PutSinkPolicy+    PutSinkPolicy (PutSinkPolicy'),+    newPutSinkPolicy,+    PutSinkPolicyResponse (PutSinkPolicyResponse'),+    newPutSinkPolicyResponse,++    -- ** TagResource+    TagResource (TagResource'),+    newTagResource,+    TagResourceResponse (TagResourceResponse'),+    newTagResourceResponse,++    -- ** UntagResource+    UntagResource (UntagResource'),+    newUntagResource,+    UntagResourceResponse (UntagResourceResponse'),+    newUntagResourceResponse,++    -- ** UpdateLink+    UpdateLink (UpdateLink'),+    newUpdateLink,+    UpdateLinkResponse (UpdateLinkResponse'),+    newUpdateLinkResponse,++    -- * Types++    -- ** ResourceType+    ResourceType (..),++    -- ** ListAttachedLinksItem+    ListAttachedLinksItem (ListAttachedLinksItem'),+    newListAttachedLinksItem,++    -- ** ListLinksItem+    ListLinksItem (ListLinksItem'),+    newListLinksItem,++    -- ** ListSinksItem+    ListSinksItem (ListSinksItem'),+    newListSinksItem,+  )+where++import Amazonka.OAM.CreateLink+import Amazonka.OAM.CreateSink+import Amazonka.OAM.DeleteLink+import Amazonka.OAM.DeleteSink+import Amazonka.OAM.GetLink+import Amazonka.OAM.GetSink+import Amazonka.OAM.GetSinkPolicy+import Amazonka.OAM.Lens+import Amazonka.OAM.ListAttachedLinks+import Amazonka.OAM.ListLinks+import Amazonka.OAM.ListSinks+import Amazonka.OAM.ListTagsForResource+import Amazonka.OAM.PutSinkPolicy+import Amazonka.OAM.TagResource+import Amazonka.OAM.Types+import Amazonka.OAM.UntagResource+import Amazonka.OAM.UpdateLink+import Amazonka.OAM.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 'OAM'.++-- $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/OAM/CreateLink.hs view
@@ -0,0 +1,384 @@+{-# 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.OAM.CreateLink+-- 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 link between a source account and a sink that you have created+-- in a monitoring account.+--+-- Before you create a link, you must create a sink in the monitoring+-- account and create a sink policy in that account. The sink policy must+-- permit the source account to link to it. You can grant permission to+-- source accounts by granting permission to an entire organization or to+-- individual accounts.+--+-- For more information, see+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html CreateSink>+-- and+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html PutSinkPolicy>.+--+-- Each monitoring account can be linked to as many as 100,000 source+-- accounts.+--+-- Each source account can be linked to as many as five monitoring+-- accounts.+module Amazonka.OAM.CreateLink+  ( -- * Creating a Request+    CreateLink (..),+    newCreateLink,++    -- * Request Lenses+    createLink_tags,+    createLink_labelTemplate,+    createLink_resourceTypes,+    createLink_sinkIdentifier,++    -- * Destructuring the Response+    CreateLinkResponse (..),+    newCreateLinkResponse,++    -- * Response Lenses+    createLinkResponse_arn,+    createLinkResponse_id,+    createLinkResponse_label,+    createLinkResponse_labelTemplate,+    createLinkResponse_resourceTypes,+    createLinkResponse_sinkArn,+    createLinkResponse_tags,+    createLinkResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateLink' smart constructor.+data CreateLink = CreateLink'+  { -- | Assigns one or more tags (key-value pairs) to the link.+    --+    -- Tags can help you organize and categorize your resources. You can also+    -- use them to scope user permissions by granting a user permission to+    -- access or change only resources with certain tag values.+    --+    -- For more information about using tags to control access, see+    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html Controlling access to Amazon Web Services resources using tags>.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | Specify a friendly human-readable name to use to identify this source+    -- account when you are viewing data from it in the monitoring account.+    --+    -- You can use a custom label or use the following variables:+    --+    -- -   @$AccountName@ is the name of the account+    --+    -- -   @$AccountEmail@ is the globally unique email address of the account+    --+    -- -   @$AccountEmailNoDomain@ is the email address of the account without+    --     the domain name+    labelTemplate :: Prelude.Text,+    -- | An array of strings that define which types of data that the source+    -- account shares with the monitoring account.+    resourceTypes :: Prelude.NonEmpty ResourceType,+    -- | The ARN of the sink to use to create this link. You can use+    -- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html ListSinks>+    -- to find the ARNs of sinks.+    --+    -- For more information about sinks, see+    -- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html CreateSink>.+    sinkIdentifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateLink' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'createLink_tags' - Assigns one or more tags (key-value pairs) to the link.+--+-- Tags can help you organize and categorize your resources. You can also+-- use them to scope user permissions by granting a user permission to+-- access or change only resources with certain tag values.+--+-- For more information about using tags to control access, see+-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html Controlling access to Amazon Web Services resources using tags>.+--+-- 'labelTemplate', 'createLink_labelTemplate' - Specify a friendly human-readable name to use to identify this source+-- account when you are viewing data from it in the monitoring account.+--+-- You can use a custom label or use the following variables:+--+-- -   @$AccountName@ is the name of the account+--+-- -   @$AccountEmail@ is the globally unique email address of the account+--+-- -   @$AccountEmailNoDomain@ is the email address of the account without+--     the domain name+--+-- 'resourceTypes', 'createLink_resourceTypes' - An array of strings that define which types of data that the source+-- account shares with the monitoring account.+--+-- 'sinkIdentifier', 'createLink_sinkIdentifier' - The ARN of the sink to use to create this link. You can use+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html ListSinks>+-- to find the ARNs of sinks.+--+-- For more information about sinks, see+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html CreateSink>.+newCreateLink ::+  -- | 'labelTemplate'+  Prelude.Text ->+  -- | 'resourceTypes'+  Prelude.NonEmpty ResourceType ->+  -- | 'sinkIdentifier'+  Prelude.Text ->+  CreateLink+newCreateLink+  pLabelTemplate_+  pResourceTypes_+  pSinkIdentifier_ =+    CreateLink'+      { tags = Prelude.Nothing,+        labelTemplate = pLabelTemplate_,+        resourceTypes = Lens.coerced Lens.# pResourceTypes_,+        sinkIdentifier = pSinkIdentifier_+      }++-- | Assigns one or more tags (key-value pairs) to the link.+--+-- Tags can help you organize and categorize your resources. You can also+-- use them to scope user permissions by granting a user permission to+-- access or change only resources with certain tag values.+--+-- For more information about using tags to control access, see+-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html Controlling access to Amazon Web Services resources using tags>.+createLink_tags :: Lens.Lens' CreateLink (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createLink_tags = Lens.lens (\CreateLink' {tags} -> tags) (\s@CreateLink' {} a -> s {tags = a} :: CreateLink) Prelude.. Lens.mapping Lens.coerced++-- | Specify a friendly human-readable name to use to identify this source+-- account when you are viewing data from it in the monitoring account.+--+-- You can use a custom label or use the following variables:+--+-- -   @$AccountName@ is the name of the account+--+-- -   @$AccountEmail@ is the globally unique email address of the account+--+-- -   @$AccountEmailNoDomain@ is the email address of the account without+--     the domain name+createLink_labelTemplate :: Lens.Lens' CreateLink Prelude.Text+createLink_labelTemplate = Lens.lens (\CreateLink' {labelTemplate} -> labelTemplate) (\s@CreateLink' {} a -> s {labelTemplate = a} :: CreateLink)++-- | An array of strings that define which types of data that the source+-- account shares with the monitoring account.+createLink_resourceTypes :: Lens.Lens' CreateLink (Prelude.NonEmpty ResourceType)+createLink_resourceTypes = Lens.lens (\CreateLink' {resourceTypes} -> resourceTypes) (\s@CreateLink' {} a -> s {resourceTypes = a} :: CreateLink) Prelude.. Lens.coerced++-- | The ARN of the sink to use to create this link. You can use+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html ListSinks>+-- to find the ARNs of sinks.+--+-- For more information about sinks, see+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html CreateSink>.+createLink_sinkIdentifier :: Lens.Lens' CreateLink Prelude.Text+createLink_sinkIdentifier = Lens.lens (\CreateLink' {sinkIdentifier} -> sinkIdentifier) (\s@CreateLink' {} a -> s {sinkIdentifier = a} :: CreateLink)++instance Core.AWSRequest CreateLink where+  type AWSResponse CreateLink = CreateLinkResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateLinkResponse'+            Prelude.<$> (x Data..?> "Arn")+            Prelude.<*> (x Data..?> "Id")+            Prelude.<*> (x Data..?> "Label")+            Prelude.<*> (x Data..?> "LabelTemplate")+            Prelude.<*> (x Data..?> "ResourceTypes" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "SinkArn")+            Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateLink where+  hashWithSalt _salt CreateLink' {..} =+    _salt+      `Prelude.hashWithSalt` tags+      `Prelude.hashWithSalt` labelTemplate+      `Prelude.hashWithSalt` resourceTypes+      `Prelude.hashWithSalt` sinkIdentifier++instance Prelude.NFData CreateLink where+  rnf CreateLink' {..} =+    Prelude.rnf tags+      `Prelude.seq` Prelude.rnf labelTemplate+      `Prelude.seq` Prelude.rnf resourceTypes+      `Prelude.seq` Prelude.rnf sinkIdentifier++instance Data.ToHeaders CreateLink where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateLink where+  toJSON CreateLink' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("Tags" Data..=) Prelude.<$> tags,+            Prelude.Just ("LabelTemplate" Data..= labelTemplate),+            Prelude.Just ("ResourceTypes" Data..= resourceTypes),+            Prelude.Just+              ("SinkIdentifier" Data..= sinkIdentifier)+          ]+      )++instance Data.ToPath CreateLink where+  toPath = Prelude.const "/CreateLink"++instance Data.ToQuery CreateLink where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateLinkResponse' smart constructor.+data CreateLinkResponse = CreateLinkResponse'+  { -- | The ARN of the link that is newly created.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The random ID string that Amazon Web Services generated as part of the+    -- link ARN.+    id :: Prelude.Maybe Prelude.Text,+    -- | The label that you assigned to this link. If the @labelTemplate@+    -- includes variables, this field displays the variables resolved to their+    -- actual values.+    label :: Prelude.Maybe Prelude.Text,+    -- | The exact label template that you specified, with the variables not+    -- resolved.+    labelTemplate :: Prelude.Maybe Prelude.Text,+    -- | The resource types supported by this link.+    resourceTypes :: Prelude.Maybe [Prelude.Text],+    -- | The ARN of the sink that is used for this link.+    sinkArn :: Prelude.Maybe Prelude.Text,+    -- | The tags assigned to the link.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateLinkResponse' with all optional fields 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', 'createLinkResponse_arn' - The ARN of the link that is newly created.+--+-- 'id', 'createLinkResponse_id' - The random ID string that Amazon Web Services generated as part of the+-- link ARN.+--+-- 'label', 'createLinkResponse_label' - The label that you assigned to this link. If the @labelTemplate@+-- includes variables, this field displays the variables resolved to their+-- actual values.+--+-- 'labelTemplate', 'createLinkResponse_labelTemplate' - The exact label template that you specified, with the variables not+-- resolved.+--+-- 'resourceTypes', 'createLinkResponse_resourceTypes' - The resource types supported by this link.+--+-- 'sinkArn', 'createLinkResponse_sinkArn' - The ARN of the sink that is used for this link.+--+-- 'tags', 'createLinkResponse_tags' - The tags assigned to the link.+--+-- 'httpStatus', 'createLinkResponse_httpStatus' - The response's http status code.+newCreateLinkResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateLinkResponse+newCreateLinkResponse pHttpStatus_ =+  CreateLinkResponse'+    { arn = Prelude.Nothing,+      id = Prelude.Nothing,+      label = Prelude.Nothing,+      labelTemplate = Prelude.Nothing,+      resourceTypes = Prelude.Nothing,+      sinkArn = Prelude.Nothing,+      tags = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The ARN of the link that is newly created.+createLinkResponse_arn :: Lens.Lens' CreateLinkResponse (Prelude.Maybe Prelude.Text)+createLinkResponse_arn = Lens.lens (\CreateLinkResponse' {arn} -> arn) (\s@CreateLinkResponse' {} a -> s {arn = a} :: CreateLinkResponse)++-- | The random ID string that Amazon Web Services generated as part of the+-- link ARN.+createLinkResponse_id :: Lens.Lens' CreateLinkResponse (Prelude.Maybe Prelude.Text)+createLinkResponse_id = Lens.lens (\CreateLinkResponse' {id} -> id) (\s@CreateLinkResponse' {} a -> s {id = a} :: CreateLinkResponse)++-- | The label that you assigned to this link. If the @labelTemplate@+-- includes variables, this field displays the variables resolved to their+-- actual values.+createLinkResponse_label :: Lens.Lens' CreateLinkResponse (Prelude.Maybe Prelude.Text)+createLinkResponse_label = Lens.lens (\CreateLinkResponse' {label} -> label) (\s@CreateLinkResponse' {} a -> s {label = a} :: CreateLinkResponse)++-- | The exact label template that you specified, with the variables not+-- resolved.+createLinkResponse_labelTemplate :: Lens.Lens' CreateLinkResponse (Prelude.Maybe Prelude.Text)+createLinkResponse_labelTemplate = Lens.lens (\CreateLinkResponse' {labelTemplate} -> labelTemplate) (\s@CreateLinkResponse' {} a -> s {labelTemplate = a} :: CreateLinkResponse)++-- | The resource types supported by this link.+createLinkResponse_resourceTypes :: Lens.Lens' CreateLinkResponse (Prelude.Maybe [Prelude.Text])+createLinkResponse_resourceTypes = Lens.lens (\CreateLinkResponse' {resourceTypes} -> resourceTypes) (\s@CreateLinkResponse' {} a -> s {resourceTypes = a} :: CreateLinkResponse) Prelude.. Lens.mapping Lens.coerced++-- | The ARN of the sink that is used for this link.+createLinkResponse_sinkArn :: Lens.Lens' CreateLinkResponse (Prelude.Maybe Prelude.Text)+createLinkResponse_sinkArn = Lens.lens (\CreateLinkResponse' {sinkArn} -> sinkArn) (\s@CreateLinkResponse' {} a -> s {sinkArn = a} :: CreateLinkResponse)++-- | The tags assigned to the link.+createLinkResponse_tags :: Lens.Lens' CreateLinkResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createLinkResponse_tags = Lens.lens (\CreateLinkResponse' {tags} -> tags) (\s@CreateLinkResponse' {} a -> s {tags = a} :: CreateLinkResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+createLinkResponse_httpStatus :: Lens.Lens' CreateLinkResponse Prelude.Int+createLinkResponse_httpStatus = Lens.lens (\CreateLinkResponse' {httpStatus} -> httpStatus) (\s@CreateLinkResponse' {} a -> s {httpStatus = a} :: CreateLinkResponse)++instance Prelude.NFData CreateLinkResponse where+  rnf CreateLinkResponse' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf label+      `Prelude.seq` Prelude.rnf labelTemplate+      `Prelude.seq` Prelude.rnf resourceTypes+      `Prelude.seq` Prelude.rnf sinkArn+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/OAM/CreateSink.hs view
@@ -0,0 +1,246 @@+{-# 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.OAM.CreateSink+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Use this to create a /sink/ in the current account, so that it can be+-- used as a monitoring account in CloudWatch cross-account observability.+-- A sink is a resource that represents an attachment point in a monitoring+-- account. Source accounts can link to the sink to send observability+-- data.+--+-- After you create a sink, you must create a sink policy that allows+-- source accounts to attach to it. For more information, see+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html PutSinkPolicy>.+--+-- Each account can contain one sink. If you delete a sink, you can then+-- create a new one in that account.+module Amazonka.OAM.CreateSink+  ( -- * Creating a Request+    CreateSink (..),+    newCreateSink,++    -- * Request Lenses+    createSink_tags,+    createSink_name,++    -- * Destructuring the Response+    CreateSinkResponse (..),+    newCreateSinkResponse,++    -- * Response Lenses+    createSinkResponse_arn,+    createSinkResponse_id,+    createSinkResponse_name,+    createSinkResponse_tags,+    createSinkResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateSink' smart constructor.+data CreateSink = CreateSink'+  { -- | Assigns one or more tags (key-value pairs) to the link.+    --+    -- Tags can help you organize and categorize your resources. You can also+    -- use them to scope user permissions by granting a user permission to+    -- access or change only resources with certain tag values.+    --+    -- For more information about using tags to control access, see+    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html Controlling access to Amazon Web Services resources using tags>.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | A name for the sink.+    name :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateSink' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'createSink_tags' - Assigns one or more tags (key-value pairs) to the link.+--+-- Tags can help you organize and categorize your resources. You can also+-- use them to scope user permissions by granting a user permission to+-- access or change only resources with certain tag values.+--+-- For more information about using tags to control access, see+-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html Controlling access to Amazon Web Services resources using tags>.+--+-- 'name', 'createSink_name' - A name for the sink.+newCreateSink ::+  -- | 'name'+  Prelude.Text ->+  CreateSink+newCreateSink pName_ =+  CreateSink' {tags = Prelude.Nothing, name = pName_}++-- | Assigns one or more tags (key-value pairs) to the link.+--+-- Tags can help you organize and categorize your resources. You can also+-- use them to scope user permissions by granting a user permission to+-- access or change only resources with certain tag values.+--+-- For more information about using tags to control access, see+-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html Controlling access to Amazon Web Services resources using tags>.+createSink_tags :: Lens.Lens' CreateSink (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createSink_tags = Lens.lens (\CreateSink' {tags} -> tags) (\s@CreateSink' {} a -> s {tags = a} :: CreateSink) Prelude.. Lens.mapping Lens.coerced++-- | A name for the sink.+createSink_name :: Lens.Lens' CreateSink Prelude.Text+createSink_name = Lens.lens (\CreateSink' {name} -> name) (\s@CreateSink' {} a -> s {name = a} :: CreateSink)++instance Core.AWSRequest CreateSink where+  type AWSResponse CreateSink = CreateSinkResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateSinkResponse'+            Prelude.<$> (x Data..?> "Arn")+            Prelude.<*> (x Data..?> "Id")+            Prelude.<*> (x Data..?> "Name")+            Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateSink where+  hashWithSalt _salt CreateSink' {..} =+    _salt+      `Prelude.hashWithSalt` tags+      `Prelude.hashWithSalt` name++instance Prelude.NFData CreateSink where+  rnf CreateSink' {..} =+    Prelude.rnf tags `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders CreateSink where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateSink where+  toJSON CreateSink' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("Tags" Data..=) Prelude.<$> tags,+            Prelude.Just ("Name" Data..= name)+          ]+      )++instance Data.ToPath CreateSink where+  toPath = Prelude.const "/CreateSink"++instance Data.ToQuery CreateSink where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateSinkResponse' smart constructor.+data CreateSinkResponse = CreateSinkResponse'+  { -- | The ARN of the sink that is newly created.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The random ID string that Amazon Web Services generated as part of the+    -- sink ARN.+    id :: Prelude.Maybe Prelude.Text,+    -- | The name of the sink.+    name :: Prelude.Maybe Prelude.Text,+    -- | The tags assigned to the sink.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateSinkResponse' with all optional fields 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', 'createSinkResponse_arn' - The ARN of the sink that is newly created.+--+-- 'id', 'createSinkResponse_id' - The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+--+-- 'name', 'createSinkResponse_name' - The name of the sink.+--+-- 'tags', 'createSinkResponse_tags' - The tags assigned to the sink.+--+-- 'httpStatus', 'createSinkResponse_httpStatus' - The response's http status code.+newCreateSinkResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateSinkResponse+newCreateSinkResponse pHttpStatus_ =+  CreateSinkResponse'+    { arn = Prelude.Nothing,+      id = Prelude.Nothing,+      name = Prelude.Nothing,+      tags = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The ARN of the sink that is newly created.+createSinkResponse_arn :: Lens.Lens' CreateSinkResponse (Prelude.Maybe Prelude.Text)+createSinkResponse_arn = Lens.lens (\CreateSinkResponse' {arn} -> arn) (\s@CreateSinkResponse' {} a -> s {arn = a} :: CreateSinkResponse)++-- | The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+createSinkResponse_id :: Lens.Lens' CreateSinkResponse (Prelude.Maybe Prelude.Text)+createSinkResponse_id = Lens.lens (\CreateSinkResponse' {id} -> id) (\s@CreateSinkResponse' {} a -> s {id = a} :: CreateSinkResponse)++-- | The name of the sink.+createSinkResponse_name :: Lens.Lens' CreateSinkResponse (Prelude.Maybe Prelude.Text)+createSinkResponse_name = Lens.lens (\CreateSinkResponse' {name} -> name) (\s@CreateSinkResponse' {} a -> s {name = a} :: CreateSinkResponse)++-- | The tags assigned to the sink.+createSinkResponse_tags :: Lens.Lens' CreateSinkResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createSinkResponse_tags = Lens.lens (\CreateSinkResponse' {tags} -> tags) (\s@CreateSinkResponse' {} a -> s {tags = a} :: CreateSinkResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+createSinkResponse_httpStatus :: Lens.Lens' CreateSinkResponse Prelude.Int+createSinkResponse_httpStatus = Lens.lens (\CreateSinkResponse' {httpStatus} -> httpStatus) (\s@CreateSinkResponse' {} a -> s {httpStatus = a} :: CreateSinkResponse)++instance Prelude.NFData CreateSinkResponse where+  rnf CreateSinkResponse' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/OAM/DeleteLink.hs view
@@ -0,0 +1,147 @@+{-# 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.OAM.DeleteLink+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a link between a monitoring account sink and a source account.+-- You must run this operation in the source account.+module Amazonka.OAM.DeleteLink+  ( -- * Creating a Request+    DeleteLink (..),+    newDeleteLink,++    -- * Request Lenses+    deleteLink_identifier,++    -- * Destructuring the Response+    DeleteLinkResponse (..),+    newDeleteLinkResponse,++    -- * Response Lenses+    deleteLinkResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteLink' smart constructor.+data DeleteLink = DeleteLink'+  { -- | The ARN of the link to delete.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteLink' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'identifier', 'deleteLink_identifier' - The ARN of the link to delete.+newDeleteLink ::+  -- | 'identifier'+  Prelude.Text ->+  DeleteLink+newDeleteLink pIdentifier_ =+  DeleteLink' {identifier = pIdentifier_}++-- | The ARN of the link to delete.+deleteLink_identifier :: Lens.Lens' DeleteLink Prelude.Text+deleteLink_identifier = Lens.lens (\DeleteLink' {identifier} -> identifier) (\s@DeleteLink' {} a -> s {identifier = a} :: DeleteLink)++instance Core.AWSRequest DeleteLink where+  type AWSResponse DeleteLink = DeleteLinkResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          DeleteLinkResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteLink where+  hashWithSalt _salt DeleteLink' {..} =+    _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData DeleteLink where+  rnf DeleteLink' {..} = Prelude.rnf identifier++instance Data.ToHeaders DeleteLink where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteLink where+  toJSON DeleteLink' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("Identifier" Data..= identifier)]+      )++instance Data.ToPath DeleteLink where+  toPath = Prelude.const "/DeleteLink"++instance Data.ToQuery DeleteLink where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteLinkResponse' smart constructor.+data DeleteLinkResponse = DeleteLinkResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteLinkResponse' with all optional fields 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', 'deleteLinkResponse_httpStatus' - The response's http status code.+newDeleteLinkResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteLinkResponse+newDeleteLinkResponse pHttpStatus_ =+  DeleteLinkResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+deleteLinkResponse_httpStatus :: Lens.Lens' DeleteLinkResponse Prelude.Int+deleteLinkResponse_httpStatus = Lens.lens (\DeleteLinkResponse' {httpStatus} -> httpStatus) (\s@DeleteLinkResponse' {} a -> s {httpStatus = a} :: DeleteLinkResponse)++instance Prelude.NFData DeleteLinkResponse where+  rnf DeleteLinkResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/OAM/DeleteSink.hs view
@@ -0,0 +1,147 @@+{-# 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.OAM.DeleteSink+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a sink. You must delete all links to a sink before you can+-- delete that sink.+module Amazonka.OAM.DeleteSink+  ( -- * Creating a Request+    DeleteSink (..),+    newDeleteSink,++    -- * Request Lenses+    deleteSink_identifier,++    -- * Destructuring the Response+    DeleteSinkResponse (..),+    newDeleteSinkResponse,++    -- * Response Lenses+    deleteSinkResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteSink' smart constructor.+data DeleteSink = DeleteSink'+  { -- | The ARN of the sink to delete.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteSink' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'identifier', 'deleteSink_identifier' - The ARN of the sink to delete.+newDeleteSink ::+  -- | 'identifier'+  Prelude.Text ->+  DeleteSink+newDeleteSink pIdentifier_ =+  DeleteSink' {identifier = pIdentifier_}++-- | The ARN of the sink to delete.+deleteSink_identifier :: Lens.Lens' DeleteSink Prelude.Text+deleteSink_identifier = Lens.lens (\DeleteSink' {identifier} -> identifier) (\s@DeleteSink' {} a -> s {identifier = a} :: DeleteSink)++instance Core.AWSRequest DeleteSink where+  type AWSResponse DeleteSink = DeleteSinkResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          DeleteSinkResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteSink where+  hashWithSalt _salt DeleteSink' {..} =+    _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData DeleteSink where+  rnf DeleteSink' {..} = Prelude.rnf identifier++instance Data.ToHeaders DeleteSink where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteSink where+  toJSON DeleteSink' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("Identifier" Data..= identifier)]+      )++instance Data.ToPath DeleteSink where+  toPath = Prelude.const "/DeleteSink"++instance Data.ToQuery DeleteSink where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteSinkResponse' smart constructor.+data DeleteSinkResponse = DeleteSinkResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteSinkResponse' with all optional fields 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', 'deleteSinkResponse_httpStatus' - The response's http status code.+newDeleteSinkResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteSinkResponse+newDeleteSinkResponse pHttpStatus_ =+  DeleteSinkResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+deleteSinkResponse_httpStatus :: Lens.Lens' DeleteSinkResponse Prelude.Int+deleteSinkResponse_httpStatus = Lens.lens (\DeleteSinkResponse' {httpStatus} -> httpStatus) (\s@DeleteSinkResponse' {} a -> s {httpStatus = a} :: DeleteSinkResponse)++instance Prelude.NFData DeleteSinkResponse where+  rnf DeleteSinkResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/OAM/GetLink.hs view
@@ -0,0 +1,246 @@+{-# 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.OAM.GetLink+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns complete information about one link.+--+-- To use this operation, provide the link ARN. To retrieve a list of link+-- ARNs, use+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html ListLinks>.+module Amazonka.OAM.GetLink+  ( -- * Creating a Request+    GetLink (..),+    newGetLink,++    -- * Request Lenses+    getLink_identifier,++    -- * Destructuring the Response+    GetLinkResponse (..),+    newGetLinkResponse,++    -- * Response Lenses+    getLinkResponse_arn,+    getLinkResponse_id,+    getLinkResponse_label,+    getLinkResponse_labelTemplate,+    getLinkResponse_resourceTypes,+    getLinkResponse_sinkArn,+    getLinkResponse_tags,+    getLinkResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetLink' smart constructor.+data GetLink = GetLink'+  { -- | The ARN of the link to retrieve information for.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetLink' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'identifier', 'getLink_identifier' - The ARN of the link to retrieve information for.+newGetLink ::+  -- | 'identifier'+  Prelude.Text ->+  GetLink+newGetLink pIdentifier_ =+  GetLink' {identifier = pIdentifier_}++-- | The ARN of the link to retrieve information for.+getLink_identifier :: Lens.Lens' GetLink Prelude.Text+getLink_identifier = Lens.lens (\GetLink' {identifier} -> identifier) (\s@GetLink' {} a -> s {identifier = a} :: GetLink)++instance Core.AWSRequest GetLink where+  type AWSResponse GetLink = GetLinkResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetLinkResponse'+            Prelude.<$> (x Data..?> "Arn")+            Prelude.<*> (x Data..?> "Id")+            Prelude.<*> (x Data..?> "Label")+            Prelude.<*> (x Data..?> "LabelTemplate")+            Prelude.<*> (x Data..?> "ResourceTypes" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "SinkArn")+            Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetLink where+  hashWithSalt _salt GetLink' {..} =+    _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData GetLink where+  rnf GetLink' {..} = Prelude.rnf identifier++instance Data.ToHeaders GetLink where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetLink where+  toJSON GetLink' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("Identifier" Data..= identifier)]+      )++instance Data.ToPath GetLink where+  toPath = Prelude.const "/GetLink"++instance Data.ToQuery GetLink where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetLinkResponse' smart constructor.+data GetLinkResponse = GetLinkResponse'+  { -- | The ARN of the link.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The random ID string that Amazon Web Services generated as part of the+    -- link ARN.+    id :: Prelude.Maybe Prelude.Text,+    -- | The label that you assigned to this link, with the variables resolved to+    -- their actual values.+    label :: Prelude.Maybe Prelude.Text,+    -- | The exact label template that was specified when the link was created,+    -- with the template variables not resolved.+    labelTemplate :: Prelude.Maybe Prelude.Text,+    -- | The resource types supported by this link.+    resourceTypes :: Prelude.Maybe [Prelude.Text],+    -- | The ARN of the sink that is used for this link.+    sinkArn :: Prelude.Maybe Prelude.Text,+    -- | The tags assigned to the link.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetLinkResponse' with all optional fields 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', 'getLinkResponse_arn' - The ARN of the link.+--+-- 'id', 'getLinkResponse_id' - The random ID string that Amazon Web Services generated as part of the+-- link ARN.+--+-- 'label', 'getLinkResponse_label' - The label that you assigned to this link, with the variables resolved to+-- their actual values.+--+-- 'labelTemplate', 'getLinkResponse_labelTemplate' - The exact label template that was specified when the link was created,+-- with the template variables not resolved.+--+-- 'resourceTypes', 'getLinkResponse_resourceTypes' - The resource types supported by this link.+--+-- 'sinkArn', 'getLinkResponse_sinkArn' - The ARN of the sink that is used for this link.+--+-- 'tags', 'getLinkResponse_tags' - The tags assigned to the link.+--+-- 'httpStatus', 'getLinkResponse_httpStatus' - The response's http status code.+newGetLinkResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetLinkResponse+newGetLinkResponse pHttpStatus_ =+  GetLinkResponse'+    { arn = Prelude.Nothing,+      id = Prelude.Nothing,+      label = Prelude.Nothing,+      labelTemplate = Prelude.Nothing,+      resourceTypes = Prelude.Nothing,+      sinkArn = Prelude.Nothing,+      tags = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The ARN of the link.+getLinkResponse_arn :: Lens.Lens' GetLinkResponse (Prelude.Maybe Prelude.Text)+getLinkResponse_arn = Lens.lens (\GetLinkResponse' {arn} -> arn) (\s@GetLinkResponse' {} a -> s {arn = a} :: GetLinkResponse)++-- | The random ID string that Amazon Web Services generated as part of the+-- link ARN.+getLinkResponse_id :: Lens.Lens' GetLinkResponse (Prelude.Maybe Prelude.Text)+getLinkResponse_id = Lens.lens (\GetLinkResponse' {id} -> id) (\s@GetLinkResponse' {} a -> s {id = a} :: GetLinkResponse)++-- | The label that you assigned to this link, with the variables resolved to+-- their actual values.+getLinkResponse_label :: Lens.Lens' GetLinkResponse (Prelude.Maybe Prelude.Text)+getLinkResponse_label = Lens.lens (\GetLinkResponse' {label} -> label) (\s@GetLinkResponse' {} a -> s {label = a} :: GetLinkResponse)++-- | The exact label template that was specified when the link was created,+-- with the template variables not resolved.+getLinkResponse_labelTemplate :: Lens.Lens' GetLinkResponse (Prelude.Maybe Prelude.Text)+getLinkResponse_labelTemplate = Lens.lens (\GetLinkResponse' {labelTemplate} -> labelTemplate) (\s@GetLinkResponse' {} a -> s {labelTemplate = a} :: GetLinkResponse)++-- | The resource types supported by this link.+getLinkResponse_resourceTypes :: Lens.Lens' GetLinkResponse (Prelude.Maybe [Prelude.Text])+getLinkResponse_resourceTypes = Lens.lens (\GetLinkResponse' {resourceTypes} -> resourceTypes) (\s@GetLinkResponse' {} a -> s {resourceTypes = a} :: GetLinkResponse) Prelude.. Lens.mapping Lens.coerced++-- | The ARN of the sink that is used for this link.+getLinkResponse_sinkArn :: Lens.Lens' GetLinkResponse (Prelude.Maybe Prelude.Text)+getLinkResponse_sinkArn = Lens.lens (\GetLinkResponse' {sinkArn} -> sinkArn) (\s@GetLinkResponse' {} a -> s {sinkArn = a} :: GetLinkResponse)++-- | The tags assigned to the link.+getLinkResponse_tags :: Lens.Lens' GetLinkResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getLinkResponse_tags = Lens.lens (\GetLinkResponse' {tags} -> tags) (\s@GetLinkResponse' {} a -> s {tags = a} :: GetLinkResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getLinkResponse_httpStatus :: Lens.Lens' GetLinkResponse Prelude.Int+getLinkResponse_httpStatus = Lens.lens (\GetLinkResponse' {httpStatus} -> httpStatus) (\s@GetLinkResponse' {} a -> s {httpStatus = a} :: GetLinkResponse)++instance Prelude.NFData GetLinkResponse where+  rnf GetLinkResponse' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf label+      `Prelude.seq` Prelude.rnf labelTemplate+      `Prelude.seq` Prelude.rnf resourceTypes+      `Prelude.seq` Prelude.rnf sinkArn+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/OAM/GetSink.hs view
@@ -0,0 +1,204 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.OAM.GetSink+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns complete information about one monitoring account sink.+--+-- To use this operation, provide the sink ARN. To retrieve a list of sink+-- ARNs, use+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html ListSinks>.+module Amazonka.OAM.GetSink+  ( -- * Creating a Request+    GetSink (..),+    newGetSink,++    -- * Request Lenses+    getSink_identifier,++    -- * Destructuring the Response+    GetSinkResponse (..),+    newGetSinkResponse,++    -- * Response Lenses+    getSinkResponse_arn,+    getSinkResponse_id,+    getSinkResponse_name,+    getSinkResponse_tags,+    getSinkResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetSink' smart constructor.+data GetSink = GetSink'+  { -- | The ARN of the sink to retrieve information for.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSink' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'identifier', 'getSink_identifier' - The ARN of the sink to retrieve information for.+newGetSink ::+  -- | 'identifier'+  Prelude.Text ->+  GetSink+newGetSink pIdentifier_ =+  GetSink' {identifier = pIdentifier_}++-- | The ARN of the sink to retrieve information for.+getSink_identifier :: Lens.Lens' GetSink Prelude.Text+getSink_identifier = Lens.lens (\GetSink' {identifier} -> identifier) (\s@GetSink' {} a -> s {identifier = a} :: GetSink)++instance Core.AWSRequest GetSink where+  type AWSResponse GetSink = GetSinkResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetSinkResponse'+            Prelude.<$> (x Data..?> "Arn")+            Prelude.<*> (x Data..?> "Id")+            Prelude.<*> (x Data..?> "Name")+            Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetSink where+  hashWithSalt _salt GetSink' {..} =+    _salt `Prelude.hashWithSalt` identifier++instance Prelude.NFData GetSink where+  rnf GetSink' {..} = Prelude.rnf identifier++instance Data.ToHeaders GetSink where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetSink where+  toJSON GetSink' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("Identifier" Data..= identifier)]+      )++instance Data.ToPath GetSink where+  toPath = Prelude.const "/GetSink"++instance Data.ToQuery GetSink where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetSinkResponse' smart constructor.+data GetSinkResponse = GetSinkResponse'+  { -- | The ARN of the sink.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The random ID string that Amazon Web Services generated as part of the+    -- sink ARN.+    id :: Prelude.Maybe Prelude.Text,+    -- | The name of the sink.+    name :: Prelude.Maybe Prelude.Text,+    -- | The tags assigned to the sink.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSinkResponse' with all optional fields 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', 'getSinkResponse_arn' - The ARN of the sink.+--+-- 'id', 'getSinkResponse_id' - The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+--+-- 'name', 'getSinkResponse_name' - The name of the sink.+--+-- 'tags', 'getSinkResponse_tags' - The tags assigned to the sink.+--+-- 'httpStatus', 'getSinkResponse_httpStatus' - The response's http status code.+newGetSinkResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetSinkResponse+newGetSinkResponse pHttpStatus_ =+  GetSinkResponse'+    { arn = Prelude.Nothing,+      id = Prelude.Nothing,+      name = Prelude.Nothing,+      tags = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The ARN of the sink.+getSinkResponse_arn :: Lens.Lens' GetSinkResponse (Prelude.Maybe Prelude.Text)+getSinkResponse_arn = Lens.lens (\GetSinkResponse' {arn} -> arn) (\s@GetSinkResponse' {} a -> s {arn = a} :: GetSinkResponse)++-- | The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+getSinkResponse_id :: Lens.Lens' GetSinkResponse (Prelude.Maybe Prelude.Text)+getSinkResponse_id = Lens.lens (\GetSinkResponse' {id} -> id) (\s@GetSinkResponse' {} a -> s {id = a} :: GetSinkResponse)++-- | The name of the sink.+getSinkResponse_name :: Lens.Lens' GetSinkResponse (Prelude.Maybe Prelude.Text)+getSinkResponse_name = Lens.lens (\GetSinkResponse' {name} -> name) (\s@GetSinkResponse' {} a -> s {name = a} :: GetSinkResponse)++-- | The tags assigned to the sink.+getSinkResponse_tags :: Lens.Lens' GetSinkResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getSinkResponse_tags = Lens.lens (\GetSinkResponse' {tags} -> tags) (\s@GetSinkResponse' {} a -> s {tags = a} :: GetSinkResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getSinkResponse_httpStatus :: Lens.Lens' GetSinkResponse Prelude.Int+getSinkResponse_httpStatus = Lens.lens (\GetSinkResponse' {httpStatus} -> httpStatus) (\s@GetSinkResponse' {} a -> s {httpStatus = a} :: GetSinkResponse)++instance Prelude.NFData GetSinkResponse where+  rnf GetSinkResponse' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/OAM/GetSinkPolicy.hs view
@@ -0,0 +1,194 @@+{-# 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.OAM.GetSinkPolicy+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the current sink policy attached to this sink. The sink policy+-- specifies what accounts can attach to this sink as source accounts, and+-- what types of data they can share.+module Amazonka.OAM.GetSinkPolicy+  ( -- * Creating a Request+    GetSinkPolicy (..),+    newGetSinkPolicy,++    -- * Request Lenses+    getSinkPolicy_sinkIdentifier,++    -- * Destructuring the Response+    GetSinkPolicyResponse (..),+    newGetSinkPolicyResponse,++    -- * Response Lenses+    getSinkPolicyResponse_policy,+    getSinkPolicyResponse_sinkArn,+    getSinkPolicyResponse_sinkId,+    getSinkPolicyResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetSinkPolicy' smart constructor.+data GetSinkPolicy = GetSinkPolicy'+  { -- | The ARN of the sink to retrieve the policy of.+    sinkIdentifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSinkPolicy' with all optional fields 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:+--+-- 'sinkIdentifier', 'getSinkPolicy_sinkIdentifier' - The ARN of the sink to retrieve the policy of.+newGetSinkPolicy ::+  -- | 'sinkIdentifier'+  Prelude.Text ->+  GetSinkPolicy+newGetSinkPolicy pSinkIdentifier_ =+  GetSinkPolicy' {sinkIdentifier = pSinkIdentifier_}++-- | The ARN of the sink to retrieve the policy of.+getSinkPolicy_sinkIdentifier :: Lens.Lens' GetSinkPolicy Prelude.Text+getSinkPolicy_sinkIdentifier = Lens.lens (\GetSinkPolicy' {sinkIdentifier} -> sinkIdentifier) (\s@GetSinkPolicy' {} a -> s {sinkIdentifier = a} :: GetSinkPolicy)++instance Core.AWSRequest GetSinkPolicy where+  type+    AWSResponse GetSinkPolicy =+      GetSinkPolicyResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetSinkPolicyResponse'+            Prelude.<$> (x Data..?> "Policy")+            Prelude.<*> (x Data..?> "SinkArn")+            Prelude.<*> (x Data..?> "SinkId")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetSinkPolicy where+  hashWithSalt _salt GetSinkPolicy' {..} =+    _salt `Prelude.hashWithSalt` sinkIdentifier++instance Prelude.NFData GetSinkPolicy where+  rnf GetSinkPolicy' {..} = Prelude.rnf sinkIdentifier++instance Data.ToHeaders GetSinkPolicy where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetSinkPolicy where+  toJSON GetSinkPolicy' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("SinkIdentifier" Data..= sinkIdentifier)+          ]+      )++instance Data.ToPath GetSinkPolicy where+  toPath = Prelude.const "/GetSinkPolicy"++instance Data.ToQuery GetSinkPolicy where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetSinkPolicyResponse' smart constructor.+data GetSinkPolicyResponse = GetSinkPolicyResponse'+  { -- | The policy that you specified, in JSON format.+    policy :: Prelude.Maybe Prelude.Text,+    -- | The ARN of the sink.+    sinkArn :: Prelude.Maybe Prelude.Text,+    -- | The random ID string that Amazon Web Services generated as part of the+    -- sink ARN.+    sinkId :: 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 'GetSinkPolicyResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'policy', 'getSinkPolicyResponse_policy' - The policy that you specified, in JSON format.+--+-- 'sinkArn', 'getSinkPolicyResponse_sinkArn' - The ARN of the sink.+--+-- 'sinkId', 'getSinkPolicyResponse_sinkId' - The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+--+-- 'httpStatus', 'getSinkPolicyResponse_httpStatus' - The response's http status code.+newGetSinkPolicyResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetSinkPolicyResponse+newGetSinkPolicyResponse pHttpStatus_ =+  GetSinkPolicyResponse'+    { policy = Prelude.Nothing,+      sinkArn = Prelude.Nothing,+      sinkId = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The policy that you specified, in JSON format.+getSinkPolicyResponse_policy :: Lens.Lens' GetSinkPolicyResponse (Prelude.Maybe Prelude.Text)+getSinkPolicyResponse_policy = Lens.lens (\GetSinkPolicyResponse' {policy} -> policy) (\s@GetSinkPolicyResponse' {} a -> s {policy = a} :: GetSinkPolicyResponse)++-- | The ARN of the sink.+getSinkPolicyResponse_sinkArn :: Lens.Lens' GetSinkPolicyResponse (Prelude.Maybe Prelude.Text)+getSinkPolicyResponse_sinkArn = Lens.lens (\GetSinkPolicyResponse' {sinkArn} -> sinkArn) (\s@GetSinkPolicyResponse' {} a -> s {sinkArn = a} :: GetSinkPolicyResponse)++-- | The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+getSinkPolicyResponse_sinkId :: Lens.Lens' GetSinkPolicyResponse (Prelude.Maybe Prelude.Text)+getSinkPolicyResponse_sinkId = Lens.lens (\GetSinkPolicyResponse' {sinkId} -> sinkId) (\s@GetSinkPolicyResponse' {} a -> s {sinkId = a} :: GetSinkPolicyResponse)++-- | The response's http status code.+getSinkPolicyResponse_httpStatus :: Lens.Lens' GetSinkPolicyResponse Prelude.Int+getSinkPolicyResponse_httpStatus = Lens.lens (\GetSinkPolicyResponse' {httpStatus} -> httpStatus) (\s@GetSinkPolicyResponse' {} a -> s {httpStatus = a} :: GetSinkPolicyResponse)++instance Prelude.NFData GetSinkPolicyResponse where+  rnf GetSinkPolicyResponse' {..} =+    Prelude.rnf policy+      `Prelude.seq` Prelude.rnf sinkArn+      `Prelude.seq` Prelude.rnf sinkId+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/OAM/Lens.hs view
@@ -0,0 +1,169 @@+{-# 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.OAM.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.OAM.Lens+  ( -- * Operations++    -- ** CreateLink+    createLink_tags,+    createLink_labelTemplate,+    createLink_resourceTypes,+    createLink_sinkIdentifier,+    createLinkResponse_arn,+    createLinkResponse_id,+    createLinkResponse_label,+    createLinkResponse_labelTemplate,+    createLinkResponse_resourceTypes,+    createLinkResponse_sinkArn,+    createLinkResponse_tags,+    createLinkResponse_httpStatus,++    -- ** CreateSink+    createSink_tags,+    createSink_name,+    createSinkResponse_arn,+    createSinkResponse_id,+    createSinkResponse_name,+    createSinkResponse_tags,+    createSinkResponse_httpStatus,++    -- ** DeleteLink+    deleteLink_identifier,+    deleteLinkResponse_httpStatus,++    -- ** DeleteSink+    deleteSink_identifier,+    deleteSinkResponse_httpStatus,++    -- ** GetLink+    getLink_identifier,+    getLinkResponse_arn,+    getLinkResponse_id,+    getLinkResponse_label,+    getLinkResponse_labelTemplate,+    getLinkResponse_resourceTypes,+    getLinkResponse_sinkArn,+    getLinkResponse_tags,+    getLinkResponse_httpStatus,++    -- ** GetSink+    getSink_identifier,+    getSinkResponse_arn,+    getSinkResponse_id,+    getSinkResponse_name,+    getSinkResponse_tags,+    getSinkResponse_httpStatus,++    -- ** GetSinkPolicy+    getSinkPolicy_sinkIdentifier,+    getSinkPolicyResponse_policy,+    getSinkPolicyResponse_sinkArn,+    getSinkPolicyResponse_sinkId,+    getSinkPolicyResponse_httpStatus,++    -- ** ListAttachedLinks+    listAttachedLinks_maxResults,+    listAttachedLinks_nextToken,+    listAttachedLinks_sinkIdentifier,+    listAttachedLinksResponse_nextToken,+    listAttachedLinksResponse_httpStatus,+    listAttachedLinksResponse_items,++    -- ** ListLinks+    listLinks_maxResults,+    listLinks_nextToken,+    listLinksResponse_nextToken,+    listLinksResponse_httpStatus,+    listLinksResponse_items,++    -- ** ListSinks+    listSinks_maxResults,+    listSinks_nextToken,+    listSinksResponse_nextToken,+    listSinksResponse_httpStatus,+    listSinksResponse_items,++    -- ** ListTagsForResource+    listTagsForResource_resourceArn,+    listTagsForResourceResponse_tags,+    listTagsForResourceResponse_httpStatus,++    -- ** PutSinkPolicy+    putSinkPolicy_sinkIdentifier,+    putSinkPolicy_policy,+    putSinkPolicyResponse_policy,+    putSinkPolicyResponse_sinkArn,+    putSinkPolicyResponse_sinkId,+    putSinkPolicyResponse_httpStatus,++    -- ** TagResource+    tagResource_resourceArn,+    tagResource_tags,+    tagResourceResponse_httpStatus,++    -- ** UntagResource+    untagResource_resourceArn,+    untagResource_tagKeys,+    untagResourceResponse_httpStatus,++    -- ** UpdateLink+    updateLink_identifier,+    updateLink_resourceTypes,+    updateLinkResponse_arn,+    updateLinkResponse_id,+    updateLinkResponse_label,+    updateLinkResponse_labelTemplate,+    updateLinkResponse_resourceTypes,+    updateLinkResponse_sinkArn,+    updateLinkResponse_tags,+    updateLinkResponse_httpStatus,++    -- * Types++    -- ** ListAttachedLinksItem+    listAttachedLinksItem_label,+    listAttachedLinksItem_linkArn,+    listAttachedLinksItem_resourceTypes,++    -- ** ListLinksItem+    listLinksItem_arn,+    listLinksItem_id,+    listLinksItem_label,+    listLinksItem_resourceTypes,+    listLinksItem_sinkArn,++    -- ** ListSinksItem+    listSinksItem_arn,+    listSinksItem_id,+    listSinksItem_name,+  )+where++import Amazonka.OAM.CreateLink+import Amazonka.OAM.CreateSink+import Amazonka.OAM.DeleteLink+import Amazonka.OAM.DeleteSink+import Amazonka.OAM.GetLink+import Amazonka.OAM.GetSink+import Amazonka.OAM.GetSinkPolicy+import Amazonka.OAM.ListAttachedLinks+import Amazonka.OAM.ListLinks+import Amazonka.OAM.ListSinks+import Amazonka.OAM.ListTagsForResource+import Amazonka.OAM.PutSinkPolicy+import Amazonka.OAM.TagResource+import Amazonka.OAM.Types.ListAttachedLinksItem+import Amazonka.OAM.Types.ListLinksItem+import Amazonka.OAM.Types.ListSinksItem+import Amazonka.OAM.UntagResource+import Amazonka.OAM.UpdateLink
+ gen/Amazonka/OAM/ListAttachedLinks.hs view
@@ -0,0 +1,243 @@+{-# 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.OAM.ListAttachedLinks+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of source account links that are linked to this+-- monitoring account sink.+--+-- To use this operation, provide the sink ARN. To retrieve a list of sink+-- ARNs, use+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html ListSinks>.+--+-- To find a list of links for one source account, use+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html ListLinks>.+--+-- This operation returns paginated results.+module Amazonka.OAM.ListAttachedLinks+  ( -- * Creating a Request+    ListAttachedLinks (..),+    newListAttachedLinks,++    -- * Request Lenses+    listAttachedLinks_maxResults,+    listAttachedLinks_nextToken,+    listAttachedLinks_sinkIdentifier,++    -- * Destructuring the Response+    ListAttachedLinksResponse (..),+    newListAttachedLinksResponse,++    -- * Response Lenses+    listAttachedLinksResponse_nextToken,+    listAttachedLinksResponse_httpStatus,+    listAttachedLinksResponse_items,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListAttachedLinks' smart constructor.+data ListAttachedLinks = ListAttachedLinks'+  { -- | Limits the number of returned links to the specified number.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token for the next set of items to return. You received this token+    -- from a previous call.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The ARN of the sink that you want to retrieve links for.+    sinkIdentifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListAttachedLinks' with all optional fields 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', 'listAttachedLinks_maxResults' - Limits the number of returned links to the specified number.+--+-- 'nextToken', 'listAttachedLinks_nextToken' - The token for the next set of items to return. You received this token+-- from a previous call.+--+-- 'sinkIdentifier', 'listAttachedLinks_sinkIdentifier' - The ARN of the sink that you want to retrieve links for.+newListAttachedLinks ::+  -- | 'sinkIdentifier'+  Prelude.Text ->+  ListAttachedLinks+newListAttachedLinks pSinkIdentifier_ =+  ListAttachedLinks'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      sinkIdentifier = pSinkIdentifier_+    }++-- | Limits the number of returned links to the specified number.+listAttachedLinks_maxResults :: Lens.Lens' ListAttachedLinks (Prelude.Maybe Prelude.Natural)+listAttachedLinks_maxResults = Lens.lens (\ListAttachedLinks' {maxResults} -> maxResults) (\s@ListAttachedLinks' {} a -> s {maxResults = a} :: ListAttachedLinks)++-- | The token for the next set of items to return. You received this token+-- from a previous call.+listAttachedLinks_nextToken :: Lens.Lens' ListAttachedLinks (Prelude.Maybe Prelude.Text)+listAttachedLinks_nextToken = Lens.lens (\ListAttachedLinks' {nextToken} -> nextToken) (\s@ListAttachedLinks' {} a -> s {nextToken = a} :: ListAttachedLinks)++-- | The ARN of the sink that you want to retrieve links for.+listAttachedLinks_sinkIdentifier :: Lens.Lens' ListAttachedLinks Prelude.Text+listAttachedLinks_sinkIdentifier = Lens.lens (\ListAttachedLinks' {sinkIdentifier} -> sinkIdentifier) (\s@ListAttachedLinks' {} a -> s {sinkIdentifier = a} :: ListAttachedLinks)++instance Core.AWSPager ListAttachedLinks where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listAttachedLinksResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        (rs Lens.^. listAttachedLinksResponse_items) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listAttachedLinks_nextToken+          Lens..~ rs+          Lens.^? listAttachedLinksResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListAttachedLinks where+  type+    AWSResponse ListAttachedLinks =+      ListAttachedLinksResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListAttachedLinksResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..?> "Items" Core..!@ Prelude.mempty)+      )++instance Prelude.Hashable ListAttachedLinks where+  hashWithSalt _salt ListAttachedLinks' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` sinkIdentifier++instance Prelude.NFData ListAttachedLinks where+  rnf ListAttachedLinks' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf sinkIdentifier++instance Data.ToHeaders ListAttachedLinks where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListAttachedLinks where+  toJSON ListAttachedLinks' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("MaxResults" Data..=) Prelude.<$> maxResults,+            ("NextToken" Data..=) Prelude.<$> nextToken,+            Prelude.Just+              ("SinkIdentifier" Data..= sinkIdentifier)+          ]+      )++instance Data.ToPath ListAttachedLinks where+  toPath = Prelude.const "/ListAttachedLinks"++instance Data.ToQuery ListAttachedLinks where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListAttachedLinksResponse' smart constructor.+data ListAttachedLinksResponse = ListAttachedLinksResponse'+  { -- | The token to use when requesting the next set of links.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | An array of structures that contain the information about the attached+    -- links.+    items :: [ListAttachedLinksItem]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListAttachedLinksResponse' with all optional fields 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', 'listAttachedLinksResponse_nextToken' - The token to use when requesting the next set of links.+--+-- 'httpStatus', 'listAttachedLinksResponse_httpStatus' - The response's http status code.+--+-- 'items', 'listAttachedLinksResponse_items' - An array of structures that contain the information about the attached+-- links.+newListAttachedLinksResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListAttachedLinksResponse+newListAttachedLinksResponse pHttpStatus_ =+  ListAttachedLinksResponse'+    { nextToken =+        Prelude.Nothing,+      httpStatus = pHttpStatus_,+      items = Prelude.mempty+    }++-- | The token to use when requesting the next set of links.+listAttachedLinksResponse_nextToken :: Lens.Lens' ListAttachedLinksResponse (Prelude.Maybe Prelude.Text)+listAttachedLinksResponse_nextToken = Lens.lens (\ListAttachedLinksResponse' {nextToken} -> nextToken) (\s@ListAttachedLinksResponse' {} a -> s {nextToken = a} :: ListAttachedLinksResponse)++-- | The response's http status code.+listAttachedLinksResponse_httpStatus :: Lens.Lens' ListAttachedLinksResponse Prelude.Int+listAttachedLinksResponse_httpStatus = Lens.lens (\ListAttachedLinksResponse' {httpStatus} -> httpStatus) (\s@ListAttachedLinksResponse' {} a -> s {httpStatus = a} :: ListAttachedLinksResponse)++-- | An array of structures that contain the information about the attached+-- links.+listAttachedLinksResponse_items :: Lens.Lens' ListAttachedLinksResponse [ListAttachedLinksItem]+listAttachedLinksResponse_items = Lens.lens (\ListAttachedLinksResponse' {items} -> items) (\s@ListAttachedLinksResponse' {} a -> s {items = a} :: ListAttachedLinksResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListAttachedLinksResponse where+  rnf ListAttachedLinksResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf items
+ gen/Amazonka/OAM/ListLinks.hs view
@@ -0,0 +1,220 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.OAM.ListLinks+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Use this operation in a source account to return a list of links to+-- monitoring account sinks that this source account has.+--+-- To find a list of links for one monitoring account sink, use+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListAttachedLinks.html ListAttachedLinks>+-- from within the monitoring account.+--+-- This operation returns paginated results.+module Amazonka.OAM.ListLinks+  ( -- * Creating a Request+    ListLinks (..),+    newListLinks,++    -- * Request Lenses+    listLinks_maxResults,+    listLinks_nextToken,++    -- * Destructuring the Response+    ListLinksResponse (..),+    newListLinksResponse,++    -- * Response Lenses+    listLinksResponse_nextToken,+    listLinksResponse_httpStatus,+    listLinksResponse_items,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListLinks' smart constructor.+data ListLinks = ListLinks'+  { -- | Limits the number of returned links to the specified number.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token for the next set of items to return. You received this token+    -- from a previous call.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListLinks' with all optional fields 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', 'listLinks_maxResults' - Limits the number of returned links to the specified number.+--+-- 'nextToken', 'listLinks_nextToken' - The token for the next set of items to return. You received this token+-- from a previous call.+newListLinks ::+  ListLinks+newListLinks =+  ListLinks'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | Limits the number of returned links to the specified number.+listLinks_maxResults :: Lens.Lens' ListLinks (Prelude.Maybe Prelude.Natural)+listLinks_maxResults = Lens.lens (\ListLinks' {maxResults} -> maxResults) (\s@ListLinks' {} a -> s {maxResults = a} :: ListLinks)++-- | The token for the next set of items to return. You received this token+-- from a previous call.+listLinks_nextToken :: Lens.Lens' ListLinks (Prelude.Maybe Prelude.Text)+listLinks_nextToken = Lens.lens (\ListLinks' {nextToken} -> nextToken) (\s@ListLinks' {} a -> s {nextToken = a} :: ListLinks)++instance Core.AWSPager ListLinks where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listLinksResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop (rs Lens.^. listLinksResponse_items) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listLinks_nextToken+          Lens..~ rs+          Lens.^? listLinksResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListLinks where+  type AWSResponse ListLinks = ListLinksResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListLinksResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..?> "Items" Core..!@ Prelude.mempty)+      )++instance Prelude.Hashable ListLinks where+  hashWithSalt _salt ListLinks' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListLinks where+  rnf ListLinks' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListLinks where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListLinks where+  toJSON ListLinks' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("MaxResults" Data..=) Prelude.<$> maxResults,+            ("NextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath ListLinks where+  toPath = Prelude.const "/ListLinks"++instance Data.ToQuery ListLinks where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListLinksResponse' smart constructor.+data ListLinksResponse = ListLinksResponse'+  { -- | The token to use when requesting the next set of links.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | An array of structures that contain the information about the returned+    -- links.+    items :: [ListLinksItem]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListLinksResponse' with all optional fields 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', 'listLinksResponse_nextToken' - The token to use when requesting the next set of links.+--+-- 'httpStatus', 'listLinksResponse_httpStatus' - The response's http status code.+--+-- 'items', 'listLinksResponse_items' - An array of structures that contain the information about the returned+-- links.+newListLinksResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListLinksResponse+newListLinksResponse pHttpStatus_ =+  ListLinksResponse'+    { nextToken = Prelude.Nothing,+      httpStatus = pHttpStatus_,+      items = Prelude.mempty+    }++-- | The token to use when requesting the next set of links.+listLinksResponse_nextToken :: Lens.Lens' ListLinksResponse (Prelude.Maybe Prelude.Text)+listLinksResponse_nextToken = Lens.lens (\ListLinksResponse' {nextToken} -> nextToken) (\s@ListLinksResponse' {} a -> s {nextToken = a} :: ListLinksResponse)++-- | The response's http status code.+listLinksResponse_httpStatus :: Lens.Lens' ListLinksResponse Prelude.Int+listLinksResponse_httpStatus = Lens.lens (\ListLinksResponse' {httpStatus} -> httpStatus) (\s@ListLinksResponse' {} a -> s {httpStatus = a} :: ListLinksResponse)++-- | An array of structures that contain the information about the returned+-- links.+listLinksResponse_items :: Lens.Lens' ListLinksResponse [ListLinksItem]+listLinksResponse_items = Lens.lens (\ListLinksResponse' {items} -> items) (\s@ListLinksResponse' {} a -> s {items = a} :: ListLinksResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListLinksResponse where+  rnf ListLinksResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf items
+ gen/Amazonka/OAM/ListSinks.hs view
@@ -0,0 +1,216 @@+{-# 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.OAM.ListSinks+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Use this operation in a monitoring account to return the list of sinks+-- created in that account.+--+-- This operation returns paginated results.+module Amazonka.OAM.ListSinks+  ( -- * Creating a Request+    ListSinks (..),+    newListSinks,++    -- * Request Lenses+    listSinks_maxResults,+    listSinks_nextToken,++    -- * Destructuring the Response+    ListSinksResponse (..),+    newListSinksResponse,++    -- * Response Lenses+    listSinksResponse_nextToken,+    listSinksResponse_httpStatus,+    listSinksResponse_items,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListSinks' smart constructor.+data ListSinks = ListSinks'+  { -- | Limits the number of returned links to the specified number.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token for the next set of items to return. You received this token+    -- from a previous call.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSinks' with all optional fields 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', 'listSinks_maxResults' - Limits the number of returned links to the specified number.+--+-- 'nextToken', 'listSinks_nextToken' - The token for the next set of items to return. You received this token+-- from a previous call.+newListSinks ::+  ListSinks+newListSinks =+  ListSinks'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | Limits the number of returned links to the specified number.+listSinks_maxResults :: Lens.Lens' ListSinks (Prelude.Maybe Prelude.Natural)+listSinks_maxResults = Lens.lens (\ListSinks' {maxResults} -> maxResults) (\s@ListSinks' {} a -> s {maxResults = a} :: ListSinks)++-- | The token for the next set of items to return. You received this token+-- from a previous call.+listSinks_nextToken :: Lens.Lens' ListSinks (Prelude.Maybe Prelude.Text)+listSinks_nextToken = Lens.lens (\ListSinks' {nextToken} -> nextToken) (\s@ListSinks' {} a -> s {nextToken = a} :: ListSinks)++instance Core.AWSPager ListSinks where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listSinksResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop (rs Lens.^. listSinksResponse_items) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listSinks_nextToken+          Lens..~ rs+          Lens.^? listSinksResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListSinks where+  type AWSResponse ListSinks = ListSinksResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListSinksResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..?> "Items" Core..!@ Prelude.mempty)+      )++instance Prelude.Hashable ListSinks where+  hashWithSalt _salt ListSinks' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListSinks where+  rnf ListSinks' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListSinks where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListSinks where+  toJSON ListSinks' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("MaxResults" Data..=) Prelude.<$> maxResults,+            ("NextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath ListSinks where+  toPath = Prelude.const "/ListSinks"++instance Data.ToQuery ListSinks where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListSinksResponse' smart constructor.+data ListSinksResponse = ListSinksResponse'+  { -- | The token to use when requesting the next set of sinks.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | An array of structures that contain the information about the returned+    -- sinks.+    items :: [ListSinksItem]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSinksResponse' with all optional fields 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', 'listSinksResponse_nextToken' - The token to use when requesting the next set of sinks.+--+-- 'httpStatus', 'listSinksResponse_httpStatus' - The response's http status code.+--+-- 'items', 'listSinksResponse_items' - An array of structures that contain the information about the returned+-- sinks.+newListSinksResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListSinksResponse+newListSinksResponse pHttpStatus_ =+  ListSinksResponse'+    { nextToken = Prelude.Nothing,+      httpStatus = pHttpStatus_,+      items = Prelude.mempty+    }++-- | The token to use when requesting the next set of sinks.+listSinksResponse_nextToken :: Lens.Lens' ListSinksResponse (Prelude.Maybe Prelude.Text)+listSinksResponse_nextToken = Lens.lens (\ListSinksResponse' {nextToken} -> nextToken) (\s@ListSinksResponse' {} a -> s {nextToken = a} :: ListSinksResponse)++-- | The response's http status code.+listSinksResponse_httpStatus :: Lens.Lens' ListSinksResponse Prelude.Int+listSinksResponse_httpStatus = Lens.lens (\ListSinksResponse' {httpStatus} -> httpStatus) (\s@ListSinksResponse' {} a -> s {httpStatus = a} :: ListSinksResponse)++-- | An array of structures that contain the information about the returned+-- sinks.+listSinksResponse_items :: Lens.Lens' ListSinksResponse [ListSinksItem]+listSinksResponse_items = Lens.lens (\ListSinksResponse' {items} -> items) (\s@ListSinksResponse' {} a -> s {items = a} :: ListSinksResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListSinksResponse where+  rnf ListSinksResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf items
+ gen/Amazonka/OAM/ListTagsForResource.hs view
@@ -0,0 +1,202 @@+{-# 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.OAM.ListTagsForResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Displays the tags associated with a resource. Both sinks and links+-- support tagging.+module Amazonka.OAM.ListTagsForResource+  ( -- * Creating a Request+    ListTagsForResource (..),+    newListTagsForResource,++    -- * Request Lenses+    listTagsForResource_resourceArn,++    -- * Destructuring the Response+    ListTagsForResourceResponse (..),+    newListTagsForResourceResponse,++    -- * Response Lenses+    listTagsForResourceResponse_tags,+    listTagsForResourceResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+  { -- | The ARN of the resource that you want to view tags for.+    --+    -- The ARN format of a sink is+    -- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:sink\/@/@sink-id@/@ @+    --+    -- The ARN format of a link is+    -- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:link\/@/@link-id@/@ @+    --+    -- For more information about ARN format, see+    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html CloudWatch Logs resources and operations>.+    --+    -- Unlike tagging permissions in other Amazon Web Services services, to+    -- retrieve the list of tags for links or sinks you must have the+    -- @oam:RequestTag@ permission. The @aws:ReguestTag@ permission does not+    -- allow you to tag and untag links and sinks.+    resourceArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'listTagsForResource_resourceArn' - The ARN of the resource that you want to view tags for.+--+-- The ARN format of a sink is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:sink\/@/@sink-id@/@ @+--+-- The ARN format of a link is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:link\/@/@link-id@/@ @+--+-- For more information about ARN format, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html CloudWatch Logs resources and operations>.+--+-- Unlike tagging permissions in other Amazon Web Services services, to+-- retrieve the list of tags for links or sinks you must have the+-- @oam:RequestTag@ permission. The @aws:ReguestTag@ permission does not+-- allow you to tag and untag links and sinks.+newListTagsForResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  ListTagsForResource+newListTagsForResource pResourceArn_ =+  ListTagsForResource' {resourceArn = pResourceArn_}++-- | The ARN of the resource that you want to view tags for.+--+-- The ARN format of a sink is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:sink\/@/@sink-id@/@ @+--+-- The ARN format of a link is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:link\/@/@link-id@/@ @+--+-- For more information about ARN format, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html CloudWatch Logs resources and operations>.+--+-- Unlike tagging permissions in other Amazon Web Services services, to+-- retrieve the list of tags for links or sinks you must have the+-- @oam:RequestTag@ permission. The @aws:ReguestTag@ permission does not+-- allow you to tag and untag links and sinks.+listTagsForResource_resourceArn :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_resourceArn = Lens.lens (\ListTagsForResource' {resourceArn} -> resourceArn) (\s@ListTagsForResource' {} a -> s {resourceArn = a} :: ListTagsForResource)++instance Core.AWSRequest ListTagsForResource where+  type+    AWSResponse ListTagsForResource =+      ListTagsForResourceResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListTagsForResourceResponse'+            Prelude.<$> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListTagsForResource where+  hashWithSalt _salt ListTagsForResource' {..} =+    _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTagsForResource where+  rnf ListTagsForResource' {..} =+    Prelude.rnf resourceArn++instance Data.ToHeaders ListTagsForResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath ListTagsForResource where+  toPath ListTagsForResource' {..} =+    Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery ListTagsForResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+  { -- | The list of tags associated with the requested resource.>+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'listTagsForResourceResponse_tags' - The list of tags associated with the requested resource.>+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+  ListTagsForResourceResponse'+    { tags =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The list of tags associated with the requested resource.>+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTagsForResourceResponse_httpStatus :: Lens.Lens' ListTagsForResourceResponse Prelude.Int+listTagsForResourceResponse_httpStatus = Lens.lens (\ListTagsForResourceResponse' {httpStatus} -> httpStatus) (\s@ListTagsForResourceResponse' {} a -> s {httpStatus = a} :: ListTagsForResourceResponse)++instance Prelude.NFData ListTagsForResourceResponse where+  rnf ListTagsForResourceResponse' {..} =+    Prelude.rnf tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/OAM/PutSinkPolicy.hs view
@@ -0,0 +1,247 @@+{-# 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.OAM.PutSinkPolicy+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates or updates the resource policy that grants permissions to source+-- accounts to link to the monitoring account sink. When you create a sink+-- policy, you can grant permissions to all accounts in an organization or+-- to individual accounts.+--+-- You can also use a sink policy to limit the types of data that is+-- shared. The three types that you can allow or deny are:+--+-- -   __Metrics__ - Specify with @AWS::CloudWatch::Metric@+--+-- -   __Log groups__ - Specify with @AWS::Logs::LogGroup@+--+-- -   __Traces__ - Specify with @AWS::XRay::Trace@+--+-- See the examples in this section to see how to specify permitted source+-- accounts and data types.+module Amazonka.OAM.PutSinkPolicy+  ( -- * Creating a Request+    PutSinkPolicy (..),+    newPutSinkPolicy,++    -- * Request Lenses+    putSinkPolicy_sinkIdentifier,+    putSinkPolicy_policy,++    -- * Destructuring the Response+    PutSinkPolicyResponse (..),+    newPutSinkPolicyResponse,++    -- * Response Lenses+    putSinkPolicyResponse_policy,+    putSinkPolicyResponse_sinkArn,+    putSinkPolicyResponse_sinkId,+    putSinkPolicyResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newPutSinkPolicy' smart constructor.+data PutSinkPolicy = PutSinkPolicy'+  { -- | The ARN of the sink to attach this policy to.+    sinkIdentifier :: Prelude.Text,+    -- | The JSON policy to use. If you are updating an existing policy, the+    -- entire existing policy is replaced by what you specify here.+    --+    -- The policy must be in JSON string format with quotation marks escaped+    -- and no newlines.+    --+    -- For examples of different types of policies, see the __Examples__+    -- section on this page.+    policy :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutSinkPolicy' with all optional fields 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:+--+-- 'sinkIdentifier', 'putSinkPolicy_sinkIdentifier' - The ARN of the sink to attach this policy to.+--+-- 'policy', 'putSinkPolicy_policy' - The JSON policy to use. If you are updating an existing policy, the+-- entire existing policy is replaced by what you specify here.+--+-- The policy must be in JSON string format with quotation marks escaped+-- and no newlines.+--+-- For examples of different types of policies, see the __Examples__+-- section on this page.+newPutSinkPolicy ::+  -- | 'sinkIdentifier'+  Prelude.Text ->+  -- | 'policy'+  Prelude.Text ->+  PutSinkPolicy+newPutSinkPolicy pSinkIdentifier_ pPolicy_ =+  PutSinkPolicy'+    { sinkIdentifier = pSinkIdentifier_,+      policy = pPolicy_+    }++-- | The ARN of the sink to attach this policy to.+putSinkPolicy_sinkIdentifier :: Lens.Lens' PutSinkPolicy Prelude.Text+putSinkPolicy_sinkIdentifier = Lens.lens (\PutSinkPolicy' {sinkIdentifier} -> sinkIdentifier) (\s@PutSinkPolicy' {} a -> s {sinkIdentifier = a} :: PutSinkPolicy)++-- | The JSON policy to use. If you are updating an existing policy, the+-- entire existing policy is replaced by what you specify here.+--+-- The policy must be in JSON string format with quotation marks escaped+-- and no newlines.+--+-- For examples of different types of policies, see the __Examples__+-- section on this page.+putSinkPolicy_policy :: Lens.Lens' PutSinkPolicy Prelude.Text+putSinkPolicy_policy = Lens.lens (\PutSinkPolicy' {policy} -> policy) (\s@PutSinkPolicy' {} a -> s {policy = a} :: PutSinkPolicy)++instance Core.AWSRequest PutSinkPolicy where+  type+    AWSResponse PutSinkPolicy =+      PutSinkPolicyResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          PutSinkPolicyResponse'+            Prelude.<$> (x Data..?> "Policy")+            Prelude.<*> (x Data..?> "SinkArn")+            Prelude.<*> (x Data..?> "SinkId")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable PutSinkPolicy where+  hashWithSalt _salt PutSinkPolicy' {..} =+    _salt+      `Prelude.hashWithSalt` sinkIdentifier+      `Prelude.hashWithSalt` policy++instance Prelude.NFData PutSinkPolicy where+  rnf PutSinkPolicy' {..} =+    Prelude.rnf sinkIdentifier+      `Prelude.seq` Prelude.rnf policy++instance Data.ToHeaders PutSinkPolicy where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON PutSinkPolicy where+  toJSON PutSinkPolicy' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just+              ("SinkIdentifier" Data..= sinkIdentifier),+            Prelude.Just ("Policy" Data..= policy)+          ]+      )++instance Data.ToPath PutSinkPolicy where+  toPath = Prelude.const "/PutSinkPolicy"++instance Data.ToQuery PutSinkPolicy where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutSinkPolicyResponse' smart constructor.+data PutSinkPolicyResponse = PutSinkPolicyResponse'+  { -- | The policy that you specified.+    policy :: Prelude.Maybe Prelude.Text,+    -- | The ARN of the sink.+    sinkArn :: Prelude.Maybe Prelude.Text,+    -- | The random ID string that Amazon Web Services generated as part of the+    -- sink ARN.+    sinkId :: 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 'PutSinkPolicyResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'policy', 'putSinkPolicyResponse_policy' - The policy that you specified.+--+-- 'sinkArn', 'putSinkPolicyResponse_sinkArn' - The ARN of the sink.+--+-- 'sinkId', 'putSinkPolicyResponse_sinkId' - The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+--+-- 'httpStatus', 'putSinkPolicyResponse_httpStatus' - The response's http status code.+newPutSinkPolicyResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  PutSinkPolicyResponse+newPutSinkPolicyResponse pHttpStatus_ =+  PutSinkPolicyResponse'+    { policy = Prelude.Nothing,+      sinkArn = Prelude.Nothing,+      sinkId = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The policy that you specified.+putSinkPolicyResponse_policy :: Lens.Lens' PutSinkPolicyResponse (Prelude.Maybe Prelude.Text)+putSinkPolicyResponse_policy = Lens.lens (\PutSinkPolicyResponse' {policy} -> policy) (\s@PutSinkPolicyResponse' {} a -> s {policy = a} :: PutSinkPolicyResponse)++-- | The ARN of the sink.+putSinkPolicyResponse_sinkArn :: Lens.Lens' PutSinkPolicyResponse (Prelude.Maybe Prelude.Text)+putSinkPolicyResponse_sinkArn = Lens.lens (\PutSinkPolicyResponse' {sinkArn} -> sinkArn) (\s@PutSinkPolicyResponse' {} a -> s {sinkArn = a} :: PutSinkPolicyResponse)++-- | The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+putSinkPolicyResponse_sinkId :: Lens.Lens' PutSinkPolicyResponse (Prelude.Maybe Prelude.Text)+putSinkPolicyResponse_sinkId = Lens.lens (\PutSinkPolicyResponse' {sinkId} -> sinkId) (\s@PutSinkPolicyResponse' {} a -> s {sinkId = a} :: PutSinkPolicyResponse)++-- | The response's http status code.+putSinkPolicyResponse_httpStatus :: Lens.Lens' PutSinkPolicyResponse Prelude.Int+putSinkPolicyResponse_httpStatus = Lens.lens (\PutSinkPolicyResponse' {httpStatus} -> httpStatus) (\s@PutSinkPolicyResponse' {} a -> s {httpStatus = a} :: PutSinkPolicyResponse)++instance Prelude.NFData PutSinkPolicyResponse where+  rnf PutSinkPolicyResponse' {..} =+    Prelude.rnf policy+      `Prelude.seq` Prelude.rnf sinkArn+      `Prelude.seq` Prelude.rnf sinkId+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/OAM/TagResource.hs view
@@ -0,0 +1,211 @@+{-# 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.OAM.TagResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Assigns one or more tags (key-value pairs) to the specified resource.+-- Both sinks and links can be tagged.+--+-- Tags can help you organize and categorize your resources. You can also+-- use them to scope user permissions by granting a user permission to+-- access or change only resources with certain tag values.+--+-- Tags don\'t have any semantic meaning to Amazon Web Services and are+-- interpreted strictly as strings of characters.+--+-- You can use the @TagResource@ action with a resource that already has+-- tags. If you specify a new tag key for the alarm, this tag is appended+-- to the list of tags associated with the alarm. If you specify a tag key+-- that is already associated with the alarm, the new tag value that you+-- specify replaces the previous value for that tag.+--+-- You can associate as many as 50 tags with a resource.+--+-- Unlike tagging permissions in other Amazon Web Services services, to tag+-- or untag links and sinks you must have the @oam:ResourceTag@ permission.+-- The @iam:ResourceTag@ permission does not allow you to tag and untag+-- links and sinks.+module Amazonka.OAM.TagResource+  ( -- * Creating a Request+    TagResource (..),+    newTagResource,++    -- * Request Lenses+    tagResource_resourceArn,+    tagResource_tags,++    -- * Destructuring the Response+    TagResourceResponse (..),+    newTagResourceResponse,++    -- * Response Lenses+    tagResourceResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+  { -- | The ARN of the resource that you\'re adding tags to.+    --+    -- The ARN format of a sink is+    -- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:sink\/@/@sink-id@/@ @+    --+    -- The ARN format of a link is+    -- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:link\/@/@link-id@/@ @+    --+    -- For more information about ARN format, see+    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html CloudWatch Logs resources and operations>.+    resourceArn :: Prelude.Text,+    -- | The list of key-value pairs to associate with the resource.+    tags :: Prelude.HashMap Prelude.Text Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'tagResource_resourceArn' - The ARN of the resource that you\'re adding tags to.+--+-- The ARN format of a sink is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:sink\/@/@sink-id@/@ @+--+-- The ARN format of a link is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:link\/@/@link-id@/@ @+--+-- For more information about ARN format, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html CloudWatch Logs resources and operations>.+--+-- 'tags', 'tagResource_tags' - The list of key-value pairs to associate with the resource.+newTagResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  TagResource+newTagResource pResourceArn_ =+  TagResource'+    { resourceArn = pResourceArn_,+      tags = Prelude.mempty+    }++-- | The ARN of the resource that you\'re adding tags to.+--+-- The ARN format of a sink is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:sink\/@/@sink-id@/@ @+--+-- The ARN format of a link is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:link\/@/@link-id@/@ @+--+-- For more information about ARN format, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html CloudWatch Logs resources and operations>.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | The list of key-value pairs to associate with the resource.+tagResource_tags :: Lens.Lens' TagResource (Prelude.HashMap Prelude.Text Prelude.Text)+tagResource_tags = Lens.lens (\TagResource' {tags} -> tags) (\s@TagResource' {} a -> s {tags = a} :: TagResource) Prelude.. Lens.coerced++instance Core.AWSRequest TagResource where+  type AWSResponse TagResource = TagResourceResponse+  request overrides =+    Request.putJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          TagResourceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable TagResource where+  hashWithSalt _salt TagResource' {..} =+    _salt+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+  rnf TagResource' {..} =+    Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders TagResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON TagResource where+  toJSON TagResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("Tags" Data..= tags)]+      )++instance Data.ToPath TagResource where+  toPath TagResource' {..} =+    Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery TagResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'tagResourceResponse_httpStatus' - The response's http status code.+newTagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  TagResourceResponse+newTagResourceResponse pHttpStatus_ =+  TagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+tagResourceResponse_httpStatus :: Lens.Lens' TagResourceResponse Prelude.Int+tagResourceResponse_httpStatus = Lens.lens (\TagResourceResponse' {httpStatus} -> httpStatus) (\s@TagResourceResponse' {} a -> s {httpStatus = a} :: TagResourceResponse)++instance Prelude.NFData TagResourceResponse where+  rnf TagResourceResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/OAM/Types.hs view
@@ -0,0 +1,199 @@+{-# 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.OAM.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.OAM.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _ConflictException,+    _InternalServiceFault,+    _InvalidParameterException,+    _MissingRequiredParameterException,+    _ResourceNotFoundException,+    _ServiceQuotaExceededException,+    _TooManyTagsException,+    _ValidationException,++    -- * ResourceType+    ResourceType (..),++    -- * ListAttachedLinksItem+    ListAttachedLinksItem (..),+    newListAttachedLinksItem,+    listAttachedLinksItem_label,+    listAttachedLinksItem_linkArn,+    listAttachedLinksItem_resourceTypes,++    -- * ListLinksItem+    ListLinksItem (..),+    newListLinksItem,+    listLinksItem_arn,+    listLinksItem_id,+    listLinksItem_label,+    listLinksItem_resourceTypes,+    listLinksItem_sinkArn,++    -- * ListSinksItem+    ListSinksItem (..),+    newListSinksItem,+    listSinksItem_arn,+    listSinksItem_id,+    listSinksItem_name,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import Amazonka.OAM.Types.ListAttachedLinksItem+import Amazonka.OAM.Types.ListLinksItem+import Amazonka.OAM.Types.ListSinksItem+import Amazonka.OAM.Types.ResourceType+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2022-06-10@ of the Amazon CloudWatch Observability Access Manager SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "OAM",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "oam",+      Core.signingName = "oam",+      Core.version = "2022-06-10",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseJSONError "OAM",+      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++-- | A resource was in an inconsistent state during an update or a deletion.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+  Core._MatchServiceError+    defaultService+    "ConflictException"+    Prelude.. Core.hasStatus 409++-- | Unexpected error while processing the request. Retry the request.+_InternalServiceFault :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServiceFault =+  Core._MatchServiceError+    defaultService+    "InternalServiceFault"+    Prelude.. Core.hasStatus 500++-- | A parameter is specified incorrectly.+_InvalidParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidParameterException =+  Core._MatchServiceError+    defaultService+    "InvalidParameterException"+    Prelude.. Core.hasStatus 400++-- | A required parameter is missing from the request.+_MissingRequiredParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_MissingRequiredParameterException =+  Core._MatchServiceError+    defaultService+    "MissingRequiredParameterException"+    Prelude.. Core.hasStatus 400++-- | The request references a resource that does not exist.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceNotFoundException"+    Prelude.. Core.hasStatus 404++-- | The request would cause a service quota to be exceeded.+_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+  Core._MatchServiceError+    defaultService+    "ServiceQuotaExceededException"+    Prelude.. Core.hasStatus 429++-- | A resource can have no more than 50 tags.+_TooManyTagsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TooManyTagsException =+  Core._MatchServiceError+    defaultService+    "TooManyTagsException"+    Prelude.. Core.hasStatus 400++-- | The value of a parameter in the request caused an error.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+  Core._MatchServiceError+    defaultService+    "ValidationException"+    Prelude.. Core.hasStatus 400
+ gen/Amazonka/OAM/Types/ListAttachedLinksItem.hs view
@@ -0,0 +1,100 @@+{-# 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.OAM.Types.ListAttachedLinksItem+-- 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.OAM.Types.ListAttachedLinksItem where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that contains information about one link attached to this+-- monitoring account sink.+--+-- /See:/ 'newListAttachedLinksItem' smart constructor.+data ListAttachedLinksItem = ListAttachedLinksItem'+  { -- | The label that was assigned to this link at creation, with the variables+    -- resolved to their actual values.+    label :: Prelude.Maybe Prelude.Text,+    -- | The ARN of the link.+    linkArn :: Prelude.Maybe Prelude.Text,+    -- | The resource types supported by this link.+    resourceTypes :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListAttachedLinksItem' with all optional fields 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:+--+-- 'label', 'listAttachedLinksItem_label' - The label that was assigned to this link at creation, with the variables+-- resolved to their actual values.+--+-- 'linkArn', 'listAttachedLinksItem_linkArn' - The ARN of the link.+--+-- 'resourceTypes', 'listAttachedLinksItem_resourceTypes' - The resource types supported by this link.+newListAttachedLinksItem ::+  ListAttachedLinksItem+newListAttachedLinksItem =+  ListAttachedLinksItem'+    { label = Prelude.Nothing,+      linkArn = Prelude.Nothing,+      resourceTypes = Prelude.Nothing+    }++-- | The label that was assigned to this link at creation, with the variables+-- resolved to their actual values.+listAttachedLinksItem_label :: Lens.Lens' ListAttachedLinksItem (Prelude.Maybe Prelude.Text)+listAttachedLinksItem_label = Lens.lens (\ListAttachedLinksItem' {label} -> label) (\s@ListAttachedLinksItem' {} a -> s {label = a} :: ListAttachedLinksItem)++-- | The ARN of the link.+listAttachedLinksItem_linkArn :: Lens.Lens' ListAttachedLinksItem (Prelude.Maybe Prelude.Text)+listAttachedLinksItem_linkArn = Lens.lens (\ListAttachedLinksItem' {linkArn} -> linkArn) (\s@ListAttachedLinksItem' {} a -> s {linkArn = a} :: ListAttachedLinksItem)++-- | The resource types supported by this link.+listAttachedLinksItem_resourceTypes :: Lens.Lens' ListAttachedLinksItem (Prelude.Maybe [Prelude.Text])+listAttachedLinksItem_resourceTypes = Lens.lens (\ListAttachedLinksItem' {resourceTypes} -> resourceTypes) (\s@ListAttachedLinksItem' {} a -> s {resourceTypes = a} :: ListAttachedLinksItem) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON ListAttachedLinksItem where+  parseJSON =+    Data.withObject+      "ListAttachedLinksItem"+      ( \x ->+          ListAttachedLinksItem'+            Prelude.<$> (x Data..:? "Label")+            Prelude.<*> (x Data..:? "LinkArn")+            Prelude.<*> (x Data..:? "ResourceTypes" Data..!= Prelude.mempty)+      )++instance Prelude.Hashable ListAttachedLinksItem where+  hashWithSalt _salt ListAttachedLinksItem' {..} =+    _salt+      `Prelude.hashWithSalt` label+      `Prelude.hashWithSalt` linkArn+      `Prelude.hashWithSalt` resourceTypes++instance Prelude.NFData ListAttachedLinksItem where+  rnf ListAttachedLinksItem' {..} =+    Prelude.rnf label+      `Prelude.seq` Prelude.rnf linkArn+      `Prelude.seq` Prelude.rnf resourceTypes
+ gen/Amazonka/OAM/Types/ListLinksItem.hs view
@@ -0,0 +1,127 @@+{-# 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.OAM.Types.ListLinksItem+-- 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.OAM.Types.ListLinksItem where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that contains information about one of this source+-- account\'s links to a monitoring account.+--+-- /See:/ 'newListLinksItem' smart constructor.+data ListLinksItem = ListLinksItem'+  { -- | The ARN of the link.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The random ID string that Amazon Web Services generated as part of the+    -- link ARN.+    id :: Prelude.Maybe Prelude.Text,+    -- | The label that was assigned to this link at creation, with the variables+    -- resolved to their actual values.+    label :: Prelude.Maybe Prelude.Text,+    -- | The resource types supported by this link.+    resourceTypes :: Prelude.Maybe [Prelude.Text],+    -- | The ARN of the sink that this link is attached to.+    sinkArn :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListLinksItem' with all optional fields 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', 'listLinksItem_arn' - The ARN of the link.+--+-- 'id', 'listLinksItem_id' - The random ID string that Amazon Web Services generated as part of the+-- link ARN.+--+-- 'label', 'listLinksItem_label' - The label that was assigned to this link at creation, with the variables+-- resolved to their actual values.+--+-- 'resourceTypes', 'listLinksItem_resourceTypes' - The resource types supported by this link.+--+-- 'sinkArn', 'listLinksItem_sinkArn' - The ARN of the sink that this link is attached to.+newListLinksItem ::+  ListLinksItem+newListLinksItem =+  ListLinksItem'+    { arn = Prelude.Nothing,+      id = Prelude.Nothing,+      label = Prelude.Nothing,+      resourceTypes = Prelude.Nothing,+      sinkArn = Prelude.Nothing+    }++-- | The ARN of the link.+listLinksItem_arn :: Lens.Lens' ListLinksItem (Prelude.Maybe Prelude.Text)+listLinksItem_arn = Lens.lens (\ListLinksItem' {arn} -> arn) (\s@ListLinksItem' {} a -> s {arn = a} :: ListLinksItem)++-- | The random ID string that Amazon Web Services generated as part of the+-- link ARN.+listLinksItem_id :: Lens.Lens' ListLinksItem (Prelude.Maybe Prelude.Text)+listLinksItem_id = Lens.lens (\ListLinksItem' {id} -> id) (\s@ListLinksItem' {} a -> s {id = a} :: ListLinksItem)++-- | The label that was assigned to this link at creation, with the variables+-- resolved to their actual values.+listLinksItem_label :: Lens.Lens' ListLinksItem (Prelude.Maybe Prelude.Text)+listLinksItem_label = Lens.lens (\ListLinksItem' {label} -> label) (\s@ListLinksItem' {} a -> s {label = a} :: ListLinksItem)++-- | The resource types supported by this link.+listLinksItem_resourceTypes :: Lens.Lens' ListLinksItem (Prelude.Maybe [Prelude.Text])+listLinksItem_resourceTypes = Lens.lens (\ListLinksItem' {resourceTypes} -> resourceTypes) (\s@ListLinksItem' {} a -> s {resourceTypes = a} :: ListLinksItem) Prelude.. Lens.mapping Lens.coerced++-- | The ARN of the sink that this link is attached to.+listLinksItem_sinkArn :: Lens.Lens' ListLinksItem (Prelude.Maybe Prelude.Text)+listLinksItem_sinkArn = Lens.lens (\ListLinksItem' {sinkArn} -> sinkArn) (\s@ListLinksItem' {} a -> s {sinkArn = a} :: ListLinksItem)++instance Data.FromJSON ListLinksItem where+  parseJSON =+    Data.withObject+      "ListLinksItem"+      ( \x ->+          ListLinksItem'+            Prelude.<$> (x Data..:? "Arn")+            Prelude.<*> (x Data..:? "Id")+            Prelude.<*> (x Data..:? "Label")+            Prelude.<*> (x Data..:? "ResourceTypes" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "SinkArn")+      )++instance Prelude.Hashable ListLinksItem where+  hashWithSalt _salt ListLinksItem' {..} =+    _salt+      `Prelude.hashWithSalt` arn+      `Prelude.hashWithSalt` id+      `Prelude.hashWithSalt` label+      `Prelude.hashWithSalt` resourceTypes+      `Prelude.hashWithSalt` sinkArn++instance Prelude.NFData ListLinksItem where+  rnf ListLinksItem' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf label+      `Prelude.seq` Prelude.rnf resourceTypes+      `Prelude.seq` Prelude.rnf sinkArn
+ gen/Amazonka/OAM/Types/ListSinksItem.hs view
@@ -0,0 +1,100 @@+{-# 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.OAM.Types.ListSinksItem+-- 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.OAM.Types.ListSinksItem where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that contains information about one of this monitoring+-- account\'s sinks.+--+-- /See:/ 'newListSinksItem' smart constructor.+data ListSinksItem = ListSinksItem'+  { -- | The ARN of the sink.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The random ID string that Amazon Web Services generated as part of the+    -- sink ARN.+    id :: Prelude.Maybe Prelude.Text,+    -- | The name of the sink.+    name :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSinksItem' with all optional fields 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', 'listSinksItem_arn' - The ARN of the sink.+--+-- 'id', 'listSinksItem_id' - The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+--+-- 'name', 'listSinksItem_name' - The name of the sink.+newListSinksItem ::+  ListSinksItem+newListSinksItem =+  ListSinksItem'+    { arn = Prelude.Nothing,+      id = Prelude.Nothing,+      name = Prelude.Nothing+    }++-- | The ARN of the sink.+listSinksItem_arn :: Lens.Lens' ListSinksItem (Prelude.Maybe Prelude.Text)+listSinksItem_arn = Lens.lens (\ListSinksItem' {arn} -> arn) (\s@ListSinksItem' {} a -> s {arn = a} :: ListSinksItem)++-- | The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+listSinksItem_id :: Lens.Lens' ListSinksItem (Prelude.Maybe Prelude.Text)+listSinksItem_id = Lens.lens (\ListSinksItem' {id} -> id) (\s@ListSinksItem' {} a -> s {id = a} :: ListSinksItem)++-- | The name of the sink.+listSinksItem_name :: Lens.Lens' ListSinksItem (Prelude.Maybe Prelude.Text)+listSinksItem_name = Lens.lens (\ListSinksItem' {name} -> name) (\s@ListSinksItem' {} a -> s {name = a} :: ListSinksItem)++instance Data.FromJSON ListSinksItem where+  parseJSON =+    Data.withObject+      "ListSinksItem"+      ( \x ->+          ListSinksItem'+            Prelude.<$> (x Data..:? "Arn")+            Prelude.<*> (x Data..:? "Id")+            Prelude.<*> (x Data..:? "Name")+      )++instance Prelude.Hashable ListSinksItem where+  hashWithSalt _salt ListSinksItem' {..} =+    _salt+      `Prelude.hashWithSalt` arn+      `Prelude.hashWithSalt` id+      `Prelude.hashWithSalt` name++instance Prelude.NFData ListSinksItem where+  rnf ListSinksItem' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf name
+ gen/Amazonka/OAM/Types/ResourceType.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.OAM.Types.ResourceType+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.OAM.Types.ResourceType+  ( ResourceType+      ( ..,+        ResourceType_AWS__CloudWatch__Metric,+        ResourceType_AWS__Logs__LogGroup,+        ResourceType_AWS__XRay__Trace+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceType = ResourceType'+  { fromResourceType ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern ResourceType_AWS__CloudWatch__Metric :: ResourceType+pattern ResourceType_AWS__CloudWatch__Metric = ResourceType' "AWS::CloudWatch::Metric"++pattern ResourceType_AWS__Logs__LogGroup :: ResourceType+pattern ResourceType_AWS__Logs__LogGroup = ResourceType' "AWS::Logs::LogGroup"++pattern ResourceType_AWS__XRay__Trace :: ResourceType+pattern ResourceType_AWS__XRay__Trace = ResourceType' "AWS::XRay::Trace"++{-# COMPLETE+  ResourceType_AWS__CloudWatch__Metric,+  ResourceType_AWS__Logs__LogGroup,+  ResourceType_AWS__XRay__Trace,+  ResourceType'+  #-}
+ gen/Amazonka/OAM/UntagResource.hs view
@@ -0,0 +1,193 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.OAM.UntagResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes one or more tags from the specified resource.+--+-- Unlike tagging permissions in other Amazon Web Services services, to tag+-- or untag links and sinks you must have the @oam:ResourceTag@ permission.+-- The @iam:TagResource@ permission does not allow you to tag and untag+-- links and sinks.+module Amazonka.OAM.UntagResource+  ( -- * Creating a Request+    UntagResource (..),+    newUntagResource,++    -- * Request Lenses+    untagResource_resourceArn,+    untagResource_tagKeys,++    -- * Destructuring the Response+    UntagResourceResponse (..),+    newUntagResourceResponse,++    -- * Response Lenses+    untagResourceResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+  { -- | The ARN of the resource that you\'re removing tags from.+    --+    -- The ARN format of a sink is+    -- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:sink\/@/@sink-id@/@ @+    --+    -- The ARN format of a link is+    -- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:link\/@/@link-id@/@ @+    --+    -- For more information about ARN format, see+    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html CloudWatch Logs resources and operations>.+    resourceArn :: Prelude.Text,+    -- | The list of tag keys to remove from the resource.+    tagKeys :: [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'untagResource_resourceArn' - The ARN of the resource that you\'re removing tags from.+--+-- The ARN format of a sink is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:sink\/@/@sink-id@/@ @+--+-- The ARN format of a link is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:link\/@/@link-id@/@ @+--+-- For more information about ARN format, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html CloudWatch Logs resources and operations>.+--+-- 'tagKeys', 'untagResource_tagKeys' - The list of tag keys to remove from the resource.+newUntagResource ::+  -- | 'resourceArn'+  Prelude.Text ->+  UntagResource+newUntagResource pResourceArn_ =+  UntagResource'+    { resourceArn = pResourceArn_,+      tagKeys = Prelude.mempty+    }++-- | The ARN of the resource that you\'re removing tags from.+--+-- The ARN format of a sink is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:sink\/@/@sink-id@/@ @+--+-- The ARN format of a link is+-- @arn:aws:oam:@/@Region@/@:@/@account-id@/@:link\/@/@link-id@/@ @+--+-- For more information about ARN format, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html CloudWatch Logs resources and operations>.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | The list of tag keys to remove from the resource.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+  type+    AWSResponse UntagResource =+      UntagResourceResponse+  request overrides =+    Request.delete (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          UntagResourceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UntagResource where+  hashWithSalt _salt UntagResource' {..} =+    _salt+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+  rnf UntagResource' {..} =+    Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf tagKeys++instance Data.ToHeaders UntagResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath UntagResource where+  toPath UntagResource' {..} =+    Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery UntagResource where+  toQuery UntagResource' {..} =+    Prelude.mconcat+      ["tagKeys" Data.=: Data.toQueryList "member" tagKeys]++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+  UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+  rnf UntagResourceResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/OAM/UpdateLink.hs view
@@ -0,0 +1,277 @@+{-# 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.OAM.UpdateLink+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Use this operation to change what types of data are shared from a source+-- account to its linked monitoring account sink. You can\'t change the+-- sink or change the monitoring account with this operation.+--+-- To update the list of tags associated with the sink, use+-- <https://docs.aws.amazon.com/OAM/latest/APIReference/API_TagResource.html TagResource>.+module Amazonka.OAM.UpdateLink+  ( -- * Creating a Request+    UpdateLink (..),+    newUpdateLink,++    -- * Request Lenses+    updateLink_identifier,+    updateLink_resourceTypes,++    -- * Destructuring the Response+    UpdateLinkResponse (..),+    newUpdateLinkResponse,++    -- * Response Lenses+    updateLinkResponse_arn,+    updateLinkResponse_id,+    updateLinkResponse_label,+    updateLinkResponse_labelTemplate,+    updateLinkResponse_resourceTypes,+    updateLinkResponse_sinkArn,+    updateLinkResponse_tags,+    updateLinkResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateLink' smart constructor.+data UpdateLink = UpdateLink'+  { -- | The ARN of the link that you want to update.+    identifier :: Prelude.Text,+    -- | An array of strings that define which types of data that the source+    -- account will send to the monitoring account.+    --+    -- Your input here replaces the current set of data types that are shared.+    resourceTypes :: Prelude.NonEmpty ResourceType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateLink' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'identifier', 'updateLink_identifier' - The ARN of the link that you want to update.+--+-- 'resourceTypes', 'updateLink_resourceTypes' - An array of strings that define which types of data that the source+-- account will send to the monitoring account.+--+-- Your input here replaces the current set of data types that are shared.+newUpdateLink ::+  -- | 'identifier'+  Prelude.Text ->+  -- | 'resourceTypes'+  Prelude.NonEmpty ResourceType ->+  UpdateLink+newUpdateLink pIdentifier_ pResourceTypes_ =+  UpdateLink'+    { identifier = pIdentifier_,+      resourceTypes = Lens.coerced Lens.# pResourceTypes_+    }++-- | The ARN of the link that you want to update.+updateLink_identifier :: Lens.Lens' UpdateLink Prelude.Text+updateLink_identifier = Lens.lens (\UpdateLink' {identifier} -> identifier) (\s@UpdateLink' {} a -> s {identifier = a} :: UpdateLink)++-- | An array of strings that define which types of data that the source+-- account will send to the monitoring account.+--+-- Your input here replaces the current set of data types that are shared.+updateLink_resourceTypes :: Lens.Lens' UpdateLink (Prelude.NonEmpty ResourceType)+updateLink_resourceTypes = Lens.lens (\UpdateLink' {resourceTypes} -> resourceTypes) (\s@UpdateLink' {} a -> s {resourceTypes = a} :: UpdateLink) Prelude.. Lens.coerced++instance Core.AWSRequest UpdateLink where+  type AWSResponse UpdateLink = UpdateLinkResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateLinkResponse'+            Prelude.<$> (x Data..?> "Arn")+            Prelude.<*> (x Data..?> "Id")+            Prelude.<*> (x Data..?> "Label")+            Prelude.<*> (x Data..?> "LabelTemplate")+            Prelude.<*> (x Data..?> "ResourceTypes" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "SinkArn")+            Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UpdateLink where+  hashWithSalt _salt UpdateLink' {..} =+    _salt+      `Prelude.hashWithSalt` identifier+      `Prelude.hashWithSalt` resourceTypes++instance Prelude.NFData UpdateLink where+  rnf UpdateLink' {..} =+    Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf resourceTypes++instance Data.ToHeaders UpdateLink where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateLink where+  toJSON UpdateLink' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("Identifier" Data..= identifier),+            Prelude.Just+              ("ResourceTypes" Data..= resourceTypes)+          ]+      )++instance Data.ToPath UpdateLink where+  toPath = Prelude.const "/UpdateLink"++instance Data.ToQuery UpdateLink where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateLinkResponse' smart constructor.+data UpdateLinkResponse = UpdateLinkResponse'+  { -- | The ARN of the link that you have updated.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The random ID string that Amazon Web Services generated as part of the+    -- sink ARN.+    id :: Prelude.Maybe Prelude.Text,+    -- | The label assigned to this link, with the variables resolved to their+    -- actual values.+    label :: Prelude.Maybe Prelude.Text,+    -- | The exact label template that was specified when the link was created,+    -- with the template variables not resolved.+    labelTemplate :: Prelude.Maybe Prelude.Text,+    -- | The resource types now supported by this link.+    resourceTypes :: Prelude.Maybe [Prelude.Text],+    -- | The ARN of the sink that is used for this link.+    sinkArn :: Prelude.Maybe Prelude.Text,+    -- | The tags assigned to the link.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateLinkResponse' with all optional fields 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', 'updateLinkResponse_arn' - The ARN of the link that you have updated.+--+-- 'id', 'updateLinkResponse_id' - The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+--+-- 'label', 'updateLinkResponse_label' - The label assigned to this link, with the variables resolved to their+-- actual values.+--+-- 'labelTemplate', 'updateLinkResponse_labelTemplate' - The exact label template that was specified when the link was created,+-- with the template variables not resolved.+--+-- 'resourceTypes', 'updateLinkResponse_resourceTypes' - The resource types now supported by this link.+--+-- 'sinkArn', 'updateLinkResponse_sinkArn' - The ARN of the sink that is used for this link.+--+-- 'tags', 'updateLinkResponse_tags' - The tags assigned to the link.+--+-- 'httpStatus', 'updateLinkResponse_httpStatus' - The response's http status code.+newUpdateLinkResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UpdateLinkResponse+newUpdateLinkResponse pHttpStatus_ =+  UpdateLinkResponse'+    { arn = Prelude.Nothing,+      id = Prelude.Nothing,+      label = Prelude.Nothing,+      labelTemplate = Prelude.Nothing,+      resourceTypes = Prelude.Nothing,+      sinkArn = Prelude.Nothing,+      tags = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The ARN of the link that you have updated.+updateLinkResponse_arn :: Lens.Lens' UpdateLinkResponse (Prelude.Maybe Prelude.Text)+updateLinkResponse_arn = Lens.lens (\UpdateLinkResponse' {arn} -> arn) (\s@UpdateLinkResponse' {} a -> s {arn = a} :: UpdateLinkResponse)++-- | The random ID string that Amazon Web Services generated as part of the+-- sink ARN.+updateLinkResponse_id :: Lens.Lens' UpdateLinkResponse (Prelude.Maybe Prelude.Text)+updateLinkResponse_id = Lens.lens (\UpdateLinkResponse' {id} -> id) (\s@UpdateLinkResponse' {} a -> s {id = a} :: UpdateLinkResponse)++-- | The label assigned to this link, with the variables resolved to their+-- actual values.+updateLinkResponse_label :: Lens.Lens' UpdateLinkResponse (Prelude.Maybe Prelude.Text)+updateLinkResponse_label = Lens.lens (\UpdateLinkResponse' {label} -> label) (\s@UpdateLinkResponse' {} a -> s {label = a} :: UpdateLinkResponse)++-- | The exact label template that was specified when the link was created,+-- with the template variables not resolved.+updateLinkResponse_labelTemplate :: Lens.Lens' UpdateLinkResponse (Prelude.Maybe Prelude.Text)+updateLinkResponse_labelTemplate = Lens.lens (\UpdateLinkResponse' {labelTemplate} -> labelTemplate) (\s@UpdateLinkResponse' {} a -> s {labelTemplate = a} :: UpdateLinkResponse)++-- | The resource types now supported by this link.+updateLinkResponse_resourceTypes :: Lens.Lens' UpdateLinkResponse (Prelude.Maybe [Prelude.Text])+updateLinkResponse_resourceTypes = Lens.lens (\UpdateLinkResponse' {resourceTypes} -> resourceTypes) (\s@UpdateLinkResponse' {} a -> s {resourceTypes = a} :: UpdateLinkResponse) Prelude.. Lens.mapping Lens.coerced++-- | The ARN of the sink that is used for this link.+updateLinkResponse_sinkArn :: Lens.Lens' UpdateLinkResponse (Prelude.Maybe Prelude.Text)+updateLinkResponse_sinkArn = Lens.lens (\UpdateLinkResponse' {sinkArn} -> sinkArn) (\s@UpdateLinkResponse' {} a -> s {sinkArn = a} :: UpdateLinkResponse)++-- | The tags assigned to the link.+updateLinkResponse_tags :: Lens.Lens' UpdateLinkResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+updateLinkResponse_tags = Lens.lens (\UpdateLinkResponse' {tags} -> tags) (\s@UpdateLinkResponse' {} a -> s {tags = a} :: UpdateLinkResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+updateLinkResponse_httpStatus :: Lens.Lens' UpdateLinkResponse Prelude.Int+updateLinkResponse_httpStatus = Lens.lens (\UpdateLinkResponse' {httpStatus} -> httpStatus) (\s@UpdateLinkResponse' {} a -> s {httpStatus = a} :: UpdateLinkResponse)++instance Prelude.NFData UpdateLinkResponse where+  rnf UpdateLinkResponse' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf id+      `Prelude.seq` Prelude.rnf label+      `Prelude.seq` Prelude.rnf labelTemplate+      `Prelude.seq` Prelude.rnf resourceTypes+      `Prelude.seq` Prelude.rnf sinkArn+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/OAM/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.OAM.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.OAM.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.OAM.Lens+import Amazonka.OAM.Types+import qualified Amazonka.Prelude as Prelude
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,23 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Main+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Main (main) where++import Test.Amazonka.OAM+import Test.Amazonka.OAM.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "OAM"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/Gen/OAM.hs view
@@ -0,0 +1,338 @@+{-# 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.OAM+-- 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.OAM where++import Amazonka.OAM+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.OAM.Internal+import Test.Amazonka.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+--     [ testGroup "request"+--         [ requestCreateLink $+--             newCreateLink+--+--         , requestCreateSink $+--             newCreateSink+--+--         , requestDeleteLink $+--             newDeleteLink+--+--         , requestDeleteSink $+--             newDeleteSink+--+--         , requestGetLink $+--             newGetLink+--+--         , requestGetSink $+--             newGetSink+--+--         , requestGetSinkPolicy $+--             newGetSinkPolicy+--+--         , requestListAttachedLinks $+--             newListAttachedLinks+--+--         , requestListLinks $+--             newListLinks+--+--         , requestListSinks $+--             newListSinks+--+--         , requestListTagsForResource $+--             newListTagsForResource+--+--         , requestPutSinkPolicy $+--             newPutSinkPolicy+--+--         , requestTagResource $+--             newTagResource+--+--         , requestUntagResource $+--             newUntagResource+--+--         , requestUpdateLink $+--             newUpdateLink+--+--           ]++--     , testGroup "response"+--         [ responseCreateLink $+--             newCreateLinkResponse+--+--         , responseCreateSink $+--             newCreateSinkResponse+--+--         , responseDeleteLink $+--             newDeleteLinkResponse+--+--         , responseDeleteSink $+--             newDeleteSinkResponse+--+--         , responseGetLink $+--             newGetLinkResponse+--+--         , responseGetSink $+--             newGetSinkResponse+--+--         , responseGetSinkPolicy $+--             newGetSinkPolicyResponse+--+--         , responseListAttachedLinks $+--             newListAttachedLinksResponse+--+--         , responseListLinks $+--             newListLinksResponse+--+--         , responseListSinks $+--             newListSinksResponse+--+--         , responseListTagsForResource $+--             newListTagsForResourceResponse+--+--         , responsePutSinkPolicy $+--             newPutSinkPolicyResponse+--+--         , responseTagResource $+--             newTagResourceResponse+--+--         , responseUntagResource $+--             newUntagResourceResponse+--+--         , responseUpdateLink $+--             newUpdateLinkResponse+--+--           ]+--     ]++-- Requests++requestCreateLink :: CreateLink -> TestTree+requestCreateLink =+  req+    "CreateLink"+    "fixture/CreateLink.yaml"++requestCreateSink :: CreateSink -> TestTree+requestCreateSink =+  req+    "CreateSink"+    "fixture/CreateSink.yaml"++requestDeleteLink :: DeleteLink -> TestTree+requestDeleteLink =+  req+    "DeleteLink"+    "fixture/DeleteLink.yaml"++requestDeleteSink :: DeleteSink -> TestTree+requestDeleteSink =+  req+    "DeleteSink"+    "fixture/DeleteSink.yaml"++requestGetLink :: GetLink -> TestTree+requestGetLink =+  req+    "GetLink"+    "fixture/GetLink.yaml"++requestGetSink :: GetSink -> TestTree+requestGetSink =+  req+    "GetSink"+    "fixture/GetSink.yaml"++requestGetSinkPolicy :: GetSinkPolicy -> TestTree+requestGetSinkPolicy =+  req+    "GetSinkPolicy"+    "fixture/GetSinkPolicy.yaml"++requestListAttachedLinks :: ListAttachedLinks -> TestTree+requestListAttachedLinks =+  req+    "ListAttachedLinks"+    "fixture/ListAttachedLinks.yaml"++requestListLinks :: ListLinks -> TestTree+requestListLinks =+  req+    "ListLinks"+    "fixture/ListLinks.yaml"++requestListSinks :: ListSinks -> TestTree+requestListSinks =+  req+    "ListSinks"+    "fixture/ListSinks.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+  req+    "ListTagsForResource"+    "fixture/ListTagsForResource.yaml"++requestPutSinkPolicy :: PutSinkPolicy -> TestTree+requestPutSinkPolicy =+  req+    "PutSinkPolicy"+    "fixture/PutSinkPolicy.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+  req+    "TagResource"+    "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+  req+    "UntagResource"+    "fixture/UntagResource.yaml"++requestUpdateLink :: UpdateLink -> TestTree+requestUpdateLink =+  req+    "UpdateLink"+    "fixture/UpdateLink.yaml"++-- Responses++responseCreateLink :: CreateLinkResponse -> TestTree+responseCreateLink =+  res+    "CreateLinkResponse"+    "fixture/CreateLinkResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateLink)++responseCreateSink :: CreateSinkResponse -> TestTree+responseCreateSink =+  res+    "CreateSinkResponse"+    "fixture/CreateSinkResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateSink)++responseDeleteLink :: DeleteLinkResponse -> TestTree+responseDeleteLink =+  res+    "DeleteLinkResponse"+    "fixture/DeleteLinkResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteLink)++responseDeleteSink :: DeleteSinkResponse -> TestTree+responseDeleteSink =+  res+    "DeleteSinkResponse"+    "fixture/DeleteSinkResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteSink)++responseGetLink :: GetLinkResponse -> TestTree+responseGetLink =+  res+    "GetLinkResponse"+    "fixture/GetLinkResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetLink)++responseGetSink :: GetSinkResponse -> TestTree+responseGetSink =+  res+    "GetSinkResponse"+    "fixture/GetSinkResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetSink)++responseGetSinkPolicy :: GetSinkPolicyResponse -> TestTree+responseGetSinkPolicy =+  res+    "GetSinkPolicyResponse"+    "fixture/GetSinkPolicyResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetSinkPolicy)++responseListAttachedLinks :: ListAttachedLinksResponse -> TestTree+responseListAttachedLinks =+  res+    "ListAttachedLinksResponse"+    "fixture/ListAttachedLinksResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListAttachedLinks)++responseListLinks :: ListLinksResponse -> TestTree+responseListLinks =+  res+    "ListLinksResponse"+    "fixture/ListLinksResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListLinks)++responseListSinks :: ListSinksResponse -> TestTree+responseListSinks =+  res+    "ListSinksResponse"+    "fixture/ListSinksResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListSinks)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+  res+    "ListTagsForResourceResponse"+    "fixture/ListTagsForResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responsePutSinkPolicy :: PutSinkPolicyResponse -> TestTree+responsePutSinkPolicy =+  res+    "PutSinkPolicyResponse"+    "fixture/PutSinkPolicyResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy PutSinkPolicy)++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)++responseUpdateLink :: UpdateLinkResponse -> TestTree+responseUpdateLink =+  res+    "UpdateLinkResponse"+    "fixture/UpdateLinkResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateLink)
+ test/Test/Amazonka/OAM.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.OAM+-- 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.OAM+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/OAM/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.OAM.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.OAM.Internal where