amazonka-backup (empty) → 2.0
raw patch · 272 files changed
+30959/−0 lines, 272 filesdep +amazonka-backupdep +amazonka-coredep +amazonka-test
Dependencies added: amazonka-backup, 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.cabal +199/−0
- fixture/CancelLegalHold.yaml +10/−0
- fixture/CancelLegalHoldResponse.proto +0/−0
- fixture/CreateBackupPlan.yaml +10/−0
- fixture/CreateBackupPlanResponse.proto +0/−0
- fixture/CreateBackupSelection.yaml +10/−0
- fixture/CreateBackupSelectionResponse.proto +0/−0
- fixture/CreateBackupVault.yaml +10/−0
- fixture/CreateBackupVaultResponse.proto +0/−0
- fixture/CreateFramework.yaml +10/−0
- fixture/CreateFrameworkResponse.proto +0/−0
- fixture/CreateLegalHold.yaml +10/−0
- fixture/CreateLegalHoldResponse.proto +0/−0
- fixture/CreateReportPlan.yaml +10/−0
- fixture/CreateReportPlanResponse.proto +0/−0
- fixture/DeleteBackupPlan.yaml +10/−0
- fixture/DeleteBackupPlanResponse.proto +0/−0
- fixture/DeleteBackupSelection.yaml +10/−0
- fixture/DeleteBackupSelectionResponse.proto +0/−0
- fixture/DeleteBackupVault.yaml +10/−0
- fixture/DeleteBackupVaultAccessPolicy.yaml +10/−0
- fixture/DeleteBackupVaultAccessPolicyResponse.proto +0/−0
- fixture/DeleteBackupVaultLockConfiguration.yaml +10/−0
- fixture/DeleteBackupVaultLockConfigurationResponse.proto +0/−0
- fixture/DeleteBackupVaultNotifications.yaml +10/−0
- fixture/DeleteBackupVaultNotificationsResponse.proto +0/−0
- fixture/DeleteBackupVaultResponse.proto +0/−0
- fixture/DeleteFramework.yaml +10/−0
- fixture/DeleteFrameworkResponse.proto +0/−0
- fixture/DeleteRecoveryPoint.yaml +10/−0
- fixture/DeleteRecoveryPointResponse.proto +0/−0
- fixture/DeleteReportPlan.yaml +10/−0
- fixture/DeleteReportPlanResponse.proto +0/−0
- fixture/DescribeBackupJob.yaml +10/−0
- fixture/DescribeBackupJobResponse.proto +0/−0
- fixture/DescribeBackupVault.yaml +10/−0
- fixture/DescribeBackupVaultResponse.proto +0/−0
- fixture/DescribeCopyJob.yaml +10/−0
- fixture/DescribeCopyJobResponse.proto +0/−0
- fixture/DescribeFramework.yaml +10/−0
- fixture/DescribeFrameworkResponse.proto +0/−0
- fixture/DescribeGlobalSettings.yaml +10/−0
- fixture/DescribeGlobalSettingsResponse.proto +0/−0
- fixture/DescribeProtectedResource.yaml +10/−0
- fixture/DescribeProtectedResourceResponse.proto +0/−0
- fixture/DescribeRecoveryPoint.yaml +10/−0
- fixture/DescribeRecoveryPointResponse.proto +0/−0
- fixture/DescribeRegionSettings.yaml +10/−0
- fixture/DescribeRegionSettingsResponse.proto +0/−0
- fixture/DescribeReportJob.yaml +10/−0
- fixture/DescribeReportJobResponse.proto +0/−0
- fixture/DescribeReportPlan.yaml +10/−0
- fixture/DescribeReportPlanResponse.proto +0/−0
- fixture/DescribeRestoreJob.yaml +10/−0
- fixture/DescribeRestoreJobResponse.proto +0/−0
- fixture/DisassociateRecoveryPoint.yaml +10/−0
- fixture/DisassociateRecoveryPointFromParent.yaml +10/−0
- fixture/DisassociateRecoveryPointFromParentResponse.proto +0/−0
- fixture/DisassociateRecoveryPointResponse.proto +0/−0
- fixture/ExportBackupPlanTemplate.yaml +10/−0
- fixture/ExportBackupPlanTemplateResponse.proto +0/−0
- fixture/GetBackupPlan.yaml +10/−0
- fixture/GetBackupPlanFromJSON.yaml +10/−0
- fixture/GetBackupPlanFromJSONResponse.proto +0/−0
- fixture/GetBackupPlanFromTemplate.yaml +10/−0
- fixture/GetBackupPlanFromTemplateResponse.proto +0/−0
- fixture/GetBackupPlanResponse.proto +0/−0
- fixture/GetBackupSelection.yaml +10/−0
- fixture/GetBackupSelectionResponse.proto +0/−0
- fixture/GetBackupVaultAccessPolicy.yaml +10/−0
- fixture/GetBackupVaultAccessPolicyResponse.proto +0/−0
- fixture/GetBackupVaultNotifications.yaml +10/−0
- fixture/GetBackupVaultNotificationsResponse.proto +0/−0
- fixture/GetLegalHold.yaml +10/−0
- fixture/GetLegalHoldResponse.proto +0/−0
- fixture/GetRecoveryPointRestoreMetadata.yaml +10/−0
- fixture/GetRecoveryPointRestoreMetadataResponse.proto +0/−0
- fixture/GetSupportedResourceTypes.yaml +10/−0
- fixture/GetSupportedResourceTypesResponse.proto +0/−0
- fixture/ListBackupJobs.yaml +10/−0
- fixture/ListBackupJobsResponse.proto +0/−0
- fixture/ListBackupPlanTemplates.yaml +10/−0
- fixture/ListBackupPlanTemplatesResponse.proto +0/−0
- fixture/ListBackupPlanVersions.yaml +10/−0
- fixture/ListBackupPlanVersionsResponse.proto +0/−0
- fixture/ListBackupPlans.yaml +10/−0
- fixture/ListBackupPlansResponse.proto +0/−0
- fixture/ListBackupSelections.yaml +10/−0
- fixture/ListBackupSelectionsResponse.proto +0/−0
- fixture/ListBackupVaults.yaml +10/−0
- fixture/ListBackupVaultsResponse.proto +0/−0
- fixture/ListCopyJobs.yaml +10/−0
- fixture/ListCopyJobsResponse.proto +0/−0
- fixture/ListFrameworks.yaml +10/−0
- fixture/ListFrameworksResponse.proto +0/−0
- fixture/ListLegalHolds.yaml +10/−0
- fixture/ListLegalHoldsResponse.proto +0/−0
- fixture/ListProtectedResources.yaml +10/−0
- fixture/ListProtectedResourcesResponse.proto +0/−0
- fixture/ListRecoveryPointsByBackupVault.yaml +10/−0
- fixture/ListRecoveryPointsByBackupVaultResponse.proto +0/−0
- fixture/ListRecoveryPointsByLegalHold.yaml +10/−0
- fixture/ListRecoveryPointsByLegalHoldResponse.proto +0/−0
- fixture/ListRecoveryPointsByResource.yaml +10/−0
- fixture/ListRecoveryPointsByResourceResponse.proto +0/−0
- fixture/ListReportJobs.yaml +10/−0
- fixture/ListReportJobsResponse.proto +0/−0
- fixture/ListReportPlans.yaml +10/−0
- fixture/ListReportPlansResponse.proto +0/−0
- fixture/ListRestoreJobs.yaml +10/−0
- fixture/ListRestoreJobsResponse.proto +0/−0
- fixture/ListTags.yaml +10/−0
- fixture/ListTagsResponse.proto +0/−0
- fixture/PutBackupVaultAccessPolicy.yaml +10/−0
- fixture/PutBackupVaultAccessPolicyResponse.proto +0/−0
- fixture/PutBackupVaultLockConfiguration.yaml +10/−0
- fixture/PutBackupVaultLockConfigurationResponse.proto +0/−0
- fixture/PutBackupVaultNotifications.yaml +10/−0
- fixture/PutBackupVaultNotificationsResponse.proto +0/−0
- fixture/StartBackupJob.yaml +10/−0
- fixture/StartBackupJobResponse.proto +0/−0
- fixture/StartCopyJob.yaml +10/−0
- fixture/StartCopyJobResponse.proto +0/−0
- fixture/StartReportJob.yaml +10/−0
- fixture/StartReportJobResponse.proto +0/−0
- fixture/StartRestoreJob.yaml +10/−0
- fixture/StartRestoreJobResponse.proto +0/−0
- fixture/StopBackupJob.yaml +10/−0
- fixture/StopBackupJobResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateBackupPlan.yaml +10/−0
- fixture/UpdateBackupPlanResponse.proto +0/−0
- fixture/UpdateFramework.yaml +10/−0
- fixture/UpdateFrameworkResponse.proto +0/−0
- fixture/UpdateGlobalSettings.yaml +10/−0
- fixture/UpdateGlobalSettingsResponse.proto +0/−0
- fixture/UpdateRecoveryPointLifecycle.yaml +10/−0
- fixture/UpdateRecoveryPointLifecycleResponse.proto +0/−0
- fixture/UpdateRegionSettings.yaml +10/−0
- fixture/UpdateRegionSettingsResponse.proto +0/−0
- fixture/UpdateReportPlan.yaml +10/−0
- fixture/UpdateReportPlanResponse.proto +0/−0
- gen/Amazonka/Backup.hs +768/−0
- gen/Amazonka/Backup/CancelLegalHold.hs +186/−0
- gen/Amazonka/Backup/CreateBackupPlan.hs +301/−0
- gen/Amazonka/Backup/CreateBackupSelection.hs +265/−0
- gen/Amazonka/Backup/CreateBackupVault.hs +296/−0
- gen/Amazonka/Backup/CreateFramework.hs +274/−0
- gen/Amazonka/Backup/CreateLegalHold.hs +332/−0
- gen/Amazonka/Backup/CreateReportPlan.hs +339/−0
- gen/Amazonka/Backup/DeleteBackupPlan.hs +216/−0
- gen/Amazonka/Backup/DeleteBackupSelection.hs +151/−0
- gen/Amazonka/Backup/DeleteBackupVault.hs +138/−0
- gen/Amazonka/Backup/DeleteBackupVaultAccessPolicy.hs +150/−0
- gen/Amazonka/Backup/DeleteBackupVaultLockConfiguration.hs +164/−0
- gen/Amazonka/Backup/DeleteBackupVaultNotifications.hs +158/−0
- gen/Amazonka/Backup/DeleteFramework.hs +123/−0
- gen/Amazonka/Backup/DeleteRecoveryPoint.hs +181/−0
- gen/Amazonka/Backup/DeleteReportPlan.hs +128/−0
- gen/Amazonka/Backup/DescribeBackupJob.hs +545/−0
- gen/Amazonka/Backup/DescribeBackupVault.hs +406/−0
- gen/Amazonka/Backup/DescribeCopyJob.hs +158/−0
- gen/Amazonka/Backup/DescribeFramework.hs +322/−0
- gen/Amazonka/Backup/DescribeGlobalSettings.hs +171/−0
- gen/Amazonka/Backup/DescribeProtectedResource.hs +210/−0
- gen/Amazonka/Backup/DescribeRecoveryPoint.hs +677/−0
- gen/Amazonka/Backup/DescribeRegionSettings.hs +206/−0
- gen/Amazonka/Backup/DescribeReportJob.hs +172/−0
- gen/Amazonka/Backup/DescribeReportPlan.hs +173/−0
- gen/Amazonka/Backup/DescribeRestoreJob.hs +344/−0
- gen/Amazonka/Backup/DisassociateRecoveryPoint.hs +166/−0
- gen/Amazonka/Backup/DisassociateRecoveryPointFromParent.hs +194/−0
- gen/Amazonka/Backup/ExportBackupPlanTemplate.hs +179/−0
- gen/Amazonka/Backup/GetBackupPlan.hs +328/−0
- gen/Amazonka/Backup/GetBackupPlanFromJSON.hs +175/−0
- gen/Amazonka/Backup/GetBackupPlanFromTemplate.hs +172/−0
- gen/Amazonka/Backup/GetBackupSelection.hs +251/−0
- gen/Amazonka/Backup/GetBackupVaultAccessPolicy.hs +215/−0
- gen/Amazonka/Backup/GetBackupVaultNotifications.hs +238/−0
- gen/Amazonka/Backup/GetLegalHold.hs +284/−0
- gen/Amazonka/Backup/GetRecoveryPointRestoreMetadata.hs +258/−0
- gen/Amazonka/Backup/GetSupportedResourceTypes.hs +205/−0
- gen/Amazonka/Backup/Lens.hs +1026/−0
- gen/Amazonka/Backup/ListBackupJobs.hs +469/−0
- gen/Amazonka/Backup/ListBackupPlanTemplates.hs +240/−0
- gen/Amazonka/Backup/ListBackupPlanVersions.hs +260/−0
- gen/Amazonka/Backup/ListBackupPlans.hs +254/−0
- gen/Amazonka/Backup/ListBackupSelections.hs +255/−0
- gen/Amazonka/Backup/ListBackupVaults.hs +242/−0
- gen/Amazonka/Backup/ListCopyJobs.hs +449/−0
- gen/Amazonka/Backup/ListFrameworks.hs +209/−0
- gen/Amazonka/Backup/ListLegalHolds.hs +229/−0
- gen/Amazonka/Backup/ListProtectedResources.hs +241/−0
- gen/Amazonka/Backup/ListRecoveryPointsByBackupVault.hs +383/−0
- gen/Amazonka/Backup/ListRecoveryPointsByLegalHold.hs +256/−0
- gen/Amazonka/Backup/ListRecoveryPointsByResource.hs +277/−0
- gen/Amazonka/Backup/ListReportJobs.hs +281/−0
- gen/Amazonka/Backup/ListReportPlans.hs +215/−0
- gen/Amazonka/Backup/ListRestoreJobs.hs +320/−0
- gen/Amazonka/Backup/ListTags.hs +234/−0
- gen/Amazonka/Backup/PutBackupVaultAccessPolicy.hs +166/−0
- gen/Amazonka/Backup/PutBackupVaultLockConfiguration.hs +357/−0
- gen/Amazonka/Backup/PutBackupVaultNotifications.hs +250/−0
- gen/Amazonka/Backup/StartBackupJob.hs +441/−0
- gen/Amazonka/Backup/StartCopyJob.hs +320/−0
- gen/Amazonka/Backup/StartReportJob.hs +199/−0
- gen/Amazonka/Backup/StartRestoreJob.hs +421/−0
- gen/Amazonka/Backup/StopBackupJob.hs +131/−0
- gen/Amazonka/Backup/TagResource.hs +155/−0
- gen/Amazonka/Backup/Types.hs +618/−0
- gen/Amazonka/Backup/Types/AdvancedBackupSetting.hs +157/−0
- gen/Amazonka/Backup/Types/BackupJob.hs +458/−0
- gen/Amazonka/Backup/Types/BackupJobState.hs +106/−0
- gen/Amazonka/Backup/Types/BackupPlan.hs +113/−0
- gen/Amazonka/Backup/Types/BackupPlanInput.hs +116/−0
- gen/Amazonka/Backup/Types/BackupPlanTemplatesListMember.hs +88/−0
- gen/Amazonka/Backup/Types/BackupPlansListMember.hs +227/−0
- gen/Amazonka/Backup/Types/BackupRule.hs +289/−0
- gen/Amazonka/Backup/Types/BackupRuleInput.hs +257/−0
- gen/Amazonka/Backup/Types/BackupSelection.hs +273/−0
- gen/Amazonka/Backup/Types/BackupSelectionsListMember.hs +163/−0
- gen/Amazonka/Backup/Types/BackupVaultEvent.hs +146/−0
- gen/Amazonka/Backup/Types/BackupVaultListMember.hs +340/−0
- gen/Amazonka/Backup/Types/CalculatedLifecycle.hs +103/−0
- gen/Amazonka/Backup/Types/Condition.hs +144/−0
- gen/Amazonka/Backup/Types/ConditionParameter.hs +101/−0
- gen/Amazonka/Backup/Types/ConditionType.hs +66/−0
- gen/Amazonka/Backup/Types/Conditions.hs +143/−0
- gen/Amazonka/Backup/Types/ControlInputParameter.hs +99/−0
- gen/Amazonka/Backup/Types/ControlScope.hs +139/−0
- gen/Amazonka/Backup/Types/CopyAction.hs +105/−0
- gen/Amazonka/Backup/Types/CopyJob.hs +376/−0
- gen/Amazonka/Backup/Types/CopyJobState.hs +86/−0
- gen/Amazonka/Backup/Types/DateRange.hs +122/−0
- gen/Amazonka/Backup/Types/Framework.hs +161/−0
- gen/Amazonka/Backup/Types/FrameworkControl.hs +128/−0
- gen/Amazonka/Backup/Types/LegalHold.hs +161/−0
- gen/Amazonka/Backup/Types/LegalHoldStatus.hs +81/−0
- gen/Amazonka/Backup/Types/Lifecycle.hs +113/−0
- gen/Amazonka/Backup/Types/ProtectedResource.hs +118/−0
- gen/Amazonka/Backup/Types/RecoveryPointByBackupVault.hs +462/−0
- gen/Amazonka/Backup/Types/RecoveryPointByResource.hs +206/−0
- gen/Amazonka/Backup/Types/RecoveryPointCreator.hs +122/−0
- gen/Amazonka/Backup/Types/RecoveryPointMember.hs +78/−0
- gen/Amazonka/Backup/Types/RecoveryPointSelection.hs +118/−0
- gen/Amazonka/Backup/Types/RecoveryPointStatus.hs +81/−0
- gen/Amazonka/Backup/Types/ReportDeliveryChannel.hs +122/−0
- gen/Amazonka/Backup/Types/ReportDestination.hs +84/−0
- gen/Amazonka/Backup/Types/ReportJob.hs +215/−0
- gen/Amazonka/Backup/Types/ReportPlan.hs +248/−0
- gen/Amazonka/Backup/Types/ReportSetting.hs +162/−0
- gen/Amazonka/Backup/Types/RestoreJobStatus.hs +86/−0
- gen/Amazonka/Backup/Types/RestoreJobsListMember.hs +265/−0
- gen/Amazonka/Backup/Types/StorageClass.hs +76/−0
- gen/Amazonka/Backup/UntagResource.hs +152/−0
- gen/Amazonka/Backup/UpdateBackupPlan.hs +258/−0
- gen/Amazonka/Backup/UpdateFramework.hs +277/−0
- gen/Amazonka/Backup/UpdateGlobalSettings.hs +139/−0
- gen/Amazonka/Backup/UpdateRecoveryPointLifecycle.hs +352/−0
- gen/Amazonka/Backup/UpdateRegionSettings.hs +169/−0
- gen/Amazonka/Backup/UpdateReportPlan.hs +308/−0
- gen/Amazonka/Backup/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Backup.hs +20/−0
- test/Test/Amazonka/Backup/Internal.hs +8/−0
- test/Test/Amazonka/Gen/Backup.hs +1478/−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 SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2018-11-15@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-backup)+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.Backup](http://hackage.haskell.org/package/amazonka-backup/docs/Amazonka-Backup.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` 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.cabal view
@@ -0,0 +1,199 @@+cabal-version: 2.2+name: amazonka-backup+version: 2.0+synopsis: Amazon Backup SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer:+ Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>++copyright: Copyright (c) 2013-2023 Brendan Hay+category: AWS+build-type: Simple+extra-source-files:+ fixture/*.proto+ fixture/*.yaml+ README.md+ src/.gitkeep++description:+ Derived from API version @2018-11-15@ of the AWS service descriptions, licensed under Apache 2.0.+ .+ The types from this library are intended to be used with <http://hackage.haskell.org/package/amazonka amazonka>,+ which provides mechanisms for specifying AuthN/AuthZ information, sending requests, and receiving responses.+ .+ It is recommended to use generic lenses or optics from packages such as <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify optional fields and deconstruct responses.+ .+ Generated lenses can be found in "Amazonka.Backup.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.Backup" 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++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.Backup+ Amazonka.Backup.CancelLegalHold+ Amazonka.Backup.CreateBackupPlan+ Amazonka.Backup.CreateBackupSelection+ Amazonka.Backup.CreateBackupVault+ Amazonka.Backup.CreateFramework+ Amazonka.Backup.CreateLegalHold+ Amazonka.Backup.CreateReportPlan+ Amazonka.Backup.DeleteBackupPlan+ Amazonka.Backup.DeleteBackupSelection+ Amazonka.Backup.DeleteBackupVault+ Amazonka.Backup.DeleteBackupVaultAccessPolicy+ Amazonka.Backup.DeleteBackupVaultLockConfiguration+ Amazonka.Backup.DeleteBackupVaultNotifications+ Amazonka.Backup.DeleteFramework+ Amazonka.Backup.DeleteRecoveryPoint+ Amazonka.Backup.DeleteReportPlan+ Amazonka.Backup.DescribeBackupJob+ Amazonka.Backup.DescribeBackupVault+ Amazonka.Backup.DescribeCopyJob+ Amazonka.Backup.DescribeFramework+ Amazonka.Backup.DescribeGlobalSettings+ Amazonka.Backup.DescribeProtectedResource+ Amazonka.Backup.DescribeRecoveryPoint+ Amazonka.Backup.DescribeRegionSettings+ Amazonka.Backup.DescribeReportJob+ Amazonka.Backup.DescribeReportPlan+ Amazonka.Backup.DescribeRestoreJob+ Amazonka.Backup.DisassociateRecoveryPoint+ Amazonka.Backup.DisassociateRecoveryPointFromParent+ Amazonka.Backup.ExportBackupPlanTemplate+ Amazonka.Backup.GetBackupPlan+ Amazonka.Backup.GetBackupPlanFromJSON+ Amazonka.Backup.GetBackupPlanFromTemplate+ Amazonka.Backup.GetBackupSelection+ Amazonka.Backup.GetBackupVaultAccessPolicy+ Amazonka.Backup.GetBackupVaultNotifications+ Amazonka.Backup.GetLegalHold+ Amazonka.Backup.GetRecoveryPointRestoreMetadata+ Amazonka.Backup.GetSupportedResourceTypes+ Amazonka.Backup.Lens+ Amazonka.Backup.ListBackupJobs+ Amazonka.Backup.ListBackupPlans+ Amazonka.Backup.ListBackupPlanTemplates+ Amazonka.Backup.ListBackupPlanVersions+ Amazonka.Backup.ListBackupSelections+ Amazonka.Backup.ListBackupVaults+ Amazonka.Backup.ListCopyJobs+ Amazonka.Backup.ListFrameworks+ Amazonka.Backup.ListLegalHolds+ Amazonka.Backup.ListProtectedResources+ Amazonka.Backup.ListRecoveryPointsByBackupVault+ Amazonka.Backup.ListRecoveryPointsByLegalHold+ Amazonka.Backup.ListRecoveryPointsByResource+ Amazonka.Backup.ListReportJobs+ Amazonka.Backup.ListReportPlans+ Amazonka.Backup.ListRestoreJobs+ Amazonka.Backup.ListTags+ Amazonka.Backup.PutBackupVaultAccessPolicy+ Amazonka.Backup.PutBackupVaultLockConfiguration+ Amazonka.Backup.PutBackupVaultNotifications+ Amazonka.Backup.StartBackupJob+ Amazonka.Backup.StartCopyJob+ Amazonka.Backup.StartReportJob+ Amazonka.Backup.StartRestoreJob+ Amazonka.Backup.StopBackupJob+ Amazonka.Backup.TagResource+ Amazonka.Backup.Types+ Amazonka.Backup.Types.AdvancedBackupSetting+ Amazonka.Backup.Types.BackupJob+ Amazonka.Backup.Types.BackupJobState+ Amazonka.Backup.Types.BackupPlan+ Amazonka.Backup.Types.BackupPlanInput+ Amazonka.Backup.Types.BackupPlansListMember+ Amazonka.Backup.Types.BackupPlanTemplatesListMember+ Amazonka.Backup.Types.BackupRule+ Amazonka.Backup.Types.BackupRuleInput+ Amazonka.Backup.Types.BackupSelection+ Amazonka.Backup.Types.BackupSelectionsListMember+ Amazonka.Backup.Types.BackupVaultEvent+ Amazonka.Backup.Types.BackupVaultListMember+ Amazonka.Backup.Types.CalculatedLifecycle+ Amazonka.Backup.Types.Condition+ Amazonka.Backup.Types.ConditionParameter+ Amazonka.Backup.Types.Conditions+ Amazonka.Backup.Types.ConditionType+ Amazonka.Backup.Types.ControlInputParameter+ Amazonka.Backup.Types.ControlScope+ Amazonka.Backup.Types.CopyAction+ Amazonka.Backup.Types.CopyJob+ Amazonka.Backup.Types.CopyJobState+ Amazonka.Backup.Types.DateRange+ Amazonka.Backup.Types.Framework+ Amazonka.Backup.Types.FrameworkControl+ Amazonka.Backup.Types.LegalHold+ Amazonka.Backup.Types.LegalHoldStatus+ Amazonka.Backup.Types.Lifecycle+ Amazonka.Backup.Types.ProtectedResource+ Amazonka.Backup.Types.RecoveryPointByBackupVault+ Amazonka.Backup.Types.RecoveryPointByResource+ Amazonka.Backup.Types.RecoveryPointCreator+ Amazonka.Backup.Types.RecoveryPointMember+ Amazonka.Backup.Types.RecoveryPointSelection+ Amazonka.Backup.Types.RecoveryPointStatus+ Amazonka.Backup.Types.ReportDeliveryChannel+ Amazonka.Backup.Types.ReportDestination+ Amazonka.Backup.Types.ReportJob+ Amazonka.Backup.Types.ReportPlan+ Amazonka.Backup.Types.ReportSetting+ Amazonka.Backup.Types.RestoreJobsListMember+ Amazonka.Backup.Types.RestoreJobStatus+ Amazonka.Backup.Types.StorageClass+ Amazonka.Backup.UntagResource+ Amazonka.Backup.UpdateBackupPlan+ Amazonka.Backup.UpdateFramework+ Amazonka.Backup.UpdateGlobalSettings+ Amazonka.Backup.UpdateRecoveryPointLifecycle+ Amazonka.Backup.UpdateRegionSettings+ Amazonka.Backup.UpdateReportPlan+ Amazonka.Backup.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-backup-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.Backup+ Test.Amazonka.Backup.Internal+ Test.Amazonka.Gen.Backup++ build-depends:+ , amazonka-backup+ , amazonka-core >=2.0 && <2.1+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CancelLegalHold.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/CancelLegalHoldResponse.proto view
+ fixture/CreateBackupPlan.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/CreateBackupPlanResponse.proto view
+ fixture/CreateBackupSelection.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/CreateBackupSelectionResponse.proto view
+ fixture/CreateBackupVault.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/CreateBackupVaultResponse.proto view
+ fixture/CreateFramework.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/CreateFrameworkResponse.proto view
+ fixture/CreateLegalHold.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/CreateLegalHoldResponse.proto view
+ fixture/CreateReportPlan.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/CreateReportPlanResponse.proto view
+ fixture/DeleteBackupPlan.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DeleteBackupPlanResponse.proto view
+ fixture/DeleteBackupSelection.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DeleteBackupSelectionResponse.proto view
+ fixture/DeleteBackupVault.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DeleteBackupVaultAccessPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DeleteBackupVaultAccessPolicyResponse.proto view
+ fixture/DeleteBackupVaultLockConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DeleteBackupVaultLockConfigurationResponse.proto view
+ fixture/DeleteBackupVaultNotifications.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DeleteBackupVaultNotificationsResponse.proto view
+ fixture/DeleteBackupVaultResponse.proto view
+ fixture/DeleteFramework.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DeleteFrameworkResponse.proto view
+ fixture/DeleteRecoveryPoint.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DeleteRecoveryPointResponse.proto view
+ fixture/DeleteReportPlan.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DeleteReportPlanResponse.proto view
+ fixture/DescribeBackupJob.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeBackupJobResponse.proto view
+ fixture/DescribeBackupVault.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeBackupVaultResponse.proto view
+ fixture/DescribeCopyJob.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeCopyJobResponse.proto view
+ fixture/DescribeFramework.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeFrameworkResponse.proto view
+ fixture/DescribeGlobalSettings.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeGlobalSettingsResponse.proto view
+ fixture/DescribeProtectedResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeProtectedResourceResponse.proto view
+ fixture/DescribeRecoveryPoint.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeRecoveryPointResponse.proto view
+ fixture/DescribeRegionSettings.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeRegionSettingsResponse.proto view
+ fixture/DescribeReportJob.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeReportJobResponse.proto view
+ fixture/DescribeReportPlan.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeReportPlanResponse.proto view
+ fixture/DescribeRestoreJob.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DescribeRestoreJobResponse.proto view
+ fixture/DisassociateRecoveryPoint.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DisassociateRecoveryPointFromParent.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/DisassociateRecoveryPointFromParentResponse.proto view
+ fixture/DisassociateRecoveryPointResponse.proto view
+ fixture/ExportBackupPlanTemplate.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ExportBackupPlanTemplateResponse.proto view
+ fixture/GetBackupPlan.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/GetBackupPlanFromJSON.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/GetBackupPlanFromJSONResponse.proto view
+ fixture/GetBackupPlanFromTemplate.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/GetBackupPlanFromTemplateResponse.proto view
+ fixture/GetBackupPlanResponse.proto view
+ fixture/GetBackupSelection.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/GetBackupSelectionResponse.proto view
+ fixture/GetBackupVaultAccessPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/GetBackupVaultAccessPolicyResponse.proto view
+ fixture/GetBackupVaultNotifications.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/GetBackupVaultNotificationsResponse.proto view
+ fixture/GetLegalHold.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/GetLegalHoldResponse.proto view
+ fixture/GetRecoveryPointRestoreMetadata.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/GetRecoveryPointRestoreMetadataResponse.proto view
+ fixture/GetSupportedResourceTypes.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/GetSupportedResourceTypesResponse.proto view
+ fixture/ListBackupJobs.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListBackupJobsResponse.proto view
+ fixture/ListBackupPlanTemplates.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListBackupPlanTemplatesResponse.proto view
+ fixture/ListBackupPlanVersions.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListBackupPlanVersionsResponse.proto view
+ fixture/ListBackupPlans.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListBackupPlansResponse.proto view
+ fixture/ListBackupSelections.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListBackupSelectionsResponse.proto view
+ fixture/ListBackupVaults.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListBackupVaultsResponse.proto view
+ fixture/ListCopyJobs.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListCopyJobsResponse.proto view
+ fixture/ListFrameworks.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListFrameworksResponse.proto view
+ fixture/ListLegalHolds.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListLegalHoldsResponse.proto view
+ fixture/ListProtectedResources.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListProtectedResourcesResponse.proto view
+ fixture/ListRecoveryPointsByBackupVault.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListRecoveryPointsByBackupVaultResponse.proto view
+ fixture/ListRecoveryPointsByLegalHold.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListRecoveryPointsByLegalHoldResponse.proto view
+ fixture/ListRecoveryPointsByResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListRecoveryPointsByResourceResponse.proto view
+ fixture/ListReportJobs.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListReportJobsResponse.proto view
+ fixture/ListReportPlans.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListReportPlansResponse.proto view
+ fixture/ListRestoreJobs.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListRestoreJobsResponse.proto view
+ fixture/ListTags.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/ListTagsResponse.proto view
+ fixture/PutBackupVaultAccessPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/PutBackupVaultAccessPolicyResponse.proto view
+ fixture/PutBackupVaultLockConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/PutBackupVaultLockConfigurationResponse.proto view
+ fixture/PutBackupVaultNotifications.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/PutBackupVaultNotificationsResponse.proto view
+ fixture/StartBackupJob.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/StartBackupJobResponse.proto view
+ fixture/StartCopyJob.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/StartCopyJobResponse.proto view
+ fixture/StartReportJob.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/StartReportJobResponse.proto view
+ fixture/StartRestoreJob.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/StartRestoreJobResponse.proto view
+ fixture/StopBackupJob.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/StopBackupJobResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/TagResourceResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/UpdateBackupPlan.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/UpdateBackupPlanResponse.proto view
+ fixture/UpdateFramework.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/UpdateFrameworkResponse.proto view
+ fixture/UpdateGlobalSettings.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/UpdateGlobalSettingsResponse.proto view
+ fixture/UpdateRecoveryPointLifecycle.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/UpdateRecoveryPointLifecycleResponse.proto view
+ fixture/UpdateRegionSettings.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/UpdateRegionSettingsResponse.proto view
+ fixture/UpdateReportPlan.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backup/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: backup.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/UpdateReportPlanResponse.proto view
+ gen/Amazonka/Backup.hs view
@@ -0,0 +1,768 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.Backup+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2018-11-15@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Backup+--+-- Backup is a unified backup service designed to protect Amazon Web+-- Services services and their associated data. Backup simplifies the+-- creation, migration, restoration, and deletion of backups, while also+-- providing reporting and auditing.+module Amazonka.Backup+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** AlreadyExistsException+ _AlreadyExistsException,++ -- ** ConflictException+ _ConflictException,++ -- ** DependencyFailureException+ _DependencyFailureException,++ -- ** InvalidParameterValueException+ _InvalidParameterValueException,++ -- ** InvalidRequestException+ _InvalidRequestException,++ -- ** InvalidResourceStateException+ _InvalidResourceStateException,++ -- ** LimitExceededException+ _LimitExceededException,++ -- ** MissingParameterValueException+ _MissingParameterValueException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ServiceUnavailableException+ _ServiceUnavailableException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** CancelLegalHold+ CancelLegalHold (CancelLegalHold'),+ newCancelLegalHold,+ CancelLegalHoldResponse (CancelLegalHoldResponse'),+ newCancelLegalHoldResponse,++ -- ** CreateBackupPlan+ CreateBackupPlan (CreateBackupPlan'),+ newCreateBackupPlan,+ CreateBackupPlanResponse (CreateBackupPlanResponse'),+ newCreateBackupPlanResponse,++ -- ** CreateBackupSelection+ CreateBackupSelection (CreateBackupSelection'),+ newCreateBackupSelection,+ CreateBackupSelectionResponse (CreateBackupSelectionResponse'),+ newCreateBackupSelectionResponse,++ -- ** CreateBackupVault+ CreateBackupVault (CreateBackupVault'),+ newCreateBackupVault,+ CreateBackupVaultResponse (CreateBackupVaultResponse'),+ newCreateBackupVaultResponse,++ -- ** CreateFramework+ CreateFramework (CreateFramework'),+ newCreateFramework,+ CreateFrameworkResponse (CreateFrameworkResponse'),+ newCreateFrameworkResponse,++ -- ** CreateLegalHold+ CreateLegalHold (CreateLegalHold'),+ newCreateLegalHold,+ CreateLegalHoldResponse (CreateLegalHoldResponse'),+ newCreateLegalHoldResponse,++ -- ** CreateReportPlan+ CreateReportPlan (CreateReportPlan'),+ newCreateReportPlan,+ CreateReportPlanResponse (CreateReportPlanResponse'),+ newCreateReportPlanResponse,++ -- ** DeleteBackupPlan+ DeleteBackupPlan (DeleteBackupPlan'),+ newDeleteBackupPlan,+ DeleteBackupPlanResponse (DeleteBackupPlanResponse'),+ newDeleteBackupPlanResponse,++ -- ** DeleteBackupSelection+ DeleteBackupSelection (DeleteBackupSelection'),+ newDeleteBackupSelection,+ DeleteBackupSelectionResponse (DeleteBackupSelectionResponse'),+ newDeleteBackupSelectionResponse,++ -- ** DeleteBackupVault+ DeleteBackupVault (DeleteBackupVault'),+ newDeleteBackupVault,+ DeleteBackupVaultResponse (DeleteBackupVaultResponse'),+ newDeleteBackupVaultResponse,++ -- ** DeleteBackupVaultAccessPolicy+ DeleteBackupVaultAccessPolicy (DeleteBackupVaultAccessPolicy'),+ newDeleteBackupVaultAccessPolicy,+ DeleteBackupVaultAccessPolicyResponse (DeleteBackupVaultAccessPolicyResponse'),+ newDeleteBackupVaultAccessPolicyResponse,++ -- ** DeleteBackupVaultLockConfiguration+ DeleteBackupVaultLockConfiguration (DeleteBackupVaultLockConfiguration'),+ newDeleteBackupVaultLockConfiguration,+ DeleteBackupVaultLockConfigurationResponse (DeleteBackupVaultLockConfigurationResponse'),+ newDeleteBackupVaultLockConfigurationResponse,++ -- ** DeleteBackupVaultNotifications+ DeleteBackupVaultNotifications (DeleteBackupVaultNotifications'),+ newDeleteBackupVaultNotifications,+ DeleteBackupVaultNotificationsResponse (DeleteBackupVaultNotificationsResponse'),+ newDeleteBackupVaultNotificationsResponse,++ -- ** DeleteFramework+ DeleteFramework (DeleteFramework'),+ newDeleteFramework,+ DeleteFrameworkResponse (DeleteFrameworkResponse'),+ newDeleteFrameworkResponse,++ -- ** DeleteRecoveryPoint+ DeleteRecoveryPoint (DeleteRecoveryPoint'),+ newDeleteRecoveryPoint,+ DeleteRecoveryPointResponse (DeleteRecoveryPointResponse'),+ newDeleteRecoveryPointResponse,++ -- ** DeleteReportPlan+ DeleteReportPlan (DeleteReportPlan'),+ newDeleteReportPlan,+ DeleteReportPlanResponse (DeleteReportPlanResponse'),+ newDeleteReportPlanResponse,++ -- ** DescribeBackupJob+ DescribeBackupJob (DescribeBackupJob'),+ newDescribeBackupJob,+ DescribeBackupJobResponse (DescribeBackupJobResponse'),+ newDescribeBackupJobResponse,++ -- ** DescribeBackupVault+ DescribeBackupVault (DescribeBackupVault'),+ newDescribeBackupVault,+ DescribeBackupVaultResponse (DescribeBackupVaultResponse'),+ newDescribeBackupVaultResponse,++ -- ** DescribeCopyJob+ DescribeCopyJob (DescribeCopyJob'),+ newDescribeCopyJob,+ DescribeCopyJobResponse (DescribeCopyJobResponse'),+ newDescribeCopyJobResponse,++ -- ** DescribeFramework+ DescribeFramework (DescribeFramework'),+ newDescribeFramework,+ DescribeFrameworkResponse (DescribeFrameworkResponse'),+ newDescribeFrameworkResponse,++ -- ** DescribeGlobalSettings+ DescribeGlobalSettings (DescribeGlobalSettings'),+ newDescribeGlobalSettings,+ DescribeGlobalSettingsResponse (DescribeGlobalSettingsResponse'),+ newDescribeGlobalSettingsResponse,++ -- ** DescribeProtectedResource+ DescribeProtectedResource (DescribeProtectedResource'),+ newDescribeProtectedResource,+ DescribeProtectedResourceResponse (DescribeProtectedResourceResponse'),+ newDescribeProtectedResourceResponse,++ -- ** DescribeRecoveryPoint+ DescribeRecoveryPoint (DescribeRecoveryPoint'),+ newDescribeRecoveryPoint,+ DescribeRecoveryPointResponse (DescribeRecoveryPointResponse'),+ newDescribeRecoveryPointResponse,++ -- ** DescribeRegionSettings+ DescribeRegionSettings (DescribeRegionSettings'),+ newDescribeRegionSettings,+ DescribeRegionSettingsResponse (DescribeRegionSettingsResponse'),+ newDescribeRegionSettingsResponse,++ -- ** DescribeReportJob+ DescribeReportJob (DescribeReportJob'),+ newDescribeReportJob,+ DescribeReportJobResponse (DescribeReportJobResponse'),+ newDescribeReportJobResponse,++ -- ** DescribeReportPlan+ DescribeReportPlan (DescribeReportPlan'),+ newDescribeReportPlan,+ DescribeReportPlanResponse (DescribeReportPlanResponse'),+ newDescribeReportPlanResponse,++ -- ** DescribeRestoreJob+ DescribeRestoreJob (DescribeRestoreJob'),+ newDescribeRestoreJob,+ DescribeRestoreJobResponse (DescribeRestoreJobResponse'),+ newDescribeRestoreJobResponse,++ -- ** DisassociateRecoveryPoint+ DisassociateRecoveryPoint (DisassociateRecoveryPoint'),+ newDisassociateRecoveryPoint,+ DisassociateRecoveryPointResponse (DisassociateRecoveryPointResponse'),+ newDisassociateRecoveryPointResponse,++ -- ** DisassociateRecoveryPointFromParent+ DisassociateRecoveryPointFromParent (DisassociateRecoveryPointFromParent'),+ newDisassociateRecoveryPointFromParent,+ DisassociateRecoveryPointFromParentResponse (DisassociateRecoveryPointFromParentResponse'),+ newDisassociateRecoveryPointFromParentResponse,++ -- ** ExportBackupPlanTemplate+ ExportBackupPlanTemplate (ExportBackupPlanTemplate'),+ newExportBackupPlanTemplate,+ ExportBackupPlanTemplateResponse (ExportBackupPlanTemplateResponse'),+ newExportBackupPlanTemplateResponse,++ -- ** GetBackupPlan+ GetBackupPlan (GetBackupPlan'),+ newGetBackupPlan,+ GetBackupPlanResponse (GetBackupPlanResponse'),+ newGetBackupPlanResponse,++ -- ** GetBackupPlanFromJSON+ GetBackupPlanFromJSON (GetBackupPlanFromJSON'),+ newGetBackupPlanFromJSON,+ GetBackupPlanFromJSONResponse (GetBackupPlanFromJSONResponse'),+ newGetBackupPlanFromJSONResponse,++ -- ** GetBackupPlanFromTemplate+ GetBackupPlanFromTemplate (GetBackupPlanFromTemplate'),+ newGetBackupPlanFromTemplate,+ GetBackupPlanFromTemplateResponse (GetBackupPlanFromTemplateResponse'),+ newGetBackupPlanFromTemplateResponse,++ -- ** GetBackupSelection+ GetBackupSelection (GetBackupSelection'),+ newGetBackupSelection,+ GetBackupSelectionResponse (GetBackupSelectionResponse'),+ newGetBackupSelectionResponse,++ -- ** GetBackupVaultAccessPolicy+ GetBackupVaultAccessPolicy (GetBackupVaultAccessPolicy'),+ newGetBackupVaultAccessPolicy,+ GetBackupVaultAccessPolicyResponse (GetBackupVaultAccessPolicyResponse'),+ newGetBackupVaultAccessPolicyResponse,++ -- ** GetBackupVaultNotifications+ GetBackupVaultNotifications (GetBackupVaultNotifications'),+ newGetBackupVaultNotifications,+ GetBackupVaultNotificationsResponse (GetBackupVaultNotificationsResponse'),+ newGetBackupVaultNotificationsResponse,++ -- ** GetLegalHold+ GetLegalHold (GetLegalHold'),+ newGetLegalHold,+ GetLegalHoldResponse (GetLegalHoldResponse'),+ newGetLegalHoldResponse,++ -- ** GetRecoveryPointRestoreMetadata+ GetRecoveryPointRestoreMetadata (GetRecoveryPointRestoreMetadata'),+ newGetRecoveryPointRestoreMetadata,+ GetRecoveryPointRestoreMetadataResponse (GetRecoveryPointRestoreMetadataResponse'),+ newGetRecoveryPointRestoreMetadataResponse,++ -- ** GetSupportedResourceTypes+ GetSupportedResourceTypes (GetSupportedResourceTypes'),+ newGetSupportedResourceTypes,+ GetSupportedResourceTypesResponse (GetSupportedResourceTypesResponse'),+ newGetSupportedResourceTypesResponse,++ -- ** ListBackupJobs (Paginated)+ ListBackupJobs (ListBackupJobs'),+ newListBackupJobs,+ ListBackupJobsResponse (ListBackupJobsResponse'),+ newListBackupJobsResponse,++ -- ** ListBackupPlanTemplates (Paginated)+ ListBackupPlanTemplates (ListBackupPlanTemplates'),+ newListBackupPlanTemplates,+ ListBackupPlanTemplatesResponse (ListBackupPlanTemplatesResponse'),+ newListBackupPlanTemplatesResponse,++ -- ** ListBackupPlanVersions (Paginated)+ ListBackupPlanVersions (ListBackupPlanVersions'),+ newListBackupPlanVersions,+ ListBackupPlanVersionsResponse (ListBackupPlanVersionsResponse'),+ newListBackupPlanVersionsResponse,++ -- ** ListBackupPlans (Paginated)+ ListBackupPlans (ListBackupPlans'),+ newListBackupPlans,+ ListBackupPlansResponse (ListBackupPlansResponse'),+ newListBackupPlansResponse,++ -- ** ListBackupSelections (Paginated)+ ListBackupSelections (ListBackupSelections'),+ newListBackupSelections,+ ListBackupSelectionsResponse (ListBackupSelectionsResponse'),+ newListBackupSelectionsResponse,++ -- ** ListBackupVaults (Paginated)+ ListBackupVaults (ListBackupVaults'),+ newListBackupVaults,+ ListBackupVaultsResponse (ListBackupVaultsResponse'),+ newListBackupVaultsResponse,++ -- ** ListCopyJobs (Paginated)+ ListCopyJobs (ListCopyJobs'),+ newListCopyJobs,+ ListCopyJobsResponse (ListCopyJobsResponse'),+ newListCopyJobsResponse,++ -- ** ListFrameworks+ ListFrameworks (ListFrameworks'),+ newListFrameworks,+ ListFrameworksResponse (ListFrameworksResponse'),+ newListFrameworksResponse,++ -- ** ListLegalHolds (Paginated)+ ListLegalHolds (ListLegalHolds'),+ newListLegalHolds,+ ListLegalHoldsResponse (ListLegalHoldsResponse'),+ newListLegalHoldsResponse,++ -- ** ListProtectedResources (Paginated)+ ListProtectedResources (ListProtectedResources'),+ newListProtectedResources,+ ListProtectedResourcesResponse (ListProtectedResourcesResponse'),+ newListProtectedResourcesResponse,++ -- ** ListRecoveryPointsByBackupVault (Paginated)+ ListRecoveryPointsByBackupVault (ListRecoveryPointsByBackupVault'),+ newListRecoveryPointsByBackupVault,+ ListRecoveryPointsByBackupVaultResponse (ListRecoveryPointsByBackupVaultResponse'),+ newListRecoveryPointsByBackupVaultResponse,++ -- ** ListRecoveryPointsByLegalHold (Paginated)+ ListRecoveryPointsByLegalHold (ListRecoveryPointsByLegalHold'),+ newListRecoveryPointsByLegalHold,+ ListRecoveryPointsByLegalHoldResponse (ListRecoveryPointsByLegalHoldResponse'),+ newListRecoveryPointsByLegalHoldResponse,++ -- ** ListRecoveryPointsByResource (Paginated)+ ListRecoveryPointsByResource (ListRecoveryPointsByResource'),+ newListRecoveryPointsByResource,+ ListRecoveryPointsByResourceResponse (ListRecoveryPointsByResourceResponse'),+ newListRecoveryPointsByResourceResponse,++ -- ** ListReportJobs+ ListReportJobs (ListReportJobs'),+ newListReportJobs,+ ListReportJobsResponse (ListReportJobsResponse'),+ newListReportJobsResponse,++ -- ** ListReportPlans+ ListReportPlans (ListReportPlans'),+ newListReportPlans,+ ListReportPlansResponse (ListReportPlansResponse'),+ newListReportPlansResponse,++ -- ** ListRestoreJobs (Paginated)+ ListRestoreJobs (ListRestoreJobs'),+ newListRestoreJobs,+ ListRestoreJobsResponse (ListRestoreJobsResponse'),+ newListRestoreJobsResponse,++ -- ** ListTags+ ListTags (ListTags'),+ newListTags,+ ListTagsResponse (ListTagsResponse'),+ newListTagsResponse,++ -- ** PutBackupVaultAccessPolicy+ PutBackupVaultAccessPolicy (PutBackupVaultAccessPolicy'),+ newPutBackupVaultAccessPolicy,+ PutBackupVaultAccessPolicyResponse (PutBackupVaultAccessPolicyResponse'),+ newPutBackupVaultAccessPolicyResponse,++ -- ** PutBackupVaultLockConfiguration+ PutBackupVaultLockConfiguration (PutBackupVaultLockConfiguration'),+ newPutBackupVaultLockConfiguration,+ PutBackupVaultLockConfigurationResponse (PutBackupVaultLockConfigurationResponse'),+ newPutBackupVaultLockConfigurationResponse,++ -- ** PutBackupVaultNotifications+ PutBackupVaultNotifications (PutBackupVaultNotifications'),+ newPutBackupVaultNotifications,+ PutBackupVaultNotificationsResponse (PutBackupVaultNotificationsResponse'),+ newPutBackupVaultNotificationsResponse,++ -- ** StartBackupJob+ StartBackupJob (StartBackupJob'),+ newStartBackupJob,+ StartBackupJobResponse (StartBackupJobResponse'),+ newStartBackupJobResponse,++ -- ** StartCopyJob+ StartCopyJob (StartCopyJob'),+ newStartCopyJob,+ StartCopyJobResponse (StartCopyJobResponse'),+ newStartCopyJobResponse,++ -- ** StartReportJob+ StartReportJob (StartReportJob'),+ newStartReportJob,+ StartReportJobResponse (StartReportJobResponse'),+ newStartReportJobResponse,++ -- ** StartRestoreJob+ StartRestoreJob (StartRestoreJob'),+ newStartRestoreJob,+ StartRestoreJobResponse (StartRestoreJobResponse'),+ newStartRestoreJobResponse,++ -- ** StopBackupJob+ StopBackupJob (StopBackupJob'),+ newStopBackupJob,+ StopBackupJobResponse (StopBackupJobResponse'),+ newStopBackupJobResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateBackupPlan+ UpdateBackupPlan (UpdateBackupPlan'),+ newUpdateBackupPlan,+ UpdateBackupPlanResponse (UpdateBackupPlanResponse'),+ newUpdateBackupPlanResponse,++ -- ** UpdateFramework+ UpdateFramework (UpdateFramework'),+ newUpdateFramework,+ UpdateFrameworkResponse (UpdateFrameworkResponse'),+ newUpdateFrameworkResponse,++ -- ** UpdateGlobalSettings+ UpdateGlobalSettings (UpdateGlobalSettings'),+ newUpdateGlobalSettings,+ UpdateGlobalSettingsResponse (UpdateGlobalSettingsResponse'),+ newUpdateGlobalSettingsResponse,++ -- ** UpdateRecoveryPointLifecycle+ UpdateRecoveryPointLifecycle (UpdateRecoveryPointLifecycle'),+ newUpdateRecoveryPointLifecycle,+ UpdateRecoveryPointLifecycleResponse (UpdateRecoveryPointLifecycleResponse'),+ newUpdateRecoveryPointLifecycleResponse,++ -- ** UpdateRegionSettings+ UpdateRegionSettings (UpdateRegionSettings'),+ newUpdateRegionSettings,+ UpdateRegionSettingsResponse (UpdateRegionSettingsResponse'),+ newUpdateRegionSettingsResponse,++ -- ** UpdateReportPlan+ UpdateReportPlan (UpdateReportPlan'),+ newUpdateReportPlan,+ UpdateReportPlanResponse (UpdateReportPlanResponse'),+ newUpdateReportPlanResponse,++ -- * Types++ -- ** BackupJobState+ BackupJobState (..),++ -- ** BackupVaultEvent+ BackupVaultEvent (..),++ -- ** ConditionType+ ConditionType (..),++ -- ** CopyJobState+ CopyJobState (..),++ -- ** LegalHoldStatus+ LegalHoldStatus (..),++ -- ** RecoveryPointStatus+ RecoveryPointStatus (..),++ -- ** RestoreJobStatus+ RestoreJobStatus (..),++ -- ** StorageClass+ StorageClass (..),++ -- ** AdvancedBackupSetting+ AdvancedBackupSetting (AdvancedBackupSetting'),+ newAdvancedBackupSetting,++ -- ** BackupJob+ BackupJob (BackupJob'),+ newBackupJob,++ -- ** BackupPlan+ BackupPlan (BackupPlan'),+ newBackupPlan,++ -- ** BackupPlanInput+ BackupPlanInput (BackupPlanInput'),+ newBackupPlanInput,++ -- ** BackupPlanTemplatesListMember+ BackupPlanTemplatesListMember (BackupPlanTemplatesListMember'),+ newBackupPlanTemplatesListMember,++ -- ** BackupPlansListMember+ BackupPlansListMember (BackupPlansListMember'),+ newBackupPlansListMember,++ -- ** BackupRule+ BackupRule (BackupRule'),+ newBackupRule,++ -- ** BackupRuleInput+ BackupRuleInput (BackupRuleInput'),+ newBackupRuleInput,++ -- ** BackupSelection+ BackupSelection (BackupSelection'),+ newBackupSelection,++ -- ** BackupSelectionsListMember+ BackupSelectionsListMember (BackupSelectionsListMember'),+ newBackupSelectionsListMember,++ -- ** BackupVaultListMember+ BackupVaultListMember (BackupVaultListMember'),+ newBackupVaultListMember,++ -- ** CalculatedLifecycle+ CalculatedLifecycle (CalculatedLifecycle'),+ newCalculatedLifecycle,++ -- ** Condition+ Condition (Condition'),+ newCondition,++ -- ** ConditionParameter+ ConditionParameter (ConditionParameter'),+ newConditionParameter,++ -- ** Conditions+ Conditions (Conditions'),+ newConditions,++ -- ** ControlInputParameter+ ControlInputParameter (ControlInputParameter'),+ newControlInputParameter,++ -- ** ControlScope+ ControlScope (ControlScope'),+ newControlScope,++ -- ** CopyAction+ CopyAction (CopyAction'),+ newCopyAction,++ -- ** CopyJob+ CopyJob (CopyJob'),+ newCopyJob,++ -- ** DateRange+ DateRange (DateRange'),+ newDateRange,++ -- ** Framework+ Framework (Framework'),+ newFramework,++ -- ** FrameworkControl+ FrameworkControl (FrameworkControl'),+ newFrameworkControl,++ -- ** LegalHold+ LegalHold (LegalHold'),+ newLegalHold,++ -- ** Lifecycle+ Lifecycle (Lifecycle'),+ newLifecycle,++ -- ** ProtectedResource+ ProtectedResource (ProtectedResource'),+ newProtectedResource,++ -- ** RecoveryPointByBackupVault+ RecoveryPointByBackupVault (RecoveryPointByBackupVault'),+ newRecoveryPointByBackupVault,++ -- ** RecoveryPointByResource+ RecoveryPointByResource (RecoveryPointByResource'),+ newRecoveryPointByResource,++ -- ** RecoveryPointCreator+ RecoveryPointCreator (RecoveryPointCreator'),+ newRecoveryPointCreator,++ -- ** RecoveryPointMember+ RecoveryPointMember (RecoveryPointMember'),+ newRecoveryPointMember,++ -- ** RecoveryPointSelection+ RecoveryPointSelection (RecoveryPointSelection'),+ newRecoveryPointSelection,++ -- ** ReportDeliveryChannel+ ReportDeliveryChannel (ReportDeliveryChannel'),+ newReportDeliveryChannel,++ -- ** ReportDestination+ ReportDestination (ReportDestination'),+ newReportDestination,++ -- ** ReportJob+ ReportJob (ReportJob'),+ newReportJob,++ -- ** ReportPlan+ ReportPlan (ReportPlan'),+ newReportPlan,++ -- ** ReportSetting+ ReportSetting (ReportSetting'),+ newReportSetting,++ -- ** RestoreJobsListMember+ RestoreJobsListMember (RestoreJobsListMember'),+ newRestoreJobsListMember,+ )+where++import Amazonka.Backup.CancelLegalHold+import Amazonka.Backup.CreateBackupPlan+import Amazonka.Backup.CreateBackupSelection+import Amazonka.Backup.CreateBackupVault+import Amazonka.Backup.CreateFramework+import Amazonka.Backup.CreateLegalHold+import Amazonka.Backup.CreateReportPlan+import Amazonka.Backup.DeleteBackupPlan+import Amazonka.Backup.DeleteBackupSelection+import Amazonka.Backup.DeleteBackupVault+import Amazonka.Backup.DeleteBackupVaultAccessPolicy+import Amazonka.Backup.DeleteBackupVaultLockConfiguration+import Amazonka.Backup.DeleteBackupVaultNotifications+import Amazonka.Backup.DeleteFramework+import Amazonka.Backup.DeleteRecoveryPoint+import Amazonka.Backup.DeleteReportPlan+import Amazonka.Backup.DescribeBackupJob+import Amazonka.Backup.DescribeBackupVault+import Amazonka.Backup.DescribeCopyJob+import Amazonka.Backup.DescribeFramework+import Amazonka.Backup.DescribeGlobalSettings+import Amazonka.Backup.DescribeProtectedResource+import Amazonka.Backup.DescribeRecoveryPoint+import Amazonka.Backup.DescribeRegionSettings+import Amazonka.Backup.DescribeReportJob+import Amazonka.Backup.DescribeReportPlan+import Amazonka.Backup.DescribeRestoreJob+import Amazonka.Backup.DisassociateRecoveryPoint+import Amazonka.Backup.DisassociateRecoveryPointFromParent+import Amazonka.Backup.ExportBackupPlanTemplate+import Amazonka.Backup.GetBackupPlan+import Amazonka.Backup.GetBackupPlanFromJSON+import Amazonka.Backup.GetBackupPlanFromTemplate+import Amazonka.Backup.GetBackupSelection+import Amazonka.Backup.GetBackupVaultAccessPolicy+import Amazonka.Backup.GetBackupVaultNotifications+import Amazonka.Backup.GetLegalHold+import Amazonka.Backup.GetRecoveryPointRestoreMetadata+import Amazonka.Backup.GetSupportedResourceTypes+import Amazonka.Backup.Lens+import Amazonka.Backup.ListBackupJobs+import Amazonka.Backup.ListBackupPlanTemplates+import Amazonka.Backup.ListBackupPlanVersions+import Amazonka.Backup.ListBackupPlans+import Amazonka.Backup.ListBackupSelections+import Amazonka.Backup.ListBackupVaults+import Amazonka.Backup.ListCopyJobs+import Amazonka.Backup.ListFrameworks+import Amazonka.Backup.ListLegalHolds+import Amazonka.Backup.ListProtectedResources+import Amazonka.Backup.ListRecoveryPointsByBackupVault+import Amazonka.Backup.ListRecoveryPointsByLegalHold+import Amazonka.Backup.ListRecoveryPointsByResource+import Amazonka.Backup.ListReportJobs+import Amazonka.Backup.ListReportPlans+import Amazonka.Backup.ListRestoreJobs+import Amazonka.Backup.ListTags+import Amazonka.Backup.PutBackupVaultAccessPolicy+import Amazonka.Backup.PutBackupVaultLockConfiguration+import Amazonka.Backup.PutBackupVaultNotifications+import Amazonka.Backup.StartBackupJob+import Amazonka.Backup.StartCopyJob+import Amazonka.Backup.StartReportJob+import Amazonka.Backup.StartRestoreJob+import Amazonka.Backup.StopBackupJob+import Amazonka.Backup.TagResource+import Amazonka.Backup.Types+import Amazonka.Backup.UntagResource+import Amazonka.Backup.UpdateBackupPlan+import Amazonka.Backup.UpdateFramework+import Amazonka.Backup.UpdateGlobalSettings+import Amazonka.Backup.UpdateRecoveryPointLifecycle+import Amazonka.Backup.UpdateRegionSettings+import Amazonka.Backup.UpdateReportPlan+import Amazonka.Backup.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 'Backup'.++-- $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/Backup/CancelLegalHold.hs view
@@ -0,0 +1,186 @@+{-# 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.Backup.CancelLegalHold+-- 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 removes the specified legal hold on a recovery point. This+-- action can only be performed by a user with sufficient permissions.+module Amazonka.Backup.CancelLegalHold+ ( -- * Creating a Request+ CancelLegalHold (..),+ newCancelLegalHold,++ -- * Request Lenses+ cancelLegalHold_retainRecordInDays,+ cancelLegalHold_legalHoldId,+ cancelLegalHold_cancelDescription,++ -- * Destructuring the Response+ CancelLegalHoldResponse (..),+ newCancelLegalHoldResponse,++ -- * Response Lenses+ cancelLegalHoldResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newCancelLegalHold' smart constructor.+data CancelLegalHold = CancelLegalHold'+ { -- | The integer amount in days specifying amount of days after this API+ -- operation to remove legal hold.+ retainRecordInDays :: Prelude.Maybe Prelude.Integer,+ -- | Legal hold ID required to remove the specified legal hold on a recovery+ -- point.+ legalHoldId :: Prelude.Text,+ -- | String describing the reason for removing the legal hold.+ cancelDescription :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CancelLegalHold' 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:+--+-- 'retainRecordInDays', 'cancelLegalHold_retainRecordInDays' - The integer amount in days specifying amount of days after this API+-- operation to remove legal hold.+--+-- 'legalHoldId', 'cancelLegalHold_legalHoldId' - Legal hold ID required to remove the specified legal hold on a recovery+-- point.+--+-- 'cancelDescription', 'cancelLegalHold_cancelDescription' - String describing the reason for removing the legal hold.+newCancelLegalHold ::+ -- | 'legalHoldId'+ Prelude.Text ->+ -- | 'cancelDescription'+ Prelude.Text ->+ CancelLegalHold+newCancelLegalHold pLegalHoldId_ pCancelDescription_ =+ CancelLegalHold'+ { retainRecordInDays =+ Prelude.Nothing,+ legalHoldId = pLegalHoldId_,+ cancelDescription = pCancelDescription_+ }++-- | The integer amount in days specifying amount of days after this API+-- operation to remove legal hold.+cancelLegalHold_retainRecordInDays :: Lens.Lens' CancelLegalHold (Prelude.Maybe Prelude.Integer)+cancelLegalHold_retainRecordInDays = Lens.lens (\CancelLegalHold' {retainRecordInDays} -> retainRecordInDays) (\s@CancelLegalHold' {} a -> s {retainRecordInDays = a} :: CancelLegalHold)++-- | Legal hold ID required to remove the specified legal hold on a recovery+-- point.+cancelLegalHold_legalHoldId :: Lens.Lens' CancelLegalHold Prelude.Text+cancelLegalHold_legalHoldId = Lens.lens (\CancelLegalHold' {legalHoldId} -> legalHoldId) (\s@CancelLegalHold' {} a -> s {legalHoldId = a} :: CancelLegalHold)++-- | String describing the reason for removing the legal hold.+cancelLegalHold_cancelDescription :: Lens.Lens' CancelLegalHold Prelude.Text+cancelLegalHold_cancelDescription = Lens.lens (\CancelLegalHold' {cancelDescription} -> cancelDescription) (\s@CancelLegalHold' {} a -> s {cancelDescription = a} :: CancelLegalHold)++instance Core.AWSRequest CancelLegalHold where+ type+ AWSResponse CancelLegalHold =+ CancelLegalHoldResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ CancelLegalHoldResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CancelLegalHold where+ hashWithSalt _salt CancelLegalHold' {..} =+ _salt+ `Prelude.hashWithSalt` retainRecordInDays+ `Prelude.hashWithSalt` legalHoldId+ `Prelude.hashWithSalt` cancelDescription++instance Prelude.NFData CancelLegalHold where+ rnf CancelLegalHold' {..} =+ Prelude.rnf retainRecordInDays+ `Prelude.seq` Prelude.rnf legalHoldId+ `Prelude.seq` Prelude.rnf cancelDescription++instance Data.ToHeaders CancelLegalHold where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath CancelLegalHold where+ toPath CancelLegalHold' {..} =+ Prelude.mconcat+ ["/legal-holds/", Data.toBS legalHoldId]++instance Data.ToQuery CancelLegalHold where+ toQuery CancelLegalHold' {..} =+ Prelude.mconcat+ [ "retainRecordInDays" Data.=: retainRecordInDays,+ "cancelDescription" Data.=: cancelDescription+ ]++-- | /See:/ 'newCancelLegalHoldResponse' smart constructor.+data CancelLegalHoldResponse = CancelLegalHoldResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CancelLegalHoldResponse' 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', 'cancelLegalHoldResponse_httpStatus' - The response's http status code.+newCancelLegalHoldResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CancelLegalHoldResponse+newCancelLegalHoldResponse pHttpStatus_ =+ CancelLegalHoldResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+cancelLegalHoldResponse_httpStatus :: Lens.Lens' CancelLegalHoldResponse Prelude.Int+cancelLegalHoldResponse_httpStatus = Lens.lens (\CancelLegalHoldResponse' {httpStatus} -> httpStatus) (\s@CancelLegalHoldResponse' {} a -> s {httpStatus = a} :: CancelLegalHoldResponse)++instance Prelude.NFData CancelLegalHoldResponse where+ rnf CancelLegalHoldResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Backup/CreateBackupPlan.hs view
@@ -0,0 +1,301 @@+{-# 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.Backup.CreateBackupPlan+-- 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 plan using a backup plan name and backup rules. A+-- backup plan is a document that contains information that Backup uses to+-- schedule tasks that create recovery points for resources.+--+-- If you call @CreateBackupPlan@ with a plan that already exists, you+-- receive an @AlreadyExistsException@ exception.+module Amazonka.Backup.CreateBackupPlan+ ( -- * Creating a Request+ CreateBackupPlan (..),+ newCreateBackupPlan,++ -- * Request Lenses+ createBackupPlan_backupPlanTags,+ createBackupPlan_creatorRequestId,+ createBackupPlan_backupPlan,++ -- * Destructuring the Response+ CreateBackupPlanResponse (..),+ newCreateBackupPlanResponse,++ -- * Response Lenses+ createBackupPlanResponse_advancedBackupSettings,+ createBackupPlanResponse_backupPlanArn,+ createBackupPlanResponse_backupPlanId,+ createBackupPlanResponse_creationDate,+ createBackupPlanResponse_versionId,+ createBackupPlanResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newCreateBackupPlan' smart constructor.+data CreateBackupPlan = CreateBackupPlan'+ { -- | To help organize your resources, you can assign your own metadata to the+ -- resources that you create. Each tag is a key-value pair. The specified+ -- tags are assigned to all backups created with this plan.+ backupPlanTags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),+ -- | Identifies the request and allows failed requests to be retried without+ -- the risk of running the operation twice. If the request includes a+ -- @CreatorRequestId@ that matches an existing backup plan, that plan is+ -- returned. This parameter is optional.+ --+ -- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+ -- characters.+ creatorRequestId :: Prelude.Maybe Prelude.Text,+ -- | Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+ -- or more sets of @Rules@.+ backupPlan :: BackupPlanInput+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateBackupPlan' 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:+--+-- 'backupPlanTags', 'createBackupPlan_backupPlanTags' - To help organize your resources, you can assign your own metadata to the+-- resources that you create. Each tag is a key-value pair. The specified+-- tags are assigned to all backups created with this plan.+--+-- 'creatorRequestId', 'createBackupPlan_creatorRequestId' - Identifies the request and allows failed requests to be retried without+-- the risk of running the operation twice. If the request includes a+-- @CreatorRequestId@ that matches an existing backup plan, that plan is+-- returned. This parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+--+-- 'backupPlan', 'createBackupPlan_backupPlan' - Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+-- or more sets of @Rules@.+newCreateBackupPlan ::+ -- | 'backupPlan'+ BackupPlanInput ->+ CreateBackupPlan+newCreateBackupPlan pBackupPlan_ =+ CreateBackupPlan'+ { backupPlanTags = Prelude.Nothing,+ creatorRequestId = Prelude.Nothing,+ backupPlan = pBackupPlan_+ }++-- | To help organize your resources, you can assign your own metadata to the+-- resources that you create. Each tag is a key-value pair. The specified+-- tags are assigned to all backups created with this plan.+createBackupPlan_backupPlanTags :: Lens.Lens' CreateBackupPlan (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createBackupPlan_backupPlanTags = Lens.lens (\CreateBackupPlan' {backupPlanTags} -> backupPlanTags) (\s@CreateBackupPlan' {} a -> s {backupPlanTags = a} :: CreateBackupPlan) Prelude.. Lens.mapping (Data._Sensitive Prelude.. Lens.coerced)++-- | Identifies the request and allows failed requests to be retried without+-- the risk of running the operation twice. If the request includes a+-- @CreatorRequestId@ that matches an existing backup plan, that plan is+-- returned. This parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+createBackupPlan_creatorRequestId :: Lens.Lens' CreateBackupPlan (Prelude.Maybe Prelude.Text)+createBackupPlan_creatorRequestId = Lens.lens (\CreateBackupPlan' {creatorRequestId} -> creatorRequestId) (\s@CreateBackupPlan' {} a -> s {creatorRequestId = a} :: CreateBackupPlan)++-- | Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+-- or more sets of @Rules@.+createBackupPlan_backupPlan :: Lens.Lens' CreateBackupPlan BackupPlanInput+createBackupPlan_backupPlan = Lens.lens (\CreateBackupPlan' {backupPlan} -> backupPlan) (\s@CreateBackupPlan' {} a -> s {backupPlan = a} :: CreateBackupPlan)++instance Core.AWSRequest CreateBackupPlan where+ type+ AWSResponse CreateBackupPlan =+ CreateBackupPlanResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateBackupPlanResponse'+ Prelude.<$> ( x+ Data..?> "AdvancedBackupSettings"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "BackupPlanArn")+ Prelude.<*> (x Data..?> "BackupPlanId")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "VersionId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateBackupPlan where+ hashWithSalt _salt CreateBackupPlan' {..} =+ _salt+ `Prelude.hashWithSalt` backupPlanTags+ `Prelude.hashWithSalt` creatorRequestId+ `Prelude.hashWithSalt` backupPlan++instance Prelude.NFData CreateBackupPlan where+ rnf CreateBackupPlan' {..} =+ Prelude.rnf backupPlanTags+ `Prelude.seq` Prelude.rnf creatorRequestId+ `Prelude.seq` Prelude.rnf backupPlan++instance Data.ToHeaders CreateBackupPlan where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateBackupPlan where+ toJSON CreateBackupPlan' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("BackupPlanTags" Data..=)+ Prelude.<$> backupPlanTags,+ ("CreatorRequestId" Data..=)+ Prelude.<$> creatorRequestId,+ Prelude.Just ("BackupPlan" Data..= backupPlan)+ ]+ )++instance Data.ToPath CreateBackupPlan where+ toPath = Prelude.const "/backup/plans/"++instance Data.ToQuery CreateBackupPlan where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateBackupPlanResponse' smart constructor.+data CreateBackupPlanResponse = CreateBackupPlanResponse'+ { -- | A list of @BackupOptions@ settings for a resource type. This option is+ -- only available for Windows Volume Shadow Copy Service (VSS) backup jobs.+ advancedBackupSettings :: Prelude.Maybe [AdvancedBackupSetting],+ -- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+ backupPlanArn :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Maybe Prelude.Text,+ -- | The date and time that a backup plan is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+ -- most 1,024 bytes long. They cannot be edited.+ versionId :: 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 'CreateBackupPlanResponse' 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:+--+-- 'advancedBackupSettings', 'createBackupPlanResponse_advancedBackupSettings' - A list of @BackupOptions@ settings for a resource type. This option is+-- only available for Windows Volume Shadow Copy Service (VSS) backup jobs.+--+-- 'backupPlanArn', 'createBackupPlanResponse_backupPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+--+-- 'backupPlanId', 'createBackupPlanResponse_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'creationDate', 'createBackupPlanResponse_creationDate' - The date and time that a backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'versionId', 'createBackupPlanResponse_versionId' - Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. They cannot be edited.+--+-- 'httpStatus', 'createBackupPlanResponse_httpStatus' - The response's http status code.+newCreateBackupPlanResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateBackupPlanResponse+newCreateBackupPlanResponse pHttpStatus_ =+ CreateBackupPlanResponse'+ { advancedBackupSettings =+ Prelude.Nothing,+ backupPlanArn = Prelude.Nothing,+ backupPlanId = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ versionId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A list of @BackupOptions@ settings for a resource type. This option is+-- only available for Windows Volume Shadow Copy Service (VSS) backup jobs.+createBackupPlanResponse_advancedBackupSettings :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe [AdvancedBackupSetting])+createBackupPlanResponse_advancedBackupSettings = Lens.lens (\CreateBackupPlanResponse' {advancedBackupSettings} -> advancedBackupSettings) (\s@CreateBackupPlanResponse' {} a -> s {advancedBackupSettings = a} :: CreateBackupPlanResponse) Prelude.. Lens.mapping Lens.coerced++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+createBackupPlanResponse_backupPlanArn :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe Prelude.Text)+createBackupPlanResponse_backupPlanArn = Lens.lens (\CreateBackupPlanResponse' {backupPlanArn} -> backupPlanArn) (\s@CreateBackupPlanResponse' {} a -> s {backupPlanArn = a} :: CreateBackupPlanResponse)++-- | Uniquely identifies a backup plan.+createBackupPlanResponse_backupPlanId :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe Prelude.Text)+createBackupPlanResponse_backupPlanId = Lens.lens (\CreateBackupPlanResponse' {backupPlanId} -> backupPlanId) (\s@CreateBackupPlanResponse' {} a -> s {backupPlanId = a} :: CreateBackupPlanResponse)++-- | The date and time that a backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+createBackupPlanResponse_creationDate :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe Prelude.UTCTime)+createBackupPlanResponse_creationDate = Lens.lens (\CreateBackupPlanResponse' {creationDate} -> creationDate) (\s@CreateBackupPlanResponse' {} a -> s {creationDate = a} :: CreateBackupPlanResponse) Prelude.. Lens.mapping Data._Time++-- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. They cannot be edited.+createBackupPlanResponse_versionId :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe Prelude.Text)+createBackupPlanResponse_versionId = Lens.lens (\CreateBackupPlanResponse' {versionId} -> versionId) (\s@CreateBackupPlanResponse' {} a -> s {versionId = a} :: CreateBackupPlanResponse)++-- | The response's http status code.+createBackupPlanResponse_httpStatus :: Lens.Lens' CreateBackupPlanResponse Prelude.Int+createBackupPlanResponse_httpStatus = Lens.lens (\CreateBackupPlanResponse' {httpStatus} -> httpStatus) (\s@CreateBackupPlanResponse' {} a -> s {httpStatus = a} :: CreateBackupPlanResponse)++instance Prelude.NFData CreateBackupPlanResponse where+ rnf CreateBackupPlanResponse' {..} =+ Prelude.rnf advancedBackupSettings+ `Prelude.seq` Prelude.rnf backupPlanArn+ `Prelude.seq` Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf versionId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/CreateBackupSelection.hs view
@@ -0,0 +1,265 @@+{-# 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.Backup.CreateBackupSelection+-- 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 JSON document that specifies a set of resources to assign to a+-- backup plan. For examples, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/assigning-resources.html#assigning-resources-json Assigning resources programmatically>.+module Amazonka.Backup.CreateBackupSelection+ ( -- * Creating a Request+ CreateBackupSelection (..),+ newCreateBackupSelection,++ -- * Request Lenses+ createBackupSelection_creatorRequestId,+ createBackupSelection_backupPlanId,+ createBackupSelection_backupSelection,++ -- * Destructuring the Response+ CreateBackupSelectionResponse (..),+ newCreateBackupSelectionResponse,++ -- * Response Lenses+ createBackupSelectionResponse_backupPlanId,+ createBackupSelectionResponse_creationDate,+ createBackupSelectionResponse_selectionId,+ createBackupSelectionResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newCreateBackupSelection' smart constructor.+data CreateBackupSelection = CreateBackupSelection'+ { -- | A unique string that identifies the request and allows failed requests+ -- to be retried without the risk of running the operation twice. This+ -- parameter is optional.+ --+ -- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+ -- characters.+ creatorRequestId :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies the backup plan to be associated with the selection+ -- of resources.+ backupPlanId :: Prelude.Text,+ -- | Specifies the body of a request to assign a set of resources to a backup+ -- plan.+ backupSelection :: BackupSelection+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateBackupSelection' 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:+--+-- 'creatorRequestId', 'createBackupSelection_creatorRequestId' - A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+--+-- 'backupPlanId', 'createBackupSelection_backupPlanId' - Uniquely identifies the backup plan to be associated with the selection+-- of resources.+--+-- 'backupSelection', 'createBackupSelection_backupSelection' - Specifies the body of a request to assign a set of resources to a backup+-- plan.+newCreateBackupSelection ::+ -- | 'backupPlanId'+ Prelude.Text ->+ -- | 'backupSelection'+ BackupSelection ->+ CreateBackupSelection+newCreateBackupSelection+ pBackupPlanId_+ pBackupSelection_ =+ CreateBackupSelection'+ { creatorRequestId =+ Prelude.Nothing,+ backupPlanId = pBackupPlanId_,+ backupSelection = pBackupSelection_+ }++-- | A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+createBackupSelection_creatorRequestId :: Lens.Lens' CreateBackupSelection (Prelude.Maybe Prelude.Text)+createBackupSelection_creatorRequestId = Lens.lens (\CreateBackupSelection' {creatorRequestId} -> creatorRequestId) (\s@CreateBackupSelection' {} a -> s {creatorRequestId = a} :: CreateBackupSelection)++-- | Uniquely identifies the backup plan to be associated with the selection+-- of resources.+createBackupSelection_backupPlanId :: Lens.Lens' CreateBackupSelection Prelude.Text+createBackupSelection_backupPlanId = Lens.lens (\CreateBackupSelection' {backupPlanId} -> backupPlanId) (\s@CreateBackupSelection' {} a -> s {backupPlanId = a} :: CreateBackupSelection)++-- | Specifies the body of a request to assign a set of resources to a backup+-- plan.+createBackupSelection_backupSelection :: Lens.Lens' CreateBackupSelection BackupSelection+createBackupSelection_backupSelection = Lens.lens (\CreateBackupSelection' {backupSelection} -> backupSelection) (\s@CreateBackupSelection' {} a -> s {backupSelection = a} :: CreateBackupSelection)++instance Core.AWSRequest CreateBackupSelection where+ type+ AWSResponse CreateBackupSelection =+ CreateBackupSelectionResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateBackupSelectionResponse'+ Prelude.<$> (x Data..?> "BackupPlanId")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "SelectionId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateBackupSelection where+ hashWithSalt _salt CreateBackupSelection' {..} =+ _salt+ `Prelude.hashWithSalt` creatorRequestId+ `Prelude.hashWithSalt` backupPlanId+ `Prelude.hashWithSalt` backupSelection++instance Prelude.NFData CreateBackupSelection where+ rnf CreateBackupSelection' {..} =+ Prelude.rnf creatorRequestId+ `Prelude.seq` Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf backupSelection++instance Data.ToHeaders CreateBackupSelection where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateBackupSelection where+ toJSON CreateBackupSelection' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("CreatorRequestId" Data..=)+ Prelude.<$> creatorRequestId,+ Prelude.Just+ ("BackupSelection" Data..= backupSelection)+ ]+ )++instance Data.ToPath CreateBackupSelection where+ toPath CreateBackupSelection' {..} =+ Prelude.mconcat+ [ "/backup/plans/",+ Data.toBS backupPlanId,+ "/selections/"+ ]++instance Data.ToQuery CreateBackupSelection where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateBackupSelectionResponse' smart constructor.+data CreateBackupSelectionResponse = CreateBackupSelectionResponse'+ { -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Maybe Prelude.Text,+ -- | The date and time a backup selection is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | Uniquely identifies the body of a request to assign a set of resources+ -- to a backup plan.+ selectionId :: 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 'CreateBackupSelectionResponse' 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:+--+-- 'backupPlanId', 'createBackupSelectionResponse_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'creationDate', 'createBackupSelectionResponse_creationDate' - The date and time a backup selection is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'selectionId', 'createBackupSelectionResponse_selectionId' - Uniquely identifies the body of a request to assign a set of resources+-- to a backup plan.+--+-- 'httpStatus', 'createBackupSelectionResponse_httpStatus' - The response's http status code.+newCreateBackupSelectionResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateBackupSelectionResponse+newCreateBackupSelectionResponse pHttpStatus_ =+ CreateBackupSelectionResponse'+ { backupPlanId =+ Prelude.Nothing,+ creationDate = Prelude.Nothing,+ selectionId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Uniquely identifies a backup plan.+createBackupSelectionResponse_backupPlanId :: Lens.Lens' CreateBackupSelectionResponse (Prelude.Maybe Prelude.Text)+createBackupSelectionResponse_backupPlanId = Lens.lens (\CreateBackupSelectionResponse' {backupPlanId} -> backupPlanId) (\s@CreateBackupSelectionResponse' {} a -> s {backupPlanId = a} :: CreateBackupSelectionResponse)++-- | The date and time a backup selection is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+createBackupSelectionResponse_creationDate :: Lens.Lens' CreateBackupSelectionResponse (Prelude.Maybe Prelude.UTCTime)+createBackupSelectionResponse_creationDate = Lens.lens (\CreateBackupSelectionResponse' {creationDate} -> creationDate) (\s@CreateBackupSelectionResponse' {} a -> s {creationDate = a} :: CreateBackupSelectionResponse) Prelude.. Lens.mapping Data._Time++-- | Uniquely identifies the body of a request to assign a set of resources+-- to a backup plan.+createBackupSelectionResponse_selectionId :: Lens.Lens' CreateBackupSelectionResponse (Prelude.Maybe Prelude.Text)+createBackupSelectionResponse_selectionId = Lens.lens (\CreateBackupSelectionResponse' {selectionId} -> selectionId) (\s@CreateBackupSelectionResponse' {} a -> s {selectionId = a} :: CreateBackupSelectionResponse)++-- | The response's http status code.+createBackupSelectionResponse_httpStatus :: Lens.Lens' CreateBackupSelectionResponse Prelude.Int+createBackupSelectionResponse_httpStatus = Lens.lens (\CreateBackupSelectionResponse' {httpStatus} -> httpStatus) (\s@CreateBackupSelectionResponse' {} a -> s {httpStatus = a} :: CreateBackupSelectionResponse)++instance Prelude.NFData CreateBackupSelectionResponse where+ rnf CreateBackupSelectionResponse' {..} =+ Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf selectionId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/CreateBackupVault.hs view
@@ -0,0 +1,296 @@+{-# 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.Backup.CreateBackupVault+-- 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 logical container where backups are stored. A+-- @CreateBackupVault@ request includes a name, optionally one or more+-- resource tags, an encryption key, and a request ID.+--+-- Do not include sensitive data, such as passport numbers, in the name of+-- a backup vault.+module Amazonka.Backup.CreateBackupVault+ ( -- * Creating a Request+ CreateBackupVault (..),+ newCreateBackupVault,++ -- * Request Lenses+ createBackupVault_backupVaultTags,+ createBackupVault_creatorRequestId,+ createBackupVault_encryptionKeyArn,+ createBackupVault_backupVaultName,++ -- * Destructuring the Response+ CreateBackupVaultResponse (..),+ newCreateBackupVaultResponse,++ -- * Response Lenses+ createBackupVaultResponse_backupVaultArn,+ createBackupVaultResponse_backupVaultName,+ createBackupVaultResponse_creationDate,+ createBackupVaultResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newCreateBackupVault' smart constructor.+data CreateBackupVault = CreateBackupVault'+ { -- | Metadata that you can assign to help organize the resources that you+ -- create. Each tag is a key-value pair.+ backupVaultTags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),+ -- | A unique string that identifies the request and allows failed requests+ -- to be retried without the risk of running the operation twice. This+ -- parameter is optional.+ --+ -- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+ -- characters.+ creatorRequestId :: Prelude.Maybe Prelude.Text,+ -- | The server-side encryption key that is used to protect your backups; for+ -- example,+ -- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+ encryptionKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateBackupVault' 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:+--+-- 'backupVaultTags', 'createBackupVault_backupVaultTags' - Metadata that you can assign to help organize the resources that you+-- create. Each tag is a key-value pair.+--+-- 'creatorRequestId', 'createBackupVault_creatorRequestId' - A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+--+-- 'encryptionKeyArn', 'createBackupVault_encryptionKeyArn' - The server-side encryption key that is used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+--+-- 'backupVaultName', 'createBackupVault_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of letters, numbers, and hyphens.+newCreateBackupVault ::+ -- | 'backupVaultName'+ Prelude.Text ->+ CreateBackupVault+newCreateBackupVault pBackupVaultName_ =+ CreateBackupVault'+ { backupVaultTags =+ Prelude.Nothing,+ creatorRequestId = Prelude.Nothing,+ encryptionKeyArn = Prelude.Nothing,+ backupVaultName = pBackupVaultName_+ }++-- | Metadata that you can assign to help organize the resources that you+-- create. Each tag is a key-value pair.+createBackupVault_backupVaultTags :: Lens.Lens' CreateBackupVault (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createBackupVault_backupVaultTags = Lens.lens (\CreateBackupVault' {backupVaultTags} -> backupVaultTags) (\s@CreateBackupVault' {} a -> s {backupVaultTags = a} :: CreateBackupVault) Prelude.. Lens.mapping (Data._Sensitive Prelude.. Lens.coerced)++-- | A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+createBackupVault_creatorRequestId :: Lens.Lens' CreateBackupVault (Prelude.Maybe Prelude.Text)+createBackupVault_creatorRequestId = Lens.lens (\CreateBackupVault' {creatorRequestId} -> creatorRequestId) (\s@CreateBackupVault' {} a -> s {creatorRequestId = a} :: CreateBackupVault)++-- | The server-side encryption key that is used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+createBackupVault_encryptionKeyArn :: Lens.Lens' CreateBackupVault (Prelude.Maybe Prelude.Text)+createBackupVault_encryptionKeyArn = Lens.lens (\CreateBackupVault' {encryptionKeyArn} -> encryptionKeyArn) (\s@CreateBackupVault' {} a -> s {encryptionKeyArn = a} :: CreateBackupVault)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of letters, numbers, and hyphens.+createBackupVault_backupVaultName :: Lens.Lens' CreateBackupVault Prelude.Text+createBackupVault_backupVaultName = Lens.lens (\CreateBackupVault' {backupVaultName} -> backupVaultName) (\s@CreateBackupVault' {} a -> s {backupVaultName = a} :: CreateBackupVault)++instance Core.AWSRequest CreateBackupVault where+ type+ AWSResponse CreateBackupVault =+ CreateBackupVaultResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateBackupVaultResponse'+ Prelude.<$> (x Data..?> "BackupVaultArn")+ Prelude.<*> (x Data..?> "BackupVaultName")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateBackupVault where+ hashWithSalt _salt CreateBackupVault' {..} =+ _salt+ `Prelude.hashWithSalt` backupVaultTags+ `Prelude.hashWithSalt` creatorRequestId+ `Prelude.hashWithSalt` encryptionKeyArn+ `Prelude.hashWithSalt` backupVaultName++instance Prelude.NFData CreateBackupVault where+ rnf CreateBackupVault' {..} =+ Prelude.rnf backupVaultTags+ `Prelude.seq` Prelude.rnf creatorRequestId+ `Prelude.seq` Prelude.rnf encryptionKeyArn+ `Prelude.seq` Prelude.rnf backupVaultName++instance Data.ToHeaders CreateBackupVault where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateBackupVault where+ toJSON CreateBackupVault' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("BackupVaultTags" Data..=)+ Prelude.<$> backupVaultTags,+ ("CreatorRequestId" Data..=)+ Prelude.<$> creatorRequestId,+ ("EncryptionKeyArn" Data..=)+ Prelude.<$> encryptionKeyArn+ ]+ )++instance Data.ToPath CreateBackupVault where+ toPath CreateBackupVault' {..} =+ Prelude.mconcat+ ["/backup-vaults/", Data.toBS backupVaultName]++instance Data.ToQuery CreateBackupVault where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateBackupVaultResponse' smart constructor.+data CreateBackupVaultResponse = CreateBackupVaultResponse'+ { -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+ -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Region where they are created. They consist of lowercase+ -- letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | The date and time a backup vault is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateBackupVaultResponse' 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:+--+-- 'backupVaultArn', 'createBackupVaultResponse_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'backupVaultName', 'createBackupVaultResponse_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+--+-- 'creationDate', 'createBackupVaultResponse_creationDate' - The date and time a backup vault is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'httpStatus', 'createBackupVaultResponse_httpStatus' - The response's http status code.+newCreateBackupVaultResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateBackupVaultResponse+newCreateBackupVaultResponse pHttpStatus_ =+ CreateBackupVaultResponse'+ { backupVaultArn =+ Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+createBackupVaultResponse_backupVaultArn :: Lens.Lens' CreateBackupVaultResponse (Prelude.Maybe Prelude.Text)+createBackupVaultResponse_backupVaultArn = Lens.lens (\CreateBackupVaultResponse' {backupVaultArn} -> backupVaultArn) (\s@CreateBackupVaultResponse' {} a -> s {backupVaultArn = a} :: CreateBackupVaultResponse)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+createBackupVaultResponse_backupVaultName :: Lens.Lens' CreateBackupVaultResponse (Prelude.Maybe Prelude.Text)+createBackupVaultResponse_backupVaultName = Lens.lens (\CreateBackupVaultResponse' {backupVaultName} -> backupVaultName) (\s@CreateBackupVaultResponse' {} a -> s {backupVaultName = a} :: CreateBackupVaultResponse)++-- | The date and time a backup vault is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+createBackupVaultResponse_creationDate :: Lens.Lens' CreateBackupVaultResponse (Prelude.Maybe Prelude.UTCTime)+createBackupVaultResponse_creationDate = Lens.lens (\CreateBackupVaultResponse' {creationDate} -> creationDate) (\s@CreateBackupVaultResponse' {} a -> s {creationDate = a} :: CreateBackupVaultResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+createBackupVaultResponse_httpStatus :: Lens.Lens' CreateBackupVaultResponse Prelude.Int+createBackupVaultResponse_httpStatus = Lens.lens (\CreateBackupVaultResponse' {httpStatus} -> httpStatus) (\s@CreateBackupVaultResponse' {} a -> s {httpStatus = a} :: CreateBackupVaultResponse)++instance Prelude.NFData CreateBackupVaultResponse where+ rnf CreateBackupVaultResponse' {..} =+ Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/CreateFramework.hs view
@@ -0,0 +1,274 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.CreateFramework+-- 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 framework with one or more controls. A framework is a+-- collection of controls that you can use to evaluate your backup+-- practices. By using pre-built customizable controls to define your+-- policies, you can evaluate whether your backup practices comply with+-- your policies and which resources are not yet in compliance.+module Amazonka.Backup.CreateFramework+ ( -- * Creating a Request+ CreateFramework (..),+ newCreateFramework,++ -- * Request Lenses+ createFramework_frameworkDescription,+ createFramework_frameworkTags,+ createFramework_idempotencyToken,+ createFramework_frameworkName,+ createFramework_frameworkControls,++ -- * Destructuring the Response+ CreateFrameworkResponse (..),+ newCreateFrameworkResponse,++ -- * Response Lenses+ createFrameworkResponse_frameworkArn,+ createFrameworkResponse_frameworkName,+ createFrameworkResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newCreateFramework' smart constructor.+data CreateFramework = CreateFramework'+ { -- | An optional description of the framework with a maximum of 1,024+ -- characters.+ frameworkDescription :: Prelude.Maybe Prelude.Text,+ -- | Metadata that you can assign to help organize the frameworks that you+ -- create. Each tag is a key-value pair.+ frameworkTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | A customer-chosen string that you can use to distinguish between+ -- otherwise identical calls to @CreateFrameworkInput@. Retrying a+ -- successful request with the same idempotency token results in a success+ -- message with no action taken.+ idempotencyToken :: Prelude.Maybe Prelude.Text,+ -- | The unique name of the framework. The name must be between 1 and 256+ -- characters, starting with a letter, and consisting of letters (a-z,+ -- A-Z), numbers (0-9), and underscores (_).+ frameworkName :: Prelude.Text,+ -- | A list of the controls that make up the framework. Each control in the+ -- list has a name, input parameters, and scope.+ frameworkControls :: [FrameworkControl]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateFramework' 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:+--+-- 'frameworkDescription', 'createFramework_frameworkDescription' - An optional description of the framework with a maximum of 1,024+-- characters.+--+-- 'frameworkTags', 'createFramework_frameworkTags' - Metadata that you can assign to help organize the frameworks that you+-- create. Each tag is a key-value pair.+--+-- 'idempotencyToken', 'createFramework_idempotencyToken' - A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @CreateFrameworkInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+--+-- 'frameworkName', 'createFramework_frameworkName' - The unique name of the framework. The name must be between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+--+-- 'frameworkControls', 'createFramework_frameworkControls' - A list of the controls that make up the framework. Each control in the+-- list has a name, input parameters, and scope.+newCreateFramework ::+ -- | 'frameworkName'+ Prelude.Text ->+ CreateFramework+newCreateFramework pFrameworkName_ =+ CreateFramework'+ { frameworkDescription =+ Prelude.Nothing,+ frameworkTags = Prelude.Nothing,+ idempotencyToken = Prelude.Nothing,+ frameworkName = pFrameworkName_,+ frameworkControls = Prelude.mempty+ }++-- | An optional description of the framework with a maximum of 1,024+-- characters.+createFramework_frameworkDescription :: Lens.Lens' CreateFramework (Prelude.Maybe Prelude.Text)+createFramework_frameworkDescription = Lens.lens (\CreateFramework' {frameworkDescription} -> frameworkDescription) (\s@CreateFramework' {} a -> s {frameworkDescription = a} :: CreateFramework)++-- | Metadata that you can assign to help organize the frameworks that you+-- create. Each tag is a key-value pair.+createFramework_frameworkTags :: Lens.Lens' CreateFramework (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createFramework_frameworkTags = Lens.lens (\CreateFramework' {frameworkTags} -> frameworkTags) (\s@CreateFramework' {} a -> s {frameworkTags = a} :: CreateFramework) Prelude.. Lens.mapping Lens.coerced++-- | A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @CreateFrameworkInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+createFramework_idempotencyToken :: Lens.Lens' CreateFramework (Prelude.Maybe Prelude.Text)+createFramework_idempotencyToken = Lens.lens (\CreateFramework' {idempotencyToken} -> idempotencyToken) (\s@CreateFramework' {} a -> s {idempotencyToken = a} :: CreateFramework)++-- | The unique name of the framework. The name must be between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+createFramework_frameworkName :: Lens.Lens' CreateFramework Prelude.Text+createFramework_frameworkName = Lens.lens (\CreateFramework' {frameworkName} -> frameworkName) (\s@CreateFramework' {} a -> s {frameworkName = a} :: CreateFramework)++-- | A list of the controls that make up the framework. Each control in the+-- list has a name, input parameters, and scope.+createFramework_frameworkControls :: Lens.Lens' CreateFramework [FrameworkControl]+createFramework_frameworkControls = Lens.lens (\CreateFramework' {frameworkControls} -> frameworkControls) (\s@CreateFramework' {} a -> s {frameworkControls = a} :: CreateFramework) Prelude.. Lens.coerced++instance Core.AWSRequest CreateFramework where+ type+ AWSResponse CreateFramework =+ CreateFrameworkResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateFrameworkResponse'+ Prelude.<$> (x Data..?> "FrameworkArn")+ Prelude.<*> (x Data..?> "FrameworkName")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateFramework where+ hashWithSalt _salt CreateFramework' {..} =+ _salt+ `Prelude.hashWithSalt` frameworkDescription+ `Prelude.hashWithSalt` frameworkTags+ `Prelude.hashWithSalt` idempotencyToken+ `Prelude.hashWithSalt` frameworkName+ `Prelude.hashWithSalt` frameworkControls++instance Prelude.NFData CreateFramework where+ rnf CreateFramework' {..} =+ Prelude.rnf frameworkDescription+ `Prelude.seq` Prelude.rnf frameworkTags+ `Prelude.seq` Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf frameworkName+ `Prelude.seq` Prelude.rnf frameworkControls++instance Data.ToHeaders CreateFramework where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateFramework where+ toJSON CreateFramework' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("FrameworkDescription" Data..=)+ Prelude.<$> frameworkDescription,+ ("FrameworkTags" Data..=) Prelude.<$> frameworkTags,+ ("IdempotencyToken" Data..=)+ Prelude.<$> idempotencyToken,+ Prelude.Just ("FrameworkName" Data..= frameworkName),+ Prelude.Just+ ("FrameworkControls" Data..= frameworkControls)+ ]+ )++instance Data.ToPath CreateFramework where+ toPath = Prelude.const "/audit/frameworks"++instance Data.ToQuery CreateFramework where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateFrameworkResponse' smart constructor.+data CreateFrameworkResponse = CreateFrameworkResponse'+ { -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ frameworkArn :: Prelude.Maybe Prelude.Text,+ -- | The unique name of the framework. The name must be between 1 and 256+ -- characters, starting with a letter, and consisting of letters (a-z,+ -- A-Z), numbers (0-9), and underscores (_).+ frameworkName :: 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 'CreateFrameworkResponse' 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:+--+-- 'frameworkArn', 'createFrameworkResponse_frameworkArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'frameworkName', 'createFrameworkResponse_frameworkName' - The unique name of the framework. The name must be between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+--+-- 'httpStatus', 'createFrameworkResponse_httpStatus' - The response's http status code.+newCreateFrameworkResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateFrameworkResponse+newCreateFrameworkResponse pHttpStatus_ =+ CreateFrameworkResponse'+ { frameworkArn =+ Prelude.Nothing,+ frameworkName = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+createFrameworkResponse_frameworkArn :: Lens.Lens' CreateFrameworkResponse (Prelude.Maybe Prelude.Text)+createFrameworkResponse_frameworkArn = Lens.lens (\CreateFrameworkResponse' {frameworkArn} -> frameworkArn) (\s@CreateFrameworkResponse' {} a -> s {frameworkArn = a} :: CreateFrameworkResponse)++-- | The unique name of the framework. The name must be between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+createFrameworkResponse_frameworkName :: Lens.Lens' CreateFrameworkResponse (Prelude.Maybe Prelude.Text)+createFrameworkResponse_frameworkName = Lens.lens (\CreateFrameworkResponse' {frameworkName} -> frameworkName) (\s@CreateFrameworkResponse' {} a -> s {frameworkName = a} :: CreateFrameworkResponse)++-- | The response's http status code.+createFrameworkResponse_httpStatus :: Lens.Lens' CreateFrameworkResponse Prelude.Int+createFrameworkResponse_httpStatus = Lens.lens (\CreateFrameworkResponse' {httpStatus} -> httpStatus) (\s@CreateFrameworkResponse' {} a -> s {httpStatus = a} :: CreateFrameworkResponse)++instance Prelude.NFData CreateFrameworkResponse where+ rnf CreateFrameworkResponse' {..} =+ Prelude.rnf frameworkArn+ `Prelude.seq` Prelude.rnf frameworkName+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/CreateLegalHold.hs view
@@ -0,0 +1,332 @@+{-# 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.Backup.CreateLegalHold+-- 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 creates a legal hold on a recovery point (backup). A legal+-- hold is a restraint on altering or deleting a backup until an authorized+-- user cancels the legal hold. Any actions to delete or disassociate a+-- recovery point will fail with an error if one or more active legal holds+-- are on the recovery point.+module Amazonka.Backup.CreateLegalHold+ ( -- * Creating a Request+ CreateLegalHold (..),+ newCreateLegalHold,++ -- * Request Lenses+ createLegalHold_idempotencyToken,+ createLegalHold_recoveryPointSelection,+ createLegalHold_tags,+ createLegalHold_title,+ createLegalHold_description,++ -- * Destructuring the Response+ CreateLegalHoldResponse (..),+ newCreateLegalHoldResponse,++ -- * Response Lenses+ createLegalHoldResponse_creationDate,+ createLegalHoldResponse_description,+ createLegalHoldResponse_legalHoldArn,+ createLegalHoldResponse_legalHoldId,+ createLegalHoldResponse_recoveryPointSelection,+ createLegalHoldResponse_status,+ createLegalHoldResponse_title,+ createLegalHoldResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newCreateLegalHold' smart constructor.+data CreateLegalHold = CreateLegalHold'+ { -- | This is a user-chosen string used to distinguish between otherwise+ -- identical calls. Retrying a successful request with the same idempotency+ -- token results in a success message with no action taken.+ idempotencyToken :: Prelude.Maybe Prelude.Text,+ -- | This specifies criteria to assign a set of resources, such as resource+ -- types or backup vaults.+ recoveryPointSelection :: Prelude.Maybe RecoveryPointSelection,+ -- | Optional tags to include. A tag is 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: ++ -- - = . _ : \/.+ tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),+ -- | This is the string title of the legal hold.+ title :: Prelude.Text,+ -- | This is the string description of the legal hold.+ description :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateLegalHold' 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:+--+-- 'idempotencyToken', 'createLegalHold_idempotencyToken' - This is a user-chosen string used to distinguish between otherwise+-- identical calls. Retrying a successful request with the same idempotency+-- token results in a success message with no action taken.+--+-- 'recoveryPointSelection', 'createLegalHold_recoveryPointSelection' - This specifies criteria to assign a set of resources, such as resource+-- types or backup vaults.+--+-- 'tags', 'createLegalHold_tags' - Optional tags to include. A tag is 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: ++-- - = . _ : \/.+--+-- 'title', 'createLegalHold_title' - This is the string title of the legal hold.+--+-- 'description', 'createLegalHold_description' - This is the string description of the legal hold.+newCreateLegalHold ::+ -- | 'title'+ Prelude.Text ->+ -- | 'description'+ Prelude.Text ->+ CreateLegalHold+newCreateLegalHold pTitle_ pDescription_ =+ CreateLegalHold'+ { idempotencyToken =+ Prelude.Nothing,+ recoveryPointSelection = Prelude.Nothing,+ tags = Prelude.Nothing,+ title = pTitle_,+ description = pDescription_+ }++-- | This is a user-chosen string used to distinguish between otherwise+-- identical calls. Retrying a successful request with the same idempotency+-- token results in a success message with no action taken.+createLegalHold_idempotencyToken :: Lens.Lens' CreateLegalHold (Prelude.Maybe Prelude.Text)+createLegalHold_idempotencyToken = Lens.lens (\CreateLegalHold' {idempotencyToken} -> idempotencyToken) (\s@CreateLegalHold' {} a -> s {idempotencyToken = a} :: CreateLegalHold)++-- | This specifies criteria to assign a set of resources, such as resource+-- types or backup vaults.+createLegalHold_recoveryPointSelection :: Lens.Lens' CreateLegalHold (Prelude.Maybe RecoveryPointSelection)+createLegalHold_recoveryPointSelection = Lens.lens (\CreateLegalHold' {recoveryPointSelection} -> recoveryPointSelection) (\s@CreateLegalHold' {} a -> s {recoveryPointSelection = a} :: CreateLegalHold)++-- | Optional tags to include. A tag is 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: ++-- - = . _ : \/.+createLegalHold_tags :: Lens.Lens' CreateLegalHold (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createLegalHold_tags = Lens.lens (\CreateLegalHold' {tags} -> tags) (\s@CreateLegalHold' {} a -> s {tags = a} :: CreateLegalHold) Prelude.. Lens.mapping (Data._Sensitive Prelude.. Lens.coerced)++-- | This is the string title of the legal hold.+createLegalHold_title :: Lens.Lens' CreateLegalHold Prelude.Text+createLegalHold_title = Lens.lens (\CreateLegalHold' {title} -> title) (\s@CreateLegalHold' {} a -> s {title = a} :: CreateLegalHold)++-- | This is the string description of the legal hold.+createLegalHold_description :: Lens.Lens' CreateLegalHold Prelude.Text+createLegalHold_description = Lens.lens (\CreateLegalHold' {description} -> description) (\s@CreateLegalHold' {} a -> s {description = a} :: CreateLegalHold)++instance Core.AWSRequest CreateLegalHold where+ type+ AWSResponse CreateLegalHold =+ CreateLegalHoldResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateLegalHoldResponse'+ Prelude.<$> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "Description")+ Prelude.<*> (x Data..?> "LegalHoldArn")+ Prelude.<*> (x Data..?> "LegalHoldId")+ Prelude.<*> (x Data..?> "RecoveryPointSelection")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "Title")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateLegalHold where+ hashWithSalt _salt CreateLegalHold' {..} =+ _salt+ `Prelude.hashWithSalt` idempotencyToken+ `Prelude.hashWithSalt` recoveryPointSelection+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` title+ `Prelude.hashWithSalt` description++instance Prelude.NFData CreateLegalHold where+ rnf CreateLegalHold' {..} =+ Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf recoveryPointSelection+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf title+ `Prelude.seq` Prelude.rnf description++instance Data.ToHeaders CreateLegalHold where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateLegalHold where+ toJSON CreateLegalHold' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("IdempotencyToken" Data..=)+ Prelude.<$> idempotencyToken,+ ("RecoveryPointSelection" Data..=)+ Prelude.<$> recoveryPointSelection,+ ("Tags" Data..=) Prelude.<$> tags,+ Prelude.Just ("Title" Data..= title),+ Prelude.Just ("Description" Data..= description)+ ]+ )++instance Data.ToPath CreateLegalHold where+ toPath = Prelude.const "/legal-holds/"++instance Data.ToQuery CreateLegalHold where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateLegalHoldResponse' smart constructor.+data CreateLegalHoldResponse = CreateLegalHoldResponse'+ { -- | Time in number format when legal hold was created.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | This is the returned string description of the legal hold.+ description :: Prelude.Maybe Prelude.Text,+ -- | This is the ARN (Amazon Resource Number) of the created legal hold.+ legalHoldArn :: Prelude.Maybe Prelude.Text,+ -- | Legal hold ID returned for the specified legal hold on a recovery point.+ legalHoldId :: Prelude.Maybe Prelude.Text,+ -- | This specifies criteria to assign a set of resources, such as resource+ -- types or backup vaults.+ recoveryPointSelection :: Prelude.Maybe RecoveryPointSelection,+ -- | This displays the status of the legal hold returned after creating the+ -- legal hold. Statuses can be @ACTIVE@, @PENDING@, @CANCELED@,+ -- @CANCELING@, or @FAILED@.+ status :: Prelude.Maybe LegalHoldStatus,+ -- | This is the string title of the legal hold returned after creating the+ -- legal hold.+ title :: 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 'CreateLegalHoldResponse' 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:+--+-- 'creationDate', 'createLegalHoldResponse_creationDate' - Time in number format when legal hold was created.+--+-- 'description', 'createLegalHoldResponse_description' - This is the returned string description of the legal hold.+--+-- 'legalHoldArn', 'createLegalHoldResponse_legalHoldArn' - This is the ARN (Amazon Resource Number) of the created legal hold.+--+-- 'legalHoldId', 'createLegalHoldResponse_legalHoldId' - Legal hold ID returned for the specified legal hold on a recovery point.+--+-- 'recoveryPointSelection', 'createLegalHoldResponse_recoveryPointSelection' - This specifies criteria to assign a set of resources, such as resource+-- types or backup vaults.+--+-- 'status', 'createLegalHoldResponse_status' - This displays the status of the legal hold returned after creating the+-- legal hold. Statuses can be @ACTIVE@, @PENDING@, @CANCELED@,+-- @CANCELING@, or @FAILED@.+--+-- 'title', 'createLegalHoldResponse_title' - This is the string title of the legal hold returned after creating the+-- legal hold.+--+-- 'httpStatus', 'createLegalHoldResponse_httpStatus' - The response's http status code.+newCreateLegalHoldResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateLegalHoldResponse+newCreateLegalHoldResponse pHttpStatus_ =+ CreateLegalHoldResponse'+ { creationDate =+ Prelude.Nothing,+ description = Prelude.Nothing,+ legalHoldArn = Prelude.Nothing,+ legalHoldId = Prelude.Nothing,+ recoveryPointSelection = Prelude.Nothing,+ status = Prelude.Nothing,+ title = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Time in number format when legal hold was created.+createLegalHoldResponse_creationDate :: Lens.Lens' CreateLegalHoldResponse (Prelude.Maybe Prelude.UTCTime)+createLegalHoldResponse_creationDate = Lens.lens (\CreateLegalHoldResponse' {creationDate} -> creationDate) (\s@CreateLegalHoldResponse' {} a -> s {creationDate = a} :: CreateLegalHoldResponse) Prelude.. Lens.mapping Data._Time++-- | This is the returned string description of the legal hold.+createLegalHoldResponse_description :: Lens.Lens' CreateLegalHoldResponse (Prelude.Maybe Prelude.Text)+createLegalHoldResponse_description = Lens.lens (\CreateLegalHoldResponse' {description} -> description) (\s@CreateLegalHoldResponse' {} a -> s {description = a} :: CreateLegalHoldResponse)++-- | This is the ARN (Amazon Resource Number) of the created legal hold.+createLegalHoldResponse_legalHoldArn :: Lens.Lens' CreateLegalHoldResponse (Prelude.Maybe Prelude.Text)+createLegalHoldResponse_legalHoldArn = Lens.lens (\CreateLegalHoldResponse' {legalHoldArn} -> legalHoldArn) (\s@CreateLegalHoldResponse' {} a -> s {legalHoldArn = a} :: CreateLegalHoldResponse)++-- | Legal hold ID returned for the specified legal hold on a recovery point.+createLegalHoldResponse_legalHoldId :: Lens.Lens' CreateLegalHoldResponse (Prelude.Maybe Prelude.Text)+createLegalHoldResponse_legalHoldId = Lens.lens (\CreateLegalHoldResponse' {legalHoldId} -> legalHoldId) (\s@CreateLegalHoldResponse' {} a -> s {legalHoldId = a} :: CreateLegalHoldResponse)++-- | This specifies criteria to assign a set of resources, such as resource+-- types or backup vaults.+createLegalHoldResponse_recoveryPointSelection :: Lens.Lens' CreateLegalHoldResponse (Prelude.Maybe RecoveryPointSelection)+createLegalHoldResponse_recoveryPointSelection = Lens.lens (\CreateLegalHoldResponse' {recoveryPointSelection} -> recoveryPointSelection) (\s@CreateLegalHoldResponse' {} a -> s {recoveryPointSelection = a} :: CreateLegalHoldResponse)++-- | This displays the status of the legal hold returned after creating the+-- legal hold. Statuses can be @ACTIVE@, @PENDING@, @CANCELED@,+-- @CANCELING@, or @FAILED@.+createLegalHoldResponse_status :: Lens.Lens' CreateLegalHoldResponse (Prelude.Maybe LegalHoldStatus)+createLegalHoldResponse_status = Lens.lens (\CreateLegalHoldResponse' {status} -> status) (\s@CreateLegalHoldResponse' {} a -> s {status = a} :: CreateLegalHoldResponse)++-- | This is the string title of the legal hold returned after creating the+-- legal hold.+createLegalHoldResponse_title :: Lens.Lens' CreateLegalHoldResponse (Prelude.Maybe Prelude.Text)+createLegalHoldResponse_title = Lens.lens (\CreateLegalHoldResponse' {title} -> title) (\s@CreateLegalHoldResponse' {} a -> s {title = a} :: CreateLegalHoldResponse)++-- | The response's http status code.+createLegalHoldResponse_httpStatus :: Lens.Lens' CreateLegalHoldResponse Prelude.Int+createLegalHoldResponse_httpStatus = Lens.lens (\CreateLegalHoldResponse' {httpStatus} -> httpStatus) (\s@CreateLegalHoldResponse' {} a -> s {httpStatus = a} :: CreateLegalHoldResponse)++instance Prelude.NFData CreateLegalHoldResponse where+ rnf CreateLegalHoldResponse' {..} =+ Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf description+ `Prelude.seq` Prelude.rnf legalHoldArn+ `Prelude.seq` Prelude.rnf legalHoldId+ `Prelude.seq` Prelude.rnf recoveryPointSelection+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf title+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/CreateReportPlan.hs view
@@ -0,0 +1,339 @@+{-# 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.Backup.CreateReportPlan+-- 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 report plan. A report plan is a document that contains+-- information about the contents of the report and where Backup will+-- deliver it.+--+-- If you call @CreateReportPlan@ with a plan that already exists, you+-- receive an @AlreadyExistsException@ exception.+module Amazonka.Backup.CreateReportPlan+ ( -- * Creating a Request+ CreateReportPlan (..),+ newCreateReportPlan,++ -- * Request Lenses+ createReportPlan_idempotencyToken,+ createReportPlan_reportPlanDescription,+ createReportPlan_reportPlanTags,+ createReportPlan_reportPlanName,+ createReportPlan_reportDeliveryChannel,+ createReportPlan_reportSetting,++ -- * Destructuring the Response+ CreateReportPlanResponse (..),+ newCreateReportPlanResponse,++ -- * Response Lenses+ createReportPlanResponse_creationTime,+ createReportPlanResponse_reportPlanArn,+ createReportPlanResponse_reportPlanName,+ createReportPlanResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newCreateReportPlan' smart constructor.+data CreateReportPlan = CreateReportPlan'+ { -- | A customer-chosen string that you can use to distinguish between+ -- otherwise identical calls to @CreateReportPlanInput@. Retrying a+ -- successful request with the same idempotency token results in a success+ -- message with no action taken.+ idempotencyToken :: Prelude.Maybe Prelude.Text,+ -- | An optional description of the report plan with a maximum of 1,024+ -- characters.+ reportPlanDescription :: Prelude.Maybe Prelude.Text,+ -- | Metadata that you can assign to help organize the report plans that you+ -- create. Each tag is a key-value pair.+ reportPlanTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The unique name of the report plan. The name must be between 1 and 256+ -- characters, starting with a letter, and consisting of letters (a-z,+ -- A-Z), numbers (0-9), and underscores (_).+ reportPlanName :: Prelude.Text,+ -- | A structure that contains information about where and how to deliver+ -- your reports, specifically your Amazon S3 bucket name, S3 key prefix,+ -- and the formats of your reports.+ reportDeliveryChannel :: ReportDeliveryChannel,+ -- | Identifies the report template for the report. Reports are built using a+ -- report template. The report templates are:+ --+ -- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+ --+ -- If the report template is @RESOURCE_COMPLIANCE_REPORT@ or+ -- @CONTROL_COMPLIANCE_REPORT@, this API resource also describes the report+ -- coverage by Amazon Web Services Regions and frameworks.+ reportSetting :: ReportSetting+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateReportPlan' 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:+--+-- 'idempotencyToken', 'createReportPlan_idempotencyToken' - A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @CreateReportPlanInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+--+-- 'reportPlanDescription', 'createReportPlan_reportPlanDescription' - An optional description of the report plan with a maximum of 1,024+-- characters.+--+-- 'reportPlanTags', 'createReportPlan_reportPlanTags' - Metadata that you can assign to help organize the report plans that you+-- create. Each tag is a key-value pair.+--+-- 'reportPlanName', 'createReportPlan_reportPlanName' - The unique name of the report plan. The name must be between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+--+-- 'reportDeliveryChannel', 'createReportPlan_reportDeliveryChannel' - A structure that contains information about where and how to deliver+-- your reports, specifically your Amazon S3 bucket name, S3 key prefix,+-- and the formats of your reports.+--+-- 'reportSetting', 'createReportPlan_reportSetting' - Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+--+-- If the report template is @RESOURCE_COMPLIANCE_REPORT@ or+-- @CONTROL_COMPLIANCE_REPORT@, this API resource also describes the report+-- coverage by Amazon Web Services Regions and frameworks.+newCreateReportPlan ::+ -- | 'reportPlanName'+ Prelude.Text ->+ -- | 'reportDeliveryChannel'+ ReportDeliveryChannel ->+ -- | 'reportSetting'+ ReportSetting ->+ CreateReportPlan+newCreateReportPlan+ pReportPlanName_+ pReportDeliveryChannel_+ pReportSetting_ =+ CreateReportPlan'+ { idempotencyToken =+ Prelude.Nothing,+ reportPlanDescription = Prelude.Nothing,+ reportPlanTags = Prelude.Nothing,+ reportPlanName = pReportPlanName_,+ reportDeliveryChannel = pReportDeliveryChannel_,+ reportSetting = pReportSetting_+ }++-- | A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @CreateReportPlanInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+createReportPlan_idempotencyToken :: Lens.Lens' CreateReportPlan (Prelude.Maybe Prelude.Text)+createReportPlan_idempotencyToken = Lens.lens (\CreateReportPlan' {idempotencyToken} -> idempotencyToken) (\s@CreateReportPlan' {} a -> s {idempotencyToken = a} :: CreateReportPlan)++-- | An optional description of the report plan with a maximum of 1,024+-- characters.+createReportPlan_reportPlanDescription :: Lens.Lens' CreateReportPlan (Prelude.Maybe Prelude.Text)+createReportPlan_reportPlanDescription = Lens.lens (\CreateReportPlan' {reportPlanDescription} -> reportPlanDescription) (\s@CreateReportPlan' {} a -> s {reportPlanDescription = a} :: CreateReportPlan)++-- | Metadata that you can assign to help organize the report plans that you+-- create. Each tag is a key-value pair.+createReportPlan_reportPlanTags :: Lens.Lens' CreateReportPlan (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createReportPlan_reportPlanTags = Lens.lens (\CreateReportPlan' {reportPlanTags} -> reportPlanTags) (\s@CreateReportPlan' {} a -> s {reportPlanTags = a} :: CreateReportPlan) Prelude.. Lens.mapping Lens.coerced++-- | The unique name of the report plan. The name must be between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+createReportPlan_reportPlanName :: Lens.Lens' CreateReportPlan Prelude.Text+createReportPlan_reportPlanName = Lens.lens (\CreateReportPlan' {reportPlanName} -> reportPlanName) (\s@CreateReportPlan' {} a -> s {reportPlanName = a} :: CreateReportPlan)++-- | A structure that contains information about where and how to deliver+-- your reports, specifically your Amazon S3 bucket name, S3 key prefix,+-- and the formats of your reports.+createReportPlan_reportDeliveryChannel :: Lens.Lens' CreateReportPlan ReportDeliveryChannel+createReportPlan_reportDeliveryChannel = Lens.lens (\CreateReportPlan' {reportDeliveryChannel} -> reportDeliveryChannel) (\s@CreateReportPlan' {} a -> s {reportDeliveryChannel = a} :: CreateReportPlan)++-- | Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+--+-- If the report template is @RESOURCE_COMPLIANCE_REPORT@ or+-- @CONTROL_COMPLIANCE_REPORT@, this API resource also describes the report+-- coverage by Amazon Web Services Regions and frameworks.+createReportPlan_reportSetting :: Lens.Lens' CreateReportPlan ReportSetting+createReportPlan_reportSetting = Lens.lens (\CreateReportPlan' {reportSetting} -> reportSetting) (\s@CreateReportPlan' {} a -> s {reportSetting = a} :: CreateReportPlan)++instance Core.AWSRequest CreateReportPlan where+ type+ AWSResponse CreateReportPlan =+ CreateReportPlanResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateReportPlanResponse'+ Prelude.<$> (x Data..?> "CreationTime")+ Prelude.<*> (x Data..?> "ReportPlanArn")+ Prelude.<*> (x Data..?> "ReportPlanName")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateReportPlan where+ hashWithSalt _salt CreateReportPlan' {..} =+ _salt+ `Prelude.hashWithSalt` idempotencyToken+ `Prelude.hashWithSalt` reportPlanDescription+ `Prelude.hashWithSalt` reportPlanTags+ `Prelude.hashWithSalt` reportPlanName+ `Prelude.hashWithSalt` reportDeliveryChannel+ `Prelude.hashWithSalt` reportSetting++instance Prelude.NFData CreateReportPlan where+ rnf CreateReportPlan' {..} =+ Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf reportPlanDescription+ `Prelude.seq` Prelude.rnf reportPlanTags+ `Prelude.seq` Prelude.rnf reportPlanName+ `Prelude.seq` Prelude.rnf reportDeliveryChannel+ `Prelude.seq` Prelude.rnf reportSetting++instance Data.ToHeaders CreateReportPlan where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateReportPlan where+ toJSON CreateReportPlan' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("IdempotencyToken" Data..=)+ Prelude.<$> idempotencyToken,+ ("ReportPlanDescription" Data..=)+ Prelude.<$> reportPlanDescription,+ ("ReportPlanTags" Data..=)+ Prelude.<$> reportPlanTags,+ Prelude.Just+ ("ReportPlanName" Data..= reportPlanName),+ Prelude.Just+ ( "ReportDeliveryChannel"+ Data..= reportDeliveryChannel+ ),+ Prelude.Just+ ("ReportSetting" Data..= reportSetting)+ ]+ )++instance Data.ToPath CreateReportPlan where+ toPath = Prelude.const "/audit/report-plans"++instance Data.ToQuery CreateReportPlan where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateReportPlanResponse' smart constructor.+data CreateReportPlanResponse = CreateReportPlanResponse'+ { -- | The date and time a backup vault is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationTime@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ reportPlanArn :: Prelude.Maybe Prelude.Text,+ -- | The unique name of the report plan.+ reportPlanName :: 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 'CreateReportPlanResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTime', 'createReportPlanResponse_creationTime' - The date and time a backup vault is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'reportPlanArn', 'createReportPlanResponse_reportPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'reportPlanName', 'createReportPlanResponse_reportPlanName' - The unique name of the report plan.+--+-- 'httpStatus', 'createReportPlanResponse_httpStatus' - The response's http status code.+newCreateReportPlanResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateReportPlanResponse+newCreateReportPlanResponse pHttpStatus_ =+ CreateReportPlanResponse'+ { creationTime =+ Prelude.Nothing,+ reportPlanArn = Prelude.Nothing,+ reportPlanName = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The date and time a backup vault is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+createReportPlanResponse_creationTime :: Lens.Lens' CreateReportPlanResponse (Prelude.Maybe Prelude.UTCTime)+createReportPlanResponse_creationTime = Lens.lens (\CreateReportPlanResponse' {creationTime} -> creationTime) (\s@CreateReportPlanResponse' {} a -> s {creationTime = a} :: CreateReportPlanResponse) Prelude.. Lens.mapping Data._Time++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+createReportPlanResponse_reportPlanArn :: Lens.Lens' CreateReportPlanResponse (Prelude.Maybe Prelude.Text)+createReportPlanResponse_reportPlanArn = Lens.lens (\CreateReportPlanResponse' {reportPlanArn} -> reportPlanArn) (\s@CreateReportPlanResponse' {} a -> s {reportPlanArn = a} :: CreateReportPlanResponse)++-- | The unique name of the report plan.+createReportPlanResponse_reportPlanName :: Lens.Lens' CreateReportPlanResponse (Prelude.Maybe Prelude.Text)+createReportPlanResponse_reportPlanName = Lens.lens (\CreateReportPlanResponse' {reportPlanName} -> reportPlanName) (\s@CreateReportPlanResponse' {} a -> s {reportPlanName = a} :: CreateReportPlanResponse)++-- | The response's http status code.+createReportPlanResponse_httpStatus :: Lens.Lens' CreateReportPlanResponse Prelude.Int+createReportPlanResponse_httpStatus = Lens.lens (\CreateReportPlanResponse' {httpStatus} -> httpStatus) (\s@CreateReportPlanResponse' {} a -> s {httpStatus = a} :: CreateReportPlanResponse)++instance Prelude.NFData CreateReportPlanResponse where+ rnf CreateReportPlanResponse' {..} =+ Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf reportPlanArn+ `Prelude.seq` Prelude.rnf reportPlanName+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DeleteBackupPlan.hs view
@@ -0,0 +1,216 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.DeleteBackupPlan+-- 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 plan. A backup plan can only be deleted after all+-- associated selections of resources have been deleted. Deleting a backup+-- plan deletes the current version of a backup plan. Previous versions, if+-- any, will still exist.+module Amazonka.Backup.DeleteBackupPlan+ ( -- * Creating a Request+ DeleteBackupPlan (..),+ newDeleteBackupPlan,++ -- * Request Lenses+ deleteBackupPlan_backupPlanId,++ -- * Destructuring the Response+ DeleteBackupPlanResponse (..),+ newDeleteBackupPlanResponse,++ -- * Response Lenses+ deleteBackupPlanResponse_backupPlanArn,+ deleteBackupPlanResponse_backupPlanId,+ deleteBackupPlanResponse_deletionDate,+ deleteBackupPlanResponse_versionId,+ deleteBackupPlanResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDeleteBackupPlan' smart constructor.+data DeleteBackupPlan = DeleteBackupPlan'+ { -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupPlan' 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:+--+-- 'backupPlanId', 'deleteBackupPlan_backupPlanId' - Uniquely identifies a backup plan.+newDeleteBackupPlan ::+ -- | 'backupPlanId'+ Prelude.Text ->+ DeleteBackupPlan+newDeleteBackupPlan pBackupPlanId_ =+ DeleteBackupPlan' {backupPlanId = pBackupPlanId_}++-- | Uniquely identifies a backup plan.+deleteBackupPlan_backupPlanId :: Lens.Lens' DeleteBackupPlan Prelude.Text+deleteBackupPlan_backupPlanId = Lens.lens (\DeleteBackupPlan' {backupPlanId} -> backupPlanId) (\s@DeleteBackupPlan' {} a -> s {backupPlanId = a} :: DeleteBackupPlan)++instance Core.AWSRequest DeleteBackupPlan where+ type+ AWSResponse DeleteBackupPlan =+ DeleteBackupPlanResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteBackupPlanResponse'+ Prelude.<$> (x Data..?> "BackupPlanArn")+ Prelude.<*> (x Data..?> "BackupPlanId")+ Prelude.<*> (x Data..?> "DeletionDate")+ Prelude.<*> (x Data..?> "VersionId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteBackupPlan where+ hashWithSalt _salt DeleteBackupPlan' {..} =+ _salt `Prelude.hashWithSalt` backupPlanId++instance Prelude.NFData DeleteBackupPlan where+ rnf DeleteBackupPlan' {..} = Prelude.rnf backupPlanId++instance Data.ToHeaders DeleteBackupPlan where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteBackupPlan where+ toPath DeleteBackupPlan' {..} =+ Prelude.mconcat+ ["/backup/plans/", Data.toBS backupPlanId]++instance Data.ToQuery DeleteBackupPlan where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteBackupPlanResponse' smart constructor.+data DeleteBackupPlanResponse = DeleteBackupPlanResponse'+ { -- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+ backupPlanArn :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Maybe Prelude.Text,+ -- | The date and time a backup plan is deleted, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @DeletionDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ deletionDate :: Prelude.Maybe Data.POSIX,+ -- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+ -- most 1,024 bytes long. Version IDs cannot be edited.+ versionId :: 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 'DeleteBackupPlanResponse' 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:+--+-- 'backupPlanArn', 'deleteBackupPlanResponse_backupPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+--+-- 'backupPlanId', 'deleteBackupPlanResponse_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'deletionDate', 'deleteBackupPlanResponse_deletionDate' - The date and time a backup plan is deleted, in Unix format and+-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'versionId', 'deleteBackupPlanResponse_versionId' - Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version IDs cannot be edited.+--+-- 'httpStatus', 'deleteBackupPlanResponse_httpStatus' - The response's http status code.+newDeleteBackupPlanResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteBackupPlanResponse+newDeleteBackupPlanResponse pHttpStatus_ =+ DeleteBackupPlanResponse'+ { backupPlanArn =+ Prelude.Nothing,+ backupPlanId = Prelude.Nothing,+ deletionDate = Prelude.Nothing,+ versionId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+deleteBackupPlanResponse_backupPlanArn :: Lens.Lens' DeleteBackupPlanResponse (Prelude.Maybe Prelude.Text)+deleteBackupPlanResponse_backupPlanArn = Lens.lens (\DeleteBackupPlanResponse' {backupPlanArn} -> backupPlanArn) (\s@DeleteBackupPlanResponse' {} a -> s {backupPlanArn = a} :: DeleteBackupPlanResponse)++-- | Uniquely identifies a backup plan.+deleteBackupPlanResponse_backupPlanId :: Lens.Lens' DeleteBackupPlanResponse (Prelude.Maybe Prelude.Text)+deleteBackupPlanResponse_backupPlanId = Lens.lens (\DeleteBackupPlanResponse' {backupPlanId} -> backupPlanId) (\s@DeleteBackupPlanResponse' {} a -> s {backupPlanId = a} :: DeleteBackupPlanResponse)++-- | The date and time a backup plan is deleted, in Unix format and+-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+deleteBackupPlanResponse_deletionDate :: Lens.Lens' DeleteBackupPlanResponse (Prelude.Maybe Prelude.UTCTime)+deleteBackupPlanResponse_deletionDate = Lens.lens (\DeleteBackupPlanResponse' {deletionDate} -> deletionDate) (\s@DeleteBackupPlanResponse' {} a -> s {deletionDate = a} :: DeleteBackupPlanResponse) Prelude.. Lens.mapping Data._Time++-- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version IDs cannot be edited.+deleteBackupPlanResponse_versionId :: Lens.Lens' DeleteBackupPlanResponse (Prelude.Maybe Prelude.Text)+deleteBackupPlanResponse_versionId = Lens.lens (\DeleteBackupPlanResponse' {versionId} -> versionId) (\s@DeleteBackupPlanResponse' {} a -> s {versionId = a} :: DeleteBackupPlanResponse)++-- | The response's http status code.+deleteBackupPlanResponse_httpStatus :: Lens.Lens' DeleteBackupPlanResponse Prelude.Int+deleteBackupPlanResponse_httpStatus = Lens.lens (\DeleteBackupPlanResponse' {httpStatus} -> httpStatus) (\s@DeleteBackupPlanResponse' {} a -> s {httpStatus = a} :: DeleteBackupPlanResponse)++instance Prelude.NFData DeleteBackupPlanResponse where+ rnf DeleteBackupPlanResponse' {..} =+ Prelude.rnf backupPlanArn+ `Prelude.seq` Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf deletionDate+ `Prelude.seq` Prelude.rnf versionId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DeleteBackupSelection.hs view
@@ -0,0 +1,151 @@+{-# 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.Backup.DeleteBackupSelection+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the resource selection associated with a backup plan that is+-- specified by the @SelectionId@.+module Amazonka.Backup.DeleteBackupSelection+ ( -- * Creating a Request+ DeleteBackupSelection (..),+ newDeleteBackupSelection,++ -- * Request Lenses+ deleteBackupSelection_backupPlanId,+ deleteBackupSelection_selectionId,++ -- * Destructuring the Response+ DeleteBackupSelectionResponse (..),+ newDeleteBackupSelectionResponse,+ )+where++import Amazonka.Backup.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:/ 'newDeleteBackupSelection' smart constructor.+data DeleteBackupSelection = DeleteBackupSelection'+ { -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Text,+ -- | Uniquely identifies the body of a request to assign a set of resources+ -- to a backup plan.+ selectionId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupSelection' 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:+--+-- 'backupPlanId', 'deleteBackupSelection_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'selectionId', 'deleteBackupSelection_selectionId' - Uniquely identifies the body of a request to assign a set of resources+-- to a backup plan.+newDeleteBackupSelection ::+ -- | 'backupPlanId'+ Prelude.Text ->+ -- | 'selectionId'+ Prelude.Text ->+ DeleteBackupSelection+newDeleteBackupSelection pBackupPlanId_ pSelectionId_ =+ DeleteBackupSelection'+ { backupPlanId =+ pBackupPlanId_,+ selectionId = pSelectionId_+ }++-- | Uniquely identifies a backup plan.+deleteBackupSelection_backupPlanId :: Lens.Lens' DeleteBackupSelection Prelude.Text+deleteBackupSelection_backupPlanId = Lens.lens (\DeleteBackupSelection' {backupPlanId} -> backupPlanId) (\s@DeleteBackupSelection' {} a -> s {backupPlanId = a} :: DeleteBackupSelection)++-- | Uniquely identifies the body of a request to assign a set of resources+-- to a backup plan.+deleteBackupSelection_selectionId :: Lens.Lens' DeleteBackupSelection Prelude.Text+deleteBackupSelection_selectionId = Lens.lens (\DeleteBackupSelection' {selectionId} -> selectionId) (\s@DeleteBackupSelection' {} a -> s {selectionId = a} :: DeleteBackupSelection)++instance Core.AWSRequest DeleteBackupSelection where+ type+ AWSResponse DeleteBackupSelection =+ DeleteBackupSelectionResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull DeleteBackupSelectionResponse'++instance Prelude.Hashable DeleteBackupSelection where+ hashWithSalt _salt DeleteBackupSelection' {..} =+ _salt+ `Prelude.hashWithSalt` backupPlanId+ `Prelude.hashWithSalt` selectionId++instance Prelude.NFData DeleteBackupSelection where+ rnf DeleteBackupSelection' {..} =+ Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf selectionId++instance Data.ToHeaders DeleteBackupSelection where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteBackupSelection where+ toPath DeleteBackupSelection' {..} =+ Prelude.mconcat+ [ "/backup/plans/",+ Data.toBS backupPlanId,+ "/selections/",+ Data.toBS selectionId+ ]++instance Data.ToQuery DeleteBackupSelection where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteBackupSelectionResponse' smart constructor.+data DeleteBackupSelectionResponse = DeleteBackupSelectionResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupSelectionResponse' 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.+newDeleteBackupSelectionResponse ::+ DeleteBackupSelectionResponse+newDeleteBackupSelectionResponse =+ DeleteBackupSelectionResponse'++instance Prelude.NFData DeleteBackupSelectionResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/DeleteBackupVault.hs view
@@ -0,0 +1,138 @@+{-# 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.Backup.DeleteBackupVault+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the backup vault identified by its name. A vault can be deleted+-- only if it is empty.+module Amazonka.Backup.DeleteBackupVault+ ( -- * Creating a Request+ DeleteBackupVault (..),+ newDeleteBackupVault,++ -- * Request Lenses+ deleteBackupVault_backupVaultName,++ -- * Destructuring the Response+ DeleteBackupVaultResponse (..),+ newDeleteBackupVaultResponse,+ )+where++import Amazonka.Backup.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:/ 'newDeleteBackupVault' smart constructor.+data DeleteBackupVault = DeleteBackupVault'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupVault' 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:+--+-- 'backupVaultName', 'deleteBackupVault_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+newDeleteBackupVault ::+ -- | 'backupVaultName'+ Prelude.Text ->+ DeleteBackupVault+newDeleteBackupVault pBackupVaultName_ =+ DeleteBackupVault'+ { backupVaultName =+ pBackupVaultName_+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+deleteBackupVault_backupVaultName :: Lens.Lens' DeleteBackupVault Prelude.Text+deleteBackupVault_backupVaultName = Lens.lens (\DeleteBackupVault' {backupVaultName} -> backupVaultName) (\s@DeleteBackupVault' {} a -> s {backupVaultName = a} :: DeleteBackupVault)++instance Core.AWSRequest DeleteBackupVault where+ type+ AWSResponse DeleteBackupVault =+ DeleteBackupVaultResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull DeleteBackupVaultResponse'++instance Prelude.Hashable DeleteBackupVault where+ hashWithSalt _salt DeleteBackupVault' {..} =+ _salt `Prelude.hashWithSalt` backupVaultName++instance Prelude.NFData DeleteBackupVault where+ rnf DeleteBackupVault' {..} =+ Prelude.rnf backupVaultName++instance Data.ToHeaders DeleteBackupVault where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteBackupVault where+ toPath DeleteBackupVault' {..} =+ Prelude.mconcat+ ["/backup-vaults/", Data.toBS backupVaultName]++instance Data.ToQuery DeleteBackupVault where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteBackupVaultResponse' smart constructor.+data DeleteBackupVaultResponse = DeleteBackupVaultResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupVaultResponse' 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.+newDeleteBackupVaultResponse ::+ DeleteBackupVaultResponse+newDeleteBackupVaultResponse =+ DeleteBackupVaultResponse'++instance Prelude.NFData DeleteBackupVaultResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/DeleteBackupVaultAccessPolicy.hs view
@@ -0,0 +1,150 @@+{-# 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.Backup.DeleteBackupVaultAccessPolicy+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the policy document that manages permissions on a backup vault.+module Amazonka.Backup.DeleteBackupVaultAccessPolicy+ ( -- * Creating a Request+ DeleteBackupVaultAccessPolicy (..),+ newDeleteBackupVaultAccessPolicy,++ -- * Request Lenses+ deleteBackupVaultAccessPolicy_backupVaultName,++ -- * Destructuring the Response+ DeleteBackupVaultAccessPolicyResponse (..),+ newDeleteBackupVaultAccessPolicyResponse,+ )+where++import Amazonka.Backup.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:/ 'newDeleteBackupVaultAccessPolicy' smart constructor.+data DeleteBackupVaultAccessPolicy = DeleteBackupVaultAccessPolicy'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupVaultAccessPolicy' 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:+--+-- 'backupVaultName', 'deleteBackupVaultAccessPolicy_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+newDeleteBackupVaultAccessPolicy ::+ -- | 'backupVaultName'+ Prelude.Text ->+ DeleteBackupVaultAccessPolicy+newDeleteBackupVaultAccessPolicy pBackupVaultName_ =+ DeleteBackupVaultAccessPolicy'+ { backupVaultName =+ pBackupVaultName_+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+deleteBackupVaultAccessPolicy_backupVaultName :: Lens.Lens' DeleteBackupVaultAccessPolicy Prelude.Text+deleteBackupVaultAccessPolicy_backupVaultName = Lens.lens (\DeleteBackupVaultAccessPolicy' {backupVaultName} -> backupVaultName) (\s@DeleteBackupVaultAccessPolicy' {} a -> s {backupVaultName = a} :: DeleteBackupVaultAccessPolicy)++instance+ Core.AWSRequest+ DeleteBackupVaultAccessPolicy+ where+ type+ AWSResponse DeleteBackupVaultAccessPolicy =+ DeleteBackupVaultAccessPolicyResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull+ DeleteBackupVaultAccessPolicyResponse'++instance+ Prelude.Hashable+ DeleteBackupVaultAccessPolicy+ where+ hashWithSalt _salt DeleteBackupVaultAccessPolicy' {..} =+ _salt `Prelude.hashWithSalt` backupVaultName++instance Prelude.NFData DeleteBackupVaultAccessPolicy where+ rnf DeleteBackupVaultAccessPolicy' {..} =+ Prelude.rnf backupVaultName++instance Data.ToHeaders DeleteBackupVaultAccessPolicy where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteBackupVaultAccessPolicy where+ toPath DeleteBackupVaultAccessPolicy' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/access-policy"+ ]++instance Data.ToQuery DeleteBackupVaultAccessPolicy where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteBackupVaultAccessPolicyResponse' smart constructor.+data DeleteBackupVaultAccessPolicyResponse = DeleteBackupVaultAccessPolicyResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupVaultAccessPolicyResponse' 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.+newDeleteBackupVaultAccessPolicyResponse ::+ DeleteBackupVaultAccessPolicyResponse+newDeleteBackupVaultAccessPolicyResponse =+ DeleteBackupVaultAccessPolicyResponse'++instance+ Prelude.NFData+ DeleteBackupVaultAccessPolicyResponse+ where+ rnf _ = ()
+ gen/Amazonka/Backup/DeleteBackupVaultLockConfiguration.hs view
@@ -0,0 +1,164 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.DeleteBackupVaultLockConfiguration+-- 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 Backup Vault Lock from a backup vault specified by a backup+-- vault name.+--+-- If the Vault Lock configuration is immutable, then you cannot delete+-- Vault Lock using API operations, and you will receive an+-- @InvalidRequestException@ if you attempt to do so. For more information,+-- see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/vault-lock.html Vault Lock>+-- in the /Backup Developer Guide/.+module Amazonka.Backup.DeleteBackupVaultLockConfiguration+ ( -- * Creating a Request+ DeleteBackupVaultLockConfiguration (..),+ newDeleteBackupVaultLockConfiguration,++ -- * Request Lenses+ deleteBackupVaultLockConfiguration_backupVaultName,++ -- * Destructuring the Response+ DeleteBackupVaultLockConfigurationResponse (..),+ newDeleteBackupVaultLockConfigurationResponse,+ )+where++import Amazonka.Backup.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:/ 'newDeleteBackupVaultLockConfiguration' smart constructor.+data DeleteBackupVaultLockConfiguration = DeleteBackupVaultLockConfiguration'+ { -- | The name of the backup vault from which to delete Backup Vault Lock.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupVaultLockConfiguration' 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:+--+-- 'backupVaultName', 'deleteBackupVaultLockConfiguration_backupVaultName' - The name of the backup vault from which to delete Backup Vault Lock.+newDeleteBackupVaultLockConfiguration ::+ -- | 'backupVaultName'+ Prelude.Text ->+ DeleteBackupVaultLockConfiguration+newDeleteBackupVaultLockConfiguration+ pBackupVaultName_ =+ DeleteBackupVaultLockConfiguration'+ { backupVaultName =+ pBackupVaultName_+ }++-- | The name of the backup vault from which to delete Backup Vault Lock.+deleteBackupVaultLockConfiguration_backupVaultName :: Lens.Lens' DeleteBackupVaultLockConfiguration Prelude.Text+deleteBackupVaultLockConfiguration_backupVaultName = Lens.lens (\DeleteBackupVaultLockConfiguration' {backupVaultName} -> backupVaultName) (\s@DeleteBackupVaultLockConfiguration' {} a -> s {backupVaultName = a} :: DeleteBackupVaultLockConfiguration)++instance+ Core.AWSRequest+ DeleteBackupVaultLockConfiguration+ where+ type+ AWSResponse DeleteBackupVaultLockConfiguration =+ DeleteBackupVaultLockConfigurationResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull+ DeleteBackupVaultLockConfigurationResponse'++instance+ Prelude.Hashable+ DeleteBackupVaultLockConfiguration+ where+ hashWithSalt+ _salt+ DeleteBackupVaultLockConfiguration' {..} =+ _salt `Prelude.hashWithSalt` backupVaultName++instance+ Prelude.NFData+ DeleteBackupVaultLockConfiguration+ where+ rnf DeleteBackupVaultLockConfiguration' {..} =+ Prelude.rnf backupVaultName++instance+ Data.ToHeaders+ DeleteBackupVaultLockConfiguration+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance+ Data.ToPath+ DeleteBackupVaultLockConfiguration+ where+ toPath DeleteBackupVaultLockConfiguration' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/vault-lock"+ ]++instance+ Data.ToQuery+ DeleteBackupVaultLockConfiguration+ where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteBackupVaultLockConfigurationResponse' smart constructor.+data DeleteBackupVaultLockConfigurationResponse = DeleteBackupVaultLockConfigurationResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupVaultLockConfigurationResponse' 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.+newDeleteBackupVaultLockConfigurationResponse ::+ DeleteBackupVaultLockConfigurationResponse+newDeleteBackupVaultLockConfigurationResponse =+ DeleteBackupVaultLockConfigurationResponse'++instance+ Prelude.NFData+ DeleteBackupVaultLockConfigurationResponse+ where+ rnf _ = ()
+ gen/Amazonka/Backup/DeleteBackupVaultNotifications.hs view
@@ -0,0 +1,158 @@+{-# 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.Backup.DeleteBackupVaultNotifications+-- 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 event notifications for the specified backup vault.+module Amazonka.Backup.DeleteBackupVaultNotifications+ ( -- * Creating a Request+ DeleteBackupVaultNotifications (..),+ newDeleteBackupVaultNotifications,++ -- * Request Lenses+ deleteBackupVaultNotifications_backupVaultName,++ -- * Destructuring the Response+ DeleteBackupVaultNotificationsResponse (..),+ newDeleteBackupVaultNotificationsResponse,+ )+where++import Amazonka.Backup.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:/ 'newDeleteBackupVaultNotifications' smart constructor.+data DeleteBackupVaultNotifications = DeleteBackupVaultNotifications'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Region where they are created. They consist of lowercase+ -- letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupVaultNotifications' 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:+--+-- 'backupVaultName', 'deleteBackupVaultNotifications_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+newDeleteBackupVaultNotifications ::+ -- | 'backupVaultName'+ Prelude.Text ->+ DeleteBackupVaultNotifications+newDeleteBackupVaultNotifications pBackupVaultName_ =+ DeleteBackupVaultNotifications'+ { backupVaultName =+ pBackupVaultName_+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+deleteBackupVaultNotifications_backupVaultName :: Lens.Lens' DeleteBackupVaultNotifications Prelude.Text+deleteBackupVaultNotifications_backupVaultName = Lens.lens (\DeleteBackupVaultNotifications' {backupVaultName} -> backupVaultName) (\s@DeleteBackupVaultNotifications' {} a -> s {backupVaultName = a} :: DeleteBackupVaultNotifications)++instance+ Core.AWSRequest+ DeleteBackupVaultNotifications+ where+ type+ AWSResponse DeleteBackupVaultNotifications =+ DeleteBackupVaultNotificationsResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull+ DeleteBackupVaultNotificationsResponse'++instance+ Prelude.Hashable+ DeleteBackupVaultNotifications+ where+ hashWithSalt+ _salt+ DeleteBackupVaultNotifications' {..} =+ _salt `Prelude.hashWithSalt` backupVaultName++instance+ Prelude.NFData+ DeleteBackupVaultNotifications+ where+ rnf DeleteBackupVaultNotifications' {..} =+ Prelude.rnf backupVaultName++instance+ Data.ToHeaders+ DeleteBackupVaultNotifications+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteBackupVaultNotifications where+ toPath DeleteBackupVaultNotifications' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/notification-configuration"+ ]++instance Data.ToQuery DeleteBackupVaultNotifications where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteBackupVaultNotificationsResponse' smart constructor.+data DeleteBackupVaultNotificationsResponse = DeleteBackupVaultNotificationsResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteBackupVaultNotificationsResponse' 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.+newDeleteBackupVaultNotificationsResponse ::+ DeleteBackupVaultNotificationsResponse+newDeleteBackupVaultNotificationsResponse =+ DeleteBackupVaultNotificationsResponse'++instance+ Prelude.NFData+ DeleteBackupVaultNotificationsResponse+ where+ rnf _ = ()
+ gen/Amazonka/Backup/DeleteFramework.hs view
@@ -0,0 +1,123 @@+{-# 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.Backup.DeleteFramework+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the framework specified by a framework name.+module Amazonka.Backup.DeleteFramework+ ( -- * Creating a Request+ DeleteFramework (..),+ newDeleteFramework,++ -- * Request Lenses+ deleteFramework_frameworkName,++ -- * Destructuring the Response+ DeleteFrameworkResponse (..),+ newDeleteFrameworkResponse,+ )+where++import Amazonka.Backup.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:/ 'newDeleteFramework' smart constructor.+data DeleteFramework = DeleteFramework'+ { -- | The unique name of a framework.+ frameworkName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteFramework' 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:+--+-- 'frameworkName', 'deleteFramework_frameworkName' - The unique name of a framework.+newDeleteFramework ::+ -- | 'frameworkName'+ Prelude.Text ->+ DeleteFramework+newDeleteFramework pFrameworkName_ =+ DeleteFramework' {frameworkName = pFrameworkName_}++-- | The unique name of a framework.+deleteFramework_frameworkName :: Lens.Lens' DeleteFramework Prelude.Text+deleteFramework_frameworkName = Lens.lens (\DeleteFramework' {frameworkName} -> frameworkName) (\s@DeleteFramework' {} a -> s {frameworkName = a} :: DeleteFramework)++instance Core.AWSRequest DeleteFramework where+ type+ AWSResponse DeleteFramework =+ DeleteFrameworkResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull DeleteFrameworkResponse'++instance Prelude.Hashable DeleteFramework where+ hashWithSalt _salt DeleteFramework' {..} =+ _salt `Prelude.hashWithSalt` frameworkName++instance Prelude.NFData DeleteFramework where+ rnf DeleteFramework' {..} = Prelude.rnf frameworkName++instance Data.ToHeaders DeleteFramework where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteFramework where+ toPath DeleteFramework' {..} =+ Prelude.mconcat+ ["/audit/frameworks/", Data.toBS frameworkName]++instance Data.ToQuery DeleteFramework where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteFrameworkResponse' smart constructor.+data DeleteFrameworkResponse = DeleteFrameworkResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteFrameworkResponse' 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.+newDeleteFrameworkResponse ::+ DeleteFrameworkResponse+newDeleteFrameworkResponse = DeleteFrameworkResponse'++instance Prelude.NFData DeleteFrameworkResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/DeleteRecoveryPoint.hs view
@@ -0,0 +1,181 @@+{-# 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.Backup.DeleteRecoveryPoint+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the recovery point specified by a recovery point ID.+--+-- If the recovery point ID belongs to a continuous backup, calling this+-- endpoint deletes the existing continuous backup and stops future+-- continuous backup.+--+-- When an IAM role\'s permissions are insufficient to call this API, the+-- service sends back an HTTP 200 response with an empty HTTP body, but the+-- recovery point is not deleted. Instead, it enters an @EXPIRED@ state.+--+-- @EXPIRED@ recovery points can be deleted with this API once the IAM role+-- has the @iam:CreateServiceLinkedRole@ action. To learn more about adding+-- this role, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/deleting-backups.html#deleting-backups-troubleshooting Troubleshooting manual deletions>.+--+-- If the user or role is deleted or the permission within the role is+-- removed, the deletion will not be successful and will enter an @EXPIRED@+-- state.+module Amazonka.Backup.DeleteRecoveryPoint+ ( -- * Creating a Request+ DeleteRecoveryPoint (..),+ newDeleteRecoveryPoint,++ -- * Request Lenses+ deleteRecoveryPoint_backupVaultName,+ deleteRecoveryPoint_recoveryPointArn,++ -- * Destructuring the Response+ DeleteRecoveryPointResponse (..),+ newDeleteRecoveryPointResponse,+ )+where++import Amazonka.Backup.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:/ 'newDeleteRecoveryPoint' smart constructor.+data DeleteRecoveryPoint = DeleteRecoveryPoint'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRecoveryPoint' 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:+--+-- 'backupVaultName', 'deleteRecoveryPoint_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'recoveryPointArn', 'deleteRecoveryPoint_recoveryPointArn' - An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+newDeleteRecoveryPoint ::+ -- | 'backupVaultName'+ Prelude.Text ->+ -- | 'recoveryPointArn'+ Prelude.Text ->+ DeleteRecoveryPoint+newDeleteRecoveryPoint+ pBackupVaultName_+ pRecoveryPointArn_ =+ DeleteRecoveryPoint'+ { backupVaultName =+ pBackupVaultName_,+ recoveryPointArn = pRecoveryPointArn_+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+deleteRecoveryPoint_backupVaultName :: Lens.Lens' DeleteRecoveryPoint Prelude.Text+deleteRecoveryPoint_backupVaultName = Lens.lens (\DeleteRecoveryPoint' {backupVaultName} -> backupVaultName) (\s@DeleteRecoveryPoint' {} a -> s {backupVaultName = a} :: DeleteRecoveryPoint)++-- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+deleteRecoveryPoint_recoveryPointArn :: Lens.Lens' DeleteRecoveryPoint Prelude.Text+deleteRecoveryPoint_recoveryPointArn = Lens.lens (\DeleteRecoveryPoint' {recoveryPointArn} -> recoveryPointArn) (\s@DeleteRecoveryPoint' {} a -> s {recoveryPointArn = a} :: DeleteRecoveryPoint)++instance Core.AWSRequest DeleteRecoveryPoint where+ type+ AWSResponse DeleteRecoveryPoint =+ DeleteRecoveryPointResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull DeleteRecoveryPointResponse'++instance Prelude.Hashable DeleteRecoveryPoint where+ hashWithSalt _salt DeleteRecoveryPoint' {..} =+ _salt+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` recoveryPointArn++instance Prelude.NFData DeleteRecoveryPoint where+ rnf DeleteRecoveryPoint' {..} =+ Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf recoveryPointArn++instance Data.ToHeaders DeleteRecoveryPoint where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteRecoveryPoint where+ toPath DeleteRecoveryPoint' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/recovery-points/",+ Data.toBS recoveryPointArn+ ]++instance Data.ToQuery DeleteRecoveryPoint where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteRecoveryPointResponse' smart constructor.+data DeleteRecoveryPointResponse = DeleteRecoveryPointResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRecoveryPointResponse' 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.+newDeleteRecoveryPointResponse ::+ DeleteRecoveryPointResponse+newDeleteRecoveryPointResponse =+ DeleteRecoveryPointResponse'++instance Prelude.NFData DeleteRecoveryPointResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/DeleteReportPlan.hs view
@@ -0,0 +1,128 @@+{-# 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.Backup.DeleteReportPlan+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the report plan specified by a report plan name.+module Amazonka.Backup.DeleteReportPlan+ ( -- * Creating a Request+ DeleteReportPlan (..),+ newDeleteReportPlan,++ -- * Request Lenses+ deleteReportPlan_reportPlanName,++ -- * Destructuring the Response+ DeleteReportPlanResponse (..),+ newDeleteReportPlanResponse,+ )+where++import Amazonka.Backup.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:/ 'newDeleteReportPlan' smart constructor.+data DeleteReportPlan = DeleteReportPlan'+ { -- | The unique name of a report plan.+ reportPlanName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteReportPlan' 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:+--+-- 'reportPlanName', 'deleteReportPlan_reportPlanName' - The unique name of a report plan.+newDeleteReportPlan ::+ -- | 'reportPlanName'+ Prelude.Text ->+ DeleteReportPlan+newDeleteReportPlan pReportPlanName_ =+ DeleteReportPlan'+ { reportPlanName =+ pReportPlanName_+ }++-- | The unique name of a report plan.+deleteReportPlan_reportPlanName :: Lens.Lens' DeleteReportPlan Prelude.Text+deleteReportPlan_reportPlanName = Lens.lens (\DeleteReportPlan' {reportPlanName} -> reportPlanName) (\s@DeleteReportPlan' {} a -> s {reportPlanName = a} :: DeleteReportPlan)++instance Core.AWSRequest DeleteReportPlan where+ type+ AWSResponse DeleteReportPlan =+ DeleteReportPlanResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull DeleteReportPlanResponse'++instance Prelude.Hashable DeleteReportPlan where+ hashWithSalt _salt DeleteReportPlan' {..} =+ _salt `Prelude.hashWithSalt` reportPlanName++instance Prelude.NFData DeleteReportPlan where+ rnf DeleteReportPlan' {..} =+ Prelude.rnf reportPlanName++instance Data.ToHeaders DeleteReportPlan where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteReportPlan where+ toPath DeleteReportPlan' {..} =+ Prelude.mconcat+ ["/audit/report-plans/", Data.toBS reportPlanName]++instance Data.ToQuery DeleteReportPlan where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteReportPlanResponse' smart constructor.+data DeleteReportPlanResponse = DeleteReportPlanResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteReportPlanResponse' 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.+newDeleteReportPlanResponse ::+ DeleteReportPlanResponse+newDeleteReportPlanResponse =+ DeleteReportPlanResponse'++instance Prelude.NFData DeleteReportPlanResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/DescribeBackupJob.hs view
@@ -0,0 +1,545 @@+{-# 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.Backup.DescribeBackupJob+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns backup job details for the specified @BackupJobId@.+module Amazonka.Backup.DescribeBackupJob+ ( -- * Creating a Request+ DescribeBackupJob (..),+ newDescribeBackupJob,++ -- * Request Lenses+ describeBackupJob_backupJobId,++ -- * Destructuring the Response+ DescribeBackupJobResponse (..),+ newDescribeBackupJobResponse,++ -- * Response Lenses+ describeBackupJobResponse_accountId,+ describeBackupJobResponse_backupJobId,+ describeBackupJobResponse_backupOptions,+ describeBackupJobResponse_backupSizeInBytes,+ describeBackupJobResponse_backupType,+ describeBackupJobResponse_backupVaultArn,+ describeBackupJobResponse_backupVaultName,+ describeBackupJobResponse_bytesTransferred,+ describeBackupJobResponse_childJobsInState,+ describeBackupJobResponse_completionDate,+ describeBackupJobResponse_createdBy,+ describeBackupJobResponse_creationDate,+ describeBackupJobResponse_expectedCompletionDate,+ describeBackupJobResponse_iamRoleArn,+ describeBackupJobResponse_isParent,+ describeBackupJobResponse_numberOfChildJobs,+ describeBackupJobResponse_parentJobId,+ describeBackupJobResponse_percentDone,+ describeBackupJobResponse_recoveryPointArn,+ describeBackupJobResponse_resourceArn,+ describeBackupJobResponse_resourceType,+ describeBackupJobResponse_startBy,+ describeBackupJobResponse_state,+ describeBackupJobResponse_statusMessage,+ describeBackupJobResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeBackupJob' smart constructor.+data DescribeBackupJob = DescribeBackupJob'+ { -- | Uniquely identifies a request to Backup to back up a resource.+ backupJobId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeBackupJob' 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:+--+-- 'backupJobId', 'describeBackupJob_backupJobId' - Uniquely identifies a request to Backup to back up a resource.+newDescribeBackupJob ::+ -- | 'backupJobId'+ Prelude.Text ->+ DescribeBackupJob+newDescribeBackupJob pBackupJobId_ =+ DescribeBackupJob' {backupJobId = pBackupJobId_}++-- | Uniquely identifies a request to Backup to back up a resource.+describeBackupJob_backupJobId :: Lens.Lens' DescribeBackupJob Prelude.Text+describeBackupJob_backupJobId = Lens.lens (\DescribeBackupJob' {backupJobId} -> backupJobId) (\s@DescribeBackupJob' {} a -> s {backupJobId = a} :: DescribeBackupJob)++instance Core.AWSRequest DescribeBackupJob where+ type+ AWSResponse DescribeBackupJob =+ DescribeBackupJobResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeBackupJobResponse'+ Prelude.<$> (x Data..?> "AccountId")+ Prelude.<*> (x Data..?> "BackupJobId")+ Prelude.<*> (x Data..?> "BackupOptions" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "BackupSizeInBytes")+ Prelude.<*> (x Data..?> "BackupType")+ Prelude.<*> (x Data..?> "BackupVaultArn")+ Prelude.<*> (x Data..?> "BackupVaultName")+ Prelude.<*> (x Data..?> "BytesTransferred")+ Prelude.<*> ( x+ Data..?> "ChildJobsInState"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "CompletionDate")+ Prelude.<*> (x Data..?> "CreatedBy")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "ExpectedCompletionDate")+ Prelude.<*> (x Data..?> "IamRoleArn")+ Prelude.<*> (x Data..?> "IsParent")+ Prelude.<*> (x Data..?> "NumberOfChildJobs")+ Prelude.<*> (x Data..?> "ParentJobId")+ Prelude.<*> (x Data..?> "PercentDone")+ Prelude.<*> (x Data..?> "RecoveryPointArn")+ Prelude.<*> (x Data..?> "ResourceArn")+ Prelude.<*> (x Data..?> "ResourceType")+ Prelude.<*> (x Data..?> "StartBy")+ Prelude.<*> (x Data..?> "State")+ Prelude.<*> (x Data..?> "StatusMessage")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeBackupJob where+ hashWithSalt _salt DescribeBackupJob' {..} =+ _salt `Prelude.hashWithSalt` backupJobId++instance Prelude.NFData DescribeBackupJob where+ rnf DescribeBackupJob' {..} = Prelude.rnf backupJobId++instance Data.ToHeaders DescribeBackupJob where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeBackupJob where+ toPath DescribeBackupJob' {..} =+ Prelude.mconcat+ ["/backup-jobs/", Data.toBS backupJobId]++instance Data.ToQuery DescribeBackupJob where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeBackupJobResponse' smart constructor.+data DescribeBackupJobResponse = DescribeBackupJobResponse'+ { -- | Returns the account ID that owns the backup job.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a request to Backup to back up a resource.+ backupJobId :: Prelude.Maybe Prelude.Text,+ -- | Represents the options specified as part of backup plan or on-demand+ -- backup job.+ backupOptions :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The size, in bytes, of a backup.+ backupSizeInBytes :: Prelude.Maybe Prelude.Integer,+ -- | Represents the actual backup type selected for a backup job. For+ -- example, if a successful Windows Volume Shadow Copy Service (VSS) backup+ -- was taken, @BackupType@ returns @\"WindowsVSS\"@. If @BackupType@ is+ -- empty, then the backup type was a regular backup.+ backupType :: Prelude.Maybe Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+ -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | The size in bytes transferred to a backup vault at the time that the job+ -- status was queried.+ bytesTransferred :: Prelude.Maybe Prelude.Integer,+ -- | This returns the statistics of the included child (nested) backup jobs.+ childJobsInState :: Prelude.Maybe (Prelude.HashMap BackupJobState Prelude.Integer),+ -- | The date and time that a job to create a backup job is completed, in+ -- Unix format and Coordinated Universal Time (UTC). The value of+ -- @CompletionDate@ is accurate to milliseconds. For example, the value+ -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+ completionDate :: Prelude.Maybe Data.POSIX,+ -- | Contains identifying information about the creation of a backup job,+ -- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+ -- @BackupRuleId@ of the backup plan that is used to create it.+ createdBy :: Prelude.Maybe RecoveryPointCreator,+ -- | The date and time that a backup job is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The date and time that a job to back up resources is expected to be+ -- completed, in Unix format and Coordinated Universal Time (UTC). The+ -- value of @ExpectedCompletionDate@ is accurate to milliseconds. For+ -- example, the value 1516925490.087 represents Friday, January 26, 2018+ -- 12:11:30.087 AM.+ expectedCompletionDate :: Prelude.Maybe Data.POSIX,+ -- | Specifies the IAM role ARN used to create the target recovery point; for+ -- example, @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | This returns the boolean value that a backup job is a parent (composite)+ -- job.+ isParent :: Prelude.Maybe Prelude.Bool,+ -- | This returns the number of child (nested) backup jobs.+ numberOfChildJobs :: Prelude.Maybe Prelude.Integer,+ -- | This returns the parent (composite) resource backup job ID.+ parentJobId :: Prelude.Maybe Prelude.Text,+ -- | Contains an estimated percentage that is complete of a job at the time+ -- the job status was queried.+ percentDone :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a saved resource. The format of the ARN+ -- depends on the resource type.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | The type of Amazon Web Services resource to be backed up; for example,+ -- an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon+ -- Relational Database Service (Amazon RDS) database.+ resourceType :: Prelude.Maybe Prelude.Text,+ -- | Specifies the time in Unix format and Coordinated Universal Time (UTC)+ -- when a backup job must be started before it is canceled. The value is+ -- calculated by adding the start window to the scheduled time. So if the+ -- scheduled time were 6:00 PM and the start window is 2 hours, the+ -- @StartBy@ time would be 8:00 PM on the date specified. The value of+ -- @StartBy@ is accurate to milliseconds. For example, the value+ -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+ startBy :: Prelude.Maybe Data.POSIX,+ -- | The current state of a resource recovery point.+ state :: Prelude.Maybe BackupJobState,+ -- | A detailed message explaining the status of the job to back up a+ -- resource.+ statusMessage :: 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 'DescribeBackupJobResponse' 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:+--+-- 'accountId', 'describeBackupJobResponse_accountId' - Returns the account ID that owns the backup job.+--+-- 'backupJobId', 'describeBackupJobResponse_backupJobId' - Uniquely identifies a request to Backup to back up a resource.+--+-- 'backupOptions', 'describeBackupJobResponse_backupOptions' - Represents the options specified as part of backup plan or on-demand+-- backup job.+--+-- 'backupSizeInBytes', 'describeBackupJobResponse_backupSizeInBytes' - The size, in bytes, of a backup.+--+-- 'backupType', 'describeBackupJobResponse_backupType' - Represents the actual backup type selected for a backup job. For+-- example, if a successful Windows Volume Shadow Copy Service (VSS) backup+-- was taken, @BackupType@ returns @\"WindowsVSS\"@. If @BackupType@ is+-- empty, then the backup type was a regular backup.+--+-- 'backupVaultArn', 'describeBackupJobResponse_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'backupVaultName', 'describeBackupJobResponse_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'bytesTransferred', 'describeBackupJobResponse_bytesTransferred' - The size in bytes transferred to a backup vault at the time that the job+-- status was queried.+--+-- 'childJobsInState', 'describeBackupJobResponse_childJobsInState' - This returns the statistics of the included child (nested) backup jobs.+--+-- 'completionDate', 'describeBackupJobResponse_completionDate' - The date and time that a job to create a backup job is completed, in+-- Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'createdBy', 'describeBackupJobResponse_createdBy' - Contains identifying information about the creation of a backup job,+-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+-- @BackupRuleId@ of the backup plan that is used to create it.+--+-- 'creationDate', 'describeBackupJobResponse_creationDate' - The date and time that a backup job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'expectedCompletionDate', 'describeBackupJobResponse_expectedCompletionDate' - The date and time that a job to back up resources is expected to be+-- completed, in Unix format and Coordinated Universal Time (UTC). The+-- value of @ExpectedCompletionDate@ is accurate to milliseconds. For+-- example, the value 1516925490.087 represents Friday, January 26, 2018+-- 12:11:30.087 AM.+--+-- 'iamRoleArn', 'describeBackupJobResponse_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+--+-- 'isParent', 'describeBackupJobResponse_isParent' - This returns the boolean value that a backup job is a parent (composite)+-- job.+--+-- 'numberOfChildJobs', 'describeBackupJobResponse_numberOfChildJobs' - This returns the number of child (nested) backup jobs.+--+-- 'parentJobId', 'describeBackupJobResponse_parentJobId' - This returns the parent (composite) resource backup job ID.+--+-- 'percentDone', 'describeBackupJobResponse_percentDone' - Contains an estimated percentage that is complete of a job at the time+-- the job status was queried.+--+-- 'recoveryPointArn', 'describeBackupJobResponse_recoveryPointArn' - An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'resourceArn', 'describeBackupJobResponse_resourceArn' - An ARN that uniquely identifies a saved resource. The format of the ARN+-- depends on the resource type.+--+-- 'resourceType', 'describeBackupJobResponse_resourceType' - The type of Amazon Web Services resource to be backed up; for example,+-- an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon+-- Relational Database Service (Amazon RDS) database.+--+-- 'startBy', 'describeBackupJobResponse_startBy' - Specifies the time in Unix format and Coordinated Universal Time (UTC)+-- when a backup job must be started before it is canceled. The value is+-- calculated by adding the start window to the scheduled time. So if the+-- scheduled time were 6:00 PM and the start window is 2 hours, the+-- @StartBy@ time would be 8:00 PM on the date specified. The value of+-- @StartBy@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'state', 'describeBackupJobResponse_state' - The current state of a resource recovery point.+--+-- 'statusMessage', 'describeBackupJobResponse_statusMessage' - A detailed message explaining the status of the job to back up a+-- resource.+--+-- 'httpStatus', 'describeBackupJobResponse_httpStatus' - The response's http status code.+newDescribeBackupJobResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeBackupJobResponse+newDescribeBackupJobResponse pHttpStatus_ =+ DescribeBackupJobResponse'+ { accountId =+ Prelude.Nothing,+ backupJobId = Prelude.Nothing,+ backupOptions = Prelude.Nothing,+ backupSizeInBytes = Prelude.Nothing,+ backupType = Prelude.Nothing,+ backupVaultArn = Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ bytesTransferred = Prelude.Nothing,+ childJobsInState = Prelude.Nothing,+ completionDate = Prelude.Nothing,+ createdBy = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ expectedCompletionDate = Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ isParent = Prelude.Nothing,+ numberOfChildJobs = Prelude.Nothing,+ parentJobId = Prelude.Nothing,+ percentDone = Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ resourceArn = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ startBy = Prelude.Nothing,+ state = Prelude.Nothing,+ statusMessage = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Returns the account ID that owns the backup job.+describeBackupJobResponse_accountId :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_accountId = Lens.lens (\DescribeBackupJobResponse' {accountId} -> accountId) (\s@DescribeBackupJobResponse' {} a -> s {accountId = a} :: DescribeBackupJobResponse)++-- | Uniquely identifies a request to Backup to back up a resource.+describeBackupJobResponse_backupJobId :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_backupJobId = Lens.lens (\DescribeBackupJobResponse' {backupJobId} -> backupJobId) (\s@DescribeBackupJobResponse' {} a -> s {backupJobId = a} :: DescribeBackupJobResponse)++-- | Represents the options specified as part of backup plan or on-demand+-- backup job.+describeBackupJobResponse_backupOptions :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+describeBackupJobResponse_backupOptions = Lens.lens (\DescribeBackupJobResponse' {backupOptions} -> backupOptions) (\s@DescribeBackupJobResponse' {} a -> s {backupOptions = a} :: DescribeBackupJobResponse) Prelude.. Lens.mapping Lens.coerced++-- | The size, in bytes, of a backup.+describeBackupJobResponse_backupSizeInBytes :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Integer)+describeBackupJobResponse_backupSizeInBytes = Lens.lens (\DescribeBackupJobResponse' {backupSizeInBytes} -> backupSizeInBytes) (\s@DescribeBackupJobResponse' {} a -> s {backupSizeInBytes = a} :: DescribeBackupJobResponse)++-- | Represents the actual backup type selected for a backup job. For+-- example, if a successful Windows Volume Shadow Copy Service (VSS) backup+-- was taken, @BackupType@ returns @\"WindowsVSS\"@. If @BackupType@ is+-- empty, then the backup type was a regular backup.+describeBackupJobResponse_backupType :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_backupType = Lens.lens (\DescribeBackupJobResponse' {backupType} -> backupType) (\s@DescribeBackupJobResponse' {} a -> s {backupType = a} :: DescribeBackupJobResponse)++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+describeBackupJobResponse_backupVaultArn :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_backupVaultArn = Lens.lens (\DescribeBackupJobResponse' {backupVaultArn} -> backupVaultArn) (\s@DescribeBackupJobResponse' {} a -> s {backupVaultArn = a} :: DescribeBackupJobResponse)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+describeBackupJobResponse_backupVaultName :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_backupVaultName = Lens.lens (\DescribeBackupJobResponse' {backupVaultName} -> backupVaultName) (\s@DescribeBackupJobResponse' {} a -> s {backupVaultName = a} :: DescribeBackupJobResponse)++-- | The size in bytes transferred to a backup vault at the time that the job+-- status was queried.+describeBackupJobResponse_bytesTransferred :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Integer)+describeBackupJobResponse_bytesTransferred = Lens.lens (\DescribeBackupJobResponse' {bytesTransferred} -> bytesTransferred) (\s@DescribeBackupJobResponse' {} a -> s {bytesTransferred = a} :: DescribeBackupJobResponse)++-- | This returns the statistics of the included child (nested) backup jobs.+describeBackupJobResponse_childJobsInState :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe (Prelude.HashMap BackupJobState Prelude.Integer))+describeBackupJobResponse_childJobsInState = Lens.lens (\DescribeBackupJobResponse' {childJobsInState} -> childJobsInState) (\s@DescribeBackupJobResponse' {} a -> s {childJobsInState = a} :: DescribeBackupJobResponse) Prelude.. Lens.mapping Lens.coerced++-- | The date and time that a job to create a backup job is completed, in+-- Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+describeBackupJobResponse_completionDate :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.UTCTime)+describeBackupJobResponse_completionDate = Lens.lens (\DescribeBackupJobResponse' {completionDate} -> completionDate) (\s@DescribeBackupJobResponse' {} a -> s {completionDate = a} :: DescribeBackupJobResponse) Prelude.. Lens.mapping Data._Time++-- | Contains identifying information about the creation of a backup job,+-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+-- @BackupRuleId@ of the backup plan that is used to create it.+describeBackupJobResponse_createdBy :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe RecoveryPointCreator)+describeBackupJobResponse_createdBy = Lens.lens (\DescribeBackupJobResponse' {createdBy} -> createdBy) (\s@DescribeBackupJobResponse' {} a -> s {createdBy = a} :: DescribeBackupJobResponse)++-- | The date and time that a backup job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+describeBackupJobResponse_creationDate :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.UTCTime)+describeBackupJobResponse_creationDate = Lens.lens (\DescribeBackupJobResponse' {creationDate} -> creationDate) (\s@DescribeBackupJobResponse' {} a -> s {creationDate = a} :: DescribeBackupJobResponse) Prelude.. Lens.mapping Data._Time++-- | The date and time that a job to back up resources is expected to be+-- completed, in Unix format and Coordinated Universal Time (UTC). The+-- value of @ExpectedCompletionDate@ is accurate to milliseconds. For+-- example, the value 1516925490.087 represents Friday, January 26, 2018+-- 12:11:30.087 AM.+describeBackupJobResponse_expectedCompletionDate :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.UTCTime)+describeBackupJobResponse_expectedCompletionDate = Lens.lens (\DescribeBackupJobResponse' {expectedCompletionDate} -> expectedCompletionDate) (\s@DescribeBackupJobResponse' {} a -> s {expectedCompletionDate = a} :: DescribeBackupJobResponse) Prelude.. Lens.mapping Data._Time++-- | Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+describeBackupJobResponse_iamRoleArn :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_iamRoleArn = Lens.lens (\DescribeBackupJobResponse' {iamRoleArn} -> iamRoleArn) (\s@DescribeBackupJobResponse' {} a -> s {iamRoleArn = a} :: DescribeBackupJobResponse)++-- | This returns the boolean value that a backup job is a parent (composite)+-- job.+describeBackupJobResponse_isParent :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Bool)+describeBackupJobResponse_isParent = Lens.lens (\DescribeBackupJobResponse' {isParent} -> isParent) (\s@DescribeBackupJobResponse' {} a -> s {isParent = a} :: DescribeBackupJobResponse)++-- | This returns the number of child (nested) backup jobs.+describeBackupJobResponse_numberOfChildJobs :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Integer)+describeBackupJobResponse_numberOfChildJobs = Lens.lens (\DescribeBackupJobResponse' {numberOfChildJobs} -> numberOfChildJobs) (\s@DescribeBackupJobResponse' {} a -> s {numberOfChildJobs = a} :: DescribeBackupJobResponse)++-- | This returns the parent (composite) resource backup job ID.+describeBackupJobResponse_parentJobId :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_parentJobId = Lens.lens (\DescribeBackupJobResponse' {parentJobId} -> parentJobId) (\s@DescribeBackupJobResponse' {} a -> s {parentJobId = a} :: DescribeBackupJobResponse)++-- | Contains an estimated percentage that is complete of a job at the time+-- the job status was queried.+describeBackupJobResponse_percentDone :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_percentDone = Lens.lens (\DescribeBackupJobResponse' {percentDone} -> percentDone) (\s@DescribeBackupJobResponse' {} a -> s {percentDone = a} :: DescribeBackupJobResponse)++-- | An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+describeBackupJobResponse_recoveryPointArn :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_recoveryPointArn = Lens.lens (\DescribeBackupJobResponse' {recoveryPointArn} -> recoveryPointArn) (\s@DescribeBackupJobResponse' {} a -> s {recoveryPointArn = a} :: DescribeBackupJobResponse)++-- | An ARN that uniquely identifies a saved resource. The format of the ARN+-- depends on the resource type.+describeBackupJobResponse_resourceArn :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_resourceArn = Lens.lens (\DescribeBackupJobResponse' {resourceArn} -> resourceArn) (\s@DescribeBackupJobResponse' {} a -> s {resourceArn = a} :: DescribeBackupJobResponse)++-- | The type of Amazon Web Services resource to be backed up; for example,+-- an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon+-- Relational Database Service (Amazon RDS) database.+describeBackupJobResponse_resourceType :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_resourceType = Lens.lens (\DescribeBackupJobResponse' {resourceType} -> resourceType) (\s@DescribeBackupJobResponse' {} a -> s {resourceType = a} :: DescribeBackupJobResponse)++-- | Specifies the time in Unix format and Coordinated Universal Time (UTC)+-- when a backup job must be started before it is canceled. The value is+-- calculated by adding the start window to the scheduled time. So if the+-- scheduled time were 6:00 PM and the start window is 2 hours, the+-- @StartBy@ time would be 8:00 PM on the date specified. The value of+-- @StartBy@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+describeBackupJobResponse_startBy :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.UTCTime)+describeBackupJobResponse_startBy = Lens.lens (\DescribeBackupJobResponse' {startBy} -> startBy) (\s@DescribeBackupJobResponse' {} a -> s {startBy = a} :: DescribeBackupJobResponse) Prelude.. Lens.mapping Data._Time++-- | The current state of a resource recovery point.+describeBackupJobResponse_state :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe BackupJobState)+describeBackupJobResponse_state = Lens.lens (\DescribeBackupJobResponse' {state} -> state) (\s@DescribeBackupJobResponse' {} a -> s {state = a} :: DescribeBackupJobResponse)++-- | A detailed message explaining the status of the job to back up a+-- resource.+describeBackupJobResponse_statusMessage :: Lens.Lens' DescribeBackupJobResponse (Prelude.Maybe Prelude.Text)+describeBackupJobResponse_statusMessage = Lens.lens (\DescribeBackupJobResponse' {statusMessage} -> statusMessage) (\s@DescribeBackupJobResponse' {} a -> s {statusMessage = a} :: DescribeBackupJobResponse)++-- | The response's http status code.+describeBackupJobResponse_httpStatus :: Lens.Lens' DescribeBackupJobResponse Prelude.Int+describeBackupJobResponse_httpStatus = Lens.lens (\DescribeBackupJobResponse' {httpStatus} -> httpStatus) (\s@DescribeBackupJobResponse' {} a -> s {httpStatus = a} :: DescribeBackupJobResponse)++instance Prelude.NFData DescribeBackupJobResponse where+ rnf DescribeBackupJobResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf backupJobId+ `Prelude.seq` Prelude.rnf backupOptions+ `Prelude.seq` Prelude.rnf backupSizeInBytes+ `Prelude.seq` Prelude.rnf backupType+ `Prelude.seq` Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf bytesTransferred+ `Prelude.seq` Prelude.rnf childJobsInState+ `Prelude.seq` Prelude.rnf completionDate+ `Prelude.seq` Prelude.rnf createdBy+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf expectedCompletionDate+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf isParent+ `Prelude.seq` Prelude.rnf numberOfChildJobs+ `Prelude.seq` Prelude.rnf parentJobId+ `Prelude.seq` Prelude.rnf percentDone+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf startBy+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf+ statusMessage+ `Prelude.seq` Prelude.rnf+ httpStatus
+ gen/Amazonka/Backup/DescribeBackupVault.hs view
@@ -0,0 +1,406 @@+{-# 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.Backup.DescribeBackupVault+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns metadata about a backup vault specified by its name.+module Amazonka.Backup.DescribeBackupVault+ ( -- * Creating a Request+ DescribeBackupVault (..),+ newDescribeBackupVault,++ -- * Request Lenses+ describeBackupVault_backupVaultName,++ -- * Destructuring the Response+ DescribeBackupVaultResponse (..),+ newDescribeBackupVaultResponse,++ -- * Response Lenses+ describeBackupVaultResponse_backupVaultArn,+ describeBackupVaultResponse_backupVaultName,+ describeBackupVaultResponse_creationDate,+ describeBackupVaultResponse_creatorRequestId,+ describeBackupVaultResponse_encryptionKeyArn,+ describeBackupVaultResponse_lockDate,+ describeBackupVaultResponse_locked,+ describeBackupVaultResponse_maxRetentionDays,+ describeBackupVaultResponse_minRetentionDays,+ describeBackupVaultResponse_numberOfRecoveryPoints,+ describeBackupVaultResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeBackupVault' smart constructor.+data DescribeBackupVault = DescribeBackupVault'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeBackupVault' 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:+--+-- 'backupVaultName', 'describeBackupVault_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+newDescribeBackupVault ::+ -- | 'backupVaultName'+ Prelude.Text ->+ DescribeBackupVault+newDescribeBackupVault pBackupVaultName_ =+ DescribeBackupVault'+ { backupVaultName =+ pBackupVaultName_+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+describeBackupVault_backupVaultName :: Lens.Lens' DescribeBackupVault Prelude.Text+describeBackupVault_backupVaultName = Lens.lens (\DescribeBackupVault' {backupVaultName} -> backupVaultName) (\s@DescribeBackupVault' {} a -> s {backupVaultName = a} :: DescribeBackupVault)++instance Core.AWSRequest DescribeBackupVault where+ type+ AWSResponse DescribeBackupVault =+ DescribeBackupVaultResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeBackupVaultResponse'+ Prelude.<$> (x Data..?> "BackupVaultArn")+ Prelude.<*> (x Data..?> "BackupVaultName")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "CreatorRequestId")+ Prelude.<*> (x Data..?> "EncryptionKeyArn")+ Prelude.<*> (x Data..?> "LockDate")+ Prelude.<*> (x Data..?> "Locked")+ Prelude.<*> (x Data..?> "MaxRetentionDays")+ Prelude.<*> (x Data..?> "MinRetentionDays")+ Prelude.<*> (x Data..?> "NumberOfRecoveryPoints")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeBackupVault where+ hashWithSalt _salt DescribeBackupVault' {..} =+ _salt `Prelude.hashWithSalt` backupVaultName++instance Prelude.NFData DescribeBackupVault where+ rnf DescribeBackupVault' {..} =+ Prelude.rnf backupVaultName++instance Data.ToHeaders DescribeBackupVault where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeBackupVault where+ toPath DescribeBackupVault' {..} =+ Prelude.mconcat+ ["/backup-vaults/", Data.toBS backupVaultName]++instance Data.ToQuery DescribeBackupVault where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeBackupVaultResponse' smart constructor.+data DescribeBackupVaultResponse = DescribeBackupVaultResponse'+ { -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+ -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Region where they are created. They consist of lowercase+ -- letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | The date and time that a backup vault is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | A unique string that identifies the request and allows failed requests+ -- to be retried without the risk of running the operation twice.+ creatorRequestId :: Prelude.Maybe Prelude.Text,+ -- | The server-side encryption key that is used to protect your backups; for+ -- example,+ -- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+ encryptionKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The date and time when Backup Vault Lock configuration cannot be changed+ -- or deleted.+ --+ -- If you applied Vault Lock to your vault without specifying a lock date,+ -- you can change any of your Vault Lock settings, or delete Vault Lock+ -- from the vault entirely, at any time.+ --+ -- This value is in Unix format, Coordinated Universal Time (UTC), and+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ lockDate :: Prelude.Maybe Data.POSIX,+ -- | A Boolean that indicates whether Backup Vault Lock is currently+ -- protecting the backup vault. @True@ means that Vault Lock causes delete+ -- or update operations on the recovery points stored in the vault to fail.+ locked :: Prelude.Maybe Prelude.Bool,+ -- | The Backup Vault Lock setting that specifies the maximum retention+ -- period that the vault retains its recovery points. If this parameter is+ -- not specified, Vault Lock does not enforce a maximum retention period on+ -- the recovery points in the vault (allowing indefinite storage).+ --+ -- If specified, any backup or copy job to the vault must have a lifecycle+ -- policy with a retention period equal to or shorter than the maximum+ -- retention period. If the job\'s retention period is longer than that+ -- maximum retention period, then the vault fails the backup or copy job,+ -- and you should either modify your lifecycle settings or use a different+ -- vault. Recovery points already stored in the vault prior to Vault Lock+ -- are not affected.+ maxRetentionDays :: Prelude.Maybe Prelude.Integer,+ -- | The Backup Vault Lock setting that specifies the minimum retention+ -- period that the vault retains its recovery points. If this parameter is+ -- not specified, Vault Lock does not enforce a minimum retention period.+ --+ -- If specified, any backup or copy job to the vault must have a lifecycle+ -- policy with a retention period equal to or longer than the minimum+ -- retention period. If the job\'s retention period is shorter than that+ -- minimum retention period, then the vault fails the backup or copy job,+ -- and you should either modify your lifecycle settings or use a different+ -- vault. Recovery points already stored in the vault prior to Vault Lock+ -- are not affected.+ minRetentionDays :: Prelude.Maybe Prelude.Integer,+ -- | The number of recovery points that are stored in a backup vault.+ numberOfRecoveryPoints :: Prelude.Maybe Prelude.Integer,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeBackupVaultResponse' 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:+--+-- 'backupVaultArn', 'describeBackupVaultResponse_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'backupVaultName', 'describeBackupVaultResponse_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+--+-- 'creationDate', 'describeBackupVaultResponse_creationDate' - The date and time that a backup vault is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'creatorRequestId', 'describeBackupVaultResponse_creatorRequestId' - A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice.+--+-- 'encryptionKeyArn', 'describeBackupVaultResponse_encryptionKeyArn' - The server-side encryption key that is used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+--+-- 'lockDate', 'describeBackupVaultResponse_lockDate' - The date and time when Backup Vault Lock configuration cannot be changed+-- or deleted.+--+-- If you applied Vault Lock to your vault without specifying a lock date,+-- you can change any of your Vault Lock settings, or delete Vault Lock+-- from the vault entirely, at any time.+--+-- This value is in Unix format, Coordinated Universal Time (UTC), and+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'locked', 'describeBackupVaultResponse_locked' - A Boolean that indicates whether Backup Vault Lock is currently+-- protecting the backup vault. @True@ means that Vault Lock causes delete+-- or update operations on the recovery points stored in the vault to fail.+--+-- 'maxRetentionDays', 'describeBackupVaultResponse_maxRetentionDays' - The Backup Vault Lock setting that specifies the maximum retention+-- period that the vault retains its recovery points. If this parameter is+-- not specified, Vault Lock does not enforce a maximum retention period on+-- the recovery points in the vault (allowing indefinite storage).+--+-- If specified, any backup or copy job to the vault must have a lifecycle+-- policy with a retention period equal to or shorter than the maximum+-- retention period. If the job\'s retention period is longer than that+-- maximum retention period, then the vault fails the backup or copy job,+-- and you should either modify your lifecycle settings or use a different+-- vault. Recovery points already stored in the vault prior to Vault Lock+-- are not affected.+--+-- 'minRetentionDays', 'describeBackupVaultResponse_minRetentionDays' - The Backup Vault Lock setting that specifies the minimum retention+-- period that the vault retains its recovery points. If this parameter is+-- not specified, Vault Lock does not enforce a minimum retention period.+--+-- If specified, any backup or copy job to the vault must have a lifecycle+-- policy with a retention period equal to or longer than the minimum+-- retention period. If the job\'s retention period is shorter than that+-- minimum retention period, then the vault fails the backup or copy job,+-- and you should either modify your lifecycle settings or use a different+-- vault. Recovery points already stored in the vault prior to Vault Lock+-- are not affected.+--+-- 'numberOfRecoveryPoints', 'describeBackupVaultResponse_numberOfRecoveryPoints' - The number of recovery points that are stored in a backup vault.+--+-- 'httpStatus', 'describeBackupVaultResponse_httpStatus' - The response's http status code.+newDescribeBackupVaultResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeBackupVaultResponse+newDescribeBackupVaultResponse pHttpStatus_ =+ DescribeBackupVaultResponse'+ { backupVaultArn =+ Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ creatorRequestId = Prelude.Nothing,+ encryptionKeyArn = Prelude.Nothing,+ lockDate = Prelude.Nothing,+ locked = Prelude.Nothing,+ maxRetentionDays = Prelude.Nothing,+ minRetentionDays = Prelude.Nothing,+ numberOfRecoveryPoints = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+describeBackupVaultResponse_backupVaultArn :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Text)+describeBackupVaultResponse_backupVaultArn = Lens.lens (\DescribeBackupVaultResponse' {backupVaultArn} -> backupVaultArn) (\s@DescribeBackupVaultResponse' {} a -> s {backupVaultArn = a} :: DescribeBackupVaultResponse)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+describeBackupVaultResponse_backupVaultName :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Text)+describeBackupVaultResponse_backupVaultName = Lens.lens (\DescribeBackupVaultResponse' {backupVaultName} -> backupVaultName) (\s@DescribeBackupVaultResponse' {} a -> s {backupVaultName = a} :: DescribeBackupVaultResponse)++-- | The date and time that a backup vault is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+describeBackupVaultResponse_creationDate :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.UTCTime)+describeBackupVaultResponse_creationDate = Lens.lens (\DescribeBackupVaultResponse' {creationDate} -> creationDate) (\s@DescribeBackupVaultResponse' {} a -> s {creationDate = a} :: DescribeBackupVaultResponse) Prelude.. Lens.mapping Data._Time++-- | A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice.+describeBackupVaultResponse_creatorRequestId :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Text)+describeBackupVaultResponse_creatorRequestId = Lens.lens (\DescribeBackupVaultResponse' {creatorRequestId} -> creatorRequestId) (\s@DescribeBackupVaultResponse' {} a -> s {creatorRequestId = a} :: DescribeBackupVaultResponse)++-- | The server-side encryption key that is used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+describeBackupVaultResponse_encryptionKeyArn :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Text)+describeBackupVaultResponse_encryptionKeyArn = Lens.lens (\DescribeBackupVaultResponse' {encryptionKeyArn} -> encryptionKeyArn) (\s@DescribeBackupVaultResponse' {} a -> s {encryptionKeyArn = a} :: DescribeBackupVaultResponse)++-- | The date and time when Backup Vault Lock configuration cannot be changed+-- or deleted.+--+-- If you applied Vault Lock to your vault without specifying a lock date,+-- you can change any of your Vault Lock settings, or delete Vault Lock+-- from the vault entirely, at any time.+--+-- This value is in Unix format, Coordinated Universal Time (UTC), and+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+describeBackupVaultResponse_lockDate :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.UTCTime)+describeBackupVaultResponse_lockDate = Lens.lens (\DescribeBackupVaultResponse' {lockDate} -> lockDate) (\s@DescribeBackupVaultResponse' {} a -> s {lockDate = a} :: DescribeBackupVaultResponse) Prelude.. Lens.mapping Data._Time++-- | A Boolean that indicates whether Backup Vault Lock is currently+-- protecting the backup vault. @True@ means that Vault Lock causes delete+-- or update operations on the recovery points stored in the vault to fail.+describeBackupVaultResponse_locked :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Bool)+describeBackupVaultResponse_locked = Lens.lens (\DescribeBackupVaultResponse' {locked} -> locked) (\s@DescribeBackupVaultResponse' {} a -> s {locked = a} :: DescribeBackupVaultResponse)++-- | The Backup Vault Lock setting that specifies the maximum retention+-- period that the vault retains its recovery points. If this parameter is+-- not specified, Vault Lock does not enforce a maximum retention period on+-- the recovery points in the vault (allowing indefinite storage).+--+-- If specified, any backup or copy job to the vault must have a lifecycle+-- policy with a retention period equal to or shorter than the maximum+-- retention period. If the job\'s retention period is longer than that+-- maximum retention period, then the vault fails the backup or copy job,+-- and you should either modify your lifecycle settings or use a different+-- vault. Recovery points already stored in the vault prior to Vault Lock+-- are not affected.+describeBackupVaultResponse_maxRetentionDays :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Integer)+describeBackupVaultResponse_maxRetentionDays = Lens.lens (\DescribeBackupVaultResponse' {maxRetentionDays} -> maxRetentionDays) (\s@DescribeBackupVaultResponse' {} a -> s {maxRetentionDays = a} :: DescribeBackupVaultResponse)++-- | The Backup Vault Lock setting that specifies the minimum retention+-- period that the vault retains its recovery points. If this parameter is+-- not specified, Vault Lock does not enforce a minimum retention period.+--+-- If specified, any backup or copy job to the vault must have a lifecycle+-- policy with a retention period equal to or longer than the minimum+-- retention period. If the job\'s retention period is shorter than that+-- minimum retention period, then the vault fails the backup or copy job,+-- and you should either modify your lifecycle settings or use a different+-- vault. Recovery points already stored in the vault prior to Vault Lock+-- are not affected.+describeBackupVaultResponse_minRetentionDays :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Integer)+describeBackupVaultResponse_minRetentionDays = Lens.lens (\DescribeBackupVaultResponse' {minRetentionDays} -> minRetentionDays) (\s@DescribeBackupVaultResponse' {} a -> s {minRetentionDays = a} :: DescribeBackupVaultResponse)++-- | The number of recovery points that are stored in a backup vault.+describeBackupVaultResponse_numberOfRecoveryPoints :: Lens.Lens' DescribeBackupVaultResponse (Prelude.Maybe Prelude.Integer)+describeBackupVaultResponse_numberOfRecoveryPoints = Lens.lens (\DescribeBackupVaultResponse' {numberOfRecoveryPoints} -> numberOfRecoveryPoints) (\s@DescribeBackupVaultResponse' {} a -> s {numberOfRecoveryPoints = a} :: DescribeBackupVaultResponse)++-- | The response's http status code.+describeBackupVaultResponse_httpStatus :: Lens.Lens' DescribeBackupVaultResponse Prelude.Int+describeBackupVaultResponse_httpStatus = Lens.lens (\DescribeBackupVaultResponse' {httpStatus} -> httpStatus) (\s@DescribeBackupVaultResponse' {} a -> s {httpStatus = a} :: DescribeBackupVaultResponse)++instance Prelude.NFData DescribeBackupVaultResponse where+ rnf DescribeBackupVaultResponse' {..} =+ Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf creatorRequestId+ `Prelude.seq` Prelude.rnf encryptionKeyArn+ `Prelude.seq` Prelude.rnf lockDate+ `Prelude.seq` Prelude.rnf locked+ `Prelude.seq` Prelude.rnf maxRetentionDays+ `Prelude.seq` Prelude.rnf minRetentionDays+ `Prelude.seq` Prelude.rnf numberOfRecoveryPoints+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DescribeCopyJob.hs view
@@ -0,0 +1,158 @@+{-# 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.Backup.DescribeCopyJob+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns metadata associated with creating a copy of a resource.+module Amazonka.Backup.DescribeCopyJob+ ( -- * Creating a Request+ DescribeCopyJob (..),+ newDescribeCopyJob,++ -- * Request Lenses+ describeCopyJob_copyJobId,++ -- * Destructuring the Response+ DescribeCopyJobResponse (..),+ newDescribeCopyJobResponse,++ -- * Response Lenses+ describeCopyJobResponse_copyJob,+ describeCopyJobResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeCopyJob' smart constructor.+data DescribeCopyJob = DescribeCopyJob'+ { -- | Uniquely identifies a copy job.+ copyJobId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeCopyJob' 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:+--+-- 'copyJobId', 'describeCopyJob_copyJobId' - Uniquely identifies a copy job.+newDescribeCopyJob ::+ -- | 'copyJobId'+ Prelude.Text ->+ DescribeCopyJob+newDescribeCopyJob pCopyJobId_ =+ DescribeCopyJob' {copyJobId = pCopyJobId_}++-- | Uniquely identifies a copy job.+describeCopyJob_copyJobId :: Lens.Lens' DescribeCopyJob Prelude.Text+describeCopyJob_copyJobId = Lens.lens (\DescribeCopyJob' {copyJobId} -> copyJobId) (\s@DescribeCopyJob' {} a -> s {copyJobId = a} :: DescribeCopyJob)++instance Core.AWSRequest DescribeCopyJob where+ type+ AWSResponse DescribeCopyJob =+ DescribeCopyJobResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeCopyJobResponse'+ Prelude.<$> (x Data..?> "CopyJob")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeCopyJob where+ hashWithSalt _salt DescribeCopyJob' {..} =+ _salt `Prelude.hashWithSalt` copyJobId++instance Prelude.NFData DescribeCopyJob where+ rnf DescribeCopyJob' {..} = Prelude.rnf copyJobId++instance Data.ToHeaders DescribeCopyJob where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeCopyJob where+ toPath DescribeCopyJob' {..} =+ Prelude.mconcat+ ["/copy-jobs/", Data.toBS copyJobId]++instance Data.ToQuery DescribeCopyJob where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeCopyJobResponse' smart constructor.+data DescribeCopyJobResponse = DescribeCopyJobResponse'+ { -- | Contains detailed information about a copy job.+ copyJob :: Prelude.Maybe CopyJob,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeCopyJobResponse' 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:+--+-- 'copyJob', 'describeCopyJobResponse_copyJob' - Contains detailed information about a copy job.+--+-- 'httpStatus', 'describeCopyJobResponse_httpStatus' - The response's http status code.+newDescribeCopyJobResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeCopyJobResponse+newDescribeCopyJobResponse pHttpStatus_ =+ DescribeCopyJobResponse'+ { copyJob = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Contains detailed information about a copy job.+describeCopyJobResponse_copyJob :: Lens.Lens' DescribeCopyJobResponse (Prelude.Maybe CopyJob)+describeCopyJobResponse_copyJob = Lens.lens (\DescribeCopyJobResponse' {copyJob} -> copyJob) (\s@DescribeCopyJobResponse' {} a -> s {copyJob = a} :: DescribeCopyJobResponse)++-- | The response's http status code.+describeCopyJobResponse_httpStatus :: Lens.Lens' DescribeCopyJobResponse Prelude.Int+describeCopyJobResponse_httpStatus = Lens.lens (\DescribeCopyJobResponse' {httpStatus} -> httpStatus) (\s@DescribeCopyJobResponse' {} a -> s {httpStatus = a} :: DescribeCopyJobResponse)++instance Prelude.NFData DescribeCopyJobResponse where+ rnf DescribeCopyJobResponse' {..} =+ Prelude.rnf copyJob+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DescribeFramework.hs view
@@ -0,0 +1,322 @@+{-# 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.Backup.DescribeFramework+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the framework details for the specified @FrameworkName@.+module Amazonka.Backup.DescribeFramework+ ( -- * Creating a Request+ DescribeFramework (..),+ newDescribeFramework,++ -- * Request Lenses+ describeFramework_frameworkName,++ -- * Destructuring the Response+ DescribeFrameworkResponse (..),+ newDescribeFrameworkResponse,++ -- * Response Lenses+ describeFrameworkResponse_creationTime,+ describeFrameworkResponse_deploymentStatus,+ describeFrameworkResponse_frameworkArn,+ describeFrameworkResponse_frameworkControls,+ describeFrameworkResponse_frameworkDescription,+ describeFrameworkResponse_frameworkName,+ describeFrameworkResponse_frameworkStatus,+ describeFrameworkResponse_idempotencyToken,+ describeFrameworkResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeFramework' smart constructor.+data DescribeFramework = DescribeFramework'+ { -- | The unique name of a framework.+ frameworkName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeFramework' 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:+--+-- 'frameworkName', 'describeFramework_frameworkName' - The unique name of a framework.+newDescribeFramework ::+ -- | 'frameworkName'+ Prelude.Text ->+ DescribeFramework+newDescribeFramework pFrameworkName_ =+ DescribeFramework' {frameworkName = pFrameworkName_}++-- | The unique name of a framework.+describeFramework_frameworkName :: Lens.Lens' DescribeFramework Prelude.Text+describeFramework_frameworkName = Lens.lens (\DescribeFramework' {frameworkName} -> frameworkName) (\s@DescribeFramework' {} a -> s {frameworkName = a} :: DescribeFramework)++instance Core.AWSRequest DescribeFramework where+ type+ AWSResponse DescribeFramework =+ DescribeFrameworkResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeFrameworkResponse'+ Prelude.<$> (x Data..?> "CreationTime")+ Prelude.<*> (x Data..?> "DeploymentStatus")+ Prelude.<*> (x Data..?> "FrameworkArn")+ Prelude.<*> ( x+ Data..?> "FrameworkControls"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "FrameworkDescription")+ Prelude.<*> (x Data..?> "FrameworkName")+ Prelude.<*> (x Data..?> "FrameworkStatus")+ Prelude.<*> (x Data..?> "IdempotencyToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeFramework where+ hashWithSalt _salt DescribeFramework' {..} =+ _salt `Prelude.hashWithSalt` frameworkName++instance Prelude.NFData DescribeFramework where+ rnf DescribeFramework' {..} =+ Prelude.rnf frameworkName++instance Data.ToHeaders DescribeFramework where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeFramework where+ toPath DescribeFramework' {..} =+ Prelude.mconcat+ ["/audit/frameworks/", Data.toBS frameworkName]++instance Data.ToQuery DescribeFramework where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeFrameworkResponse' smart constructor.+data DescribeFrameworkResponse = DescribeFrameworkResponse'+ { -- | The date and time that a framework is created, in ISO 8601+ -- representation. The value of @CreationTime@ is accurate to milliseconds.+ -- For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July+ -- 2020 at 3:00 PM 8 hours behind UTC.+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | The deployment status of a framework. The statuses are:+ --+ -- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED@+ deploymentStatus :: Prelude.Maybe Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ frameworkArn :: Prelude.Maybe Prelude.Text,+ -- | A list of the controls that make up the framework. Each control in the+ -- list has a name, input parameters, and scope.+ frameworkControls :: Prelude.Maybe [FrameworkControl],+ -- | An optional description of the framework.+ frameworkDescription :: Prelude.Maybe Prelude.Text,+ -- | The unique name of a framework.+ frameworkName :: Prelude.Maybe Prelude.Text,+ -- | A framework consists of one or more controls. Each control governs a+ -- resource, such as backup plans, backup selections, backup vaults, or+ -- recovery points. You can also turn Config recording on or off for each+ -- resource. The statuses are:+ --+ -- - @ACTIVE@ when recording is turned on for all resources governed by+ -- the framework.+ --+ -- - @PARTIALLY_ACTIVE@ when recording is turned off for at least one+ -- resource governed by the framework.+ --+ -- - @INACTIVE@ when recording is turned off for all resources governed+ -- by the framework.+ --+ -- - @UNAVAILABLE@ when Backup is unable to validate recording status at+ -- this time.+ frameworkStatus :: Prelude.Maybe Prelude.Text,+ -- | A customer-chosen string that you can use to distinguish between+ -- otherwise identical calls to @DescribeFrameworkOutput@. Retrying a+ -- successful request with the same idempotency token results in a success+ -- message with no action taken.+ idempotencyToken :: 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 'DescribeFrameworkResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTime', 'describeFrameworkResponse_creationTime' - The date and time that a framework is created, in ISO 8601+-- representation. The value of @CreationTime@ is accurate to milliseconds.+-- For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July+-- 2020 at 3:00 PM 8 hours behind UTC.+--+-- 'deploymentStatus', 'describeFrameworkResponse_deploymentStatus' - The deployment status of a framework. The statuses are:+--+-- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED@+--+-- 'frameworkArn', 'describeFrameworkResponse_frameworkArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'frameworkControls', 'describeFrameworkResponse_frameworkControls' - A list of the controls that make up the framework. Each control in the+-- list has a name, input parameters, and scope.+--+-- 'frameworkDescription', 'describeFrameworkResponse_frameworkDescription' - An optional description of the framework.+--+-- 'frameworkName', 'describeFrameworkResponse_frameworkName' - The unique name of a framework.+--+-- 'frameworkStatus', 'describeFrameworkResponse_frameworkStatus' - A framework consists of one or more controls. Each control governs a+-- resource, such as backup plans, backup selections, backup vaults, or+-- recovery points. You can also turn Config recording on or off for each+-- resource. The statuses are:+--+-- - @ACTIVE@ when recording is turned on for all resources governed by+-- the framework.+--+-- - @PARTIALLY_ACTIVE@ when recording is turned off for at least one+-- resource governed by the framework.+--+-- - @INACTIVE@ when recording is turned off for all resources governed+-- by the framework.+--+-- - @UNAVAILABLE@ when Backup is unable to validate recording status at+-- this time.+--+-- 'idempotencyToken', 'describeFrameworkResponse_idempotencyToken' - A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @DescribeFrameworkOutput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+--+-- 'httpStatus', 'describeFrameworkResponse_httpStatus' - The response's http status code.+newDescribeFrameworkResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeFrameworkResponse+newDescribeFrameworkResponse pHttpStatus_ =+ DescribeFrameworkResponse'+ { creationTime =+ Prelude.Nothing,+ deploymentStatus = Prelude.Nothing,+ frameworkArn = Prelude.Nothing,+ frameworkControls = Prelude.Nothing,+ frameworkDescription = Prelude.Nothing,+ frameworkName = Prelude.Nothing,+ frameworkStatus = Prelude.Nothing,+ idempotencyToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The date and time that a framework is created, in ISO 8601+-- representation. The value of @CreationTime@ is accurate to milliseconds.+-- For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July+-- 2020 at 3:00 PM 8 hours behind UTC.+describeFrameworkResponse_creationTime :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.UTCTime)+describeFrameworkResponse_creationTime = Lens.lens (\DescribeFrameworkResponse' {creationTime} -> creationTime) (\s@DescribeFrameworkResponse' {} a -> s {creationTime = a} :: DescribeFrameworkResponse) Prelude.. Lens.mapping Data._Time++-- | The deployment status of a framework. The statuses are:+--+-- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED@+describeFrameworkResponse_deploymentStatus :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)+describeFrameworkResponse_deploymentStatus = Lens.lens (\DescribeFrameworkResponse' {deploymentStatus} -> deploymentStatus) (\s@DescribeFrameworkResponse' {} a -> s {deploymentStatus = a} :: DescribeFrameworkResponse)++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+describeFrameworkResponse_frameworkArn :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)+describeFrameworkResponse_frameworkArn = Lens.lens (\DescribeFrameworkResponse' {frameworkArn} -> frameworkArn) (\s@DescribeFrameworkResponse' {} a -> s {frameworkArn = a} :: DescribeFrameworkResponse)++-- | A list of the controls that make up the framework. Each control in the+-- list has a name, input parameters, and scope.+describeFrameworkResponse_frameworkControls :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe [FrameworkControl])+describeFrameworkResponse_frameworkControls = Lens.lens (\DescribeFrameworkResponse' {frameworkControls} -> frameworkControls) (\s@DescribeFrameworkResponse' {} a -> s {frameworkControls = a} :: DescribeFrameworkResponse) Prelude.. Lens.mapping Lens.coerced++-- | An optional description of the framework.+describeFrameworkResponse_frameworkDescription :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)+describeFrameworkResponse_frameworkDescription = Lens.lens (\DescribeFrameworkResponse' {frameworkDescription} -> frameworkDescription) (\s@DescribeFrameworkResponse' {} a -> s {frameworkDescription = a} :: DescribeFrameworkResponse)++-- | The unique name of a framework.+describeFrameworkResponse_frameworkName :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)+describeFrameworkResponse_frameworkName = Lens.lens (\DescribeFrameworkResponse' {frameworkName} -> frameworkName) (\s@DescribeFrameworkResponse' {} a -> s {frameworkName = a} :: DescribeFrameworkResponse)++-- | A framework consists of one or more controls. Each control governs a+-- resource, such as backup plans, backup selections, backup vaults, or+-- recovery points. You can also turn Config recording on or off for each+-- resource. The statuses are:+--+-- - @ACTIVE@ when recording is turned on for all resources governed by+-- the framework.+--+-- - @PARTIALLY_ACTIVE@ when recording is turned off for at least one+-- resource governed by the framework.+--+-- - @INACTIVE@ when recording is turned off for all resources governed+-- by the framework.+--+-- - @UNAVAILABLE@ when Backup is unable to validate recording status at+-- this time.+describeFrameworkResponse_frameworkStatus :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)+describeFrameworkResponse_frameworkStatus = Lens.lens (\DescribeFrameworkResponse' {frameworkStatus} -> frameworkStatus) (\s@DescribeFrameworkResponse' {} a -> s {frameworkStatus = a} :: DescribeFrameworkResponse)++-- | A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @DescribeFrameworkOutput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+describeFrameworkResponse_idempotencyToken :: Lens.Lens' DescribeFrameworkResponse (Prelude.Maybe Prelude.Text)+describeFrameworkResponse_idempotencyToken = Lens.lens (\DescribeFrameworkResponse' {idempotencyToken} -> idempotencyToken) (\s@DescribeFrameworkResponse' {} a -> s {idempotencyToken = a} :: DescribeFrameworkResponse)++-- | The response's http status code.+describeFrameworkResponse_httpStatus :: Lens.Lens' DescribeFrameworkResponse Prelude.Int+describeFrameworkResponse_httpStatus = Lens.lens (\DescribeFrameworkResponse' {httpStatus} -> httpStatus) (\s@DescribeFrameworkResponse' {} a -> s {httpStatus = a} :: DescribeFrameworkResponse)++instance Prelude.NFData DescribeFrameworkResponse where+ rnf DescribeFrameworkResponse' {..} =+ Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf deploymentStatus+ `Prelude.seq` Prelude.rnf frameworkArn+ `Prelude.seq` Prelude.rnf frameworkControls+ `Prelude.seq` Prelude.rnf frameworkDescription+ `Prelude.seq` Prelude.rnf frameworkName+ `Prelude.seq` Prelude.rnf frameworkStatus+ `Prelude.seq` Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DescribeGlobalSettings.hs view
@@ -0,0 +1,171 @@+{-# 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.Backup.DescribeGlobalSettings+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Describes whether the Amazon Web Services account is opted in to+-- cross-account backup. Returns an error if the account is not a member of+-- an Organizations organization. Example:+-- @describe-global-settings --region us-west-2@+module Amazonka.Backup.DescribeGlobalSettings+ ( -- * Creating a Request+ DescribeGlobalSettings (..),+ newDescribeGlobalSettings,++ -- * Destructuring the Response+ DescribeGlobalSettingsResponse (..),+ newDescribeGlobalSettingsResponse,++ -- * Response Lenses+ describeGlobalSettingsResponse_globalSettings,+ describeGlobalSettingsResponse_lastUpdateTime,+ describeGlobalSettingsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeGlobalSettings' smart constructor.+data DescribeGlobalSettings = DescribeGlobalSettings'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeGlobalSettings' 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.+newDescribeGlobalSettings ::+ DescribeGlobalSettings+newDescribeGlobalSettings = DescribeGlobalSettings'++instance Core.AWSRequest DescribeGlobalSettings where+ type+ AWSResponse DescribeGlobalSettings =+ DescribeGlobalSettingsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeGlobalSettingsResponse'+ Prelude.<$> (x Data..?> "GlobalSettings" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "LastUpdateTime")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeGlobalSettings where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance Prelude.NFData DescribeGlobalSettings where+ rnf _ = ()++instance Data.ToHeaders DescribeGlobalSettings where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeGlobalSettings where+ toPath = Prelude.const "/global-settings"++instance Data.ToQuery DescribeGlobalSettings where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeGlobalSettingsResponse' smart constructor.+data DescribeGlobalSettingsResponse = DescribeGlobalSettingsResponse'+ { -- | The status of the flag @isCrossAccountBackupEnabled@.+ globalSettings :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The date and time that the flag @isCrossAccountBackupEnabled@ was last+ -- updated. This update is in Unix format and Coordinated Universal Time+ -- (UTC). The value of @LastUpdateTime@ is accurate to milliseconds. For+ -- example, the value 1516925490.087 represents Friday, January 26, 2018+ -- 12:11:30.087 AM.+ lastUpdateTime :: Prelude.Maybe Data.POSIX,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeGlobalSettingsResponse' 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:+--+-- 'globalSettings', 'describeGlobalSettingsResponse_globalSettings' - The status of the flag @isCrossAccountBackupEnabled@.+--+-- 'lastUpdateTime', 'describeGlobalSettingsResponse_lastUpdateTime' - The date and time that the flag @isCrossAccountBackupEnabled@ was last+-- updated. This update is in Unix format and Coordinated Universal Time+-- (UTC). The value of @LastUpdateTime@ is accurate to milliseconds. For+-- example, the value 1516925490.087 represents Friday, January 26, 2018+-- 12:11:30.087 AM.+--+-- 'httpStatus', 'describeGlobalSettingsResponse_httpStatus' - The response's http status code.+newDescribeGlobalSettingsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeGlobalSettingsResponse+newDescribeGlobalSettingsResponse pHttpStatus_ =+ DescribeGlobalSettingsResponse'+ { globalSettings =+ Prelude.Nothing,+ lastUpdateTime = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The status of the flag @isCrossAccountBackupEnabled@.+describeGlobalSettingsResponse_globalSettings :: Lens.Lens' DescribeGlobalSettingsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+describeGlobalSettingsResponse_globalSettings = Lens.lens (\DescribeGlobalSettingsResponse' {globalSettings} -> globalSettings) (\s@DescribeGlobalSettingsResponse' {} a -> s {globalSettings = a} :: DescribeGlobalSettingsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The date and time that the flag @isCrossAccountBackupEnabled@ was last+-- updated. This update is in Unix format and Coordinated Universal Time+-- (UTC). The value of @LastUpdateTime@ is accurate to milliseconds. For+-- example, the value 1516925490.087 represents Friday, January 26, 2018+-- 12:11:30.087 AM.+describeGlobalSettingsResponse_lastUpdateTime :: Lens.Lens' DescribeGlobalSettingsResponse (Prelude.Maybe Prelude.UTCTime)+describeGlobalSettingsResponse_lastUpdateTime = Lens.lens (\DescribeGlobalSettingsResponse' {lastUpdateTime} -> lastUpdateTime) (\s@DescribeGlobalSettingsResponse' {} a -> s {lastUpdateTime = a} :: DescribeGlobalSettingsResponse) Prelude.. Lens.mapping Data._Time++-- | The response's http status code.+describeGlobalSettingsResponse_httpStatus :: Lens.Lens' DescribeGlobalSettingsResponse Prelude.Int+describeGlobalSettingsResponse_httpStatus = Lens.lens (\DescribeGlobalSettingsResponse' {httpStatus} -> httpStatus) (\s@DescribeGlobalSettingsResponse' {} a -> s {httpStatus = a} :: DescribeGlobalSettingsResponse)++instance+ Prelude.NFData+ DescribeGlobalSettingsResponse+ where+ rnf DescribeGlobalSettingsResponse' {..} =+ Prelude.rnf globalSettings+ `Prelude.seq` Prelude.rnf lastUpdateTime+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DescribeProtectedResource.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.Backup.DescribeProtectedResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about a saved resource, including the last time it+-- was backed up, its Amazon Resource Name (ARN), and the Amazon Web+-- Services service type of the saved resource.+module Amazonka.Backup.DescribeProtectedResource+ ( -- * Creating a Request+ DescribeProtectedResource (..),+ newDescribeProtectedResource,++ -- * Request Lenses+ describeProtectedResource_resourceArn,++ -- * Destructuring the Response+ DescribeProtectedResourceResponse (..),+ newDescribeProtectedResourceResponse,++ -- * Response Lenses+ describeProtectedResourceResponse_lastBackupTime,+ describeProtectedResourceResponse_resourceArn,+ describeProtectedResourceResponse_resourceType,+ describeProtectedResourceResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeProtectedResource' smart constructor.+data DescribeProtectedResource = DescribeProtectedResource'+ { -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ resourceArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeProtectedResource' 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', 'describeProtectedResource_resourceArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+newDescribeProtectedResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ DescribeProtectedResource+newDescribeProtectedResource pResourceArn_ =+ DescribeProtectedResource'+ { resourceArn =+ pResourceArn_+ }++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+describeProtectedResource_resourceArn :: Lens.Lens' DescribeProtectedResource Prelude.Text+describeProtectedResource_resourceArn = Lens.lens (\DescribeProtectedResource' {resourceArn} -> resourceArn) (\s@DescribeProtectedResource' {} a -> s {resourceArn = a} :: DescribeProtectedResource)++instance Core.AWSRequest DescribeProtectedResource where+ type+ AWSResponse DescribeProtectedResource =+ DescribeProtectedResourceResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeProtectedResourceResponse'+ Prelude.<$> (x Data..?> "LastBackupTime")+ Prelude.<*> (x Data..?> "ResourceArn")+ Prelude.<*> (x Data..?> "ResourceType")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeProtectedResource where+ hashWithSalt _salt DescribeProtectedResource' {..} =+ _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData DescribeProtectedResource where+ rnf DescribeProtectedResource' {..} =+ Prelude.rnf resourceArn++instance Data.ToHeaders DescribeProtectedResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeProtectedResource where+ toPath DescribeProtectedResource' {..} =+ Prelude.mconcat+ ["/resources/", Data.toBS resourceArn]++instance Data.ToQuery DescribeProtectedResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeProtectedResourceResponse' smart constructor.+data DescribeProtectedResourceResponse = DescribeProtectedResourceResponse'+ { -- | The date and time that a resource was last backed up, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @LastBackupTime@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ lastBackupTime :: Prelude.Maybe Data.POSIX,+ -- | An ARN that uniquely identifies a resource. The format of the ARN+ -- depends on the resource type.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | The type of Amazon Web Services resource saved as a recovery point; for+ -- example, an Amazon EBS volume or an Amazon RDS database.+ resourceType :: 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 'DescribeProtectedResourceResponse' 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:+--+-- 'lastBackupTime', 'describeProtectedResourceResponse_lastBackupTime' - The date and time that a resource was last backed up, in Unix format and+-- Coordinated Universal Time (UTC). The value of @LastBackupTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'resourceArn', 'describeProtectedResourceResponse_resourceArn' - An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the resource type.+--+-- 'resourceType', 'describeProtectedResourceResponse_resourceType' - The type of Amazon Web Services resource saved as a recovery point; for+-- example, an Amazon EBS volume or an Amazon RDS database.+--+-- 'httpStatus', 'describeProtectedResourceResponse_httpStatus' - The response's http status code.+newDescribeProtectedResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeProtectedResourceResponse+newDescribeProtectedResourceResponse pHttpStatus_ =+ DescribeProtectedResourceResponse'+ { lastBackupTime =+ Prelude.Nothing,+ resourceArn = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The date and time that a resource was last backed up, in Unix format and+-- Coordinated Universal Time (UTC). The value of @LastBackupTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+describeProtectedResourceResponse_lastBackupTime :: Lens.Lens' DescribeProtectedResourceResponse (Prelude.Maybe Prelude.UTCTime)+describeProtectedResourceResponse_lastBackupTime = Lens.lens (\DescribeProtectedResourceResponse' {lastBackupTime} -> lastBackupTime) (\s@DescribeProtectedResourceResponse' {} a -> s {lastBackupTime = a} :: DescribeProtectedResourceResponse) Prelude.. Lens.mapping Data._Time++-- | An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the resource type.+describeProtectedResourceResponse_resourceArn :: Lens.Lens' DescribeProtectedResourceResponse (Prelude.Maybe Prelude.Text)+describeProtectedResourceResponse_resourceArn = Lens.lens (\DescribeProtectedResourceResponse' {resourceArn} -> resourceArn) (\s@DescribeProtectedResourceResponse' {} a -> s {resourceArn = a} :: DescribeProtectedResourceResponse)++-- | The type of Amazon Web Services resource saved as a recovery point; for+-- example, an Amazon EBS volume or an Amazon RDS database.+describeProtectedResourceResponse_resourceType :: Lens.Lens' DescribeProtectedResourceResponse (Prelude.Maybe Prelude.Text)+describeProtectedResourceResponse_resourceType = Lens.lens (\DescribeProtectedResourceResponse' {resourceType} -> resourceType) (\s@DescribeProtectedResourceResponse' {} a -> s {resourceType = a} :: DescribeProtectedResourceResponse)++-- | The response's http status code.+describeProtectedResourceResponse_httpStatus :: Lens.Lens' DescribeProtectedResourceResponse Prelude.Int+describeProtectedResourceResponse_httpStatus = Lens.lens (\DescribeProtectedResourceResponse' {httpStatus} -> httpStatus) (\s@DescribeProtectedResourceResponse' {} a -> s {httpStatus = a} :: DescribeProtectedResourceResponse)++instance+ Prelude.NFData+ DescribeProtectedResourceResponse+ where+ rnf DescribeProtectedResourceResponse' {..} =+ Prelude.rnf lastBackupTime+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DescribeRecoveryPoint.hs view
@@ -0,0 +1,677 @@+{-# 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.Backup.DescribeRecoveryPoint+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns metadata associated with a recovery point, including ID, status,+-- encryption, and lifecycle.+module Amazonka.Backup.DescribeRecoveryPoint+ ( -- * Creating a Request+ DescribeRecoveryPoint (..),+ newDescribeRecoveryPoint,++ -- * Request Lenses+ describeRecoveryPoint_backupVaultName,+ describeRecoveryPoint_recoveryPointArn,++ -- * Destructuring the Response+ DescribeRecoveryPointResponse (..),+ newDescribeRecoveryPointResponse,++ -- * Response Lenses+ describeRecoveryPointResponse_backupSizeInBytes,+ describeRecoveryPointResponse_backupVaultArn,+ describeRecoveryPointResponse_backupVaultName,+ describeRecoveryPointResponse_calculatedLifecycle,+ describeRecoveryPointResponse_completionDate,+ describeRecoveryPointResponse_compositeMemberIdentifier,+ describeRecoveryPointResponse_createdBy,+ describeRecoveryPointResponse_creationDate,+ describeRecoveryPointResponse_encryptionKeyArn,+ describeRecoveryPointResponse_iamRoleArn,+ describeRecoveryPointResponse_isEncrypted,+ describeRecoveryPointResponse_isParent,+ describeRecoveryPointResponse_lastRestoreTime,+ describeRecoveryPointResponse_lifecycle,+ describeRecoveryPointResponse_parentRecoveryPointArn,+ describeRecoveryPointResponse_recoveryPointArn,+ describeRecoveryPointResponse_resourceArn,+ describeRecoveryPointResponse_resourceType,+ describeRecoveryPointResponse_sourceBackupVaultArn,+ describeRecoveryPointResponse_status,+ describeRecoveryPointResponse_statusMessage,+ describeRecoveryPointResponse_storageClass,+ describeRecoveryPointResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeRecoveryPoint' smart constructor.+data DescribeRecoveryPoint = DescribeRecoveryPoint'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeRecoveryPoint' 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:+--+-- 'backupVaultName', 'describeRecoveryPoint_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'recoveryPointArn', 'describeRecoveryPoint_recoveryPointArn' - An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+newDescribeRecoveryPoint ::+ -- | 'backupVaultName'+ Prelude.Text ->+ -- | 'recoveryPointArn'+ Prelude.Text ->+ DescribeRecoveryPoint+newDescribeRecoveryPoint+ pBackupVaultName_+ pRecoveryPointArn_ =+ DescribeRecoveryPoint'+ { backupVaultName =+ pBackupVaultName_,+ recoveryPointArn = pRecoveryPointArn_+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+describeRecoveryPoint_backupVaultName :: Lens.Lens' DescribeRecoveryPoint Prelude.Text+describeRecoveryPoint_backupVaultName = Lens.lens (\DescribeRecoveryPoint' {backupVaultName} -> backupVaultName) (\s@DescribeRecoveryPoint' {} a -> s {backupVaultName = a} :: DescribeRecoveryPoint)++-- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+describeRecoveryPoint_recoveryPointArn :: Lens.Lens' DescribeRecoveryPoint Prelude.Text+describeRecoveryPoint_recoveryPointArn = Lens.lens (\DescribeRecoveryPoint' {recoveryPointArn} -> recoveryPointArn) (\s@DescribeRecoveryPoint' {} a -> s {recoveryPointArn = a} :: DescribeRecoveryPoint)++instance Core.AWSRequest DescribeRecoveryPoint where+ type+ AWSResponse DescribeRecoveryPoint =+ DescribeRecoveryPointResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeRecoveryPointResponse'+ Prelude.<$> (x Data..?> "BackupSizeInBytes")+ Prelude.<*> (x Data..?> "BackupVaultArn")+ Prelude.<*> (x Data..?> "BackupVaultName")+ Prelude.<*> (x Data..?> "CalculatedLifecycle")+ Prelude.<*> (x Data..?> "CompletionDate")+ Prelude.<*> (x Data..?> "CompositeMemberIdentifier")+ Prelude.<*> (x Data..?> "CreatedBy")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "EncryptionKeyArn")+ Prelude.<*> (x Data..?> "IamRoleArn")+ Prelude.<*> (x Data..?> "IsEncrypted")+ Prelude.<*> (x Data..?> "IsParent")+ Prelude.<*> (x Data..?> "LastRestoreTime")+ Prelude.<*> (x Data..?> "Lifecycle")+ Prelude.<*> (x Data..?> "ParentRecoveryPointArn")+ Prelude.<*> (x Data..?> "RecoveryPointArn")+ Prelude.<*> (x Data..?> "ResourceArn")+ Prelude.<*> (x Data..?> "ResourceType")+ Prelude.<*> (x Data..?> "SourceBackupVaultArn")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "StatusMessage")+ Prelude.<*> (x Data..?> "StorageClass")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeRecoveryPoint where+ hashWithSalt _salt DescribeRecoveryPoint' {..} =+ _salt+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` recoveryPointArn++instance Prelude.NFData DescribeRecoveryPoint where+ rnf DescribeRecoveryPoint' {..} =+ Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf recoveryPointArn++instance Data.ToHeaders DescribeRecoveryPoint where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeRecoveryPoint where+ toPath DescribeRecoveryPoint' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/recovery-points/",+ Data.toBS recoveryPointArn+ ]++instance Data.ToQuery DescribeRecoveryPoint where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeRecoveryPointResponse' smart constructor.+data DescribeRecoveryPointResponse = DescribeRecoveryPointResponse'+ { -- | The size, in bytes, of a backup.+ backupSizeInBytes :: Prelude.Maybe Prelude.Integer,+ -- | An ARN that uniquely identifies a backup vault; for example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Region where they are created. They consist of lowercase+ -- letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | A @CalculatedLifecycle@ object containing @DeleteAt@ and+ -- @MoveToColdStorageAt@ timestamps.+ calculatedLifecycle :: Prelude.Maybe CalculatedLifecycle,+ -- | The date and time that a job to create a recovery point is completed, in+ -- Unix format and Coordinated Universal Time (UTC). The value of+ -- @CompletionDate@ is accurate to milliseconds. For example, the value+ -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+ completionDate :: Prelude.Maybe Data.POSIX,+ -- | This is the identifier of a resource within a composite group, such as+ -- nested (child) recovery point belonging to a composite (parent) stack.+ -- The ID is transferred from the+ -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax logical ID>+ -- within a stack.+ compositeMemberIdentifier :: Prelude.Maybe Prelude.Text,+ -- | Contains identifying information about the creation of a recovery point,+ -- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+ -- @BackupRuleId@ of the backup plan used to create it.+ createdBy :: Prelude.Maybe RecoveryPointCreator,+ -- | The date and time that a recovery point is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The server-side encryption key used to protect your backups; for+ -- example,+ -- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+ encryptionKeyArn :: Prelude.Maybe Prelude.Text,+ -- | Specifies the IAM role ARN used to create the target recovery point; for+ -- example, @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | A Boolean value that is returned as @TRUE@ if the specified recovery+ -- point is encrypted, or @FALSE@ if the recovery point is not encrypted.+ isEncrypted :: Prelude.Maybe Prelude.Bool,+ -- | This returns the boolean value that a recovery point is a parent+ -- (composite) job.+ isParent :: Prelude.Maybe Prelude.Bool,+ -- | The date and time that a recovery point was last restored, in Unix+ -- format and Coordinated Universal Time (UTC). The value of+ -- @LastRestoreTime@ is accurate to milliseconds. For example, the value+ -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+ lastRestoreTime :: Prelude.Maybe Data.POSIX,+ -- | The lifecycle defines when a protected resource is transitioned to cold+ -- storage and when it expires. Backup transitions and expires backups+ -- automatically according to the lifecycle that you define.+ --+ -- Backups that are transitioned to cold storage must be stored in cold+ -- storage for a minimum of 90 days. Therefore, the “retention” setting+ -- must be 90 days greater than the “transition to cold after days”+ -- setting. The “transition to cold after days” setting cannot be changed+ -- after a backup has been transitioned to cold.+ --+ -- Resource types that are able to be transitioned to cold storage are+ -- listed in the \"Lifecycle to cold storage\" section of the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+ -- table. Backup ignores this expression for other resource types.+ lifecycle :: Prelude.Maybe Lifecycle,+ -- | This is an ARN that uniquely identifies a parent (composite) recovery+ -- point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ parentRecoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a saved resource. The format of the ARN+ -- depends on the resource type.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | The type of Amazon Web Services resource to save as a recovery point;+ -- for example, an Amazon Elastic Block Store (Amazon EBS) volume or an+ -- Amazon Relational Database Service (Amazon RDS) database.+ resourceType :: Prelude.Maybe Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies the source vault+ -- where the resource was originally backed up in; for example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:BackupVault@. If the+ -- recovery is restored to the same Amazon Web Services account or Region,+ -- this value will be @null@.+ sourceBackupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | A status code specifying the state of the recovery point.+ --+ -- @PARTIAL@ status indicates Backup could not create the recovery point+ -- before the backup window closed. To increase your backup plan window+ -- using the API, see+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_UpdateBackupPlan.html UpdateBackupPlan>.+ -- You can also increase your backup plan window using the Console by+ -- choosing and editing your backup plan.+ --+ -- @EXPIRED@ status indicates that the recovery point has exceeded its+ -- retention period, but Backup lacks permission or is otherwise unable to+ -- delete it. To manually delete these recovery points, see+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/gs-cleanup-resources.html#cleanup-backups Step 3: Delete the recovery points>+ -- in the /Clean up resources/ section of /Getting started/.+ --+ -- @STOPPED@ status occurs on a continuous backup where a user has taken+ -- some action that causes the continuous backup to be disabled. This can+ -- be caused by the removal of permissions, turning off versioning, turning+ -- off events being sent to EventBridge, or disabling the EventBridge rules+ -- that are put in place by Backup.+ --+ -- To resolve @STOPPED@ status, ensure that all requested permissions are+ -- in place and that versioning is enabled on the S3 bucket. Once these+ -- conditions are met, the next instance of a backup rule running will+ -- result in a new continuous recovery point being created. The recovery+ -- points with STOPPED status do not need to be deleted.+ status :: Prelude.Maybe RecoveryPointStatus,+ -- | A status message explaining the reason for the recovery point deletion+ -- failure.+ statusMessage :: Prelude.Maybe Prelude.Text,+ -- | Specifies the storage class of the recovery point. Valid values are+ -- @WARM@ or @COLD@.+ storageClass :: Prelude.Maybe StorageClass,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeRecoveryPointResponse' 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:+--+-- 'backupSizeInBytes', 'describeRecoveryPointResponse_backupSizeInBytes' - The size, in bytes, of a backup.+--+-- 'backupVaultArn', 'describeRecoveryPointResponse_backupVaultArn' - An ARN that uniquely identifies a backup vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'backupVaultName', 'describeRecoveryPointResponse_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+--+-- 'calculatedLifecycle', 'describeRecoveryPointResponse_calculatedLifecycle' - A @CalculatedLifecycle@ object containing @DeleteAt@ and+-- @MoveToColdStorageAt@ timestamps.+--+-- 'completionDate', 'describeRecoveryPointResponse_completionDate' - The date and time that a job to create a recovery point is completed, in+-- Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'compositeMemberIdentifier', 'describeRecoveryPointResponse_compositeMemberIdentifier' - This is the identifier of a resource within a composite group, such as+-- nested (child) recovery point belonging to a composite (parent) stack.+-- The ID is transferred from the+-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax logical ID>+-- within a stack.+--+-- 'createdBy', 'describeRecoveryPointResponse_createdBy' - Contains identifying information about the creation of a recovery point,+-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+-- @BackupRuleId@ of the backup plan used to create it.+--+-- 'creationDate', 'describeRecoveryPointResponse_creationDate' - The date and time that a recovery point is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'encryptionKeyArn', 'describeRecoveryPointResponse_encryptionKeyArn' - The server-side encryption key used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+--+-- 'iamRoleArn', 'describeRecoveryPointResponse_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+--+-- 'isEncrypted', 'describeRecoveryPointResponse_isEncrypted' - A Boolean value that is returned as @TRUE@ if the specified recovery+-- point is encrypted, or @FALSE@ if the recovery point is not encrypted.+--+-- 'isParent', 'describeRecoveryPointResponse_isParent' - This returns the boolean value that a recovery point is a parent+-- (composite) job.+--+-- 'lastRestoreTime', 'describeRecoveryPointResponse_lastRestoreTime' - The date and time that a recovery point was last restored, in Unix+-- format and Coordinated Universal Time (UTC). The value of+-- @LastRestoreTime@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'lifecycle', 'describeRecoveryPointResponse_lifecycle' - The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups that are transitioned to cold storage must be stored in cold+-- storage for a minimum of 90 days. Therefore, the “retention” setting+-- must be 90 days greater than the “transition to cold after days”+-- setting. The “transition to cold after days” setting cannot be changed+-- after a backup has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+--+-- 'parentRecoveryPointArn', 'describeRecoveryPointResponse_parentRecoveryPointArn' - This is an ARN that uniquely identifies a parent (composite) recovery+-- point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'recoveryPointArn', 'describeRecoveryPointResponse_recoveryPointArn' - An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'resourceArn', 'describeRecoveryPointResponse_resourceArn' - An ARN that uniquely identifies a saved resource. The format of the ARN+-- depends on the resource type.+--+-- 'resourceType', 'describeRecoveryPointResponse_resourceType' - The type of Amazon Web Services resource to save as a recovery point;+-- for example, an Amazon Elastic Block Store (Amazon EBS) volume or an+-- Amazon Relational Database Service (Amazon RDS) database.+--+-- 'sourceBackupVaultArn', 'describeRecoveryPointResponse_sourceBackupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies the source vault+-- where the resource was originally backed up in; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:BackupVault@. If the+-- recovery is restored to the same Amazon Web Services account or Region,+-- this value will be @null@.+--+-- 'status', 'describeRecoveryPointResponse_status' - A status code specifying the state of the recovery point.+--+-- @PARTIAL@ status indicates Backup could not create the recovery point+-- before the backup window closed. To increase your backup plan window+-- using the API, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_UpdateBackupPlan.html UpdateBackupPlan>.+-- You can also increase your backup plan window using the Console by+-- choosing and editing your backup plan.+--+-- @EXPIRED@ status indicates that the recovery point has exceeded its+-- retention period, but Backup lacks permission or is otherwise unable to+-- delete it. To manually delete these recovery points, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/gs-cleanup-resources.html#cleanup-backups Step 3: Delete the recovery points>+-- in the /Clean up resources/ section of /Getting started/.+--+-- @STOPPED@ status occurs on a continuous backup where a user has taken+-- some action that causes the continuous backup to be disabled. This can+-- be caused by the removal of permissions, turning off versioning, turning+-- off events being sent to EventBridge, or disabling the EventBridge rules+-- that are put in place by Backup.+--+-- To resolve @STOPPED@ status, ensure that all requested permissions are+-- in place and that versioning is enabled on the S3 bucket. Once these+-- conditions are met, the next instance of a backup rule running will+-- result in a new continuous recovery point being created. The recovery+-- points with STOPPED status do not need to be deleted.+--+-- 'statusMessage', 'describeRecoveryPointResponse_statusMessage' - A status message explaining the reason for the recovery point deletion+-- failure.+--+-- 'storageClass', 'describeRecoveryPointResponse_storageClass' - Specifies the storage class of the recovery point. Valid values are+-- @WARM@ or @COLD@.+--+-- 'httpStatus', 'describeRecoveryPointResponse_httpStatus' - The response's http status code.+newDescribeRecoveryPointResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeRecoveryPointResponse+newDescribeRecoveryPointResponse pHttpStatus_ =+ DescribeRecoveryPointResponse'+ { backupSizeInBytes =+ Prelude.Nothing,+ backupVaultArn = Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ calculatedLifecycle = Prelude.Nothing,+ completionDate = Prelude.Nothing,+ compositeMemberIdentifier = Prelude.Nothing,+ createdBy = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ encryptionKeyArn = Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ isEncrypted = Prelude.Nothing,+ isParent = Prelude.Nothing,+ lastRestoreTime = Prelude.Nothing,+ lifecycle = Prelude.Nothing,+ parentRecoveryPointArn = Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ resourceArn = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ sourceBackupVaultArn = Prelude.Nothing,+ status = Prelude.Nothing,+ statusMessage = Prelude.Nothing,+ storageClass = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The size, in bytes, of a backup.+describeRecoveryPointResponse_backupSizeInBytes :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Integer)+describeRecoveryPointResponse_backupSizeInBytes = Lens.lens (\DescribeRecoveryPointResponse' {backupSizeInBytes} -> backupSizeInBytes) (\s@DescribeRecoveryPointResponse' {} a -> s {backupSizeInBytes = a} :: DescribeRecoveryPointResponse)++-- | An ARN that uniquely identifies a backup vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+describeRecoveryPointResponse_backupVaultArn :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_backupVaultArn = Lens.lens (\DescribeRecoveryPointResponse' {backupVaultArn} -> backupVaultArn) (\s@DescribeRecoveryPointResponse' {} a -> s {backupVaultArn = a} :: DescribeRecoveryPointResponse)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+describeRecoveryPointResponse_backupVaultName :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_backupVaultName = Lens.lens (\DescribeRecoveryPointResponse' {backupVaultName} -> backupVaultName) (\s@DescribeRecoveryPointResponse' {} a -> s {backupVaultName = a} :: DescribeRecoveryPointResponse)++-- | A @CalculatedLifecycle@ object containing @DeleteAt@ and+-- @MoveToColdStorageAt@ timestamps.+describeRecoveryPointResponse_calculatedLifecycle :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe CalculatedLifecycle)+describeRecoveryPointResponse_calculatedLifecycle = Lens.lens (\DescribeRecoveryPointResponse' {calculatedLifecycle} -> calculatedLifecycle) (\s@DescribeRecoveryPointResponse' {} a -> s {calculatedLifecycle = a} :: DescribeRecoveryPointResponse)++-- | The date and time that a job to create a recovery point is completed, in+-- Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+describeRecoveryPointResponse_completionDate :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.UTCTime)+describeRecoveryPointResponse_completionDate = Lens.lens (\DescribeRecoveryPointResponse' {completionDate} -> completionDate) (\s@DescribeRecoveryPointResponse' {} a -> s {completionDate = a} :: DescribeRecoveryPointResponse) Prelude.. Lens.mapping Data._Time++-- | This is the identifier of a resource within a composite group, such as+-- nested (child) recovery point belonging to a composite (parent) stack.+-- The ID is transferred from the+-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax logical ID>+-- within a stack.+describeRecoveryPointResponse_compositeMemberIdentifier :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_compositeMemberIdentifier = Lens.lens (\DescribeRecoveryPointResponse' {compositeMemberIdentifier} -> compositeMemberIdentifier) (\s@DescribeRecoveryPointResponse' {} a -> s {compositeMemberIdentifier = a} :: DescribeRecoveryPointResponse)++-- | Contains identifying information about the creation of a recovery point,+-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+-- @BackupRuleId@ of the backup plan used to create it.+describeRecoveryPointResponse_createdBy :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe RecoveryPointCreator)+describeRecoveryPointResponse_createdBy = Lens.lens (\DescribeRecoveryPointResponse' {createdBy} -> createdBy) (\s@DescribeRecoveryPointResponse' {} a -> s {createdBy = a} :: DescribeRecoveryPointResponse)++-- | The date and time that a recovery point is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+describeRecoveryPointResponse_creationDate :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.UTCTime)+describeRecoveryPointResponse_creationDate = Lens.lens (\DescribeRecoveryPointResponse' {creationDate} -> creationDate) (\s@DescribeRecoveryPointResponse' {} a -> s {creationDate = a} :: DescribeRecoveryPointResponse) Prelude.. Lens.mapping Data._Time++-- | The server-side encryption key used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+describeRecoveryPointResponse_encryptionKeyArn :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_encryptionKeyArn = Lens.lens (\DescribeRecoveryPointResponse' {encryptionKeyArn} -> encryptionKeyArn) (\s@DescribeRecoveryPointResponse' {} a -> s {encryptionKeyArn = a} :: DescribeRecoveryPointResponse)++-- | Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+describeRecoveryPointResponse_iamRoleArn :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_iamRoleArn = Lens.lens (\DescribeRecoveryPointResponse' {iamRoleArn} -> iamRoleArn) (\s@DescribeRecoveryPointResponse' {} a -> s {iamRoleArn = a} :: DescribeRecoveryPointResponse)++-- | A Boolean value that is returned as @TRUE@ if the specified recovery+-- point is encrypted, or @FALSE@ if the recovery point is not encrypted.+describeRecoveryPointResponse_isEncrypted :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Bool)+describeRecoveryPointResponse_isEncrypted = Lens.lens (\DescribeRecoveryPointResponse' {isEncrypted} -> isEncrypted) (\s@DescribeRecoveryPointResponse' {} a -> s {isEncrypted = a} :: DescribeRecoveryPointResponse)++-- | This returns the boolean value that a recovery point is a parent+-- (composite) job.+describeRecoveryPointResponse_isParent :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Bool)+describeRecoveryPointResponse_isParent = Lens.lens (\DescribeRecoveryPointResponse' {isParent} -> isParent) (\s@DescribeRecoveryPointResponse' {} a -> s {isParent = a} :: DescribeRecoveryPointResponse)++-- | The date and time that a recovery point was last restored, in Unix+-- format and Coordinated Universal Time (UTC). The value of+-- @LastRestoreTime@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+describeRecoveryPointResponse_lastRestoreTime :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.UTCTime)+describeRecoveryPointResponse_lastRestoreTime = Lens.lens (\DescribeRecoveryPointResponse' {lastRestoreTime} -> lastRestoreTime) (\s@DescribeRecoveryPointResponse' {} a -> s {lastRestoreTime = a} :: DescribeRecoveryPointResponse) Prelude.. Lens.mapping Data._Time++-- | The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups that are transitioned to cold storage must be stored in cold+-- storage for a minimum of 90 days. Therefore, the “retention” setting+-- must be 90 days greater than the “transition to cold after days”+-- setting. The “transition to cold after days” setting cannot be changed+-- after a backup has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+describeRecoveryPointResponse_lifecycle :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Lifecycle)+describeRecoveryPointResponse_lifecycle = Lens.lens (\DescribeRecoveryPointResponse' {lifecycle} -> lifecycle) (\s@DescribeRecoveryPointResponse' {} a -> s {lifecycle = a} :: DescribeRecoveryPointResponse)++-- | This is an ARN that uniquely identifies a parent (composite) recovery+-- point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+describeRecoveryPointResponse_parentRecoveryPointArn :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_parentRecoveryPointArn = Lens.lens (\DescribeRecoveryPointResponse' {parentRecoveryPointArn} -> parentRecoveryPointArn) (\s@DescribeRecoveryPointResponse' {} a -> s {parentRecoveryPointArn = a} :: DescribeRecoveryPointResponse)++-- | An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+describeRecoveryPointResponse_recoveryPointArn :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_recoveryPointArn = Lens.lens (\DescribeRecoveryPointResponse' {recoveryPointArn} -> recoveryPointArn) (\s@DescribeRecoveryPointResponse' {} a -> s {recoveryPointArn = a} :: DescribeRecoveryPointResponse)++-- | An ARN that uniquely identifies a saved resource. The format of the ARN+-- depends on the resource type.+describeRecoveryPointResponse_resourceArn :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_resourceArn = Lens.lens (\DescribeRecoveryPointResponse' {resourceArn} -> resourceArn) (\s@DescribeRecoveryPointResponse' {} a -> s {resourceArn = a} :: DescribeRecoveryPointResponse)++-- | The type of Amazon Web Services resource to save as a recovery point;+-- for example, an Amazon Elastic Block Store (Amazon EBS) volume or an+-- Amazon Relational Database Service (Amazon RDS) database.+describeRecoveryPointResponse_resourceType :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_resourceType = Lens.lens (\DescribeRecoveryPointResponse' {resourceType} -> resourceType) (\s@DescribeRecoveryPointResponse' {} a -> s {resourceType = a} :: DescribeRecoveryPointResponse)++-- | An Amazon Resource Name (ARN) that uniquely identifies the source vault+-- where the resource was originally backed up in; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:BackupVault@. If the+-- recovery is restored to the same Amazon Web Services account or Region,+-- this value will be @null@.+describeRecoveryPointResponse_sourceBackupVaultArn :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_sourceBackupVaultArn = Lens.lens (\DescribeRecoveryPointResponse' {sourceBackupVaultArn} -> sourceBackupVaultArn) (\s@DescribeRecoveryPointResponse' {} a -> s {sourceBackupVaultArn = a} :: DescribeRecoveryPointResponse)++-- | A status code specifying the state of the recovery point.+--+-- @PARTIAL@ status indicates Backup could not create the recovery point+-- before the backup window closed. To increase your backup plan window+-- using the API, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_UpdateBackupPlan.html UpdateBackupPlan>.+-- You can also increase your backup plan window using the Console by+-- choosing and editing your backup plan.+--+-- @EXPIRED@ status indicates that the recovery point has exceeded its+-- retention period, but Backup lacks permission or is otherwise unable to+-- delete it. To manually delete these recovery points, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/gs-cleanup-resources.html#cleanup-backups Step 3: Delete the recovery points>+-- in the /Clean up resources/ section of /Getting started/.+--+-- @STOPPED@ status occurs on a continuous backup where a user has taken+-- some action that causes the continuous backup to be disabled. This can+-- be caused by the removal of permissions, turning off versioning, turning+-- off events being sent to EventBridge, or disabling the EventBridge rules+-- that are put in place by Backup.+--+-- To resolve @STOPPED@ status, ensure that all requested permissions are+-- in place and that versioning is enabled on the S3 bucket. Once these+-- conditions are met, the next instance of a backup rule running will+-- result in a new continuous recovery point being created. The recovery+-- points with STOPPED status do not need to be deleted.+describeRecoveryPointResponse_status :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe RecoveryPointStatus)+describeRecoveryPointResponse_status = Lens.lens (\DescribeRecoveryPointResponse' {status} -> status) (\s@DescribeRecoveryPointResponse' {} a -> s {status = a} :: DescribeRecoveryPointResponse)++-- | A status message explaining the reason for the recovery point deletion+-- failure.+describeRecoveryPointResponse_statusMessage :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe Prelude.Text)+describeRecoveryPointResponse_statusMessage = Lens.lens (\DescribeRecoveryPointResponse' {statusMessage} -> statusMessage) (\s@DescribeRecoveryPointResponse' {} a -> s {statusMessage = a} :: DescribeRecoveryPointResponse)++-- | Specifies the storage class of the recovery point. Valid values are+-- @WARM@ or @COLD@.+describeRecoveryPointResponse_storageClass :: Lens.Lens' DescribeRecoveryPointResponse (Prelude.Maybe StorageClass)+describeRecoveryPointResponse_storageClass = Lens.lens (\DescribeRecoveryPointResponse' {storageClass} -> storageClass) (\s@DescribeRecoveryPointResponse' {} a -> s {storageClass = a} :: DescribeRecoveryPointResponse)++-- | The response's http status code.+describeRecoveryPointResponse_httpStatus :: Lens.Lens' DescribeRecoveryPointResponse Prelude.Int+describeRecoveryPointResponse_httpStatus = Lens.lens (\DescribeRecoveryPointResponse' {httpStatus} -> httpStatus) (\s@DescribeRecoveryPointResponse' {} a -> s {httpStatus = a} :: DescribeRecoveryPointResponse)++instance Prelude.NFData DescribeRecoveryPointResponse where+ rnf DescribeRecoveryPointResponse' {..} =+ Prelude.rnf backupSizeInBytes+ `Prelude.seq` Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf calculatedLifecycle+ `Prelude.seq` Prelude.rnf completionDate+ `Prelude.seq` Prelude.rnf compositeMemberIdentifier+ `Prelude.seq` Prelude.rnf createdBy+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf encryptionKeyArn+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf isEncrypted+ `Prelude.seq` Prelude.rnf isParent+ `Prelude.seq` Prelude.rnf lastRestoreTime+ `Prelude.seq` Prelude.rnf lifecycle+ `Prelude.seq` Prelude.rnf parentRecoveryPointArn+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf sourceBackupVaultArn+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf statusMessage+ `Prelude.seq` Prelude.rnf storageClass+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DescribeRegionSettings.hs view
@@ -0,0 +1,206 @@+{-# 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.Backup.DescribeRegionSettings+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the current service opt-in settings for the Region. If service+-- opt-in is enabled for a service, Backup tries to protect that service\'s+-- resources in this Region, when the resource is included in an on-demand+-- backup or scheduled backup plan. Otherwise, Backup does not try to+-- protect that service\'s resources in this Region.+module Amazonka.Backup.DescribeRegionSettings+ ( -- * Creating a Request+ DescribeRegionSettings (..),+ newDescribeRegionSettings,++ -- * Destructuring the Response+ DescribeRegionSettingsResponse (..),+ newDescribeRegionSettingsResponse,++ -- * Response Lenses+ describeRegionSettingsResponse_resourceTypeManagementPreference,+ describeRegionSettingsResponse_resourceTypeOptInPreference,+ describeRegionSettingsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeRegionSettings' smart constructor.+data DescribeRegionSettings = DescribeRegionSettings'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeRegionSettings' 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.+newDescribeRegionSettings ::+ DescribeRegionSettings+newDescribeRegionSettings = DescribeRegionSettings'++instance Core.AWSRequest DescribeRegionSettings where+ type+ AWSResponse DescribeRegionSettings =+ DescribeRegionSettingsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeRegionSettingsResponse'+ Prelude.<$> ( x+ Data..?> "ResourceTypeManagementPreference"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> ( x+ Data..?> "ResourceTypeOptInPreference"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeRegionSettings where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance Prelude.NFData DescribeRegionSettings where+ rnf _ = ()++instance Data.ToHeaders DescribeRegionSettings where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeRegionSettings where+ toPath = Prelude.const "/account-settings"++instance Data.ToQuery DescribeRegionSettings where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeRegionSettingsResponse' smart constructor.+data DescribeRegionSettingsResponse = DescribeRegionSettingsResponse'+ { -- | Returns whether Backup fully manages the backups for a resource type.+ --+ -- For the benefits of full Backup management, see+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#full-management Full Backup management>.+ --+ -- For a list of resource types and whether each supports full Backup+ -- management, see the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+ -- table.+ --+ -- If @\"DynamoDB\":false@, you can enable full Backup management for+ -- DynamoDB backup by enabling+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html#advanced-ddb-backup-enable-cli Backup\'s advanced DynamoDB backup features>.+ resourceTypeManagementPreference :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool),+ -- | Returns a list of all services along with the opt-in preferences in the+ -- Region.+ resourceTypeOptInPreference :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool),+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeRegionSettingsResponse' 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:+--+-- 'resourceTypeManagementPreference', 'describeRegionSettingsResponse_resourceTypeManagementPreference' - Returns whether Backup fully manages the backups for a resource type.+--+-- For the benefits of full Backup management, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#full-management Full Backup management>.+--+-- For a list of resource types and whether each supports full Backup+-- management, see the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table.+--+-- If @\"DynamoDB\":false@, you can enable full Backup management for+-- DynamoDB backup by enabling+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html#advanced-ddb-backup-enable-cli Backup\'s advanced DynamoDB backup features>.+--+-- 'resourceTypeOptInPreference', 'describeRegionSettingsResponse_resourceTypeOptInPreference' - Returns a list of all services along with the opt-in preferences in the+-- Region.+--+-- 'httpStatus', 'describeRegionSettingsResponse_httpStatus' - The response's http status code.+newDescribeRegionSettingsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeRegionSettingsResponse+newDescribeRegionSettingsResponse pHttpStatus_ =+ DescribeRegionSettingsResponse'+ { resourceTypeManagementPreference =+ Prelude.Nothing,+ resourceTypeOptInPreference =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Returns whether Backup fully manages the backups for a resource type.+--+-- For the benefits of full Backup management, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#full-management Full Backup management>.+--+-- For a list of resource types and whether each supports full Backup+-- management, see the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table.+--+-- If @\"DynamoDB\":false@, you can enable full Backup management for+-- DynamoDB backup by enabling+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html#advanced-ddb-backup-enable-cli Backup\'s advanced DynamoDB backup features>.+describeRegionSettingsResponse_resourceTypeManagementPreference :: Lens.Lens' DescribeRegionSettingsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool))+describeRegionSettingsResponse_resourceTypeManagementPreference = Lens.lens (\DescribeRegionSettingsResponse' {resourceTypeManagementPreference} -> resourceTypeManagementPreference) (\s@DescribeRegionSettingsResponse' {} a -> s {resourceTypeManagementPreference = a} :: DescribeRegionSettingsResponse) Prelude.. Lens.mapping Lens.coerced++-- | Returns a list of all services along with the opt-in preferences in the+-- Region.+describeRegionSettingsResponse_resourceTypeOptInPreference :: Lens.Lens' DescribeRegionSettingsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool))+describeRegionSettingsResponse_resourceTypeOptInPreference = Lens.lens (\DescribeRegionSettingsResponse' {resourceTypeOptInPreference} -> resourceTypeOptInPreference) (\s@DescribeRegionSettingsResponse' {} a -> s {resourceTypeOptInPreference = a} :: DescribeRegionSettingsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+describeRegionSettingsResponse_httpStatus :: Lens.Lens' DescribeRegionSettingsResponse Prelude.Int+describeRegionSettingsResponse_httpStatus = Lens.lens (\DescribeRegionSettingsResponse' {httpStatus} -> httpStatus) (\s@DescribeRegionSettingsResponse' {} a -> s {httpStatus = a} :: DescribeRegionSettingsResponse)++instance+ Prelude.NFData+ DescribeRegionSettingsResponse+ where+ rnf DescribeRegionSettingsResponse' {..} =+ Prelude.rnf resourceTypeManagementPreference+ `Prelude.seq` Prelude.rnf resourceTypeOptInPreference+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DescribeReportJob.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.Backup.DescribeReportJob+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the details associated with creating a report as specified by+-- its @ReportJobId@.+module Amazonka.Backup.DescribeReportJob+ ( -- * Creating a Request+ DescribeReportJob (..),+ newDescribeReportJob,++ -- * Request Lenses+ describeReportJob_reportJobId,++ -- * Destructuring the Response+ DescribeReportJobResponse (..),+ newDescribeReportJobResponse,++ -- * Response Lenses+ describeReportJobResponse_reportJob,+ describeReportJobResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeReportJob' smart constructor.+data DescribeReportJob = DescribeReportJob'+ { -- | The identifier of the report job. A unique, randomly generated, Unicode,+ -- UTF-8 encoded string that is at most 1,024 bytes long. The report job ID+ -- cannot be edited.+ reportJobId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeReportJob' 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:+--+-- 'reportJobId', 'describeReportJob_reportJobId' - The identifier of the report job. A unique, randomly generated, Unicode,+-- UTF-8 encoded string that is at most 1,024 bytes long. The report job ID+-- cannot be edited.+newDescribeReportJob ::+ -- | 'reportJobId'+ Prelude.Text ->+ DescribeReportJob+newDescribeReportJob pReportJobId_ =+ DescribeReportJob' {reportJobId = pReportJobId_}++-- | The identifier of the report job. A unique, randomly generated, Unicode,+-- UTF-8 encoded string that is at most 1,024 bytes long. The report job ID+-- cannot be edited.+describeReportJob_reportJobId :: Lens.Lens' DescribeReportJob Prelude.Text+describeReportJob_reportJobId = Lens.lens (\DescribeReportJob' {reportJobId} -> reportJobId) (\s@DescribeReportJob' {} a -> s {reportJobId = a} :: DescribeReportJob)++instance Core.AWSRequest DescribeReportJob where+ type+ AWSResponse DescribeReportJob =+ DescribeReportJobResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeReportJobResponse'+ Prelude.<$> (x Data..?> "ReportJob")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeReportJob where+ hashWithSalt _salt DescribeReportJob' {..} =+ _salt `Prelude.hashWithSalt` reportJobId++instance Prelude.NFData DescribeReportJob where+ rnf DescribeReportJob' {..} = Prelude.rnf reportJobId++instance Data.ToHeaders DescribeReportJob where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeReportJob where+ toPath DescribeReportJob' {..} =+ Prelude.mconcat+ ["/audit/report-jobs/", Data.toBS reportJobId]++instance Data.ToQuery DescribeReportJob where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeReportJobResponse' smart constructor.+data DescribeReportJobResponse = DescribeReportJobResponse'+ { -- | A list of information about a report job, including its completion and+ -- creation times, report destination, unique report job ID, Amazon+ -- Resource Name (ARN), report template, status, and status message.+ reportJob :: Prelude.Maybe ReportJob,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeReportJobResponse' 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:+--+-- 'reportJob', 'describeReportJobResponse_reportJob' - A list of information about a report job, including its completion and+-- creation times, report destination, unique report job ID, Amazon+-- Resource Name (ARN), report template, status, and status message.+--+-- 'httpStatus', 'describeReportJobResponse_httpStatus' - The response's http status code.+newDescribeReportJobResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeReportJobResponse+newDescribeReportJobResponse pHttpStatus_ =+ DescribeReportJobResponse'+ { reportJob =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A list of information about a report job, including its completion and+-- creation times, report destination, unique report job ID, Amazon+-- Resource Name (ARN), report template, status, and status message.+describeReportJobResponse_reportJob :: Lens.Lens' DescribeReportJobResponse (Prelude.Maybe ReportJob)+describeReportJobResponse_reportJob = Lens.lens (\DescribeReportJobResponse' {reportJob} -> reportJob) (\s@DescribeReportJobResponse' {} a -> s {reportJob = a} :: DescribeReportJobResponse)++-- | The response's http status code.+describeReportJobResponse_httpStatus :: Lens.Lens' DescribeReportJobResponse Prelude.Int+describeReportJobResponse_httpStatus = Lens.lens (\DescribeReportJobResponse' {httpStatus} -> httpStatus) (\s@DescribeReportJobResponse' {} a -> s {httpStatus = a} :: DescribeReportJobResponse)++instance Prelude.NFData DescribeReportJobResponse where+ rnf DescribeReportJobResponse' {..} =+ Prelude.rnf reportJob+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DescribeReportPlan.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.Backup.DescribeReportPlan+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of all report plans for an Amazon Web Services account+-- and Amazon Web Services Region.+module Amazonka.Backup.DescribeReportPlan+ ( -- * Creating a Request+ DescribeReportPlan (..),+ newDescribeReportPlan,++ -- * Request Lenses+ describeReportPlan_reportPlanName,++ -- * Destructuring the Response+ DescribeReportPlanResponse (..),+ newDescribeReportPlanResponse,++ -- * Response Lenses+ describeReportPlanResponse_reportPlan,+ describeReportPlanResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeReportPlan' smart constructor.+data DescribeReportPlan = DescribeReportPlan'+ { -- | The unique name of a report plan.+ reportPlanName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeReportPlan' 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:+--+-- 'reportPlanName', 'describeReportPlan_reportPlanName' - The unique name of a report plan.+newDescribeReportPlan ::+ -- | 'reportPlanName'+ Prelude.Text ->+ DescribeReportPlan+newDescribeReportPlan pReportPlanName_ =+ DescribeReportPlan'+ { reportPlanName =+ pReportPlanName_+ }++-- | The unique name of a report plan.+describeReportPlan_reportPlanName :: Lens.Lens' DescribeReportPlan Prelude.Text+describeReportPlan_reportPlanName = Lens.lens (\DescribeReportPlan' {reportPlanName} -> reportPlanName) (\s@DescribeReportPlan' {} a -> s {reportPlanName = a} :: DescribeReportPlan)++instance Core.AWSRequest DescribeReportPlan where+ type+ AWSResponse DescribeReportPlan =+ DescribeReportPlanResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeReportPlanResponse'+ Prelude.<$> (x Data..?> "ReportPlan")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeReportPlan where+ hashWithSalt _salt DescribeReportPlan' {..} =+ _salt `Prelude.hashWithSalt` reportPlanName++instance Prelude.NFData DescribeReportPlan where+ rnf DescribeReportPlan' {..} =+ Prelude.rnf reportPlanName++instance Data.ToHeaders DescribeReportPlan where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeReportPlan where+ toPath DescribeReportPlan' {..} =+ Prelude.mconcat+ ["/audit/report-plans/", Data.toBS reportPlanName]++instance Data.ToQuery DescribeReportPlan where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeReportPlanResponse' smart constructor.+data DescribeReportPlanResponse = DescribeReportPlanResponse'+ { -- | Returns details about the report plan that is specified by its name.+ -- These details include the report plan\'s Amazon Resource Name (ARN),+ -- description, settings, delivery channel, deployment status, creation+ -- time, and last attempted and successful run times.+ reportPlan :: Prelude.Maybe ReportPlan,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeReportPlanResponse' 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:+--+-- 'reportPlan', 'describeReportPlanResponse_reportPlan' - Returns details about the report plan that is specified by its name.+-- These details include the report plan\'s Amazon Resource Name (ARN),+-- description, settings, delivery channel, deployment status, creation+-- time, and last attempted and successful run times.+--+-- 'httpStatus', 'describeReportPlanResponse_httpStatus' - The response's http status code.+newDescribeReportPlanResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeReportPlanResponse+newDescribeReportPlanResponse pHttpStatus_ =+ DescribeReportPlanResponse'+ { reportPlan =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Returns details about the report plan that is specified by its name.+-- These details include the report plan\'s Amazon Resource Name (ARN),+-- description, settings, delivery channel, deployment status, creation+-- time, and last attempted and successful run times.+describeReportPlanResponse_reportPlan :: Lens.Lens' DescribeReportPlanResponse (Prelude.Maybe ReportPlan)+describeReportPlanResponse_reportPlan = Lens.lens (\DescribeReportPlanResponse' {reportPlan} -> reportPlan) (\s@DescribeReportPlanResponse' {} a -> s {reportPlan = a} :: DescribeReportPlanResponse)++-- | The response's http status code.+describeReportPlanResponse_httpStatus :: Lens.Lens' DescribeReportPlanResponse Prelude.Int+describeReportPlanResponse_httpStatus = Lens.lens (\DescribeReportPlanResponse' {httpStatus} -> httpStatus) (\s@DescribeReportPlanResponse' {} a -> s {httpStatus = a} :: DescribeReportPlanResponse)++instance Prelude.NFData DescribeReportPlanResponse where+ rnf DescribeReportPlanResponse' {..} =+ Prelude.rnf reportPlan+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DescribeRestoreJob.hs view
@@ -0,0 +1,344 @@+{-# 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.Backup.DescribeRestoreJob+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns metadata associated with a restore job that is specified by a+-- job ID.+module Amazonka.Backup.DescribeRestoreJob+ ( -- * Creating a Request+ DescribeRestoreJob (..),+ newDescribeRestoreJob,++ -- * Request Lenses+ describeRestoreJob_restoreJobId,++ -- * Destructuring the Response+ DescribeRestoreJobResponse (..),+ newDescribeRestoreJobResponse,++ -- * Response Lenses+ describeRestoreJobResponse_accountId,+ describeRestoreJobResponse_backupSizeInBytes,+ describeRestoreJobResponse_completionDate,+ describeRestoreJobResponse_createdResourceArn,+ describeRestoreJobResponse_creationDate,+ describeRestoreJobResponse_expectedCompletionTimeMinutes,+ describeRestoreJobResponse_iamRoleArn,+ describeRestoreJobResponse_percentDone,+ describeRestoreJobResponse_recoveryPointArn,+ describeRestoreJobResponse_resourceType,+ describeRestoreJobResponse_restoreJobId,+ describeRestoreJobResponse_status,+ describeRestoreJobResponse_statusMessage,+ describeRestoreJobResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newDescribeRestoreJob' smart constructor.+data DescribeRestoreJob = DescribeRestoreJob'+ { -- | Uniquely identifies the job that restores a recovery point.+ restoreJobId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeRestoreJob' 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:+--+-- 'restoreJobId', 'describeRestoreJob_restoreJobId' - Uniquely identifies the job that restores a recovery point.+newDescribeRestoreJob ::+ -- | 'restoreJobId'+ Prelude.Text ->+ DescribeRestoreJob+newDescribeRestoreJob pRestoreJobId_ =+ DescribeRestoreJob' {restoreJobId = pRestoreJobId_}++-- | Uniquely identifies the job that restores a recovery point.+describeRestoreJob_restoreJobId :: Lens.Lens' DescribeRestoreJob Prelude.Text+describeRestoreJob_restoreJobId = Lens.lens (\DescribeRestoreJob' {restoreJobId} -> restoreJobId) (\s@DescribeRestoreJob' {} a -> s {restoreJobId = a} :: DescribeRestoreJob)++instance Core.AWSRequest DescribeRestoreJob where+ type+ AWSResponse DescribeRestoreJob =+ DescribeRestoreJobResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeRestoreJobResponse'+ Prelude.<$> (x Data..?> "AccountId")+ Prelude.<*> (x Data..?> "BackupSizeInBytes")+ Prelude.<*> (x Data..?> "CompletionDate")+ Prelude.<*> (x Data..?> "CreatedResourceArn")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "ExpectedCompletionTimeMinutes")+ Prelude.<*> (x Data..?> "IamRoleArn")+ Prelude.<*> (x Data..?> "PercentDone")+ Prelude.<*> (x Data..?> "RecoveryPointArn")+ Prelude.<*> (x Data..?> "ResourceType")+ Prelude.<*> (x Data..?> "RestoreJobId")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "StatusMessage")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DescribeRestoreJob where+ hashWithSalt _salt DescribeRestoreJob' {..} =+ _salt `Prelude.hashWithSalt` restoreJobId++instance Prelude.NFData DescribeRestoreJob where+ rnf DescribeRestoreJob' {..} =+ Prelude.rnf restoreJobId++instance Data.ToHeaders DescribeRestoreJob where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DescribeRestoreJob where+ toPath DescribeRestoreJob' {..} =+ Prelude.mconcat+ ["/restore-jobs/", Data.toBS restoreJobId]++instance Data.ToQuery DescribeRestoreJob where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeRestoreJobResponse' smart constructor.+data DescribeRestoreJobResponse = DescribeRestoreJobResponse'+ { -- | Returns the account ID that owns the restore job.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The size, in bytes, of the restored resource.+ backupSizeInBytes :: Prelude.Maybe Prelude.Integer,+ -- | The date and time that a job to restore a recovery point is completed,+ -- in Unix format and Coordinated Universal Time (UTC). The value of+ -- @CompletionDate@ is accurate to milliseconds. For example, the value+ -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+ completionDate :: Prelude.Maybe Data.POSIX,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource whose+ -- recovery point is being restored. The format of the ARN depends on the+ -- resource type of the backed-up resource.+ createdResourceArn :: Prelude.Maybe Prelude.Text,+ -- | The date and time that a restore job is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The amount of time in minutes that a job restoring a recovery point is+ -- expected to take.+ expectedCompletionTimeMinutes :: Prelude.Maybe Prelude.Integer,+ -- | Specifies the IAM role ARN used to create the target recovery point; for+ -- example, @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | Contains an estimated percentage that is complete of a job at the time+ -- the job status was queried.+ percentDone :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | Returns metadata associated with a restore job listed by resource type.+ resourceType :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies the job that restores a recovery point.+ restoreJobId :: Prelude.Maybe Prelude.Text,+ -- | Status code specifying the state of the job that is initiated by Backup+ -- to restore a recovery point.+ status :: Prelude.Maybe RestoreJobStatus,+ -- | A message showing the status of a job to restore a recovery point.+ statusMessage :: 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 'DescribeRestoreJobResponse' 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:+--+-- 'accountId', 'describeRestoreJobResponse_accountId' - Returns the account ID that owns the restore job.+--+-- 'backupSizeInBytes', 'describeRestoreJobResponse_backupSizeInBytes' - The size, in bytes, of the restored resource.+--+-- 'completionDate', 'describeRestoreJobResponse_completionDate' - The date and time that a job to restore a recovery point is completed,+-- in Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'createdResourceArn', 'describeRestoreJobResponse_createdResourceArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource whose+-- recovery point is being restored. The format of the ARN depends on the+-- resource type of the backed-up resource.+--+-- 'creationDate', 'describeRestoreJobResponse_creationDate' - The date and time that a restore job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'expectedCompletionTimeMinutes', 'describeRestoreJobResponse_expectedCompletionTimeMinutes' - The amount of time in minutes that a job restoring a recovery point is+-- expected to take.+--+-- 'iamRoleArn', 'describeRestoreJobResponse_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+--+-- 'percentDone', 'describeRestoreJobResponse_percentDone' - Contains an estimated percentage that is complete of a job at the time+-- the job status was queried.+--+-- 'recoveryPointArn', 'describeRestoreJobResponse_recoveryPointArn' - An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'resourceType', 'describeRestoreJobResponse_resourceType' - Returns metadata associated with a restore job listed by resource type.+--+-- 'restoreJobId', 'describeRestoreJobResponse_restoreJobId' - Uniquely identifies the job that restores a recovery point.+--+-- 'status', 'describeRestoreJobResponse_status' - Status code specifying the state of the job that is initiated by Backup+-- to restore a recovery point.+--+-- 'statusMessage', 'describeRestoreJobResponse_statusMessage' - A message showing the status of a job to restore a recovery point.+--+-- 'httpStatus', 'describeRestoreJobResponse_httpStatus' - The response's http status code.+newDescribeRestoreJobResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeRestoreJobResponse+newDescribeRestoreJobResponse pHttpStatus_ =+ DescribeRestoreJobResponse'+ { accountId =+ Prelude.Nothing,+ backupSizeInBytes = Prelude.Nothing,+ completionDate = Prelude.Nothing,+ createdResourceArn = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ expectedCompletionTimeMinutes = Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ percentDone = Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ restoreJobId = Prelude.Nothing,+ status = Prelude.Nothing,+ statusMessage = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Returns the account ID that owns the restore job.+describeRestoreJobResponse_accountId :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)+describeRestoreJobResponse_accountId = Lens.lens (\DescribeRestoreJobResponse' {accountId} -> accountId) (\s@DescribeRestoreJobResponse' {} a -> s {accountId = a} :: DescribeRestoreJobResponse)++-- | The size, in bytes, of the restored resource.+describeRestoreJobResponse_backupSizeInBytes :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Integer)+describeRestoreJobResponse_backupSizeInBytes = Lens.lens (\DescribeRestoreJobResponse' {backupSizeInBytes} -> backupSizeInBytes) (\s@DescribeRestoreJobResponse' {} a -> s {backupSizeInBytes = a} :: DescribeRestoreJobResponse)++-- | The date and time that a job to restore a recovery point is completed,+-- in Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+describeRestoreJobResponse_completionDate :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.UTCTime)+describeRestoreJobResponse_completionDate = Lens.lens (\DescribeRestoreJobResponse' {completionDate} -> completionDate) (\s@DescribeRestoreJobResponse' {} a -> s {completionDate = a} :: DescribeRestoreJobResponse) Prelude.. Lens.mapping Data._Time++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource whose+-- recovery point is being restored. The format of the ARN depends on the+-- resource type of the backed-up resource.+describeRestoreJobResponse_createdResourceArn :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)+describeRestoreJobResponse_createdResourceArn = Lens.lens (\DescribeRestoreJobResponse' {createdResourceArn} -> createdResourceArn) (\s@DescribeRestoreJobResponse' {} a -> s {createdResourceArn = a} :: DescribeRestoreJobResponse)++-- | The date and time that a restore job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+describeRestoreJobResponse_creationDate :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.UTCTime)+describeRestoreJobResponse_creationDate = Lens.lens (\DescribeRestoreJobResponse' {creationDate} -> creationDate) (\s@DescribeRestoreJobResponse' {} a -> s {creationDate = a} :: DescribeRestoreJobResponse) Prelude.. Lens.mapping Data._Time++-- | The amount of time in minutes that a job restoring a recovery point is+-- expected to take.+describeRestoreJobResponse_expectedCompletionTimeMinutes :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Integer)+describeRestoreJobResponse_expectedCompletionTimeMinutes = Lens.lens (\DescribeRestoreJobResponse' {expectedCompletionTimeMinutes} -> expectedCompletionTimeMinutes) (\s@DescribeRestoreJobResponse' {} a -> s {expectedCompletionTimeMinutes = a} :: DescribeRestoreJobResponse)++-- | Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+describeRestoreJobResponse_iamRoleArn :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)+describeRestoreJobResponse_iamRoleArn = Lens.lens (\DescribeRestoreJobResponse' {iamRoleArn} -> iamRoleArn) (\s@DescribeRestoreJobResponse' {} a -> s {iamRoleArn = a} :: DescribeRestoreJobResponse)++-- | Contains an estimated percentage that is complete of a job at the time+-- the job status was queried.+describeRestoreJobResponse_percentDone :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)+describeRestoreJobResponse_percentDone = Lens.lens (\DescribeRestoreJobResponse' {percentDone} -> percentDone) (\s@DescribeRestoreJobResponse' {} a -> s {percentDone = a} :: DescribeRestoreJobResponse)++-- | An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+describeRestoreJobResponse_recoveryPointArn :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)+describeRestoreJobResponse_recoveryPointArn = Lens.lens (\DescribeRestoreJobResponse' {recoveryPointArn} -> recoveryPointArn) (\s@DescribeRestoreJobResponse' {} a -> s {recoveryPointArn = a} :: DescribeRestoreJobResponse)++-- | Returns metadata associated with a restore job listed by resource type.+describeRestoreJobResponse_resourceType :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)+describeRestoreJobResponse_resourceType = Lens.lens (\DescribeRestoreJobResponse' {resourceType} -> resourceType) (\s@DescribeRestoreJobResponse' {} a -> s {resourceType = a} :: DescribeRestoreJobResponse)++-- | Uniquely identifies the job that restores a recovery point.+describeRestoreJobResponse_restoreJobId :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)+describeRestoreJobResponse_restoreJobId = Lens.lens (\DescribeRestoreJobResponse' {restoreJobId} -> restoreJobId) (\s@DescribeRestoreJobResponse' {} a -> s {restoreJobId = a} :: DescribeRestoreJobResponse)++-- | Status code specifying the state of the job that is initiated by Backup+-- to restore a recovery point.+describeRestoreJobResponse_status :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe RestoreJobStatus)+describeRestoreJobResponse_status = Lens.lens (\DescribeRestoreJobResponse' {status} -> status) (\s@DescribeRestoreJobResponse' {} a -> s {status = a} :: DescribeRestoreJobResponse)++-- | A message showing the status of a job to restore a recovery point.+describeRestoreJobResponse_statusMessage :: Lens.Lens' DescribeRestoreJobResponse (Prelude.Maybe Prelude.Text)+describeRestoreJobResponse_statusMessage = Lens.lens (\DescribeRestoreJobResponse' {statusMessage} -> statusMessage) (\s@DescribeRestoreJobResponse' {} a -> s {statusMessage = a} :: DescribeRestoreJobResponse)++-- | The response's http status code.+describeRestoreJobResponse_httpStatus :: Lens.Lens' DescribeRestoreJobResponse Prelude.Int+describeRestoreJobResponse_httpStatus = Lens.lens (\DescribeRestoreJobResponse' {httpStatus} -> httpStatus) (\s@DescribeRestoreJobResponse' {} a -> s {httpStatus = a} :: DescribeRestoreJobResponse)++instance Prelude.NFData DescribeRestoreJobResponse where+ rnf DescribeRestoreJobResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf backupSizeInBytes+ `Prelude.seq` Prelude.rnf completionDate+ `Prelude.seq` Prelude.rnf createdResourceArn+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf expectedCompletionTimeMinutes+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf percentDone+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf restoreJobId+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf statusMessage+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/DisassociateRecoveryPoint.hs view
@@ -0,0 +1,166 @@+{-# 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.Backup.DisassociateRecoveryPoint+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified continuous backup recovery point from Backup and+-- releases control of that continuous backup to the source service, such+-- as Amazon RDS. The source service will continue to create and retain+-- continuous backups using the lifecycle that you specified in your+-- original backup plan.+--+-- Does not support snapshot backup recovery points.+module Amazonka.Backup.DisassociateRecoveryPoint+ ( -- * Creating a Request+ DisassociateRecoveryPoint (..),+ newDisassociateRecoveryPoint,++ -- * Request Lenses+ disassociateRecoveryPoint_backupVaultName,+ disassociateRecoveryPoint_recoveryPointArn,++ -- * Destructuring the Response+ DisassociateRecoveryPointResponse (..),+ newDisassociateRecoveryPointResponse,+ )+where++import Amazonka.Backup.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:/ 'newDisassociateRecoveryPoint' smart constructor.+data DisassociateRecoveryPoint = DisassociateRecoveryPoint'+ { -- | The unique name of an Backup vault.+ backupVaultName :: Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies an Backup+ -- recovery point.+ recoveryPointArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateRecoveryPoint' 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:+--+-- 'backupVaultName', 'disassociateRecoveryPoint_backupVaultName' - The unique name of an Backup vault.+--+-- 'recoveryPointArn', 'disassociateRecoveryPoint_recoveryPointArn' - An Amazon Resource Name (ARN) that uniquely identifies an Backup+-- recovery point.+newDisassociateRecoveryPoint ::+ -- | 'backupVaultName'+ Prelude.Text ->+ -- | 'recoveryPointArn'+ Prelude.Text ->+ DisassociateRecoveryPoint+newDisassociateRecoveryPoint+ pBackupVaultName_+ pRecoveryPointArn_ =+ DisassociateRecoveryPoint'+ { backupVaultName =+ pBackupVaultName_,+ recoveryPointArn = pRecoveryPointArn_+ }++-- | The unique name of an Backup vault.+disassociateRecoveryPoint_backupVaultName :: Lens.Lens' DisassociateRecoveryPoint Prelude.Text+disassociateRecoveryPoint_backupVaultName = Lens.lens (\DisassociateRecoveryPoint' {backupVaultName} -> backupVaultName) (\s@DisassociateRecoveryPoint' {} a -> s {backupVaultName = a} :: DisassociateRecoveryPoint)++-- | An Amazon Resource Name (ARN) that uniquely identifies an Backup+-- recovery point.+disassociateRecoveryPoint_recoveryPointArn :: Lens.Lens' DisassociateRecoveryPoint Prelude.Text+disassociateRecoveryPoint_recoveryPointArn = Lens.lens (\DisassociateRecoveryPoint' {recoveryPointArn} -> recoveryPointArn) (\s@DisassociateRecoveryPoint' {} a -> s {recoveryPointArn = a} :: DisassociateRecoveryPoint)++instance Core.AWSRequest DisassociateRecoveryPoint where+ type+ AWSResponse DisassociateRecoveryPoint =+ DisassociateRecoveryPointResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull+ DisassociateRecoveryPointResponse'++instance Prelude.Hashable DisassociateRecoveryPoint where+ hashWithSalt _salt DisassociateRecoveryPoint' {..} =+ _salt+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` recoveryPointArn++instance Prelude.NFData DisassociateRecoveryPoint where+ rnf DisassociateRecoveryPoint' {..} =+ Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf recoveryPointArn++instance Data.ToHeaders DisassociateRecoveryPoint where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DisassociateRecoveryPoint where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath DisassociateRecoveryPoint where+ toPath DisassociateRecoveryPoint' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/recovery-points/",+ Data.toBS recoveryPointArn,+ "/disassociate"+ ]++instance Data.ToQuery DisassociateRecoveryPoint where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisassociateRecoveryPointResponse' smart constructor.+data DisassociateRecoveryPointResponse = DisassociateRecoveryPointResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateRecoveryPointResponse' 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.+newDisassociateRecoveryPointResponse ::+ DisassociateRecoveryPointResponse+newDisassociateRecoveryPointResponse =+ DisassociateRecoveryPointResponse'++instance+ Prelude.NFData+ DisassociateRecoveryPointResponse+ where+ rnf _ = ()
+ gen/Amazonka/Backup/DisassociateRecoveryPointFromParent.hs view
@@ -0,0 +1,194 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.DisassociateRecoveryPointFromParent+-- 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 to a specific child (nested) recovery point removes the+-- relationship between the specified recovery point and its parent+-- (composite) recovery point.+module Amazonka.Backup.DisassociateRecoveryPointFromParent+ ( -- * Creating a Request+ DisassociateRecoveryPointFromParent (..),+ newDisassociateRecoveryPointFromParent,++ -- * Request Lenses+ disassociateRecoveryPointFromParent_backupVaultName,+ disassociateRecoveryPointFromParent_recoveryPointArn,++ -- * Destructuring the Response+ DisassociateRecoveryPointFromParentResponse (..),+ newDisassociateRecoveryPointFromParentResponse,+ )+where++import Amazonka.Backup.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:/ 'newDisassociateRecoveryPointFromParent' smart constructor.+data DisassociateRecoveryPointFromParent = DisassociateRecoveryPointFromParent'+ { -- | This is the name of a logical container where the child (nested)+ -- recovery point is stored. Backup vaults are identified by names that are+ -- unique to the account used to create them and the Amazon Web Services+ -- Region where they are created. They consist of lowercase letters,+ -- numbers, and hyphens.+ backupVaultName :: Prelude.Text,+ -- | This is the Amazon Resource Name (ARN) that uniquely identifies the+ -- child (nested) recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.@+ recoveryPointArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateRecoveryPointFromParent' 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:+--+-- 'backupVaultName', 'disassociateRecoveryPointFromParent_backupVaultName' - This is the name of a logical container where the child (nested)+-- recovery point is stored. Backup vaults are identified by names that are+-- unique to the account used to create them and the Amazon Web Services+-- Region where they are created. They consist of lowercase letters,+-- numbers, and hyphens.+--+-- 'recoveryPointArn', 'disassociateRecoveryPointFromParent_recoveryPointArn' - This is the Amazon Resource Name (ARN) that uniquely identifies the+-- child (nested) recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.@+newDisassociateRecoveryPointFromParent ::+ -- | 'backupVaultName'+ Prelude.Text ->+ -- | 'recoveryPointArn'+ Prelude.Text ->+ DisassociateRecoveryPointFromParent+newDisassociateRecoveryPointFromParent+ pBackupVaultName_+ pRecoveryPointArn_ =+ DisassociateRecoveryPointFromParent'+ { backupVaultName =+ pBackupVaultName_,+ recoveryPointArn = pRecoveryPointArn_+ }++-- | This is the name of a logical container where the child (nested)+-- recovery point is stored. Backup vaults are identified by names that are+-- unique to the account used to create them and the Amazon Web Services+-- Region where they are created. They consist of lowercase letters,+-- numbers, and hyphens.+disassociateRecoveryPointFromParent_backupVaultName :: Lens.Lens' DisassociateRecoveryPointFromParent Prelude.Text+disassociateRecoveryPointFromParent_backupVaultName = Lens.lens (\DisassociateRecoveryPointFromParent' {backupVaultName} -> backupVaultName) (\s@DisassociateRecoveryPointFromParent' {} a -> s {backupVaultName = a} :: DisassociateRecoveryPointFromParent)++-- | This is the Amazon Resource Name (ARN) that uniquely identifies the+-- child (nested) recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.@+disassociateRecoveryPointFromParent_recoveryPointArn :: Lens.Lens' DisassociateRecoveryPointFromParent Prelude.Text+disassociateRecoveryPointFromParent_recoveryPointArn = Lens.lens (\DisassociateRecoveryPointFromParent' {recoveryPointArn} -> recoveryPointArn) (\s@DisassociateRecoveryPointFromParent' {} a -> s {recoveryPointArn = a} :: DisassociateRecoveryPointFromParent)++instance+ Core.AWSRequest+ DisassociateRecoveryPointFromParent+ where+ type+ AWSResponse DisassociateRecoveryPointFromParent =+ DisassociateRecoveryPointFromParentResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveNull+ DisassociateRecoveryPointFromParentResponse'++instance+ Prelude.Hashable+ DisassociateRecoveryPointFromParent+ where+ hashWithSalt+ _salt+ DisassociateRecoveryPointFromParent' {..} =+ _salt+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` recoveryPointArn++instance+ Prelude.NFData+ DisassociateRecoveryPointFromParent+ where+ rnf DisassociateRecoveryPointFromParent' {..} =+ Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf recoveryPointArn++instance+ Data.ToHeaders+ DisassociateRecoveryPointFromParent+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance+ Data.ToPath+ DisassociateRecoveryPointFromParent+ where+ toPath DisassociateRecoveryPointFromParent' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/recovery-points/",+ Data.toBS recoveryPointArn,+ "/parentAssociation"+ ]++instance+ Data.ToQuery+ DisassociateRecoveryPointFromParent+ where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisassociateRecoveryPointFromParentResponse' smart constructor.+data DisassociateRecoveryPointFromParentResponse = DisassociateRecoveryPointFromParentResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateRecoveryPointFromParentResponse' 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.+newDisassociateRecoveryPointFromParentResponse ::+ DisassociateRecoveryPointFromParentResponse+newDisassociateRecoveryPointFromParentResponse =+ DisassociateRecoveryPointFromParentResponse'++instance+ Prelude.NFData+ DisassociateRecoveryPointFromParentResponse+ where+ rnf _ = ()
+ gen/Amazonka/Backup/ExportBackupPlanTemplate.hs view
@@ -0,0 +1,179 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.ExportBackupPlanTemplate+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the backup plan that is specified by the plan ID as a backup+-- template.+module Amazonka.Backup.ExportBackupPlanTemplate+ ( -- * Creating a Request+ ExportBackupPlanTemplate (..),+ newExportBackupPlanTemplate,++ -- * Request Lenses+ exportBackupPlanTemplate_backupPlanId,++ -- * Destructuring the Response+ ExportBackupPlanTemplateResponse (..),+ newExportBackupPlanTemplateResponse,++ -- * Response Lenses+ exportBackupPlanTemplateResponse_backupPlanTemplateJson,+ exportBackupPlanTemplateResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newExportBackupPlanTemplate' smart constructor.+data ExportBackupPlanTemplate = ExportBackupPlanTemplate'+ { -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportBackupPlanTemplate' 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:+--+-- 'backupPlanId', 'exportBackupPlanTemplate_backupPlanId' - Uniquely identifies a backup plan.+newExportBackupPlanTemplate ::+ -- | 'backupPlanId'+ Prelude.Text ->+ ExportBackupPlanTemplate+newExportBackupPlanTemplate pBackupPlanId_ =+ ExportBackupPlanTemplate'+ { backupPlanId =+ pBackupPlanId_+ }++-- | Uniquely identifies a backup plan.+exportBackupPlanTemplate_backupPlanId :: Lens.Lens' ExportBackupPlanTemplate Prelude.Text+exportBackupPlanTemplate_backupPlanId = Lens.lens (\ExportBackupPlanTemplate' {backupPlanId} -> backupPlanId) (\s@ExportBackupPlanTemplate' {} a -> s {backupPlanId = a} :: ExportBackupPlanTemplate)++instance Core.AWSRequest ExportBackupPlanTemplate where+ type+ AWSResponse ExportBackupPlanTemplate =+ ExportBackupPlanTemplateResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ExportBackupPlanTemplateResponse'+ Prelude.<$> (x Data..?> "BackupPlanTemplateJson")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ExportBackupPlanTemplate where+ hashWithSalt _salt ExportBackupPlanTemplate' {..} =+ _salt `Prelude.hashWithSalt` backupPlanId++instance Prelude.NFData ExportBackupPlanTemplate where+ rnf ExportBackupPlanTemplate' {..} =+ Prelude.rnf backupPlanId++instance Data.ToHeaders ExportBackupPlanTemplate where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ExportBackupPlanTemplate where+ toPath ExportBackupPlanTemplate' {..} =+ Prelude.mconcat+ [ "/backup/plans/",+ Data.toBS backupPlanId,+ "/toTemplate/"+ ]++instance Data.ToQuery ExportBackupPlanTemplate where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newExportBackupPlanTemplateResponse' smart constructor.+data ExportBackupPlanTemplateResponse = ExportBackupPlanTemplateResponse'+ { -- | The body of a backup plan template in JSON format.+ --+ -- This is a signed JSON document that cannot be modified before being+ -- passed to @GetBackupPlanFromJSON.@+ backupPlanTemplateJson :: 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 'ExportBackupPlanTemplateResponse' 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:+--+-- 'backupPlanTemplateJson', 'exportBackupPlanTemplateResponse_backupPlanTemplateJson' - The body of a backup plan template in JSON format.+--+-- This is a signed JSON document that cannot be modified before being+-- passed to @GetBackupPlanFromJSON.@+--+-- 'httpStatus', 'exportBackupPlanTemplateResponse_httpStatus' - The response's http status code.+newExportBackupPlanTemplateResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ExportBackupPlanTemplateResponse+newExportBackupPlanTemplateResponse pHttpStatus_ =+ ExportBackupPlanTemplateResponse'+ { backupPlanTemplateJson =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The body of a backup plan template in JSON format.+--+-- This is a signed JSON document that cannot be modified before being+-- passed to @GetBackupPlanFromJSON.@+exportBackupPlanTemplateResponse_backupPlanTemplateJson :: Lens.Lens' ExportBackupPlanTemplateResponse (Prelude.Maybe Prelude.Text)+exportBackupPlanTemplateResponse_backupPlanTemplateJson = Lens.lens (\ExportBackupPlanTemplateResponse' {backupPlanTemplateJson} -> backupPlanTemplateJson) (\s@ExportBackupPlanTemplateResponse' {} a -> s {backupPlanTemplateJson = a} :: ExportBackupPlanTemplateResponse)++-- | The response's http status code.+exportBackupPlanTemplateResponse_httpStatus :: Lens.Lens' ExportBackupPlanTemplateResponse Prelude.Int+exportBackupPlanTemplateResponse_httpStatus = Lens.lens (\ExportBackupPlanTemplateResponse' {httpStatus} -> httpStatus) (\s@ExportBackupPlanTemplateResponse' {} a -> s {httpStatus = a} :: ExportBackupPlanTemplateResponse)++instance+ Prelude.NFData+ ExportBackupPlanTemplateResponse+ where+ rnf ExportBackupPlanTemplateResponse' {..} =+ Prelude.rnf backupPlanTemplateJson+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/GetBackupPlan.hs view
@@ -0,0 +1,328 @@+{-# 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.Backup.GetBackupPlan+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns @BackupPlan@ details for the specified @BackupPlanId@. The+-- details are the body of a backup plan in JSON format, in addition to+-- plan metadata.+module Amazonka.Backup.GetBackupPlan+ ( -- * Creating a Request+ GetBackupPlan (..),+ newGetBackupPlan,++ -- * Request Lenses+ getBackupPlan_versionId,+ getBackupPlan_backupPlanId,++ -- * Destructuring the Response+ GetBackupPlanResponse (..),+ newGetBackupPlanResponse,++ -- * Response Lenses+ getBackupPlanResponse_advancedBackupSettings,+ getBackupPlanResponse_backupPlan,+ getBackupPlanResponse_backupPlanArn,+ getBackupPlanResponse_backupPlanId,+ getBackupPlanResponse_creationDate,+ getBackupPlanResponse_creatorRequestId,+ getBackupPlanResponse_deletionDate,+ getBackupPlanResponse_lastExecutionDate,+ getBackupPlanResponse_versionId,+ getBackupPlanResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newGetBackupPlan' smart constructor.+data GetBackupPlan = GetBackupPlan'+ { -- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+ -- most 1,024 bytes long. Version IDs cannot be edited.+ versionId :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBackupPlan' 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:+--+-- 'versionId', 'getBackupPlan_versionId' - Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version IDs cannot be edited.+--+-- 'backupPlanId', 'getBackupPlan_backupPlanId' - Uniquely identifies a backup plan.+newGetBackupPlan ::+ -- | 'backupPlanId'+ Prelude.Text ->+ GetBackupPlan+newGetBackupPlan pBackupPlanId_ =+ GetBackupPlan'+ { versionId = Prelude.Nothing,+ backupPlanId = pBackupPlanId_+ }++-- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version IDs cannot be edited.+getBackupPlan_versionId :: Lens.Lens' GetBackupPlan (Prelude.Maybe Prelude.Text)+getBackupPlan_versionId = Lens.lens (\GetBackupPlan' {versionId} -> versionId) (\s@GetBackupPlan' {} a -> s {versionId = a} :: GetBackupPlan)++-- | Uniquely identifies a backup plan.+getBackupPlan_backupPlanId :: Lens.Lens' GetBackupPlan Prelude.Text+getBackupPlan_backupPlanId = Lens.lens (\GetBackupPlan' {backupPlanId} -> backupPlanId) (\s@GetBackupPlan' {} a -> s {backupPlanId = a} :: GetBackupPlan)++instance Core.AWSRequest GetBackupPlan where+ type+ AWSResponse GetBackupPlan =+ GetBackupPlanResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetBackupPlanResponse'+ Prelude.<$> ( x+ Data..?> "AdvancedBackupSettings"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "BackupPlan")+ Prelude.<*> (x Data..?> "BackupPlanArn")+ Prelude.<*> (x Data..?> "BackupPlanId")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "CreatorRequestId")+ Prelude.<*> (x Data..?> "DeletionDate")+ Prelude.<*> (x Data..?> "LastExecutionDate")+ Prelude.<*> (x Data..?> "VersionId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetBackupPlan where+ hashWithSalt _salt GetBackupPlan' {..} =+ _salt+ `Prelude.hashWithSalt` versionId+ `Prelude.hashWithSalt` backupPlanId++instance Prelude.NFData GetBackupPlan where+ rnf GetBackupPlan' {..} =+ Prelude.rnf versionId+ `Prelude.seq` Prelude.rnf backupPlanId++instance Data.ToHeaders GetBackupPlan where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetBackupPlan where+ toPath GetBackupPlan' {..} =+ Prelude.mconcat+ ["/backup/plans/", Data.toBS backupPlanId, "/"]++instance Data.ToQuery GetBackupPlan where+ toQuery GetBackupPlan' {..} =+ Prelude.mconcat ["versionId" Data.=: versionId]++-- | /See:/ 'newGetBackupPlanResponse' smart constructor.+data GetBackupPlanResponse = GetBackupPlanResponse'+ { -- | Contains a list of @BackupOptions@ for each resource type. The list is+ -- populated only if the advanced option is set for the backup plan.+ advancedBackupSettings :: Prelude.Maybe [AdvancedBackupSetting],+ -- | Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+ -- or more sets of @Rules@.+ backupPlan :: Prelude.Maybe BackupPlan,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+ backupPlanArn :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Maybe Prelude.Text,+ -- | The date and time that a backup plan is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | A unique string that identifies the request and allows failed requests+ -- to be retried without the risk of running the operation twice.+ creatorRequestId :: Prelude.Maybe Prelude.Text,+ -- | The date and time that a backup plan is deleted, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @DeletionDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ deletionDate :: Prelude.Maybe Data.POSIX,+ -- | The last time a job to back up resources was run with this backup plan.+ -- A date and time, in Unix format and Coordinated Universal Time (UTC).+ -- The value of @LastExecutionDate@ is accurate to milliseconds. For+ -- example, the value 1516925490.087 represents Friday, January 26, 2018+ -- 12:11:30.087 AM.+ lastExecutionDate :: Prelude.Maybe Data.POSIX,+ -- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+ -- most 1,024 bytes long. Version IDs cannot be edited.+ versionId :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBackupPlanResponse' 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:+--+-- 'advancedBackupSettings', 'getBackupPlanResponse_advancedBackupSettings' - Contains a list of @BackupOptions@ for each resource type. The list is+-- populated only if the advanced option is set for the backup plan.+--+-- 'backupPlan', 'getBackupPlanResponse_backupPlan' - Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+-- or more sets of @Rules@.+--+-- 'backupPlanArn', 'getBackupPlanResponse_backupPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+--+-- 'backupPlanId', 'getBackupPlanResponse_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'creationDate', 'getBackupPlanResponse_creationDate' - The date and time that a backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'creatorRequestId', 'getBackupPlanResponse_creatorRequestId' - A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice.+--+-- 'deletionDate', 'getBackupPlanResponse_deletionDate' - The date and time that a backup plan is deleted, in Unix format and+-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'lastExecutionDate', 'getBackupPlanResponse_lastExecutionDate' - The last time a job to back up resources was run with this backup plan.+-- A date and time, in Unix format and Coordinated Universal Time (UTC).+-- The value of @LastExecutionDate@ is accurate to milliseconds. For+-- example, the value 1516925490.087 represents Friday, January 26, 2018+-- 12:11:30.087 AM.+--+-- 'versionId', 'getBackupPlanResponse_versionId' - Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version IDs cannot be edited.+--+-- 'httpStatus', 'getBackupPlanResponse_httpStatus' - The response's http status code.+newGetBackupPlanResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetBackupPlanResponse+newGetBackupPlanResponse pHttpStatus_ =+ GetBackupPlanResponse'+ { advancedBackupSettings =+ Prelude.Nothing,+ backupPlan = Prelude.Nothing,+ backupPlanArn = Prelude.Nothing,+ backupPlanId = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ creatorRequestId = Prelude.Nothing,+ deletionDate = Prelude.Nothing,+ lastExecutionDate = Prelude.Nothing,+ versionId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Contains a list of @BackupOptions@ for each resource type. The list is+-- populated only if the advanced option is set for the backup plan.+getBackupPlanResponse_advancedBackupSettings :: Lens.Lens' GetBackupPlanResponse (Prelude.Maybe [AdvancedBackupSetting])+getBackupPlanResponse_advancedBackupSettings = Lens.lens (\GetBackupPlanResponse' {advancedBackupSettings} -> advancedBackupSettings) (\s@GetBackupPlanResponse' {} a -> s {advancedBackupSettings = a} :: GetBackupPlanResponse) Prelude.. Lens.mapping Lens.coerced++-- | Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+-- or more sets of @Rules@.+getBackupPlanResponse_backupPlan :: Lens.Lens' GetBackupPlanResponse (Prelude.Maybe BackupPlan)+getBackupPlanResponse_backupPlan = Lens.lens (\GetBackupPlanResponse' {backupPlan} -> backupPlan) (\s@GetBackupPlanResponse' {} a -> s {backupPlan = a} :: GetBackupPlanResponse)++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+getBackupPlanResponse_backupPlanArn :: Lens.Lens' GetBackupPlanResponse (Prelude.Maybe Prelude.Text)+getBackupPlanResponse_backupPlanArn = Lens.lens (\GetBackupPlanResponse' {backupPlanArn} -> backupPlanArn) (\s@GetBackupPlanResponse' {} a -> s {backupPlanArn = a} :: GetBackupPlanResponse)++-- | Uniquely identifies a backup plan.+getBackupPlanResponse_backupPlanId :: Lens.Lens' GetBackupPlanResponse (Prelude.Maybe Prelude.Text)+getBackupPlanResponse_backupPlanId = Lens.lens (\GetBackupPlanResponse' {backupPlanId} -> backupPlanId) (\s@GetBackupPlanResponse' {} a -> s {backupPlanId = a} :: GetBackupPlanResponse)++-- | The date and time that a backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+getBackupPlanResponse_creationDate :: Lens.Lens' GetBackupPlanResponse (Prelude.Maybe Prelude.UTCTime)+getBackupPlanResponse_creationDate = Lens.lens (\GetBackupPlanResponse' {creationDate} -> creationDate) (\s@GetBackupPlanResponse' {} a -> s {creationDate = a} :: GetBackupPlanResponse) Prelude.. Lens.mapping Data._Time++-- | A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice.+getBackupPlanResponse_creatorRequestId :: Lens.Lens' GetBackupPlanResponse (Prelude.Maybe Prelude.Text)+getBackupPlanResponse_creatorRequestId = Lens.lens (\GetBackupPlanResponse' {creatorRequestId} -> creatorRequestId) (\s@GetBackupPlanResponse' {} a -> s {creatorRequestId = a} :: GetBackupPlanResponse)++-- | The date and time that a backup plan is deleted, in Unix format and+-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+getBackupPlanResponse_deletionDate :: Lens.Lens' GetBackupPlanResponse (Prelude.Maybe Prelude.UTCTime)+getBackupPlanResponse_deletionDate = Lens.lens (\GetBackupPlanResponse' {deletionDate} -> deletionDate) (\s@GetBackupPlanResponse' {} a -> s {deletionDate = a} :: GetBackupPlanResponse) Prelude.. Lens.mapping Data._Time++-- | The last time a job to back up resources was run with this backup plan.+-- A date and time, in Unix format and Coordinated Universal Time (UTC).+-- The value of @LastExecutionDate@ is accurate to milliseconds. For+-- example, the value 1516925490.087 represents Friday, January 26, 2018+-- 12:11:30.087 AM.+getBackupPlanResponse_lastExecutionDate :: Lens.Lens' GetBackupPlanResponse (Prelude.Maybe Prelude.UTCTime)+getBackupPlanResponse_lastExecutionDate = Lens.lens (\GetBackupPlanResponse' {lastExecutionDate} -> lastExecutionDate) (\s@GetBackupPlanResponse' {} a -> s {lastExecutionDate = a} :: GetBackupPlanResponse) Prelude.. Lens.mapping Data._Time++-- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version IDs cannot be edited.+getBackupPlanResponse_versionId :: Lens.Lens' GetBackupPlanResponse (Prelude.Maybe Prelude.Text)+getBackupPlanResponse_versionId = Lens.lens (\GetBackupPlanResponse' {versionId} -> versionId) (\s@GetBackupPlanResponse' {} a -> s {versionId = a} :: GetBackupPlanResponse)++-- | The response's http status code.+getBackupPlanResponse_httpStatus :: Lens.Lens' GetBackupPlanResponse Prelude.Int+getBackupPlanResponse_httpStatus = Lens.lens (\GetBackupPlanResponse' {httpStatus} -> httpStatus) (\s@GetBackupPlanResponse' {} a -> s {httpStatus = a} :: GetBackupPlanResponse)++instance Prelude.NFData GetBackupPlanResponse where+ rnf GetBackupPlanResponse' {..} =+ Prelude.rnf advancedBackupSettings+ `Prelude.seq` Prelude.rnf backupPlan+ `Prelude.seq` Prelude.rnf backupPlanArn+ `Prelude.seq` Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf creatorRequestId+ `Prelude.seq` Prelude.rnf deletionDate+ `Prelude.seq` Prelude.rnf lastExecutionDate+ `Prelude.seq` Prelude.rnf versionId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/GetBackupPlanFromJSON.hs view
@@ -0,0 +1,175 @@+{-# 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.Backup.GetBackupPlanFromJSON+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a valid JSON document specifying a backup plan or an error.+module Amazonka.Backup.GetBackupPlanFromJSON+ ( -- * Creating a Request+ GetBackupPlanFromJSON (..),+ newGetBackupPlanFromJSON,++ -- * Request Lenses+ getBackupPlanFromJSON_backupPlanTemplateJson,++ -- * Destructuring the Response+ GetBackupPlanFromJSONResponse (..),+ newGetBackupPlanFromJSONResponse,++ -- * Response Lenses+ getBackupPlanFromJSONResponse_backupPlan,+ getBackupPlanFromJSONResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newGetBackupPlanFromJSON' smart constructor.+data GetBackupPlanFromJSON = GetBackupPlanFromJSON'+ { -- | A customer-supplied backup plan document in JSON format.+ backupPlanTemplateJson :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBackupPlanFromJSON' 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:+--+-- 'backupPlanTemplateJson', 'getBackupPlanFromJSON_backupPlanTemplateJson' - A customer-supplied backup plan document in JSON format.+newGetBackupPlanFromJSON ::+ -- | 'backupPlanTemplateJson'+ Prelude.Text ->+ GetBackupPlanFromJSON+newGetBackupPlanFromJSON pBackupPlanTemplateJson_ =+ GetBackupPlanFromJSON'+ { backupPlanTemplateJson =+ pBackupPlanTemplateJson_+ }++-- | A customer-supplied backup plan document in JSON format.+getBackupPlanFromJSON_backupPlanTemplateJson :: Lens.Lens' GetBackupPlanFromJSON Prelude.Text+getBackupPlanFromJSON_backupPlanTemplateJson = Lens.lens (\GetBackupPlanFromJSON' {backupPlanTemplateJson} -> backupPlanTemplateJson) (\s@GetBackupPlanFromJSON' {} a -> s {backupPlanTemplateJson = a} :: GetBackupPlanFromJSON)++instance Core.AWSRequest GetBackupPlanFromJSON where+ type+ AWSResponse GetBackupPlanFromJSON =+ GetBackupPlanFromJSONResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetBackupPlanFromJSONResponse'+ Prelude.<$> (x Data..?> "BackupPlan")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetBackupPlanFromJSON where+ hashWithSalt _salt GetBackupPlanFromJSON' {..} =+ _salt `Prelude.hashWithSalt` backupPlanTemplateJson++instance Prelude.NFData GetBackupPlanFromJSON where+ rnf GetBackupPlanFromJSON' {..} =+ Prelude.rnf backupPlanTemplateJson++instance Data.ToHeaders GetBackupPlanFromJSON where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetBackupPlanFromJSON where+ toJSON GetBackupPlanFromJSON' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "BackupPlanTemplateJson"+ Data..= backupPlanTemplateJson+ )+ ]+ )++instance Data.ToPath GetBackupPlanFromJSON where+ toPath = Prelude.const "/backup/template/json/toPlan"++instance Data.ToQuery GetBackupPlanFromJSON where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetBackupPlanFromJSONResponse' smart constructor.+data GetBackupPlanFromJSONResponse = GetBackupPlanFromJSONResponse'+ { -- | Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+ -- or more sets of @Rules@.+ backupPlan :: Prelude.Maybe BackupPlan,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBackupPlanFromJSONResponse' 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:+--+-- 'backupPlan', 'getBackupPlanFromJSONResponse_backupPlan' - Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+-- or more sets of @Rules@.+--+-- 'httpStatus', 'getBackupPlanFromJSONResponse_httpStatus' - The response's http status code.+newGetBackupPlanFromJSONResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetBackupPlanFromJSONResponse+newGetBackupPlanFromJSONResponse pHttpStatus_ =+ GetBackupPlanFromJSONResponse'+ { backupPlan =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+-- or more sets of @Rules@.+getBackupPlanFromJSONResponse_backupPlan :: Lens.Lens' GetBackupPlanFromJSONResponse (Prelude.Maybe BackupPlan)+getBackupPlanFromJSONResponse_backupPlan = Lens.lens (\GetBackupPlanFromJSONResponse' {backupPlan} -> backupPlan) (\s@GetBackupPlanFromJSONResponse' {} a -> s {backupPlan = a} :: GetBackupPlanFromJSONResponse)++-- | The response's http status code.+getBackupPlanFromJSONResponse_httpStatus :: Lens.Lens' GetBackupPlanFromJSONResponse Prelude.Int+getBackupPlanFromJSONResponse_httpStatus = Lens.lens (\GetBackupPlanFromJSONResponse' {httpStatus} -> httpStatus) (\s@GetBackupPlanFromJSONResponse' {} a -> s {httpStatus = a} :: GetBackupPlanFromJSONResponse)++instance Prelude.NFData GetBackupPlanFromJSONResponse where+ rnf GetBackupPlanFromJSONResponse' {..} =+ Prelude.rnf backupPlan+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/GetBackupPlanFromTemplate.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.Backup.GetBackupPlanFromTemplate+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the template specified by its @templateId@ as a backup plan.+module Amazonka.Backup.GetBackupPlanFromTemplate+ ( -- * Creating a Request+ GetBackupPlanFromTemplate (..),+ newGetBackupPlanFromTemplate,++ -- * Request Lenses+ getBackupPlanFromTemplate_backupPlanTemplateId,++ -- * Destructuring the Response+ GetBackupPlanFromTemplateResponse (..),+ newGetBackupPlanFromTemplateResponse,++ -- * Response Lenses+ getBackupPlanFromTemplateResponse_backupPlanDocument,+ getBackupPlanFromTemplateResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newGetBackupPlanFromTemplate' smart constructor.+data GetBackupPlanFromTemplate = GetBackupPlanFromTemplate'+ { -- | Uniquely identifies a stored backup plan template.+ backupPlanTemplateId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBackupPlanFromTemplate' 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:+--+-- 'backupPlanTemplateId', 'getBackupPlanFromTemplate_backupPlanTemplateId' - Uniquely identifies a stored backup plan template.+newGetBackupPlanFromTemplate ::+ -- | 'backupPlanTemplateId'+ Prelude.Text ->+ GetBackupPlanFromTemplate+newGetBackupPlanFromTemplate pBackupPlanTemplateId_ =+ GetBackupPlanFromTemplate'+ { backupPlanTemplateId =+ pBackupPlanTemplateId_+ }++-- | Uniquely identifies a stored backup plan template.+getBackupPlanFromTemplate_backupPlanTemplateId :: Lens.Lens' GetBackupPlanFromTemplate Prelude.Text+getBackupPlanFromTemplate_backupPlanTemplateId = Lens.lens (\GetBackupPlanFromTemplate' {backupPlanTemplateId} -> backupPlanTemplateId) (\s@GetBackupPlanFromTemplate' {} a -> s {backupPlanTemplateId = a} :: GetBackupPlanFromTemplate)++instance Core.AWSRequest GetBackupPlanFromTemplate where+ type+ AWSResponse GetBackupPlanFromTemplate =+ GetBackupPlanFromTemplateResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetBackupPlanFromTemplateResponse'+ Prelude.<$> (x Data..?> "BackupPlanDocument")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetBackupPlanFromTemplate where+ hashWithSalt _salt GetBackupPlanFromTemplate' {..} =+ _salt `Prelude.hashWithSalt` backupPlanTemplateId++instance Prelude.NFData GetBackupPlanFromTemplate where+ rnf GetBackupPlanFromTemplate' {..} =+ Prelude.rnf backupPlanTemplateId++instance Data.ToHeaders GetBackupPlanFromTemplate where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetBackupPlanFromTemplate where+ toPath GetBackupPlanFromTemplate' {..} =+ Prelude.mconcat+ [ "/backup/template/plans/",+ Data.toBS backupPlanTemplateId,+ "/toPlan"+ ]++instance Data.ToQuery GetBackupPlanFromTemplate where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetBackupPlanFromTemplateResponse' smart constructor.+data GetBackupPlanFromTemplateResponse = GetBackupPlanFromTemplateResponse'+ { -- | Returns the body of a backup plan based on the target template,+ -- including the name, rules, and backup vault of the plan.+ backupPlanDocument :: Prelude.Maybe BackupPlan,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBackupPlanFromTemplateResponse' 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:+--+-- 'backupPlanDocument', 'getBackupPlanFromTemplateResponse_backupPlanDocument' - Returns the body of a backup plan based on the target template,+-- including the name, rules, and backup vault of the plan.+--+-- 'httpStatus', 'getBackupPlanFromTemplateResponse_httpStatus' - The response's http status code.+newGetBackupPlanFromTemplateResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetBackupPlanFromTemplateResponse+newGetBackupPlanFromTemplateResponse pHttpStatus_ =+ GetBackupPlanFromTemplateResponse'+ { backupPlanDocument =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Returns the body of a backup plan based on the target template,+-- including the name, rules, and backup vault of the plan.+getBackupPlanFromTemplateResponse_backupPlanDocument :: Lens.Lens' GetBackupPlanFromTemplateResponse (Prelude.Maybe BackupPlan)+getBackupPlanFromTemplateResponse_backupPlanDocument = Lens.lens (\GetBackupPlanFromTemplateResponse' {backupPlanDocument} -> backupPlanDocument) (\s@GetBackupPlanFromTemplateResponse' {} a -> s {backupPlanDocument = a} :: GetBackupPlanFromTemplateResponse)++-- | The response's http status code.+getBackupPlanFromTemplateResponse_httpStatus :: Lens.Lens' GetBackupPlanFromTemplateResponse Prelude.Int+getBackupPlanFromTemplateResponse_httpStatus = Lens.lens (\GetBackupPlanFromTemplateResponse' {httpStatus} -> httpStatus) (\s@GetBackupPlanFromTemplateResponse' {} a -> s {httpStatus = a} :: GetBackupPlanFromTemplateResponse)++instance+ Prelude.NFData+ GetBackupPlanFromTemplateResponse+ where+ rnf GetBackupPlanFromTemplateResponse' {..} =+ Prelude.rnf backupPlanDocument+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/GetBackupSelection.hs view
@@ -0,0 +1,251 @@+{-# 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.Backup.GetBackupSelection+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns selection metadata and a document in JSON format that specifies+-- a list of resources that are associated with a backup plan.+module Amazonka.Backup.GetBackupSelection+ ( -- * Creating a Request+ GetBackupSelection (..),+ newGetBackupSelection,++ -- * Request Lenses+ getBackupSelection_backupPlanId,+ getBackupSelection_selectionId,++ -- * Destructuring the Response+ GetBackupSelectionResponse (..),+ newGetBackupSelectionResponse,++ -- * Response Lenses+ getBackupSelectionResponse_backupPlanId,+ getBackupSelectionResponse_backupSelection,+ getBackupSelectionResponse_creationDate,+ getBackupSelectionResponse_creatorRequestId,+ getBackupSelectionResponse_selectionId,+ getBackupSelectionResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newGetBackupSelection' smart constructor.+data GetBackupSelection = GetBackupSelection'+ { -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Text,+ -- | Uniquely identifies the body of a request to assign a set of resources+ -- to a backup plan.+ selectionId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBackupSelection' 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:+--+-- 'backupPlanId', 'getBackupSelection_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'selectionId', 'getBackupSelection_selectionId' - Uniquely identifies the body of a request to assign a set of resources+-- to a backup plan.+newGetBackupSelection ::+ -- | 'backupPlanId'+ Prelude.Text ->+ -- | 'selectionId'+ Prelude.Text ->+ GetBackupSelection+newGetBackupSelection pBackupPlanId_ pSelectionId_ =+ GetBackupSelection'+ { backupPlanId = pBackupPlanId_,+ selectionId = pSelectionId_+ }++-- | Uniquely identifies a backup plan.+getBackupSelection_backupPlanId :: Lens.Lens' GetBackupSelection Prelude.Text+getBackupSelection_backupPlanId = Lens.lens (\GetBackupSelection' {backupPlanId} -> backupPlanId) (\s@GetBackupSelection' {} a -> s {backupPlanId = a} :: GetBackupSelection)++-- | Uniquely identifies the body of a request to assign a set of resources+-- to a backup plan.+getBackupSelection_selectionId :: Lens.Lens' GetBackupSelection Prelude.Text+getBackupSelection_selectionId = Lens.lens (\GetBackupSelection' {selectionId} -> selectionId) (\s@GetBackupSelection' {} a -> s {selectionId = a} :: GetBackupSelection)++instance Core.AWSRequest GetBackupSelection where+ type+ AWSResponse GetBackupSelection =+ GetBackupSelectionResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetBackupSelectionResponse'+ Prelude.<$> (x Data..?> "BackupPlanId")+ Prelude.<*> (x Data..?> "BackupSelection")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "CreatorRequestId")+ Prelude.<*> (x Data..?> "SelectionId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetBackupSelection where+ hashWithSalt _salt GetBackupSelection' {..} =+ _salt+ `Prelude.hashWithSalt` backupPlanId+ `Prelude.hashWithSalt` selectionId++instance Prelude.NFData GetBackupSelection where+ rnf GetBackupSelection' {..} =+ Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf selectionId++instance Data.ToHeaders GetBackupSelection where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetBackupSelection where+ toPath GetBackupSelection' {..} =+ Prelude.mconcat+ [ "/backup/plans/",+ Data.toBS backupPlanId,+ "/selections/",+ Data.toBS selectionId+ ]++instance Data.ToQuery GetBackupSelection where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetBackupSelectionResponse' smart constructor.+data GetBackupSelectionResponse = GetBackupSelectionResponse'+ { -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Maybe Prelude.Text,+ -- | Specifies the body of a request to assign a set of resources to a backup+ -- plan.+ backupSelection :: Prelude.Maybe BackupSelection,+ -- | The date and time a backup selection is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | A unique string that identifies the request and allows failed requests+ -- to be retried without the risk of running the operation twice.+ creatorRequestId :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies the body of a request to assign a set of resources+ -- to a backup plan.+ selectionId :: 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 'GetBackupSelectionResponse' 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:+--+-- 'backupPlanId', 'getBackupSelectionResponse_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'backupSelection', 'getBackupSelectionResponse_backupSelection' - Specifies the body of a request to assign a set of resources to a backup+-- plan.+--+-- 'creationDate', 'getBackupSelectionResponse_creationDate' - The date and time a backup selection is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'creatorRequestId', 'getBackupSelectionResponse_creatorRequestId' - A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice.+--+-- 'selectionId', 'getBackupSelectionResponse_selectionId' - Uniquely identifies the body of a request to assign a set of resources+-- to a backup plan.+--+-- 'httpStatus', 'getBackupSelectionResponse_httpStatus' - The response's http status code.+newGetBackupSelectionResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetBackupSelectionResponse+newGetBackupSelectionResponse pHttpStatus_ =+ GetBackupSelectionResponse'+ { backupPlanId =+ Prelude.Nothing,+ backupSelection = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ creatorRequestId = Prelude.Nothing,+ selectionId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Uniquely identifies a backup plan.+getBackupSelectionResponse_backupPlanId :: Lens.Lens' GetBackupSelectionResponse (Prelude.Maybe Prelude.Text)+getBackupSelectionResponse_backupPlanId = Lens.lens (\GetBackupSelectionResponse' {backupPlanId} -> backupPlanId) (\s@GetBackupSelectionResponse' {} a -> s {backupPlanId = a} :: GetBackupSelectionResponse)++-- | Specifies the body of a request to assign a set of resources to a backup+-- plan.+getBackupSelectionResponse_backupSelection :: Lens.Lens' GetBackupSelectionResponse (Prelude.Maybe BackupSelection)+getBackupSelectionResponse_backupSelection = Lens.lens (\GetBackupSelectionResponse' {backupSelection} -> backupSelection) (\s@GetBackupSelectionResponse' {} a -> s {backupSelection = a} :: GetBackupSelectionResponse)++-- | The date and time a backup selection is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+getBackupSelectionResponse_creationDate :: Lens.Lens' GetBackupSelectionResponse (Prelude.Maybe Prelude.UTCTime)+getBackupSelectionResponse_creationDate = Lens.lens (\GetBackupSelectionResponse' {creationDate} -> creationDate) (\s@GetBackupSelectionResponse' {} a -> s {creationDate = a} :: GetBackupSelectionResponse) Prelude.. Lens.mapping Data._Time++-- | A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice.+getBackupSelectionResponse_creatorRequestId :: Lens.Lens' GetBackupSelectionResponse (Prelude.Maybe Prelude.Text)+getBackupSelectionResponse_creatorRequestId = Lens.lens (\GetBackupSelectionResponse' {creatorRequestId} -> creatorRequestId) (\s@GetBackupSelectionResponse' {} a -> s {creatorRequestId = a} :: GetBackupSelectionResponse)++-- | Uniquely identifies the body of a request to assign a set of resources+-- to a backup plan.+getBackupSelectionResponse_selectionId :: Lens.Lens' GetBackupSelectionResponse (Prelude.Maybe Prelude.Text)+getBackupSelectionResponse_selectionId = Lens.lens (\GetBackupSelectionResponse' {selectionId} -> selectionId) (\s@GetBackupSelectionResponse' {} a -> s {selectionId = a} :: GetBackupSelectionResponse)++-- | The response's http status code.+getBackupSelectionResponse_httpStatus :: Lens.Lens' GetBackupSelectionResponse Prelude.Int+getBackupSelectionResponse_httpStatus = Lens.lens (\GetBackupSelectionResponse' {httpStatus} -> httpStatus) (\s@GetBackupSelectionResponse' {} a -> s {httpStatus = a} :: GetBackupSelectionResponse)++instance Prelude.NFData GetBackupSelectionResponse where+ rnf GetBackupSelectionResponse' {..} =+ Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf backupSelection+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf creatorRequestId+ `Prelude.seq` Prelude.rnf selectionId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/GetBackupVaultAccessPolicy.hs view
@@ -0,0 +1,215 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.GetBackupVaultAccessPolicy+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the access policy document that is associated with the named+-- backup vault.+module Amazonka.Backup.GetBackupVaultAccessPolicy+ ( -- * Creating a Request+ GetBackupVaultAccessPolicy (..),+ newGetBackupVaultAccessPolicy,++ -- * Request Lenses+ getBackupVaultAccessPolicy_backupVaultName,++ -- * Destructuring the Response+ GetBackupVaultAccessPolicyResponse (..),+ newGetBackupVaultAccessPolicyResponse,++ -- * Response Lenses+ getBackupVaultAccessPolicyResponse_backupVaultArn,+ getBackupVaultAccessPolicyResponse_backupVaultName,+ getBackupVaultAccessPolicyResponse_policy,+ getBackupVaultAccessPolicyResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newGetBackupVaultAccessPolicy' smart constructor.+data GetBackupVaultAccessPolicy = GetBackupVaultAccessPolicy'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBackupVaultAccessPolicy' 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:+--+-- 'backupVaultName', 'getBackupVaultAccessPolicy_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+newGetBackupVaultAccessPolicy ::+ -- | 'backupVaultName'+ Prelude.Text ->+ GetBackupVaultAccessPolicy+newGetBackupVaultAccessPolicy pBackupVaultName_ =+ GetBackupVaultAccessPolicy'+ { backupVaultName =+ pBackupVaultName_+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+getBackupVaultAccessPolicy_backupVaultName :: Lens.Lens' GetBackupVaultAccessPolicy Prelude.Text+getBackupVaultAccessPolicy_backupVaultName = Lens.lens (\GetBackupVaultAccessPolicy' {backupVaultName} -> backupVaultName) (\s@GetBackupVaultAccessPolicy' {} a -> s {backupVaultName = a} :: GetBackupVaultAccessPolicy)++instance Core.AWSRequest GetBackupVaultAccessPolicy where+ type+ AWSResponse GetBackupVaultAccessPolicy =+ GetBackupVaultAccessPolicyResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetBackupVaultAccessPolicyResponse'+ Prelude.<$> (x Data..?> "BackupVaultArn")+ Prelude.<*> (x Data..?> "BackupVaultName")+ Prelude.<*> (x Data..?> "Policy")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetBackupVaultAccessPolicy where+ hashWithSalt _salt GetBackupVaultAccessPolicy' {..} =+ _salt `Prelude.hashWithSalt` backupVaultName++instance Prelude.NFData GetBackupVaultAccessPolicy where+ rnf GetBackupVaultAccessPolicy' {..} =+ Prelude.rnf backupVaultName++instance Data.ToHeaders GetBackupVaultAccessPolicy where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetBackupVaultAccessPolicy where+ toPath GetBackupVaultAccessPolicy' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/access-policy"+ ]++instance Data.ToQuery GetBackupVaultAccessPolicy where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetBackupVaultAccessPolicyResponse' smart constructor.+data GetBackupVaultAccessPolicyResponse = GetBackupVaultAccessPolicyResponse'+ { -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+ -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Region where they are created. They consist of lowercase+ -- letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | The backup vault access policy document in JSON format.+ policy :: 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 'GetBackupVaultAccessPolicyResponse' 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:+--+-- 'backupVaultArn', 'getBackupVaultAccessPolicyResponse_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'backupVaultName', 'getBackupVaultAccessPolicyResponse_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+--+-- 'policy', 'getBackupVaultAccessPolicyResponse_policy' - The backup vault access policy document in JSON format.+--+-- 'httpStatus', 'getBackupVaultAccessPolicyResponse_httpStatus' - The response's http status code.+newGetBackupVaultAccessPolicyResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetBackupVaultAccessPolicyResponse+newGetBackupVaultAccessPolicyResponse pHttpStatus_ =+ GetBackupVaultAccessPolicyResponse'+ { backupVaultArn =+ Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ policy = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+getBackupVaultAccessPolicyResponse_backupVaultArn :: Lens.Lens' GetBackupVaultAccessPolicyResponse (Prelude.Maybe Prelude.Text)+getBackupVaultAccessPolicyResponse_backupVaultArn = Lens.lens (\GetBackupVaultAccessPolicyResponse' {backupVaultArn} -> backupVaultArn) (\s@GetBackupVaultAccessPolicyResponse' {} a -> s {backupVaultArn = a} :: GetBackupVaultAccessPolicyResponse)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+getBackupVaultAccessPolicyResponse_backupVaultName :: Lens.Lens' GetBackupVaultAccessPolicyResponse (Prelude.Maybe Prelude.Text)+getBackupVaultAccessPolicyResponse_backupVaultName = Lens.lens (\GetBackupVaultAccessPolicyResponse' {backupVaultName} -> backupVaultName) (\s@GetBackupVaultAccessPolicyResponse' {} a -> s {backupVaultName = a} :: GetBackupVaultAccessPolicyResponse)++-- | The backup vault access policy document in JSON format.+getBackupVaultAccessPolicyResponse_policy :: Lens.Lens' GetBackupVaultAccessPolicyResponse (Prelude.Maybe Prelude.Text)+getBackupVaultAccessPolicyResponse_policy = Lens.lens (\GetBackupVaultAccessPolicyResponse' {policy} -> policy) (\s@GetBackupVaultAccessPolicyResponse' {} a -> s {policy = a} :: GetBackupVaultAccessPolicyResponse)++-- | The response's http status code.+getBackupVaultAccessPolicyResponse_httpStatus :: Lens.Lens' GetBackupVaultAccessPolicyResponse Prelude.Int+getBackupVaultAccessPolicyResponse_httpStatus = Lens.lens (\GetBackupVaultAccessPolicyResponse' {httpStatus} -> httpStatus) (\s@GetBackupVaultAccessPolicyResponse' {} a -> s {httpStatus = a} :: GetBackupVaultAccessPolicyResponse)++instance+ Prelude.NFData+ GetBackupVaultAccessPolicyResponse+ where+ rnf GetBackupVaultAccessPolicyResponse' {..} =+ Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf policy+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/GetBackupVaultNotifications.hs view
@@ -0,0 +1,238 @@+{-# 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.Backup.GetBackupVaultNotifications+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns event notifications for the specified backup vault.+module Amazonka.Backup.GetBackupVaultNotifications+ ( -- * Creating a Request+ GetBackupVaultNotifications (..),+ newGetBackupVaultNotifications,++ -- * Request Lenses+ getBackupVaultNotifications_backupVaultName,++ -- * Destructuring the Response+ GetBackupVaultNotificationsResponse (..),+ newGetBackupVaultNotificationsResponse,++ -- * Response Lenses+ getBackupVaultNotificationsResponse_backupVaultArn,+ getBackupVaultNotificationsResponse_backupVaultEvents,+ getBackupVaultNotificationsResponse_backupVaultName,+ getBackupVaultNotificationsResponse_sNSTopicArn,+ getBackupVaultNotificationsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newGetBackupVaultNotifications' smart constructor.+data GetBackupVaultNotifications = GetBackupVaultNotifications'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetBackupVaultNotifications' 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:+--+-- 'backupVaultName', 'getBackupVaultNotifications_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+newGetBackupVaultNotifications ::+ -- | 'backupVaultName'+ Prelude.Text ->+ GetBackupVaultNotifications+newGetBackupVaultNotifications pBackupVaultName_ =+ GetBackupVaultNotifications'+ { backupVaultName =+ pBackupVaultName_+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+getBackupVaultNotifications_backupVaultName :: Lens.Lens' GetBackupVaultNotifications Prelude.Text+getBackupVaultNotifications_backupVaultName = Lens.lens (\GetBackupVaultNotifications' {backupVaultName} -> backupVaultName) (\s@GetBackupVaultNotifications' {} a -> s {backupVaultName = a} :: GetBackupVaultNotifications)++instance Core.AWSRequest GetBackupVaultNotifications where+ type+ AWSResponse GetBackupVaultNotifications =+ GetBackupVaultNotificationsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetBackupVaultNotificationsResponse'+ Prelude.<$> (x Data..?> "BackupVaultArn")+ Prelude.<*> ( x+ Data..?> "BackupVaultEvents"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "BackupVaultName")+ Prelude.<*> (x Data..?> "SNSTopicArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetBackupVaultNotifications where+ hashWithSalt _salt GetBackupVaultNotifications' {..} =+ _salt `Prelude.hashWithSalt` backupVaultName++instance Prelude.NFData GetBackupVaultNotifications where+ rnf GetBackupVaultNotifications' {..} =+ Prelude.rnf backupVaultName++instance Data.ToHeaders GetBackupVaultNotifications where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetBackupVaultNotifications where+ toPath GetBackupVaultNotifications' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/notification-configuration"+ ]++instance Data.ToQuery GetBackupVaultNotifications where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetBackupVaultNotificationsResponse' smart constructor.+data GetBackupVaultNotificationsResponse = GetBackupVaultNotificationsResponse'+ { -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+ -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | An array of events that indicate the status of jobs to back up resources+ -- to the backup vault.+ backupVaultEvents :: Prelude.Maybe [BackupVaultEvent],+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Region where they are created. They consist of lowercase+ -- letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies an Amazon Simple Notification Service+ -- (Amazon SNS) topic; for example,+ -- @arn:aws:sns:us-west-2:111122223333:MyTopic@.+ sNSTopicArn :: 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 'GetBackupVaultNotificationsResponse' 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:+--+-- 'backupVaultArn', 'getBackupVaultNotificationsResponse_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'backupVaultEvents', 'getBackupVaultNotificationsResponse_backupVaultEvents' - An array of events that indicate the status of jobs to back up resources+-- to the backup vault.+--+-- 'backupVaultName', 'getBackupVaultNotificationsResponse_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+--+-- 'sNSTopicArn', 'getBackupVaultNotificationsResponse_sNSTopicArn' - An ARN that uniquely identifies an Amazon Simple Notification Service+-- (Amazon SNS) topic; for example,+-- @arn:aws:sns:us-west-2:111122223333:MyTopic@.+--+-- 'httpStatus', 'getBackupVaultNotificationsResponse_httpStatus' - The response's http status code.+newGetBackupVaultNotificationsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetBackupVaultNotificationsResponse+newGetBackupVaultNotificationsResponse pHttpStatus_ =+ GetBackupVaultNotificationsResponse'+ { backupVaultArn =+ Prelude.Nothing,+ backupVaultEvents = Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ sNSTopicArn = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+getBackupVaultNotificationsResponse_backupVaultArn :: Lens.Lens' GetBackupVaultNotificationsResponse (Prelude.Maybe Prelude.Text)+getBackupVaultNotificationsResponse_backupVaultArn = Lens.lens (\GetBackupVaultNotificationsResponse' {backupVaultArn} -> backupVaultArn) (\s@GetBackupVaultNotificationsResponse' {} a -> s {backupVaultArn = a} :: GetBackupVaultNotificationsResponse)++-- | An array of events that indicate the status of jobs to back up resources+-- to the backup vault.+getBackupVaultNotificationsResponse_backupVaultEvents :: Lens.Lens' GetBackupVaultNotificationsResponse (Prelude.Maybe [BackupVaultEvent])+getBackupVaultNotificationsResponse_backupVaultEvents = Lens.lens (\GetBackupVaultNotificationsResponse' {backupVaultEvents} -> backupVaultEvents) (\s@GetBackupVaultNotificationsResponse' {} a -> s {backupVaultEvents = a} :: GetBackupVaultNotificationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Region where they are created. They consist of lowercase+-- letters, numbers, and hyphens.+getBackupVaultNotificationsResponse_backupVaultName :: Lens.Lens' GetBackupVaultNotificationsResponse (Prelude.Maybe Prelude.Text)+getBackupVaultNotificationsResponse_backupVaultName = Lens.lens (\GetBackupVaultNotificationsResponse' {backupVaultName} -> backupVaultName) (\s@GetBackupVaultNotificationsResponse' {} a -> s {backupVaultName = a} :: GetBackupVaultNotificationsResponse)++-- | An ARN that uniquely identifies an Amazon Simple Notification Service+-- (Amazon SNS) topic; for example,+-- @arn:aws:sns:us-west-2:111122223333:MyTopic@.+getBackupVaultNotificationsResponse_sNSTopicArn :: Lens.Lens' GetBackupVaultNotificationsResponse (Prelude.Maybe Prelude.Text)+getBackupVaultNotificationsResponse_sNSTopicArn = Lens.lens (\GetBackupVaultNotificationsResponse' {sNSTopicArn} -> sNSTopicArn) (\s@GetBackupVaultNotificationsResponse' {} a -> s {sNSTopicArn = a} :: GetBackupVaultNotificationsResponse)++-- | The response's http status code.+getBackupVaultNotificationsResponse_httpStatus :: Lens.Lens' GetBackupVaultNotificationsResponse Prelude.Int+getBackupVaultNotificationsResponse_httpStatus = Lens.lens (\GetBackupVaultNotificationsResponse' {httpStatus} -> httpStatus) (\s@GetBackupVaultNotificationsResponse' {} a -> s {httpStatus = a} :: GetBackupVaultNotificationsResponse)++instance+ Prelude.NFData+ GetBackupVaultNotificationsResponse+ where+ rnf GetBackupVaultNotificationsResponse' {..} =+ Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf backupVaultEvents+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf sNSTopicArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/GetLegalHold.hs view
@@ -0,0 +1,284 @@+{-# 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.Backup.GetLegalHold+-- 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 returns details for a specified legal hold. The details are+-- the body of a legal hold in JSON format, in addition to metadata.+module Amazonka.Backup.GetLegalHold+ ( -- * Creating a Request+ GetLegalHold (..),+ newGetLegalHold,++ -- * Request Lenses+ getLegalHold_legalHoldId,++ -- * Destructuring the Response+ GetLegalHoldResponse (..),+ newGetLegalHoldResponse,++ -- * Response Lenses+ getLegalHoldResponse_cancelDescription,+ getLegalHoldResponse_cancellationDate,+ getLegalHoldResponse_creationDate,+ getLegalHoldResponse_description,+ getLegalHoldResponse_legalHoldArn,+ getLegalHoldResponse_legalHoldId,+ getLegalHoldResponse_recoveryPointSelection,+ getLegalHoldResponse_retainRecordUntil,+ getLegalHoldResponse_status,+ getLegalHoldResponse_title,+ getLegalHoldResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newGetLegalHold' smart constructor.+data GetLegalHold = GetLegalHold'+ { -- | This is the ID required to use @GetLegalHold@. This unique ID is+ -- associated with a specific legal hold.+ legalHoldId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetLegalHold' 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:+--+-- 'legalHoldId', 'getLegalHold_legalHoldId' - This is the ID required to use @GetLegalHold@. This unique ID is+-- associated with a specific legal hold.+newGetLegalHold ::+ -- | 'legalHoldId'+ Prelude.Text ->+ GetLegalHold+newGetLegalHold pLegalHoldId_ =+ GetLegalHold' {legalHoldId = pLegalHoldId_}++-- | This is the ID required to use @GetLegalHold@. This unique ID is+-- associated with a specific legal hold.+getLegalHold_legalHoldId :: Lens.Lens' GetLegalHold Prelude.Text+getLegalHold_legalHoldId = Lens.lens (\GetLegalHold' {legalHoldId} -> legalHoldId) (\s@GetLegalHold' {} a -> s {legalHoldId = a} :: GetLegalHold)++instance Core.AWSRequest GetLegalHold where+ type AWSResponse GetLegalHold = GetLegalHoldResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetLegalHoldResponse'+ Prelude.<$> (x Data..?> "CancelDescription")+ Prelude.<*> (x Data..?> "CancellationDate")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "Description")+ Prelude.<*> (x Data..?> "LegalHoldArn")+ Prelude.<*> (x Data..?> "LegalHoldId")+ Prelude.<*> (x Data..?> "RecoveryPointSelection")+ Prelude.<*> (x Data..?> "RetainRecordUntil")+ Prelude.<*> (x Data..?> "Status")+ Prelude.<*> (x Data..?> "Title")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetLegalHold where+ hashWithSalt _salt GetLegalHold' {..} =+ _salt `Prelude.hashWithSalt` legalHoldId++instance Prelude.NFData GetLegalHold where+ rnf GetLegalHold' {..} = Prelude.rnf legalHoldId++instance Data.ToHeaders GetLegalHold where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetLegalHold where+ toPath GetLegalHold' {..} =+ Prelude.mconcat+ ["/legal-holds/", Data.toBS legalHoldId, "/"]++instance Data.ToQuery GetLegalHold where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetLegalHoldResponse' smart constructor.+data GetLegalHoldResponse = GetLegalHoldResponse'+ { -- | String describing the reason for removing the legal hold.+ cancelDescription :: Prelude.Maybe Prelude.Text,+ -- | Time in number when legal hold was cancelled.+ cancellationDate :: Prelude.Maybe Data.POSIX,+ -- | Time in number format when legal hold was created.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | This is the returned string description of the legal hold.+ description :: Prelude.Maybe Prelude.Text,+ -- | This is the returned framework ARN for the specified legal hold. An+ -- Amazon Resource Name (ARN) uniquely identifies a resource. The format of+ -- the ARN depends on the resource type.+ legalHoldArn :: Prelude.Maybe Prelude.Text,+ -- | This is the returned ID associated with a specified legal hold.+ legalHoldId :: Prelude.Maybe Prelude.Text,+ -- | This specifies criteria to assign a set of resources, such as resource+ -- types or backup vaults.+ recoveryPointSelection :: Prelude.Maybe RecoveryPointSelection,+ -- | This is the date and time until which the legal hold record will be+ -- retained.+ retainRecordUntil :: Prelude.Maybe Data.POSIX,+ -- | This is the status of the legal hold. Statuses can be @ACTIVE@,+ -- @CREATING@, @CANCELED@, and @CANCELING@.+ status :: Prelude.Maybe LegalHoldStatus,+ -- | This is the string title of the legal hold.+ title :: 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 'GetLegalHoldResponse' 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:+--+-- 'cancelDescription', 'getLegalHoldResponse_cancelDescription' - String describing the reason for removing the legal hold.+--+-- 'cancellationDate', 'getLegalHoldResponse_cancellationDate' - Time in number when legal hold was cancelled.+--+-- 'creationDate', 'getLegalHoldResponse_creationDate' - Time in number format when legal hold was created.+--+-- 'description', 'getLegalHoldResponse_description' - This is the returned string description of the legal hold.+--+-- 'legalHoldArn', 'getLegalHoldResponse_legalHoldArn' - This is the returned framework ARN for the specified legal hold. An+-- Amazon Resource Name (ARN) uniquely identifies a resource. The format of+-- the ARN depends on the resource type.+--+-- 'legalHoldId', 'getLegalHoldResponse_legalHoldId' - This is the returned ID associated with a specified legal hold.+--+-- 'recoveryPointSelection', 'getLegalHoldResponse_recoveryPointSelection' - This specifies criteria to assign a set of resources, such as resource+-- types or backup vaults.+--+-- 'retainRecordUntil', 'getLegalHoldResponse_retainRecordUntil' - This is the date and time until which the legal hold record will be+-- retained.+--+-- 'status', 'getLegalHoldResponse_status' - This is the status of the legal hold. Statuses can be @ACTIVE@,+-- @CREATING@, @CANCELED@, and @CANCELING@.+--+-- 'title', 'getLegalHoldResponse_title' - This is the string title of the legal hold.+--+-- 'httpStatus', 'getLegalHoldResponse_httpStatus' - The response's http status code.+newGetLegalHoldResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetLegalHoldResponse+newGetLegalHoldResponse pHttpStatus_ =+ GetLegalHoldResponse'+ { cancelDescription =+ Prelude.Nothing,+ cancellationDate = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ description = Prelude.Nothing,+ legalHoldArn = Prelude.Nothing,+ legalHoldId = Prelude.Nothing,+ recoveryPointSelection = Prelude.Nothing,+ retainRecordUntil = Prelude.Nothing,+ status = Prelude.Nothing,+ title = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | String describing the reason for removing the legal hold.+getLegalHoldResponse_cancelDescription :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe Prelude.Text)+getLegalHoldResponse_cancelDescription = Lens.lens (\GetLegalHoldResponse' {cancelDescription} -> cancelDescription) (\s@GetLegalHoldResponse' {} a -> s {cancelDescription = a} :: GetLegalHoldResponse)++-- | Time in number when legal hold was cancelled.+getLegalHoldResponse_cancellationDate :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe Prelude.UTCTime)+getLegalHoldResponse_cancellationDate = Lens.lens (\GetLegalHoldResponse' {cancellationDate} -> cancellationDate) (\s@GetLegalHoldResponse' {} a -> s {cancellationDate = a} :: GetLegalHoldResponse) Prelude.. Lens.mapping Data._Time++-- | Time in number format when legal hold was created.+getLegalHoldResponse_creationDate :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe Prelude.UTCTime)+getLegalHoldResponse_creationDate = Lens.lens (\GetLegalHoldResponse' {creationDate} -> creationDate) (\s@GetLegalHoldResponse' {} a -> s {creationDate = a} :: GetLegalHoldResponse) Prelude.. Lens.mapping Data._Time++-- | This is the returned string description of the legal hold.+getLegalHoldResponse_description :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe Prelude.Text)+getLegalHoldResponse_description = Lens.lens (\GetLegalHoldResponse' {description} -> description) (\s@GetLegalHoldResponse' {} a -> s {description = a} :: GetLegalHoldResponse)++-- | This is the returned framework ARN for the specified legal hold. An+-- Amazon Resource Name (ARN) uniquely identifies a resource. The format of+-- the ARN depends on the resource type.+getLegalHoldResponse_legalHoldArn :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe Prelude.Text)+getLegalHoldResponse_legalHoldArn = Lens.lens (\GetLegalHoldResponse' {legalHoldArn} -> legalHoldArn) (\s@GetLegalHoldResponse' {} a -> s {legalHoldArn = a} :: GetLegalHoldResponse)++-- | This is the returned ID associated with a specified legal hold.+getLegalHoldResponse_legalHoldId :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe Prelude.Text)+getLegalHoldResponse_legalHoldId = Lens.lens (\GetLegalHoldResponse' {legalHoldId} -> legalHoldId) (\s@GetLegalHoldResponse' {} a -> s {legalHoldId = a} :: GetLegalHoldResponse)++-- | This specifies criteria to assign a set of resources, such as resource+-- types or backup vaults.+getLegalHoldResponse_recoveryPointSelection :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe RecoveryPointSelection)+getLegalHoldResponse_recoveryPointSelection = Lens.lens (\GetLegalHoldResponse' {recoveryPointSelection} -> recoveryPointSelection) (\s@GetLegalHoldResponse' {} a -> s {recoveryPointSelection = a} :: GetLegalHoldResponse)++-- | This is the date and time until which the legal hold record will be+-- retained.+getLegalHoldResponse_retainRecordUntil :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe Prelude.UTCTime)+getLegalHoldResponse_retainRecordUntil = Lens.lens (\GetLegalHoldResponse' {retainRecordUntil} -> retainRecordUntil) (\s@GetLegalHoldResponse' {} a -> s {retainRecordUntil = a} :: GetLegalHoldResponse) Prelude.. Lens.mapping Data._Time++-- | This is the status of the legal hold. Statuses can be @ACTIVE@,+-- @CREATING@, @CANCELED@, and @CANCELING@.+getLegalHoldResponse_status :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe LegalHoldStatus)+getLegalHoldResponse_status = Lens.lens (\GetLegalHoldResponse' {status} -> status) (\s@GetLegalHoldResponse' {} a -> s {status = a} :: GetLegalHoldResponse)++-- | This is the string title of the legal hold.+getLegalHoldResponse_title :: Lens.Lens' GetLegalHoldResponse (Prelude.Maybe Prelude.Text)+getLegalHoldResponse_title = Lens.lens (\GetLegalHoldResponse' {title} -> title) (\s@GetLegalHoldResponse' {} a -> s {title = a} :: GetLegalHoldResponse)++-- | The response's http status code.+getLegalHoldResponse_httpStatus :: Lens.Lens' GetLegalHoldResponse Prelude.Int+getLegalHoldResponse_httpStatus = Lens.lens (\GetLegalHoldResponse' {httpStatus} -> httpStatus) (\s@GetLegalHoldResponse' {} a -> s {httpStatus = a} :: GetLegalHoldResponse)++instance Prelude.NFData GetLegalHoldResponse where+ rnf GetLegalHoldResponse' {..} =+ Prelude.rnf cancelDescription+ `Prelude.seq` Prelude.rnf cancellationDate+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf description+ `Prelude.seq` Prelude.rnf legalHoldArn+ `Prelude.seq` Prelude.rnf legalHoldId+ `Prelude.seq` Prelude.rnf recoveryPointSelection+ `Prelude.seq` Prelude.rnf retainRecordUntil+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf title+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/GetRecoveryPointRestoreMetadata.hs view
@@ -0,0 +1,258 @@+{-# 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.Backup.GetRecoveryPointRestoreMetadata+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a set of metadata key-value pairs that were used to create the+-- backup.+module Amazonka.Backup.GetRecoveryPointRestoreMetadata+ ( -- * Creating a Request+ GetRecoveryPointRestoreMetadata (..),+ newGetRecoveryPointRestoreMetadata,++ -- * Request Lenses+ getRecoveryPointRestoreMetadata_backupVaultName,+ getRecoveryPointRestoreMetadata_recoveryPointArn,++ -- * Destructuring the Response+ GetRecoveryPointRestoreMetadataResponse (..),+ newGetRecoveryPointRestoreMetadataResponse,++ -- * Response Lenses+ getRecoveryPointRestoreMetadataResponse_backupVaultArn,+ getRecoveryPointRestoreMetadataResponse_recoveryPointArn,+ getRecoveryPointRestoreMetadataResponse_restoreMetadata,+ getRecoveryPointRestoreMetadataResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newGetRecoveryPointRestoreMetadata' smart constructor.+data GetRecoveryPointRestoreMetadata = GetRecoveryPointRestoreMetadata'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRecoveryPointRestoreMetadata' 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:+--+-- 'backupVaultName', 'getRecoveryPointRestoreMetadata_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'recoveryPointArn', 'getRecoveryPointRestoreMetadata_recoveryPointArn' - An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+newGetRecoveryPointRestoreMetadata ::+ -- | 'backupVaultName'+ Prelude.Text ->+ -- | 'recoveryPointArn'+ Prelude.Text ->+ GetRecoveryPointRestoreMetadata+newGetRecoveryPointRestoreMetadata+ pBackupVaultName_+ pRecoveryPointArn_ =+ GetRecoveryPointRestoreMetadata'+ { backupVaultName =+ pBackupVaultName_,+ recoveryPointArn = pRecoveryPointArn_+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+getRecoveryPointRestoreMetadata_backupVaultName :: Lens.Lens' GetRecoveryPointRestoreMetadata Prelude.Text+getRecoveryPointRestoreMetadata_backupVaultName = Lens.lens (\GetRecoveryPointRestoreMetadata' {backupVaultName} -> backupVaultName) (\s@GetRecoveryPointRestoreMetadata' {} a -> s {backupVaultName = a} :: GetRecoveryPointRestoreMetadata)++-- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+getRecoveryPointRestoreMetadata_recoveryPointArn :: Lens.Lens' GetRecoveryPointRestoreMetadata Prelude.Text+getRecoveryPointRestoreMetadata_recoveryPointArn = Lens.lens (\GetRecoveryPointRestoreMetadata' {recoveryPointArn} -> recoveryPointArn) (\s@GetRecoveryPointRestoreMetadata' {} a -> s {recoveryPointArn = a} :: GetRecoveryPointRestoreMetadata)++instance+ Core.AWSRequest+ GetRecoveryPointRestoreMetadata+ where+ type+ AWSResponse GetRecoveryPointRestoreMetadata =+ GetRecoveryPointRestoreMetadataResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetRecoveryPointRestoreMetadataResponse'+ Prelude.<$> (x Data..?> "BackupVaultArn")+ Prelude.<*> (x Data..?> "RecoveryPointArn")+ Prelude.<*> ( x+ Data..?> "RestoreMetadata"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ GetRecoveryPointRestoreMetadata+ where+ hashWithSalt+ _salt+ GetRecoveryPointRestoreMetadata' {..} =+ _salt+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` recoveryPointArn++instance+ Prelude.NFData+ GetRecoveryPointRestoreMetadata+ where+ rnf GetRecoveryPointRestoreMetadata' {..} =+ Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf recoveryPointArn++instance+ Data.ToHeaders+ GetRecoveryPointRestoreMetadata+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetRecoveryPointRestoreMetadata where+ toPath GetRecoveryPointRestoreMetadata' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/recovery-points/",+ Data.toBS recoveryPointArn,+ "/restore-metadata"+ ]++instance Data.ToQuery GetRecoveryPointRestoreMetadata where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetRecoveryPointRestoreMetadataResponse' smart constructor.+data GetRecoveryPointRestoreMetadataResponse = GetRecoveryPointRestoreMetadataResponse'+ { -- | An ARN that uniquely identifies a backup vault; for example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | The set of metadata key-value pairs that describe the original+ -- configuration of the backed-up resource. These values vary depending on+ -- the service that is being restored.+ restoreMetadata :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRecoveryPointRestoreMetadataResponse' 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:+--+-- 'backupVaultArn', 'getRecoveryPointRestoreMetadataResponse_backupVaultArn' - An ARN that uniquely identifies a backup vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'recoveryPointArn', 'getRecoveryPointRestoreMetadataResponse_recoveryPointArn' - An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'restoreMetadata', 'getRecoveryPointRestoreMetadataResponse_restoreMetadata' - The set of metadata key-value pairs that describe the original+-- configuration of the backed-up resource. These values vary depending on+-- the service that is being restored.+--+-- 'httpStatus', 'getRecoveryPointRestoreMetadataResponse_httpStatus' - The response's http status code.+newGetRecoveryPointRestoreMetadataResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetRecoveryPointRestoreMetadataResponse+newGetRecoveryPointRestoreMetadataResponse+ pHttpStatus_ =+ GetRecoveryPointRestoreMetadataResponse'+ { backupVaultArn =+ Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ restoreMetadata = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An ARN that uniquely identifies a backup vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+getRecoveryPointRestoreMetadataResponse_backupVaultArn :: Lens.Lens' GetRecoveryPointRestoreMetadataResponse (Prelude.Maybe Prelude.Text)+getRecoveryPointRestoreMetadataResponse_backupVaultArn = Lens.lens (\GetRecoveryPointRestoreMetadataResponse' {backupVaultArn} -> backupVaultArn) (\s@GetRecoveryPointRestoreMetadataResponse' {} a -> s {backupVaultArn = a} :: GetRecoveryPointRestoreMetadataResponse)++-- | An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+getRecoveryPointRestoreMetadataResponse_recoveryPointArn :: Lens.Lens' GetRecoveryPointRestoreMetadataResponse (Prelude.Maybe Prelude.Text)+getRecoveryPointRestoreMetadataResponse_recoveryPointArn = Lens.lens (\GetRecoveryPointRestoreMetadataResponse' {recoveryPointArn} -> recoveryPointArn) (\s@GetRecoveryPointRestoreMetadataResponse' {} a -> s {recoveryPointArn = a} :: GetRecoveryPointRestoreMetadataResponse)++-- | The set of metadata key-value pairs that describe the original+-- configuration of the backed-up resource. These values vary depending on+-- the service that is being restored.+getRecoveryPointRestoreMetadataResponse_restoreMetadata :: Lens.Lens' GetRecoveryPointRestoreMetadataResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+getRecoveryPointRestoreMetadataResponse_restoreMetadata = Lens.lens (\GetRecoveryPointRestoreMetadataResponse' {restoreMetadata} -> restoreMetadata) (\s@GetRecoveryPointRestoreMetadataResponse' {} a -> s {restoreMetadata = a} :: GetRecoveryPointRestoreMetadataResponse) Prelude.. Lens.mapping (Data._Sensitive Prelude.. Lens.coerced)++-- | The response's http status code.+getRecoveryPointRestoreMetadataResponse_httpStatus :: Lens.Lens' GetRecoveryPointRestoreMetadataResponse Prelude.Int+getRecoveryPointRestoreMetadataResponse_httpStatus = Lens.lens (\GetRecoveryPointRestoreMetadataResponse' {httpStatus} -> httpStatus) (\s@GetRecoveryPointRestoreMetadataResponse' {} a -> s {httpStatus = a} :: GetRecoveryPointRestoreMetadataResponse)++instance+ Prelude.NFData+ GetRecoveryPointRestoreMetadataResponse+ where+ rnf GetRecoveryPointRestoreMetadataResponse' {..} =+ Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf restoreMetadata+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/GetSupportedResourceTypes.hs view
@@ -0,0 +1,205 @@+{-# 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.Backup.GetSupportedResourceTypes+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the Amazon Web Services resource types supported by Backup.+module Amazonka.Backup.GetSupportedResourceTypes+ ( -- * Creating a Request+ GetSupportedResourceTypes (..),+ newGetSupportedResourceTypes,++ -- * Destructuring the Response+ GetSupportedResourceTypesResponse (..),+ newGetSupportedResourceTypesResponse,++ -- * Response Lenses+ getSupportedResourceTypesResponse_resourceTypes,+ getSupportedResourceTypesResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newGetSupportedResourceTypes' smart constructor.+data GetSupportedResourceTypes = GetSupportedResourceTypes'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSupportedResourceTypes' 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.+newGetSupportedResourceTypes ::+ GetSupportedResourceTypes+newGetSupportedResourceTypes =+ GetSupportedResourceTypes'++instance Core.AWSRequest GetSupportedResourceTypes where+ type+ AWSResponse GetSupportedResourceTypes =+ GetSupportedResourceTypesResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetSupportedResourceTypesResponse'+ Prelude.<$> (x Data..?> "ResourceTypes" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetSupportedResourceTypes where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance Prelude.NFData GetSupportedResourceTypes where+ rnf _ = ()++instance Data.ToHeaders GetSupportedResourceTypes where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetSupportedResourceTypes where+ toPath = Prelude.const "/supported-resource-types"++instance Data.ToQuery GetSupportedResourceTypes where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetSupportedResourceTypesResponse' smart constructor.+data GetSupportedResourceTypesResponse = GetSupportedResourceTypesResponse'+ { -- | Contains a string with the supported Amazon Web Services resource types:+ --+ -- - @Aurora@ for Amazon Aurora+ --+ -- - @DynamoDB@ for Amazon DynamoDB+ --+ -- - @EBS@ for Amazon Elastic Block Store+ --+ -- - @EC2@ for Amazon Elastic Compute Cloud+ --+ -- - @EFS@ for Amazon Elastic File System+ --+ -- - @FSX@ for Amazon FSx+ --+ -- - @RDS@ for Amazon Relational Database Service+ --+ -- - @Storage Gateway@ for Storage Gateway+ --+ -- - @DocDB@ for Amazon DocumentDB (with MongoDB compatibility)+ --+ -- - @Neptune@ for Amazon Neptune+ resourceTypes :: 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 'GetSupportedResourceTypesResponse' 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:+--+-- 'resourceTypes', 'getSupportedResourceTypesResponse_resourceTypes' - Contains a string with the supported Amazon Web Services resource types:+--+-- - @Aurora@ for Amazon Aurora+--+-- - @DynamoDB@ for Amazon DynamoDB+--+-- - @EBS@ for Amazon Elastic Block Store+--+-- - @EC2@ for Amazon Elastic Compute Cloud+--+-- - @EFS@ for Amazon Elastic File System+--+-- - @FSX@ for Amazon FSx+--+-- - @RDS@ for Amazon Relational Database Service+--+-- - @Storage Gateway@ for Storage Gateway+--+-- - @DocDB@ for Amazon DocumentDB (with MongoDB compatibility)+--+-- - @Neptune@ for Amazon Neptune+--+-- 'httpStatus', 'getSupportedResourceTypesResponse_httpStatus' - The response's http status code.+newGetSupportedResourceTypesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetSupportedResourceTypesResponse+newGetSupportedResourceTypesResponse pHttpStatus_ =+ GetSupportedResourceTypesResponse'+ { resourceTypes =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Contains a string with the supported Amazon Web Services resource types:+--+-- - @Aurora@ for Amazon Aurora+--+-- - @DynamoDB@ for Amazon DynamoDB+--+-- - @EBS@ for Amazon Elastic Block Store+--+-- - @EC2@ for Amazon Elastic Compute Cloud+--+-- - @EFS@ for Amazon Elastic File System+--+-- - @FSX@ for Amazon FSx+--+-- - @RDS@ for Amazon Relational Database Service+--+-- - @Storage Gateway@ for Storage Gateway+--+-- - @DocDB@ for Amazon DocumentDB (with MongoDB compatibility)+--+-- - @Neptune@ for Amazon Neptune+getSupportedResourceTypesResponse_resourceTypes :: Lens.Lens' GetSupportedResourceTypesResponse (Prelude.Maybe [Prelude.Text])+getSupportedResourceTypesResponse_resourceTypes = Lens.lens (\GetSupportedResourceTypesResponse' {resourceTypes} -> resourceTypes) (\s@GetSupportedResourceTypesResponse' {} a -> s {resourceTypes = a} :: GetSupportedResourceTypesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getSupportedResourceTypesResponse_httpStatus :: Lens.Lens' GetSupportedResourceTypesResponse Prelude.Int+getSupportedResourceTypesResponse_httpStatus = Lens.lens (\GetSupportedResourceTypesResponse' {httpStatus} -> httpStatus) (\s@GetSupportedResourceTypesResponse' {} a -> s {httpStatus = a} :: GetSupportedResourceTypesResponse)++instance+ Prelude.NFData+ GetSupportedResourceTypesResponse+ where+ rnf GetSupportedResourceTypesResponse' {..} =+ Prelude.rnf resourceTypes+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/Lens.hs view
@@ -0,0 +1,1026 @@+{-# 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.Backup.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.Backup.Lens+ ( -- * Operations++ -- ** CancelLegalHold+ cancelLegalHold_retainRecordInDays,+ cancelLegalHold_legalHoldId,+ cancelLegalHold_cancelDescription,+ cancelLegalHoldResponse_httpStatus,++ -- ** CreateBackupPlan+ createBackupPlan_backupPlanTags,+ createBackupPlan_creatorRequestId,+ createBackupPlan_backupPlan,+ createBackupPlanResponse_advancedBackupSettings,+ createBackupPlanResponse_backupPlanArn,+ createBackupPlanResponse_backupPlanId,+ createBackupPlanResponse_creationDate,+ createBackupPlanResponse_versionId,+ createBackupPlanResponse_httpStatus,++ -- ** CreateBackupSelection+ createBackupSelection_creatorRequestId,+ createBackupSelection_backupPlanId,+ createBackupSelection_backupSelection,+ createBackupSelectionResponse_backupPlanId,+ createBackupSelectionResponse_creationDate,+ createBackupSelectionResponse_selectionId,+ createBackupSelectionResponse_httpStatus,++ -- ** CreateBackupVault+ createBackupVault_backupVaultTags,+ createBackupVault_creatorRequestId,+ createBackupVault_encryptionKeyArn,+ createBackupVault_backupVaultName,+ createBackupVaultResponse_backupVaultArn,+ createBackupVaultResponse_backupVaultName,+ createBackupVaultResponse_creationDate,+ createBackupVaultResponse_httpStatus,++ -- ** CreateFramework+ createFramework_frameworkDescription,+ createFramework_frameworkTags,+ createFramework_idempotencyToken,+ createFramework_frameworkName,+ createFramework_frameworkControls,+ createFrameworkResponse_frameworkArn,+ createFrameworkResponse_frameworkName,+ createFrameworkResponse_httpStatus,++ -- ** CreateLegalHold+ createLegalHold_idempotencyToken,+ createLegalHold_recoveryPointSelection,+ createLegalHold_tags,+ createLegalHold_title,+ createLegalHold_description,+ createLegalHoldResponse_creationDate,+ createLegalHoldResponse_description,+ createLegalHoldResponse_legalHoldArn,+ createLegalHoldResponse_legalHoldId,+ createLegalHoldResponse_recoveryPointSelection,+ createLegalHoldResponse_status,+ createLegalHoldResponse_title,+ createLegalHoldResponse_httpStatus,++ -- ** CreateReportPlan+ createReportPlan_idempotencyToken,+ createReportPlan_reportPlanDescription,+ createReportPlan_reportPlanTags,+ createReportPlan_reportPlanName,+ createReportPlan_reportDeliveryChannel,+ createReportPlan_reportSetting,+ createReportPlanResponse_creationTime,+ createReportPlanResponse_reportPlanArn,+ createReportPlanResponse_reportPlanName,+ createReportPlanResponse_httpStatus,++ -- ** DeleteBackupPlan+ deleteBackupPlan_backupPlanId,+ deleteBackupPlanResponse_backupPlanArn,+ deleteBackupPlanResponse_backupPlanId,+ deleteBackupPlanResponse_deletionDate,+ deleteBackupPlanResponse_versionId,+ deleteBackupPlanResponse_httpStatus,++ -- ** DeleteBackupSelection+ deleteBackupSelection_backupPlanId,+ deleteBackupSelection_selectionId,++ -- ** DeleteBackupVault+ deleteBackupVault_backupVaultName,++ -- ** DeleteBackupVaultAccessPolicy+ deleteBackupVaultAccessPolicy_backupVaultName,++ -- ** DeleteBackupVaultLockConfiguration+ deleteBackupVaultLockConfiguration_backupVaultName,++ -- ** DeleteBackupVaultNotifications+ deleteBackupVaultNotifications_backupVaultName,++ -- ** DeleteFramework+ deleteFramework_frameworkName,++ -- ** DeleteRecoveryPoint+ deleteRecoveryPoint_backupVaultName,+ deleteRecoveryPoint_recoveryPointArn,++ -- ** DeleteReportPlan+ deleteReportPlan_reportPlanName,++ -- ** DescribeBackupJob+ describeBackupJob_backupJobId,+ describeBackupJobResponse_accountId,+ describeBackupJobResponse_backupJobId,+ describeBackupJobResponse_backupOptions,+ describeBackupJobResponse_backupSizeInBytes,+ describeBackupJobResponse_backupType,+ describeBackupJobResponse_backupVaultArn,+ describeBackupJobResponse_backupVaultName,+ describeBackupJobResponse_bytesTransferred,+ describeBackupJobResponse_childJobsInState,+ describeBackupJobResponse_completionDate,+ describeBackupJobResponse_createdBy,+ describeBackupJobResponse_creationDate,+ describeBackupJobResponse_expectedCompletionDate,+ describeBackupJobResponse_iamRoleArn,+ describeBackupJobResponse_isParent,+ describeBackupJobResponse_numberOfChildJobs,+ describeBackupJobResponse_parentJobId,+ describeBackupJobResponse_percentDone,+ describeBackupJobResponse_recoveryPointArn,+ describeBackupJobResponse_resourceArn,+ describeBackupJobResponse_resourceType,+ describeBackupJobResponse_startBy,+ describeBackupJobResponse_state,+ describeBackupJobResponse_statusMessage,+ describeBackupJobResponse_httpStatus,++ -- ** DescribeBackupVault+ describeBackupVault_backupVaultName,+ describeBackupVaultResponse_backupVaultArn,+ describeBackupVaultResponse_backupVaultName,+ describeBackupVaultResponse_creationDate,+ describeBackupVaultResponse_creatorRequestId,+ describeBackupVaultResponse_encryptionKeyArn,+ describeBackupVaultResponse_lockDate,+ describeBackupVaultResponse_locked,+ describeBackupVaultResponse_maxRetentionDays,+ describeBackupVaultResponse_minRetentionDays,+ describeBackupVaultResponse_numberOfRecoveryPoints,+ describeBackupVaultResponse_httpStatus,++ -- ** DescribeCopyJob+ describeCopyJob_copyJobId,+ describeCopyJobResponse_copyJob,+ describeCopyJobResponse_httpStatus,++ -- ** DescribeFramework+ describeFramework_frameworkName,+ describeFrameworkResponse_creationTime,+ describeFrameworkResponse_deploymentStatus,+ describeFrameworkResponse_frameworkArn,+ describeFrameworkResponse_frameworkControls,+ describeFrameworkResponse_frameworkDescription,+ describeFrameworkResponse_frameworkName,+ describeFrameworkResponse_frameworkStatus,+ describeFrameworkResponse_idempotencyToken,+ describeFrameworkResponse_httpStatus,++ -- ** DescribeGlobalSettings+ describeGlobalSettingsResponse_globalSettings,+ describeGlobalSettingsResponse_lastUpdateTime,+ describeGlobalSettingsResponse_httpStatus,++ -- ** DescribeProtectedResource+ describeProtectedResource_resourceArn,+ describeProtectedResourceResponse_lastBackupTime,+ describeProtectedResourceResponse_resourceArn,+ describeProtectedResourceResponse_resourceType,+ describeProtectedResourceResponse_httpStatus,++ -- ** DescribeRecoveryPoint+ describeRecoveryPoint_backupVaultName,+ describeRecoveryPoint_recoveryPointArn,+ describeRecoveryPointResponse_backupSizeInBytes,+ describeRecoveryPointResponse_backupVaultArn,+ describeRecoveryPointResponse_backupVaultName,+ describeRecoveryPointResponse_calculatedLifecycle,+ describeRecoveryPointResponse_completionDate,+ describeRecoveryPointResponse_compositeMemberIdentifier,+ describeRecoveryPointResponse_createdBy,+ describeRecoveryPointResponse_creationDate,+ describeRecoveryPointResponse_encryptionKeyArn,+ describeRecoveryPointResponse_iamRoleArn,+ describeRecoveryPointResponse_isEncrypted,+ describeRecoveryPointResponse_isParent,+ describeRecoveryPointResponse_lastRestoreTime,+ describeRecoveryPointResponse_lifecycle,+ describeRecoveryPointResponse_parentRecoveryPointArn,+ describeRecoveryPointResponse_recoveryPointArn,+ describeRecoveryPointResponse_resourceArn,+ describeRecoveryPointResponse_resourceType,+ describeRecoveryPointResponse_sourceBackupVaultArn,+ describeRecoveryPointResponse_status,+ describeRecoveryPointResponse_statusMessage,+ describeRecoveryPointResponse_storageClass,+ describeRecoveryPointResponse_httpStatus,++ -- ** DescribeRegionSettings+ describeRegionSettingsResponse_resourceTypeManagementPreference,+ describeRegionSettingsResponse_resourceTypeOptInPreference,+ describeRegionSettingsResponse_httpStatus,++ -- ** DescribeReportJob+ describeReportJob_reportJobId,+ describeReportJobResponse_reportJob,+ describeReportJobResponse_httpStatus,++ -- ** DescribeReportPlan+ describeReportPlan_reportPlanName,+ describeReportPlanResponse_reportPlan,+ describeReportPlanResponse_httpStatus,++ -- ** DescribeRestoreJob+ describeRestoreJob_restoreJobId,+ describeRestoreJobResponse_accountId,+ describeRestoreJobResponse_backupSizeInBytes,+ describeRestoreJobResponse_completionDate,+ describeRestoreJobResponse_createdResourceArn,+ describeRestoreJobResponse_creationDate,+ describeRestoreJobResponse_expectedCompletionTimeMinutes,+ describeRestoreJobResponse_iamRoleArn,+ describeRestoreJobResponse_percentDone,+ describeRestoreJobResponse_recoveryPointArn,+ describeRestoreJobResponse_resourceType,+ describeRestoreJobResponse_restoreJobId,+ describeRestoreJobResponse_status,+ describeRestoreJobResponse_statusMessage,+ describeRestoreJobResponse_httpStatus,++ -- ** DisassociateRecoveryPoint+ disassociateRecoveryPoint_backupVaultName,+ disassociateRecoveryPoint_recoveryPointArn,++ -- ** DisassociateRecoveryPointFromParent+ disassociateRecoveryPointFromParent_backupVaultName,+ disassociateRecoveryPointFromParent_recoveryPointArn,++ -- ** ExportBackupPlanTemplate+ exportBackupPlanTemplate_backupPlanId,+ exportBackupPlanTemplateResponse_backupPlanTemplateJson,+ exportBackupPlanTemplateResponse_httpStatus,++ -- ** GetBackupPlan+ getBackupPlan_versionId,+ getBackupPlan_backupPlanId,+ getBackupPlanResponse_advancedBackupSettings,+ getBackupPlanResponse_backupPlan,+ getBackupPlanResponse_backupPlanArn,+ getBackupPlanResponse_backupPlanId,+ getBackupPlanResponse_creationDate,+ getBackupPlanResponse_creatorRequestId,+ getBackupPlanResponse_deletionDate,+ getBackupPlanResponse_lastExecutionDate,+ getBackupPlanResponse_versionId,+ getBackupPlanResponse_httpStatus,++ -- ** GetBackupPlanFromJSON+ getBackupPlanFromJSON_backupPlanTemplateJson,+ getBackupPlanFromJSONResponse_backupPlan,+ getBackupPlanFromJSONResponse_httpStatus,++ -- ** GetBackupPlanFromTemplate+ getBackupPlanFromTemplate_backupPlanTemplateId,+ getBackupPlanFromTemplateResponse_backupPlanDocument,+ getBackupPlanFromTemplateResponse_httpStatus,++ -- ** GetBackupSelection+ getBackupSelection_backupPlanId,+ getBackupSelection_selectionId,+ getBackupSelectionResponse_backupPlanId,+ getBackupSelectionResponse_backupSelection,+ getBackupSelectionResponse_creationDate,+ getBackupSelectionResponse_creatorRequestId,+ getBackupSelectionResponse_selectionId,+ getBackupSelectionResponse_httpStatus,++ -- ** GetBackupVaultAccessPolicy+ getBackupVaultAccessPolicy_backupVaultName,+ getBackupVaultAccessPolicyResponse_backupVaultArn,+ getBackupVaultAccessPolicyResponse_backupVaultName,+ getBackupVaultAccessPolicyResponse_policy,+ getBackupVaultAccessPolicyResponse_httpStatus,++ -- ** GetBackupVaultNotifications+ getBackupVaultNotifications_backupVaultName,+ getBackupVaultNotificationsResponse_backupVaultArn,+ getBackupVaultNotificationsResponse_backupVaultEvents,+ getBackupVaultNotificationsResponse_backupVaultName,+ getBackupVaultNotificationsResponse_sNSTopicArn,+ getBackupVaultNotificationsResponse_httpStatus,++ -- ** GetLegalHold+ getLegalHold_legalHoldId,+ getLegalHoldResponse_cancelDescription,+ getLegalHoldResponse_cancellationDate,+ getLegalHoldResponse_creationDate,+ getLegalHoldResponse_description,+ getLegalHoldResponse_legalHoldArn,+ getLegalHoldResponse_legalHoldId,+ getLegalHoldResponse_recoveryPointSelection,+ getLegalHoldResponse_retainRecordUntil,+ getLegalHoldResponse_status,+ getLegalHoldResponse_title,+ getLegalHoldResponse_httpStatus,++ -- ** GetRecoveryPointRestoreMetadata+ getRecoveryPointRestoreMetadata_backupVaultName,+ getRecoveryPointRestoreMetadata_recoveryPointArn,+ getRecoveryPointRestoreMetadataResponse_backupVaultArn,+ getRecoveryPointRestoreMetadataResponse_recoveryPointArn,+ getRecoveryPointRestoreMetadataResponse_restoreMetadata,+ getRecoveryPointRestoreMetadataResponse_httpStatus,++ -- ** GetSupportedResourceTypes+ getSupportedResourceTypesResponse_resourceTypes,+ getSupportedResourceTypesResponse_httpStatus,++ -- ** ListBackupJobs+ listBackupJobs_byAccountId,+ listBackupJobs_byBackupVaultName,+ listBackupJobs_byCompleteAfter,+ listBackupJobs_byCompleteBefore,+ listBackupJobs_byCreatedAfter,+ listBackupJobs_byCreatedBefore,+ listBackupJobs_byParentJobId,+ listBackupJobs_byResourceArn,+ listBackupJobs_byResourceType,+ listBackupJobs_byState,+ listBackupJobs_maxResults,+ listBackupJobs_nextToken,+ listBackupJobsResponse_backupJobs,+ listBackupJobsResponse_nextToken,+ listBackupJobsResponse_httpStatus,++ -- ** ListBackupPlanTemplates+ listBackupPlanTemplates_maxResults,+ listBackupPlanTemplates_nextToken,+ listBackupPlanTemplatesResponse_backupPlanTemplatesList,+ listBackupPlanTemplatesResponse_nextToken,+ listBackupPlanTemplatesResponse_httpStatus,++ -- ** ListBackupPlanVersions+ listBackupPlanVersions_maxResults,+ listBackupPlanVersions_nextToken,+ listBackupPlanVersions_backupPlanId,+ listBackupPlanVersionsResponse_backupPlanVersionsList,+ listBackupPlanVersionsResponse_nextToken,+ listBackupPlanVersionsResponse_httpStatus,++ -- ** ListBackupPlans+ listBackupPlans_includeDeleted,+ listBackupPlans_maxResults,+ listBackupPlans_nextToken,+ listBackupPlansResponse_backupPlansList,+ listBackupPlansResponse_nextToken,+ listBackupPlansResponse_httpStatus,++ -- ** ListBackupSelections+ listBackupSelections_maxResults,+ listBackupSelections_nextToken,+ listBackupSelections_backupPlanId,+ listBackupSelectionsResponse_backupSelectionsList,+ listBackupSelectionsResponse_nextToken,+ listBackupSelectionsResponse_httpStatus,++ -- ** ListBackupVaults+ listBackupVaults_maxResults,+ listBackupVaults_nextToken,+ listBackupVaultsResponse_backupVaultList,+ listBackupVaultsResponse_nextToken,+ listBackupVaultsResponse_httpStatus,++ -- ** ListCopyJobs+ listCopyJobs_byAccountId,+ listCopyJobs_byCompleteAfter,+ listCopyJobs_byCompleteBefore,+ listCopyJobs_byCreatedAfter,+ listCopyJobs_byCreatedBefore,+ listCopyJobs_byDestinationVaultArn,+ listCopyJobs_byParentJobId,+ listCopyJobs_byResourceArn,+ listCopyJobs_byResourceType,+ listCopyJobs_byState,+ listCopyJobs_maxResults,+ listCopyJobs_nextToken,+ listCopyJobsResponse_copyJobs,+ listCopyJobsResponse_nextToken,+ listCopyJobsResponse_httpStatus,++ -- ** ListFrameworks+ listFrameworks_maxResults,+ listFrameworks_nextToken,+ listFrameworksResponse_frameworks,+ listFrameworksResponse_nextToken,+ listFrameworksResponse_httpStatus,++ -- ** ListLegalHolds+ listLegalHolds_maxResults,+ listLegalHolds_nextToken,+ listLegalHoldsResponse_legalHolds,+ listLegalHoldsResponse_nextToken,+ listLegalHoldsResponse_httpStatus,++ -- ** ListProtectedResources+ listProtectedResources_maxResults,+ listProtectedResources_nextToken,+ listProtectedResourcesResponse_nextToken,+ listProtectedResourcesResponse_results,+ listProtectedResourcesResponse_httpStatus,++ -- ** ListRecoveryPointsByBackupVault+ listRecoveryPointsByBackupVault_byBackupPlanId,+ listRecoveryPointsByBackupVault_byCreatedAfter,+ listRecoveryPointsByBackupVault_byCreatedBefore,+ listRecoveryPointsByBackupVault_byParentRecoveryPointArn,+ listRecoveryPointsByBackupVault_byResourceArn,+ listRecoveryPointsByBackupVault_byResourceType,+ listRecoveryPointsByBackupVault_maxResults,+ listRecoveryPointsByBackupVault_nextToken,+ listRecoveryPointsByBackupVault_backupVaultName,+ listRecoveryPointsByBackupVaultResponse_nextToken,+ listRecoveryPointsByBackupVaultResponse_recoveryPoints,+ listRecoveryPointsByBackupVaultResponse_httpStatus,++ -- ** ListRecoveryPointsByLegalHold+ listRecoveryPointsByLegalHold_maxResults,+ listRecoveryPointsByLegalHold_nextToken,+ listRecoveryPointsByLegalHold_legalHoldId,+ listRecoveryPointsByLegalHoldResponse_nextToken,+ listRecoveryPointsByLegalHoldResponse_recoveryPoints,+ listRecoveryPointsByLegalHoldResponse_httpStatus,++ -- ** ListRecoveryPointsByResource+ listRecoveryPointsByResource_maxResults,+ listRecoveryPointsByResource_nextToken,+ listRecoveryPointsByResource_resourceArn,+ listRecoveryPointsByResourceResponse_nextToken,+ listRecoveryPointsByResourceResponse_recoveryPoints,+ listRecoveryPointsByResourceResponse_httpStatus,++ -- ** ListReportJobs+ listReportJobs_byCreationAfter,+ listReportJobs_byCreationBefore,+ listReportJobs_byReportPlanName,+ listReportJobs_byStatus,+ listReportJobs_maxResults,+ listReportJobs_nextToken,+ listReportJobsResponse_nextToken,+ listReportJobsResponse_reportJobs,+ listReportJobsResponse_httpStatus,++ -- ** ListReportPlans+ listReportPlans_maxResults,+ listReportPlans_nextToken,+ listReportPlansResponse_nextToken,+ listReportPlansResponse_reportPlans,+ listReportPlansResponse_httpStatus,++ -- ** ListRestoreJobs+ listRestoreJobs_byAccountId,+ listRestoreJobs_byCompleteAfter,+ listRestoreJobs_byCompleteBefore,+ listRestoreJobs_byCreatedAfter,+ listRestoreJobs_byCreatedBefore,+ listRestoreJobs_byStatus,+ listRestoreJobs_maxResults,+ listRestoreJobs_nextToken,+ listRestoreJobsResponse_nextToken,+ listRestoreJobsResponse_restoreJobs,+ listRestoreJobsResponse_httpStatus,++ -- ** ListTags+ listTags_maxResults,+ listTags_nextToken,+ listTags_resourceArn,+ listTagsResponse_nextToken,+ listTagsResponse_tags,+ listTagsResponse_httpStatus,++ -- ** PutBackupVaultAccessPolicy+ putBackupVaultAccessPolicy_policy,+ putBackupVaultAccessPolicy_backupVaultName,++ -- ** PutBackupVaultLockConfiguration+ putBackupVaultLockConfiguration_changeableForDays,+ putBackupVaultLockConfiguration_maxRetentionDays,+ putBackupVaultLockConfiguration_minRetentionDays,+ putBackupVaultLockConfiguration_backupVaultName,++ -- ** PutBackupVaultNotifications+ putBackupVaultNotifications_backupVaultName,+ putBackupVaultNotifications_sNSTopicArn,+ putBackupVaultNotifications_backupVaultEvents,++ -- ** StartBackupJob+ startBackupJob_backupOptions,+ startBackupJob_completeWindowMinutes,+ startBackupJob_idempotencyToken,+ startBackupJob_lifecycle,+ startBackupJob_recoveryPointTags,+ startBackupJob_startWindowMinutes,+ startBackupJob_backupVaultName,+ startBackupJob_resourceArn,+ startBackupJob_iamRoleArn,+ startBackupJobResponse_backupJobId,+ startBackupJobResponse_creationDate,+ startBackupJobResponse_isParent,+ startBackupJobResponse_recoveryPointArn,+ startBackupJobResponse_httpStatus,++ -- ** StartCopyJob+ startCopyJob_idempotencyToken,+ startCopyJob_lifecycle,+ startCopyJob_recoveryPointArn,+ startCopyJob_sourceBackupVaultName,+ startCopyJob_destinationBackupVaultArn,+ startCopyJob_iamRoleArn,+ startCopyJobResponse_copyJobId,+ startCopyJobResponse_creationDate,+ startCopyJobResponse_isParent,+ startCopyJobResponse_httpStatus,++ -- ** StartReportJob+ startReportJob_idempotencyToken,+ startReportJob_reportPlanName,+ startReportJobResponse_reportJobId,+ startReportJobResponse_httpStatus,++ -- ** StartRestoreJob+ startRestoreJob_iamRoleArn,+ startRestoreJob_idempotencyToken,+ startRestoreJob_resourceType,+ startRestoreJob_recoveryPointArn,+ startRestoreJob_metadata,+ startRestoreJobResponse_restoreJobId,+ startRestoreJobResponse_httpStatus,++ -- ** StopBackupJob+ stopBackupJob_backupJobId,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeyList,++ -- ** UpdateBackupPlan+ updateBackupPlan_backupPlanId,+ updateBackupPlan_backupPlan,+ updateBackupPlanResponse_advancedBackupSettings,+ updateBackupPlanResponse_backupPlanArn,+ updateBackupPlanResponse_backupPlanId,+ updateBackupPlanResponse_creationDate,+ updateBackupPlanResponse_versionId,+ updateBackupPlanResponse_httpStatus,++ -- ** UpdateFramework+ updateFramework_frameworkControls,+ updateFramework_frameworkDescription,+ updateFramework_idempotencyToken,+ updateFramework_frameworkName,+ updateFrameworkResponse_creationTime,+ updateFrameworkResponse_frameworkArn,+ updateFrameworkResponse_frameworkName,+ updateFrameworkResponse_httpStatus,++ -- ** UpdateGlobalSettings+ updateGlobalSettings_globalSettings,++ -- ** UpdateRecoveryPointLifecycle+ updateRecoveryPointLifecycle_lifecycle,+ updateRecoveryPointLifecycle_backupVaultName,+ updateRecoveryPointLifecycle_recoveryPointArn,+ updateRecoveryPointLifecycleResponse_backupVaultArn,+ updateRecoveryPointLifecycleResponse_calculatedLifecycle,+ updateRecoveryPointLifecycleResponse_lifecycle,+ updateRecoveryPointLifecycleResponse_recoveryPointArn,+ updateRecoveryPointLifecycleResponse_httpStatus,++ -- ** UpdateRegionSettings+ updateRegionSettings_resourceTypeManagementPreference,+ updateRegionSettings_resourceTypeOptInPreference,++ -- ** UpdateReportPlan+ updateReportPlan_idempotencyToken,+ updateReportPlan_reportDeliveryChannel,+ updateReportPlan_reportPlanDescription,+ updateReportPlan_reportSetting,+ updateReportPlan_reportPlanName,+ updateReportPlanResponse_creationTime,+ updateReportPlanResponse_reportPlanArn,+ updateReportPlanResponse_reportPlanName,+ updateReportPlanResponse_httpStatus,++ -- * Types++ -- ** AdvancedBackupSetting+ advancedBackupSetting_backupOptions,+ advancedBackupSetting_resourceType,++ -- ** BackupJob+ backupJob_accountId,+ backupJob_backupJobId,+ backupJob_backupOptions,+ backupJob_backupSizeInBytes,+ backupJob_backupType,+ backupJob_backupVaultArn,+ backupJob_backupVaultName,+ backupJob_bytesTransferred,+ backupJob_completionDate,+ backupJob_createdBy,+ backupJob_creationDate,+ backupJob_expectedCompletionDate,+ backupJob_iamRoleArn,+ backupJob_isParent,+ backupJob_parentJobId,+ backupJob_percentDone,+ backupJob_recoveryPointArn,+ backupJob_resourceArn,+ backupJob_resourceType,+ backupJob_startBy,+ backupJob_state,+ backupJob_statusMessage,++ -- ** BackupPlan+ backupPlan_advancedBackupSettings,+ backupPlan_backupPlanName,+ backupPlan_rules,++ -- ** BackupPlanInput+ backupPlanInput_advancedBackupSettings,+ backupPlanInput_backupPlanName,+ backupPlanInput_rules,++ -- ** BackupPlanTemplatesListMember+ backupPlanTemplatesListMember_backupPlanTemplateId,+ backupPlanTemplatesListMember_backupPlanTemplateName,++ -- ** BackupPlansListMember+ backupPlansListMember_advancedBackupSettings,+ backupPlansListMember_backupPlanArn,+ backupPlansListMember_backupPlanId,+ backupPlansListMember_backupPlanName,+ backupPlansListMember_creationDate,+ backupPlansListMember_creatorRequestId,+ backupPlansListMember_deletionDate,+ backupPlansListMember_lastExecutionDate,+ backupPlansListMember_versionId,++ -- ** BackupRule+ backupRule_completionWindowMinutes,+ backupRule_copyActions,+ backupRule_enableContinuousBackup,+ backupRule_lifecycle,+ backupRule_recoveryPointTags,+ backupRule_ruleId,+ backupRule_scheduleExpression,+ backupRule_startWindowMinutes,+ backupRule_ruleName,+ backupRule_targetBackupVaultName,++ -- ** BackupRuleInput+ backupRuleInput_completionWindowMinutes,+ backupRuleInput_copyActions,+ backupRuleInput_enableContinuousBackup,+ backupRuleInput_lifecycle,+ backupRuleInput_recoveryPointTags,+ backupRuleInput_scheduleExpression,+ backupRuleInput_startWindowMinutes,+ backupRuleInput_ruleName,+ backupRuleInput_targetBackupVaultName,++ -- ** BackupSelection+ backupSelection_conditions,+ backupSelection_listOfTags,+ backupSelection_notResources,+ backupSelection_resources,+ backupSelection_selectionName,+ backupSelection_iamRoleArn,++ -- ** BackupSelectionsListMember+ backupSelectionsListMember_backupPlanId,+ backupSelectionsListMember_creationDate,+ backupSelectionsListMember_creatorRequestId,+ backupSelectionsListMember_iamRoleArn,+ backupSelectionsListMember_selectionId,+ backupSelectionsListMember_selectionName,++ -- ** BackupVaultListMember+ backupVaultListMember_backupVaultArn,+ backupVaultListMember_backupVaultName,+ backupVaultListMember_creationDate,+ backupVaultListMember_creatorRequestId,+ backupVaultListMember_encryptionKeyArn,+ backupVaultListMember_lockDate,+ backupVaultListMember_locked,+ backupVaultListMember_maxRetentionDays,+ backupVaultListMember_minRetentionDays,+ backupVaultListMember_numberOfRecoveryPoints,++ -- ** CalculatedLifecycle+ calculatedLifecycle_deleteAt,+ calculatedLifecycle_moveToColdStorageAt,++ -- ** Condition+ condition_conditionType,+ condition_conditionKey,+ condition_conditionValue,++ -- ** ConditionParameter+ conditionParameter_conditionKey,+ conditionParameter_conditionValue,++ -- ** Conditions+ conditions_stringEquals,+ conditions_stringLike,+ conditions_stringNotEquals,+ conditions_stringNotLike,++ -- ** ControlInputParameter+ controlInputParameter_parameterName,+ controlInputParameter_parameterValue,++ -- ** ControlScope+ controlScope_complianceResourceIds,+ controlScope_complianceResourceTypes,+ controlScope_tags,++ -- ** CopyAction+ copyAction_lifecycle,+ copyAction_destinationBackupVaultArn,++ -- ** CopyJob+ copyJob_accountId,+ copyJob_backupSizeInBytes,+ copyJob_childJobsInState,+ copyJob_completionDate,+ copyJob_compositeMemberIdentifier,+ copyJob_copyJobId,+ copyJob_createdBy,+ copyJob_creationDate,+ copyJob_destinationBackupVaultArn,+ copyJob_destinationRecoveryPointArn,+ copyJob_iamRoleArn,+ copyJob_isParent,+ copyJob_numberOfChildJobs,+ copyJob_parentJobId,+ copyJob_resourceArn,+ copyJob_resourceType,+ copyJob_sourceBackupVaultArn,+ copyJob_sourceRecoveryPointArn,+ copyJob_state,+ copyJob_statusMessage,++ -- ** DateRange+ dateRange_fromDate,+ dateRange_toDate,++ -- ** Framework+ framework_creationTime,+ framework_deploymentStatus,+ framework_frameworkArn,+ framework_frameworkDescription,+ framework_frameworkName,+ framework_numberOfControls,++ -- ** FrameworkControl+ frameworkControl_controlInputParameters,+ frameworkControl_controlScope,+ frameworkControl_controlName,++ -- ** LegalHold+ legalHold_cancellationDate,+ legalHold_creationDate,+ legalHold_description,+ legalHold_legalHoldArn,+ legalHold_legalHoldId,+ legalHold_status,+ legalHold_title,++ -- ** Lifecycle+ lifecycle_deleteAfterDays,+ lifecycle_moveToColdStorageAfterDays,++ -- ** ProtectedResource+ protectedResource_lastBackupTime,+ protectedResource_resourceArn,+ protectedResource_resourceType,++ -- ** RecoveryPointByBackupVault+ recoveryPointByBackupVault_backupSizeInBytes,+ recoveryPointByBackupVault_backupVaultArn,+ recoveryPointByBackupVault_backupVaultName,+ recoveryPointByBackupVault_calculatedLifecycle,+ recoveryPointByBackupVault_completionDate,+ recoveryPointByBackupVault_compositeMemberIdentifier,+ recoveryPointByBackupVault_createdBy,+ recoveryPointByBackupVault_creationDate,+ recoveryPointByBackupVault_encryptionKeyArn,+ recoveryPointByBackupVault_iamRoleArn,+ recoveryPointByBackupVault_isEncrypted,+ recoveryPointByBackupVault_isParent,+ recoveryPointByBackupVault_lastRestoreTime,+ recoveryPointByBackupVault_lifecycle,+ recoveryPointByBackupVault_parentRecoveryPointArn,+ recoveryPointByBackupVault_recoveryPointArn,+ recoveryPointByBackupVault_resourceArn,+ recoveryPointByBackupVault_resourceType,+ recoveryPointByBackupVault_sourceBackupVaultArn,+ recoveryPointByBackupVault_status,+ recoveryPointByBackupVault_statusMessage,++ -- ** RecoveryPointByResource+ recoveryPointByResource_backupSizeBytes,+ recoveryPointByResource_backupVaultName,+ recoveryPointByResource_creationDate,+ recoveryPointByResource_encryptionKeyArn,+ recoveryPointByResource_isParent,+ recoveryPointByResource_parentRecoveryPointArn,+ recoveryPointByResource_recoveryPointArn,+ recoveryPointByResource_status,+ recoveryPointByResource_statusMessage,++ -- ** RecoveryPointCreator+ recoveryPointCreator_backupPlanArn,+ recoveryPointCreator_backupPlanId,+ recoveryPointCreator_backupPlanVersion,+ recoveryPointCreator_backupRuleId,++ -- ** RecoveryPointMember+ recoveryPointMember_recoveryPointArn,++ -- ** RecoveryPointSelection+ recoveryPointSelection_dateRange,+ recoveryPointSelection_resourceIdentifiers,+ recoveryPointSelection_vaultNames,++ -- ** ReportDeliveryChannel+ reportDeliveryChannel_formats,+ reportDeliveryChannel_s3KeyPrefix,+ reportDeliveryChannel_s3BucketName,++ -- ** ReportDestination+ reportDestination_s3BucketName,+ reportDestination_s3Keys,++ -- ** ReportJob+ reportJob_completionTime,+ reportJob_creationTime,+ reportJob_reportDestination,+ reportJob_reportJobId,+ reportJob_reportPlanArn,+ reportJob_reportTemplate,+ reportJob_status,+ reportJob_statusMessage,++ -- ** ReportPlan+ reportPlan_creationTime,+ reportPlan_deploymentStatus,+ reportPlan_lastAttemptedExecutionTime,+ reportPlan_lastSuccessfulExecutionTime,+ reportPlan_reportDeliveryChannel,+ reportPlan_reportPlanArn,+ reportPlan_reportPlanDescription,+ reportPlan_reportPlanName,+ reportPlan_reportSetting,++ -- ** ReportSetting+ reportSetting_accounts,+ reportSetting_frameworkArns,+ reportSetting_numberOfFrameworks,+ reportSetting_organizationUnits,+ reportSetting_regions,+ reportSetting_reportTemplate,++ -- ** RestoreJobsListMember+ restoreJobsListMember_accountId,+ restoreJobsListMember_backupSizeInBytes,+ restoreJobsListMember_completionDate,+ restoreJobsListMember_createdResourceArn,+ restoreJobsListMember_creationDate,+ restoreJobsListMember_expectedCompletionTimeMinutes,+ restoreJobsListMember_iamRoleArn,+ restoreJobsListMember_percentDone,+ restoreJobsListMember_recoveryPointArn,+ restoreJobsListMember_resourceType,+ restoreJobsListMember_restoreJobId,+ restoreJobsListMember_status,+ restoreJobsListMember_statusMessage,+ )+where++import Amazonka.Backup.CancelLegalHold+import Amazonka.Backup.CreateBackupPlan+import Amazonka.Backup.CreateBackupSelection+import Amazonka.Backup.CreateBackupVault+import Amazonka.Backup.CreateFramework+import Amazonka.Backup.CreateLegalHold+import Amazonka.Backup.CreateReportPlan+import Amazonka.Backup.DeleteBackupPlan+import Amazonka.Backup.DeleteBackupSelection+import Amazonka.Backup.DeleteBackupVault+import Amazonka.Backup.DeleteBackupVaultAccessPolicy+import Amazonka.Backup.DeleteBackupVaultLockConfiguration+import Amazonka.Backup.DeleteBackupVaultNotifications+import Amazonka.Backup.DeleteFramework+import Amazonka.Backup.DeleteRecoveryPoint+import Amazonka.Backup.DeleteReportPlan+import Amazonka.Backup.DescribeBackupJob+import Amazonka.Backup.DescribeBackupVault+import Amazonka.Backup.DescribeCopyJob+import Amazonka.Backup.DescribeFramework+import Amazonka.Backup.DescribeGlobalSettings+import Amazonka.Backup.DescribeProtectedResource+import Amazonka.Backup.DescribeRecoveryPoint+import Amazonka.Backup.DescribeRegionSettings+import Amazonka.Backup.DescribeReportJob+import Amazonka.Backup.DescribeReportPlan+import Amazonka.Backup.DescribeRestoreJob+import Amazonka.Backup.DisassociateRecoveryPoint+import Amazonka.Backup.DisassociateRecoveryPointFromParent+import Amazonka.Backup.ExportBackupPlanTemplate+import Amazonka.Backup.GetBackupPlan+import Amazonka.Backup.GetBackupPlanFromJSON+import Amazonka.Backup.GetBackupPlanFromTemplate+import Amazonka.Backup.GetBackupSelection+import Amazonka.Backup.GetBackupVaultAccessPolicy+import Amazonka.Backup.GetBackupVaultNotifications+import Amazonka.Backup.GetLegalHold+import Amazonka.Backup.GetRecoveryPointRestoreMetadata+import Amazonka.Backup.GetSupportedResourceTypes+import Amazonka.Backup.ListBackupJobs+import Amazonka.Backup.ListBackupPlanTemplates+import Amazonka.Backup.ListBackupPlanVersions+import Amazonka.Backup.ListBackupPlans+import Amazonka.Backup.ListBackupSelections+import Amazonka.Backup.ListBackupVaults+import Amazonka.Backup.ListCopyJobs+import Amazonka.Backup.ListFrameworks+import Amazonka.Backup.ListLegalHolds+import Amazonka.Backup.ListProtectedResources+import Amazonka.Backup.ListRecoveryPointsByBackupVault+import Amazonka.Backup.ListRecoveryPointsByLegalHold+import Amazonka.Backup.ListRecoveryPointsByResource+import Amazonka.Backup.ListReportJobs+import Amazonka.Backup.ListReportPlans+import Amazonka.Backup.ListRestoreJobs+import Amazonka.Backup.ListTags+import Amazonka.Backup.PutBackupVaultAccessPolicy+import Amazonka.Backup.PutBackupVaultLockConfiguration+import Amazonka.Backup.PutBackupVaultNotifications+import Amazonka.Backup.StartBackupJob+import Amazonka.Backup.StartCopyJob+import Amazonka.Backup.StartReportJob+import Amazonka.Backup.StartRestoreJob+import Amazonka.Backup.StopBackupJob+import Amazonka.Backup.TagResource+import Amazonka.Backup.Types.AdvancedBackupSetting+import Amazonka.Backup.Types.BackupJob+import Amazonka.Backup.Types.BackupPlan+import Amazonka.Backup.Types.BackupPlanInput+import Amazonka.Backup.Types.BackupPlanTemplatesListMember+import Amazonka.Backup.Types.BackupPlansListMember+import Amazonka.Backup.Types.BackupRule+import Amazonka.Backup.Types.BackupRuleInput+import Amazonka.Backup.Types.BackupSelection+import Amazonka.Backup.Types.BackupSelectionsListMember+import Amazonka.Backup.Types.BackupVaultListMember+import Amazonka.Backup.Types.CalculatedLifecycle+import Amazonka.Backup.Types.Condition+import Amazonka.Backup.Types.ConditionParameter+import Amazonka.Backup.Types.Conditions+import Amazonka.Backup.Types.ControlInputParameter+import Amazonka.Backup.Types.ControlScope+import Amazonka.Backup.Types.CopyAction+import Amazonka.Backup.Types.CopyJob+import Amazonka.Backup.Types.DateRange+import Amazonka.Backup.Types.Framework+import Amazonka.Backup.Types.FrameworkControl+import Amazonka.Backup.Types.LegalHold+import Amazonka.Backup.Types.Lifecycle+import Amazonka.Backup.Types.ProtectedResource+import Amazonka.Backup.Types.RecoveryPointByBackupVault+import Amazonka.Backup.Types.RecoveryPointByResource+import Amazonka.Backup.Types.RecoveryPointCreator+import Amazonka.Backup.Types.RecoveryPointMember+import Amazonka.Backup.Types.RecoveryPointSelection+import Amazonka.Backup.Types.ReportDeliveryChannel+import Amazonka.Backup.Types.ReportDestination+import Amazonka.Backup.Types.ReportJob+import Amazonka.Backup.Types.ReportPlan+import Amazonka.Backup.Types.ReportSetting+import Amazonka.Backup.Types.RestoreJobsListMember+import Amazonka.Backup.UntagResource+import Amazonka.Backup.UpdateBackupPlan+import Amazonka.Backup.UpdateFramework+import Amazonka.Backup.UpdateGlobalSettings+import Amazonka.Backup.UpdateRecoveryPointLifecycle+import Amazonka.Backup.UpdateRegionSettings+import Amazonka.Backup.UpdateReportPlan
+ gen/Amazonka/Backup/ListBackupJobs.hs view
@@ -0,0 +1,469 @@+{-# 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.Backup.ListBackupJobs+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of existing backup jobs for an authenticated account for+-- the last 30 days. For a longer period of time, consider using these+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html monitoring tools>.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListBackupJobs+ ( -- * Creating a Request+ ListBackupJobs (..),+ newListBackupJobs,++ -- * Request Lenses+ listBackupJobs_byAccountId,+ listBackupJobs_byBackupVaultName,+ listBackupJobs_byCompleteAfter,+ listBackupJobs_byCompleteBefore,+ listBackupJobs_byCreatedAfter,+ listBackupJobs_byCreatedBefore,+ listBackupJobs_byParentJobId,+ listBackupJobs_byResourceArn,+ listBackupJobs_byResourceType,+ listBackupJobs_byState,+ listBackupJobs_maxResults,+ listBackupJobs_nextToken,++ -- * Destructuring the Response+ ListBackupJobsResponse (..),+ newListBackupJobsResponse,++ -- * Response Lenses+ listBackupJobsResponse_backupJobs,+ listBackupJobsResponse_nextToken,+ listBackupJobsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListBackupJobs' smart constructor.+data ListBackupJobs = ListBackupJobs'+ { -- | The account ID to list the jobs from. Returns only backup jobs+ -- associated with the specified account ID.+ --+ -- If used from an Organizations management account, passing @*@ returns+ -- all jobs across the organization.+ byAccountId :: Prelude.Maybe Prelude.Text,+ -- | Returns only backup jobs that will be stored in the specified backup+ -- vault. Backup vaults are identified by names that are unique to the+ -- account used to create them and the Amazon Web Services Region where+ -- they are created. They consist of lowercase letters, numbers, and+ -- hyphens.+ byBackupVaultName :: Prelude.Maybe Prelude.Text,+ -- | Returns only backup jobs completed after a date expressed in Unix format+ -- and Coordinated Universal Time (UTC).+ byCompleteAfter :: Prelude.Maybe Data.POSIX,+ -- | Returns only backup jobs completed before a date expressed in Unix+ -- format and Coordinated Universal Time (UTC).+ byCompleteBefore :: Prelude.Maybe Data.POSIX,+ -- | Returns only backup jobs that were created after the specified date.+ byCreatedAfter :: Prelude.Maybe Data.POSIX,+ -- | Returns only backup jobs that were created before the specified date.+ byCreatedBefore :: Prelude.Maybe Data.POSIX,+ -- | This is a filter to list child (nested) jobs based on parent job ID.+ byParentJobId :: Prelude.Maybe Prelude.Text,+ -- | Returns only backup jobs that match the specified resource Amazon+ -- Resource Name (ARN).+ byResourceArn :: Prelude.Maybe Prelude.Text,+ -- | Returns only backup jobs for the specified resources:+ --+ -- - @Aurora@ for Amazon Aurora+ --+ -- - @DocumentDB@ for Amazon DocumentDB (with MongoDB compatibility)+ --+ -- - @DynamoDB@ for Amazon DynamoDB+ --+ -- - @EBS@ for Amazon Elastic Block Store+ --+ -- - @EC2@ for Amazon Elastic Compute Cloud+ --+ -- - @EFS@ for Amazon Elastic File System+ --+ -- - @FSx@ for Amazon FSx+ --+ -- - @Neptune@ for Amazon Neptune+ --+ -- - @RDS@ for Amazon Relational Database Service+ --+ -- - @Storage Gateway@ for Storage Gateway+ --+ -- - @S3@ for Amazon S3+ --+ -- - @VirtualMachine@ for virtual machines+ byResourceType :: Prelude.Maybe Prelude.Text,+ -- | Returns only backup jobs that are in the specified state.+ byState :: Prelude.Maybe BackupJobState,+ -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupJobs' 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:+--+-- 'byAccountId', 'listBackupJobs_byAccountId' - The account ID to list the jobs from. Returns only backup jobs+-- associated with the specified account ID.+--+-- If used from an Organizations management account, passing @*@ returns+-- all jobs across the organization.+--+-- 'byBackupVaultName', 'listBackupJobs_byBackupVaultName' - Returns only backup jobs that will be stored in the specified backup+-- vault. Backup vaults are identified by names that are unique to the+-- account used to create them and the Amazon Web Services Region where+-- they are created. They consist of lowercase letters, numbers, and+-- hyphens.+--+-- 'byCompleteAfter', 'listBackupJobs_byCompleteAfter' - Returns only backup jobs completed after a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+--+-- 'byCompleteBefore', 'listBackupJobs_byCompleteBefore' - Returns only backup jobs completed before a date expressed in Unix+-- format and Coordinated Universal Time (UTC).+--+-- 'byCreatedAfter', 'listBackupJobs_byCreatedAfter' - Returns only backup jobs that were created after the specified date.+--+-- 'byCreatedBefore', 'listBackupJobs_byCreatedBefore' - Returns only backup jobs that were created before the specified date.+--+-- 'byParentJobId', 'listBackupJobs_byParentJobId' - This is a filter to list child (nested) jobs based on parent job ID.+--+-- 'byResourceArn', 'listBackupJobs_byResourceArn' - Returns only backup jobs that match the specified resource Amazon+-- Resource Name (ARN).+--+-- 'byResourceType', 'listBackupJobs_byResourceType' - Returns only backup jobs for the specified resources:+--+-- - @Aurora@ for Amazon Aurora+--+-- - @DocumentDB@ for Amazon DocumentDB (with MongoDB compatibility)+--+-- - @DynamoDB@ for Amazon DynamoDB+--+-- - @EBS@ for Amazon Elastic Block Store+--+-- - @EC2@ for Amazon Elastic Compute Cloud+--+-- - @EFS@ for Amazon Elastic File System+--+-- - @FSx@ for Amazon FSx+--+-- - @Neptune@ for Amazon Neptune+--+-- - @RDS@ for Amazon Relational Database Service+--+-- - @Storage Gateway@ for Storage Gateway+--+-- - @S3@ for Amazon S3+--+-- - @VirtualMachine@ for virtual machines+--+-- 'byState', 'listBackupJobs_byState' - Returns only backup jobs that are in the specified state.+--+-- 'maxResults', 'listBackupJobs_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listBackupJobs_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+newListBackupJobs ::+ ListBackupJobs+newListBackupJobs =+ ListBackupJobs'+ { byAccountId = Prelude.Nothing,+ byBackupVaultName = Prelude.Nothing,+ byCompleteAfter = Prelude.Nothing,+ byCompleteBefore = Prelude.Nothing,+ byCreatedAfter = Prelude.Nothing,+ byCreatedBefore = Prelude.Nothing,+ byParentJobId = Prelude.Nothing,+ byResourceArn = Prelude.Nothing,+ byResourceType = Prelude.Nothing,+ byState = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The account ID to list the jobs from. Returns only backup jobs+-- associated with the specified account ID.+--+-- If used from an Organizations management account, passing @*@ returns+-- all jobs across the organization.+listBackupJobs_byAccountId :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.Text)+listBackupJobs_byAccountId = Lens.lens (\ListBackupJobs' {byAccountId} -> byAccountId) (\s@ListBackupJobs' {} a -> s {byAccountId = a} :: ListBackupJobs)++-- | Returns only backup jobs that will be stored in the specified backup+-- vault. Backup vaults are identified by names that are unique to the+-- account used to create them and the Amazon Web Services Region where+-- they are created. They consist of lowercase letters, numbers, and+-- hyphens.+listBackupJobs_byBackupVaultName :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.Text)+listBackupJobs_byBackupVaultName = Lens.lens (\ListBackupJobs' {byBackupVaultName} -> byBackupVaultName) (\s@ListBackupJobs' {} a -> s {byBackupVaultName = a} :: ListBackupJobs)++-- | Returns only backup jobs completed after a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+listBackupJobs_byCompleteAfter :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.UTCTime)+listBackupJobs_byCompleteAfter = Lens.lens (\ListBackupJobs' {byCompleteAfter} -> byCompleteAfter) (\s@ListBackupJobs' {} a -> s {byCompleteAfter = a} :: ListBackupJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only backup jobs completed before a date expressed in Unix+-- format and Coordinated Universal Time (UTC).+listBackupJobs_byCompleteBefore :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.UTCTime)+listBackupJobs_byCompleteBefore = Lens.lens (\ListBackupJobs' {byCompleteBefore} -> byCompleteBefore) (\s@ListBackupJobs' {} a -> s {byCompleteBefore = a} :: ListBackupJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only backup jobs that were created after the specified date.+listBackupJobs_byCreatedAfter :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.UTCTime)+listBackupJobs_byCreatedAfter = Lens.lens (\ListBackupJobs' {byCreatedAfter} -> byCreatedAfter) (\s@ListBackupJobs' {} a -> s {byCreatedAfter = a} :: ListBackupJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only backup jobs that were created before the specified date.+listBackupJobs_byCreatedBefore :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.UTCTime)+listBackupJobs_byCreatedBefore = Lens.lens (\ListBackupJobs' {byCreatedBefore} -> byCreatedBefore) (\s@ListBackupJobs' {} a -> s {byCreatedBefore = a} :: ListBackupJobs) Prelude.. Lens.mapping Data._Time++-- | This is a filter to list child (nested) jobs based on parent job ID.+listBackupJobs_byParentJobId :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.Text)+listBackupJobs_byParentJobId = Lens.lens (\ListBackupJobs' {byParentJobId} -> byParentJobId) (\s@ListBackupJobs' {} a -> s {byParentJobId = a} :: ListBackupJobs)++-- | Returns only backup jobs that match the specified resource Amazon+-- Resource Name (ARN).+listBackupJobs_byResourceArn :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.Text)+listBackupJobs_byResourceArn = Lens.lens (\ListBackupJobs' {byResourceArn} -> byResourceArn) (\s@ListBackupJobs' {} a -> s {byResourceArn = a} :: ListBackupJobs)++-- | Returns only backup jobs for the specified resources:+--+-- - @Aurora@ for Amazon Aurora+--+-- - @DocumentDB@ for Amazon DocumentDB (with MongoDB compatibility)+--+-- - @DynamoDB@ for Amazon DynamoDB+--+-- - @EBS@ for Amazon Elastic Block Store+--+-- - @EC2@ for Amazon Elastic Compute Cloud+--+-- - @EFS@ for Amazon Elastic File System+--+-- - @FSx@ for Amazon FSx+--+-- - @Neptune@ for Amazon Neptune+--+-- - @RDS@ for Amazon Relational Database Service+--+-- - @Storage Gateway@ for Storage Gateway+--+-- - @S3@ for Amazon S3+--+-- - @VirtualMachine@ for virtual machines+listBackupJobs_byResourceType :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.Text)+listBackupJobs_byResourceType = Lens.lens (\ListBackupJobs' {byResourceType} -> byResourceType) (\s@ListBackupJobs' {} a -> s {byResourceType = a} :: ListBackupJobs)++-- | Returns only backup jobs that are in the specified state.+listBackupJobs_byState :: Lens.Lens' ListBackupJobs (Prelude.Maybe BackupJobState)+listBackupJobs_byState = Lens.lens (\ListBackupJobs' {byState} -> byState) (\s@ListBackupJobs' {} a -> s {byState = a} :: ListBackupJobs)++-- | The maximum number of items to be returned.+listBackupJobs_maxResults :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.Natural)+listBackupJobs_maxResults = Lens.lens (\ListBackupJobs' {maxResults} -> maxResults) (\s@ListBackupJobs' {} a -> s {maxResults = a} :: ListBackupJobs)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupJobs_nextToken :: Lens.Lens' ListBackupJobs (Prelude.Maybe Prelude.Text)+listBackupJobs_nextToken = Lens.lens (\ListBackupJobs' {nextToken} -> nextToken) (\s@ListBackupJobs' {} a -> s {nextToken = a} :: ListBackupJobs)++instance Core.AWSPager ListBackupJobs where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listBackupJobsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listBackupJobsResponse_backupJobs+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listBackupJobs_nextToken+ Lens..~ rs+ Lens.^? listBackupJobsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListBackupJobs where+ type+ AWSResponse ListBackupJobs =+ ListBackupJobsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListBackupJobsResponse'+ Prelude.<$> (x Data..?> "BackupJobs" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListBackupJobs where+ hashWithSalt _salt ListBackupJobs' {..} =+ _salt+ `Prelude.hashWithSalt` byAccountId+ `Prelude.hashWithSalt` byBackupVaultName+ `Prelude.hashWithSalt` byCompleteAfter+ `Prelude.hashWithSalt` byCompleteBefore+ `Prelude.hashWithSalt` byCreatedAfter+ `Prelude.hashWithSalt` byCreatedBefore+ `Prelude.hashWithSalt` byParentJobId+ `Prelude.hashWithSalt` byResourceArn+ `Prelude.hashWithSalt` byResourceType+ `Prelude.hashWithSalt` byState+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListBackupJobs where+ rnf ListBackupJobs' {..} =+ Prelude.rnf byAccountId+ `Prelude.seq` Prelude.rnf byBackupVaultName+ `Prelude.seq` Prelude.rnf byCompleteAfter+ `Prelude.seq` Prelude.rnf byCompleteBefore+ `Prelude.seq` Prelude.rnf byCreatedAfter+ `Prelude.seq` Prelude.rnf byCreatedBefore+ `Prelude.seq` Prelude.rnf byParentJobId+ `Prelude.seq` Prelude.rnf byResourceArn+ `Prelude.seq` Prelude.rnf byResourceType+ `Prelude.seq` Prelude.rnf byState+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListBackupJobs where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListBackupJobs where+ toPath = Prelude.const "/backup-jobs/"++instance Data.ToQuery ListBackupJobs where+ toQuery ListBackupJobs' {..} =+ Prelude.mconcat+ [ "accountId" Data.=: byAccountId,+ "backupVaultName" Data.=: byBackupVaultName,+ "completeAfter" Data.=: byCompleteAfter,+ "completeBefore" Data.=: byCompleteBefore,+ "createdAfter" Data.=: byCreatedAfter,+ "createdBefore" Data.=: byCreatedBefore,+ "parentJobId" Data.=: byParentJobId,+ "resourceArn" Data.=: byResourceArn,+ "resourceType" Data.=: byResourceType,+ "state" Data.=: byState,+ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListBackupJobsResponse' smart constructor.+data ListBackupJobsResponse = ListBackupJobsResponse'+ { -- | An array of structures containing metadata about your backup jobs+ -- returned in JSON format.+ backupJobs :: Prelude.Maybe [BackupJob],+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupJobsResponse' 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:+--+-- 'backupJobs', 'listBackupJobsResponse_backupJobs' - An array of structures containing metadata about your backup jobs+-- returned in JSON format.+--+-- 'nextToken', 'listBackupJobsResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'httpStatus', 'listBackupJobsResponse_httpStatus' - The response's http status code.+newListBackupJobsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListBackupJobsResponse+newListBackupJobsResponse pHttpStatus_ =+ ListBackupJobsResponse'+ { backupJobs =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of structures containing metadata about your backup jobs+-- returned in JSON format.+listBackupJobsResponse_backupJobs :: Lens.Lens' ListBackupJobsResponse (Prelude.Maybe [BackupJob])+listBackupJobsResponse_backupJobs = Lens.lens (\ListBackupJobsResponse' {backupJobs} -> backupJobs) (\s@ListBackupJobsResponse' {} a -> s {backupJobs = a} :: ListBackupJobsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupJobsResponse_nextToken :: Lens.Lens' ListBackupJobsResponse (Prelude.Maybe Prelude.Text)+listBackupJobsResponse_nextToken = Lens.lens (\ListBackupJobsResponse' {nextToken} -> nextToken) (\s@ListBackupJobsResponse' {} a -> s {nextToken = a} :: ListBackupJobsResponse)++-- | The response's http status code.+listBackupJobsResponse_httpStatus :: Lens.Lens' ListBackupJobsResponse Prelude.Int+listBackupJobsResponse_httpStatus = Lens.lens (\ListBackupJobsResponse' {httpStatus} -> httpStatus) (\s@ListBackupJobsResponse' {} a -> s {httpStatus = a} :: ListBackupJobsResponse)++instance Prelude.NFData ListBackupJobsResponse where+ rnf ListBackupJobsResponse' {..} =+ Prelude.rnf backupJobs+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListBackupPlanTemplates.hs view
@@ -0,0 +1,240 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.ListBackupPlanTemplates+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns metadata of your saved backup plan templates, including the+-- template ID, name, and the creation and deletion dates.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListBackupPlanTemplates+ ( -- * Creating a Request+ ListBackupPlanTemplates (..),+ newListBackupPlanTemplates,++ -- * Request Lenses+ listBackupPlanTemplates_maxResults,+ listBackupPlanTemplates_nextToken,++ -- * Destructuring the Response+ ListBackupPlanTemplatesResponse (..),+ newListBackupPlanTemplatesResponse,++ -- * Response Lenses+ listBackupPlanTemplatesResponse_backupPlanTemplatesList,+ listBackupPlanTemplatesResponse_nextToken,+ listBackupPlanTemplatesResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListBackupPlanTemplates' smart constructor.+data ListBackupPlanTemplates = ListBackupPlanTemplates'+ { -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupPlanTemplates' 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', 'listBackupPlanTemplates_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listBackupPlanTemplates_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+newListBackupPlanTemplates ::+ ListBackupPlanTemplates+newListBackupPlanTemplates =+ ListBackupPlanTemplates'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of items to be returned.+listBackupPlanTemplates_maxResults :: Lens.Lens' ListBackupPlanTemplates (Prelude.Maybe Prelude.Natural)+listBackupPlanTemplates_maxResults = Lens.lens (\ListBackupPlanTemplates' {maxResults} -> maxResults) (\s@ListBackupPlanTemplates' {} a -> s {maxResults = a} :: ListBackupPlanTemplates)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupPlanTemplates_nextToken :: Lens.Lens' ListBackupPlanTemplates (Prelude.Maybe Prelude.Text)+listBackupPlanTemplates_nextToken = Lens.lens (\ListBackupPlanTemplates' {nextToken} -> nextToken) (\s@ListBackupPlanTemplates' {} a -> s {nextToken = a} :: ListBackupPlanTemplates)++instance Core.AWSPager ListBackupPlanTemplates where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listBackupPlanTemplatesResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listBackupPlanTemplatesResponse_backupPlanTemplatesList+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listBackupPlanTemplates_nextToken+ Lens..~ rs+ Lens.^? listBackupPlanTemplatesResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListBackupPlanTemplates where+ type+ AWSResponse ListBackupPlanTemplates =+ ListBackupPlanTemplatesResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListBackupPlanTemplatesResponse'+ Prelude.<$> ( x+ Data..?> "BackupPlanTemplatesList"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListBackupPlanTemplates where+ hashWithSalt _salt ListBackupPlanTemplates' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListBackupPlanTemplates where+ rnf ListBackupPlanTemplates' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListBackupPlanTemplates where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListBackupPlanTemplates where+ toPath = Prelude.const "/backup/template/plans"++instance Data.ToQuery ListBackupPlanTemplates where+ toQuery ListBackupPlanTemplates' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListBackupPlanTemplatesResponse' smart constructor.+data ListBackupPlanTemplatesResponse = ListBackupPlanTemplatesResponse'+ { -- | An array of template list items containing metadata about your saved+ -- templates.+ backupPlanTemplatesList :: Prelude.Maybe [BackupPlanTemplatesListMember],+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupPlanTemplatesResponse' 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:+--+-- 'backupPlanTemplatesList', 'listBackupPlanTemplatesResponse_backupPlanTemplatesList' - An array of template list items containing metadata about your saved+-- templates.+--+-- 'nextToken', 'listBackupPlanTemplatesResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'httpStatus', 'listBackupPlanTemplatesResponse_httpStatus' - The response's http status code.+newListBackupPlanTemplatesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListBackupPlanTemplatesResponse+newListBackupPlanTemplatesResponse pHttpStatus_ =+ ListBackupPlanTemplatesResponse'+ { backupPlanTemplatesList =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of template list items containing metadata about your saved+-- templates.+listBackupPlanTemplatesResponse_backupPlanTemplatesList :: Lens.Lens' ListBackupPlanTemplatesResponse (Prelude.Maybe [BackupPlanTemplatesListMember])+listBackupPlanTemplatesResponse_backupPlanTemplatesList = Lens.lens (\ListBackupPlanTemplatesResponse' {backupPlanTemplatesList} -> backupPlanTemplatesList) (\s@ListBackupPlanTemplatesResponse' {} a -> s {backupPlanTemplatesList = a} :: ListBackupPlanTemplatesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupPlanTemplatesResponse_nextToken :: Lens.Lens' ListBackupPlanTemplatesResponse (Prelude.Maybe Prelude.Text)+listBackupPlanTemplatesResponse_nextToken = Lens.lens (\ListBackupPlanTemplatesResponse' {nextToken} -> nextToken) (\s@ListBackupPlanTemplatesResponse' {} a -> s {nextToken = a} :: ListBackupPlanTemplatesResponse)++-- | The response's http status code.+listBackupPlanTemplatesResponse_httpStatus :: Lens.Lens' ListBackupPlanTemplatesResponse Prelude.Int+listBackupPlanTemplatesResponse_httpStatus = Lens.lens (\ListBackupPlanTemplatesResponse' {httpStatus} -> httpStatus) (\s@ListBackupPlanTemplatesResponse' {} a -> s {httpStatus = a} :: ListBackupPlanTemplatesResponse)++instance+ Prelude.NFData+ ListBackupPlanTemplatesResponse+ where+ rnf ListBackupPlanTemplatesResponse' {..} =+ Prelude.rnf backupPlanTemplatesList+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListBackupPlanVersions.hs view
@@ -0,0 +1,260 @@+{-# 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.Backup.ListBackupPlanVersions+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns version metadata of your backup plans, including Amazon Resource+-- Names (ARNs), backup plan IDs, creation and deletion dates, plan names,+-- and version IDs.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListBackupPlanVersions+ ( -- * Creating a Request+ ListBackupPlanVersions (..),+ newListBackupPlanVersions,++ -- * Request Lenses+ listBackupPlanVersions_maxResults,+ listBackupPlanVersions_nextToken,+ listBackupPlanVersions_backupPlanId,++ -- * Destructuring the Response+ ListBackupPlanVersionsResponse (..),+ newListBackupPlanVersionsResponse,++ -- * Response Lenses+ listBackupPlanVersionsResponse_backupPlanVersionsList,+ listBackupPlanVersionsResponse_nextToken,+ listBackupPlanVersionsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListBackupPlanVersions' smart constructor.+data ListBackupPlanVersions = ListBackupPlanVersions'+ { -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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,+ -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListBackupPlanVersions' 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', 'listBackupPlanVersions_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listBackupPlanVersions_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'backupPlanId', 'listBackupPlanVersions_backupPlanId' - Uniquely identifies a backup plan.+newListBackupPlanVersions ::+ -- | 'backupPlanId'+ Prelude.Text ->+ ListBackupPlanVersions+newListBackupPlanVersions pBackupPlanId_ =+ ListBackupPlanVersions'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ backupPlanId = pBackupPlanId_+ }++-- | The maximum number of items to be returned.+listBackupPlanVersions_maxResults :: Lens.Lens' ListBackupPlanVersions (Prelude.Maybe Prelude.Natural)+listBackupPlanVersions_maxResults = Lens.lens (\ListBackupPlanVersions' {maxResults} -> maxResults) (\s@ListBackupPlanVersions' {} a -> s {maxResults = a} :: ListBackupPlanVersions)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupPlanVersions_nextToken :: Lens.Lens' ListBackupPlanVersions (Prelude.Maybe Prelude.Text)+listBackupPlanVersions_nextToken = Lens.lens (\ListBackupPlanVersions' {nextToken} -> nextToken) (\s@ListBackupPlanVersions' {} a -> s {nextToken = a} :: ListBackupPlanVersions)++-- | Uniquely identifies a backup plan.+listBackupPlanVersions_backupPlanId :: Lens.Lens' ListBackupPlanVersions Prelude.Text+listBackupPlanVersions_backupPlanId = Lens.lens (\ListBackupPlanVersions' {backupPlanId} -> backupPlanId) (\s@ListBackupPlanVersions' {} a -> s {backupPlanId = a} :: ListBackupPlanVersions)++instance Core.AWSPager ListBackupPlanVersions where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listBackupPlanVersionsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listBackupPlanVersionsResponse_backupPlanVersionsList+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listBackupPlanVersions_nextToken+ Lens..~ rs+ Lens.^? listBackupPlanVersionsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListBackupPlanVersions where+ type+ AWSResponse ListBackupPlanVersions =+ ListBackupPlanVersionsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListBackupPlanVersionsResponse'+ Prelude.<$> ( x+ Data..?> "BackupPlanVersionsList"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListBackupPlanVersions where+ hashWithSalt _salt ListBackupPlanVersions' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` backupPlanId++instance Prelude.NFData ListBackupPlanVersions where+ rnf ListBackupPlanVersions' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf backupPlanId++instance Data.ToHeaders ListBackupPlanVersions where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListBackupPlanVersions where+ toPath ListBackupPlanVersions' {..} =+ Prelude.mconcat+ [ "/backup/plans/",+ Data.toBS backupPlanId,+ "/versions/"+ ]++instance Data.ToQuery ListBackupPlanVersions where+ toQuery ListBackupPlanVersions' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListBackupPlanVersionsResponse' smart constructor.+data ListBackupPlanVersionsResponse = ListBackupPlanVersionsResponse'+ { -- | An array of version list items containing metadata about your backup+ -- plans.+ backupPlanVersionsList :: Prelude.Maybe [BackupPlansListMember],+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupPlanVersionsResponse' 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:+--+-- 'backupPlanVersionsList', 'listBackupPlanVersionsResponse_backupPlanVersionsList' - An array of version list items containing metadata about your backup+-- plans.+--+-- 'nextToken', 'listBackupPlanVersionsResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'httpStatus', 'listBackupPlanVersionsResponse_httpStatus' - The response's http status code.+newListBackupPlanVersionsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListBackupPlanVersionsResponse+newListBackupPlanVersionsResponse pHttpStatus_ =+ ListBackupPlanVersionsResponse'+ { backupPlanVersionsList =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of version list items containing metadata about your backup+-- plans.+listBackupPlanVersionsResponse_backupPlanVersionsList :: Lens.Lens' ListBackupPlanVersionsResponse (Prelude.Maybe [BackupPlansListMember])+listBackupPlanVersionsResponse_backupPlanVersionsList = Lens.lens (\ListBackupPlanVersionsResponse' {backupPlanVersionsList} -> backupPlanVersionsList) (\s@ListBackupPlanVersionsResponse' {} a -> s {backupPlanVersionsList = a} :: ListBackupPlanVersionsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupPlanVersionsResponse_nextToken :: Lens.Lens' ListBackupPlanVersionsResponse (Prelude.Maybe Prelude.Text)+listBackupPlanVersionsResponse_nextToken = Lens.lens (\ListBackupPlanVersionsResponse' {nextToken} -> nextToken) (\s@ListBackupPlanVersionsResponse' {} a -> s {nextToken = a} :: ListBackupPlanVersionsResponse)++-- | The response's http status code.+listBackupPlanVersionsResponse_httpStatus :: Lens.Lens' ListBackupPlanVersionsResponse Prelude.Int+listBackupPlanVersionsResponse_httpStatus = Lens.lens (\ListBackupPlanVersionsResponse' {httpStatus} -> httpStatus) (\s@ListBackupPlanVersionsResponse' {} a -> s {httpStatus = a} :: ListBackupPlanVersionsResponse)++instance+ Prelude.NFData+ ListBackupPlanVersionsResponse+ where+ rnf ListBackupPlanVersionsResponse' {..} =+ Prelude.rnf backupPlanVersionsList+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListBackupPlans.hs view
@@ -0,0 +1,254 @@+{-# 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.Backup.ListBackupPlans+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of all active backup plans for an authenticated account.+-- The list contains information such as Amazon Resource Names (ARNs), plan+-- IDs, creation and deletion dates, version IDs, plan names, and creator+-- request IDs.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListBackupPlans+ ( -- * Creating a Request+ ListBackupPlans (..),+ newListBackupPlans,++ -- * Request Lenses+ listBackupPlans_includeDeleted,+ listBackupPlans_maxResults,+ listBackupPlans_nextToken,++ -- * Destructuring the Response+ ListBackupPlansResponse (..),+ newListBackupPlansResponse,++ -- * Response Lenses+ listBackupPlansResponse_backupPlansList,+ listBackupPlansResponse_nextToken,+ listBackupPlansResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListBackupPlans' smart constructor.+data ListBackupPlans = ListBackupPlans'+ { -- | A Boolean value with a default value of @FALSE@ that returns deleted+ -- backup plans when set to @TRUE@.+ includeDeleted :: Prelude.Maybe Prelude.Bool,+ -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupPlans' 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:+--+-- 'includeDeleted', 'listBackupPlans_includeDeleted' - A Boolean value with a default value of @FALSE@ that returns deleted+-- backup plans when set to @TRUE@.+--+-- 'maxResults', 'listBackupPlans_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listBackupPlans_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+newListBackupPlans ::+ ListBackupPlans+newListBackupPlans =+ ListBackupPlans'+ { includeDeleted = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | A Boolean value with a default value of @FALSE@ that returns deleted+-- backup plans when set to @TRUE@.+listBackupPlans_includeDeleted :: Lens.Lens' ListBackupPlans (Prelude.Maybe Prelude.Bool)+listBackupPlans_includeDeleted = Lens.lens (\ListBackupPlans' {includeDeleted} -> includeDeleted) (\s@ListBackupPlans' {} a -> s {includeDeleted = a} :: ListBackupPlans)++-- | The maximum number of items to be returned.+listBackupPlans_maxResults :: Lens.Lens' ListBackupPlans (Prelude.Maybe Prelude.Natural)+listBackupPlans_maxResults = Lens.lens (\ListBackupPlans' {maxResults} -> maxResults) (\s@ListBackupPlans' {} a -> s {maxResults = a} :: ListBackupPlans)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupPlans_nextToken :: Lens.Lens' ListBackupPlans (Prelude.Maybe Prelude.Text)+listBackupPlans_nextToken = Lens.lens (\ListBackupPlans' {nextToken} -> nextToken) (\s@ListBackupPlans' {} a -> s {nextToken = a} :: ListBackupPlans)++instance Core.AWSPager ListBackupPlans where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listBackupPlansResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listBackupPlansResponse_backupPlansList+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listBackupPlans_nextToken+ Lens..~ rs+ Lens.^? listBackupPlansResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListBackupPlans where+ type+ AWSResponse ListBackupPlans =+ ListBackupPlansResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListBackupPlansResponse'+ Prelude.<$> ( x+ Data..?> "BackupPlansList"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListBackupPlans where+ hashWithSalt _salt ListBackupPlans' {..} =+ _salt+ `Prelude.hashWithSalt` includeDeleted+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListBackupPlans where+ rnf ListBackupPlans' {..} =+ Prelude.rnf includeDeleted+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListBackupPlans where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListBackupPlans where+ toPath = Prelude.const "/backup/plans/"++instance Data.ToQuery ListBackupPlans where+ toQuery ListBackupPlans' {..} =+ Prelude.mconcat+ [ "includeDeleted" Data.=: includeDeleted,+ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListBackupPlansResponse' smart constructor.+data ListBackupPlansResponse = ListBackupPlansResponse'+ { -- | An array of backup plan list items containing metadata about your saved+ -- backup plans.+ backupPlansList :: Prelude.Maybe [BackupPlansListMember],+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupPlansResponse' 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:+--+-- 'backupPlansList', 'listBackupPlansResponse_backupPlansList' - An array of backup plan list items containing metadata about your saved+-- backup plans.+--+-- 'nextToken', 'listBackupPlansResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'httpStatus', 'listBackupPlansResponse_httpStatus' - The response's http status code.+newListBackupPlansResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListBackupPlansResponse+newListBackupPlansResponse pHttpStatus_ =+ ListBackupPlansResponse'+ { backupPlansList =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of backup plan list items containing metadata about your saved+-- backup plans.+listBackupPlansResponse_backupPlansList :: Lens.Lens' ListBackupPlansResponse (Prelude.Maybe [BackupPlansListMember])+listBackupPlansResponse_backupPlansList = Lens.lens (\ListBackupPlansResponse' {backupPlansList} -> backupPlansList) (\s@ListBackupPlansResponse' {} a -> s {backupPlansList = a} :: ListBackupPlansResponse) Prelude.. Lens.mapping Lens.coerced++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupPlansResponse_nextToken :: Lens.Lens' ListBackupPlansResponse (Prelude.Maybe Prelude.Text)+listBackupPlansResponse_nextToken = Lens.lens (\ListBackupPlansResponse' {nextToken} -> nextToken) (\s@ListBackupPlansResponse' {} a -> s {nextToken = a} :: ListBackupPlansResponse)++-- | The response's http status code.+listBackupPlansResponse_httpStatus :: Lens.Lens' ListBackupPlansResponse Prelude.Int+listBackupPlansResponse_httpStatus = Lens.lens (\ListBackupPlansResponse' {httpStatus} -> httpStatus) (\s@ListBackupPlansResponse' {} a -> s {httpStatus = a} :: ListBackupPlansResponse)++instance Prelude.NFData ListBackupPlansResponse where+ rnf ListBackupPlansResponse' {..} =+ Prelude.rnf backupPlansList+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListBackupSelections.hs view
@@ -0,0 +1,255 @@+{-# 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.Backup.ListBackupSelections+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an array containing metadata of the resources associated with+-- the target backup plan.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListBackupSelections+ ( -- * Creating a Request+ ListBackupSelections (..),+ newListBackupSelections,++ -- * Request Lenses+ listBackupSelections_maxResults,+ listBackupSelections_nextToken,+ listBackupSelections_backupPlanId,++ -- * Destructuring the Response+ ListBackupSelectionsResponse (..),+ newListBackupSelectionsResponse,++ -- * Response Lenses+ listBackupSelectionsResponse_backupSelectionsList,+ listBackupSelectionsResponse_nextToken,+ listBackupSelectionsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListBackupSelections' smart constructor.+data ListBackupSelections = ListBackupSelections'+ { -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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,+ -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListBackupSelections' 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', 'listBackupSelections_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listBackupSelections_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'backupPlanId', 'listBackupSelections_backupPlanId' - Uniquely identifies a backup plan.+newListBackupSelections ::+ -- | 'backupPlanId'+ Prelude.Text ->+ ListBackupSelections+newListBackupSelections pBackupPlanId_ =+ ListBackupSelections'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ backupPlanId = pBackupPlanId_+ }++-- | The maximum number of items to be returned.+listBackupSelections_maxResults :: Lens.Lens' ListBackupSelections (Prelude.Maybe Prelude.Natural)+listBackupSelections_maxResults = Lens.lens (\ListBackupSelections' {maxResults} -> maxResults) (\s@ListBackupSelections' {} a -> s {maxResults = a} :: ListBackupSelections)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupSelections_nextToken :: Lens.Lens' ListBackupSelections (Prelude.Maybe Prelude.Text)+listBackupSelections_nextToken = Lens.lens (\ListBackupSelections' {nextToken} -> nextToken) (\s@ListBackupSelections' {} a -> s {nextToken = a} :: ListBackupSelections)++-- | Uniquely identifies a backup plan.+listBackupSelections_backupPlanId :: Lens.Lens' ListBackupSelections Prelude.Text+listBackupSelections_backupPlanId = Lens.lens (\ListBackupSelections' {backupPlanId} -> backupPlanId) (\s@ListBackupSelections' {} a -> s {backupPlanId = a} :: ListBackupSelections)++instance Core.AWSPager ListBackupSelections where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listBackupSelectionsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listBackupSelectionsResponse_backupSelectionsList+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listBackupSelections_nextToken+ Lens..~ rs+ Lens.^? listBackupSelectionsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListBackupSelections where+ type+ AWSResponse ListBackupSelections =+ ListBackupSelectionsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListBackupSelectionsResponse'+ Prelude.<$> ( x+ Data..?> "BackupSelectionsList"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListBackupSelections where+ hashWithSalt _salt ListBackupSelections' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` backupPlanId++instance Prelude.NFData ListBackupSelections where+ rnf ListBackupSelections' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf backupPlanId++instance Data.ToHeaders ListBackupSelections where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListBackupSelections where+ toPath ListBackupSelections' {..} =+ Prelude.mconcat+ [ "/backup/plans/",+ Data.toBS backupPlanId,+ "/selections/"+ ]++instance Data.ToQuery ListBackupSelections where+ toQuery ListBackupSelections' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListBackupSelectionsResponse' smart constructor.+data ListBackupSelectionsResponse = ListBackupSelectionsResponse'+ { -- | An array of backup selection list items containing metadata about each+ -- resource in the list.+ backupSelectionsList :: Prelude.Maybe [BackupSelectionsListMember],+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupSelectionsResponse' 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:+--+-- 'backupSelectionsList', 'listBackupSelectionsResponse_backupSelectionsList' - An array of backup selection list items containing metadata about each+-- resource in the list.+--+-- 'nextToken', 'listBackupSelectionsResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'httpStatus', 'listBackupSelectionsResponse_httpStatus' - The response's http status code.+newListBackupSelectionsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListBackupSelectionsResponse+newListBackupSelectionsResponse pHttpStatus_ =+ ListBackupSelectionsResponse'+ { backupSelectionsList =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of backup selection list items containing metadata about each+-- resource in the list.+listBackupSelectionsResponse_backupSelectionsList :: Lens.Lens' ListBackupSelectionsResponse (Prelude.Maybe [BackupSelectionsListMember])+listBackupSelectionsResponse_backupSelectionsList = Lens.lens (\ListBackupSelectionsResponse' {backupSelectionsList} -> backupSelectionsList) (\s@ListBackupSelectionsResponse' {} a -> s {backupSelectionsList = a} :: ListBackupSelectionsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupSelectionsResponse_nextToken :: Lens.Lens' ListBackupSelectionsResponse (Prelude.Maybe Prelude.Text)+listBackupSelectionsResponse_nextToken = Lens.lens (\ListBackupSelectionsResponse' {nextToken} -> nextToken) (\s@ListBackupSelectionsResponse' {} a -> s {nextToken = a} :: ListBackupSelectionsResponse)++-- | The response's http status code.+listBackupSelectionsResponse_httpStatus :: Lens.Lens' ListBackupSelectionsResponse Prelude.Int+listBackupSelectionsResponse_httpStatus = Lens.lens (\ListBackupSelectionsResponse' {httpStatus} -> httpStatus) (\s@ListBackupSelectionsResponse' {} a -> s {httpStatus = a} :: ListBackupSelectionsResponse)++instance Prelude.NFData ListBackupSelectionsResponse where+ rnf ListBackupSelectionsResponse' {..} =+ Prelude.rnf backupSelectionsList+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListBackupVaults.hs view
@@ -0,0 +1,242 @@+{-# 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.Backup.ListBackupVaults+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of recovery point storage containers along with+-- information about them.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListBackupVaults+ ( -- * Creating a Request+ ListBackupVaults (..),+ newListBackupVaults,++ -- * Request Lenses+ listBackupVaults_maxResults,+ listBackupVaults_nextToken,++ -- * Destructuring the Response+ ListBackupVaultsResponse (..),+ newListBackupVaultsResponse,++ -- * Response Lenses+ listBackupVaultsResponse_backupVaultList,+ listBackupVaultsResponse_nextToken,+ listBackupVaultsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListBackupVaults' smart constructor.+data ListBackupVaults = ListBackupVaults'+ { -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupVaults' 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', 'listBackupVaults_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listBackupVaults_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+newListBackupVaults ::+ ListBackupVaults+newListBackupVaults =+ ListBackupVaults'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of items to be returned.+listBackupVaults_maxResults :: Lens.Lens' ListBackupVaults (Prelude.Maybe Prelude.Natural)+listBackupVaults_maxResults = Lens.lens (\ListBackupVaults' {maxResults} -> maxResults) (\s@ListBackupVaults' {} a -> s {maxResults = a} :: ListBackupVaults)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupVaults_nextToken :: Lens.Lens' ListBackupVaults (Prelude.Maybe Prelude.Text)+listBackupVaults_nextToken = Lens.lens (\ListBackupVaults' {nextToken} -> nextToken) (\s@ListBackupVaults' {} a -> s {nextToken = a} :: ListBackupVaults)++instance Core.AWSPager ListBackupVaults where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listBackupVaultsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listBackupVaultsResponse_backupVaultList+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listBackupVaults_nextToken+ Lens..~ rs+ Lens.^? listBackupVaultsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListBackupVaults where+ type+ AWSResponse ListBackupVaults =+ ListBackupVaultsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListBackupVaultsResponse'+ Prelude.<$> ( x+ Data..?> "BackupVaultList"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListBackupVaults where+ hashWithSalt _salt ListBackupVaults' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListBackupVaults where+ rnf ListBackupVaults' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListBackupVaults where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListBackupVaults where+ toPath = Prelude.const "/backup-vaults/"++instance Data.ToQuery ListBackupVaults where+ toQuery ListBackupVaults' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListBackupVaultsResponse' smart constructor.+data ListBackupVaultsResponse = ListBackupVaultsResponse'+ { -- | An array of backup vault list members containing vault metadata,+ -- including Amazon Resource Name (ARN), display name, creation date,+ -- number of saved recovery points, and encryption information if the+ -- resources saved in the backup vault are encrypted.+ backupVaultList :: Prelude.Maybe [BackupVaultListMember],+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListBackupVaultsResponse' 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:+--+-- 'backupVaultList', 'listBackupVaultsResponse_backupVaultList' - An array of backup vault list members containing vault metadata,+-- including Amazon Resource Name (ARN), display name, creation date,+-- number of saved recovery points, and encryption information if the+-- resources saved in the backup vault are encrypted.+--+-- 'nextToken', 'listBackupVaultsResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'httpStatus', 'listBackupVaultsResponse_httpStatus' - The response's http status code.+newListBackupVaultsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListBackupVaultsResponse+newListBackupVaultsResponse pHttpStatus_ =+ ListBackupVaultsResponse'+ { backupVaultList =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of backup vault list members containing vault metadata,+-- including Amazon Resource Name (ARN), display name, creation date,+-- number of saved recovery points, and encryption information if the+-- resources saved in the backup vault are encrypted.+listBackupVaultsResponse_backupVaultList :: Lens.Lens' ListBackupVaultsResponse (Prelude.Maybe [BackupVaultListMember])+listBackupVaultsResponse_backupVaultList = Lens.lens (\ListBackupVaultsResponse' {backupVaultList} -> backupVaultList) (\s@ListBackupVaultsResponse' {} a -> s {backupVaultList = a} :: ListBackupVaultsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listBackupVaultsResponse_nextToken :: Lens.Lens' ListBackupVaultsResponse (Prelude.Maybe Prelude.Text)+listBackupVaultsResponse_nextToken = Lens.lens (\ListBackupVaultsResponse' {nextToken} -> nextToken) (\s@ListBackupVaultsResponse' {} a -> s {nextToken = a} :: ListBackupVaultsResponse)++-- | The response's http status code.+listBackupVaultsResponse_httpStatus :: Lens.Lens' ListBackupVaultsResponse Prelude.Int+listBackupVaultsResponse_httpStatus = Lens.lens (\ListBackupVaultsResponse' {httpStatus} -> httpStatus) (\s@ListBackupVaultsResponse' {} a -> s {httpStatus = a} :: ListBackupVaultsResponse)++instance Prelude.NFData ListBackupVaultsResponse where+ rnf ListBackupVaultsResponse' {..} =+ Prelude.rnf backupVaultList+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListCopyJobs.hs view
@@ -0,0 +1,449 @@+{-# 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.Backup.ListCopyJobs+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns metadata about your copy jobs.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListCopyJobs+ ( -- * Creating a Request+ ListCopyJobs (..),+ newListCopyJobs,++ -- * Request Lenses+ listCopyJobs_byAccountId,+ listCopyJobs_byCompleteAfter,+ listCopyJobs_byCompleteBefore,+ listCopyJobs_byCreatedAfter,+ listCopyJobs_byCreatedBefore,+ listCopyJobs_byDestinationVaultArn,+ listCopyJobs_byParentJobId,+ listCopyJobs_byResourceArn,+ listCopyJobs_byResourceType,+ listCopyJobs_byState,+ listCopyJobs_maxResults,+ listCopyJobs_nextToken,++ -- * Destructuring the Response+ ListCopyJobsResponse (..),+ newListCopyJobsResponse,++ -- * Response Lenses+ listCopyJobsResponse_copyJobs,+ listCopyJobsResponse_nextToken,+ listCopyJobsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListCopyJobs' smart constructor.+data ListCopyJobs = ListCopyJobs'+ { -- | The account ID to list the jobs from. Returns only copy jobs associated+ -- with the specified account ID.+ byAccountId :: Prelude.Maybe Prelude.Text,+ -- | Returns only copy jobs completed after a date expressed in Unix format+ -- and Coordinated Universal Time (UTC).+ byCompleteAfter :: Prelude.Maybe Data.POSIX,+ -- | Returns only copy jobs completed before a date expressed in Unix format+ -- and Coordinated Universal Time (UTC).+ byCompleteBefore :: Prelude.Maybe Data.POSIX,+ -- | Returns only copy jobs that were created after the specified date.+ byCreatedAfter :: Prelude.Maybe Data.POSIX,+ -- | Returns only copy jobs that were created before the specified date.+ byCreatedBefore :: Prelude.Maybe Data.POSIX,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a source backup+ -- vault to copy from; for example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ byDestinationVaultArn :: Prelude.Maybe Prelude.Text,+ -- | This is a filter to list child (nested) jobs based on parent job ID.+ byParentJobId :: Prelude.Maybe Prelude.Text,+ -- | Returns only copy jobs that match the specified resource Amazon Resource+ -- Name (ARN).+ byResourceArn :: Prelude.Maybe Prelude.Text,+ -- | Returns only backup jobs for the specified resources:+ --+ -- - @Aurora@ for Amazon Aurora+ --+ -- - @DocumentDB@ for Amazon DocumentDB (with MongoDB compatibility)+ --+ -- - @DynamoDB@ for Amazon DynamoDB+ --+ -- - @EBS@ for Amazon Elastic Block Store+ --+ -- - @EC2@ for Amazon Elastic Compute Cloud+ --+ -- - @EFS@ for Amazon Elastic File System+ --+ -- - @FSx@ for Amazon FSx+ --+ -- - @Neptune@ for Amazon Neptune+ --+ -- - @RDS@ for Amazon Relational Database Service+ --+ -- - @Storage Gateway@ for Storage Gateway+ --+ -- - @S3@ for Amazon S3+ --+ -- - @VirtualMachine@ for virtual machines+ byResourceType :: Prelude.Maybe Prelude.Text,+ -- | Returns only copy jobs that are in the specified state.+ byState :: Prelude.Maybe CopyJobState,+ -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return maxResults number of items, 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 'ListCopyJobs' 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:+--+-- 'byAccountId', 'listCopyJobs_byAccountId' - The account ID to list the jobs from. Returns only copy jobs associated+-- with the specified account ID.+--+-- 'byCompleteAfter', 'listCopyJobs_byCompleteAfter' - Returns only copy jobs completed after a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+--+-- 'byCompleteBefore', 'listCopyJobs_byCompleteBefore' - Returns only copy jobs completed before a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+--+-- 'byCreatedAfter', 'listCopyJobs_byCreatedAfter' - Returns only copy jobs that were created after the specified date.+--+-- 'byCreatedBefore', 'listCopyJobs_byCreatedBefore' - Returns only copy jobs that were created before the specified date.+--+-- 'byDestinationVaultArn', 'listCopyJobs_byDestinationVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a source backup+-- vault to copy from; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'byParentJobId', 'listCopyJobs_byParentJobId' - This is a filter to list child (nested) jobs based on parent job ID.+--+-- 'byResourceArn', 'listCopyJobs_byResourceArn' - Returns only copy jobs that match the specified resource Amazon Resource+-- Name (ARN).+--+-- 'byResourceType', 'listCopyJobs_byResourceType' - Returns only backup jobs for the specified resources:+--+-- - @Aurora@ for Amazon Aurora+--+-- - @DocumentDB@ for Amazon DocumentDB (with MongoDB compatibility)+--+-- - @DynamoDB@ for Amazon DynamoDB+--+-- - @EBS@ for Amazon Elastic Block Store+--+-- - @EC2@ for Amazon Elastic Compute Cloud+--+-- - @EFS@ for Amazon Elastic File System+--+-- - @FSx@ for Amazon FSx+--+-- - @Neptune@ for Amazon Neptune+--+-- - @RDS@ for Amazon Relational Database Service+--+-- - @Storage Gateway@ for Storage Gateway+--+-- - @S3@ for Amazon S3+--+-- - @VirtualMachine@ for virtual machines+--+-- 'byState', 'listCopyJobs_byState' - Returns only copy jobs that are in the specified state.+--+-- 'maxResults', 'listCopyJobs_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listCopyJobs_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return maxResults number of items, NextToken+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+newListCopyJobs ::+ ListCopyJobs+newListCopyJobs =+ ListCopyJobs'+ { byAccountId = Prelude.Nothing,+ byCompleteAfter = Prelude.Nothing,+ byCompleteBefore = Prelude.Nothing,+ byCreatedAfter = Prelude.Nothing,+ byCreatedBefore = Prelude.Nothing,+ byDestinationVaultArn = Prelude.Nothing,+ byParentJobId = Prelude.Nothing,+ byResourceArn = Prelude.Nothing,+ byResourceType = Prelude.Nothing,+ byState = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The account ID to list the jobs from. Returns only copy jobs associated+-- with the specified account ID.+listCopyJobs_byAccountId :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.Text)+listCopyJobs_byAccountId = Lens.lens (\ListCopyJobs' {byAccountId} -> byAccountId) (\s@ListCopyJobs' {} a -> s {byAccountId = a} :: ListCopyJobs)++-- | Returns only copy jobs completed after a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+listCopyJobs_byCompleteAfter :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.UTCTime)+listCopyJobs_byCompleteAfter = Lens.lens (\ListCopyJobs' {byCompleteAfter} -> byCompleteAfter) (\s@ListCopyJobs' {} a -> s {byCompleteAfter = a} :: ListCopyJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only copy jobs completed before a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+listCopyJobs_byCompleteBefore :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.UTCTime)+listCopyJobs_byCompleteBefore = Lens.lens (\ListCopyJobs' {byCompleteBefore} -> byCompleteBefore) (\s@ListCopyJobs' {} a -> s {byCompleteBefore = a} :: ListCopyJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only copy jobs that were created after the specified date.+listCopyJobs_byCreatedAfter :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.UTCTime)+listCopyJobs_byCreatedAfter = Lens.lens (\ListCopyJobs' {byCreatedAfter} -> byCreatedAfter) (\s@ListCopyJobs' {} a -> s {byCreatedAfter = a} :: ListCopyJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only copy jobs that were created before the specified date.+listCopyJobs_byCreatedBefore :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.UTCTime)+listCopyJobs_byCreatedBefore = Lens.lens (\ListCopyJobs' {byCreatedBefore} -> byCreatedBefore) (\s@ListCopyJobs' {} a -> s {byCreatedBefore = a} :: ListCopyJobs) Prelude.. Lens.mapping Data._Time++-- | An Amazon Resource Name (ARN) that uniquely identifies a source backup+-- vault to copy from; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+listCopyJobs_byDestinationVaultArn :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.Text)+listCopyJobs_byDestinationVaultArn = Lens.lens (\ListCopyJobs' {byDestinationVaultArn} -> byDestinationVaultArn) (\s@ListCopyJobs' {} a -> s {byDestinationVaultArn = a} :: ListCopyJobs)++-- | This is a filter to list child (nested) jobs based on parent job ID.+listCopyJobs_byParentJobId :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.Text)+listCopyJobs_byParentJobId = Lens.lens (\ListCopyJobs' {byParentJobId} -> byParentJobId) (\s@ListCopyJobs' {} a -> s {byParentJobId = a} :: ListCopyJobs)++-- | Returns only copy jobs that match the specified resource Amazon Resource+-- Name (ARN).+listCopyJobs_byResourceArn :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.Text)+listCopyJobs_byResourceArn = Lens.lens (\ListCopyJobs' {byResourceArn} -> byResourceArn) (\s@ListCopyJobs' {} a -> s {byResourceArn = a} :: ListCopyJobs)++-- | Returns only backup jobs for the specified resources:+--+-- - @Aurora@ for Amazon Aurora+--+-- - @DocumentDB@ for Amazon DocumentDB (with MongoDB compatibility)+--+-- - @DynamoDB@ for Amazon DynamoDB+--+-- - @EBS@ for Amazon Elastic Block Store+--+-- - @EC2@ for Amazon Elastic Compute Cloud+--+-- - @EFS@ for Amazon Elastic File System+--+-- - @FSx@ for Amazon FSx+--+-- - @Neptune@ for Amazon Neptune+--+-- - @RDS@ for Amazon Relational Database Service+--+-- - @Storage Gateway@ for Storage Gateway+--+-- - @S3@ for Amazon S3+--+-- - @VirtualMachine@ for virtual machines+listCopyJobs_byResourceType :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.Text)+listCopyJobs_byResourceType = Lens.lens (\ListCopyJobs' {byResourceType} -> byResourceType) (\s@ListCopyJobs' {} a -> s {byResourceType = a} :: ListCopyJobs)++-- | Returns only copy jobs that are in the specified state.+listCopyJobs_byState :: Lens.Lens' ListCopyJobs (Prelude.Maybe CopyJobState)+listCopyJobs_byState = Lens.lens (\ListCopyJobs' {byState} -> byState) (\s@ListCopyJobs' {} a -> s {byState = a} :: ListCopyJobs)++-- | The maximum number of items to be returned.+listCopyJobs_maxResults :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.Natural)+listCopyJobs_maxResults = Lens.lens (\ListCopyJobs' {maxResults} -> maxResults) (\s@ListCopyJobs' {} a -> s {maxResults = a} :: ListCopyJobs)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return maxResults number of items, NextToken+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listCopyJobs_nextToken :: Lens.Lens' ListCopyJobs (Prelude.Maybe Prelude.Text)+listCopyJobs_nextToken = Lens.lens (\ListCopyJobs' {nextToken} -> nextToken) (\s@ListCopyJobs' {} a -> s {nextToken = a} :: ListCopyJobs)++instance Core.AWSPager ListCopyJobs where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listCopyJobsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listCopyJobsResponse_copyJobs+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listCopyJobs_nextToken+ Lens..~ rs+ Lens.^? listCopyJobsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListCopyJobs where+ type AWSResponse ListCopyJobs = ListCopyJobsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListCopyJobsResponse'+ Prelude.<$> (x Data..?> "CopyJobs" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListCopyJobs where+ hashWithSalt _salt ListCopyJobs' {..} =+ _salt+ `Prelude.hashWithSalt` byAccountId+ `Prelude.hashWithSalt` byCompleteAfter+ `Prelude.hashWithSalt` byCompleteBefore+ `Prelude.hashWithSalt` byCreatedAfter+ `Prelude.hashWithSalt` byCreatedBefore+ `Prelude.hashWithSalt` byDestinationVaultArn+ `Prelude.hashWithSalt` byParentJobId+ `Prelude.hashWithSalt` byResourceArn+ `Prelude.hashWithSalt` byResourceType+ `Prelude.hashWithSalt` byState+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListCopyJobs where+ rnf ListCopyJobs' {..} =+ Prelude.rnf byAccountId+ `Prelude.seq` Prelude.rnf byCompleteAfter+ `Prelude.seq` Prelude.rnf byCompleteBefore+ `Prelude.seq` Prelude.rnf byCreatedAfter+ `Prelude.seq` Prelude.rnf byCreatedBefore+ `Prelude.seq` Prelude.rnf byDestinationVaultArn+ `Prelude.seq` Prelude.rnf byParentJobId+ `Prelude.seq` Prelude.rnf byResourceArn+ `Prelude.seq` Prelude.rnf byResourceType+ `Prelude.seq` Prelude.rnf byState+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListCopyJobs where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListCopyJobs where+ toPath = Prelude.const "/copy-jobs/"++instance Data.ToQuery ListCopyJobs where+ toQuery ListCopyJobs' {..} =+ Prelude.mconcat+ [ "accountId" Data.=: byAccountId,+ "completeAfter" Data.=: byCompleteAfter,+ "completeBefore" Data.=: byCompleteBefore,+ "createdAfter" Data.=: byCreatedAfter,+ "createdBefore" Data.=: byCreatedBefore,+ "destinationVaultArn" Data.=: byDestinationVaultArn,+ "parentJobId" Data.=: byParentJobId,+ "resourceArn" Data.=: byResourceArn,+ "resourceType" Data.=: byResourceType,+ "state" Data.=: byState,+ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListCopyJobsResponse' smart constructor.+data ListCopyJobsResponse = ListCopyJobsResponse'+ { -- | An array of structures containing metadata about your copy jobs returned+ -- in JSON format.+ copyJobs :: Prelude.Maybe [CopyJob],+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return maxResults number of items, 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 'ListCopyJobsResponse' 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:+--+-- 'copyJobs', 'listCopyJobsResponse_copyJobs' - An array of structures containing metadata about your copy jobs returned+-- in JSON format.+--+-- 'nextToken', 'listCopyJobsResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return maxResults number of items, NextToken+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'httpStatus', 'listCopyJobsResponse_httpStatus' - The response's http status code.+newListCopyJobsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListCopyJobsResponse+newListCopyJobsResponse pHttpStatus_ =+ ListCopyJobsResponse'+ { copyJobs = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of structures containing metadata about your copy jobs returned+-- in JSON format.+listCopyJobsResponse_copyJobs :: Lens.Lens' ListCopyJobsResponse (Prelude.Maybe [CopyJob])+listCopyJobsResponse_copyJobs = Lens.lens (\ListCopyJobsResponse' {copyJobs} -> copyJobs) (\s@ListCopyJobsResponse' {} a -> s {copyJobs = a} :: ListCopyJobsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return maxResults number of items, NextToken+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listCopyJobsResponse_nextToken :: Lens.Lens' ListCopyJobsResponse (Prelude.Maybe Prelude.Text)+listCopyJobsResponse_nextToken = Lens.lens (\ListCopyJobsResponse' {nextToken} -> nextToken) (\s@ListCopyJobsResponse' {} a -> s {nextToken = a} :: ListCopyJobsResponse)++-- | The response's http status code.+listCopyJobsResponse_httpStatus :: Lens.Lens' ListCopyJobsResponse Prelude.Int+listCopyJobsResponse_httpStatus = Lens.lens (\ListCopyJobsResponse' {httpStatus} -> httpStatus) (\s@ListCopyJobsResponse' {} a -> s {httpStatus = a} :: ListCopyJobsResponse)++instance Prelude.NFData ListCopyJobsResponse where+ rnf ListCopyJobsResponse' {..} =+ Prelude.rnf copyJobs+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListFrameworks.hs view
@@ -0,0 +1,209 @@+{-# 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.Backup.ListFrameworks+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of all frameworks for an Amazon Web Services account and+-- Amazon Web Services Region.+module Amazonka.Backup.ListFrameworks+ ( -- * Creating a Request+ ListFrameworks (..),+ newListFrameworks,++ -- * Request Lenses+ listFrameworks_maxResults,+ listFrameworks_nextToken,++ -- * Destructuring the Response+ ListFrameworksResponse (..),+ newListFrameworksResponse,++ -- * Response Lenses+ listFrameworksResponse_frameworks,+ listFrameworksResponse_nextToken,+ listFrameworksResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListFrameworks' smart constructor.+data ListFrameworks = ListFrameworks'+ { -- | The number of desired results from 1 to 1000. Optional. If unspecified,+ -- the query will return 1 MB of data.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | An identifier that was returned from the previous call to this+ -- operation, which can be used to return the next set of items in the+ -- list.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListFrameworks' 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', 'listFrameworks_maxResults' - The number of desired results from 1 to 1000. Optional. If unspecified,+-- the query will return 1 MB of data.+--+-- 'nextToken', 'listFrameworks_nextToken' - An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+newListFrameworks ::+ ListFrameworks+newListFrameworks =+ ListFrameworks'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The number of desired results from 1 to 1000. Optional. If unspecified,+-- the query will return 1 MB of data.+listFrameworks_maxResults :: Lens.Lens' ListFrameworks (Prelude.Maybe Prelude.Natural)+listFrameworks_maxResults = Lens.lens (\ListFrameworks' {maxResults} -> maxResults) (\s@ListFrameworks' {} a -> s {maxResults = a} :: ListFrameworks)++-- | An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+listFrameworks_nextToken :: Lens.Lens' ListFrameworks (Prelude.Maybe Prelude.Text)+listFrameworks_nextToken = Lens.lens (\ListFrameworks' {nextToken} -> nextToken) (\s@ListFrameworks' {} a -> s {nextToken = a} :: ListFrameworks)++instance Core.AWSRequest ListFrameworks where+ type+ AWSResponse ListFrameworks =+ ListFrameworksResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListFrameworksResponse'+ Prelude.<$> (x Data..?> "Frameworks" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListFrameworks where+ hashWithSalt _salt ListFrameworks' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListFrameworks where+ rnf ListFrameworks' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListFrameworks where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListFrameworks where+ toPath = Prelude.const "/audit/frameworks"++instance Data.ToQuery ListFrameworks where+ toQuery ListFrameworks' {..} =+ Prelude.mconcat+ [ "MaxResults" Data.=: maxResults,+ "NextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListFrameworksResponse' smart constructor.+data ListFrameworksResponse = ListFrameworksResponse'+ { -- | A list of frameworks with details for each framework, including the+ -- framework name, Amazon Resource Name (ARN), description, number of+ -- controls, creation time, and deployment status.+ frameworks :: Prelude.Maybe [Framework],+ -- | An identifier that was returned from the previous call to this+ -- operation, which can be used to return the next set of items in the+ -- list.+ 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 'ListFrameworksResponse' 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:+--+-- 'frameworks', 'listFrameworksResponse_frameworks' - A list of frameworks with details for each framework, including the+-- framework name, Amazon Resource Name (ARN), description, number of+-- controls, creation time, and deployment status.+--+-- 'nextToken', 'listFrameworksResponse_nextToken' - An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+--+-- 'httpStatus', 'listFrameworksResponse_httpStatus' - The response's http status code.+newListFrameworksResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListFrameworksResponse+newListFrameworksResponse pHttpStatus_ =+ ListFrameworksResponse'+ { frameworks =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A list of frameworks with details for each framework, including the+-- framework name, Amazon Resource Name (ARN), description, number of+-- controls, creation time, and deployment status.+listFrameworksResponse_frameworks :: Lens.Lens' ListFrameworksResponse (Prelude.Maybe [Framework])+listFrameworksResponse_frameworks = Lens.lens (\ListFrameworksResponse' {frameworks} -> frameworks) (\s@ListFrameworksResponse' {} a -> s {frameworks = a} :: ListFrameworksResponse) Prelude.. Lens.mapping Lens.coerced++-- | An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+listFrameworksResponse_nextToken :: Lens.Lens' ListFrameworksResponse (Prelude.Maybe Prelude.Text)+listFrameworksResponse_nextToken = Lens.lens (\ListFrameworksResponse' {nextToken} -> nextToken) (\s@ListFrameworksResponse' {} a -> s {nextToken = a} :: ListFrameworksResponse)++-- | The response's http status code.+listFrameworksResponse_httpStatus :: Lens.Lens' ListFrameworksResponse Prelude.Int+listFrameworksResponse_httpStatus = Lens.lens (\ListFrameworksResponse' {httpStatus} -> httpStatus) (\s@ListFrameworksResponse' {} a -> s {httpStatus = a} :: ListFrameworksResponse)++instance Prelude.NFData ListFrameworksResponse where+ rnf ListFrameworksResponse' {..} =+ Prelude.rnf frameworks+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListLegalHolds.hs view
@@ -0,0 +1,229 @@+{-# 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.Backup.ListLegalHolds+-- 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 returns metadata about active and previous legal holds.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListLegalHolds+ ( -- * Creating a Request+ ListLegalHolds (..),+ newListLegalHolds,++ -- * Request Lenses+ listLegalHolds_maxResults,+ listLegalHolds_nextToken,++ -- * Destructuring the Response+ ListLegalHoldsResponse (..),+ newListLegalHoldsResponse,++ -- * Response Lenses+ listLegalHoldsResponse_legalHolds,+ listLegalHoldsResponse_nextToken,+ listLegalHoldsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListLegalHolds' smart constructor.+data ListLegalHolds = ListLegalHolds'+ { -- | The maximum number of resource list items to be returned.+ 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 'ListLegalHolds' 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', 'listLegalHolds_maxResults' - The maximum number of resource list items to be returned.+--+-- 'nextToken', 'listLegalHolds_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.+newListLegalHolds ::+ ListLegalHolds+newListLegalHolds =+ ListLegalHolds'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of resource list items to be returned.+listLegalHolds_maxResults :: Lens.Lens' ListLegalHolds (Prelude.Maybe Prelude.Natural)+listLegalHolds_maxResults = Lens.lens (\ListLegalHolds' {maxResults} -> maxResults) (\s@ListLegalHolds' {} a -> s {maxResults = a} :: ListLegalHolds)++-- | 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.+listLegalHolds_nextToken :: Lens.Lens' ListLegalHolds (Prelude.Maybe Prelude.Text)+listLegalHolds_nextToken = Lens.lens (\ListLegalHolds' {nextToken} -> nextToken) (\s@ListLegalHolds' {} a -> s {nextToken = a} :: ListLegalHolds)++instance Core.AWSPager ListLegalHolds where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listLegalHoldsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listLegalHoldsResponse_legalHolds+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listLegalHolds_nextToken+ Lens..~ rs+ Lens.^? listLegalHoldsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListLegalHolds where+ type+ AWSResponse ListLegalHolds =+ ListLegalHoldsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListLegalHoldsResponse'+ Prelude.<$> (x Data..?> "LegalHolds" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListLegalHolds where+ hashWithSalt _salt ListLegalHolds' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListLegalHolds where+ rnf ListLegalHolds' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListLegalHolds where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListLegalHolds where+ toPath = Prelude.const "/legal-holds/"++instance Data.ToQuery ListLegalHolds where+ toQuery ListLegalHolds' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListLegalHoldsResponse' smart constructor.+data ListLegalHoldsResponse = ListLegalHoldsResponse'+ { -- | This is an array of returned legal holds, both active and previous.+ legalHolds :: Prelude.Maybe [LegalHold],+ -- | 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 'ListLegalHoldsResponse' 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:+--+-- 'legalHolds', 'listLegalHoldsResponse_legalHolds' - This is an array of returned legal holds, both active and previous.+--+-- 'nextToken', 'listLegalHoldsResponse_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', 'listLegalHoldsResponse_httpStatus' - The response's http status code.+newListLegalHoldsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListLegalHoldsResponse+newListLegalHoldsResponse pHttpStatus_ =+ ListLegalHoldsResponse'+ { legalHolds =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | This is an array of returned legal holds, both active and previous.+listLegalHoldsResponse_legalHolds :: Lens.Lens' ListLegalHoldsResponse (Prelude.Maybe [LegalHold])+listLegalHoldsResponse_legalHolds = Lens.lens (\ListLegalHoldsResponse' {legalHolds} -> legalHolds) (\s@ListLegalHoldsResponse' {} a -> s {legalHolds = a} :: ListLegalHoldsResponse) 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.+listLegalHoldsResponse_nextToken :: Lens.Lens' ListLegalHoldsResponse (Prelude.Maybe Prelude.Text)+listLegalHoldsResponse_nextToken = Lens.lens (\ListLegalHoldsResponse' {nextToken} -> nextToken) (\s@ListLegalHoldsResponse' {} a -> s {nextToken = a} :: ListLegalHoldsResponse)++-- | The response's http status code.+listLegalHoldsResponse_httpStatus :: Lens.Lens' ListLegalHoldsResponse Prelude.Int+listLegalHoldsResponse_httpStatus = Lens.lens (\ListLegalHoldsResponse' {httpStatus} -> httpStatus) (\s@ListLegalHoldsResponse' {} a -> s {httpStatus = a} :: ListLegalHoldsResponse)++instance Prelude.NFData ListLegalHoldsResponse where+ rnf ListLegalHoldsResponse' {..} =+ Prelude.rnf legalHolds+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListProtectedResources.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.Backup.ListProtectedResources+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an array of resources successfully backed up by Backup,+-- including the time the resource was saved, an Amazon Resource Name (ARN)+-- of the resource, and a resource type.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListProtectedResources+ ( -- * Creating a Request+ ListProtectedResources (..),+ newListProtectedResources,++ -- * Request Lenses+ listProtectedResources_maxResults,+ listProtectedResources_nextToken,++ -- * Destructuring the Response+ ListProtectedResourcesResponse (..),+ newListProtectedResourcesResponse,++ -- * Response Lenses+ listProtectedResourcesResponse_nextToken,+ listProtectedResourcesResponse_results,+ listProtectedResourcesResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListProtectedResources' smart constructor.+data ListProtectedResources = ListProtectedResources'+ { -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListProtectedResources' 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', 'listProtectedResources_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listProtectedResources_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+newListProtectedResources ::+ ListProtectedResources+newListProtectedResources =+ ListProtectedResources'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of items to be returned.+listProtectedResources_maxResults :: Lens.Lens' ListProtectedResources (Prelude.Maybe Prelude.Natural)+listProtectedResources_maxResults = Lens.lens (\ListProtectedResources' {maxResults} -> maxResults) (\s@ListProtectedResources' {} a -> s {maxResults = a} :: ListProtectedResources)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listProtectedResources_nextToken :: Lens.Lens' ListProtectedResources (Prelude.Maybe Prelude.Text)+listProtectedResources_nextToken = Lens.lens (\ListProtectedResources' {nextToken} -> nextToken) (\s@ListProtectedResources' {} a -> s {nextToken = a} :: ListProtectedResources)++instance Core.AWSPager ListProtectedResources where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listProtectedResourcesResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listProtectedResourcesResponse_results+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listProtectedResources_nextToken+ Lens..~ rs+ Lens.^? listProtectedResourcesResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListProtectedResources where+ type+ AWSResponse ListProtectedResources =+ ListProtectedResourcesResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListProtectedResourcesResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "Results" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListProtectedResources where+ hashWithSalt _salt ListProtectedResources' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListProtectedResources where+ rnf ListProtectedResources' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListProtectedResources where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListProtectedResources where+ toPath = Prelude.const "/resources/"++instance Data.ToQuery ListProtectedResources where+ toQuery ListProtectedResources' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListProtectedResourcesResponse' smart constructor.+data ListProtectedResourcesResponse = ListProtectedResourcesResponse'+ { -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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,+ -- | An array of resources successfully backed up by Backup including the+ -- time the resource was saved, an Amazon Resource Name (ARN) of the+ -- resource, and a resource type.+ results :: Prelude.Maybe [ProtectedResource],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListProtectedResourcesResponse' 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', 'listProtectedResourcesResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'results', 'listProtectedResourcesResponse_results' - An array of resources successfully backed up by Backup including the+-- time the resource was saved, an Amazon Resource Name (ARN) of the+-- resource, and a resource type.+--+-- 'httpStatus', 'listProtectedResourcesResponse_httpStatus' - The response's http status code.+newListProtectedResourcesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListProtectedResourcesResponse+newListProtectedResourcesResponse pHttpStatus_ =+ ListProtectedResourcesResponse'+ { nextToken =+ Prelude.Nothing,+ results = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listProtectedResourcesResponse_nextToken :: Lens.Lens' ListProtectedResourcesResponse (Prelude.Maybe Prelude.Text)+listProtectedResourcesResponse_nextToken = Lens.lens (\ListProtectedResourcesResponse' {nextToken} -> nextToken) (\s@ListProtectedResourcesResponse' {} a -> s {nextToken = a} :: ListProtectedResourcesResponse)++-- | An array of resources successfully backed up by Backup including the+-- time the resource was saved, an Amazon Resource Name (ARN) of the+-- resource, and a resource type.+listProtectedResourcesResponse_results :: Lens.Lens' ListProtectedResourcesResponse (Prelude.Maybe [ProtectedResource])+listProtectedResourcesResponse_results = Lens.lens (\ListProtectedResourcesResponse' {results} -> results) (\s@ListProtectedResourcesResponse' {} a -> s {results = a} :: ListProtectedResourcesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listProtectedResourcesResponse_httpStatus :: Lens.Lens' ListProtectedResourcesResponse Prelude.Int+listProtectedResourcesResponse_httpStatus = Lens.lens (\ListProtectedResourcesResponse' {httpStatus} -> httpStatus) (\s@ListProtectedResourcesResponse' {} a -> s {httpStatus = a} :: ListProtectedResourcesResponse)++instance+ Prelude.NFData+ ListProtectedResourcesResponse+ where+ rnf ListProtectedResourcesResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf results+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListRecoveryPointsByBackupVault.hs view
@@ -0,0 +1,383 @@+{-# 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.Backup.ListRecoveryPointsByBackupVault+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns detailed information about the recovery points stored in a+-- backup vault.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListRecoveryPointsByBackupVault+ ( -- * Creating a Request+ ListRecoveryPointsByBackupVault (..),+ newListRecoveryPointsByBackupVault,++ -- * Request Lenses+ listRecoveryPointsByBackupVault_byBackupPlanId,+ listRecoveryPointsByBackupVault_byCreatedAfter,+ listRecoveryPointsByBackupVault_byCreatedBefore,+ listRecoveryPointsByBackupVault_byParentRecoveryPointArn,+ listRecoveryPointsByBackupVault_byResourceArn,+ listRecoveryPointsByBackupVault_byResourceType,+ listRecoveryPointsByBackupVault_maxResults,+ listRecoveryPointsByBackupVault_nextToken,+ listRecoveryPointsByBackupVault_backupVaultName,++ -- * Destructuring the Response+ ListRecoveryPointsByBackupVaultResponse (..),+ newListRecoveryPointsByBackupVaultResponse,++ -- * Response Lenses+ listRecoveryPointsByBackupVaultResponse_nextToken,+ listRecoveryPointsByBackupVaultResponse_recoveryPoints,+ listRecoveryPointsByBackupVaultResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListRecoveryPointsByBackupVault' smart constructor.+data ListRecoveryPointsByBackupVault = ListRecoveryPointsByBackupVault'+ { -- | Returns only recovery points that match the specified backup plan ID.+ byBackupPlanId :: Prelude.Maybe Prelude.Text,+ -- | Returns only recovery points that were created after the specified+ -- timestamp.+ byCreatedAfter :: Prelude.Maybe Data.POSIX,+ -- | Returns only recovery points that were created before the specified+ -- timestamp.+ byCreatedBefore :: Prelude.Maybe Data.POSIX,+ -- | This returns only recovery points that match the specified parent+ -- (composite) recovery point Amazon Resource Name (ARN).+ byParentRecoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | Returns only recovery points that match the specified resource Amazon+ -- Resource Name (ARN).+ byResourceArn :: Prelude.Maybe Prelude.Text,+ -- | Returns only recovery points that match the specified resource type.+ byResourceType :: Prelude.Maybe Prelude.Text,+ -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ --+ -- Backup vault name might not be available when a supported service+ -- creates the backup.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRecoveryPointsByBackupVault' 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:+--+-- 'byBackupPlanId', 'listRecoveryPointsByBackupVault_byBackupPlanId' - Returns only recovery points that match the specified backup plan ID.+--+-- 'byCreatedAfter', 'listRecoveryPointsByBackupVault_byCreatedAfter' - Returns only recovery points that were created after the specified+-- timestamp.+--+-- 'byCreatedBefore', 'listRecoveryPointsByBackupVault_byCreatedBefore' - Returns only recovery points that were created before the specified+-- timestamp.+--+-- 'byParentRecoveryPointArn', 'listRecoveryPointsByBackupVault_byParentRecoveryPointArn' - This returns only recovery points that match the specified parent+-- (composite) recovery point Amazon Resource Name (ARN).+--+-- 'byResourceArn', 'listRecoveryPointsByBackupVault_byResourceArn' - Returns only recovery points that match the specified resource Amazon+-- Resource Name (ARN).+--+-- 'byResourceType', 'listRecoveryPointsByBackupVault_byResourceType' - Returns only recovery points that match the specified resource type.+--+-- 'maxResults', 'listRecoveryPointsByBackupVault_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listRecoveryPointsByBackupVault_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'backupVaultName', 'listRecoveryPointsByBackupVault_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- Backup vault name might not be available when a supported service+-- creates the backup.+newListRecoveryPointsByBackupVault ::+ -- | 'backupVaultName'+ Prelude.Text ->+ ListRecoveryPointsByBackupVault+newListRecoveryPointsByBackupVault pBackupVaultName_ =+ ListRecoveryPointsByBackupVault'+ { byBackupPlanId =+ Prelude.Nothing,+ byCreatedAfter = Prelude.Nothing,+ byCreatedBefore = Prelude.Nothing,+ byParentRecoveryPointArn = Prelude.Nothing,+ byResourceArn = Prelude.Nothing,+ byResourceType = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ backupVaultName = pBackupVaultName_+ }++-- | Returns only recovery points that match the specified backup plan ID.+listRecoveryPointsByBackupVault_byBackupPlanId :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Text)+listRecoveryPointsByBackupVault_byBackupPlanId = Lens.lens (\ListRecoveryPointsByBackupVault' {byBackupPlanId} -> byBackupPlanId) (\s@ListRecoveryPointsByBackupVault' {} a -> s {byBackupPlanId = a} :: ListRecoveryPointsByBackupVault)++-- | Returns only recovery points that were created after the specified+-- timestamp.+listRecoveryPointsByBackupVault_byCreatedAfter :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.UTCTime)+listRecoveryPointsByBackupVault_byCreatedAfter = Lens.lens (\ListRecoveryPointsByBackupVault' {byCreatedAfter} -> byCreatedAfter) (\s@ListRecoveryPointsByBackupVault' {} a -> s {byCreatedAfter = a} :: ListRecoveryPointsByBackupVault) Prelude.. Lens.mapping Data._Time++-- | Returns only recovery points that were created before the specified+-- timestamp.+listRecoveryPointsByBackupVault_byCreatedBefore :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.UTCTime)+listRecoveryPointsByBackupVault_byCreatedBefore = Lens.lens (\ListRecoveryPointsByBackupVault' {byCreatedBefore} -> byCreatedBefore) (\s@ListRecoveryPointsByBackupVault' {} a -> s {byCreatedBefore = a} :: ListRecoveryPointsByBackupVault) Prelude.. Lens.mapping Data._Time++-- | This returns only recovery points that match the specified parent+-- (composite) recovery point Amazon Resource Name (ARN).+listRecoveryPointsByBackupVault_byParentRecoveryPointArn :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Text)+listRecoveryPointsByBackupVault_byParentRecoveryPointArn = Lens.lens (\ListRecoveryPointsByBackupVault' {byParentRecoveryPointArn} -> byParentRecoveryPointArn) (\s@ListRecoveryPointsByBackupVault' {} a -> s {byParentRecoveryPointArn = a} :: ListRecoveryPointsByBackupVault)++-- | Returns only recovery points that match the specified resource Amazon+-- Resource Name (ARN).+listRecoveryPointsByBackupVault_byResourceArn :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Text)+listRecoveryPointsByBackupVault_byResourceArn = Lens.lens (\ListRecoveryPointsByBackupVault' {byResourceArn} -> byResourceArn) (\s@ListRecoveryPointsByBackupVault' {} a -> s {byResourceArn = a} :: ListRecoveryPointsByBackupVault)++-- | Returns only recovery points that match the specified resource type.+listRecoveryPointsByBackupVault_byResourceType :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Text)+listRecoveryPointsByBackupVault_byResourceType = Lens.lens (\ListRecoveryPointsByBackupVault' {byResourceType} -> byResourceType) (\s@ListRecoveryPointsByBackupVault' {} a -> s {byResourceType = a} :: ListRecoveryPointsByBackupVault)++-- | The maximum number of items to be returned.+listRecoveryPointsByBackupVault_maxResults :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Natural)+listRecoveryPointsByBackupVault_maxResults = Lens.lens (\ListRecoveryPointsByBackupVault' {maxResults} -> maxResults) (\s@ListRecoveryPointsByBackupVault' {} a -> s {maxResults = a} :: ListRecoveryPointsByBackupVault)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listRecoveryPointsByBackupVault_nextToken :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Text)+listRecoveryPointsByBackupVault_nextToken = Lens.lens (\ListRecoveryPointsByBackupVault' {nextToken} -> nextToken) (\s@ListRecoveryPointsByBackupVault' {} a -> s {nextToken = a} :: ListRecoveryPointsByBackupVault)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- Backup vault name might not be available when a supported service+-- creates the backup.+listRecoveryPointsByBackupVault_backupVaultName :: Lens.Lens' ListRecoveryPointsByBackupVault Prelude.Text+listRecoveryPointsByBackupVault_backupVaultName = Lens.lens (\ListRecoveryPointsByBackupVault' {backupVaultName} -> backupVaultName) (\s@ListRecoveryPointsByBackupVault' {} a -> s {backupVaultName = a} :: ListRecoveryPointsByBackupVault)++instance+ Core.AWSPager+ ListRecoveryPointsByBackupVault+ where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listRecoveryPointsByBackupVaultResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listRecoveryPointsByBackupVaultResponse_recoveryPoints+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listRecoveryPointsByBackupVault_nextToken+ Lens..~ rs+ Lens.^? listRecoveryPointsByBackupVaultResponse_nextToken+ Prelude.. Lens._Just++instance+ Core.AWSRequest+ ListRecoveryPointsByBackupVault+ where+ type+ AWSResponse ListRecoveryPointsByBackupVault =+ ListRecoveryPointsByBackupVaultResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListRecoveryPointsByBackupVaultResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "RecoveryPoints" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ ListRecoveryPointsByBackupVault+ where+ hashWithSalt+ _salt+ ListRecoveryPointsByBackupVault' {..} =+ _salt+ `Prelude.hashWithSalt` byBackupPlanId+ `Prelude.hashWithSalt` byCreatedAfter+ `Prelude.hashWithSalt` byCreatedBefore+ `Prelude.hashWithSalt` byParentRecoveryPointArn+ `Prelude.hashWithSalt` byResourceArn+ `Prelude.hashWithSalt` byResourceType+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` backupVaultName++instance+ Prelude.NFData+ ListRecoveryPointsByBackupVault+ where+ rnf ListRecoveryPointsByBackupVault' {..} =+ Prelude.rnf byBackupPlanId+ `Prelude.seq` Prelude.rnf byCreatedAfter+ `Prelude.seq` Prelude.rnf byCreatedBefore+ `Prelude.seq` Prelude.rnf byParentRecoveryPointArn+ `Prelude.seq` Prelude.rnf byResourceArn+ `Prelude.seq` Prelude.rnf byResourceType+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf backupVaultName++instance+ Data.ToHeaders+ ListRecoveryPointsByBackupVault+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListRecoveryPointsByBackupVault where+ toPath ListRecoveryPointsByBackupVault' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/recovery-points/"+ ]++instance Data.ToQuery ListRecoveryPointsByBackupVault where+ toQuery ListRecoveryPointsByBackupVault' {..} =+ Prelude.mconcat+ [ "backupPlanId" Data.=: byBackupPlanId,+ "createdAfter" Data.=: byCreatedAfter,+ "createdBefore" Data.=: byCreatedBefore,+ "parentRecoveryPointArn"+ Data.=: byParentRecoveryPointArn,+ "resourceArn" Data.=: byResourceArn,+ "resourceType" Data.=: byResourceType,+ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListRecoveryPointsByBackupVaultResponse' smart constructor.+data ListRecoveryPointsByBackupVaultResponse = ListRecoveryPointsByBackupVaultResponse'+ { -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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,+ -- | An array of objects that contain detailed information about recovery+ -- points saved in a backup vault.+ recoveryPoints :: Prelude.Maybe [RecoveryPointByBackupVault],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRecoveryPointsByBackupVaultResponse' 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', 'listRecoveryPointsByBackupVaultResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'recoveryPoints', 'listRecoveryPointsByBackupVaultResponse_recoveryPoints' - An array of objects that contain detailed information about recovery+-- points saved in a backup vault.+--+-- 'httpStatus', 'listRecoveryPointsByBackupVaultResponse_httpStatus' - The response's http status code.+newListRecoveryPointsByBackupVaultResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListRecoveryPointsByBackupVaultResponse+newListRecoveryPointsByBackupVaultResponse+ pHttpStatus_ =+ ListRecoveryPointsByBackupVaultResponse'+ { nextToken =+ Prelude.Nothing,+ recoveryPoints = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listRecoveryPointsByBackupVaultResponse_nextToken :: Lens.Lens' ListRecoveryPointsByBackupVaultResponse (Prelude.Maybe Prelude.Text)+listRecoveryPointsByBackupVaultResponse_nextToken = Lens.lens (\ListRecoveryPointsByBackupVaultResponse' {nextToken} -> nextToken) (\s@ListRecoveryPointsByBackupVaultResponse' {} a -> s {nextToken = a} :: ListRecoveryPointsByBackupVaultResponse)++-- | An array of objects that contain detailed information about recovery+-- points saved in a backup vault.+listRecoveryPointsByBackupVaultResponse_recoveryPoints :: Lens.Lens' ListRecoveryPointsByBackupVaultResponse (Prelude.Maybe [RecoveryPointByBackupVault])+listRecoveryPointsByBackupVaultResponse_recoveryPoints = Lens.lens (\ListRecoveryPointsByBackupVaultResponse' {recoveryPoints} -> recoveryPoints) (\s@ListRecoveryPointsByBackupVaultResponse' {} a -> s {recoveryPoints = a} :: ListRecoveryPointsByBackupVaultResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listRecoveryPointsByBackupVaultResponse_httpStatus :: Lens.Lens' ListRecoveryPointsByBackupVaultResponse Prelude.Int+listRecoveryPointsByBackupVaultResponse_httpStatus = Lens.lens (\ListRecoveryPointsByBackupVaultResponse' {httpStatus} -> httpStatus) (\s@ListRecoveryPointsByBackupVaultResponse' {} a -> s {httpStatus = a} :: ListRecoveryPointsByBackupVaultResponse)++instance+ Prelude.NFData+ ListRecoveryPointsByBackupVaultResponse+ where+ rnf ListRecoveryPointsByBackupVaultResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf recoveryPoints+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListRecoveryPointsByLegalHold.hs view
@@ -0,0 +1,256 @@+{-# 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.Backup.ListRecoveryPointsByLegalHold+-- 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 returns recovery point ARNs (Amazon Resource Names) of the+-- specified legal hold.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListRecoveryPointsByLegalHold+ ( -- * Creating a Request+ ListRecoveryPointsByLegalHold (..),+ newListRecoveryPointsByLegalHold,++ -- * Request Lenses+ listRecoveryPointsByLegalHold_maxResults,+ listRecoveryPointsByLegalHold_nextToken,+ listRecoveryPointsByLegalHold_legalHoldId,++ -- * Destructuring the Response+ ListRecoveryPointsByLegalHoldResponse (..),+ newListRecoveryPointsByLegalHoldResponse,++ -- * Response Lenses+ listRecoveryPointsByLegalHoldResponse_nextToken,+ listRecoveryPointsByLegalHoldResponse_recoveryPoints,+ listRecoveryPointsByLegalHoldResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListRecoveryPointsByLegalHold' smart constructor.+data ListRecoveryPointsByLegalHold = ListRecoveryPointsByLegalHold'+ { -- | This is the maximum number of resource list items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | This is 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,+ -- | This is the ID of the legal hold.+ legalHoldId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRecoveryPointsByLegalHold' 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', 'listRecoveryPointsByLegalHold_maxResults' - This is the maximum number of resource list items to be returned.+--+-- 'nextToken', 'listRecoveryPointsByLegalHold_nextToken' - This is 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.+--+-- 'legalHoldId', 'listRecoveryPointsByLegalHold_legalHoldId' - This is the ID of the legal hold.+newListRecoveryPointsByLegalHold ::+ -- | 'legalHoldId'+ Prelude.Text ->+ ListRecoveryPointsByLegalHold+newListRecoveryPointsByLegalHold pLegalHoldId_ =+ ListRecoveryPointsByLegalHold'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ legalHoldId = pLegalHoldId_+ }++-- | This is the maximum number of resource list items to be returned.+listRecoveryPointsByLegalHold_maxResults :: Lens.Lens' ListRecoveryPointsByLegalHold (Prelude.Maybe Prelude.Natural)+listRecoveryPointsByLegalHold_maxResults = Lens.lens (\ListRecoveryPointsByLegalHold' {maxResults} -> maxResults) (\s@ListRecoveryPointsByLegalHold' {} a -> s {maxResults = a} :: ListRecoveryPointsByLegalHold)++-- | This is 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.+listRecoveryPointsByLegalHold_nextToken :: Lens.Lens' ListRecoveryPointsByLegalHold (Prelude.Maybe Prelude.Text)+listRecoveryPointsByLegalHold_nextToken = Lens.lens (\ListRecoveryPointsByLegalHold' {nextToken} -> nextToken) (\s@ListRecoveryPointsByLegalHold' {} a -> s {nextToken = a} :: ListRecoveryPointsByLegalHold)++-- | This is the ID of the legal hold.+listRecoveryPointsByLegalHold_legalHoldId :: Lens.Lens' ListRecoveryPointsByLegalHold Prelude.Text+listRecoveryPointsByLegalHold_legalHoldId = Lens.lens (\ListRecoveryPointsByLegalHold' {legalHoldId} -> legalHoldId) (\s@ListRecoveryPointsByLegalHold' {} a -> s {legalHoldId = a} :: ListRecoveryPointsByLegalHold)++instance Core.AWSPager ListRecoveryPointsByLegalHold where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listRecoveryPointsByLegalHoldResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listRecoveryPointsByLegalHoldResponse_recoveryPoints+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listRecoveryPointsByLegalHold_nextToken+ Lens..~ rs+ Lens.^? listRecoveryPointsByLegalHoldResponse_nextToken+ Prelude.. Lens._Just++instance+ Core.AWSRequest+ ListRecoveryPointsByLegalHold+ where+ type+ AWSResponse ListRecoveryPointsByLegalHold =+ ListRecoveryPointsByLegalHoldResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListRecoveryPointsByLegalHoldResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "RecoveryPoints" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ ListRecoveryPointsByLegalHold+ where+ hashWithSalt _salt ListRecoveryPointsByLegalHold' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` legalHoldId++instance Prelude.NFData ListRecoveryPointsByLegalHold where+ rnf ListRecoveryPointsByLegalHold' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf legalHoldId++instance Data.ToHeaders ListRecoveryPointsByLegalHold where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListRecoveryPointsByLegalHold where+ toPath ListRecoveryPointsByLegalHold' {..} =+ Prelude.mconcat+ [ "/legal-holds/",+ Data.toBS legalHoldId,+ "/recovery-points"+ ]++instance Data.ToQuery ListRecoveryPointsByLegalHold where+ toQuery ListRecoveryPointsByLegalHold' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListRecoveryPointsByLegalHoldResponse' smart constructor.+data ListRecoveryPointsByLegalHoldResponse = ListRecoveryPointsByLegalHoldResponse'+ { -- | This return is the next item following a partial list of returned+ -- resources.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | This is a list of the recovery points returned by+ -- @ListRecoveryPointsByLegalHold@.+ recoveryPoints :: Prelude.Maybe [RecoveryPointMember],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRecoveryPointsByLegalHoldResponse' 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', 'listRecoveryPointsByLegalHoldResponse_nextToken' - This return is the next item following a partial list of returned+-- resources.+--+-- 'recoveryPoints', 'listRecoveryPointsByLegalHoldResponse_recoveryPoints' - This is a list of the recovery points returned by+-- @ListRecoveryPointsByLegalHold@.+--+-- 'httpStatus', 'listRecoveryPointsByLegalHoldResponse_httpStatus' - The response's http status code.+newListRecoveryPointsByLegalHoldResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListRecoveryPointsByLegalHoldResponse+newListRecoveryPointsByLegalHoldResponse pHttpStatus_ =+ ListRecoveryPointsByLegalHoldResponse'+ { nextToken =+ Prelude.Nothing,+ recoveryPoints = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | This return is the next item following a partial list of returned+-- resources.+listRecoveryPointsByLegalHoldResponse_nextToken :: Lens.Lens' ListRecoveryPointsByLegalHoldResponse (Prelude.Maybe Prelude.Text)+listRecoveryPointsByLegalHoldResponse_nextToken = Lens.lens (\ListRecoveryPointsByLegalHoldResponse' {nextToken} -> nextToken) (\s@ListRecoveryPointsByLegalHoldResponse' {} a -> s {nextToken = a} :: ListRecoveryPointsByLegalHoldResponse)++-- | This is a list of the recovery points returned by+-- @ListRecoveryPointsByLegalHold@.+listRecoveryPointsByLegalHoldResponse_recoveryPoints :: Lens.Lens' ListRecoveryPointsByLegalHoldResponse (Prelude.Maybe [RecoveryPointMember])+listRecoveryPointsByLegalHoldResponse_recoveryPoints = Lens.lens (\ListRecoveryPointsByLegalHoldResponse' {recoveryPoints} -> recoveryPoints) (\s@ListRecoveryPointsByLegalHoldResponse' {} a -> s {recoveryPoints = a} :: ListRecoveryPointsByLegalHoldResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listRecoveryPointsByLegalHoldResponse_httpStatus :: Lens.Lens' ListRecoveryPointsByLegalHoldResponse Prelude.Int+listRecoveryPointsByLegalHoldResponse_httpStatus = Lens.lens (\ListRecoveryPointsByLegalHoldResponse' {httpStatus} -> httpStatus) (\s@ListRecoveryPointsByLegalHoldResponse' {} a -> s {httpStatus = a} :: ListRecoveryPointsByLegalHoldResponse)++instance+ Prelude.NFData+ ListRecoveryPointsByLegalHoldResponse+ where+ rnf ListRecoveryPointsByLegalHoldResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf recoveryPoints+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListRecoveryPointsByResource.hs view
@@ -0,0 +1,277 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.ListRecoveryPointsByResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns detailed information about all the recovery points of the type+-- specified by a resource Amazon Resource Name (ARN).+--+-- For Amazon EFS and Amazon EC2, this action only lists recovery points+-- created by Backup.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListRecoveryPointsByResource+ ( -- * Creating a Request+ ListRecoveryPointsByResource (..),+ newListRecoveryPointsByResource,++ -- * Request Lenses+ listRecoveryPointsByResource_maxResults,+ listRecoveryPointsByResource_nextToken,+ listRecoveryPointsByResource_resourceArn,++ -- * Destructuring the Response+ ListRecoveryPointsByResourceResponse (..),+ newListRecoveryPointsByResourceResponse,++ -- * Response Lenses+ listRecoveryPointsByResourceResponse_nextToken,+ listRecoveryPointsByResourceResponse_recoveryPoints,+ listRecoveryPointsByResourceResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListRecoveryPointsByResource' smart constructor.+data ListRecoveryPointsByResource = ListRecoveryPointsByResource'+ { -- | The maximum number of items to be returned.+ --+ -- Amazon RDS requires a value of at least 20.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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,+ -- | An ARN that uniquely identifies a resource. The format of the ARN+ -- depends on the resource type.+ resourceArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRecoveryPointsByResource' 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', 'listRecoveryPointsByResource_maxResults' - The maximum number of items to be returned.+--+-- Amazon RDS requires a value of at least 20.+--+-- 'nextToken', 'listRecoveryPointsByResource_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'resourceArn', 'listRecoveryPointsByResource_resourceArn' - An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the resource type.+newListRecoveryPointsByResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListRecoveryPointsByResource+newListRecoveryPointsByResource pResourceArn_ =+ ListRecoveryPointsByResource'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ resourceArn = pResourceArn_+ }++-- | The maximum number of items to be returned.+--+-- Amazon RDS requires a value of at least 20.+listRecoveryPointsByResource_maxResults :: Lens.Lens' ListRecoveryPointsByResource (Prelude.Maybe Prelude.Natural)+listRecoveryPointsByResource_maxResults = Lens.lens (\ListRecoveryPointsByResource' {maxResults} -> maxResults) (\s@ListRecoveryPointsByResource' {} a -> s {maxResults = a} :: ListRecoveryPointsByResource)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listRecoveryPointsByResource_nextToken :: Lens.Lens' ListRecoveryPointsByResource (Prelude.Maybe Prelude.Text)+listRecoveryPointsByResource_nextToken = Lens.lens (\ListRecoveryPointsByResource' {nextToken} -> nextToken) (\s@ListRecoveryPointsByResource' {} a -> s {nextToken = a} :: ListRecoveryPointsByResource)++-- | An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the resource type.+listRecoveryPointsByResource_resourceArn :: Lens.Lens' ListRecoveryPointsByResource Prelude.Text+listRecoveryPointsByResource_resourceArn = Lens.lens (\ListRecoveryPointsByResource' {resourceArn} -> resourceArn) (\s@ListRecoveryPointsByResource' {} a -> s {resourceArn = a} :: ListRecoveryPointsByResource)++instance Core.AWSPager ListRecoveryPointsByResource where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listRecoveryPointsByResourceResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listRecoveryPointsByResourceResponse_recoveryPoints+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listRecoveryPointsByResource_nextToken+ Lens..~ rs+ Lens.^? listRecoveryPointsByResourceResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListRecoveryPointsByResource where+ type+ AWSResponse ListRecoveryPointsByResource =+ ListRecoveryPointsByResourceResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListRecoveryPointsByResourceResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "RecoveryPoints" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ ListRecoveryPointsByResource+ where+ hashWithSalt _salt ListRecoveryPointsByResource' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListRecoveryPointsByResource where+ rnf ListRecoveryPointsByResource' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf resourceArn++instance Data.ToHeaders ListRecoveryPointsByResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListRecoveryPointsByResource where+ toPath ListRecoveryPointsByResource' {..} =+ Prelude.mconcat+ [ "/resources/",+ Data.toBS resourceArn,+ "/recovery-points/"+ ]++instance Data.ToQuery ListRecoveryPointsByResource where+ toQuery ListRecoveryPointsByResource' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListRecoveryPointsByResourceResponse' smart constructor.+data ListRecoveryPointsByResourceResponse = ListRecoveryPointsByResourceResponse'+ { -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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,+ -- | An array of objects that contain detailed information about recovery+ -- points of the specified resource type.+ --+ -- Only Amazon EFS and Amazon EC2 recovery points return BackupVaultName.+ recoveryPoints :: Prelude.Maybe [RecoveryPointByResource],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRecoveryPointsByResourceResponse' 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', 'listRecoveryPointsByResourceResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'recoveryPoints', 'listRecoveryPointsByResourceResponse_recoveryPoints' - An array of objects that contain detailed information about recovery+-- points of the specified resource type.+--+-- Only Amazon EFS and Amazon EC2 recovery points return BackupVaultName.+--+-- 'httpStatus', 'listRecoveryPointsByResourceResponse_httpStatus' - The response's http status code.+newListRecoveryPointsByResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListRecoveryPointsByResourceResponse+newListRecoveryPointsByResourceResponse pHttpStatus_ =+ ListRecoveryPointsByResourceResponse'+ { nextToken =+ Prelude.Nothing,+ recoveryPoints = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listRecoveryPointsByResourceResponse_nextToken :: Lens.Lens' ListRecoveryPointsByResourceResponse (Prelude.Maybe Prelude.Text)+listRecoveryPointsByResourceResponse_nextToken = Lens.lens (\ListRecoveryPointsByResourceResponse' {nextToken} -> nextToken) (\s@ListRecoveryPointsByResourceResponse' {} a -> s {nextToken = a} :: ListRecoveryPointsByResourceResponse)++-- | An array of objects that contain detailed information about recovery+-- points of the specified resource type.+--+-- Only Amazon EFS and Amazon EC2 recovery points return BackupVaultName.+listRecoveryPointsByResourceResponse_recoveryPoints :: Lens.Lens' ListRecoveryPointsByResourceResponse (Prelude.Maybe [RecoveryPointByResource])+listRecoveryPointsByResourceResponse_recoveryPoints = Lens.lens (\ListRecoveryPointsByResourceResponse' {recoveryPoints} -> recoveryPoints) (\s@ListRecoveryPointsByResourceResponse' {} a -> s {recoveryPoints = a} :: ListRecoveryPointsByResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listRecoveryPointsByResourceResponse_httpStatus :: Lens.Lens' ListRecoveryPointsByResourceResponse Prelude.Int+listRecoveryPointsByResourceResponse_httpStatus = Lens.lens (\ListRecoveryPointsByResourceResponse' {httpStatus} -> httpStatus) (\s@ListRecoveryPointsByResourceResponse' {} a -> s {httpStatus = a} :: ListRecoveryPointsByResourceResponse)++instance+ Prelude.NFData+ ListRecoveryPointsByResourceResponse+ where+ rnf ListRecoveryPointsByResourceResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf recoveryPoints+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListReportJobs.hs view
@@ -0,0 +1,281 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.ListReportJobs+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns details about your report jobs.+module Amazonka.Backup.ListReportJobs+ ( -- * Creating a Request+ ListReportJobs (..),+ newListReportJobs,++ -- * Request Lenses+ listReportJobs_byCreationAfter,+ listReportJobs_byCreationBefore,+ listReportJobs_byReportPlanName,+ listReportJobs_byStatus,+ listReportJobs_maxResults,+ listReportJobs_nextToken,++ -- * Destructuring the Response+ ListReportJobsResponse (..),+ newListReportJobsResponse,++ -- * Response Lenses+ listReportJobsResponse_nextToken,+ listReportJobsResponse_reportJobs,+ listReportJobsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListReportJobs' smart constructor.+data ListReportJobs = ListReportJobs'+ { -- | Returns only report jobs that were created after the date and time+ -- specified in Unix format and Coordinated Universal Time (UTC). For+ -- example, the value 1516925490 represents Friday, January 26, 2018+ -- 12:11:30 AM.+ byCreationAfter :: Prelude.Maybe Data.POSIX,+ -- | Returns only report jobs that were created before the date and time+ -- specified in Unix format and Coordinated Universal Time (UTC). For+ -- example, the value 1516925490 represents Friday, January 26, 2018+ -- 12:11:30 AM.+ byCreationBefore :: Prelude.Maybe Data.POSIX,+ -- | Returns only report jobs with the specified report plan name.+ byReportPlanName :: Prelude.Maybe Prelude.Text,+ -- | Returns only report jobs that are in the specified status. The statuses+ -- are:+ --+ -- @CREATED | RUNNING | COMPLETED | FAILED@+ byStatus :: Prelude.Maybe Prelude.Text,+ -- | The number of desired results from 1 to 1000. Optional. If unspecified,+ -- the query will return 1 MB of data.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | An identifier that was returned from the previous call to this+ -- operation, which can be used to return the next set of items in the+ -- list.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListReportJobs' 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:+--+-- 'byCreationAfter', 'listReportJobs_byCreationAfter' - Returns only report jobs that were created after the date and time+-- specified in Unix format and Coordinated Universal Time (UTC). For+-- example, the value 1516925490 represents Friday, January 26, 2018+-- 12:11:30 AM.+--+-- 'byCreationBefore', 'listReportJobs_byCreationBefore' - Returns only report jobs that were created before the date and time+-- specified in Unix format and Coordinated Universal Time (UTC). For+-- example, the value 1516925490 represents Friday, January 26, 2018+-- 12:11:30 AM.+--+-- 'byReportPlanName', 'listReportJobs_byReportPlanName' - Returns only report jobs with the specified report plan name.+--+-- 'byStatus', 'listReportJobs_byStatus' - Returns only report jobs that are in the specified status. The statuses+-- are:+--+-- @CREATED | RUNNING | COMPLETED | FAILED@+--+-- 'maxResults', 'listReportJobs_maxResults' - The number of desired results from 1 to 1000. Optional. If unspecified,+-- the query will return 1 MB of data.+--+-- 'nextToken', 'listReportJobs_nextToken' - An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+newListReportJobs ::+ ListReportJobs+newListReportJobs =+ ListReportJobs'+ { byCreationAfter = Prelude.Nothing,+ byCreationBefore = Prelude.Nothing,+ byReportPlanName = Prelude.Nothing,+ byStatus = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | Returns only report jobs that were created after the date and time+-- specified in Unix format and Coordinated Universal Time (UTC). For+-- example, the value 1516925490 represents Friday, January 26, 2018+-- 12:11:30 AM.+listReportJobs_byCreationAfter :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.UTCTime)+listReportJobs_byCreationAfter = Lens.lens (\ListReportJobs' {byCreationAfter} -> byCreationAfter) (\s@ListReportJobs' {} a -> s {byCreationAfter = a} :: ListReportJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only report jobs that were created before the date and time+-- specified in Unix format and Coordinated Universal Time (UTC). For+-- example, the value 1516925490 represents Friday, January 26, 2018+-- 12:11:30 AM.+listReportJobs_byCreationBefore :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.UTCTime)+listReportJobs_byCreationBefore = Lens.lens (\ListReportJobs' {byCreationBefore} -> byCreationBefore) (\s@ListReportJobs' {} a -> s {byCreationBefore = a} :: ListReportJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only report jobs with the specified report plan name.+listReportJobs_byReportPlanName :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.Text)+listReportJobs_byReportPlanName = Lens.lens (\ListReportJobs' {byReportPlanName} -> byReportPlanName) (\s@ListReportJobs' {} a -> s {byReportPlanName = a} :: ListReportJobs)++-- | Returns only report jobs that are in the specified status. The statuses+-- are:+--+-- @CREATED | RUNNING | COMPLETED | FAILED@+listReportJobs_byStatus :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.Text)+listReportJobs_byStatus = Lens.lens (\ListReportJobs' {byStatus} -> byStatus) (\s@ListReportJobs' {} a -> s {byStatus = a} :: ListReportJobs)++-- | The number of desired results from 1 to 1000. Optional. If unspecified,+-- the query will return 1 MB of data.+listReportJobs_maxResults :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.Natural)+listReportJobs_maxResults = Lens.lens (\ListReportJobs' {maxResults} -> maxResults) (\s@ListReportJobs' {} a -> s {maxResults = a} :: ListReportJobs)++-- | An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+listReportJobs_nextToken :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.Text)+listReportJobs_nextToken = Lens.lens (\ListReportJobs' {nextToken} -> nextToken) (\s@ListReportJobs' {} a -> s {nextToken = a} :: ListReportJobs)++instance Core.AWSRequest ListReportJobs where+ type+ AWSResponse ListReportJobs =+ ListReportJobsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListReportJobsResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "ReportJobs" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListReportJobs where+ hashWithSalt _salt ListReportJobs' {..} =+ _salt+ `Prelude.hashWithSalt` byCreationAfter+ `Prelude.hashWithSalt` byCreationBefore+ `Prelude.hashWithSalt` byReportPlanName+ `Prelude.hashWithSalt` byStatus+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListReportJobs where+ rnf ListReportJobs' {..} =+ Prelude.rnf byCreationAfter+ `Prelude.seq` Prelude.rnf byCreationBefore+ `Prelude.seq` Prelude.rnf byReportPlanName+ `Prelude.seq` Prelude.rnf byStatus+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListReportJobs where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListReportJobs where+ toPath = Prelude.const "/audit/report-jobs"++instance Data.ToQuery ListReportJobs where+ toQuery ListReportJobs' {..} =+ Prelude.mconcat+ [ "CreationAfter" Data.=: byCreationAfter,+ "CreationBefore" Data.=: byCreationBefore,+ "ReportPlanName" Data.=: byReportPlanName,+ "Status" Data.=: byStatus,+ "MaxResults" Data.=: maxResults,+ "NextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListReportJobsResponse' smart constructor.+data ListReportJobsResponse = ListReportJobsResponse'+ { -- | An identifier that was returned from the previous call to this+ -- operation, which can be used to return the next set of items in the+ -- list.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | Details about your report jobs in JSON format.+ reportJobs :: Prelude.Maybe [ReportJob],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListReportJobsResponse' 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', 'listReportJobsResponse_nextToken' - An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+--+-- 'reportJobs', 'listReportJobsResponse_reportJobs' - Details about your report jobs in JSON format.+--+-- 'httpStatus', 'listReportJobsResponse_httpStatus' - The response's http status code.+newListReportJobsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListReportJobsResponse+newListReportJobsResponse pHttpStatus_ =+ ListReportJobsResponse'+ { nextToken =+ Prelude.Nothing,+ reportJobs = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+listReportJobsResponse_nextToken :: Lens.Lens' ListReportJobsResponse (Prelude.Maybe Prelude.Text)+listReportJobsResponse_nextToken = Lens.lens (\ListReportJobsResponse' {nextToken} -> nextToken) (\s@ListReportJobsResponse' {} a -> s {nextToken = a} :: ListReportJobsResponse)++-- | Details about your report jobs in JSON format.+listReportJobsResponse_reportJobs :: Lens.Lens' ListReportJobsResponse (Prelude.Maybe [ReportJob])+listReportJobsResponse_reportJobs = Lens.lens (\ListReportJobsResponse' {reportJobs} -> reportJobs) (\s@ListReportJobsResponse' {} a -> s {reportJobs = a} :: ListReportJobsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listReportJobsResponse_httpStatus :: Lens.Lens' ListReportJobsResponse Prelude.Int+listReportJobsResponse_httpStatus = Lens.lens (\ListReportJobsResponse' {httpStatus} -> httpStatus) (\s@ListReportJobsResponse' {} a -> s {httpStatus = a} :: ListReportJobsResponse)++instance Prelude.NFData ListReportJobsResponse where+ rnf ListReportJobsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf reportJobs+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListReportPlans.hs view
@@ -0,0 +1,215 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.ListReportPlans+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of your report plans. For detailed information about a+-- single report plan, use @DescribeReportPlan@.+module Amazonka.Backup.ListReportPlans+ ( -- * Creating a Request+ ListReportPlans (..),+ newListReportPlans,++ -- * Request Lenses+ listReportPlans_maxResults,+ listReportPlans_nextToken,++ -- * Destructuring the Response+ ListReportPlansResponse (..),+ newListReportPlansResponse,++ -- * Response Lenses+ listReportPlansResponse_nextToken,+ listReportPlansResponse_reportPlans,+ listReportPlansResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListReportPlans' smart constructor.+data ListReportPlans = ListReportPlans'+ { -- | The number of desired results from 1 to 1000. Optional. If unspecified,+ -- the query will return 1 MB of data.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | An identifier that was returned from the previous call to this+ -- operation, which can be used to return the next set of items in the+ -- list.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListReportPlans' 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', 'listReportPlans_maxResults' - The number of desired results from 1 to 1000. Optional. If unspecified,+-- the query will return 1 MB of data.+--+-- 'nextToken', 'listReportPlans_nextToken' - An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+newListReportPlans ::+ ListReportPlans+newListReportPlans =+ ListReportPlans'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The number of desired results from 1 to 1000. Optional. If unspecified,+-- the query will return 1 MB of data.+listReportPlans_maxResults :: Lens.Lens' ListReportPlans (Prelude.Maybe Prelude.Natural)+listReportPlans_maxResults = Lens.lens (\ListReportPlans' {maxResults} -> maxResults) (\s@ListReportPlans' {} a -> s {maxResults = a} :: ListReportPlans)++-- | An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+listReportPlans_nextToken :: Lens.Lens' ListReportPlans (Prelude.Maybe Prelude.Text)+listReportPlans_nextToken = Lens.lens (\ListReportPlans' {nextToken} -> nextToken) (\s@ListReportPlans' {} a -> s {nextToken = a} :: ListReportPlans)++instance Core.AWSRequest ListReportPlans where+ type+ AWSResponse ListReportPlans =+ ListReportPlansResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListReportPlansResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "ReportPlans" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListReportPlans where+ hashWithSalt _salt ListReportPlans' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListReportPlans where+ rnf ListReportPlans' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListReportPlans where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListReportPlans where+ toPath = Prelude.const "/audit/report-plans"++instance Data.ToQuery ListReportPlans where+ toQuery ListReportPlans' {..} =+ Prelude.mconcat+ [ "MaxResults" Data.=: maxResults,+ "NextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListReportPlansResponse' smart constructor.+data ListReportPlansResponse = ListReportPlansResponse'+ { -- | An identifier that was returned from the previous call to this+ -- operation, which can be used to return the next set of items in the+ -- list.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | A list of your report plans with detailed information for each plan.+ -- This information includes the Amazon Resource Name (ARN), report plan+ -- name, description, settings, delivery channel, deployment status,+ -- creation time, and last times the report plan attempted to and+ -- successfully ran.+ reportPlans :: Prelude.Maybe [ReportPlan],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListReportPlansResponse' 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', 'listReportPlansResponse_nextToken' - An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+--+-- 'reportPlans', 'listReportPlansResponse_reportPlans' - A list of your report plans with detailed information for each plan.+-- This information includes the Amazon Resource Name (ARN), report plan+-- name, description, settings, delivery channel, deployment status,+-- creation time, and last times the report plan attempted to and+-- successfully ran.+--+-- 'httpStatus', 'listReportPlansResponse_httpStatus' - The response's http status code.+newListReportPlansResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListReportPlansResponse+newListReportPlansResponse pHttpStatus_ =+ ListReportPlansResponse'+ { nextToken =+ Prelude.Nothing,+ reportPlans = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An identifier that was returned from the previous call to this+-- operation, which can be used to return the next set of items in the+-- list.+listReportPlansResponse_nextToken :: Lens.Lens' ListReportPlansResponse (Prelude.Maybe Prelude.Text)+listReportPlansResponse_nextToken = Lens.lens (\ListReportPlansResponse' {nextToken} -> nextToken) (\s@ListReportPlansResponse' {} a -> s {nextToken = a} :: ListReportPlansResponse)++-- | A list of your report plans with detailed information for each plan.+-- This information includes the Amazon Resource Name (ARN), report plan+-- name, description, settings, delivery channel, deployment status,+-- creation time, and last times the report plan attempted to and+-- successfully ran.+listReportPlansResponse_reportPlans :: Lens.Lens' ListReportPlansResponse (Prelude.Maybe [ReportPlan])+listReportPlansResponse_reportPlans = Lens.lens (\ListReportPlansResponse' {reportPlans} -> reportPlans) (\s@ListReportPlansResponse' {} a -> s {reportPlans = a} :: ListReportPlansResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listReportPlansResponse_httpStatus :: Lens.Lens' ListReportPlansResponse Prelude.Int+listReportPlansResponse_httpStatus = Lens.lens (\ListReportPlansResponse' {httpStatus} -> httpStatus) (\s@ListReportPlansResponse' {} a -> s {httpStatus = a} :: ListReportPlansResponse)++instance Prelude.NFData ListReportPlansResponse where+ rnf ListReportPlansResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf reportPlans+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListRestoreJobs.hs view
@@ -0,0 +1,320 @@+{-# 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.Backup.ListRestoreJobs+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of jobs that Backup initiated to restore a saved+-- resource, including details about the recovery process.+--+-- This operation returns paginated results.+module Amazonka.Backup.ListRestoreJobs+ ( -- * Creating a Request+ ListRestoreJobs (..),+ newListRestoreJobs,++ -- * Request Lenses+ listRestoreJobs_byAccountId,+ listRestoreJobs_byCompleteAfter,+ listRestoreJobs_byCompleteBefore,+ listRestoreJobs_byCreatedAfter,+ listRestoreJobs_byCreatedBefore,+ listRestoreJobs_byStatus,+ listRestoreJobs_maxResults,+ listRestoreJobs_nextToken,++ -- * Destructuring the Response+ ListRestoreJobsResponse (..),+ newListRestoreJobsResponse,++ -- * Response Lenses+ listRestoreJobsResponse_nextToken,+ listRestoreJobsResponse_restoreJobs,+ listRestoreJobsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListRestoreJobs' smart constructor.+data ListRestoreJobs = ListRestoreJobs'+ { -- | The account ID to list the jobs from. Returns only restore jobs+ -- associated with the specified account ID.+ byAccountId :: Prelude.Maybe Prelude.Text,+ -- | Returns only copy jobs completed after a date expressed in Unix format+ -- and Coordinated Universal Time (UTC).+ byCompleteAfter :: Prelude.Maybe Data.POSIX,+ -- | Returns only copy jobs completed before a date expressed in Unix format+ -- and Coordinated Universal Time (UTC).+ byCompleteBefore :: Prelude.Maybe Data.POSIX,+ -- | Returns only restore jobs that were created after the specified date.+ byCreatedAfter :: Prelude.Maybe Data.POSIX,+ -- | Returns only restore jobs that were created before the specified date.+ byCreatedBefore :: Prelude.Maybe Data.POSIX,+ -- | Returns only restore jobs associated with the specified job status.+ byStatus :: Prelude.Maybe RestoreJobStatus,+ -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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 'ListRestoreJobs' 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:+--+-- 'byAccountId', 'listRestoreJobs_byAccountId' - The account ID to list the jobs from. Returns only restore jobs+-- associated with the specified account ID.+--+-- 'byCompleteAfter', 'listRestoreJobs_byCompleteAfter' - Returns only copy jobs completed after a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+--+-- 'byCompleteBefore', 'listRestoreJobs_byCompleteBefore' - Returns only copy jobs completed before a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+--+-- 'byCreatedAfter', 'listRestoreJobs_byCreatedAfter' - Returns only restore jobs that were created after the specified date.+--+-- 'byCreatedBefore', 'listRestoreJobs_byCreatedBefore' - Returns only restore jobs that were created before the specified date.+--+-- 'byStatus', 'listRestoreJobs_byStatus' - Returns only restore jobs associated with the specified job status.+--+-- 'maxResults', 'listRestoreJobs_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listRestoreJobs_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+newListRestoreJobs ::+ ListRestoreJobs+newListRestoreJobs =+ ListRestoreJobs'+ { byAccountId = Prelude.Nothing,+ byCompleteAfter = Prelude.Nothing,+ byCompleteBefore = Prelude.Nothing,+ byCreatedAfter = Prelude.Nothing,+ byCreatedBefore = Prelude.Nothing,+ byStatus = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The account ID to list the jobs from. Returns only restore jobs+-- associated with the specified account ID.+listRestoreJobs_byAccountId :: Lens.Lens' ListRestoreJobs (Prelude.Maybe Prelude.Text)+listRestoreJobs_byAccountId = Lens.lens (\ListRestoreJobs' {byAccountId} -> byAccountId) (\s@ListRestoreJobs' {} a -> s {byAccountId = a} :: ListRestoreJobs)++-- | Returns only copy jobs completed after a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+listRestoreJobs_byCompleteAfter :: Lens.Lens' ListRestoreJobs (Prelude.Maybe Prelude.UTCTime)+listRestoreJobs_byCompleteAfter = Lens.lens (\ListRestoreJobs' {byCompleteAfter} -> byCompleteAfter) (\s@ListRestoreJobs' {} a -> s {byCompleteAfter = a} :: ListRestoreJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only copy jobs completed before a date expressed in Unix format+-- and Coordinated Universal Time (UTC).+listRestoreJobs_byCompleteBefore :: Lens.Lens' ListRestoreJobs (Prelude.Maybe Prelude.UTCTime)+listRestoreJobs_byCompleteBefore = Lens.lens (\ListRestoreJobs' {byCompleteBefore} -> byCompleteBefore) (\s@ListRestoreJobs' {} a -> s {byCompleteBefore = a} :: ListRestoreJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only restore jobs that were created after the specified date.+listRestoreJobs_byCreatedAfter :: Lens.Lens' ListRestoreJobs (Prelude.Maybe Prelude.UTCTime)+listRestoreJobs_byCreatedAfter = Lens.lens (\ListRestoreJobs' {byCreatedAfter} -> byCreatedAfter) (\s@ListRestoreJobs' {} a -> s {byCreatedAfter = a} :: ListRestoreJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only restore jobs that were created before the specified date.+listRestoreJobs_byCreatedBefore :: Lens.Lens' ListRestoreJobs (Prelude.Maybe Prelude.UTCTime)+listRestoreJobs_byCreatedBefore = Lens.lens (\ListRestoreJobs' {byCreatedBefore} -> byCreatedBefore) (\s@ListRestoreJobs' {} a -> s {byCreatedBefore = a} :: ListRestoreJobs) Prelude.. Lens.mapping Data._Time++-- | Returns only restore jobs associated with the specified job status.+listRestoreJobs_byStatus :: Lens.Lens' ListRestoreJobs (Prelude.Maybe RestoreJobStatus)+listRestoreJobs_byStatus = Lens.lens (\ListRestoreJobs' {byStatus} -> byStatus) (\s@ListRestoreJobs' {} a -> s {byStatus = a} :: ListRestoreJobs)++-- | The maximum number of items to be returned.+listRestoreJobs_maxResults :: Lens.Lens' ListRestoreJobs (Prelude.Maybe Prelude.Natural)+listRestoreJobs_maxResults = Lens.lens (\ListRestoreJobs' {maxResults} -> maxResults) (\s@ListRestoreJobs' {} a -> s {maxResults = a} :: ListRestoreJobs)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listRestoreJobs_nextToken :: Lens.Lens' ListRestoreJobs (Prelude.Maybe Prelude.Text)+listRestoreJobs_nextToken = Lens.lens (\ListRestoreJobs' {nextToken} -> nextToken) (\s@ListRestoreJobs' {} a -> s {nextToken = a} :: ListRestoreJobs)++instance Core.AWSPager ListRestoreJobs where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listRestoreJobsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listRestoreJobsResponse_restoreJobs+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listRestoreJobs_nextToken+ Lens..~ rs+ Lens.^? listRestoreJobsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListRestoreJobs where+ type+ AWSResponse ListRestoreJobs =+ ListRestoreJobsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListRestoreJobsResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "RestoreJobs" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListRestoreJobs where+ hashWithSalt _salt ListRestoreJobs' {..} =+ _salt+ `Prelude.hashWithSalt` byAccountId+ `Prelude.hashWithSalt` byCompleteAfter+ `Prelude.hashWithSalt` byCompleteBefore+ `Prelude.hashWithSalt` byCreatedAfter+ `Prelude.hashWithSalt` byCreatedBefore+ `Prelude.hashWithSalt` byStatus+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListRestoreJobs where+ rnf ListRestoreJobs' {..} =+ Prelude.rnf byAccountId+ `Prelude.seq` Prelude.rnf byCompleteAfter+ `Prelude.seq` Prelude.rnf byCompleteBefore+ `Prelude.seq` Prelude.rnf byCreatedAfter+ `Prelude.seq` Prelude.rnf byCreatedBefore+ `Prelude.seq` Prelude.rnf byStatus+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListRestoreJobs where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListRestoreJobs where+ toPath = Prelude.const "/restore-jobs/"++instance Data.ToQuery ListRestoreJobs where+ toQuery ListRestoreJobs' {..} =+ Prelude.mconcat+ [ "accountId" Data.=: byAccountId,+ "completeAfter" Data.=: byCompleteAfter,+ "completeBefore" Data.=: byCompleteBefore,+ "createdAfter" Data.=: byCreatedAfter,+ "createdBefore" Data.=: byCreatedBefore,+ "status" Data.=: byStatus,+ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListRestoreJobsResponse' smart constructor.+data ListRestoreJobsResponse = ListRestoreJobsResponse'+ { -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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,+ -- | An array of objects that contain detailed information about jobs to+ -- restore saved resources.+ restoreJobs :: Prelude.Maybe [RestoreJobsListMember],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRestoreJobsResponse' 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', 'listRestoreJobsResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'restoreJobs', 'listRestoreJobsResponse_restoreJobs' - An array of objects that contain detailed information about jobs to+-- restore saved resources.+--+-- 'httpStatus', 'listRestoreJobsResponse_httpStatus' - The response's http status code.+newListRestoreJobsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListRestoreJobsResponse+newListRestoreJobsResponse pHttpStatus_ =+ ListRestoreJobsResponse'+ { nextToken =+ Prelude.Nothing,+ restoreJobs = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listRestoreJobsResponse_nextToken :: Lens.Lens' ListRestoreJobsResponse (Prelude.Maybe Prelude.Text)+listRestoreJobsResponse_nextToken = Lens.lens (\ListRestoreJobsResponse' {nextToken} -> nextToken) (\s@ListRestoreJobsResponse' {} a -> s {nextToken = a} :: ListRestoreJobsResponse)++-- | An array of objects that contain detailed information about jobs to+-- restore saved resources.+listRestoreJobsResponse_restoreJobs :: Lens.Lens' ListRestoreJobsResponse (Prelude.Maybe [RestoreJobsListMember])+listRestoreJobsResponse_restoreJobs = Lens.lens (\ListRestoreJobsResponse' {restoreJobs} -> restoreJobs) (\s@ListRestoreJobsResponse' {} a -> s {restoreJobs = a} :: ListRestoreJobsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listRestoreJobsResponse_httpStatus :: Lens.Lens' ListRestoreJobsResponse Prelude.Int+listRestoreJobsResponse_httpStatus = Lens.lens (\ListRestoreJobsResponse' {httpStatus} -> httpStatus) (\s@ListRestoreJobsResponse' {} a -> s {httpStatus = a} :: ListRestoreJobsResponse)++instance Prelude.NFData ListRestoreJobsResponse where+ rnf ListRestoreJobsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf restoreJobs+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/ListTags.hs view
@@ -0,0 +1,234 @@+{-# 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.Backup.ListTags+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of key-value pairs assigned to a target recovery point,+-- backup plan, or backup vault.+--+-- @ListTags@ only works for resource types that support full Backup+-- management of their backups. Those resource types are listed in the+-- \"Full Backup management\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table.+module Amazonka.Backup.ListTags+ ( -- * Creating a Request+ ListTags (..),+ newListTags,++ -- * Request Lenses+ listTags_maxResults,+ listTags_nextToken,+ listTags_resourceArn,++ -- * Destructuring the Response+ ListTagsResponse (..),+ newListTagsResponse,++ -- * Response Lenses+ listTagsResponse_nextToken,+ listTagsResponse_tags,+ listTagsResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newListTags' smart constructor.+data ListTags = ListTags'+ { -- | The maximum number of items to be returned.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the type of resource. Valid targets for+ -- @ListTags@ are recovery points, backup plans, and backup vaults.+ resourceArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTags' 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', 'listTags_maxResults' - The maximum number of items to be returned.+--+-- 'nextToken', 'listTags_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'resourceArn', 'listTags_resourceArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the type of resource. Valid targets for+-- @ListTags@ are recovery points, backup plans, and backup vaults.+newListTags ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTags+newListTags pResourceArn_ =+ ListTags'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ resourceArn = pResourceArn_+ }++-- | The maximum number of items to be returned.+listTags_maxResults :: Lens.Lens' ListTags (Prelude.Maybe Prelude.Natural)+listTags_maxResults = Lens.lens (\ListTags' {maxResults} -> maxResults) (\s@ListTags' {} a -> s {maxResults = a} :: ListTags)++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listTags_nextToken :: Lens.Lens' ListTags (Prelude.Maybe Prelude.Text)+listTags_nextToken = Lens.lens (\ListTags' {nextToken} -> nextToken) (\s@ListTags' {} a -> s {nextToken = a} :: ListTags)++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the type of resource. Valid targets for+-- @ListTags@ are recovery points, backup plans, and backup vaults.+listTags_resourceArn :: Lens.Lens' ListTags Prelude.Text+listTags_resourceArn = Lens.lens (\ListTags' {resourceArn} -> resourceArn) (\s@ListTags' {} a -> s {resourceArn = a} :: ListTags)++instance Core.AWSRequest ListTags where+ type AWSResponse ListTags = ListTagsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListTagsResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListTags where+ hashWithSalt _salt ListTags' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTags where+ rnf ListTags' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf resourceArn++instance Data.ToHeaders ListTags where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListTags where+ toPath ListTags' {..} =+ Prelude.mconcat+ ["/tags/", Data.toBS resourceArn, "/"]++instance Data.ToQuery ListTags where+ toQuery ListTags' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListTagsResponse' smart constructor.+data ListTagsResponse = ListTagsResponse'+ { -- | The next item following a partial list of returned items. For example,+ -- if a request is made to return @maxResults@ number of items, @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,+ -- | To help organize your resources, you can assign your own metadata to the+ -- resources you create. Each tag is a key-value pair.+ tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsResponse' 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', 'listTagsResponse_nextToken' - The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+--+-- 'tags', 'listTagsResponse_tags' - To help organize your resources, you can assign your own metadata to the+-- resources you create. Each tag is a key-value pair.+--+-- 'httpStatus', 'listTagsResponse_httpStatus' - The response's http status code.+newListTagsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsResponse+newListTagsResponse pHttpStatus_ =+ ListTagsResponse'+ { nextToken = Prelude.Nothing,+ tags = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The next item following a partial list of returned items. For example,+-- if a request is made to return @maxResults@ number of items, @NextToken@+-- allows you to return more items in your list starting at the location+-- pointed to by the next token.+listTagsResponse_nextToken :: Lens.Lens' ListTagsResponse (Prelude.Maybe Prelude.Text)+listTagsResponse_nextToken = Lens.lens (\ListTagsResponse' {nextToken} -> nextToken) (\s@ListTagsResponse' {} a -> s {nextToken = a} :: ListTagsResponse)++-- | To help organize your resources, you can assign your own metadata to the+-- resources you create. Each tag is a key-value pair.+listTagsResponse_tags :: Lens.Lens' ListTagsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+listTagsResponse_tags = Lens.lens (\ListTagsResponse' {tags} -> tags) (\s@ListTagsResponse' {} a -> s {tags = a} :: ListTagsResponse) Prelude.. Lens.mapping (Data._Sensitive Prelude.. Lens.coerced)++-- | The response's http status code.+listTagsResponse_httpStatus :: Lens.Lens' ListTagsResponse Prelude.Int+listTagsResponse_httpStatus = Lens.lens (\ListTagsResponse' {httpStatus} -> httpStatus) (\s@ListTagsResponse' {} a -> s {httpStatus = a} :: ListTagsResponse)++instance Prelude.NFData ListTagsResponse where+ rnf ListTagsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/PutBackupVaultAccessPolicy.hs view
@@ -0,0 +1,166 @@+{-# 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.Backup.PutBackupVaultAccessPolicy+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets a resource-based policy that is used to manage access permissions+-- on the target backup vault. Requires a backup vault name and an access+-- policy document in JSON format.+module Amazonka.Backup.PutBackupVaultAccessPolicy+ ( -- * Creating a Request+ PutBackupVaultAccessPolicy (..),+ newPutBackupVaultAccessPolicy,++ -- * Request Lenses+ putBackupVaultAccessPolicy_policy,+ putBackupVaultAccessPolicy_backupVaultName,++ -- * Destructuring the Response+ PutBackupVaultAccessPolicyResponse (..),+ newPutBackupVaultAccessPolicyResponse,+ )+where++import Amazonka.Backup.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:/ 'newPutBackupVaultAccessPolicy' smart constructor.+data PutBackupVaultAccessPolicy = PutBackupVaultAccessPolicy'+ { -- | The backup vault access policy document in JSON format.+ policy :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutBackupVaultAccessPolicy' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'policy', 'putBackupVaultAccessPolicy_policy' - The backup vault access policy document in JSON format.+--+-- 'backupVaultName', 'putBackupVaultAccessPolicy_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+newPutBackupVaultAccessPolicy ::+ -- | 'backupVaultName'+ Prelude.Text ->+ PutBackupVaultAccessPolicy+newPutBackupVaultAccessPolicy pBackupVaultName_ =+ PutBackupVaultAccessPolicy'+ { policy =+ Prelude.Nothing,+ backupVaultName = pBackupVaultName_+ }++-- | The backup vault access policy document in JSON format.+putBackupVaultAccessPolicy_policy :: Lens.Lens' PutBackupVaultAccessPolicy (Prelude.Maybe Prelude.Text)+putBackupVaultAccessPolicy_policy = Lens.lens (\PutBackupVaultAccessPolicy' {policy} -> policy) (\s@PutBackupVaultAccessPolicy' {} a -> s {policy = a} :: PutBackupVaultAccessPolicy)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+putBackupVaultAccessPolicy_backupVaultName :: Lens.Lens' PutBackupVaultAccessPolicy Prelude.Text+putBackupVaultAccessPolicy_backupVaultName = Lens.lens (\PutBackupVaultAccessPolicy' {backupVaultName} -> backupVaultName) (\s@PutBackupVaultAccessPolicy' {} a -> s {backupVaultName = a} :: PutBackupVaultAccessPolicy)++instance Core.AWSRequest PutBackupVaultAccessPolicy where+ type+ AWSResponse PutBackupVaultAccessPolicy =+ PutBackupVaultAccessPolicyResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveNull+ PutBackupVaultAccessPolicyResponse'++instance Prelude.Hashable PutBackupVaultAccessPolicy where+ hashWithSalt _salt PutBackupVaultAccessPolicy' {..} =+ _salt+ `Prelude.hashWithSalt` policy+ `Prelude.hashWithSalt` backupVaultName++instance Prelude.NFData PutBackupVaultAccessPolicy where+ rnf PutBackupVaultAccessPolicy' {..} =+ Prelude.rnf policy+ `Prelude.seq` Prelude.rnf backupVaultName++instance Data.ToHeaders PutBackupVaultAccessPolicy where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutBackupVaultAccessPolicy where+ toJSON PutBackupVaultAccessPolicy' {..} =+ Data.object+ ( Prelude.catMaybes+ [("Policy" Data..=) Prelude.<$> policy]+ )++instance Data.ToPath PutBackupVaultAccessPolicy where+ toPath PutBackupVaultAccessPolicy' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/access-policy"+ ]++instance Data.ToQuery PutBackupVaultAccessPolicy where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutBackupVaultAccessPolicyResponse' smart constructor.+data PutBackupVaultAccessPolicyResponse = PutBackupVaultAccessPolicyResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutBackupVaultAccessPolicyResponse' 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.+newPutBackupVaultAccessPolicyResponse ::+ PutBackupVaultAccessPolicyResponse+newPutBackupVaultAccessPolicyResponse =+ PutBackupVaultAccessPolicyResponse'++instance+ Prelude.NFData+ PutBackupVaultAccessPolicyResponse+ where+ rnf _ = ()
+ gen/Amazonka/Backup/PutBackupVaultLockConfiguration.hs view
@@ -0,0 +1,357 @@+{-# 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.Backup.PutBackupVaultLockConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Applies Backup Vault Lock to a backup vault, preventing attempts to+-- delete any recovery point stored in or created in a backup vault. Vault+-- Lock also prevents attempts to update the lifecycle policy that controls+-- the retention period of any recovery point currently stored in a backup+-- vault. If specified, Vault Lock enforces a minimum and maximum retention+-- period for future backup and copy jobs that target a backup vault.+--+-- Backup Vault Lock has yet to receive a third-party assessment for SEC+-- 17a-4(f) and CFTC.+module Amazonka.Backup.PutBackupVaultLockConfiguration+ ( -- * Creating a Request+ PutBackupVaultLockConfiguration (..),+ newPutBackupVaultLockConfiguration,++ -- * Request Lenses+ putBackupVaultLockConfiguration_changeableForDays,+ putBackupVaultLockConfiguration_maxRetentionDays,+ putBackupVaultLockConfiguration_minRetentionDays,+ putBackupVaultLockConfiguration_backupVaultName,++ -- * Destructuring the Response+ PutBackupVaultLockConfigurationResponse (..),+ newPutBackupVaultLockConfigurationResponse,+ )+where++import Amazonka.Backup.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:/ 'newPutBackupVaultLockConfiguration' smart constructor.+data PutBackupVaultLockConfiguration = PutBackupVaultLockConfiguration'+ { -- | The Backup Vault Lock configuration that specifies the number of days+ -- before the lock date. For example, setting @ChangeableForDays@ to 30 on+ -- Jan. 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm+ -- UTC.+ --+ -- Backup enforces a 72-hour cooling-off period before Vault Lock takes+ -- effect and becomes immutable. Therefore, you must set+ -- @ChangeableForDays@ to 3 or greater.+ --+ -- Before the lock date, you can delete Vault Lock from the vault using+ -- @DeleteBackupVaultLockConfiguration@ or change the Vault Lock+ -- configuration using @PutBackupVaultLockConfiguration@. On and after the+ -- lock date, the Vault Lock becomes immutable and cannot be changed or+ -- deleted.+ --+ -- If this parameter is not specified, you can delete Vault Lock from the+ -- vault using @DeleteBackupVaultLockConfiguration@ or change the Vault+ -- Lock configuration using @PutBackupVaultLockConfiguration@ at any time.+ changeableForDays :: Prelude.Maybe Prelude.Integer,+ -- | The Backup Vault Lock configuration that specifies the maximum retention+ -- period that the vault retains its recovery points. This setting can be+ -- useful if, for example, your organization\'s policies require you to+ -- destroy certain data after retaining it for four years (1460 days).+ --+ -- If this parameter is not included, Vault Lock does not enforce a maximum+ -- retention period on the recovery points in the vault. If this parameter+ -- is included without a value, Vault Lock will not enforce a maximum+ -- retention period.+ --+ -- If this parameter is specified, any backup or copy job to the vault must+ -- have a lifecycle policy with a retention period equal to or shorter than+ -- the maximum retention period. If the job\'s retention period is longer+ -- than that maximum retention period, then the vault fails the backup or+ -- copy job, and you should either modify your lifecycle settings or use a+ -- different vault. The longest maximum retention period you can specify is+ -- 36500 days (approximately 100 years). Recovery points already saved in+ -- the vault prior to Vault Lock are not affected.+ maxRetentionDays :: Prelude.Maybe Prelude.Integer,+ -- | The Backup Vault Lock configuration that specifies the minimum retention+ -- period that the vault retains its recovery points. This setting can be+ -- useful if, for example, your organization\'s policies require you to+ -- retain certain data for at least seven years (2555 days).+ --+ -- If this parameter is not specified, Vault Lock will not enforce a+ -- minimum retention period.+ --+ -- If this parameter is specified, any backup or copy job to the vault must+ -- have a lifecycle policy with a retention period equal to or longer than+ -- the minimum retention period. If the job\'s retention period is shorter+ -- than that minimum retention period, then the vault fails that backup or+ -- copy job, and you should either modify your lifecycle settings or use a+ -- different vault. The shortest minimum retention period you can specify+ -- is 1 day. Recovery points already saved in the vault prior to Vault Lock+ -- are not affected.+ minRetentionDays :: Prelude.Maybe Prelude.Integer,+ -- | The Backup Vault Lock configuration that specifies the name of the+ -- backup vault it protects.+ backupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutBackupVaultLockConfiguration' 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:+--+-- 'changeableForDays', 'putBackupVaultLockConfiguration_changeableForDays' - The Backup Vault Lock configuration that specifies the number of days+-- before the lock date. For example, setting @ChangeableForDays@ to 30 on+-- Jan. 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm+-- UTC.+--+-- Backup enforces a 72-hour cooling-off period before Vault Lock takes+-- effect and becomes immutable. Therefore, you must set+-- @ChangeableForDays@ to 3 or greater.+--+-- Before the lock date, you can delete Vault Lock from the vault using+-- @DeleteBackupVaultLockConfiguration@ or change the Vault Lock+-- configuration using @PutBackupVaultLockConfiguration@. On and after the+-- lock date, the Vault Lock becomes immutable and cannot be changed or+-- deleted.+--+-- If this parameter is not specified, you can delete Vault Lock from the+-- vault using @DeleteBackupVaultLockConfiguration@ or change the Vault+-- Lock configuration using @PutBackupVaultLockConfiguration@ at any time.+--+-- 'maxRetentionDays', 'putBackupVaultLockConfiguration_maxRetentionDays' - The Backup Vault Lock configuration that specifies the maximum retention+-- period that the vault retains its recovery points. This setting can be+-- useful if, for example, your organization\'s policies require you to+-- destroy certain data after retaining it for four years (1460 days).+--+-- If this parameter is not included, Vault Lock does not enforce a maximum+-- retention period on the recovery points in the vault. If this parameter+-- is included without a value, Vault Lock will not enforce a maximum+-- retention period.+--+-- If this parameter is specified, any backup or copy job to the vault must+-- have a lifecycle policy with a retention period equal to or shorter than+-- the maximum retention period. If the job\'s retention period is longer+-- than that maximum retention period, then the vault fails the backup or+-- copy job, and you should either modify your lifecycle settings or use a+-- different vault. The longest maximum retention period you can specify is+-- 36500 days (approximately 100 years). Recovery points already saved in+-- the vault prior to Vault Lock are not affected.+--+-- 'minRetentionDays', 'putBackupVaultLockConfiguration_minRetentionDays' - The Backup Vault Lock configuration that specifies the minimum retention+-- period that the vault retains its recovery points. This setting can be+-- useful if, for example, your organization\'s policies require you to+-- retain certain data for at least seven years (2555 days).+--+-- If this parameter is not specified, Vault Lock will not enforce a+-- minimum retention period.+--+-- If this parameter is specified, any backup or copy job to the vault must+-- have a lifecycle policy with a retention period equal to or longer than+-- the minimum retention period. If the job\'s retention period is shorter+-- than that minimum retention period, then the vault fails that backup or+-- copy job, and you should either modify your lifecycle settings or use a+-- different vault. The shortest minimum retention period you can specify+-- is 1 day. Recovery points already saved in the vault prior to Vault Lock+-- are not affected.+--+-- 'backupVaultName', 'putBackupVaultLockConfiguration_backupVaultName' - The Backup Vault Lock configuration that specifies the name of the+-- backup vault it protects.+newPutBackupVaultLockConfiguration ::+ -- | 'backupVaultName'+ Prelude.Text ->+ PutBackupVaultLockConfiguration+newPutBackupVaultLockConfiguration pBackupVaultName_ =+ PutBackupVaultLockConfiguration'+ { changeableForDays =+ Prelude.Nothing,+ maxRetentionDays = Prelude.Nothing,+ minRetentionDays = Prelude.Nothing,+ backupVaultName = pBackupVaultName_+ }++-- | The Backup Vault Lock configuration that specifies the number of days+-- before the lock date. For example, setting @ChangeableForDays@ to 30 on+-- Jan. 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm+-- UTC.+--+-- Backup enforces a 72-hour cooling-off period before Vault Lock takes+-- effect and becomes immutable. Therefore, you must set+-- @ChangeableForDays@ to 3 or greater.+--+-- Before the lock date, you can delete Vault Lock from the vault using+-- @DeleteBackupVaultLockConfiguration@ or change the Vault Lock+-- configuration using @PutBackupVaultLockConfiguration@. On and after the+-- lock date, the Vault Lock becomes immutable and cannot be changed or+-- deleted.+--+-- If this parameter is not specified, you can delete Vault Lock from the+-- vault using @DeleteBackupVaultLockConfiguration@ or change the Vault+-- Lock configuration using @PutBackupVaultLockConfiguration@ at any time.+putBackupVaultLockConfiguration_changeableForDays :: Lens.Lens' PutBackupVaultLockConfiguration (Prelude.Maybe Prelude.Integer)+putBackupVaultLockConfiguration_changeableForDays = Lens.lens (\PutBackupVaultLockConfiguration' {changeableForDays} -> changeableForDays) (\s@PutBackupVaultLockConfiguration' {} a -> s {changeableForDays = a} :: PutBackupVaultLockConfiguration)++-- | The Backup Vault Lock configuration that specifies the maximum retention+-- period that the vault retains its recovery points. This setting can be+-- useful if, for example, your organization\'s policies require you to+-- destroy certain data after retaining it for four years (1460 days).+--+-- If this parameter is not included, Vault Lock does not enforce a maximum+-- retention period on the recovery points in the vault. If this parameter+-- is included without a value, Vault Lock will not enforce a maximum+-- retention period.+--+-- If this parameter is specified, any backup or copy job to the vault must+-- have a lifecycle policy with a retention period equal to or shorter than+-- the maximum retention period. If the job\'s retention period is longer+-- than that maximum retention period, then the vault fails the backup or+-- copy job, and you should either modify your lifecycle settings or use a+-- different vault. The longest maximum retention period you can specify is+-- 36500 days (approximately 100 years). Recovery points already saved in+-- the vault prior to Vault Lock are not affected.+putBackupVaultLockConfiguration_maxRetentionDays :: Lens.Lens' PutBackupVaultLockConfiguration (Prelude.Maybe Prelude.Integer)+putBackupVaultLockConfiguration_maxRetentionDays = Lens.lens (\PutBackupVaultLockConfiguration' {maxRetentionDays} -> maxRetentionDays) (\s@PutBackupVaultLockConfiguration' {} a -> s {maxRetentionDays = a} :: PutBackupVaultLockConfiguration)++-- | The Backup Vault Lock configuration that specifies the minimum retention+-- period that the vault retains its recovery points. This setting can be+-- useful if, for example, your organization\'s policies require you to+-- retain certain data for at least seven years (2555 days).+--+-- If this parameter is not specified, Vault Lock will not enforce a+-- minimum retention period.+--+-- If this parameter is specified, any backup or copy job to the vault must+-- have a lifecycle policy with a retention period equal to or longer than+-- the minimum retention period. If the job\'s retention period is shorter+-- than that minimum retention period, then the vault fails that backup or+-- copy job, and you should either modify your lifecycle settings or use a+-- different vault. The shortest minimum retention period you can specify+-- is 1 day. Recovery points already saved in the vault prior to Vault Lock+-- are not affected.+putBackupVaultLockConfiguration_minRetentionDays :: Lens.Lens' PutBackupVaultLockConfiguration (Prelude.Maybe Prelude.Integer)+putBackupVaultLockConfiguration_minRetentionDays = Lens.lens (\PutBackupVaultLockConfiguration' {minRetentionDays} -> minRetentionDays) (\s@PutBackupVaultLockConfiguration' {} a -> s {minRetentionDays = a} :: PutBackupVaultLockConfiguration)++-- | The Backup Vault Lock configuration that specifies the name of the+-- backup vault it protects.+putBackupVaultLockConfiguration_backupVaultName :: Lens.Lens' PutBackupVaultLockConfiguration Prelude.Text+putBackupVaultLockConfiguration_backupVaultName = Lens.lens (\PutBackupVaultLockConfiguration' {backupVaultName} -> backupVaultName) (\s@PutBackupVaultLockConfiguration' {} a -> s {backupVaultName = a} :: PutBackupVaultLockConfiguration)++instance+ Core.AWSRequest+ PutBackupVaultLockConfiguration+ where+ type+ AWSResponse PutBackupVaultLockConfiguration =+ PutBackupVaultLockConfigurationResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveNull+ PutBackupVaultLockConfigurationResponse'++instance+ Prelude.Hashable+ PutBackupVaultLockConfiguration+ where+ hashWithSalt+ _salt+ PutBackupVaultLockConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` changeableForDays+ `Prelude.hashWithSalt` maxRetentionDays+ `Prelude.hashWithSalt` minRetentionDays+ `Prelude.hashWithSalt` backupVaultName++instance+ Prelude.NFData+ PutBackupVaultLockConfiguration+ where+ rnf PutBackupVaultLockConfiguration' {..} =+ Prelude.rnf changeableForDays+ `Prelude.seq` Prelude.rnf maxRetentionDays+ `Prelude.seq` Prelude.rnf minRetentionDays+ `Prelude.seq` Prelude.rnf backupVaultName++instance+ Data.ToHeaders+ PutBackupVaultLockConfiguration+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutBackupVaultLockConfiguration where+ toJSON PutBackupVaultLockConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ChangeableForDays" Data..=)+ Prelude.<$> changeableForDays,+ ("MaxRetentionDays" Data..=)+ Prelude.<$> maxRetentionDays,+ ("MinRetentionDays" Data..=)+ Prelude.<$> minRetentionDays+ ]+ )++instance Data.ToPath PutBackupVaultLockConfiguration where+ toPath PutBackupVaultLockConfiguration' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/vault-lock"+ ]++instance Data.ToQuery PutBackupVaultLockConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutBackupVaultLockConfigurationResponse' smart constructor.+data PutBackupVaultLockConfigurationResponse = PutBackupVaultLockConfigurationResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutBackupVaultLockConfigurationResponse' 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.+newPutBackupVaultLockConfigurationResponse ::+ PutBackupVaultLockConfigurationResponse+newPutBackupVaultLockConfigurationResponse =+ PutBackupVaultLockConfigurationResponse'++instance+ Prelude.NFData+ PutBackupVaultLockConfigurationResponse+ where+ rnf _ = ()
+ gen/Amazonka/Backup/PutBackupVaultNotifications.hs view
@@ -0,0 +1,250 @@+{-# 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.Backup.PutBackupVaultNotifications+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Turns on notifications on a backup vault for the specified topic and+-- events.+module Amazonka.Backup.PutBackupVaultNotifications+ ( -- * Creating a Request+ PutBackupVaultNotifications (..),+ newPutBackupVaultNotifications,++ -- * Request Lenses+ putBackupVaultNotifications_backupVaultName,+ putBackupVaultNotifications_sNSTopicArn,+ putBackupVaultNotifications_backupVaultEvents,++ -- * Destructuring the Response+ PutBackupVaultNotificationsResponse (..),+ newPutBackupVaultNotificationsResponse,+ )+where++import Amazonka.Backup.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:/ 'newPutBackupVaultNotifications' smart constructor.+data PutBackupVaultNotifications = PutBackupVaultNotifications'+ { -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text,+ -- | The Amazon Resource Name (ARN) that specifies the topic for a backup+ -- vault’s events; for example,+ -- @arn:aws:sns:us-west-2:111122223333:MyVaultTopic@.+ sNSTopicArn :: Prelude.Text,+ -- | An array of events that indicate the status of jobs to back up resources+ -- to the backup vault.+ --+ -- For common use cases and code samples, see+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/sns-notifications.html Using Amazon SNS to track Backup events>.+ --+ -- The following events are supported:+ --+ -- - @BACKUP_JOB_STARTED@ | @BACKUP_JOB_COMPLETED@+ --+ -- - @COPY_JOB_STARTED@ | @COPY_JOB_SUCCESSFUL@ | @COPY_JOB_FAILED@+ --+ -- - @RESTORE_JOB_STARTED@ | @RESTORE_JOB_COMPLETED@ |+ -- @RECOVERY_POINT_MODIFIED@+ --+ -- - @S3_BACKUP_OBJECT_FAILED@ | @S3_RESTORE_OBJECT_FAILED@+ --+ -- The list below shows items that are deprecated events (for reference)+ -- and are no longer in use. They are no longer supported and will not+ -- return statuses or notifications. Refer to the list above for current+ -- supported events.+ backupVaultEvents :: [BackupVaultEvent]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutBackupVaultNotifications' 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:+--+-- 'backupVaultName', 'putBackupVaultNotifications_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'sNSTopicArn', 'putBackupVaultNotifications_sNSTopicArn' - The Amazon Resource Name (ARN) that specifies the topic for a backup+-- vault’s events; for example,+-- @arn:aws:sns:us-west-2:111122223333:MyVaultTopic@.+--+-- 'backupVaultEvents', 'putBackupVaultNotifications_backupVaultEvents' - An array of events that indicate the status of jobs to back up resources+-- to the backup vault.+--+-- For common use cases and code samples, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/sns-notifications.html Using Amazon SNS to track Backup events>.+--+-- The following events are supported:+--+-- - @BACKUP_JOB_STARTED@ | @BACKUP_JOB_COMPLETED@+--+-- - @COPY_JOB_STARTED@ | @COPY_JOB_SUCCESSFUL@ | @COPY_JOB_FAILED@+--+-- - @RESTORE_JOB_STARTED@ | @RESTORE_JOB_COMPLETED@ |+-- @RECOVERY_POINT_MODIFIED@+--+-- - @S3_BACKUP_OBJECT_FAILED@ | @S3_RESTORE_OBJECT_FAILED@+--+-- The list below shows items that are deprecated events (for reference)+-- and are no longer in use. They are no longer supported and will not+-- return statuses or notifications. Refer to the list above for current+-- supported events.+newPutBackupVaultNotifications ::+ -- | 'backupVaultName'+ Prelude.Text ->+ -- | 'sNSTopicArn'+ Prelude.Text ->+ PutBackupVaultNotifications+newPutBackupVaultNotifications+ pBackupVaultName_+ pSNSTopicArn_ =+ PutBackupVaultNotifications'+ { backupVaultName =+ pBackupVaultName_,+ sNSTopicArn = pSNSTopicArn_,+ backupVaultEvents = Prelude.mempty+ }++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+putBackupVaultNotifications_backupVaultName :: Lens.Lens' PutBackupVaultNotifications Prelude.Text+putBackupVaultNotifications_backupVaultName = Lens.lens (\PutBackupVaultNotifications' {backupVaultName} -> backupVaultName) (\s@PutBackupVaultNotifications' {} a -> s {backupVaultName = a} :: PutBackupVaultNotifications)++-- | The Amazon Resource Name (ARN) that specifies the topic for a backup+-- vault’s events; for example,+-- @arn:aws:sns:us-west-2:111122223333:MyVaultTopic@.+putBackupVaultNotifications_sNSTopicArn :: Lens.Lens' PutBackupVaultNotifications Prelude.Text+putBackupVaultNotifications_sNSTopicArn = Lens.lens (\PutBackupVaultNotifications' {sNSTopicArn} -> sNSTopicArn) (\s@PutBackupVaultNotifications' {} a -> s {sNSTopicArn = a} :: PutBackupVaultNotifications)++-- | An array of events that indicate the status of jobs to back up resources+-- to the backup vault.+--+-- For common use cases and code samples, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/sns-notifications.html Using Amazon SNS to track Backup events>.+--+-- The following events are supported:+--+-- - @BACKUP_JOB_STARTED@ | @BACKUP_JOB_COMPLETED@+--+-- - @COPY_JOB_STARTED@ | @COPY_JOB_SUCCESSFUL@ | @COPY_JOB_FAILED@+--+-- - @RESTORE_JOB_STARTED@ | @RESTORE_JOB_COMPLETED@ |+-- @RECOVERY_POINT_MODIFIED@+--+-- - @S3_BACKUP_OBJECT_FAILED@ | @S3_RESTORE_OBJECT_FAILED@+--+-- The list below shows items that are deprecated events (for reference)+-- and are no longer in use. They are no longer supported and will not+-- return statuses or notifications. Refer to the list above for current+-- supported events.+putBackupVaultNotifications_backupVaultEvents :: Lens.Lens' PutBackupVaultNotifications [BackupVaultEvent]+putBackupVaultNotifications_backupVaultEvents = Lens.lens (\PutBackupVaultNotifications' {backupVaultEvents} -> backupVaultEvents) (\s@PutBackupVaultNotifications' {} a -> s {backupVaultEvents = a} :: PutBackupVaultNotifications) Prelude.. Lens.coerced++instance Core.AWSRequest PutBackupVaultNotifications where+ type+ AWSResponse PutBackupVaultNotifications =+ PutBackupVaultNotificationsResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveNull+ PutBackupVaultNotificationsResponse'++instance Prelude.Hashable PutBackupVaultNotifications where+ hashWithSalt _salt PutBackupVaultNotifications' {..} =+ _salt+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` sNSTopicArn+ `Prelude.hashWithSalt` backupVaultEvents++instance Prelude.NFData PutBackupVaultNotifications where+ rnf PutBackupVaultNotifications' {..} =+ Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf sNSTopicArn+ `Prelude.seq` Prelude.rnf backupVaultEvents++instance Data.ToHeaders PutBackupVaultNotifications where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutBackupVaultNotifications where+ toJSON PutBackupVaultNotifications' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("SNSTopicArn" Data..= sNSTopicArn),+ Prelude.Just+ ("BackupVaultEvents" Data..= backupVaultEvents)+ ]+ )++instance Data.ToPath PutBackupVaultNotifications where+ toPath PutBackupVaultNotifications' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/notification-configuration"+ ]++instance Data.ToQuery PutBackupVaultNotifications where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutBackupVaultNotificationsResponse' smart constructor.+data PutBackupVaultNotificationsResponse = PutBackupVaultNotificationsResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutBackupVaultNotificationsResponse' 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.+newPutBackupVaultNotificationsResponse ::+ PutBackupVaultNotificationsResponse+newPutBackupVaultNotificationsResponse =+ PutBackupVaultNotificationsResponse'++instance+ Prelude.NFData+ PutBackupVaultNotificationsResponse+ where+ rnf _ = ()
+ gen/Amazonka/Backup/StartBackupJob.hs view
@@ -0,0 +1,441 @@+{-# 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.Backup.StartBackupJob+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Starts an on-demand backup job for the specified resource.+module Amazonka.Backup.StartBackupJob+ ( -- * Creating a Request+ StartBackupJob (..),+ newStartBackupJob,++ -- * Request Lenses+ startBackupJob_backupOptions,+ startBackupJob_completeWindowMinutes,+ startBackupJob_idempotencyToken,+ startBackupJob_lifecycle,+ startBackupJob_recoveryPointTags,+ startBackupJob_startWindowMinutes,+ startBackupJob_backupVaultName,+ startBackupJob_resourceArn,+ startBackupJob_iamRoleArn,++ -- * Destructuring the Response+ StartBackupJobResponse (..),+ newStartBackupJobResponse,++ -- * Response Lenses+ startBackupJobResponse_backupJobId,+ startBackupJobResponse_creationDate,+ startBackupJobResponse_isParent,+ startBackupJobResponse_recoveryPointArn,+ startBackupJobResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newStartBackupJob' smart constructor.+data StartBackupJob = StartBackupJob'+ { -- | Specifies the backup option for a selected resource. This option is only+ -- available for Windows Volume Shadow Copy Service (VSS) backup jobs.+ --+ -- Valid values: Set to @\"WindowsVSS\":\"enabled\"@ to enable the+ -- @WindowsVSS@ backup option and create a Windows VSS backup. Set to+ -- @\"WindowsVSS\"\"disabled\"@ to create a regular backup. The+ -- @WindowsVSS@ option is not enabled by default.+ backupOptions :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | A value in minutes during which a successfully started backup must+ -- complete, or else Backup will cancel the job. This value is optional.+ -- This value begins counting down from when the backup was scheduled. It+ -- does not add additional time for @StartWindowMinutes@, or if the backup+ -- started later than scheduled.+ completeWindowMinutes :: Prelude.Maybe Prelude.Integer,+ -- | A customer-chosen string that you can use to distinguish between+ -- otherwise identical calls to @StartBackupJob@. Retrying a successful+ -- request with the same idempotency token results in a success message+ -- with no action taken.+ idempotencyToken :: Prelude.Maybe Prelude.Text,+ -- | The lifecycle defines when a protected resource is transitioned to cold+ -- storage and when it expires. Backup will transition and expire backups+ -- automatically according to the lifecycle that you define.+ --+ -- Backups transitioned to cold storage must be stored in cold storage for+ -- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+ -- greater than the “transition to cold after days” setting. The+ -- “transition to cold after days” setting cannot be changed after a backup+ -- has been transitioned to cold.+ --+ -- Resource types that are able to be transitioned to cold storage are+ -- listed in the \"Lifecycle to cold storage\" section of the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+ -- table. Backup ignores this expression for other resource types.+ lifecycle :: Prelude.Maybe Lifecycle,+ -- | To help organize your resources, you can assign your own metadata to the+ -- resources that you create. Each tag is a key-value pair.+ recoveryPointTags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),+ -- | A value in minutes after a backup is scheduled before a job will be+ -- canceled if it doesn\'t start successfully. This value is optional, and+ -- the default is 8 hours. If this value is included, it must be at least+ -- 60 minutes to avoid errors.+ startWindowMinutes :: Prelude.Maybe Prelude.Integer,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ resourceArn :: Prelude.Text,+ -- | Specifies the IAM role ARN used to create the target recovery point; for+ -- example, @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartBackupJob' 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:+--+-- 'backupOptions', 'startBackupJob_backupOptions' - Specifies the backup option for a selected resource. This option is only+-- available for Windows Volume Shadow Copy Service (VSS) backup jobs.+--+-- Valid values: Set to @\"WindowsVSS\":\"enabled\"@ to enable the+-- @WindowsVSS@ backup option and create a Windows VSS backup. Set to+-- @\"WindowsVSS\"\"disabled\"@ to create a regular backup. The+-- @WindowsVSS@ option is not enabled by default.+--+-- 'completeWindowMinutes', 'startBackupJob_completeWindowMinutes' - A value in minutes during which a successfully started backup must+-- complete, or else Backup will cancel the job. This value is optional.+-- This value begins counting down from when the backup was scheduled. It+-- does not add additional time for @StartWindowMinutes@, or if the backup+-- started later than scheduled.+--+-- 'idempotencyToken', 'startBackupJob_idempotencyToken' - A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @StartBackupJob@. Retrying a successful+-- request with the same idempotency token results in a success message+-- with no action taken.+--+-- 'lifecycle', 'startBackupJob_lifecycle' - The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup will transition and expire backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+--+-- 'recoveryPointTags', 'startBackupJob_recoveryPointTags' - To help organize your resources, you can assign your own metadata to the+-- resources that you create. Each tag is a key-value pair.+--+-- 'startWindowMinutes', 'startBackupJob_startWindowMinutes' - A value in minutes after a backup is scheduled before a job will be+-- canceled if it doesn\'t start successfully. This value is optional, and+-- the default is 8 hours. If this value is included, it must be at least+-- 60 minutes to avoid errors.+--+-- 'backupVaultName', 'startBackupJob_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'resourceArn', 'startBackupJob_resourceArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'iamRoleArn', 'startBackupJob_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+newStartBackupJob ::+ -- | 'backupVaultName'+ Prelude.Text ->+ -- | 'resourceArn'+ Prelude.Text ->+ -- | 'iamRoleArn'+ Prelude.Text ->+ StartBackupJob+newStartBackupJob+ pBackupVaultName_+ pResourceArn_+ pIamRoleArn_ =+ StartBackupJob'+ { backupOptions = Prelude.Nothing,+ completeWindowMinutes = Prelude.Nothing,+ idempotencyToken = Prelude.Nothing,+ lifecycle = Prelude.Nothing,+ recoveryPointTags = Prelude.Nothing,+ startWindowMinutes = Prelude.Nothing,+ backupVaultName = pBackupVaultName_,+ resourceArn = pResourceArn_,+ iamRoleArn = pIamRoleArn_+ }++-- | Specifies the backup option for a selected resource. This option is only+-- available for Windows Volume Shadow Copy Service (VSS) backup jobs.+--+-- Valid values: Set to @\"WindowsVSS\":\"enabled\"@ to enable the+-- @WindowsVSS@ backup option and create a Windows VSS backup. Set to+-- @\"WindowsVSS\"\"disabled\"@ to create a regular backup. The+-- @WindowsVSS@ option is not enabled by default.+startBackupJob_backupOptions :: Lens.Lens' StartBackupJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+startBackupJob_backupOptions = Lens.lens (\StartBackupJob' {backupOptions} -> backupOptions) (\s@StartBackupJob' {} a -> s {backupOptions = a} :: StartBackupJob) Prelude.. Lens.mapping Lens.coerced++-- | A value in minutes during which a successfully started backup must+-- complete, or else Backup will cancel the job. This value is optional.+-- This value begins counting down from when the backup was scheduled. It+-- does not add additional time for @StartWindowMinutes@, or if the backup+-- started later than scheduled.+startBackupJob_completeWindowMinutes :: Lens.Lens' StartBackupJob (Prelude.Maybe Prelude.Integer)+startBackupJob_completeWindowMinutes = Lens.lens (\StartBackupJob' {completeWindowMinutes} -> completeWindowMinutes) (\s@StartBackupJob' {} a -> s {completeWindowMinutes = a} :: StartBackupJob)++-- | A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @StartBackupJob@. Retrying a successful+-- request with the same idempotency token results in a success message+-- with no action taken.+startBackupJob_idempotencyToken :: Lens.Lens' StartBackupJob (Prelude.Maybe Prelude.Text)+startBackupJob_idempotencyToken = Lens.lens (\StartBackupJob' {idempotencyToken} -> idempotencyToken) (\s@StartBackupJob' {} a -> s {idempotencyToken = a} :: StartBackupJob)++-- | The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup will transition and expire backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+startBackupJob_lifecycle :: Lens.Lens' StartBackupJob (Prelude.Maybe Lifecycle)+startBackupJob_lifecycle = Lens.lens (\StartBackupJob' {lifecycle} -> lifecycle) (\s@StartBackupJob' {} a -> s {lifecycle = a} :: StartBackupJob)++-- | To help organize your resources, you can assign your own metadata to the+-- resources that you create. Each tag is a key-value pair.+startBackupJob_recoveryPointTags :: Lens.Lens' StartBackupJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+startBackupJob_recoveryPointTags = Lens.lens (\StartBackupJob' {recoveryPointTags} -> recoveryPointTags) (\s@StartBackupJob' {} a -> s {recoveryPointTags = a} :: StartBackupJob) Prelude.. Lens.mapping (Data._Sensitive Prelude.. Lens.coerced)++-- | A value in minutes after a backup is scheduled before a job will be+-- canceled if it doesn\'t start successfully. This value is optional, and+-- the default is 8 hours. If this value is included, it must be at least+-- 60 minutes to avoid errors.+startBackupJob_startWindowMinutes :: Lens.Lens' StartBackupJob (Prelude.Maybe Prelude.Integer)+startBackupJob_startWindowMinutes = Lens.lens (\StartBackupJob' {startWindowMinutes} -> startWindowMinutes) (\s@StartBackupJob' {} a -> s {startWindowMinutes = a} :: StartBackupJob)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+startBackupJob_backupVaultName :: Lens.Lens' StartBackupJob Prelude.Text+startBackupJob_backupVaultName = Lens.lens (\StartBackupJob' {backupVaultName} -> backupVaultName) (\s@StartBackupJob' {} a -> s {backupVaultName = a} :: StartBackupJob)++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+startBackupJob_resourceArn :: Lens.Lens' StartBackupJob Prelude.Text+startBackupJob_resourceArn = Lens.lens (\StartBackupJob' {resourceArn} -> resourceArn) (\s@StartBackupJob' {} a -> s {resourceArn = a} :: StartBackupJob)++-- | Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+startBackupJob_iamRoleArn :: Lens.Lens' StartBackupJob Prelude.Text+startBackupJob_iamRoleArn = Lens.lens (\StartBackupJob' {iamRoleArn} -> iamRoleArn) (\s@StartBackupJob' {} a -> s {iamRoleArn = a} :: StartBackupJob)++instance Core.AWSRequest StartBackupJob where+ type+ AWSResponse StartBackupJob =+ StartBackupJobResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ StartBackupJobResponse'+ Prelude.<$> (x Data..?> "BackupJobId")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "IsParent")+ Prelude.<*> (x Data..?> "RecoveryPointArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable StartBackupJob where+ hashWithSalt _salt StartBackupJob' {..} =+ _salt+ `Prelude.hashWithSalt` backupOptions+ `Prelude.hashWithSalt` completeWindowMinutes+ `Prelude.hashWithSalt` idempotencyToken+ `Prelude.hashWithSalt` lifecycle+ `Prelude.hashWithSalt` recoveryPointTags+ `Prelude.hashWithSalt` startWindowMinutes+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` iamRoleArn++instance Prelude.NFData StartBackupJob where+ rnf StartBackupJob' {..} =+ Prelude.rnf backupOptions+ `Prelude.seq` Prelude.rnf completeWindowMinutes+ `Prelude.seq` Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf lifecycle+ `Prelude.seq` Prelude.rnf recoveryPointTags+ `Prelude.seq` Prelude.rnf startWindowMinutes+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf iamRoleArn++instance Data.ToHeaders StartBackupJob where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON StartBackupJob where+ toJSON StartBackupJob' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("BackupOptions" Data..=) Prelude.<$> backupOptions,+ ("CompleteWindowMinutes" Data..=)+ Prelude.<$> completeWindowMinutes,+ ("IdempotencyToken" Data..=)+ Prelude.<$> idempotencyToken,+ ("Lifecycle" Data..=) Prelude.<$> lifecycle,+ ("RecoveryPointTags" Data..=)+ Prelude.<$> recoveryPointTags,+ ("StartWindowMinutes" Data..=)+ Prelude.<$> startWindowMinutes,+ Prelude.Just+ ("BackupVaultName" Data..= backupVaultName),+ Prelude.Just ("ResourceArn" Data..= resourceArn),+ Prelude.Just ("IamRoleArn" Data..= iamRoleArn)+ ]+ )++instance Data.ToPath StartBackupJob where+ toPath = Prelude.const "/backup-jobs"++instance Data.ToQuery StartBackupJob where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newStartBackupJobResponse' smart constructor.+data StartBackupJobResponse = StartBackupJobResponse'+ { -- | Uniquely identifies a request to Backup to back up a resource.+ backupJobId :: Prelude.Maybe Prelude.Text,+ -- | The date and time that a backup job is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | This is a returned boolean value indicating this is a parent (composite)+ -- backup job.+ isParent :: Prelude.Maybe Prelude.Bool,+ -- | An ARN that uniquely identifies a recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: 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 'StartBackupJobResponse' 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:+--+-- 'backupJobId', 'startBackupJobResponse_backupJobId' - Uniquely identifies a request to Backup to back up a resource.+--+-- 'creationDate', 'startBackupJobResponse_creationDate' - The date and time that a backup job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'isParent', 'startBackupJobResponse_isParent' - This is a returned boolean value indicating this is a parent (composite)+-- backup job.+--+-- 'recoveryPointArn', 'startBackupJobResponse_recoveryPointArn' - An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'httpStatus', 'startBackupJobResponse_httpStatus' - The response's http status code.+newStartBackupJobResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ StartBackupJobResponse+newStartBackupJobResponse pHttpStatus_ =+ StartBackupJobResponse'+ { backupJobId =+ Prelude.Nothing,+ creationDate = Prelude.Nothing,+ isParent = Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Uniquely identifies a request to Backup to back up a resource.+startBackupJobResponse_backupJobId :: Lens.Lens' StartBackupJobResponse (Prelude.Maybe Prelude.Text)+startBackupJobResponse_backupJobId = Lens.lens (\StartBackupJobResponse' {backupJobId} -> backupJobId) (\s@StartBackupJobResponse' {} a -> s {backupJobId = a} :: StartBackupJobResponse)++-- | The date and time that a backup job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+startBackupJobResponse_creationDate :: Lens.Lens' StartBackupJobResponse (Prelude.Maybe Prelude.UTCTime)+startBackupJobResponse_creationDate = Lens.lens (\StartBackupJobResponse' {creationDate} -> creationDate) (\s@StartBackupJobResponse' {} a -> s {creationDate = a} :: StartBackupJobResponse) Prelude.. Lens.mapping Data._Time++-- | This is a returned boolean value indicating this is a parent (composite)+-- backup job.+startBackupJobResponse_isParent :: Lens.Lens' StartBackupJobResponse (Prelude.Maybe Prelude.Bool)+startBackupJobResponse_isParent = Lens.lens (\StartBackupJobResponse' {isParent} -> isParent) (\s@StartBackupJobResponse' {} a -> s {isParent = a} :: StartBackupJobResponse)++-- | An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+startBackupJobResponse_recoveryPointArn :: Lens.Lens' StartBackupJobResponse (Prelude.Maybe Prelude.Text)+startBackupJobResponse_recoveryPointArn = Lens.lens (\StartBackupJobResponse' {recoveryPointArn} -> recoveryPointArn) (\s@StartBackupJobResponse' {} a -> s {recoveryPointArn = a} :: StartBackupJobResponse)++-- | The response's http status code.+startBackupJobResponse_httpStatus :: Lens.Lens' StartBackupJobResponse Prelude.Int+startBackupJobResponse_httpStatus = Lens.lens (\StartBackupJobResponse' {httpStatus} -> httpStatus) (\s@StartBackupJobResponse' {} a -> s {httpStatus = a} :: StartBackupJobResponse)++instance Prelude.NFData StartBackupJobResponse where+ rnf StartBackupJobResponse' {..} =+ Prelude.rnf backupJobId+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf isParent+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/StartCopyJob.hs view
@@ -0,0 +1,320 @@+{-# 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.Backup.StartCopyJob+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Starts a job to create a one-time copy of the specified resource.+--+-- Does not support continuous backups.+module Amazonka.Backup.StartCopyJob+ ( -- * Creating a Request+ StartCopyJob (..),+ newStartCopyJob,++ -- * Request Lenses+ startCopyJob_idempotencyToken,+ startCopyJob_lifecycle,+ startCopyJob_recoveryPointArn,+ startCopyJob_sourceBackupVaultName,+ startCopyJob_destinationBackupVaultArn,+ startCopyJob_iamRoleArn,++ -- * Destructuring the Response+ StartCopyJobResponse (..),+ newStartCopyJobResponse,++ -- * Response Lenses+ startCopyJobResponse_copyJobId,+ startCopyJobResponse_creationDate,+ startCopyJobResponse_isParent,+ startCopyJobResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newStartCopyJob' smart constructor.+data StartCopyJob = StartCopyJob'+ { -- | A customer-chosen string that you can use to distinguish between+ -- otherwise identical calls to @StartCopyJob@. Retrying a successful+ -- request with the same idempotency token results in a success message+ -- with no action taken.+ idempotencyToken :: Prelude.Maybe Prelude.Text,+ lifecycle :: Prelude.Maybe Lifecycle,+ -- | An ARN that uniquely identifies a recovery point to use for the copy+ -- job; for example,+ -- arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.+ recoveryPointArn :: Prelude.Text,+ -- | The name of a logical source container where backups are stored. Backup+ -- vaults are identified by names that are unique to the account used to+ -- create them and the Amazon Web Services Region where they are created.+ -- They consist of lowercase letters, numbers, and hyphens.+ sourceBackupVaultName :: Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a destination+ -- backup vault to copy to; for example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ destinationBackupVaultArn :: Prelude.Text,+ -- | Specifies the IAM role ARN used to copy the target recovery point; for+ -- example, @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartCopyJob' 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:+--+-- 'idempotencyToken', 'startCopyJob_idempotencyToken' - A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @StartCopyJob@. Retrying a successful+-- request with the same idempotency token results in a success message+-- with no action taken.+--+-- 'lifecycle', 'startCopyJob_lifecycle' - Undocumented member.+--+-- 'recoveryPointArn', 'startCopyJob_recoveryPointArn' - An ARN that uniquely identifies a recovery point to use for the copy+-- job; for example,+-- arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.+--+-- 'sourceBackupVaultName', 'startCopyJob_sourceBackupVaultName' - The name of a logical source container where backups are stored. Backup+-- vaults are identified by names that are unique to the account used to+-- create them and the Amazon Web Services Region where they are created.+-- They consist of lowercase letters, numbers, and hyphens.+--+-- 'destinationBackupVaultArn', 'startCopyJob_destinationBackupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a destination+-- backup vault to copy to; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'iamRoleArn', 'startCopyJob_iamRoleArn' - Specifies the IAM role ARN used to copy the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+newStartCopyJob ::+ -- | 'recoveryPointArn'+ Prelude.Text ->+ -- | 'sourceBackupVaultName'+ Prelude.Text ->+ -- | 'destinationBackupVaultArn'+ Prelude.Text ->+ -- | 'iamRoleArn'+ Prelude.Text ->+ StartCopyJob+newStartCopyJob+ pRecoveryPointArn_+ pSourceBackupVaultName_+ pDestinationBackupVaultArn_+ pIamRoleArn_ =+ StartCopyJob'+ { idempotencyToken = Prelude.Nothing,+ lifecycle = Prelude.Nothing,+ recoveryPointArn = pRecoveryPointArn_,+ sourceBackupVaultName = pSourceBackupVaultName_,+ destinationBackupVaultArn =+ pDestinationBackupVaultArn_,+ iamRoleArn = pIamRoleArn_+ }++-- | A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @StartCopyJob@. Retrying a successful+-- request with the same idempotency token results in a success message+-- with no action taken.+startCopyJob_idempotencyToken :: Lens.Lens' StartCopyJob (Prelude.Maybe Prelude.Text)+startCopyJob_idempotencyToken = Lens.lens (\StartCopyJob' {idempotencyToken} -> idempotencyToken) (\s@StartCopyJob' {} a -> s {idempotencyToken = a} :: StartCopyJob)++-- | Undocumented member.+startCopyJob_lifecycle :: Lens.Lens' StartCopyJob (Prelude.Maybe Lifecycle)+startCopyJob_lifecycle = Lens.lens (\StartCopyJob' {lifecycle} -> lifecycle) (\s@StartCopyJob' {} a -> s {lifecycle = a} :: StartCopyJob)++-- | An ARN that uniquely identifies a recovery point to use for the copy+-- job; for example,+-- arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.+startCopyJob_recoveryPointArn :: Lens.Lens' StartCopyJob Prelude.Text+startCopyJob_recoveryPointArn = Lens.lens (\StartCopyJob' {recoveryPointArn} -> recoveryPointArn) (\s@StartCopyJob' {} a -> s {recoveryPointArn = a} :: StartCopyJob)++-- | The name of a logical source container where backups are stored. Backup+-- vaults are identified by names that are unique to the account used to+-- create them and the Amazon Web Services Region where they are created.+-- They consist of lowercase letters, numbers, and hyphens.+startCopyJob_sourceBackupVaultName :: Lens.Lens' StartCopyJob Prelude.Text+startCopyJob_sourceBackupVaultName = Lens.lens (\StartCopyJob' {sourceBackupVaultName} -> sourceBackupVaultName) (\s@StartCopyJob' {} a -> s {sourceBackupVaultName = a} :: StartCopyJob)++-- | An Amazon Resource Name (ARN) that uniquely identifies a destination+-- backup vault to copy to; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+startCopyJob_destinationBackupVaultArn :: Lens.Lens' StartCopyJob Prelude.Text+startCopyJob_destinationBackupVaultArn = Lens.lens (\StartCopyJob' {destinationBackupVaultArn} -> destinationBackupVaultArn) (\s@StartCopyJob' {} a -> s {destinationBackupVaultArn = a} :: StartCopyJob)++-- | Specifies the IAM role ARN used to copy the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+startCopyJob_iamRoleArn :: Lens.Lens' StartCopyJob Prelude.Text+startCopyJob_iamRoleArn = Lens.lens (\StartCopyJob' {iamRoleArn} -> iamRoleArn) (\s@StartCopyJob' {} a -> s {iamRoleArn = a} :: StartCopyJob)++instance Core.AWSRequest StartCopyJob where+ type AWSResponse StartCopyJob = StartCopyJobResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ StartCopyJobResponse'+ Prelude.<$> (x Data..?> "CopyJobId")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "IsParent")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable StartCopyJob where+ hashWithSalt _salt StartCopyJob' {..} =+ _salt+ `Prelude.hashWithSalt` idempotencyToken+ `Prelude.hashWithSalt` lifecycle+ `Prelude.hashWithSalt` recoveryPointArn+ `Prelude.hashWithSalt` sourceBackupVaultName+ `Prelude.hashWithSalt` destinationBackupVaultArn+ `Prelude.hashWithSalt` iamRoleArn++instance Prelude.NFData StartCopyJob where+ rnf StartCopyJob' {..} =+ Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf lifecycle+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf sourceBackupVaultName+ `Prelude.seq` Prelude.rnf destinationBackupVaultArn+ `Prelude.seq` Prelude.rnf iamRoleArn++instance Data.ToHeaders StartCopyJob where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON StartCopyJob where+ toJSON StartCopyJob' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("IdempotencyToken" Data..=)+ Prelude.<$> idempotencyToken,+ ("Lifecycle" Data..=) Prelude.<$> lifecycle,+ Prelude.Just+ ("RecoveryPointArn" Data..= recoveryPointArn),+ Prelude.Just+ ( "SourceBackupVaultName"+ Data..= sourceBackupVaultName+ ),+ Prelude.Just+ ( "DestinationBackupVaultArn"+ Data..= destinationBackupVaultArn+ ),+ Prelude.Just ("IamRoleArn" Data..= iamRoleArn)+ ]+ )++instance Data.ToPath StartCopyJob where+ toPath = Prelude.const "/copy-jobs"++instance Data.ToQuery StartCopyJob where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newStartCopyJobResponse' smart constructor.+data StartCopyJobResponse = StartCopyJobResponse'+ { -- | Uniquely identifies a copy job.+ copyJobId :: Prelude.Maybe Prelude.Text,+ -- | The date and time that a copy job is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | This is a returned boolean value indicating this is a parent (composite)+ -- copy job.+ isParent :: Prelude.Maybe Prelude.Bool,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartCopyJobResponse' 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:+--+-- 'copyJobId', 'startCopyJobResponse_copyJobId' - Uniquely identifies a copy job.+--+-- 'creationDate', 'startCopyJobResponse_creationDate' - The date and time that a copy job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'isParent', 'startCopyJobResponse_isParent' - This is a returned boolean value indicating this is a parent (composite)+-- copy job.+--+-- 'httpStatus', 'startCopyJobResponse_httpStatus' - The response's http status code.+newStartCopyJobResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ StartCopyJobResponse+newStartCopyJobResponse pHttpStatus_ =+ StartCopyJobResponse'+ { copyJobId = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ isParent = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Uniquely identifies a copy job.+startCopyJobResponse_copyJobId :: Lens.Lens' StartCopyJobResponse (Prelude.Maybe Prelude.Text)+startCopyJobResponse_copyJobId = Lens.lens (\StartCopyJobResponse' {copyJobId} -> copyJobId) (\s@StartCopyJobResponse' {} a -> s {copyJobId = a} :: StartCopyJobResponse)++-- | The date and time that a copy job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+startCopyJobResponse_creationDate :: Lens.Lens' StartCopyJobResponse (Prelude.Maybe Prelude.UTCTime)+startCopyJobResponse_creationDate = Lens.lens (\StartCopyJobResponse' {creationDate} -> creationDate) (\s@StartCopyJobResponse' {} a -> s {creationDate = a} :: StartCopyJobResponse) Prelude.. Lens.mapping Data._Time++-- | This is a returned boolean value indicating this is a parent (composite)+-- copy job.+startCopyJobResponse_isParent :: Lens.Lens' StartCopyJobResponse (Prelude.Maybe Prelude.Bool)+startCopyJobResponse_isParent = Lens.lens (\StartCopyJobResponse' {isParent} -> isParent) (\s@StartCopyJobResponse' {} a -> s {isParent = a} :: StartCopyJobResponse)++-- | The response's http status code.+startCopyJobResponse_httpStatus :: Lens.Lens' StartCopyJobResponse Prelude.Int+startCopyJobResponse_httpStatus = Lens.lens (\StartCopyJobResponse' {httpStatus} -> httpStatus) (\s@StartCopyJobResponse' {} a -> s {httpStatus = a} :: StartCopyJobResponse)++instance Prelude.NFData StartCopyJobResponse where+ rnf StartCopyJobResponse' {..} =+ Prelude.rnf copyJobId+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf isParent+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/StartReportJob.hs view
@@ -0,0 +1,199 @@+{-# 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.Backup.StartReportJob+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Starts an on-demand report job for the specified report plan.+module Amazonka.Backup.StartReportJob+ ( -- * Creating a Request+ StartReportJob (..),+ newStartReportJob,++ -- * Request Lenses+ startReportJob_idempotencyToken,+ startReportJob_reportPlanName,++ -- * Destructuring the Response+ StartReportJobResponse (..),+ newStartReportJobResponse,++ -- * Response Lenses+ startReportJobResponse_reportJobId,+ startReportJobResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newStartReportJob' smart constructor.+data StartReportJob = StartReportJob'+ { -- | A customer-chosen string that you can use to distinguish between+ -- otherwise identical calls to @StartReportJobInput@. Retrying a+ -- successful request with the same idempotency token results in a success+ -- message with no action taken.+ idempotencyToken :: Prelude.Maybe Prelude.Text,+ -- | The unique name of a report plan.+ reportPlanName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartReportJob' 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:+--+-- 'idempotencyToken', 'startReportJob_idempotencyToken' - A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @StartReportJobInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+--+-- 'reportPlanName', 'startReportJob_reportPlanName' - The unique name of a report plan.+newStartReportJob ::+ -- | 'reportPlanName'+ Prelude.Text ->+ StartReportJob+newStartReportJob pReportPlanName_ =+ StartReportJob'+ { idempotencyToken = Prelude.Nothing,+ reportPlanName = pReportPlanName_+ }++-- | A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @StartReportJobInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+startReportJob_idempotencyToken :: Lens.Lens' StartReportJob (Prelude.Maybe Prelude.Text)+startReportJob_idempotencyToken = Lens.lens (\StartReportJob' {idempotencyToken} -> idempotencyToken) (\s@StartReportJob' {} a -> s {idempotencyToken = a} :: StartReportJob)++-- | The unique name of a report plan.+startReportJob_reportPlanName :: Lens.Lens' StartReportJob Prelude.Text+startReportJob_reportPlanName = Lens.lens (\StartReportJob' {reportPlanName} -> reportPlanName) (\s@StartReportJob' {} a -> s {reportPlanName = a} :: StartReportJob)++instance Core.AWSRequest StartReportJob where+ type+ AWSResponse StartReportJob =+ StartReportJobResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ StartReportJobResponse'+ Prelude.<$> (x Data..?> "ReportJobId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable StartReportJob where+ hashWithSalt _salt StartReportJob' {..} =+ _salt+ `Prelude.hashWithSalt` idempotencyToken+ `Prelude.hashWithSalt` reportPlanName++instance Prelude.NFData StartReportJob where+ rnf StartReportJob' {..} =+ Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf reportPlanName++instance Data.ToHeaders StartReportJob where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON StartReportJob where+ toJSON StartReportJob' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("IdempotencyToken" Data..=)+ Prelude.<$> idempotencyToken+ ]+ )++instance Data.ToPath StartReportJob where+ toPath StartReportJob' {..} =+ Prelude.mconcat+ ["/audit/report-jobs/", Data.toBS reportPlanName]++instance Data.ToQuery StartReportJob where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newStartReportJobResponse' smart constructor.+data StartReportJobResponse = StartReportJobResponse'+ { -- | The identifier of the report job. A unique, randomly generated, Unicode,+ -- UTF-8 encoded string that is at most 1,024 bytes long. The report job ID+ -- cannot be edited.+ reportJobId :: 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 'StartReportJobResponse' 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:+--+-- 'reportJobId', 'startReportJobResponse_reportJobId' - The identifier of the report job. A unique, randomly generated, Unicode,+-- UTF-8 encoded string that is at most 1,024 bytes long. The report job ID+-- cannot be edited.+--+-- 'httpStatus', 'startReportJobResponse_httpStatus' - The response's http status code.+newStartReportJobResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ StartReportJobResponse+newStartReportJobResponse pHttpStatus_ =+ StartReportJobResponse'+ { reportJobId =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The identifier of the report job. A unique, randomly generated, Unicode,+-- UTF-8 encoded string that is at most 1,024 bytes long. The report job ID+-- cannot be edited.+startReportJobResponse_reportJobId :: Lens.Lens' StartReportJobResponse (Prelude.Maybe Prelude.Text)+startReportJobResponse_reportJobId = Lens.lens (\StartReportJobResponse' {reportJobId} -> reportJobId) (\s@StartReportJobResponse' {} a -> s {reportJobId = a} :: StartReportJobResponse)++-- | The response's http status code.+startReportJobResponse_httpStatus :: Lens.Lens' StartReportJobResponse Prelude.Int+startReportJobResponse_httpStatus = Lens.lens (\StartReportJobResponse' {httpStatus} -> httpStatus) (\s@StartReportJobResponse' {} a -> s {httpStatus = a} :: StartReportJobResponse)++instance Prelude.NFData StartReportJobResponse where+ rnf StartReportJobResponse' {..} =+ Prelude.rnf reportJobId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/StartRestoreJob.hs view
@@ -0,0 +1,421 @@+{-# 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.Backup.StartRestoreJob+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Recovers the saved resource identified by an Amazon Resource Name (ARN).+module Amazonka.Backup.StartRestoreJob+ ( -- * Creating a Request+ StartRestoreJob (..),+ newStartRestoreJob,++ -- * Request Lenses+ startRestoreJob_iamRoleArn,+ startRestoreJob_idempotencyToken,+ startRestoreJob_resourceType,+ startRestoreJob_recoveryPointArn,+ startRestoreJob_metadata,++ -- * Destructuring the Response+ StartRestoreJobResponse (..),+ newStartRestoreJobResponse,++ -- * Response Lenses+ startRestoreJobResponse_restoreJobId,+ startRestoreJobResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newStartRestoreJob' smart constructor.+data StartRestoreJob = StartRestoreJob'+ { -- | The Amazon Resource Name (ARN) of the IAM role that Backup uses to+ -- create the target resource; for example:+ -- @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | A customer-chosen string that you can use to distinguish between+ -- otherwise identical calls to @StartRestoreJob@. Retrying a successful+ -- request with the same idempotency token results in a success message+ -- with no action taken.+ idempotencyToken :: Prelude.Maybe Prelude.Text,+ -- | Starts a job to restore a recovery point for one of the following+ -- resources:+ --+ -- - @Aurora@ for Amazon Aurora+ --+ -- - @DocumentDB@ for Amazon DocumentDB (with MongoDB compatibility)+ --+ -- - @DynamoDB@ for Amazon DynamoDB+ --+ -- - @EBS@ for Amazon Elastic Block Store+ --+ -- - @EC2@ for Amazon Elastic Compute Cloud+ --+ -- - @EFS@ for Amazon Elastic File System+ --+ -- - @FSx@ for Amazon FSx+ --+ -- - @Neptune@ for Amazon Neptune+ --+ -- - @RDS@ for Amazon Relational Database Service+ --+ -- - @Storage Gateway@ for Storage Gateway+ --+ -- - @S3@ for Amazon S3+ --+ -- - @VirtualMachine@ for virtual machines+ resourceType :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Text,+ -- | A set of metadata key-value pairs. Contains information, such as a+ -- resource name, required to restore a recovery point.+ --+ -- You can get configuration metadata about a resource at the time it was+ -- backed up by calling @GetRecoveryPointRestoreMetadata@. However, values+ -- in addition to those provided by @GetRecoveryPointRestoreMetadata@ might+ -- be required to restore a resource. For example, you might need to+ -- provide a new resource name if the original already exists.+ --+ -- You need to specify specific metadata to restore an Amazon Elastic File+ -- System (Amazon EFS) instance:+ --+ -- - @file-system-id@: The ID of the Amazon EFS file system that is+ -- backed up by Backup. Returned in @GetRecoveryPointRestoreMetadata@.+ --+ -- - @Encrypted@: A Boolean value that, if true, specifies that the file+ -- system is encrypted. If @KmsKeyId@ is specified, @Encrypted@ must be+ -- set to @true@.+ --+ -- - @KmsKeyId@: Specifies the Amazon Web Services KMS key that is used+ -- to encrypt the restored file system. You can specify a key from+ -- another Amazon Web Services account provided that key it is properly+ -- shared with your account via Amazon Web Services KMS.+ --+ -- - @PerformanceMode@: Specifies the throughput mode of the file system.+ --+ -- - @CreationToken@: A user-supplied value that ensures the uniqueness+ -- (idempotency) of the request.+ --+ -- - @newFileSystem@: A Boolean value that, if true, specifies that the+ -- recovery point is restored to a new Amazon EFS file system.+ --+ -- - @ItemsToRestore@: An array of one to five strings where each string+ -- is a file path. Use @ItemsToRestore@ to restore specific files or+ -- directories rather than the entire file system. This parameter is+ -- optional. For example, @\"itemsToRestore\":\"[\\\"\/my.test\\\"]\"@.+ metadata :: Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartRestoreJob' 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:+--+-- 'iamRoleArn', 'startRestoreJob_iamRoleArn' - The Amazon Resource Name (ARN) of the IAM role that Backup uses to+-- create the target resource; for example:+-- @arn:aws:iam::123456789012:role\/S3Access@.+--+-- 'idempotencyToken', 'startRestoreJob_idempotencyToken' - A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @StartRestoreJob@. Retrying a successful+-- request with the same idempotency token results in a success message+-- with no action taken.+--+-- 'resourceType', 'startRestoreJob_resourceType' - Starts a job to restore a recovery point for one of the following+-- resources:+--+-- - @Aurora@ for Amazon Aurora+--+-- - @DocumentDB@ for Amazon DocumentDB (with MongoDB compatibility)+--+-- - @DynamoDB@ for Amazon DynamoDB+--+-- - @EBS@ for Amazon Elastic Block Store+--+-- - @EC2@ for Amazon Elastic Compute Cloud+--+-- - @EFS@ for Amazon Elastic File System+--+-- - @FSx@ for Amazon FSx+--+-- - @Neptune@ for Amazon Neptune+--+-- - @RDS@ for Amazon Relational Database Service+--+-- - @Storage Gateway@ for Storage Gateway+--+-- - @S3@ for Amazon S3+--+-- - @VirtualMachine@ for virtual machines+--+-- 'recoveryPointArn', 'startRestoreJob_recoveryPointArn' - An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'metadata', 'startRestoreJob_metadata' - A set of metadata key-value pairs. Contains information, such as a+-- resource name, required to restore a recovery point.+--+-- You can get configuration metadata about a resource at the time it was+-- backed up by calling @GetRecoveryPointRestoreMetadata@. However, values+-- in addition to those provided by @GetRecoveryPointRestoreMetadata@ might+-- be required to restore a resource. For example, you might need to+-- provide a new resource name if the original already exists.+--+-- You need to specify specific metadata to restore an Amazon Elastic File+-- System (Amazon EFS) instance:+--+-- - @file-system-id@: The ID of the Amazon EFS file system that is+-- backed up by Backup. Returned in @GetRecoveryPointRestoreMetadata@.+--+-- - @Encrypted@: A Boolean value that, if true, specifies that the file+-- system is encrypted. If @KmsKeyId@ is specified, @Encrypted@ must be+-- set to @true@.+--+-- - @KmsKeyId@: Specifies the Amazon Web Services KMS key that is used+-- to encrypt the restored file system. You can specify a key from+-- another Amazon Web Services account provided that key it is properly+-- shared with your account via Amazon Web Services KMS.+--+-- - @PerformanceMode@: Specifies the throughput mode of the file system.+--+-- - @CreationToken@: A user-supplied value that ensures the uniqueness+-- (idempotency) of the request.+--+-- - @newFileSystem@: A Boolean value that, if true, specifies that the+-- recovery point is restored to a new Amazon EFS file system.+--+-- - @ItemsToRestore@: An array of one to five strings where each string+-- is a file path. Use @ItemsToRestore@ to restore specific files or+-- directories rather than the entire file system. This parameter is+-- optional. For example, @\"itemsToRestore\":\"[\\\"\/my.test\\\"]\"@.+newStartRestoreJob ::+ -- | 'recoveryPointArn'+ Prelude.Text ->+ StartRestoreJob+newStartRestoreJob pRecoveryPointArn_ =+ StartRestoreJob'+ { iamRoleArn = Prelude.Nothing,+ idempotencyToken = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ recoveryPointArn = pRecoveryPointArn_,+ metadata = Prelude.mempty+ }++-- | The Amazon Resource Name (ARN) of the IAM role that Backup uses to+-- create the target resource; for example:+-- @arn:aws:iam::123456789012:role\/S3Access@.+startRestoreJob_iamRoleArn :: Lens.Lens' StartRestoreJob (Prelude.Maybe Prelude.Text)+startRestoreJob_iamRoleArn = Lens.lens (\StartRestoreJob' {iamRoleArn} -> iamRoleArn) (\s@StartRestoreJob' {} a -> s {iamRoleArn = a} :: StartRestoreJob)++-- | A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @StartRestoreJob@. Retrying a successful+-- request with the same idempotency token results in a success message+-- with no action taken.+startRestoreJob_idempotencyToken :: Lens.Lens' StartRestoreJob (Prelude.Maybe Prelude.Text)+startRestoreJob_idempotencyToken = Lens.lens (\StartRestoreJob' {idempotencyToken} -> idempotencyToken) (\s@StartRestoreJob' {} a -> s {idempotencyToken = a} :: StartRestoreJob)++-- | Starts a job to restore a recovery point for one of the following+-- resources:+--+-- - @Aurora@ for Amazon Aurora+--+-- - @DocumentDB@ for Amazon DocumentDB (with MongoDB compatibility)+--+-- - @DynamoDB@ for Amazon DynamoDB+--+-- - @EBS@ for Amazon Elastic Block Store+--+-- - @EC2@ for Amazon Elastic Compute Cloud+--+-- - @EFS@ for Amazon Elastic File System+--+-- - @FSx@ for Amazon FSx+--+-- - @Neptune@ for Amazon Neptune+--+-- - @RDS@ for Amazon Relational Database Service+--+-- - @Storage Gateway@ for Storage Gateway+--+-- - @S3@ for Amazon S3+--+-- - @VirtualMachine@ for virtual machines+startRestoreJob_resourceType :: Lens.Lens' StartRestoreJob (Prelude.Maybe Prelude.Text)+startRestoreJob_resourceType = Lens.lens (\StartRestoreJob' {resourceType} -> resourceType) (\s@StartRestoreJob' {} a -> s {resourceType = a} :: StartRestoreJob)++-- | An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+startRestoreJob_recoveryPointArn :: Lens.Lens' StartRestoreJob Prelude.Text+startRestoreJob_recoveryPointArn = Lens.lens (\StartRestoreJob' {recoveryPointArn} -> recoveryPointArn) (\s@StartRestoreJob' {} a -> s {recoveryPointArn = a} :: StartRestoreJob)++-- | A set of metadata key-value pairs. Contains information, such as a+-- resource name, required to restore a recovery point.+--+-- You can get configuration metadata about a resource at the time it was+-- backed up by calling @GetRecoveryPointRestoreMetadata@. However, values+-- in addition to those provided by @GetRecoveryPointRestoreMetadata@ might+-- be required to restore a resource. For example, you might need to+-- provide a new resource name if the original already exists.+--+-- You need to specify specific metadata to restore an Amazon Elastic File+-- System (Amazon EFS) instance:+--+-- - @file-system-id@: The ID of the Amazon EFS file system that is+-- backed up by Backup. Returned in @GetRecoveryPointRestoreMetadata@.+--+-- - @Encrypted@: A Boolean value that, if true, specifies that the file+-- system is encrypted. If @KmsKeyId@ is specified, @Encrypted@ must be+-- set to @true@.+--+-- - @KmsKeyId@: Specifies the Amazon Web Services KMS key that is used+-- to encrypt the restored file system. You can specify a key from+-- another Amazon Web Services account provided that key it is properly+-- shared with your account via Amazon Web Services KMS.+--+-- - @PerformanceMode@: Specifies the throughput mode of the file system.+--+-- - @CreationToken@: A user-supplied value that ensures the uniqueness+-- (idempotency) of the request.+--+-- - @newFileSystem@: A Boolean value that, if true, specifies that the+-- recovery point is restored to a new Amazon EFS file system.+--+-- - @ItemsToRestore@: An array of one to five strings where each string+-- is a file path. Use @ItemsToRestore@ to restore specific files or+-- directories rather than the entire file system. This parameter is+-- optional. For example, @\"itemsToRestore\":\"[\\\"\/my.test\\\"]\"@.+startRestoreJob_metadata :: Lens.Lens' StartRestoreJob (Prelude.HashMap Prelude.Text Prelude.Text)+startRestoreJob_metadata = Lens.lens (\StartRestoreJob' {metadata} -> metadata) (\s@StartRestoreJob' {} a -> s {metadata = a} :: StartRestoreJob) Prelude.. Data._Sensitive Prelude.. Lens.coerced++instance Core.AWSRequest StartRestoreJob where+ type+ AWSResponse StartRestoreJob =+ StartRestoreJobResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ StartRestoreJobResponse'+ Prelude.<$> (x Data..?> "RestoreJobId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable StartRestoreJob where+ hashWithSalt _salt StartRestoreJob' {..} =+ _salt+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` idempotencyToken+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` recoveryPointArn+ `Prelude.hashWithSalt` metadata++instance Prelude.NFData StartRestoreJob where+ rnf StartRestoreJob' {..} =+ Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf metadata++instance Data.ToHeaders StartRestoreJob where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON StartRestoreJob where+ toJSON StartRestoreJob' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("IamRoleArn" Data..=) Prelude.<$> iamRoleArn,+ ("IdempotencyToken" Data..=)+ Prelude.<$> idempotencyToken,+ ("ResourceType" Data..=) Prelude.<$> resourceType,+ Prelude.Just+ ("RecoveryPointArn" Data..= recoveryPointArn),+ Prelude.Just ("Metadata" Data..= metadata)+ ]+ )++instance Data.ToPath StartRestoreJob where+ toPath = Prelude.const "/restore-jobs"++instance Data.ToQuery StartRestoreJob where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newStartRestoreJobResponse' smart constructor.+data StartRestoreJobResponse = StartRestoreJobResponse'+ { -- | Uniquely identifies the job that restores a recovery point.+ restoreJobId :: 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 'StartRestoreJobResponse' 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:+--+-- 'restoreJobId', 'startRestoreJobResponse_restoreJobId' - Uniquely identifies the job that restores a recovery point.+--+-- 'httpStatus', 'startRestoreJobResponse_httpStatus' - The response's http status code.+newStartRestoreJobResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ StartRestoreJobResponse+newStartRestoreJobResponse pHttpStatus_ =+ StartRestoreJobResponse'+ { restoreJobId =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Uniquely identifies the job that restores a recovery point.+startRestoreJobResponse_restoreJobId :: Lens.Lens' StartRestoreJobResponse (Prelude.Maybe Prelude.Text)+startRestoreJobResponse_restoreJobId = Lens.lens (\StartRestoreJobResponse' {restoreJobId} -> restoreJobId) (\s@StartRestoreJobResponse' {} a -> s {restoreJobId = a} :: StartRestoreJobResponse)++-- | The response's http status code.+startRestoreJobResponse_httpStatus :: Lens.Lens' StartRestoreJobResponse Prelude.Int+startRestoreJobResponse_httpStatus = Lens.lens (\StartRestoreJobResponse' {httpStatus} -> httpStatus) (\s@StartRestoreJobResponse' {} a -> s {httpStatus = a} :: StartRestoreJobResponse)++instance Prelude.NFData StartRestoreJobResponse where+ rnf StartRestoreJobResponse' {..} =+ Prelude.rnf restoreJobId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/StopBackupJob.hs view
@@ -0,0 +1,131 @@+{-# 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.Backup.StopBackupJob+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Attempts to cancel a job to create a one-time backup of a resource.+--+-- This action is not supported for the following services: Amazon FSx for+-- Windows File Server, Amazon FSx for Lustre, FSx for ONTAP , Amazon FSx+-- for OpenZFS, Amazon DocumentDB (with MongoDB compatibility), Amazon RDS,+-- Amazon Aurora, and Amazon Neptune.+module Amazonka.Backup.StopBackupJob+ ( -- * Creating a Request+ StopBackupJob (..),+ newStopBackupJob,++ -- * Request Lenses+ stopBackupJob_backupJobId,++ -- * Destructuring the Response+ StopBackupJobResponse (..),+ newStopBackupJobResponse,+ )+where++import Amazonka.Backup.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:/ 'newStopBackupJob' smart constructor.+data StopBackupJob = StopBackupJob'+ { -- | Uniquely identifies a request to Backup to back up a resource.+ backupJobId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StopBackupJob' 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:+--+-- 'backupJobId', 'stopBackupJob_backupJobId' - Uniquely identifies a request to Backup to back up a resource.+newStopBackupJob ::+ -- | 'backupJobId'+ Prelude.Text ->+ StopBackupJob+newStopBackupJob pBackupJobId_ =+ StopBackupJob' {backupJobId = pBackupJobId_}++-- | Uniquely identifies a request to Backup to back up a resource.+stopBackupJob_backupJobId :: Lens.Lens' StopBackupJob Prelude.Text+stopBackupJob_backupJobId = Lens.lens (\StopBackupJob' {backupJobId} -> backupJobId) (\s@StopBackupJob' {} a -> s {backupJobId = a} :: StopBackupJob)++instance Core.AWSRequest StopBackupJob where+ type+ AWSResponse StopBackupJob =+ StopBackupJobResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull StopBackupJobResponse'++instance Prelude.Hashable StopBackupJob where+ hashWithSalt _salt StopBackupJob' {..} =+ _salt `Prelude.hashWithSalt` backupJobId++instance Prelude.NFData StopBackupJob where+ rnf StopBackupJob' {..} = Prelude.rnf backupJobId++instance Data.ToHeaders StopBackupJob where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON StopBackupJob where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath StopBackupJob where+ toPath StopBackupJob' {..} =+ Prelude.mconcat+ ["/backup-jobs/", Data.toBS backupJobId]++instance Data.ToQuery StopBackupJob where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newStopBackupJobResponse' smart constructor.+data StopBackupJobResponse = StopBackupJobResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StopBackupJobResponse' 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.+newStopBackupJobResponse ::+ StopBackupJobResponse+newStopBackupJobResponse = StopBackupJobResponse'++instance Prelude.NFData StopBackupJobResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/TagResource.hs view
@@ -0,0 +1,155 @@+{-# 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.Backup.TagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Assigns a set of key-value pairs to a recovery point, backup plan, or+-- backup vault identified by an Amazon Resource Name (ARN).+module Amazonka.Backup.TagResource+ ( -- * Creating a Request+ TagResource (..),+ newTagResource,++ -- * Request Lenses+ tagResource_resourceArn,+ tagResource_tags,++ -- * Destructuring the Response+ TagResourceResponse (..),+ newTagResourceResponse,+ )+where++import Amazonka.Backup.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'+ { -- | An ARN that uniquely identifies a resource. The format of the ARN+ -- depends on the type of the tagged resource.+ resourceArn :: Prelude.Text,+ -- | Key-value pairs that are used to help organize your resources. You can+ -- assign your own metadata to the resources you create. For clarity, this+ -- is the structure to assign tags:+ -- @[{\"Key\":\"string\",\"Value\":\"string\"}]@.+ tags :: Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)+ }+ deriving (Prelude.Eq, 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' - An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the type of the tagged resource.+--+-- 'tags', 'tagResource_tags' - Key-value pairs that are used to help organize your resources. You can+-- assign your own metadata to the resources you create. For clarity, this+-- is the structure to assign tags:+-- @[{\"Key\":\"string\",\"Value\":\"string\"}]@.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the type of the tagged resource.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | Key-value pairs that are used to help organize your resources. You can+-- assign your own metadata to the resources you create. For clarity, this+-- is the structure to assign tags:+-- @[{\"Key\":\"string\",\"Value\":\"string\"}]@.+tagResource_tags :: Lens.Lens' TagResource (Prelude.HashMap Prelude.Text Prelude.Text)+tagResource_tags = Lens.lens (\TagResource' {tags} -> tags) (\s@TagResource' {} a -> s {tags = a} :: TagResource) Prelude.. Data._Sensitive Prelude.. Lens.coerced++instance Core.AWSRequest TagResource where+ type AWSResponse TagResource = TagResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response = Response.receiveNull TagResourceResponse'++instance Prelude.Hashable TagResource where+ hashWithSalt _salt TagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+ rnf TagResource' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders TagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON TagResource where+ toJSON TagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("Tags" Data..= tags)]+ )++instance Data.ToPath TagResource where+ toPath TagResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery TagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+ {+ }+ 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.+newTagResourceResponse ::+ TagResourceResponse+newTagResourceResponse = TagResourceResponse'++instance Prelude.NFData TagResourceResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/Types.hs view
@@ -0,0 +1,618 @@+{-# 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.Backup.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.Backup.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _AlreadyExistsException,+ _ConflictException,+ _DependencyFailureException,+ _InvalidParameterValueException,+ _InvalidRequestException,+ _InvalidResourceStateException,+ _LimitExceededException,+ _MissingParameterValueException,+ _ResourceNotFoundException,+ _ServiceUnavailableException,++ -- * BackupJobState+ BackupJobState (..),++ -- * BackupVaultEvent+ BackupVaultEvent (..),++ -- * ConditionType+ ConditionType (..),++ -- * CopyJobState+ CopyJobState (..),++ -- * LegalHoldStatus+ LegalHoldStatus (..),++ -- * RecoveryPointStatus+ RecoveryPointStatus (..),++ -- * RestoreJobStatus+ RestoreJobStatus (..),++ -- * StorageClass+ StorageClass (..),++ -- * AdvancedBackupSetting+ AdvancedBackupSetting (..),+ newAdvancedBackupSetting,+ advancedBackupSetting_backupOptions,+ advancedBackupSetting_resourceType,++ -- * BackupJob+ BackupJob (..),+ newBackupJob,+ backupJob_accountId,+ backupJob_backupJobId,+ backupJob_backupOptions,+ backupJob_backupSizeInBytes,+ backupJob_backupType,+ backupJob_backupVaultArn,+ backupJob_backupVaultName,+ backupJob_bytesTransferred,+ backupJob_completionDate,+ backupJob_createdBy,+ backupJob_creationDate,+ backupJob_expectedCompletionDate,+ backupJob_iamRoleArn,+ backupJob_isParent,+ backupJob_parentJobId,+ backupJob_percentDone,+ backupJob_recoveryPointArn,+ backupJob_resourceArn,+ backupJob_resourceType,+ backupJob_startBy,+ backupJob_state,+ backupJob_statusMessage,++ -- * BackupPlan+ BackupPlan (..),+ newBackupPlan,+ backupPlan_advancedBackupSettings,+ backupPlan_backupPlanName,+ backupPlan_rules,++ -- * BackupPlanInput+ BackupPlanInput (..),+ newBackupPlanInput,+ backupPlanInput_advancedBackupSettings,+ backupPlanInput_backupPlanName,+ backupPlanInput_rules,++ -- * BackupPlanTemplatesListMember+ BackupPlanTemplatesListMember (..),+ newBackupPlanTemplatesListMember,+ backupPlanTemplatesListMember_backupPlanTemplateId,+ backupPlanTemplatesListMember_backupPlanTemplateName,++ -- * BackupPlansListMember+ BackupPlansListMember (..),+ newBackupPlansListMember,+ backupPlansListMember_advancedBackupSettings,+ backupPlansListMember_backupPlanArn,+ backupPlansListMember_backupPlanId,+ backupPlansListMember_backupPlanName,+ backupPlansListMember_creationDate,+ backupPlansListMember_creatorRequestId,+ backupPlansListMember_deletionDate,+ backupPlansListMember_lastExecutionDate,+ backupPlansListMember_versionId,++ -- * BackupRule+ BackupRule (..),+ newBackupRule,+ backupRule_completionWindowMinutes,+ backupRule_copyActions,+ backupRule_enableContinuousBackup,+ backupRule_lifecycle,+ backupRule_recoveryPointTags,+ backupRule_ruleId,+ backupRule_scheduleExpression,+ backupRule_startWindowMinutes,+ backupRule_ruleName,+ backupRule_targetBackupVaultName,++ -- * BackupRuleInput+ BackupRuleInput (..),+ newBackupRuleInput,+ backupRuleInput_completionWindowMinutes,+ backupRuleInput_copyActions,+ backupRuleInput_enableContinuousBackup,+ backupRuleInput_lifecycle,+ backupRuleInput_recoveryPointTags,+ backupRuleInput_scheduleExpression,+ backupRuleInput_startWindowMinutes,+ backupRuleInput_ruleName,+ backupRuleInput_targetBackupVaultName,++ -- * BackupSelection+ BackupSelection (..),+ newBackupSelection,+ backupSelection_conditions,+ backupSelection_listOfTags,+ backupSelection_notResources,+ backupSelection_resources,+ backupSelection_selectionName,+ backupSelection_iamRoleArn,++ -- * BackupSelectionsListMember+ BackupSelectionsListMember (..),+ newBackupSelectionsListMember,+ backupSelectionsListMember_backupPlanId,+ backupSelectionsListMember_creationDate,+ backupSelectionsListMember_creatorRequestId,+ backupSelectionsListMember_iamRoleArn,+ backupSelectionsListMember_selectionId,+ backupSelectionsListMember_selectionName,++ -- * BackupVaultListMember+ BackupVaultListMember (..),+ newBackupVaultListMember,+ backupVaultListMember_backupVaultArn,+ backupVaultListMember_backupVaultName,+ backupVaultListMember_creationDate,+ backupVaultListMember_creatorRequestId,+ backupVaultListMember_encryptionKeyArn,+ backupVaultListMember_lockDate,+ backupVaultListMember_locked,+ backupVaultListMember_maxRetentionDays,+ backupVaultListMember_minRetentionDays,+ backupVaultListMember_numberOfRecoveryPoints,++ -- * CalculatedLifecycle+ CalculatedLifecycle (..),+ newCalculatedLifecycle,+ calculatedLifecycle_deleteAt,+ calculatedLifecycle_moveToColdStorageAt,++ -- * Condition+ Condition (..),+ newCondition,+ condition_conditionType,+ condition_conditionKey,+ condition_conditionValue,++ -- * ConditionParameter+ ConditionParameter (..),+ newConditionParameter,+ conditionParameter_conditionKey,+ conditionParameter_conditionValue,++ -- * Conditions+ Conditions (..),+ newConditions,+ conditions_stringEquals,+ conditions_stringLike,+ conditions_stringNotEquals,+ conditions_stringNotLike,++ -- * ControlInputParameter+ ControlInputParameter (..),+ newControlInputParameter,+ controlInputParameter_parameterName,+ controlInputParameter_parameterValue,++ -- * ControlScope+ ControlScope (..),+ newControlScope,+ controlScope_complianceResourceIds,+ controlScope_complianceResourceTypes,+ controlScope_tags,++ -- * CopyAction+ CopyAction (..),+ newCopyAction,+ copyAction_lifecycle,+ copyAction_destinationBackupVaultArn,++ -- * CopyJob+ CopyJob (..),+ newCopyJob,+ copyJob_accountId,+ copyJob_backupSizeInBytes,+ copyJob_childJobsInState,+ copyJob_completionDate,+ copyJob_compositeMemberIdentifier,+ copyJob_copyJobId,+ copyJob_createdBy,+ copyJob_creationDate,+ copyJob_destinationBackupVaultArn,+ copyJob_destinationRecoveryPointArn,+ copyJob_iamRoleArn,+ copyJob_isParent,+ copyJob_numberOfChildJobs,+ copyJob_parentJobId,+ copyJob_resourceArn,+ copyJob_resourceType,+ copyJob_sourceBackupVaultArn,+ copyJob_sourceRecoveryPointArn,+ copyJob_state,+ copyJob_statusMessage,++ -- * DateRange+ DateRange (..),+ newDateRange,+ dateRange_fromDate,+ dateRange_toDate,++ -- * Framework+ Framework (..),+ newFramework,+ framework_creationTime,+ framework_deploymentStatus,+ framework_frameworkArn,+ framework_frameworkDescription,+ framework_frameworkName,+ framework_numberOfControls,++ -- * FrameworkControl+ FrameworkControl (..),+ newFrameworkControl,+ frameworkControl_controlInputParameters,+ frameworkControl_controlScope,+ frameworkControl_controlName,++ -- * LegalHold+ LegalHold (..),+ newLegalHold,+ legalHold_cancellationDate,+ legalHold_creationDate,+ legalHold_description,+ legalHold_legalHoldArn,+ legalHold_legalHoldId,+ legalHold_status,+ legalHold_title,++ -- * Lifecycle+ Lifecycle (..),+ newLifecycle,+ lifecycle_deleteAfterDays,+ lifecycle_moveToColdStorageAfterDays,++ -- * ProtectedResource+ ProtectedResource (..),+ newProtectedResource,+ protectedResource_lastBackupTime,+ protectedResource_resourceArn,+ protectedResource_resourceType,++ -- * RecoveryPointByBackupVault+ RecoveryPointByBackupVault (..),+ newRecoveryPointByBackupVault,+ recoveryPointByBackupVault_backupSizeInBytes,+ recoveryPointByBackupVault_backupVaultArn,+ recoveryPointByBackupVault_backupVaultName,+ recoveryPointByBackupVault_calculatedLifecycle,+ recoveryPointByBackupVault_completionDate,+ recoveryPointByBackupVault_compositeMemberIdentifier,+ recoveryPointByBackupVault_createdBy,+ recoveryPointByBackupVault_creationDate,+ recoveryPointByBackupVault_encryptionKeyArn,+ recoveryPointByBackupVault_iamRoleArn,+ recoveryPointByBackupVault_isEncrypted,+ recoveryPointByBackupVault_isParent,+ recoveryPointByBackupVault_lastRestoreTime,+ recoveryPointByBackupVault_lifecycle,+ recoveryPointByBackupVault_parentRecoveryPointArn,+ recoveryPointByBackupVault_recoveryPointArn,+ recoveryPointByBackupVault_resourceArn,+ recoveryPointByBackupVault_resourceType,+ recoveryPointByBackupVault_sourceBackupVaultArn,+ recoveryPointByBackupVault_status,+ recoveryPointByBackupVault_statusMessage,++ -- * RecoveryPointByResource+ RecoveryPointByResource (..),+ newRecoveryPointByResource,+ recoveryPointByResource_backupSizeBytes,+ recoveryPointByResource_backupVaultName,+ recoveryPointByResource_creationDate,+ recoveryPointByResource_encryptionKeyArn,+ recoveryPointByResource_isParent,+ recoveryPointByResource_parentRecoveryPointArn,+ recoveryPointByResource_recoveryPointArn,+ recoveryPointByResource_status,+ recoveryPointByResource_statusMessage,++ -- * RecoveryPointCreator+ RecoveryPointCreator (..),+ newRecoveryPointCreator,+ recoveryPointCreator_backupPlanArn,+ recoveryPointCreator_backupPlanId,+ recoveryPointCreator_backupPlanVersion,+ recoveryPointCreator_backupRuleId,++ -- * RecoveryPointMember+ RecoveryPointMember (..),+ newRecoveryPointMember,+ recoveryPointMember_recoveryPointArn,++ -- * RecoveryPointSelection+ RecoveryPointSelection (..),+ newRecoveryPointSelection,+ recoveryPointSelection_dateRange,+ recoveryPointSelection_resourceIdentifiers,+ recoveryPointSelection_vaultNames,++ -- * ReportDeliveryChannel+ ReportDeliveryChannel (..),+ newReportDeliveryChannel,+ reportDeliveryChannel_formats,+ reportDeliveryChannel_s3KeyPrefix,+ reportDeliveryChannel_s3BucketName,++ -- * ReportDestination+ ReportDestination (..),+ newReportDestination,+ reportDestination_s3BucketName,+ reportDestination_s3Keys,++ -- * ReportJob+ ReportJob (..),+ newReportJob,+ reportJob_completionTime,+ reportJob_creationTime,+ reportJob_reportDestination,+ reportJob_reportJobId,+ reportJob_reportPlanArn,+ reportJob_reportTemplate,+ reportJob_status,+ reportJob_statusMessage,++ -- * ReportPlan+ ReportPlan (..),+ newReportPlan,+ reportPlan_creationTime,+ reportPlan_deploymentStatus,+ reportPlan_lastAttemptedExecutionTime,+ reportPlan_lastSuccessfulExecutionTime,+ reportPlan_reportDeliveryChannel,+ reportPlan_reportPlanArn,+ reportPlan_reportPlanDescription,+ reportPlan_reportPlanName,+ reportPlan_reportSetting,++ -- * ReportSetting+ ReportSetting (..),+ newReportSetting,+ reportSetting_accounts,+ reportSetting_frameworkArns,+ reportSetting_numberOfFrameworks,+ reportSetting_organizationUnits,+ reportSetting_regions,+ reportSetting_reportTemplate,++ -- * RestoreJobsListMember+ RestoreJobsListMember (..),+ newRestoreJobsListMember,+ restoreJobsListMember_accountId,+ restoreJobsListMember_backupSizeInBytes,+ restoreJobsListMember_completionDate,+ restoreJobsListMember_createdResourceArn,+ restoreJobsListMember_creationDate,+ restoreJobsListMember_expectedCompletionTimeMinutes,+ restoreJobsListMember_iamRoleArn,+ restoreJobsListMember_percentDone,+ restoreJobsListMember_recoveryPointArn,+ restoreJobsListMember_resourceType,+ restoreJobsListMember_restoreJobId,+ restoreJobsListMember_status,+ restoreJobsListMember_statusMessage,+ )+where++import Amazonka.Backup.Types.AdvancedBackupSetting+import Amazonka.Backup.Types.BackupJob+import Amazonka.Backup.Types.BackupJobState+import Amazonka.Backup.Types.BackupPlan+import Amazonka.Backup.Types.BackupPlanInput+import Amazonka.Backup.Types.BackupPlanTemplatesListMember+import Amazonka.Backup.Types.BackupPlansListMember+import Amazonka.Backup.Types.BackupRule+import Amazonka.Backup.Types.BackupRuleInput+import Amazonka.Backup.Types.BackupSelection+import Amazonka.Backup.Types.BackupSelectionsListMember+import Amazonka.Backup.Types.BackupVaultEvent+import Amazonka.Backup.Types.BackupVaultListMember+import Amazonka.Backup.Types.CalculatedLifecycle+import Amazonka.Backup.Types.Condition+import Amazonka.Backup.Types.ConditionParameter+import Amazonka.Backup.Types.ConditionType+import Amazonka.Backup.Types.Conditions+import Amazonka.Backup.Types.ControlInputParameter+import Amazonka.Backup.Types.ControlScope+import Amazonka.Backup.Types.CopyAction+import Amazonka.Backup.Types.CopyJob+import Amazonka.Backup.Types.CopyJobState+import Amazonka.Backup.Types.DateRange+import Amazonka.Backup.Types.Framework+import Amazonka.Backup.Types.FrameworkControl+import Amazonka.Backup.Types.LegalHold+import Amazonka.Backup.Types.LegalHoldStatus+import Amazonka.Backup.Types.Lifecycle+import Amazonka.Backup.Types.ProtectedResource+import Amazonka.Backup.Types.RecoveryPointByBackupVault+import Amazonka.Backup.Types.RecoveryPointByResource+import Amazonka.Backup.Types.RecoveryPointCreator+import Amazonka.Backup.Types.RecoveryPointMember+import Amazonka.Backup.Types.RecoveryPointSelection+import Amazonka.Backup.Types.RecoveryPointStatus+import Amazonka.Backup.Types.ReportDeliveryChannel+import Amazonka.Backup.Types.ReportDestination+import Amazonka.Backup.Types.ReportJob+import Amazonka.Backup.Types.ReportPlan+import Amazonka.Backup.Types.ReportSetting+import Amazonka.Backup.Types.RestoreJobStatus+import Amazonka.Backup.Types.RestoreJobsListMember+import Amazonka.Backup.Types.StorageClass+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 @2018-11-15@ of the Amazon Backup SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "Backup",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "backup",+ Core.signingName = "backup",+ Core.version = "2018-11-15",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "Backup",+ 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 required resource already exists.+_AlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AlreadyExistsException =+ Core._MatchServiceError+ defaultService+ "AlreadyExistsException"++-- | Backup can\'t perform the action that you requested until it finishes+-- performing a previous action. Try again later.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"++-- | A dependent Amazon Web Services service or resource returned an error to+-- the Backup service, and the action cannot be completed.+_DependencyFailureException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_DependencyFailureException =+ Core._MatchServiceError+ defaultService+ "DependencyFailureException"++-- | Indicates that something is wrong with a parameter\'s value. For+-- example, the value is out of range.+_InvalidParameterValueException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidParameterValueException =+ Core._MatchServiceError+ defaultService+ "InvalidParameterValueException"++-- | Indicates that something is wrong with the input to the request. For+-- example, a parameter is of the wrong type.+_InvalidRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidRequestException =+ Core._MatchServiceError+ defaultService+ "InvalidRequestException"++-- | Backup is already performing an action on this recovery point. It can\'t+-- perform the action you requested until the first action finishes. Try+-- again later.+_InvalidResourceStateException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidResourceStateException =+ Core._MatchServiceError+ defaultService+ "InvalidResourceStateException"++-- | A limit in the request has been exceeded; for example, a maximum number+-- of items allowed in a request.+_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_LimitExceededException =+ Core._MatchServiceError+ defaultService+ "LimitExceededException"++-- | Indicates that a required parameter is missing.+_MissingParameterValueException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_MissingParameterValueException =+ Core._MatchServiceError+ defaultService+ "MissingParameterValueException"++-- | A resource that is required for the action doesn\'t exist.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"++-- | The request failed due to a temporary failure of the server.+_ServiceUnavailableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceUnavailableException =+ Core._MatchServiceError+ defaultService+ "ServiceUnavailableException"
+ gen/Amazonka/Backup/Types/AdvancedBackupSetting.hs view
@@ -0,0 +1,157 @@+{-# 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.Backup.Types.AdvancedBackupSetting+-- 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.Backup.Types.AdvancedBackupSetting 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 list of backup options for each resource type.+--+-- /See:/ 'newAdvancedBackupSetting' smart constructor.+data AdvancedBackupSetting = AdvancedBackupSetting'+ { -- | Specifies the backup option for a selected resource. This option is only+ -- available for Windows VSS backup jobs.+ --+ -- Valid values:+ --+ -- Set to @\"WindowsVSS\":\"enabled\"@ to enable the @WindowsVSS@ backup+ -- option and create a Windows VSS backup.+ --+ -- Set to @\"WindowsVSS\":\"disabled\"@ to create a regular backup. The+ -- @WindowsVSS@ option is not enabled by default.+ --+ -- If you specify an invalid option, you get an+ -- @InvalidParameterValueException@ exception.+ --+ -- For more information about Windows VSS backups, see+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/windows-backups.html Creating a VSS-Enabled Windows Backup>.+ backupOptions :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Specifies an object containing resource type and backup options. The+ -- only supported resource type is Amazon EC2 instances with Windows Volume+ -- Shadow Copy Service (VSS). For a CloudFormation example, see the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/integrate-cloudformation-with-aws-backup.html sample CloudFormation template to enable Windows VSS>+ -- in the /Backup User Guide/.+ --+ -- Valid values: @EC2@.+ resourceType :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AdvancedBackupSetting' 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:+--+-- 'backupOptions', 'advancedBackupSetting_backupOptions' - Specifies the backup option for a selected resource. This option is only+-- available for Windows VSS backup jobs.+--+-- Valid values:+--+-- Set to @\"WindowsVSS\":\"enabled\"@ to enable the @WindowsVSS@ backup+-- option and create a Windows VSS backup.+--+-- Set to @\"WindowsVSS\":\"disabled\"@ to create a regular backup. The+-- @WindowsVSS@ option is not enabled by default.+--+-- If you specify an invalid option, you get an+-- @InvalidParameterValueException@ exception.+--+-- For more information about Windows VSS backups, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/windows-backups.html Creating a VSS-Enabled Windows Backup>.+--+-- 'resourceType', 'advancedBackupSetting_resourceType' - Specifies an object containing resource type and backup options. The+-- only supported resource type is Amazon EC2 instances with Windows Volume+-- Shadow Copy Service (VSS). For a CloudFormation example, see the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/integrate-cloudformation-with-aws-backup.html sample CloudFormation template to enable Windows VSS>+-- in the /Backup User Guide/.+--+-- Valid values: @EC2@.+newAdvancedBackupSetting ::+ AdvancedBackupSetting+newAdvancedBackupSetting =+ AdvancedBackupSetting'+ { backupOptions =+ Prelude.Nothing,+ resourceType = Prelude.Nothing+ }++-- | Specifies the backup option for a selected resource. This option is only+-- available for Windows VSS backup jobs.+--+-- Valid values:+--+-- Set to @\"WindowsVSS\":\"enabled\"@ to enable the @WindowsVSS@ backup+-- option and create a Windows VSS backup.+--+-- Set to @\"WindowsVSS\":\"disabled\"@ to create a regular backup. The+-- @WindowsVSS@ option is not enabled by default.+--+-- If you specify an invalid option, you get an+-- @InvalidParameterValueException@ exception.+--+-- For more information about Windows VSS backups, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/windows-backups.html Creating a VSS-Enabled Windows Backup>.+advancedBackupSetting_backupOptions :: Lens.Lens' AdvancedBackupSetting (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+advancedBackupSetting_backupOptions = Lens.lens (\AdvancedBackupSetting' {backupOptions} -> backupOptions) (\s@AdvancedBackupSetting' {} a -> s {backupOptions = a} :: AdvancedBackupSetting) Prelude.. Lens.mapping Lens.coerced++-- | Specifies an object containing resource type and backup options. The+-- only supported resource type is Amazon EC2 instances with Windows Volume+-- Shadow Copy Service (VSS). For a CloudFormation example, see the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/integrate-cloudformation-with-aws-backup.html sample CloudFormation template to enable Windows VSS>+-- in the /Backup User Guide/.+--+-- Valid values: @EC2@.+advancedBackupSetting_resourceType :: Lens.Lens' AdvancedBackupSetting (Prelude.Maybe Prelude.Text)+advancedBackupSetting_resourceType = Lens.lens (\AdvancedBackupSetting' {resourceType} -> resourceType) (\s@AdvancedBackupSetting' {} a -> s {resourceType = a} :: AdvancedBackupSetting)++instance Data.FromJSON AdvancedBackupSetting where+ parseJSON =+ Data.withObject+ "AdvancedBackupSetting"+ ( \x ->+ AdvancedBackupSetting'+ Prelude.<$> (x Data..:? "BackupOptions" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "ResourceType")+ )++instance Prelude.Hashable AdvancedBackupSetting where+ hashWithSalt _salt AdvancedBackupSetting' {..} =+ _salt+ `Prelude.hashWithSalt` backupOptions+ `Prelude.hashWithSalt` resourceType++instance Prelude.NFData AdvancedBackupSetting where+ rnf AdvancedBackupSetting' {..} =+ Prelude.rnf backupOptions+ `Prelude.seq` Prelude.rnf resourceType++instance Data.ToJSON AdvancedBackupSetting where+ toJSON AdvancedBackupSetting' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("BackupOptions" Data..=) Prelude.<$> backupOptions,+ ("ResourceType" Data..=) Prelude.<$> resourceType+ ]+ )
+ gen/Amazonka/Backup/Types/BackupJob.hs view
@@ -0,0 +1,458 @@+{-# 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.Backup.Types.BackupJob+-- 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.Backup.Types.BackupJob where++import Amazonka.Backup.Types.BackupJobState+import Amazonka.Backup.Types.RecoveryPointCreator+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++-- | Contains detailed information about a backup job.+--+-- /See:/ 'newBackupJob' smart constructor.+data BackupJob = BackupJob'+ { -- | The account ID that owns the backup job.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a request to Backup to back up a resource.+ backupJobId :: Prelude.Maybe Prelude.Text,+ -- | Specifies the backup option for a selected resource. This option is only+ -- available for Windows Volume Shadow Copy Service (VSS) backup jobs.+ --+ -- Valid values: Set to @\"WindowsVSS\":\"enabled\"@ to enable the+ -- @WindowsVSS@ backup option and create a Windows VSS backup. Set to+ -- @\"WindowsVSS\":\"disabled\"@ to create a regular backup. If you specify+ -- an invalid option, you get an @InvalidParameterValueException@+ -- exception.+ backupOptions :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The size, in bytes, of a backup.+ backupSizeInBytes :: Prelude.Maybe Prelude.Integer,+ -- | Represents the type of backup for a backup job.+ backupType :: Prelude.Maybe Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+ -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | The size in bytes transferred to a backup vault at the time that the job+ -- status was queried.+ bytesTransferred :: Prelude.Maybe Prelude.Integer,+ -- | The date and time a job to create a backup job is completed, in Unix+ -- format and Coordinated Universal Time (UTC). The value of+ -- @CompletionDate@ is accurate to milliseconds. For example, the value+ -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+ completionDate :: Prelude.Maybe Data.POSIX,+ -- | Contains identifying information about the creation of a backup job,+ -- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+ -- @BackupRuleId@ of the backup plan used to create it.+ createdBy :: Prelude.Maybe RecoveryPointCreator,+ -- | The date and time a backup job is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The date and time a job to back up resources is expected to be+ -- completed, in Unix format and Coordinated Universal Time (UTC). The+ -- value of @ExpectedCompletionDate@ is accurate to milliseconds. For+ -- example, the value 1516925490.087 represents Friday, January 26, 2018+ -- 12:11:30.087 AM.+ expectedCompletionDate :: Prelude.Maybe Data.POSIX,+ -- | Specifies the IAM role ARN used to create the target recovery point. IAM+ -- roles other than the default role must include either @AWSBackup@ or+ -- @AwsBackup@ in the role name. For example,+ -- @arn:aws:iam::123456789012:role\/AWSBackupRDSAccess@. Role names without+ -- those strings lack permissions to perform backup jobs.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | This is a boolean value indicating this is a parent (composite) backup+ -- job.+ isParent :: Prelude.Maybe Prelude.Bool,+ -- | This uniquely identifies a request to Backup to back up a resource. The+ -- return will be the parent (composite) job ID.+ parentJobId :: Prelude.Maybe Prelude.Text,+ -- | Contains an estimated percentage complete of a job at the time the job+ -- status was queried.+ percentDone :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a resource. The format of the ARN+ -- depends on the resource type.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | The type of Amazon Web Services resource to be backed up; for example,+ -- an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon+ -- Relational Database Service (Amazon RDS) database. For Windows Volume+ -- Shadow Copy Service (VSS) backups, the only supported resource type is+ -- Amazon EC2.+ resourceType :: Prelude.Maybe Prelude.Text,+ -- | Specifies the time in Unix format and Coordinated Universal Time (UTC)+ -- when a backup job must be started before it is canceled. The value is+ -- calculated by adding the start window to the scheduled time. So if the+ -- scheduled time were 6:00 PM and the start window is 2 hours, the+ -- @StartBy@ time would be 8:00 PM on the date specified. The value of+ -- @StartBy@ is accurate to milliseconds. For example, the value+ -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+ startBy :: Prelude.Maybe Data.POSIX,+ -- | The current state of a resource recovery point.+ state :: Prelude.Maybe BackupJobState,+ -- | A detailed message explaining the status of the job to back up a+ -- resource.+ statusMessage :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupJob' 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:+--+-- 'accountId', 'backupJob_accountId' - The account ID that owns the backup job.+--+-- 'backupJobId', 'backupJob_backupJobId' - Uniquely identifies a request to Backup to back up a resource.+--+-- 'backupOptions', 'backupJob_backupOptions' - Specifies the backup option for a selected resource. This option is only+-- available for Windows Volume Shadow Copy Service (VSS) backup jobs.+--+-- Valid values: Set to @\"WindowsVSS\":\"enabled\"@ to enable the+-- @WindowsVSS@ backup option and create a Windows VSS backup. Set to+-- @\"WindowsVSS\":\"disabled\"@ to create a regular backup. If you specify+-- an invalid option, you get an @InvalidParameterValueException@+-- exception.+--+-- 'backupSizeInBytes', 'backupJob_backupSizeInBytes' - The size, in bytes, of a backup.+--+-- 'backupType', 'backupJob_backupType' - Represents the type of backup for a backup job.+--+-- 'backupVaultArn', 'backupJob_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'backupVaultName', 'backupJob_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'bytesTransferred', 'backupJob_bytesTransferred' - The size in bytes transferred to a backup vault at the time that the job+-- status was queried.+--+-- 'completionDate', 'backupJob_completionDate' - The date and time a job to create a backup job is completed, in Unix+-- format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'createdBy', 'backupJob_createdBy' - Contains identifying information about the creation of a backup job,+-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+-- @BackupRuleId@ of the backup plan used to create it.+--+-- 'creationDate', 'backupJob_creationDate' - The date and time a backup job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'expectedCompletionDate', 'backupJob_expectedCompletionDate' - The date and time a job to back up resources is expected to be+-- completed, in Unix format and Coordinated Universal Time (UTC). The+-- value of @ExpectedCompletionDate@ is accurate to milliseconds. For+-- example, the value 1516925490.087 represents Friday, January 26, 2018+-- 12:11:30.087 AM.+--+-- 'iamRoleArn', 'backupJob_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point. IAM+-- roles other than the default role must include either @AWSBackup@ or+-- @AwsBackup@ in the role name. For example,+-- @arn:aws:iam::123456789012:role\/AWSBackupRDSAccess@. Role names without+-- those strings lack permissions to perform backup jobs.+--+-- 'isParent', 'backupJob_isParent' - This is a boolean value indicating this is a parent (composite) backup+-- job.+--+-- 'parentJobId', 'backupJob_parentJobId' - This uniquely identifies a request to Backup to back up a resource. The+-- return will be the parent (composite) job ID.+--+-- 'percentDone', 'backupJob_percentDone' - Contains an estimated percentage complete of a job at the time the job+-- status was queried.+--+-- 'recoveryPointArn', 'backupJob_recoveryPointArn' - An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'resourceArn', 'backupJob_resourceArn' - An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the resource type.+--+-- 'resourceType', 'backupJob_resourceType' - The type of Amazon Web Services resource to be backed up; for example,+-- an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon+-- Relational Database Service (Amazon RDS) database. For Windows Volume+-- Shadow Copy Service (VSS) backups, the only supported resource type is+-- Amazon EC2.+--+-- 'startBy', 'backupJob_startBy' - Specifies the time in Unix format and Coordinated Universal Time (UTC)+-- when a backup job must be started before it is canceled. The value is+-- calculated by adding the start window to the scheduled time. So if the+-- scheduled time were 6:00 PM and the start window is 2 hours, the+-- @StartBy@ time would be 8:00 PM on the date specified. The value of+-- @StartBy@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'state', 'backupJob_state' - The current state of a resource recovery point.+--+-- 'statusMessage', 'backupJob_statusMessage' - A detailed message explaining the status of the job to back up a+-- resource.+newBackupJob ::+ BackupJob+newBackupJob =+ BackupJob'+ { accountId = Prelude.Nothing,+ backupJobId = Prelude.Nothing,+ backupOptions = Prelude.Nothing,+ backupSizeInBytes = Prelude.Nothing,+ backupType = Prelude.Nothing,+ backupVaultArn = Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ bytesTransferred = Prelude.Nothing,+ completionDate = Prelude.Nothing,+ createdBy = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ expectedCompletionDate = Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ isParent = Prelude.Nothing,+ parentJobId = Prelude.Nothing,+ percentDone = Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ resourceArn = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ startBy = Prelude.Nothing,+ state = Prelude.Nothing,+ statusMessage = Prelude.Nothing+ }++-- | The account ID that owns the backup job.+backupJob_accountId :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_accountId = Lens.lens (\BackupJob' {accountId} -> accountId) (\s@BackupJob' {} a -> s {accountId = a} :: BackupJob)++-- | Uniquely identifies a request to Backup to back up a resource.+backupJob_backupJobId :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_backupJobId = Lens.lens (\BackupJob' {backupJobId} -> backupJobId) (\s@BackupJob' {} a -> s {backupJobId = a} :: BackupJob)++-- | Specifies the backup option for a selected resource. This option is only+-- available for Windows Volume Shadow Copy Service (VSS) backup jobs.+--+-- Valid values: Set to @\"WindowsVSS\":\"enabled\"@ to enable the+-- @WindowsVSS@ backup option and create a Windows VSS backup. Set to+-- @\"WindowsVSS\":\"disabled\"@ to create a regular backup. If you specify+-- an invalid option, you get an @InvalidParameterValueException@+-- exception.+backupJob_backupOptions :: Lens.Lens' BackupJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+backupJob_backupOptions = Lens.lens (\BackupJob' {backupOptions} -> backupOptions) (\s@BackupJob' {} a -> s {backupOptions = a} :: BackupJob) Prelude.. Lens.mapping Lens.coerced++-- | The size, in bytes, of a backup.+backupJob_backupSizeInBytes :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Integer)+backupJob_backupSizeInBytes = Lens.lens (\BackupJob' {backupSizeInBytes} -> backupSizeInBytes) (\s@BackupJob' {} a -> s {backupSizeInBytes = a} :: BackupJob)++-- | Represents the type of backup for a backup job.+backupJob_backupType :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_backupType = Lens.lens (\BackupJob' {backupType} -> backupType) (\s@BackupJob' {} a -> s {backupType = a} :: BackupJob)++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+backupJob_backupVaultArn :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_backupVaultArn = Lens.lens (\BackupJob' {backupVaultArn} -> backupVaultArn) (\s@BackupJob' {} a -> s {backupVaultArn = a} :: BackupJob)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+backupJob_backupVaultName :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_backupVaultName = Lens.lens (\BackupJob' {backupVaultName} -> backupVaultName) (\s@BackupJob' {} a -> s {backupVaultName = a} :: BackupJob)++-- | The size in bytes transferred to a backup vault at the time that the job+-- status was queried.+backupJob_bytesTransferred :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Integer)+backupJob_bytesTransferred = Lens.lens (\BackupJob' {bytesTransferred} -> bytesTransferred) (\s@BackupJob' {} a -> s {bytesTransferred = a} :: BackupJob)++-- | The date and time a job to create a backup job is completed, in Unix+-- format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+backupJob_completionDate :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.UTCTime)+backupJob_completionDate = Lens.lens (\BackupJob' {completionDate} -> completionDate) (\s@BackupJob' {} a -> s {completionDate = a} :: BackupJob) Prelude.. Lens.mapping Data._Time++-- | Contains identifying information about the creation of a backup job,+-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+-- @BackupRuleId@ of the backup plan used to create it.+backupJob_createdBy :: Lens.Lens' BackupJob (Prelude.Maybe RecoveryPointCreator)+backupJob_createdBy = Lens.lens (\BackupJob' {createdBy} -> createdBy) (\s@BackupJob' {} a -> s {createdBy = a} :: BackupJob)++-- | The date and time a backup job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+backupJob_creationDate :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.UTCTime)+backupJob_creationDate = Lens.lens (\BackupJob' {creationDate} -> creationDate) (\s@BackupJob' {} a -> s {creationDate = a} :: BackupJob) Prelude.. Lens.mapping Data._Time++-- | The date and time a job to back up resources is expected to be+-- completed, in Unix format and Coordinated Universal Time (UTC). The+-- value of @ExpectedCompletionDate@ is accurate to milliseconds. For+-- example, the value 1516925490.087 represents Friday, January 26, 2018+-- 12:11:30.087 AM.+backupJob_expectedCompletionDate :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.UTCTime)+backupJob_expectedCompletionDate = Lens.lens (\BackupJob' {expectedCompletionDate} -> expectedCompletionDate) (\s@BackupJob' {} a -> s {expectedCompletionDate = a} :: BackupJob) Prelude.. Lens.mapping Data._Time++-- | Specifies the IAM role ARN used to create the target recovery point. IAM+-- roles other than the default role must include either @AWSBackup@ or+-- @AwsBackup@ in the role name. For example,+-- @arn:aws:iam::123456789012:role\/AWSBackupRDSAccess@. Role names without+-- those strings lack permissions to perform backup jobs.+backupJob_iamRoleArn :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_iamRoleArn = Lens.lens (\BackupJob' {iamRoleArn} -> iamRoleArn) (\s@BackupJob' {} a -> s {iamRoleArn = a} :: BackupJob)++-- | This is a boolean value indicating this is a parent (composite) backup+-- job.+backupJob_isParent :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Bool)+backupJob_isParent = Lens.lens (\BackupJob' {isParent} -> isParent) (\s@BackupJob' {} a -> s {isParent = a} :: BackupJob)++-- | This uniquely identifies a request to Backup to back up a resource. The+-- return will be the parent (composite) job ID.+backupJob_parentJobId :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_parentJobId = Lens.lens (\BackupJob' {parentJobId} -> parentJobId) (\s@BackupJob' {} a -> s {parentJobId = a} :: BackupJob)++-- | Contains an estimated percentage complete of a job at the time the job+-- status was queried.+backupJob_percentDone :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_percentDone = Lens.lens (\BackupJob' {percentDone} -> percentDone) (\s@BackupJob' {} a -> s {percentDone = a} :: BackupJob)++-- | An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+backupJob_recoveryPointArn :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_recoveryPointArn = Lens.lens (\BackupJob' {recoveryPointArn} -> recoveryPointArn) (\s@BackupJob' {} a -> s {recoveryPointArn = a} :: BackupJob)++-- | An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the resource type.+backupJob_resourceArn :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_resourceArn = Lens.lens (\BackupJob' {resourceArn} -> resourceArn) (\s@BackupJob' {} a -> s {resourceArn = a} :: BackupJob)++-- | The type of Amazon Web Services resource to be backed up; for example,+-- an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon+-- Relational Database Service (Amazon RDS) database. For Windows Volume+-- Shadow Copy Service (VSS) backups, the only supported resource type is+-- Amazon EC2.+backupJob_resourceType :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_resourceType = Lens.lens (\BackupJob' {resourceType} -> resourceType) (\s@BackupJob' {} a -> s {resourceType = a} :: BackupJob)++-- | Specifies the time in Unix format and Coordinated Universal Time (UTC)+-- when a backup job must be started before it is canceled. The value is+-- calculated by adding the start window to the scheduled time. So if the+-- scheduled time were 6:00 PM and the start window is 2 hours, the+-- @StartBy@ time would be 8:00 PM on the date specified. The value of+-- @StartBy@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+backupJob_startBy :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.UTCTime)+backupJob_startBy = Lens.lens (\BackupJob' {startBy} -> startBy) (\s@BackupJob' {} a -> s {startBy = a} :: BackupJob) Prelude.. Lens.mapping Data._Time++-- | The current state of a resource recovery point.+backupJob_state :: Lens.Lens' BackupJob (Prelude.Maybe BackupJobState)+backupJob_state = Lens.lens (\BackupJob' {state} -> state) (\s@BackupJob' {} a -> s {state = a} :: BackupJob)++-- | A detailed message explaining the status of the job to back up a+-- resource.+backupJob_statusMessage :: Lens.Lens' BackupJob (Prelude.Maybe Prelude.Text)+backupJob_statusMessage = Lens.lens (\BackupJob' {statusMessage} -> statusMessage) (\s@BackupJob' {} a -> s {statusMessage = a} :: BackupJob)++instance Data.FromJSON BackupJob where+ parseJSON =+ Data.withObject+ "BackupJob"+ ( \x ->+ BackupJob'+ Prelude.<$> (x Data..:? "AccountId")+ Prelude.<*> (x Data..:? "BackupJobId")+ Prelude.<*> (x Data..:? "BackupOptions" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "BackupSizeInBytes")+ Prelude.<*> (x Data..:? "BackupType")+ Prelude.<*> (x Data..:? "BackupVaultArn")+ Prelude.<*> (x Data..:? "BackupVaultName")+ Prelude.<*> (x Data..:? "BytesTransferred")+ Prelude.<*> (x Data..:? "CompletionDate")+ Prelude.<*> (x Data..:? "CreatedBy")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "ExpectedCompletionDate")+ Prelude.<*> (x Data..:? "IamRoleArn")+ Prelude.<*> (x Data..:? "IsParent")+ Prelude.<*> (x Data..:? "ParentJobId")+ Prelude.<*> (x Data..:? "PercentDone")+ Prelude.<*> (x Data..:? "RecoveryPointArn")+ Prelude.<*> (x Data..:? "ResourceArn")+ Prelude.<*> (x Data..:? "ResourceType")+ Prelude.<*> (x Data..:? "StartBy")+ Prelude.<*> (x Data..:? "State")+ Prelude.<*> (x Data..:? "StatusMessage")+ )++instance Prelude.Hashable BackupJob where+ hashWithSalt _salt BackupJob' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` backupJobId+ `Prelude.hashWithSalt` backupOptions+ `Prelude.hashWithSalt` backupSizeInBytes+ `Prelude.hashWithSalt` backupType+ `Prelude.hashWithSalt` backupVaultArn+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` bytesTransferred+ `Prelude.hashWithSalt` completionDate+ `Prelude.hashWithSalt` createdBy+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` expectedCompletionDate+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` isParent+ `Prelude.hashWithSalt` parentJobId+ `Prelude.hashWithSalt` percentDone+ `Prelude.hashWithSalt` recoveryPointArn+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` startBy+ `Prelude.hashWithSalt` state+ `Prelude.hashWithSalt` statusMessage++instance Prelude.NFData BackupJob where+ rnf BackupJob' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf backupJobId+ `Prelude.seq` Prelude.rnf backupOptions+ `Prelude.seq` Prelude.rnf backupSizeInBytes+ `Prelude.seq` Prelude.rnf backupType+ `Prelude.seq` Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf bytesTransferred+ `Prelude.seq` Prelude.rnf completionDate+ `Prelude.seq` Prelude.rnf createdBy+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf expectedCompletionDate+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf isParent+ `Prelude.seq` Prelude.rnf parentJobId+ `Prelude.seq` Prelude.rnf percentDone+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf startBy+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf statusMessage
+ gen/Amazonka/Backup/Types/BackupJobState.hs view
@@ -0,0 +1,106 @@+{-# 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.Backup.Types.BackupJobState+-- 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.Backup.Types.BackupJobState+ ( BackupJobState+ ( ..,+ BackupJobState_ABORTED,+ BackupJobState_ABORTING,+ BackupJobState_COMPLETED,+ BackupJobState_CREATED,+ BackupJobState_EXPIRED,+ BackupJobState_FAILED,+ BackupJobState_PARTIAL,+ BackupJobState_PENDING,+ BackupJobState_RUNNING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype BackupJobState = BackupJobState'+ { fromBackupJobState ::+ 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 BackupJobState_ABORTED :: BackupJobState+pattern BackupJobState_ABORTED = BackupJobState' "ABORTED"++pattern BackupJobState_ABORTING :: BackupJobState+pattern BackupJobState_ABORTING = BackupJobState' "ABORTING"++pattern BackupJobState_COMPLETED :: BackupJobState+pattern BackupJobState_COMPLETED = BackupJobState' "COMPLETED"++pattern BackupJobState_CREATED :: BackupJobState+pattern BackupJobState_CREATED = BackupJobState' "CREATED"++pattern BackupJobState_EXPIRED :: BackupJobState+pattern BackupJobState_EXPIRED = BackupJobState' "EXPIRED"++pattern BackupJobState_FAILED :: BackupJobState+pattern BackupJobState_FAILED = BackupJobState' "FAILED"++pattern BackupJobState_PARTIAL :: BackupJobState+pattern BackupJobState_PARTIAL = BackupJobState' "PARTIAL"++pattern BackupJobState_PENDING :: BackupJobState+pattern BackupJobState_PENDING = BackupJobState' "PENDING"++pattern BackupJobState_RUNNING :: BackupJobState+pattern BackupJobState_RUNNING = BackupJobState' "RUNNING"++{-# COMPLETE+ BackupJobState_ABORTED,+ BackupJobState_ABORTING,+ BackupJobState_COMPLETED,+ BackupJobState_CREATED,+ BackupJobState_EXPIRED,+ BackupJobState_FAILED,+ BackupJobState_PARTIAL,+ BackupJobState_PENDING,+ BackupJobState_RUNNING,+ BackupJobState'+ #-}
+ gen/Amazonka/Backup/Types/BackupPlan.hs view
@@ -0,0 +1,113 @@+{-# 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.Backup.Types.BackupPlan+-- 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.Backup.Types.BackupPlan where++import Amazonka.Backup.Types.AdvancedBackupSetting+import Amazonka.Backup.Types.BackupRule+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++-- | Contains an optional backup plan display name and an array of+-- @BackupRule@ objects, each of which specifies a backup rule. Each rule+-- in a backup plan is a separate scheduled task and can back up a+-- different selection of Amazon Web Services resources.+--+-- /See:/ 'newBackupPlan' smart constructor.+data BackupPlan = BackupPlan'+ { -- | Contains a list of @BackupOptions@ for each resource type.+ advancedBackupSettings :: Prelude.Maybe [AdvancedBackupSetting],+ -- | The display name of a backup plan. Must contain 1 to 50 alphanumeric or+ -- \'-_.\' characters.+ backupPlanName :: Prelude.Text,+ -- | An array of @BackupRule@ objects, each of which specifies a scheduled+ -- task that is used to back up a selection of resources.+ rules :: [BackupRule]+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupPlan' 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:+--+-- 'advancedBackupSettings', 'backupPlan_advancedBackupSettings' - Contains a list of @BackupOptions@ for each resource type.+--+-- 'backupPlanName', 'backupPlan_backupPlanName' - The display name of a backup plan. Must contain 1 to 50 alphanumeric or+-- \'-_.\' characters.+--+-- 'rules', 'backupPlan_rules' - An array of @BackupRule@ objects, each of which specifies a scheduled+-- task that is used to back up a selection of resources.+newBackupPlan ::+ -- | 'backupPlanName'+ Prelude.Text ->+ BackupPlan+newBackupPlan pBackupPlanName_ =+ BackupPlan'+ { advancedBackupSettings =+ Prelude.Nothing,+ backupPlanName = pBackupPlanName_,+ rules = Prelude.mempty+ }++-- | Contains a list of @BackupOptions@ for each resource type.+backupPlan_advancedBackupSettings :: Lens.Lens' BackupPlan (Prelude.Maybe [AdvancedBackupSetting])+backupPlan_advancedBackupSettings = Lens.lens (\BackupPlan' {advancedBackupSettings} -> advancedBackupSettings) (\s@BackupPlan' {} a -> s {advancedBackupSettings = a} :: BackupPlan) Prelude.. Lens.mapping Lens.coerced++-- | The display name of a backup plan. Must contain 1 to 50 alphanumeric or+-- \'-_.\' characters.+backupPlan_backupPlanName :: Lens.Lens' BackupPlan Prelude.Text+backupPlan_backupPlanName = Lens.lens (\BackupPlan' {backupPlanName} -> backupPlanName) (\s@BackupPlan' {} a -> s {backupPlanName = a} :: BackupPlan)++-- | An array of @BackupRule@ objects, each of which specifies a scheduled+-- task that is used to back up a selection of resources.+backupPlan_rules :: Lens.Lens' BackupPlan [BackupRule]+backupPlan_rules = Lens.lens (\BackupPlan' {rules} -> rules) (\s@BackupPlan' {} a -> s {rules = a} :: BackupPlan) Prelude.. Lens.coerced++instance Data.FromJSON BackupPlan where+ parseJSON =+ Data.withObject+ "BackupPlan"+ ( \x ->+ BackupPlan'+ Prelude.<$> ( x+ Data..:? "AdvancedBackupSettings"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..: "BackupPlanName")+ Prelude.<*> (x Data..:? "Rules" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable BackupPlan where+ hashWithSalt _salt BackupPlan' {..} =+ _salt+ `Prelude.hashWithSalt` advancedBackupSettings+ `Prelude.hashWithSalt` backupPlanName+ `Prelude.hashWithSalt` rules++instance Prelude.NFData BackupPlan where+ rnf BackupPlan' {..} =+ Prelude.rnf advancedBackupSettings+ `Prelude.seq` Prelude.rnf backupPlanName+ `Prelude.seq` Prelude.rnf rules
+ gen/Amazonka/Backup/Types/BackupPlanInput.hs view
@@ -0,0 +1,116 @@+{-# 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.Backup.Types.BackupPlanInput+-- 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.Backup.Types.BackupPlanInput where++import Amazonka.Backup.Types.AdvancedBackupSetting+import Amazonka.Backup.Types.BackupRuleInput+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++-- | Contains an optional backup plan display name and an array of+-- @BackupRule@ objects, each of which specifies a backup rule. Each rule+-- in a backup plan is a separate scheduled task.+--+-- /See:/ 'newBackupPlanInput' smart constructor.+data BackupPlanInput = BackupPlanInput'+ { -- | Specifies a list of @BackupOptions@ for each resource type. These+ -- settings are only available for Windows Volume Shadow Copy Service (VSS)+ -- backup jobs.+ advancedBackupSettings :: Prelude.Maybe [AdvancedBackupSetting],+ -- | The display name of a backup plan. Must contain 1 to 50 alphanumeric or+ -- \'-_.\' characters.+ backupPlanName :: Prelude.Text,+ -- | An array of @BackupRule@ objects, each of which specifies a scheduled+ -- task that is used to back up a selection of resources.+ rules :: [BackupRuleInput]+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupPlanInput' 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:+--+-- 'advancedBackupSettings', 'backupPlanInput_advancedBackupSettings' - Specifies a list of @BackupOptions@ for each resource type. These+-- settings are only available for Windows Volume Shadow Copy Service (VSS)+-- backup jobs.+--+-- 'backupPlanName', 'backupPlanInput_backupPlanName' - The display name of a backup plan. Must contain 1 to 50 alphanumeric or+-- \'-_.\' characters.+--+-- 'rules', 'backupPlanInput_rules' - An array of @BackupRule@ objects, each of which specifies a scheduled+-- task that is used to back up a selection of resources.+newBackupPlanInput ::+ -- | 'backupPlanName'+ Prelude.Text ->+ BackupPlanInput+newBackupPlanInput pBackupPlanName_ =+ BackupPlanInput'+ { advancedBackupSettings =+ Prelude.Nothing,+ backupPlanName = pBackupPlanName_,+ rules = Prelude.mempty+ }++-- | Specifies a list of @BackupOptions@ for each resource type. These+-- settings are only available for Windows Volume Shadow Copy Service (VSS)+-- backup jobs.+backupPlanInput_advancedBackupSettings :: Lens.Lens' BackupPlanInput (Prelude.Maybe [AdvancedBackupSetting])+backupPlanInput_advancedBackupSettings = Lens.lens (\BackupPlanInput' {advancedBackupSettings} -> advancedBackupSettings) (\s@BackupPlanInput' {} a -> s {advancedBackupSettings = a} :: BackupPlanInput) Prelude.. Lens.mapping Lens.coerced++-- | The display name of a backup plan. Must contain 1 to 50 alphanumeric or+-- \'-_.\' characters.+backupPlanInput_backupPlanName :: Lens.Lens' BackupPlanInput Prelude.Text+backupPlanInput_backupPlanName = Lens.lens (\BackupPlanInput' {backupPlanName} -> backupPlanName) (\s@BackupPlanInput' {} a -> s {backupPlanName = a} :: BackupPlanInput)++-- | An array of @BackupRule@ objects, each of which specifies a scheduled+-- task that is used to back up a selection of resources.+backupPlanInput_rules :: Lens.Lens' BackupPlanInput [BackupRuleInput]+backupPlanInput_rules = Lens.lens (\BackupPlanInput' {rules} -> rules) (\s@BackupPlanInput' {} a -> s {rules = a} :: BackupPlanInput) Prelude.. Lens.coerced++instance Prelude.Hashable BackupPlanInput where+ hashWithSalt _salt BackupPlanInput' {..} =+ _salt+ `Prelude.hashWithSalt` advancedBackupSettings+ `Prelude.hashWithSalt` backupPlanName+ `Prelude.hashWithSalt` rules++instance Prelude.NFData BackupPlanInput where+ rnf BackupPlanInput' {..} =+ Prelude.rnf advancedBackupSettings+ `Prelude.seq` Prelude.rnf backupPlanName+ `Prelude.seq` Prelude.rnf rules++instance Data.ToJSON BackupPlanInput where+ toJSON BackupPlanInput' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("AdvancedBackupSettings" Data..=)+ Prelude.<$> advancedBackupSettings,+ Prelude.Just+ ("BackupPlanName" Data..= backupPlanName),+ Prelude.Just ("Rules" Data..= rules)+ ]+ )
+ gen/Amazonka/Backup/Types/BackupPlanTemplatesListMember.hs view
@@ -0,0 +1,88 @@+{-# 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.Backup.Types.BackupPlanTemplatesListMember+-- 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.Backup.Types.BackupPlanTemplatesListMember 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++-- | An object specifying metadata associated with a backup plan template.+--+-- /See:/ 'newBackupPlanTemplatesListMember' smart constructor.+data BackupPlanTemplatesListMember = BackupPlanTemplatesListMember'+ { -- | Uniquely identifies a stored backup plan template.+ backupPlanTemplateId :: Prelude.Maybe Prelude.Text,+ -- | The optional display name of a backup plan template.+ backupPlanTemplateName :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupPlanTemplatesListMember' 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:+--+-- 'backupPlanTemplateId', 'backupPlanTemplatesListMember_backupPlanTemplateId' - Uniquely identifies a stored backup plan template.+--+-- 'backupPlanTemplateName', 'backupPlanTemplatesListMember_backupPlanTemplateName' - The optional display name of a backup plan template.+newBackupPlanTemplatesListMember ::+ BackupPlanTemplatesListMember+newBackupPlanTemplatesListMember =+ BackupPlanTemplatesListMember'+ { backupPlanTemplateId =+ Prelude.Nothing,+ backupPlanTemplateName = Prelude.Nothing+ }++-- | Uniquely identifies a stored backup plan template.+backupPlanTemplatesListMember_backupPlanTemplateId :: Lens.Lens' BackupPlanTemplatesListMember (Prelude.Maybe Prelude.Text)+backupPlanTemplatesListMember_backupPlanTemplateId = Lens.lens (\BackupPlanTemplatesListMember' {backupPlanTemplateId} -> backupPlanTemplateId) (\s@BackupPlanTemplatesListMember' {} a -> s {backupPlanTemplateId = a} :: BackupPlanTemplatesListMember)++-- | The optional display name of a backup plan template.+backupPlanTemplatesListMember_backupPlanTemplateName :: Lens.Lens' BackupPlanTemplatesListMember (Prelude.Maybe Prelude.Text)+backupPlanTemplatesListMember_backupPlanTemplateName = Lens.lens (\BackupPlanTemplatesListMember' {backupPlanTemplateName} -> backupPlanTemplateName) (\s@BackupPlanTemplatesListMember' {} a -> s {backupPlanTemplateName = a} :: BackupPlanTemplatesListMember)++instance Data.FromJSON BackupPlanTemplatesListMember where+ parseJSON =+ Data.withObject+ "BackupPlanTemplatesListMember"+ ( \x ->+ BackupPlanTemplatesListMember'+ Prelude.<$> (x Data..:? "BackupPlanTemplateId")+ Prelude.<*> (x Data..:? "BackupPlanTemplateName")+ )++instance+ Prelude.Hashable+ BackupPlanTemplatesListMember+ where+ hashWithSalt _salt BackupPlanTemplatesListMember' {..} =+ _salt+ `Prelude.hashWithSalt` backupPlanTemplateId+ `Prelude.hashWithSalt` backupPlanTemplateName++instance Prelude.NFData BackupPlanTemplatesListMember where+ rnf BackupPlanTemplatesListMember' {..} =+ Prelude.rnf backupPlanTemplateId+ `Prelude.seq` Prelude.rnf backupPlanTemplateName
+ gen/Amazonka/Backup/Types/BackupPlansListMember.hs view
@@ -0,0 +1,227 @@+{-# 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.Backup.Types.BackupPlansListMember+-- 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.Backup.Types.BackupPlansListMember where++import Amazonka.Backup.Types.AdvancedBackupSetting+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++-- | Contains metadata about a backup plan.+--+-- /See:/ 'newBackupPlansListMember' smart constructor.+data BackupPlansListMember = BackupPlansListMember'+ { -- | Contains a list of @BackupOptions@ for a resource type.+ advancedBackupSettings :: Prelude.Maybe [AdvancedBackupSetting],+ -- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+ backupPlanArn :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Maybe Prelude.Text,+ -- | The display name of a saved backup plan.+ backupPlanName :: Prelude.Maybe Prelude.Text,+ -- | The date and time a resource backup plan is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | A unique string that identifies the request and allows failed requests+ -- to be retried without the risk of running the operation twice. This+ -- parameter is optional.+ --+ -- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+ -- characters.+ creatorRequestId :: Prelude.Maybe Prelude.Text,+ -- | The date and time a backup plan is deleted, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @DeletionDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ deletionDate :: Prelude.Maybe Data.POSIX,+ -- | The last time a job to back up resources was run with this rule. A date+ -- and time, in Unix format and Coordinated Universal Time (UTC). The value+ -- of @LastExecutionDate@ is accurate to milliseconds. For example, the+ -- value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087+ -- AM.+ lastExecutionDate :: Prelude.Maybe Data.POSIX,+ -- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+ -- most 1,024 bytes long. Version IDs cannot be edited.+ versionId :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupPlansListMember' 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:+--+-- 'advancedBackupSettings', 'backupPlansListMember_advancedBackupSettings' - Contains a list of @BackupOptions@ for a resource type.+--+-- 'backupPlanArn', 'backupPlansListMember_backupPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+--+-- 'backupPlanId', 'backupPlansListMember_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'backupPlanName', 'backupPlansListMember_backupPlanName' - The display name of a saved backup plan.+--+-- 'creationDate', 'backupPlansListMember_creationDate' - The date and time a resource backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'creatorRequestId', 'backupPlansListMember_creatorRequestId' - A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+--+-- 'deletionDate', 'backupPlansListMember_deletionDate' - The date and time a backup plan is deleted, in Unix format and+-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'lastExecutionDate', 'backupPlansListMember_lastExecutionDate' - The last time a job to back up resources was run with this rule. A date+-- and time, in Unix format and Coordinated Universal Time (UTC). The value+-- of @LastExecutionDate@ is accurate to milliseconds. For example, the+-- value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087+-- AM.+--+-- 'versionId', 'backupPlansListMember_versionId' - Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version IDs cannot be edited.+newBackupPlansListMember ::+ BackupPlansListMember+newBackupPlansListMember =+ BackupPlansListMember'+ { advancedBackupSettings =+ Prelude.Nothing,+ backupPlanArn = Prelude.Nothing,+ backupPlanId = Prelude.Nothing,+ backupPlanName = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ creatorRequestId = Prelude.Nothing,+ deletionDate = Prelude.Nothing,+ lastExecutionDate = Prelude.Nothing,+ versionId = Prelude.Nothing+ }++-- | Contains a list of @BackupOptions@ for a resource type.+backupPlansListMember_advancedBackupSettings :: Lens.Lens' BackupPlansListMember (Prelude.Maybe [AdvancedBackupSetting])+backupPlansListMember_advancedBackupSettings = Lens.lens (\BackupPlansListMember' {advancedBackupSettings} -> advancedBackupSettings) (\s@BackupPlansListMember' {} a -> s {advancedBackupSettings = a} :: BackupPlansListMember) Prelude.. Lens.mapping Lens.coerced++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+backupPlansListMember_backupPlanArn :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.Text)+backupPlansListMember_backupPlanArn = Lens.lens (\BackupPlansListMember' {backupPlanArn} -> backupPlanArn) (\s@BackupPlansListMember' {} a -> s {backupPlanArn = a} :: BackupPlansListMember)++-- | Uniquely identifies a backup plan.+backupPlansListMember_backupPlanId :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.Text)+backupPlansListMember_backupPlanId = Lens.lens (\BackupPlansListMember' {backupPlanId} -> backupPlanId) (\s@BackupPlansListMember' {} a -> s {backupPlanId = a} :: BackupPlansListMember)++-- | The display name of a saved backup plan.+backupPlansListMember_backupPlanName :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.Text)+backupPlansListMember_backupPlanName = Lens.lens (\BackupPlansListMember' {backupPlanName} -> backupPlanName) (\s@BackupPlansListMember' {} a -> s {backupPlanName = a} :: BackupPlansListMember)++-- | The date and time a resource backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+backupPlansListMember_creationDate :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.UTCTime)+backupPlansListMember_creationDate = Lens.lens (\BackupPlansListMember' {creationDate} -> creationDate) (\s@BackupPlansListMember' {} a -> s {creationDate = a} :: BackupPlansListMember) Prelude.. Lens.mapping Data._Time++-- | A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+backupPlansListMember_creatorRequestId :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.Text)+backupPlansListMember_creatorRequestId = Lens.lens (\BackupPlansListMember' {creatorRequestId} -> creatorRequestId) (\s@BackupPlansListMember' {} a -> s {creatorRequestId = a} :: BackupPlansListMember)++-- | The date and time a backup plan is deleted, in Unix format and+-- Coordinated Universal Time (UTC). The value of @DeletionDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+backupPlansListMember_deletionDate :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.UTCTime)+backupPlansListMember_deletionDate = Lens.lens (\BackupPlansListMember' {deletionDate} -> deletionDate) (\s@BackupPlansListMember' {} a -> s {deletionDate = a} :: BackupPlansListMember) Prelude.. Lens.mapping Data._Time++-- | The last time a job to back up resources was run with this rule. A date+-- and time, in Unix format and Coordinated Universal Time (UTC). The value+-- of @LastExecutionDate@ is accurate to milliseconds. For example, the+-- value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087+-- AM.+backupPlansListMember_lastExecutionDate :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.UTCTime)+backupPlansListMember_lastExecutionDate = Lens.lens (\BackupPlansListMember' {lastExecutionDate} -> lastExecutionDate) (\s@BackupPlansListMember' {} a -> s {lastExecutionDate = a} :: BackupPlansListMember) Prelude.. Lens.mapping Data._Time++-- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version IDs cannot be edited.+backupPlansListMember_versionId :: Lens.Lens' BackupPlansListMember (Prelude.Maybe Prelude.Text)+backupPlansListMember_versionId = Lens.lens (\BackupPlansListMember' {versionId} -> versionId) (\s@BackupPlansListMember' {} a -> s {versionId = a} :: BackupPlansListMember)++instance Data.FromJSON BackupPlansListMember where+ parseJSON =+ Data.withObject+ "BackupPlansListMember"+ ( \x ->+ BackupPlansListMember'+ Prelude.<$> ( x+ Data..:? "AdvancedBackupSettings"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "BackupPlanArn")+ Prelude.<*> (x Data..:? "BackupPlanId")+ Prelude.<*> (x Data..:? "BackupPlanName")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "CreatorRequestId")+ Prelude.<*> (x Data..:? "DeletionDate")+ Prelude.<*> (x Data..:? "LastExecutionDate")+ Prelude.<*> (x Data..:? "VersionId")+ )++instance Prelude.Hashable BackupPlansListMember where+ hashWithSalt _salt BackupPlansListMember' {..} =+ _salt+ `Prelude.hashWithSalt` advancedBackupSettings+ `Prelude.hashWithSalt` backupPlanArn+ `Prelude.hashWithSalt` backupPlanId+ `Prelude.hashWithSalt` backupPlanName+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` creatorRequestId+ `Prelude.hashWithSalt` deletionDate+ `Prelude.hashWithSalt` lastExecutionDate+ `Prelude.hashWithSalt` versionId++instance Prelude.NFData BackupPlansListMember where+ rnf BackupPlansListMember' {..} =+ Prelude.rnf advancedBackupSettings+ `Prelude.seq` Prelude.rnf backupPlanArn+ `Prelude.seq` Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf backupPlanName+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf creatorRequestId+ `Prelude.seq` Prelude.rnf deletionDate+ `Prelude.seq` Prelude.rnf lastExecutionDate+ `Prelude.seq` Prelude.rnf versionId
+ gen/Amazonka/Backup/Types/BackupRule.hs view
@@ -0,0 +1,289 @@+{-# 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.Backup.Types.BackupRule+-- 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.Backup.Types.BackupRule where++import Amazonka.Backup.Types.CopyAction+import Amazonka.Backup.Types.Lifecycle+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++-- | Specifies a scheduled task used to back up a selection of resources.+--+-- /See:/ 'newBackupRule' smart constructor.+data BackupRule = BackupRule'+ { -- | A value in minutes after a backup job is successfully started before it+ -- must be completed or it will be canceled by Backup. This value is+ -- optional.+ completionWindowMinutes :: Prelude.Maybe Prelude.Integer,+ -- | An array of @CopyAction@ objects, which contains the details of the copy+ -- operation.+ copyActions :: Prelude.Maybe [CopyAction],+ -- | Specifies whether Backup creates continuous backups. True causes Backup+ -- to create continuous backups capable of point-in-time restore (PITR).+ -- False (or not specified) causes Backup to create snapshot backups.+ enableContinuousBackup :: Prelude.Maybe Prelude.Bool,+ -- | The lifecycle defines when a protected resource is transitioned to cold+ -- storage and when it expires. Backup transitions and expires backups+ -- automatically according to the lifecycle that you define.+ --+ -- Backups transitioned to cold storage must be stored in cold storage for+ -- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+ -- greater than the “transition to cold after days” setting. The+ -- “transition to cold after days” setting cannot be changed after a backup+ -- has been transitioned to cold.+ --+ -- Resource types that are able to be transitioned to cold storage are+ -- listed in the \"Lifecycle to cold storage\" section of the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+ -- table. Backup ignores this expression for other resource types.+ lifecycle :: Prelude.Maybe Lifecycle,+ -- | An array of key-value pair strings that are assigned to resources that+ -- are associated with this rule when restored from backup.+ recoveryPointTags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),+ -- | Uniquely identifies a rule that is used to schedule the backup of a+ -- selection of resources.+ ruleId :: Prelude.Maybe Prelude.Text,+ -- | A cron expression in UTC specifying when Backup initiates a backup job.+ -- For more information about Amazon Web Services cron expressions, see+ -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html Schedule Expressions for Rules>+ -- in the /Amazon CloudWatch Events User Guide./. Two examples of Amazon+ -- Web Services cron expressions are @ 15 * ? * * *@ (take a backup every+ -- hour at 15 minutes past the hour) and @0 12 * * ? *@ (take a backup+ -- every day at 12 noon UTC). For a table of examples, click the preceding+ -- link and scroll down the page.+ scheduleExpression :: Prelude.Maybe Prelude.Text,+ -- | A value in minutes after a backup is scheduled before a job will be+ -- canceled if it doesn\'t start successfully. This value is optional. If+ -- this value is included, it must be at least 60 minutes to avoid errors.+ startWindowMinutes :: Prelude.Maybe Prelude.Integer,+ -- | A display name for a backup rule. Must contain 1 to 50 alphanumeric or+ -- \'-_.\' characters.+ ruleName :: Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ targetBackupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupRule' 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:+--+-- 'completionWindowMinutes', 'backupRule_completionWindowMinutes' - A value in minutes after a backup job is successfully started before it+-- must be completed or it will be canceled by Backup. This value is+-- optional.+--+-- 'copyActions', 'backupRule_copyActions' - An array of @CopyAction@ objects, which contains the details of the copy+-- operation.+--+-- 'enableContinuousBackup', 'backupRule_enableContinuousBackup' - Specifies whether Backup creates continuous backups. True causes Backup+-- to create continuous backups capable of point-in-time restore (PITR).+-- False (or not specified) causes Backup to create snapshot backups.+--+-- 'lifecycle', 'backupRule_lifecycle' - The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+--+-- 'recoveryPointTags', 'backupRule_recoveryPointTags' - An array of key-value pair strings that are assigned to resources that+-- are associated with this rule when restored from backup.+--+-- 'ruleId', 'backupRule_ruleId' - Uniquely identifies a rule that is used to schedule the backup of a+-- selection of resources.+--+-- 'scheduleExpression', 'backupRule_scheduleExpression' - A cron expression in UTC specifying when Backup initiates a backup job.+-- For more information about Amazon Web Services cron expressions, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html Schedule Expressions for Rules>+-- in the /Amazon CloudWatch Events User Guide./. Two examples of Amazon+-- Web Services cron expressions are @ 15 * ? * * *@ (take a backup every+-- hour at 15 minutes past the hour) and @0 12 * * ? *@ (take a backup+-- every day at 12 noon UTC). For a table of examples, click the preceding+-- link and scroll down the page.+--+-- 'startWindowMinutes', 'backupRule_startWindowMinutes' - A value in minutes after a backup is scheduled before a job will be+-- canceled if it doesn\'t start successfully. This value is optional. If+-- this value is included, it must be at least 60 minutes to avoid errors.+--+-- 'ruleName', 'backupRule_ruleName' - A display name for a backup rule. Must contain 1 to 50 alphanumeric or+-- \'-_.\' characters.+--+-- 'targetBackupVaultName', 'backupRule_targetBackupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+newBackupRule ::+ -- | 'ruleName'+ Prelude.Text ->+ -- | 'targetBackupVaultName'+ Prelude.Text ->+ BackupRule+newBackupRule pRuleName_ pTargetBackupVaultName_ =+ BackupRule'+ { completionWindowMinutes =+ Prelude.Nothing,+ copyActions = Prelude.Nothing,+ enableContinuousBackup = Prelude.Nothing,+ lifecycle = Prelude.Nothing,+ recoveryPointTags = Prelude.Nothing,+ ruleId = Prelude.Nothing,+ scheduleExpression = Prelude.Nothing,+ startWindowMinutes = Prelude.Nothing,+ ruleName = pRuleName_,+ targetBackupVaultName = pTargetBackupVaultName_+ }++-- | A value in minutes after a backup job is successfully started before it+-- must be completed or it will be canceled by Backup. This value is+-- optional.+backupRule_completionWindowMinutes :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Integer)+backupRule_completionWindowMinutes = Lens.lens (\BackupRule' {completionWindowMinutes} -> completionWindowMinutes) (\s@BackupRule' {} a -> s {completionWindowMinutes = a} :: BackupRule)++-- | An array of @CopyAction@ objects, which contains the details of the copy+-- operation.+backupRule_copyActions :: Lens.Lens' BackupRule (Prelude.Maybe [CopyAction])+backupRule_copyActions = Lens.lens (\BackupRule' {copyActions} -> copyActions) (\s@BackupRule' {} a -> s {copyActions = a} :: BackupRule) Prelude.. Lens.mapping Lens.coerced++-- | Specifies whether Backup creates continuous backups. True causes Backup+-- to create continuous backups capable of point-in-time restore (PITR).+-- False (or not specified) causes Backup to create snapshot backups.+backupRule_enableContinuousBackup :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Bool)+backupRule_enableContinuousBackup = Lens.lens (\BackupRule' {enableContinuousBackup} -> enableContinuousBackup) (\s@BackupRule' {} a -> s {enableContinuousBackup = a} :: BackupRule)++-- | The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+backupRule_lifecycle :: Lens.Lens' BackupRule (Prelude.Maybe Lifecycle)+backupRule_lifecycle = Lens.lens (\BackupRule' {lifecycle} -> lifecycle) (\s@BackupRule' {} a -> s {lifecycle = a} :: BackupRule)++-- | An array of key-value pair strings that are assigned to resources that+-- are associated with this rule when restored from backup.+backupRule_recoveryPointTags :: Lens.Lens' BackupRule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+backupRule_recoveryPointTags = Lens.lens (\BackupRule' {recoveryPointTags} -> recoveryPointTags) (\s@BackupRule' {} a -> s {recoveryPointTags = a} :: BackupRule) Prelude.. Lens.mapping (Data._Sensitive Prelude.. Lens.coerced)++-- | Uniquely identifies a rule that is used to schedule the backup of a+-- selection of resources.+backupRule_ruleId :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Text)+backupRule_ruleId = Lens.lens (\BackupRule' {ruleId} -> ruleId) (\s@BackupRule' {} a -> s {ruleId = a} :: BackupRule)++-- | A cron expression in UTC specifying when Backup initiates a backup job.+-- For more information about Amazon Web Services cron expressions, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html Schedule Expressions for Rules>+-- in the /Amazon CloudWatch Events User Guide./. Two examples of Amazon+-- Web Services cron expressions are @ 15 * ? * * *@ (take a backup every+-- hour at 15 minutes past the hour) and @0 12 * * ? *@ (take a backup+-- every day at 12 noon UTC). For a table of examples, click the preceding+-- link and scroll down the page.+backupRule_scheduleExpression :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Text)+backupRule_scheduleExpression = Lens.lens (\BackupRule' {scheduleExpression} -> scheduleExpression) (\s@BackupRule' {} a -> s {scheduleExpression = a} :: BackupRule)++-- | A value in minutes after a backup is scheduled before a job will be+-- canceled if it doesn\'t start successfully. This value is optional. If+-- this value is included, it must be at least 60 minutes to avoid errors.+backupRule_startWindowMinutes :: Lens.Lens' BackupRule (Prelude.Maybe Prelude.Integer)+backupRule_startWindowMinutes = Lens.lens (\BackupRule' {startWindowMinutes} -> startWindowMinutes) (\s@BackupRule' {} a -> s {startWindowMinutes = a} :: BackupRule)++-- | A display name for a backup rule. Must contain 1 to 50 alphanumeric or+-- \'-_.\' characters.+backupRule_ruleName :: Lens.Lens' BackupRule Prelude.Text+backupRule_ruleName = Lens.lens (\BackupRule' {ruleName} -> ruleName) (\s@BackupRule' {} a -> s {ruleName = a} :: BackupRule)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+backupRule_targetBackupVaultName :: Lens.Lens' BackupRule Prelude.Text+backupRule_targetBackupVaultName = Lens.lens (\BackupRule' {targetBackupVaultName} -> targetBackupVaultName) (\s@BackupRule' {} a -> s {targetBackupVaultName = a} :: BackupRule)++instance Data.FromJSON BackupRule where+ parseJSON =+ Data.withObject+ "BackupRule"+ ( \x ->+ BackupRule'+ Prelude.<$> (x Data..:? "CompletionWindowMinutes")+ Prelude.<*> (x Data..:? "CopyActions" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "EnableContinuousBackup")+ Prelude.<*> (x Data..:? "Lifecycle")+ Prelude.<*> ( x+ Data..:? "RecoveryPointTags"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "RuleId")+ Prelude.<*> (x Data..:? "ScheduleExpression")+ Prelude.<*> (x Data..:? "StartWindowMinutes")+ Prelude.<*> (x Data..: "RuleName")+ Prelude.<*> (x Data..: "TargetBackupVaultName")+ )++instance Prelude.Hashable BackupRule where+ hashWithSalt _salt BackupRule' {..} =+ _salt+ `Prelude.hashWithSalt` completionWindowMinutes+ `Prelude.hashWithSalt` copyActions+ `Prelude.hashWithSalt` enableContinuousBackup+ `Prelude.hashWithSalt` lifecycle+ `Prelude.hashWithSalt` recoveryPointTags+ `Prelude.hashWithSalt` ruleId+ `Prelude.hashWithSalt` scheduleExpression+ `Prelude.hashWithSalt` startWindowMinutes+ `Prelude.hashWithSalt` ruleName+ `Prelude.hashWithSalt` targetBackupVaultName++instance Prelude.NFData BackupRule where+ rnf BackupRule' {..} =+ Prelude.rnf completionWindowMinutes+ `Prelude.seq` Prelude.rnf copyActions+ `Prelude.seq` Prelude.rnf enableContinuousBackup+ `Prelude.seq` Prelude.rnf lifecycle+ `Prelude.seq` Prelude.rnf recoveryPointTags+ `Prelude.seq` Prelude.rnf ruleId+ `Prelude.seq` Prelude.rnf scheduleExpression+ `Prelude.seq` Prelude.rnf startWindowMinutes+ `Prelude.seq` Prelude.rnf ruleName+ `Prelude.seq` Prelude.rnf targetBackupVaultName
+ gen/Amazonka/Backup/Types/BackupRuleInput.hs view
@@ -0,0 +1,257 @@+{-# 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.Backup.Types.BackupRuleInput+-- 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.Backup.Types.BackupRuleInput where++import Amazonka.Backup.Types.CopyAction+import Amazonka.Backup.Types.Lifecycle+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++-- | Specifies a scheduled task used to back up a selection of resources.+--+-- /See:/ 'newBackupRuleInput' smart constructor.+data BackupRuleInput = BackupRuleInput'+ { -- | A value in minutes after a backup job is successfully started before it+ -- must be completed or it will be canceled by Backup. This value is+ -- optional.+ completionWindowMinutes :: Prelude.Maybe Prelude.Integer,+ -- | An array of @CopyAction@ objects, which contains the details of the copy+ -- operation.+ copyActions :: Prelude.Maybe [CopyAction],+ -- | Specifies whether Backup creates continuous backups. True causes Backup+ -- to create continuous backups capable of point-in-time restore (PITR).+ -- False (or not specified) causes Backup to create snapshot backups.+ enableContinuousBackup :: Prelude.Maybe Prelude.Bool,+ -- | The lifecycle defines when a protected resource is transitioned to cold+ -- storage and when it expires. Backup will transition and expire backups+ -- automatically according to the lifecycle that you define.+ --+ -- Backups transitioned to cold storage must be stored in cold storage for+ -- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+ -- greater than the “transition to cold after days” setting. The+ -- “transition to cold after days” setting cannot be changed after a backup+ -- has been transitioned to cold.+ --+ -- Resource types that are able to be transitioned to cold storage are+ -- listed in the \"Lifecycle to cold storage\" section of the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+ -- table. Backup ignores this expression for other resource types.+ lifecycle :: Prelude.Maybe Lifecycle,+ -- | To help organize your resources, you can assign your own metadata to the+ -- resources that you create. Each tag is a key-value pair.+ recoveryPointTags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),+ -- | A CRON expression in UTC specifying when Backup initiates a backup job.+ scheduleExpression :: Prelude.Maybe Prelude.Text,+ -- | A value in minutes after a backup is scheduled before a job will be+ -- canceled if it doesn\'t start successfully. This value is optional. If+ -- this value is included, it must be at least 60 minutes to avoid errors.+ startWindowMinutes :: Prelude.Maybe Prelude.Integer,+ -- | A display name for a backup rule. Must contain 1 to 50 alphanumeric or+ -- \'-_.\' characters.+ ruleName :: Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ targetBackupVaultName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupRuleInput' 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:+--+-- 'completionWindowMinutes', 'backupRuleInput_completionWindowMinutes' - A value in minutes after a backup job is successfully started before it+-- must be completed or it will be canceled by Backup. This value is+-- optional.+--+-- 'copyActions', 'backupRuleInput_copyActions' - An array of @CopyAction@ objects, which contains the details of the copy+-- operation.+--+-- 'enableContinuousBackup', 'backupRuleInput_enableContinuousBackup' - Specifies whether Backup creates continuous backups. True causes Backup+-- to create continuous backups capable of point-in-time restore (PITR).+-- False (or not specified) causes Backup to create snapshot backups.+--+-- 'lifecycle', 'backupRuleInput_lifecycle' - The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup will transition and expire backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+--+-- 'recoveryPointTags', 'backupRuleInput_recoveryPointTags' - To help organize your resources, you can assign your own metadata to the+-- resources that you create. Each tag is a key-value pair.+--+-- 'scheduleExpression', 'backupRuleInput_scheduleExpression' - A CRON expression in UTC specifying when Backup initiates a backup job.+--+-- 'startWindowMinutes', 'backupRuleInput_startWindowMinutes' - A value in minutes after a backup is scheduled before a job will be+-- canceled if it doesn\'t start successfully. This value is optional. If+-- this value is included, it must be at least 60 minutes to avoid errors.+--+-- 'ruleName', 'backupRuleInput_ruleName' - A display name for a backup rule. Must contain 1 to 50 alphanumeric or+-- \'-_.\' characters.+--+-- 'targetBackupVaultName', 'backupRuleInput_targetBackupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+newBackupRuleInput ::+ -- | 'ruleName'+ Prelude.Text ->+ -- | 'targetBackupVaultName'+ Prelude.Text ->+ BackupRuleInput+newBackupRuleInput pRuleName_ pTargetBackupVaultName_ =+ BackupRuleInput'+ { completionWindowMinutes =+ Prelude.Nothing,+ copyActions = Prelude.Nothing,+ enableContinuousBackup = Prelude.Nothing,+ lifecycle = Prelude.Nothing,+ recoveryPointTags = Prelude.Nothing,+ scheduleExpression = Prelude.Nothing,+ startWindowMinutes = Prelude.Nothing,+ ruleName = pRuleName_,+ targetBackupVaultName = pTargetBackupVaultName_+ }++-- | A value in minutes after a backup job is successfully started before it+-- must be completed or it will be canceled by Backup. This value is+-- optional.+backupRuleInput_completionWindowMinutes :: Lens.Lens' BackupRuleInput (Prelude.Maybe Prelude.Integer)+backupRuleInput_completionWindowMinutes = Lens.lens (\BackupRuleInput' {completionWindowMinutes} -> completionWindowMinutes) (\s@BackupRuleInput' {} a -> s {completionWindowMinutes = a} :: BackupRuleInput)++-- | An array of @CopyAction@ objects, which contains the details of the copy+-- operation.+backupRuleInput_copyActions :: Lens.Lens' BackupRuleInput (Prelude.Maybe [CopyAction])+backupRuleInput_copyActions = Lens.lens (\BackupRuleInput' {copyActions} -> copyActions) (\s@BackupRuleInput' {} a -> s {copyActions = a} :: BackupRuleInput) Prelude.. Lens.mapping Lens.coerced++-- | Specifies whether Backup creates continuous backups. True causes Backup+-- to create continuous backups capable of point-in-time restore (PITR).+-- False (or not specified) causes Backup to create snapshot backups.+backupRuleInput_enableContinuousBackup :: Lens.Lens' BackupRuleInput (Prelude.Maybe Prelude.Bool)+backupRuleInput_enableContinuousBackup = Lens.lens (\BackupRuleInput' {enableContinuousBackup} -> enableContinuousBackup) (\s@BackupRuleInput' {} a -> s {enableContinuousBackup = a} :: BackupRuleInput)++-- | The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup will transition and expire backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+backupRuleInput_lifecycle :: Lens.Lens' BackupRuleInput (Prelude.Maybe Lifecycle)+backupRuleInput_lifecycle = Lens.lens (\BackupRuleInput' {lifecycle} -> lifecycle) (\s@BackupRuleInput' {} a -> s {lifecycle = a} :: BackupRuleInput)++-- | To help organize your resources, you can assign your own metadata to the+-- resources that you create. Each tag is a key-value pair.+backupRuleInput_recoveryPointTags :: Lens.Lens' BackupRuleInput (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+backupRuleInput_recoveryPointTags = Lens.lens (\BackupRuleInput' {recoveryPointTags} -> recoveryPointTags) (\s@BackupRuleInput' {} a -> s {recoveryPointTags = a} :: BackupRuleInput) Prelude.. Lens.mapping (Data._Sensitive Prelude.. Lens.coerced)++-- | A CRON expression in UTC specifying when Backup initiates a backup job.+backupRuleInput_scheduleExpression :: Lens.Lens' BackupRuleInput (Prelude.Maybe Prelude.Text)+backupRuleInput_scheduleExpression = Lens.lens (\BackupRuleInput' {scheduleExpression} -> scheduleExpression) (\s@BackupRuleInput' {} a -> s {scheduleExpression = a} :: BackupRuleInput)++-- | A value in minutes after a backup is scheduled before a job will be+-- canceled if it doesn\'t start successfully. This value is optional. If+-- this value is included, it must be at least 60 minutes to avoid errors.+backupRuleInput_startWindowMinutes :: Lens.Lens' BackupRuleInput (Prelude.Maybe Prelude.Integer)+backupRuleInput_startWindowMinutes = Lens.lens (\BackupRuleInput' {startWindowMinutes} -> startWindowMinutes) (\s@BackupRuleInput' {} a -> s {startWindowMinutes = a} :: BackupRuleInput)++-- | A display name for a backup rule. Must contain 1 to 50 alphanumeric or+-- \'-_.\' characters.+backupRuleInput_ruleName :: Lens.Lens' BackupRuleInput Prelude.Text+backupRuleInput_ruleName = Lens.lens (\BackupRuleInput' {ruleName} -> ruleName) (\s@BackupRuleInput' {} a -> s {ruleName = a} :: BackupRuleInput)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+backupRuleInput_targetBackupVaultName :: Lens.Lens' BackupRuleInput Prelude.Text+backupRuleInput_targetBackupVaultName = Lens.lens (\BackupRuleInput' {targetBackupVaultName} -> targetBackupVaultName) (\s@BackupRuleInput' {} a -> s {targetBackupVaultName = a} :: BackupRuleInput)++instance Prelude.Hashable BackupRuleInput where+ hashWithSalt _salt BackupRuleInput' {..} =+ _salt+ `Prelude.hashWithSalt` completionWindowMinutes+ `Prelude.hashWithSalt` copyActions+ `Prelude.hashWithSalt` enableContinuousBackup+ `Prelude.hashWithSalt` lifecycle+ `Prelude.hashWithSalt` recoveryPointTags+ `Prelude.hashWithSalt` scheduleExpression+ `Prelude.hashWithSalt` startWindowMinutes+ `Prelude.hashWithSalt` ruleName+ `Prelude.hashWithSalt` targetBackupVaultName++instance Prelude.NFData BackupRuleInput where+ rnf BackupRuleInput' {..} =+ Prelude.rnf completionWindowMinutes+ `Prelude.seq` Prelude.rnf copyActions+ `Prelude.seq` Prelude.rnf enableContinuousBackup+ `Prelude.seq` Prelude.rnf lifecycle+ `Prelude.seq` Prelude.rnf recoveryPointTags+ `Prelude.seq` Prelude.rnf scheduleExpression+ `Prelude.seq` Prelude.rnf startWindowMinutes+ `Prelude.seq` Prelude.rnf ruleName+ `Prelude.seq` Prelude.rnf targetBackupVaultName++instance Data.ToJSON BackupRuleInput where+ toJSON BackupRuleInput' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("CompletionWindowMinutes" Data..=)+ Prelude.<$> completionWindowMinutes,+ ("CopyActions" Data..=) Prelude.<$> copyActions,+ ("EnableContinuousBackup" Data..=)+ Prelude.<$> enableContinuousBackup,+ ("Lifecycle" Data..=) Prelude.<$> lifecycle,+ ("RecoveryPointTags" Data..=)+ Prelude.<$> recoveryPointTags,+ ("ScheduleExpression" Data..=)+ Prelude.<$> scheduleExpression,+ ("StartWindowMinutes" Data..=)+ Prelude.<$> startWindowMinutes,+ Prelude.Just ("RuleName" Data..= ruleName),+ Prelude.Just+ ( "TargetBackupVaultName"+ Data..= targetBackupVaultName+ )+ ]+ )
+ gen/Amazonka/Backup/Types/BackupSelection.hs view
@@ -0,0 +1,273 @@+{-# 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.Backup.Types.BackupSelection+-- 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.Backup.Types.BackupSelection where++import Amazonka.Backup.Types.Condition+import Amazonka.Backup.Types.Conditions+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++-- | Used to specify a set of resources to a backup plan.+--+-- Specifying your desired @Conditions@, @ListOfTags@, @NotResources@,+-- and\/or @Resources@ is recommended. If none of these are specified,+-- Backup will attempt to select all supported and opted-in storage+-- resources, which could have unintended cost implications.+--+-- /See:/ 'newBackupSelection' smart constructor.+data BackupSelection = BackupSelection'+ { -- | A list of conditions that you define to assign resources to your backup+ -- plans using tags. For example,+ -- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.+ -- Condition operators are case sensitive.+ --+ -- @Conditions@ differs from @ListOfTags@ as follows:+ --+ -- - When you specify more than one condition, you only assign the+ -- resources that match ALL conditions (using AND logic).+ --+ -- - @Conditions@ supports @StringEquals@, @StringLike@,+ -- @StringNotEquals@, and @StringNotLike@. @ListOfTags@ only supports+ -- @StringEquals@.+ conditions :: Prelude.Maybe Conditions,+ -- | A list of conditions that you define to assign resources to your backup+ -- plans using tags. For example,+ -- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.+ -- Condition operators are case sensitive.+ --+ -- @ListOfTags@ differs from @Conditions@ as follows:+ --+ -- - When you specify more than one condition, you assign all resources+ -- that match AT LEAST ONE condition (using OR logic).+ --+ -- - @ListOfTags@ only supports @StringEquals@. @Conditions@ supports+ -- @StringEquals@, @StringLike@, @StringNotEquals@, and+ -- @StringNotLike@.+ listOfTags :: Prelude.Maybe [Condition],+ -- | A list of Amazon Resource Names (ARNs) to exclude from a backup plan.+ -- The maximum number of ARNs is 500 without wildcards, or 30 ARNs with+ -- wildcards.+ --+ -- If you need to exclude many resources from a backup plan, consider a+ -- different resource selection strategy, such as assigning only one or a+ -- few resource types or refining your resource selection using tags.+ notResources :: Prelude.Maybe [Prelude.Text],+ -- | A list of Amazon Resource Names (ARNs) to assign to a backup plan. The+ -- maximum number of ARNs is 500 without wildcards, or 30 ARNs with+ -- wildcards.+ --+ -- If you need to assign many resources to a backup plan, consider a+ -- different resource selection strategy, such as assigning all resources+ -- of a resource type or refining your resource selection using tags.+ resources :: Prelude.Maybe [Prelude.Text],+ -- | The display name of a resource selection document. Must contain 1 to 50+ -- alphanumeric or \'-_.\' characters.+ selectionName :: Prelude.Text,+ -- | The ARN of the IAM role that Backup uses to authenticate when backing up+ -- the target resource; for example,+ -- @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupSelection' 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:+--+-- 'conditions', 'backupSelection_conditions' - A list of conditions that you define to assign resources to your backup+-- plans using tags. For example,+-- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.+-- Condition operators are case sensitive.+--+-- @Conditions@ differs from @ListOfTags@ as follows:+--+-- - When you specify more than one condition, you only assign the+-- resources that match ALL conditions (using AND logic).+--+-- - @Conditions@ supports @StringEquals@, @StringLike@,+-- @StringNotEquals@, and @StringNotLike@. @ListOfTags@ only supports+-- @StringEquals@.+--+-- 'listOfTags', 'backupSelection_listOfTags' - A list of conditions that you define to assign resources to your backup+-- plans using tags. For example,+-- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.+-- Condition operators are case sensitive.+--+-- @ListOfTags@ differs from @Conditions@ as follows:+--+-- - When you specify more than one condition, you assign all resources+-- that match AT LEAST ONE condition (using OR logic).+--+-- - @ListOfTags@ only supports @StringEquals@. @Conditions@ supports+-- @StringEquals@, @StringLike@, @StringNotEquals@, and+-- @StringNotLike@.+--+-- 'notResources', 'backupSelection_notResources' - A list of Amazon Resource Names (ARNs) to exclude from a backup plan.+-- The maximum number of ARNs is 500 without wildcards, or 30 ARNs with+-- wildcards.+--+-- If you need to exclude many resources from a backup plan, consider a+-- different resource selection strategy, such as assigning only one or a+-- few resource types or refining your resource selection using tags.+--+-- 'resources', 'backupSelection_resources' - A list of Amazon Resource Names (ARNs) to assign to a backup plan. The+-- maximum number of ARNs is 500 without wildcards, or 30 ARNs with+-- wildcards.+--+-- If you need to assign many resources to a backup plan, consider a+-- different resource selection strategy, such as assigning all resources+-- of a resource type or refining your resource selection using tags.+--+-- 'selectionName', 'backupSelection_selectionName' - The display name of a resource selection document. Must contain 1 to 50+-- alphanumeric or \'-_.\' characters.+--+-- 'iamRoleArn', 'backupSelection_iamRoleArn' - The ARN of the IAM role that Backup uses to authenticate when backing up+-- the target resource; for example,+-- @arn:aws:iam::123456789012:role\/S3Access@.+newBackupSelection ::+ -- | 'selectionName'+ Prelude.Text ->+ -- | 'iamRoleArn'+ Prelude.Text ->+ BackupSelection+newBackupSelection pSelectionName_ pIamRoleArn_ =+ BackupSelection'+ { conditions = Prelude.Nothing,+ listOfTags = Prelude.Nothing,+ notResources = Prelude.Nothing,+ resources = Prelude.Nothing,+ selectionName = pSelectionName_,+ iamRoleArn = pIamRoleArn_+ }++-- | A list of conditions that you define to assign resources to your backup+-- plans using tags. For example,+-- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.+-- Condition operators are case sensitive.+--+-- @Conditions@ differs from @ListOfTags@ as follows:+--+-- - When you specify more than one condition, you only assign the+-- resources that match ALL conditions (using AND logic).+--+-- - @Conditions@ supports @StringEquals@, @StringLike@,+-- @StringNotEquals@, and @StringNotLike@. @ListOfTags@ only supports+-- @StringEquals@.+backupSelection_conditions :: Lens.Lens' BackupSelection (Prelude.Maybe Conditions)+backupSelection_conditions = Lens.lens (\BackupSelection' {conditions} -> conditions) (\s@BackupSelection' {} a -> s {conditions = a} :: BackupSelection)++-- | A list of conditions that you define to assign resources to your backup+-- plans using tags. For example,+-- @\"StringEquals\": { \"ConditionKey\": \"aws:ResourceTag\/CreatedByCryo\", \"ConditionValue\": \"true\" },@.+-- Condition operators are case sensitive.+--+-- @ListOfTags@ differs from @Conditions@ as follows:+--+-- - When you specify more than one condition, you assign all resources+-- that match AT LEAST ONE condition (using OR logic).+--+-- - @ListOfTags@ only supports @StringEquals@. @Conditions@ supports+-- @StringEquals@, @StringLike@, @StringNotEquals@, and+-- @StringNotLike@.+backupSelection_listOfTags :: Lens.Lens' BackupSelection (Prelude.Maybe [Condition])+backupSelection_listOfTags = Lens.lens (\BackupSelection' {listOfTags} -> listOfTags) (\s@BackupSelection' {} a -> s {listOfTags = a} :: BackupSelection) Prelude.. Lens.mapping Lens.coerced++-- | A list of Amazon Resource Names (ARNs) to exclude from a backup plan.+-- The maximum number of ARNs is 500 without wildcards, or 30 ARNs with+-- wildcards.+--+-- If you need to exclude many resources from a backup plan, consider a+-- different resource selection strategy, such as assigning only one or a+-- few resource types or refining your resource selection using tags.+backupSelection_notResources :: Lens.Lens' BackupSelection (Prelude.Maybe [Prelude.Text])+backupSelection_notResources = Lens.lens (\BackupSelection' {notResources} -> notResources) (\s@BackupSelection' {} a -> s {notResources = a} :: BackupSelection) Prelude.. Lens.mapping Lens.coerced++-- | A list of Amazon Resource Names (ARNs) to assign to a backup plan. The+-- maximum number of ARNs is 500 without wildcards, or 30 ARNs with+-- wildcards.+--+-- If you need to assign many resources to a backup plan, consider a+-- different resource selection strategy, such as assigning all resources+-- of a resource type or refining your resource selection using tags.+backupSelection_resources :: Lens.Lens' BackupSelection (Prelude.Maybe [Prelude.Text])+backupSelection_resources = Lens.lens (\BackupSelection' {resources} -> resources) (\s@BackupSelection' {} a -> s {resources = a} :: BackupSelection) Prelude.. Lens.mapping Lens.coerced++-- | The display name of a resource selection document. Must contain 1 to 50+-- alphanumeric or \'-_.\' characters.+backupSelection_selectionName :: Lens.Lens' BackupSelection Prelude.Text+backupSelection_selectionName = Lens.lens (\BackupSelection' {selectionName} -> selectionName) (\s@BackupSelection' {} a -> s {selectionName = a} :: BackupSelection)++-- | The ARN of the IAM role that Backup uses to authenticate when backing up+-- the target resource; for example,+-- @arn:aws:iam::123456789012:role\/S3Access@.+backupSelection_iamRoleArn :: Lens.Lens' BackupSelection Prelude.Text+backupSelection_iamRoleArn = Lens.lens (\BackupSelection' {iamRoleArn} -> iamRoleArn) (\s@BackupSelection' {} a -> s {iamRoleArn = a} :: BackupSelection)++instance Data.FromJSON BackupSelection where+ parseJSON =+ Data.withObject+ "BackupSelection"+ ( \x ->+ BackupSelection'+ Prelude.<$> (x Data..:? "Conditions")+ Prelude.<*> (x Data..:? "ListOfTags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "NotResources" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "Resources" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..: "SelectionName")+ Prelude.<*> (x Data..: "IamRoleArn")+ )++instance Prelude.Hashable BackupSelection where+ hashWithSalt _salt BackupSelection' {..} =+ _salt+ `Prelude.hashWithSalt` conditions+ `Prelude.hashWithSalt` listOfTags+ `Prelude.hashWithSalt` notResources+ `Prelude.hashWithSalt` resources+ `Prelude.hashWithSalt` selectionName+ `Prelude.hashWithSalt` iamRoleArn++instance Prelude.NFData BackupSelection where+ rnf BackupSelection' {..} =+ Prelude.rnf conditions+ `Prelude.seq` Prelude.rnf listOfTags+ `Prelude.seq` Prelude.rnf notResources+ `Prelude.seq` Prelude.rnf resources+ `Prelude.seq` Prelude.rnf selectionName+ `Prelude.seq` Prelude.rnf iamRoleArn++instance Data.ToJSON BackupSelection where+ toJSON BackupSelection' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Conditions" Data..=) Prelude.<$> conditions,+ ("ListOfTags" Data..=) Prelude.<$> listOfTags,+ ("NotResources" Data..=) Prelude.<$> notResources,+ ("Resources" Data..=) Prelude.<$> resources,+ Prelude.Just ("SelectionName" Data..= selectionName),+ Prelude.Just ("IamRoleArn" Data..= iamRoleArn)+ ]+ )
+ gen/Amazonka/Backup/Types/BackupSelectionsListMember.hs view
@@ -0,0 +1,163 @@+{-# 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.Backup.Types.BackupSelectionsListMember+-- 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.Backup.Types.BackupSelectionsListMember 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++-- | Contains metadata about a @BackupSelection@ object.+--+-- /See:/ 'newBackupSelectionsListMember' smart constructor.+data BackupSelectionsListMember = BackupSelectionsListMember'+ { -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Maybe Prelude.Text,+ -- | The date and time a backup plan is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | A unique string that identifies the request and allows failed requests+ -- to be retried without the risk of running the operation twice. This+ -- parameter is optional.+ --+ -- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+ -- characters.+ creatorRequestId :: Prelude.Maybe Prelude.Text,+ -- | Specifies the IAM role Amazon Resource Name (ARN) to create the target+ -- recovery point; for example, @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a request to assign a set of resources to a backup+ -- plan.+ selectionId :: Prelude.Maybe Prelude.Text,+ -- | The display name of a resource selection document.+ selectionName :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupSelectionsListMember' 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:+--+-- 'backupPlanId', 'backupSelectionsListMember_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'creationDate', 'backupSelectionsListMember_creationDate' - The date and time a backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'creatorRequestId', 'backupSelectionsListMember_creatorRequestId' - A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+--+-- 'iamRoleArn', 'backupSelectionsListMember_iamRoleArn' - Specifies the IAM role Amazon Resource Name (ARN) to create the target+-- recovery point; for example, @arn:aws:iam::123456789012:role\/S3Access@.+--+-- 'selectionId', 'backupSelectionsListMember_selectionId' - Uniquely identifies a request to assign a set of resources to a backup+-- plan.+--+-- 'selectionName', 'backupSelectionsListMember_selectionName' - The display name of a resource selection document.+newBackupSelectionsListMember ::+ BackupSelectionsListMember+newBackupSelectionsListMember =+ BackupSelectionsListMember'+ { backupPlanId =+ Prelude.Nothing,+ creationDate = Prelude.Nothing,+ creatorRequestId = Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ selectionId = Prelude.Nothing,+ selectionName = Prelude.Nothing+ }++-- | Uniquely identifies a backup plan.+backupSelectionsListMember_backupPlanId :: Lens.Lens' BackupSelectionsListMember (Prelude.Maybe Prelude.Text)+backupSelectionsListMember_backupPlanId = Lens.lens (\BackupSelectionsListMember' {backupPlanId} -> backupPlanId) (\s@BackupSelectionsListMember' {} a -> s {backupPlanId = a} :: BackupSelectionsListMember)++-- | The date and time a backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+backupSelectionsListMember_creationDate :: Lens.Lens' BackupSelectionsListMember (Prelude.Maybe Prelude.UTCTime)+backupSelectionsListMember_creationDate = Lens.lens (\BackupSelectionsListMember' {creationDate} -> creationDate) (\s@BackupSelectionsListMember' {} a -> s {creationDate = a} :: BackupSelectionsListMember) Prelude.. Lens.mapping Data._Time++-- | A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+backupSelectionsListMember_creatorRequestId :: Lens.Lens' BackupSelectionsListMember (Prelude.Maybe Prelude.Text)+backupSelectionsListMember_creatorRequestId = Lens.lens (\BackupSelectionsListMember' {creatorRequestId} -> creatorRequestId) (\s@BackupSelectionsListMember' {} a -> s {creatorRequestId = a} :: BackupSelectionsListMember)++-- | Specifies the IAM role Amazon Resource Name (ARN) to create the target+-- recovery point; for example, @arn:aws:iam::123456789012:role\/S3Access@.+backupSelectionsListMember_iamRoleArn :: Lens.Lens' BackupSelectionsListMember (Prelude.Maybe Prelude.Text)+backupSelectionsListMember_iamRoleArn = Lens.lens (\BackupSelectionsListMember' {iamRoleArn} -> iamRoleArn) (\s@BackupSelectionsListMember' {} a -> s {iamRoleArn = a} :: BackupSelectionsListMember)++-- | Uniquely identifies a request to assign a set of resources to a backup+-- plan.+backupSelectionsListMember_selectionId :: Lens.Lens' BackupSelectionsListMember (Prelude.Maybe Prelude.Text)+backupSelectionsListMember_selectionId = Lens.lens (\BackupSelectionsListMember' {selectionId} -> selectionId) (\s@BackupSelectionsListMember' {} a -> s {selectionId = a} :: BackupSelectionsListMember)++-- | The display name of a resource selection document.+backupSelectionsListMember_selectionName :: Lens.Lens' BackupSelectionsListMember (Prelude.Maybe Prelude.Text)+backupSelectionsListMember_selectionName = Lens.lens (\BackupSelectionsListMember' {selectionName} -> selectionName) (\s@BackupSelectionsListMember' {} a -> s {selectionName = a} :: BackupSelectionsListMember)++instance Data.FromJSON BackupSelectionsListMember where+ parseJSON =+ Data.withObject+ "BackupSelectionsListMember"+ ( \x ->+ BackupSelectionsListMember'+ Prelude.<$> (x Data..:? "BackupPlanId")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "CreatorRequestId")+ Prelude.<*> (x Data..:? "IamRoleArn")+ Prelude.<*> (x Data..:? "SelectionId")+ Prelude.<*> (x Data..:? "SelectionName")+ )++instance Prelude.Hashable BackupSelectionsListMember where+ hashWithSalt _salt BackupSelectionsListMember' {..} =+ _salt+ `Prelude.hashWithSalt` backupPlanId+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` creatorRequestId+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` selectionId+ `Prelude.hashWithSalt` selectionName++instance Prelude.NFData BackupSelectionsListMember where+ rnf BackupSelectionsListMember' {..} =+ Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf creatorRequestId+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf selectionId+ `Prelude.seq` Prelude.rnf selectionName
+ gen/Amazonka/Backup/Types/BackupVaultEvent.hs view
@@ -0,0 +1,146 @@+{-# 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.Backup.Types.BackupVaultEvent+-- 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.Backup.Types.BackupVaultEvent+ ( BackupVaultEvent+ ( ..,+ BackupVaultEvent_BACKUP_JOB_COMPLETED,+ BackupVaultEvent_BACKUP_JOB_EXPIRED,+ BackupVaultEvent_BACKUP_JOB_FAILED,+ BackupVaultEvent_BACKUP_JOB_STARTED,+ BackupVaultEvent_BACKUP_JOB_SUCCESSFUL,+ BackupVaultEvent_BACKUP_PLAN_CREATED,+ BackupVaultEvent_BACKUP_PLAN_MODIFIED,+ BackupVaultEvent_COPY_JOB_FAILED,+ BackupVaultEvent_COPY_JOB_STARTED,+ BackupVaultEvent_COPY_JOB_SUCCESSFUL,+ BackupVaultEvent_RECOVERY_POINT_MODIFIED,+ BackupVaultEvent_RESTORE_JOB_COMPLETED,+ BackupVaultEvent_RESTORE_JOB_FAILED,+ BackupVaultEvent_RESTORE_JOB_STARTED,+ BackupVaultEvent_RESTORE_JOB_SUCCESSFUL,+ BackupVaultEvent_S3_BACKUP_OBJECT_FAILED,+ BackupVaultEvent_S3_RESTORE_OBJECT_FAILED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype BackupVaultEvent = BackupVaultEvent'+ { fromBackupVaultEvent ::+ 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 BackupVaultEvent_BACKUP_JOB_COMPLETED :: BackupVaultEvent+pattern BackupVaultEvent_BACKUP_JOB_COMPLETED = BackupVaultEvent' "BACKUP_JOB_COMPLETED"++pattern BackupVaultEvent_BACKUP_JOB_EXPIRED :: BackupVaultEvent+pattern BackupVaultEvent_BACKUP_JOB_EXPIRED = BackupVaultEvent' "BACKUP_JOB_EXPIRED"++pattern BackupVaultEvent_BACKUP_JOB_FAILED :: BackupVaultEvent+pattern BackupVaultEvent_BACKUP_JOB_FAILED = BackupVaultEvent' "BACKUP_JOB_FAILED"++pattern BackupVaultEvent_BACKUP_JOB_STARTED :: BackupVaultEvent+pattern BackupVaultEvent_BACKUP_JOB_STARTED = BackupVaultEvent' "BACKUP_JOB_STARTED"++pattern BackupVaultEvent_BACKUP_JOB_SUCCESSFUL :: BackupVaultEvent+pattern BackupVaultEvent_BACKUP_JOB_SUCCESSFUL = BackupVaultEvent' "BACKUP_JOB_SUCCESSFUL"++pattern BackupVaultEvent_BACKUP_PLAN_CREATED :: BackupVaultEvent+pattern BackupVaultEvent_BACKUP_PLAN_CREATED = BackupVaultEvent' "BACKUP_PLAN_CREATED"++pattern BackupVaultEvent_BACKUP_PLAN_MODIFIED :: BackupVaultEvent+pattern BackupVaultEvent_BACKUP_PLAN_MODIFIED = BackupVaultEvent' "BACKUP_PLAN_MODIFIED"++pattern BackupVaultEvent_COPY_JOB_FAILED :: BackupVaultEvent+pattern BackupVaultEvent_COPY_JOB_FAILED = BackupVaultEvent' "COPY_JOB_FAILED"++pattern BackupVaultEvent_COPY_JOB_STARTED :: BackupVaultEvent+pattern BackupVaultEvent_COPY_JOB_STARTED = BackupVaultEvent' "COPY_JOB_STARTED"++pattern BackupVaultEvent_COPY_JOB_SUCCESSFUL :: BackupVaultEvent+pattern BackupVaultEvent_COPY_JOB_SUCCESSFUL = BackupVaultEvent' "COPY_JOB_SUCCESSFUL"++pattern BackupVaultEvent_RECOVERY_POINT_MODIFIED :: BackupVaultEvent+pattern BackupVaultEvent_RECOVERY_POINT_MODIFIED = BackupVaultEvent' "RECOVERY_POINT_MODIFIED"++pattern BackupVaultEvent_RESTORE_JOB_COMPLETED :: BackupVaultEvent+pattern BackupVaultEvent_RESTORE_JOB_COMPLETED = BackupVaultEvent' "RESTORE_JOB_COMPLETED"++pattern BackupVaultEvent_RESTORE_JOB_FAILED :: BackupVaultEvent+pattern BackupVaultEvent_RESTORE_JOB_FAILED = BackupVaultEvent' "RESTORE_JOB_FAILED"++pattern BackupVaultEvent_RESTORE_JOB_STARTED :: BackupVaultEvent+pattern BackupVaultEvent_RESTORE_JOB_STARTED = BackupVaultEvent' "RESTORE_JOB_STARTED"++pattern BackupVaultEvent_RESTORE_JOB_SUCCESSFUL :: BackupVaultEvent+pattern BackupVaultEvent_RESTORE_JOB_SUCCESSFUL = BackupVaultEvent' "RESTORE_JOB_SUCCESSFUL"++pattern BackupVaultEvent_S3_BACKUP_OBJECT_FAILED :: BackupVaultEvent+pattern BackupVaultEvent_S3_BACKUP_OBJECT_FAILED = BackupVaultEvent' "S3_BACKUP_OBJECT_FAILED"++pattern BackupVaultEvent_S3_RESTORE_OBJECT_FAILED :: BackupVaultEvent+pattern BackupVaultEvent_S3_RESTORE_OBJECT_FAILED = BackupVaultEvent' "S3_RESTORE_OBJECT_FAILED"++{-# COMPLETE+ BackupVaultEvent_BACKUP_JOB_COMPLETED,+ BackupVaultEvent_BACKUP_JOB_EXPIRED,+ BackupVaultEvent_BACKUP_JOB_FAILED,+ BackupVaultEvent_BACKUP_JOB_STARTED,+ BackupVaultEvent_BACKUP_JOB_SUCCESSFUL,+ BackupVaultEvent_BACKUP_PLAN_CREATED,+ BackupVaultEvent_BACKUP_PLAN_MODIFIED,+ BackupVaultEvent_COPY_JOB_FAILED,+ BackupVaultEvent_COPY_JOB_STARTED,+ BackupVaultEvent_COPY_JOB_SUCCESSFUL,+ BackupVaultEvent_RECOVERY_POINT_MODIFIED,+ BackupVaultEvent_RESTORE_JOB_COMPLETED,+ BackupVaultEvent_RESTORE_JOB_FAILED,+ BackupVaultEvent_RESTORE_JOB_STARTED,+ BackupVaultEvent_RESTORE_JOB_SUCCESSFUL,+ BackupVaultEvent_S3_BACKUP_OBJECT_FAILED,+ BackupVaultEvent_S3_RESTORE_OBJECT_FAILED,+ BackupVaultEvent'+ #-}
+ gen/Amazonka/Backup/Types/BackupVaultListMember.hs view
@@ -0,0 +1,340 @@+{-# 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.Backup.Types.BackupVaultListMember+-- 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.Backup.Types.BackupVaultListMember 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++-- | Contains metadata about a backup vault.+--+-- /See:/ 'newBackupVaultListMember' smart constructor.+data BackupVaultListMember = BackupVaultListMember'+ { -- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+ -- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | The date and time a resource backup is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | A unique string that identifies the request and allows failed requests+ -- to be retried without the risk of running the operation twice. This+ -- parameter is optional.+ --+ -- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+ -- characters.+ creatorRequestId :: Prelude.Maybe Prelude.Text,+ -- | A server-side encryption key you can specify to encrypt your backups+ -- from services that support full Backup management; for example,+ -- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+ -- If you specify a key, you must specify its ARN, not its alias. If you do+ -- not specify a key, Backup creates a KMS key for you by default.+ --+ -- To learn which Backup services support full Backup management and how+ -- Backup handles encryption for backups from services that do not yet+ -- support full Backup, see+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/encryption.html Encryption for backups in Backup>+ encryptionKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The date and time when Backup Vault Lock configuration becomes+ -- immutable, meaning it cannot be changed or deleted.+ --+ -- If you applied Vault Lock to your vault without specifying a lock date,+ -- you can change your Vault Lock settings, or delete Vault Lock from the+ -- vault entirely, at any time.+ --+ -- This value is in Unix format, Coordinated Universal Time (UTC), and+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ lockDate :: Prelude.Maybe Data.POSIX,+ -- | A Boolean value that indicates whether Backup Vault Lock applies to the+ -- selected backup vault. If @true@, Vault Lock prevents delete and update+ -- operations on the recovery points in the selected vault.+ locked :: Prelude.Maybe Prelude.Bool,+ -- | The Backup Vault Lock setting that specifies the maximum retention+ -- period that the vault retains its recovery points. If this parameter is+ -- not specified, Vault Lock does not enforce a maximum retention period on+ -- the recovery points in the vault (allowing indefinite storage).+ --+ -- If specified, any backup or copy job to the vault must have a lifecycle+ -- policy with a retention period equal to or shorter than the maximum+ -- retention period. If the job\'s retention period is longer than that+ -- maximum retention period, then the vault fails the backup or copy job,+ -- and you should either modify your lifecycle settings or use a different+ -- vault. Recovery points already stored in the vault prior to Vault Lock+ -- are not affected.+ maxRetentionDays :: Prelude.Maybe Prelude.Integer,+ -- | The Backup Vault Lock setting that specifies the minimum retention+ -- period that the vault retains its recovery points. If this parameter is+ -- not specified, Vault Lock does not enforce a minimum retention period.+ --+ -- If specified, any backup or copy job to the vault must have a lifecycle+ -- policy with a retention period equal to or longer than the minimum+ -- retention period. If the job\'s retention period is shorter than that+ -- minimum retention period, then the vault fails the backup or copy job,+ -- and you should either modify your lifecycle settings or use a different+ -- vault. Recovery points already stored in the vault prior to Vault Lock+ -- are not affected.+ minRetentionDays :: Prelude.Maybe Prelude.Integer,+ -- | The number of recovery points that are stored in a backup vault.+ numberOfRecoveryPoints :: Prelude.Maybe Prelude.Integer+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupVaultListMember' 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:+--+-- 'backupVaultArn', 'backupVaultListMember_backupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'backupVaultName', 'backupVaultListMember_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'creationDate', 'backupVaultListMember_creationDate' - The date and time a resource backup is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'creatorRequestId', 'backupVaultListMember_creatorRequestId' - A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+--+-- 'encryptionKeyArn', 'backupVaultListMember_encryptionKeyArn' - A server-side encryption key you can specify to encrypt your backups+-- from services that support full Backup management; for example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+-- If you specify a key, you must specify its ARN, not its alias. If you do+-- not specify a key, Backup creates a KMS key for you by default.+--+-- To learn which Backup services support full Backup management and how+-- Backup handles encryption for backups from services that do not yet+-- support full Backup, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/encryption.html Encryption for backups in Backup>+--+-- 'lockDate', 'backupVaultListMember_lockDate' - The date and time when Backup Vault Lock configuration becomes+-- immutable, meaning it cannot be changed or deleted.+--+-- If you applied Vault Lock to your vault without specifying a lock date,+-- you can change your Vault Lock settings, or delete Vault Lock from the+-- vault entirely, at any time.+--+-- This value is in Unix format, Coordinated Universal Time (UTC), and+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'locked', 'backupVaultListMember_locked' - A Boolean value that indicates whether Backup Vault Lock applies to the+-- selected backup vault. If @true@, Vault Lock prevents delete and update+-- operations on the recovery points in the selected vault.+--+-- 'maxRetentionDays', 'backupVaultListMember_maxRetentionDays' - The Backup Vault Lock setting that specifies the maximum retention+-- period that the vault retains its recovery points. If this parameter is+-- not specified, Vault Lock does not enforce a maximum retention period on+-- the recovery points in the vault (allowing indefinite storage).+--+-- If specified, any backup or copy job to the vault must have a lifecycle+-- policy with a retention period equal to or shorter than the maximum+-- retention period. If the job\'s retention period is longer than that+-- maximum retention period, then the vault fails the backup or copy job,+-- and you should either modify your lifecycle settings or use a different+-- vault. Recovery points already stored in the vault prior to Vault Lock+-- are not affected.+--+-- 'minRetentionDays', 'backupVaultListMember_minRetentionDays' - The Backup Vault Lock setting that specifies the minimum retention+-- period that the vault retains its recovery points. If this parameter is+-- not specified, Vault Lock does not enforce a minimum retention period.+--+-- If specified, any backup or copy job to the vault must have a lifecycle+-- policy with a retention period equal to or longer than the minimum+-- retention period. If the job\'s retention period is shorter than that+-- minimum retention period, then the vault fails the backup or copy job,+-- and you should either modify your lifecycle settings or use a different+-- vault. Recovery points already stored in the vault prior to Vault Lock+-- are not affected.+--+-- 'numberOfRecoveryPoints', 'backupVaultListMember_numberOfRecoveryPoints' - The number of recovery points that are stored in a backup vault.+newBackupVaultListMember ::+ BackupVaultListMember+newBackupVaultListMember =+ BackupVaultListMember'+ { backupVaultArn =+ Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ creatorRequestId = Prelude.Nothing,+ encryptionKeyArn = Prelude.Nothing,+ lockDate = Prelude.Nothing,+ locked = Prelude.Nothing,+ maxRetentionDays = Prelude.Nothing,+ minRetentionDays = Prelude.Nothing,+ numberOfRecoveryPoints = Prelude.Nothing+ }++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup vault;+-- for example, @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+backupVaultListMember_backupVaultArn :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Text)+backupVaultListMember_backupVaultArn = Lens.lens (\BackupVaultListMember' {backupVaultArn} -> backupVaultArn) (\s@BackupVaultListMember' {} a -> s {backupVaultArn = a} :: BackupVaultListMember)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+backupVaultListMember_backupVaultName :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Text)+backupVaultListMember_backupVaultName = Lens.lens (\BackupVaultListMember' {backupVaultName} -> backupVaultName) (\s@BackupVaultListMember' {} a -> s {backupVaultName = a} :: BackupVaultListMember)++-- | The date and time a resource backup is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+backupVaultListMember_creationDate :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.UTCTime)+backupVaultListMember_creationDate = Lens.lens (\BackupVaultListMember' {creationDate} -> creationDate) (\s@BackupVaultListMember' {} a -> s {creationDate = a} :: BackupVaultListMember) Prelude.. Lens.mapping Data._Time++-- | A unique string that identifies the request and allows failed requests+-- to be retried without the risk of running the operation twice. This+-- parameter is optional.+--+-- If used, this parameter must contain 1 to 50 alphanumeric or \'-_.\'+-- characters.+backupVaultListMember_creatorRequestId :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Text)+backupVaultListMember_creatorRequestId = Lens.lens (\BackupVaultListMember' {creatorRequestId} -> creatorRequestId) (\s@BackupVaultListMember' {} a -> s {creatorRequestId = a} :: BackupVaultListMember)++-- | A server-side encryption key you can specify to encrypt your backups+-- from services that support full Backup management; for example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+-- If you specify a key, you must specify its ARN, not its alias. If you do+-- not specify a key, Backup creates a KMS key for you by default.+--+-- To learn which Backup services support full Backup management and how+-- Backup handles encryption for backups from services that do not yet+-- support full Backup, see+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/encryption.html Encryption for backups in Backup>+backupVaultListMember_encryptionKeyArn :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Text)+backupVaultListMember_encryptionKeyArn = Lens.lens (\BackupVaultListMember' {encryptionKeyArn} -> encryptionKeyArn) (\s@BackupVaultListMember' {} a -> s {encryptionKeyArn = a} :: BackupVaultListMember)++-- | The date and time when Backup Vault Lock configuration becomes+-- immutable, meaning it cannot be changed or deleted.+--+-- If you applied Vault Lock to your vault without specifying a lock date,+-- you can change your Vault Lock settings, or delete Vault Lock from the+-- vault entirely, at any time.+--+-- This value is in Unix format, Coordinated Universal Time (UTC), and+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+backupVaultListMember_lockDate :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.UTCTime)+backupVaultListMember_lockDate = Lens.lens (\BackupVaultListMember' {lockDate} -> lockDate) (\s@BackupVaultListMember' {} a -> s {lockDate = a} :: BackupVaultListMember) Prelude.. Lens.mapping Data._Time++-- | A Boolean value that indicates whether Backup Vault Lock applies to the+-- selected backup vault. If @true@, Vault Lock prevents delete and update+-- operations on the recovery points in the selected vault.+backupVaultListMember_locked :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Bool)+backupVaultListMember_locked = Lens.lens (\BackupVaultListMember' {locked} -> locked) (\s@BackupVaultListMember' {} a -> s {locked = a} :: BackupVaultListMember)++-- | The Backup Vault Lock setting that specifies the maximum retention+-- period that the vault retains its recovery points. If this parameter is+-- not specified, Vault Lock does not enforce a maximum retention period on+-- the recovery points in the vault (allowing indefinite storage).+--+-- If specified, any backup or copy job to the vault must have a lifecycle+-- policy with a retention period equal to or shorter than the maximum+-- retention period. If the job\'s retention period is longer than that+-- maximum retention period, then the vault fails the backup or copy job,+-- and you should either modify your lifecycle settings or use a different+-- vault. Recovery points already stored in the vault prior to Vault Lock+-- are not affected.+backupVaultListMember_maxRetentionDays :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Integer)+backupVaultListMember_maxRetentionDays = Lens.lens (\BackupVaultListMember' {maxRetentionDays} -> maxRetentionDays) (\s@BackupVaultListMember' {} a -> s {maxRetentionDays = a} :: BackupVaultListMember)++-- | The Backup Vault Lock setting that specifies the minimum retention+-- period that the vault retains its recovery points. If this parameter is+-- not specified, Vault Lock does not enforce a minimum retention period.+--+-- If specified, any backup or copy job to the vault must have a lifecycle+-- policy with a retention period equal to or longer than the minimum+-- retention period. If the job\'s retention period is shorter than that+-- minimum retention period, then the vault fails the backup or copy job,+-- and you should either modify your lifecycle settings or use a different+-- vault. Recovery points already stored in the vault prior to Vault Lock+-- are not affected.+backupVaultListMember_minRetentionDays :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Integer)+backupVaultListMember_minRetentionDays = Lens.lens (\BackupVaultListMember' {minRetentionDays} -> minRetentionDays) (\s@BackupVaultListMember' {} a -> s {minRetentionDays = a} :: BackupVaultListMember)++-- | The number of recovery points that are stored in a backup vault.+backupVaultListMember_numberOfRecoveryPoints :: Lens.Lens' BackupVaultListMember (Prelude.Maybe Prelude.Integer)+backupVaultListMember_numberOfRecoveryPoints = Lens.lens (\BackupVaultListMember' {numberOfRecoveryPoints} -> numberOfRecoveryPoints) (\s@BackupVaultListMember' {} a -> s {numberOfRecoveryPoints = a} :: BackupVaultListMember)++instance Data.FromJSON BackupVaultListMember where+ parseJSON =+ Data.withObject+ "BackupVaultListMember"+ ( \x ->+ BackupVaultListMember'+ Prelude.<$> (x Data..:? "BackupVaultArn")+ Prelude.<*> (x Data..:? "BackupVaultName")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "CreatorRequestId")+ Prelude.<*> (x Data..:? "EncryptionKeyArn")+ Prelude.<*> (x Data..:? "LockDate")+ Prelude.<*> (x Data..:? "Locked")+ Prelude.<*> (x Data..:? "MaxRetentionDays")+ Prelude.<*> (x Data..:? "MinRetentionDays")+ Prelude.<*> (x Data..:? "NumberOfRecoveryPoints")+ )++instance Prelude.Hashable BackupVaultListMember where+ hashWithSalt _salt BackupVaultListMember' {..} =+ _salt+ `Prelude.hashWithSalt` backupVaultArn+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` creatorRequestId+ `Prelude.hashWithSalt` encryptionKeyArn+ `Prelude.hashWithSalt` lockDate+ `Prelude.hashWithSalt` locked+ `Prelude.hashWithSalt` maxRetentionDays+ `Prelude.hashWithSalt` minRetentionDays+ `Prelude.hashWithSalt` numberOfRecoveryPoints++instance Prelude.NFData BackupVaultListMember where+ rnf BackupVaultListMember' {..} =+ Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf creatorRequestId+ `Prelude.seq` Prelude.rnf encryptionKeyArn+ `Prelude.seq` Prelude.rnf lockDate+ `Prelude.seq` Prelude.rnf locked+ `Prelude.seq` Prelude.rnf maxRetentionDays+ `Prelude.seq` Prelude.rnf minRetentionDays+ `Prelude.seq` Prelude.rnf numberOfRecoveryPoints
+ gen/Amazonka/Backup/Types/CalculatedLifecycle.hs view
@@ -0,0 +1,103 @@+{-# 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.Backup.Types.CalculatedLifecycle+-- 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.Backup.Types.CalculatedLifecycle 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++-- | Contains @DeleteAt@ and @MoveToColdStorageAt@ timestamps, which are used+-- to specify a lifecycle for a recovery point.+--+-- The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+--+-- /See:/ 'newCalculatedLifecycle' smart constructor.+data CalculatedLifecycle = CalculatedLifecycle'+ { -- | A timestamp that specifies when to delete a recovery point.+ deleteAt :: Prelude.Maybe Data.POSIX,+ -- | A timestamp that specifies when to transition a recovery point to cold+ -- storage.+ moveToColdStorageAt :: Prelude.Maybe Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CalculatedLifecycle' 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:+--+-- 'deleteAt', 'calculatedLifecycle_deleteAt' - A timestamp that specifies when to delete a recovery point.+--+-- 'moveToColdStorageAt', 'calculatedLifecycle_moveToColdStorageAt' - A timestamp that specifies when to transition a recovery point to cold+-- storage.+newCalculatedLifecycle ::+ CalculatedLifecycle+newCalculatedLifecycle =+ CalculatedLifecycle'+ { deleteAt = Prelude.Nothing,+ moveToColdStorageAt = Prelude.Nothing+ }++-- | A timestamp that specifies when to delete a recovery point.+calculatedLifecycle_deleteAt :: Lens.Lens' CalculatedLifecycle (Prelude.Maybe Prelude.UTCTime)+calculatedLifecycle_deleteAt = Lens.lens (\CalculatedLifecycle' {deleteAt} -> deleteAt) (\s@CalculatedLifecycle' {} a -> s {deleteAt = a} :: CalculatedLifecycle) Prelude.. Lens.mapping Data._Time++-- | A timestamp that specifies when to transition a recovery point to cold+-- storage.+calculatedLifecycle_moveToColdStorageAt :: Lens.Lens' CalculatedLifecycle (Prelude.Maybe Prelude.UTCTime)+calculatedLifecycle_moveToColdStorageAt = Lens.lens (\CalculatedLifecycle' {moveToColdStorageAt} -> moveToColdStorageAt) (\s@CalculatedLifecycle' {} a -> s {moveToColdStorageAt = a} :: CalculatedLifecycle) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON CalculatedLifecycle where+ parseJSON =+ Data.withObject+ "CalculatedLifecycle"+ ( \x ->+ CalculatedLifecycle'+ Prelude.<$> (x Data..:? "DeleteAt")+ Prelude.<*> (x Data..:? "MoveToColdStorageAt")+ )++instance Prelude.Hashable CalculatedLifecycle where+ hashWithSalt _salt CalculatedLifecycle' {..} =+ _salt+ `Prelude.hashWithSalt` deleteAt+ `Prelude.hashWithSalt` moveToColdStorageAt++instance Prelude.NFData CalculatedLifecycle where+ rnf CalculatedLifecycle' {..} =+ Prelude.rnf deleteAt+ `Prelude.seq` Prelude.rnf moveToColdStorageAt
+ gen/Amazonka/Backup/Types/Condition.hs view
@@ -0,0 +1,144 @@+{-# 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.Backup.Types.Condition+-- 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.Backup.Types.Condition where++import Amazonka.Backup.Types.ConditionType+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++-- | Contains an array of triplets made up of a condition type (such as+-- @StringEquals@), a key, and a value. Used to filter resources using+-- their tags and assign them to a backup plan. Case sensitive.+--+-- /See:/ 'newCondition' smart constructor.+data Condition = Condition'+ { -- | An operation applied to a key-value pair used to assign resources to+ -- your backup plan. Condition only supports @StringEquals@. For more+ -- flexible assignment options, including @StringLike@ and the ability to+ -- exclude resources from your backup plan, use @Conditions@ (with an \"s\"+ -- on the end) for your+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BackupSelection.html BackupSelection>+ -- .+ conditionType :: ConditionType,+ -- | The key in a key-value pair. For example, in the tag+ -- @Department: Accounting@, @Department@ is the key.+ conditionKey :: Prelude.Text,+ -- | The value in a key-value pair. For example, in the tag+ -- @Department: Accounting@, @Accounting@ is the value.+ conditionValue :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Condition' 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:+--+-- 'conditionType', 'condition_conditionType' - An operation applied to a key-value pair used to assign resources to+-- your backup plan. Condition only supports @StringEquals@. For more+-- flexible assignment options, including @StringLike@ and the ability to+-- exclude resources from your backup plan, use @Conditions@ (with an \"s\"+-- on the end) for your+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BackupSelection.html BackupSelection>+-- .+--+-- 'conditionKey', 'condition_conditionKey' - The key in a key-value pair. For example, in the tag+-- @Department: Accounting@, @Department@ is the key.+--+-- 'conditionValue', 'condition_conditionValue' - The value in a key-value pair. For example, in the tag+-- @Department: Accounting@, @Accounting@ is the value.+newCondition ::+ -- | 'conditionType'+ ConditionType ->+ -- | 'conditionKey'+ Prelude.Text ->+ -- | 'conditionValue'+ Prelude.Text ->+ Condition+newCondition+ pConditionType_+ pConditionKey_+ pConditionValue_ =+ Condition'+ { conditionType = pConditionType_,+ conditionKey = pConditionKey_,+ conditionValue = pConditionValue_+ }++-- | An operation applied to a key-value pair used to assign resources to+-- your backup plan. Condition only supports @StringEquals@. For more+-- flexible assignment options, including @StringLike@ and the ability to+-- exclude resources from your backup plan, use @Conditions@ (with an \"s\"+-- on the end) for your+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BackupSelection.html BackupSelection>+-- .+condition_conditionType :: Lens.Lens' Condition ConditionType+condition_conditionType = Lens.lens (\Condition' {conditionType} -> conditionType) (\s@Condition' {} a -> s {conditionType = a} :: Condition)++-- | The key in a key-value pair. For example, in the tag+-- @Department: Accounting@, @Department@ is the key.+condition_conditionKey :: Lens.Lens' Condition Prelude.Text+condition_conditionKey = Lens.lens (\Condition' {conditionKey} -> conditionKey) (\s@Condition' {} a -> s {conditionKey = a} :: Condition)++-- | The value in a key-value pair. For example, in the tag+-- @Department: Accounting@, @Accounting@ is the value.+condition_conditionValue :: Lens.Lens' Condition Prelude.Text+condition_conditionValue = Lens.lens (\Condition' {conditionValue} -> conditionValue) (\s@Condition' {} a -> s {conditionValue = a} :: Condition)++instance Data.FromJSON Condition where+ parseJSON =+ Data.withObject+ "Condition"+ ( \x ->+ Condition'+ Prelude.<$> (x Data..: "ConditionType")+ Prelude.<*> (x Data..: "ConditionKey")+ Prelude.<*> (x Data..: "ConditionValue")+ )++instance Prelude.Hashable Condition where+ hashWithSalt _salt Condition' {..} =+ _salt+ `Prelude.hashWithSalt` conditionType+ `Prelude.hashWithSalt` conditionKey+ `Prelude.hashWithSalt` conditionValue++instance Prelude.NFData Condition where+ rnf Condition' {..} =+ Prelude.rnf conditionType+ `Prelude.seq` Prelude.rnf conditionKey+ `Prelude.seq` Prelude.rnf conditionValue++instance Data.ToJSON Condition where+ toJSON Condition' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("ConditionType" Data..= conditionType),+ Prelude.Just ("ConditionKey" Data..= conditionKey),+ Prelude.Just+ ("ConditionValue" Data..= conditionValue)+ ]+ )
+ gen/Amazonka/Backup/Types/ConditionParameter.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.Backup.Types.ConditionParameter+-- 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.Backup.Types.ConditionParameter 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++-- | Includes information about tags you define to assign tagged resources to+-- a backup plan.+--+-- /See:/ 'newConditionParameter' smart constructor.+data ConditionParameter = ConditionParameter'+ { -- | The key in a key-value pair. For example, in the tag+ -- @Department: Accounting@, @Department@ is the key.+ conditionKey :: Prelude.Maybe Prelude.Text,+ -- | The value in a key-value pair. For example, in the tag+ -- @Department: Accounting@, @Accounting@ is the value.+ conditionValue :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ConditionParameter' 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:+--+-- 'conditionKey', 'conditionParameter_conditionKey' - The key in a key-value pair. For example, in the tag+-- @Department: Accounting@, @Department@ is the key.+--+-- 'conditionValue', 'conditionParameter_conditionValue' - The value in a key-value pair. For example, in the tag+-- @Department: Accounting@, @Accounting@ is the value.+newConditionParameter ::+ ConditionParameter+newConditionParameter =+ ConditionParameter'+ { conditionKey = Prelude.Nothing,+ conditionValue = Prelude.Nothing+ }++-- | The key in a key-value pair. For example, in the tag+-- @Department: Accounting@, @Department@ is the key.+conditionParameter_conditionKey :: Lens.Lens' ConditionParameter (Prelude.Maybe Prelude.Text)+conditionParameter_conditionKey = Lens.lens (\ConditionParameter' {conditionKey} -> conditionKey) (\s@ConditionParameter' {} a -> s {conditionKey = a} :: ConditionParameter)++-- | The value in a key-value pair. For example, in the tag+-- @Department: Accounting@, @Accounting@ is the value.+conditionParameter_conditionValue :: Lens.Lens' ConditionParameter (Prelude.Maybe Prelude.Text)+conditionParameter_conditionValue = Lens.lens (\ConditionParameter' {conditionValue} -> conditionValue) (\s@ConditionParameter' {} a -> s {conditionValue = a} :: ConditionParameter)++instance Data.FromJSON ConditionParameter where+ parseJSON =+ Data.withObject+ "ConditionParameter"+ ( \x ->+ ConditionParameter'+ Prelude.<$> (x Data..:? "ConditionKey")+ Prelude.<*> (x Data..:? "ConditionValue")+ )++instance Prelude.Hashable ConditionParameter where+ hashWithSalt _salt ConditionParameter' {..} =+ _salt+ `Prelude.hashWithSalt` conditionKey+ `Prelude.hashWithSalt` conditionValue++instance Prelude.NFData ConditionParameter where+ rnf ConditionParameter' {..} =+ Prelude.rnf conditionKey+ `Prelude.seq` Prelude.rnf conditionValue++instance Data.ToJSON ConditionParameter where+ toJSON ConditionParameter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ConditionKey" Data..=) Prelude.<$> conditionKey,+ ("ConditionValue" Data..=)+ Prelude.<$> conditionValue+ ]+ )
+ gen/Amazonka/Backup/Types/ConditionType.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.Backup.Types.ConditionType+-- 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.Backup.Types.ConditionType+ ( ConditionType+ ( ..,+ ConditionType_STRINGEQUALS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ConditionType = ConditionType'+ { fromConditionType ::+ 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 ConditionType_STRINGEQUALS :: ConditionType+pattern ConditionType_STRINGEQUALS = ConditionType' "STRINGEQUALS"++{-# COMPLETE+ ConditionType_STRINGEQUALS,+ ConditionType'+ #-}
+ gen/Amazonka/Backup/Types/Conditions.hs view
@@ -0,0 +1,143 @@+{-# 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.Backup.Types.Conditions+-- 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.Backup.Types.Conditions where++import Amazonka.Backup.Types.ConditionParameter+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++-- | Contains information about which resources to include or exclude from a+-- backup plan using their tags. Conditions are case sensitive.+--+-- /See:/ 'newConditions' smart constructor.+data Conditions = Conditions'+ { -- | Filters the values of your tagged resources for only those resources+ -- that you tagged with the same value. Also called \"exact matching.\"+ stringEquals :: Prelude.Maybe [ConditionParameter],+ -- | Filters the values of your tagged resources for matching tag values with+ -- the use of a wildcard character (*) anywhere in the string. For example,+ -- \"prod*\" or \"*rod*\" matches the tag value \"production\".+ stringLike :: Prelude.Maybe [ConditionParameter],+ -- | Filters the values of your tagged resources for only those resources+ -- that you tagged that do not have the same value. Also called \"negated+ -- matching.\"+ stringNotEquals :: Prelude.Maybe [ConditionParameter],+ -- | Filters the values of your tagged resources for non-matching tag values+ -- with the use of a wildcard character (*) anywhere in the string.+ stringNotLike :: Prelude.Maybe [ConditionParameter]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Conditions' 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:+--+-- 'stringEquals', 'conditions_stringEquals' - Filters the values of your tagged resources for only those resources+-- that you tagged with the same value. Also called \"exact matching.\"+--+-- 'stringLike', 'conditions_stringLike' - Filters the values of your tagged resources for matching tag values with+-- the use of a wildcard character (*) anywhere in the string. For example,+-- \"prod*\" or \"*rod*\" matches the tag value \"production\".+--+-- 'stringNotEquals', 'conditions_stringNotEquals' - Filters the values of your tagged resources for only those resources+-- that you tagged that do not have the same value. Also called \"negated+-- matching.\"+--+-- 'stringNotLike', 'conditions_stringNotLike' - Filters the values of your tagged resources for non-matching tag values+-- with the use of a wildcard character (*) anywhere in the string.+newConditions ::+ Conditions+newConditions =+ Conditions'+ { stringEquals = Prelude.Nothing,+ stringLike = Prelude.Nothing,+ stringNotEquals = Prelude.Nothing,+ stringNotLike = Prelude.Nothing+ }++-- | Filters the values of your tagged resources for only those resources+-- that you tagged with the same value. Also called \"exact matching.\"+conditions_stringEquals :: Lens.Lens' Conditions (Prelude.Maybe [ConditionParameter])+conditions_stringEquals = Lens.lens (\Conditions' {stringEquals} -> stringEquals) (\s@Conditions' {} a -> s {stringEquals = a} :: Conditions) Prelude.. Lens.mapping Lens.coerced++-- | Filters the values of your tagged resources for matching tag values with+-- the use of a wildcard character (*) anywhere in the string. For example,+-- \"prod*\" or \"*rod*\" matches the tag value \"production\".+conditions_stringLike :: Lens.Lens' Conditions (Prelude.Maybe [ConditionParameter])+conditions_stringLike = Lens.lens (\Conditions' {stringLike} -> stringLike) (\s@Conditions' {} a -> s {stringLike = a} :: Conditions) Prelude.. Lens.mapping Lens.coerced++-- | Filters the values of your tagged resources for only those resources+-- that you tagged that do not have the same value. Also called \"negated+-- matching.\"+conditions_stringNotEquals :: Lens.Lens' Conditions (Prelude.Maybe [ConditionParameter])+conditions_stringNotEquals = Lens.lens (\Conditions' {stringNotEquals} -> stringNotEquals) (\s@Conditions' {} a -> s {stringNotEquals = a} :: Conditions) Prelude.. Lens.mapping Lens.coerced++-- | Filters the values of your tagged resources for non-matching tag values+-- with the use of a wildcard character (*) anywhere in the string.+conditions_stringNotLike :: Lens.Lens' Conditions (Prelude.Maybe [ConditionParameter])+conditions_stringNotLike = Lens.lens (\Conditions' {stringNotLike} -> stringNotLike) (\s@Conditions' {} a -> s {stringNotLike = a} :: Conditions) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON Conditions where+ parseJSON =+ Data.withObject+ "Conditions"+ ( \x ->+ Conditions'+ Prelude.<$> (x Data..:? "StringEquals" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "StringLike" Data..!= Prelude.mempty)+ Prelude.<*> ( x+ Data..:? "StringNotEquals"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "StringNotLike" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable Conditions where+ hashWithSalt _salt Conditions' {..} =+ _salt+ `Prelude.hashWithSalt` stringEquals+ `Prelude.hashWithSalt` stringLike+ `Prelude.hashWithSalt` stringNotEquals+ `Prelude.hashWithSalt` stringNotLike++instance Prelude.NFData Conditions where+ rnf Conditions' {..} =+ Prelude.rnf stringEquals+ `Prelude.seq` Prelude.rnf stringLike+ `Prelude.seq` Prelude.rnf stringNotEquals+ `Prelude.seq` Prelude.rnf stringNotLike++instance Data.ToJSON Conditions where+ toJSON Conditions' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("StringEquals" Data..=) Prelude.<$> stringEquals,+ ("StringLike" Data..=) Prelude.<$> stringLike,+ ("StringNotEquals" Data..=)+ Prelude.<$> stringNotEquals,+ ("StringNotLike" Data..=) Prelude.<$> stringNotLike+ ]+ )
+ gen/Amazonka/Backup/Types/ControlInputParameter.hs view
@@ -0,0 +1,99 @@+{-# 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.Backup.Types.ControlInputParameter+-- 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.Backup.Types.ControlInputParameter 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 list of parameters for a control. A control can have zero, one, or+-- more than one parameter. An example of a control with two parameters is:+-- \"backup plan frequency is at least @daily@ and the retention period is+-- at least @1 year@\". The first parameter is @daily@. The second+-- parameter is @1 year@.+--+-- /See:/ 'newControlInputParameter' smart constructor.+data ControlInputParameter = ControlInputParameter'+ { -- | The name of a parameter, for example, @BackupPlanFrequency@.+ parameterName :: Prelude.Maybe Prelude.Text,+ -- | The value of parameter, for example, @hourly@.+ parameterValue :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ControlInputParameter' 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:+--+-- 'parameterName', 'controlInputParameter_parameterName' - The name of a parameter, for example, @BackupPlanFrequency@.+--+-- 'parameterValue', 'controlInputParameter_parameterValue' - The value of parameter, for example, @hourly@.+newControlInputParameter ::+ ControlInputParameter+newControlInputParameter =+ ControlInputParameter'+ { parameterName =+ Prelude.Nothing,+ parameterValue = Prelude.Nothing+ }++-- | The name of a parameter, for example, @BackupPlanFrequency@.+controlInputParameter_parameterName :: Lens.Lens' ControlInputParameter (Prelude.Maybe Prelude.Text)+controlInputParameter_parameterName = Lens.lens (\ControlInputParameter' {parameterName} -> parameterName) (\s@ControlInputParameter' {} a -> s {parameterName = a} :: ControlInputParameter)++-- | The value of parameter, for example, @hourly@.+controlInputParameter_parameterValue :: Lens.Lens' ControlInputParameter (Prelude.Maybe Prelude.Text)+controlInputParameter_parameterValue = Lens.lens (\ControlInputParameter' {parameterValue} -> parameterValue) (\s@ControlInputParameter' {} a -> s {parameterValue = a} :: ControlInputParameter)++instance Data.FromJSON ControlInputParameter where+ parseJSON =+ Data.withObject+ "ControlInputParameter"+ ( \x ->+ ControlInputParameter'+ Prelude.<$> (x Data..:? "ParameterName")+ Prelude.<*> (x Data..:? "ParameterValue")+ )++instance Prelude.Hashable ControlInputParameter where+ hashWithSalt _salt ControlInputParameter' {..} =+ _salt+ `Prelude.hashWithSalt` parameterName+ `Prelude.hashWithSalt` parameterValue++instance Prelude.NFData ControlInputParameter where+ rnf ControlInputParameter' {..} =+ Prelude.rnf parameterName+ `Prelude.seq` Prelude.rnf parameterValue++instance Data.ToJSON ControlInputParameter where+ toJSON ControlInputParameter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ParameterName" Data..=) Prelude.<$> parameterName,+ ("ParameterValue" Data..=)+ Prelude.<$> parameterValue+ ]+ )
+ gen/Amazonka/Backup/Types/ControlScope.hs view
@@ -0,0 +1,139 @@+{-# 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.Backup.Types.ControlScope+-- 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.Backup.Types.ControlScope 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 framework consists of one or more controls. Each control has its own+-- control scope. The control scope can include one or more resource types,+-- a combination of a tag key and value, or a combination of one resource+-- type and one resource ID. If no scope is specified, evaluations for the+-- rule are triggered when any resource in your recording group changes in+-- configuration.+--+-- To set a control scope that includes all of a particular resource, leave+-- the @ControlScope@ empty or do not pass it when calling+-- @CreateFramework@.+--+-- /See:/ 'newControlScope' smart constructor.+data ControlScope = ControlScope'+ { -- | The ID of the only Amazon Web Services resource that you want your+ -- control scope to contain.+ complianceResourceIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),+ -- | Describes whether the control scope includes one or more types of+ -- resources, such as @EFS@ or @RDS@.+ complianceResourceTypes :: Prelude.Maybe [Prelude.Text],+ -- | The tag key-value pair applied to those Amazon Web Services resources+ -- that you want to trigger an evaluation for a rule. A maximum of one+ -- key-value pair can be provided. The tag value is optional, but it cannot+ -- be an empty string. The structure to assign a tag is:+ -- @[{\"Key\":\"string\",\"Value\":\"string\"}]@.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ControlScope' 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:+--+-- 'complianceResourceIds', 'controlScope_complianceResourceIds' - The ID of the only Amazon Web Services resource that you want your+-- control scope to contain.+--+-- 'complianceResourceTypes', 'controlScope_complianceResourceTypes' - Describes whether the control scope includes one or more types of+-- resources, such as @EFS@ or @RDS@.+--+-- 'tags', 'controlScope_tags' - The tag key-value pair applied to those Amazon Web Services resources+-- that you want to trigger an evaluation for a rule. A maximum of one+-- key-value pair can be provided. The tag value is optional, but it cannot+-- be an empty string. The structure to assign a tag is:+-- @[{\"Key\":\"string\",\"Value\":\"string\"}]@.+newControlScope ::+ ControlScope+newControlScope =+ ControlScope'+ { complianceResourceIds =+ Prelude.Nothing,+ complianceResourceTypes = Prelude.Nothing,+ tags = Prelude.Nothing+ }++-- | The ID of the only Amazon Web Services resource that you want your+-- control scope to contain.+controlScope_complianceResourceIds :: Lens.Lens' ControlScope (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))+controlScope_complianceResourceIds = Lens.lens (\ControlScope' {complianceResourceIds} -> complianceResourceIds) (\s@ControlScope' {} a -> s {complianceResourceIds = a} :: ControlScope) Prelude.. Lens.mapping Lens.coerced++-- | Describes whether the control scope includes one or more types of+-- resources, such as @EFS@ or @RDS@.+controlScope_complianceResourceTypes :: Lens.Lens' ControlScope (Prelude.Maybe [Prelude.Text])+controlScope_complianceResourceTypes = Lens.lens (\ControlScope' {complianceResourceTypes} -> complianceResourceTypes) (\s@ControlScope' {} a -> s {complianceResourceTypes = a} :: ControlScope) Prelude.. Lens.mapping Lens.coerced++-- | The tag key-value pair applied to those Amazon Web Services resources+-- that you want to trigger an evaluation for a rule. A maximum of one+-- key-value pair can be provided. The tag value is optional, but it cannot+-- be an empty string. The structure to assign a tag is:+-- @[{\"Key\":\"string\",\"Value\":\"string\"}]@.+controlScope_tags :: Lens.Lens' ControlScope (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+controlScope_tags = Lens.lens (\ControlScope' {tags} -> tags) (\s@ControlScope' {} a -> s {tags = a} :: ControlScope) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON ControlScope where+ parseJSON =+ Data.withObject+ "ControlScope"+ ( \x ->+ ControlScope'+ Prelude.<$> (x Data..:? "ComplianceResourceIds")+ Prelude.<*> ( x+ Data..:? "ComplianceResourceTypes"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "Tags" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable ControlScope where+ hashWithSalt _salt ControlScope' {..} =+ _salt+ `Prelude.hashWithSalt` complianceResourceIds+ `Prelude.hashWithSalt` complianceResourceTypes+ `Prelude.hashWithSalt` tags++instance Prelude.NFData ControlScope where+ rnf ControlScope' {..} =+ Prelude.rnf complianceResourceIds+ `Prelude.seq` Prelude.rnf complianceResourceTypes+ `Prelude.seq` Prelude.rnf tags++instance Data.ToJSON ControlScope where+ toJSON ControlScope' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ComplianceResourceIds" Data..=)+ Prelude.<$> complianceResourceIds,+ ("ComplianceResourceTypes" Data..=)+ Prelude.<$> complianceResourceTypes,+ ("Tags" Data..=) Prelude.<$> tags+ ]+ )
+ gen/Amazonka/Backup/Types/CopyAction.hs view
@@ -0,0 +1,105 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.Types.CopyAction+-- 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.Backup.Types.CopyAction where++import Amazonka.Backup.Types.Lifecycle+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 the copy operation.+--+-- /See:/ 'newCopyAction' smart constructor.+data CopyAction = CopyAction'+ { lifecycle :: Prelude.Maybe Lifecycle,+ -- | An Amazon Resource Name (ARN) that uniquely identifies the destination+ -- backup vault for the copied backup. For example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ destinationBackupVaultArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CopyAction' 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:+--+-- 'lifecycle', 'copyAction_lifecycle' - Undocumented member.+--+-- 'destinationBackupVaultArn', 'copyAction_destinationBackupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies the destination+-- backup vault for the copied backup. For example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+newCopyAction ::+ -- | 'destinationBackupVaultArn'+ Prelude.Text ->+ CopyAction+newCopyAction pDestinationBackupVaultArn_ =+ CopyAction'+ { lifecycle = Prelude.Nothing,+ destinationBackupVaultArn =+ pDestinationBackupVaultArn_+ }++-- | Undocumented member.+copyAction_lifecycle :: Lens.Lens' CopyAction (Prelude.Maybe Lifecycle)+copyAction_lifecycle = Lens.lens (\CopyAction' {lifecycle} -> lifecycle) (\s@CopyAction' {} a -> s {lifecycle = a} :: CopyAction)++-- | An Amazon Resource Name (ARN) that uniquely identifies the destination+-- backup vault for the copied backup. For example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+copyAction_destinationBackupVaultArn :: Lens.Lens' CopyAction Prelude.Text+copyAction_destinationBackupVaultArn = Lens.lens (\CopyAction' {destinationBackupVaultArn} -> destinationBackupVaultArn) (\s@CopyAction' {} a -> s {destinationBackupVaultArn = a} :: CopyAction)++instance Data.FromJSON CopyAction where+ parseJSON =+ Data.withObject+ "CopyAction"+ ( \x ->+ CopyAction'+ Prelude.<$> (x Data..:? "Lifecycle")+ Prelude.<*> (x Data..: "DestinationBackupVaultArn")+ )++instance Prelude.Hashable CopyAction where+ hashWithSalt _salt CopyAction' {..} =+ _salt+ `Prelude.hashWithSalt` lifecycle+ `Prelude.hashWithSalt` destinationBackupVaultArn++instance Prelude.NFData CopyAction where+ rnf CopyAction' {..} =+ Prelude.rnf lifecycle+ `Prelude.seq` Prelude.rnf destinationBackupVaultArn++instance Data.ToJSON CopyAction where+ toJSON CopyAction' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Lifecycle" Data..=) Prelude.<$> lifecycle,+ Prelude.Just+ ( "DestinationBackupVaultArn"+ Data..= destinationBackupVaultArn+ )+ ]+ )
+ gen/Amazonka/Backup/Types/CopyJob.hs view
@@ -0,0 +1,376 @@+{-# 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.Backup.Types.CopyJob+-- 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.Backup.Types.CopyJob where++import Amazonka.Backup.Types.CopyJobState+import Amazonka.Backup.Types.RecoveryPointCreator+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++-- | Contains detailed information about a copy job.+--+-- /See:/ 'newCopyJob' smart constructor.+data CopyJob = CopyJob'+ { -- | The account ID that owns the copy job.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The size, in bytes, of a copy job.+ backupSizeInBytes :: Prelude.Maybe Prelude.Integer,+ -- | This returns the statistics of the included child (nested) copy jobs.+ childJobsInState :: Prelude.Maybe (Prelude.HashMap CopyJobState Prelude.Integer),+ -- | The date and time a copy job is completed, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CompletionDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ completionDate :: Prelude.Maybe Data.POSIX,+ -- | This is the identifier of a resource within a composite group, such as+ -- nested (child) recovery point belonging to a composite (parent) stack.+ -- The ID is transferred from the+ -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax logical ID>+ -- within a stack.+ compositeMemberIdentifier :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a copy job.+ copyJobId :: Prelude.Maybe Prelude.Text,+ createdBy :: Prelude.Maybe RecoveryPointCreator,+ -- | The date and time a copy job is created, in Unix format and Coordinated+ -- Universal Time (UTC). The value of @CreationDate@ is accurate to+ -- milliseconds. For example, the value 1516925490.087 represents Friday,+ -- January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a destination+ -- copy vault; for example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ destinationBackupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a destination recovery point; for+ -- example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ destinationRecoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | Specifies the IAM role ARN used to copy the target recovery point; for+ -- example, @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | This is a boolean value indicating this is a parent (composite) copy+ -- job.+ isParent :: Prelude.Maybe Prelude.Bool,+ -- | This is the number of child (nested) copy jobs.+ numberOfChildJobs :: Prelude.Maybe Prelude.Integer,+ -- | This uniquely identifies a request to Backup to copy a resource. The+ -- return will be the parent (composite) job ID.+ parentJobId :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Web Services resource to be copied; for example, an Amazon+ -- Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database+ -- Service (Amazon RDS) database.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | The type of Amazon Web Services resource to be copied; for example, an+ -- Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational+ -- Database Service (Amazon RDS) database.+ resourceType :: Prelude.Maybe Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a source copy+ -- vault; for example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ sourceBackupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a source recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ sourceRecoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | The current state of a copy job.+ state :: Prelude.Maybe CopyJobState,+ -- | A detailed message explaining the status of the job to copy a resource.+ statusMessage :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CopyJob' 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:+--+-- 'accountId', 'copyJob_accountId' - The account ID that owns the copy job.+--+-- 'backupSizeInBytes', 'copyJob_backupSizeInBytes' - The size, in bytes, of a copy job.+--+-- 'childJobsInState', 'copyJob_childJobsInState' - This returns the statistics of the included child (nested) copy jobs.+--+-- 'completionDate', 'copyJob_completionDate' - The date and time a copy job is completed, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CompletionDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'compositeMemberIdentifier', 'copyJob_compositeMemberIdentifier' - This is the identifier of a resource within a composite group, such as+-- nested (child) recovery point belonging to a composite (parent) stack.+-- The ID is transferred from the+-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax logical ID>+-- within a stack.+--+-- 'copyJobId', 'copyJob_copyJobId' - Uniquely identifies a copy job.+--+-- 'createdBy', 'copyJob_createdBy' - Undocumented member.+--+-- 'creationDate', 'copyJob_creationDate' - The date and time a copy job is created, in Unix format and Coordinated+-- Universal Time (UTC). The value of @CreationDate@ is accurate to+-- milliseconds. For example, the value 1516925490.087 represents Friday,+-- January 26, 2018 12:11:30.087 AM.+--+-- 'destinationBackupVaultArn', 'copyJob_destinationBackupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a destination+-- copy vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'destinationRecoveryPointArn', 'copyJob_destinationRecoveryPointArn' - An ARN that uniquely identifies a destination recovery point; for+-- example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'iamRoleArn', 'copyJob_iamRoleArn' - Specifies the IAM role ARN used to copy the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+--+-- 'isParent', 'copyJob_isParent' - This is a boolean value indicating this is a parent (composite) copy+-- job.+--+-- 'numberOfChildJobs', 'copyJob_numberOfChildJobs' - This is the number of child (nested) copy jobs.+--+-- 'parentJobId', 'copyJob_parentJobId' - This uniquely identifies a request to Backup to copy a resource. The+-- return will be the parent (composite) job ID.+--+-- 'resourceArn', 'copyJob_resourceArn' - The Amazon Web Services resource to be copied; for example, an Amazon+-- Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database+-- Service (Amazon RDS) database.+--+-- 'resourceType', 'copyJob_resourceType' - The type of Amazon Web Services resource to be copied; for example, an+-- Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational+-- Database Service (Amazon RDS) database.+--+-- 'sourceBackupVaultArn', 'copyJob_sourceBackupVaultArn' - An Amazon Resource Name (ARN) that uniquely identifies a source copy+-- vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'sourceRecoveryPointArn', 'copyJob_sourceRecoveryPointArn' - An ARN that uniquely identifies a source recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'state', 'copyJob_state' - The current state of a copy job.+--+-- 'statusMessage', 'copyJob_statusMessage' - A detailed message explaining the status of the job to copy a resource.+newCopyJob ::+ CopyJob+newCopyJob =+ CopyJob'+ { accountId = Prelude.Nothing,+ backupSizeInBytes = Prelude.Nothing,+ childJobsInState = Prelude.Nothing,+ completionDate = Prelude.Nothing,+ compositeMemberIdentifier = Prelude.Nothing,+ copyJobId = Prelude.Nothing,+ createdBy = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ destinationBackupVaultArn = Prelude.Nothing,+ destinationRecoveryPointArn = Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ isParent = Prelude.Nothing,+ numberOfChildJobs = Prelude.Nothing,+ parentJobId = Prelude.Nothing,+ resourceArn = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ sourceBackupVaultArn = Prelude.Nothing,+ sourceRecoveryPointArn = Prelude.Nothing,+ state = Prelude.Nothing,+ statusMessage = Prelude.Nothing+ }++-- | The account ID that owns the copy job.+copyJob_accountId :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_accountId = Lens.lens (\CopyJob' {accountId} -> accountId) (\s@CopyJob' {} a -> s {accountId = a} :: CopyJob)++-- | The size, in bytes, of a copy job.+copyJob_backupSizeInBytes :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Integer)+copyJob_backupSizeInBytes = Lens.lens (\CopyJob' {backupSizeInBytes} -> backupSizeInBytes) (\s@CopyJob' {} a -> s {backupSizeInBytes = a} :: CopyJob)++-- | This returns the statistics of the included child (nested) copy jobs.+copyJob_childJobsInState :: Lens.Lens' CopyJob (Prelude.Maybe (Prelude.HashMap CopyJobState Prelude.Integer))+copyJob_childJobsInState = Lens.lens (\CopyJob' {childJobsInState} -> childJobsInState) (\s@CopyJob' {} a -> s {childJobsInState = a} :: CopyJob) Prelude.. Lens.mapping Lens.coerced++-- | The date and time a copy job is completed, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CompletionDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+copyJob_completionDate :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.UTCTime)+copyJob_completionDate = Lens.lens (\CopyJob' {completionDate} -> completionDate) (\s@CopyJob' {} a -> s {completionDate = a} :: CopyJob) Prelude.. Lens.mapping Data._Time++-- | This is the identifier of a resource within a composite group, such as+-- nested (child) recovery point belonging to a composite (parent) stack.+-- The ID is transferred from the+-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax logical ID>+-- within a stack.+copyJob_compositeMemberIdentifier :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_compositeMemberIdentifier = Lens.lens (\CopyJob' {compositeMemberIdentifier} -> compositeMemberIdentifier) (\s@CopyJob' {} a -> s {compositeMemberIdentifier = a} :: CopyJob)++-- | Uniquely identifies a copy job.+copyJob_copyJobId :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_copyJobId = Lens.lens (\CopyJob' {copyJobId} -> copyJobId) (\s@CopyJob' {} a -> s {copyJobId = a} :: CopyJob)++-- | Undocumented member.+copyJob_createdBy :: Lens.Lens' CopyJob (Prelude.Maybe RecoveryPointCreator)+copyJob_createdBy = Lens.lens (\CopyJob' {createdBy} -> createdBy) (\s@CopyJob' {} a -> s {createdBy = a} :: CopyJob)++-- | The date and time a copy job is created, in Unix format and Coordinated+-- Universal Time (UTC). The value of @CreationDate@ is accurate to+-- milliseconds. For example, the value 1516925490.087 represents Friday,+-- January 26, 2018 12:11:30.087 AM.+copyJob_creationDate :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.UTCTime)+copyJob_creationDate = Lens.lens (\CopyJob' {creationDate} -> creationDate) (\s@CopyJob' {} a -> s {creationDate = a} :: CopyJob) Prelude.. Lens.mapping Data._Time++-- | An Amazon Resource Name (ARN) that uniquely identifies a destination+-- copy vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+copyJob_destinationBackupVaultArn :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_destinationBackupVaultArn = Lens.lens (\CopyJob' {destinationBackupVaultArn} -> destinationBackupVaultArn) (\s@CopyJob' {} a -> s {destinationBackupVaultArn = a} :: CopyJob)++-- | An ARN that uniquely identifies a destination recovery point; for+-- example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+copyJob_destinationRecoveryPointArn :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_destinationRecoveryPointArn = Lens.lens (\CopyJob' {destinationRecoveryPointArn} -> destinationRecoveryPointArn) (\s@CopyJob' {} a -> s {destinationRecoveryPointArn = a} :: CopyJob)++-- | Specifies the IAM role ARN used to copy the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+copyJob_iamRoleArn :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_iamRoleArn = Lens.lens (\CopyJob' {iamRoleArn} -> iamRoleArn) (\s@CopyJob' {} a -> s {iamRoleArn = a} :: CopyJob)++-- | This is a boolean value indicating this is a parent (composite) copy+-- job.+copyJob_isParent :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Bool)+copyJob_isParent = Lens.lens (\CopyJob' {isParent} -> isParent) (\s@CopyJob' {} a -> s {isParent = a} :: CopyJob)++-- | This is the number of child (nested) copy jobs.+copyJob_numberOfChildJobs :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Integer)+copyJob_numberOfChildJobs = Lens.lens (\CopyJob' {numberOfChildJobs} -> numberOfChildJobs) (\s@CopyJob' {} a -> s {numberOfChildJobs = a} :: CopyJob)++-- | This uniquely identifies a request to Backup to copy a resource. The+-- return will be the parent (composite) job ID.+copyJob_parentJobId :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_parentJobId = Lens.lens (\CopyJob' {parentJobId} -> parentJobId) (\s@CopyJob' {} a -> s {parentJobId = a} :: CopyJob)++-- | The Amazon Web Services resource to be copied; for example, an Amazon+-- Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database+-- Service (Amazon RDS) database.+copyJob_resourceArn :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_resourceArn = Lens.lens (\CopyJob' {resourceArn} -> resourceArn) (\s@CopyJob' {} a -> s {resourceArn = a} :: CopyJob)++-- | The type of Amazon Web Services resource to be copied; for example, an+-- Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational+-- Database Service (Amazon RDS) database.+copyJob_resourceType :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_resourceType = Lens.lens (\CopyJob' {resourceType} -> resourceType) (\s@CopyJob' {} a -> s {resourceType = a} :: CopyJob)++-- | An Amazon Resource Name (ARN) that uniquely identifies a source copy+-- vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+copyJob_sourceBackupVaultArn :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_sourceBackupVaultArn = Lens.lens (\CopyJob' {sourceBackupVaultArn} -> sourceBackupVaultArn) (\s@CopyJob' {} a -> s {sourceBackupVaultArn = a} :: CopyJob)++-- | An ARN that uniquely identifies a source recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+copyJob_sourceRecoveryPointArn :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_sourceRecoveryPointArn = Lens.lens (\CopyJob' {sourceRecoveryPointArn} -> sourceRecoveryPointArn) (\s@CopyJob' {} a -> s {sourceRecoveryPointArn = a} :: CopyJob)++-- | The current state of a copy job.+copyJob_state :: Lens.Lens' CopyJob (Prelude.Maybe CopyJobState)+copyJob_state = Lens.lens (\CopyJob' {state} -> state) (\s@CopyJob' {} a -> s {state = a} :: CopyJob)++-- | A detailed message explaining the status of the job to copy a resource.+copyJob_statusMessage :: Lens.Lens' CopyJob (Prelude.Maybe Prelude.Text)+copyJob_statusMessage = Lens.lens (\CopyJob' {statusMessage} -> statusMessage) (\s@CopyJob' {} a -> s {statusMessage = a} :: CopyJob)++instance Data.FromJSON CopyJob where+ parseJSON =+ Data.withObject+ "CopyJob"+ ( \x ->+ CopyJob'+ Prelude.<$> (x Data..:? "AccountId")+ Prelude.<*> (x Data..:? "BackupSizeInBytes")+ Prelude.<*> ( x+ Data..:? "ChildJobsInState"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "CompletionDate")+ Prelude.<*> (x Data..:? "CompositeMemberIdentifier")+ Prelude.<*> (x Data..:? "CopyJobId")+ Prelude.<*> (x Data..:? "CreatedBy")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "DestinationBackupVaultArn")+ Prelude.<*> (x Data..:? "DestinationRecoveryPointArn")+ Prelude.<*> (x Data..:? "IamRoleArn")+ Prelude.<*> (x Data..:? "IsParent")+ Prelude.<*> (x Data..:? "NumberOfChildJobs")+ Prelude.<*> (x Data..:? "ParentJobId")+ Prelude.<*> (x Data..:? "ResourceArn")+ Prelude.<*> (x Data..:? "ResourceType")+ Prelude.<*> (x Data..:? "SourceBackupVaultArn")+ Prelude.<*> (x Data..:? "SourceRecoveryPointArn")+ Prelude.<*> (x Data..:? "State")+ Prelude.<*> (x Data..:? "StatusMessage")+ )++instance Prelude.Hashable CopyJob where+ hashWithSalt _salt CopyJob' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` backupSizeInBytes+ `Prelude.hashWithSalt` childJobsInState+ `Prelude.hashWithSalt` completionDate+ `Prelude.hashWithSalt` compositeMemberIdentifier+ `Prelude.hashWithSalt` copyJobId+ `Prelude.hashWithSalt` createdBy+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` destinationBackupVaultArn+ `Prelude.hashWithSalt` destinationRecoveryPointArn+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` isParent+ `Prelude.hashWithSalt` numberOfChildJobs+ `Prelude.hashWithSalt` parentJobId+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` sourceBackupVaultArn+ `Prelude.hashWithSalt` sourceRecoveryPointArn+ `Prelude.hashWithSalt` state+ `Prelude.hashWithSalt` statusMessage++instance Prelude.NFData CopyJob where+ rnf CopyJob' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf backupSizeInBytes+ `Prelude.seq` Prelude.rnf childJobsInState+ `Prelude.seq` Prelude.rnf completionDate+ `Prelude.seq` Prelude.rnf compositeMemberIdentifier+ `Prelude.seq` Prelude.rnf copyJobId+ `Prelude.seq` Prelude.rnf createdBy+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf destinationBackupVaultArn+ `Prelude.seq` Prelude.rnf destinationRecoveryPointArn+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf isParent+ `Prelude.seq` Prelude.rnf numberOfChildJobs+ `Prelude.seq` Prelude.rnf parentJobId+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf sourceBackupVaultArn+ `Prelude.seq` Prelude.rnf sourceRecoveryPointArn+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf statusMessage
+ gen/Amazonka/Backup/Types/CopyJobState.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.Backup.Types.CopyJobState+-- 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.Backup.Types.CopyJobState+ ( CopyJobState+ ( ..,+ CopyJobState_COMPLETED,+ CopyJobState_CREATED,+ CopyJobState_FAILED,+ CopyJobState_PARTIAL,+ CopyJobState_RUNNING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype CopyJobState = CopyJobState'+ { fromCopyJobState ::+ 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 CopyJobState_COMPLETED :: CopyJobState+pattern CopyJobState_COMPLETED = CopyJobState' "COMPLETED"++pattern CopyJobState_CREATED :: CopyJobState+pattern CopyJobState_CREATED = CopyJobState' "CREATED"++pattern CopyJobState_FAILED :: CopyJobState+pattern CopyJobState_FAILED = CopyJobState' "FAILED"++pattern CopyJobState_PARTIAL :: CopyJobState+pattern CopyJobState_PARTIAL = CopyJobState' "PARTIAL"++pattern CopyJobState_RUNNING :: CopyJobState+pattern CopyJobState_RUNNING = CopyJobState' "RUNNING"++{-# COMPLETE+ CopyJobState_COMPLETED,+ CopyJobState_CREATED,+ CopyJobState_FAILED,+ CopyJobState_PARTIAL,+ CopyJobState_RUNNING,+ CopyJobState'+ #-}
+ gen/Amazonka/Backup/Types/DateRange.hs view
@@ -0,0 +1,122 @@+{-# 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.Backup.Types.DateRange+-- 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.Backup.Types.DateRange 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 a resource filter containing FromDate: DateTime and ToDate:+-- DateTime. Both values are required. Future DateTime values are not+-- permitted.+--+-- The date and time are in Unix format and Coordinated Universal Time+-- (UTC), and it is accurate to milliseconds ((milliseconds are optional).+-- For example, the value 1516925490.087 represents Friday, January 26,+-- 2018 12:11:30.087 AM.+--+-- /See:/ 'newDateRange' smart constructor.+data DateRange = DateRange'+ { -- | This value is the beginning date, inclusive.+ --+ -- The date and time are in Unix format and Coordinated Universal Time+ -- (UTC), and it is accurate to milliseconds (milliseconds are optional).+ fromDate :: Data.POSIX,+ -- | This value is the end date, inclusive.+ --+ -- The date and time are in Unix format and Coordinated Universal Time+ -- (UTC), and it is accurate to milliseconds (milliseconds are optional).+ toDate :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DateRange' 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:+--+-- 'fromDate', 'dateRange_fromDate' - This value is the beginning date, inclusive.+--+-- The date and time are in Unix format and Coordinated Universal Time+-- (UTC), and it is accurate to milliseconds (milliseconds are optional).+--+-- 'toDate', 'dateRange_toDate' - This value is the end date, inclusive.+--+-- The date and time are in Unix format and Coordinated Universal Time+-- (UTC), and it is accurate to milliseconds (milliseconds are optional).+newDateRange ::+ -- | 'fromDate'+ Prelude.UTCTime ->+ -- | 'toDate'+ Prelude.UTCTime ->+ DateRange+newDateRange pFromDate_ pToDate_ =+ DateRange'+ { fromDate = Data._Time Lens.# pFromDate_,+ toDate = Data._Time Lens.# pToDate_+ }++-- | This value is the beginning date, inclusive.+--+-- The date and time are in Unix format and Coordinated Universal Time+-- (UTC), and it is accurate to milliseconds (milliseconds are optional).+dateRange_fromDate :: Lens.Lens' DateRange Prelude.UTCTime+dateRange_fromDate = Lens.lens (\DateRange' {fromDate} -> fromDate) (\s@DateRange' {} a -> s {fromDate = a} :: DateRange) Prelude.. Data._Time++-- | This value is the end date, inclusive.+--+-- The date and time are in Unix format and Coordinated Universal Time+-- (UTC), and it is accurate to milliseconds (milliseconds are optional).+dateRange_toDate :: Lens.Lens' DateRange Prelude.UTCTime+dateRange_toDate = Lens.lens (\DateRange' {toDate} -> toDate) (\s@DateRange' {} a -> s {toDate = a} :: DateRange) Prelude.. Data._Time++instance Data.FromJSON DateRange where+ parseJSON =+ Data.withObject+ "DateRange"+ ( \x ->+ DateRange'+ Prelude.<$> (x Data..: "FromDate")+ Prelude.<*> (x Data..: "ToDate")+ )++instance Prelude.Hashable DateRange where+ hashWithSalt _salt DateRange' {..} =+ _salt+ `Prelude.hashWithSalt` fromDate+ `Prelude.hashWithSalt` toDate++instance Prelude.NFData DateRange where+ rnf DateRange' {..} =+ Prelude.rnf fromDate+ `Prelude.seq` Prelude.rnf toDate++instance Data.ToJSON DateRange where+ toJSON DateRange' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("FromDate" Data..= fromDate),+ Prelude.Just ("ToDate" Data..= toDate)+ ]+ )
+ gen/Amazonka/Backup/Types/Framework.hs view
@@ -0,0 +1,161 @@+{-# 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.Backup.Types.Framework+-- 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.Backup.Types.Framework 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++-- | Contains detailed information about a framework. Frameworks contain+-- controls, which evaluate and report on your backup events and resources.+-- Frameworks generate daily compliance results.+--+-- /See:/ 'newFramework' smart constructor.+data Framework = Framework'+ { -- | The date and time that a framework is created, in ISO 8601+ -- representation. The value of @CreationTime@ is accurate to milliseconds.+ -- For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July+ -- 2020 at 3:00 PM 8 hours behind UTC.+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | The deployment status of a framework. The statuses are:+ --+ -- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED@+ deploymentStatus :: Prelude.Maybe Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ frameworkArn :: Prelude.Maybe Prelude.Text,+ -- | An optional description of the framework with a maximum 1,024+ -- characters.+ frameworkDescription :: Prelude.Maybe Prelude.Text,+ -- | The unique name of a framework. This name is between 1 and 256+ -- characters, starting with a letter, and consisting of letters (a-z,+ -- A-Z), numbers (0-9), and underscores (_).+ frameworkName :: Prelude.Maybe Prelude.Text,+ -- | The number of controls contained by the framework.+ numberOfControls :: Prelude.Maybe Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Framework' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTime', 'framework_creationTime' - The date and time that a framework is created, in ISO 8601+-- representation. The value of @CreationTime@ is accurate to milliseconds.+-- For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July+-- 2020 at 3:00 PM 8 hours behind UTC.+--+-- 'deploymentStatus', 'framework_deploymentStatus' - The deployment status of a framework. The statuses are:+--+-- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED@+--+-- 'frameworkArn', 'framework_frameworkArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'frameworkDescription', 'framework_frameworkDescription' - An optional description of the framework with a maximum 1,024+-- characters.+--+-- 'frameworkName', 'framework_frameworkName' - The unique name of a framework. This name is between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+--+-- 'numberOfControls', 'framework_numberOfControls' - The number of controls contained by the framework.+newFramework ::+ Framework+newFramework =+ Framework'+ { creationTime = Prelude.Nothing,+ deploymentStatus = Prelude.Nothing,+ frameworkArn = Prelude.Nothing,+ frameworkDescription = Prelude.Nothing,+ frameworkName = Prelude.Nothing,+ numberOfControls = Prelude.Nothing+ }++-- | The date and time that a framework is created, in ISO 8601+-- representation. The value of @CreationTime@ is accurate to milliseconds.+-- For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July+-- 2020 at 3:00 PM 8 hours behind UTC.+framework_creationTime :: Lens.Lens' Framework (Prelude.Maybe Prelude.UTCTime)+framework_creationTime = Lens.lens (\Framework' {creationTime} -> creationTime) (\s@Framework' {} a -> s {creationTime = a} :: Framework) Prelude.. Lens.mapping Data._Time++-- | The deployment status of a framework. The statuses are:+--+-- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED@+framework_deploymentStatus :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)+framework_deploymentStatus = Lens.lens (\Framework' {deploymentStatus} -> deploymentStatus) (\s@Framework' {} a -> s {deploymentStatus = a} :: Framework)++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+framework_frameworkArn :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)+framework_frameworkArn = Lens.lens (\Framework' {frameworkArn} -> frameworkArn) (\s@Framework' {} a -> s {frameworkArn = a} :: Framework)++-- | An optional description of the framework with a maximum 1,024+-- characters.+framework_frameworkDescription :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)+framework_frameworkDescription = Lens.lens (\Framework' {frameworkDescription} -> frameworkDescription) (\s@Framework' {} a -> s {frameworkDescription = a} :: Framework)++-- | The unique name of a framework. This name is between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+framework_frameworkName :: Lens.Lens' Framework (Prelude.Maybe Prelude.Text)+framework_frameworkName = Lens.lens (\Framework' {frameworkName} -> frameworkName) (\s@Framework' {} a -> s {frameworkName = a} :: Framework)++-- | The number of controls contained by the framework.+framework_numberOfControls :: Lens.Lens' Framework (Prelude.Maybe Prelude.Int)+framework_numberOfControls = Lens.lens (\Framework' {numberOfControls} -> numberOfControls) (\s@Framework' {} a -> s {numberOfControls = a} :: Framework)++instance Data.FromJSON Framework where+ parseJSON =+ Data.withObject+ "Framework"+ ( \x ->+ Framework'+ Prelude.<$> (x Data..:? "CreationTime")+ Prelude.<*> (x Data..:? "DeploymentStatus")+ Prelude.<*> (x Data..:? "FrameworkArn")+ Prelude.<*> (x Data..:? "FrameworkDescription")+ Prelude.<*> (x Data..:? "FrameworkName")+ Prelude.<*> (x Data..:? "NumberOfControls")+ )++instance Prelude.Hashable Framework where+ hashWithSalt _salt Framework' {..} =+ _salt+ `Prelude.hashWithSalt` creationTime+ `Prelude.hashWithSalt` deploymentStatus+ `Prelude.hashWithSalt` frameworkArn+ `Prelude.hashWithSalt` frameworkDescription+ `Prelude.hashWithSalt` frameworkName+ `Prelude.hashWithSalt` numberOfControls++instance Prelude.NFData Framework where+ rnf Framework' {..} =+ Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf deploymentStatus+ `Prelude.seq` Prelude.rnf frameworkArn+ `Prelude.seq` Prelude.rnf frameworkDescription+ `Prelude.seq` Prelude.rnf frameworkName+ `Prelude.seq` Prelude.rnf numberOfControls
+ gen/Amazonka/Backup/Types/FrameworkControl.hs view
@@ -0,0 +1,128 @@+{-# 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.Backup.Types.FrameworkControl+-- 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.Backup.Types.FrameworkControl where++import Amazonka.Backup.Types.ControlInputParameter+import Amazonka.Backup.Types.ControlScope+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++-- | Contains detailed information about all of the controls of a framework.+-- Each framework must contain at least one control.+--+-- /See:/ 'newFrameworkControl' smart constructor.+data FrameworkControl = FrameworkControl'+ { -- | A list of @ParameterName@ and @ParameterValue@ pairs.+ controlInputParameters :: Prelude.Maybe [ControlInputParameter],+ -- | The scope of a control. The control scope defines what the control will+ -- evaluate. Three examples of control scopes are: a specific backup plan,+ -- all backup plans with a specific tag, or all backup plans. For more+ -- information, see+ -- <aws-backup/latest/devguide/API_ControlScope.html ControlScope.>+ controlScope :: Prelude.Maybe ControlScope,+ -- | The name of a control. This name is between 1 and 256 characters.+ controlName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FrameworkControl' 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:+--+-- 'controlInputParameters', 'frameworkControl_controlInputParameters' - A list of @ParameterName@ and @ParameterValue@ pairs.+--+-- 'controlScope', 'frameworkControl_controlScope' - The scope of a control. The control scope defines what the control will+-- evaluate. Three examples of control scopes are: a specific backup plan,+-- all backup plans with a specific tag, or all backup plans. For more+-- information, see+-- <aws-backup/latest/devguide/API_ControlScope.html ControlScope.>+--+-- 'controlName', 'frameworkControl_controlName' - The name of a control. This name is between 1 and 256 characters.+newFrameworkControl ::+ -- | 'controlName'+ Prelude.Text ->+ FrameworkControl+newFrameworkControl pControlName_ =+ FrameworkControl'+ { controlInputParameters =+ Prelude.Nothing,+ controlScope = Prelude.Nothing,+ controlName = pControlName_+ }++-- | A list of @ParameterName@ and @ParameterValue@ pairs.+frameworkControl_controlInputParameters :: Lens.Lens' FrameworkControl (Prelude.Maybe [ControlInputParameter])+frameworkControl_controlInputParameters = Lens.lens (\FrameworkControl' {controlInputParameters} -> controlInputParameters) (\s@FrameworkControl' {} a -> s {controlInputParameters = a} :: FrameworkControl) Prelude.. Lens.mapping Lens.coerced++-- | The scope of a control. The control scope defines what the control will+-- evaluate. Three examples of control scopes are: a specific backup plan,+-- all backup plans with a specific tag, or all backup plans. For more+-- information, see+-- <aws-backup/latest/devguide/API_ControlScope.html ControlScope.>+frameworkControl_controlScope :: Lens.Lens' FrameworkControl (Prelude.Maybe ControlScope)+frameworkControl_controlScope = Lens.lens (\FrameworkControl' {controlScope} -> controlScope) (\s@FrameworkControl' {} a -> s {controlScope = a} :: FrameworkControl)++-- | The name of a control. This name is between 1 and 256 characters.+frameworkControl_controlName :: Lens.Lens' FrameworkControl Prelude.Text+frameworkControl_controlName = Lens.lens (\FrameworkControl' {controlName} -> controlName) (\s@FrameworkControl' {} a -> s {controlName = a} :: FrameworkControl)++instance Data.FromJSON FrameworkControl where+ parseJSON =+ Data.withObject+ "FrameworkControl"+ ( \x ->+ FrameworkControl'+ Prelude.<$> ( x+ Data..:? "ControlInputParameters"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "ControlScope")+ Prelude.<*> (x Data..: "ControlName")+ )++instance Prelude.Hashable FrameworkControl where+ hashWithSalt _salt FrameworkControl' {..} =+ _salt+ `Prelude.hashWithSalt` controlInputParameters+ `Prelude.hashWithSalt` controlScope+ `Prelude.hashWithSalt` controlName++instance Prelude.NFData FrameworkControl where+ rnf FrameworkControl' {..} =+ Prelude.rnf controlInputParameters+ `Prelude.seq` Prelude.rnf controlScope+ `Prelude.seq` Prelude.rnf controlName++instance Data.ToJSON FrameworkControl where+ toJSON FrameworkControl' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ControlInputParameters" Data..=)+ Prelude.<$> controlInputParameters,+ ("ControlScope" Data..=) Prelude.<$> controlScope,+ Prelude.Just ("ControlName" Data..= controlName)+ ]+ )
+ gen/Amazonka/Backup/Types/LegalHold.hs view
@@ -0,0 +1,161 @@+{-# 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.Backup.Types.LegalHold+-- 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.Backup.Types.LegalHold where++import Amazonka.Backup.Types.LegalHoldStatus+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 legal hold is an administrative tool that helps prevent backups from+-- being deleted while under a hold. While the hold is in place, backups+-- under a hold cannot be deleted and lifecycle policies that would alter+-- the backup status (such as transition to cold storage) are delayed until+-- the legal hold is removed. A backup can have more than one legal hold.+-- Legal holds are applied to one or more backups (also known as recovery+-- points). These backups can be filtered by resource types and by resource+-- IDs.+--+-- /See:/ 'newLegalHold' smart constructor.+data LegalHold = LegalHold'+ { -- | This is the time in number format when legal hold was cancelled.+ cancellationDate :: Prelude.Maybe Data.POSIX,+ -- | This is the time in number format when legal hold was created.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | This is the description of a legal hold.+ description :: Prelude.Maybe Prelude.Text,+ -- | This is an Amazon Resource Number (ARN) that uniquely identifies the+ -- legal hold; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ legalHoldArn :: Prelude.Maybe Prelude.Text,+ -- | ID of specific legal hold on one or more recovery points.+ legalHoldId :: Prelude.Maybe Prelude.Text,+ -- | This is the status of the legal hold. Statuses can be @ACTIVE@,+ -- @CREATING@, @CANCELED@, and @CANCELING@.+ status :: Prelude.Maybe LegalHoldStatus,+ -- | This is the title of a legal hold.+ title :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LegalHold' 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:+--+-- 'cancellationDate', 'legalHold_cancellationDate' - This is the time in number format when legal hold was cancelled.+--+-- 'creationDate', 'legalHold_creationDate' - This is the time in number format when legal hold was created.+--+-- 'description', 'legalHold_description' - This is the description of a legal hold.+--+-- 'legalHoldArn', 'legalHold_legalHoldArn' - This is an Amazon Resource Number (ARN) that uniquely identifies the+-- legal hold; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'legalHoldId', 'legalHold_legalHoldId' - ID of specific legal hold on one or more recovery points.+--+-- 'status', 'legalHold_status' - This is the status of the legal hold. Statuses can be @ACTIVE@,+-- @CREATING@, @CANCELED@, and @CANCELING@.+--+-- 'title', 'legalHold_title' - This is the title of a legal hold.+newLegalHold ::+ LegalHold+newLegalHold =+ LegalHold'+ { cancellationDate = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ description = Prelude.Nothing,+ legalHoldArn = Prelude.Nothing,+ legalHoldId = Prelude.Nothing,+ status = Prelude.Nothing,+ title = Prelude.Nothing+ }++-- | This is the time in number format when legal hold was cancelled.+legalHold_cancellationDate :: Lens.Lens' LegalHold (Prelude.Maybe Prelude.UTCTime)+legalHold_cancellationDate = Lens.lens (\LegalHold' {cancellationDate} -> cancellationDate) (\s@LegalHold' {} a -> s {cancellationDate = a} :: LegalHold) Prelude.. Lens.mapping Data._Time++-- | This is the time in number format when legal hold was created.+legalHold_creationDate :: Lens.Lens' LegalHold (Prelude.Maybe Prelude.UTCTime)+legalHold_creationDate = Lens.lens (\LegalHold' {creationDate} -> creationDate) (\s@LegalHold' {} a -> s {creationDate = a} :: LegalHold) Prelude.. Lens.mapping Data._Time++-- | This is the description of a legal hold.+legalHold_description :: Lens.Lens' LegalHold (Prelude.Maybe Prelude.Text)+legalHold_description = Lens.lens (\LegalHold' {description} -> description) (\s@LegalHold' {} a -> s {description = a} :: LegalHold)++-- | This is an Amazon Resource Number (ARN) that uniquely identifies the+-- legal hold; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+legalHold_legalHoldArn :: Lens.Lens' LegalHold (Prelude.Maybe Prelude.Text)+legalHold_legalHoldArn = Lens.lens (\LegalHold' {legalHoldArn} -> legalHoldArn) (\s@LegalHold' {} a -> s {legalHoldArn = a} :: LegalHold)++-- | ID of specific legal hold on one or more recovery points.+legalHold_legalHoldId :: Lens.Lens' LegalHold (Prelude.Maybe Prelude.Text)+legalHold_legalHoldId = Lens.lens (\LegalHold' {legalHoldId} -> legalHoldId) (\s@LegalHold' {} a -> s {legalHoldId = a} :: LegalHold)++-- | This is the status of the legal hold. Statuses can be @ACTIVE@,+-- @CREATING@, @CANCELED@, and @CANCELING@.+legalHold_status :: Lens.Lens' LegalHold (Prelude.Maybe LegalHoldStatus)+legalHold_status = Lens.lens (\LegalHold' {status} -> status) (\s@LegalHold' {} a -> s {status = a} :: LegalHold)++-- | This is the title of a legal hold.+legalHold_title :: Lens.Lens' LegalHold (Prelude.Maybe Prelude.Text)+legalHold_title = Lens.lens (\LegalHold' {title} -> title) (\s@LegalHold' {} a -> s {title = a} :: LegalHold)++instance Data.FromJSON LegalHold where+ parseJSON =+ Data.withObject+ "LegalHold"+ ( \x ->+ LegalHold'+ Prelude.<$> (x Data..:? "CancellationDate")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "Description")+ Prelude.<*> (x Data..:? "LegalHoldArn")+ Prelude.<*> (x Data..:? "LegalHoldId")+ Prelude.<*> (x Data..:? "Status")+ Prelude.<*> (x Data..:? "Title")+ )++instance Prelude.Hashable LegalHold where+ hashWithSalt _salt LegalHold' {..} =+ _salt+ `Prelude.hashWithSalt` cancellationDate+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` legalHoldArn+ `Prelude.hashWithSalt` legalHoldId+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` title++instance Prelude.NFData LegalHold where+ rnf LegalHold' {..} =+ Prelude.rnf cancellationDate+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf description+ `Prelude.seq` Prelude.rnf legalHoldArn+ `Prelude.seq` Prelude.rnf legalHoldId+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf title
+ gen/Amazonka/Backup/Types/LegalHoldStatus.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.Backup.Types.LegalHoldStatus+-- 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.Backup.Types.LegalHoldStatus+ ( LegalHoldStatus+ ( ..,+ LegalHoldStatus_ACTIVE,+ LegalHoldStatus_CANCELED,+ LegalHoldStatus_CANCELING,+ LegalHoldStatus_CREATING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LegalHoldStatus = LegalHoldStatus'+ { fromLegalHoldStatus ::+ 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 LegalHoldStatus_ACTIVE :: LegalHoldStatus+pattern LegalHoldStatus_ACTIVE = LegalHoldStatus' "ACTIVE"++pattern LegalHoldStatus_CANCELED :: LegalHoldStatus+pattern LegalHoldStatus_CANCELED = LegalHoldStatus' "CANCELED"++pattern LegalHoldStatus_CANCELING :: LegalHoldStatus+pattern LegalHoldStatus_CANCELING = LegalHoldStatus' "CANCELING"++pattern LegalHoldStatus_CREATING :: LegalHoldStatus+pattern LegalHoldStatus_CREATING = LegalHoldStatus' "CREATING"++{-# COMPLETE+ LegalHoldStatus_ACTIVE,+ LegalHoldStatus_CANCELED,+ LegalHoldStatus_CANCELING,+ LegalHoldStatus_CREATING,+ LegalHoldStatus'+ #-}
+ gen/Amazonka/Backup/Types/Lifecycle.hs view
@@ -0,0 +1,113 @@+{-# 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.Backup.Types.Lifecycle+-- 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.Backup.Types.Lifecycle 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++-- | Contains an array of @Transition@ objects specifying how long in days+-- before a recovery point transitions to cold storage or is deleted.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, on the console, the “retention” setting+-- must be 90 days greater than the “transition to cold after days”+-- setting. The “transition to cold after days” setting cannot be changed+-- after a backup has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+--+-- /See:/ 'newLifecycle' smart constructor.+data Lifecycle = Lifecycle'+ { -- | Specifies the number of days after creation that a recovery point is+ -- deleted. Must be greater than 90 days plus @MoveToColdStorageAfterDays@.+ deleteAfterDays :: Prelude.Maybe Prelude.Integer,+ -- | Specifies the number of days after creation that a recovery point is+ -- moved to cold storage.+ moveToColdStorageAfterDays :: Prelude.Maybe Prelude.Integer+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Lifecycle' 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:+--+-- 'deleteAfterDays', 'lifecycle_deleteAfterDays' - Specifies the number of days after creation that a recovery point is+-- deleted. Must be greater than 90 days plus @MoveToColdStorageAfterDays@.+--+-- 'moveToColdStorageAfterDays', 'lifecycle_moveToColdStorageAfterDays' - Specifies the number of days after creation that a recovery point is+-- moved to cold storage.+newLifecycle ::+ Lifecycle+newLifecycle =+ Lifecycle'+ { deleteAfterDays = Prelude.Nothing,+ moveToColdStorageAfterDays = Prelude.Nothing+ }++-- | Specifies the number of days after creation that a recovery point is+-- deleted. Must be greater than 90 days plus @MoveToColdStorageAfterDays@.+lifecycle_deleteAfterDays :: Lens.Lens' Lifecycle (Prelude.Maybe Prelude.Integer)+lifecycle_deleteAfterDays = Lens.lens (\Lifecycle' {deleteAfterDays} -> deleteAfterDays) (\s@Lifecycle' {} a -> s {deleteAfterDays = a} :: Lifecycle)++-- | Specifies the number of days after creation that a recovery point is+-- moved to cold storage.+lifecycle_moveToColdStorageAfterDays :: Lens.Lens' Lifecycle (Prelude.Maybe Prelude.Integer)+lifecycle_moveToColdStorageAfterDays = Lens.lens (\Lifecycle' {moveToColdStorageAfterDays} -> moveToColdStorageAfterDays) (\s@Lifecycle' {} a -> s {moveToColdStorageAfterDays = a} :: Lifecycle)++instance Data.FromJSON Lifecycle where+ parseJSON =+ Data.withObject+ "Lifecycle"+ ( \x ->+ Lifecycle'+ Prelude.<$> (x Data..:? "DeleteAfterDays")+ Prelude.<*> (x Data..:? "MoveToColdStorageAfterDays")+ )++instance Prelude.Hashable Lifecycle where+ hashWithSalt _salt Lifecycle' {..} =+ _salt+ `Prelude.hashWithSalt` deleteAfterDays+ `Prelude.hashWithSalt` moveToColdStorageAfterDays++instance Prelude.NFData Lifecycle where+ rnf Lifecycle' {..} =+ Prelude.rnf deleteAfterDays+ `Prelude.seq` Prelude.rnf moveToColdStorageAfterDays++instance Data.ToJSON Lifecycle where+ toJSON Lifecycle' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DeleteAfterDays" Data..=)+ Prelude.<$> deleteAfterDays,+ ("MoveToColdStorageAfterDays" Data..=)+ Prelude.<$> moveToColdStorageAfterDays+ ]+ )
+ gen/Amazonka/Backup/Types/ProtectedResource.hs view
@@ -0,0 +1,118 @@+{-# 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.Backup.Types.ProtectedResource+-- 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.Backup.Types.ProtectedResource where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that contains information about a backed-up resource.+--+-- /See:/ 'newProtectedResource' smart constructor.+data ProtectedResource = ProtectedResource'+ { -- | The date and time a resource was last backed up, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @LastBackupTime@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ lastBackupTime :: Prelude.Maybe Data.POSIX,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | The type of Amazon Web Services resource; for example, an Amazon Elastic+ -- Block Store (Amazon EBS) volume or an Amazon Relational Database Service+ -- (Amazon RDS) database. For Windows Volume Shadow Copy Service (VSS)+ -- backups, the only supported resource type is Amazon EC2.+ resourceType :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ProtectedResource' 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:+--+-- 'lastBackupTime', 'protectedResource_lastBackupTime' - The date and time a resource was last backed up, in Unix format and+-- Coordinated Universal Time (UTC). The value of @LastBackupTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'resourceArn', 'protectedResource_resourceArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'resourceType', 'protectedResource_resourceType' - The type of Amazon Web Services resource; for example, an Amazon Elastic+-- Block Store (Amazon EBS) volume or an Amazon Relational Database Service+-- (Amazon RDS) database. For Windows Volume Shadow Copy Service (VSS)+-- backups, the only supported resource type is Amazon EC2.+newProtectedResource ::+ ProtectedResource+newProtectedResource =+ ProtectedResource'+ { lastBackupTime =+ Prelude.Nothing,+ resourceArn = Prelude.Nothing,+ resourceType = Prelude.Nothing+ }++-- | The date and time a resource was last backed up, in Unix format and+-- Coordinated Universal Time (UTC). The value of @LastBackupTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+protectedResource_lastBackupTime :: Lens.Lens' ProtectedResource (Prelude.Maybe Prelude.UTCTime)+protectedResource_lastBackupTime = Lens.lens (\ProtectedResource' {lastBackupTime} -> lastBackupTime) (\s@ProtectedResource' {} a -> s {lastBackupTime = a} :: ProtectedResource) Prelude.. Lens.mapping Data._Time++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+protectedResource_resourceArn :: Lens.Lens' ProtectedResource (Prelude.Maybe Prelude.Text)+protectedResource_resourceArn = Lens.lens (\ProtectedResource' {resourceArn} -> resourceArn) (\s@ProtectedResource' {} a -> s {resourceArn = a} :: ProtectedResource)++-- | The type of Amazon Web Services resource; for example, an Amazon Elastic+-- Block Store (Amazon EBS) volume or an Amazon Relational Database Service+-- (Amazon RDS) database. For Windows Volume Shadow Copy Service (VSS)+-- backups, the only supported resource type is Amazon EC2.+protectedResource_resourceType :: Lens.Lens' ProtectedResource (Prelude.Maybe Prelude.Text)+protectedResource_resourceType = Lens.lens (\ProtectedResource' {resourceType} -> resourceType) (\s@ProtectedResource' {} a -> s {resourceType = a} :: ProtectedResource)++instance Data.FromJSON ProtectedResource where+ parseJSON =+ Data.withObject+ "ProtectedResource"+ ( \x ->+ ProtectedResource'+ Prelude.<$> (x Data..:? "LastBackupTime")+ Prelude.<*> (x Data..:? "ResourceArn")+ Prelude.<*> (x Data..:? "ResourceType")+ )++instance Prelude.Hashable ProtectedResource where+ hashWithSalt _salt ProtectedResource' {..} =+ _salt+ `Prelude.hashWithSalt` lastBackupTime+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` resourceType++instance Prelude.NFData ProtectedResource where+ rnf ProtectedResource' {..} =+ Prelude.rnf lastBackupTime+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf resourceType
+ gen/Amazonka/Backup/Types/RecoveryPointByBackupVault.hs view
@@ -0,0 +1,462 @@+{-# 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.Backup.Types.RecoveryPointByBackupVault+-- 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.Backup.Types.RecoveryPointByBackupVault where++import Amazonka.Backup.Types.CalculatedLifecycle+import Amazonka.Backup.Types.Lifecycle+import Amazonka.Backup.Types.RecoveryPointCreator+import Amazonka.Backup.Types.RecoveryPointStatus+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++-- | Contains detailed information about the recovery points stored in a+-- backup vault.+--+-- /See:/ 'newRecoveryPointByBackupVault' smart constructor.+data RecoveryPointByBackupVault = RecoveryPointByBackupVault'+ { -- | The size, in bytes, of a backup.+ backupSizeInBytes :: Prelude.Maybe Prelude.Integer,+ -- | An ARN that uniquely identifies a backup vault; for example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | A @CalculatedLifecycle@ object containing @DeleteAt@ and+ -- @MoveToColdStorageAt@ timestamps.+ calculatedLifecycle :: Prelude.Maybe CalculatedLifecycle,+ -- | The date and time a job to restore a recovery point is completed, in+ -- Unix format and Coordinated Universal Time (UTC). The value of+ -- @CompletionDate@ is accurate to milliseconds. For example, the value+ -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+ completionDate :: Prelude.Maybe Data.POSIX,+ -- | This is the identifier of a resource within a composite group, such as+ -- nested (child) recovery point belonging to a composite (parent) stack.+ -- The ID is transferred from the+ -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax logical ID>+ -- within a stack.+ compositeMemberIdentifier :: Prelude.Maybe Prelude.Text,+ -- | Contains identifying information about the creation of a recovery point,+ -- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+ -- @BackupRuleId@ of the backup plan that is used to create it.+ createdBy :: Prelude.Maybe RecoveryPointCreator,+ -- | The date and time a recovery point is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The server-side encryption key that is used to protect your backups; for+ -- example,+ -- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+ encryptionKeyArn :: Prelude.Maybe Prelude.Text,+ -- | Specifies the IAM role ARN used to create the target recovery point; for+ -- example, @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | A Boolean value that is returned as @TRUE@ if the specified recovery+ -- point is encrypted, or @FALSE@ if the recovery point is not encrypted.+ isEncrypted :: Prelude.Maybe Prelude.Bool,+ -- | This is a boolean value indicating this is a parent (composite) recovery+ -- point.+ isParent :: Prelude.Maybe Prelude.Bool,+ -- | The date and time a recovery point was last restored, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @LastRestoreTime@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ lastRestoreTime :: Prelude.Maybe Data.POSIX,+ -- | The lifecycle defines when a protected resource is transitioned to cold+ -- storage and when it expires. Backup transitions and expires backups+ -- automatically according to the lifecycle that you define.+ --+ -- Backups transitioned to cold storage must be stored in cold storage for+ -- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+ -- greater than the “transition to cold after days” setting. The+ -- “transition to cold after days” setting cannot be changed after a backup+ -- has been transitioned to cold.+ --+ -- Resource types that are able to be transitioned to cold storage are+ -- listed in the \"Lifecycle to cold storage\" section of the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+ -- table. Backup ignores this expression for other resource types.+ lifecycle :: Prelude.Maybe Lifecycle,+ -- | This is the Amazon Resource Name (ARN) of the parent (composite)+ -- recovery point.+ parentRecoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a resource. The format of the ARN+ -- depends on the resource type.+ resourceArn :: Prelude.Maybe Prelude.Text,+ -- | The type of Amazon Web Services resource saved as a recovery point; for+ -- example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon+ -- Relational Database Service (Amazon RDS) database. For Windows Volume+ -- Shadow Copy Service (VSS) backups, the only supported resource type is+ -- Amazon EC2.+ resourceType :: Prelude.Maybe Prelude.Text,+ -- | The backup vault where the recovery point was originally copied from. If+ -- the recovery point is restored to the same account this value will be+ -- @null@.+ sourceBackupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | A status code specifying the state of the recovery point.+ status :: Prelude.Maybe RecoveryPointStatus,+ -- | A message explaining the reason of the recovery point deletion failure.+ statusMessage :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecoveryPointByBackupVault' 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:+--+-- 'backupSizeInBytes', 'recoveryPointByBackupVault_backupSizeInBytes' - The size, in bytes, of a backup.+--+-- 'backupVaultArn', 'recoveryPointByBackupVault_backupVaultArn' - An ARN that uniquely identifies a backup vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'backupVaultName', 'recoveryPointByBackupVault_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'calculatedLifecycle', 'recoveryPointByBackupVault_calculatedLifecycle' - A @CalculatedLifecycle@ object containing @DeleteAt@ and+-- @MoveToColdStorageAt@ timestamps.+--+-- 'completionDate', 'recoveryPointByBackupVault_completionDate' - The date and time a job to restore a recovery point is completed, in+-- Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'compositeMemberIdentifier', 'recoveryPointByBackupVault_compositeMemberIdentifier' - This is the identifier of a resource within a composite group, such as+-- nested (child) recovery point belonging to a composite (parent) stack.+-- The ID is transferred from the+-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax logical ID>+-- within a stack.+--+-- 'createdBy', 'recoveryPointByBackupVault_createdBy' - Contains identifying information about the creation of a recovery point,+-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+-- @BackupRuleId@ of the backup plan that is used to create it.+--+-- 'creationDate', 'recoveryPointByBackupVault_creationDate' - The date and time a recovery point is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'encryptionKeyArn', 'recoveryPointByBackupVault_encryptionKeyArn' - The server-side encryption key that is used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+--+-- 'iamRoleArn', 'recoveryPointByBackupVault_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+--+-- 'isEncrypted', 'recoveryPointByBackupVault_isEncrypted' - A Boolean value that is returned as @TRUE@ if the specified recovery+-- point is encrypted, or @FALSE@ if the recovery point is not encrypted.+--+-- 'isParent', 'recoveryPointByBackupVault_isParent' - This is a boolean value indicating this is a parent (composite) recovery+-- point.+--+-- 'lastRestoreTime', 'recoveryPointByBackupVault_lastRestoreTime' - The date and time a recovery point was last restored, in Unix format and+-- Coordinated Universal Time (UTC). The value of @LastRestoreTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'lifecycle', 'recoveryPointByBackupVault_lifecycle' - The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+--+-- 'parentRecoveryPointArn', 'recoveryPointByBackupVault_parentRecoveryPointArn' - This is the Amazon Resource Name (ARN) of the parent (composite)+-- recovery point.+--+-- 'recoveryPointArn', 'recoveryPointByBackupVault_recoveryPointArn' - An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'resourceArn', 'recoveryPointByBackupVault_resourceArn' - An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the resource type.+--+-- 'resourceType', 'recoveryPointByBackupVault_resourceType' - The type of Amazon Web Services resource saved as a recovery point; for+-- example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon+-- Relational Database Service (Amazon RDS) database. For Windows Volume+-- Shadow Copy Service (VSS) backups, the only supported resource type is+-- Amazon EC2.+--+-- 'sourceBackupVaultArn', 'recoveryPointByBackupVault_sourceBackupVaultArn' - The backup vault where the recovery point was originally copied from. If+-- the recovery point is restored to the same account this value will be+-- @null@.+--+-- 'status', 'recoveryPointByBackupVault_status' - A status code specifying the state of the recovery point.+--+-- 'statusMessage', 'recoveryPointByBackupVault_statusMessage' - A message explaining the reason of the recovery point deletion failure.+newRecoveryPointByBackupVault ::+ RecoveryPointByBackupVault+newRecoveryPointByBackupVault =+ RecoveryPointByBackupVault'+ { backupSizeInBytes =+ Prelude.Nothing,+ backupVaultArn = Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ calculatedLifecycle = Prelude.Nothing,+ completionDate = Prelude.Nothing,+ compositeMemberIdentifier = Prelude.Nothing,+ createdBy = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ encryptionKeyArn = Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ isEncrypted = Prelude.Nothing,+ isParent = Prelude.Nothing,+ lastRestoreTime = Prelude.Nothing,+ lifecycle = Prelude.Nothing,+ parentRecoveryPointArn = Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ resourceArn = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ sourceBackupVaultArn = Prelude.Nothing,+ status = Prelude.Nothing,+ statusMessage = Prelude.Nothing+ }++-- | The size, in bytes, of a backup.+recoveryPointByBackupVault_backupSizeInBytes :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Integer)+recoveryPointByBackupVault_backupSizeInBytes = Lens.lens (\RecoveryPointByBackupVault' {backupSizeInBytes} -> backupSizeInBytes) (\s@RecoveryPointByBackupVault' {} a -> s {backupSizeInBytes = a} :: RecoveryPointByBackupVault)++-- | An ARN that uniquely identifies a backup vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+recoveryPointByBackupVault_backupVaultArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_backupVaultArn = Lens.lens (\RecoveryPointByBackupVault' {backupVaultArn} -> backupVaultArn) (\s@RecoveryPointByBackupVault' {} a -> s {backupVaultArn = a} :: RecoveryPointByBackupVault)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+recoveryPointByBackupVault_backupVaultName :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_backupVaultName = Lens.lens (\RecoveryPointByBackupVault' {backupVaultName} -> backupVaultName) (\s@RecoveryPointByBackupVault' {} a -> s {backupVaultName = a} :: RecoveryPointByBackupVault)++-- | A @CalculatedLifecycle@ object containing @DeleteAt@ and+-- @MoveToColdStorageAt@ timestamps.+recoveryPointByBackupVault_calculatedLifecycle :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe CalculatedLifecycle)+recoveryPointByBackupVault_calculatedLifecycle = Lens.lens (\RecoveryPointByBackupVault' {calculatedLifecycle} -> calculatedLifecycle) (\s@RecoveryPointByBackupVault' {} a -> s {calculatedLifecycle = a} :: RecoveryPointByBackupVault)++-- | The date and time a job to restore a recovery point is completed, in+-- Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+recoveryPointByBackupVault_completionDate :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.UTCTime)+recoveryPointByBackupVault_completionDate = Lens.lens (\RecoveryPointByBackupVault' {completionDate} -> completionDate) (\s@RecoveryPointByBackupVault' {} a -> s {completionDate = a} :: RecoveryPointByBackupVault) Prelude.. Lens.mapping Data._Time++-- | This is the identifier of a resource within a composite group, such as+-- nested (child) recovery point belonging to a composite (parent) stack.+-- The ID is transferred from the+-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html#resources-section-structure-syntax logical ID>+-- within a stack.+recoveryPointByBackupVault_compositeMemberIdentifier :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_compositeMemberIdentifier = Lens.lens (\RecoveryPointByBackupVault' {compositeMemberIdentifier} -> compositeMemberIdentifier) (\s@RecoveryPointByBackupVault' {} a -> s {compositeMemberIdentifier = a} :: RecoveryPointByBackupVault)++-- | Contains identifying information about the creation of a recovery point,+-- including the @BackupPlanArn@, @BackupPlanId@, @BackupPlanVersion@, and+-- @BackupRuleId@ of the backup plan that is used to create it.+recoveryPointByBackupVault_createdBy :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe RecoveryPointCreator)+recoveryPointByBackupVault_createdBy = Lens.lens (\RecoveryPointByBackupVault' {createdBy} -> createdBy) (\s@RecoveryPointByBackupVault' {} a -> s {createdBy = a} :: RecoveryPointByBackupVault)++-- | The date and time a recovery point is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+recoveryPointByBackupVault_creationDate :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.UTCTime)+recoveryPointByBackupVault_creationDate = Lens.lens (\RecoveryPointByBackupVault' {creationDate} -> creationDate) (\s@RecoveryPointByBackupVault' {} a -> s {creationDate = a} :: RecoveryPointByBackupVault) Prelude.. Lens.mapping Data._Time++-- | The server-side encryption key that is used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+recoveryPointByBackupVault_encryptionKeyArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_encryptionKeyArn = Lens.lens (\RecoveryPointByBackupVault' {encryptionKeyArn} -> encryptionKeyArn) (\s@RecoveryPointByBackupVault' {} a -> s {encryptionKeyArn = a} :: RecoveryPointByBackupVault)++-- | Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+recoveryPointByBackupVault_iamRoleArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_iamRoleArn = Lens.lens (\RecoveryPointByBackupVault' {iamRoleArn} -> iamRoleArn) (\s@RecoveryPointByBackupVault' {} a -> s {iamRoleArn = a} :: RecoveryPointByBackupVault)++-- | A Boolean value that is returned as @TRUE@ if the specified recovery+-- point is encrypted, or @FALSE@ if the recovery point is not encrypted.+recoveryPointByBackupVault_isEncrypted :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Bool)+recoveryPointByBackupVault_isEncrypted = Lens.lens (\RecoveryPointByBackupVault' {isEncrypted} -> isEncrypted) (\s@RecoveryPointByBackupVault' {} a -> s {isEncrypted = a} :: RecoveryPointByBackupVault)++-- | This is a boolean value indicating this is a parent (composite) recovery+-- point.+recoveryPointByBackupVault_isParent :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Bool)+recoveryPointByBackupVault_isParent = Lens.lens (\RecoveryPointByBackupVault' {isParent} -> isParent) (\s@RecoveryPointByBackupVault' {} a -> s {isParent = a} :: RecoveryPointByBackupVault)++-- | The date and time a recovery point was last restored, in Unix format and+-- Coordinated Universal Time (UTC). The value of @LastRestoreTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+recoveryPointByBackupVault_lastRestoreTime :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.UTCTime)+recoveryPointByBackupVault_lastRestoreTime = Lens.lens (\RecoveryPointByBackupVault' {lastRestoreTime} -> lastRestoreTime) (\s@RecoveryPointByBackupVault' {} a -> s {lastRestoreTime = a} :: RecoveryPointByBackupVault) Prelude.. Lens.mapping Data._Time++-- | The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+recoveryPointByBackupVault_lifecycle :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Lifecycle)+recoveryPointByBackupVault_lifecycle = Lens.lens (\RecoveryPointByBackupVault' {lifecycle} -> lifecycle) (\s@RecoveryPointByBackupVault' {} a -> s {lifecycle = a} :: RecoveryPointByBackupVault)++-- | This is the Amazon Resource Name (ARN) of the parent (composite)+-- recovery point.+recoveryPointByBackupVault_parentRecoveryPointArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_parentRecoveryPointArn = Lens.lens (\RecoveryPointByBackupVault' {parentRecoveryPointArn} -> parentRecoveryPointArn) (\s@RecoveryPointByBackupVault' {} a -> s {parentRecoveryPointArn = a} :: RecoveryPointByBackupVault)++-- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+recoveryPointByBackupVault_recoveryPointArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_recoveryPointArn = Lens.lens (\RecoveryPointByBackupVault' {recoveryPointArn} -> recoveryPointArn) (\s@RecoveryPointByBackupVault' {} a -> s {recoveryPointArn = a} :: RecoveryPointByBackupVault)++-- | An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the resource type.+recoveryPointByBackupVault_resourceArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_resourceArn = Lens.lens (\RecoveryPointByBackupVault' {resourceArn} -> resourceArn) (\s@RecoveryPointByBackupVault' {} a -> s {resourceArn = a} :: RecoveryPointByBackupVault)++-- | The type of Amazon Web Services resource saved as a recovery point; for+-- example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon+-- Relational Database Service (Amazon RDS) database. For Windows Volume+-- Shadow Copy Service (VSS) backups, the only supported resource type is+-- Amazon EC2.+recoveryPointByBackupVault_resourceType :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_resourceType = Lens.lens (\RecoveryPointByBackupVault' {resourceType} -> resourceType) (\s@RecoveryPointByBackupVault' {} a -> s {resourceType = a} :: RecoveryPointByBackupVault)++-- | The backup vault where the recovery point was originally copied from. If+-- the recovery point is restored to the same account this value will be+-- @null@.+recoveryPointByBackupVault_sourceBackupVaultArn :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_sourceBackupVaultArn = Lens.lens (\RecoveryPointByBackupVault' {sourceBackupVaultArn} -> sourceBackupVaultArn) (\s@RecoveryPointByBackupVault' {} a -> s {sourceBackupVaultArn = a} :: RecoveryPointByBackupVault)++-- | A status code specifying the state of the recovery point.+recoveryPointByBackupVault_status :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe RecoveryPointStatus)+recoveryPointByBackupVault_status = Lens.lens (\RecoveryPointByBackupVault' {status} -> status) (\s@RecoveryPointByBackupVault' {} a -> s {status = a} :: RecoveryPointByBackupVault)++-- | A message explaining the reason of the recovery point deletion failure.+recoveryPointByBackupVault_statusMessage :: Lens.Lens' RecoveryPointByBackupVault (Prelude.Maybe Prelude.Text)+recoveryPointByBackupVault_statusMessage = Lens.lens (\RecoveryPointByBackupVault' {statusMessage} -> statusMessage) (\s@RecoveryPointByBackupVault' {} a -> s {statusMessage = a} :: RecoveryPointByBackupVault)++instance Data.FromJSON RecoveryPointByBackupVault where+ parseJSON =+ Data.withObject+ "RecoveryPointByBackupVault"+ ( \x ->+ RecoveryPointByBackupVault'+ Prelude.<$> (x Data..:? "BackupSizeInBytes")+ Prelude.<*> (x Data..:? "BackupVaultArn")+ Prelude.<*> (x Data..:? "BackupVaultName")+ Prelude.<*> (x Data..:? "CalculatedLifecycle")+ Prelude.<*> (x Data..:? "CompletionDate")+ Prelude.<*> (x Data..:? "CompositeMemberIdentifier")+ Prelude.<*> (x Data..:? "CreatedBy")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "EncryptionKeyArn")+ Prelude.<*> (x Data..:? "IamRoleArn")+ Prelude.<*> (x Data..:? "IsEncrypted")+ Prelude.<*> (x Data..:? "IsParent")+ Prelude.<*> (x Data..:? "LastRestoreTime")+ Prelude.<*> (x Data..:? "Lifecycle")+ Prelude.<*> (x Data..:? "ParentRecoveryPointArn")+ Prelude.<*> (x Data..:? "RecoveryPointArn")+ Prelude.<*> (x Data..:? "ResourceArn")+ Prelude.<*> (x Data..:? "ResourceType")+ Prelude.<*> (x Data..:? "SourceBackupVaultArn")+ Prelude.<*> (x Data..:? "Status")+ Prelude.<*> (x Data..:? "StatusMessage")+ )++instance Prelude.Hashable RecoveryPointByBackupVault where+ hashWithSalt _salt RecoveryPointByBackupVault' {..} =+ _salt+ `Prelude.hashWithSalt` backupSizeInBytes+ `Prelude.hashWithSalt` backupVaultArn+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` calculatedLifecycle+ `Prelude.hashWithSalt` completionDate+ `Prelude.hashWithSalt` compositeMemberIdentifier+ `Prelude.hashWithSalt` createdBy+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` encryptionKeyArn+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` isEncrypted+ `Prelude.hashWithSalt` isParent+ `Prelude.hashWithSalt` lastRestoreTime+ `Prelude.hashWithSalt` lifecycle+ `Prelude.hashWithSalt` parentRecoveryPointArn+ `Prelude.hashWithSalt` recoveryPointArn+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` sourceBackupVaultArn+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` statusMessage++instance Prelude.NFData RecoveryPointByBackupVault where+ rnf RecoveryPointByBackupVault' {..} =+ Prelude.rnf backupSizeInBytes+ `Prelude.seq` Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf calculatedLifecycle+ `Prelude.seq` Prelude.rnf completionDate+ `Prelude.seq` Prelude.rnf compositeMemberIdentifier+ `Prelude.seq` Prelude.rnf createdBy+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf encryptionKeyArn+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf isEncrypted+ `Prelude.seq` Prelude.rnf isParent+ `Prelude.seq` Prelude.rnf lastRestoreTime+ `Prelude.seq` Prelude.rnf lifecycle+ `Prelude.seq` Prelude.rnf parentRecoveryPointArn+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf sourceBackupVaultArn+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf statusMessage
+ gen/Amazonka/Backup/Types/RecoveryPointByResource.hs view
@@ -0,0 +1,206 @@+{-# 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.Backup.Types.RecoveryPointByResource+-- 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.Backup.Types.RecoveryPointByResource where++import Amazonka.Backup.Types.RecoveryPointStatus+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++-- | Contains detailed information about a saved recovery point.+--+-- /See:/ 'newRecoveryPointByResource' smart constructor.+data RecoveryPointByResource = RecoveryPointByResource'+ { -- | The size, in bytes, of a backup.+ backupSizeBytes :: Prelude.Maybe Prelude.Integer,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Maybe Prelude.Text,+ -- | The date and time a recovery point is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The server-side encryption key that is used to protect your backups; for+ -- example,+ -- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+ encryptionKeyArn :: Prelude.Maybe Prelude.Text,+ -- | This is a boolean value indicating this is a parent (composite) recovery+ -- point.+ isParent :: Prelude.Maybe Prelude.Bool,+ -- | This is the Amazon Resource Name (ARN) of the parent (composite)+ -- recovery point.+ parentRecoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | A status code specifying the state of the recovery point.+ status :: Prelude.Maybe RecoveryPointStatus,+ -- | A message explaining the reason of the recovery point deletion failure.+ statusMessage :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecoveryPointByResource' 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:+--+-- 'backupSizeBytes', 'recoveryPointByResource_backupSizeBytes' - The size, in bytes, of a backup.+--+-- 'backupVaultName', 'recoveryPointByResource_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'creationDate', 'recoveryPointByResource_creationDate' - The date and time a recovery point is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'encryptionKeyArn', 'recoveryPointByResource_encryptionKeyArn' - The server-side encryption key that is used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+--+-- 'isParent', 'recoveryPointByResource_isParent' - This is a boolean value indicating this is a parent (composite) recovery+-- point.+--+-- 'parentRecoveryPointArn', 'recoveryPointByResource_parentRecoveryPointArn' - This is the Amazon Resource Name (ARN) of the parent (composite)+-- recovery point.+--+-- 'recoveryPointArn', 'recoveryPointByResource_recoveryPointArn' - An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'status', 'recoveryPointByResource_status' - A status code specifying the state of the recovery point.+--+-- 'statusMessage', 'recoveryPointByResource_statusMessage' - A message explaining the reason of the recovery point deletion failure.+newRecoveryPointByResource ::+ RecoveryPointByResource+newRecoveryPointByResource =+ RecoveryPointByResource'+ { backupSizeBytes =+ Prelude.Nothing,+ backupVaultName = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ encryptionKeyArn = Prelude.Nothing,+ isParent = Prelude.Nothing,+ parentRecoveryPointArn = Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ status = Prelude.Nothing,+ statusMessage = Prelude.Nothing+ }++-- | The size, in bytes, of a backup.+recoveryPointByResource_backupSizeBytes :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Integer)+recoveryPointByResource_backupSizeBytes = Lens.lens (\RecoveryPointByResource' {backupSizeBytes} -> backupSizeBytes) (\s@RecoveryPointByResource' {} a -> s {backupSizeBytes = a} :: RecoveryPointByResource)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+recoveryPointByResource_backupVaultName :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Text)+recoveryPointByResource_backupVaultName = Lens.lens (\RecoveryPointByResource' {backupVaultName} -> backupVaultName) (\s@RecoveryPointByResource' {} a -> s {backupVaultName = a} :: RecoveryPointByResource)++-- | The date and time a recovery point is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+recoveryPointByResource_creationDate :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.UTCTime)+recoveryPointByResource_creationDate = Lens.lens (\RecoveryPointByResource' {creationDate} -> creationDate) (\s@RecoveryPointByResource' {} a -> s {creationDate = a} :: RecoveryPointByResource) Prelude.. Lens.mapping Data._Time++-- | The server-side encryption key that is used to protect your backups; for+-- example,+-- @arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab@.+recoveryPointByResource_encryptionKeyArn :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Text)+recoveryPointByResource_encryptionKeyArn = Lens.lens (\RecoveryPointByResource' {encryptionKeyArn} -> encryptionKeyArn) (\s@RecoveryPointByResource' {} a -> s {encryptionKeyArn = a} :: RecoveryPointByResource)++-- | This is a boolean value indicating this is a parent (composite) recovery+-- point.+recoveryPointByResource_isParent :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Bool)+recoveryPointByResource_isParent = Lens.lens (\RecoveryPointByResource' {isParent} -> isParent) (\s@RecoveryPointByResource' {} a -> s {isParent = a} :: RecoveryPointByResource)++-- | This is the Amazon Resource Name (ARN) of the parent (composite)+-- recovery point.+recoveryPointByResource_parentRecoveryPointArn :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Text)+recoveryPointByResource_parentRecoveryPointArn = Lens.lens (\RecoveryPointByResource' {parentRecoveryPointArn} -> parentRecoveryPointArn) (\s@RecoveryPointByResource' {} a -> s {parentRecoveryPointArn = a} :: RecoveryPointByResource)++-- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+recoveryPointByResource_recoveryPointArn :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Text)+recoveryPointByResource_recoveryPointArn = Lens.lens (\RecoveryPointByResource' {recoveryPointArn} -> recoveryPointArn) (\s@RecoveryPointByResource' {} a -> s {recoveryPointArn = a} :: RecoveryPointByResource)++-- | A status code specifying the state of the recovery point.+recoveryPointByResource_status :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe RecoveryPointStatus)+recoveryPointByResource_status = Lens.lens (\RecoveryPointByResource' {status} -> status) (\s@RecoveryPointByResource' {} a -> s {status = a} :: RecoveryPointByResource)++-- | A message explaining the reason of the recovery point deletion failure.+recoveryPointByResource_statusMessage :: Lens.Lens' RecoveryPointByResource (Prelude.Maybe Prelude.Text)+recoveryPointByResource_statusMessage = Lens.lens (\RecoveryPointByResource' {statusMessage} -> statusMessage) (\s@RecoveryPointByResource' {} a -> s {statusMessage = a} :: RecoveryPointByResource)++instance Data.FromJSON RecoveryPointByResource where+ parseJSON =+ Data.withObject+ "RecoveryPointByResource"+ ( \x ->+ RecoveryPointByResource'+ Prelude.<$> (x Data..:? "BackupSizeBytes")+ Prelude.<*> (x Data..:? "BackupVaultName")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "EncryptionKeyArn")+ Prelude.<*> (x Data..:? "IsParent")+ Prelude.<*> (x Data..:? "ParentRecoveryPointArn")+ Prelude.<*> (x Data..:? "RecoveryPointArn")+ Prelude.<*> (x Data..:? "Status")+ Prelude.<*> (x Data..:? "StatusMessage")+ )++instance Prelude.Hashable RecoveryPointByResource where+ hashWithSalt _salt RecoveryPointByResource' {..} =+ _salt+ `Prelude.hashWithSalt` backupSizeBytes+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` encryptionKeyArn+ `Prelude.hashWithSalt` isParent+ `Prelude.hashWithSalt` parentRecoveryPointArn+ `Prelude.hashWithSalt` recoveryPointArn+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` statusMessage++instance Prelude.NFData RecoveryPointByResource where+ rnf RecoveryPointByResource' {..} =+ Prelude.rnf backupSizeBytes+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf encryptionKeyArn+ `Prelude.seq` Prelude.rnf isParent+ `Prelude.seq` Prelude.rnf parentRecoveryPointArn+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf statusMessage
+ gen/Amazonka/Backup/Types/RecoveryPointCreator.hs view
@@ -0,0 +1,122 @@+{-# 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.Backup.Types.RecoveryPointCreator+-- 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.Backup.Types.RecoveryPointCreator 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++-- | Contains information about the backup plan and rule that Backup used to+-- initiate the recovery point backup.+--+-- /See:/ 'newRecoveryPointCreator' smart constructor.+data RecoveryPointCreator = RecoveryPointCreator'+ { -- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+ backupPlanArn :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Maybe Prelude.Text,+ -- | Version IDs are unique, randomly generated, Unicode, UTF-8 encoded+ -- strings that are at most 1,024 bytes long. They cannot be edited.+ backupPlanVersion :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a rule used to schedule the backup of a selection of+ -- resources.+ backupRuleId :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecoveryPointCreator' 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:+--+-- 'backupPlanArn', 'recoveryPointCreator_backupPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+--+-- 'backupPlanId', 'recoveryPointCreator_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'backupPlanVersion', 'recoveryPointCreator_backupPlanVersion' - Version IDs are unique, randomly generated, Unicode, UTF-8 encoded+-- strings that are at most 1,024 bytes long. They cannot be edited.+--+-- 'backupRuleId', 'recoveryPointCreator_backupRuleId' - Uniquely identifies a rule used to schedule the backup of a selection of+-- resources.+newRecoveryPointCreator ::+ RecoveryPointCreator+newRecoveryPointCreator =+ RecoveryPointCreator'+ { backupPlanArn =+ Prelude.Nothing,+ backupPlanId = Prelude.Nothing,+ backupPlanVersion = Prelude.Nothing,+ backupRuleId = Prelude.Nothing+ }++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+recoveryPointCreator_backupPlanArn :: Lens.Lens' RecoveryPointCreator (Prelude.Maybe Prelude.Text)+recoveryPointCreator_backupPlanArn = Lens.lens (\RecoveryPointCreator' {backupPlanArn} -> backupPlanArn) (\s@RecoveryPointCreator' {} a -> s {backupPlanArn = a} :: RecoveryPointCreator)++-- | Uniquely identifies a backup plan.+recoveryPointCreator_backupPlanId :: Lens.Lens' RecoveryPointCreator (Prelude.Maybe Prelude.Text)+recoveryPointCreator_backupPlanId = Lens.lens (\RecoveryPointCreator' {backupPlanId} -> backupPlanId) (\s@RecoveryPointCreator' {} a -> s {backupPlanId = a} :: RecoveryPointCreator)++-- | Version IDs are unique, randomly generated, Unicode, UTF-8 encoded+-- strings that are at most 1,024 bytes long. They cannot be edited.+recoveryPointCreator_backupPlanVersion :: Lens.Lens' RecoveryPointCreator (Prelude.Maybe Prelude.Text)+recoveryPointCreator_backupPlanVersion = Lens.lens (\RecoveryPointCreator' {backupPlanVersion} -> backupPlanVersion) (\s@RecoveryPointCreator' {} a -> s {backupPlanVersion = a} :: RecoveryPointCreator)++-- | Uniquely identifies a rule used to schedule the backup of a selection of+-- resources.+recoveryPointCreator_backupRuleId :: Lens.Lens' RecoveryPointCreator (Prelude.Maybe Prelude.Text)+recoveryPointCreator_backupRuleId = Lens.lens (\RecoveryPointCreator' {backupRuleId} -> backupRuleId) (\s@RecoveryPointCreator' {} a -> s {backupRuleId = a} :: RecoveryPointCreator)++instance Data.FromJSON RecoveryPointCreator where+ parseJSON =+ Data.withObject+ "RecoveryPointCreator"+ ( \x ->+ RecoveryPointCreator'+ Prelude.<$> (x Data..:? "BackupPlanArn")+ Prelude.<*> (x Data..:? "BackupPlanId")+ Prelude.<*> (x Data..:? "BackupPlanVersion")+ Prelude.<*> (x Data..:? "BackupRuleId")+ )++instance Prelude.Hashable RecoveryPointCreator where+ hashWithSalt _salt RecoveryPointCreator' {..} =+ _salt+ `Prelude.hashWithSalt` backupPlanArn+ `Prelude.hashWithSalt` backupPlanId+ `Prelude.hashWithSalt` backupPlanVersion+ `Prelude.hashWithSalt` backupRuleId++instance Prelude.NFData RecoveryPointCreator where+ rnf RecoveryPointCreator' {..} =+ Prelude.rnf backupPlanArn+ `Prelude.seq` Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf backupPlanVersion+ `Prelude.seq` Prelude.rnf backupRuleId
+ gen/Amazonka/Backup/Types/RecoveryPointMember.hs view
@@ -0,0 +1,78 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.Types.RecoveryPointMember+-- 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.Backup.Types.RecoveryPointMember 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 a recovery point which is a child (nested) recovery point of a+-- parent (composite) recovery point. These recovery points can be+-- disassociated from their parent (composite) recovery point, in which+-- case they will no longer be a member.+--+-- /See:/ 'newRecoveryPointMember' smart constructor.+data RecoveryPointMember = RecoveryPointMember'+ { -- | This is the Amazon Resource Name (ARN) of the parent (composite)+ -- recovery point.+ recoveryPointArn :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecoveryPointMember' 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:+--+-- 'recoveryPointArn', 'recoveryPointMember_recoveryPointArn' - This is the Amazon Resource Name (ARN) of the parent (composite)+-- recovery point.+newRecoveryPointMember ::+ RecoveryPointMember+newRecoveryPointMember =+ RecoveryPointMember'+ { recoveryPointArn =+ Prelude.Nothing+ }++-- | This is the Amazon Resource Name (ARN) of the parent (composite)+-- recovery point.+recoveryPointMember_recoveryPointArn :: Lens.Lens' RecoveryPointMember (Prelude.Maybe Prelude.Text)+recoveryPointMember_recoveryPointArn = Lens.lens (\RecoveryPointMember' {recoveryPointArn} -> recoveryPointArn) (\s@RecoveryPointMember' {} a -> s {recoveryPointArn = a} :: RecoveryPointMember)++instance Data.FromJSON RecoveryPointMember where+ parseJSON =+ Data.withObject+ "RecoveryPointMember"+ ( \x ->+ RecoveryPointMember'+ Prelude.<$> (x Data..:? "RecoveryPointArn")+ )++instance Prelude.Hashable RecoveryPointMember where+ hashWithSalt _salt RecoveryPointMember' {..} =+ _salt `Prelude.hashWithSalt` recoveryPointArn++instance Prelude.NFData RecoveryPointMember where+ rnf RecoveryPointMember' {..} =+ Prelude.rnf recoveryPointArn
+ gen/Amazonka/Backup/Types/RecoveryPointSelection.hs view
@@ -0,0 +1,118 @@+{-# 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.Backup.Types.RecoveryPointSelection+-- 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.Backup.Types.RecoveryPointSelection where++import Amazonka.Backup.Types.DateRange+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 specifies criteria to assign a set of resources, such as resource+-- types or backup vaults.+--+-- /See:/ 'newRecoveryPointSelection' smart constructor.+data RecoveryPointSelection = RecoveryPointSelection'+ { dateRange :: Prelude.Maybe DateRange,+ -- | These are the resources included in the resource selection (including+ -- type of resources and vaults).+ resourceIdentifiers :: Prelude.Maybe [Prelude.Text],+ -- | These are the names of the vaults in which the selected recovery points+ -- are contained.+ vaultNames :: Prelude.Maybe [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecoveryPointSelection' 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:+--+-- 'dateRange', 'recoveryPointSelection_dateRange' - Undocumented member.+--+-- 'resourceIdentifiers', 'recoveryPointSelection_resourceIdentifiers' - These are the resources included in the resource selection (including+-- type of resources and vaults).+--+-- 'vaultNames', 'recoveryPointSelection_vaultNames' - These are the names of the vaults in which the selected recovery points+-- are contained.+newRecoveryPointSelection ::+ RecoveryPointSelection+newRecoveryPointSelection =+ RecoveryPointSelection'+ { dateRange =+ Prelude.Nothing,+ resourceIdentifiers = Prelude.Nothing,+ vaultNames = Prelude.Nothing+ }++-- | Undocumented member.+recoveryPointSelection_dateRange :: Lens.Lens' RecoveryPointSelection (Prelude.Maybe DateRange)+recoveryPointSelection_dateRange = Lens.lens (\RecoveryPointSelection' {dateRange} -> dateRange) (\s@RecoveryPointSelection' {} a -> s {dateRange = a} :: RecoveryPointSelection)++-- | These are the resources included in the resource selection (including+-- type of resources and vaults).+recoveryPointSelection_resourceIdentifiers :: Lens.Lens' RecoveryPointSelection (Prelude.Maybe [Prelude.Text])+recoveryPointSelection_resourceIdentifiers = Lens.lens (\RecoveryPointSelection' {resourceIdentifiers} -> resourceIdentifiers) (\s@RecoveryPointSelection' {} a -> s {resourceIdentifiers = a} :: RecoveryPointSelection) Prelude.. Lens.mapping Lens.coerced++-- | These are the names of the vaults in which the selected recovery points+-- are contained.+recoveryPointSelection_vaultNames :: Lens.Lens' RecoveryPointSelection (Prelude.Maybe [Prelude.Text])+recoveryPointSelection_vaultNames = Lens.lens (\RecoveryPointSelection' {vaultNames} -> vaultNames) (\s@RecoveryPointSelection' {} a -> s {vaultNames = a} :: RecoveryPointSelection) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON RecoveryPointSelection where+ parseJSON =+ Data.withObject+ "RecoveryPointSelection"+ ( \x ->+ RecoveryPointSelection'+ Prelude.<$> (x Data..:? "DateRange")+ Prelude.<*> ( x+ Data..:? "ResourceIdentifiers"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "VaultNames" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable RecoveryPointSelection where+ hashWithSalt _salt RecoveryPointSelection' {..} =+ _salt+ `Prelude.hashWithSalt` dateRange+ `Prelude.hashWithSalt` resourceIdentifiers+ `Prelude.hashWithSalt` vaultNames++instance Prelude.NFData RecoveryPointSelection where+ rnf RecoveryPointSelection' {..} =+ Prelude.rnf dateRange+ `Prelude.seq` Prelude.rnf resourceIdentifiers+ `Prelude.seq` Prelude.rnf vaultNames++instance Data.ToJSON RecoveryPointSelection where+ toJSON RecoveryPointSelection' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DateRange" Data..=) Prelude.<$> dateRange,+ ("ResourceIdentifiers" Data..=)+ Prelude.<$> resourceIdentifiers,+ ("VaultNames" Data..=) Prelude.<$> vaultNames+ ]+ )
+ gen/Amazonka/Backup/Types/RecoveryPointStatus.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.Backup.Types.RecoveryPointStatus+-- 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.Backup.Types.RecoveryPointStatus+ ( RecoveryPointStatus+ ( ..,+ RecoveryPointStatus_COMPLETED,+ RecoveryPointStatus_DELETING,+ RecoveryPointStatus_EXPIRED,+ RecoveryPointStatus_PARTIAL+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RecoveryPointStatus = RecoveryPointStatus'+ { fromRecoveryPointStatus ::+ 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 RecoveryPointStatus_COMPLETED :: RecoveryPointStatus+pattern RecoveryPointStatus_COMPLETED = RecoveryPointStatus' "COMPLETED"++pattern RecoveryPointStatus_DELETING :: RecoveryPointStatus+pattern RecoveryPointStatus_DELETING = RecoveryPointStatus' "DELETING"++pattern RecoveryPointStatus_EXPIRED :: RecoveryPointStatus+pattern RecoveryPointStatus_EXPIRED = RecoveryPointStatus' "EXPIRED"++pattern RecoveryPointStatus_PARTIAL :: RecoveryPointStatus+pattern RecoveryPointStatus_PARTIAL = RecoveryPointStatus' "PARTIAL"++{-# COMPLETE+ RecoveryPointStatus_COMPLETED,+ RecoveryPointStatus_DELETING,+ RecoveryPointStatus_EXPIRED,+ RecoveryPointStatus_PARTIAL,+ RecoveryPointStatus'+ #-}
+ gen/Amazonka/Backup/Types/ReportDeliveryChannel.hs view
@@ -0,0 +1,122 @@+{-# 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.Backup.Types.ReportDeliveryChannel+-- 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.Backup.Types.ReportDeliveryChannel 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++-- | Contains information from your report plan about where to deliver your+-- reports, specifically your Amazon S3 bucket name, S3 key prefix, and the+-- formats of your reports.+--+-- /See:/ 'newReportDeliveryChannel' smart constructor.+data ReportDeliveryChannel = ReportDeliveryChannel'+ { -- | A list of the format of your reports: @CSV@, @JSON@, or both. If not+ -- specified, the default format is @CSV@.+ formats :: Prelude.Maybe [Prelude.Text],+ -- | The prefix for where Backup Audit Manager delivers your reports to+ -- Amazon S3. The prefix is this part of the following path:+ -- s3:\/\/your-bucket-name\/@prefix@\/Backup\/us-west-2\/year\/month\/day\/report-name.+ -- If not specified, there is no prefix.+ s3KeyPrefix :: Prelude.Maybe Prelude.Text,+ -- | The unique name of the S3 bucket that receives your reports.+ s3BucketName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ReportDeliveryChannel' 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:+--+-- 'formats', 'reportDeliveryChannel_formats' - A list of the format of your reports: @CSV@, @JSON@, or both. If not+-- specified, the default format is @CSV@.+--+-- 's3KeyPrefix', 'reportDeliveryChannel_s3KeyPrefix' - The prefix for where Backup Audit Manager delivers your reports to+-- Amazon S3. The prefix is this part of the following path:+-- s3:\/\/your-bucket-name\/@prefix@\/Backup\/us-west-2\/year\/month\/day\/report-name.+-- If not specified, there is no prefix.+--+-- 's3BucketName', 'reportDeliveryChannel_s3BucketName' - The unique name of the S3 bucket that receives your reports.+newReportDeliveryChannel ::+ -- | 's3BucketName'+ Prelude.Text ->+ ReportDeliveryChannel+newReportDeliveryChannel pS3BucketName_ =+ ReportDeliveryChannel'+ { formats = Prelude.Nothing,+ s3KeyPrefix = Prelude.Nothing,+ s3BucketName = pS3BucketName_+ }++-- | A list of the format of your reports: @CSV@, @JSON@, or both. If not+-- specified, the default format is @CSV@.+reportDeliveryChannel_formats :: Lens.Lens' ReportDeliveryChannel (Prelude.Maybe [Prelude.Text])+reportDeliveryChannel_formats = Lens.lens (\ReportDeliveryChannel' {formats} -> formats) (\s@ReportDeliveryChannel' {} a -> s {formats = a} :: ReportDeliveryChannel) Prelude.. Lens.mapping Lens.coerced++-- | The prefix for where Backup Audit Manager delivers your reports to+-- Amazon S3. The prefix is this part of the following path:+-- s3:\/\/your-bucket-name\/@prefix@\/Backup\/us-west-2\/year\/month\/day\/report-name.+-- If not specified, there is no prefix.+reportDeliveryChannel_s3KeyPrefix :: Lens.Lens' ReportDeliveryChannel (Prelude.Maybe Prelude.Text)+reportDeliveryChannel_s3KeyPrefix = Lens.lens (\ReportDeliveryChannel' {s3KeyPrefix} -> s3KeyPrefix) (\s@ReportDeliveryChannel' {} a -> s {s3KeyPrefix = a} :: ReportDeliveryChannel)++-- | The unique name of the S3 bucket that receives your reports.+reportDeliveryChannel_s3BucketName :: Lens.Lens' ReportDeliveryChannel Prelude.Text+reportDeliveryChannel_s3BucketName = Lens.lens (\ReportDeliveryChannel' {s3BucketName} -> s3BucketName) (\s@ReportDeliveryChannel' {} a -> s {s3BucketName = a} :: ReportDeliveryChannel)++instance Data.FromJSON ReportDeliveryChannel where+ parseJSON =+ Data.withObject+ "ReportDeliveryChannel"+ ( \x ->+ ReportDeliveryChannel'+ Prelude.<$> (x Data..:? "Formats" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "S3KeyPrefix")+ Prelude.<*> (x Data..: "S3BucketName")+ )++instance Prelude.Hashable ReportDeliveryChannel where+ hashWithSalt _salt ReportDeliveryChannel' {..} =+ _salt+ `Prelude.hashWithSalt` formats+ `Prelude.hashWithSalt` s3KeyPrefix+ `Prelude.hashWithSalt` s3BucketName++instance Prelude.NFData ReportDeliveryChannel where+ rnf ReportDeliveryChannel' {..} =+ Prelude.rnf formats+ `Prelude.seq` Prelude.rnf s3KeyPrefix+ `Prelude.seq` Prelude.rnf s3BucketName++instance Data.ToJSON ReportDeliveryChannel where+ toJSON ReportDeliveryChannel' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Formats" Data..=) Prelude.<$> formats,+ ("S3KeyPrefix" Data..=) Prelude.<$> s3KeyPrefix,+ Prelude.Just ("S3BucketName" Data..= s3BucketName)+ ]+ )
+ gen/Amazonka/Backup/Types/ReportDestination.hs view
@@ -0,0 +1,84 @@+{-# 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.Backup.Types.ReportDestination+-- 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.Backup.Types.ReportDestination 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++-- | Contains information from your report job about your report destination.+--+-- /See:/ 'newReportDestination' smart constructor.+data ReportDestination = ReportDestination'+ { -- | The unique name of the Amazon S3 bucket that receives your reports.+ s3BucketName :: Prelude.Maybe Prelude.Text,+ -- | The object key that uniquely identifies your reports in your S3 bucket.+ s3Keys :: Prelude.Maybe [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ReportDestination' 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:+--+-- 's3BucketName', 'reportDestination_s3BucketName' - The unique name of the Amazon S3 bucket that receives your reports.+--+-- 's3Keys', 'reportDestination_s3Keys' - The object key that uniquely identifies your reports in your S3 bucket.+newReportDestination ::+ ReportDestination+newReportDestination =+ ReportDestination'+ { s3BucketName = Prelude.Nothing,+ s3Keys = Prelude.Nothing+ }++-- | The unique name of the Amazon S3 bucket that receives your reports.+reportDestination_s3BucketName :: Lens.Lens' ReportDestination (Prelude.Maybe Prelude.Text)+reportDestination_s3BucketName = Lens.lens (\ReportDestination' {s3BucketName} -> s3BucketName) (\s@ReportDestination' {} a -> s {s3BucketName = a} :: ReportDestination)++-- | The object key that uniquely identifies your reports in your S3 bucket.+reportDestination_s3Keys :: Lens.Lens' ReportDestination (Prelude.Maybe [Prelude.Text])+reportDestination_s3Keys = Lens.lens (\ReportDestination' {s3Keys} -> s3Keys) (\s@ReportDestination' {} a -> s {s3Keys = a} :: ReportDestination) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON ReportDestination where+ parseJSON =+ Data.withObject+ "ReportDestination"+ ( \x ->+ ReportDestination'+ Prelude.<$> (x Data..:? "S3BucketName")+ Prelude.<*> (x Data..:? "S3Keys" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable ReportDestination where+ hashWithSalt _salt ReportDestination' {..} =+ _salt+ `Prelude.hashWithSalt` s3BucketName+ `Prelude.hashWithSalt` s3Keys++instance Prelude.NFData ReportDestination where+ rnf ReportDestination' {..} =+ Prelude.rnf s3BucketName+ `Prelude.seq` Prelude.rnf s3Keys
+ gen/Amazonka/Backup/Types/ReportJob.hs view
@@ -0,0 +1,215 @@+{-# 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.Backup.Types.ReportJob+-- 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.Backup.Types.ReportJob where++import Amazonka.Backup.Types.ReportDestination+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++-- | Contains detailed information about a report job. A report job compiles+-- a report based on a report plan and publishes it to Amazon S3.+--+-- /See:/ 'newReportJob' smart constructor.+data ReportJob = ReportJob'+ { -- | The date and time that a report job is completed, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CompletionTime@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ completionTime :: Prelude.Maybe Data.POSIX,+ -- | The date and time that a report job is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationTime@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | The S3 bucket name and S3 keys for the destination where the report job+ -- publishes the report.+ reportDestination :: Prelude.Maybe ReportDestination,+ -- | The identifier for a report job. A unique, randomly generated, Unicode,+ -- UTF-8 encoded string that is at most 1,024 bytes long. Report job IDs+ -- cannot be edited.+ reportJobId :: Prelude.Maybe Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ reportPlanArn :: Prelude.Maybe Prelude.Text,+ -- | Identifies the report template for the report. Reports are built using a+ -- report template. The report templates are:+ --+ -- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+ reportTemplate :: Prelude.Maybe Prelude.Text,+ -- | The status of a report job. The statuses are:+ --+ -- @CREATED | RUNNING | COMPLETED | FAILED@+ --+ -- @COMPLETED@ means that the report is available for your review at your+ -- designated destination. If the status is @FAILED@, review the+ -- @StatusMessage@ for the reason.+ status :: Prelude.Maybe Prelude.Text,+ -- | A message explaining the status of the report job.+ statusMessage :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ReportJob' 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:+--+-- 'completionTime', 'reportJob_completionTime' - The date and time that a report job is completed, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CompletionTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'creationTime', 'reportJob_creationTime' - The date and time that a report job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'reportDestination', 'reportJob_reportDestination' - The S3 bucket name and S3 keys for the destination where the report job+-- publishes the report.+--+-- 'reportJobId', 'reportJob_reportJobId' - The identifier for a report job. A unique, randomly generated, Unicode,+-- UTF-8 encoded string that is at most 1,024 bytes long. Report job IDs+-- cannot be edited.+--+-- 'reportPlanArn', 'reportJob_reportPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'reportTemplate', 'reportJob_reportTemplate' - Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+--+-- 'status', 'reportJob_status' - The status of a report job. The statuses are:+--+-- @CREATED | RUNNING | COMPLETED | FAILED@+--+-- @COMPLETED@ means that the report is available for your review at your+-- designated destination. If the status is @FAILED@, review the+-- @StatusMessage@ for the reason.+--+-- 'statusMessage', 'reportJob_statusMessage' - A message explaining the status of the report job.+newReportJob ::+ ReportJob+newReportJob =+ ReportJob'+ { completionTime = Prelude.Nothing,+ creationTime = Prelude.Nothing,+ reportDestination = Prelude.Nothing,+ reportJobId = Prelude.Nothing,+ reportPlanArn = Prelude.Nothing,+ reportTemplate = Prelude.Nothing,+ status = Prelude.Nothing,+ statusMessage = Prelude.Nothing+ }++-- | The date and time that a report job is completed, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CompletionTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+reportJob_completionTime :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.UTCTime)+reportJob_completionTime = Lens.lens (\ReportJob' {completionTime} -> completionTime) (\s@ReportJob' {} a -> s {completionTime = a} :: ReportJob) Prelude.. Lens.mapping Data._Time++-- | The date and time that a report job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+reportJob_creationTime :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.UTCTime)+reportJob_creationTime = Lens.lens (\ReportJob' {creationTime} -> creationTime) (\s@ReportJob' {} a -> s {creationTime = a} :: ReportJob) Prelude.. Lens.mapping Data._Time++-- | The S3 bucket name and S3 keys for the destination where the report job+-- publishes the report.+reportJob_reportDestination :: Lens.Lens' ReportJob (Prelude.Maybe ReportDestination)+reportJob_reportDestination = Lens.lens (\ReportJob' {reportDestination} -> reportDestination) (\s@ReportJob' {} a -> s {reportDestination = a} :: ReportJob)++-- | The identifier for a report job. A unique, randomly generated, Unicode,+-- UTF-8 encoded string that is at most 1,024 bytes long. Report job IDs+-- cannot be edited.+reportJob_reportJobId :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)+reportJob_reportJobId = Lens.lens (\ReportJob' {reportJobId} -> reportJobId) (\s@ReportJob' {} a -> s {reportJobId = a} :: ReportJob)++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+reportJob_reportPlanArn :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)+reportJob_reportPlanArn = Lens.lens (\ReportJob' {reportPlanArn} -> reportPlanArn) (\s@ReportJob' {} a -> s {reportPlanArn = a} :: ReportJob)++-- | Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+reportJob_reportTemplate :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)+reportJob_reportTemplate = Lens.lens (\ReportJob' {reportTemplate} -> reportTemplate) (\s@ReportJob' {} a -> s {reportTemplate = a} :: ReportJob)++-- | The status of a report job. The statuses are:+--+-- @CREATED | RUNNING | COMPLETED | FAILED@+--+-- @COMPLETED@ means that the report is available for your review at your+-- designated destination. If the status is @FAILED@, review the+-- @StatusMessage@ for the reason.+reportJob_status :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)+reportJob_status = Lens.lens (\ReportJob' {status} -> status) (\s@ReportJob' {} a -> s {status = a} :: ReportJob)++-- | A message explaining the status of the report job.+reportJob_statusMessage :: Lens.Lens' ReportJob (Prelude.Maybe Prelude.Text)+reportJob_statusMessage = Lens.lens (\ReportJob' {statusMessage} -> statusMessage) (\s@ReportJob' {} a -> s {statusMessage = a} :: ReportJob)++instance Data.FromJSON ReportJob where+ parseJSON =+ Data.withObject+ "ReportJob"+ ( \x ->+ ReportJob'+ Prelude.<$> (x Data..:? "CompletionTime")+ Prelude.<*> (x Data..:? "CreationTime")+ Prelude.<*> (x Data..:? "ReportDestination")+ Prelude.<*> (x Data..:? "ReportJobId")+ Prelude.<*> (x Data..:? "ReportPlanArn")+ Prelude.<*> (x Data..:? "ReportTemplate")+ Prelude.<*> (x Data..:? "Status")+ Prelude.<*> (x Data..:? "StatusMessage")+ )++instance Prelude.Hashable ReportJob where+ hashWithSalt _salt ReportJob' {..} =+ _salt+ `Prelude.hashWithSalt` completionTime+ `Prelude.hashWithSalt` creationTime+ `Prelude.hashWithSalt` reportDestination+ `Prelude.hashWithSalt` reportJobId+ `Prelude.hashWithSalt` reportPlanArn+ `Prelude.hashWithSalt` reportTemplate+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` statusMessage++instance Prelude.NFData ReportJob where+ rnf ReportJob' {..} =+ Prelude.rnf completionTime+ `Prelude.seq` Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf reportDestination+ `Prelude.seq` Prelude.rnf reportJobId+ `Prelude.seq` Prelude.rnf reportPlanArn+ `Prelude.seq` Prelude.rnf reportTemplate+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf statusMessage
+ gen/Amazonka/Backup/Types/ReportPlan.hs view
@@ -0,0 +1,248 @@+{-# 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.Backup.Types.ReportPlan+-- 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.Backup.Types.ReportPlan where++import Amazonka.Backup.Types.ReportDeliveryChannel+import Amazonka.Backup.Types.ReportSetting+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++-- | Contains detailed information about a report plan.+--+-- /See:/ 'newReportPlan' smart constructor.+data ReportPlan = ReportPlan'+ { -- | The date and time that a report plan is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationTime@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | The deployment status of a report plan. The statuses are:+ --+ -- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED@+ deploymentStatus :: Prelude.Maybe Prelude.Text,+ -- | The date and time that a report job associated with this report plan+ -- last attempted to run, in Unix format and Coordinated Universal Time+ -- (UTC). The value of @LastAttemptedExecutionTime@ is accurate to+ -- milliseconds. For example, the value 1516925490.087 represents Friday,+ -- January 26, 2018 12:11:30.087 AM.+ lastAttemptedExecutionTime :: Prelude.Maybe Data.POSIX,+ -- | The date and time that a report job associated with this report plan+ -- last successfully ran, in Unix format and Coordinated Universal Time+ -- (UTC). The value of @LastSuccessfulExecutionTime@ is accurate to+ -- milliseconds. For example, the value 1516925490.087 represents Friday,+ -- January 26, 2018 12:11:30.087 AM.+ lastSuccessfulExecutionTime :: Prelude.Maybe Data.POSIX,+ -- | Contains information about where and how to deliver your reports,+ -- specifically your Amazon S3 bucket name, S3 key prefix, and the formats+ -- of your reports.+ reportDeliveryChannel :: Prelude.Maybe ReportDeliveryChannel,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ reportPlanArn :: Prelude.Maybe Prelude.Text,+ -- | An optional description of the report plan with a maximum 1,024+ -- characters.+ reportPlanDescription :: Prelude.Maybe Prelude.Text,+ -- | The unique name of the report plan. This name is between 1 and 256+ -- characters starting with a letter, and consisting of letters (a-z, A-Z),+ -- numbers (0-9), and underscores (_).+ reportPlanName :: Prelude.Maybe Prelude.Text,+ -- | Identifies the report template for the report. Reports are built using a+ -- report template. The report templates are:+ --+ -- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+ --+ -- If the report template is @RESOURCE_COMPLIANCE_REPORT@ or+ -- @CONTROL_COMPLIANCE_REPORT@, this API resource also describes the report+ -- coverage by Amazon Web Services Regions and frameworks.+ reportSetting :: Prelude.Maybe ReportSetting+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ReportPlan' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTime', 'reportPlan_creationTime' - The date and time that a report plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'deploymentStatus', 'reportPlan_deploymentStatus' - The deployment status of a report plan. The statuses are:+--+-- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED@+--+-- 'lastAttemptedExecutionTime', 'reportPlan_lastAttemptedExecutionTime' - The date and time that a report job associated with this report plan+-- last attempted to run, in Unix format and Coordinated Universal Time+-- (UTC). The value of @LastAttemptedExecutionTime@ is accurate to+-- milliseconds. For example, the value 1516925490.087 represents Friday,+-- January 26, 2018 12:11:30.087 AM.+--+-- 'lastSuccessfulExecutionTime', 'reportPlan_lastSuccessfulExecutionTime' - The date and time that a report job associated with this report plan+-- last successfully ran, in Unix format and Coordinated Universal Time+-- (UTC). The value of @LastSuccessfulExecutionTime@ is accurate to+-- milliseconds. For example, the value 1516925490.087 represents Friday,+-- January 26, 2018 12:11:30.087 AM.+--+-- 'reportDeliveryChannel', 'reportPlan_reportDeliveryChannel' - Contains information about where and how to deliver your reports,+-- specifically your Amazon S3 bucket name, S3 key prefix, and the formats+-- of your reports.+--+-- 'reportPlanArn', 'reportPlan_reportPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'reportPlanDescription', 'reportPlan_reportPlanDescription' - An optional description of the report plan with a maximum 1,024+-- characters.+--+-- 'reportPlanName', 'reportPlan_reportPlanName' - The unique name of the report plan. This name is between 1 and 256+-- characters starting with a letter, and consisting of letters (a-z, A-Z),+-- numbers (0-9), and underscores (_).+--+-- 'reportSetting', 'reportPlan_reportSetting' - Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+--+-- If the report template is @RESOURCE_COMPLIANCE_REPORT@ or+-- @CONTROL_COMPLIANCE_REPORT@, this API resource also describes the report+-- coverage by Amazon Web Services Regions and frameworks.+newReportPlan ::+ ReportPlan+newReportPlan =+ ReportPlan'+ { creationTime = Prelude.Nothing,+ deploymentStatus = Prelude.Nothing,+ lastAttemptedExecutionTime = Prelude.Nothing,+ lastSuccessfulExecutionTime = Prelude.Nothing,+ reportDeliveryChannel = Prelude.Nothing,+ reportPlanArn = Prelude.Nothing,+ reportPlanDescription = Prelude.Nothing,+ reportPlanName = Prelude.Nothing,+ reportSetting = Prelude.Nothing+ }++-- | The date and time that a report plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+reportPlan_creationTime :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.UTCTime)+reportPlan_creationTime = Lens.lens (\ReportPlan' {creationTime} -> creationTime) (\s@ReportPlan' {} a -> s {creationTime = a} :: ReportPlan) Prelude.. Lens.mapping Data._Time++-- | The deployment status of a report plan. The statuses are:+--+-- @CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED@+reportPlan_deploymentStatus :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.Text)+reportPlan_deploymentStatus = Lens.lens (\ReportPlan' {deploymentStatus} -> deploymentStatus) (\s@ReportPlan' {} a -> s {deploymentStatus = a} :: ReportPlan)++-- | The date and time that a report job associated with this report plan+-- last attempted to run, in Unix format and Coordinated Universal Time+-- (UTC). The value of @LastAttemptedExecutionTime@ is accurate to+-- milliseconds. For example, the value 1516925490.087 represents Friday,+-- January 26, 2018 12:11:30.087 AM.+reportPlan_lastAttemptedExecutionTime :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.UTCTime)+reportPlan_lastAttemptedExecutionTime = Lens.lens (\ReportPlan' {lastAttemptedExecutionTime} -> lastAttemptedExecutionTime) (\s@ReportPlan' {} a -> s {lastAttemptedExecutionTime = a} :: ReportPlan) Prelude.. Lens.mapping Data._Time++-- | The date and time that a report job associated with this report plan+-- last successfully ran, in Unix format and Coordinated Universal Time+-- (UTC). The value of @LastSuccessfulExecutionTime@ is accurate to+-- milliseconds. For example, the value 1516925490.087 represents Friday,+-- January 26, 2018 12:11:30.087 AM.+reportPlan_lastSuccessfulExecutionTime :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.UTCTime)+reportPlan_lastSuccessfulExecutionTime = Lens.lens (\ReportPlan' {lastSuccessfulExecutionTime} -> lastSuccessfulExecutionTime) (\s@ReportPlan' {} a -> s {lastSuccessfulExecutionTime = a} :: ReportPlan) Prelude.. Lens.mapping Data._Time++-- | Contains information about where and how to deliver your reports,+-- specifically your Amazon S3 bucket name, S3 key prefix, and the formats+-- of your reports.+reportPlan_reportDeliveryChannel :: Lens.Lens' ReportPlan (Prelude.Maybe ReportDeliveryChannel)+reportPlan_reportDeliveryChannel = Lens.lens (\ReportPlan' {reportDeliveryChannel} -> reportDeliveryChannel) (\s@ReportPlan' {} a -> s {reportDeliveryChannel = a} :: ReportPlan)++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+reportPlan_reportPlanArn :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.Text)+reportPlan_reportPlanArn = Lens.lens (\ReportPlan' {reportPlanArn} -> reportPlanArn) (\s@ReportPlan' {} a -> s {reportPlanArn = a} :: ReportPlan)++-- | An optional description of the report plan with a maximum 1,024+-- characters.+reportPlan_reportPlanDescription :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.Text)+reportPlan_reportPlanDescription = Lens.lens (\ReportPlan' {reportPlanDescription} -> reportPlanDescription) (\s@ReportPlan' {} a -> s {reportPlanDescription = a} :: ReportPlan)++-- | The unique name of the report plan. This name is between 1 and 256+-- characters starting with a letter, and consisting of letters (a-z, A-Z),+-- numbers (0-9), and underscores (_).+reportPlan_reportPlanName :: Lens.Lens' ReportPlan (Prelude.Maybe Prelude.Text)+reportPlan_reportPlanName = Lens.lens (\ReportPlan' {reportPlanName} -> reportPlanName) (\s@ReportPlan' {} a -> s {reportPlanName = a} :: ReportPlan)++-- | Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+--+-- If the report template is @RESOURCE_COMPLIANCE_REPORT@ or+-- @CONTROL_COMPLIANCE_REPORT@, this API resource also describes the report+-- coverage by Amazon Web Services Regions and frameworks.+reportPlan_reportSetting :: Lens.Lens' ReportPlan (Prelude.Maybe ReportSetting)+reportPlan_reportSetting = Lens.lens (\ReportPlan' {reportSetting} -> reportSetting) (\s@ReportPlan' {} a -> s {reportSetting = a} :: ReportPlan)++instance Data.FromJSON ReportPlan where+ parseJSON =+ Data.withObject+ "ReportPlan"+ ( \x ->+ ReportPlan'+ Prelude.<$> (x Data..:? "CreationTime")+ Prelude.<*> (x Data..:? "DeploymentStatus")+ Prelude.<*> (x Data..:? "LastAttemptedExecutionTime")+ Prelude.<*> (x Data..:? "LastSuccessfulExecutionTime")+ Prelude.<*> (x Data..:? "ReportDeliveryChannel")+ Prelude.<*> (x Data..:? "ReportPlanArn")+ Prelude.<*> (x Data..:? "ReportPlanDescription")+ Prelude.<*> (x Data..:? "ReportPlanName")+ Prelude.<*> (x Data..:? "ReportSetting")+ )++instance Prelude.Hashable ReportPlan where+ hashWithSalt _salt ReportPlan' {..} =+ _salt+ `Prelude.hashWithSalt` creationTime+ `Prelude.hashWithSalt` deploymentStatus+ `Prelude.hashWithSalt` lastAttemptedExecutionTime+ `Prelude.hashWithSalt` lastSuccessfulExecutionTime+ `Prelude.hashWithSalt` reportDeliveryChannel+ `Prelude.hashWithSalt` reportPlanArn+ `Prelude.hashWithSalt` reportPlanDescription+ `Prelude.hashWithSalt` reportPlanName+ `Prelude.hashWithSalt` reportSetting++instance Prelude.NFData ReportPlan where+ rnf ReportPlan' {..} =+ Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf deploymentStatus+ `Prelude.seq` Prelude.rnf lastAttemptedExecutionTime+ `Prelude.seq` Prelude.rnf lastSuccessfulExecutionTime+ `Prelude.seq` Prelude.rnf reportDeliveryChannel+ `Prelude.seq` Prelude.rnf reportPlanArn+ `Prelude.seq` Prelude.rnf reportPlanDescription+ `Prelude.seq` Prelude.rnf reportPlanName+ `Prelude.seq` Prelude.rnf reportSetting
+ gen/Amazonka/Backup/Types/ReportSetting.hs view
@@ -0,0 +1,162 @@+{-# 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.Backup.Types.ReportSetting+-- 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.Backup.Types.ReportSetting 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++-- | Contains detailed information about a report setting.+--+-- /See:/ 'newReportSetting' smart constructor.+data ReportSetting = ReportSetting'+ { -- | These are the accounts to be included in the report.+ accounts :: Prelude.Maybe [Prelude.Text],+ -- | The Amazon Resource Names (ARNs) of the frameworks a report covers.+ frameworkArns :: Prelude.Maybe [Prelude.Text],+ -- | The number of frameworks a report covers.+ numberOfFrameworks :: Prelude.Maybe Prelude.Int,+ -- | These are the Organizational Units to be included in the report.+ organizationUnits :: Prelude.Maybe [Prelude.Text],+ -- | These are the Regions to be included in the report.+ regions :: Prelude.Maybe [Prelude.Text],+ -- | Identifies the report template for the report. Reports are built using a+ -- report template. The report templates are:+ --+ -- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+ reportTemplate :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ReportSetting' 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:+--+-- 'accounts', 'reportSetting_accounts' - These are the accounts to be included in the report.+--+-- 'frameworkArns', 'reportSetting_frameworkArns' - The Amazon Resource Names (ARNs) of the frameworks a report covers.+--+-- 'numberOfFrameworks', 'reportSetting_numberOfFrameworks' - The number of frameworks a report covers.+--+-- 'organizationUnits', 'reportSetting_organizationUnits' - These are the Organizational Units to be included in the report.+--+-- 'regions', 'reportSetting_regions' - These are the Regions to be included in the report.+--+-- 'reportTemplate', 'reportSetting_reportTemplate' - Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+newReportSetting ::+ -- | 'reportTemplate'+ Prelude.Text ->+ ReportSetting+newReportSetting pReportTemplate_ =+ ReportSetting'+ { accounts = Prelude.Nothing,+ frameworkArns = Prelude.Nothing,+ numberOfFrameworks = Prelude.Nothing,+ organizationUnits = Prelude.Nothing,+ regions = Prelude.Nothing,+ reportTemplate = pReportTemplate_+ }++-- | These are the accounts to be included in the report.+reportSetting_accounts :: Lens.Lens' ReportSetting (Prelude.Maybe [Prelude.Text])+reportSetting_accounts = Lens.lens (\ReportSetting' {accounts} -> accounts) (\s@ReportSetting' {} a -> s {accounts = a} :: ReportSetting) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Names (ARNs) of the frameworks a report covers.+reportSetting_frameworkArns :: Lens.Lens' ReportSetting (Prelude.Maybe [Prelude.Text])+reportSetting_frameworkArns = Lens.lens (\ReportSetting' {frameworkArns} -> frameworkArns) (\s@ReportSetting' {} a -> s {frameworkArns = a} :: ReportSetting) Prelude.. Lens.mapping Lens.coerced++-- | The number of frameworks a report covers.+reportSetting_numberOfFrameworks :: Lens.Lens' ReportSetting (Prelude.Maybe Prelude.Int)+reportSetting_numberOfFrameworks = Lens.lens (\ReportSetting' {numberOfFrameworks} -> numberOfFrameworks) (\s@ReportSetting' {} a -> s {numberOfFrameworks = a} :: ReportSetting)++-- | These are the Organizational Units to be included in the report.+reportSetting_organizationUnits :: Lens.Lens' ReportSetting (Prelude.Maybe [Prelude.Text])+reportSetting_organizationUnits = Lens.lens (\ReportSetting' {organizationUnits} -> organizationUnits) (\s@ReportSetting' {} a -> s {organizationUnits = a} :: ReportSetting) Prelude.. Lens.mapping Lens.coerced++-- | These are the Regions to be included in the report.+reportSetting_regions :: Lens.Lens' ReportSetting (Prelude.Maybe [Prelude.Text])+reportSetting_regions = Lens.lens (\ReportSetting' {regions} -> regions) (\s@ReportSetting' {} a -> s {regions = a} :: ReportSetting) Prelude.. Lens.mapping Lens.coerced++-- | Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+reportSetting_reportTemplate :: Lens.Lens' ReportSetting Prelude.Text+reportSetting_reportTemplate = Lens.lens (\ReportSetting' {reportTemplate} -> reportTemplate) (\s@ReportSetting' {} a -> s {reportTemplate = a} :: ReportSetting)++instance Data.FromJSON ReportSetting where+ parseJSON =+ Data.withObject+ "ReportSetting"+ ( \x ->+ ReportSetting'+ Prelude.<$> (x Data..:? "Accounts" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "FrameworkArns" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "NumberOfFrameworks")+ Prelude.<*> ( x+ Data..:? "OrganizationUnits"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "Regions" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..: "ReportTemplate")+ )++instance Prelude.Hashable ReportSetting where+ hashWithSalt _salt ReportSetting' {..} =+ _salt+ `Prelude.hashWithSalt` accounts+ `Prelude.hashWithSalt` frameworkArns+ `Prelude.hashWithSalt` numberOfFrameworks+ `Prelude.hashWithSalt` organizationUnits+ `Prelude.hashWithSalt` regions+ `Prelude.hashWithSalt` reportTemplate++instance Prelude.NFData ReportSetting where+ rnf ReportSetting' {..} =+ Prelude.rnf accounts+ `Prelude.seq` Prelude.rnf frameworkArns+ `Prelude.seq` Prelude.rnf numberOfFrameworks+ `Prelude.seq` Prelude.rnf organizationUnits+ `Prelude.seq` Prelude.rnf regions+ `Prelude.seq` Prelude.rnf reportTemplate++instance Data.ToJSON ReportSetting where+ toJSON ReportSetting' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Accounts" Data..=) Prelude.<$> accounts,+ ("FrameworkArns" Data..=) Prelude.<$> frameworkArns,+ ("NumberOfFrameworks" Data..=)+ Prelude.<$> numberOfFrameworks,+ ("OrganizationUnits" Data..=)+ Prelude.<$> organizationUnits,+ ("Regions" Data..=) Prelude.<$> regions,+ Prelude.Just+ ("ReportTemplate" Data..= reportTemplate)+ ]+ )
+ gen/Amazonka/Backup/Types/RestoreJobStatus.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.Backup.Types.RestoreJobStatus+-- 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.Backup.Types.RestoreJobStatus+ ( RestoreJobStatus+ ( ..,+ RestoreJobStatus_ABORTED,+ RestoreJobStatus_COMPLETED,+ RestoreJobStatus_FAILED,+ RestoreJobStatus_PENDING,+ RestoreJobStatus_RUNNING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RestoreJobStatus = RestoreJobStatus'+ { fromRestoreJobStatus ::+ 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 RestoreJobStatus_ABORTED :: RestoreJobStatus+pattern RestoreJobStatus_ABORTED = RestoreJobStatus' "ABORTED"++pattern RestoreJobStatus_COMPLETED :: RestoreJobStatus+pattern RestoreJobStatus_COMPLETED = RestoreJobStatus' "COMPLETED"++pattern RestoreJobStatus_FAILED :: RestoreJobStatus+pattern RestoreJobStatus_FAILED = RestoreJobStatus' "FAILED"++pattern RestoreJobStatus_PENDING :: RestoreJobStatus+pattern RestoreJobStatus_PENDING = RestoreJobStatus' "PENDING"++pattern RestoreJobStatus_RUNNING :: RestoreJobStatus+pattern RestoreJobStatus_RUNNING = RestoreJobStatus' "RUNNING"++{-# COMPLETE+ RestoreJobStatus_ABORTED,+ RestoreJobStatus_COMPLETED,+ RestoreJobStatus_FAILED,+ RestoreJobStatus_PENDING,+ RestoreJobStatus_RUNNING,+ RestoreJobStatus'+ #-}
+ gen/Amazonka/Backup/Types/RestoreJobsListMember.hs view
@@ -0,0 +1,265 @@+{-# 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.Backup.Types.RestoreJobsListMember+-- 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.Backup.Types.RestoreJobsListMember where++import Amazonka.Backup.Types.RestoreJobStatus+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++-- | Contains metadata about a restore job.+--+-- /See:/ 'newRestoreJobsListMember' smart constructor.+data RestoreJobsListMember = RestoreJobsListMember'+ { -- | The account ID that owns the restore job.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The size, in bytes, of the restored resource.+ backupSizeInBytes :: Prelude.Maybe Prelude.Integer,+ -- | The date and time a job to restore a recovery point is completed, in+ -- Unix format and Coordinated Universal Time (UTC). The value of+ -- @CompletionDate@ is accurate to milliseconds. For example, the value+ -- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+ completionDate :: Prelude.Maybe Data.POSIX,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ createdResourceArn :: Prelude.Maybe Prelude.Text,+ -- | The date and time a restore job is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The amount of time in minutes that a job restoring a recovery point is+ -- expected to take.+ expectedCompletionTimeMinutes :: Prelude.Maybe Prelude.Integer,+ -- | Specifies the IAM role ARN used to create the target recovery point; for+ -- example, @arn:aws:iam::123456789012:role\/S3Access@.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | Contains an estimated percentage complete of a job at the time the job+ -- status was queried.+ percentDone :: Prelude.Maybe Prelude.Text,+ -- | An ARN that uniquely identifies a recovery point; for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Maybe Prelude.Text,+ -- | The resource type of the listed restore jobs; for example, an Amazon+ -- Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database+ -- Service (Amazon RDS) database. For Windows Volume Shadow Copy Service+ -- (VSS) backups, the only supported resource type is Amazon EC2.+ resourceType :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies the job that restores a recovery point.+ restoreJobId :: Prelude.Maybe Prelude.Text,+ -- | A status code specifying the state of the job initiated by Backup to+ -- restore a recovery point.+ status :: Prelude.Maybe RestoreJobStatus,+ -- | A detailed message explaining the status of the job to restore a+ -- recovery point.+ statusMessage :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RestoreJobsListMember' 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:+--+-- 'accountId', 'restoreJobsListMember_accountId' - The account ID that owns the restore job.+--+-- 'backupSizeInBytes', 'restoreJobsListMember_backupSizeInBytes' - The size, in bytes, of the restored resource.+--+-- 'completionDate', 'restoreJobsListMember_completionDate' - The date and time a job to restore a recovery point is completed, in+-- Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'createdResourceArn', 'restoreJobsListMember_createdResourceArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'creationDate', 'restoreJobsListMember_creationDate' - The date and time a restore job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'expectedCompletionTimeMinutes', 'restoreJobsListMember_expectedCompletionTimeMinutes' - The amount of time in minutes that a job restoring a recovery point is+-- expected to take.+--+-- 'iamRoleArn', 'restoreJobsListMember_iamRoleArn' - Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+--+-- 'percentDone', 'restoreJobsListMember_percentDone' - Contains an estimated percentage complete of a job at the time the job+-- status was queried.+--+-- 'recoveryPointArn', 'restoreJobsListMember_recoveryPointArn' - An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'resourceType', 'restoreJobsListMember_resourceType' - The resource type of the listed restore jobs; for example, an Amazon+-- Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database+-- Service (Amazon RDS) database. For Windows Volume Shadow Copy Service+-- (VSS) backups, the only supported resource type is Amazon EC2.+--+-- 'restoreJobId', 'restoreJobsListMember_restoreJobId' - Uniquely identifies the job that restores a recovery point.+--+-- 'status', 'restoreJobsListMember_status' - A status code specifying the state of the job initiated by Backup to+-- restore a recovery point.+--+-- 'statusMessage', 'restoreJobsListMember_statusMessage' - A detailed message explaining the status of the job to restore a+-- recovery point.+newRestoreJobsListMember ::+ RestoreJobsListMember+newRestoreJobsListMember =+ RestoreJobsListMember'+ { accountId = Prelude.Nothing,+ backupSizeInBytes = Prelude.Nothing,+ completionDate = Prelude.Nothing,+ createdResourceArn = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ expectedCompletionTimeMinutes = Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ percentDone = Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ restoreJobId = Prelude.Nothing,+ status = Prelude.Nothing,+ statusMessage = Prelude.Nothing+ }++-- | The account ID that owns the restore job.+restoreJobsListMember_accountId :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Text)+restoreJobsListMember_accountId = Lens.lens (\RestoreJobsListMember' {accountId} -> accountId) (\s@RestoreJobsListMember' {} a -> s {accountId = a} :: RestoreJobsListMember)++-- | The size, in bytes, of the restored resource.+restoreJobsListMember_backupSizeInBytes :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Integer)+restoreJobsListMember_backupSizeInBytes = Lens.lens (\RestoreJobsListMember' {backupSizeInBytes} -> backupSizeInBytes) (\s@RestoreJobsListMember' {} a -> s {backupSizeInBytes = a} :: RestoreJobsListMember)++-- | The date and time a job to restore a recovery point is completed, in+-- Unix format and Coordinated Universal Time (UTC). The value of+-- @CompletionDate@ is accurate to milliseconds. For example, the value+-- 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.+restoreJobsListMember_completionDate :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.UTCTime)+restoreJobsListMember_completionDate = Lens.lens (\RestoreJobsListMember' {completionDate} -> completionDate) (\s@RestoreJobsListMember' {} a -> s {completionDate = a} :: RestoreJobsListMember) Prelude.. Lens.mapping Data._Time++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+restoreJobsListMember_createdResourceArn :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Text)+restoreJobsListMember_createdResourceArn = Lens.lens (\RestoreJobsListMember' {createdResourceArn} -> createdResourceArn) (\s@RestoreJobsListMember' {} a -> s {createdResourceArn = a} :: RestoreJobsListMember)++-- | The date and time a restore job is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+restoreJobsListMember_creationDate :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.UTCTime)+restoreJobsListMember_creationDate = Lens.lens (\RestoreJobsListMember' {creationDate} -> creationDate) (\s@RestoreJobsListMember' {} a -> s {creationDate = a} :: RestoreJobsListMember) Prelude.. Lens.mapping Data._Time++-- | The amount of time in minutes that a job restoring a recovery point is+-- expected to take.+restoreJobsListMember_expectedCompletionTimeMinutes :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Integer)+restoreJobsListMember_expectedCompletionTimeMinutes = Lens.lens (\RestoreJobsListMember' {expectedCompletionTimeMinutes} -> expectedCompletionTimeMinutes) (\s@RestoreJobsListMember' {} a -> s {expectedCompletionTimeMinutes = a} :: RestoreJobsListMember)++-- | Specifies the IAM role ARN used to create the target recovery point; for+-- example, @arn:aws:iam::123456789012:role\/S3Access@.+restoreJobsListMember_iamRoleArn :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Text)+restoreJobsListMember_iamRoleArn = Lens.lens (\RestoreJobsListMember' {iamRoleArn} -> iamRoleArn) (\s@RestoreJobsListMember' {} a -> s {iamRoleArn = a} :: RestoreJobsListMember)++-- | Contains an estimated percentage complete of a job at the time the job+-- status was queried.+restoreJobsListMember_percentDone :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Text)+restoreJobsListMember_percentDone = Lens.lens (\RestoreJobsListMember' {percentDone} -> percentDone) (\s@RestoreJobsListMember' {} a -> s {percentDone = a} :: RestoreJobsListMember)++-- | An ARN that uniquely identifies a recovery point; for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+restoreJobsListMember_recoveryPointArn :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Text)+restoreJobsListMember_recoveryPointArn = Lens.lens (\RestoreJobsListMember' {recoveryPointArn} -> recoveryPointArn) (\s@RestoreJobsListMember' {} a -> s {recoveryPointArn = a} :: RestoreJobsListMember)++-- | The resource type of the listed restore jobs; for example, an Amazon+-- Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database+-- Service (Amazon RDS) database. For Windows Volume Shadow Copy Service+-- (VSS) backups, the only supported resource type is Amazon EC2.+restoreJobsListMember_resourceType :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Text)+restoreJobsListMember_resourceType = Lens.lens (\RestoreJobsListMember' {resourceType} -> resourceType) (\s@RestoreJobsListMember' {} a -> s {resourceType = a} :: RestoreJobsListMember)++-- | Uniquely identifies the job that restores a recovery point.+restoreJobsListMember_restoreJobId :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Text)+restoreJobsListMember_restoreJobId = Lens.lens (\RestoreJobsListMember' {restoreJobId} -> restoreJobId) (\s@RestoreJobsListMember' {} a -> s {restoreJobId = a} :: RestoreJobsListMember)++-- | A status code specifying the state of the job initiated by Backup to+-- restore a recovery point.+restoreJobsListMember_status :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe RestoreJobStatus)+restoreJobsListMember_status = Lens.lens (\RestoreJobsListMember' {status} -> status) (\s@RestoreJobsListMember' {} a -> s {status = a} :: RestoreJobsListMember)++-- | A detailed message explaining the status of the job to restore a+-- recovery point.+restoreJobsListMember_statusMessage :: Lens.Lens' RestoreJobsListMember (Prelude.Maybe Prelude.Text)+restoreJobsListMember_statusMessage = Lens.lens (\RestoreJobsListMember' {statusMessage} -> statusMessage) (\s@RestoreJobsListMember' {} a -> s {statusMessage = a} :: RestoreJobsListMember)++instance Data.FromJSON RestoreJobsListMember where+ parseJSON =+ Data.withObject+ "RestoreJobsListMember"+ ( \x ->+ RestoreJobsListMember'+ Prelude.<$> (x Data..:? "AccountId")+ Prelude.<*> (x Data..:? "BackupSizeInBytes")+ Prelude.<*> (x Data..:? "CompletionDate")+ Prelude.<*> (x Data..:? "CreatedResourceArn")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "ExpectedCompletionTimeMinutes")+ Prelude.<*> (x Data..:? "IamRoleArn")+ Prelude.<*> (x Data..:? "PercentDone")+ Prelude.<*> (x Data..:? "RecoveryPointArn")+ Prelude.<*> (x Data..:? "ResourceType")+ Prelude.<*> (x Data..:? "RestoreJobId")+ Prelude.<*> (x Data..:? "Status")+ Prelude.<*> (x Data..:? "StatusMessage")+ )++instance Prelude.Hashable RestoreJobsListMember where+ hashWithSalt _salt RestoreJobsListMember' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` backupSizeInBytes+ `Prelude.hashWithSalt` completionDate+ `Prelude.hashWithSalt` createdResourceArn+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` expectedCompletionTimeMinutes+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` percentDone+ `Prelude.hashWithSalt` recoveryPointArn+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` restoreJobId+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` statusMessage++instance Prelude.NFData RestoreJobsListMember where+ rnf RestoreJobsListMember' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf backupSizeInBytes+ `Prelude.seq` Prelude.rnf completionDate+ `Prelude.seq` Prelude.rnf createdResourceArn+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf expectedCompletionTimeMinutes+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf percentDone+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf restoreJobId+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf statusMessage
+ gen/Amazonka/Backup/Types/StorageClass.hs view
@@ -0,0 +1,76 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.Types.StorageClass+-- 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.Backup.Types.StorageClass+ ( StorageClass+ ( ..,+ StorageClass_COLD,+ StorageClass_DELETED,+ StorageClass_WARM+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype StorageClass = StorageClass'+ { fromStorageClass ::+ 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 StorageClass_COLD :: StorageClass+pattern StorageClass_COLD = StorageClass' "COLD"++pattern StorageClass_DELETED :: StorageClass+pattern StorageClass_DELETED = StorageClass' "DELETED"++pattern StorageClass_WARM :: StorageClass+pattern StorageClass_WARM = StorageClass' "WARM"++{-# COMPLETE+ StorageClass_COLD,+ StorageClass_DELETED,+ StorageClass_WARM,+ StorageClass'+ #-}
+ gen/Amazonka/Backup/UntagResource.hs view
@@ -0,0 +1,152 @@+{-# 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.Backup.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 a set of key-value pairs from a recovery point, backup plan, or+-- backup vault identified by an Amazon Resource Name (ARN)+module Amazonka.Backup.UntagResource+ ( -- * Creating a Request+ UntagResource (..),+ newUntagResource,++ -- * Request Lenses+ untagResource_resourceArn,+ untagResource_tagKeyList,++ -- * Destructuring the Response+ UntagResourceResponse (..),+ newUntagResourceResponse,+ )+where++import Amazonka.Backup.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'+ { -- | An ARN that uniquely identifies a resource. The format of the ARN+ -- depends on the type of the tagged resource.+ resourceArn :: Prelude.Text,+ -- | A list of keys to identify which key-value tags to remove from a+ -- resource.+ tagKeyList :: Data.Sensitive [Prelude.Text]+ }+ deriving (Prelude.Eq, 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' - An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the type of the tagged resource.+--+-- 'tagKeyList', 'untagResource_tagKeyList' - A list of keys to identify which key-value tags to remove from a+-- resource.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ =+ UntagResource'+ { resourceArn = pResourceArn_,+ tagKeyList = Prelude.mempty+ }++-- | An ARN that uniquely identifies a resource. The format of the ARN+-- depends on the type of the tagged resource.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | A list of keys to identify which key-value tags to remove from a+-- resource.+untagResource_tagKeyList :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeyList = Lens.lens (\UntagResource' {tagKeyList} -> tagKeyList) (\s@UntagResource' {} a -> s {tagKeyList = a} :: UntagResource) Prelude.. Data._Sensitive Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+ type+ AWSResponse UntagResource =+ UntagResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull UntagResourceResponse'++instance Prelude.Hashable UntagResource where+ hashWithSalt _salt UntagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` tagKeyList++instance Prelude.NFData UntagResource where+ rnf UntagResource' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tagKeyList++instance Data.ToHeaders UntagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UntagResource where+ toJSON UntagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("TagKeyList" Data..= tagKeyList)]+ )++instance Data.ToPath UntagResource where+ toPath UntagResource' {..} =+ Prelude.mconcat ["/untag/", Data.toBS resourceArn]++instance Data.ToQuery UntagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+ {+ }+ 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.+newUntagResourceResponse ::+ UntagResourceResponse+newUntagResourceResponse = UntagResourceResponse'++instance Prelude.NFData UntagResourceResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/UpdateBackupPlan.hs view
@@ -0,0 +1,258 @@+{-# 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.Backup.UpdateBackupPlan+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates an existing backup plan identified by its @backupPlanId@ with+-- the input document in JSON format. The new version is uniquely+-- identified by a @VersionId@.+module Amazonka.Backup.UpdateBackupPlan+ ( -- * Creating a Request+ UpdateBackupPlan (..),+ newUpdateBackupPlan,++ -- * Request Lenses+ updateBackupPlan_backupPlanId,+ updateBackupPlan_backupPlan,++ -- * Destructuring the Response+ UpdateBackupPlanResponse (..),+ newUpdateBackupPlanResponse,++ -- * Response Lenses+ updateBackupPlanResponse_advancedBackupSettings,+ updateBackupPlanResponse_backupPlanArn,+ updateBackupPlanResponse_backupPlanId,+ updateBackupPlanResponse_creationDate,+ updateBackupPlanResponse_versionId,+ updateBackupPlanResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newUpdateBackupPlan' smart constructor.+data UpdateBackupPlan = UpdateBackupPlan'+ { -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Text,+ -- | Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+ -- or more sets of @Rules@.+ backupPlan :: BackupPlanInput+ }+ deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateBackupPlan' 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:+--+-- 'backupPlanId', 'updateBackupPlan_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'backupPlan', 'updateBackupPlan_backupPlan' - Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+-- or more sets of @Rules@.+newUpdateBackupPlan ::+ -- | 'backupPlanId'+ Prelude.Text ->+ -- | 'backupPlan'+ BackupPlanInput ->+ UpdateBackupPlan+newUpdateBackupPlan pBackupPlanId_ pBackupPlan_ =+ UpdateBackupPlan'+ { backupPlanId = pBackupPlanId_,+ backupPlan = pBackupPlan_+ }++-- | Uniquely identifies a backup plan.+updateBackupPlan_backupPlanId :: Lens.Lens' UpdateBackupPlan Prelude.Text+updateBackupPlan_backupPlanId = Lens.lens (\UpdateBackupPlan' {backupPlanId} -> backupPlanId) (\s@UpdateBackupPlan' {} a -> s {backupPlanId = a} :: UpdateBackupPlan)++-- | Specifies the body of a backup plan. Includes a @BackupPlanName@ and one+-- or more sets of @Rules@.+updateBackupPlan_backupPlan :: Lens.Lens' UpdateBackupPlan BackupPlanInput+updateBackupPlan_backupPlan = Lens.lens (\UpdateBackupPlan' {backupPlan} -> backupPlan) (\s@UpdateBackupPlan' {} a -> s {backupPlan = a} :: UpdateBackupPlan)++instance Core.AWSRequest UpdateBackupPlan where+ type+ AWSResponse UpdateBackupPlan =+ UpdateBackupPlanResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateBackupPlanResponse'+ Prelude.<$> ( x+ Data..?> "AdvancedBackupSettings"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "BackupPlanArn")+ Prelude.<*> (x Data..?> "BackupPlanId")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "VersionId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateBackupPlan where+ hashWithSalt _salt UpdateBackupPlan' {..} =+ _salt+ `Prelude.hashWithSalt` backupPlanId+ `Prelude.hashWithSalt` backupPlan++instance Prelude.NFData UpdateBackupPlan where+ rnf UpdateBackupPlan' {..} =+ Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf backupPlan++instance Data.ToHeaders UpdateBackupPlan where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateBackupPlan where+ toJSON UpdateBackupPlan' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("BackupPlan" Data..= backupPlan)]+ )++instance Data.ToPath UpdateBackupPlan where+ toPath UpdateBackupPlan' {..} =+ Prelude.mconcat+ ["/backup/plans/", Data.toBS backupPlanId]++instance Data.ToQuery UpdateBackupPlan where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateBackupPlanResponse' smart constructor.+data UpdateBackupPlanResponse = UpdateBackupPlanResponse'+ { -- | Contains a list of @BackupOptions@ for each resource type.+ advancedBackupSettings :: Prelude.Maybe [AdvancedBackupSetting],+ -- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+ backupPlanArn :: Prelude.Maybe Prelude.Text,+ -- | Uniquely identifies a backup plan.+ backupPlanId :: Prelude.Maybe Prelude.Text,+ -- | The date and time a backup plan is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationDate@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+ -- most 1,024 bytes long. Version Ids cannot be edited.+ versionId :: 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 'UpdateBackupPlanResponse' 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:+--+-- 'advancedBackupSettings', 'updateBackupPlanResponse_advancedBackupSettings' - Contains a list of @BackupOptions@ for each resource type.+--+-- 'backupPlanArn', 'updateBackupPlanResponse_backupPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+--+-- 'backupPlanId', 'updateBackupPlanResponse_backupPlanId' - Uniquely identifies a backup plan.+--+-- 'creationDate', 'updateBackupPlanResponse_creationDate' - The date and time a backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'versionId', 'updateBackupPlanResponse_versionId' - Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version Ids cannot be edited.+--+-- 'httpStatus', 'updateBackupPlanResponse_httpStatus' - The response's http status code.+newUpdateBackupPlanResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateBackupPlanResponse+newUpdateBackupPlanResponse pHttpStatus_ =+ UpdateBackupPlanResponse'+ { advancedBackupSettings =+ Prelude.Nothing,+ backupPlanArn = Prelude.Nothing,+ backupPlanId = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ versionId = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Contains a list of @BackupOptions@ for each resource type.+updateBackupPlanResponse_advancedBackupSettings :: Lens.Lens' UpdateBackupPlanResponse (Prelude.Maybe [AdvancedBackupSetting])+updateBackupPlanResponse_advancedBackupSettings = Lens.lens (\UpdateBackupPlanResponse' {advancedBackupSettings} -> advancedBackupSettings) (\s@UpdateBackupPlanResponse' {} a -> s {advancedBackupSettings = a} :: UpdateBackupPlanResponse) Prelude.. Lens.mapping Lens.coerced++-- | An Amazon Resource Name (ARN) that uniquely identifies a backup plan;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50@.+updateBackupPlanResponse_backupPlanArn :: Lens.Lens' UpdateBackupPlanResponse (Prelude.Maybe Prelude.Text)+updateBackupPlanResponse_backupPlanArn = Lens.lens (\UpdateBackupPlanResponse' {backupPlanArn} -> backupPlanArn) (\s@UpdateBackupPlanResponse' {} a -> s {backupPlanArn = a} :: UpdateBackupPlanResponse)++-- | Uniquely identifies a backup plan.+updateBackupPlanResponse_backupPlanId :: Lens.Lens' UpdateBackupPlanResponse (Prelude.Maybe Prelude.Text)+updateBackupPlanResponse_backupPlanId = Lens.lens (\UpdateBackupPlanResponse' {backupPlanId} -> backupPlanId) (\s@UpdateBackupPlanResponse' {} a -> s {backupPlanId = a} :: UpdateBackupPlanResponse)++-- | The date and time a backup plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationDate@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+updateBackupPlanResponse_creationDate :: Lens.Lens' UpdateBackupPlanResponse (Prelude.Maybe Prelude.UTCTime)+updateBackupPlanResponse_creationDate = Lens.lens (\UpdateBackupPlanResponse' {creationDate} -> creationDate) (\s@UpdateBackupPlanResponse' {} a -> s {creationDate = a} :: UpdateBackupPlanResponse) Prelude.. Lens.mapping Data._Time++-- | Unique, randomly generated, Unicode, UTF-8 encoded strings that are at+-- most 1,024 bytes long. Version Ids cannot be edited.+updateBackupPlanResponse_versionId :: Lens.Lens' UpdateBackupPlanResponse (Prelude.Maybe Prelude.Text)+updateBackupPlanResponse_versionId = Lens.lens (\UpdateBackupPlanResponse' {versionId} -> versionId) (\s@UpdateBackupPlanResponse' {} a -> s {versionId = a} :: UpdateBackupPlanResponse)++-- | The response's http status code.+updateBackupPlanResponse_httpStatus :: Lens.Lens' UpdateBackupPlanResponse Prelude.Int+updateBackupPlanResponse_httpStatus = Lens.lens (\UpdateBackupPlanResponse' {httpStatus} -> httpStatus) (\s@UpdateBackupPlanResponse' {} a -> s {httpStatus = a} :: UpdateBackupPlanResponse)++instance Prelude.NFData UpdateBackupPlanResponse where+ rnf UpdateBackupPlanResponse' {..} =+ Prelude.rnf advancedBackupSettings+ `Prelude.seq` Prelude.rnf backupPlanArn+ `Prelude.seq` Prelude.rnf backupPlanId+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf versionId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/UpdateFramework.hs view
@@ -0,0 +1,277 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.UpdateFramework+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates an existing framework identified by its @FrameworkName@ with the+-- input document in JSON format.+module Amazonka.Backup.UpdateFramework+ ( -- * Creating a Request+ UpdateFramework (..),+ newUpdateFramework,++ -- * Request Lenses+ updateFramework_frameworkControls,+ updateFramework_frameworkDescription,+ updateFramework_idempotencyToken,+ updateFramework_frameworkName,++ -- * Destructuring the Response+ UpdateFrameworkResponse (..),+ newUpdateFrameworkResponse,++ -- * Response Lenses+ updateFrameworkResponse_creationTime,+ updateFrameworkResponse_frameworkArn,+ updateFrameworkResponse_frameworkName,+ updateFrameworkResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newUpdateFramework' smart constructor.+data UpdateFramework = UpdateFramework'+ { -- | A list of the controls that make up the framework. Each control in the+ -- list has a name, input parameters, and scope.+ frameworkControls :: Prelude.Maybe [FrameworkControl],+ -- | An optional description of the framework with a maximum 1,024+ -- characters.+ frameworkDescription :: Prelude.Maybe Prelude.Text,+ -- | A customer-chosen string that you can use to distinguish between+ -- otherwise identical calls to @UpdateFrameworkInput@. Retrying a+ -- successful request with the same idempotency token results in a success+ -- message with no action taken.+ idempotencyToken :: Prelude.Maybe Prelude.Text,+ -- | The unique name of a framework. This name is between 1 and 256+ -- characters, starting with a letter, and consisting of letters (a-z,+ -- A-Z), numbers (0-9), and underscores (_).+ frameworkName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateFramework' 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:+--+-- 'frameworkControls', 'updateFramework_frameworkControls' - A list of the controls that make up the framework. Each control in the+-- list has a name, input parameters, and scope.+--+-- 'frameworkDescription', 'updateFramework_frameworkDescription' - An optional description of the framework with a maximum 1,024+-- characters.+--+-- 'idempotencyToken', 'updateFramework_idempotencyToken' - A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @UpdateFrameworkInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+--+-- 'frameworkName', 'updateFramework_frameworkName' - The unique name of a framework. This name is between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+newUpdateFramework ::+ -- | 'frameworkName'+ Prelude.Text ->+ UpdateFramework+newUpdateFramework pFrameworkName_ =+ UpdateFramework'+ { frameworkControls =+ Prelude.Nothing,+ frameworkDescription = Prelude.Nothing,+ idempotencyToken = Prelude.Nothing,+ frameworkName = pFrameworkName_+ }++-- | A list of the controls that make up the framework. Each control in the+-- list has a name, input parameters, and scope.+updateFramework_frameworkControls :: Lens.Lens' UpdateFramework (Prelude.Maybe [FrameworkControl])+updateFramework_frameworkControls = Lens.lens (\UpdateFramework' {frameworkControls} -> frameworkControls) (\s@UpdateFramework' {} a -> s {frameworkControls = a} :: UpdateFramework) Prelude.. Lens.mapping Lens.coerced++-- | An optional description of the framework with a maximum 1,024+-- characters.+updateFramework_frameworkDescription :: Lens.Lens' UpdateFramework (Prelude.Maybe Prelude.Text)+updateFramework_frameworkDescription = Lens.lens (\UpdateFramework' {frameworkDescription} -> frameworkDescription) (\s@UpdateFramework' {} a -> s {frameworkDescription = a} :: UpdateFramework)++-- | A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @UpdateFrameworkInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+updateFramework_idempotencyToken :: Lens.Lens' UpdateFramework (Prelude.Maybe Prelude.Text)+updateFramework_idempotencyToken = Lens.lens (\UpdateFramework' {idempotencyToken} -> idempotencyToken) (\s@UpdateFramework' {} a -> s {idempotencyToken = a} :: UpdateFramework)++-- | The unique name of a framework. This name is between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+updateFramework_frameworkName :: Lens.Lens' UpdateFramework Prelude.Text+updateFramework_frameworkName = Lens.lens (\UpdateFramework' {frameworkName} -> frameworkName) (\s@UpdateFramework' {} a -> s {frameworkName = a} :: UpdateFramework)++instance Core.AWSRequest UpdateFramework where+ type+ AWSResponse UpdateFramework =+ UpdateFrameworkResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateFrameworkResponse'+ Prelude.<$> (x Data..?> "CreationTime")+ Prelude.<*> (x Data..?> "FrameworkArn")+ Prelude.<*> (x Data..?> "FrameworkName")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateFramework where+ hashWithSalt _salt UpdateFramework' {..} =+ _salt+ `Prelude.hashWithSalt` frameworkControls+ `Prelude.hashWithSalt` frameworkDescription+ `Prelude.hashWithSalt` idempotencyToken+ `Prelude.hashWithSalt` frameworkName++instance Prelude.NFData UpdateFramework where+ rnf UpdateFramework' {..} =+ Prelude.rnf frameworkControls+ `Prelude.seq` Prelude.rnf frameworkDescription+ `Prelude.seq` Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf frameworkName++instance Data.ToHeaders UpdateFramework where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateFramework where+ toJSON UpdateFramework' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("FrameworkControls" Data..=)+ Prelude.<$> frameworkControls,+ ("FrameworkDescription" Data..=)+ Prelude.<$> frameworkDescription,+ ("IdempotencyToken" Data..=)+ Prelude.<$> idempotencyToken+ ]+ )++instance Data.ToPath UpdateFramework where+ toPath UpdateFramework' {..} =+ Prelude.mconcat+ ["/audit/frameworks/", Data.toBS frameworkName]++instance Data.ToQuery UpdateFramework where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateFrameworkResponse' smart constructor.+data UpdateFrameworkResponse = UpdateFrameworkResponse'+ { -- | The date and time that a framework is created, in ISO 8601+ -- representation. The value of @CreationTime@ is accurate to milliseconds.+ -- For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July+ -- 2020 at 3:00 PM 8 hours behind UTC.+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ frameworkArn :: Prelude.Maybe Prelude.Text,+ -- | The unique name of a framework. This name is between 1 and 256+ -- characters, starting with a letter, and consisting of letters (a-z,+ -- A-Z), numbers (0-9), and underscores (_).+ frameworkName :: 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 'UpdateFrameworkResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTime', 'updateFrameworkResponse_creationTime' - The date and time that a framework is created, in ISO 8601+-- representation. The value of @CreationTime@ is accurate to milliseconds.+-- For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July+-- 2020 at 3:00 PM 8 hours behind UTC.+--+-- 'frameworkArn', 'updateFrameworkResponse_frameworkArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'frameworkName', 'updateFrameworkResponse_frameworkName' - The unique name of a framework. This name is between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+--+-- 'httpStatus', 'updateFrameworkResponse_httpStatus' - The response's http status code.+newUpdateFrameworkResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateFrameworkResponse+newUpdateFrameworkResponse pHttpStatus_ =+ UpdateFrameworkResponse'+ { creationTime =+ Prelude.Nothing,+ frameworkArn = Prelude.Nothing,+ frameworkName = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The date and time that a framework is created, in ISO 8601+-- representation. The value of @CreationTime@ is accurate to milliseconds.+-- For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July+-- 2020 at 3:00 PM 8 hours behind UTC.+updateFrameworkResponse_creationTime :: Lens.Lens' UpdateFrameworkResponse (Prelude.Maybe Prelude.UTCTime)+updateFrameworkResponse_creationTime = Lens.lens (\UpdateFrameworkResponse' {creationTime} -> creationTime) (\s@UpdateFrameworkResponse' {} a -> s {creationTime = a} :: UpdateFrameworkResponse) Prelude.. Lens.mapping Data._Time++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+updateFrameworkResponse_frameworkArn :: Lens.Lens' UpdateFrameworkResponse (Prelude.Maybe Prelude.Text)+updateFrameworkResponse_frameworkArn = Lens.lens (\UpdateFrameworkResponse' {frameworkArn} -> frameworkArn) (\s@UpdateFrameworkResponse' {} a -> s {frameworkArn = a} :: UpdateFrameworkResponse)++-- | The unique name of a framework. This name is between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+updateFrameworkResponse_frameworkName :: Lens.Lens' UpdateFrameworkResponse (Prelude.Maybe Prelude.Text)+updateFrameworkResponse_frameworkName = Lens.lens (\UpdateFrameworkResponse' {frameworkName} -> frameworkName) (\s@UpdateFrameworkResponse' {} a -> s {frameworkName = a} :: UpdateFrameworkResponse)++-- | The response's http status code.+updateFrameworkResponse_httpStatus :: Lens.Lens' UpdateFrameworkResponse Prelude.Int+updateFrameworkResponse_httpStatus = Lens.lens (\UpdateFrameworkResponse' {httpStatus} -> httpStatus) (\s@UpdateFrameworkResponse' {} a -> s {httpStatus = a} :: UpdateFrameworkResponse)++instance Prelude.NFData UpdateFrameworkResponse where+ rnf UpdateFrameworkResponse' {..} =+ Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf frameworkArn+ `Prelude.seq` Prelude.rnf frameworkName+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/UpdateGlobalSettings.hs view
@@ -0,0 +1,139 @@+{-# 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.Backup.UpdateGlobalSettings+-- 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 whether the Amazon Web Services account is opted in to+-- cross-account backup. Returns an error if the account is not an+-- Organizations management account. Use the @DescribeGlobalSettings@ API+-- to determine the current settings.+module Amazonka.Backup.UpdateGlobalSettings+ ( -- * Creating a Request+ UpdateGlobalSettings (..),+ newUpdateGlobalSettings,++ -- * Request Lenses+ updateGlobalSettings_globalSettings,++ -- * Destructuring the Response+ UpdateGlobalSettingsResponse (..),+ newUpdateGlobalSettingsResponse,+ )+where++import Amazonka.Backup.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:/ 'newUpdateGlobalSettings' smart constructor.+data UpdateGlobalSettings = UpdateGlobalSettings'+ { -- | A value for @isCrossAccountBackupEnabled@ and a Region. Example:+ -- @update-global-settings --global-settings isCrossAccountBackupEnabled=false --region us-west-2@.+ globalSettings :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateGlobalSettings' 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:+--+-- 'globalSettings', 'updateGlobalSettings_globalSettings' - A value for @isCrossAccountBackupEnabled@ and a Region. Example:+-- @update-global-settings --global-settings isCrossAccountBackupEnabled=false --region us-west-2@.+newUpdateGlobalSettings ::+ UpdateGlobalSettings+newUpdateGlobalSettings =+ UpdateGlobalSettings'+ { globalSettings =+ Prelude.Nothing+ }++-- | A value for @isCrossAccountBackupEnabled@ and a Region. Example:+-- @update-global-settings --global-settings isCrossAccountBackupEnabled=false --region us-west-2@.+updateGlobalSettings_globalSettings :: Lens.Lens' UpdateGlobalSettings (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+updateGlobalSettings_globalSettings = Lens.lens (\UpdateGlobalSettings' {globalSettings} -> globalSettings) (\s@UpdateGlobalSettings' {} a -> s {globalSettings = a} :: UpdateGlobalSettings) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSRequest UpdateGlobalSettings where+ type+ AWSResponse UpdateGlobalSettings =+ UpdateGlobalSettingsResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveNull UpdateGlobalSettingsResponse'++instance Prelude.Hashable UpdateGlobalSettings where+ hashWithSalt _salt UpdateGlobalSettings' {..} =+ _salt `Prelude.hashWithSalt` globalSettings++instance Prelude.NFData UpdateGlobalSettings where+ rnf UpdateGlobalSettings' {..} =+ Prelude.rnf globalSettings++instance Data.ToHeaders UpdateGlobalSettings where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateGlobalSettings where+ toJSON UpdateGlobalSettings' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("GlobalSettings" Data..=)+ Prelude.<$> globalSettings+ ]+ )++instance Data.ToPath UpdateGlobalSettings where+ toPath = Prelude.const "/global-settings"++instance Data.ToQuery UpdateGlobalSettings where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateGlobalSettingsResponse' smart constructor.+data UpdateGlobalSettingsResponse = UpdateGlobalSettingsResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateGlobalSettingsResponse' 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.+newUpdateGlobalSettingsResponse ::+ UpdateGlobalSettingsResponse+newUpdateGlobalSettingsResponse =+ UpdateGlobalSettingsResponse'++instance Prelude.NFData UpdateGlobalSettingsResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/UpdateRecoveryPointLifecycle.hs view
@@ -0,0 +1,352 @@+{-# 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.Backup.UpdateRecoveryPointLifecycle+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets the transition lifecycle of a recovery point.+--+-- The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+--+-- This operation does not support continuous backups.+module Amazonka.Backup.UpdateRecoveryPointLifecycle+ ( -- * Creating a Request+ UpdateRecoveryPointLifecycle (..),+ newUpdateRecoveryPointLifecycle,++ -- * Request Lenses+ updateRecoveryPointLifecycle_lifecycle,+ updateRecoveryPointLifecycle_backupVaultName,+ updateRecoveryPointLifecycle_recoveryPointArn,++ -- * Destructuring the Response+ UpdateRecoveryPointLifecycleResponse (..),+ newUpdateRecoveryPointLifecycleResponse,++ -- * Response Lenses+ updateRecoveryPointLifecycleResponse_backupVaultArn,+ updateRecoveryPointLifecycleResponse_calculatedLifecycle,+ updateRecoveryPointLifecycleResponse_lifecycle,+ updateRecoveryPointLifecycleResponse_recoveryPointArn,+ updateRecoveryPointLifecycleResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newUpdateRecoveryPointLifecycle' smart constructor.+data UpdateRecoveryPointLifecycle = UpdateRecoveryPointLifecycle'+ { -- | The lifecycle defines when a protected resource is transitioned to cold+ -- storage and when it expires. Backup transitions and expires backups+ -- automatically according to the lifecycle that you define.+ --+ -- Backups transitioned to cold storage must be stored in cold storage for+ -- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+ -- greater than the “transition to cold after days” setting. The+ -- “transition to cold after days” setting cannot be changed after a backup+ -- has been transitioned to cold.+ lifecycle :: Prelude.Maybe Lifecycle,+ -- | The name of a logical container where backups are stored. Backup vaults+ -- are identified by names that are unique to the account used to create+ -- them and the Amazon Web Services Region where they are created. They+ -- consist of lowercase letters, numbers, and hyphens.+ backupVaultName :: Prelude.Text,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateRecoveryPointLifecycle' 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:+--+-- 'lifecycle', 'updateRecoveryPointLifecycle_lifecycle' - The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- 'backupVaultName', 'updateRecoveryPointLifecycle_backupVaultName' - The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+--+-- 'recoveryPointArn', 'updateRecoveryPointLifecycle_recoveryPointArn' - An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+newUpdateRecoveryPointLifecycle ::+ -- | 'backupVaultName'+ Prelude.Text ->+ -- | 'recoveryPointArn'+ Prelude.Text ->+ UpdateRecoveryPointLifecycle+newUpdateRecoveryPointLifecycle+ pBackupVaultName_+ pRecoveryPointArn_ =+ UpdateRecoveryPointLifecycle'+ { lifecycle =+ Prelude.Nothing,+ backupVaultName = pBackupVaultName_,+ recoveryPointArn = pRecoveryPointArn_+ }++-- | The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+updateRecoveryPointLifecycle_lifecycle :: Lens.Lens' UpdateRecoveryPointLifecycle (Prelude.Maybe Lifecycle)+updateRecoveryPointLifecycle_lifecycle = Lens.lens (\UpdateRecoveryPointLifecycle' {lifecycle} -> lifecycle) (\s@UpdateRecoveryPointLifecycle' {} a -> s {lifecycle = a} :: UpdateRecoveryPointLifecycle)++-- | The name of a logical container where backups are stored. Backup vaults+-- are identified by names that are unique to the account used to create+-- them and the Amazon Web Services Region where they are created. They+-- consist of lowercase letters, numbers, and hyphens.+updateRecoveryPointLifecycle_backupVaultName :: Lens.Lens' UpdateRecoveryPointLifecycle Prelude.Text+updateRecoveryPointLifecycle_backupVaultName = Lens.lens (\UpdateRecoveryPointLifecycle' {backupVaultName} -> backupVaultName) (\s@UpdateRecoveryPointLifecycle' {} a -> s {backupVaultName = a} :: UpdateRecoveryPointLifecycle)++-- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+updateRecoveryPointLifecycle_recoveryPointArn :: Lens.Lens' UpdateRecoveryPointLifecycle Prelude.Text+updateRecoveryPointLifecycle_recoveryPointArn = Lens.lens (\UpdateRecoveryPointLifecycle' {recoveryPointArn} -> recoveryPointArn) (\s@UpdateRecoveryPointLifecycle' {} a -> s {recoveryPointArn = a} :: UpdateRecoveryPointLifecycle)++instance Core.AWSRequest UpdateRecoveryPointLifecycle where+ type+ AWSResponse UpdateRecoveryPointLifecycle =+ UpdateRecoveryPointLifecycleResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateRecoveryPointLifecycleResponse'+ Prelude.<$> (x Data..?> "BackupVaultArn")+ Prelude.<*> (x Data..?> "CalculatedLifecycle")+ Prelude.<*> (x Data..?> "Lifecycle")+ Prelude.<*> (x Data..?> "RecoveryPointArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ UpdateRecoveryPointLifecycle+ where+ hashWithSalt _salt UpdateRecoveryPointLifecycle' {..} =+ _salt+ `Prelude.hashWithSalt` lifecycle+ `Prelude.hashWithSalt` backupVaultName+ `Prelude.hashWithSalt` recoveryPointArn++instance Prelude.NFData UpdateRecoveryPointLifecycle where+ rnf UpdateRecoveryPointLifecycle' {..} =+ Prelude.rnf lifecycle+ `Prelude.seq` Prelude.rnf backupVaultName+ `Prelude.seq` Prelude.rnf recoveryPointArn++instance Data.ToHeaders UpdateRecoveryPointLifecycle where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateRecoveryPointLifecycle where+ toJSON UpdateRecoveryPointLifecycle' {..} =+ Data.object+ ( Prelude.catMaybes+ [("Lifecycle" Data..=) Prelude.<$> lifecycle]+ )++instance Data.ToPath UpdateRecoveryPointLifecycle where+ toPath UpdateRecoveryPointLifecycle' {..} =+ Prelude.mconcat+ [ "/backup-vaults/",+ Data.toBS backupVaultName,+ "/recovery-points/",+ Data.toBS recoveryPointArn+ ]++instance Data.ToQuery UpdateRecoveryPointLifecycle where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateRecoveryPointLifecycleResponse' smart constructor.+data UpdateRecoveryPointLifecycleResponse = UpdateRecoveryPointLifecycleResponse'+ { -- | An ARN that uniquely identifies a backup vault; for example,+ -- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+ backupVaultArn :: Prelude.Maybe Prelude.Text,+ -- | A @CalculatedLifecycle@ object containing @DeleteAt@ and+ -- @MoveToColdStorageAt@ timestamps.+ calculatedLifecycle :: Prelude.Maybe CalculatedLifecycle,+ -- | The lifecycle defines when a protected resource is transitioned to cold+ -- storage and when it expires. Backup transitions and expires backups+ -- automatically according to the lifecycle that you define.+ --+ -- Backups transitioned to cold storage must be stored in cold storage for+ -- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+ -- greater than the “transition to cold after days” setting. The+ -- “transition to cold after days” setting cannot be changed after a backup+ -- has been transitioned to cold.+ --+ -- Resource types that are able to be transitioned to cold storage are+ -- listed in the \"Lifecycle to cold storage\" section of the+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+ -- table. Backup ignores this expression for other resource types.+ lifecycle :: Prelude.Maybe Lifecycle,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+ -- for example,+ -- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+ recoveryPointArn :: 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 'UpdateRecoveryPointLifecycleResponse' 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:+--+-- 'backupVaultArn', 'updateRecoveryPointLifecycleResponse_backupVaultArn' - An ARN that uniquely identifies a backup vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+--+-- 'calculatedLifecycle', 'updateRecoveryPointLifecycleResponse_calculatedLifecycle' - A @CalculatedLifecycle@ object containing @DeleteAt@ and+-- @MoveToColdStorageAt@ timestamps.+--+-- 'lifecycle', 'updateRecoveryPointLifecycleResponse_lifecycle' - The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+--+-- 'recoveryPointArn', 'updateRecoveryPointLifecycleResponse_recoveryPointArn' - An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+--+-- 'httpStatus', 'updateRecoveryPointLifecycleResponse_httpStatus' - The response's http status code.+newUpdateRecoveryPointLifecycleResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateRecoveryPointLifecycleResponse+newUpdateRecoveryPointLifecycleResponse pHttpStatus_ =+ UpdateRecoveryPointLifecycleResponse'+ { backupVaultArn =+ Prelude.Nothing,+ calculatedLifecycle = Prelude.Nothing,+ lifecycle = Prelude.Nothing,+ recoveryPointArn = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An ARN that uniquely identifies a backup vault; for example,+-- @arn:aws:backup:us-east-1:123456789012:vault:aBackupVault@.+updateRecoveryPointLifecycleResponse_backupVaultArn :: Lens.Lens' UpdateRecoveryPointLifecycleResponse (Prelude.Maybe Prelude.Text)+updateRecoveryPointLifecycleResponse_backupVaultArn = Lens.lens (\UpdateRecoveryPointLifecycleResponse' {backupVaultArn} -> backupVaultArn) (\s@UpdateRecoveryPointLifecycleResponse' {} a -> s {backupVaultArn = a} :: UpdateRecoveryPointLifecycleResponse)++-- | A @CalculatedLifecycle@ object containing @DeleteAt@ and+-- @MoveToColdStorageAt@ timestamps.+updateRecoveryPointLifecycleResponse_calculatedLifecycle :: Lens.Lens' UpdateRecoveryPointLifecycleResponse (Prelude.Maybe CalculatedLifecycle)+updateRecoveryPointLifecycleResponse_calculatedLifecycle = Lens.lens (\UpdateRecoveryPointLifecycleResponse' {calculatedLifecycle} -> calculatedLifecycle) (\s@UpdateRecoveryPointLifecycleResponse' {} a -> s {calculatedLifecycle = a} :: UpdateRecoveryPointLifecycleResponse)++-- | The lifecycle defines when a protected resource is transitioned to cold+-- storage and when it expires. Backup transitions and expires backups+-- automatically according to the lifecycle that you define.+--+-- Backups transitioned to cold storage must be stored in cold storage for+-- a minimum of 90 days. Therefore, the “retention” setting must be 90 days+-- greater than the “transition to cold after days” setting. The+-- “transition to cold after days” setting cannot be changed after a backup+-- has been transitioned to cold.+--+-- Resource types that are able to be transitioned to cold storage are+-- listed in the \"Lifecycle to cold storage\" section of the+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-by-resource Feature availability by resource>+-- table. Backup ignores this expression for other resource types.+updateRecoveryPointLifecycleResponse_lifecycle :: Lens.Lens' UpdateRecoveryPointLifecycleResponse (Prelude.Maybe Lifecycle)+updateRecoveryPointLifecycleResponse_lifecycle = Lens.lens (\UpdateRecoveryPointLifecycleResponse' {lifecycle} -> lifecycle) (\s@UpdateRecoveryPointLifecycleResponse' {} a -> s {lifecycle = a} :: UpdateRecoveryPointLifecycleResponse)++-- | An Amazon Resource Name (ARN) that uniquely identifies a recovery point;+-- for example,+-- @arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45@.+updateRecoveryPointLifecycleResponse_recoveryPointArn :: Lens.Lens' UpdateRecoveryPointLifecycleResponse (Prelude.Maybe Prelude.Text)+updateRecoveryPointLifecycleResponse_recoveryPointArn = Lens.lens (\UpdateRecoveryPointLifecycleResponse' {recoveryPointArn} -> recoveryPointArn) (\s@UpdateRecoveryPointLifecycleResponse' {} a -> s {recoveryPointArn = a} :: UpdateRecoveryPointLifecycleResponse)++-- | The response's http status code.+updateRecoveryPointLifecycleResponse_httpStatus :: Lens.Lens' UpdateRecoveryPointLifecycleResponse Prelude.Int+updateRecoveryPointLifecycleResponse_httpStatus = Lens.lens (\UpdateRecoveryPointLifecycleResponse' {httpStatus} -> httpStatus) (\s@UpdateRecoveryPointLifecycleResponse' {} a -> s {httpStatus = a} :: UpdateRecoveryPointLifecycleResponse)++instance+ Prelude.NFData+ UpdateRecoveryPointLifecycleResponse+ where+ rnf UpdateRecoveryPointLifecycleResponse' {..} =+ Prelude.rnf backupVaultArn+ `Prelude.seq` Prelude.rnf calculatedLifecycle+ `Prelude.seq` Prelude.rnf lifecycle+ `Prelude.seq` Prelude.rnf recoveryPointArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/UpdateRegionSettings.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.Backup.UpdateRegionSettings+-- 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 current service opt-in settings for the Region. If+-- service-opt-in is enabled for a service, Backup tries to protect that+-- service\'s resources in this Region, when the resource is included in an+-- on-demand backup or scheduled backup plan. Otherwise, Backup does not+-- try to protect that service\'s resources in this Region. Use the+-- @DescribeRegionSettings@ API to determine the resource types that are+-- supported.+module Amazonka.Backup.UpdateRegionSettings+ ( -- * Creating a Request+ UpdateRegionSettings (..),+ newUpdateRegionSettings,++ -- * Request Lenses+ updateRegionSettings_resourceTypeManagementPreference,+ updateRegionSettings_resourceTypeOptInPreference,++ -- * Destructuring the Response+ UpdateRegionSettingsResponse (..),+ newUpdateRegionSettingsResponse,+ )+where++import Amazonka.Backup.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:/ 'newUpdateRegionSettings' smart constructor.+data UpdateRegionSettings = UpdateRegionSettings'+ { -- | Enables or disables full Backup management of backups for a resource+ -- type. To enable full Backup management for DynamoDB along with+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html Backup\'s advanced DynamoDB backup features>,+ -- follow the procedure to+ -- <https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html#advanced-ddb-backup-enable-cli enable advanced DynamoDB backup programmatically>.+ resourceTypeManagementPreference :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool),+ -- | Updates the list of services along with the opt-in preferences for the+ -- Region.+ resourceTypeOptInPreference :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateRegionSettings' 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:+--+-- 'resourceTypeManagementPreference', 'updateRegionSettings_resourceTypeManagementPreference' - Enables or disables full Backup management of backups for a resource+-- type. To enable full Backup management for DynamoDB along with+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html Backup\'s advanced DynamoDB backup features>,+-- follow the procedure to+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html#advanced-ddb-backup-enable-cli enable advanced DynamoDB backup programmatically>.+--+-- 'resourceTypeOptInPreference', 'updateRegionSettings_resourceTypeOptInPreference' - Updates the list of services along with the opt-in preferences for the+-- Region.+newUpdateRegionSettings ::+ UpdateRegionSettings+newUpdateRegionSettings =+ UpdateRegionSettings'+ { resourceTypeManagementPreference =+ Prelude.Nothing,+ resourceTypeOptInPreference = Prelude.Nothing+ }++-- | Enables or disables full Backup management of backups for a resource+-- type. To enable full Backup management for DynamoDB along with+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html Backup\'s advanced DynamoDB backup features>,+-- follow the procedure to+-- <https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html#advanced-ddb-backup-enable-cli enable advanced DynamoDB backup programmatically>.+updateRegionSettings_resourceTypeManagementPreference :: Lens.Lens' UpdateRegionSettings (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool))+updateRegionSettings_resourceTypeManagementPreference = Lens.lens (\UpdateRegionSettings' {resourceTypeManagementPreference} -> resourceTypeManagementPreference) (\s@UpdateRegionSettings' {} a -> s {resourceTypeManagementPreference = a} :: UpdateRegionSettings) Prelude.. Lens.mapping Lens.coerced++-- | Updates the list of services along with the opt-in preferences for the+-- Region.+updateRegionSettings_resourceTypeOptInPreference :: Lens.Lens' UpdateRegionSettings (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Bool))+updateRegionSettings_resourceTypeOptInPreference = Lens.lens (\UpdateRegionSettings' {resourceTypeOptInPreference} -> resourceTypeOptInPreference) (\s@UpdateRegionSettings' {} a -> s {resourceTypeOptInPreference = a} :: UpdateRegionSettings) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSRequest UpdateRegionSettings where+ type+ AWSResponse UpdateRegionSettings =+ UpdateRegionSettingsResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveNull UpdateRegionSettingsResponse'++instance Prelude.Hashable UpdateRegionSettings where+ hashWithSalt _salt UpdateRegionSettings' {..} =+ _salt+ `Prelude.hashWithSalt` resourceTypeManagementPreference+ `Prelude.hashWithSalt` resourceTypeOptInPreference++instance Prelude.NFData UpdateRegionSettings where+ rnf UpdateRegionSettings' {..} =+ Prelude.rnf resourceTypeManagementPreference+ `Prelude.seq` Prelude.rnf resourceTypeOptInPreference++instance Data.ToHeaders UpdateRegionSettings where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateRegionSettings where+ toJSON UpdateRegionSettings' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ResourceTypeManagementPreference" Data..=)+ Prelude.<$> resourceTypeManagementPreference,+ ("ResourceTypeOptInPreference" Data..=)+ Prelude.<$> resourceTypeOptInPreference+ ]+ )++instance Data.ToPath UpdateRegionSettings where+ toPath = Prelude.const "/account-settings"++instance Data.ToQuery UpdateRegionSettings where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateRegionSettingsResponse' smart constructor.+data UpdateRegionSettingsResponse = UpdateRegionSettingsResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateRegionSettingsResponse' 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.+newUpdateRegionSettingsResponse ::+ UpdateRegionSettingsResponse+newUpdateRegionSettingsResponse =+ UpdateRegionSettingsResponse'++instance Prelude.NFData UpdateRegionSettingsResponse where+ rnf _ = ()
+ gen/Amazonka/Backup/UpdateReportPlan.hs view
@@ -0,0 +1,308 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Backup.UpdateReportPlan+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates an existing report plan identified by its @ReportPlanName@ with+-- the input document in JSON format.+module Amazonka.Backup.UpdateReportPlan+ ( -- * Creating a Request+ UpdateReportPlan (..),+ newUpdateReportPlan,++ -- * Request Lenses+ updateReportPlan_idempotencyToken,+ updateReportPlan_reportDeliveryChannel,+ updateReportPlan_reportPlanDescription,+ updateReportPlan_reportSetting,+ updateReportPlan_reportPlanName,++ -- * Destructuring the Response+ UpdateReportPlanResponse (..),+ newUpdateReportPlanResponse,++ -- * Response Lenses+ updateReportPlanResponse_creationTime,+ updateReportPlanResponse_reportPlanArn,+ updateReportPlanResponse_reportPlanName,+ updateReportPlanResponse_httpStatus,+ )+where++import Amazonka.Backup.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:/ 'newUpdateReportPlan' smart constructor.+data UpdateReportPlan = UpdateReportPlan'+ { -- | A customer-chosen string that you can use to distinguish between+ -- otherwise identical calls to @UpdateReportPlanInput@. Retrying a+ -- successful request with the same idempotency token results in a success+ -- message with no action taken.+ idempotencyToken :: Prelude.Maybe Prelude.Text,+ -- | A structure that contains information about where to deliver your+ -- reports, specifically your Amazon S3 bucket name, S3 key prefix, and the+ -- formats of your reports.+ reportDeliveryChannel :: Prelude.Maybe ReportDeliveryChannel,+ -- | An optional description of the report plan with a maximum 1,024+ -- characters.+ reportPlanDescription :: Prelude.Maybe Prelude.Text,+ -- | Identifies the report template for the report. Reports are built using a+ -- report template. The report templates are:+ --+ -- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+ --+ -- If the report template is @RESOURCE_COMPLIANCE_REPORT@ or+ -- @CONTROL_COMPLIANCE_REPORT@, this API resource also describes the report+ -- coverage by Amazon Web Services Regions and frameworks.+ reportSetting :: Prelude.Maybe ReportSetting,+ -- | The unique name of the report plan. This name is between 1 and 256+ -- characters, starting with a letter, and consisting of letters (a-z,+ -- A-Z), numbers (0-9), and underscores (_).+ reportPlanName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateReportPlan' 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:+--+-- 'idempotencyToken', 'updateReportPlan_idempotencyToken' - A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @UpdateReportPlanInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+--+-- 'reportDeliveryChannel', 'updateReportPlan_reportDeliveryChannel' - A structure that contains information about where to deliver your+-- reports, specifically your Amazon S3 bucket name, S3 key prefix, and the+-- formats of your reports.+--+-- 'reportPlanDescription', 'updateReportPlan_reportPlanDescription' - An optional description of the report plan with a maximum 1,024+-- characters.+--+-- 'reportSetting', 'updateReportPlan_reportSetting' - Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+--+-- If the report template is @RESOURCE_COMPLIANCE_REPORT@ or+-- @CONTROL_COMPLIANCE_REPORT@, this API resource also describes the report+-- coverage by Amazon Web Services Regions and frameworks.+--+-- 'reportPlanName', 'updateReportPlan_reportPlanName' - The unique name of the report plan. This name is between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+newUpdateReportPlan ::+ -- | 'reportPlanName'+ Prelude.Text ->+ UpdateReportPlan+newUpdateReportPlan pReportPlanName_ =+ UpdateReportPlan'+ { idempotencyToken =+ Prelude.Nothing,+ reportDeliveryChannel = Prelude.Nothing,+ reportPlanDescription = Prelude.Nothing,+ reportSetting = Prelude.Nothing,+ reportPlanName = pReportPlanName_+ }++-- | A customer-chosen string that you can use to distinguish between+-- otherwise identical calls to @UpdateReportPlanInput@. Retrying a+-- successful request with the same idempotency token results in a success+-- message with no action taken.+updateReportPlan_idempotencyToken :: Lens.Lens' UpdateReportPlan (Prelude.Maybe Prelude.Text)+updateReportPlan_idempotencyToken = Lens.lens (\UpdateReportPlan' {idempotencyToken} -> idempotencyToken) (\s@UpdateReportPlan' {} a -> s {idempotencyToken = a} :: UpdateReportPlan)++-- | A structure that contains information about where to deliver your+-- reports, specifically your Amazon S3 bucket name, S3 key prefix, and the+-- formats of your reports.+updateReportPlan_reportDeliveryChannel :: Lens.Lens' UpdateReportPlan (Prelude.Maybe ReportDeliveryChannel)+updateReportPlan_reportDeliveryChannel = Lens.lens (\UpdateReportPlan' {reportDeliveryChannel} -> reportDeliveryChannel) (\s@UpdateReportPlan' {} a -> s {reportDeliveryChannel = a} :: UpdateReportPlan)++-- | An optional description of the report plan with a maximum 1,024+-- characters.+updateReportPlan_reportPlanDescription :: Lens.Lens' UpdateReportPlan (Prelude.Maybe Prelude.Text)+updateReportPlan_reportPlanDescription = Lens.lens (\UpdateReportPlan' {reportPlanDescription} -> reportPlanDescription) (\s@UpdateReportPlan' {} a -> s {reportPlanDescription = a} :: UpdateReportPlan)++-- | Identifies the report template for the report. Reports are built using a+-- report template. The report templates are:+--+-- @RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT@+--+-- If the report template is @RESOURCE_COMPLIANCE_REPORT@ or+-- @CONTROL_COMPLIANCE_REPORT@, this API resource also describes the report+-- coverage by Amazon Web Services Regions and frameworks.+updateReportPlan_reportSetting :: Lens.Lens' UpdateReportPlan (Prelude.Maybe ReportSetting)+updateReportPlan_reportSetting = Lens.lens (\UpdateReportPlan' {reportSetting} -> reportSetting) (\s@UpdateReportPlan' {} a -> s {reportSetting = a} :: UpdateReportPlan)++-- | The unique name of the report plan. This name is between 1 and 256+-- characters, starting with a letter, and consisting of letters (a-z,+-- A-Z), numbers (0-9), and underscores (_).+updateReportPlan_reportPlanName :: Lens.Lens' UpdateReportPlan Prelude.Text+updateReportPlan_reportPlanName = Lens.lens (\UpdateReportPlan' {reportPlanName} -> reportPlanName) (\s@UpdateReportPlan' {} a -> s {reportPlanName = a} :: UpdateReportPlan)++instance Core.AWSRequest UpdateReportPlan where+ type+ AWSResponse UpdateReportPlan =+ UpdateReportPlanResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateReportPlanResponse'+ Prelude.<$> (x Data..?> "CreationTime")+ Prelude.<*> (x Data..?> "ReportPlanArn")+ Prelude.<*> (x Data..?> "ReportPlanName")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateReportPlan where+ hashWithSalt _salt UpdateReportPlan' {..} =+ _salt+ `Prelude.hashWithSalt` idempotencyToken+ `Prelude.hashWithSalt` reportDeliveryChannel+ `Prelude.hashWithSalt` reportPlanDescription+ `Prelude.hashWithSalt` reportSetting+ `Prelude.hashWithSalt` reportPlanName++instance Prelude.NFData UpdateReportPlan where+ rnf UpdateReportPlan' {..} =+ Prelude.rnf idempotencyToken+ `Prelude.seq` Prelude.rnf reportDeliveryChannel+ `Prelude.seq` Prelude.rnf reportPlanDescription+ `Prelude.seq` Prelude.rnf reportSetting+ `Prelude.seq` Prelude.rnf reportPlanName++instance Data.ToHeaders UpdateReportPlan where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateReportPlan where+ toJSON UpdateReportPlan' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("IdempotencyToken" Data..=)+ Prelude.<$> idempotencyToken,+ ("ReportDeliveryChannel" Data..=)+ Prelude.<$> reportDeliveryChannel,+ ("ReportPlanDescription" Data..=)+ Prelude.<$> reportPlanDescription,+ ("ReportSetting" Data..=) Prelude.<$> reportSetting+ ]+ )++instance Data.ToPath UpdateReportPlan where+ toPath UpdateReportPlan' {..} =+ Prelude.mconcat+ ["/audit/report-plans/", Data.toBS reportPlanName]++instance Data.ToQuery UpdateReportPlan where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateReportPlanResponse' smart constructor.+data UpdateReportPlanResponse = UpdateReportPlanResponse'+ { -- | The date and time that a report plan is created, in Unix format and+ -- Coordinated Universal Time (UTC). The value of @CreationTime@ is+ -- accurate to milliseconds. For example, the value 1516925490.087+ -- represents Friday, January 26, 2018 12:11:30.087 AM.+ creationTime :: Prelude.Maybe Data.POSIX,+ -- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+ -- format of the ARN depends on the resource type.+ reportPlanArn :: Prelude.Maybe Prelude.Text,+ -- | The unique name of the report plan.+ reportPlanName :: 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 'UpdateReportPlanResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTime', 'updateReportPlanResponse_creationTime' - The date and time that a report plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+--+-- 'reportPlanArn', 'updateReportPlanResponse_reportPlanArn' - An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+--+-- 'reportPlanName', 'updateReportPlanResponse_reportPlanName' - The unique name of the report plan.+--+-- 'httpStatus', 'updateReportPlanResponse_httpStatus' - The response's http status code.+newUpdateReportPlanResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateReportPlanResponse+newUpdateReportPlanResponse pHttpStatus_ =+ UpdateReportPlanResponse'+ { creationTime =+ Prelude.Nothing,+ reportPlanArn = Prelude.Nothing,+ reportPlanName = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The date and time that a report plan is created, in Unix format and+-- Coordinated Universal Time (UTC). The value of @CreationTime@ is+-- accurate to milliseconds. For example, the value 1516925490.087+-- represents Friday, January 26, 2018 12:11:30.087 AM.+updateReportPlanResponse_creationTime :: Lens.Lens' UpdateReportPlanResponse (Prelude.Maybe Prelude.UTCTime)+updateReportPlanResponse_creationTime = Lens.lens (\UpdateReportPlanResponse' {creationTime} -> creationTime) (\s@UpdateReportPlanResponse' {} a -> s {creationTime = a} :: UpdateReportPlanResponse) Prelude.. Lens.mapping Data._Time++-- | An Amazon Resource Name (ARN) that uniquely identifies a resource. The+-- format of the ARN depends on the resource type.+updateReportPlanResponse_reportPlanArn :: Lens.Lens' UpdateReportPlanResponse (Prelude.Maybe Prelude.Text)+updateReportPlanResponse_reportPlanArn = Lens.lens (\UpdateReportPlanResponse' {reportPlanArn} -> reportPlanArn) (\s@UpdateReportPlanResponse' {} a -> s {reportPlanArn = a} :: UpdateReportPlanResponse)++-- | The unique name of the report plan.+updateReportPlanResponse_reportPlanName :: Lens.Lens' UpdateReportPlanResponse (Prelude.Maybe Prelude.Text)+updateReportPlanResponse_reportPlanName = Lens.lens (\UpdateReportPlanResponse' {reportPlanName} -> reportPlanName) (\s@UpdateReportPlanResponse' {} a -> s {reportPlanName = a} :: UpdateReportPlanResponse)++-- | The response's http status code.+updateReportPlanResponse_httpStatus :: Lens.Lens' UpdateReportPlanResponse Prelude.Int+updateReportPlanResponse_httpStatus = Lens.lens (\UpdateReportPlanResponse' {httpStatus} -> httpStatus) (\s@UpdateReportPlanResponse' {} a -> s {httpStatus = a} :: UpdateReportPlanResponse)++instance Prelude.NFData UpdateReportPlanResponse where+ rnf UpdateReportPlanResponse' {..} =+ Prelude.rnf creationTime+ `Prelude.seq` Prelude.rnf reportPlanArn+ `Prelude.seq` Prelude.rnf reportPlanName+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Backup/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.Backup.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.Backup.Waiters where++import Amazonka.Backup.Lens+import Amazonka.Backup.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.Backup+import Test.Amazonka.Backup.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "Backup"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Backup.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.Backup+-- 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.Backup+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/Backup/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.Backup.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.Backup.Internal where
+ test/Test/Amazonka/Gen/Backup.hs view
@@ -0,0 +1,1478 @@+{-# 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.Backup+-- 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.Backup where++import Amazonka.Backup+import qualified Data.Proxy as Proxy+import Test.Amazonka.Backup.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"+-- [ requestCancelLegalHold $+-- newCancelLegalHold+--+-- , requestCreateBackupPlan $+-- newCreateBackupPlan+--+-- , requestCreateBackupSelection $+-- newCreateBackupSelection+--+-- , requestCreateBackupVault $+-- newCreateBackupVault+--+-- , requestCreateFramework $+-- newCreateFramework+--+-- , requestCreateLegalHold $+-- newCreateLegalHold+--+-- , requestCreateReportPlan $+-- newCreateReportPlan+--+-- , requestDeleteBackupPlan $+-- newDeleteBackupPlan+--+-- , requestDeleteBackupSelection $+-- newDeleteBackupSelection+--+-- , requestDeleteBackupVault $+-- newDeleteBackupVault+--+-- , requestDeleteBackupVaultAccessPolicy $+-- newDeleteBackupVaultAccessPolicy+--+-- , requestDeleteBackupVaultLockConfiguration $+-- newDeleteBackupVaultLockConfiguration+--+-- , requestDeleteBackupVaultNotifications $+-- newDeleteBackupVaultNotifications+--+-- , requestDeleteFramework $+-- newDeleteFramework+--+-- , requestDeleteRecoveryPoint $+-- newDeleteRecoveryPoint+--+-- , requestDeleteReportPlan $+-- newDeleteReportPlan+--+-- , requestDescribeBackupJob $+-- newDescribeBackupJob+--+-- , requestDescribeBackupVault $+-- newDescribeBackupVault+--+-- , requestDescribeCopyJob $+-- newDescribeCopyJob+--+-- , requestDescribeFramework $+-- newDescribeFramework+--+-- , requestDescribeGlobalSettings $+-- newDescribeGlobalSettings+--+-- , requestDescribeProtectedResource $+-- newDescribeProtectedResource+--+-- , requestDescribeRecoveryPoint $+-- newDescribeRecoveryPoint+--+-- , requestDescribeRegionSettings $+-- newDescribeRegionSettings+--+-- , requestDescribeReportJob $+-- newDescribeReportJob+--+-- , requestDescribeReportPlan $+-- newDescribeReportPlan+--+-- , requestDescribeRestoreJob $+-- newDescribeRestoreJob+--+-- , requestDisassociateRecoveryPoint $+-- newDisassociateRecoveryPoint+--+-- , requestDisassociateRecoveryPointFromParent $+-- newDisassociateRecoveryPointFromParent+--+-- , requestExportBackupPlanTemplate $+-- newExportBackupPlanTemplate+--+-- , requestGetBackupPlan $+-- newGetBackupPlan+--+-- , requestGetBackupPlanFromJSON $+-- newGetBackupPlanFromJSON+--+-- , requestGetBackupPlanFromTemplate $+-- newGetBackupPlanFromTemplate+--+-- , requestGetBackupSelection $+-- newGetBackupSelection+--+-- , requestGetBackupVaultAccessPolicy $+-- newGetBackupVaultAccessPolicy+--+-- , requestGetBackupVaultNotifications $+-- newGetBackupVaultNotifications+--+-- , requestGetLegalHold $+-- newGetLegalHold+--+-- , requestGetRecoveryPointRestoreMetadata $+-- newGetRecoveryPointRestoreMetadata+--+-- , requestGetSupportedResourceTypes $+-- newGetSupportedResourceTypes+--+-- , requestListBackupJobs $+-- newListBackupJobs+--+-- , requestListBackupPlanTemplates $+-- newListBackupPlanTemplates+--+-- , requestListBackupPlanVersions $+-- newListBackupPlanVersions+--+-- , requestListBackupPlans $+-- newListBackupPlans+--+-- , requestListBackupSelections $+-- newListBackupSelections+--+-- , requestListBackupVaults $+-- newListBackupVaults+--+-- , requestListCopyJobs $+-- newListCopyJobs+--+-- , requestListFrameworks $+-- newListFrameworks+--+-- , requestListLegalHolds $+-- newListLegalHolds+--+-- , requestListProtectedResources $+-- newListProtectedResources+--+-- , requestListRecoveryPointsByBackupVault $+-- newListRecoveryPointsByBackupVault+--+-- , requestListRecoveryPointsByLegalHold $+-- newListRecoveryPointsByLegalHold+--+-- , requestListRecoveryPointsByResource $+-- newListRecoveryPointsByResource+--+-- , requestListReportJobs $+-- newListReportJobs+--+-- , requestListReportPlans $+-- newListReportPlans+--+-- , requestListRestoreJobs $+-- newListRestoreJobs+--+-- , requestListTags $+-- newListTags+--+-- , requestPutBackupVaultAccessPolicy $+-- newPutBackupVaultAccessPolicy+--+-- , requestPutBackupVaultLockConfiguration $+-- newPutBackupVaultLockConfiguration+--+-- , requestPutBackupVaultNotifications $+-- newPutBackupVaultNotifications+--+-- , requestStartBackupJob $+-- newStartBackupJob+--+-- , requestStartCopyJob $+-- newStartCopyJob+--+-- , requestStartReportJob $+-- newStartReportJob+--+-- , requestStartRestoreJob $+-- newStartRestoreJob+--+-- , requestStopBackupJob $+-- newStopBackupJob+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateBackupPlan $+-- newUpdateBackupPlan+--+-- , requestUpdateFramework $+-- newUpdateFramework+--+-- , requestUpdateGlobalSettings $+-- newUpdateGlobalSettings+--+-- , requestUpdateRecoveryPointLifecycle $+-- newUpdateRecoveryPointLifecycle+--+-- , requestUpdateRegionSettings $+-- newUpdateRegionSettings+--+-- , requestUpdateReportPlan $+-- newUpdateReportPlan+--+-- ]++-- , testGroup "response"+-- [ responseCancelLegalHold $+-- newCancelLegalHoldResponse+--+-- , responseCreateBackupPlan $+-- newCreateBackupPlanResponse+--+-- , responseCreateBackupSelection $+-- newCreateBackupSelectionResponse+--+-- , responseCreateBackupVault $+-- newCreateBackupVaultResponse+--+-- , responseCreateFramework $+-- newCreateFrameworkResponse+--+-- , responseCreateLegalHold $+-- newCreateLegalHoldResponse+--+-- , responseCreateReportPlan $+-- newCreateReportPlanResponse+--+-- , responseDeleteBackupPlan $+-- newDeleteBackupPlanResponse+--+-- , responseDeleteBackupSelection $+-- newDeleteBackupSelectionResponse+--+-- , responseDeleteBackupVault $+-- newDeleteBackupVaultResponse+--+-- , responseDeleteBackupVaultAccessPolicy $+-- newDeleteBackupVaultAccessPolicyResponse+--+-- , responseDeleteBackupVaultLockConfiguration $+-- newDeleteBackupVaultLockConfigurationResponse+--+-- , responseDeleteBackupVaultNotifications $+-- newDeleteBackupVaultNotificationsResponse+--+-- , responseDeleteFramework $+-- newDeleteFrameworkResponse+--+-- , responseDeleteRecoveryPoint $+-- newDeleteRecoveryPointResponse+--+-- , responseDeleteReportPlan $+-- newDeleteReportPlanResponse+--+-- , responseDescribeBackupJob $+-- newDescribeBackupJobResponse+--+-- , responseDescribeBackupVault $+-- newDescribeBackupVaultResponse+--+-- , responseDescribeCopyJob $+-- newDescribeCopyJobResponse+--+-- , responseDescribeFramework $+-- newDescribeFrameworkResponse+--+-- , responseDescribeGlobalSettings $+-- newDescribeGlobalSettingsResponse+--+-- , responseDescribeProtectedResource $+-- newDescribeProtectedResourceResponse+--+-- , responseDescribeRecoveryPoint $+-- newDescribeRecoveryPointResponse+--+-- , responseDescribeRegionSettings $+-- newDescribeRegionSettingsResponse+--+-- , responseDescribeReportJob $+-- newDescribeReportJobResponse+--+-- , responseDescribeReportPlan $+-- newDescribeReportPlanResponse+--+-- , responseDescribeRestoreJob $+-- newDescribeRestoreJobResponse+--+-- , responseDisassociateRecoveryPoint $+-- newDisassociateRecoveryPointResponse+--+-- , responseDisassociateRecoveryPointFromParent $+-- newDisassociateRecoveryPointFromParentResponse+--+-- , responseExportBackupPlanTemplate $+-- newExportBackupPlanTemplateResponse+--+-- , responseGetBackupPlan $+-- newGetBackupPlanResponse+--+-- , responseGetBackupPlanFromJSON $+-- newGetBackupPlanFromJSONResponse+--+-- , responseGetBackupPlanFromTemplate $+-- newGetBackupPlanFromTemplateResponse+--+-- , responseGetBackupSelection $+-- newGetBackupSelectionResponse+--+-- , responseGetBackupVaultAccessPolicy $+-- newGetBackupVaultAccessPolicyResponse+--+-- , responseGetBackupVaultNotifications $+-- newGetBackupVaultNotificationsResponse+--+-- , responseGetLegalHold $+-- newGetLegalHoldResponse+--+-- , responseGetRecoveryPointRestoreMetadata $+-- newGetRecoveryPointRestoreMetadataResponse+--+-- , responseGetSupportedResourceTypes $+-- newGetSupportedResourceTypesResponse+--+-- , responseListBackupJobs $+-- newListBackupJobsResponse+--+-- , responseListBackupPlanTemplates $+-- newListBackupPlanTemplatesResponse+--+-- , responseListBackupPlanVersions $+-- newListBackupPlanVersionsResponse+--+-- , responseListBackupPlans $+-- newListBackupPlansResponse+--+-- , responseListBackupSelections $+-- newListBackupSelectionsResponse+--+-- , responseListBackupVaults $+-- newListBackupVaultsResponse+--+-- , responseListCopyJobs $+-- newListCopyJobsResponse+--+-- , responseListFrameworks $+-- newListFrameworksResponse+--+-- , responseListLegalHolds $+-- newListLegalHoldsResponse+--+-- , responseListProtectedResources $+-- newListProtectedResourcesResponse+--+-- , responseListRecoveryPointsByBackupVault $+-- newListRecoveryPointsByBackupVaultResponse+--+-- , responseListRecoveryPointsByLegalHold $+-- newListRecoveryPointsByLegalHoldResponse+--+-- , responseListRecoveryPointsByResource $+-- newListRecoveryPointsByResourceResponse+--+-- , responseListReportJobs $+-- newListReportJobsResponse+--+-- , responseListReportPlans $+-- newListReportPlansResponse+--+-- , responseListRestoreJobs $+-- newListRestoreJobsResponse+--+-- , responseListTags $+-- newListTagsResponse+--+-- , responsePutBackupVaultAccessPolicy $+-- newPutBackupVaultAccessPolicyResponse+--+-- , responsePutBackupVaultLockConfiguration $+-- newPutBackupVaultLockConfigurationResponse+--+-- , responsePutBackupVaultNotifications $+-- newPutBackupVaultNotificationsResponse+--+-- , responseStartBackupJob $+-- newStartBackupJobResponse+--+-- , responseStartCopyJob $+-- newStartCopyJobResponse+--+-- , responseStartReportJob $+-- newStartReportJobResponse+--+-- , responseStartRestoreJob $+-- newStartRestoreJobResponse+--+-- , responseStopBackupJob $+-- newStopBackupJobResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateBackupPlan $+-- newUpdateBackupPlanResponse+--+-- , responseUpdateFramework $+-- newUpdateFrameworkResponse+--+-- , responseUpdateGlobalSettings $+-- newUpdateGlobalSettingsResponse+--+-- , responseUpdateRecoveryPointLifecycle $+-- newUpdateRecoveryPointLifecycleResponse+--+-- , responseUpdateRegionSettings $+-- newUpdateRegionSettingsResponse+--+-- , responseUpdateReportPlan $+-- newUpdateReportPlanResponse+--+-- ]+-- ]++-- Requests++requestCancelLegalHold :: CancelLegalHold -> TestTree+requestCancelLegalHold =+ req+ "CancelLegalHold"+ "fixture/CancelLegalHold.yaml"++requestCreateBackupPlan :: CreateBackupPlan -> TestTree+requestCreateBackupPlan =+ req+ "CreateBackupPlan"+ "fixture/CreateBackupPlan.yaml"++requestCreateBackupSelection :: CreateBackupSelection -> TestTree+requestCreateBackupSelection =+ req+ "CreateBackupSelection"+ "fixture/CreateBackupSelection.yaml"++requestCreateBackupVault :: CreateBackupVault -> TestTree+requestCreateBackupVault =+ req+ "CreateBackupVault"+ "fixture/CreateBackupVault.yaml"++requestCreateFramework :: CreateFramework -> TestTree+requestCreateFramework =+ req+ "CreateFramework"+ "fixture/CreateFramework.yaml"++requestCreateLegalHold :: CreateLegalHold -> TestTree+requestCreateLegalHold =+ req+ "CreateLegalHold"+ "fixture/CreateLegalHold.yaml"++requestCreateReportPlan :: CreateReportPlan -> TestTree+requestCreateReportPlan =+ req+ "CreateReportPlan"+ "fixture/CreateReportPlan.yaml"++requestDeleteBackupPlan :: DeleteBackupPlan -> TestTree+requestDeleteBackupPlan =+ req+ "DeleteBackupPlan"+ "fixture/DeleteBackupPlan.yaml"++requestDeleteBackupSelection :: DeleteBackupSelection -> TestTree+requestDeleteBackupSelection =+ req+ "DeleteBackupSelection"+ "fixture/DeleteBackupSelection.yaml"++requestDeleteBackupVault :: DeleteBackupVault -> TestTree+requestDeleteBackupVault =+ req+ "DeleteBackupVault"+ "fixture/DeleteBackupVault.yaml"++requestDeleteBackupVaultAccessPolicy :: DeleteBackupVaultAccessPolicy -> TestTree+requestDeleteBackupVaultAccessPolicy =+ req+ "DeleteBackupVaultAccessPolicy"+ "fixture/DeleteBackupVaultAccessPolicy.yaml"++requestDeleteBackupVaultLockConfiguration :: DeleteBackupVaultLockConfiguration -> TestTree+requestDeleteBackupVaultLockConfiguration =+ req+ "DeleteBackupVaultLockConfiguration"+ "fixture/DeleteBackupVaultLockConfiguration.yaml"++requestDeleteBackupVaultNotifications :: DeleteBackupVaultNotifications -> TestTree+requestDeleteBackupVaultNotifications =+ req+ "DeleteBackupVaultNotifications"+ "fixture/DeleteBackupVaultNotifications.yaml"++requestDeleteFramework :: DeleteFramework -> TestTree+requestDeleteFramework =+ req+ "DeleteFramework"+ "fixture/DeleteFramework.yaml"++requestDeleteRecoveryPoint :: DeleteRecoveryPoint -> TestTree+requestDeleteRecoveryPoint =+ req+ "DeleteRecoveryPoint"+ "fixture/DeleteRecoveryPoint.yaml"++requestDeleteReportPlan :: DeleteReportPlan -> TestTree+requestDeleteReportPlan =+ req+ "DeleteReportPlan"+ "fixture/DeleteReportPlan.yaml"++requestDescribeBackupJob :: DescribeBackupJob -> TestTree+requestDescribeBackupJob =+ req+ "DescribeBackupJob"+ "fixture/DescribeBackupJob.yaml"++requestDescribeBackupVault :: DescribeBackupVault -> TestTree+requestDescribeBackupVault =+ req+ "DescribeBackupVault"+ "fixture/DescribeBackupVault.yaml"++requestDescribeCopyJob :: DescribeCopyJob -> TestTree+requestDescribeCopyJob =+ req+ "DescribeCopyJob"+ "fixture/DescribeCopyJob.yaml"++requestDescribeFramework :: DescribeFramework -> TestTree+requestDescribeFramework =+ req+ "DescribeFramework"+ "fixture/DescribeFramework.yaml"++requestDescribeGlobalSettings :: DescribeGlobalSettings -> TestTree+requestDescribeGlobalSettings =+ req+ "DescribeGlobalSettings"+ "fixture/DescribeGlobalSettings.yaml"++requestDescribeProtectedResource :: DescribeProtectedResource -> TestTree+requestDescribeProtectedResource =+ req+ "DescribeProtectedResource"+ "fixture/DescribeProtectedResource.yaml"++requestDescribeRecoveryPoint :: DescribeRecoveryPoint -> TestTree+requestDescribeRecoveryPoint =+ req+ "DescribeRecoveryPoint"+ "fixture/DescribeRecoveryPoint.yaml"++requestDescribeRegionSettings :: DescribeRegionSettings -> TestTree+requestDescribeRegionSettings =+ req+ "DescribeRegionSettings"+ "fixture/DescribeRegionSettings.yaml"++requestDescribeReportJob :: DescribeReportJob -> TestTree+requestDescribeReportJob =+ req+ "DescribeReportJob"+ "fixture/DescribeReportJob.yaml"++requestDescribeReportPlan :: DescribeReportPlan -> TestTree+requestDescribeReportPlan =+ req+ "DescribeReportPlan"+ "fixture/DescribeReportPlan.yaml"++requestDescribeRestoreJob :: DescribeRestoreJob -> TestTree+requestDescribeRestoreJob =+ req+ "DescribeRestoreJob"+ "fixture/DescribeRestoreJob.yaml"++requestDisassociateRecoveryPoint :: DisassociateRecoveryPoint -> TestTree+requestDisassociateRecoveryPoint =+ req+ "DisassociateRecoveryPoint"+ "fixture/DisassociateRecoveryPoint.yaml"++requestDisassociateRecoveryPointFromParent :: DisassociateRecoveryPointFromParent -> TestTree+requestDisassociateRecoveryPointFromParent =+ req+ "DisassociateRecoveryPointFromParent"+ "fixture/DisassociateRecoveryPointFromParent.yaml"++requestExportBackupPlanTemplate :: ExportBackupPlanTemplate -> TestTree+requestExportBackupPlanTemplate =+ req+ "ExportBackupPlanTemplate"+ "fixture/ExportBackupPlanTemplate.yaml"++requestGetBackupPlan :: GetBackupPlan -> TestTree+requestGetBackupPlan =+ req+ "GetBackupPlan"+ "fixture/GetBackupPlan.yaml"++requestGetBackupPlanFromJSON :: GetBackupPlanFromJSON -> TestTree+requestGetBackupPlanFromJSON =+ req+ "GetBackupPlanFromJSON"+ "fixture/GetBackupPlanFromJSON.yaml"++requestGetBackupPlanFromTemplate :: GetBackupPlanFromTemplate -> TestTree+requestGetBackupPlanFromTemplate =+ req+ "GetBackupPlanFromTemplate"+ "fixture/GetBackupPlanFromTemplate.yaml"++requestGetBackupSelection :: GetBackupSelection -> TestTree+requestGetBackupSelection =+ req+ "GetBackupSelection"+ "fixture/GetBackupSelection.yaml"++requestGetBackupVaultAccessPolicy :: GetBackupVaultAccessPolicy -> TestTree+requestGetBackupVaultAccessPolicy =+ req+ "GetBackupVaultAccessPolicy"+ "fixture/GetBackupVaultAccessPolicy.yaml"++requestGetBackupVaultNotifications :: GetBackupVaultNotifications -> TestTree+requestGetBackupVaultNotifications =+ req+ "GetBackupVaultNotifications"+ "fixture/GetBackupVaultNotifications.yaml"++requestGetLegalHold :: GetLegalHold -> TestTree+requestGetLegalHold =+ req+ "GetLegalHold"+ "fixture/GetLegalHold.yaml"++requestGetRecoveryPointRestoreMetadata :: GetRecoveryPointRestoreMetadata -> TestTree+requestGetRecoveryPointRestoreMetadata =+ req+ "GetRecoveryPointRestoreMetadata"+ "fixture/GetRecoveryPointRestoreMetadata.yaml"++requestGetSupportedResourceTypes :: GetSupportedResourceTypes -> TestTree+requestGetSupportedResourceTypes =+ req+ "GetSupportedResourceTypes"+ "fixture/GetSupportedResourceTypes.yaml"++requestListBackupJobs :: ListBackupJobs -> TestTree+requestListBackupJobs =+ req+ "ListBackupJobs"+ "fixture/ListBackupJobs.yaml"++requestListBackupPlanTemplates :: ListBackupPlanTemplates -> TestTree+requestListBackupPlanTemplates =+ req+ "ListBackupPlanTemplates"+ "fixture/ListBackupPlanTemplates.yaml"++requestListBackupPlanVersions :: ListBackupPlanVersions -> TestTree+requestListBackupPlanVersions =+ req+ "ListBackupPlanVersions"+ "fixture/ListBackupPlanVersions.yaml"++requestListBackupPlans :: ListBackupPlans -> TestTree+requestListBackupPlans =+ req+ "ListBackupPlans"+ "fixture/ListBackupPlans.yaml"++requestListBackupSelections :: ListBackupSelections -> TestTree+requestListBackupSelections =+ req+ "ListBackupSelections"+ "fixture/ListBackupSelections.yaml"++requestListBackupVaults :: ListBackupVaults -> TestTree+requestListBackupVaults =+ req+ "ListBackupVaults"+ "fixture/ListBackupVaults.yaml"++requestListCopyJobs :: ListCopyJobs -> TestTree+requestListCopyJobs =+ req+ "ListCopyJobs"+ "fixture/ListCopyJobs.yaml"++requestListFrameworks :: ListFrameworks -> TestTree+requestListFrameworks =+ req+ "ListFrameworks"+ "fixture/ListFrameworks.yaml"++requestListLegalHolds :: ListLegalHolds -> TestTree+requestListLegalHolds =+ req+ "ListLegalHolds"+ "fixture/ListLegalHolds.yaml"++requestListProtectedResources :: ListProtectedResources -> TestTree+requestListProtectedResources =+ req+ "ListProtectedResources"+ "fixture/ListProtectedResources.yaml"++requestListRecoveryPointsByBackupVault :: ListRecoveryPointsByBackupVault -> TestTree+requestListRecoveryPointsByBackupVault =+ req+ "ListRecoveryPointsByBackupVault"+ "fixture/ListRecoveryPointsByBackupVault.yaml"++requestListRecoveryPointsByLegalHold :: ListRecoveryPointsByLegalHold -> TestTree+requestListRecoveryPointsByLegalHold =+ req+ "ListRecoveryPointsByLegalHold"+ "fixture/ListRecoveryPointsByLegalHold.yaml"++requestListRecoveryPointsByResource :: ListRecoveryPointsByResource -> TestTree+requestListRecoveryPointsByResource =+ req+ "ListRecoveryPointsByResource"+ "fixture/ListRecoveryPointsByResource.yaml"++requestListReportJobs :: ListReportJobs -> TestTree+requestListReportJobs =+ req+ "ListReportJobs"+ "fixture/ListReportJobs.yaml"++requestListReportPlans :: ListReportPlans -> TestTree+requestListReportPlans =+ req+ "ListReportPlans"+ "fixture/ListReportPlans.yaml"++requestListRestoreJobs :: ListRestoreJobs -> TestTree+requestListRestoreJobs =+ req+ "ListRestoreJobs"+ "fixture/ListRestoreJobs.yaml"++requestListTags :: ListTags -> TestTree+requestListTags =+ req+ "ListTags"+ "fixture/ListTags.yaml"++requestPutBackupVaultAccessPolicy :: PutBackupVaultAccessPolicy -> TestTree+requestPutBackupVaultAccessPolicy =+ req+ "PutBackupVaultAccessPolicy"+ "fixture/PutBackupVaultAccessPolicy.yaml"++requestPutBackupVaultLockConfiguration :: PutBackupVaultLockConfiguration -> TestTree+requestPutBackupVaultLockConfiguration =+ req+ "PutBackupVaultLockConfiguration"+ "fixture/PutBackupVaultLockConfiguration.yaml"++requestPutBackupVaultNotifications :: PutBackupVaultNotifications -> TestTree+requestPutBackupVaultNotifications =+ req+ "PutBackupVaultNotifications"+ "fixture/PutBackupVaultNotifications.yaml"++requestStartBackupJob :: StartBackupJob -> TestTree+requestStartBackupJob =+ req+ "StartBackupJob"+ "fixture/StartBackupJob.yaml"++requestStartCopyJob :: StartCopyJob -> TestTree+requestStartCopyJob =+ req+ "StartCopyJob"+ "fixture/StartCopyJob.yaml"++requestStartReportJob :: StartReportJob -> TestTree+requestStartReportJob =+ req+ "StartReportJob"+ "fixture/StartReportJob.yaml"++requestStartRestoreJob :: StartRestoreJob -> TestTree+requestStartRestoreJob =+ req+ "StartRestoreJob"+ "fixture/StartRestoreJob.yaml"++requestStopBackupJob :: StopBackupJob -> TestTree+requestStopBackupJob =+ req+ "StopBackupJob"+ "fixture/StopBackupJob.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateBackupPlan :: UpdateBackupPlan -> TestTree+requestUpdateBackupPlan =+ req+ "UpdateBackupPlan"+ "fixture/UpdateBackupPlan.yaml"++requestUpdateFramework :: UpdateFramework -> TestTree+requestUpdateFramework =+ req+ "UpdateFramework"+ "fixture/UpdateFramework.yaml"++requestUpdateGlobalSettings :: UpdateGlobalSettings -> TestTree+requestUpdateGlobalSettings =+ req+ "UpdateGlobalSettings"+ "fixture/UpdateGlobalSettings.yaml"++requestUpdateRecoveryPointLifecycle :: UpdateRecoveryPointLifecycle -> TestTree+requestUpdateRecoveryPointLifecycle =+ req+ "UpdateRecoveryPointLifecycle"+ "fixture/UpdateRecoveryPointLifecycle.yaml"++requestUpdateRegionSettings :: UpdateRegionSettings -> TestTree+requestUpdateRegionSettings =+ req+ "UpdateRegionSettings"+ "fixture/UpdateRegionSettings.yaml"++requestUpdateReportPlan :: UpdateReportPlan -> TestTree+requestUpdateReportPlan =+ req+ "UpdateReportPlan"+ "fixture/UpdateReportPlan.yaml"++-- Responses++responseCancelLegalHold :: CancelLegalHoldResponse -> TestTree+responseCancelLegalHold =+ res+ "CancelLegalHoldResponse"+ "fixture/CancelLegalHoldResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CancelLegalHold)++responseCreateBackupPlan :: CreateBackupPlanResponse -> TestTree+responseCreateBackupPlan =+ res+ "CreateBackupPlanResponse"+ "fixture/CreateBackupPlanResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateBackupPlan)++responseCreateBackupSelection :: CreateBackupSelectionResponse -> TestTree+responseCreateBackupSelection =+ res+ "CreateBackupSelectionResponse"+ "fixture/CreateBackupSelectionResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateBackupSelection)++responseCreateBackupVault :: CreateBackupVaultResponse -> TestTree+responseCreateBackupVault =+ res+ "CreateBackupVaultResponse"+ "fixture/CreateBackupVaultResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateBackupVault)++responseCreateFramework :: CreateFrameworkResponse -> TestTree+responseCreateFramework =+ res+ "CreateFrameworkResponse"+ "fixture/CreateFrameworkResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateFramework)++responseCreateLegalHold :: CreateLegalHoldResponse -> TestTree+responseCreateLegalHold =+ res+ "CreateLegalHoldResponse"+ "fixture/CreateLegalHoldResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateLegalHold)++responseCreateReportPlan :: CreateReportPlanResponse -> TestTree+responseCreateReportPlan =+ res+ "CreateReportPlanResponse"+ "fixture/CreateReportPlanResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateReportPlan)++responseDeleteBackupPlan :: DeleteBackupPlanResponse -> TestTree+responseDeleteBackupPlan =+ res+ "DeleteBackupPlanResponse"+ "fixture/DeleteBackupPlanResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteBackupPlan)++responseDeleteBackupSelection :: DeleteBackupSelectionResponse -> TestTree+responseDeleteBackupSelection =+ res+ "DeleteBackupSelectionResponse"+ "fixture/DeleteBackupSelectionResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteBackupSelection)++responseDeleteBackupVault :: DeleteBackupVaultResponse -> TestTree+responseDeleteBackupVault =+ res+ "DeleteBackupVaultResponse"+ "fixture/DeleteBackupVaultResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteBackupVault)++responseDeleteBackupVaultAccessPolicy :: DeleteBackupVaultAccessPolicyResponse -> TestTree+responseDeleteBackupVaultAccessPolicy =+ res+ "DeleteBackupVaultAccessPolicyResponse"+ "fixture/DeleteBackupVaultAccessPolicyResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteBackupVaultAccessPolicy)++responseDeleteBackupVaultLockConfiguration :: DeleteBackupVaultLockConfigurationResponse -> TestTree+responseDeleteBackupVaultLockConfiguration =+ res+ "DeleteBackupVaultLockConfigurationResponse"+ "fixture/DeleteBackupVaultLockConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteBackupVaultLockConfiguration)++responseDeleteBackupVaultNotifications :: DeleteBackupVaultNotificationsResponse -> TestTree+responseDeleteBackupVaultNotifications =+ res+ "DeleteBackupVaultNotificationsResponse"+ "fixture/DeleteBackupVaultNotificationsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteBackupVaultNotifications)++responseDeleteFramework :: DeleteFrameworkResponse -> TestTree+responseDeleteFramework =+ res+ "DeleteFrameworkResponse"+ "fixture/DeleteFrameworkResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteFramework)++responseDeleteRecoveryPoint :: DeleteRecoveryPointResponse -> TestTree+responseDeleteRecoveryPoint =+ res+ "DeleteRecoveryPointResponse"+ "fixture/DeleteRecoveryPointResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteRecoveryPoint)++responseDeleteReportPlan :: DeleteReportPlanResponse -> TestTree+responseDeleteReportPlan =+ res+ "DeleteReportPlanResponse"+ "fixture/DeleteReportPlanResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteReportPlan)++responseDescribeBackupJob :: DescribeBackupJobResponse -> TestTree+responseDescribeBackupJob =+ res+ "DescribeBackupJobResponse"+ "fixture/DescribeBackupJobResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeBackupJob)++responseDescribeBackupVault :: DescribeBackupVaultResponse -> TestTree+responseDescribeBackupVault =+ res+ "DescribeBackupVaultResponse"+ "fixture/DescribeBackupVaultResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeBackupVault)++responseDescribeCopyJob :: DescribeCopyJobResponse -> TestTree+responseDescribeCopyJob =+ res+ "DescribeCopyJobResponse"+ "fixture/DescribeCopyJobResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeCopyJob)++responseDescribeFramework :: DescribeFrameworkResponse -> TestTree+responseDescribeFramework =+ res+ "DescribeFrameworkResponse"+ "fixture/DescribeFrameworkResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeFramework)++responseDescribeGlobalSettings :: DescribeGlobalSettingsResponse -> TestTree+responseDescribeGlobalSettings =+ res+ "DescribeGlobalSettingsResponse"+ "fixture/DescribeGlobalSettingsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeGlobalSettings)++responseDescribeProtectedResource :: DescribeProtectedResourceResponse -> TestTree+responseDescribeProtectedResource =+ res+ "DescribeProtectedResourceResponse"+ "fixture/DescribeProtectedResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeProtectedResource)++responseDescribeRecoveryPoint :: DescribeRecoveryPointResponse -> TestTree+responseDescribeRecoveryPoint =+ res+ "DescribeRecoveryPointResponse"+ "fixture/DescribeRecoveryPointResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeRecoveryPoint)++responseDescribeRegionSettings :: DescribeRegionSettingsResponse -> TestTree+responseDescribeRegionSettings =+ res+ "DescribeRegionSettingsResponse"+ "fixture/DescribeRegionSettingsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeRegionSettings)++responseDescribeReportJob :: DescribeReportJobResponse -> TestTree+responseDescribeReportJob =+ res+ "DescribeReportJobResponse"+ "fixture/DescribeReportJobResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeReportJob)++responseDescribeReportPlan :: DescribeReportPlanResponse -> TestTree+responseDescribeReportPlan =+ res+ "DescribeReportPlanResponse"+ "fixture/DescribeReportPlanResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeReportPlan)++responseDescribeRestoreJob :: DescribeRestoreJobResponse -> TestTree+responseDescribeRestoreJob =+ res+ "DescribeRestoreJobResponse"+ "fixture/DescribeRestoreJobResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeRestoreJob)++responseDisassociateRecoveryPoint :: DisassociateRecoveryPointResponse -> TestTree+responseDisassociateRecoveryPoint =+ res+ "DisassociateRecoveryPointResponse"+ "fixture/DisassociateRecoveryPointResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisassociateRecoveryPoint)++responseDisassociateRecoveryPointFromParent :: DisassociateRecoveryPointFromParentResponse -> TestTree+responseDisassociateRecoveryPointFromParent =+ res+ "DisassociateRecoveryPointFromParentResponse"+ "fixture/DisassociateRecoveryPointFromParentResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisassociateRecoveryPointFromParent)++responseExportBackupPlanTemplate :: ExportBackupPlanTemplateResponse -> TestTree+responseExportBackupPlanTemplate =+ res+ "ExportBackupPlanTemplateResponse"+ "fixture/ExportBackupPlanTemplateResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ExportBackupPlanTemplate)++responseGetBackupPlan :: GetBackupPlanResponse -> TestTree+responseGetBackupPlan =+ res+ "GetBackupPlanResponse"+ "fixture/GetBackupPlanResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetBackupPlan)++responseGetBackupPlanFromJSON :: GetBackupPlanFromJSONResponse -> TestTree+responseGetBackupPlanFromJSON =+ res+ "GetBackupPlanFromJSONResponse"+ "fixture/GetBackupPlanFromJSONResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetBackupPlanFromJSON)++responseGetBackupPlanFromTemplate :: GetBackupPlanFromTemplateResponse -> TestTree+responseGetBackupPlanFromTemplate =+ res+ "GetBackupPlanFromTemplateResponse"+ "fixture/GetBackupPlanFromTemplateResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetBackupPlanFromTemplate)++responseGetBackupSelection :: GetBackupSelectionResponse -> TestTree+responseGetBackupSelection =+ res+ "GetBackupSelectionResponse"+ "fixture/GetBackupSelectionResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetBackupSelection)++responseGetBackupVaultAccessPolicy :: GetBackupVaultAccessPolicyResponse -> TestTree+responseGetBackupVaultAccessPolicy =+ res+ "GetBackupVaultAccessPolicyResponse"+ "fixture/GetBackupVaultAccessPolicyResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetBackupVaultAccessPolicy)++responseGetBackupVaultNotifications :: GetBackupVaultNotificationsResponse -> TestTree+responseGetBackupVaultNotifications =+ res+ "GetBackupVaultNotificationsResponse"+ "fixture/GetBackupVaultNotificationsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetBackupVaultNotifications)++responseGetLegalHold :: GetLegalHoldResponse -> TestTree+responseGetLegalHold =+ res+ "GetLegalHoldResponse"+ "fixture/GetLegalHoldResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetLegalHold)++responseGetRecoveryPointRestoreMetadata :: GetRecoveryPointRestoreMetadataResponse -> TestTree+responseGetRecoveryPointRestoreMetadata =+ res+ "GetRecoveryPointRestoreMetadataResponse"+ "fixture/GetRecoveryPointRestoreMetadataResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetRecoveryPointRestoreMetadata)++responseGetSupportedResourceTypes :: GetSupportedResourceTypesResponse -> TestTree+responseGetSupportedResourceTypes =+ res+ "GetSupportedResourceTypesResponse"+ "fixture/GetSupportedResourceTypesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetSupportedResourceTypes)++responseListBackupJobs :: ListBackupJobsResponse -> TestTree+responseListBackupJobs =+ res+ "ListBackupJobsResponse"+ "fixture/ListBackupJobsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListBackupJobs)++responseListBackupPlanTemplates :: ListBackupPlanTemplatesResponse -> TestTree+responseListBackupPlanTemplates =+ res+ "ListBackupPlanTemplatesResponse"+ "fixture/ListBackupPlanTemplatesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListBackupPlanTemplates)++responseListBackupPlanVersions :: ListBackupPlanVersionsResponse -> TestTree+responseListBackupPlanVersions =+ res+ "ListBackupPlanVersionsResponse"+ "fixture/ListBackupPlanVersionsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListBackupPlanVersions)++responseListBackupPlans :: ListBackupPlansResponse -> TestTree+responseListBackupPlans =+ res+ "ListBackupPlansResponse"+ "fixture/ListBackupPlansResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListBackupPlans)++responseListBackupSelections :: ListBackupSelectionsResponse -> TestTree+responseListBackupSelections =+ res+ "ListBackupSelectionsResponse"+ "fixture/ListBackupSelectionsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListBackupSelections)++responseListBackupVaults :: ListBackupVaultsResponse -> TestTree+responseListBackupVaults =+ res+ "ListBackupVaultsResponse"+ "fixture/ListBackupVaultsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListBackupVaults)++responseListCopyJobs :: ListCopyJobsResponse -> TestTree+responseListCopyJobs =+ res+ "ListCopyJobsResponse"+ "fixture/ListCopyJobsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListCopyJobs)++responseListFrameworks :: ListFrameworksResponse -> TestTree+responseListFrameworks =+ res+ "ListFrameworksResponse"+ "fixture/ListFrameworksResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListFrameworks)++responseListLegalHolds :: ListLegalHoldsResponse -> TestTree+responseListLegalHolds =+ res+ "ListLegalHoldsResponse"+ "fixture/ListLegalHoldsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListLegalHolds)++responseListProtectedResources :: ListProtectedResourcesResponse -> TestTree+responseListProtectedResources =+ res+ "ListProtectedResourcesResponse"+ "fixture/ListProtectedResourcesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListProtectedResources)++responseListRecoveryPointsByBackupVault :: ListRecoveryPointsByBackupVaultResponse -> TestTree+responseListRecoveryPointsByBackupVault =+ res+ "ListRecoveryPointsByBackupVaultResponse"+ "fixture/ListRecoveryPointsByBackupVaultResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListRecoveryPointsByBackupVault)++responseListRecoveryPointsByLegalHold :: ListRecoveryPointsByLegalHoldResponse -> TestTree+responseListRecoveryPointsByLegalHold =+ res+ "ListRecoveryPointsByLegalHoldResponse"+ "fixture/ListRecoveryPointsByLegalHoldResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListRecoveryPointsByLegalHold)++responseListRecoveryPointsByResource :: ListRecoveryPointsByResourceResponse -> TestTree+responseListRecoveryPointsByResource =+ res+ "ListRecoveryPointsByResourceResponse"+ "fixture/ListRecoveryPointsByResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListRecoveryPointsByResource)++responseListReportJobs :: ListReportJobsResponse -> TestTree+responseListReportJobs =+ res+ "ListReportJobsResponse"+ "fixture/ListReportJobsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListReportJobs)++responseListReportPlans :: ListReportPlansResponse -> TestTree+responseListReportPlans =+ res+ "ListReportPlansResponse"+ "fixture/ListReportPlansResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListReportPlans)++responseListRestoreJobs :: ListRestoreJobsResponse -> TestTree+responseListRestoreJobs =+ res+ "ListRestoreJobsResponse"+ "fixture/ListRestoreJobsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListRestoreJobs)++responseListTags :: ListTagsResponse -> TestTree+responseListTags =+ res+ "ListTagsResponse"+ "fixture/ListTagsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTags)++responsePutBackupVaultAccessPolicy :: PutBackupVaultAccessPolicyResponse -> TestTree+responsePutBackupVaultAccessPolicy =+ res+ "PutBackupVaultAccessPolicyResponse"+ "fixture/PutBackupVaultAccessPolicyResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutBackupVaultAccessPolicy)++responsePutBackupVaultLockConfiguration :: PutBackupVaultLockConfigurationResponse -> TestTree+responsePutBackupVaultLockConfiguration =+ res+ "PutBackupVaultLockConfigurationResponse"+ "fixture/PutBackupVaultLockConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutBackupVaultLockConfiguration)++responsePutBackupVaultNotifications :: PutBackupVaultNotificationsResponse -> TestTree+responsePutBackupVaultNotifications =+ res+ "PutBackupVaultNotificationsResponse"+ "fixture/PutBackupVaultNotificationsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutBackupVaultNotifications)++responseStartBackupJob :: StartBackupJobResponse -> TestTree+responseStartBackupJob =+ res+ "StartBackupJobResponse"+ "fixture/StartBackupJobResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy StartBackupJob)++responseStartCopyJob :: StartCopyJobResponse -> TestTree+responseStartCopyJob =+ res+ "StartCopyJobResponse"+ "fixture/StartCopyJobResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy StartCopyJob)++responseStartReportJob :: StartReportJobResponse -> TestTree+responseStartReportJob =+ res+ "StartReportJobResponse"+ "fixture/StartReportJobResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy StartReportJob)++responseStartRestoreJob :: StartRestoreJobResponse -> TestTree+responseStartRestoreJob =+ res+ "StartRestoreJobResponse"+ "fixture/StartRestoreJobResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy StartRestoreJob)++responseStopBackupJob :: StopBackupJobResponse -> TestTree+responseStopBackupJob =+ res+ "StopBackupJobResponse"+ "fixture/StopBackupJobResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy StopBackupJob)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+ res+ "TagResourceResponse"+ "fixture/TagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy TagResource)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+ res+ "UntagResourceResponse"+ "fixture/UntagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdateBackupPlan :: UpdateBackupPlanResponse -> TestTree+responseUpdateBackupPlan =+ res+ "UpdateBackupPlanResponse"+ "fixture/UpdateBackupPlanResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateBackupPlan)++responseUpdateFramework :: UpdateFrameworkResponse -> TestTree+responseUpdateFramework =+ res+ "UpdateFrameworkResponse"+ "fixture/UpdateFrameworkResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateFramework)++responseUpdateGlobalSettings :: UpdateGlobalSettingsResponse -> TestTree+responseUpdateGlobalSettings =+ res+ "UpdateGlobalSettingsResponse"+ "fixture/UpdateGlobalSettingsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateGlobalSettings)++responseUpdateRecoveryPointLifecycle :: UpdateRecoveryPointLifecycleResponse -> TestTree+responseUpdateRecoveryPointLifecycle =+ res+ "UpdateRecoveryPointLifecycleResponse"+ "fixture/UpdateRecoveryPointLifecycleResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateRecoveryPointLifecycle)++responseUpdateRegionSettings :: UpdateRegionSettingsResponse -> TestTree+responseUpdateRegionSettings =+ res+ "UpdateRegionSettingsResponse"+ "fixture/UpdateRegionSettingsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateRegionSettings)++responseUpdateReportPlan :: UpdateReportPlanResponse -> TestTree+responseUpdateReportPlan =+ res+ "UpdateReportPlanResponse"+ "fixture/UpdateReportPlanResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateReportPlan)