packages feed

amazonka-cloudcontrol (empty) → 2.0

raw patch · 42 files changed

+4856/−0 lines, 42 filesdep +amazonka-cloudcontroldep +amazonka-coredep +amazonka-test

Dependencies added: amazonka-cloudcontrol, amazonka-core, 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 Cloud Control API SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2021-09-30@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-cloudcontrol)+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.CloudControl](http://hackage.haskell.org/package/amazonka-cloudcontrol/docs/Amazonka-CloudControl.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-cloudcontrol` 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-cloudcontrol.cabal view
@@ -0,0 +1,97 @@+cabal-version:      2.2+name:               amazonka-cloudcontrol+version:            2.0+synopsis:           Amazon Cloud Control API SDK.+homepage:           https://github.com/brendanhay/amazonka+bug-reports:        https://github.com/brendanhay/amazonka/issues+license:            MPL-2.0+license-file:       LICENSE+author:             Brendan Hay+maintainer:+  Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>++copyright:          Copyright (c) 2013-2023 Brendan Hay+category:           AWS+build-type:         Simple+extra-source-files:+  fixture/*.proto+  fixture/*.yaml+  README.md+  src/.gitkeep++description:+  Derived from API version @2021-09-30@ 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.CloudControl.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.CloudControl" 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-cloudcontrol++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.CloudControl+    Amazonka.CloudControl.CancelResourceRequest+    Amazonka.CloudControl.CreateResource+    Amazonka.CloudControl.DeleteResource+    Amazonka.CloudControl.GetResource+    Amazonka.CloudControl.GetResourceRequestStatus+    Amazonka.CloudControl.Lens+    Amazonka.CloudControl.ListResourceRequests+    Amazonka.CloudControl.ListResources+    Amazonka.CloudControl.Types+    Amazonka.CloudControl.Types.HandlerErrorCode+    Amazonka.CloudControl.Types.Operation+    Amazonka.CloudControl.Types.OperationStatus+    Amazonka.CloudControl.Types.ProgressEvent+    Amazonka.CloudControl.Types.ResourceDescription+    Amazonka.CloudControl.Types.ResourceRequestStatusFilter+    Amazonka.CloudControl.UpdateResource+    Amazonka.CloudControl.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-cloudcontrol-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.CloudControl+    Test.Amazonka.CloudControl.Internal+    Test.Amazonka.Gen.CloudControl++  build-depends:+    , amazonka-cloudcontrol+    , amazonka-core          >=2.0 && <2.1+    , amazonka-test          >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/CancelResourceRequest.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  cloudcontrolapi.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/CancelResourceRequestResponse.proto view
+ fixture/CreateResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  cloudcontrolapi.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/CreateResourceResponse.proto view
+ fixture/DeleteResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  cloudcontrolapi.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/DeleteResourceResponse.proto view
+ fixture/GetResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  cloudcontrolapi.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/GetResourceRequestStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  cloudcontrolapi.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/GetResourceRequestStatusResponse.proto view
+ fixture/GetResourceResponse.proto view
+ fixture/ListResourceRequests.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  cloudcontrolapi.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/ListResourceRequestsResponse.proto view
+ fixture/ListResources.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  cloudcontrolapi.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/ListResourcesResponse.proto view
+ fixture/UpdateResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudcontrolapi/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  cloudcontrolapi.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/UpdateResourceResponse.proto view
+ gen/Amazonka/CloudControl.hs view
@@ -0,0 +1,206 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.CloudControl+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2021-09-30@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- For more information about Amazon Web Services Cloud Control API, see+-- the+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/what-is-cloudcontrolapi.html Amazon Web Services Cloud Control API User Guide>.+module Amazonka.CloudControl+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** AlreadyExistsException+    _AlreadyExistsException,++    -- ** ClientTokenConflictException+    _ClientTokenConflictException,++    -- ** ConcurrentModificationException+    _ConcurrentModificationException,++    -- ** ConcurrentOperationException+    _ConcurrentOperationException,++    -- ** GeneralServiceException+    _GeneralServiceException,++    -- ** HandlerFailureException+    _HandlerFailureException,++    -- ** HandlerInternalFailureException+    _HandlerInternalFailureException,++    -- ** InvalidCredentialsException+    _InvalidCredentialsException,++    -- ** InvalidRequestException+    _InvalidRequestException,++    -- ** NetworkFailureException+    _NetworkFailureException,++    -- ** NotStabilizedException+    _NotStabilizedException,++    -- ** NotUpdatableException+    _NotUpdatableException,++    -- ** PrivateTypeException+    _PrivateTypeException,++    -- ** RequestTokenNotFoundException+    _RequestTokenNotFoundException,++    -- ** ResourceConflictException+    _ResourceConflictException,++    -- ** ResourceNotFoundException+    _ResourceNotFoundException,++    -- ** ServiceInternalErrorException+    _ServiceInternalErrorException,++    -- ** ServiceLimitExceededException+    _ServiceLimitExceededException,++    -- ** ThrottlingException+    _ThrottlingException,++    -- ** TypeNotFoundException+    _TypeNotFoundException,++    -- ** UnsupportedActionException+    _UnsupportedActionException,++    -- * Waiters+    -- $waiters++    -- ** ResourceRequestSuccess+    newResourceRequestSuccess,++    -- * Operations+    -- $operations++    -- ** CancelResourceRequest+    CancelResourceRequest (CancelResourceRequest'),+    newCancelResourceRequest,+    CancelResourceRequestResponse (CancelResourceRequestResponse'),+    newCancelResourceRequestResponse,++    -- ** CreateResource+    CreateResource (CreateResource'),+    newCreateResource,+    CreateResourceResponse (CreateResourceResponse'),+    newCreateResourceResponse,++    -- ** DeleteResource+    DeleteResource (DeleteResource'),+    newDeleteResource,+    DeleteResourceResponse (DeleteResourceResponse'),+    newDeleteResourceResponse,++    -- ** GetResource+    GetResource (GetResource'),+    newGetResource,+    GetResourceResponse (GetResourceResponse'),+    newGetResourceResponse,++    -- ** GetResourceRequestStatus+    GetResourceRequestStatus (GetResourceRequestStatus'),+    newGetResourceRequestStatus,+    GetResourceRequestStatusResponse (GetResourceRequestStatusResponse'),+    newGetResourceRequestStatusResponse,++    -- ** ListResourceRequests (Paginated)+    ListResourceRequests (ListResourceRequests'),+    newListResourceRequests,+    ListResourceRequestsResponse (ListResourceRequestsResponse'),+    newListResourceRequestsResponse,++    -- ** ListResources (Paginated)+    ListResources (ListResources'),+    newListResources,+    ListResourcesResponse (ListResourcesResponse'),+    newListResourcesResponse,++    -- ** UpdateResource+    UpdateResource (UpdateResource'),+    newUpdateResource,+    UpdateResourceResponse (UpdateResourceResponse'),+    newUpdateResourceResponse,++    -- * Types++    -- ** HandlerErrorCode+    HandlerErrorCode (..),++    -- ** Operation+    Operation (..),++    -- ** OperationStatus+    OperationStatus (..),++    -- ** ProgressEvent+    ProgressEvent (ProgressEvent'),+    newProgressEvent,++    -- ** ResourceDescription+    ResourceDescription (ResourceDescription'),+    newResourceDescription,++    -- ** ResourceRequestStatusFilter+    ResourceRequestStatusFilter (ResourceRequestStatusFilter'),+    newResourceRequestStatusFilter,+  )+where++import Amazonka.CloudControl.CancelResourceRequest+import Amazonka.CloudControl.CreateResource+import Amazonka.CloudControl.DeleteResource+import Amazonka.CloudControl.GetResource+import Amazonka.CloudControl.GetResourceRequestStatus+import Amazonka.CloudControl.Lens+import Amazonka.CloudControl.ListResourceRequests+import Amazonka.CloudControl.ListResources+import Amazonka.CloudControl.Types+import Amazonka.CloudControl.UpdateResource+import Amazonka.CloudControl.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 'CloudControl'.++-- $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/CloudControl/CancelResourceRequest.hs view
@@ -0,0 +1,180 @@+{-# 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.CloudControl.CancelResourceRequest+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Cancels the specified resource operation request. For more information,+-- see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-cancel Canceling resource operation requests>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- Only resource operations requests with a status of @PENDING@ or+-- @IN_PROGRESS@ can be canceled.+module Amazonka.CloudControl.CancelResourceRequest+  ( -- * Creating a Request+    CancelResourceRequest (..),+    newCancelResourceRequest,++    -- * Request Lenses+    cancelResourceRequest_requestToken,++    -- * Destructuring the Response+    CancelResourceRequestResponse (..),+    newCancelResourceRequestResponse,++    -- * Response Lenses+    cancelResourceRequestResponse_progressEvent,+    cancelResourceRequestResponse_httpStatus,+  )+where++import Amazonka.CloudControl.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCancelResourceRequest' smart constructor.+data CancelResourceRequest = CancelResourceRequest'+  { -- | The @RequestToken@ of the @ProgressEvent@ object returned by the+    -- resource operation request.+    requestToken :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CancelResourceRequest' 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:+--+-- 'requestToken', 'cancelResourceRequest_requestToken' - The @RequestToken@ of the @ProgressEvent@ object returned by the+-- resource operation request.+newCancelResourceRequest ::+  -- | 'requestToken'+  Prelude.Text ->+  CancelResourceRequest+newCancelResourceRequest pRequestToken_ =+  CancelResourceRequest'+    { requestToken =+        pRequestToken_+    }++-- | The @RequestToken@ of the @ProgressEvent@ object returned by the+-- resource operation request.+cancelResourceRequest_requestToken :: Lens.Lens' CancelResourceRequest Prelude.Text+cancelResourceRequest_requestToken = Lens.lens (\CancelResourceRequest' {requestToken} -> requestToken) (\s@CancelResourceRequest' {} a -> s {requestToken = a} :: CancelResourceRequest)++instance Core.AWSRequest CancelResourceRequest where+  type+    AWSResponse CancelResourceRequest =+      CancelResourceRequestResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CancelResourceRequestResponse'+            Prelude.<$> (x Data..?> "ProgressEvent")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CancelResourceRequest where+  hashWithSalt _salt CancelResourceRequest' {..} =+    _salt `Prelude.hashWithSalt` requestToken++instance Prelude.NFData CancelResourceRequest where+  rnf CancelResourceRequest' {..} =+    Prelude.rnf requestToken++instance Data.ToHeaders CancelResourceRequest where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "CloudApiService.CancelResourceRequest" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CancelResourceRequest where+  toJSON CancelResourceRequest' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("RequestToken" Data..= requestToken)]+      )++instance Data.ToPath CancelResourceRequest where+  toPath = Prelude.const "/"++instance Data.ToQuery CancelResourceRequest where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCancelResourceRequestResponse' smart constructor.+data CancelResourceRequestResponse = CancelResourceRequestResponse'+  { progressEvent :: Prelude.Maybe ProgressEvent,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CancelResourceRequestResponse' 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:+--+-- 'progressEvent', 'cancelResourceRequestResponse_progressEvent' - Undocumented member.+--+-- 'httpStatus', 'cancelResourceRequestResponse_httpStatus' - The response's http status code.+newCancelResourceRequestResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CancelResourceRequestResponse+newCancelResourceRequestResponse pHttpStatus_ =+  CancelResourceRequestResponse'+    { progressEvent =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Undocumented member.+cancelResourceRequestResponse_progressEvent :: Lens.Lens' CancelResourceRequestResponse (Prelude.Maybe ProgressEvent)+cancelResourceRequestResponse_progressEvent = Lens.lens (\CancelResourceRequestResponse' {progressEvent} -> progressEvent) (\s@CancelResourceRequestResponse' {} a -> s {progressEvent = a} :: CancelResourceRequestResponse)++-- | The response's http status code.+cancelResourceRequestResponse_httpStatus :: Lens.Lens' CancelResourceRequestResponse Prelude.Int+cancelResourceRequestResponse_httpStatus = Lens.lens (\CancelResourceRequestResponse' {httpStatus} -> httpStatus) (\s@CancelResourceRequestResponse' {} a -> s {httpStatus = a} :: CancelResourceRequestResponse)++instance Prelude.NFData CancelResourceRequestResponse where+  rnf CancelResourceRequestResponse' {..} =+    Prelude.rnf progressEvent+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CloudControl/CreateResource.hs view
@@ -0,0 +1,358 @@+{-# 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.CloudControl.CreateResource+-- 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 the specified resource. For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html Creating a resource>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- After you have initiated a resource creation request, you can monitor+-- the progress of your request by calling+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- using the @RequestToken@ of the @ProgressEvent@ type returned by+-- @CreateResource@.+module Amazonka.CloudControl.CreateResource+  ( -- * Creating a Request+    CreateResource (..),+    newCreateResource,++    -- * Request Lenses+    createResource_clientToken,+    createResource_roleArn,+    createResource_typeVersionId,+    createResource_typeName,+    createResource_desiredState,++    -- * Destructuring the Response+    CreateResourceResponse (..),+    newCreateResourceResponse,++    -- * Response Lenses+    createResourceResponse_progressEvent,+    createResourceResponse_httpStatus,+  )+where++import Amazonka.CloudControl.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateResource' smart constructor.+data CreateResource = CreateResource'+  { -- | A unique identifier to ensure the idempotency of the resource request.+    -- As a best practice, specify this token to ensure idempotency, so that+    -- Amazon Web Services Cloud Control API can accurately distinguish between+    -- request retries and new resource requests. You might retry a resource+    -- request to ensure that it was successfully received.+    --+    -- A client token is valid for 36 hours once used. After that, a resource+    -- request with the same client token is treated as a new request.+    --+    -- If you do not specify a client token, one is generated for inclusion in+    -- the request.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency Ensuring resource operation requests are unique>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the Identity and Access Management+    -- (IAM) role for Cloud Control API to use when performing this resource+    -- operation. The role specified must have the permissions required for+    -- this operation. The necessary permissions for each event handler are+    -- defined in the+    -- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+    -- section of the+    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+    --+    -- If you do not specify a role, Cloud Control API uses a temporary session+    -- created using your Amazon Web Services user credentials.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    roleArn :: Prelude.Maybe Prelude.Text,+    -- | For private resource types, the type version to use in this resource+    -- operation. If you do not specify a resource version, CloudFormation uses+    -- the default version.+    typeVersionId :: Prelude.Maybe Prelude.Text,+    -- | The name of the resource type.+    typeName :: Prelude.Text,+    -- | Structured data format representing the desired state of the resource,+    -- consisting of that resource\'s properties and their desired values.+    --+    -- Cloud Control API currently supports JSON as a structured data format.+    --+    -- >  <p>Specify the desired state as one of the following:</p> <ul> <li> <p>A JSON blob</p> </li> <li> <p>A local path containing the desired state in JSON data format</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p> <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>+    desiredState :: Data.Sensitive Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'createResource_clientToken' - A unique identifier to ensure the idempotency of the resource request.+-- As a best practice, specify this token to ensure idempotency, so that+-- Amazon Web Services Cloud Control API can accurately distinguish between+-- request retries and new resource requests. You might retry a resource+-- request to ensure that it was successfully received.+--+-- A client token is valid for 36 hours once used. After that, a resource+-- request with the same client token is treated as a new request.+--+-- If you do not specify a client token, one is generated for inclusion in+-- the request.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency Ensuring resource operation requests are unique>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'roleArn', 'createResource_roleArn' - The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'typeVersionId', 'createResource_typeVersionId' - For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+--+-- 'typeName', 'createResource_typeName' - The name of the resource type.+--+-- 'desiredState', 'createResource_desiredState' - Structured data format representing the desired state of the resource,+-- consisting of that resource\'s properties and their desired values.+--+-- Cloud Control API currently supports JSON as a structured data format.+--+-- >  <p>Specify the desired state as one of the following:</p> <ul> <li> <p>A JSON blob</p> </li> <li> <p>A local path containing the desired state in JSON data format</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p> <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>+newCreateResource ::+  -- | 'typeName'+  Prelude.Text ->+  -- | 'desiredState'+  Prelude.Text ->+  CreateResource+newCreateResource pTypeName_ pDesiredState_ =+  CreateResource'+    { clientToken = Prelude.Nothing,+      roleArn = Prelude.Nothing,+      typeVersionId = Prelude.Nothing,+      typeName = pTypeName_,+      desiredState = Data._Sensitive Lens.# pDesiredState_+    }++-- | A unique identifier to ensure the idempotency of the resource request.+-- As a best practice, specify this token to ensure idempotency, so that+-- Amazon Web Services Cloud Control API can accurately distinguish between+-- request retries and new resource requests. You might retry a resource+-- request to ensure that it was successfully received.+--+-- A client token is valid for 36 hours once used. After that, a resource+-- request with the same client token is treated as a new request.+--+-- If you do not specify a client token, one is generated for inclusion in+-- the request.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency Ensuring resource operation requests are unique>+-- in the /Amazon Web Services Cloud Control API User Guide/.+createResource_clientToken :: Lens.Lens' CreateResource (Prelude.Maybe Prelude.Text)+createResource_clientToken = Lens.lens (\CreateResource' {clientToken} -> clientToken) (\s@CreateResource' {} a -> s {clientToken = a} :: CreateResource)++-- | The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+createResource_roleArn :: Lens.Lens' CreateResource (Prelude.Maybe Prelude.Text)+createResource_roleArn = Lens.lens (\CreateResource' {roleArn} -> roleArn) (\s@CreateResource' {} a -> s {roleArn = a} :: CreateResource)++-- | For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+createResource_typeVersionId :: Lens.Lens' CreateResource (Prelude.Maybe Prelude.Text)+createResource_typeVersionId = Lens.lens (\CreateResource' {typeVersionId} -> typeVersionId) (\s@CreateResource' {} a -> s {typeVersionId = a} :: CreateResource)++-- | The name of the resource type.+createResource_typeName :: Lens.Lens' CreateResource Prelude.Text+createResource_typeName = Lens.lens (\CreateResource' {typeName} -> typeName) (\s@CreateResource' {} a -> s {typeName = a} :: CreateResource)++-- | Structured data format representing the desired state of the resource,+-- consisting of that resource\'s properties and their desired values.+--+-- Cloud Control API currently supports JSON as a structured data format.+--+-- >  <p>Specify the desired state as one of the following:</p> <ul> <li> <p>A JSON blob</p> </li> <li> <p>A local path containing the desired state in JSON data format</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p> <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>+createResource_desiredState :: Lens.Lens' CreateResource Prelude.Text+createResource_desiredState = Lens.lens (\CreateResource' {desiredState} -> desiredState) (\s@CreateResource' {} a -> s {desiredState = a} :: CreateResource) Prelude.. Data._Sensitive++instance Core.AWSRequest CreateResource where+  type+    AWSResponse CreateResource =+      CreateResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateResourceResponse'+            Prelude.<$> (x Data..?> "ProgressEvent")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateResource where+  hashWithSalt _salt CreateResource' {..} =+    _salt+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` roleArn+      `Prelude.hashWithSalt` typeVersionId+      `Prelude.hashWithSalt` typeName+      `Prelude.hashWithSalt` desiredState++instance Prelude.NFData CreateResource where+  rnf CreateResource' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf roleArn+      `Prelude.seq` Prelude.rnf typeVersionId+      `Prelude.seq` Prelude.rnf typeName+      `Prelude.seq` Prelude.rnf desiredState++instance Data.ToHeaders CreateResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "CloudApiService.CreateResource" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateResource where+  toJSON CreateResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ClientToken" Data..=) Prelude.<$> clientToken,+            ("RoleArn" Data..=) Prelude.<$> roleArn,+            ("TypeVersionId" Data..=) Prelude.<$> typeVersionId,+            Prelude.Just ("TypeName" Data..= typeName),+            Prelude.Just ("DesiredState" Data..= desiredState)+          ]+      )++instance Data.ToPath CreateResource where+  toPath = Prelude.const "/"++instance Data.ToQuery CreateResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateResourceResponse' smart constructor.+data CreateResourceResponse = CreateResourceResponse'+  { -- | Represents the current status of the resource creation request.+    --+    -- After you have initiated a resource creation request, you can monitor+    -- the progress of your request by calling+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+    -- using the @RequestToken@ of the @ProgressEvent@ returned by+    -- @CreateResource@.+    progressEvent :: Prelude.Maybe ProgressEvent,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateResourceResponse' 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:+--+-- 'progressEvent', 'createResourceResponse_progressEvent' - Represents the current status of the resource creation request.+--+-- After you have initiated a resource creation request, you can monitor+-- the progress of your request by calling+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- using the @RequestToken@ of the @ProgressEvent@ returned by+-- @CreateResource@.+--+-- 'httpStatus', 'createResourceResponse_httpStatus' - The response's http status code.+newCreateResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateResourceResponse+newCreateResourceResponse pHttpStatus_ =+  CreateResourceResponse'+    { progressEvent =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Represents the current status of the resource creation request.+--+-- After you have initiated a resource creation request, you can monitor+-- the progress of your request by calling+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- using the @RequestToken@ of the @ProgressEvent@ returned by+-- @CreateResource@.+createResourceResponse_progressEvent :: Lens.Lens' CreateResourceResponse (Prelude.Maybe ProgressEvent)+createResourceResponse_progressEvent = Lens.lens (\CreateResourceResponse' {progressEvent} -> progressEvent) (\s@CreateResourceResponse' {} a -> s {progressEvent = a} :: CreateResourceResponse)++-- | The response's http status code.+createResourceResponse_httpStatus :: Lens.Lens' CreateResourceResponse Prelude.Int+createResourceResponse_httpStatus = Lens.lens (\CreateResourceResponse' {httpStatus} -> httpStatus) (\s@CreateResourceResponse' {} a -> s {httpStatus = a} :: CreateResourceResponse)++instance Prelude.NFData CreateResourceResponse where+  rnf CreateResourceResponse' {..} =+    Prelude.rnf progressEvent+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CloudControl/DeleteResource.hs view
@@ -0,0 +1,385 @@+{-# 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.CloudControl.DeleteResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified resource. For details, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-delete.html Deleting a resource>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- After you have initiated a resource deletion request, you can monitor+-- the progress of your request by calling+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- using the @RequestToken@ of the @ProgressEvent@ returned by+-- @DeleteResource@.+module Amazonka.CloudControl.DeleteResource+  ( -- * Creating a Request+    DeleteResource (..),+    newDeleteResource,++    -- * Request Lenses+    deleteResource_clientToken,+    deleteResource_roleArn,+    deleteResource_typeVersionId,+    deleteResource_typeName,+    deleteResource_identifier,++    -- * Destructuring the Response+    DeleteResourceResponse (..),+    newDeleteResourceResponse,++    -- * Response Lenses+    deleteResourceResponse_progressEvent,+    deleteResourceResponse_httpStatus,+  )+where++import Amazonka.CloudControl.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteResource' smart constructor.+data DeleteResource = DeleteResource'+  { -- | A unique identifier to ensure the idempotency of the resource request.+    -- As a best practice, specify this token to ensure idempotency, so that+    -- Amazon Web Services Cloud Control API can accurately distinguish between+    -- request retries and new resource requests. You might retry a resource+    -- request to ensure that it was successfully received.+    --+    -- A client token is valid for 36 hours once used. After that, a resource+    -- request with the same client token is treated as a new request.+    --+    -- If you do not specify a client token, one is generated for inclusion in+    -- the request.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency Ensuring resource operation requests are unique>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the Identity and Access Management+    -- (IAM) role for Cloud Control API to use when performing this resource+    -- operation. The role specified must have the permissions required for+    -- this operation. The necessary permissions for each event handler are+    -- defined in the+    -- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+    -- section of the+    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+    --+    -- If you do not specify a role, Cloud Control API uses a temporary session+    -- created using your Amazon Web Services user credentials.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    roleArn :: Prelude.Maybe Prelude.Text,+    -- | For private resource types, the type version to use in this resource+    -- operation. If you do not specify a resource version, CloudFormation uses+    -- the default version.+    typeVersionId :: Prelude.Maybe Prelude.Text,+    -- | The name of the resource type.+    typeName :: Prelude.Text,+    -- | The identifier for the resource.+    --+    -- You can specify the primary identifier, or any secondary identifier+    -- defined for the resource type in its resource schema. You can only+    -- specify one identifier. Primary identifiers can be specified as a string+    -- or JSON; secondary identifiers must be specified as JSON.+    --+    -- For compound primary identifiers (that is, one that consists of multiple+    -- resource properties strung together), to specify the primary identifier+    -- as a string, list the property values /in the order they are specified/+    -- in the primary identifier definition, separated by @|@.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'deleteResource_clientToken' - A unique identifier to ensure the idempotency of the resource request.+-- As a best practice, specify this token to ensure idempotency, so that+-- Amazon Web Services Cloud Control API can accurately distinguish between+-- request retries and new resource requests. You might retry a resource+-- request to ensure that it was successfully received.+--+-- A client token is valid for 36 hours once used. After that, a resource+-- request with the same client token is treated as a new request.+--+-- If you do not specify a client token, one is generated for inclusion in+-- the request.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency Ensuring resource operation requests are unique>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'roleArn', 'deleteResource_roleArn' - The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'typeVersionId', 'deleteResource_typeVersionId' - For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+--+-- 'typeName', 'deleteResource_typeName' - The name of the resource type.+--+-- 'identifier', 'deleteResource_identifier' - The identifier for the resource.+--+-- You can specify the primary identifier, or any secondary identifier+-- defined for the resource type in its resource schema. You can only+-- specify one identifier. Primary identifiers can be specified as a string+-- or JSON; secondary identifiers must be specified as JSON.+--+-- For compound primary identifiers (that is, one that consists of multiple+-- resource properties strung together), to specify the primary identifier+-- as a string, list the property values /in the order they are specified/+-- in the primary identifier definition, separated by @|@.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+-- in the /Amazon Web Services Cloud Control API User Guide/.+newDeleteResource ::+  -- | 'typeName'+  Prelude.Text ->+  -- | 'identifier'+  Prelude.Text ->+  DeleteResource+newDeleteResource pTypeName_ pIdentifier_ =+  DeleteResource'+    { clientToken = Prelude.Nothing,+      roleArn = Prelude.Nothing,+      typeVersionId = Prelude.Nothing,+      typeName = pTypeName_,+      identifier = pIdentifier_+    }++-- | A unique identifier to ensure the idempotency of the resource request.+-- As a best practice, specify this token to ensure idempotency, so that+-- Amazon Web Services Cloud Control API can accurately distinguish between+-- request retries and new resource requests. You might retry a resource+-- request to ensure that it was successfully received.+--+-- A client token is valid for 36 hours once used. After that, a resource+-- request with the same client token is treated as a new request.+--+-- If you do not specify a client token, one is generated for inclusion in+-- the request.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency Ensuring resource operation requests are unique>+-- in the /Amazon Web Services Cloud Control API User Guide/.+deleteResource_clientToken :: Lens.Lens' DeleteResource (Prelude.Maybe Prelude.Text)+deleteResource_clientToken = Lens.lens (\DeleteResource' {clientToken} -> clientToken) (\s@DeleteResource' {} a -> s {clientToken = a} :: DeleteResource)++-- | The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+deleteResource_roleArn :: Lens.Lens' DeleteResource (Prelude.Maybe Prelude.Text)+deleteResource_roleArn = Lens.lens (\DeleteResource' {roleArn} -> roleArn) (\s@DeleteResource' {} a -> s {roleArn = a} :: DeleteResource)++-- | For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+deleteResource_typeVersionId :: Lens.Lens' DeleteResource (Prelude.Maybe Prelude.Text)+deleteResource_typeVersionId = Lens.lens (\DeleteResource' {typeVersionId} -> typeVersionId) (\s@DeleteResource' {} a -> s {typeVersionId = a} :: DeleteResource)++-- | The name of the resource type.+deleteResource_typeName :: Lens.Lens' DeleteResource Prelude.Text+deleteResource_typeName = Lens.lens (\DeleteResource' {typeName} -> typeName) (\s@DeleteResource' {} a -> s {typeName = a} :: DeleteResource)++-- | The identifier for the resource.+--+-- You can specify the primary identifier, or any secondary identifier+-- defined for the resource type in its resource schema. You can only+-- specify one identifier. Primary identifiers can be specified as a string+-- or JSON; secondary identifiers must be specified as JSON.+--+-- For compound primary identifiers (that is, one that consists of multiple+-- resource properties strung together), to specify the primary identifier+-- as a string, list the property values /in the order they are specified/+-- in the primary identifier definition, separated by @|@.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+-- in the /Amazon Web Services Cloud Control API User Guide/.+deleteResource_identifier :: Lens.Lens' DeleteResource Prelude.Text+deleteResource_identifier = Lens.lens (\DeleteResource' {identifier} -> identifier) (\s@DeleteResource' {} a -> s {identifier = a} :: DeleteResource)++instance Core.AWSRequest DeleteResource where+  type+    AWSResponse DeleteResource =+      DeleteResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DeleteResourceResponse'+            Prelude.<$> (x Data..?> "ProgressEvent")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteResource where+  hashWithSalt _salt DeleteResource' {..} =+    _salt+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` roleArn+      `Prelude.hashWithSalt` typeVersionId+      `Prelude.hashWithSalt` typeName+      `Prelude.hashWithSalt` identifier++instance Prelude.NFData DeleteResource where+  rnf DeleteResource' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf roleArn+      `Prelude.seq` Prelude.rnf typeVersionId+      `Prelude.seq` Prelude.rnf typeName+      `Prelude.seq` Prelude.rnf identifier++instance Data.ToHeaders DeleteResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "CloudApiService.DeleteResource" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteResource where+  toJSON DeleteResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ClientToken" Data..=) Prelude.<$> clientToken,+            ("RoleArn" Data..=) Prelude.<$> roleArn,+            ("TypeVersionId" Data..=) Prelude.<$> typeVersionId,+            Prelude.Just ("TypeName" Data..= typeName),+            Prelude.Just ("Identifier" Data..= identifier)+          ]+      )++instance Data.ToPath DeleteResource where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteResourceResponse' smart constructor.+data DeleteResourceResponse = DeleteResourceResponse'+  { -- | Represents the current status of the resource deletion request.+    --+    -- After you have initiated a resource deletion request, you can monitor+    -- the progress of your request by calling+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+    -- using the @RequestToken@ of the @ProgressEvent@ returned by+    -- @DeleteResource@.+    progressEvent :: Prelude.Maybe ProgressEvent,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteResourceResponse' 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:+--+-- 'progressEvent', 'deleteResourceResponse_progressEvent' - Represents the current status of the resource deletion request.+--+-- After you have initiated a resource deletion request, you can monitor+-- the progress of your request by calling+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- using the @RequestToken@ of the @ProgressEvent@ returned by+-- @DeleteResource@.+--+-- 'httpStatus', 'deleteResourceResponse_httpStatus' - The response's http status code.+newDeleteResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteResourceResponse+newDeleteResourceResponse pHttpStatus_ =+  DeleteResourceResponse'+    { progressEvent =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Represents the current status of the resource deletion request.+--+-- After you have initiated a resource deletion request, you can monitor+-- the progress of your request by calling+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- using the @RequestToken@ of the @ProgressEvent@ returned by+-- @DeleteResource@.+deleteResourceResponse_progressEvent :: Lens.Lens' DeleteResourceResponse (Prelude.Maybe ProgressEvent)+deleteResourceResponse_progressEvent = Lens.lens (\DeleteResourceResponse' {progressEvent} -> progressEvent) (\s@DeleteResourceResponse' {} a -> s {progressEvent = a} :: DeleteResourceResponse)++-- | The response's http status code.+deleteResourceResponse_httpStatus :: Lens.Lens' DeleteResourceResponse Prelude.Int+deleteResourceResponse_httpStatus = Lens.lens (\DeleteResourceResponse' {httpStatus} -> httpStatus) (\s@DeleteResourceResponse' {} a -> s {httpStatus = a} :: DeleteResourceResponse)++instance Prelude.NFData DeleteResourceResponse where+  rnf DeleteResourceResponse' {..} =+    Prelude.rnf progressEvent+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CloudControl/GetResource.hs view
@@ -0,0 +1,319 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CloudControl.GetResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about the current state of the specified resource.+-- For details, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-read.html Reading a resource\'s current state>.+--+-- You can use this action to return information about an existing resource+-- in your account and Amazon Web Services Region, whether those resources+-- were provisioned using Cloud Control API.+module Amazonka.CloudControl.GetResource+  ( -- * Creating a Request+    GetResource (..),+    newGetResource,++    -- * Request Lenses+    getResource_roleArn,+    getResource_typeVersionId,+    getResource_typeName,+    getResource_identifier,++    -- * Destructuring the Response+    GetResourceResponse (..),+    newGetResourceResponse,++    -- * Response Lenses+    getResourceResponse_resourceDescription,+    getResourceResponse_typeName,+    getResourceResponse_httpStatus,+  )+where++import Amazonka.CloudControl.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetResource' smart constructor.+data GetResource = GetResource'+  { -- | The Amazon Resource Name (ARN) of the Identity and Access Management+    -- (IAM) role for Cloud Control API to use when performing this resource+    -- operation. The role specified must have the permissions required for+    -- this operation. The necessary permissions for each event handler are+    -- defined in the+    -- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+    -- section of the+    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+    --+    -- If you do not specify a role, Cloud Control API uses a temporary session+    -- created using your Amazon Web Services user credentials.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    roleArn :: Prelude.Maybe Prelude.Text,+    -- | For private resource types, the type version to use in this resource+    -- operation. If you do not specify a resource version, CloudFormation uses+    -- the default version.+    typeVersionId :: Prelude.Maybe Prelude.Text,+    -- | The name of the resource type.+    typeName :: Prelude.Text,+    -- | The identifier for the resource.+    --+    -- You can specify the primary identifier, or any secondary identifier+    -- defined for the resource type in its resource schema. You can only+    -- specify one identifier. Primary identifiers can be specified as a string+    -- or JSON; secondary identifiers must be specified as JSON.+    --+    -- For compound primary identifiers (that is, one that consists of multiple+    -- resource properties strung together), to specify the primary identifier+    -- as a string, list the property values /in the order they are specified/+    -- in the primary identifier definition, separated by @|@.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    identifier :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResource' 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:+--+-- 'roleArn', 'getResource_roleArn' - The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'typeVersionId', 'getResource_typeVersionId' - For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+--+-- 'typeName', 'getResource_typeName' - The name of the resource type.+--+-- 'identifier', 'getResource_identifier' - The identifier for the resource.+--+-- You can specify the primary identifier, or any secondary identifier+-- defined for the resource type in its resource schema. You can only+-- specify one identifier. Primary identifiers can be specified as a string+-- or JSON; secondary identifiers must be specified as JSON.+--+-- For compound primary identifiers (that is, one that consists of multiple+-- resource properties strung together), to specify the primary identifier+-- as a string, list the property values /in the order they are specified/+-- in the primary identifier definition, separated by @|@.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+-- in the /Amazon Web Services Cloud Control API User Guide/.+newGetResource ::+  -- | 'typeName'+  Prelude.Text ->+  -- | 'identifier'+  Prelude.Text ->+  GetResource+newGetResource pTypeName_ pIdentifier_ =+  GetResource'+    { roleArn = Prelude.Nothing,+      typeVersionId = Prelude.Nothing,+      typeName = pTypeName_,+      identifier = pIdentifier_+    }++-- | The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+getResource_roleArn :: Lens.Lens' GetResource (Prelude.Maybe Prelude.Text)+getResource_roleArn = Lens.lens (\GetResource' {roleArn} -> roleArn) (\s@GetResource' {} a -> s {roleArn = a} :: GetResource)++-- | For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+getResource_typeVersionId :: Lens.Lens' GetResource (Prelude.Maybe Prelude.Text)+getResource_typeVersionId = Lens.lens (\GetResource' {typeVersionId} -> typeVersionId) (\s@GetResource' {} a -> s {typeVersionId = a} :: GetResource)++-- | The name of the resource type.+getResource_typeName :: Lens.Lens' GetResource Prelude.Text+getResource_typeName = Lens.lens (\GetResource' {typeName} -> typeName) (\s@GetResource' {} a -> s {typeName = a} :: GetResource)++-- | The identifier for the resource.+--+-- You can specify the primary identifier, or any secondary identifier+-- defined for the resource type in its resource schema. You can only+-- specify one identifier. Primary identifiers can be specified as a string+-- or JSON; secondary identifiers must be specified as JSON.+--+-- For compound primary identifiers (that is, one that consists of multiple+-- resource properties strung together), to specify the primary identifier+-- as a string, list the property values /in the order they are specified/+-- in the primary identifier definition, separated by @|@.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+-- in the /Amazon Web Services Cloud Control API User Guide/.+getResource_identifier :: Lens.Lens' GetResource Prelude.Text+getResource_identifier = Lens.lens (\GetResource' {identifier} -> identifier) (\s@GetResource' {} a -> s {identifier = a} :: GetResource)++instance Core.AWSRequest GetResource where+  type AWSResponse GetResource = GetResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetResourceResponse'+            Prelude.<$> (x Data..?> "ResourceDescription")+            Prelude.<*> (x Data..?> "TypeName")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetResource where+  hashWithSalt _salt GetResource' {..} =+    _salt+      `Prelude.hashWithSalt` roleArn+      `Prelude.hashWithSalt` typeVersionId+      `Prelude.hashWithSalt` typeName+      `Prelude.hashWithSalt` identifier++instance Prelude.NFData GetResource where+  rnf GetResource' {..} =+    Prelude.rnf roleArn+      `Prelude.seq` Prelude.rnf typeVersionId+      `Prelude.seq` Prelude.rnf typeName+      `Prelude.seq` Prelude.rnf identifier++instance Data.ToHeaders GetResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "CloudApiService.GetResource" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetResource where+  toJSON GetResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("RoleArn" Data..=) Prelude.<$> roleArn,+            ("TypeVersionId" Data..=) Prelude.<$> typeVersionId,+            Prelude.Just ("TypeName" Data..= typeName),+            Prelude.Just ("Identifier" Data..= identifier)+          ]+      )++instance Data.ToPath GetResource where+  toPath = Prelude.const "/"++instance Data.ToQuery GetResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetResourceResponse' smart constructor.+data GetResourceResponse = GetResourceResponse'+  { resourceDescription :: Prelude.Maybe ResourceDescription,+    -- | The name of the resource type.+    typeName :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourceResponse' 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:+--+-- 'resourceDescription', 'getResourceResponse_resourceDescription' - Undocumented member.+--+-- 'typeName', 'getResourceResponse_typeName' - The name of the resource type.+--+-- 'httpStatus', 'getResourceResponse_httpStatus' - The response's http status code.+newGetResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetResourceResponse+newGetResourceResponse pHttpStatus_ =+  GetResourceResponse'+    { resourceDescription =+        Prelude.Nothing,+      typeName = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Undocumented member.+getResourceResponse_resourceDescription :: Lens.Lens' GetResourceResponse (Prelude.Maybe ResourceDescription)+getResourceResponse_resourceDescription = Lens.lens (\GetResourceResponse' {resourceDescription} -> resourceDescription) (\s@GetResourceResponse' {} a -> s {resourceDescription = a} :: GetResourceResponse)++-- | The name of the resource type.+getResourceResponse_typeName :: Lens.Lens' GetResourceResponse (Prelude.Maybe Prelude.Text)+getResourceResponse_typeName = Lens.lens (\GetResourceResponse' {typeName} -> typeName) (\s@GetResourceResponse' {} a -> s {typeName = a} :: GetResourceResponse)++-- | The response's http status code.+getResourceResponse_httpStatus :: Lens.Lens' GetResourceResponse Prelude.Int+getResourceResponse_httpStatus = Lens.lens (\GetResourceResponse' {httpStatus} -> httpStatus) (\s@GetResourceResponse' {} a -> s {httpStatus = a} :: GetResourceResponse)++instance Prelude.NFData GetResourceResponse where+  rnf GetResourceResponse' {..} =+    Prelude.rnf resourceDescription+      `Prelude.seq` Prelude.rnf typeName+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CloudControl/GetResourceRequestStatus.hs view
@@ -0,0 +1,190 @@+{-# 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.CloudControl.GetResourceRequestStatus+-- 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 status of a resource operation request. For more+-- information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-track Tracking the progress of resource operation requests>+-- in the /Amazon Web Services Cloud Control API User Guide/.+module Amazonka.CloudControl.GetResourceRequestStatus+  ( -- * Creating a Request+    GetResourceRequestStatus (..),+    newGetResourceRequestStatus,++    -- * Request Lenses+    getResourceRequestStatus_requestToken,++    -- * Destructuring the Response+    GetResourceRequestStatusResponse (..),+    newGetResourceRequestStatusResponse,++    -- * Response Lenses+    getResourceRequestStatusResponse_progressEvent,+    getResourceRequestStatusResponse_httpStatus,+  )+where++import Amazonka.CloudControl.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetResourceRequestStatus' smart constructor.+data GetResourceRequestStatus = GetResourceRequestStatus'+  { -- | A unique token used to track the progress of the resource operation+    -- request.+    --+    -- Request tokens are included in the @ProgressEvent@ type returned by a+    -- resource operation request.+    requestToken :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourceRequestStatus' 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:+--+-- 'requestToken', 'getResourceRequestStatus_requestToken' - A unique token used to track the progress of the resource operation+-- request.+--+-- Request tokens are included in the @ProgressEvent@ type returned by a+-- resource operation request.+newGetResourceRequestStatus ::+  -- | 'requestToken'+  Prelude.Text ->+  GetResourceRequestStatus+newGetResourceRequestStatus pRequestToken_ =+  GetResourceRequestStatus'+    { requestToken =+        pRequestToken_+    }++-- | A unique token used to track the progress of the resource operation+-- request.+--+-- Request tokens are included in the @ProgressEvent@ type returned by a+-- resource operation request.+getResourceRequestStatus_requestToken :: Lens.Lens' GetResourceRequestStatus Prelude.Text+getResourceRequestStatus_requestToken = Lens.lens (\GetResourceRequestStatus' {requestToken} -> requestToken) (\s@GetResourceRequestStatus' {} a -> s {requestToken = a} :: GetResourceRequestStatus)++instance Core.AWSRequest GetResourceRequestStatus where+  type+    AWSResponse GetResourceRequestStatus =+      GetResourceRequestStatusResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetResourceRequestStatusResponse'+            Prelude.<$> (x Data..?> "ProgressEvent")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetResourceRequestStatus where+  hashWithSalt _salt GetResourceRequestStatus' {..} =+    _salt `Prelude.hashWithSalt` requestToken++instance Prelude.NFData GetResourceRequestStatus where+  rnf GetResourceRequestStatus' {..} =+    Prelude.rnf requestToken++instance Data.ToHeaders GetResourceRequestStatus where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "CloudApiService.GetResourceRequestStatus" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetResourceRequestStatus where+  toJSON GetResourceRequestStatus' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("RequestToken" Data..= requestToken)]+      )++instance Data.ToPath GetResourceRequestStatus where+  toPath = Prelude.const "/"++instance Data.ToQuery GetResourceRequestStatus where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetResourceRequestStatusResponse' smart constructor.+data GetResourceRequestStatusResponse = GetResourceRequestStatusResponse'+  { -- | Represents the current status of the resource operation request.+    progressEvent :: Prelude.Maybe ProgressEvent,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetResourceRequestStatusResponse' 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:+--+-- 'progressEvent', 'getResourceRequestStatusResponse_progressEvent' - Represents the current status of the resource operation request.+--+-- 'httpStatus', 'getResourceRequestStatusResponse_httpStatus' - The response's http status code.+newGetResourceRequestStatusResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetResourceRequestStatusResponse+newGetResourceRequestStatusResponse pHttpStatus_ =+  GetResourceRequestStatusResponse'+    { progressEvent =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Represents the current status of the resource operation request.+getResourceRequestStatusResponse_progressEvent :: Lens.Lens' GetResourceRequestStatusResponse (Prelude.Maybe ProgressEvent)+getResourceRequestStatusResponse_progressEvent = Lens.lens (\GetResourceRequestStatusResponse' {progressEvent} -> progressEvent) (\s@GetResourceRequestStatusResponse' {} a -> s {progressEvent = a} :: GetResourceRequestStatusResponse)++-- | The response's http status code.+getResourceRequestStatusResponse_httpStatus :: Lens.Lens' GetResourceRequestStatusResponse Prelude.Int+getResourceRequestStatusResponse_httpStatus = Lens.lens (\GetResourceRequestStatusResponse' {httpStatus} -> httpStatus) (\s@GetResourceRequestStatusResponse' {} a -> s {httpStatus = a} :: GetResourceRequestStatusResponse)++instance+  Prelude.NFData+    GetResourceRequestStatusResponse+  where+  rnf GetResourceRequestStatusResponse' {..} =+    Prelude.rnf progressEvent+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CloudControl/Lens.hs view
@@ -0,0 +1,118 @@+{-# 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.CloudControl.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.CloudControl.Lens+  ( -- * Operations++    -- ** CancelResourceRequest+    cancelResourceRequest_requestToken,+    cancelResourceRequestResponse_progressEvent,+    cancelResourceRequestResponse_httpStatus,++    -- ** CreateResource+    createResource_clientToken,+    createResource_roleArn,+    createResource_typeVersionId,+    createResource_typeName,+    createResource_desiredState,+    createResourceResponse_progressEvent,+    createResourceResponse_httpStatus,++    -- ** DeleteResource+    deleteResource_clientToken,+    deleteResource_roleArn,+    deleteResource_typeVersionId,+    deleteResource_typeName,+    deleteResource_identifier,+    deleteResourceResponse_progressEvent,+    deleteResourceResponse_httpStatus,++    -- ** GetResource+    getResource_roleArn,+    getResource_typeVersionId,+    getResource_typeName,+    getResource_identifier,+    getResourceResponse_resourceDescription,+    getResourceResponse_typeName,+    getResourceResponse_httpStatus,++    -- ** GetResourceRequestStatus+    getResourceRequestStatus_requestToken,+    getResourceRequestStatusResponse_progressEvent,+    getResourceRequestStatusResponse_httpStatus,++    -- ** ListResourceRequests+    listResourceRequests_maxResults,+    listResourceRequests_nextToken,+    listResourceRequests_resourceRequestStatusFilter,+    listResourceRequestsResponse_nextToken,+    listResourceRequestsResponse_resourceRequestStatusSummaries,+    listResourceRequestsResponse_httpStatus,++    -- ** ListResources+    listResources_maxResults,+    listResources_nextToken,+    listResources_resourceModel,+    listResources_roleArn,+    listResources_typeVersionId,+    listResources_typeName,+    listResourcesResponse_nextToken,+    listResourcesResponse_resourceDescriptions,+    listResourcesResponse_typeName,+    listResourcesResponse_httpStatus,++    -- ** UpdateResource+    updateResource_clientToken,+    updateResource_roleArn,+    updateResource_typeVersionId,+    updateResource_typeName,+    updateResource_identifier,+    updateResource_patchDocument,+    updateResourceResponse_progressEvent,+    updateResourceResponse_httpStatus,++    -- * Types++    -- ** ProgressEvent+    progressEvent_errorCode,+    progressEvent_eventTime,+    progressEvent_identifier,+    progressEvent_operation,+    progressEvent_operationStatus,+    progressEvent_requestToken,+    progressEvent_resourceModel,+    progressEvent_retryAfter,+    progressEvent_statusMessage,+    progressEvent_typeName,++    -- ** ResourceDescription+    resourceDescription_identifier,+    resourceDescription_properties,++    -- ** ResourceRequestStatusFilter+    resourceRequestStatusFilter_operationStatuses,+    resourceRequestStatusFilter_operations,+  )+where++import Amazonka.CloudControl.CancelResourceRequest+import Amazonka.CloudControl.CreateResource+import Amazonka.CloudControl.DeleteResource+import Amazonka.CloudControl.GetResource+import Amazonka.CloudControl.GetResourceRequestStatus+import Amazonka.CloudControl.ListResourceRequests+import Amazonka.CloudControl.ListResources+import Amazonka.CloudControl.Types.ProgressEvent+import Amazonka.CloudControl.Types.ResourceDescription+import Amazonka.CloudControl.Types.ResourceRequestStatusFilter+import Amazonka.CloudControl.UpdateResource
+ gen/Amazonka/CloudControl/ListResourceRequests.hs view
@@ -0,0 +1,285 @@+{-# 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.CloudControl.ListResourceRequests+-- 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 existing resource operation requests. This includes requests of+-- all status types. For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-list Listing active resource operation requests>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- Resource operation requests expire after 7 days.+--+-- This operation returns paginated results.+module Amazonka.CloudControl.ListResourceRequests+  ( -- * Creating a Request+    ListResourceRequests (..),+    newListResourceRequests,++    -- * Request Lenses+    listResourceRequests_maxResults,+    listResourceRequests_nextToken,+    listResourceRequests_resourceRequestStatusFilter,++    -- * Destructuring the Response+    ListResourceRequestsResponse (..),+    newListResourceRequestsResponse,++    -- * Response Lenses+    listResourceRequestsResponse_nextToken,+    listResourceRequestsResponse_resourceRequestStatusSummaries,+    listResourceRequestsResponse_httpStatus,+  )+where++import Amazonka.CloudControl.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListResourceRequests' smart constructor.+data ListResourceRequests = ListResourceRequests'+  { -- | The maximum number of results to be returned with a single call. If the+    -- number of available results exceeds this maximum, the response includes+    -- a @NextToken@ value that you can assign to the @NextToken@ request+    -- parameter to get the next set of results.+    --+    -- The default is @20@.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | If the previous paginated request didn\'t return all of the remaining+    -- results, the response object\'s @NextToken@ parameter value is set to a+    -- token. To retrieve the next set of results, call this action again and+    -- assign that token to the request object\'s @NextToken@ parameter. If+    -- there are no remaining results, the previous response object\'s+    -- @NextToken@ parameter is set to @null@.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The filter criteria to apply to the requests returned.+    resourceRequestStatusFilter :: Prelude.Maybe ResourceRequestStatusFilter+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResourceRequests' 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', 'listResourceRequests_maxResults' - The maximum number of results to be returned with a single call. If the+-- number of available results exceeds this maximum, the response includes+-- a @NextToken@ value that you can assign to the @NextToken@ request+-- parameter to get the next set of results.+--+-- The default is @20@.+--+-- 'nextToken', 'listResourceRequests_nextToken' - If the previous paginated request didn\'t return all of the remaining+-- results, the response object\'s @NextToken@ parameter value is set to a+-- token. To retrieve the next set of results, call this action again and+-- assign that token to the request object\'s @NextToken@ parameter. If+-- there are no remaining results, the previous response object\'s+-- @NextToken@ parameter is set to @null@.+--+-- 'resourceRequestStatusFilter', 'listResourceRequests_resourceRequestStatusFilter' - The filter criteria to apply to the requests returned.+newListResourceRequests ::+  ListResourceRequests+newListResourceRequests =+  ListResourceRequests'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      resourceRequestStatusFilter = Prelude.Nothing+    }++-- | The maximum number of results to be returned with a single call. If the+-- number of available results exceeds this maximum, the response includes+-- a @NextToken@ value that you can assign to the @NextToken@ request+-- parameter to get the next set of results.+--+-- The default is @20@.+listResourceRequests_maxResults :: Lens.Lens' ListResourceRequests (Prelude.Maybe Prelude.Natural)+listResourceRequests_maxResults = Lens.lens (\ListResourceRequests' {maxResults} -> maxResults) (\s@ListResourceRequests' {} a -> s {maxResults = a} :: ListResourceRequests)++-- | If the previous paginated request didn\'t return all of the remaining+-- results, the response object\'s @NextToken@ parameter value is set to a+-- token. To retrieve the next set of results, call this action again and+-- assign that token to the request object\'s @NextToken@ parameter. If+-- there are no remaining results, the previous response object\'s+-- @NextToken@ parameter is set to @null@.+listResourceRequests_nextToken :: Lens.Lens' ListResourceRequests (Prelude.Maybe Prelude.Text)+listResourceRequests_nextToken = Lens.lens (\ListResourceRequests' {nextToken} -> nextToken) (\s@ListResourceRequests' {} a -> s {nextToken = a} :: ListResourceRequests)++-- | The filter criteria to apply to the requests returned.+listResourceRequests_resourceRequestStatusFilter :: Lens.Lens' ListResourceRequests (Prelude.Maybe ResourceRequestStatusFilter)+listResourceRequests_resourceRequestStatusFilter = Lens.lens (\ListResourceRequests' {resourceRequestStatusFilter} -> resourceRequestStatusFilter) (\s@ListResourceRequests' {} a -> s {resourceRequestStatusFilter = a} :: ListResourceRequests)++instance Core.AWSPager ListResourceRequests where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listResourceRequestsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listResourceRequestsResponse_resourceRequestStatusSummaries+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listResourceRequests_nextToken+          Lens..~ rs+          Lens.^? listResourceRequestsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListResourceRequests where+  type+    AWSResponse ListResourceRequests =+      ListResourceRequestsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListResourceRequestsResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> ( x+                            Data..?> "ResourceRequestStatusSummaries"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListResourceRequests where+  hashWithSalt _salt ListResourceRequests' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` resourceRequestStatusFilter++instance Prelude.NFData ListResourceRequests where+  rnf ListResourceRequests' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceRequestStatusFilter++instance Data.ToHeaders ListResourceRequests where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "CloudApiService.ListResourceRequests" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListResourceRequests where+  toJSON ListResourceRequests' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("MaxResults" Data..=) Prelude.<$> maxResults,+            ("NextToken" Data..=) Prelude.<$> nextToken,+            ("ResourceRequestStatusFilter" Data..=)+              Prelude.<$> resourceRequestStatusFilter+          ]+      )++instance Data.ToPath ListResourceRequests where+  toPath = Prelude.const "/"++instance Data.ToQuery ListResourceRequests where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListResourceRequestsResponse' smart constructor.+data ListResourceRequestsResponse = ListResourceRequestsResponse'+  { -- | If the request doesn\'t return all of the remaining results, @NextToken@+    -- is set to a token. To retrieve the next set of results, call+    -- @ListResources@ again and assign that token to the request object\'s+    -- @NextToken@ parameter. If the request returns all results, @NextToken@+    -- is set to null.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The requests that match the specified filter criteria.+    resourceRequestStatusSummaries :: Prelude.Maybe [ProgressEvent],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResourceRequestsResponse' 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', 'listResourceRequestsResponse_nextToken' - If the request doesn\'t return all of the remaining results, @NextToken@+-- is set to a token. To retrieve the next set of results, call+-- @ListResources@ again and assign that token to the request object\'s+-- @NextToken@ parameter. If the request returns all results, @NextToken@+-- is set to null.+--+-- 'resourceRequestStatusSummaries', 'listResourceRequestsResponse_resourceRequestStatusSummaries' - The requests that match the specified filter criteria.+--+-- 'httpStatus', 'listResourceRequestsResponse_httpStatus' - The response's http status code.+newListResourceRequestsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListResourceRequestsResponse+newListResourceRequestsResponse pHttpStatus_ =+  ListResourceRequestsResponse'+    { nextToken =+        Prelude.Nothing,+      resourceRequestStatusSummaries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If the request doesn\'t return all of the remaining results, @NextToken@+-- is set to a token. To retrieve the next set of results, call+-- @ListResources@ again and assign that token to the request object\'s+-- @NextToken@ parameter. If the request returns all results, @NextToken@+-- is set to null.+listResourceRequestsResponse_nextToken :: Lens.Lens' ListResourceRequestsResponse (Prelude.Maybe Prelude.Text)+listResourceRequestsResponse_nextToken = Lens.lens (\ListResourceRequestsResponse' {nextToken} -> nextToken) (\s@ListResourceRequestsResponse' {} a -> s {nextToken = a} :: ListResourceRequestsResponse)++-- | The requests that match the specified filter criteria.+listResourceRequestsResponse_resourceRequestStatusSummaries :: Lens.Lens' ListResourceRequestsResponse (Prelude.Maybe [ProgressEvent])+listResourceRequestsResponse_resourceRequestStatusSummaries = Lens.lens (\ListResourceRequestsResponse' {resourceRequestStatusSummaries} -> resourceRequestStatusSummaries) (\s@ListResourceRequestsResponse' {} a -> s {resourceRequestStatusSummaries = a} :: ListResourceRequestsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listResourceRequestsResponse_httpStatus :: Lens.Lens' ListResourceRequestsResponse Prelude.Int+listResourceRequestsResponse_httpStatus = Lens.lens (\ListResourceRequestsResponse' {httpStatus} -> httpStatus) (\s@ListResourceRequestsResponse' {} a -> s {httpStatus = a} :: ListResourceRequestsResponse)++instance Prelude.NFData ListResourceRequestsResponse where+  rnf ListResourceRequestsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceRequestStatusSummaries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CloudControl/ListResources.hs view
@@ -0,0 +1,373 @@+{-# 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.CloudControl.ListResources+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about the specified resources. For more information,+-- see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-list.html Discovering resources>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- You can use this action to return information about existing resources+-- in your account and Amazon Web Services Region, whether those resources+-- were provisioned using Cloud Control API.+--+-- This operation returns paginated results.+module Amazonka.CloudControl.ListResources+  ( -- * Creating a Request+    ListResources (..),+    newListResources,++    -- * Request Lenses+    listResources_maxResults,+    listResources_nextToken,+    listResources_resourceModel,+    listResources_roleArn,+    listResources_typeVersionId,+    listResources_typeName,++    -- * Destructuring the Response+    ListResourcesResponse (..),+    newListResourcesResponse,++    -- * Response Lenses+    listResourcesResponse_nextToken,+    listResourcesResponse_resourceDescriptions,+    listResourcesResponse_typeName,+    listResourcesResponse_httpStatus,+  )+where++import Amazonka.CloudControl.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListResources' smart constructor.+data ListResources = ListResources'+  { -- | Reserved.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | If the previous paginated request didn\'t return all of the remaining+    -- results, the response object\'s @NextToken@ parameter value is set to a+    -- token. To retrieve the next set of results, call this action again and+    -- assign that token to the request object\'s @NextToken@ parameter. If+    -- there are no remaining results, the previous response object\'s+    -- @NextToken@ parameter is set to @null@.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The resource model to use to select the resources to return.+    resourceModel :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The Amazon Resource Name (ARN) of the Identity and Access Management+    -- (IAM) role for Cloud Control API to use when performing this resource+    -- operation. The role specified must have the permissions required for+    -- this operation. The necessary permissions for each event handler are+    -- defined in the+    -- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+    -- section of the+    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+    --+    -- If you do not specify a role, Cloud Control API uses a temporary session+    -- created using your Amazon Web Services user credentials.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    roleArn :: Prelude.Maybe Prelude.Text,+    -- | For private resource types, the type version to use in this resource+    -- operation. If you do not specify a resource version, CloudFormation uses+    -- the default version.+    typeVersionId :: Prelude.Maybe Prelude.Text,+    -- | The name of the resource type.+    typeName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResources' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listResources_maxResults' - Reserved.+--+-- 'nextToken', 'listResources_nextToken' - If the previous paginated request didn\'t return all of the remaining+-- results, the response object\'s @NextToken@ parameter value is set to a+-- token. To retrieve the next set of results, call this action again and+-- assign that token to the request object\'s @NextToken@ parameter. If+-- there are no remaining results, the previous response object\'s+-- @NextToken@ parameter is set to @null@.+--+-- 'resourceModel', 'listResources_resourceModel' - The resource model to use to select the resources to return.+--+-- 'roleArn', 'listResources_roleArn' - The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'typeVersionId', 'listResources_typeVersionId' - For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+--+-- 'typeName', 'listResources_typeName' - The name of the resource type.+newListResources ::+  -- | 'typeName'+  Prelude.Text ->+  ListResources+newListResources pTypeName_ =+  ListResources'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      resourceModel = Prelude.Nothing,+      roleArn = Prelude.Nothing,+      typeVersionId = Prelude.Nothing,+      typeName = pTypeName_+    }++-- | Reserved.+listResources_maxResults :: Lens.Lens' ListResources (Prelude.Maybe Prelude.Natural)+listResources_maxResults = Lens.lens (\ListResources' {maxResults} -> maxResults) (\s@ListResources' {} a -> s {maxResults = a} :: ListResources)++-- | If the previous paginated request didn\'t return all of the remaining+-- results, the response object\'s @NextToken@ parameter value is set to a+-- token. To retrieve the next set of results, call this action again and+-- assign that token to the request object\'s @NextToken@ parameter. If+-- there are no remaining results, the previous response object\'s+-- @NextToken@ parameter is set to @null@.+listResources_nextToken :: Lens.Lens' ListResources (Prelude.Maybe Prelude.Text)+listResources_nextToken = Lens.lens (\ListResources' {nextToken} -> nextToken) (\s@ListResources' {} a -> s {nextToken = a} :: ListResources)++-- | The resource model to use to select the resources to return.+listResources_resourceModel :: Lens.Lens' ListResources (Prelude.Maybe Prelude.Text)+listResources_resourceModel = Lens.lens (\ListResources' {resourceModel} -> resourceModel) (\s@ListResources' {} a -> s {resourceModel = a} :: ListResources) Prelude.. Lens.mapping Data._Sensitive++-- | The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+listResources_roleArn :: Lens.Lens' ListResources (Prelude.Maybe Prelude.Text)+listResources_roleArn = Lens.lens (\ListResources' {roleArn} -> roleArn) (\s@ListResources' {} a -> s {roleArn = a} :: ListResources)++-- | For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+listResources_typeVersionId :: Lens.Lens' ListResources (Prelude.Maybe Prelude.Text)+listResources_typeVersionId = Lens.lens (\ListResources' {typeVersionId} -> typeVersionId) (\s@ListResources' {} a -> s {typeVersionId = a} :: ListResources)++-- | The name of the resource type.+listResources_typeName :: Lens.Lens' ListResources Prelude.Text+listResources_typeName = Lens.lens (\ListResources' {typeName} -> typeName) (\s@ListResources' {} a -> s {typeName = a} :: ListResources)++instance Core.AWSPager ListResources where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listResourcesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listResourcesResponse_resourceDescriptions+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listResources_nextToken+          Lens..~ rs+          Lens.^? listResourcesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListResources where+  type+    AWSResponse ListResources =+      ListResourcesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListResourcesResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> ( x+                            Data..?> "ResourceDescriptions"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (x Data..?> "TypeName")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListResources where+  hashWithSalt _salt ListResources' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` resourceModel+      `Prelude.hashWithSalt` roleArn+      `Prelude.hashWithSalt` typeVersionId+      `Prelude.hashWithSalt` typeName++instance Prelude.NFData ListResources where+  rnf ListResources' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceModel+      `Prelude.seq` Prelude.rnf roleArn+      `Prelude.seq` Prelude.rnf typeVersionId+      `Prelude.seq` Prelude.rnf typeName++instance Data.ToHeaders ListResources where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "CloudApiService.ListResources" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListResources where+  toJSON ListResources' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("MaxResults" Data..=) Prelude.<$> maxResults,+            ("NextToken" Data..=) Prelude.<$> nextToken,+            ("ResourceModel" Data..=) Prelude.<$> resourceModel,+            ("RoleArn" Data..=) Prelude.<$> roleArn,+            ("TypeVersionId" Data..=) Prelude.<$> typeVersionId,+            Prelude.Just ("TypeName" Data..= typeName)+          ]+      )++instance Data.ToPath ListResources where+  toPath = Prelude.const "/"++instance Data.ToQuery ListResources where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListResourcesResponse' smart constructor.+data ListResourcesResponse = ListResourcesResponse'+  { -- | If the request doesn\'t return all of the remaining results, @NextToken@+    -- is set to a token. To retrieve the next set of results, call+    -- @ListResources@ again and assign that token to the request object\'s+    -- @NextToken@ parameter. If the request returns all results, @NextToken@+    -- is set to null.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Information about the specified resources, including primary identifier+    -- and resource model.+    resourceDescriptions :: Prelude.Maybe [ResourceDescription],+    -- | The name of the resource type.+    typeName :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListResourcesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listResourcesResponse_nextToken' - If the request doesn\'t return all of the remaining results, @NextToken@+-- is set to a token. To retrieve the next set of results, call+-- @ListResources@ again and assign that token to the request object\'s+-- @NextToken@ parameter. If the request returns all results, @NextToken@+-- is set to null.+--+-- 'resourceDescriptions', 'listResourcesResponse_resourceDescriptions' - Information about the specified resources, including primary identifier+-- and resource model.+--+-- 'typeName', 'listResourcesResponse_typeName' - The name of the resource type.+--+-- 'httpStatus', 'listResourcesResponse_httpStatus' - The response's http status code.+newListResourcesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListResourcesResponse+newListResourcesResponse pHttpStatus_ =+  ListResourcesResponse'+    { nextToken = Prelude.Nothing,+      resourceDescriptions = Prelude.Nothing,+      typeName = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | If the request doesn\'t return all of the remaining results, @NextToken@+-- is set to a token. To retrieve the next set of results, call+-- @ListResources@ again and assign that token to the request object\'s+-- @NextToken@ parameter. If the request returns all results, @NextToken@+-- is set to null.+listResourcesResponse_nextToken :: Lens.Lens' ListResourcesResponse (Prelude.Maybe Prelude.Text)+listResourcesResponse_nextToken = Lens.lens (\ListResourcesResponse' {nextToken} -> nextToken) (\s@ListResourcesResponse' {} a -> s {nextToken = a} :: ListResourcesResponse)++-- | Information about the specified resources, including primary identifier+-- and resource model.+listResourcesResponse_resourceDescriptions :: Lens.Lens' ListResourcesResponse (Prelude.Maybe [ResourceDescription])+listResourcesResponse_resourceDescriptions = Lens.lens (\ListResourcesResponse' {resourceDescriptions} -> resourceDescriptions) (\s@ListResourcesResponse' {} a -> s {resourceDescriptions = a} :: ListResourcesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The name of the resource type.+listResourcesResponse_typeName :: Lens.Lens' ListResourcesResponse (Prelude.Maybe Prelude.Text)+listResourcesResponse_typeName = Lens.lens (\ListResourcesResponse' {typeName} -> typeName) (\s@ListResourcesResponse' {} a -> s {typeName = a} :: ListResourcesResponse)++-- | The response's http status code.+listResourcesResponse_httpStatus :: Lens.Lens' ListResourcesResponse Prelude.Int+listResourcesResponse_httpStatus = Lens.lens (\ListResourcesResponse' {httpStatus} -> httpStatus) (\s@ListResourcesResponse' {} a -> s {httpStatus = a} :: ListResourcesResponse)++instance Prelude.NFData ListResourcesResponse where+  rnf ListResourcesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf resourceDescriptions+      `Prelude.seq` Prelude.rnf typeName+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CloudControl/Types.hs view
@@ -0,0 +1,326 @@+{-# 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.CloudControl.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.CloudControl.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _AlreadyExistsException,+    _ClientTokenConflictException,+    _ConcurrentModificationException,+    _ConcurrentOperationException,+    _GeneralServiceException,+    _HandlerFailureException,+    _HandlerInternalFailureException,+    _InvalidCredentialsException,+    _InvalidRequestException,+    _NetworkFailureException,+    _NotStabilizedException,+    _NotUpdatableException,+    _PrivateTypeException,+    _RequestTokenNotFoundException,+    _ResourceConflictException,+    _ResourceNotFoundException,+    _ServiceInternalErrorException,+    _ServiceLimitExceededException,+    _ThrottlingException,+    _TypeNotFoundException,+    _UnsupportedActionException,++    -- * HandlerErrorCode+    HandlerErrorCode (..),++    -- * Operation+    Operation (..),++    -- * OperationStatus+    OperationStatus (..),++    -- * ProgressEvent+    ProgressEvent (..),+    newProgressEvent,+    progressEvent_errorCode,+    progressEvent_eventTime,+    progressEvent_identifier,+    progressEvent_operation,+    progressEvent_operationStatus,+    progressEvent_requestToken,+    progressEvent_resourceModel,+    progressEvent_retryAfter,+    progressEvent_statusMessage,+    progressEvent_typeName,++    -- * ResourceDescription+    ResourceDescription (..),+    newResourceDescription,+    resourceDescription_identifier,+    resourceDescription_properties,++    -- * ResourceRequestStatusFilter+    ResourceRequestStatusFilter (..),+    newResourceRequestStatusFilter,+    resourceRequestStatusFilter_operationStatuses,+    resourceRequestStatusFilter_operations,+  )+where++import Amazonka.CloudControl.Types.HandlerErrorCode+import Amazonka.CloudControl.Types.Operation+import Amazonka.CloudControl.Types.OperationStatus+import Amazonka.CloudControl.Types.ProgressEvent+import Amazonka.CloudControl.Types.ResourceDescription+import Amazonka.CloudControl.Types.ResourceRequestStatusFilter+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2021-09-30@ of the Amazon Cloud Control API SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "CloudControl",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "cloudcontrolapi",+      Core.signingName = "cloudcontrolapi",+      Core.version = "2021-09-30",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseJSONError "CloudControl",+      Core.retry = retry+    }+  where+    retry =+      Core.Exponential+        { Core.base = 5.0e-2,+          Core.growth = 2,+          Core.attempts = 5,+          Core.check = check+        }+    check e+      | Lens.has (Core.hasStatus 502) e =+          Prelude.Just "bad_gateway"+      | Lens.has (Core.hasStatus 504) e =+          Prelude.Just "gateway_timeout"+      | Lens.has (Core.hasStatus 500) e =+          Prelude.Just "general_server_error"+      | Lens.has (Core.hasStatus 509) e =+          Prelude.Just "limit_exceeded"+      | Lens.has+          ( Core.hasCode "RequestThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "request_throttled_exception"+      | Lens.has (Core.hasStatus 503) e =+          Prelude.Just "service_unavailable"+      | Lens.has+          ( Core.hasCode "ThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttled_exception"+      | Lens.has+          ( Core.hasCode "Throttling"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling"+      | Lens.has+          ( Core.hasCode "ThrottlingException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling_exception"+      | Lens.has+          ( Core.hasCode+              "ProvisionedThroughputExceededException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throughput_exceeded"+      | Lens.has (Core.hasStatus 429) e =+          Prelude.Just "too_many_requests"+      | Prelude.otherwise = Prelude.Nothing++-- | The resource with the name requested already exists.+_AlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AlreadyExistsException =+  Core._MatchServiceError+    defaultService+    "AlreadyExistsException"++-- | The specified client token has already been used in another resource+-- request.+--+-- It\'s best practice for client tokens to be unique for each resource+-- operation request. However, client token expire after 36 hours.+_ClientTokenConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ClientTokenConflictException =+  Core._MatchServiceError+    defaultService+    "ClientTokenConflictException"++-- | The resource is currently being modified by another operation.+_ConcurrentModificationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConcurrentModificationException =+  Core._MatchServiceError+    defaultService+    "ConcurrentModificationException"++-- | Another resource operation is currently being performed on this+-- resource.+_ConcurrentOperationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConcurrentOperationException =+  Core._MatchServiceError+    defaultService+    "ConcurrentOperationException"++-- | The resource handler has returned that the downstream service generated+-- an error that doesn\'t map to any other handler error code.+_GeneralServiceException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_GeneralServiceException =+  Core._MatchServiceError+    defaultService+    "GeneralServiceException"++-- | The resource handler has failed without a returning a more specific+-- error code. This can include timeouts.+_HandlerFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_HandlerFailureException =+  Core._MatchServiceError+    defaultService+    "HandlerFailureException"++-- | The resource handler has returned that an unexpected error occurred+-- within the resource handler.+_HandlerInternalFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_HandlerInternalFailureException =+  Core._MatchServiceError+    defaultService+    "HandlerInternalFailureException"++-- | The resource handler has returned that the credentials provided by the+-- user are invalid.+_InvalidCredentialsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidCredentialsException =+  Core._MatchServiceError+    defaultService+    "InvalidCredentialsException"++-- | The resource handler has returned that invalid input from the user has+-- generated a generic exception.+_InvalidRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidRequestException =+  Core._MatchServiceError+    defaultService+    "InvalidRequestException"++-- | The resource handler has returned that the request couldn\'t be+-- completed due to networking issues, such as a failure to receive a+-- response from the server.+_NetworkFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_NetworkFailureException =+  Core._MatchServiceError+    defaultService+    "NetworkFailureException"++-- | The resource handler has returned that the downstream resource failed to+-- complete all of its ready-state checks.+_NotStabilizedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_NotStabilizedException =+  Core._MatchServiceError+    defaultService+    "NotStabilizedException"++-- | One or more properties included in this resource operation are defined+-- as create-only, and therefore can\'t be updated.+_NotUpdatableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_NotUpdatableException =+  Core._MatchServiceError+    defaultService+    "NotUpdatableException"++-- | Cloud Control API hasn\'t received a valid response from the resource+-- handler, due to a configuration error. This includes issues such as the+-- resource handler returning an invalid response, or timing out.+_PrivateTypeException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_PrivateTypeException =+  Core._MatchServiceError+    defaultService+    "PrivateTypeException"++-- | A resource operation with the specified request token can\'t be found.+_RequestTokenNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_RequestTokenNotFoundException =+  Core._MatchServiceError+    defaultService+    "RequestTokenNotFoundException"++-- | The resource is temporarily unavailable to be acted upon. For example,+-- if the resource is currently undergoing an operation and can\'t be acted+-- upon until that operation is finished.+_ResourceConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceConflictException =+  Core._MatchServiceError+    defaultService+    "ResourceConflictException"++-- | A resource with the specified identifier can\'t be found.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceNotFoundException"++-- | The resource handler has returned that the downstream service returned+-- an internal error, typically with a @5XX HTTP@ status code.+_ServiceInternalErrorException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceInternalErrorException =+  Core._MatchServiceError+    defaultService+    "ServiceInternalErrorException"++-- | The resource handler has returned that a non-transient resource limit+-- was reached on the service side.+_ServiceLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceLimitExceededException =+  Core._MatchServiceError+    defaultService+    "ServiceLimitExceededException"++-- | The request was denied due to request throttling.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+  Core._MatchServiceError+    defaultService+    "ThrottlingException"++-- | The specified extension doesn\'t exist in the CloudFormation registry.+_TypeNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TypeNotFoundException =+  Core._MatchServiceError+    defaultService+    "TypeNotFoundException"++-- | The specified resource doesn\'t support this resource operation.+_UnsupportedActionException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_UnsupportedActionException =+  Core._MatchServiceError+    defaultService+    "UnsupportedActionException"
+ gen/Amazonka/CloudControl/Types/HandlerErrorCode.hs view
@@ -0,0 +1,136 @@+{-# 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.CloudControl.Types.HandlerErrorCode+-- 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.CloudControl.Types.HandlerErrorCode+  ( HandlerErrorCode+      ( ..,+        HandlerErrorCode_AccessDenied,+        HandlerErrorCode_AlreadyExists,+        HandlerErrorCode_GeneralServiceException,+        HandlerErrorCode_InternalFailure,+        HandlerErrorCode_InvalidCredentials,+        HandlerErrorCode_InvalidRequest,+        HandlerErrorCode_NetworkFailure,+        HandlerErrorCode_NotFound,+        HandlerErrorCode_NotStabilized,+        HandlerErrorCode_NotUpdatable,+        HandlerErrorCode_ResourceConflict,+        HandlerErrorCode_ServiceInternalError,+        HandlerErrorCode_ServiceLimitExceeded,+        HandlerErrorCode_ServiceTimeout,+        HandlerErrorCode_Throttling+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype HandlerErrorCode = HandlerErrorCode'+  { fromHandlerErrorCode ::+      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 HandlerErrorCode_AccessDenied :: HandlerErrorCode+pattern HandlerErrorCode_AccessDenied = HandlerErrorCode' "AccessDenied"++pattern HandlerErrorCode_AlreadyExists :: HandlerErrorCode+pattern HandlerErrorCode_AlreadyExists = HandlerErrorCode' "AlreadyExists"++pattern HandlerErrorCode_GeneralServiceException :: HandlerErrorCode+pattern HandlerErrorCode_GeneralServiceException = HandlerErrorCode' "GeneralServiceException"++pattern HandlerErrorCode_InternalFailure :: HandlerErrorCode+pattern HandlerErrorCode_InternalFailure = HandlerErrorCode' "InternalFailure"++pattern HandlerErrorCode_InvalidCredentials :: HandlerErrorCode+pattern HandlerErrorCode_InvalidCredentials = HandlerErrorCode' "InvalidCredentials"++pattern HandlerErrorCode_InvalidRequest :: HandlerErrorCode+pattern HandlerErrorCode_InvalidRequest = HandlerErrorCode' "InvalidRequest"++pattern HandlerErrorCode_NetworkFailure :: HandlerErrorCode+pattern HandlerErrorCode_NetworkFailure = HandlerErrorCode' "NetworkFailure"++pattern HandlerErrorCode_NotFound :: HandlerErrorCode+pattern HandlerErrorCode_NotFound = HandlerErrorCode' "NotFound"++pattern HandlerErrorCode_NotStabilized :: HandlerErrorCode+pattern HandlerErrorCode_NotStabilized = HandlerErrorCode' "NotStabilized"++pattern HandlerErrorCode_NotUpdatable :: HandlerErrorCode+pattern HandlerErrorCode_NotUpdatable = HandlerErrorCode' "NotUpdatable"++pattern HandlerErrorCode_ResourceConflict :: HandlerErrorCode+pattern HandlerErrorCode_ResourceConflict = HandlerErrorCode' "ResourceConflict"++pattern HandlerErrorCode_ServiceInternalError :: HandlerErrorCode+pattern HandlerErrorCode_ServiceInternalError = HandlerErrorCode' "ServiceInternalError"++pattern HandlerErrorCode_ServiceLimitExceeded :: HandlerErrorCode+pattern HandlerErrorCode_ServiceLimitExceeded = HandlerErrorCode' "ServiceLimitExceeded"++pattern HandlerErrorCode_ServiceTimeout :: HandlerErrorCode+pattern HandlerErrorCode_ServiceTimeout = HandlerErrorCode' "ServiceTimeout"++pattern HandlerErrorCode_Throttling :: HandlerErrorCode+pattern HandlerErrorCode_Throttling = HandlerErrorCode' "Throttling"++{-# COMPLETE+  HandlerErrorCode_AccessDenied,+  HandlerErrorCode_AlreadyExists,+  HandlerErrorCode_GeneralServiceException,+  HandlerErrorCode_InternalFailure,+  HandlerErrorCode_InvalidCredentials,+  HandlerErrorCode_InvalidRequest,+  HandlerErrorCode_NetworkFailure,+  HandlerErrorCode_NotFound,+  HandlerErrorCode_NotStabilized,+  HandlerErrorCode_NotUpdatable,+  HandlerErrorCode_ResourceConflict,+  HandlerErrorCode_ServiceInternalError,+  HandlerErrorCode_ServiceLimitExceeded,+  HandlerErrorCode_ServiceTimeout,+  HandlerErrorCode_Throttling,+  HandlerErrorCode'+  #-}
+ gen/Amazonka/CloudControl/Types/Operation.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.CloudControl.Types.Operation+-- 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.CloudControl.Types.Operation+  ( Operation+      ( ..,+        Operation_CREATE,+        Operation_DELETE,+        Operation_UPDATE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Operation = Operation'+  { fromOperation ::+      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 Operation_CREATE :: Operation+pattern Operation_CREATE = Operation' "CREATE"++pattern Operation_DELETE :: Operation+pattern Operation_DELETE = Operation' "DELETE"++pattern Operation_UPDATE :: Operation+pattern Operation_UPDATE = Operation' "UPDATE"++{-# COMPLETE+  Operation_CREATE,+  Operation_DELETE,+  Operation_UPDATE,+  Operation'+  #-}
+ gen/Amazonka/CloudControl/Types/OperationStatus.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CloudControl.Types.OperationStatus+-- 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.CloudControl.Types.OperationStatus+  ( OperationStatus+      ( ..,+        OperationStatus_CANCEL_COMPLETE,+        OperationStatus_CANCEL_IN_PROGRESS,+        OperationStatus_FAILED,+        OperationStatus_IN_PROGRESS,+        OperationStatus_PENDING,+        OperationStatus_SUCCESS+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype OperationStatus = OperationStatus'+  { fromOperationStatus ::+      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 OperationStatus_CANCEL_COMPLETE :: OperationStatus+pattern OperationStatus_CANCEL_COMPLETE = OperationStatus' "CANCEL_COMPLETE"++pattern OperationStatus_CANCEL_IN_PROGRESS :: OperationStatus+pattern OperationStatus_CANCEL_IN_PROGRESS = OperationStatus' "CANCEL_IN_PROGRESS"++pattern OperationStatus_FAILED :: OperationStatus+pattern OperationStatus_FAILED = OperationStatus' "FAILED"++pattern OperationStatus_IN_PROGRESS :: OperationStatus+pattern OperationStatus_IN_PROGRESS = OperationStatus' "IN_PROGRESS"++pattern OperationStatus_PENDING :: OperationStatus+pattern OperationStatus_PENDING = OperationStatus' "PENDING"++pattern OperationStatus_SUCCESS :: OperationStatus+pattern OperationStatus_SUCCESS = OperationStatus' "SUCCESS"++{-# COMPLETE+  OperationStatus_CANCEL_COMPLETE,+  OperationStatus_CANCEL_IN_PROGRESS,+  OperationStatus_FAILED,+  OperationStatus_IN_PROGRESS,+  OperationStatus_PENDING,+  OperationStatus_SUCCESS,+  OperationStatus'+  #-}
+ gen/Amazonka/CloudControl/Types/ProgressEvent.hs view
@@ -0,0 +1,267 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CloudControl.Types.ProgressEvent+-- 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.CloudControl.Types.ProgressEvent where++import Amazonka.CloudControl.Types.HandlerErrorCode+import Amazonka.CloudControl.Types.Operation+import Amazonka.CloudControl.Types.OperationStatus+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++-- | Represents the current status of a resource operation request. For more+-- information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html Managing resource operation requests>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- /See:/ 'newProgressEvent' smart constructor.+data ProgressEvent = ProgressEvent'+  { -- | For requests with a status of @FAILED@, the associated error code.+    --+    -- For error code definitions, see+    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-test-contract-errors.html Handler error codes>+    -- in the /CloudFormation Command Line Interface User Guide for Extension+    -- Development/.+    errorCode :: Prelude.Maybe HandlerErrorCode,+    -- | When the resource operation request was initiated.+    eventTime :: Prelude.Maybe Data.POSIX,+    -- | The primary identifier for the resource.+    --+    -- In some cases, the resource identifier may be available before the+    -- resource operation has reached a status of @SUCCESS@.+    identifier :: Prelude.Maybe Prelude.Text,+    -- | The resource operation type.+    operation :: Prelude.Maybe Operation,+    -- | The current status of the resource operation request.+    --+    -- -   @PENDING@: The resource operation hasn\'t yet started.+    --+    -- -   @IN_PROGRESS@: The resource operation is currently in progress.+    --+    -- -   @SUCCESS@: The resource operation has successfully completed.+    --+    -- -   @FAILED@: The resource operation has failed. Refer to the error code+    --     and status message for more information.+    --+    -- -   @CANCEL_IN_PROGRESS@: The resource operation is in the process of+    --     being canceled.+    --+    -- -   @CANCEL_COMPLETE@: The resource operation has been canceled.+    operationStatus :: Prelude.Maybe OperationStatus,+    -- | The unique token representing this resource operation request.+    --+    -- Use the @RequestToken@ with+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+    -- to return the current status of a resource operation request.+    requestToken :: Prelude.Maybe Prelude.Text,+    -- | A JSON string containing the resource model, consisting of each resource+    -- property and its current value.+    resourceModel :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | When to next request the status of this resource operation request.+    retryAfter :: Prelude.Maybe Data.POSIX,+    -- | Any message explaining the current status.+    statusMessage :: Prelude.Maybe Prelude.Text,+    -- | The name of the resource type used in the operation.+    typeName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ProgressEvent' 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:+--+-- 'errorCode', 'progressEvent_errorCode' - For requests with a status of @FAILED@, the associated error code.+--+-- For error code definitions, see+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-test-contract-errors.html Handler error codes>+-- in the /CloudFormation Command Line Interface User Guide for Extension+-- Development/.+--+-- 'eventTime', 'progressEvent_eventTime' - When the resource operation request was initiated.+--+-- 'identifier', 'progressEvent_identifier' - The primary identifier for the resource.+--+-- In some cases, the resource identifier may be available before the+-- resource operation has reached a status of @SUCCESS@.+--+-- 'operation', 'progressEvent_operation' - The resource operation type.+--+-- 'operationStatus', 'progressEvent_operationStatus' - The current status of the resource operation request.+--+-- -   @PENDING@: The resource operation hasn\'t yet started.+--+-- -   @IN_PROGRESS@: The resource operation is currently in progress.+--+-- -   @SUCCESS@: The resource operation has successfully completed.+--+-- -   @FAILED@: The resource operation has failed. Refer to the error code+--     and status message for more information.+--+-- -   @CANCEL_IN_PROGRESS@: The resource operation is in the process of+--     being canceled.+--+-- -   @CANCEL_COMPLETE@: The resource operation has been canceled.+--+-- 'requestToken', 'progressEvent_requestToken' - The unique token representing this resource operation request.+--+-- Use the @RequestToken@ with+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- to return the current status of a resource operation request.+--+-- 'resourceModel', 'progressEvent_resourceModel' - A JSON string containing the resource model, consisting of each resource+-- property and its current value.+--+-- 'retryAfter', 'progressEvent_retryAfter' - When to next request the status of this resource operation request.+--+-- 'statusMessage', 'progressEvent_statusMessage' - Any message explaining the current status.+--+-- 'typeName', 'progressEvent_typeName' - The name of the resource type used in the operation.+newProgressEvent ::+  ProgressEvent+newProgressEvent =+  ProgressEvent'+    { errorCode = Prelude.Nothing,+      eventTime = Prelude.Nothing,+      identifier = Prelude.Nothing,+      operation = Prelude.Nothing,+      operationStatus = Prelude.Nothing,+      requestToken = Prelude.Nothing,+      resourceModel = Prelude.Nothing,+      retryAfter = Prelude.Nothing,+      statusMessage = Prelude.Nothing,+      typeName = Prelude.Nothing+    }++-- | For requests with a status of @FAILED@, the associated error code.+--+-- For error code definitions, see+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-test-contract-errors.html Handler error codes>+-- in the /CloudFormation Command Line Interface User Guide for Extension+-- Development/.+progressEvent_errorCode :: Lens.Lens' ProgressEvent (Prelude.Maybe HandlerErrorCode)+progressEvent_errorCode = Lens.lens (\ProgressEvent' {errorCode} -> errorCode) (\s@ProgressEvent' {} a -> s {errorCode = a} :: ProgressEvent)++-- | When the resource operation request was initiated.+progressEvent_eventTime :: Lens.Lens' ProgressEvent (Prelude.Maybe Prelude.UTCTime)+progressEvent_eventTime = Lens.lens (\ProgressEvent' {eventTime} -> eventTime) (\s@ProgressEvent' {} a -> s {eventTime = a} :: ProgressEvent) Prelude.. Lens.mapping Data._Time++-- | The primary identifier for the resource.+--+-- In some cases, the resource identifier may be available before the+-- resource operation has reached a status of @SUCCESS@.+progressEvent_identifier :: Lens.Lens' ProgressEvent (Prelude.Maybe Prelude.Text)+progressEvent_identifier = Lens.lens (\ProgressEvent' {identifier} -> identifier) (\s@ProgressEvent' {} a -> s {identifier = a} :: ProgressEvent)++-- | The resource operation type.+progressEvent_operation :: Lens.Lens' ProgressEvent (Prelude.Maybe Operation)+progressEvent_operation = Lens.lens (\ProgressEvent' {operation} -> operation) (\s@ProgressEvent' {} a -> s {operation = a} :: ProgressEvent)++-- | The current status of the resource operation request.+--+-- -   @PENDING@: The resource operation hasn\'t yet started.+--+-- -   @IN_PROGRESS@: The resource operation is currently in progress.+--+-- -   @SUCCESS@: The resource operation has successfully completed.+--+-- -   @FAILED@: The resource operation has failed. Refer to the error code+--     and status message for more information.+--+-- -   @CANCEL_IN_PROGRESS@: The resource operation is in the process of+--     being canceled.+--+-- -   @CANCEL_COMPLETE@: The resource operation has been canceled.+progressEvent_operationStatus :: Lens.Lens' ProgressEvent (Prelude.Maybe OperationStatus)+progressEvent_operationStatus = Lens.lens (\ProgressEvent' {operationStatus} -> operationStatus) (\s@ProgressEvent' {} a -> s {operationStatus = a} :: ProgressEvent)++-- | The unique token representing this resource operation request.+--+-- Use the @RequestToken@ with+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- to return the current status of a resource operation request.+progressEvent_requestToken :: Lens.Lens' ProgressEvent (Prelude.Maybe Prelude.Text)+progressEvent_requestToken = Lens.lens (\ProgressEvent' {requestToken} -> requestToken) (\s@ProgressEvent' {} a -> s {requestToken = a} :: ProgressEvent)++-- | A JSON string containing the resource model, consisting of each resource+-- property and its current value.+progressEvent_resourceModel :: Lens.Lens' ProgressEvent (Prelude.Maybe Prelude.Text)+progressEvent_resourceModel = Lens.lens (\ProgressEvent' {resourceModel} -> resourceModel) (\s@ProgressEvent' {} a -> s {resourceModel = a} :: ProgressEvent) Prelude.. Lens.mapping Data._Sensitive++-- | When to next request the status of this resource operation request.+progressEvent_retryAfter :: Lens.Lens' ProgressEvent (Prelude.Maybe Prelude.UTCTime)+progressEvent_retryAfter = Lens.lens (\ProgressEvent' {retryAfter} -> retryAfter) (\s@ProgressEvent' {} a -> s {retryAfter = a} :: ProgressEvent) Prelude.. Lens.mapping Data._Time++-- | Any message explaining the current status.+progressEvent_statusMessage :: Lens.Lens' ProgressEvent (Prelude.Maybe Prelude.Text)+progressEvent_statusMessage = Lens.lens (\ProgressEvent' {statusMessage} -> statusMessage) (\s@ProgressEvent' {} a -> s {statusMessage = a} :: ProgressEvent)++-- | The name of the resource type used in the operation.+progressEvent_typeName :: Lens.Lens' ProgressEvent (Prelude.Maybe Prelude.Text)+progressEvent_typeName = Lens.lens (\ProgressEvent' {typeName} -> typeName) (\s@ProgressEvent' {} a -> s {typeName = a} :: ProgressEvent)++instance Data.FromJSON ProgressEvent where+  parseJSON =+    Data.withObject+      "ProgressEvent"+      ( \x ->+          ProgressEvent'+            Prelude.<$> (x Data..:? "ErrorCode")+            Prelude.<*> (x Data..:? "EventTime")+            Prelude.<*> (x Data..:? "Identifier")+            Prelude.<*> (x Data..:? "Operation")+            Prelude.<*> (x Data..:? "OperationStatus")+            Prelude.<*> (x Data..:? "RequestToken")+            Prelude.<*> (x Data..:? "ResourceModel")+            Prelude.<*> (x Data..:? "RetryAfter")+            Prelude.<*> (x Data..:? "StatusMessage")+            Prelude.<*> (x Data..:? "TypeName")+      )++instance Prelude.Hashable ProgressEvent where+  hashWithSalt _salt ProgressEvent' {..} =+    _salt+      `Prelude.hashWithSalt` errorCode+      `Prelude.hashWithSalt` eventTime+      `Prelude.hashWithSalt` identifier+      `Prelude.hashWithSalt` operation+      `Prelude.hashWithSalt` operationStatus+      `Prelude.hashWithSalt` requestToken+      `Prelude.hashWithSalt` resourceModel+      `Prelude.hashWithSalt` retryAfter+      `Prelude.hashWithSalt` statusMessage+      `Prelude.hashWithSalt` typeName++instance Prelude.NFData ProgressEvent where+  rnf ProgressEvent' {..} =+    Prelude.rnf errorCode+      `Prelude.seq` Prelude.rnf eventTime+      `Prelude.seq` Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf operation+      `Prelude.seq` Prelude.rnf operationStatus+      `Prelude.seq` Prelude.rnf requestToken+      `Prelude.seq` Prelude.rnf resourceModel+      `Prelude.seq` Prelude.rnf retryAfter+      `Prelude.seq` Prelude.rnf statusMessage+      `Prelude.seq` Prelude.rnf typeName
+ gen/Amazonka/CloudControl/Types/ResourceDescription.hs view
@@ -0,0 +1,96 @@+{-# 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.CloudControl.Types.ResourceDescription+-- 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.CloudControl.Types.ResourceDescription 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++-- | Represents information about a provisioned resource.+--+-- /See:/ 'newResourceDescription' smart constructor.+data ResourceDescription = ResourceDescription'+  { -- | The primary identifier for the resource.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    identifier :: Prelude.Maybe Prelude.Text,+    -- | A list of the resource properties and their current values.+    properties :: Prelude.Maybe (Data.Sensitive Prelude.Text)+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceDescription' 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', 'resourceDescription_identifier' - The primary identifier for the resource.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'properties', 'resourceDescription_properties' - A list of the resource properties and their current values.+newResourceDescription ::+  ResourceDescription+newResourceDescription =+  ResourceDescription'+    { identifier = Prelude.Nothing,+      properties = Prelude.Nothing+    }++-- | The primary identifier for the resource.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+-- in the /Amazon Web Services Cloud Control API User Guide/.+resourceDescription_identifier :: Lens.Lens' ResourceDescription (Prelude.Maybe Prelude.Text)+resourceDescription_identifier = Lens.lens (\ResourceDescription' {identifier} -> identifier) (\s@ResourceDescription' {} a -> s {identifier = a} :: ResourceDescription)++-- | A list of the resource properties and their current values.+resourceDescription_properties :: Lens.Lens' ResourceDescription (Prelude.Maybe Prelude.Text)+resourceDescription_properties = Lens.lens (\ResourceDescription' {properties} -> properties) (\s@ResourceDescription' {} a -> s {properties = a} :: ResourceDescription) Prelude.. Lens.mapping Data._Sensitive++instance Data.FromJSON ResourceDescription where+  parseJSON =+    Data.withObject+      "ResourceDescription"+      ( \x ->+          ResourceDescription'+            Prelude.<$> (x Data..:? "Identifier")+            Prelude.<*> (x Data..:? "Properties")+      )++instance Prelude.Hashable ResourceDescription where+  hashWithSalt _salt ResourceDescription' {..} =+    _salt+      `Prelude.hashWithSalt` identifier+      `Prelude.hashWithSalt` properties++instance Prelude.NFData ResourceDescription where+  rnf ResourceDescription' {..} =+    Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf properties
+ gen/Amazonka/CloudControl/Types/ResourceRequestStatusFilter.hs view
@@ -0,0 +1,126 @@+{-# 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.CloudControl.Types.ResourceRequestStatusFilter+-- 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.CloudControl.Types.ResourceRequestStatusFilter where++import Amazonka.CloudControl.Types.Operation+import Amazonka.CloudControl.Types.OperationStatus+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The filter criteria to use in determining the requests returned.+--+-- /See:/ 'newResourceRequestStatusFilter' smart constructor.+data ResourceRequestStatusFilter = ResourceRequestStatusFilter'+  { -- | The operation statuses to include in the filter.+    --+    -- -   @PENDING@: The operation has been requested, but not yet initiated.+    --+    -- -   @IN_PROGRESS@: The operation is in progress.+    --+    -- -   @SUCCESS@: The operation completed.+    --+    -- -   @FAILED@: The operation failed.+    --+    -- -   @CANCEL_IN_PROGRESS@: The operation is in the process of being+    --     canceled.+    --+    -- -   @CANCEL_COMPLETE@: The operation has been canceled.+    operationStatuses :: Prelude.Maybe [OperationStatus],+    -- | The operation types to include in the filter.+    operations :: Prelude.Maybe [Operation]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceRequestStatusFilter' 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:+--+-- 'operationStatuses', 'resourceRequestStatusFilter_operationStatuses' - The operation statuses to include in the filter.+--+-- -   @PENDING@: The operation has been requested, but not yet initiated.+--+-- -   @IN_PROGRESS@: The operation is in progress.+--+-- -   @SUCCESS@: The operation completed.+--+-- -   @FAILED@: The operation failed.+--+-- -   @CANCEL_IN_PROGRESS@: The operation is in the process of being+--     canceled.+--+-- -   @CANCEL_COMPLETE@: The operation has been canceled.+--+-- 'operations', 'resourceRequestStatusFilter_operations' - The operation types to include in the filter.+newResourceRequestStatusFilter ::+  ResourceRequestStatusFilter+newResourceRequestStatusFilter =+  ResourceRequestStatusFilter'+    { operationStatuses =+        Prelude.Nothing,+      operations = Prelude.Nothing+    }++-- | The operation statuses to include in the filter.+--+-- -   @PENDING@: The operation has been requested, but not yet initiated.+--+-- -   @IN_PROGRESS@: The operation is in progress.+--+-- -   @SUCCESS@: The operation completed.+--+-- -   @FAILED@: The operation failed.+--+-- -   @CANCEL_IN_PROGRESS@: The operation is in the process of being+--     canceled.+--+-- -   @CANCEL_COMPLETE@: The operation has been canceled.+resourceRequestStatusFilter_operationStatuses :: Lens.Lens' ResourceRequestStatusFilter (Prelude.Maybe [OperationStatus])+resourceRequestStatusFilter_operationStatuses = Lens.lens (\ResourceRequestStatusFilter' {operationStatuses} -> operationStatuses) (\s@ResourceRequestStatusFilter' {} a -> s {operationStatuses = a} :: ResourceRequestStatusFilter) Prelude.. Lens.mapping Lens.coerced++-- | The operation types to include in the filter.+resourceRequestStatusFilter_operations :: Lens.Lens' ResourceRequestStatusFilter (Prelude.Maybe [Operation])+resourceRequestStatusFilter_operations = Lens.lens (\ResourceRequestStatusFilter' {operations} -> operations) (\s@ResourceRequestStatusFilter' {} a -> s {operations = a} :: ResourceRequestStatusFilter) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable ResourceRequestStatusFilter where+  hashWithSalt _salt ResourceRequestStatusFilter' {..} =+    _salt+      `Prelude.hashWithSalt` operationStatuses+      `Prelude.hashWithSalt` operations++instance Prelude.NFData ResourceRequestStatusFilter where+  rnf ResourceRequestStatusFilter' {..} =+    Prelude.rnf operationStatuses+      `Prelude.seq` Prelude.rnf operations++instance Data.ToJSON ResourceRequestStatusFilter where+  toJSON ResourceRequestStatusFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("OperationStatuses" Data..=)+              Prelude.<$> operationStatuses,+            ("Operations" Data..=) Prelude.<$> operations+          ]+      )
+ gen/Amazonka/CloudControl/UpdateResource.hs view
@@ -0,0 +1,424 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CloudControl.UpdateResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates the specified property values in the resource.+--+-- You specify your resource property updates as a list of patch operations+-- contained in a JSON patch document that adheres to the+-- <https://datatracker.ietf.org/doc/html/rfc6902 RFC 6902 - JavaScript Object Notation (JSON) Patch>+-- standard.+--+-- For details on how Cloud Control API performs resource update+-- operations, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html Updating a resource>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- After you have initiated a resource update request, you can monitor the+-- progress of your request by calling+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- using the @RequestToken@ of the @ProgressEvent@ returned by+-- @UpdateResource@.+--+-- For more information about the properties of a specific resource, refer+-- to the related topic for the resource in the+-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Resource and property types reference>+-- in the /CloudFormation Users Guide/.+module Amazonka.CloudControl.UpdateResource+  ( -- * Creating a Request+    UpdateResource (..),+    newUpdateResource,++    -- * Request Lenses+    updateResource_clientToken,+    updateResource_roleArn,+    updateResource_typeVersionId,+    updateResource_typeName,+    updateResource_identifier,+    updateResource_patchDocument,++    -- * Destructuring the Response+    UpdateResourceResponse (..),+    newUpdateResourceResponse,++    -- * Response Lenses+    updateResourceResponse_progressEvent,+    updateResourceResponse_httpStatus,+  )+where++import Amazonka.CloudControl.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateResource' smart constructor.+data UpdateResource = UpdateResource'+  { -- | A unique identifier to ensure the idempotency of the resource request.+    -- As a best practice, specify this token to ensure idempotency, so that+    -- Amazon Web Services Cloud Control API can accurately distinguish between+    -- request retries and new resource requests. You might retry a resource+    -- request to ensure that it was successfully received.+    --+    -- A client token is valid for 36 hours once used. After that, a resource+    -- request with the same client token is treated as a new request.+    --+    -- If you do not specify a client token, one is generated for inclusion in+    -- the request.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency Ensuring resource operation requests are unique>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    clientToken :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the Identity and Access Management+    -- (IAM) role for Cloud Control API to use when performing this resource+    -- operation. The role specified must have the permissions required for+    -- this operation. The necessary permissions for each event handler are+    -- defined in the+    -- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+    -- section of the+    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+    --+    -- If you do not specify a role, Cloud Control API uses a temporary session+    -- created using your Amazon Web Services user credentials.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    roleArn :: Prelude.Maybe Prelude.Text,+    -- | For private resource types, the type version to use in this resource+    -- operation. If you do not specify a resource version, CloudFormation uses+    -- the default version.+    typeVersionId :: Prelude.Maybe Prelude.Text,+    -- | The name of the resource type.+    typeName :: Prelude.Text,+    -- | The identifier for the resource.+    --+    -- You can specify the primary identifier, or any secondary identifier+    -- defined for the resource type in its resource schema. You can only+    -- specify one identifier. Primary identifiers can be specified as a string+    -- or JSON; secondary identifiers must be specified as JSON.+    --+    -- For compound primary identifiers (that is, one that consists of multiple+    -- resource properties strung together), to specify the primary identifier+    -- as a string, list the property values /in the order they are specified/+    -- in the primary identifier definition, separated by @|@.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    identifier :: Prelude.Text,+    -- | A JavaScript Object Notation (JSON) document listing the patch+    -- operations that represent the updates to apply to the current resource+    -- properties. For details, see+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch Composing the patch document>+    -- in the /Amazon Web Services Cloud Control API User Guide/.+    patchDocument :: Data.Sensitive Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'updateResource_clientToken' - A unique identifier to ensure the idempotency of the resource request.+-- As a best practice, specify this token to ensure idempotency, so that+-- Amazon Web Services Cloud Control API can accurately distinguish between+-- request retries and new resource requests. You might retry a resource+-- request to ensure that it was successfully received.+--+-- A client token is valid for 36 hours once used. After that, a resource+-- request with the same client token is treated as a new request.+--+-- If you do not specify a client token, one is generated for inclusion in+-- the request.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency Ensuring resource operation requests are unique>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'roleArn', 'updateResource_roleArn' - The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'typeVersionId', 'updateResource_typeVersionId' - For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+--+-- 'typeName', 'updateResource_typeName' - The name of the resource type.+--+-- 'identifier', 'updateResource_identifier' - The identifier for the resource.+--+-- You can specify the primary identifier, or any secondary identifier+-- defined for the resource type in its resource schema. You can only+-- specify one identifier. Primary identifiers can be specified as a string+-- or JSON; secondary identifiers must be specified as JSON.+--+-- For compound primary identifiers (that is, one that consists of multiple+-- resource properties strung together), to specify the primary identifier+-- as a string, list the property values /in the order they are specified/+-- in the primary identifier definition, separated by @|@.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+-- in the /Amazon Web Services Cloud Control API User Guide/.+--+-- 'patchDocument', 'updateResource_patchDocument' - A JavaScript Object Notation (JSON) document listing the patch+-- operations that represent the updates to apply to the current resource+-- properties. For details, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch Composing the patch document>+-- in the /Amazon Web Services Cloud Control API User Guide/.+newUpdateResource ::+  -- | 'typeName'+  Prelude.Text ->+  -- | 'identifier'+  Prelude.Text ->+  -- | 'patchDocument'+  Prelude.Text ->+  UpdateResource+newUpdateResource+  pTypeName_+  pIdentifier_+  pPatchDocument_ =+    UpdateResource'+      { clientToken = Prelude.Nothing,+        roleArn = Prelude.Nothing,+        typeVersionId = Prelude.Nothing,+        typeName = pTypeName_,+        identifier = pIdentifier_,+        patchDocument =+          Data._Sensitive Lens.# pPatchDocument_+      }++-- | A unique identifier to ensure the idempotency of the resource request.+-- As a best practice, specify this token to ensure idempotency, so that+-- Amazon Web Services Cloud Control API can accurately distinguish between+-- request retries and new resource requests. You might retry a resource+-- request to ensure that it was successfully received.+--+-- A client token is valid for 36 hours once used. After that, a resource+-- request with the same client token is treated as a new request.+--+-- If you do not specify a client token, one is generated for inclusion in+-- the request.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency Ensuring resource operation requests are unique>+-- in the /Amazon Web Services Cloud Control API User Guide/.+updateResource_clientToken :: Lens.Lens' UpdateResource (Prelude.Maybe Prelude.Text)+updateResource_clientToken = Lens.lens (\UpdateResource' {clientToken} -> clientToken) (\s@UpdateResource' {} a -> s {clientToken = a} :: UpdateResource)++-- | The Amazon Resource Name (ARN) of the Identity and Access Management+-- (IAM) role for Cloud Control API to use when performing this resource+-- operation. The role specified must have the permissions required for+-- this operation. The necessary permissions for each event handler are+-- defined in the+-- @ @<https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers handlers>@ @+-- section of the+-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html resource type definition schema>.+--+-- If you do not specify a role, Cloud Control API uses a temporary session+-- created using your Amazon Web Services user credentials.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions Specifying credentials>+-- in the /Amazon Web Services Cloud Control API User Guide/.+updateResource_roleArn :: Lens.Lens' UpdateResource (Prelude.Maybe Prelude.Text)+updateResource_roleArn = Lens.lens (\UpdateResource' {roleArn} -> roleArn) (\s@UpdateResource' {} a -> s {roleArn = a} :: UpdateResource)++-- | For private resource types, the type version to use in this resource+-- operation. If you do not specify a resource version, CloudFormation uses+-- the default version.+updateResource_typeVersionId :: Lens.Lens' UpdateResource (Prelude.Maybe Prelude.Text)+updateResource_typeVersionId = Lens.lens (\UpdateResource' {typeVersionId} -> typeVersionId) (\s@UpdateResource' {} a -> s {typeVersionId = a} :: UpdateResource)++-- | The name of the resource type.+updateResource_typeName :: Lens.Lens' UpdateResource Prelude.Text+updateResource_typeName = Lens.lens (\UpdateResource' {typeName} -> typeName) (\s@UpdateResource' {} a -> s {typeName = a} :: UpdateResource)++-- | The identifier for the resource.+--+-- You can specify the primary identifier, or any secondary identifier+-- defined for the resource type in its resource schema. You can only+-- specify one identifier. Primary identifiers can be specified as a string+-- or JSON; secondary identifiers must be specified as JSON.+--+-- For compound primary identifiers (that is, one that consists of multiple+-- resource properties strung together), to specify the primary identifier+-- as a string, list the property values /in the order they are specified/+-- in the primary identifier definition, separated by @|@.+--+-- For more information, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html Identifying resources>+-- in the /Amazon Web Services Cloud Control API User Guide/.+updateResource_identifier :: Lens.Lens' UpdateResource Prelude.Text+updateResource_identifier = Lens.lens (\UpdateResource' {identifier} -> identifier) (\s@UpdateResource' {} a -> s {identifier = a} :: UpdateResource)++-- | A JavaScript Object Notation (JSON) document listing the patch+-- operations that represent the updates to apply to the current resource+-- properties. For details, see+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch Composing the patch document>+-- in the /Amazon Web Services Cloud Control API User Guide/.+updateResource_patchDocument :: Lens.Lens' UpdateResource Prelude.Text+updateResource_patchDocument = Lens.lens (\UpdateResource' {patchDocument} -> patchDocument) (\s@UpdateResource' {} a -> s {patchDocument = a} :: UpdateResource) Prelude.. Data._Sensitive++instance Core.AWSRequest UpdateResource where+  type+    AWSResponse UpdateResource =+      UpdateResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateResourceResponse'+            Prelude.<$> (x Data..?> "ProgressEvent")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UpdateResource where+  hashWithSalt _salt UpdateResource' {..} =+    _salt+      `Prelude.hashWithSalt` clientToken+      `Prelude.hashWithSalt` roleArn+      `Prelude.hashWithSalt` typeVersionId+      `Prelude.hashWithSalt` typeName+      `Prelude.hashWithSalt` identifier+      `Prelude.hashWithSalt` patchDocument++instance Prelude.NFData UpdateResource where+  rnf UpdateResource' {..} =+    Prelude.rnf clientToken+      `Prelude.seq` Prelude.rnf roleArn+      `Prelude.seq` Prelude.rnf typeVersionId+      `Prelude.seq` Prelude.rnf typeName+      `Prelude.seq` Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf patchDocument++instance Data.ToHeaders UpdateResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "CloudApiService.UpdateResource" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateResource where+  toJSON UpdateResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ClientToken" Data..=) Prelude.<$> clientToken,+            ("RoleArn" Data..=) Prelude.<$> roleArn,+            ("TypeVersionId" Data..=) Prelude.<$> typeVersionId,+            Prelude.Just ("TypeName" Data..= typeName),+            Prelude.Just ("Identifier" Data..= identifier),+            Prelude.Just+              ("PatchDocument" Data..= patchDocument)+          ]+      )++instance Data.ToPath UpdateResource where+  toPath = Prelude.const "/"++instance Data.ToQuery UpdateResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateResourceResponse' smart constructor.+data UpdateResourceResponse = UpdateResourceResponse'+  { -- | Represents the current status of the resource update request.+    --+    -- Use the @RequestToken@ of the @ProgressEvent@ with+    -- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+    -- to return the current status of a resource operation request.+    progressEvent :: Prelude.Maybe ProgressEvent,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateResourceResponse' 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:+--+-- 'progressEvent', 'updateResourceResponse_progressEvent' - Represents the current status of the resource update request.+--+-- Use the @RequestToken@ of the @ProgressEvent@ with+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- to return the current status of a resource operation request.+--+-- 'httpStatus', 'updateResourceResponse_httpStatus' - The response's http status code.+newUpdateResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UpdateResourceResponse+newUpdateResourceResponse pHttpStatus_ =+  UpdateResourceResponse'+    { progressEvent =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Represents the current status of the resource update request.+--+-- Use the @RequestToken@ of the @ProgressEvent@ with+-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html GetResourceRequestStatus>+-- to return the current status of a resource operation request.+updateResourceResponse_progressEvent :: Lens.Lens' UpdateResourceResponse (Prelude.Maybe ProgressEvent)+updateResourceResponse_progressEvent = Lens.lens (\UpdateResourceResponse' {progressEvent} -> progressEvent) (\s@UpdateResourceResponse' {} a -> s {progressEvent = a} :: UpdateResourceResponse)++-- | The response's http status code.+updateResourceResponse_httpStatus :: Lens.Lens' UpdateResourceResponse Prelude.Int+updateResourceResponse_httpStatus = Lens.lens (\UpdateResourceResponse' {httpStatus} -> httpStatus) (\s@UpdateResourceResponse' {} a -> s {httpStatus = a} :: UpdateResourceResponse)++instance Prelude.NFData UpdateResourceResponse where+  rnf UpdateResourceResponse' {..} =+    Prelude.rnf progressEvent+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CloudControl/Waiters.hs view
@@ -0,0 +1,63 @@+{-# 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.CloudControl.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.CloudControl.Waiters where++import Amazonka.CloudControl.GetResourceRequestStatus+import Amazonka.CloudControl.Lens+import Amazonka.CloudControl.Types+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++-- | Polls 'Amazonka.CloudControl.GetResourceRequestStatus' every 5 seconds until a successful state is reached. An error is returned after 24 failed checks.+newResourceRequestSuccess :: Core.Wait GetResourceRequestStatus+newResourceRequestSuccess =+  Core.Wait+    { Core.name = "ResourceRequestSuccess",+      Core.attempts = 24,+      Core.delay = 5,+      Core.acceptors =+        [ Core.matchAll+            "SUCCESS"+            Core.AcceptSuccess+            ( getResourceRequestStatusResponse_progressEvent+                Prelude.. Lens._Just+                Prelude.. progressEvent_operationStatus+                Prelude.. Lens._Just+                Prelude.. Lens.to Data.toTextCI+            ),+          Core.matchAll+            "FAILED"+            Core.AcceptFailure+            ( getResourceRequestStatusResponse_progressEvent+                Prelude.. Lens._Just+                Prelude.. progressEvent_operationStatus+                Prelude.. Lens._Just+                Prelude.. Lens.to Data.toTextCI+            ),+          Core.matchAll+            "CANCEL_COMPLETE"+            Core.AcceptFailure+            ( getResourceRequestStatusResponse_progressEvent+                Prelude.. Lens._Just+                Prelude.. progressEvent_operationStatus+                Prelude.. Lens._Just+                Prelude.. Lens.to Data.toTextCI+            )+        ]+    }
+ 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.CloudControl+import Test.Amazonka.CloudControl.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "CloudControl"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/CloudControl.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.CloudControl+-- 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.CloudControl+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/CloudControl/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.CloudControl.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.CloudControl.Internal where
+ test/Test/Amazonka/Gen/CloudControl.hs view
@@ -0,0 +1,198 @@+{-# 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.CloudControl+-- 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.CloudControl where++import Amazonka.CloudControl+import qualified Data.Proxy as Proxy+import Test.Amazonka.CloudControl.Internal+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+--     [ testGroup "request"+--         [ requestCancelResourceRequest $+--             newCancelResourceRequest+--+--         , requestCreateResource $+--             newCreateResource+--+--         , requestDeleteResource $+--             newDeleteResource+--+--         , requestGetResource $+--             newGetResource+--+--         , requestGetResourceRequestStatus $+--             newGetResourceRequestStatus+--+--         , requestListResourceRequests $+--             newListResourceRequests+--+--         , requestListResources $+--             newListResources+--+--         , requestUpdateResource $+--             newUpdateResource+--+--           ]++--     , testGroup "response"+--         [ responseCancelResourceRequest $+--             newCancelResourceRequestResponse+--+--         , responseCreateResource $+--             newCreateResourceResponse+--+--         , responseDeleteResource $+--             newDeleteResourceResponse+--+--         , responseGetResource $+--             newGetResourceResponse+--+--         , responseGetResourceRequestStatus $+--             newGetResourceRequestStatusResponse+--+--         , responseListResourceRequests $+--             newListResourceRequestsResponse+--+--         , responseListResources $+--             newListResourcesResponse+--+--         , responseUpdateResource $+--             newUpdateResourceResponse+--+--           ]+--     ]++-- Requests++requestCancelResourceRequest :: CancelResourceRequest -> TestTree+requestCancelResourceRequest =+  req+    "CancelResourceRequest"+    "fixture/CancelResourceRequest.yaml"++requestCreateResource :: CreateResource -> TestTree+requestCreateResource =+  req+    "CreateResource"+    "fixture/CreateResource.yaml"++requestDeleteResource :: DeleteResource -> TestTree+requestDeleteResource =+  req+    "DeleteResource"+    "fixture/DeleteResource.yaml"++requestGetResource :: GetResource -> TestTree+requestGetResource =+  req+    "GetResource"+    "fixture/GetResource.yaml"++requestGetResourceRequestStatus :: GetResourceRequestStatus -> TestTree+requestGetResourceRequestStatus =+  req+    "GetResourceRequestStatus"+    "fixture/GetResourceRequestStatus.yaml"++requestListResourceRequests :: ListResourceRequests -> TestTree+requestListResourceRequests =+  req+    "ListResourceRequests"+    "fixture/ListResourceRequests.yaml"++requestListResources :: ListResources -> TestTree+requestListResources =+  req+    "ListResources"+    "fixture/ListResources.yaml"++requestUpdateResource :: UpdateResource -> TestTree+requestUpdateResource =+  req+    "UpdateResource"+    "fixture/UpdateResource.yaml"++-- Responses++responseCancelResourceRequest :: CancelResourceRequestResponse -> TestTree+responseCancelResourceRequest =+  res+    "CancelResourceRequestResponse"+    "fixture/CancelResourceRequestResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CancelResourceRequest)++responseCreateResource :: CreateResourceResponse -> TestTree+responseCreateResource =+  res+    "CreateResourceResponse"+    "fixture/CreateResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateResource)++responseDeleteResource :: DeleteResourceResponse -> TestTree+responseDeleteResource =+  res+    "DeleteResourceResponse"+    "fixture/DeleteResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteResource)++responseGetResource :: GetResourceResponse -> TestTree+responseGetResource =+  res+    "GetResourceResponse"+    "fixture/GetResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetResource)++responseGetResourceRequestStatus :: GetResourceRequestStatusResponse -> TestTree+responseGetResourceRequestStatus =+  res+    "GetResourceRequestStatusResponse"+    "fixture/GetResourceRequestStatusResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetResourceRequestStatus)++responseListResourceRequests :: ListResourceRequestsResponse -> TestTree+responseListResourceRequests =+  res+    "ListResourceRequestsResponse"+    "fixture/ListResourceRequestsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListResourceRequests)++responseListResources :: ListResourcesResponse -> TestTree+responseListResources =+  res+    "ListResourcesResponse"+    "fixture/ListResourcesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListResources)++responseUpdateResource :: UpdateResourceResponse -> TestTree+responseUpdateResource =+  res+    "UpdateResourceResponse"+    "fixture/UpdateResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateResource)