amazonka-backup-gateway (empty) → 2.0
raw patch · 101 files changed
+9291/−0 lines, 101 filesdep +amazonka-backup-gatewaydep +amazonka-coredep +amazonka-test
Dependencies added: amazonka-backup-gateway, amazonka-core, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-backup-gateway.cabal +122/−0
- fixture/AssociateGatewayToServer.yaml +10/−0
- fixture/AssociateGatewayToServerResponse.proto +0/−0
- fixture/CreateGateway.yaml +10/−0
- fixture/CreateGatewayResponse.proto +0/−0
- fixture/DeleteGateway.yaml +10/−0
- fixture/DeleteGatewayResponse.proto +0/−0
- fixture/DeleteHypervisor.yaml +10/−0
- fixture/DeleteHypervisorResponse.proto +0/−0
- fixture/DisassociateGatewayFromServer.yaml +10/−0
- fixture/DisassociateGatewayFromServerResponse.proto +0/−0
- fixture/GetBandwidthRateLimitSchedule.yaml +10/−0
- fixture/GetBandwidthRateLimitScheduleResponse.proto +0/−0
- fixture/GetGateway.yaml +10/−0
- fixture/GetGatewayResponse.proto +0/−0
- fixture/GetHypervisor.yaml +10/−0
- fixture/GetHypervisorPropertyMappings.yaml +10/−0
- fixture/GetHypervisorPropertyMappingsResponse.proto +0/−0
- fixture/GetHypervisorResponse.proto +0/−0
- fixture/GetVirtualMachine.yaml +10/−0
- fixture/GetVirtualMachineResponse.proto +0/−0
- fixture/ImportHypervisorConfiguration.yaml +10/−0
- fixture/ImportHypervisorConfigurationResponse.proto +0/−0
- fixture/ListGateways.yaml +10/−0
- fixture/ListGatewaysResponse.proto +0/−0
- fixture/ListHypervisors.yaml +10/−0
- fixture/ListHypervisorsResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/ListVirtualMachines.yaml +10/−0
- fixture/ListVirtualMachinesResponse.proto +0/−0
- fixture/PutBandwidthRateLimitSchedule.yaml +10/−0
- fixture/PutBandwidthRateLimitScheduleResponse.proto +0/−0
- fixture/PutHypervisorPropertyMappings.yaml +10/−0
- fixture/PutHypervisorPropertyMappingsResponse.proto +0/−0
- fixture/PutMaintenanceStartTime.yaml +10/−0
- fixture/PutMaintenanceStartTimeResponse.proto +0/−0
- fixture/StartVirtualMachinesMetadataSync.yaml +10/−0
- fixture/StartVirtualMachinesMetadataSyncResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/TestHypervisorConfiguration.yaml +10/−0
- fixture/TestHypervisorConfigurationResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateGatewayInformation.yaml +10/−0
- fixture/UpdateGatewayInformationResponse.proto +0/−0
- fixture/UpdateGatewaySoftwareNow.yaml +10/−0
- fixture/UpdateGatewaySoftwareNowResponse.proto +0/−0
- fixture/UpdateHypervisor.yaml +10/−0
- fixture/UpdateHypervisorResponse.proto +0/−0
- gen/Amazonka/BackupGateway.hs +322/−0
- gen/Amazonka/BackupGateway/AssociateGatewayToServer.hs +203/−0
- gen/Amazonka/BackupGateway/CreateGateway.hs +224/−0
- gen/Amazonka/BackupGateway/DeleteGateway.hs +168/−0
- gen/Amazonka/BackupGateway/DeleteHypervisor.hs +170/−0
- gen/Amazonka/BackupGateway/DisassociateGatewayFromServer.hs +183/−0
- gen/Amazonka/BackupGateway/GetBandwidthRateLimitSchedule.hs +223/−0
- gen/Amazonka/BackupGateway/GetGateway.hs +169/−0
- gen/Amazonka/BackupGateway/GetHypervisor.hs +173/−0
- gen/Amazonka/BackupGateway/GetHypervisorPropertyMappings.hs +217/−0
- gen/Amazonka/BackupGateway/GetVirtualMachine.hs +172/−0
- gen/Amazonka/BackupGateway/ImportHypervisorConfiguration.hs +253/−0
- gen/Amazonka/BackupGateway/Lens.hs +299/−0
- gen/Amazonka/BackupGateway/ListGateways.hs +237/−0
- gen/Amazonka/BackupGateway/ListHypervisors.hs +241/−0
- gen/Amazonka/BackupGateway/ListTagsForResource.hs +182/−0
- gen/Amazonka/BackupGateway/ListVirtualMachines.hs +261/−0
- gen/Amazonka/BackupGateway/PutBandwidthRateLimitSchedule.hs +226/−0
- gen/Amazonka/BackupGateway/PutHypervisorPropertyMappings.hs +223/−0
- gen/Amazonka/BackupGateway/PutMaintenanceStartTime.hs +248/−0
- gen/Amazonka/BackupGateway/StartVirtualMachinesMetadataSync.hs +196/−0
- gen/Amazonka/BackupGateway/TagResource.hs +183/−0
- gen/Amazonka/BackupGateway/TestHypervisorConfiguration.hs +210/−0
- gen/Amazonka/BackupGateway/Types.hs +273/−0
- gen/Amazonka/BackupGateway/Types/BandwidthRateLimitInterval.hs +202/−0
- gen/Amazonka/BackupGateway/Types/Gateway.hs +132/−0
- gen/Amazonka/BackupGateway/Types/GatewayDetails.hs +176/−0
- gen/Amazonka/BackupGateway/Types/GatewayType.hs +66/−0
- gen/Amazonka/BackupGateway/Types/Hypervisor.hs +131/−0
- gen/Amazonka/BackupGateway/Types/HypervisorDetails.hs +190/−0
- gen/Amazonka/BackupGateway/Types/HypervisorState.hs +81/−0
- gen/Amazonka/BackupGateway/Types/MaintenanceStartTime.hs +138/−0
- gen/Amazonka/BackupGateway/Types/SyncMetadataStatus.hs +86/−0
- gen/Amazonka/BackupGateway/Types/Tag.hs +98/−0
- gen/Amazonka/BackupGateway/Types/VirtualMachine.hs +138/−0
- gen/Amazonka/BackupGateway/Types/VirtualMachineDetails.hs +155/−0
- gen/Amazonka/BackupGateway/Types/VmwareTag.hs +101/−0
- gen/Amazonka/BackupGateway/Types/VmwareToAwsTagMapping.hs +134/−0
- gen/Amazonka/BackupGateway/UntagResource.hs +192/−0
- gen/Amazonka/BackupGateway/UpdateGatewayInformation.hs +192/−0
- gen/Amazonka/BackupGateway/UpdateGatewaySoftwareNow.hs +180/−0
- gen/Amazonka/BackupGateway/UpdateHypervisor.hs +247/−0
- gen/Amazonka/BackupGateway/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/BackupGateway.hs +20/−0
- test/Test/Amazonka/BackupGateway/Internal.hs +8/−0
- test/Test/Amazonka/Gen/BackupGateway.hs +538/−0
+ 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 Backup Gateway SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2021-01-01@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-backup-gateway)+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.BackupGateway](http://hackage.haskell.org/package/amazonka-backup-gateway/docs/Amazonka-BackupGateway.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-backup-gateway` 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-backup-gateway.cabal view
@@ -0,0 +1,122 @@+cabal-version: 2.2+name: amazonka-backup-gateway+version: 2.0+synopsis: Amazon Backup Gateway 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-01-01@ 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.BackupGateway.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.BackupGateway" 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-backup-gateway++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.BackupGateway+ Amazonka.BackupGateway.AssociateGatewayToServer+ Amazonka.BackupGateway.CreateGateway+ Amazonka.BackupGateway.DeleteGateway+ Amazonka.BackupGateway.DeleteHypervisor+ Amazonka.BackupGateway.DisassociateGatewayFromServer+ Amazonka.BackupGateway.GetBandwidthRateLimitSchedule+ Amazonka.BackupGateway.GetGateway+ Amazonka.BackupGateway.GetHypervisor+ Amazonka.BackupGateway.GetHypervisorPropertyMappings+ Amazonka.BackupGateway.GetVirtualMachine+ Amazonka.BackupGateway.ImportHypervisorConfiguration+ Amazonka.BackupGateway.Lens+ Amazonka.BackupGateway.ListGateways+ Amazonka.BackupGateway.ListHypervisors+ Amazonka.BackupGateway.ListTagsForResource+ Amazonka.BackupGateway.ListVirtualMachines+ Amazonka.BackupGateway.PutBandwidthRateLimitSchedule+ Amazonka.BackupGateway.PutHypervisorPropertyMappings+ Amazonka.BackupGateway.PutMaintenanceStartTime+ Amazonka.BackupGateway.StartVirtualMachinesMetadataSync+ Amazonka.BackupGateway.TagResource+ Amazonka.BackupGateway.TestHypervisorConfiguration+ Amazonka.BackupGateway.Types+ Amazonka.BackupGateway.Types.BandwidthRateLimitInterval+ Amazonka.BackupGateway.Types.Gateway+ Amazonka.BackupGateway.Types.GatewayDetails+ Amazonka.BackupGateway.Types.GatewayType+ Amazonka.BackupGateway.Types.Hypervisor+ Amazonka.BackupGateway.Types.HypervisorDetails+ Amazonka.BackupGateway.Types.HypervisorState+ Amazonka.BackupGateway.Types.MaintenanceStartTime+ Amazonka.BackupGateway.Types.SyncMetadataStatus+ Amazonka.BackupGateway.Types.Tag+ Amazonka.BackupGateway.Types.VirtualMachine+ Amazonka.BackupGateway.Types.VirtualMachineDetails+ Amazonka.BackupGateway.Types.VmwareTag+ Amazonka.BackupGateway.Types.VmwareToAwsTagMapping+ Amazonka.BackupGateway.UntagResource+ Amazonka.BackupGateway.UpdateGatewayInformation+ Amazonka.BackupGateway.UpdateGatewaySoftwareNow+ Amazonka.BackupGateway.UpdateHypervisor+ Amazonka.BackupGateway.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-backup-gateway-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.BackupGateway+ Test.Amazonka.BackupGateway.Internal+ Test.Amazonka.Gen.BackupGateway++ build-depends:+ , amazonka-backup-gateway+ , amazonka-core >=2.0 && <2.1+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/AssociateGatewayToServer.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/AssociateGatewayToServerResponse.proto view
+ fixture/CreateGateway.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/CreateGatewayResponse.proto view
+ fixture/DeleteGateway.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/DeleteGatewayResponse.proto view
+ fixture/DeleteHypervisor.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/DeleteHypervisorResponse.proto view
+ fixture/DisassociateGatewayFromServer.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/DisassociateGatewayFromServerResponse.proto view
+ fixture/GetBandwidthRateLimitSchedule.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/GetBandwidthRateLimitScheduleResponse.proto view
+ fixture/GetGateway.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/GetGatewayResponse.proto view
+ fixture/GetHypervisor.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/GetHypervisorPropertyMappings.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/GetHypervisorPropertyMappingsResponse.proto view
+ fixture/GetHypervisorResponse.proto view
+ fixture/GetVirtualMachine.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/GetVirtualMachineResponse.proto view
+ fixture/ImportHypervisorConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/ImportHypervisorConfigurationResponse.proto view
+ fixture/ListGateways.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/ListGatewaysResponse.proto view
+ fixture/ListHypervisors.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/ListHypervisorsResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListTagsForResourceResponse.proto view
+ fixture/ListVirtualMachines.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/ListVirtualMachinesResponse.proto view
+ fixture/PutBandwidthRateLimitSchedule.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/PutBandwidthRateLimitScheduleResponse.proto view
+ fixture/PutHypervisorPropertyMappings.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/PutHypervisorPropertyMappingsResponse.proto view
+ fixture/PutMaintenanceStartTime.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/PutMaintenanceStartTimeResponse.proto view
+ fixture/StartVirtualMachinesMetadataSync.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/StartVirtualMachinesMetadataSyncResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/TagResourceResponse.proto view
+ fixture/TestHypervisorConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/TestHypervisorConfigurationResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UntagResourceResponse.proto view
+ fixture/UpdateGatewayInformation.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/UpdateGatewayInformationResponse.proto view
+ fixture/UpdateGatewaySoftwareNow.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/UpdateGatewaySoftwareNowResponse.proto view
+ fixture/UpdateHypervisor.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup-gateway/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup-gateway.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/UpdateHypervisorResponse.proto view
+ gen/Amazonka/BackupGateway.hs view
@@ -0,0 +1,322 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.BackupGateway+-- 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-01-01@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Backup gateway+--+-- Backup gateway connects Backup to your hypervisor, so you can create,+-- store, and restore backups of your virtual machines (VMs) anywhere,+-- whether on-premises or in the VMware Cloud (VMC) on Amazon Web Services.+--+-- Add on-premises resources by connecting to a hypervisor through a+-- gateway. Backup will automatically discover the resources in your+-- hypervisor.+--+-- Use Backup to assign virtual or on-premises resources to a backup plan,+-- or run on-demand backups. Once you have backed up your resources, you+-- can view them and restore them like any resource supported by Backup.+--+-- To download the Amazon Web Services software to get started, navigate to+-- the Backup console, choose __Gateways__, then choose __Create gateway__.+module Amazonka.BackupGateway+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** AccessDeniedException+ _AccessDeniedException,++ -- ** ConflictException+ _ConflictException,++ -- ** InternalServerException+ _InternalServerException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ThrottlingException+ _ThrottlingException,++ -- ** ValidationException+ _ValidationException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** AssociateGatewayToServer+ AssociateGatewayToServer (AssociateGatewayToServer'),+ newAssociateGatewayToServer,+ AssociateGatewayToServerResponse (AssociateGatewayToServerResponse'),+ newAssociateGatewayToServerResponse,++ -- ** CreateGateway+ CreateGateway (CreateGateway'),+ newCreateGateway,+ CreateGatewayResponse (CreateGatewayResponse'),+ newCreateGatewayResponse,++ -- ** DeleteGateway+ DeleteGateway (DeleteGateway'),+ newDeleteGateway,+ DeleteGatewayResponse (DeleteGatewayResponse'),+ newDeleteGatewayResponse,++ -- ** DeleteHypervisor+ DeleteHypervisor (DeleteHypervisor'),+ newDeleteHypervisor,+ DeleteHypervisorResponse (DeleteHypervisorResponse'),+ newDeleteHypervisorResponse,++ -- ** DisassociateGatewayFromServer+ DisassociateGatewayFromServer (DisassociateGatewayFromServer'),+ newDisassociateGatewayFromServer,+ DisassociateGatewayFromServerResponse (DisassociateGatewayFromServerResponse'),+ newDisassociateGatewayFromServerResponse,++ -- ** GetBandwidthRateLimitSchedule+ GetBandwidthRateLimitSchedule (GetBandwidthRateLimitSchedule'),+ newGetBandwidthRateLimitSchedule,+ GetBandwidthRateLimitScheduleResponse (GetBandwidthRateLimitScheduleResponse'),+ newGetBandwidthRateLimitScheduleResponse,++ -- ** GetGateway+ GetGateway (GetGateway'),+ newGetGateway,+ GetGatewayResponse (GetGatewayResponse'),+ newGetGatewayResponse,++ -- ** GetHypervisor+ GetHypervisor (GetHypervisor'),+ newGetHypervisor,+ GetHypervisorResponse (GetHypervisorResponse'),+ newGetHypervisorResponse,++ -- ** GetHypervisorPropertyMappings+ GetHypervisorPropertyMappings (GetHypervisorPropertyMappings'),+ newGetHypervisorPropertyMappings,+ GetHypervisorPropertyMappingsResponse (GetHypervisorPropertyMappingsResponse'),+ newGetHypervisorPropertyMappingsResponse,++ -- ** GetVirtualMachine+ GetVirtualMachine (GetVirtualMachine'),+ newGetVirtualMachine,+ GetVirtualMachineResponse (GetVirtualMachineResponse'),+ newGetVirtualMachineResponse,++ -- ** ImportHypervisorConfiguration+ ImportHypervisorConfiguration (ImportHypervisorConfiguration'),+ newImportHypervisorConfiguration,+ ImportHypervisorConfigurationResponse (ImportHypervisorConfigurationResponse'),+ newImportHypervisorConfigurationResponse,++ -- ** ListGateways (Paginated)+ ListGateways (ListGateways'),+ newListGateways,+ ListGatewaysResponse (ListGatewaysResponse'),+ newListGatewaysResponse,++ -- ** ListHypervisors (Paginated)+ ListHypervisors (ListHypervisors'),+ newListHypervisors,+ ListHypervisorsResponse (ListHypervisorsResponse'),+ newListHypervisorsResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** ListVirtualMachines (Paginated)+ ListVirtualMachines (ListVirtualMachines'),+ newListVirtualMachines,+ ListVirtualMachinesResponse (ListVirtualMachinesResponse'),+ newListVirtualMachinesResponse,++ -- ** PutBandwidthRateLimitSchedule+ PutBandwidthRateLimitSchedule (PutBandwidthRateLimitSchedule'),+ newPutBandwidthRateLimitSchedule,+ PutBandwidthRateLimitScheduleResponse (PutBandwidthRateLimitScheduleResponse'),+ newPutBandwidthRateLimitScheduleResponse,++ -- ** PutHypervisorPropertyMappings+ PutHypervisorPropertyMappings (PutHypervisorPropertyMappings'),+ newPutHypervisorPropertyMappings,+ PutHypervisorPropertyMappingsResponse (PutHypervisorPropertyMappingsResponse'),+ newPutHypervisorPropertyMappingsResponse,++ -- ** PutMaintenanceStartTime+ PutMaintenanceStartTime (PutMaintenanceStartTime'),+ newPutMaintenanceStartTime,+ PutMaintenanceStartTimeResponse (PutMaintenanceStartTimeResponse'),+ newPutMaintenanceStartTimeResponse,++ -- ** StartVirtualMachinesMetadataSync+ StartVirtualMachinesMetadataSync (StartVirtualMachinesMetadataSync'),+ newStartVirtualMachinesMetadataSync,+ StartVirtualMachinesMetadataSyncResponse (StartVirtualMachinesMetadataSyncResponse'),+ newStartVirtualMachinesMetadataSyncResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** TestHypervisorConfiguration+ TestHypervisorConfiguration (TestHypervisorConfiguration'),+ newTestHypervisorConfiguration,+ TestHypervisorConfigurationResponse (TestHypervisorConfigurationResponse'),+ newTestHypervisorConfigurationResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateGatewayInformation+ UpdateGatewayInformation (UpdateGatewayInformation'),+ newUpdateGatewayInformation,+ UpdateGatewayInformationResponse (UpdateGatewayInformationResponse'),+ newUpdateGatewayInformationResponse,++ -- ** UpdateGatewaySoftwareNow+ UpdateGatewaySoftwareNow (UpdateGatewaySoftwareNow'),+ newUpdateGatewaySoftwareNow,+ UpdateGatewaySoftwareNowResponse (UpdateGatewaySoftwareNowResponse'),+ newUpdateGatewaySoftwareNowResponse,++ -- ** UpdateHypervisor+ UpdateHypervisor (UpdateHypervisor'),+ newUpdateHypervisor,+ UpdateHypervisorResponse (UpdateHypervisorResponse'),+ newUpdateHypervisorResponse,++ -- * Types++ -- ** GatewayType+ GatewayType (..),++ -- ** HypervisorState+ HypervisorState (..),++ -- ** SyncMetadataStatus+ SyncMetadataStatus (..),++ -- ** BandwidthRateLimitInterval+ BandwidthRateLimitInterval (BandwidthRateLimitInterval'),+ newBandwidthRateLimitInterval,++ -- ** Gateway+ Gateway (Gateway'),+ newGateway,++ -- ** GatewayDetails+ GatewayDetails (GatewayDetails'),+ newGatewayDetails,++ -- ** Hypervisor+ Hypervisor (Hypervisor'),+ newHypervisor,++ -- ** HypervisorDetails+ HypervisorDetails (HypervisorDetails'),+ newHypervisorDetails,++ -- ** MaintenanceStartTime+ MaintenanceStartTime (MaintenanceStartTime'),+ newMaintenanceStartTime,++ -- ** Tag+ Tag (Tag'),+ newTag,++ -- ** VirtualMachine+ VirtualMachine (VirtualMachine'),+ newVirtualMachine,++ -- ** VirtualMachineDetails+ VirtualMachineDetails (VirtualMachineDetails'),+ newVirtualMachineDetails,++ -- ** VmwareTag+ VmwareTag (VmwareTag'),+ newVmwareTag,++ -- ** VmwareToAwsTagMapping+ VmwareToAwsTagMapping (VmwareToAwsTagMapping'),+ newVmwareToAwsTagMapping,+ )+where++import Amazonka.BackupGateway.AssociateGatewayToServer+import Amazonka.BackupGateway.CreateGateway+import Amazonka.BackupGateway.DeleteGateway+import Amazonka.BackupGateway.DeleteHypervisor+import Amazonka.BackupGateway.DisassociateGatewayFromServer+import Amazonka.BackupGateway.GetBandwidthRateLimitSchedule+import Amazonka.BackupGateway.GetGateway+import Amazonka.BackupGateway.GetHypervisor+import Amazonka.BackupGateway.GetHypervisorPropertyMappings+import Amazonka.BackupGateway.GetVirtualMachine+import Amazonka.BackupGateway.ImportHypervisorConfiguration+import Amazonka.BackupGateway.Lens+import Amazonka.BackupGateway.ListGateways+import Amazonka.BackupGateway.ListHypervisors+import Amazonka.BackupGateway.ListTagsForResource+import Amazonka.BackupGateway.ListVirtualMachines+import Amazonka.BackupGateway.PutBandwidthRateLimitSchedule+import Amazonka.BackupGateway.PutHypervisorPropertyMappings+import Amazonka.BackupGateway.PutMaintenanceStartTime+import Amazonka.BackupGateway.StartVirtualMachinesMetadataSync+import Amazonka.BackupGateway.TagResource+import Amazonka.BackupGateway.TestHypervisorConfiguration+import Amazonka.BackupGateway.Types+import Amazonka.BackupGateway.UntagResource+import Amazonka.BackupGateway.UpdateGatewayInformation+import Amazonka.BackupGateway.UpdateGatewaySoftwareNow+import Amazonka.BackupGateway.UpdateHypervisor+import Amazonka.BackupGateway.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 'BackupGateway'.++-- $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/BackupGateway/AssociateGatewayToServer.hs view
@@ -0,0 +1,203 @@+{-# 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.BackupGateway.AssociateGatewayToServer+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Associates a backup gateway with your server. After you complete the+-- association process, you can back up and restore your VMs through the+-- gateway.+module Amazonka.BackupGateway.AssociateGatewayToServer+ ( -- * Creating a Request+ AssociateGatewayToServer (..),+ newAssociateGatewayToServer,++ -- * Request Lenses+ associateGatewayToServer_gatewayArn,+ associateGatewayToServer_serverArn,++ -- * Destructuring the Response+ AssociateGatewayToServerResponse (..),+ newAssociateGatewayToServerResponse,++ -- * Response Lenses+ associateGatewayToServerResponse_gatewayArn,+ associateGatewayToServerResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newAssociateGatewayToServer' smart constructor.+data AssociateGatewayToServer = AssociateGatewayToServer'+ { -- | The Amazon Resource Name (ARN) of the gateway. Use the @ListGateways@+ -- operation to return a list of gateways for your account and Amazon Web+ -- Services Region.+ gatewayArn :: Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the server that hosts your virtual+ -- machines.+ serverArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateGatewayToServer' 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:+--+-- 'gatewayArn', 'associateGatewayToServer_gatewayArn' - The Amazon Resource Name (ARN) of the gateway. Use the @ListGateways@+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+--+-- 'serverArn', 'associateGatewayToServer_serverArn' - The Amazon Resource Name (ARN) of the server that hosts your virtual+-- machines.+newAssociateGatewayToServer ::+ -- | 'gatewayArn'+ Prelude.Text ->+ -- | 'serverArn'+ Prelude.Text ->+ AssociateGatewayToServer+newAssociateGatewayToServer pGatewayArn_ pServerArn_ =+ AssociateGatewayToServer'+ { gatewayArn =+ pGatewayArn_,+ serverArn = pServerArn_+ }++-- | The Amazon Resource Name (ARN) of the gateway. Use the @ListGateways@+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+associateGatewayToServer_gatewayArn :: Lens.Lens' AssociateGatewayToServer Prelude.Text+associateGatewayToServer_gatewayArn = Lens.lens (\AssociateGatewayToServer' {gatewayArn} -> gatewayArn) (\s@AssociateGatewayToServer' {} a -> s {gatewayArn = a} :: AssociateGatewayToServer)++-- | The Amazon Resource Name (ARN) of the server that hosts your virtual+-- machines.+associateGatewayToServer_serverArn :: Lens.Lens' AssociateGatewayToServer Prelude.Text+associateGatewayToServer_serverArn = Lens.lens (\AssociateGatewayToServer' {serverArn} -> serverArn) (\s@AssociateGatewayToServer' {} a -> s {serverArn = a} :: AssociateGatewayToServer)++instance Core.AWSRequest AssociateGatewayToServer where+ type+ AWSResponse AssociateGatewayToServer =+ AssociateGatewayToServerResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ AssociateGatewayToServerResponse'+ Prelude.<$> (x Data..?> "GatewayArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable AssociateGatewayToServer where+ hashWithSalt _salt AssociateGatewayToServer' {..} =+ _salt+ `Prelude.hashWithSalt` gatewayArn+ `Prelude.hashWithSalt` serverArn++instance Prelude.NFData AssociateGatewayToServer where+ rnf AssociateGatewayToServer' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf serverArn++instance Data.ToHeaders AssociateGatewayToServer where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.AssociateGatewayToServer" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON AssociateGatewayToServer where+ toJSON AssociateGatewayToServer' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("GatewayArn" Data..= gatewayArn),+ Prelude.Just ("ServerArn" Data..= serverArn)+ ]+ )++instance Data.ToPath AssociateGatewayToServer where+ toPath = Prelude.const "/"++instance Data.ToQuery AssociateGatewayToServer where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newAssociateGatewayToServerResponse' smart constructor.+data AssociateGatewayToServerResponse = AssociateGatewayToServerResponse'+ { -- | The Amazon Resource Name (ARN) of a gateway.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateGatewayToServerResponse' 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:+--+-- 'gatewayArn', 'associateGatewayToServerResponse_gatewayArn' - The Amazon Resource Name (ARN) of a gateway.+--+-- 'httpStatus', 'associateGatewayToServerResponse_httpStatus' - The response's http status code.+newAssociateGatewayToServerResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ AssociateGatewayToServerResponse+newAssociateGatewayToServerResponse pHttpStatus_ =+ AssociateGatewayToServerResponse'+ { gatewayArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of a gateway.+associateGatewayToServerResponse_gatewayArn :: Lens.Lens' AssociateGatewayToServerResponse (Prelude.Maybe Prelude.Text)+associateGatewayToServerResponse_gatewayArn = Lens.lens (\AssociateGatewayToServerResponse' {gatewayArn} -> gatewayArn) (\s@AssociateGatewayToServerResponse' {} a -> s {gatewayArn = a} :: AssociateGatewayToServerResponse)++-- | The response's http status code.+associateGatewayToServerResponse_httpStatus :: Lens.Lens' AssociateGatewayToServerResponse Prelude.Int+associateGatewayToServerResponse_httpStatus = Lens.lens (\AssociateGatewayToServerResponse' {httpStatus} -> httpStatus) (\s@AssociateGatewayToServerResponse' {} a -> s {httpStatus = a} :: AssociateGatewayToServerResponse)++instance+ Prelude.NFData+ AssociateGatewayToServerResponse+ where+ rnf AssociateGatewayToServerResponse' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/CreateGateway.hs view
@@ -0,0 +1,224 @@+{-# 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.BackupGateway.CreateGateway+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a backup gateway. After you create a gateway, you can associate+-- it with a server using the @AssociateGatewayToServer@ operation.+module Amazonka.BackupGateway.CreateGateway+ ( -- * Creating a Request+ CreateGateway (..),+ newCreateGateway,++ -- * Request Lenses+ createGateway_tags,+ createGateway_activationKey,+ createGateway_gatewayDisplayName,+ createGateway_gatewayType,++ -- * Destructuring the Response+ CreateGatewayResponse (..),+ newCreateGatewayResponse,++ -- * Response Lenses+ createGatewayResponse_gatewayArn,+ createGatewayResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newCreateGateway' smart constructor.+data CreateGateway = CreateGateway'+ { -- | A list of up to 50 tags to assign to the gateway. Each tag is a+ -- key-value pair.+ tags :: Prelude.Maybe [Tag],+ -- | The activation key of the created gateway.+ activationKey :: Prelude.Text,+ -- | The display name of the created gateway.+ gatewayDisplayName :: Prelude.Text,+ -- | The type of created gateway.+ gatewayType :: GatewayType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateGateway' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'createGateway_tags' - A list of up to 50 tags to assign to the gateway. Each tag is a+-- key-value pair.+--+-- 'activationKey', 'createGateway_activationKey' - The activation key of the created gateway.+--+-- 'gatewayDisplayName', 'createGateway_gatewayDisplayName' - The display name of the created gateway.+--+-- 'gatewayType', 'createGateway_gatewayType' - The type of created gateway.+newCreateGateway ::+ -- | 'activationKey'+ Prelude.Text ->+ -- | 'gatewayDisplayName'+ Prelude.Text ->+ -- | 'gatewayType'+ GatewayType ->+ CreateGateway+newCreateGateway+ pActivationKey_+ pGatewayDisplayName_+ pGatewayType_ =+ CreateGateway'+ { tags = Prelude.Nothing,+ activationKey = pActivationKey_,+ gatewayDisplayName = pGatewayDisplayName_,+ gatewayType = pGatewayType_+ }++-- | A list of up to 50 tags to assign to the gateway. Each tag is a+-- key-value pair.+createGateway_tags :: Lens.Lens' CreateGateway (Prelude.Maybe [Tag])+createGateway_tags = Lens.lens (\CreateGateway' {tags} -> tags) (\s@CreateGateway' {} a -> s {tags = a} :: CreateGateway) Prelude.. Lens.mapping Lens.coerced++-- | The activation key of the created gateway.+createGateway_activationKey :: Lens.Lens' CreateGateway Prelude.Text+createGateway_activationKey = Lens.lens (\CreateGateway' {activationKey} -> activationKey) (\s@CreateGateway' {} a -> s {activationKey = a} :: CreateGateway)++-- | The display name of the created gateway.+createGateway_gatewayDisplayName :: Lens.Lens' CreateGateway Prelude.Text+createGateway_gatewayDisplayName = Lens.lens (\CreateGateway' {gatewayDisplayName} -> gatewayDisplayName) (\s@CreateGateway' {} a -> s {gatewayDisplayName = a} :: CreateGateway)++-- | The type of created gateway.+createGateway_gatewayType :: Lens.Lens' CreateGateway GatewayType+createGateway_gatewayType = Lens.lens (\CreateGateway' {gatewayType} -> gatewayType) (\s@CreateGateway' {} a -> s {gatewayType = a} :: CreateGateway)++instance Core.AWSRequest CreateGateway where+ type+ AWSResponse CreateGateway =+ CreateGatewayResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateGatewayResponse'+ Prelude.<$> (x Data..?> "GatewayArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateGateway where+ hashWithSalt _salt CreateGateway' {..} =+ _salt+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` activationKey+ `Prelude.hashWithSalt` gatewayDisplayName+ `Prelude.hashWithSalt` gatewayType++instance Prelude.NFData CreateGateway where+ rnf CreateGateway' {..} =+ Prelude.rnf tags+ `Prelude.seq` Prelude.rnf activationKey+ `Prelude.seq` Prelude.rnf gatewayDisplayName+ `Prelude.seq` Prelude.rnf gatewayType++instance Data.ToHeaders CreateGateway where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.CreateGateway" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateGateway where+ toJSON CreateGateway' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Tags" Data..=) Prelude.<$> tags,+ Prelude.Just ("ActivationKey" Data..= activationKey),+ Prelude.Just+ ("GatewayDisplayName" Data..= gatewayDisplayName),+ Prelude.Just ("GatewayType" Data..= gatewayType)+ ]+ )++instance Data.ToPath CreateGateway where+ toPath = Prelude.const "/"++instance Data.ToQuery CreateGateway where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateGatewayResponse' smart constructor.+data CreateGatewayResponse = CreateGatewayResponse'+ { -- | The Amazon Resource Name (ARN) of the gateway you create.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateGatewayResponse' 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:+--+-- 'gatewayArn', 'createGatewayResponse_gatewayArn' - The Amazon Resource Name (ARN) of the gateway you create.+--+-- 'httpStatus', 'createGatewayResponse_httpStatus' - The response's http status code.+newCreateGatewayResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateGatewayResponse+newCreateGatewayResponse pHttpStatus_ =+ CreateGatewayResponse'+ { gatewayArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the gateway you create.+createGatewayResponse_gatewayArn :: Lens.Lens' CreateGatewayResponse (Prelude.Maybe Prelude.Text)+createGatewayResponse_gatewayArn = Lens.lens (\CreateGatewayResponse' {gatewayArn} -> gatewayArn) (\s@CreateGatewayResponse' {} a -> s {gatewayArn = a} :: CreateGatewayResponse)++-- | The response's http status code.+createGatewayResponse_httpStatus :: Lens.Lens' CreateGatewayResponse Prelude.Int+createGatewayResponse_httpStatus = Lens.lens (\CreateGatewayResponse' {httpStatus} -> httpStatus) (\s@CreateGatewayResponse' {} a -> s {httpStatus = a} :: CreateGatewayResponse)++instance Prelude.NFData CreateGatewayResponse where+ rnf CreateGatewayResponse' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/DeleteGateway.hs view
@@ -0,0 +1,168 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.DeleteGateway+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a backup gateway.+module Amazonka.BackupGateway.DeleteGateway+ ( -- * Creating a Request+ DeleteGateway (..),+ newDeleteGateway,++ -- * Request Lenses+ deleteGateway_gatewayArn,++ -- * Destructuring the Response+ DeleteGatewayResponse (..),+ newDeleteGatewayResponse,++ -- * Response Lenses+ deleteGatewayResponse_gatewayArn,+ deleteGatewayResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newDeleteGateway' smart constructor.+data DeleteGateway = DeleteGateway'+ { -- | The Amazon Resource Name (ARN) of the gateway to delete.+ gatewayArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteGateway' 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:+--+-- 'gatewayArn', 'deleteGateway_gatewayArn' - The Amazon Resource Name (ARN) of the gateway to delete.+newDeleteGateway ::+ -- | 'gatewayArn'+ Prelude.Text ->+ DeleteGateway+newDeleteGateway pGatewayArn_ =+ DeleteGateway' {gatewayArn = pGatewayArn_}++-- | The Amazon Resource Name (ARN) of the gateway to delete.+deleteGateway_gatewayArn :: Lens.Lens' DeleteGateway Prelude.Text+deleteGateway_gatewayArn = Lens.lens (\DeleteGateway' {gatewayArn} -> gatewayArn) (\s@DeleteGateway' {} a -> s {gatewayArn = a} :: DeleteGateway)++instance Core.AWSRequest DeleteGateway where+ type+ AWSResponse DeleteGateway =+ DeleteGatewayResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteGatewayResponse'+ Prelude.<$> (x Data..?> "GatewayArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteGateway where+ hashWithSalt _salt DeleteGateway' {..} =+ _salt `Prelude.hashWithSalt` gatewayArn++instance Prelude.NFData DeleteGateway where+ rnf DeleteGateway' {..} = Prelude.rnf gatewayArn++instance Data.ToHeaders DeleteGateway where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.DeleteGateway" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteGateway where+ toJSON DeleteGateway' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GatewayArn" Data..= gatewayArn)]+ )++instance Data.ToPath DeleteGateway where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteGateway where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteGatewayResponse' smart constructor.+data DeleteGatewayResponse = DeleteGatewayResponse'+ { -- | The Amazon Resource Name (ARN) of the gateway you deleted.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteGatewayResponse' 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:+--+-- 'gatewayArn', 'deleteGatewayResponse_gatewayArn' - The Amazon Resource Name (ARN) of the gateway you deleted.+--+-- 'httpStatus', 'deleteGatewayResponse_httpStatus' - The response's http status code.+newDeleteGatewayResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteGatewayResponse+newDeleteGatewayResponse pHttpStatus_ =+ DeleteGatewayResponse'+ { gatewayArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the gateway you deleted.+deleteGatewayResponse_gatewayArn :: Lens.Lens' DeleteGatewayResponse (Prelude.Maybe Prelude.Text)+deleteGatewayResponse_gatewayArn = Lens.lens (\DeleteGatewayResponse' {gatewayArn} -> gatewayArn) (\s@DeleteGatewayResponse' {} a -> s {gatewayArn = a} :: DeleteGatewayResponse)++-- | The response's http status code.+deleteGatewayResponse_httpStatus :: Lens.Lens' DeleteGatewayResponse Prelude.Int+deleteGatewayResponse_httpStatus = Lens.lens (\DeleteGatewayResponse' {httpStatus} -> httpStatus) (\s@DeleteGatewayResponse' {} a -> s {httpStatus = a} :: DeleteGatewayResponse)++instance Prelude.NFData DeleteGatewayResponse where+ rnf DeleteGatewayResponse' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/DeleteHypervisor.hs view
@@ -0,0 +1,170 @@+{-# 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.BackupGateway.DeleteHypervisor+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a hypervisor.+module Amazonka.BackupGateway.DeleteHypervisor+ ( -- * Creating a Request+ DeleteHypervisor (..),+ newDeleteHypervisor,++ -- * Request Lenses+ deleteHypervisor_hypervisorArn,++ -- * Destructuring the Response+ DeleteHypervisorResponse (..),+ newDeleteHypervisorResponse,++ -- * Response Lenses+ deleteHypervisorResponse_hypervisorArn,+ deleteHypervisorResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newDeleteHypervisor' smart constructor.+data DeleteHypervisor = DeleteHypervisor'+ { -- | The Amazon Resource Name (ARN) of the hypervisor to delete.+ hypervisorArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteHypervisor' 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:+--+-- 'hypervisorArn', 'deleteHypervisor_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor to delete.+newDeleteHypervisor ::+ -- | 'hypervisorArn'+ Prelude.Text ->+ DeleteHypervisor+newDeleteHypervisor pHypervisorArn_ =+ DeleteHypervisor' {hypervisorArn = pHypervisorArn_}++-- | The Amazon Resource Name (ARN) of the hypervisor to delete.+deleteHypervisor_hypervisorArn :: Lens.Lens' DeleteHypervisor Prelude.Text+deleteHypervisor_hypervisorArn = Lens.lens (\DeleteHypervisor' {hypervisorArn} -> hypervisorArn) (\s@DeleteHypervisor' {} a -> s {hypervisorArn = a} :: DeleteHypervisor)++instance Core.AWSRequest DeleteHypervisor where+ type+ AWSResponse DeleteHypervisor =+ DeleteHypervisorResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteHypervisorResponse'+ Prelude.<$> (x Data..?> "HypervisorArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteHypervisor where+ hashWithSalt _salt DeleteHypervisor' {..} =+ _salt `Prelude.hashWithSalt` hypervisorArn++instance Prelude.NFData DeleteHypervisor where+ rnf DeleteHypervisor' {..} = Prelude.rnf hypervisorArn++instance Data.ToHeaders DeleteHypervisor where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.DeleteHypervisor" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteHypervisor where+ toJSON DeleteHypervisor' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("HypervisorArn" Data..= hypervisorArn)+ ]+ )++instance Data.ToPath DeleteHypervisor where+ toPath = Prelude.const "/"++instance Data.ToQuery DeleteHypervisor where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteHypervisorResponse' smart constructor.+data DeleteHypervisorResponse = DeleteHypervisorResponse'+ { -- | The Amazon Resource Name (ARN) of the hypervisor you deleted.+ hypervisorArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteHypervisorResponse' 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:+--+-- 'hypervisorArn', 'deleteHypervisorResponse_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor you deleted.+--+-- 'httpStatus', 'deleteHypervisorResponse_httpStatus' - The response's http status code.+newDeleteHypervisorResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteHypervisorResponse+newDeleteHypervisorResponse pHttpStatus_ =+ DeleteHypervisorResponse'+ { hypervisorArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the hypervisor you deleted.+deleteHypervisorResponse_hypervisorArn :: Lens.Lens' DeleteHypervisorResponse (Prelude.Maybe Prelude.Text)+deleteHypervisorResponse_hypervisorArn = Lens.lens (\DeleteHypervisorResponse' {hypervisorArn} -> hypervisorArn) (\s@DeleteHypervisorResponse' {} a -> s {hypervisorArn = a} :: DeleteHypervisorResponse)++-- | The response's http status code.+deleteHypervisorResponse_httpStatus :: Lens.Lens' DeleteHypervisorResponse Prelude.Int+deleteHypervisorResponse_httpStatus = Lens.lens (\DeleteHypervisorResponse' {httpStatus} -> httpStatus) (\s@DeleteHypervisorResponse' {} a -> s {httpStatus = a} :: DeleteHypervisorResponse)++instance Prelude.NFData DeleteHypervisorResponse where+ rnf DeleteHypervisorResponse' {..} =+ Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/DisassociateGatewayFromServer.hs view
@@ -0,0 +1,183 @@+{-# 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.BackupGateway.DisassociateGatewayFromServer+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Disassociates a backup gateway from the specified server. After the+-- disassociation process finishes, the gateway can no longer access the+-- virtual machines on the server.+module Amazonka.BackupGateway.DisassociateGatewayFromServer+ ( -- * Creating a Request+ DisassociateGatewayFromServer (..),+ newDisassociateGatewayFromServer,++ -- * Request Lenses+ disassociateGatewayFromServer_gatewayArn,++ -- * Destructuring the Response+ DisassociateGatewayFromServerResponse (..),+ newDisassociateGatewayFromServerResponse,++ -- * Response Lenses+ disassociateGatewayFromServerResponse_gatewayArn,+ disassociateGatewayFromServerResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newDisassociateGatewayFromServer' smart constructor.+data DisassociateGatewayFromServer = DisassociateGatewayFromServer'+ { -- | The Amazon Resource Name (ARN) of the gateway to disassociate.+ gatewayArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateGatewayFromServer' 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:+--+-- 'gatewayArn', 'disassociateGatewayFromServer_gatewayArn' - The Amazon Resource Name (ARN) of the gateway to disassociate.+newDisassociateGatewayFromServer ::+ -- | 'gatewayArn'+ Prelude.Text ->+ DisassociateGatewayFromServer+newDisassociateGatewayFromServer pGatewayArn_ =+ DisassociateGatewayFromServer'+ { gatewayArn =+ pGatewayArn_+ }++-- | The Amazon Resource Name (ARN) of the gateway to disassociate.+disassociateGatewayFromServer_gatewayArn :: Lens.Lens' DisassociateGatewayFromServer Prelude.Text+disassociateGatewayFromServer_gatewayArn = Lens.lens (\DisassociateGatewayFromServer' {gatewayArn} -> gatewayArn) (\s@DisassociateGatewayFromServer' {} a -> s {gatewayArn = a} :: DisassociateGatewayFromServer)++instance+ Core.AWSRequest+ DisassociateGatewayFromServer+ where+ type+ AWSResponse DisassociateGatewayFromServer =+ DisassociateGatewayFromServerResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DisassociateGatewayFromServerResponse'+ Prelude.<$> (x Data..?> "GatewayArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ DisassociateGatewayFromServer+ where+ hashWithSalt _salt DisassociateGatewayFromServer' {..} =+ _salt `Prelude.hashWithSalt` gatewayArn++instance Prelude.NFData DisassociateGatewayFromServer where+ rnf DisassociateGatewayFromServer' {..} =+ Prelude.rnf gatewayArn++instance Data.ToHeaders DisassociateGatewayFromServer where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.DisassociateGatewayFromServer" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DisassociateGatewayFromServer where+ toJSON DisassociateGatewayFromServer' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GatewayArn" Data..= gatewayArn)]+ )++instance Data.ToPath DisassociateGatewayFromServer where+ toPath = Prelude.const "/"++instance Data.ToQuery DisassociateGatewayFromServer where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisassociateGatewayFromServerResponse' smart constructor.+data DisassociateGatewayFromServerResponse = DisassociateGatewayFromServerResponse'+ { -- | The Amazon Resource Name (ARN) of the gateway you disassociated.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateGatewayFromServerResponse' 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:+--+-- 'gatewayArn', 'disassociateGatewayFromServerResponse_gatewayArn' - The Amazon Resource Name (ARN) of the gateway you disassociated.+--+-- 'httpStatus', 'disassociateGatewayFromServerResponse_httpStatus' - The response's http status code.+newDisassociateGatewayFromServerResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DisassociateGatewayFromServerResponse+newDisassociateGatewayFromServerResponse pHttpStatus_ =+ DisassociateGatewayFromServerResponse'+ { gatewayArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the gateway you disassociated.+disassociateGatewayFromServerResponse_gatewayArn :: Lens.Lens' DisassociateGatewayFromServerResponse (Prelude.Maybe Prelude.Text)+disassociateGatewayFromServerResponse_gatewayArn = Lens.lens (\DisassociateGatewayFromServerResponse' {gatewayArn} -> gatewayArn) (\s@DisassociateGatewayFromServerResponse' {} a -> s {gatewayArn = a} :: DisassociateGatewayFromServerResponse)++-- | The response's http status code.+disassociateGatewayFromServerResponse_httpStatus :: Lens.Lens' DisassociateGatewayFromServerResponse Prelude.Int+disassociateGatewayFromServerResponse_httpStatus = Lens.lens (\DisassociateGatewayFromServerResponse' {httpStatus} -> httpStatus) (\s@DisassociateGatewayFromServerResponse' {} a -> s {httpStatus = a} :: DisassociateGatewayFromServerResponse)++instance+ Prelude.NFData+ DisassociateGatewayFromServerResponse+ where+ rnf DisassociateGatewayFromServerResponse' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/GetBandwidthRateLimitSchedule.hs view
@@ -0,0 +1,223 @@+{-# 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.BackupGateway.GetBandwidthRateLimitSchedule+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the bandwidth rate limit schedule for a specified gateway. By+-- default, gateways do not have bandwidth rate limit schedules, which+-- means no bandwidth rate limiting is in effect. Use this to get a+-- gateway\'s bandwidth rate limit schedule.+module Amazonka.BackupGateway.GetBandwidthRateLimitSchedule+ ( -- * Creating a Request+ GetBandwidthRateLimitSchedule (..),+ newGetBandwidthRateLimitSchedule,++ -- * Request Lenses+ getBandwidthRateLimitSchedule_gatewayArn,++ -- * Destructuring the Response+ GetBandwidthRateLimitScheduleResponse (..),+ newGetBandwidthRateLimitScheduleResponse,++ -- * Response Lenses+ getBandwidthRateLimitScheduleResponse_bandwidthRateLimitIntervals,+ getBandwidthRateLimitScheduleResponse_gatewayArn,+ getBandwidthRateLimitScheduleResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newGetBandwidthRateLimitSchedule' smart constructor.+data GetBandwidthRateLimitSchedule = GetBandwidthRateLimitSchedule'+ { -- | The Amazon Resource Name (ARN) of the gateway. Use the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+ -- operation to return a list of gateways for your account and Amazon Web+ -- Services Region.+ gatewayArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBandwidthRateLimitSchedule' 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:+--+-- 'gatewayArn', 'getBandwidthRateLimitSchedule_gatewayArn' - The Amazon Resource Name (ARN) of the gateway. Use the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+newGetBandwidthRateLimitSchedule ::+ -- | 'gatewayArn'+ Prelude.Text ->+ GetBandwidthRateLimitSchedule+newGetBandwidthRateLimitSchedule pGatewayArn_ =+ GetBandwidthRateLimitSchedule'+ { gatewayArn =+ pGatewayArn_+ }++-- | The Amazon Resource Name (ARN) of the gateway. Use the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+getBandwidthRateLimitSchedule_gatewayArn :: Lens.Lens' GetBandwidthRateLimitSchedule Prelude.Text+getBandwidthRateLimitSchedule_gatewayArn = Lens.lens (\GetBandwidthRateLimitSchedule' {gatewayArn} -> gatewayArn) (\s@GetBandwidthRateLimitSchedule' {} a -> s {gatewayArn = a} :: GetBandwidthRateLimitSchedule)++instance+ Core.AWSRequest+ GetBandwidthRateLimitSchedule+ where+ type+ AWSResponse GetBandwidthRateLimitSchedule =+ GetBandwidthRateLimitScheduleResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetBandwidthRateLimitScheduleResponse'+ Prelude.<$> ( x+ Data..?> "BandwidthRateLimitIntervals"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "GatewayArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ GetBandwidthRateLimitSchedule+ where+ hashWithSalt _salt GetBandwidthRateLimitSchedule' {..} =+ _salt `Prelude.hashWithSalt` gatewayArn++instance Prelude.NFData GetBandwidthRateLimitSchedule where+ rnf GetBandwidthRateLimitSchedule' {..} =+ Prelude.rnf gatewayArn++instance Data.ToHeaders GetBandwidthRateLimitSchedule where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.GetBandwidthRateLimitSchedule" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetBandwidthRateLimitSchedule where+ toJSON GetBandwidthRateLimitSchedule' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GatewayArn" Data..= gatewayArn)]+ )++instance Data.ToPath GetBandwidthRateLimitSchedule where+ toPath = Prelude.const "/"++instance Data.ToQuery GetBandwidthRateLimitSchedule where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetBandwidthRateLimitScheduleResponse' smart constructor.+data GetBandwidthRateLimitScheduleResponse = GetBandwidthRateLimitScheduleResponse'+ { -- | An array containing bandwidth rate limit schedule intervals for a+ -- gateway. When no bandwidth rate limit intervals have been scheduled, the+ -- array is empty.+ bandwidthRateLimitIntervals :: Prelude.Maybe [BandwidthRateLimitInterval],+ -- | The Amazon Resource Name (ARN) of the gateway. Use the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+ -- operation to return a list of gateways for your account and Amazon Web+ -- Services Region.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBandwidthRateLimitScheduleResponse' 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:+--+-- 'bandwidthRateLimitIntervals', 'getBandwidthRateLimitScheduleResponse_bandwidthRateLimitIntervals' - An array containing bandwidth rate limit schedule intervals for a+-- gateway. When no bandwidth rate limit intervals have been scheduled, the+-- array is empty.+--+-- 'gatewayArn', 'getBandwidthRateLimitScheduleResponse_gatewayArn' - The Amazon Resource Name (ARN) of the gateway. Use the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+--+-- 'httpStatus', 'getBandwidthRateLimitScheduleResponse_httpStatus' - The response's http status code.+newGetBandwidthRateLimitScheduleResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetBandwidthRateLimitScheduleResponse+newGetBandwidthRateLimitScheduleResponse pHttpStatus_ =+ GetBandwidthRateLimitScheduleResponse'+ { bandwidthRateLimitIntervals =+ Prelude.Nothing,+ gatewayArn = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array containing bandwidth rate limit schedule intervals for a+-- gateway. When no bandwidth rate limit intervals have been scheduled, the+-- array is empty.+getBandwidthRateLimitScheduleResponse_bandwidthRateLimitIntervals :: Lens.Lens' GetBandwidthRateLimitScheduleResponse (Prelude.Maybe [BandwidthRateLimitInterval])+getBandwidthRateLimitScheduleResponse_bandwidthRateLimitIntervals = Lens.lens (\GetBandwidthRateLimitScheduleResponse' {bandwidthRateLimitIntervals} -> bandwidthRateLimitIntervals) (\s@GetBandwidthRateLimitScheduleResponse' {} a -> s {bandwidthRateLimitIntervals = a} :: GetBandwidthRateLimitScheduleResponse) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the gateway. Use the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+getBandwidthRateLimitScheduleResponse_gatewayArn :: Lens.Lens' GetBandwidthRateLimitScheduleResponse (Prelude.Maybe Prelude.Text)+getBandwidthRateLimitScheduleResponse_gatewayArn = Lens.lens (\GetBandwidthRateLimitScheduleResponse' {gatewayArn} -> gatewayArn) (\s@GetBandwidthRateLimitScheduleResponse' {} a -> s {gatewayArn = a} :: GetBandwidthRateLimitScheduleResponse)++-- | The response's http status code.+getBandwidthRateLimitScheduleResponse_httpStatus :: Lens.Lens' GetBandwidthRateLimitScheduleResponse Prelude.Int+getBandwidthRateLimitScheduleResponse_httpStatus = Lens.lens (\GetBandwidthRateLimitScheduleResponse' {httpStatus} -> httpStatus) (\s@GetBandwidthRateLimitScheduleResponse' {} a -> s {httpStatus = a} :: GetBandwidthRateLimitScheduleResponse)++instance+ Prelude.NFData+ GetBandwidthRateLimitScheduleResponse+ where+ rnf GetBandwidthRateLimitScheduleResponse' {..} =+ Prelude.rnf bandwidthRateLimitIntervals+ `Prelude.seq` Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/GetGateway.hs view
@@ -0,0 +1,169 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.GetGateway+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- By providing the ARN (Amazon Resource Name), this API returns the+-- gateway.+module Amazonka.BackupGateway.GetGateway+ ( -- * Creating a Request+ GetGateway (..),+ newGetGateway,++ -- * Request Lenses+ getGateway_gatewayArn,++ -- * Destructuring the Response+ GetGatewayResponse (..),+ newGetGatewayResponse,++ -- * Response Lenses+ getGatewayResponse_gateway,+ getGatewayResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newGetGateway' smart constructor.+data GetGateway = GetGateway'+ { -- | The Amazon Resource Name (ARN) of the gateway.+ gatewayArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetGateway' 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:+--+-- 'gatewayArn', 'getGateway_gatewayArn' - The Amazon Resource Name (ARN) of the gateway.+newGetGateway ::+ -- | 'gatewayArn'+ Prelude.Text ->+ GetGateway+newGetGateway pGatewayArn_ =+ GetGateway' {gatewayArn = pGatewayArn_}++-- | The Amazon Resource Name (ARN) of the gateway.+getGateway_gatewayArn :: Lens.Lens' GetGateway Prelude.Text+getGateway_gatewayArn = Lens.lens (\GetGateway' {gatewayArn} -> gatewayArn) (\s@GetGateway' {} a -> s {gatewayArn = a} :: GetGateway)++instance Core.AWSRequest GetGateway where+ type AWSResponse GetGateway = GetGatewayResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetGatewayResponse'+ Prelude.<$> (x Data..?> "Gateway")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetGateway where+ hashWithSalt _salt GetGateway' {..} =+ _salt `Prelude.hashWithSalt` gatewayArn++instance Prelude.NFData GetGateway where+ rnf GetGateway' {..} = Prelude.rnf gatewayArn++instance Data.ToHeaders GetGateway where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.GetGateway" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetGateway where+ toJSON GetGateway' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GatewayArn" Data..= gatewayArn)]+ )++instance Data.ToPath GetGateway where+ toPath = Prelude.const "/"++instance Data.ToQuery GetGateway where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetGatewayResponse' smart constructor.+data GetGatewayResponse = GetGatewayResponse'+ { -- | By providing the ARN (Amazon Resource Name), this API returns the+ -- gateway.+ gateway :: Prelude.Maybe GatewayDetails,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetGatewayResponse' 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:+--+-- 'gateway', 'getGatewayResponse_gateway' - By providing the ARN (Amazon Resource Name), this API returns the+-- gateway.+--+-- 'httpStatus', 'getGatewayResponse_httpStatus' - The response's http status code.+newGetGatewayResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetGatewayResponse+newGetGatewayResponse pHttpStatus_ =+ GetGatewayResponse'+ { gateway = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | By providing the ARN (Amazon Resource Name), this API returns the+-- gateway.+getGatewayResponse_gateway :: Lens.Lens' GetGatewayResponse (Prelude.Maybe GatewayDetails)+getGatewayResponse_gateway = Lens.lens (\GetGatewayResponse' {gateway} -> gateway) (\s@GetGatewayResponse' {} a -> s {gateway = a} :: GetGatewayResponse)++-- | The response's http status code.+getGatewayResponse_httpStatus :: Lens.Lens' GetGatewayResponse Prelude.Int+getGatewayResponse_httpStatus = Lens.lens (\GetGatewayResponse' {httpStatus} -> httpStatus) (\s@GetGatewayResponse' {} a -> s {httpStatus = a} :: GetGatewayResponse)++instance Prelude.NFData GetGatewayResponse where+ rnf GetGatewayResponse' {..} =+ Prelude.rnf gateway+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/GetHypervisor.hs view
@@ -0,0 +1,173 @@+{-# 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.BackupGateway.GetHypervisor+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- This action requests information about the specified hypervisor to which+-- the gateway will connect. A hypervisor is hardware, software, or+-- firmware that creates and manages virtual machines, and allocates+-- resources to them.+module Amazonka.BackupGateway.GetHypervisor+ ( -- * Creating a Request+ GetHypervisor (..),+ newGetHypervisor,++ -- * Request Lenses+ getHypervisor_hypervisorArn,++ -- * Destructuring the Response+ GetHypervisorResponse (..),+ newGetHypervisorResponse,++ -- * Response Lenses+ getHypervisorResponse_hypervisor,+ getHypervisorResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newGetHypervisor' smart constructor.+data GetHypervisor = GetHypervisor'+ { -- | The Amazon Resource Name (ARN) of the hypervisor.+ hypervisorArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetHypervisor' 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:+--+-- 'hypervisorArn', 'getHypervisor_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor.+newGetHypervisor ::+ -- | 'hypervisorArn'+ Prelude.Text ->+ GetHypervisor+newGetHypervisor pHypervisorArn_ =+ GetHypervisor' {hypervisorArn = pHypervisorArn_}++-- | The Amazon Resource Name (ARN) of the hypervisor.+getHypervisor_hypervisorArn :: Lens.Lens' GetHypervisor Prelude.Text+getHypervisor_hypervisorArn = Lens.lens (\GetHypervisor' {hypervisorArn} -> hypervisorArn) (\s@GetHypervisor' {} a -> s {hypervisorArn = a} :: GetHypervisor)++instance Core.AWSRequest GetHypervisor where+ type+ AWSResponse GetHypervisor =+ GetHypervisorResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetHypervisorResponse'+ Prelude.<$> (x Data..?> "Hypervisor")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetHypervisor where+ hashWithSalt _salt GetHypervisor' {..} =+ _salt `Prelude.hashWithSalt` hypervisorArn++instance Prelude.NFData GetHypervisor where+ rnf GetHypervisor' {..} = Prelude.rnf hypervisorArn++instance Data.ToHeaders GetHypervisor where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.GetHypervisor" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetHypervisor where+ toJSON GetHypervisor' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("HypervisorArn" Data..= hypervisorArn)+ ]+ )++instance Data.ToPath GetHypervisor where+ toPath = Prelude.const "/"++instance Data.ToQuery GetHypervisor where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetHypervisorResponse' smart constructor.+data GetHypervisorResponse = GetHypervisorResponse'+ { -- | Details about the requested hypervisor.+ hypervisor :: Prelude.Maybe HypervisorDetails,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetHypervisorResponse' 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:+--+-- 'hypervisor', 'getHypervisorResponse_hypervisor' - Details about the requested hypervisor.+--+-- 'httpStatus', 'getHypervisorResponse_httpStatus' - The response's http status code.+newGetHypervisorResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetHypervisorResponse+newGetHypervisorResponse pHttpStatus_ =+ GetHypervisorResponse'+ { hypervisor =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Details about the requested hypervisor.+getHypervisorResponse_hypervisor :: Lens.Lens' GetHypervisorResponse (Prelude.Maybe HypervisorDetails)+getHypervisorResponse_hypervisor = Lens.lens (\GetHypervisorResponse' {hypervisor} -> hypervisor) (\s@GetHypervisorResponse' {} a -> s {hypervisor = a} :: GetHypervisorResponse)++-- | The response's http status code.+getHypervisorResponse_httpStatus :: Lens.Lens' GetHypervisorResponse Prelude.Int+getHypervisorResponse_httpStatus = Lens.lens (\GetHypervisorResponse' {httpStatus} -> httpStatus) (\s@GetHypervisorResponse' {} a -> s {httpStatus = a} :: GetHypervisorResponse)++instance Prelude.NFData GetHypervisorResponse where+ rnf GetHypervisorResponse' {..} =+ Prelude.rnf hypervisor+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/GetHypervisorPropertyMappings.hs view
@@ -0,0 +1,217 @@+{-# 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.BackupGateway.GetHypervisorPropertyMappings+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- This action retrieves the property mappings for the specified+-- hypervisor. A hypervisor property mapping displays the relationship of+-- entity properties available from the on-premises hypervisor to the+-- properties available in Amazon Web Services.+module Amazonka.BackupGateway.GetHypervisorPropertyMappings+ ( -- * Creating a Request+ GetHypervisorPropertyMappings (..),+ newGetHypervisorPropertyMappings,++ -- * Request Lenses+ getHypervisorPropertyMappings_hypervisorArn,++ -- * Destructuring the Response+ GetHypervisorPropertyMappingsResponse (..),+ newGetHypervisorPropertyMappingsResponse,++ -- * Response Lenses+ getHypervisorPropertyMappingsResponse_hypervisorArn,+ getHypervisorPropertyMappingsResponse_iamRoleArn,+ getHypervisorPropertyMappingsResponse_vmwareToAwsTagMappings,+ getHypervisorPropertyMappingsResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newGetHypervisorPropertyMappings' smart constructor.+data GetHypervisorPropertyMappings = GetHypervisorPropertyMappings'+ { -- | The Amazon Resource Name (ARN) of the hypervisor.+ hypervisorArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetHypervisorPropertyMappings' 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:+--+-- 'hypervisorArn', 'getHypervisorPropertyMappings_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor.+newGetHypervisorPropertyMappings ::+ -- | 'hypervisorArn'+ Prelude.Text ->+ GetHypervisorPropertyMappings+newGetHypervisorPropertyMappings pHypervisorArn_ =+ GetHypervisorPropertyMappings'+ { hypervisorArn =+ pHypervisorArn_+ }++-- | The Amazon Resource Name (ARN) of the hypervisor.+getHypervisorPropertyMappings_hypervisorArn :: Lens.Lens' GetHypervisorPropertyMappings Prelude.Text+getHypervisorPropertyMappings_hypervisorArn = Lens.lens (\GetHypervisorPropertyMappings' {hypervisorArn} -> hypervisorArn) (\s@GetHypervisorPropertyMappings' {} a -> s {hypervisorArn = a} :: GetHypervisorPropertyMappings)++instance+ Core.AWSRequest+ GetHypervisorPropertyMappings+ where+ type+ AWSResponse GetHypervisorPropertyMappings =+ GetHypervisorPropertyMappingsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetHypervisorPropertyMappingsResponse'+ Prelude.<$> (x Data..?> "HypervisorArn")+ Prelude.<*> (x Data..?> "IamRoleArn")+ Prelude.<*> ( x+ Data..?> "VmwareToAwsTagMappings"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ GetHypervisorPropertyMappings+ where+ hashWithSalt _salt GetHypervisorPropertyMappings' {..} =+ _salt `Prelude.hashWithSalt` hypervisorArn++instance Prelude.NFData GetHypervisorPropertyMappings where+ rnf GetHypervisorPropertyMappings' {..} =+ Prelude.rnf hypervisorArn++instance Data.ToHeaders GetHypervisorPropertyMappings where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.GetHypervisorPropertyMappings" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetHypervisorPropertyMappings where+ toJSON GetHypervisorPropertyMappings' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("HypervisorArn" Data..= hypervisorArn)+ ]+ )++instance Data.ToPath GetHypervisorPropertyMappings where+ toPath = Prelude.const "/"++instance Data.ToQuery GetHypervisorPropertyMappings where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetHypervisorPropertyMappingsResponse' smart constructor.+data GetHypervisorPropertyMappingsResponse = GetHypervisorPropertyMappingsResponse'+ { -- | The Amazon Resource Name (ARN) of the hypervisor.+ hypervisorArn :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the IAM role.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | This is a display of the mappings of on-premises VMware tags to the+ -- Amazon Web Services tags.+ vmwareToAwsTagMappings :: Prelude.Maybe [VmwareToAwsTagMapping],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetHypervisorPropertyMappingsResponse' 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:+--+-- 'hypervisorArn', 'getHypervisorPropertyMappingsResponse_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor.+--+-- 'iamRoleArn', 'getHypervisorPropertyMappingsResponse_iamRoleArn' - The Amazon Resource Name (ARN) of the IAM role.+--+-- 'vmwareToAwsTagMappings', 'getHypervisorPropertyMappingsResponse_vmwareToAwsTagMappings' - This is a display of the mappings of on-premises VMware tags to the+-- Amazon Web Services tags.+--+-- 'httpStatus', 'getHypervisorPropertyMappingsResponse_httpStatus' - The response's http status code.+newGetHypervisorPropertyMappingsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetHypervisorPropertyMappingsResponse+newGetHypervisorPropertyMappingsResponse pHttpStatus_ =+ GetHypervisorPropertyMappingsResponse'+ { hypervisorArn =+ Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ vmwareToAwsTagMappings =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the hypervisor.+getHypervisorPropertyMappingsResponse_hypervisorArn :: Lens.Lens' GetHypervisorPropertyMappingsResponse (Prelude.Maybe Prelude.Text)+getHypervisorPropertyMappingsResponse_hypervisorArn = Lens.lens (\GetHypervisorPropertyMappingsResponse' {hypervisorArn} -> hypervisorArn) (\s@GetHypervisorPropertyMappingsResponse' {} a -> s {hypervisorArn = a} :: GetHypervisorPropertyMappingsResponse)++-- | The Amazon Resource Name (ARN) of the IAM role.+getHypervisorPropertyMappingsResponse_iamRoleArn :: Lens.Lens' GetHypervisorPropertyMappingsResponse (Prelude.Maybe Prelude.Text)+getHypervisorPropertyMappingsResponse_iamRoleArn = Lens.lens (\GetHypervisorPropertyMappingsResponse' {iamRoleArn} -> iamRoleArn) (\s@GetHypervisorPropertyMappingsResponse' {} a -> s {iamRoleArn = a} :: GetHypervisorPropertyMappingsResponse)++-- | This is a display of the mappings of on-premises VMware tags to the+-- Amazon Web Services tags.+getHypervisorPropertyMappingsResponse_vmwareToAwsTagMappings :: Lens.Lens' GetHypervisorPropertyMappingsResponse (Prelude.Maybe [VmwareToAwsTagMapping])+getHypervisorPropertyMappingsResponse_vmwareToAwsTagMappings = Lens.lens (\GetHypervisorPropertyMappingsResponse' {vmwareToAwsTagMappings} -> vmwareToAwsTagMappings) (\s@GetHypervisorPropertyMappingsResponse' {} a -> s {vmwareToAwsTagMappings = a} :: GetHypervisorPropertyMappingsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getHypervisorPropertyMappingsResponse_httpStatus :: Lens.Lens' GetHypervisorPropertyMappingsResponse Prelude.Int+getHypervisorPropertyMappingsResponse_httpStatus = Lens.lens (\GetHypervisorPropertyMappingsResponse' {httpStatus} -> httpStatus) (\s@GetHypervisorPropertyMappingsResponse' {} a -> s {httpStatus = a} :: GetHypervisorPropertyMappingsResponse)++instance+ Prelude.NFData+ GetHypervisorPropertyMappingsResponse+ where+ rnf GetHypervisorPropertyMappingsResponse' {..} =+ Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf vmwareToAwsTagMappings+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/GetVirtualMachine.hs view
@@ -0,0 +1,172 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.GetVirtualMachine+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- By providing the ARN (Amazon Resource Name), this API returns the+-- virtual machine.+module Amazonka.BackupGateway.GetVirtualMachine+ ( -- * Creating a Request+ GetVirtualMachine (..),+ newGetVirtualMachine,++ -- * Request Lenses+ getVirtualMachine_resourceArn,++ -- * Destructuring the Response+ GetVirtualMachineResponse (..),+ newGetVirtualMachineResponse,++ -- * Response Lenses+ getVirtualMachineResponse_virtualMachine,+ getVirtualMachineResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newGetVirtualMachine' smart constructor.+data GetVirtualMachine = GetVirtualMachine'+ { -- | The Amazon Resource Name (ARN) of the virtual machine.+ resourceArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetVirtualMachine' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'getVirtualMachine_resourceArn' - The Amazon Resource Name (ARN) of the virtual machine.+newGetVirtualMachine ::+ -- | 'resourceArn'+ Prelude.Text ->+ GetVirtualMachine+newGetVirtualMachine pResourceArn_ =+ GetVirtualMachine' {resourceArn = pResourceArn_}++-- | The Amazon Resource Name (ARN) of the virtual machine.+getVirtualMachine_resourceArn :: Lens.Lens' GetVirtualMachine Prelude.Text+getVirtualMachine_resourceArn = Lens.lens (\GetVirtualMachine' {resourceArn} -> resourceArn) (\s@GetVirtualMachine' {} a -> s {resourceArn = a} :: GetVirtualMachine)++instance Core.AWSRequest GetVirtualMachine where+ type+ AWSResponse GetVirtualMachine =+ GetVirtualMachineResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetVirtualMachineResponse'+ Prelude.<$> (x Data..?> "VirtualMachine")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetVirtualMachine where+ hashWithSalt _salt GetVirtualMachine' {..} =+ _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData GetVirtualMachine where+ rnf GetVirtualMachine' {..} = Prelude.rnf resourceArn++instance Data.ToHeaders GetVirtualMachine where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.GetVirtualMachine" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetVirtualMachine where+ toJSON GetVirtualMachine' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("ResourceArn" Data..= resourceArn)]+ )++instance Data.ToPath GetVirtualMachine where+ toPath = Prelude.const "/"++instance Data.ToQuery GetVirtualMachine where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetVirtualMachineResponse' smart constructor.+data GetVirtualMachineResponse = GetVirtualMachineResponse'+ { -- | This object contains the basic attributes of @VirtualMachine@ contained+ -- by the output of @GetVirtualMachine@+ virtualMachine :: Prelude.Maybe VirtualMachineDetails,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetVirtualMachineResponse' 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:+--+-- 'virtualMachine', 'getVirtualMachineResponse_virtualMachine' - This object contains the basic attributes of @VirtualMachine@ contained+-- by the output of @GetVirtualMachine@+--+-- 'httpStatus', 'getVirtualMachineResponse_httpStatus' - The response's http status code.+newGetVirtualMachineResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetVirtualMachineResponse+newGetVirtualMachineResponse pHttpStatus_ =+ GetVirtualMachineResponse'+ { virtualMachine =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | This object contains the basic attributes of @VirtualMachine@ contained+-- by the output of @GetVirtualMachine@+getVirtualMachineResponse_virtualMachine :: Lens.Lens' GetVirtualMachineResponse (Prelude.Maybe VirtualMachineDetails)+getVirtualMachineResponse_virtualMachine = Lens.lens (\GetVirtualMachineResponse' {virtualMachine} -> virtualMachine) (\s@GetVirtualMachineResponse' {} a -> s {virtualMachine = a} :: GetVirtualMachineResponse)++-- | The response's http status code.+getVirtualMachineResponse_httpStatus :: Lens.Lens' GetVirtualMachineResponse Prelude.Int+getVirtualMachineResponse_httpStatus = Lens.lens (\GetVirtualMachineResponse' {httpStatus} -> httpStatus) (\s@GetVirtualMachineResponse' {} a -> s {httpStatus = a} :: GetVirtualMachineResponse)++instance Prelude.NFData GetVirtualMachineResponse where+ rnf GetVirtualMachineResponse' {..} =+ Prelude.rnf virtualMachine+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/ImportHypervisorConfiguration.hs view
@@ -0,0 +1,253 @@+{-# 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.BackupGateway.ImportHypervisorConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Connect to a hypervisor by importing its configuration.+module Amazonka.BackupGateway.ImportHypervisorConfiguration+ ( -- * Creating a Request+ ImportHypervisorConfiguration (..),+ newImportHypervisorConfiguration,++ -- * Request Lenses+ importHypervisorConfiguration_kmsKeyArn,+ importHypervisorConfiguration_password,+ importHypervisorConfiguration_tags,+ importHypervisorConfiguration_username,+ importHypervisorConfiguration_host,+ importHypervisorConfiguration_name,++ -- * Destructuring the Response+ ImportHypervisorConfigurationResponse (..),+ newImportHypervisorConfigurationResponse,++ -- * Response Lenses+ importHypervisorConfigurationResponse_hypervisorArn,+ importHypervisorConfigurationResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newImportHypervisorConfiguration' smart constructor.+data ImportHypervisorConfiguration = ImportHypervisorConfiguration'+ { -- | The Key Management Service for the hypervisor.+ kmsKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The password for the hypervisor.+ password :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | The tags of the hypervisor configuration to import.+ tags :: Prelude.Maybe [Tag],+ -- | The username for the hypervisor.+ username :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | The server host of the hypervisor. This can be either an IP address or a+ -- fully-qualified domain name (FQDN).+ host :: Prelude.Text,+ -- | The name of the hypervisor.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ImportHypervisorConfiguration' 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:+--+-- 'kmsKeyArn', 'importHypervisorConfiguration_kmsKeyArn' - The Key Management Service for the hypervisor.+--+-- 'password', 'importHypervisorConfiguration_password' - The password for the hypervisor.+--+-- 'tags', 'importHypervisorConfiguration_tags' - The tags of the hypervisor configuration to import.+--+-- 'username', 'importHypervisorConfiguration_username' - The username for the hypervisor.+--+-- 'host', 'importHypervisorConfiguration_host' - The server host of the hypervisor. This can be either an IP address or a+-- fully-qualified domain name (FQDN).+--+-- 'name', 'importHypervisorConfiguration_name' - The name of the hypervisor.+newImportHypervisorConfiguration ::+ -- | 'host'+ Prelude.Text ->+ -- | 'name'+ Prelude.Text ->+ ImportHypervisorConfiguration+newImportHypervisorConfiguration pHost_ pName_ =+ ImportHypervisorConfiguration'+ { kmsKeyArn =+ Prelude.Nothing,+ password = Prelude.Nothing,+ tags = Prelude.Nothing,+ username = Prelude.Nothing,+ host = pHost_,+ name = pName_+ }++-- | The Key Management Service for the hypervisor.+importHypervisorConfiguration_kmsKeyArn :: Lens.Lens' ImportHypervisorConfiguration (Prelude.Maybe Prelude.Text)+importHypervisorConfiguration_kmsKeyArn = Lens.lens (\ImportHypervisorConfiguration' {kmsKeyArn} -> kmsKeyArn) (\s@ImportHypervisorConfiguration' {} a -> s {kmsKeyArn = a} :: ImportHypervisorConfiguration)++-- | The password for the hypervisor.+importHypervisorConfiguration_password :: Lens.Lens' ImportHypervisorConfiguration (Prelude.Maybe Prelude.Text)+importHypervisorConfiguration_password = Lens.lens (\ImportHypervisorConfiguration' {password} -> password) (\s@ImportHypervisorConfiguration' {} a -> s {password = a} :: ImportHypervisorConfiguration) Prelude.. Lens.mapping Data._Sensitive++-- | The tags of the hypervisor configuration to import.+importHypervisorConfiguration_tags :: Lens.Lens' ImportHypervisorConfiguration (Prelude.Maybe [Tag])+importHypervisorConfiguration_tags = Lens.lens (\ImportHypervisorConfiguration' {tags} -> tags) (\s@ImportHypervisorConfiguration' {} a -> s {tags = a} :: ImportHypervisorConfiguration) Prelude.. Lens.mapping Lens.coerced++-- | The username for the hypervisor.+importHypervisorConfiguration_username :: Lens.Lens' ImportHypervisorConfiguration (Prelude.Maybe Prelude.Text)+importHypervisorConfiguration_username = Lens.lens (\ImportHypervisorConfiguration' {username} -> username) (\s@ImportHypervisorConfiguration' {} a -> s {username = a} :: ImportHypervisorConfiguration) Prelude.. Lens.mapping Data._Sensitive++-- | The server host of the hypervisor. This can be either an IP address or a+-- fully-qualified domain name (FQDN).+importHypervisorConfiguration_host :: Lens.Lens' ImportHypervisorConfiguration Prelude.Text+importHypervisorConfiguration_host = Lens.lens (\ImportHypervisorConfiguration' {host} -> host) (\s@ImportHypervisorConfiguration' {} a -> s {host = a} :: ImportHypervisorConfiguration)++-- | The name of the hypervisor.+importHypervisorConfiguration_name :: Lens.Lens' ImportHypervisorConfiguration Prelude.Text+importHypervisorConfiguration_name = Lens.lens (\ImportHypervisorConfiguration' {name} -> name) (\s@ImportHypervisorConfiguration' {} a -> s {name = a} :: ImportHypervisorConfiguration)++instance+ Core.AWSRequest+ ImportHypervisorConfiguration+ where+ type+ AWSResponse ImportHypervisorConfiguration =+ ImportHypervisorConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ImportHypervisorConfigurationResponse'+ Prelude.<$> (x Data..?> "HypervisorArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ ImportHypervisorConfiguration+ where+ hashWithSalt _salt ImportHypervisorConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` kmsKeyArn+ `Prelude.hashWithSalt` password+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` username+ `Prelude.hashWithSalt` host+ `Prelude.hashWithSalt` name++instance Prelude.NFData ImportHypervisorConfiguration where+ rnf ImportHypervisorConfiguration' {..} =+ Prelude.rnf kmsKeyArn+ `Prelude.seq` Prelude.rnf password+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf username+ `Prelude.seq` Prelude.rnf host+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders ImportHypervisorConfiguration where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.ImportHypervisorConfiguration" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ImportHypervisorConfiguration where+ toJSON ImportHypervisorConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("KmsKeyArn" Data..=) Prelude.<$> kmsKeyArn,+ ("Password" Data..=) Prelude.<$> password,+ ("Tags" Data..=) Prelude.<$> tags,+ ("Username" Data..=) Prelude.<$> username,+ Prelude.Just ("Host" Data..= host),+ Prelude.Just ("Name" Data..= name)+ ]+ )++instance Data.ToPath ImportHypervisorConfiguration where+ toPath = Prelude.const "/"++instance Data.ToQuery ImportHypervisorConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newImportHypervisorConfigurationResponse' smart constructor.+data ImportHypervisorConfigurationResponse = ImportHypervisorConfigurationResponse'+ { -- | The Amazon Resource Name (ARN) of the hypervisor you disassociated.+ hypervisorArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ImportHypervisorConfigurationResponse' 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:+--+-- 'hypervisorArn', 'importHypervisorConfigurationResponse_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor you disassociated.+--+-- 'httpStatus', 'importHypervisorConfigurationResponse_httpStatus' - The response's http status code.+newImportHypervisorConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ImportHypervisorConfigurationResponse+newImportHypervisorConfigurationResponse pHttpStatus_ =+ ImportHypervisorConfigurationResponse'+ { hypervisorArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the hypervisor you disassociated.+importHypervisorConfigurationResponse_hypervisorArn :: Lens.Lens' ImportHypervisorConfigurationResponse (Prelude.Maybe Prelude.Text)+importHypervisorConfigurationResponse_hypervisorArn = Lens.lens (\ImportHypervisorConfigurationResponse' {hypervisorArn} -> hypervisorArn) (\s@ImportHypervisorConfigurationResponse' {} a -> s {hypervisorArn = a} :: ImportHypervisorConfigurationResponse)++-- | The response's http status code.+importHypervisorConfigurationResponse_httpStatus :: Lens.Lens' ImportHypervisorConfigurationResponse Prelude.Int+importHypervisorConfigurationResponse_httpStatus = Lens.lens (\ImportHypervisorConfigurationResponse' {httpStatus} -> httpStatus) (\s@ImportHypervisorConfigurationResponse' {} a -> s {httpStatus = a} :: ImportHypervisorConfigurationResponse)++instance+ Prelude.NFData+ ImportHypervisorConfigurationResponse+ where+ rnf ImportHypervisorConfigurationResponse' {..} =+ Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/Lens.hs view
@@ -0,0 +1,299 @@+{-# 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.BackupGateway.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.BackupGateway.Lens+ ( -- * Operations++ -- ** AssociateGatewayToServer+ associateGatewayToServer_gatewayArn,+ associateGatewayToServer_serverArn,+ associateGatewayToServerResponse_gatewayArn,+ associateGatewayToServerResponse_httpStatus,++ -- ** CreateGateway+ createGateway_tags,+ createGateway_activationKey,+ createGateway_gatewayDisplayName,+ createGateway_gatewayType,+ createGatewayResponse_gatewayArn,+ createGatewayResponse_httpStatus,++ -- ** DeleteGateway+ deleteGateway_gatewayArn,+ deleteGatewayResponse_gatewayArn,+ deleteGatewayResponse_httpStatus,++ -- ** DeleteHypervisor+ deleteHypervisor_hypervisorArn,+ deleteHypervisorResponse_hypervisorArn,+ deleteHypervisorResponse_httpStatus,++ -- ** DisassociateGatewayFromServer+ disassociateGatewayFromServer_gatewayArn,+ disassociateGatewayFromServerResponse_gatewayArn,+ disassociateGatewayFromServerResponse_httpStatus,++ -- ** GetBandwidthRateLimitSchedule+ getBandwidthRateLimitSchedule_gatewayArn,+ getBandwidthRateLimitScheduleResponse_bandwidthRateLimitIntervals,+ getBandwidthRateLimitScheduleResponse_gatewayArn,+ getBandwidthRateLimitScheduleResponse_httpStatus,++ -- ** GetGateway+ getGateway_gatewayArn,+ getGatewayResponse_gateway,+ getGatewayResponse_httpStatus,++ -- ** GetHypervisor+ getHypervisor_hypervisorArn,+ getHypervisorResponse_hypervisor,+ getHypervisorResponse_httpStatus,++ -- ** GetHypervisorPropertyMappings+ getHypervisorPropertyMappings_hypervisorArn,+ getHypervisorPropertyMappingsResponse_hypervisorArn,+ getHypervisorPropertyMappingsResponse_iamRoleArn,+ getHypervisorPropertyMappingsResponse_vmwareToAwsTagMappings,+ getHypervisorPropertyMappingsResponse_httpStatus,++ -- ** GetVirtualMachine+ getVirtualMachine_resourceArn,+ getVirtualMachineResponse_virtualMachine,+ getVirtualMachineResponse_httpStatus,++ -- ** ImportHypervisorConfiguration+ importHypervisorConfiguration_kmsKeyArn,+ importHypervisorConfiguration_password,+ importHypervisorConfiguration_tags,+ importHypervisorConfiguration_username,+ importHypervisorConfiguration_host,+ importHypervisorConfiguration_name,+ importHypervisorConfigurationResponse_hypervisorArn,+ importHypervisorConfigurationResponse_httpStatus,++ -- ** ListGateways+ listGateways_maxResults,+ listGateways_nextToken,+ listGatewaysResponse_gateways,+ listGatewaysResponse_nextToken,+ listGatewaysResponse_httpStatus,++ -- ** ListHypervisors+ listHypervisors_maxResults,+ listHypervisors_nextToken,+ listHypervisorsResponse_hypervisors,+ listHypervisorsResponse_nextToken,+ listHypervisorsResponse_httpStatus,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,++ -- ** ListVirtualMachines+ listVirtualMachines_hypervisorArn,+ listVirtualMachines_maxResults,+ listVirtualMachines_nextToken,+ listVirtualMachinesResponse_nextToken,+ listVirtualMachinesResponse_virtualMachines,+ listVirtualMachinesResponse_httpStatus,++ -- ** PutBandwidthRateLimitSchedule+ putBandwidthRateLimitSchedule_bandwidthRateLimitIntervals,+ putBandwidthRateLimitSchedule_gatewayArn,+ putBandwidthRateLimitScheduleResponse_gatewayArn,+ putBandwidthRateLimitScheduleResponse_httpStatus,++ -- ** PutHypervisorPropertyMappings+ putHypervisorPropertyMappings_hypervisorArn,+ putHypervisorPropertyMappings_iamRoleArn,+ putHypervisorPropertyMappings_vmwareToAwsTagMappings,+ putHypervisorPropertyMappingsResponse_hypervisorArn,+ putHypervisorPropertyMappingsResponse_httpStatus,++ -- ** PutMaintenanceStartTime+ putMaintenanceStartTime_dayOfMonth,+ putMaintenanceStartTime_dayOfWeek,+ putMaintenanceStartTime_gatewayArn,+ putMaintenanceStartTime_hourOfDay,+ putMaintenanceStartTime_minuteOfHour,+ putMaintenanceStartTimeResponse_gatewayArn,+ putMaintenanceStartTimeResponse_httpStatus,++ -- ** StartVirtualMachinesMetadataSync+ startVirtualMachinesMetadataSync_hypervisorArn,+ startVirtualMachinesMetadataSyncResponse_hypervisorArn,+ startVirtualMachinesMetadataSyncResponse_httpStatus,++ -- ** TagResource+ tagResource_resourceARN,+ tagResource_tags,+ tagResourceResponse_resourceARN,+ tagResourceResponse_httpStatus,++ -- ** TestHypervisorConfiguration+ testHypervisorConfiguration_password,+ testHypervisorConfiguration_username,+ testHypervisorConfiguration_gatewayArn,+ testHypervisorConfiguration_host,+ testHypervisorConfigurationResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceARN,+ untagResource_tagKeys,+ untagResourceResponse_resourceARN,+ untagResourceResponse_httpStatus,++ -- ** UpdateGatewayInformation+ updateGatewayInformation_gatewayDisplayName,+ updateGatewayInformation_gatewayArn,+ updateGatewayInformationResponse_gatewayArn,+ updateGatewayInformationResponse_httpStatus,++ -- ** UpdateGatewaySoftwareNow+ updateGatewaySoftwareNow_gatewayArn,+ updateGatewaySoftwareNowResponse_gatewayArn,+ updateGatewaySoftwareNowResponse_httpStatus,++ -- ** UpdateHypervisor+ updateHypervisor_host,+ updateHypervisor_logGroupArn,+ updateHypervisor_name,+ updateHypervisor_password,+ updateHypervisor_username,+ updateHypervisor_hypervisorArn,+ updateHypervisorResponse_hypervisorArn,+ updateHypervisorResponse_httpStatus,++ -- * Types++ -- ** BandwidthRateLimitInterval+ bandwidthRateLimitInterval_averageUploadRateLimitInBitsPerSec,+ bandwidthRateLimitInterval_daysOfWeek,+ bandwidthRateLimitInterval_endHourOfDay,+ bandwidthRateLimitInterval_endMinuteOfHour,+ bandwidthRateLimitInterval_startHourOfDay,+ bandwidthRateLimitInterval_startMinuteOfHour,++ -- ** Gateway+ gateway_gatewayArn,+ gateway_gatewayDisplayName,+ gateway_gatewayType,+ gateway_hypervisorId,+ gateway_lastSeenTime,++ -- ** GatewayDetails+ gatewayDetails_gatewayArn,+ gatewayDetails_gatewayDisplayName,+ gatewayDetails_gatewayType,+ gatewayDetails_hypervisorId,+ gatewayDetails_lastSeenTime,+ gatewayDetails_maintenanceStartTime,+ gatewayDetails_nextUpdateAvailabilityTime,+ gatewayDetails_vpcEndpoint,++ -- ** Hypervisor+ hypervisor_host,+ hypervisor_hypervisorArn,+ hypervisor_kmsKeyArn,+ hypervisor_name,+ hypervisor_state,++ -- ** HypervisorDetails+ hypervisorDetails_host,+ hypervisorDetails_hypervisorArn,+ hypervisorDetails_kmsKeyArn,+ hypervisorDetails_lastSuccessfulMetadataSyncTime,+ hypervisorDetails_latestMetadataSyncStatus,+ hypervisorDetails_latestMetadataSyncStatusMessage,+ hypervisorDetails_logGroupArn,+ hypervisorDetails_name,+ hypervisorDetails_state,++ -- ** MaintenanceStartTime+ maintenanceStartTime_dayOfMonth,+ maintenanceStartTime_dayOfWeek,+ maintenanceStartTime_hourOfDay,+ maintenanceStartTime_minuteOfHour,++ -- ** Tag+ tag_key,+ tag_value,++ -- ** VirtualMachine+ virtualMachine_hostName,+ virtualMachine_hypervisorId,+ virtualMachine_lastBackupDate,+ virtualMachine_name,+ virtualMachine_path,+ virtualMachine_resourceArn,++ -- ** VirtualMachineDetails+ virtualMachineDetails_hostName,+ virtualMachineDetails_hypervisorId,+ virtualMachineDetails_lastBackupDate,+ virtualMachineDetails_name,+ virtualMachineDetails_path,+ virtualMachineDetails_resourceArn,+ virtualMachineDetails_vmwareTags,++ -- ** VmwareTag+ vmwareTag_vmwareCategory,+ vmwareTag_vmwareTagDescription,+ vmwareTag_vmwareTagName,++ -- ** VmwareToAwsTagMapping+ vmwareToAwsTagMapping_awsTagKey,+ vmwareToAwsTagMapping_awsTagValue,+ vmwareToAwsTagMapping_vmwareCategory,+ vmwareToAwsTagMapping_vmwareTagName,+ )+where++import Amazonka.BackupGateway.AssociateGatewayToServer+import Amazonka.BackupGateway.CreateGateway+import Amazonka.BackupGateway.DeleteGateway+import Amazonka.BackupGateway.DeleteHypervisor+import Amazonka.BackupGateway.DisassociateGatewayFromServer+import Amazonka.BackupGateway.GetBandwidthRateLimitSchedule+import Amazonka.BackupGateway.GetGateway+import Amazonka.BackupGateway.GetHypervisor+import Amazonka.BackupGateway.GetHypervisorPropertyMappings+import Amazonka.BackupGateway.GetVirtualMachine+import Amazonka.BackupGateway.ImportHypervisorConfiguration+import Amazonka.BackupGateway.ListGateways+import Amazonka.BackupGateway.ListHypervisors+import Amazonka.BackupGateway.ListTagsForResource+import Amazonka.BackupGateway.ListVirtualMachines+import Amazonka.BackupGateway.PutBandwidthRateLimitSchedule+import Amazonka.BackupGateway.PutHypervisorPropertyMappings+import Amazonka.BackupGateway.PutMaintenanceStartTime+import Amazonka.BackupGateway.StartVirtualMachinesMetadataSync+import Amazonka.BackupGateway.TagResource+import Amazonka.BackupGateway.TestHypervisorConfiguration+import Amazonka.BackupGateway.Types.BandwidthRateLimitInterval+import Amazonka.BackupGateway.Types.Gateway+import Amazonka.BackupGateway.Types.GatewayDetails+import Amazonka.BackupGateway.Types.Hypervisor+import Amazonka.BackupGateway.Types.HypervisorDetails+import Amazonka.BackupGateway.Types.MaintenanceStartTime+import Amazonka.BackupGateway.Types.Tag+import Amazonka.BackupGateway.Types.VirtualMachine+import Amazonka.BackupGateway.Types.VirtualMachineDetails+import Amazonka.BackupGateway.Types.VmwareTag+import Amazonka.BackupGateway.Types.VmwareToAwsTagMapping+import Amazonka.BackupGateway.UntagResource+import Amazonka.BackupGateway.UpdateGatewayInformation+import Amazonka.BackupGateway.UpdateGatewaySoftwareNow+import Amazonka.BackupGateway.UpdateHypervisor
+ gen/Amazonka/BackupGateway/ListGateways.hs view
@@ -0,0 +1,237 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.ListGateways+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists backup gateways owned by an Amazon Web Services account in an+-- Amazon Web Services Region. The returned list is ordered by gateway+-- Amazon Resource Name (ARN).+--+-- This operation returns paginated results.+module Amazonka.BackupGateway.ListGateways+ ( -- * Creating a Request+ ListGateways (..),+ newListGateways,++ -- * Request Lenses+ listGateways_maxResults,+ listGateways_nextToken,++ -- * Destructuring the Response+ ListGatewaysResponse (..),+ newListGatewaysResponse,++ -- * Response Lenses+ listGatewaysResponse_gateways,+ listGatewaysResponse_nextToken,+ listGatewaysResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newListGateways' smart constructor.+data ListGateways = ListGateways'+ { -- | The maximum number of gateways to list.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned resources. For+ -- example, if a request is made to return @MaxResults@ number of+ -- resources, @NextToken@ allows you to return more items in your list+ -- starting at the location pointed to by the next token.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListGateways' 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', 'listGateways_maxResults' - The maximum number of gateways to list.+--+-- 'nextToken', 'listGateways_nextToken' - The next item following a partial list of returned resources. For+-- example, if a request is made to return @MaxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+newListGateways ::+ ListGateways+newListGateways =+ ListGateways'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of gateways to list.+listGateways_maxResults :: Lens.Lens' ListGateways (Prelude.Maybe Prelude.Natural)+listGateways_maxResults = Lens.lens (\ListGateways' {maxResults} -> maxResults) (\s@ListGateways' {} a -> s {maxResults = a} :: ListGateways)++-- | The next item following a partial list of returned resources. For+-- example, if a request is made to return @MaxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+listGateways_nextToken :: Lens.Lens' ListGateways (Prelude.Maybe Prelude.Text)+listGateways_nextToken = Lens.lens (\ListGateways' {nextToken} -> nextToken) (\s@ListGateways' {} a -> s {nextToken = a} :: ListGateways)++instance Core.AWSPager ListGateways where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listGatewaysResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listGatewaysResponse_gateways+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listGateways_nextToken+ Lens..~ rs+ Lens.^? listGatewaysResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListGateways where+ type AWSResponse ListGateways = ListGatewaysResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListGatewaysResponse'+ Prelude.<$> (x Data..?> "Gateways" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListGateways where+ hashWithSalt _salt ListGateways' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListGateways where+ rnf ListGateways' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListGateways where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.ListGateways" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListGateways where+ toJSON ListGateways' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListGateways where+ toPath = Prelude.const "/"++instance Data.ToQuery ListGateways where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListGatewaysResponse' smart constructor.+data ListGatewaysResponse = ListGatewaysResponse'+ { -- | A list of your gateways.+ gateways :: Prelude.Maybe [Gateway],+ -- | The next item following a partial list of returned resources. For+ -- example, if a request is made to return @maxResults@ number of+ -- resources, @NextToken@ allows you to return more items in your list+ -- starting at the location pointed to by the next token.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListGatewaysResponse' 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:+--+-- 'gateways', 'listGatewaysResponse_gateways' - A list of your gateways.+--+-- 'nextToken', 'listGatewaysResponse_nextToken' - The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+--+-- 'httpStatus', 'listGatewaysResponse_httpStatus' - The response's http status code.+newListGatewaysResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListGatewaysResponse+newListGatewaysResponse pHttpStatus_ =+ ListGatewaysResponse'+ { gateways = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A list of your gateways.+listGatewaysResponse_gateways :: Lens.Lens' ListGatewaysResponse (Prelude.Maybe [Gateway])+listGatewaysResponse_gateways = Lens.lens (\ListGatewaysResponse' {gateways} -> gateways) (\s@ListGatewaysResponse' {} a -> s {gateways = a} :: ListGatewaysResponse) Prelude.. Lens.mapping Lens.coerced++-- | The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+listGatewaysResponse_nextToken :: Lens.Lens' ListGatewaysResponse (Prelude.Maybe Prelude.Text)+listGatewaysResponse_nextToken = Lens.lens (\ListGatewaysResponse' {nextToken} -> nextToken) (\s@ListGatewaysResponse' {} a -> s {nextToken = a} :: ListGatewaysResponse)++-- | The response's http status code.+listGatewaysResponse_httpStatus :: Lens.Lens' ListGatewaysResponse Prelude.Int+listGatewaysResponse_httpStatus = Lens.lens (\ListGatewaysResponse' {httpStatus} -> httpStatus) (\s@ListGatewaysResponse' {} a -> s {httpStatus = a} :: ListGatewaysResponse)++instance Prelude.NFData ListGatewaysResponse where+ rnf ListGatewaysResponse' {..} =+ Prelude.rnf gateways+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/ListHypervisors.hs view
@@ -0,0 +1,241 @@+{-# 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.BackupGateway.ListHypervisors+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists your hypervisors.+--+-- This operation returns paginated results.+module Amazonka.BackupGateway.ListHypervisors+ ( -- * Creating a Request+ ListHypervisors (..),+ newListHypervisors,++ -- * Request Lenses+ listHypervisors_maxResults,+ listHypervisors_nextToken,++ -- * Destructuring the Response+ ListHypervisorsResponse (..),+ newListHypervisorsResponse,++ -- * Response Lenses+ listHypervisorsResponse_hypervisors,+ listHypervisorsResponse_nextToken,+ listHypervisorsResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newListHypervisors' smart constructor.+data ListHypervisors = ListHypervisors'+ { -- | The maximum number of hypervisors to list.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned resources. For+ -- example, if a request is made to return @maxResults@ number of+ -- resources, @NextToken@ allows you to return more items in your list+ -- starting at the location pointed to by the next token.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListHypervisors' 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', 'listHypervisors_maxResults' - The maximum number of hypervisors to list.+--+-- 'nextToken', 'listHypervisors_nextToken' - The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+newListHypervisors ::+ ListHypervisors+newListHypervisors =+ ListHypervisors'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of hypervisors to list.+listHypervisors_maxResults :: Lens.Lens' ListHypervisors (Prelude.Maybe Prelude.Natural)+listHypervisors_maxResults = Lens.lens (\ListHypervisors' {maxResults} -> maxResults) (\s@ListHypervisors' {} a -> s {maxResults = a} :: ListHypervisors)++-- | The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+listHypervisors_nextToken :: Lens.Lens' ListHypervisors (Prelude.Maybe Prelude.Text)+listHypervisors_nextToken = Lens.lens (\ListHypervisors' {nextToken} -> nextToken) (\s@ListHypervisors' {} a -> s {nextToken = a} :: ListHypervisors)++instance Core.AWSPager ListHypervisors where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listHypervisorsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listHypervisorsResponse_hypervisors+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listHypervisors_nextToken+ Lens..~ rs+ Lens.^? listHypervisorsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListHypervisors where+ type+ AWSResponse ListHypervisors =+ ListHypervisorsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListHypervisorsResponse'+ Prelude.<$> (x Data..?> "Hypervisors" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListHypervisors where+ hashWithSalt _salt ListHypervisors' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListHypervisors where+ rnf ListHypervisors' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListHypervisors where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.ListHypervisors" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListHypervisors where+ toJSON ListHypervisors' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListHypervisors where+ toPath = Prelude.const "/"++instance Data.ToQuery ListHypervisors where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListHypervisorsResponse' smart constructor.+data ListHypervisorsResponse = ListHypervisorsResponse'+ { -- | A list of your @Hypervisor@ objects, ordered by their Amazon Resource+ -- Names (ARNs).+ hypervisors :: Prelude.Maybe [Hypervisor],+ -- | The next item following a partial list of returned resources. For+ -- example, if a request is made to return @maxResults@ number of+ -- resources, @NextToken@ allows you to return more items in your list+ -- starting at the location pointed to by the next token.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListHypervisorsResponse' 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:+--+-- 'hypervisors', 'listHypervisorsResponse_hypervisors' - A list of your @Hypervisor@ objects, ordered by their Amazon Resource+-- Names (ARNs).+--+-- 'nextToken', 'listHypervisorsResponse_nextToken' - The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+--+-- 'httpStatus', 'listHypervisorsResponse_httpStatus' - The response's http status code.+newListHypervisorsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListHypervisorsResponse+newListHypervisorsResponse pHttpStatus_ =+ ListHypervisorsResponse'+ { hypervisors =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A list of your @Hypervisor@ objects, ordered by their Amazon Resource+-- Names (ARNs).+listHypervisorsResponse_hypervisors :: Lens.Lens' ListHypervisorsResponse (Prelude.Maybe [Hypervisor])+listHypervisorsResponse_hypervisors = Lens.lens (\ListHypervisorsResponse' {hypervisors} -> hypervisors) (\s@ListHypervisorsResponse' {} a -> s {hypervisors = a} :: ListHypervisorsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+listHypervisorsResponse_nextToken :: Lens.Lens' ListHypervisorsResponse (Prelude.Maybe Prelude.Text)+listHypervisorsResponse_nextToken = Lens.lens (\ListHypervisorsResponse' {nextToken} -> nextToken) (\s@ListHypervisorsResponse' {} a -> s {nextToken = a} :: ListHypervisorsResponse)++-- | The response's http status code.+listHypervisorsResponse_httpStatus :: Lens.Lens' ListHypervisorsResponse Prelude.Int+listHypervisorsResponse_httpStatus = Lens.lens (\ListHypervisorsResponse' {httpStatus} -> httpStatus) (\s@ListHypervisorsResponse' {} a -> s {httpStatus = a} :: ListHypervisorsResponse)++instance Prelude.NFData ListHypervisorsResponse where+ rnf ListHypervisorsResponse' {..} =+ Prelude.rnf hypervisors+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/ListTagsForResource.hs view
@@ -0,0 +1,182 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.ListTagsForResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the tags applied to the resource identified by its Amazon Resource+-- Name (ARN).+module Amazonka.BackupGateway.ListTagsForResource+ ( -- * Creating a Request+ ListTagsForResource (..),+ newListTagsForResource,++ -- * Request Lenses+ listTagsForResource_resourceArn,++ -- * Destructuring the Response+ ListTagsForResourceResponse (..),+ newListTagsForResourceResponse,++ -- * Response Lenses+ listTagsForResourceResponse_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+ { -- | The Amazon Resource Name (ARN) of the resource\'s tags to list.+ resourceArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'listTagsForResource_resourceArn' - The Amazon Resource Name (ARN) of the resource\'s tags to list.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The Amazon Resource Name (ARN) of the resource\'s tags to list.+listTagsForResource_resourceArn :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_resourceArn = Lens.lens (\ListTagsForResource' {resourceArn} -> resourceArn) (\s@ListTagsForResource' {} a -> s {resourceArn = a} :: ListTagsForResource)++instance Core.AWSRequest ListTagsForResource where+ type+ AWSResponse ListTagsForResource =+ ListTagsForResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListTagsForResourceResponse'+ Prelude.<$> (x Data..?> "ResourceArn")+ Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListTagsForResource where+ hashWithSalt _salt ListTagsForResource' {..} =+ _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTagsForResource where+ rnf ListTagsForResource' {..} =+ Prelude.rnf resourceArn++instance Data.ToHeaders ListTagsForResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.ListTagsForResource" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListTagsForResource where+ toJSON ListTagsForResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("ResourceArn" Data..= resourceArn)]+ )++instance Data.ToPath ListTagsForResource where+ toPath = Prelude.const "/"++instance Data.ToQuery ListTagsForResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+ { -- | The Amazon Resource Name (ARN) of the resource\'s tags that you listed.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | A list of the resource\'s tags.+ tags :: Prelude.Maybe [Tag],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'listTagsForResourceResponse_resourceArn' - The Amazon Resource Name (ARN) of the resource\'s tags that you listed.+--+-- 'tags', 'listTagsForResourceResponse_tags' - A list of the resource\'s tags.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { resourceArn =+ Prelude.Nothing,+ tags = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the resource\'s tags that you listed.+listTagsForResourceResponse_resourceArn :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe Prelude.Text)+listTagsForResourceResponse_resourceArn = Lens.lens (\ListTagsForResourceResponse' {resourceArn} -> resourceArn) (\s@ListTagsForResourceResponse' {} a -> s {resourceArn = a} :: ListTagsForResourceResponse)++-- | A list of the resource\'s tags.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe [Tag])+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTagsForResourceResponse_httpStatus :: Lens.Lens' ListTagsForResourceResponse Prelude.Int+listTagsForResourceResponse_httpStatus = Lens.lens (\ListTagsForResourceResponse' {httpStatus} -> httpStatus) (\s@ListTagsForResourceResponse' {} a -> s {httpStatus = a} :: ListTagsForResourceResponse)++instance Prelude.NFData ListTagsForResourceResponse where+ rnf ListTagsForResourceResponse' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/ListVirtualMachines.hs view
@@ -0,0 +1,261 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.ListVirtualMachines+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists your virtual machines.+--+-- This operation returns paginated results.+module Amazonka.BackupGateway.ListVirtualMachines+ ( -- * Creating a Request+ ListVirtualMachines (..),+ newListVirtualMachines,++ -- * Request Lenses+ listVirtualMachines_hypervisorArn,+ listVirtualMachines_maxResults,+ listVirtualMachines_nextToken,++ -- * Destructuring the Response+ ListVirtualMachinesResponse (..),+ newListVirtualMachinesResponse,++ -- * Response Lenses+ listVirtualMachinesResponse_nextToken,+ listVirtualMachinesResponse_virtualMachines,+ listVirtualMachinesResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newListVirtualMachines' smart constructor.+data ListVirtualMachines = ListVirtualMachines'+ { -- | The Amazon Resource Name (ARN) of the hypervisor connected to your+ -- virtual machine.+ hypervisorArn :: Prelude.Maybe Prelude.Text,+ -- | The maximum number of virtual machines to list.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned resources. For+ -- example, if a request is made to return @maxResults@ number of+ -- resources, @NextToken@ allows you to return more items in your list+ -- starting at the location pointed to by the next token.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListVirtualMachines' 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:+--+-- 'hypervisorArn', 'listVirtualMachines_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor connected to your+-- virtual machine.+--+-- 'maxResults', 'listVirtualMachines_maxResults' - The maximum number of virtual machines to list.+--+-- 'nextToken', 'listVirtualMachines_nextToken' - The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+newListVirtualMachines ::+ ListVirtualMachines+newListVirtualMachines =+ ListVirtualMachines'+ { hypervisorArn =+ Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The Amazon Resource Name (ARN) of the hypervisor connected to your+-- virtual machine.+listVirtualMachines_hypervisorArn :: Lens.Lens' ListVirtualMachines (Prelude.Maybe Prelude.Text)+listVirtualMachines_hypervisorArn = Lens.lens (\ListVirtualMachines' {hypervisorArn} -> hypervisorArn) (\s@ListVirtualMachines' {} a -> s {hypervisorArn = a} :: ListVirtualMachines)++-- | The maximum number of virtual machines to list.+listVirtualMachines_maxResults :: Lens.Lens' ListVirtualMachines (Prelude.Maybe Prelude.Natural)+listVirtualMachines_maxResults = Lens.lens (\ListVirtualMachines' {maxResults} -> maxResults) (\s@ListVirtualMachines' {} a -> s {maxResults = a} :: ListVirtualMachines)++-- | The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+listVirtualMachines_nextToken :: Lens.Lens' ListVirtualMachines (Prelude.Maybe Prelude.Text)+listVirtualMachines_nextToken = Lens.lens (\ListVirtualMachines' {nextToken} -> nextToken) (\s@ListVirtualMachines' {} a -> s {nextToken = a} :: ListVirtualMachines)++instance Core.AWSPager ListVirtualMachines where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listVirtualMachinesResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listVirtualMachinesResponse_virtualMachines+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listVirtualMachines_nextToken+ Lens..~ rs+ Lens.^? listVirtualMachinesResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListVirtualMachines where+ type+ AWSResponse ListVirtualMachines =+ ListVirtualMachinesResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListVirtualMachinesResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> ( x+ Data..?> "VirtualMachines"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListVirtualMachines where+ hashWithSalt _salt ListVirtualMachines' {..} =+ _salt+ `Prelude.hashWithSalt` hypervisorArn+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListVirtualMachines where+ rnf ListVirtualMachines' {..} =+ Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListVirtualMachines where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.ListVirtualMachines" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListVirtualMachines where+ toJSON ListVirtualMachines' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("HypervisorArn" Data..=) Prelude.<$> hypervisorArn,+ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListVirtualMachines where+ toPath = Prelude.const "/"++instance Data.ToQuery ListVirtualMachines where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListVirtualMachinesResponse' smart constructor.+data ListVirtualMachinesResponse = ListVirtualMachinesResponse'+ { -- | The next item following a partial list of returned resources. For+ -- example, if a request is made to return @maxResults@ number of+ -- resources, @NextToken@ allows you to return more items in your list+ -- starting at the location pointed to by the next token.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | A list of your @VirtualMachine@ objects, ordered by their Amazon+ -- Resource Names (ARNs).+ virtualMachines :: Prelude.Maybe [VirtualMachine],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListVirtualMachinesResponse' 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', 'listVirtualMachinesResponse_nextToken' - The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+--+-- 'virtualMachines', 'listVirtualMachinesResponse_virtualMachines' - A list of your @VirtualMachine@ objects, ordered by their Amazon+-- Resource Names (ARNs).+--+-- 'httpStatus', 'listVirtualMachinesResponse_httpStatus' - The response's http status code.+newListVirtualMachinesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListVirtualMachinesResponse+newListVirtualMachinesResponse pHttpStatus_ =+ ListVirtualMachinesResponse'+ { nextToken =+ Prelude.Nothing,+ virtualMachines = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The next item following a partial list of returned resources. For+-- example, if a request is made to return @maxResults@ number of+-- resources, @NextToken@ allows you to return more items in your list+-- starting at the location pointed to by the next token.+listVirtualMachinesResponse_nextToken :: Lens.Lens' ListVirtualMachinesResponse (Prelude.Maybe Prelude.Text)+listVirtualMachinesResponse_nextToken = Lens.lens (\ListVirtualMachinesResponse' {nextToken} -> nextToken) (\s@ListVirtualMachinesResponse' {} a -> s {nextToken = a} :: ListVirtualMachinesResponse)++-- | A list of your @VirtualMachine@ objects, ordered by their Amazon+-- Resource Names (ARNs).+listVirtualMachinesResponse_virtualMachines :: Lens.Lens' ListVirtualMachinesResponse (Prelude.Maybe [VirtualMachine])+listVirtualMachinesResponse_virtualMachines = Lens.lens (\ListVirtualMachinesResponse' {virtualMachines} -> virtualMachines) (\s@ListVirtualMachinesResponse' {} a -> s {virtualMachines = a} :: ListVirtualMachinesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listVirtualMachinesResponse_httpStatus :: Lens.Lens' ListVirtualMachinesResponse Prelude.Int+listVirtualMachinesResponse_httpStatus = Lens.lens (\ListVirtualMachinesResponse' {httpStatus} -> httpStatus) (\s@ListVirtualMachinesResponse' {} a -> s {httpStatus = a} :: ListVirtualMachinesResponse)++instance Prelude.NFData ListVirtualMachinesResponse where+ rnf ListVirtualMachinesResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf virtualMachines+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/PutBandwidthRateLimitSchedule.hs view
@@ -0,0 +1,226 @@+{-# 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.BackupGateway.PutBandwidthRateLimitSchedule+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- This action sets the bandwidth rate limit schedule for a specified+-- gateway. By default, gateways do not have a bandwidth rate limit+-- schedule, which means no bandwidth rate limiting is in effect. Use this+-- to initiate a gateway\'s bandwidth rate limit schedule.+module Amazonka.BackupGateway.PutBandwidthRateLimitSchedule+ ( -- * Creating a Request+ PutBandwidthRateLimitSchedule (..),+ newPutBandwidthRateLimitSchedule,++ -- * Request Lenses+ putBandwidthRateLimitSchedule_bandwidthRateLimitIntervals,+ putBandwidthRateLimitSchedule_gatewayArn,++ -- * Destructuring the Response+ PutBandwidthRateLimitScheduleResponse (..),+ newPutBandwidthRateLimitScheduleResponse,++ -- * Response Lenses+ putBandwidthRateLimitScheduleResponse_gatewayArn,+ putBandwidthRateLimitScheduleResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newPutBandwidthRateLimitSchedule' smart constructor.+data PutBandwidthRateLimitSchedule = PutBandwidthRateLimitSchedule'+ { -- | An array containing bandwidth rate limit schedule intervals for a+ -- gateway. When no bandwidth rate limit intervals have been scheduled, the+ -- array is empty.+ bandwidthRateLimitIntervals :: [BandwidthRateLimitInterval],+ -- | The Amazon Resource Name (ARN) of the gateway. Use the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+ -- operation to return a list of gateways for your account and Amazon Web+ -- Services Region.+ gatewayArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutBandwidthRateLimitSchedule' 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:+--+-- 'bandwidthRateLimitIntervals', 'putBandwidthRateLimitSchedule_bandwidthRateLimitIntervals' - An array containing bandwidth rate limit schedule intervals for a+-- gateway. When no bandwidth rate limit intervals have been scheduled, the+-- array is empty.+--+-- 'gatewayArn', 'putBandwidthRateLimitSchedule_gatewayArn' - The Amazon Resource Name (ARN) of the gateway. Use the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+newPutBandwidthRateLimitSchedule ::+ -- | 'gatewayArn'+ Prelude.Text ->+ PutBandwidthRateLimitSchedule+newPutBandwidthRateLimitSchedule pGatewayArn_ =+ PutBandwidthRateLimitSchedule'+ { bandwidthRateLimitIntervals =+ Prelude.mempty,+ gatewayArn = pGatewayArn_+ }++-- | An array containing bandwidth rate limit schedule intervals for a+-- gateway. When no bandwidth rate limit intervals have been scheduled, the+-- array is empty.+putBandwidthRateLimitSchedule_bandwidthRateLimitIntervals :: Lens.Lens' PutBandwidthRateLimitSchedule [BandwidthRateLimitInterval]+putBandwidthRateLimitSchedule_bandwidthRateLimitIntervals = Lens.lens (\PutBandwidthRateLimitSchedule' {bandwidthRateLimitIntervals} -> bandwidthRateLimitIntervals) (\s@PutBandwidthRateLimitSchedule' {} a -> s {bandwidthRateLimitIntervals = a} :: PutBandwidthRateLimitSchedule) Prelude.. Lens.coerced++-- | The Amazon Resource Name (ARN) of the gateway. Use the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+putBandwidthRateLimitSchedule_gatewayArn :: Lens.Lens' PutBandwidthRateLimitSchedule Prelude.Text+putBandwidthRateLimitSchedule_gatewayArn = Lens.lens (\PutBandwidthRateLimitSchedule' {gatewayArn} -> gatewayArn) (\s@PutBandwidthRateLimitSchedule' {} a -> s {gatewayArn = a} :: PutBandwidthRateLimitSchedule)++instance+ Core.AWSRequest+ PutBandwidthRateLimitSchedule+ where+ type+ AWSResponse PutBandwidthRateLimitSchedule =+ PutBandwidthRateLimitScheduleResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ PutBandwidthRateLimitScheduleResponse'+ Prelude.<$> (x Data..?> "GatewayArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ PutBandwidthRateLimitSchedule+ where+ hashWithSalt _salt PutBandwidthRateLimitSchedule' {..} =+ _salt+ `Prelude.hashWithSalt` bandwidthRateLimitIntervals+ `Prelude.hashWithSalt` gatewayArn++instance Prelude.NFData PutBandwidthRateLimitSchedule where+ rnf PutBandwidthRateLimitSchedule' {..} =+ Prelude.rnf bandwidthRateLimitIntervals+ `Prelude.seq` Prelude.rnf gatewayArn++instance Data.ToHeaders PutBandwidthRateLimitSchedule where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.PutBandwidthRateLimitSchedule" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutBandwidthRateLimitSchedule where+ toJSON PutBandwidthRateLimitSchedule' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "BandwidthRateLimitIntervals"+ Data..= bandwidthRateLimitIntervals+ ),+ Prelude.Just ("GatewayArn" Data..= gatewayArn)+ ]+ )++instance Data.ToPath PutBandwidthRateLimitSchedule where+ toPath = Prelude.const "/"++instance Data.ToQuery PutBandwidthRateLimitSchedule where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutBandwidthRateLimitScheduleResponse' smart constructor.+data PutBandwidthRateLimitScheduleResponse = PutBandwidthRateLimitScheduleResponse'+ { -- | The Amazon Resource Name (ARN) of the gateway. Use the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+ -- operation to return a list of gateways for your account and Amazon Web+ -- Services Region.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutBandwidthRateLimitScheduleResponse' 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:+--+-- 'gatewayArn', 'putBandwidthRateLimitScheduleResponse_gatewayArn' - The Amazon Resource Name (ARN) of the gateway. Use the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+--+-- 'httpStatus', 'putBandwidthRateLimitScheduleResponse_httpStatus' - The response's http status code.+newPutBandwidthRateLimitScheduleResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ PutBandwidthRateLimitScheduleResponse+newPutBandwidthRateLimitScheduleResponse pHttpStatus_ =+ PutBandwidthRateLimitScheduleResponse'+ { gatewayArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the gateway. Use the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_ListGateways.html ListGateways>+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+putBandwidthRateLimitScheduleResponse_gatewayArn :: Lens.Lens' PutBandwidthRateLimitScheduleResponse (Prelude.Maybe Prelude.Text)+putBandwidthRateLimitScheduleResponse_gatewayArn = Lens.lens (\PutBandwidthRateLimitScheduleResponse' {gatewayArn} -> gatewayArn) (\s@PutBandwidthRateLimitScheduleResponse' {} a -> s {gatewayArn = a} :: PutBandwidthRateLimitScheduleResponse)++-- | The response's http status code.+putBandwidthRateLimitScheduleResponse_httpStatus :: Lens.Lens' PutBandwidthRateLimitScheduleResponse Prelude.Int+putBandwidthRateLimitScheduleResponse_httpStatus = Lens.lens (\PutBandwidthRateLimitScheduleResponse' {httpStatus} -> httpStatus) (\s@PutBandwidthRateLimitScheduleResponse' {} a -> s {httpStatus = a} :: PutBandwidthRateLimitScheduleResponse)++instance+ Prelude.NFData+ PutBandwidthRateLimitScheduleResponse+ where+ rnf PutBandwidthRateLimitScheduleResponse' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/PutHypervisorPropertyMappings.hs view
@@ -0,0 +1,223 @@+{-# 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.BackupGateway.PutHypervisorPropertyMappings+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- This action sets the property mappings for the specified hypervisor. A+-- hypervisor property mapping displays the relationship of entity+-- properties available from the on-premises hypervisor to the properties+-- available in Amazon Web Services.+module Amazonka.BackupGateway.PutHypervisorPropertyMappings+ ( -- * Creating a Request+ PutHypervisorPropertyMappings (..),+ newPutHypervisorPropertyMappings,++ -- * Request Lenses+ putHypervisorPropertyMappings_hypervisorArn,+ putHypervisorPropertyMappings_iamRoleArn,+ putHypervisorPropertyMappings_vmwareToAwsTagMappings,++ -- * Destructuring the Response+ PutHypervisorPropertyMappingsResponse (..),+ newPutHypervisorPropertyMappingsResponse,++ -- * Response Lenses+ putHypervisorPropertyMappingsResponse_hypervisorArn,+ putHypervisorPropertyMappingsResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newPutHypervisorPropertyMappings' smart constructor.+data PutHypervisorPropertyMappings = PutHypervisorPropertyMappings'+ { -- | The Amazon Resource Name (ARN) of the hypervisor.+ hypervisorArn :: Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the IAM role.+ iamRoleArn :: Prelude.Text,+ -- | This action requests the mappings of on-premises VMware tags to the+ -- Amazon Web Services tags.+ vmwareToAwsTagMappings :: [VmwareToAwsTagMapping]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutHypervisorPropertyMappings' 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:+--+-- 'hypervisorArn', 'putHypervisorPropertyMappings_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor.+--+-- 'iamRoleArn', 'putHypervisorPropertyMappings_iamRoleArn' - The Amazon Resource Name (ARN) of the IAM role.+--+-- 'vmwareToAwsTagMappings', 'putHypervisorPropertyMappings_vmwareToAwsTagMappings' - This action requests the mappings of on-premises VMware tags to the+-- Amazon Web Services tags.+newPutHypervisorPropertyMappings ::+ -- | 'hypervisorArn'+ Prelude.Text ->+ -- | 'iamRoleArn'+ Prelude.Text ->+ PutHypervisorPropertyMappings+newPutHypervisorPropertyMappings+ pHypervisorArn_+ pIamRoleArn_ =+ PutHypervisorPropertyMappings'+ { hypervisorArn =+ pHypervisorArn_,+ iamRoleArn = pIamRoleArn_,+ vmwareToAwsTagMappings = Prelude.mempty+ }++-- | The Amazon Resource Name (ARN) of the hypervisor.+putHypervisorPropertyMappings_hypervisorArn :: Lens.Lens' PutHypervisorPropertyMappings Prelude.Text+putHypervisorPropertyMappings_hypervisorArn = Lens.lens (\PutHypervisorPropertyMappings' {hypervisorArn} -> hypervisorArn) (\s@PutHypervisorPropertyMappings' {} a -> s {hypervisorArn = a} :: PutHypervisorPropertyMappings)++-- | The Amazon Resource Name (ARN) of the IAM role.+putHypervisorPropertyMappings_iamRoleArn :: Lens.Lens' PutHypervisorPropertyMappings Prelude.Text+putHypervisorPropertyMappings_iamRoleArn = Lens.lens (\PutHypervisorPropertyMappings' {iamRoleArn} -> iamRoleArn) (\s@PutHypervisorPropertyMappings' {} a -> s {iamRoleArn = a} :: PutHypervisorPropertyMappings)++-- | This action requests the mappings of on-premises VMware tags to the+-- Amazon Web Services tags.+putHypervisorPropertyMappings_vmwareToAwsTagMappings :: Lens.Lens' PutHypervisorPropertyMappings [VmwareToAwsTagMapping]+putHypervisorPropertyMappings_vmwareToAwsTagMappings = Lens.lens (\PutHypervisorPropertyMappings' {vmwareToAwsTagMappings} -> vmwareToAwsTagMappings) (\s@PutHypervisorPropertyMappings' {} a -> s {vmwareToAwsTagMappings = a} :: PutHypervisorPropertyMappings) Prelude.. Lens.coerced++instance+ Core.AWSRequest+ PutHypervisorPropertyMappings+ where+ type+ AWSResponse PutHypervisorPropertyMappings =+ PutHypervisorPropertyMappingsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ PutHypervisorPropertyMappingsResponse'+ Prelude.<$> (x Data..?> "HypervisorArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ PutHypervisorPropertyMappings+ where+ hashWithSalt _salt PutHypervisorPropertyMappings' {..} =+ _salt+ `Prelude.hashWithSalt` hypervisorArn+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` vmwareToAwsTagMappings++instance Prelude.NFData PutHypervisorPropertyMappings where+ rnf PutHypervisorPropertyMappings' {..} =+ Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf vmwareToAwsTagMappings++instance Data.ToHeaders PutHypervisorPropertyMappings where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.PutHypervisorPropertyMappings" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutHypervisorPropertyMappings where+ toJSON PutHypervisorPropertyMappings' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("HypervisorArn" Data..= hypervisorArn),+ Prelude.Just ("IamRoleArn" Data..= iamRoleArn),+ Prelude.Just+ ( "VmwareToAwsTagMappings"+ Data..= vmwareToAwsTagMappings+ )+ ]+ )++instance Data.ToPath PutHypervisorPropertyMappings where+ toPath = Prelude.const "/"++instance Data.ToQuery PutHypervisorPropertyMappings where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutHypervisorPropertyMappingsResponse' smart constructor.+data PutHypervisorPropertyMappingsResponse = PutHypervisorPropertyMappingsResponse'+ { -- | The Amazon Resource Name (ARN) of the hypervisor.+ hypervisorArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutHypervisorPropertyMappingsResponse' 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:+--+-- 'hypervisorArn', 'putHypervisorPropertyMappingsResponse_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor.+--+-- 'httpStatus', 'putHypervisorPropertyMappingsResponse_httpStatus' - The response's http status code.+newPutHypervisorPropertyMappingsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ PutHypervisorPropertyMappingsResponse+newPutHypervisorPropertyMappingsResponse pHttpStatus_ =+ PutHypervisorPropertyMappingsResponse'+ { hypervisorArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the hypervisor.+putHypervisorPropertyMappingsResponse_hypervisorArn :: Lens.Lens' PutHypervisorPropertyMappingsResponse (Prelude.Maybe Prelude.Text)+putHypervisorPropertyMappingsResponse_hypervisorArn = Lens.lens (\PutHypervisorPropertyMappingsResponse' {hypervisorArn} -> hypervisorArn) (\s@PutHypervisorPropertyMappingsResponse' {} a -> s {hypervisorArn = a} :: PutHypervisorPropertyMappingsResponse)++-- | The response's http status code.+putHypervisorPropertyMappingsResponse_httpStatus :: Lens.Lens' PutHypervisorPropertyMappingsResponse Prelude.Int+putHypervisorPropertyMappingsResponse_httpStatus = Lens.lens (\PutHypervisorPropertyMappingsResponse' {httpStatus} -> httpStatus) (\s@PutHypervisorPropertyMappingsResponse' {} a -> s {httpStatus = a} :: PutHypervisorPropertyMappingsResponse)++instance+ Prelude.NFData+ PutHypervisorPropertyMappingsResponse+ where+ rnf PutHypervisorPropertyMappingsResponse' {..} =+ Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/PutMaintenanceStartTime.hs view
@@ -0,0 +1,248 @@+{-# 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.BackupGateway.PutMaintenanceStartTime+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Set the maintenance start time for a gateway.+module Amazonka.BackupGateway.PutMaintenanceStartTime+ ( -- * Creating a Request+ PutMaintenanceStartTime (..),+ newPutMaintenanceStartTime,++ -- * Request Lenses+ putMaintenanceStartTime_dayOfMonth,+ putMaintenanceStartTime_dayOfWeek,+ putMaintenanceStartTime_gatewayArn,+ putMaintenanceStartTime_hourOfDay,+ putMaintenanceStartTime_minuteOfHour,++ -- * Destructuring the Response+ PutMaintenanceStartTimeResponse (..),+ newPutMaintenanceStartTimeResponse,++ -- * Response Lenses+ putMaintenanceStartTimeResponse_gatewayArn,+ putMaintenanceStartTimeResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newPutMaintenanceStartTime' smart constructor.+data PutMaintenanceStartTime = PutMaintenanceStartTime'+ { -- | The day of the month start maintenance on a gateway.+ --+ -- Valid values range from @Sunday@ to @Saturday@.+ dayOfMonth :: Prelude.Maybe Prelude.Natural,+ -- | The day of the week to start maintenance on a gateway.+ dayOfWeek :: Prelude.Maybe Prelude.Natural,+ -- | The Amazon Resource Name (ARN) for the gateway, used to specify its+ -- maintenance start time.+ gatewayArn :: Prelude.Text,+ -- | The hour of the day to start maintenance on a gateway.+ hourOfDay :: Prelude.Natural,+ -- | The minute of the hour to start maintenance on a gateway.+ minuteOfHour :: Prelude.Natural+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutMaintenanceStartTime' 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:+--+-- 'dayOfMonth', 'putMaintenanceStartTime_dayOfMonth' - The day of the month start maintenance on a gateway.+--+-- Valid values range from @Sunday@ to @Saturday@.+--+-- 'dayOfWeek', 'putMaintenanceStartTime_dayOfWeek' - The day of the week to start maintenance on a gateway.+--+-- 'gatewayArn', 'putMaintenanceStartTime_gatewayArn' - The Amazon Resource Name (ARN) for the gateway, used to specify its+-- maintenance start time.+--+-- 'hourOfDay', 'putMaintenanceStartTime_hourOfDay' - The hour of the day to start maintenance on a gateway.+--+-- 'minuteOfHour', 'putMaintenanceStartTime_minuteOfHour' - The minute of the hour to start maintenance on a gateway.+newPutMaintenanceStartTime ::+ -- | 'gatewayArn'+ Prelude.Text ->+ -- | 'hourOfDay'+ Prelude.Natural ->+ -- | 'minuteOfHour'+ Prelude.Natural ->+ PutMaintenanceStartTime+newPutMaintenanceStartTime+ pGatewayArn_+ pHourOfDay_+ pMinuteOfHour_ =+ PutMaintenanceStartTime'+ { dayOfMonth =+ Prelude.Nothing,+ dayOfWeek = Prelude.Nothing,+ gatewayArn = pGatewayArn_,+ hourOfDay = pHourOfDay_,+ minuteOfHour = pMinuteOfHour_+ }++-- | The day of the month start maintenance on a gateway.+--+-- Valid values range from @Sunday@ to @Saturday@.+putMaintenanceStartTime_dayOfMonth :: Lens.Lens' PutMaintenanceStartTime (Prelude.Maybe Prelude.Natural)+putMaintenanceStartTime_dayOfMonth = Lens.lens (\PutMaintenanceStartTime' {dayOfMonth} -> dayOfMonth) (\s@PutMaintenanceStartTime' {} a -> s {dayOfMonth = a} :: PutMaintenanceStartTime)++-- | The day of the week to start maintenance on a gateway.+putMaintenanceStartTime_dayOfWeek :: Lens.Lens' PutMaintenanceStartTime (Prelude.Maybe Prelude.Natural)+putMaintenanceStartTime_dayOfWeek = Lens.lens (\PutMaintenanceStartTime' {dayOfWeek} -> dayOfWeek) (\s@PutMaintenanceStartTime' {} a -> s {dayOfWeek = a} :: PutMaintenanceStartTime)++-- | The Amazon Resource Name (ARN) for the gateway, used to specify its+-- maintenance start time.+putMaintenanceStartTime_gatewayArn :: Lens.Lens' PutMaintenanceStartTime Prelude.Text+putMaintenanceStartTime_gatewayArn = Lens.lens (\PutMaintenanceStartTime' {gatewayArn} -> gatewayArn) (\s@PutMaintenanceStartTime' {} a -> s {gatewayArn = a} :: PutMaintenanceStartTime)++-- | The hour of the day to start maintenance on a gateway.+putMaintenanceStartTime_hourOfDay :: Lens.Lens' PutMaintenanceStartTime Prelude.Natural+putMaintenanceStartTime_hourOfDay = Lens.lens (\PutMaintenanceStartTime' {hourOfDay} -> hourOfDay) (\s@PutMaintenanceStartTime' {} a -> s {hourOfDay = a} :: PutMaintenanceStartTime)++-- | The minute of the hour to start maintenance on a gateway.+putMaintenanceStartTime_minuteOfHour :: Lens.Lens' PutMaintenanceStartTime Prelude.Natural+putMaintenanceStartTime_minuteOfHour = Lens.lens (\PutMaintenanceStartTime' {minuteOfHour} -> minuteOfHour) (\s@PutMaintenanceStartTime' {} a -> s {minuteOfHour = a} :: PutMaintenanceStartTime)++instance Core.AWSRequest PutMaintenanceStartTime where+ type+ AWSResponse PutMaintenanceStartTime =+ PutMaintenanceStartTimeResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ PutMaintenanceStartTimeResponse'+ Prelude.<$> (x Data..?> "GatewayArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable PutMaintenanceStartTime where+ hashWithSalt _salt PutMaintenanceStartTime' {..} =+ _salt+ `Prelude.hashWithSalt` dayOfMonth+ `Prelude.hashWithSalt` dayOfWeek+ `Prelude.hashWithSalt` gatewayArn+ `Prelude.hashWithSalt` hourOfDay+ `Prelude.hashWithSalt` minuteOfHour++instance Prelude.NFData PutMaintenanceStartTime where+ rnf PutMaintenanceStartTime' {..} =+ Prelude.rnf dayOfMonth+ `Prelude.seq` Prelude.rnf dayOfWeek+ `Prelude.seq` Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf hourOfDay+ `Prelude.seq` Prelude.rnf minuteOfHour++instance Data.ToHeaders PutMaintenanceStartTime where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.PutMaintenanceStartTime" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutMaintenanceStartTime where+ toJSON PutMaintenanceStartTime' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DayOfMonth" Data..=) Prelude.<$> dayOfMonth,+ ("DayOfWeek" Data..=) Prelude.<$> dayOfWeek,+ Prelude.Just ("GatewayArn" Data..= gatewayArn),+ Prelude.Just ("HourOfDay" Data..= hourOfDay),+ Prelude.Just ("MinuteOfHour" Data..= minuteOfHour)+ ]+ )++instance Data.ToPath PutMaintenanceStartTime where+ toPath = Prelude.const "/"++instance Data.ToQuery PutMaintenanceStartTime where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutMaintenanceStartTimeResponse' smart constructor.+data PutMaintenanceStartTimeResponse = PutMaintenanceStartTimeResponse'+ { -- | The Amazon Resource Name (ARN) of a gateway for which you set the+ -- maintenance start time.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutMaintenanceStartTimeResponse' 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:+--+-- 'gatewayArn', 'putMaintenanceStartTimeResponse_gatewayArn' - The Amazon Resource Name (ARN) of a gateway for which you set the+-- maintenance start time.+--+-- 'httpStatus', 'putMaintenanceStartTimeResponse_httpStatus' - The response's http status code.+newPutMaintenanceStartTimeResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ PutMaintenanceStartTimeResponse+newPutMaintenanceStartTimeResponse pHttpStatus_ =+ PutMaintenanceStartTimeResponse'+ { gatewayArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of a gateway for which you set the+-- maintenance start time.+putMaintenanceStartTimeResponse_gatewayArn :: Lens.Lens' PutMaintenanceStartTimeResponse (Prelude.Maybe Prelude.Text)+putMaintenanceStartTimeResponse_gatewayArn = Lens.lens (\PutMaintenanceStartTimeResponse' {gatewayArn} -> gatewayArn) (\s@PutMaintenanceStartTimeResponse' {} a -> s {gatewayArn = a} :: PutMaintenanceStartTimeResponse)++-- | The response's http status code.+putMaintenanceStartTimeResponse_httpStatus :: Lens.Lens' PutMaintenanceStartTimeResponse Prelude.Int+putMaintenanceStartTimeResponse_httpStatus = Lens.lens (\PutMaintenanceStartTimeResponse' {httpStatus} -> httpStatus) (\s@PutMaintenanceStartTimeResponse' {} a -> s {httpStatus = a} :: PutMaintenanceStartTimeResponse)++instance+ Prelude.NFData+ PutMaintenanceStartTimeResponse+ where+ rnf PutMaintenanceStartTimeResponse' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/StartVirtualMachinesMetadataSync.hs view
@@ -0,0 +1,196 @@+{-# 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.BackupGateway.StartVirtualMachinesMetadataSync+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- This action sends a request to sync metadata across the specified+-- virtual machines.+module Amazonka.BackupGateway.StartVirtualMachinesMetadataSync+ ( -- * Creating a Request+ StartVirtualMachinesMetadataSync (..),+ newStartVirtualMachinesMetadataSync,++ -- * Request Lenses+ startVirtualMachinesMetadataSync_hypervisorArn,++ -- * Destructuring the Response+ StartVirtualMachinesMetadataSyncResponse (..),+ newStartVirtualMachinesMetadataSyncResponse,++ -- * Response Lenses+ startVirtualMachinesMetadataSyncResponse_hypervisorArn,+ startVirtualMachinesMetadataSyncResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newStartVirtualMachinesMetadataSync' smart constructor.+data StartVirtualMachinesMetadataSync = StartVirtualMachinesMetadataSync'+ { -- | The Amazon Resource Name (ARN) of the hypervisor.+ hypervisorArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartVirtualMachinesMetadataSync' 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:+--+-- 'hypervisorArn', 'startVirtualMachinesMetadataSync_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor.+newStartVirtualMachinesMetadataSync ::+ -- | 'hypervisorArn'+ Prelude.Text ->+ StartVirtualMachinesMetadataSync+newStartVirtualMachinesMetadataSync pHypervisorArn_ =+ StartVirtualMachinesMetadataSync'+ { hypervisorArn =+ pHypervisorArn_+ }++-- | The Amazon Resource Name (ARN) of the hypervisor.+startVirtualMachinesMetadataSync_hypervisorArn :: Lens.Lens' StartVirtualMachinesMetadataSync Prelude.Text+startVirtualMachinesMetadataSync_hypervisorArn = Lens.lens (\StartVirtualMachinesMetadataSync' {hypervisorArn} -> hypervisorArn) (\s@StartVirtualMachinesMetadataSync' {} a -> s {hypervisorArn = a} :: StartVirtualMachinesMetadataSync)++instance+ Core.AWSRequest+ StartVirtualMachinesMetadataSync+ where+ type+ AWSResponse StartVirtualMachinesMetadataSync =+ StartVirtualMachinesMetadataSyncResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ StartVirtualMachinesMetadataSyncResponse'+ Prelude.<$> (x Data..?> "HypervisorArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ StartVirtualMachinesMetadataSync+ where+ hashWithSalt+ _salt+ StartVirtualMachinesMetadataSync' {..} =+ _salt `Prelude.hashWithSalt` hypervisorArn++instance+ Prelude.NFData+ StartVirtualMachinesMetadataSync+ where+ rnf StartVirtualMachinesMetadataSync' {..} =+ Prelude.rnf hypervisorArn++instance+ Data.ToHeaders+ StartVirtualMachinesMetadataSync+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.StartVirtualMachinesMetadataSync" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON StartVirtualMachinesMetadataSync where+ toJSON StartVirtualMachinesMetadataSync' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("HypervisorArn" Data..= hypervisorArn)+ ]+ )++instance Data.ToPath StartVirtualMachinesMetadataSync where+ toPath = Prelude.const "/"++instance+ Data.ToQuery+ StartVirtualMachinesMetadataSync+ where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newStartVirtualMachinesMetadataSyncResponse' smart constructor.+data StartVirtualMachinesMetadataSyncResponse = StartVirtualMachinesMetadataSyncResponse'+ { -- | The Amazon Resource Name (ARN) of the hypervisor.+ hypervisorArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartVirtualMachinesMetadataSyncResponse' 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:+--+-- 'hypervisorArn', 'startVirtualMachinesMetadataSyncResponse_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor.+--+-- 'httpStatus', 'startVirtualMachinesMetadataSyncResponse_httpStatus' - The response's http status code.+newStartVirtualMachinesMetadataSyncResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ StartVirtualMachinesMetadataSyncResponse+newStartVirtualMachinesMetadataSyncResponse+ pHttpStatus_ =+ StartVirtualMachinesMetadataSyncResponse'+ { hypervisorArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the hypervisor.+startVirtualMachinesMetadataSyncResponse_hypervisorArn :: Lens.Lens' StartVirtualMachinesMetadataSyncResponse (Prelude.Maybe Prelude.Text)+startVirtualMachinesMetadataSyncResponse_hypervisorArn = Lens.lens (\StartVirtualMachinesMetadataSyncResponse' {hypervisorArn} -> hypervisorArn) (\s@StartVirtualMachinesMetadataSyncResponse' {} a -> s {hypervisorArn = a} :: StartVirtualMachinesMetadataSyncResponse)++-- | The response's http status code.+startVirtualMachinesMetadataSyncResponse_httpStatus :: Lens.Lens' StartVirtualMachinesMetadataSyncResponse Prelude.Int+startVirtualMachinesMetadataSyncResponse_httpStatus = Lens.lens (\StartVirtualMachinesMetadataSyncResponse' {httpStatus} -> httpStatus) (\s@StartVirtualMachinesMetadataSyncResponse' {} a -> s {httpStatus = a} :: StartVirtualMachinesMetadataSyncResponse)++instance+ Prelude.NFData+ StartVirtualMachinesMetadataSyncResponse+ where+ rnf StartVirtualMachinesMetadataSyncResponse' {..} =+ Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/TagResource.hs view
@@ -0,0 +1,183 @@+{-# 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.BackupGateway.TagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Tag the resource.+module Amazonka.BackupGateway.TagResource+ ( -- * Creating a Request+ TagResource (..),+ newTagResource,++ -- * Request Lenses+ tagResource_resourceARN,+ tagResource_tags,++ -- * Destructuring the Response+ TagResourceResponse (..),+ newTagResourceResponse,++ -- * Response Lenses+ tagResourceResponse_resourceARN,+ tagResourceResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+ { -- | The Amazon Resource Name (ARN) of the resource to tag.+ resourceARN :: Prelude.Text,+ -- | A list of tags to assign to the resource.+ tags :: [Tag]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceARN', 'tagResource_resourceARN' - The Amazon Resource Name (ARN) of the resource to tag.+--+-- 'tags', 'tagResource_tags' - A list of tags to assign to the resource.+newTagResource ::+ -- | 'resourceARN'+ Prelude.Text ->+ TagResource+newTagResource pResourceARN_ =+ TagResource'+ { resourceARN = pResourceARN_,+ tags = Prelude.mempty+ }++-- | The Amazon Resource Name (ARN) of the resource to tag.+tagResource_resourceARN :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceARN = Lens.lens (\TagResource' {resourceARN} -> resourceARN) (\s@TagResource' {} a -> s {resourceARN = a} :: TagResource)++-- | A list of tags to assign to the resource.+tagResource_tags :: Lens.Lens' TagResource [Tag]+tagResource_tags = Lens.lens (\TagResource' {tags} -> tags) (\s@TagResource' {} a -> s {tags = a} :: TagResource) Prelude.. Lens.coerced++instance Core.AWSRequest TagResource where+ type AWSResponse TagResource = TagResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ TagResourceResponse'+ Prelude.<$> (x Data..?> "ResourceARN")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable TagResource where+ hashWithSalt _salt TagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceARN+ `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+ rnf TagResource' {..} =+ Prelude.rnf resourceARN+ `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders TagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.TagResource" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON TagResource where+ toJSON TagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("ResourceARN" Data..= resourceARN),+ Prelude.Just ("Tags" Data..= tags)+ ]+ )++instance Data.ToPath TagResource where+ toPath = Prelude.const "/"++instance Data.ToQuery TagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+ { -- | The Amazon Resource Name (ARN) of the resource you tagged.+ resourceARN :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceARN', 'tagResourceResponse_resourceARN' - The Amazon Resource Name (ARN) of the resource you tagged.+--+-- 'httpStatus', 'tagResourceResponse_httpStatus' - The response's http status code.+newTagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ TagResourceResponse+newTagResourceResponse pHttpStatus_ =+ TagResourceResponse'+ { resourceARN = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the resource you tagged.+tagResourceResponse_resourceARN :: Lens.Lens' TagResourceResponse (Prelude.Maybe Prelude.Text)+tagResourceResponse_resourceARN = Lens.lens (\TagResourceResponse' {resourceARN} -> resourceARN) (\s@TagResourceResponse' {} a -> s {resourceARN = a} :: TagResourceResponse)++-- | The response's http status code.+tagResourceResponse_httpStatus :: Lens.Lens' TagResourceResponse Prelude.Int+tagResourceResponse_httpStatus = Lens.lens (\TagResourceResponse' {httpStatus} -> httpStatus) (\s@TagResourceResponse' {} a -> s {httpStatus = a} :: TagResourceResponse)++instance Prelude.NFData TagResourceResponse where+ rnf TagResourceResponse' {..} =+ Prelude.rnf resourceARN+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/TestHypervisorConfiguration.hs view
@@ -0,0 +1,210 @@+{-# 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.BackupGateway.TestHypervisorConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Tests your hypervisor configuration to validate that backup gateway can+-- connect with the hypervisor and its resources.+module Amazonka.BackupGateway.TestHypervisorConfiguration+ ( -- * Creating a Request+ TestHypervisorConfiguration (..),+ newTestHypervisorConfiguration,++ -- * Request Lenses+ testHypervisorConfiguration_password,+ testHypervisorConfiguration_username,+ testHypervisorConfiguration_gatewayArn,+ testHypervisorConfiguration_host,++ -- * Destructuring the Response+ TestHypervisorConfigurationResponse (..),+ newTestHypervisorConfigurationResponse,++ -- * Response Lenses+ testHypervisorConfigurationResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newTestHypervisorConfiguration' smart constructor.+data TestHypervisorConfiguration = TestHypervisorConfiguration'+ { -- | The password for the hypervisor.+ password :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | The username for the hypervisor.+ username :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | The Amazon Resource Name (ARN) of the gateway to the hypervisor to test.+ gatewayArn :: Prelude.Text,+ -- | The server host of the hypervisor. This can be either an IP address or a+ -- fully-qualified domain name (FQDN).+ host :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TestHypervisorConfiguration' 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:+--+-- 'password', 'testHypervisorConfiguration_password' - The password for the hypervisor.+--+-- 'username', 'testHypervisorConfiguration_username' - The username for the hypervisor.+--+-- 'gatewayArn', 'testHypervisorConfiguration_gatewayArn' - The Amazon Resource Name (ARN) of the gateway to the hypervisor to test.+--+-- 'host', 'testHypervisorConfiguration_host' - The server host of the hypervisor. This can be either an IP address or a+-- fully-qualified domain name (FQDN).+newTestHypervisorConfiguration ::+ -- | 'gatewayArn'+ Prelude.Text ->+ -- | 'host'+ Prelude.Text ->+ TestHypervisorConfiguration+newTestHypervisorConfiguration pGatewayArn_ pHost_ =+ TestHypervisorConfiguration'+ { password =+ Prelude.Nothing,+ username = Prelude.Nothing,+ gatewayArn = pGatewayArn_,+ host = pHost_+ }++-- | The password for the hypervisor.+testHypervisorConfiguration_password :: Lens.Lens' TestHypervisorConfiguration (Prelude.Maybe Prelude.Text)+testHypervisorConfiguration_password = Lens.lens (\TestHypervisorConfiguration' {password} -> password) (\s@TestHypervisorConfiguration' {} a -> s {password = a} :: TestHypervisorConfiguration) Prelude.. Lens.mapping Data._Sensitive++-- | The username for the hypervisor.+testHypervisorConfiguration_username :: Lens.Lens' TestHypervisorConfiguration (Prelude.Maybe Prelude.Text)+testHypervisorConfiguration_username = Lens.lens (\TestHypervisorConfiguration' {username} -> username) (\s@TestHypervisorConfiguration' {} a -> s {username = a} :: TestHypervisorConfiguration) Prelude.. Lens.mapping Data._Sensitive++-- | The Amazon Resource Name (ARN) of the gateway to the hypervisor to test.+testHypervisorConfiguration_gatewayArn :: Lens.Lens' TestHypervisorConfiguration Prelude.Text+testHypervisorConfiguration_gatewayArn = Lens.lens (\TestHypervisorConfiguration' {gatewayArn} -> gatewayArn) (\s@TestHypervisorConfiguration' {} a -> s {gatewayArn = a} :: TestHypervisorConfiguration)++-- | The server host of the hypervisor. This can be either an IP address or a+-- fully-qualified domain name (FQDN).+testHypervisorConfiguration_host :: Lens.Lens' TestHypervisorConfiguration Prelude.Text+testHypervisorConfiguration_host = Lens.lens (\TestHypervisorConfiguration' {host} -> host) (\s@TestHypervisorConfiguration' {} a -> s {host = a} :: TestHypervisorConfiguration)++instance Core.AWSRequest TestHypervisorConfiguration where+ type+ AWSResponse TestHypervisorConfiguration =+ TestHypervisorConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ TestHypervisorConfigurationResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable TestHypervisorConfiguration where+ hashWithSalt _salt TestHypervisorConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` password+ `Prelude.hashWithSalt` username+ `Prelude.hashWithSalt` gatewayArn+ `Prelude.hashWithSalt` host++instance Prelude.NFData TestHypervisorConfiguration where+ rnf TestHypervisorConfiguration' {..} =+ Prelude.rnf password+ `Prelude.seq` Prelude.rnf username+ `Prelude.seq` Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf host++instance Data.ToHeaders TestHypervisorConfiguration where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.TestHypervisorConfiguration" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON TestHypervisorConfiguration where+ toJSON TestHypervisorConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Password" Data..=) Prelude.<$> password,+ ("Username" Data..=) Prelude.<$> username,+ Prelude.Just ("GatewayArn" Data..= gatewayArn),+ Prelude.Just ("Host" Data..= host)+ ]+ )++instance Data.ToPath TestHypervisorConfiguration where+ toPath = Prelude.const "/"++instance Data.ToQuery TestHypervisorConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTestHypervisorConfigurationResponse' smart constructor.+data TestHypervisorConfigurationResponse = TestHypervisorConfigurationResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TestHypervisorConfigurationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'testHypervisorConfigurationResponse_httpStatus' - The response's http status code.+newTestHypervisorConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ TestHypervisorConfigurationResponse+newTestHypervisorConfigurationResponse pHttpStatus_ =+ TestHypervisorConfigurationResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+testHypervisorConfigurationResponse_httpStatus :: Lens.Lens' TestHypervisorConfigurationResponse Prelude.Int+testHypervisorConfigurationResponse_httpStatus = Lens.lens (\TestHypervisorConfigurationResponse' {httpStatus} -> httpStatus) (\s@TestHypervisorConfigurationResponse' {} a -> s {httpStatus = a} :: TestHypervisorConfigurationResponse)++instance+ Prelude.NFData+ TestHypervisorConfigurationResponse+ where+ rnf TestHypervisorConfigurationResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/Types.hs view
@@ -0,0 +1,273 @@+{-# 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.BackupGateway.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.BackupGateway.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _AccessDeniedException,+ _ConflictException,+ _InternalServerException,+ _ResourceNotFoundException,+ _ThrottlingException,+ _ValidationException,++ -- * GatewayType+ GatewayType (..),++ -- * HypervisorState+ HypervisorState (..),++ -- * SyncMetadataStatus+ SyncMetadataStatus (..),++ -- * BandwidthRateLimitInterval+ BandwidthRateLimitInterval (..),+ newBandwidthRateLimitInterval,+ bandwidthRateLimitInterval_averageUploadRateLimitInBitsPerSec,+ bandwidthRateLimitInterval_daysOfWeek,+ bandwidthRateLimitInterval_endHourOfDay,+ bandwidthRateLimitInterval_endMinuteOfHour,+ bandwidthRateLimitInterval_startHourOfDay,+ bandwidthRateLimitInterval_startMinuteOfHour,++ -- * Gateway+ Gateway (..),+ newGateway,+ gateway_gatewayArn,+ gateway_gatewayDisplayName,+ gateway_gatewayType,+ gateway_hypervisorId,+ gateway_lastSeenTime,++ -- * GatewayDetails+ GatewayDetails (..),+ newGatewayDetails,+ gatewayDetails_gatewayArn,+ gatewayDetails_gatewayDisplayName,+ gatewayDetails_gatewayType,+ gatewayDetails_hypervisorId,+ gatewayDetails_lastSeenTime,+ gatewayDetails_maintenanceStartTime,+ gatewayDetails_nextUpdateAvailabilityTime,+ gatewayDetails_vpcEndpoint,++ -- * Hypervisor+ Hypervisor (..),+ newHypervisor,+ hypervisor_host,+ hypervisor_hypervisorArn,+ hypervisor_kmsKeyArn,+ hypervisor_name,+ hypervisor_state,++ -- * HypervisorDetails+ HypervisorDetails (..),+ newHypervisorDetails,+ hypervisorDetails_host,+ hypervisorDetails_hypervisorArn,+ hypervisorDetails_kmsKeyArn,+ hypervisorDetails_lastSuccessfulMetadataSyncTime,+ hypervisorDetails_latestMetadataSyncStatus,+ hypervisorDetails_latestMetadataSyncStatusMessage,+ hypervisorDetails_logGroupArn,+ hypervisorDetails_name,+ hypervisorDetails_state,++ -- * MaintenanceStartTime+ MaintenanceStartTime (..),+ newMaintenanceStartTime,+ maintenanceStartTime_dayOfMonth,+ maintenanceStartTime_dayOfWeek,+ maintenanceStartTime_hourOfDay,+ maintenanceStartTime_minuteOfHour,++ -- * Tag+ Tag (..),+ newTag,+ tag_key,+ tag_value,++ -- * VirtualMachine+ VirtualMachine (..),+ newVirtualMachine,+ virtualMachine_hostName,+ virtualMachine_hypervisorId,+ virtualMachine_lastBackupDate,+ virtualMachine_name,+ virtualMachine_path,+ virtualMachine_resourceArn,++ -- * VirtualMachineDetails+ VirtualMachineDetails (..),+ newVirtualMachineDetails,+ virtualMachineDetails_hostName,+ virtualMachineDetails_hypervisorId,+ virtualMachineDetails_lastBackupDate,+ virtualMachineDetails_name,+ virtualMachineDetails_path,+ virtualMachineDetails_resourceArn,+ virtualMachineDetails_vmwareTags,++ -- * VmwareTag+ VmwareTag (..),+ newVmwareTag,+ vmwareTag_vmwareCategory,+ vmwareTag_vmwareTagDescription,+ vmwareTag_vmwareTagName,++ -- * VmwareToAwsTagMapping+ VmwareToAwsTagMapping (..),+ newVmwareToAwsTagMapping,+ vmwareToAwsTagMapping_awsTagKey,+ vmwareToAwsTagMapping_awsTagValue,+ vmwareToAwsTagMapping_vmwareCategory,+ vmwareToAwsTagMapping_vmwareTagName,+ )+where++import Amazonka.BackupGateway.Types.BandwidthRateLimitInterval+import Amazonka.BackupGateway.Types.Gateway+import Amazonka.BackupGateway.Types.GatewayDetails+import Amazonka.BackupGateway.Types.GatewayType+import Amazonka.BackupGateway.Types.Hypervisor+import Amazonka.BackupGateway.Types.HypervisorDetails+import Amazonka.BackupGateway.Types.HypervisorState+import Amazonka.BackupGateway.Types.MaintenanceStartTime+import Amazonka.BackupGateway.Types.SyncMetadataStatus+import Amazonka.BackupGateway.Types.Tag+import Amazonka.BackupGateway.Types.VirtualMachine+import Amazonka.BackupGateway.Types.VirtualMachineDetails+import Amazonka.BackupGateway.Types.VmwareTag+import Amazonka.BackupGateway.Types.VmwareToAwsTagMapping+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-01-01@ of the Amazon Backup Gateway SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "BackupGateway",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "backup-gateway",+ Core.signingName = "backup-gateway",+ Core.version = "2021-01-01",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "BackupGateway",+ 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 operation cannot proceed because you have insufficient permissions.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+ Core._MatchServiceError+ defaultService+ "AccessDeniedException"++-- | The operation cannot proceed because it is not supported.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"++-- | The operation did not succeed because an internal error occurred. Try+-- again later.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+ Core._MatchServiceError+ defaultService+ "InternalServerException"++-- | A resource that is required for the action wasn\'t found.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"++-- | TPS has been limited to protect against intentional or unintentional+-- high request volumes.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+ Core._MatchServiceError+ defaultService+ "ThrottlingException"++-- | The operation did not succeed because a validation error occurred.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+ Core._MatchServiceError+ defaultService+ "ValidationException"
+ gen/Amazonka/BackupGateway/Types/BandwidthRateLimitInterval.hs view
@@ -0,0 +1,202 @@+{-# 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.BackupGateway.Types.BandwidthRateLimitInterval+-- 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.BackupGateway.Types.BandwidthRateLimitInterval where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a bandwidth rate limit interval for a gateway. A bandwidth+-- rate limit schedule consists of one or more bandwidth rate limit+-- intervals. A bandwidth rate limit interval defines a period of time on+-- one or more days of the week, during which bandwidth rate limits are+-- specified for uploading, downloading, or both.+--+-- /See:/ 'newBandwidthRateLimitInterval' smart constructor.+data BandwidthRateLimitInterval = BandwidthRateLimitInterval'+ { -- | The average upload rate limit component of the bandwidth rate limit+ -- interval, in bits per second. This field does not appear in the response+ -- if the upload rate limit is not set.+ --+ -- For Backup Gateway, the minimum value is @(Value)@.+ averageUploadRateLimitInBitsPerSec :: Prelude.Maybe Prelude.Natural,+ -- | The days of the week component of the bandwidth rate limit interval,+ -- represented as ordinal numbers from 0 to 6, where 0 represents Sunday+ -- and 6 represents Saturday.+ daysOfWeek :: Prelude.NonEmpty Prelude.Natural,+ -- | The hour of the day to end the bandwidth rate limit interval.+ endHourOfDay :: Prelude.Natural,+ -- | The minute of the hour to end the bandwidth rate limit interval.+ --+ -- The bandwidth rate limit interval ends at the end of the minute. To end+ -- an interval at the end of an hour, use the value @59@.+ endMinuteOfHour :: Prelude.Natural,+ -- | The hour of the day to start the bandwidth rate limit interval.+ startHourOfDay :: Prelude.Natural,+ -- | The minute of the hour to start the bandwidth rate limit interval. The+ -- interval begins at the start of that minute. To begin an interval+ -- exactly at the start of the hour, use the value @0@.+ startMinuteOfHour :: Prelude.Natural+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BandwidthRateLimitInterval' 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:+--+-- 'averageUploadRateLimitInBitsPerSec', 'bandwidthRateLimitInterval_averageUploadRateLimitInBitsPerSec' - The average upload rate limit component of the bandwidth rate limit+-- interval, in bits per second. This field does not appear in the response+-- if the upload rate limit is not set.+--+-- For Backup Gateway, the minimum value is @(Value)@.+--+-- 'daysOfWeek', 'bandwidthRateLimitInterval_daysOfWeek' - The days of the week component of the bandwidth rate limit interval,+-- represented as ordinal numbers from 0 to 6, where 0 represents Sunday+-- and 6 represents Saturday.+--+-- 'endHourOfDay', 'bandwidthRateLimitInterval_endHourOfDay' - The hour of the day to end the bandwidth rate limit interval.+--+-- 'endMinuteOfHour', 'bandwidthRateLimitInterval_endMinuteOfHour' - The minute of the hour to end the bandwidth rate limit interval.+--+-- The bandwidth rate limit interval ends at the end of the minute. To end+-- an interval at the end of an hour, use the value @59@.+--+-- 'startHourOfDay', 'bandwidthRateLimitInterval_startHourOfDay' - The hour of the day to start the bandwidth rate limit interval.+--+-- 'startMinuteOfHour', 'bandwidthRateLimitInterval_startMinuteOfHour' - The minute of the hour to start the bandwidth rate limit interval. The+-- interval begins at the start of that minute. To begin an interval+-- exactly at the start of the hour, use the value @0@.+newBandwidthRateLimitInterval ::+ -- | 'daysOfWeek'+ Prelude.NonEmpty Prelude.Natural ->+ -- | 'endHourOfDay'+ Prelude.Natural ->+ -- | 'endMinuteOfHour'+ Prelude.Natural ->+ -- | 'startHourOfDay'+ Prelude.Natural ->+ -- | 'startMinuteOfHour'+ Prelude.Natural ->+ BandwidthRateLimitInterval+newBandwidthRateLimitInterval+ pDaysOfWeek_+ pEndHourOfDay_+ pEndMinuteOfHour_+ pStartHourOfDay_+ pStartMinuteOfHour_ =+ BandwidthRateLimitInterval'+ { averageUploadRateLimitInBitsPerSec =+ Prelude.Nothing,+ daysOfWeek = Lens.coerced Lens.# pDaysOfWeek_,+ endHourOfDay = pEndHourOfDay_,+ endMinuteOfHour = pEndMinuteOfHour_,+ startHourOfDay = pStartHourOfDay_,+ startMinuteOfHour = pStartMinuteOfHour_+ }++-- | The average upload rate limit component of the bandwidth rate limit+-- interval, in bits per second. This field does not appear in the response+-- if the upload rate limit is not set.+--+-- For Backup Gateway, the minimum value is @(Value)@.+bandwidthRateLimitInterval_averageUploadRateLimitInBitsPerSec :: Lens.Lens' BandwidthRateLimitInterval (Prelude.Maybe Prelude.Natural)+bandwidthRateLimitInterval_averageUploadRateLimitInBitsPerSec = Lens.lens (\BandwidthRateLimitInterval' {averageUploadRateLimitInBitsPerSec} -> averageUploadRateLimitInBitsPerSec) (\s@BandwidthRateLimitInterval' {} a -> s {averageUploadRateLimitInBitsPerSec = a} :: BandwidthRateLimitInterval)++-- | The days of the week component of the bandwidth rate limit interval,+-- represented as ordinal numbers from 0 to 6, where 0 represents Sunday+-- and 6 represents Saturday.+bandwidthRateLimitInterval_daysOfWeek :: Lens.Lens' BandwidthRateLimitInterval (Prelude.NonEmpty Prelude.Natural)+bandwidthRateLimitInterval_daysOfWeek = Lens.lens (\BandwidthRateLimitInterval' {daysOfWeek} -> daysOfWeek) (\s@BandwidthRateLimitInterval' {} a -> s {daysOfWeek = a} :: BandwidthRateLimitInterval) Prelude.. Lens.coerced++-- | The hour of the day to end the bandwidth rate limit interval.+bandwidthRateLimitInterval_endHourOfDay :: Lens.Lens' BandwidthRateLimitInterval Prelude.Natural+bandwidthRateLimitInterval_endHourOfDay = Lens.lens (\BandwidthRateLimitInterval' {endHourOfDay} -> endHourOfDay) (\s@BandwidthRateLimitInterval' {} a -> s {endHourOfDay = a} :: BandwidthRateLimitInterval)++-- | The minute of the hour to end the bandwidth rate limit interval.+--+-- The bandwidth rate limit interval ends at the end of the minute. To end+-- an interval at the end of an hour, use the value @59@.+bandwidthRateLimitInterval_endMinuteOfHour :: Lens.Lens' BandwidthRateLimitInterval Prelude.Natural+bandwidthRateLimitInterval_endMinuteOfHour = Lens.lens (\BandwidthRateLimitInterval' {endMinuteOfHour} -> endMinuteOfHour) (\s@BandwidthRateLimitInterval' {} a -> s {endMinuteOfHour = a} :: BandwidthRateLimitInterval)++-- | The hour of the day to start the bandwidth rate limit interval.+bandwidthRateLimitInterval_startHourOfDay :: Lens.Lens' BandwidthRateLimitInterval Prelude.Natural+bandwidthRateLimitInterval_startHourOfDay = Lens.lens (\BandwidthRateLimitInterval' {startHourOfDay} -> startHourOfDay) (\s@BandwidthRateLimitInterval' {} a -> s {startHourOfDay = a} :: BandwidthRateLimitInterval)++-- | The minute of the hour to start the bandwidth rate limit interval. The+-- interval begins at the start of that minute. To begin an interval+-- exactly at the start of the hour, use the value @0@.+bandwidthRateLimitInterval_startMinuteOfHour :: Lens.Lens' BandwidthRateLimitInterval Prelude.Natural+bandwidthRateLimitInterval_startMinuteOfHour = Lens.lens (\BandwidthRateLimitInterval' {startMinuteOfHour} -> startMinuteOfHour) (\s@BandwidthRateLimitInterval' {} a -> s {startMinuteOfHour = a} :: BandwidthRateLimitInterval)++instance Data.FromJSON BandwidthRateLimitInterval where+ parseJSON =+ Data.withObject+ "BandwidthRateLimitInterval"+ ( \x ->+ BandwidthRateLimitInterval'+ Prelude.<$> (x Data..:? "AverageUploadRateLimitInBitsPerSec")+ Prelude.<*> (x Data..: "DaysOfWeek")+ Prelude.<*> (x Data..: "EndHourOfDay")+ Prelude.<*> (x Data..: "EndMinuteOfHour")+ Prelude.<*> (x Data..: "StartHourOfDay")+ Prelude.<*> (x Data..: "StartMinuteOfHour")+ )++instance Prelude.Hashable BandwidthRateLimitInterval where+ hashWithSalt _salt BandwidthRateLimitInterval' {..} =+ _salt+ `Prelude.hashWithSalt` averageUploadRateLimitInBitsPerSec+ `Prelude.hashWithSalt` daysOfWeek+ `Prelude.hashWithSalt` endHourOfDay+ `Prelude.hashWithSalt` endMinuteOfHour+ `Prelude.hashWithSalt` startHourOfDay+ `Prelude.hashWithSalt` startMinuteOfHour++instance Prelude.NFData BandwidthRateLimitInterval where+ rnf BandwidthRateLimitInterval' {..} =+ Prelude.rnf averageUploadRateLimitInBitsPerSec+ `Prelude.seq` Prelude.rnf daysOfWeek+ `Prelude.seq` Prelude.rnf endHourOfDay+ `Prelude.seq` Prelude.rnf endMinuteOfHour+ `Prelude.seq` Prelude.rnf startHourOfDay+ `Prelude.seq` Prelude.rnf startMinuteOfHour++instance Data.ToJSON BandwidthRateLimitInterval where+ toJSON BandwidthRateLimitInterval' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("AverageUploadRateLimitInBitsPerSec" Data..=)+ Prelude.<$> averageUploadRateLimitInBitsPerSec,+ Prelude.Just ("DaysOfWeek" Data..= daysOfWeek),+ Prelude.Just ("EndHourOfDay" Data..= endHourOfDay),+ Prelude.Just+ ("EndMinuteOfHour" Data..= endMinuteOfHour),+ Prelude.Just+ ("StartHourOfDay" Data..= startHourOfDay),+ Prelude.Just+ ("StartMinuteOfHour" Data..= startMinuteOfHour)+ ]+ )
+ gen/Amazonka/BackupGateway/Types/Gateway.hs view
@@ -0,0 +1,132 @@+{-# 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.BackupGateway.Types.Gateway+-- 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.BackupGateway.Types.Gateway where++import Amazonka.BackupGateway.Types.GatewayType+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A gateway is an Backup Gateway appliance that runs on the customer\'s+-- network to provide seamless connectivity to backup storage in the Amazon+-- Web Services Cloud.+--+-- /See:/ 'newGateway' smart constructor.+data Gateway = Gateway'+ { -- | The Amazon Resource Name (ARN) of the gateway. Use the @ListGateways@+ -- operation to return a list of gateways for your account and Amazon Web+ -- Services Region.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The display name of the gateway.+ gatewayDisplayName :: Prelude.Maybe Prelude.Text,+ -- | The type of the gateway.+ gatewayType :: Prelude.Maybe GatewayType,+ -- | The hypervisor ID of the gateway.+ hypervisorId :: Prelude.Maybe Prelude.Text,+ -- | The last time Backup gateway communicated with the gateway, in Unix+ -- format and UTC time.+ lastSeenTime :: Prelude.Maybe Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Gateway' 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:+--+-- 'gatewayArn', 'gateway_gatewayArn' - The Amazon Resource Name (ARN) of the gateway. Use the @ListGateways@+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+--+-- 'gatewayDisplayName', 'gateway_gatewayDisplayName' - The display name of the gateway.+--+-- 'gatewayType', 'gateway_gatewayType' - The type of the gateway.+--+-- 'hypervisorId', 'gateway_hypervisorId' - The hypervisor ID of the gateway.+--+-- 'lastSeenTime', 'gateway_lastSeenTime' - The last time Backup gateway communicated with the gateway, in Unix+-- format and UTC time.+newGateway ::+ Gateway+newGateway =+ Gateway'+ { gatewayArn = Prelude.Nothing,+ gatewayDisplayName = Prelude.Nothing,+ gatewayType = Prelude.Nothing,+ hypervisorId = Prelude.Nothing,+ lastSeenTime = Prelude.Nothing+ }++-- | The Amazon Resource Name (ARN) of the gateway. Use the @ListGateways@+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+gateway_gatewayArn :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)+gateway_gatewayArn = Lens.lens (\Gateway' {gatewayArn} -> gatewayArn) (\s@Gateway' {} a -> s {gatewayArn = a} :: Gateway)++-- | The display name of the gateway.+gateway_gatewayDisplayName :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)+gateway_gatewayDisplayName = Lens.lens (\Gateway' {gatewayDisplayName} -> gatewayDisplayName) (\s@Gateway' {} a -> s {gatewayDisplayName = a} :: Gateway)++-- | The type of the gateway.+gateway_gatewayType :: Lens.Lens' Gateway (Prelude.Maybe GatewayType)+gateway_gatewayType = Lens.lens (\Gateway' {gatewayType} -> gatewayType) (\s@Gateway' {} a -> s {gatewayType = a} :: Gateway)++-- | The hypervisor ID of the gateway.+gateway_hypervisorId :: Lens.Lens' Gateway (Prelude.Maybe Prelude.Text)+gateway_hypervisorId = Lens.lens (\Gateway' {hypervisorId} -> hypervisorId) (\s@Gateway' {} a -> s {hypervisorId = a} :: Gateway)++-- | The last time Backup gateway communicated with the gateway, in Unix+-- format and UTC time.+gateway_lastSeenTime :: Lens.Lens' Gateway (Prelude.Maybe Prelude.UTCTime)+gateway_lastSeenTime = Lens.lens (\Gateway' {lastSeenTime} -> lastSeenTime) (\s@Gateway' {} a -> s {lastSeenTime = a} :: Gateway) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON Gateway where+ parseJSON =+ Data.withObject+ "Gateway"+ ( \x ->+ Gateway'+ Prelude.<$> (x Data..:? "GatewayArn")+ Prelude.<*> (x Data..:? "GatewayDisplayName")+ Prelude.<*> (x Data..:? "GatewayType")+ Prelude.<*> (x Data..:? "HypervisorId")+ Prelude.<*> (x Data..:? "LastSeenTime")+ )++instance Prelude.Hashable Gateway where+ hashWithSalt _salt Gateway' {..} =+ _salt+ `Prelude.hashWithSalt` gatewayArn+ `Prelude.hashWithSalt` gatewayDisplayName+ `Prelude.hashWithSalt` gatewayType+ `Prelude.hashWithSalt` hypervisorId+ `Prelude.hashWithSalt` lastSeenTime++instance Prelude.NFData Gateway where+ rnf Gateway' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf gatewayDisplayName+ `Prelude.seq` Prelude.rnf gatewayType+ `Prelude.seq` Prelude.rnf hypervisorId+ `Prelude.seq` Prelude.rnf lastSeenTime
+ gen/Amazonka/BackupGateway/Types/GatewayDetails.hs view
@@ -0,0 +1,176 @@+{-# 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.BackupGateway.Types.GatewayDetails+-- 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.BackupGateway.Types.GatewayDetails where++import Amazonka.BackupGateway.Types.GatewayType+import Amazonka.BackupGateway.Types.MaintenanceStartTime+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 details of gateway.+--+-- /See:/ 'newGatewayDetails' smart constructor.+data GatewayDetails = GatewayDetails'+ { -- | The Amazon Resource Name (ARN) of the gateway. Use the @ListGateways@+ -- operation to return a list of gateways for your account and Amazon Web+ -- Services Region.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The display name of the gateway.+ gatewayDisplayName :: Prelude.Maybe Prelude.Text,+ -- | The type of the gateway type.+ gatewayType :: Prelude.Maybe GatewayType,+ -- | The hypervisor ID of the gateway.+ hypervisorId :: Prelude.Maybe Prelude.Text,+ -- | Details showing the last time Backup gateway communicated with the+ -- cloud, in Unix format and UTC time.+ lastSeenTime :: Prelude.Maybe Data.POSIX,+ -- | Returns your gateway\'s weekly maintenance start time including the day+ -- and time of the week. Note that values are in terms of the gateway\'s+ -- time zone. Can be weekly or monthly.+ maintenanceStartTime :: Prelude.Maybe MaintenanceStartTime,+ -- | Details showing the next update availability time of the gateway.+ nextUpdateAvailabilityTime :: Prelude.Maybe Data.POSIX,+ -- | The DNS name for the virtual private cloud (VPC) endpoint the gateway+ -- uses to connect to the cloud for backup gateway.+ vpcEndpoint :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GatewayDetails' 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:+--+-- 'gatewayArn', 'gatewayDetails_gatewayArn' - The Amazon Resource Name (ARN) of the gateway. Use the @ListGateways@+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+--+-- 'gatewayDisplayName', 'gatewayDetails_gatewayDisplayName' - The display name of the gateway.+--+-- 'gatewayType', 'gatewayDetails_gatewayType' - The type of the gateway type.+--+-- 'hypervisorId', 'gatewayDetails_hypervisorId' - The hypervisor ID of the gateway.+--+-- 'lastSeenTime', 'gatewayDetails_lastSeenTime' - Details showing the last time Backup gateway communicated with the+-- cloud, in Unix format and UTC time.+--+-- 'maintenanceStartTime', 'gatewayDetails_maintenanceStartTime' - Returns your gateway\'s weekly maintenance start time including the day+-- and time of the week. Note that values are in terms of the gateway\'s+-- time zone. Can be weekly or monthly.+--+-- 'nextUpdateAvailabilityTime', 'gatewayDetails_nextUpdateAvailabilityTime' - Details showing the next update availability time of the gateway.+--+-- 'vpcEndpoint', 'gatewayDetails_vpcEndpoint' - The DNS name for the virtual private cloud (VPC) endpoint the gateway+-- uses to connect to the cloud for backup gateway.+newGatewayDetails ::+ GatewayDetails+newGatewayDetails =+ GatewayDetails'+ { gatewayArn = Prelude.Nothing,+ gatewayDisplayName = Prelude.Nothing,+ gatewayType = Prelude.Nothing,+ hypervisorId = Prelude.Nothing,+ lastSeenTime = Prelude.Nothing,+ maintenanceStartTime = Prelude.Nothing,+ nextUpdateAvailabilityTime = Prelude.Nothing,+ vpcEndpoint = Prelude.Nothing+ }++-- | The Amazon Resource Name (ARN) of the gateway. Use the @ListGateways@+-- operation to return a list of gateways for your account and Amazon Web+-- Services Region.+gatewayDetails_gatewayArn :: Lens.Lens' GatewayDetails (Prelude.Maybe Prelude.Text)+gatewayDetails_gatewayArn = Lens.lens (\GatewayDetails' {gatewayArn} -> gatewayArn) (\s@GatewayDetails' {} a -> s {gatewayArn = a} :: GatewayDetails)++-- | The display name of the gateway.+gatewayDetails_gatewayDisplayName :: Lens.Lens' GatewayDetails (Prelude.Maybe Prelude.Text)+gatewayDetails_gatewayDisplayName = Lens.lens (\GatewayDetails' {gatewayDisplayName} -> gatewayDisplayName) (\s@GatewayDetails' {} a -> s {gatewayDisplayName = a} :: GatewayDetails)++-- | The type of the gateway type.+gatewayDetails_gatewayType :: Lens.Lens' GatewayDetails (Prelude.Maybe GatewayType)+gatewayDetails_gatewayType = Lens.lens (\GatewayDetails' {gatewayType} -> gatewayType) (\s@GatewayDetails' {} a -> s {gatewayType = a} :: GatewayDetails)++-- | The hypervisor ID of the gateway.+gatewayDetails_hypervisorId :: Lens.Lens' GatewayDetails (Prelude.Maybe Prelude.Text)+gatewayDetails_hypervisorId = Lens.lens (\GatewayDetails' {hypervisorId} -> hypervisorId) (\s@GatewayDetails' {} a -> s {hypervisorId = a} :: GatewayDetails)++-- | Details showing the last time Backup gateway communicated with the+-- cloud, in Unix format and UTC time.+gatewayDetails_lastSeenTime :: Lens.Lens' GatewayDetails (Prelude.Maybe Prelude.UTCTime)+gatewayDetails_lastSeenTime = Lens.lens (\GatewayDetails' {lastSeenTime} -> lastSeenTime) (\s@GatewayDetails' {} a -> s {lastSeenTime = a} :: GatewayDetails) Prelude.. Lens.mapping Data._Time++-- | Returns your gateway\'s weekly maintenance start time including the day+-- and time of the week. Note that values are in terms of the gateway\'s+-- time zone. Can be weekly or monthly.+gatewayDetails_maintenanceStartTime :: Lens.Lens' GatewayDetails (Prelude.Maybe MaintenanceStartTime)+gatewayDetails_maintenanceStartTime = Lens.lens (\GatewayDetails' {maintenanceStartTime} -> maintenanceStartTime) (\s@GatewayDetails' {} a -> s {maintenanceStartTime = a} :: GatewayDetails)++-- | Details showing the next update availability time of the gateway.+gatewayDetails_nextUpdateAvailabilityTime :: Lens.Lens' GatewayDetails (Prelude.Maybe Prelude.UTCTime)+gatewayDetails_nextUpdateAvailabilityTime = Lens.lens (\GatewayDetails' {nextUpdateAvailabilityTime} -> nextUpdateAvailabilityTime) (\s@GatewayDetails' {} a -> s {nextUpdateAvailabilityTime = a} :: GatewayDetails) Prelude.. Lens.mapping Data._Time++-- | The DNS name for the virtual private cloud (VPC) endpoint the gateway+-- uses to connect to the cloud for backup gateway.+gatewayDetails_vpcEndpoint :: Lens.Lens' GatewayDetails (Prelude.Maybe Prelude.Text)+gatewayDetails_vpcEndpoint = Lens.lens (\GatewayDetails' {vpcEndpoint} -> vpcEndpoint) (\s@GatewayDetails' {} a -> s {vpcEndpoint = a} :: GatewayDetails)++instance Data.FromJSON GatewayDetails where+ parseJSON =+ Data.withObject+ "GatewayDetails"+ ( \x ->+ GatewayDetails'+ Prelude.<$> (x Data..:? "GatewayArn")+ Prelude.<*> (x Data..:? "GatewayDisplayName")+ Prelude.<*> (x Data..:? "GatewayType")+ Prelude.<*> (x Data..:? "HypervisorId")+ Prelude.<*> (x Data..:? "LastSeenTime")+ Prelude.<*> (x Data..:? "MaintenanceStartTime")+ Prelude.<*> (x Data..:? "NextUpdateAvailabilityTime")+ Prelude.<*> (x Data..:? "VpcEndpoint")+ )++instance Prelude.Hashable GatewayDetails where+ hashWithSalt _salt GatewayDetails' {..} =+ _salt+ `Prelude.hashWithSalt` gatewayArn+ `Prelude.hashWithSalt` gatewayDisplayName+ `Prelude.hashWithSalt` gatewayType+ `Prelude.hashWithSalt` hypervisorId+ `Prelude.hashWithSalt` lastSeenTime+ `Prelude.hashWithSalt` maintenanceStartTime+ `Prelude.hashWithSalt` nextUpdateAvailabilityTime+ `Prelude.hashWithSalt` vpcEndpoint++instance Prelude.NFData GatewayDetails where+ rnf GatewayDetails' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf gatewayDisplayName+ `Prelude.seq` Prelude.rnf gatewayType+ `Prelude.seq` Prelude.rnf hypervisorId+ `Prelude.seq` Prelude.rnf lastSeenTime+ `Prelude.seq` Prelude.rnf maintenanceStartTime+ `Prelude.seq` Prelude.rnf nextUpdateAvailabilityTime+ `Prelude.seq` Prelude.rnf vpcEndpoint
+ gen/Amazonka/BackupGateway/Types/GatewayType.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.Types.GatewayType+-- 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.BackupGateway.Types.GatewayType+ ( GatewayType+ ( ..,+ GatewayType_BACKUP_VM+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype GatewayType = GatewayType'+ { fromGatewayType ::+ 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 GatewayType_BACKUP_VM :: GatewayType+pattern GatewayType_BACKUP_VM = GatewayType' "BACKUP_VM"++{-# COMPLETE+ GatewayType_BACKUP_VM,+ GatewayType'+ #-}
+ gen/Amazonka/BackupGateway/Types/Hypervisor.hs view
@@ -0,0 +1,131 @@+{-# 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.BackupGateway.Types.Hypervisor+-- 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.BackupGateway.Types.Hypervisor where++import Amazonka.BackupGateway.Types.HypervisorState+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 hypervisor\'s permissions to which the gateway will+-- connect.+--+-- A hypervisor is hardware, software, or firmware that creates and manages+-- virtual machines, and allocates resources to them.+--+-- /See:/ 'newHypervisor' smart constructor.+data Hypervisor = Hypervisor'+ { -- | The server host of the hypervisor. This can be either an IP address or a+ -- fully-qualified domain name (FQDN).+ host :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the hypervisor.+ hypervisorArn :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the Key Management Service used to+ -- encrypt the hypervisor.+ kmsKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the hypervisor.+ name :: Prelude.Maybe Prelude.Text,+ -- | The state of the hypervisor.+ state :: Prelude.Maybe HypervisorState+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Hypervisor' 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:+--+-- 'host', 'hypervisor_host' - The server host of the hypervisor. This can be either an IP address or a+-- fully-qualified domain name (FQDN).+--+-- 'hypervisorArn', 'hypervisor_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor.+--+-- 'kmsKeyArn', 'hypervisor_kmsKeyArn' - The Amazon Resource Name (ARN) of the Key Management Service used to+-- encrypt the hypervisor.+--+-- 'name', 'hypervisor_name' - The name of the hypervisor.+--+-- 'state', 'hypervisor_state' - The state of the hypervisor.+newHypervisor ::+ Hypervisor+newHypervisor =+ Hypervisor'+ { host = Prelude.Nothing,+ hypervisorArn = Prelude.Nothing,+ kmsKeyArn = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing+ }++-- | The server host of the hypervisor. This can be either an IP address or a+-- fully-qualified domain name (FQDN).+hypervisor_host :: Lens.Lens' Hypervisor (Prelude.Maybe Prelude.Text)+hypervisor_host = Lens.lens (\Hypervisor' {host} -> host) (\s@Hypervisor' {} a -> s {host = a} :: Hypervisor)++-- | The Amazon Resource Name (ARN) of the hypervisor.+hypervisor_hypervisorArn :: Lens.Lens' Hypervisor (Prelude.Maybe Prelude.Text)+hypervisor_hypervisorArn = Lens.lens (\Hypervisor' {hypervisorArn} -> hypervisorArn) (\s@Hypervisor' {} a -> s {hypervisorArn = a} :: Hypervisor)++-- | The Amazon Resource Name (ARN) of the Key Management Service used to+-- encrypt the hypervisor.+hypervisor_kmsKeyArn :: Lens.Lens' Hypervisor (Prelude.Maybe Prelude.Text)+hypervisor_kmsKeyArn = Lens.lens (\Hypervisor' {kmsKeyArn} -> kmsKeyArn) (\s@Hypervisor' {} a -> s {kmsKeyArn = a} :: Hypervisor)++-- | The name of the hypervisor.+hypervisor_name :: Lens.Lens' Hypervisor (Prelude.Maybe Prelude.Text)+hypervisor_name = Lens.lens (\Hypervisor' {name} -> name) (\s@Hypervisor' {} a -> s {name = a} :: Hypervisor)++-- | The state of the hypervisor.+hypervisor_state :: Lens.Lens' Hypervisor (Prelude.Maybe HypervisorState)+hypervisor_state = Lens.lens (\Hypervisor' {state} -> state) (\s@Hypervisor' {} a -> s {state = a} :: Hypervisor)++instance Data.FromJSON Hypervisor where+ parseJSON =+ Data.withObject+ "Hypervisor"+ ( \x ->+ Hypervisor'+ Prelude.<$> (x Data..:? "Host")+ Prelude.<*> (x Data..:? "HypervisorArn")+ Prelude.<*> (x Data..:? "KmsKeyArn")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "State")+ )++instance Prelude.Hashable Hypervisor where+ hashWithSalt _salt Hypervisor' {..} =+ _salt+ `Prelude.hashWithSalt` host+ `Prelude.hashWithSalt` hypervisorArn+ `Prelude.hashWithSalt` kmsKeyArn+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` state++instance Prelude.NFData Hypervisor where+ rnf Hypervisor' {..} =+ Prelude.rnf host+ `Prelude.seq` Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf kmsKeyArn+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state
+ gen/Amazonka/BackupGateway/Types/HypervisorDetails.hs view
@@ -0,0 +1,190 @@+{-# 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.BackupGateway.Types.HypervisorDetails+-- 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.BackupGateway.Types.HypervisorDetails where++import Amazonka.BackupGateway.Types.HypervisorState+import Amazonka.BackupGateway.Types.SyncMetadataStatus+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++-- | These are the details of the specified hypervisor. A hypervisor is+-- hardware, software, or firmware that creates and manages virtual+-- machines, and allocates resources to them.+--+-- /See:/ 'newHypervisorDetails' smart constructor.+data HypervisorDetails = HypervisorDetails'+ { -- | The server host of the hypervisor. This can be either an IP address or a+ -- fully-qualified domain name (FQDN).+ host :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the hypervisor.+ hypervisorArn :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the KMS used to encrypt the+ -- hypervisor.+ kmsKeyArn :: Prelude.Maybe Prelude.Text,+ -- | This is the time when the most recent successful sync of metadata+ -- occurred.+ lastSuccessfulMetadataSyncTime :: Prelude.Maybe Data.POSIX,+ -- | This is the most recent status for the indicated metadata sync.+ latestMetadataSyncStatus :: Prelude.Maybe SyncMetadataStatus,+ -- | This is the most recent status for the indicated metadata sync.+ latestMetadataSyncStatusMessage :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the group of gateways within the+ -- requested log.+ logGroupArn :: Prelude.Maybe Prelude.Text,+ -- | This is the name of the specified hypervisor.+ name :: Prelude.Maybe Prelude.Text,+ -- | This is the current state of the specified hypervisor.+ --+ -- The possible states are @PENDING@, @ONLINE@, @OFFLINE@, or @ERROR@.+ state :: Prelude.Maybe HypervisorState+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'HypervisorDetails' 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:+--+-- 'host', 'hypervisorDetails_host' - The server host of the hypervisor. This can be either an IP address or a+-- fully-qualified domain name (FQDN).+--+-- 'hypervisorArn', 'hypervisorDetails_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor.+--+-- 'kmsKeyArn', 'hypervisorDetails_kmsKeyArn' - The Amazon Resource Name (ARN) of the KMS used to encrypt the+-- hypervisor.+--+-- 'lastSuccessfulMetadataSyncTime', 'hypervisorDetails_lastSuccessfulMetadataSyncTime' - This is the time when the most recent successful sync of metadata+-- occurred.+--+-- 'latestMetadataSyncStatus', 'hypervisorDetails_latestMetadataSyncStatus' - This is the most recent status for the indicated metadata sync.+--+-- 'latestMetadataSyncStatusMessage', 'hypervisorDetails_latestMetadataSyncStatusMessage' - This is the most recent status for the indicated metadata sync.+--+-- 'logGroupArn', 'hypervisorDetails_logGroupArn' - The Amazon Resource Name (ARN) of the group of gateways within the+-- requested log.+--+-- 'name', 'hypervisorDetails_name' - This is the name of the specified hypervisor.+--+-- 'state', 'hypervisorDetails_state' - This is the current state of the specified hypervisor.+--+-- The possible states are @PENDING@, @ONLINE@, @OFFLINE@, or @ERROR@.+newHypervisorDetails ::+ HypervisorDetails+newHypervisorDetails =+ HypervisorDetails'+ { host = Prelude.Nothing,+ hypervisorArn = Prelude.Nothing,+ kmsKeyArn = Prelude.Nothing,+ lastSuccessfulMetadataSyncTime = Prelude.Nothing,+ latestMetadataSyncStatus = Prelude.Nothing,+ latestMetadataSyncStatusMessage = Prelude.Nothing,+ logGroupArn = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing+ }++-- | The server host of the hypervisor. This can be either an IP address or a+-- fully-qualified domain name (FQDN).+hypervisorDetails_host :: Lens.Lens' HypervisorDetails (Prelude.Maybe Prelude.Text)+hypervisorDetails_host = Lens.lens (\HypervisorDetails' {host} -> host) (\s@HypervisorDetails' {} a -> s {host = a} :: HypervisorDetails)++-- | The Amazon Resource Name (ARN) of the hypervisor.+hypervisorDetails_hypervisorArn :: Lens.Lens' HypervisorDetails (Prelude.Maybe Prelude.Text)+hypervisorDetails_hypervisorArn = Lens.lens (\HypervisorDetails' {hypervisorArn} -> hypervisorArn) (\s@HypervisorDetails' {} a -> s {hypervisorArn = a} :: HypervisorDetails)++-- | The Amazon Resource Name (ARN) of the KMS used to encrypt the+-- hypervisor.+hypervisorDetails_kmsKeyArn :: Lens.Lens' HypervisorDetails (Prelude.Maybe Prelude.Text)+hypervisorDetails_kmsKeyArn = Lens.lens (\HypervisorDetails' {kmsKeyArn} -> kmsKeyArn) (\s@HypervisorDetails' {} a -> s {kmsKeyArn = a} :: HypervisorDetails)++-- | This is the time when the most recent successful sync of metadata+-- occurred.+hypervisorDetails_lastSuccessfulMetadataSyncTime :: Lens.Lens' HypervisorDetails (Prelude.Maybe Prelude.UTCTime)+hypervisorDetails_lastSuccessfulMetadataSyncTime = Lens.lens (\HypervisorDetails' {lastSuccessfulMetadataSyncTime} -> lastSuccessfulMetadataSyncTime) (\s@HypervisorDetails' {} a -> s {lastSuccessfulMetadataSyncTime = a} :: HypervisorDetails) Prelude.. Lens.mapping Data._Time++-- | This is the most recent status for the indicated metadata sync.+hypervisorDetails_latestMetadataSyncStatus :: Lens.Lens' HypervisorDetails (Prelude.Maybe SyncMetadataStatus)+hypervisorDetails_latestMetadataSyncStatus = Lens.lens (\HypervisorDetails' {latestMetadataSyncStatus} -> latestMetadataSyncStatus) (\s@HypervisorDetails' {} a -> s {latestMetadataSyncStatus = a} :: HypervisorDetails)++-- | This is the most recent status for the indicated metadata sync.+hypervisorDetails_latestMetadataSyncStatusMessage :: Lens.Lens' HypervisorDetails (Prelude.Maybe Prelude.Text)+hypervisorDetails_latestMetadataSyncStatusMessage = Lens.lens (\HypervisorDetails' {latestMetadataSyncStatusMessage} -> latestMetadataSyncStatusMessage) (\s@HypervisorDetails' {} a -> s {latestMetadataSyncStatusMessage = a} :: HypervisorDetails)++-- | The Amazon Resource Name (ARN) of the group of gateways within the+-- requested log.+hypervisorDetails_logGroupArn :: Lens.Lens' HypervisorDetails (Prelude.Maybe Prelude.Text)+hypervisorDetails_logGroupArn = Lens.lens (\HypervisorDetails' {logGroupArn} -> logGroupArn) (\s@HypervisorDetails' {} a -> s {logGroupArn = a} :: HypervisorDetails)++-- | This is the name of the specified hypervisor.+hypervisorDetails_name :: Lens.Lens' HypervisorDetails (Prelude.Maybe Prelude.Text)+hypervisorDetails_name = Lens.lens (\HypervisorDetails' {name} -> name) (\s@HypervisorDetails' {} a -> s {name = a} :: HypervisorDetails)++-- | This is the current state of the specified hypervisor.+--+-- The possible states are @PENDING@, @ONLINE@, @OFFLINE@, or @ERROR@.+hypervisorDetails_state :: Lens.Lens' HypervisorDetails (Prelude.Maybe HypervisorState)+hypervisorDetails_state = Lens.lens (\HypervisorDetails' {state} -> state) (\s@HypervisorDetails' {} a -> s {state = a} :: HypervisorDetails)++instance Data.FromJSON HypervisorDetails where+ parseJSON =+ Data.withObject+ "HypervisorDetails"+ ( \x ->+ HypervisorDetails'+ Prelude.<$> (x Data..:? "Host")+ Prelude.<*> (x Data..:? "HypervisorArn")+ Prelude.<*> (x Data..:? "KmsKeyArn")+ Prelude.<*> (x Data..:? "LastSuccessfulMetadataSyncTime")+ Prelude.<*> (x Data..:? "LatestMetadataSyncStatus")+ Prelude.<*> (x Data..:? "LatestMetadataSyncStatusMessage")+ Prelude.<*> (x Data..:? "LogGroupArn")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "State")+ )++instance Prelude.Hashable HypervisorDetails where+ hashWithSalt _salt HypervisorDetails' {..} =+ _salt+ `Prelude.hashWithSalt` host+ `Prelude.hashWithSalt` hypervisorArn+ `Prelude.hashWithSalt` kmsKeyArn+ `Prelude.hashWithSalt` lastSuccessfulMetadataSyncTime+ `Prelude.hashWithSalt` latestMetadataSyncStatus+ `Prelude.hashWithSalt` latestMetadataSyncStatusMessage+ `Prelude.hashWithSalt` logGroupArn+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` state++instance Prelude.NFData HypervisorDetails where+ rnf HypervisorDetails' {..} =+ Prelude.rnf host+ `Prelude.seq` Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf kmsKeyArn+ `Prelude.seq` Prelude.rnf lastSuccessfulMetadataSyncTime+ `Prelude.seq` Prelude.rnf latestMetadataSyncStatus+ `Prelude.seq` Prelude.rnf latestMetadataSyncStatusMessage+ `Prelude.seq` Prelude.rnf logGroupArn+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state
+ gen/Amazonka/BackupGateway/Types/HypervisorState.hs view
@@ -0,0 +1,81 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.Types.HypervisorState+-- 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.BackupGateway.Types.HypervisorState+ ( HypervisorState+ ( ..,+ HypervisorState_ERROR,+ HypervisorState_OFFLINE,+ HypervisorState_ONLINE,+ HypervisorState_PENDING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype HypervisorState = HypervisorState'+ { fromHypervisorState ::+ 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 HypervisorState_ERROR :: HypervisorState+pattern HypervisorState_ERROR = HypervisorState' "ERROR"++pattern HypervisorState_OFFLINE :: HypervisorState+pattern HypervisorState_OFFLINE = HypervisorState' "OFFLINE"++pattern HypervisorState_ONLINE :: HypervisorState+pattern HypervisorState_ONLINE = HypervisorState' "ONLINE"++pattern HypervisorState_PENDING :: HypervisorState+pattern HypervisorState_PENDING = HypervisorState' "PENDING"++{-# COMPLETE+ HypervisorState_ERROR,+ HypervisorState_OFFLINE,+ HypervisorState_ONLINE,+ HypervisorState_PENDING,+ HypervisorState'+ #-}
+ gen/Amazonka/BackupGateway/Types/MaintenanceStartTime.hs view
@@ -0,0 +1,138 @@+{-# 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.BackupGateway.Types.MaintenanceStartTime+-- 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.BackupGateway.Types.MaintenanceStartTime 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++-- | This is your gateway\'s weekly maintenance start time including the day+-- and time of the week. Note that values are in terms of the gateway\'s+-- time zone. Can be weekly or monthly.+--+-- /See:/ 'newMaintenanceStartTime' smart constructor.+data MaintenanceStartTime = MaintenanceStartTime'+ { -- | The day of the month component of the maintenance start time represented+ -- as an ordinal number from 1 to 28, where 1 represents the first day of+ -- the month and 28 represents the last day of the month.+ dayOfMonth :: Prelude.Maybe Prelude.Natural,+ -- | An ordinal number between 0 and 6 that represents the day of the week,+ -- where 0 represents Sunday and 6 represents Saturday. The day of week is+ -- in the time zone of the gateway.+ dayOfWeek :: Prelude.Maybe Prelude.Natural,+ -- | The hour component of the maintenance start time represented as /hh/,+ -- where /hh/ is the hour (0 to 23). The hour of the day is in the time+ -- zone of the gateway.+ hourOfDay :: Prelude.Natural,+ -- | The minute component of the maintenance start time represented as /mm/,+ -- where /mm/ is the minute (0 to 59). The minute of the hour is in the+ -- time zone of the gateway.+ minuteOfHour :: Prelude.Natural+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MaintenanceStartTime' 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:+--+-- 'dayOfMonth', 'maintenanceStartTime_dayOfMonth' - The day of the month component of the maintenance start time represented+-- as an ordinal number from 1 to 28, where 1 represents the first day of+-- the month and 28 represents the last day of the month.+--+-- 'dayOfWeek', 'maintenanceStartTime_dayOfWeek' - An ordinal number between 0 and 6 that represents the day of the week,+-- where 0 represents Sunday and 6 represents Saturday. The day of week is+-- in the time zone of the gateway.+--+-- 'hourOfDay', 'maintenanceStartTime_hourOfDay' - The hour component of the maintenance start time represented as /hh/,+-- where /hh/ is the hour (0 to 23). The hour of the day is in the time+-- zone of the gateway.+--+-- 'minuteOfHour', 'maintenanceStartTime_minuteOfHour' - The minute component of the maintenance start time represented as /mm/,+-- where /mm/ is the minute (0 to 59). The minute of the hour is in the+-- time zone of the gateway.+newMaintenanceStartTime ::+ -- | 'hourOfDay'+ Prelude.Natural ->+ -- | 'minuteOfHour'+ Prelude.Natural ->+ MaintenanceStartTime+newMaintenanceStartTime pHourOfDay_ pMinuteOfHour_ =+ MaintenanceStartTime'+ { dayOfMonth = Prelude.Nothing,+ dayOfWeek = Prelude.Nothing,+ hourOfDay = pHourOfDay_,+ minuteOfHour = pMinuteOfHour_+ }++-- | The day of the month component of the maintenance start time represented+-- as an ordinal number from 1 to 28, where 1 represents the first day of+-- the month and 28 represents the last day of the month.+maintenanceStartTime_dayOfMonth :: Lens.Lens' MaintenanceStartTime (Prelude.Maybe Prelude.Natural)+maintenanceStartTime_dayOfMonth = Lens.lens (\MaintenanceStartTime' {dayOfMonth} -> dayOfMonth) (\s@MaintenanceStartTime' {} a -> s {dayOfMonth = a} :: MaintenanceStartTime)++-- | An ordinal number between 0 and 6 that represents the day of the week,+-- where 0 represents Sunday and 6 represents Saturday. The day of week is+-- in the time zone of the gateway.+maintenanceStartTime_dayOfWeek :: Lens.Lens' MaintenanceStartTime (Prelude.Maybe Prelude.Natural)+maintenanceStartTime_dayOfWeek = Lens.lens (\MaintenanceStartTime' {dayOfWeek} -> dayOfWeek) (\s@MaintenanceStartTime' {} a -> s {dayOfWeek = a} :: MaintenanceStartTime)++-- | The hour component of the maintenance start time represented as /hh/,+-- where /hh/ is the hour (0 to 23). The hour of the day is in the time+-- zone of the gateway.+maintenanceStartTime_hourOfDay :: Lens.Lens' MaintenanceStartTime Prelude.Natural+maintenanceStartTime_hourOfDay = Lens.lens (\MaintenanceStartTime' {hourOfDay} -> hourOfDay) (\s@MaintenanceStartTime' {} a -> s {hourOfDay = a} :: MaintenanceStartTime)++-- | The minute component of the maintenance start time represented as /mm/,+-- where /mm/ is the minute (0 to 59). The minute of the hour is in the+-- time zone of the gateway.+maintenanceStartTime_minuteOfHour :: Lens.Lens' MaintenanceStartTime Prelude.Natural+maintenanceStartTime_minuteOfHour = Lens.lens (\MaintenanceStartTime' {minuteOfHour} -> minuteOfHour) (\s@MaintenanceStartTime' {} a -> s {minuteOfHour = a} :: MaintenanceStartTime)++instance Data.FromJSON MaintenanceStartTime where+ parseJSON =+ Data.withObject+ "MaintenanceStartTime"+ ( \x ->+ MaintenanceStartTime'+ Prelude.<$> (x Data..:? "DayOfMonth")+ Prelude.<*> (x Data..:? "DayOfWeek")+ Prelude.<*> (x Data..: "HourOfDay")+ Prelude.<*> (x Data..: "MinuteOfHour")+ )++instance Prelude.Hashable MaintenanceStartTime where+ hashWithSalt _salt MaintenanceStartTime' {..} =+ _salt+ `Prelude.hashWithSalt` dayOfMonth+ `Prelude.hashWithSalt` dayOfWeek+ `Prelude.hashWithSalt` hourOfDay+ `Prelude.hashWithSalt` minuteOfHour++instance Prelude.NFData MaintenanceStartTime where+ rnf MaintenanceStartTime' {..} =+ Prelude.rnf dayOfMonth+ `Prelude.seq` Prelude.rnf dayOfWeek+ `Prelude.seq` Prelude.rnf hourOfDay+ `Prelude.seq` Prelude.rnf minuteOfHour
+ gen/Amazonka/BackupGateway/Types/SyncMetadataStatus.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.Types.SyncMetadataStatus+-- 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.BackupGateway.Types.SyncMetadataStatus+ ( SyncMetadataStatus+ ( ..,+ SyncMetadataStatus_CREATED,+ SyncMetadataStatus_FAILED,+ SyncMetadataStatus_PARTIALLY_FAILED,+ SyncMetadataStatus_RUNNING,+ SyncMetadataStatus_SUCCEEDED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype SyncMetadataStatus = SyncMetadataStatus'+ { fromSyncMetadataStatus ::+ 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 SyncMetadataStatus_CREATED :: SyncMetadataStatus+pattern SyncMetadataStatus_CREATED = SyncMetadataStatus' "CREATED"++pattern SyncMetadataStatus_FAILED :: SyncMetadataStatus+pattern SyncMetadataStatus_FAILED = SyncMetadataStatus' "FAILED"++pattern SyncMetadataStatus_PARTIALLY_FAILED :: SyncMetadataStatus+pattern SyncMetadataStatus_PARTIALLY_FAILED = SyncMetadataStatus' "PARTIALLY_FAILED"++pattern SyncMetadataStatus_RUNNING :: SyncMetadataStatus+pattern SyncMetadataStatus_RUNNING = SyncMetadataStatus' "RUNNING"++pattern SyncMetadataStatus_SUCCEEDED :: SyncMetadataStatus+pattern SyncMetadataStatus_SUCCEEDED = SyncMetadataStatus' "SUCCEEDED"++{-# COMPLETE+ SyncMetadataStatus_CREATED,+ SyncMetadataStatus_FAILED,+ SyncMetadataStatus_PARTIALLY_FAILED,+ SyncMetadataStatus_RUNNING,+ SyncMetadataStatus_SUCCEEDED,+ SyncMetadataStatus'+ #-}
+ gen/Amazonka/BackupGateway/Types/Tag.hs view
@@ -0,0 +1,98 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.Types.Tag+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.BackupGateway.Types.Tag where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A key-value pair you can use to manage, filter, and search for your+-- resources. Allowed characters include UTF-8 letters, numbers, spaces,+-- and the following characters: + - = . _ : \/.+--+-- /See:/ 'newTag' smart constructor.+data Tag = Tag'+ { -- | The key part of a tag\'s key-value pair. The key can\'t start with+ -- @aws:@.+ key :: Prelude.Text,+ -- | The value part of a tag\'s key-value pair.+ value :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Tag' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'key', 'tag_key' - The key part of a tag\'s key-value pair. The key can\'t start with+-- @aws:@.+--+-- 'value', 'tag_value' - The value part of a tag\'s key-value pair.+newTag ::+ -- | 'key'+ Prelude.Text ->+ -- | 'value'+ Prelude.Text ->+ Tag+newTag pKey_ pValue_ =+ Tag' {key = pKey_, value = pValue_}++-- | The key part of a tag\'s key-value pair. The key can\'t start with+-- @aws:@.+tag_key :: Lens.Lens' Tag Prelude.Text+tag_key = Lens.lens (\Tag' {key} -> key) (\s@Tag' {} a -> s {key = a} :: Tag)++-- | The value part of a tag\'s key-value pair.+tag_value :: Lens.Lens' Tag Prelude.Text+tag_value = Lens.lens (\Tag' {value} -> value) (\s@Tag' {} a -> s {value = a} :: Tag)++instance Data.FromJSON Tag where+ parseJSON =+ Data.withObject+ "Tag"+ ( \x ->+ Tag'+ Prelude.<$> (x Data..: "Key")+ Prelude.<*> (x Data..: "Value")+ )++instance Prelude.Hashable Tag where+ hashWithSalt _salt Tag' {..} =+ _salt+ `Prelude.hashWithSalt` key+ `Prelude.hashWithSalt` value++instance Prelude.NFData Tag where+ rnf Tag' {..} =+ Prelude.rnf key `Prelude.seq` Prelude.rnf value++instance Data.ToJSON Tag where+ toJSON Tag' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Key" Data..= key),+ Prelude.Just ("Value" Data..= value)+ ]+ )
+ gen/Amazonka/BackupGateway/Types/VirtualMachine.hs view
@@ -0,0 +1,138 @@+{-# 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.BackupGateway.Types.VirtualMachine+-- 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.BackupGateway.Types.VirtualMachine where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A virtual machine that is on a hypervisor.+--+-- /See:/ 'newVirtualMachine' smart constructor.+data VirtualMachine = VirtualMachine'+ { -- | The host name of the virtual machine.+ hostName :: Prelude.Maybe Prelude.Text,+ -- | The ID of the virtual machine\'s hypervisor.+ hypervisorId :: Prelude.Maybe Prelude.Text,+ -- | The most recent date a virtual machine was backed up, in Unix format and+ -- UTC time.+ lastBackupDate :: Prelude.Maybe Data.POSIX,+ -- | The name of the virtual machine.+ name :: Prelude.Maybe Prelude.Text,+ -- | The path of the virtual machine.+ path :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the virtual machine. For example,+ -- @arn:aws:backup-gateway:us-west-1:0000000000000:vm\/vm-0000ABCDEFGIJKL@.+ resourceArn :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VirtualMachine' 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:+--+-- 'hostName', 'virtualMachine_hostName' - The host name of the virtual machine.+--+-- 'hypervisorId', 'virtualMachine_hypervisorId' - The ID of the virtual machine\'s hypervisor.+--+-- 'lastBackupDate', 'virtualMachine_lastBackupDate' - The most recent date a virtual machine was backed up, in Unix format and+-- UTC time.+--+-- 'name', 'virtualMachine_name' - The name of the virtual machine.+--+-- 'path', 'virtualMachine_path' - The path of the virtual machine.+--+-- 'resourceArn', 'virtualMachine_resourceArn' - The Amazon Resource Name (ARN) of the virtual machine. For example,+-- @arn:aws:backup-gateway:us-west-1:0000000000000:vm\/vm-0000ABCDEFGIJKL@.+newVirtualMachine ::+ VirtualMachine+newVirtualMachine =+ VirtualMachine'+ { hostName = Prelude.Nothing,+ hypervisorId = Prelude.Nothing,+ lastBackupDate = Prelude.Nothing,+ name = Prelude.Nothing,+ path = Prelude.Nothing,+ resourceArn = Prelude.Nothing+ }++-- | The host name of the virtual machine.+virtualMachine_hostName :: Lens.Lens' VirtualMachine (Prelude.Maybe Prelude.Text)+virtualMachine_hostName = Lens.lens (\VirtualMachine' {hostName} -> hostName) (\s@VirtualMachine' {} a -> s {hostName = a} :: VirtualMachine)++-- | The ID of the virtual machine\'s hypervisor.+virtualMachine_hypervisorId :: Lens.Lens' VirtualMachine (Prelude.Maybe Prelude.Text)+virtualMachine_hypervisorId = Lens.lens (\VirtualMachine' {hypervisorId} -> hypervisorId) (\s@VirtualMachine' {} a -> s {hypervisorId = a} :: VirtualMachine)++-- | The most recent date a virtual machine was backed up, in Unix format and+-- UTC time.+virtualMachine_lastBackupDate :: Lens.Lens' VirtualMachine (Prelude.Maybe Prelude.UTCTime)+virtualMachine_lastBackupDate = Lens.lens (\VirtualMachine' {lastBackupDate} -> lastBackupDate) (\s@VirtualMachine' {} a -> s {lastBackupDate = a} :: VirtualMachine) Prelude.. Lens.mapping Data._Time++-- | The name of the virtual machine.+virtualMachine_name :: Lens.Lens' VirtualMachine (Prelude.Maybe Prelude.Text)+virtualMachine_name = Lens.lens (\VirtualMachine' {name} -> name) (\s@VirtualMachine' {} a -> s {name = a} :: VirtualMachine)++-- | The path of the virtual machine.+virtualMachine_path :: Lens.Lens' VirtualMachine (Prelude.Maybe Prelude.Text)+virtualMachine_path = Lens.lens (\VirtualMachine' {path} -> path) (\s@VirtualMachine' {} a -> s {path = a} :: VirtualMachine)++-- | The Amazon Resource Name (ARN) of the virtual machine. For example,+-- @arn:aws:backup-gateway:us-west-1:0000000000000:vm\/vm-0000ABCDEFGIJKL@.+virtualMachine_resourceArn :: Lens.Lens' VirtualMachine (Prelude.Maybe Prelude.Text)+virtualMachine_resourceArn = Lens.lens (\VirtualMachine' {resourceArn} -> resourceArn) (\s@VirtualMachine' {} a -> s {resourceArn = a} :: VirtualMachine)++instance Data.FromJSON VirtualMachine where+ parseJSON =+ Data.withObject+ "VirtualMachine"+ ( \x ->+ VirtualMachine'+ Prelude.<$> (x Data..:? "HostName")+ Prelude.<*> (x Data..:? "HypervisorId")+ Prelude.<*> (x Data..:? "LastBackupDate")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "Path")+ Prelude.<*> (x Data..:? "ResourceArn")+ )++instance Prelude.Hashable VirtualMachine where+ hashWithSalt _salt VirtualMachine' {..} =+ _salt+ `Prelude.hashWithSalt` hostName+ `Prelude.hashWithSalt` hypervisorId+ `Prelude.hashWithSalt` lastBackupDate+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` path+ `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData VirtualMachine where+ rnf VirtualMachine' {..} =+ Prelude.rnf hostName+ `Prelude.seq` Prelude.rnf hypervisorId+ `Prelude.seq` Prelude.rnf lastBackupDate+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf path+ `Prelude.seq` Prelude.rnf resourceArn
+ gen/Amazonka/BackupGateway/Types/VirtualMachineDetails.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.Types.VirtualMachineDetails+-- 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.BackupGateway.Types.VirtualMachineDetails where++import Amazonka.BackupGateway.Types.VmwareTag+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++-- | Your @VirtualMachine@ objects, ordered by their Amazon Resource Names+-- (ARNs).+--+-- /See:/ 'newVirtualMachineDetails' smart constructor.+data VirtualMachineDetails = VirtualMachineDetails'+ { -- | The host name of the virtual machine.+ hostName :: Prelude.Maybe Prelude.Text,+ -- | The ID of the virtual machine\'s hypervisor.+ hypervisorId :: Prelude.Maybe Prelude.Text,+ -- | The most recent date a virtual machine was backed up, in Unix format and+ -- UTC time.+ lastBackupDate :: Prelude.Maybe Data.POSIX,+ -- | The name of the virtual machine.+ name :: Prelude.Maybe Prelude.Text,+ -- | The path of the virtual machine.+ path :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the virtual machine. For example,+ -- @arn:aws:backup-gateway:us-west-1:0000000000000:vm\/vm-0000ABCDEFGIJKL@.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | These are the details of the VMware tags associated with the specified+ -- virtual machine.+ vmwareTags :: Prelude.Maybe [VmwareTag]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VirtualMachineDetails' 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:+--+-- 'hostName', 'virtualMachineDetails_hostName' - The host name of the virtual machine.+--+-- 'hypervisorId', 'virtualMachineDetails_hypervisorId' - The ID of the virtual machine\'s hypervisor.+--+-- 'lastBackupDate', 'virtualMachineDetails_lastBackupDate' - The most recent date a virtual machine was backed up, in Unix format and+-- UTC time.+--+-- 'name', 'virtualMachineDetails_name' - The name of the virtual machine.+--+-- 'path', 'virtualMachineDetails_path' - The path of the virtual machine.+--+-- 'resourceArn', 'virtualMachineDetails_resourceArn' - The Amazon Resource Name (ARN) of the virtual machine. For example,+-- @arn:aws:backup-gateway:us-west-1:0000000000000:vm\/vm-0000ABCDEFGIJKL@.+--+-- 'vmwareTags', 'virtualMachineDetails_vmwareTags' - These are the details of the VMware tags associated with the specified+-- virtual machine.+newVirtualMachineDetails ::+ VirtualMachineDetails+newVirtualMachineDetails =+ VirtualMachineDetails'+ { hostName = Prelude.Nothing,+ hypervisorId = Prelude.Nothing,+ lastBackupDate = Prelude.Nothing,+ name = Prelude.Nothing,+ path = Prelude.Nothing,+ resourceArn = Prelude.Nothing,+ vmwareTags = Prelude.Nothing+ }++-- | The host name of the virtual machine.+virtualMachineDetails_hostName :: Lens.Lens' VirtualMachineDetails (Prelude.Maybe Prelude.Text)+virtualMachineDetails_hostName = Lens.lens (\VirtualMachineDetails' {hostName} -> hostName) (\s@VirtualMachineDetails' {} a -> s {hostName = a} :: VirtualMachineDetails)++-- | The ID of the virtual machine\'s hypervisor.+virtualMachineDetails_hypervisorId :: Lens.Lens' VirtualMachineDetails (Prelude.Maybe Prelude.Text)+virtualMachineDetails_hypervisorId = Lens.lens (\VirtualMachineDetails' {hypervisorId} -> hypervisorId) (\s@VirtualMachineDetails' {} a -> s {hypervisorId = a} :: VirtualMachineDetails)++-- | The most recent date a virtual machine was backed up, in Unix format and+-- UTC time.+virtualMachineDetails_lastBackupDate :: Lens.Lens' VirtualMachineDetails (Prelude.Maybe Prelude.UTCTime)+virtualMachineDetails_lastBackupDate = Lens.lens (\VirtualMachineDetails' {lastBackupDate} -> lastBackupDate) (\s@VirtualMachineDetails' {} a -> s {lastBackupDate = a} :: VirtualMachineDetails) Prelude.. Lens.mapping Data._Time++-- | The name of the virtual machine.+virtualMachineDetails_name :: Lens.Lens' VirtualMachineDetails (Prelude.Maybe Prelude.Text)+virtualMachineDetails_name = Lens.lens (\VirtualMachineDetails' {name} -> name) (\s@VirtualMachineDetails' {} a -> s {name = a} :: VirtualMachineDetails)++-- | The path of the virtual machine.+virtualMachineDetails_path :: Lens.Lens' VirtualMachineDetails (Prelude.Maybe Prelude.Text)+virtualMachineDetails_path = Lens.lens (\VirtualMachineDetails' {path} -> path) (\s@VirtualMachineDetails' {} a -> s {path = a} :: VirtualMachineDetails)++-- | The Amazon Resource Name (ARN) of the virtual machine. For example,+-- @arn:aws:backup-gateway:us-west-1:0000000000000:vm\/vm-0000ABCDEFGIJKL@.+virtualMachineDetails_resourceArn :: Lens.Lens' VirtualMachineDetails (Prelude.Maybe Prelude.Text)+virtualMachineDetails_resourceArn = Lens.lens (\VirtualMachineDetails' {resourceArn} -> resourceArn) (\s@VirtualMachineDetails' {} a -> s {resourceArn = a} :: VirtualMachineDetails)++-- | These are the details of the VMware tags associated with the specified+-- virtual machine.+virtualMachineDetails_vmwareTags :: Lens.Lens' VirtualMachineDetails (Prelude.Maybe [VmwareTag])+virtualMachineDetails_vmwareTags = Lens.lens (\VirtualMachineDetails' {vmwareTags} -> vmwareTags) (\s@VirtualMachineDetails' {} a -> s {vmwareTags = a} :: VirtualMachineDetails) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON VirtualMachineDetails where+ parseJSON =+ Data.withObject+ "VirtualMachineDetails"+ ( \x ->+ VirtualMachineDetails'+ Prelude.<$> (x Data..:? "HostName")+ Prelude.<*> (x Data..:? "HypervisorId")+ Prelude.<*> (x Data..:? "LastBackupDate")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "Path")+ Prelude.<*> (x Data..:? "ResourceArn")+ Prelude.<*> (x Data..:? "VmwareTags" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable VirtualMachineDetails where+ hashWithSalt _salt VirtualMachineDetails' {..} =+ _salt+ `Prelude.hashWithSalt` hostName+ `Prelude.hashWithSalt` hypervisorId+ `Prelude.hashWithSalt` lastBackupDate+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` path+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` vmwareTags++instance Prelude.NFData VirtualMachineDetails where+ rnf VirtualMachineDetails' {..} =+ Prelude.rnf hostName+ `Prelude.seq` Prelude.rnf hypervisorId+ `Prelude.seq` Prelude.rnf lastBackupDate+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf path+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf vmwareTags
+ gen/Amazonka/BackupGateway/Types/VmwareTag.hs view
@@ -0,0 +1,101 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.Types.VmwareTag+-- 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.BackupGateway.Types.VmwareTag where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A VMware tag is a tag attached to a specific virtual machine. A+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BGW_Tag.html tag>+-- is a key-value pair you can use to manage, filter, and search for your+-- resources.+--+-- The content of VMware tags can be matched to Amazon Web Services tags.+--+-- /See:/ 'newVmwareTag' smart constructor.+data VmwareTag = VmwareTag'+ { -- | The is the category of VMware.+ vmwareCategory :: Prelude.Maybe Prelude.Text,+ -- | This is a user-defined description of a VMware tag.+ vmwareTagDescription :: Prelude.Maybe Prelude.Text,+ -- | This is the user-defined name of a VMware tag.+ vmwareTagName :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VmwareTag' 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:+--+-- 'vmwareCategory', 'vmwareTag_vmwareCategory' - The is the category of VMware.+--+-- 'vmwareTagDescription', 'vmwareTag_vmwareTagDescription' - This is a user-defined description of a VMware tag.+--+-- 'vmwareTagName', 'vmwareTag_vmwareTagName' - This is the user-defined name of a VMware tag.+newVmwareTag ::+ VmwareTag+newVmwareTag =+ VmwareTag'+ { vmwareCategory = Prelude.Nothing,+ vmwareTagDescription = Prelude.Nothing,+ vmwareTagName = Prelude.Nothing+ }++-- | The is the category of VMware.+vmwareTag_vmwareCategory :: Lens.Lens' VmwareTag (Prelude.Maybe Prelude.Text)+vmwareTag_vmwareCategory = Lens.lens (\VmwareTag' {vmwareCategory} -> vmwareCategory) (\s@VmwareTag' {} a -> s {vmwareCategory = a} :: VmwareTag)++-- | This is a user-defined description of a VMware tag.+vmwareTag_vmwareTagDescription :: Lens.Lens' VmwareTag (Prelude.Maybe Prelude.Text)+vmwareTag_vmwareTagDescription = Lens.lens (\VmwareTag' {vmwareTagDescription} -> vmwareTagDescription) (\s@VmwareTag' {} a -> s {vmwareTagDescription = a} :: VmwareTag)++-- | This is the user-defined name of a VMware tag.+vmwareTag_vmwareTagName :: Lens.Lens' VmwareTag (Prelude.Maybe Prelude.Text)+vmwareTag_vmwareTagName = Lens.lens (\VmwareTag' {vmwareTagName} -> vmwareTagName) (\s@VmwareTag' {} a -> s {vmwareTagName = a} :: VmwareTag)++instance Data.FromJSON VmwareTag where+ parseJSON =+ Data.withObject+ "VmwareTag"+ ( \x ->+ VmwareTag'+ Prelude.<$> (x Data..:? "VmwareCategory")+ Prelude.<*> (x Data..:? "VmwareTagDescription")+ Prelude.<*> (x Data..:? "VmwareTagName")+ )++instance Prelude.Hashable VmwareTag where+ hashWithSalt _salt VmwareTag' {..} =+ _salt+ `Prelude.hashWithSalt` vmwareCategory+ `Prelude.hashWithSalt` vmwareTagDescription+ `Prelude.hashWithSalt` vmwareTagName++instance Prelude.NFData VmwareTag where+ rnf VmwareTag' {..} =+ Prelude.rnf vmwareCategory+ `Prelude.seq` Prelude.rnf vmwareTagDescription+ `Prelude.seq` Prelude.rnf vmwareTagName
+ gen/Amazonka/BackupGateway/Types/VmwareToAwsTagMapping.hs view
@@ -0,0 +1,134 @@+{-# 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.BackupGateway.Types.VmwareToAwsTagMapping+-- 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.BackupGateway.Types.VmwareToAwsTagMapping 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++-- | This displays the mapping of on-premises VMware tags to the+-- corresponding Amazon Web Services tags.+--+-- /See:/ 'newVmwareToAwsTagMapping' smart constructor.+data VmwareToAwsTagMapping = VmwareToAwsTagMapping'+ { -- | The key part of the Amazon Web Services tag\'s key-value pair.+ awsTagKey :: Prelude.Text,+ -- | The value part of the Amazon Web Services tag\'s key-value pair.+ awsTagValue :: Prelude.Text,+ -- | The is the category of VMware.+ vmwareCategory :: Prelude.Text,+ -- | This is the user-defined name of a VMware tag.+ vmwareTagName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VmwareToAwsTagMapping' 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:+--+-- 'awsTagKey', 'vmwareToAwsTagMapping_awsTagKey' - The key part of the Amazon Web Services tag\'s key-value pair.+--+-- 'awsTagValue', 'vmwareToAwsTagMapping_awsTagValue' - The value part of the Amazon Web Services tag\'s key-value pair.+--+-- 'vmwareCategory', 'vmwareToAwsTagMapping_vmwareCategory' - The is the category of VMware.+--+-- 'vmwareTagName', 'vmwareToAwsTagMapping_vmwareTagName' - This is the user-defined name of a VMware tag.+newVmwareToAwsTagMapping ::+ -- | 'awsTagKey'+ Prelude.Text ->+ -- | 'awsTagValue'+ Prelude.Text ->+ -- | 'vmwareCategory'+ Prelude.Text ->+ -- | 'vmwareTagName'+ Prelude.Text ->+ VmwareToAwsTagMapping+newVmwareToAwsTagMapping+ pAwsTagKey_+ pAwsTagValue_+ pVmwareCategory_+ pVmwareTagName_ =+ VmwareToAwsTagMapping'+ { awsTagKey = pAwsTagKey_,+ awsTagValue = pAwsTagValue_,+ vmwareCategory = pVmwareCategory_,+ vmwareTagName = pVmwareTagName_+ }++-- | The key part of the Amazon Web Services tag\'s key-value pair.+vmwareToAwsTagMapping_awsTagKey :: Lens.Lens' VmwareToAwsTagMapping Prelude.Text+vmwareToAwsTagMapping_awsTagKey = Lens.lens (\VmwareToAwsTagMapping' {awsTagKey} -> awsTagKey) (\s@VmwareToAwsTagMapping' {} a -> s {awsTagKey = a} :: VmwareToAwsTagMapping)++-- | The value part of the Amazon Web Services tag\'s key-value pair.+vmwareToAwsTagMapping_awsTagValue :: Lens.Lens' VmwareToAwsTagMapping Prelude.Text+vmwareToAwsTagMapping_awsTagValue = Lens.lens (\VmwareToAwsTagMapping' {awsTagValue} -> awsTagValue) (\s@VmwareToAwsTagMapping' {} a -> s {awsTagValue = a} :: VmwareToAwsTagMapping)++-- | The is the category of VMware.+vmwareToAwsTagMapping_vmwareCategory :: Lens.Lens' VmwareToAwsTagMapping Prelude.Text+vmwareToAwsTagMapping_vmwareCategory = Lens.lens (\VmwareToAwsTagMapping' {vmwareCategory} -> vmwareCategory) (\s@VmwareToAwsTagMapping' {} a -> s {vmwareCategory = a} :: VmwareToAwsTagMapping)++-- | This is the user-defined name of a VMware tag.+vmwareToAwsTagMapping_vmwareTagName :: Lens.Lens' VmwareToAwsTagMapping Prelude.Text+vmwareToAwsTagMapping_vmwareTagName = Lens.lens (\VmwareToAwsTagMapping' {vmwareTagName} -> vmwareTagName) (\s@VmwareToAwsTagMapping' {} a -> s {vmwareTagName = a} :: VmwareToAwsTagMapping)++instance Data.FromJSON VmwareToAwsTagMapping where+ parseJSON =+ Data.withObject+ "VmwareToAwsTagMapping"+ ( \x ->+ VmwareToAwsTagMapping'+ Prelude.<$> (x Data..: "AwsTagKey")+ Prelude.<*> (x Data..: "AwsTagValue")+ Prelude.<*> (x Data..: "VmwareCategory")+ Prelude.<*> (x Data..: "VmwareTagName")+ )++instance Prelude.Hashable VmwareToAwsTagMapping where+ hashWithSalt _salt VmwareToAwsTagMapping' {..} =+ _salt+ `Prelude.hashWithSalt` awsTagKey+ `Prelude.hashWithSalt` awsTagValue+ `Prelude.hashWithSalt` vmwareCategory+ `Prelude.hashWithSalt` vmwareTagName++instance Prelude.NFData VmwareToAwsTagMapping where+ rnf VmwareToAwsTagMapping' {..} =+ Prelude.rnf awsTagKey+ `Prelude.seq` Prelude.rnf awsTagValue+ `Prelude.seq` Prelude.rnf vmwareCategory+ `Prelude.seq` Prelude.rnf vmwareTagName++instance Data.ToJSON VmwareToAwsTagMapping where+ toJSON VmwareToAwsTagMapping' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("AwsTagKey" Data..= awsTagKey),+ Prelude.Just ("AwsTagValue" Data..= awsTagValue),+ Prelude.Just+ ("VmwareCategory" Data..= vmwareCategory),+ Prelude.Just+ ("VmwareTagName" Data..= vmwareTagName)+ ]+ )
+ gen/Amazonka/BackupGateway/UntagResource.hs view
@@ -0,0 +1,192 @@+{-# 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.BackupGateway.UntagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes tags from the resource.+module Amazonka.BackupGateway.UntagResource+ ( -- * Creating a Request+ UntagResource (..),+ newUntagResource,++ -- * Request Lenses+ untagResource_resourceARN,+ untagResource_tagKeys,++ -- * Destructuring the Response+ UntagResourceResponse (..),+ newUntagResourceResponse,++ -- * Response Lenses+ untagResourceResponse_resourceARN,+ untagResourceResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+ { -- | The Amazon Resource Name (ARN) of the resource from which to remove+ -- tags.+ resourceARN :: Prelude.Text,+ -- | The list of tag keys specifying which tags to remove.+ tagKeys :: [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceARN', 'untagResource_resourceARN' - The Amazon Resource Name (ARN) of the resource from which to remove+-- tags.+--+-- 'tagKeys', 'untagResource_tagKeys' - The list of tag keys specifying which tags to remove.+newUntagResource ::+ -- | 'resourceARN'+ Prelude.Text ->+ UntagResource+newUntagResource pResourceARN_ =+ UntagResource'+ { resourceARN = pResourceARN_,+ tagKeys = Prelude.mempty+ }++-- | The Amazon Resource Name (ARN) of the resource from which to remove+-- tags.+untagResource_resourceARN :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceARN = Lens.lens (\UntagResource' {resourceARN} -> resourceARN) (\s@UntagResource' {} a -> s {resourceARN = a} :: UntagResource)++-- | The list of tag keys specifying which tags to remove.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+ type+ AWSResponse UntagResource =+ UntagResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UntagResourceResponse'+ Prelude.<$> (x Data..?> "ResourceARN")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UntagResource where+ hashWithSalt _salt UntagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceARN+ `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+ rnf UntagResource' {..} =+ Prelude.rnf resourceARN+ `Prelude.seq` Prelude.rnf tagKeys++instance Data.ToHeaders UntagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.UntagResource" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UntagResource where+ toJSON UntagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("ResourceARN" Data..= resourceARN),+ Prelude.Just ("TagKeys" Data..= tagKeys)+ ]+ )++instance Data.ToPath UntagResource where+ toPath = Prelude.const "/"++instance Data.ToQuery UntagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+ { -- | The Amazon Resource Name (ARN) of the resource from which you removed+ -- tags.+ resourceARN :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceARN', 'untagResourceResponse_resourceARN' - The Amazon Resource Name (ARN) of the resource from which you removed+-- tags.+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+ UntagResourceResponse'+ { resourceARN =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the resource from which you removed+-- tags.+untagResourceResponse_resourceARN :: Lens.Lens' UntagResourceResponse (Prelude.Maybe Prelude.Text)+untagResourceResponse_resourceARN = Lens.lens (\UntagResourceResponse' {resourceARN} -> resourceARN) (\s@UntagResourceResponse' {} a -> s {resourceARN = a} :: UntagResourceResponse)++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+ rnf UntagResourceResponse' {..} =+ Prelude.rnf resourceARN+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/UpdateGatewayInformation.hs view
@@ -0,0 +1,192 @@+{-# 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.BackupGateway.UpdateGatewayInformation+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a gateway\'s name. Specify which gateway to update using the+-- Amazon Resource Name (ARN) of the gateway in your request.+module Amazonka.BackupGateway.UpdateGatewayInformation+ ( -- * Creating a Request+ UpdateGatewayInformation (..),+ newUpdateGatewayInformation,++ -- * Request Lenses+ updateGatewayInformation_gatewayDisplayName,+ updateGatewayInformation_gatewayArn,++ -- * Destructuring the Response+ UpdateGatewayInformationResponse (..),+ newUpdateGatewayInformationResponse,++ -- * Response Lenses+ updateGatewayInformationResponse_gatewayArn,+ updateGatewayInformationResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newUpdateGatewayInformation' smart constructor.+data UpdateGatewayInformation = UpdateGatewayInformation'+ { -- | The updated display name of the gateway.+ gatewayDisplayName :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the gateway to update.+ gatewayArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateGatewayInformation' 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:+--+-- 'gatewayDisplayName', 'updateGatewayInformation_gatewayDisplayName' - The updated display name of the gateway.+--+-- 'gatewayArn', 'updateGatewayInformation_gatewayArn' - The Amazon Resource Name (ARN) of the gateway to update.+newUpdateGatewayInformation ::+ -- | 'gatewayArn'+ Prelude.Text ->+ UpdateGatewayInformation+newUpdateGatewayInformation pGatewayArn_ =+ UpdateGatewayInformation'+ { gatewayDisplayName =+ Prelude.Nothing,+ gatewayArn = pGatewayArn_+ }++-- | The updated display name of the gateway.+updateGatewayInformation_gatewayDisplayName :: Lens.Lens' UpdateGatewayInformation (Prelude.Maybe Prelude.Text)+updateGatewayInformation_gatewayDisplayName = Lens.lens (\UpdateGatewayInformation' {gatewayDisplayName} -> gatewayDisplayName) (\s@UpdateGatewayInformation' {} a -> s {gatewayDisplayName = a} :: UpdateGatewayInformation)++-- | The Amazon Resource Name (ARN) of the gateway to update.+updateGatewayInformation_gatewayArn :: Lens.Lens' UpdateGatewayInformation Prelude.Text+updateGatewayInformation_gatewayArn = Lens.lens (\UpdateGatewayInformation' {gatewayArn} -> gatewayArn) (\s@UpdateGatewayInformation' {} a -> s {gatewayArn = a} :: UpdateGatewayInformation)++instance Core.AWSRequest UpdateGatewayInformation where+ type+ AWSResponse UpdateGatewayInformation =+ UpdateGatewayInformationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateGatewayInformationResponse'+ Prelude.<$> (x Data..?> "GatewayArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateGatewayInformation where+ hashWithSalt _salt UpdateGatewayInformation' {..} =+ _salt+ `Prelude.hashWithSalt` gatewayDisplayName+ `Prelude.hashWithSalt` gatewayArn++instance Prelude.NFData UpdateGatewayInformation where+ rnf UpdateGatewayInformation' {..} =+ Prelude.rnf gatewayDisplayName+ `Prelude.seq` Prelude.rnf gatewayArn++instance Data.ToHeaders UpdateGatewayInformation where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.UpdateGatewayInformation" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateGatewayInformation where+ toJSON UpdateGatewayInformation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("GatewayDisplayName" Data..=)+ Prelude.<$> gatewayDisplayName,+ Prelude.Just ("GatewayArn" Data..= gatewayArn)+ ]+ )++instance Data.ToPath UpdateGatewayInformation where+ toPath = Prelude.const "/"++instance Data.ToQuery UpdateGatewayInformation where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateGatewayInformationResponse' smart constructor.+data UpdateGatewayInformationResponse = UpdateGatewayInformationResponse'+ { -- | The Amazon Resource Name (ARN) of the gateway you updated.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateGatewayInformationResponse' 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:+--+-- 'gatewayArn', 'updateGatewayInformationResponse_gatewayArn' - The Amazon Resource Name (ARN) of the gateway you updated.+--+-- 'httpStatus', 'updateGatewayInformationResponse_httpStatus' - The response's http status code.+newUpdateGatewayInformationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateGatewayInformationResponse+newUpdateGatewayInformationResponse pHttpStatus_ =+ UpdateGatewayInformationResponse'+ { gatewayArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the gateway you updated.+updateGatewayInformationResponse_gatewayArn :: Lens.Lens' UpdateGatewayInformationResponse (Prelude.Maybe Prelude.Text)+updateGatewayInformationResponse_gatewayArn = Lens.lens (\UpdateGatewayInformationResponse' {gatewayArn} -> gatewayArn) (\s@UpdateGatewayInformationResponse' {} a -> s {gatewayArn = a} :: UpdateGatewayInformationResponse)++-- | The response's http status code.+updateGatewayInformationResponse_httpStatus :: Lens.Lens' UpdateGatewayInformationResponse Prelude.Int+updateGatewayInformationResponse_httpStatus = Lens.lens (\UpdateGatewayInformationResponse' {httpStatus} -> httpStatus) (\s@UpdateGatewayInformationResponse' {} a -> s {httpStatus = a} :: UpdateGatewayInformationResponse)++instance+ Prelude.NFData+ UpdateGatewayInformationResponse+ where+ rnf UpdateGatewayInformationResponse' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/UpdateGatewaySoftwareNow.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.BackupGateway.UpdateGatewaySoftwareNow+-- 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 gateway virtual machine (VM) software. The request+-- immediately triggers the software update.+--+-- When you make this request, you get a @200 OK@ success response+-- immediately. However, it might take some time for the update to+-- complete.+module Amazonka.BackupGateway.UpdateGatewaySoftwareNow+ ( -- * Creating a Request+ UpdateGatewaySoftwareNow (..),+ newUpdateGatewaySoftwareNow,++ -- * Request Lenses+ updateGatewaySoftwareNow_gatewayArn,++ -- * Destructuring the Response+ UpdateGatewaySoftwareNowResponse (..),+ newUpdateGatewaySoftwareNowResponse,++ -- * Response Lenses+ updateGatewaySoftwareNowResponse_gatewayArn,+ updateGatewaySoftwareNowResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newUpdateGatewaySoftwareNow' smart constructor.+data UpdateGatewaySoftwareNow = UpdateGatewaySoftwareNow'+ { -- | The Amazon Resource Name (ARN) of the gateway to be updated.+ gatewayArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateGatewaySoftwareNow' 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:+--+-- 'gatewayArn', 'updateGatewaySoftwareNow_gatewayArn' - The Amazon Resource Name (ARN) of the gateway to be updated.+newUpdateGatewaySoftwareNow ::+ -- | 'gatewayArn'+ Prelude.Text ->+ UpdateGatewaySoftwareNow+newUpdateGatewaySoftwareNow pGatewayArn_ =+ UpdateGatewaySoftwareNow'+ { gatewayArn =+ pGatewayArn_+ }++-- | The Amazon Resource Name (ARN) of the gateway to be updated.+updateGatewaySoftwareNow_gatewayArn :: Lens.Lens' UpdateGatewaySoftwareNow Prelude.Text+updateGatewaySoftwareNow_gatewayArn = Lens.lens (\UpdateGatewaySoftwareNow' {gatewayArn} -> gatewayArn) (\s@UpdateGatewaySoftwareNow' {} a -> s {gatewayArn = a} :: UpdateGatewaySoftwareNow)++instance Core.AWSRequest UpdateGatewaySoftwareNow where+ type+ AWSResponse UpdateGatewaySoftwareNow =+ UpdateGatewaySoftwareNowResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateGatewaySoftwareNowResponse'+ Prelude.<$> (x Data..?> "GatewayArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateGatewaySoftwareNow where+ hashWithSalt _salt UpdateGatewaySoftwareNow' {..} =+ _salt `Prelude.hashWithSalt` gatewayArn++instance Prelude.NFData UpdateGatewaySoftwareNow where+ rnf UpdateGatewaySoftwareNow' {..} =+ Prelude.rnf gatewayArn++instance Data.ToHeaders UpdateGatewaySoftwareNow where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.UpdateGatewaySoftwareNow" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateGatewaySoftwareNow where+ toJSON UpdateGatewaySoftwareNow' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GatewayArn" Data..= gatewayArn)]+ )++instance Data.ToPath UpdateGatewaySoftwareNow where+ toPath = Prelude.const "/"++instance Data.ToQuery UpdateGatewaySoftwareNow where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateGatewaySoftwareNowResponse' smart constructor.+data UpdateGatewaySoftwareNowResponse = UpdateGatewaySoftwareNowResponse'+ { -- | The Amazon Resource Name (ARN) of the gateway you updated.+ gatewayArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateGatewaySoftwareNowResponse' 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:+--+-- 'gatewayArn', 'updateGatewaySoftwareNowResponse_gatewayArn' - The Amazon Resource Name (ARN) of the gateway you updated.+--+-- 'httpStatus', 'updateGatewaySoftwareNowResponse_httpStatus' - The response's http status code.+newUpdateGatewaySoftwareNowResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateGatewaySoftwareNowResponse+newUpdateGatewaySoftwareNowResponse pHttpStatus_ =+ UpdateGatewaySoftwareNowResponse'+ { gatewayArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the gateway you updated.+updateGatewaySoftwareNowResponse_gatewayArn :: Lens.Lens' UpdateGatewaySoftwareNowResponse (Prelude.Maybe Prelude.Text)+updateGatewaySoftwareNowResponse_gatewayArn = Lens.lens (\UpdateGatewaySoftwareNowResponse' {gatewayArn} -> gatewayArn) (\s@UpdateGatewaySoftwareNowResponse' {} a -> s {gatewayArn = a} :: UpdateGatewaySoftwareNowResponse)++-- | The response's http status code.+updateGatewaySoftwareNowResponse_httpStatus :: Lens.Lens' UpdateGatewaySoftwareNowResponse Prelude.Int+updateGatewaySoftwareNowResponse_httpStatus = Lens.lens (\UpdateGatewaySoftwareNowResponse' {httpStatus} -> httpStatus) (\s@UpdateGatewaySoftwareNowResponse' {} a -> s {httpStatus = a} :: UpdateGatewaySoftwareNowResponse)++instance+ Prelude.NFData+ UpdateGatewaySoftwareNowResponse+ where+ rnf UpdateGatewaySoftwareNowResponse' {..} =+ Prelude.rnf gatewayArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/UpdateHypervisor.hs view
@@ -0,0 +1,247 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.UpdateHypervisor+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a hypervisor metadata, including its host, username, and+-- password. Specify which hypervisor to update using the Amazon Resource+-- Name (ARN) of the hypervisor in your request.+module Amazonka.BackupGateway.UpdateHypervisor+ ( -- * Creating a Request+ UpdateHypervisor (..),+ newUpdateHypervisor,++ -- * Request Lenses+ updateHypervisor_host,+ updateHypervisor_logGroupArn,+ updateHypervisor_name,+ updateHypervisor_password,+ updateHypervisor_username,+ updateHypervisor_hypervisorArn,++ -- * Destructuring the Response+ UpdateHypervisorResponse (..),+ newUpdateHypervisorResponse,++ -- * Response Lenses+ updateHypervisorResponse_hypervisorArn,+ updateHypervisorResponse_httpStatus,+ )+where++import Amazonka.BackupGateway.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:/ 'newUpdateHypervisor' smart constructor.+data UpdateHypervisor = UpdateHypervisor'+ { -- | The updated host of the hypervisor. This can be either an IP address or+ -- a fully-qualified domain name (FQDN).+ host :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the group of gateways within the+ -- requested log.+ logGroupArn :: Prelude.Maybe Prelude.Text,+ -- | The updated name for the hypervisor+ name :: Prelude.Maybe Prelude.Text,+ -- | The updated password for the hypervisor.+ password :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | The updated username for the hypervisor.+ username :: Prelude.Maybe (Data.Sensitive Prelude.Text),+ -- | The Amazon Resource Name (ARN) of the hypervisor to update.+ hypervisorArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateHypervisor' 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:+--+-- 'host', 'updateHypervisor_host' - The updated host of the hypervisor. This can be either an IP address or+-- a fully-qualified domain name (FQDN).+--+-- 'logGroupArn', 'updateHypervisor_logGroupArn' - The Amazon Resource Name (ARN) of the group of gateways within the+-- requested log.+--+-- 'name', 'updateHypervisor_name' - The updated name for the hypervisor+--+-- 'password', 'updateHypervisor_password' - The updated password for the hypervisor.+--+-- 'username', 'updateHypervisor_username' - The updated username for the hypervisor.+--+-- 'hypervisorArn', 'updateHypervisor_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor to update.+newUpdateHypervisor ::+ -- | 'hypervisorArn'+ Prelude.Text ->+ UpdateHypervisor+newUpdateHypervisor pHypervisorArn_ =+ UpdateHypervisor'+ { host = Prelude.Nothing,+ logGroupArn = Prelude.Nothing,+ name = Prelude.Nothing,+ password = Prelude.Nothing,+ username = Prelude.Nothing,+ hypervisorArn = pHypervisorArn_+ }++-- | The updated host of the hypervisor. This can be either an IP address or+-- a fully-qualified domain name (FQDN).+updateHypervisor_host :: Lens.Lens' UpdateHypervisor (Prelude.Maybe Prelude.Text)+updateHypervisor_host = Lens.lens (\UpdateHypervisor' {host} -> host) (\s@UpdateHypervisor' {} a -> s {host = a} :: UpdateHypervisor)++-- | The Amazon Resource Name (ARN) of the group of gateways within the+-- requested log.+updateHypervisor_logGroupArn :: Lens.Lens' UpdateHypervisor (Prelude.Maybe Prelude.Text)+updateHypervisor_logGroupArn = Lens.lens (\UpdateHypervisor' {logGroupArn} -> logGroupArn) (\s@UpdateHypervisor' {} a -> s {logGroupArn = a} :: UpdateHypervisor)++-- | The updated name for the hypervisor+updateHypervisor_name :: Lens.Lens' UpdateHypervisor (Prelude.Maybe Prelude.Text)+updateHypervisor_name = Lens.lens (\UpdateHypervisor' {name} -> name) (\s@UpdateHypervisor' {} a -> s {name = a} :: UpdateHypervisor)++-- | The updated password for the hypervisor.+updateHypervisor_password :: Lens.Lens' UpdateHypervisor (Prelude.Maybe Prelude.Text)+updateHypervisor_password = Lens.lens (\UpdateHypervisor' {password} -> password) (\s@UpdateHypervisor' {} a -> s {password = a} :: UpdateHypervisor) Prelude.. Lens.mapping Data._Sensitive++-- | The updated username for the hypervisor.+updateHypervisor_username :: Lens.Lens' UpdateHypervisor (Prelude.Maybe Prelude.Text)+updateHypervisor_username = Lens.lens (\UpdateHypervisor' {username} -> username) (\s@UpdateHypervisor' {} a -> s {username = a} :: UpdateHypervisor) Prelude.. Lens.mapping Data._Sensitive++-- | The Amazon Resource Name (ARN) of the hypervisor to update.+updateHypervisor_hypervisorArn :: Lens.Lens' UpdateHypervisor Prelude.Text+updateHypervisor_hypervisorArn = Lens.lens (\UpdateHypervisor' {hypervisorArn} -> hypervisorArn) (\s@UpdateHypervisor' {} a -> s {hypervisorArn = a} :: UpdateHypervisor)++instance Core.AWSRequest UpdateHypervisor where+ type+ AWSResponse UpdateHypervisor =+ UpdateHypervisorResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateHypervisorResponse'+ Prelude.<$> (x Data..?> "HypervisorArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateHypervisor where+ hashWithSalt _salt UpdateHypervisor' {..} =+ _salt+ `Prelude.hashWithSalt` host+ `Prelude.hashWithSalt` logGroupArn+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` password+ `Prelude.hashWithSalt` username+ `Prelude.hashWithSalt` hypervisorArn++instance Prelude.NFData UpdateHypervisor where+ rnf UpdateHypervisor' {..} =+ Prelude.rnf host+ `Prelude.seq` Prelude.rnf logGroupArn+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf password+ `Prelude.seq` Prelude.rnf username+ `Prelude.seq` Prelude.rnf hypervisorArn++instance Data.ToHeaders UpdateHypervisor where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "X-Amz-Target"+ Data.=# ( "BackupOnPremises_v20210101.UpdateHypervisor" ::+ Prelude.ByteString+ ),+ "Content-Type"+ Data.=# ( "application/x-amz-json-1.0" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateHypervisor where+ toJSON UpdateHypervisor' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Host" Data..=) Prelude.<$> host,+ ("LogGroupArn" Data..=) Prelude.<$> logGroupArn,+ ("Name" Data..=) Prelude.<$> name,+ ("Password" Data..=) Prelude.<$> password,+ ("Username" Data..=) Prelude.<$> username,+ Prelude.Just+ ("HypervisorArn" Data..= hypervisorArn)+ ]+ )++instance Data.ToPath UpdateHypervisor where+ toPath = Prelude.const "/"++instance Data.ToQuery UpdateHypervisor where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateHypervisorResponse' smart constructor.+data UpdateHypervisorResponse = UpdateHypervisorResponse'+ { -- | The Amazon Resource Name (ARN) of the hypervisor you updated.+ hypervisorArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateHypervisorResponse' 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:+--+-- 'hypervisorArn', 'updateHypervisorResponse_hypervisorArn' - The Amazon Resource Name (ARN) of the hypervisor you updated.+--+-- 'httpStatus', 'updateHypervisorResponse_httpStatus' - The response's http status code.+newUpdateHypervisorResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateHypervisorResponse+newUpdateHypervisorResponse pHttpStatus_ =+ UpdateHypervisorResponse'+ { hypervisorArn =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the hypervisor you updated.+updateHypervisorResponse_hypervisorArn :: Lens.Lens' UpdateHypervisorResponse (Prelude.Maybe Prelude.Text)+updateHypervisorResponse_hypervisorArn = Lens.lens (\UpdateHypervisorResponse' {hypervisorArn} -> hypervisorArn) (\s@UpdateHypervisorResponse' {} a -> s {hypervisorArn = a} :: UpdateHypervisorResponse)++-- | The response's http status code.+updateHypervisorResponse_httpStatus :: Lens.Lens' UpdateHypervisorResponse Prelude.Int+updateHypervisorResponse_httpStatus = Lens.lens (\UpdateHypervisorResponse' {httpStatus} -> httpStatus) (\s@UpdateHypervisorResponse' {} a -> s {httpStatus = a} :: UpdateHypervisorResponse)++instance Prelude.NFData UpdateHypervisorResponse where+ rnf UpdateHypervisorResponse' {..} =+ Prelude.rnf hypervisorArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/BackupGateway/Waiters.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.BackupGateway.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.BackupGateway.Waiters where++import Amazonka.BackupGateway.Lens+import Amazonka.BackupGateway.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
+ 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.BackupGateway+import Test.Amazonka.BackupGateway.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "BackupGateway"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/BackupGateway.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.BackupGateway+-- 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.BackupGateway+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/BackupGateway/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.BackupGateway.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.BackupGateway.Internal where
+ test/Test/Amazonka/Gen/BackupGateway.hs view
@@ -0,0 +1,538 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.Amazonka.Gen.BackupGateway+-- 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.BackupGateway where++import Amazonka.BackupGateway+import qualified Data.Proxy as Proxy+import Test.Amazonka.BackupGateway.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"+-- [ requestAssociateGatewayToServer $+-- newAssociateGatewayToServer+--+-- , requestCreateGateway $+-- newCreateGateway+--+-- , requestDeleteGateway $+-- newDeleteGateway+--+-- , requestDeleteHypervisor $+-- newDeleteHypervisor+--+-- , requestDisassociateGatewayFromServer $+-- newDisassociateGatewayFromServer+--+-- , requestGetBandwidthRateLimitSchedule $+-- newGetBandwidthRateLimitSchedule+--+-- , requestGetGateway $+-- newGetGateway+--+-- , requestGetHypervisor $+-- newGetHypervisor+--+-- , requestGetHypervisorPropertyMappings $+-- newGetHypervisorPropertyMappings+--+-- , requestGetVirtualMachine $+-- newGetVirtualMachine+--+-- , requestImportHypervisorConfiguration $+-- newImportHypervisorConfiguration+--+-- , requestListGateways $+-- newListGateways+--+-- , requestListHypervisors $+-- newListHypervisors+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestListVirtualMachines $+-- newListVirtualMachines+--+-- , requestPutBandwidthRateLimitSchedule $+-- newPutBandwidthRateLimitSchedule+--+-- , requestPutHypervisorPropertyMappings $+-- newPutHypervisorPropertyMappings+--+-- , requestPutMaintenanceStartTime $+-- newPutMaintenanceStartTime+--+-- , requestStartVirtualMachinesMetadataSync $+-- newStartVirtualMachinesMetadataSync+--+-- , requestTagResource $+-- newTagResource+--+-- , requestTestHypervisorConfiguration $+-- newTestHypervisorConfiguration+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateGatewayInformation $+-- newUpdateGatewayInformation+--+-- , requestUpdateGatewaySoftwareNow $+-- newUpdateGatewaySoftwareNow+--+-- , requestUpdateHypervisor $+-- newUpdateHypervisor+--+-- ]++-- , testGroup "response"+-- [ responseAssociateGatewayToServer $+-- newAssociateGatewayToServerResponse+--+-- , responseCreateGateway $+-- newCreateGatewayResponse+--+-- , responseDeleteGateway $+-- newDeleteGatewayResponse+--+-- , responseDeleteHypervisor $+-- newDeleteHypervisorResponse+--+-- , responseDisassociateGatewayFromServer $+-- newDisassociateGatewayFromServerResponse+--+-- , responseGetBandwidthRateLimitSchedule $+-- newGetBandwidthRateLimitScheduleResponse+--+-- , responseGetGateway $+-- newGetGatewayResponse+--+-- , responseGetHypervisor $+-- newGetHypervisorResponse+--+-- , responseGetHypervisorPropertyMappings $+-- newGetHypervisorPropertyMappingsResponse+--+-- , responseGetVirtualMachine $+-- newGetVirtualMachineResponse+--+-- , responseImportHypervisorConfiguration $+-- newImportHypervisorConfigurationResponse+--+-- , responseListGateways $+-- newListGatewaysResponse+--+-- , responseListHypervisors $+-- newListHypervisorsResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responseListVirtualMachines $+-- newListVirtualMachinesResponse+--+-- , responsePutBandwidthRateLimitSchedule $+-- newPutBandwidthRateLimitScheduleResponse+--+-- , responsePutHypervisorPropertyMappings $+-- newPutHypervisorPropertyMappingsResponse+--+-- , responsePutMaintenanceStartTime $+-- newPutMaintenanceStartTimeResponse+--+-- , responseStartVirtualMachinesMetadataSync $+-- newStartVirtualMachinesMetadataSyncResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseTestHypervisorConfiguration $+-- newTestHypervisorConfigurationResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateGatewayInformation $+-- newUpdateGatewayInformationResponse+--+-- , responseUpdateGatewaySoftwareNow $+-- newUpdateGatewaySoftwareNowResponse+--+-- , responseUpdateHypervisor $+-- newUpdateHypervisorResponse+--+-- ]+-- ]++-- Requests++requestAssociateGatewayToServer :: AssociateGatewayToServer -> TestTree+requestAssociateGatewayToServer =+ req+ "AssociateGatewayToServer"+ "fixture/AssociateGatewayToServer.yaml"++requestCreateGateway :: CreateGateway -> TestTree+requestCreateGateway =+ req+ "CreateGateway"+ "fixture/CreateGateway.yaml"++requestDeleteGateway :: DeleteGateway -> TestTree+requestDeleteGateway =+ req+ "DeleteGateway"+ "fixture/DeleteGateway.yaml"++requestDeleteHypervisor :: DeleteHypervisor -> TestTree+requestDeleteHypervisor =+ req+ "DeleteHypervisor"+ "fixture/DeleteHypervisor.yaml"++requestDisassociateGatewayFromServer :: DisassociateGatewayFromServer -> TestTree+requestDisassociateGatewayFromServer =+ req+ "DisassociateGatewayFromServer"+ "fixture/DisassociateGatewayFromServer.yaml"++requestGetBandwidthRateLimitSchedule :: GetBandwidthRateLimitSchedule -> TestTree+requestGetBandwidthRateLimitSchedule =+ req+ "GetBandwidthRateLimitSchedule"+ "fixture/GetBandwidthRateLimitSchedule.yaml"++requestGetGateway :: GetGateway -> TestTree+requestGetGateway =+ req+ "GetGateway"+ "fixture/GetGateway.yaml"++requestGetHypervisor :: GetHypervisor -> TestTree+requestGetHypervisor =+ req+ "GetHypervisor"+ "fixture/GetHypervisor.yaml"++requestGetHypervisorPropertyMappings :: GetHypervisorPropertyMappings -> TestTree+requestGetHypervisorPropertyMappings =+ req+ "GetHypervisorPropertyMappings"+ "fixture/GetHypervisorPropertyMappings.yaml"++requestGetVirtualMachine :: GetVirtualMachine -> TestTree+requestGetVirtualMachine =+ req+ "GetVirtualMachine"+ "fixture/GetVirtualMachine.yaml"++requestImportHypervisorConfiguration :: ImportHypervisorConfiguration -> TestTree+requestImportHypervisorConfiguration =+ req+ "ImportHypervisorConfiguration"+ "fixture/ImportHypervisorConfiguration.yaml"++requestListGateways :: ListGateways -> TestTree+requestListGateways =+ req+ "ListGateways"+ "fixture/ListGateways.yaml"++requestListHypervisors :: ListHypervisors -> TestTree+requestListHypervisors =+ req+ "ListHypervisors"+ "fixture/ListHypervisors.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestListVirtualMachines :: ListVirtualMachines -> TestTree+requestListVirtualMachines =+ req+ "ListVirtualMachines"+ "fixture/ListVirtualMachines.yaml"++requestPutBandwidthRateLimitSchedule :: PutBandwidthRateLimitSchedule -> TestTree+requestPutBandwidthRateLimitSchedule =+ req+ "PutBandwidthRateLimitSchedule"+ "fixture/PutBandwidthRateLimitSchedule.yaml"++requestPutHypervisorPropertyMappings :: PutHypervisorPropertyMappings -> TestTree+requestPutHypervisorPropertyMappings =+ req+ "PutHypervisorPropertyMappings"+ "fixture/PutHypervisorPropertyMappings.yaml"++requestPutMaintenanceStartTime :: PutMaintenanceStartTime -> TestTree+requestPutMaintenanceStartTime =+ req+ "PutMaintenanceStartTime"+ "fixture/PutMaintenanceStartTime.yaml"++requestStartVirtualMachinesMetadataSync :: StartVirtualMachinesMetadataSync -> TestTree+requestStartVirtualMachinesMetadataSync =+ req+ "StartVirtualMachinesMetadataSync"+ "fixture/StartVirtualMachinesMetadataSync.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestTestHypervisorConfiguration :: TestHypervisorConfiguration -> TestTree+requestTestHypervisorConfiguration =+ req+ "TestHypervisorConfiguration"+ "fixture/TestHypervisorConfiguration.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateGatewayInformation :: UpdateGatewayInformation -> TestTree+requestUpdateGatewayInformation =+ req+ "UpdateGatewayInformation"+ "fixture/UpdateGatewayInformation.yaml"++requestUpdateGatewaySoftwareNow :: UpdateGatewaySoftwareNow -> TestTree+requestUpdateGatewaySoftwareNow =+ req+ "UpdateGatewaySoftwareNow"+ "fixture/UpdateGatewaySoftwareNow.yaml"++requestUpdateHypervisor :: UpdateHypervisor -> TestTree+requestUpdateHypervisor =+ req+ "UpdateHypervisor"+ "fixture/UpdateHypervisor.yaml"++-- Responses++responseAssociateGatewayToServer :: AssociateGatewayToServerResponse -> TestTree+responseAssociateGatewayToServer =+ res+ "AssociateGatewayToServerResponse"+ "fixture/AssociateGatewayToServerResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy AssociateGatewayToServer)++responseCreateGateway :: CreateGatewayResponse -> TestTree+responseCreateGateway =+ res+ "CreateGatewayResponse"+ "fixture/CreateGatewayResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateGateway)++responseDeleteGateway :: DeleteGatewayResponse -> TestTree+responseDeleteGateway =+ res+ "DeleteGatewayResponse"+ "fixture/DeleteGatewayResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteGateway)++responseDeleteHypervisor :: DeleteHypervisorResponse -> TestTree+responseDeleteHypervisor =+ res+ "DeleteHypervisorResponse"+ "fixture/DeleteHypervisorResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteHypervisor)++responseDisassociateGatewayFromServer :: DisassociateGatewayFromServerResponse -> TestTree+responseDisassociateGatewayFromServer =+ res+ "DisassociateGatewayFromServerResponse"+ "fixture/DisassociateGatewayFromServerResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisassociateGatewayFromServer)++responseGetBandwidthRateLimitSchedule :: GetBandwidthRateLimitScheduleResponse -> TestTree+responseGetBandwidthRateLimitSchedule =+ res+ "GetBandwidthRateLimitScheduleResponse"+ "fixture/GetBandwidthRateLimitScheduleResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetBandwidthRateLimitSchedule)++responseGetGateway :: GetGatewayResponse -> TestTree+responseGetGateway =+ res+ "GetGatewayResponse"+ "fixture/GetGatewayResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetGateway)++responseGetHypervisor :: GetHypervisorResponse -> TestTree+responseGetHypervisor =+ res+ "GetHypervisorResponse"+ "fixture/GetHypervisorResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetHypervisor)++responseGetHypervisorPropertyMappings :: GetHypervisorPropertyMappingsResponse -> TestTree+responseGetHypervisorPropertyMappings =+ res+ "GetHypervisorPropertyMappingsResponse"+ "fixture/GetHypervisorPropertyMappingsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetHypervisorPropertyMappings)++responseGetVirtualMachine :: GetVirtualMachineResponse -> TestTree+responseGetVirtualMachine =+ res+ "GetVirtualMachineResponse"+ "fixture/GetVirtualMachineResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetVirtualMachine)++responseImportHypervisorConfiguration :: ImportHypervisorConfigurationResponse -> TestTree+responseImportHypervisorConfiguration =+ res+ "ImportHypervisorConfigurationResponse"+ "fixture/ImportHypervisorConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ImportHypervisorConfiguration)++responseListGateways :: ListGatewaysResponse -> TestTree+responseListGateways =+ res+ "ListGatewaysResponse"+ "fixture/ListGatewaysResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListGateways)++responseListHypervisors :: ListHypervisorsResponse -> TestTree+responseListHypervisors =+ res+ "ListHypervisorsResponse"+ "fixture/ListHypervisorsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListHypervisors)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseListVirtualMachines :: ListVirtualMachinesResponse -> TestTree+responseListVirtualMachines =+ res+ "ListVirtualMachinesResponse"+ "fixture/ListVirtualMachinesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListVirtualMachines)++responsePutBandwidthRateLimitSchedule :: PutBandwidthRateLimitScheduleResponse -> TestTree+responsePutBandwidthRateLimitSchedule =+ res+ "PutBandwidthRateLimitScheduleResponse"+ "fixture/PutBandwidthRateLimitScheduleResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutBandwidthRateLimitSchedule)++responsePutHypervisorPropertyMappings :: PutHypervisorPropertyMappingsResponse -> TestTree+responsePutHypervisorPropertyMappings =+ res+ "PutHypervisorPropertyMappingsResponse"+ "fixture/PutHypervisorPropertyMappingsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutHypervisorPropertyMappings)++responsePutMaintenanceStartTime :: PutMaintenanceStartTimeResponse -> TestTree+responsePutMaintenanceStartTime =+ res+ "PutMaintenanceStartTimeResponse"+ "fixture/PutMaintenanceStartTimeResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutMaintenanceStartTime)++responseStartVirtualMachinesMetadataSync :: StartVirtualMachinesMetadataSyncResponse -> TestTree+responseStartVirtualMachinesMetadataSync =+ res+ "StartVirtualMachinesMetadataSyncResponse"+ "fixture/StartVirtualMachinesMetadataSyncResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy StartVirtualMachinesMetadataSync)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+ res+ "TagResourceResponse"+ "fixture/TagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy TagResource)++responseTestHypervisorConfiguration :: TestHypervisorConfigurationResponse -> TestTree+responseTestHypervisorConfiguration =+ res+ "TestHypervisorConfigurationResponse"+ "fixture/TestHypervisorConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy TestHypervisorConfiguration)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+ res+ "UntagResourceResponse"+ "fixture/UntagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdateGatewayInformation :: UpdateGatewayInformationResponse -> TestTree+responseUpdateGatewayInformation =+ res+ "UpdateGatewayInformationResponse"+ "fixture/UpdateGatewayInformationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateGatewayInformation)++responseUpdateGatewaySoftwareNow :: UpdateGatewaySoftwareNowResponse -> TestTree+responseUpdateGatewaySoftwareNow =+ res+ "UpdateGatewaySoftwareNowResponse"+ "fixture/UpdateGatewaySoftwareNowResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateGatewaySoftwareNow)++responseUpdateHypervisor :: UpdateHypervisorResponse -> TestTree+responseUpdateHypervisor =+ res+ "UpdateHypervisorResponse"+ "fixture/UpdateHypervisorResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateHypervisor)