packages feed

amazonka-compute-optimizer (empty) → 2.0

raw patch · 171 files changed

+24186/−0 lines, 171 filesdep +amazonka-compute-optimizerdep +amazonka-coredep +amazonka-test

Dependencies added: amazonka-compute-optimizer, amazonka-core, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers

Files

+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+    means each individual or legal entity that creates, contributes to+    the creation of, or owns Covered Software.++1.2. "Contributor Version"+    means the combination of the Contributions of others (if any) used+    by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+    means Covered Software of a particular Contributor.++1.4. "Covered Software"+    means Source Code Form to which the initial Contributor has attached+    the notice in Exhibit A, the Executable Form of such Source Code+    Form, and Modifications of such Source Code Form, in each case+    including portions thereof.++1.5. "Incompatible With Secondary Licenses"+    means++    (a) that the initial Contributor has attached the notice described+        in Exhibit B to the Covered Software; or++    (b) that the Covered Software was made available under the terms of+        version 1.1 or earlier of the License, but not also under the+        terms of a Secondary License.++1.6. "Executable Form"+    means any form of the work other than Source Code Form.++1.7. "Larger Work"+    means a work that combines Covered Software with other material, in+    a separate file or files, that is not Covered Software.++1.8. "License"+    means this document.++1.9. "Licensable"+    means having the right to grant, to the maximum extent possible,+    whether at the time of the initial grant or subsequently, any and+    all of the rights conveyed by this License.++1.10. "Modifications"+    means any of the following:++    (a) any file in Source Code Form that results from an addition to,+        deletion from, or modification of the contents of Covered+        Software; or++    (b) any new file in Source Code Form that contains any Covered+        Software.++1.11. "Patent Claims" of a Contributor+    means any patent claim(s), including without limitation, method,+    process, and apparatus claims, in any patent Licensable by such+    Contributor that would be infringed, but for the grant of the+    License, by the making, using, selling, offering for sale, having+    made, import, or transfer of either its Contributions or its+    Contributor Version.++1.12. "Secondary License"+    means either the GNU General Public License, Version 2.0, the GNU+    Lesser General Public License, Version 2.1, the GNU Affero General+    Public License, Version 3.0, or any later versions of those+    licenses.++1.13. "Source Code Form"+    means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+    means an individual or a legal entity exercising rights under this+    License. For legal entities, "You" includes any entity that+    controls, is controlled by, or is under common control with You. For+    purposes of this definition, "control" means (a) the power, direct+    or indirect, to cause the direction or management of such entity,+    whether by contract or otherwise, or (b) ownership of more than+    fifty percent (50%) of the outstanding shares or beneficial+    ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+    Licensable by such Contributor to use, reproduce, make available,+    modify, display, perform, distribute, and otherwise exploit its+    Contributions, either on an unmodified basis, with Modifications, or+    as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+    for sale, have made, import, and otherwise transfer either its+    Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+    or++(b) for infringements caused by: (i) Your and any other third party's+    modifications of Covered Software, or (ii) the combination of its+    Contributions with other software (except as part of its Contributor+    Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+    its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+    Form, as described in Section 3.1, and You must inform recipients of+    the Executable Form how they can obtain a copy of such Source Code+    Form by reasonable means in a timely manner, at a charge no more+    than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+    License, or sublicense it under different terms, provided that the+    license for the Executable Form does not attempt to limit or alter+    the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+*                                                                      *+*  6. Disclaimer of Warranty                                           *+*  -------------------------                                           *+*                                                                      *+*  Covered Software is provided under this License on an "as is"       *+*  basis, without warranty of any kind, either expressed, implied, or  *+*  statutory, including, without limitation, warranties that the       *+*  Covered Software is free of defects, merchantable, fit for a        *+*  particular purpose or non-infringing. The entire risk as to the     *+*  quality and performance of the Covered Software is with You.        *+*  Should any Covered Software prove defective in any respect, You     *+*  (not any Contributor) assume the cost of any necessary servicing,   *+*  repair, or correction. This disclaimer of warranty constitutes an   *+*  essential part of this License. No use of any Covered Software is   *+*  authorized under this License except under this disclaimer.         *+*                                                                      *+************************************************************************++************************************************************************+*                                                                      *+*  7. Limitation of Liability                                          *+*  --------------------------                                          *+*                                                                      *+*  Under no circumstances and under no legal theory, whether tort      *+*  (including negligence), contract, or otherwise, shall any           *+*  Contributor, or anyone who distributes Covered Software as          *+*  permitted above, be liable to You for any direct, indirect,         *+*  special, incidental, or consequential damages of any character      *+*  including, without limitation, damages for lost profits, loss of    *+*  goodwill, work stoppage, computer failure or malfunction, or any    *+*  and all other commercial damages or losses, even if such party      *+*  shall have been informed of the possibility of such damages. This   *+*  limitation of liability shall not apply to liability for death or   *+*  personal injury resulting from such party's negligence to the       *+*  extent applicable law prohibits such limitation. Some               *+*  jurisdictions do not allow the exclusion or limitation of           *+*  incidental or consequential damages, so this exclusion and          *+*  limitation may not apply to You.                                    *+*                                                                      *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++  This Source Code Form is subject to the terms of the Mozilla Public+  License, v. 2.0. If a copy of the MPL was not distributed with this+  file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,44 @@+# Amazon Compute Optimizer SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2019-11-01@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-compute-optimizer)+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.ComputeOptimizer](http://hackage.haskell.org/package/amazonka-compute-optimizer/docs/Amazonka-ComputeOptimizer.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-compute-optimizer` 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-compute-optimizer.cabal view
@@ -0,0 +1,200 @@+cabal-version:      2.2+name:               amazonka-compute-optimizer+version:            2.0+synopsis:           Amazon Compute Optimizer 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 @2019-11-01@ of the AWS service descriptions, licensed under Apache 2.0.+  .+  The types from this library are intended to be used with <http://hackage.haskell.org/package/amazonka amazonka>,+  which provides mechanisms for specifying AuthN/AuthZ information, sending requests, and receiving responses.+  .+  It is recommended to use generic lenses or optics from packages such as <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify optional fields and deconstruct responses.+  .+  Generated lenses can be found in "Amazonka.ComputeOptimizer.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.ComputeOptimizer" 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-compute-optimizer++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.ComputeOptimizer+    Amazonka.ComputeOptimizer.DeleteRecommendationPreferences+    Amazonka.ComputeOptimizer.DescribeRecommendationExportJobs+    Amazonka.ComputeOptimizer.ExportAutoScalingGroupRecommendations+    Amazonka.ComputeOptimizer.ExportEBSVolumeRecommendations+    Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations+    Amazonka.ComputeOptimizer.ExportECSServiceRecommendations+    Amazonka.ComputeOptimizer.ExportLambdaFunctionRecommendations+    Amazonka.ComputeOptimizer.GetAutoScalingGroupRecommendations+    Amazonka.ComputeOptimizer.GetEBSVolumeRecommendations+    Amazonka.ComputeOptimizer.GetEC2InstanceRecommendations+    Amazonka.ComputeOptimizer.GetEC2RecommendationProjectedMetrics+    Amazonka.ComputeOptimizer.GetECSServiceRecommendationProjectedMetrics+    Amazonka.ComputeOptimizer.GetECSServiceRecommendations+    Amazonka.ComputeOptimizer.GetEffectiveRecommendationPreferences+    Amazonka.ComputeOptimizer.GetEnrollmentStatus+    Amazonka.ComputeOptimizer.GetEnrollmentStatusesForOrganization+    Amazonka.ComputeOptimizer.GetLambdaFunctionRecommendations+    Amazonka.ComputeOptimizer.GetRecommendationPreferences+    Amazonka.ComputeOptimizer.GetRecommendationSummaries+    Amazonka.ComputeOptimizer.Lens+    Amazonka.ComputeOptimizer.PutRecommendationPreferences+    Amazonka.ComputeOptimizer.Types+    Amazonka.ComputeOptimizer.Types.AccountEnrollmentStatus+    Amazonka.ComputeOptimizer.Types.AutoScalingConfiguration+    Amazonka.ComputeOptimizer.Types.AutoScalingGroupConfiguration+    Amazonka.ComputeOptimizer.Types.AutoScalingGroupRecommendation+    Amazonka.ComputeOptimizer.Types.AutoScalingGroupRecommendationOption+    Amazonka.ComputeOptimizer.Types.ContainerConfiguration+    Amazonka.ComputeOptimizer.Types.ContainerRecommendation+    Amazonka.ComputeOptimizer.Types.CpuVendorArchitecture+    Amazonka.ComputeOptimizer.Types.Currency+    Amazonka.ComputeOptimizer.Types.CurrentPerformanceRisk+    Amazonka.ComputeOptimizer.Types.CurrentPerformanceRiskRatings+    Amazonka.ComputeOptimizer.Types.EBSFilter+    Amazonka.ComputeOptimizer.Types.EBSFilterName+    Amazonka.ComputeOptimizer.Types.EBSFinding+    Amazonka.ComputeOptimizer.Types.EBSMetricName+    Amazonka.ComputeOptimizer.Types.EBSUtilizationMetric+    Amazonka.ComputeOptimizer.Types.ECSServiceLaunchType+    Amazonka.ComputeOptimizer.Types.ECSServiceMetricName+    Amazonka.ComputeOptimizer.Types.ECSServiceMetricStatistic+    Amazonka.ComputeOptimizer.Types.ECSServiceProjectedMetric+    Amazonka.ComputeOptimizer.Types.ECSServiceProjectedUtilizationMetric+    Amazonka.ComputeOptimizer.Types.ECSServiceRecommendation+    Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFilter+    Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFilterName+    Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFinding+    Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFindingReasonCode+    Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationOption+    Amazonka.ComputeOptimizer.Types.ECSServiceRecommendedOptionProjectedMetric+    Amazonka.ComputeOptimizer.Types.ECSServiceUtilizationMetric+    Amazonka.ComputeOptimizer.Types.EffectiveRecommendationPreferences+    Amazonka.ComputeOptimizer.Types.EnhancedInfrastructureMetrics+    Amazonka.ComputeOptimizer.Types.EnrollmentFilter+    Amazonka.ComputeOptimizer.Types.EnrollmentFilterName+    Amazonka.ComputeOptimizer.Types.EstimatedMonthlySavings+    Amazonka.ComputeOptimizer.Types.ExportableAutoScalingGroupField+    Amazonka.ComputeOptimizer.Types.ExportableECSServiceField+    Amazonka.ComputeOptimizer.Types.ExportableInstanceField+    Amazonka.ComputeOptimizer.Types.ExportableLambdaFunctionField+    Amazonka.ComputeOptimizer.Types.ExportableVolumeField+    Amazonka.ComputeOptimizer.Types.ExportDestination+    Amazonka.ComputeOptimizer.Types.ExternalMetricsPreference+    Amazonka.ComputeOptimizer.Types.ExternalMetricsSource+    Amazonka.ComputeOptimizer.Types.FileFormat+    Amazonka.ComputeOptimizer.Types.Filter+    Amazonka.ComputeOptimizer.Types.FilterName+    Amazonka.ComputeOptimizer.Types.Finding+    Amazonka.ComputeOptimizer.Types.FindingReasonCode+    Amazonka.ComputeOptimizer.Types.GetRecommendationError+    Amazonka.ComputeOptimizer.Types.InferredWorkloadType+    Amazonka.ComputeOptimizer.Types.InferredWorkloadTypesPreference+    Amazonka.ComputeOptimizer.Types.InstanceRecommendation+    Amazonka.ComputeOptimizer.Types.InstanceRecommendationFindingReasonCode+    Amazonka.ComputeOptimizer.Types.InstanceRecommendationOption+    Amazonka.ComputeOptimizer.Types.JobFilter+    Amazonka.ComputeOptimizer.Types.JobFilterName+    Amazonka.ComputeOptimizer.Types.JobStatus+    Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryMetricName+    Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryMetricStatistic+    Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryProjectedMetric+    Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryRecommendationOption+    Amazonka.ComputeOptimizer.Types.LambdaFunctionMetricName+    Amazonka.ComputeOptimizer.Types.LambdaFunctionMetricStatistic+    Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendation+    Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFilter+    Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFilterName+    Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFinding+    Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFindingReasonCode+    Amazonka.ComputeOptimizer.Types.LambdaFunctionUtilizationMetric+    Amazonka.ComputeOptimizer.Types.MemorySizeConfiguration+    Amazonka.ComputeOptimizer.Types.MetricName+    Amazonka.ComputeOptimizer.Types.MetricStatistic+    Amazonka.ComputeOptimizer.Types.MigrationEffort+    Amazonka.ComputeOptimizer.Types.PlatformDifference+    Amazonka.ComputeOptimizer.Types.ProjectedMetric+    Amazonka.ComputeOptimizer.Types.ReasonCodeSummary+    Amazonka.ComputeOptimizer.Types.RecommendationExportJob+    Amazonka.ComputeOptimizer.Types.RecommendationPreferenceName+    Amazonka.ComputeOptimizer.Types.RecommendationPreferences+    Amazonka.ComputeOptimizer.Types.RecommendationPreferencesDetail+    Amazonka.ComputeOptimizer.Types.RecommendationSource+    Amazonka.ComputeOptimizer.Types.RecommendationSourceType+    Amazonka.ComputeOptimizer.Types.RecommendationSummary+    Amazonka.ComputeOptimizer.Types.RecommendedOptionProjectedMetric+    Amazonka.ComputeOptimizer.Types.ResourceType+    Amazonka.ComputeOptimizer.Types.S3Destination+    Amazonka.ComputeOptimizer.Types.S3DestinationConfig+    Amazonka.ComputeOptimizer.Types.SavingsOpportunity+    Amazonka.ComputeOptimizer.Types.Scope+    Amazonka.ComputeOptimizer.Types.ScopeName+    Amazonka.ComputeOptimizer.Types.ServiceConfiguration+    Amazonka.ComputeOptimizer.Types.Status+    Amazonka.ComputeOptimizer.Types.Summary+    Amazonka.ComputeOptimizer.Types.UtilizationMetric+    Amazonka.ComputeOptimizer.Types.VolumeConfiguration+    Amazonka.ComputeOptimizer.Types.VolumeRecommendation+    Amazonka.ComputeOptimizer.Types.VolumeRecommendationOption+    Amazonka.ComputeOptimizer.UpdateEnrollmentStatus+    Amazonka.ComputeOptimizer.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-compute-optimizer-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.ComputeOptimizer+    Test.Amazonka.ComputeOptimizer.Internal+    Test.Amazonka.Gen.ComputeOptimizer++  build-depends:+    , amazonka-compute-optimizer+    , amazonka-core               >=2.0 && <2.1+    , amazonka-test               >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/DeleteRecommendationPreferences.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/DeleteRecommendationPreferencesResponse.proto view
+ fixture/DescribeRecommendationExportJobs.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/DescribeRecommendationExportJobsResponse.proto view
+ fixture/ExportAutoScalingGroupRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/ExportAutoScalingGroupRecommendationsResponse.proto view
+ fixture/ExportEBSVolumeRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/ExportEBSVolumeRecommendationsResponse.proto view
+ fixture/ExportEC2InstanceRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/ExportEC2InstanceRecommendationsResponse.proto view
+ fixture/ExportECSServiceRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/ExportECSServiceRecommendationsResponse.proto view
+ fixture/ExportLambdaFunctionRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/ExportLambdaFunctionRecommendationsResponse.proto view
+ fixture/GetAutoScalingGroupRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetAutoScalingGroupRecommendationsResponse.proto view
+ fixture/GetEBSVolumeRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetEBSVolumeRecommendationsResponse.proto view
+ fixture/GetEC2InstanceRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetEC2InstanceRecommendationsResponse.proto view
+ fixture/GetEC2RecommendationProjectedMetrics.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetEC2RecommendationProjectedMetricsResponse.proto view
+ fixture/GetECSServiceRecommendationProjectedMetrics.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetECSServiceRecommendationProjectedMetricsResponse.proto view
+ fixture/GetECSServiceRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetECSServiceRecommendationsResponse.proto view
+ fixture/GetEffectiveRecommendationPreferences.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetEffectiveRecommendationPreferencesResponse.proto view
+ fixture/GetEnrollmentStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetEnrollmentStatusResponse.proto view
+ fixture/GetEnrollmentStatusesForOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetEnrollmentStatusesForOrganizationResponse.proto view
+ fixture/GetLambdaFunctionRecommendations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetLambdaFunctionRecommendationsResponse.proto view
+ fixture/GetRecommendationPreferences.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetRecommendationPreferencesResponse.proto view
+ fixture/GetRecommendationSummaries.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/GetRecommendationSummariesResponse.proto view
+ fixture/PutRecommendationPreferences.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/PutRecommendationPreferencesResponse.proto view
+ fixture/UpdateEnrollmentStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/compute-optimizer/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  compute-optimizer.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/UpdateEnrollmentStatusResponse.proto view
+ gen/Amazonka/ComputeOptimizer.hs view
@@ -0,0 +1,587 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.ComputeOptimizer+-- 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 @2019-11-01@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Compute Optimizer is a service that analyzes the configuration and+-- utilization metrics of your Amazon Web Services compute resources, such+-- as Amazon EC2 instances, Amazon EC2 Auto Scaling groups, Lambda+-- functions, Amazon EBS volumes, and Amazon ECS services on Fargate. It+-- reports whether your resources are optimal, and generates optimization+-- recommendations to reduce the cost and improve the performance of your+-- workloads. Compute Optimizer also provides recent utilization metric+-- data, in addition to projected utilization metric data for the+-- recommendations, which you can use to evaluate which recommendation+-- provides the best price-performance trade-off. The analysis of your+-- usage patterns can help you decide when to move or resize your running+-- resources, and still meet your performance and capacity requirements.+-- For more information about Compute Optimizer, including the required+-- permissions to use the service, see the+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/ Compute Optimizer User Guide>.+module Amazonka.ComputeOptimizer+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** AccessDeniedException+    _AccessDeniedException,++    -- ** InternalServerException+    _InternalServerException,++    -- ** InvalidParameterValueException+    _InvalidParameterValueException,++    -- ** LimitExceededException+    _LimitExceededException,++    -- ** MissingAuthenticationToken+    _MissingAuthenticationToken,++    -- ** OptInRequiredException+    _OptInRequiredException,++    -- ** ResourceNotFoundException+    _ResourceNotFoundException,++    -- ** ServiceUnavailableException+    _ServiceUnavailableException,++    -- ** ThrottlingException+    _ThrottlingException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** DeleteRecommendationPreferences+    DeleteRecommendationPreferences (DeleteRecommendationPreferences'),+    newDeleteRecommendationPreferences,+    DeleteRecommendationPreferencesResponse (DeleteRecommendationPreferencesResponse'),+    newDeleteRecommendationPreferencesResponse,++    -- ** DescribeRecommendationExportJobs (Paginated)+    DescribeRecommendationExportJobs (DescribeRecommendationExportJobs'),+    newDescribeRecommendationExportJobs,+    DescribeRecommendationExportJobsResponse (DescribeRecommendationExportJobsResponse'),+    newDescribeRecommendationExportJobsResponse,++    -- ** ExportAutoScalingGroupRecommendations+    ExportAutoScalingGroupRecommendations (ExportAutoScalingGroupRecommendations'),+    newExportAutoScalingGroupRecommendations,+    ExportAutoScalingGroupRecommendationsResponse (ExportAutoScalingGroupRecommendationsResponse'),+    newExportAutoScalingGroupRecommendationsResponse,++    -- ** ExportEBSVolumeRecommendations+    ExportEBSVolumeRecommendations (ExportEBSVolumeRecommendations'),+    newExportEBSVolumeRecommendations,+    ExportEBSVolumeRecommendationsResponse (ExportEBSVolumeRecommendationsResponse'),+    newExportEBSVolumeRecommendationsResponse,++    -- ** ExportEC2InstanceRecommendations+    ExportEC2InstanceRecommendations (ExportEC2InstanceRecommendations'),+    newExportEC2InstanceRecommendations,+    ExportEC2InstanceRecommendationsResponse (ExportEC2InstanceRecommendationsResponse'),+    newExportEC2InstanceRecommendationsResponse,++    -- ** ExportECSServiceRecommendations+    ExportECSServiceRecommendations (ExportECSServiceRecommendations'),+    newExportECSServiceRecommendations,+    ExportECSServiceRecommendationsResponse (ExportECSServiceRecommendationsResponse'),+    newExportECSServiceRecommendationsResponse,++    -- ** ExportLambdaFunctionRecommendations+    ExportLambdaFunctionRecommendations (ExportLambdaFunctionRecommendations'),+    newExportLambdaFunctionRecommendations,+    ExportLambdaFunctionRecommendationsResponse (ExportLambdaFunctionRecommendationsResponse'),+    newExportLambdaFunctionRecommendationsResponse,++    -- ** GetAutoScalingGroupRecommendations+    GetAutoScalingGroupRecommendations (GetAutoScalingGroupRecommendations'),+    newGetAutoScalingGroupRecommendations,+    GetAutoScalingGroupRecommendationsResponse (GetAutoScalingGroupRecommendationsResponse'),+    newGetAutoScalingGroupRecommendationsResponse,++    -- ** GetEBSVolumeRecommendations+    GetEBSVolumeRecommendations (GetEBSVolumeRecommendations'),+    newGetEBSVolumeRecommendations,+    GetEBSVolumeRecommendationsResponse (GetEBSVolumeRecommendationsResponse'),+    newGetEBSVolumeRecommendationsResponse,++    -- ** GetEC2InstanceRecommendations+    GetEC2InstanceRecommendations (GetEC2InstanceRecommendations'),+    newGetEC2InstanceRecommendations,+    GetEC2InstanceRecommendationsResponse (GetEC2InstanceRecommendationsResponse'),+    newGetEC2InstanceRecommendationsResponse,++    -- ** GetEC2RecommendationProjectedMetrics+    GetEC2RecommendationProjectedMetrics (GetEC2RecommendationProjectedMetrics'),+    newGetEC2RecommendationProjectedMetrics,+    GetEC2RecommendationProjectedMetricsResponse (GetEC2RecommendationProjectedMetricsResponse'),+    newGetEC2RecommendationProjectedMetricsResponse,++    -- ** GetECSServiceRecommendationProjectedMetrics+    GetECSServiceRecommendationProjectedMetrics (GetECSServiceRecommendationProjectedMetrics'),+    newGetECSServiceRecommendationProjectedMetrics,+    GetECSServiceRecommendationProjectedMetricsResponse (GetECSServiceRecommendationProjectedMetricsResponse'),+    newGetECSServiceRecommendationProjectedMetricsResponse,++    -- ** GetECSServiceRecommendations+    GetECSServiceRecommendations (GetECSServiceRecommendations'),+    newGetECSServiceRecommendations,+    GetECSServiceRecommendationsResponse (GetECSServiceRecommendationsResponse'),+    newGetECSServiceRecommendationsResponse,++    -- ** GetEffectiveRecommendationPreferences+    GetEffectiveRecommendationPreferences (GetEffectiveRecommendationPreferences'),+    newGetEffectiveRecommendationPreferences,+    GetEffectiveRecommendationPreferencesResponse (GetEffectiveRecommendationPreferencesResponse'),+    newGetEffectiveRecommendationPreferencesResponse,++    -- ** GetEnrollmentStatus+    GetEnrollmentStatus (GetEnrollmentStatus'),+    newGetEnrollmentStatus,+    GetEnrollmentStatusResponse (GetEnrollmentStatusResponse'),+    newGetEnrollmentStatusResponse,++    -- ** GetEnrollmentStatusesForOrganization (Paginated)+    GetEnrollmentStatusesForOrganization (GetEnrollmentStatusesForOrganization'),+    newGetEnrollmentStatusesForOrganization,+    GetEnrollmentStatusesForOrganizationResponse (GetEnrollmentStatusesForOrganizationResponse'),+    newGetEnrollmentStatusesForOrganizationResponse,++    -- ** GetLambdaFunctionRecommendations (Paginated)+    GetLambdaFunctionRecommendations (GetLambdaFunctionRecommendations'),+    newGetLambdaFunctionRecommendations,+    GetLambdaFunctionRecommendationsResponse (GetLambdaFunctionRecommendationsResponse'),+    newGetLambdaFunctionRecommendationsResponse,++    -- ** GetRecommendationPreferences (Paginated)+    GetRecommendationPreferences (GetRecommendationPreferences'),+    newGetRecommendationPreferences,+    GetRecommendationPreferencesResponse (GetRecommendationPreferencesResponse'),+    newGetRecommendationPreferencesResponse,++    -- ** GetRecommendationSummaries (Paginated)+    GetRecommendationSummaries (GetRecommendationSummaries'),+    newGetRecommendationSummaries,+    GetRecommendationSummariesResponse (GetRecommendationSummariesResponse'),+    newGetRecommendationSummariesResponse,++    -- ** PutRecommendationPreferences+    PutRecommendationPreferences (PutRecommendationPreferences'),+    newPutRecommendationPreferences,+    PutRecommendationPreferencesResponse (PutRecommendationPreferencesResponse'),+    newPutRecommendationPreferencesResponse,++    -- ** UpdateEnrollmentStatus+    UpdateEnrollmentStatus (UpdateEnrollmentStatus'),+    newUpdateEnrollmentStatus,+    UpdateEnrollmentStatusResponse (UpdateEnrollmentStatusResponse'),+    newUpdateEnrollmentStatusResponse,++    -- * Types++    -- ** AutoScalingConfiguration+    AutoScalingConfiguration (..),++    -- ** CpuVendorArchitecture+    CpuVendorArchitecture (..),++    -- ** Currency+    Currency (..),++    -- ** CurrentPerformanceRisk+    CurrentPerformanceRisk (..),++    -- ** EBSFilterName+    EBSFilterName (..),++    -- ** EBSFinding+    EBSFinding (..),++    -- ** EBSMetricName+    EBSMetricName (..),++    -- ** ECSServiceLaunchType+    ECSServiceLaunchType (..),++    -- ** ECSServiceMetricName+    ECSServiceMetricName (..),++    -- ** ECSServiceMetricStatistic+    ECSServiceMetricStatistic (..),++    -- ** ECSServiceRecommendationFilterName+    ECSServiceRecommendationFilterName (..),++    -- ** ECSServiceRecommendationFinding+    ECSServiceRecommendationFinding (..),++    -- ** ECSServiceRecommendationFindingReasonCode+    ECSServiceRecommendationFindingReasonCode (..),++    -- ** EnhancedInfrastructureMetrics+    EnhancedInfrastructureMetrics (..),++    -- ** EnrollmentFilterName+    EnrollmentFilterName (..),++    -- ** ExportableAutoScalingGroupField+    ExportableAutoScalingGroupField (..),++    -- ** ExportableECSServiceField+    ExportableECSServiceField (..),++    -- ** ExportableInstanceField+    ExportableInstanceField (..),++    -- ** ExportableLambdaFunctionField+    ExportableLambdaFunctionField (..),++    -- ** ExportableVolumeField+    ExportableVolumeField (..),++    -- ** ExternalMetricsSource+    ExternalMetricsSource (..),++    -- ** FileFormat+    FileFormat (..),++    -- ** FilterName+    FilterName (..),++    -- ** Finding+    Finding (..),++    -- ** FindingReasonCode+    FindingReasonCode (..),++    -- ** InferredWorkloadType+    InferredWorkloadType (..),++    -- ** InferredWorkloadTypesPreference+    InferredWorkloadTypesPreference (..),++    -- ** InstanceRecommendationFindingReasonCode+    InstanceRecommendationFindingReasonCode (..),++    -- ** JobFilterName+    JobFilterName (..),++    -- ** JobStatus+    JobStatus (..),++    -- ** LambdaFunctionMemoryMetricName+    LambdaFunctionMemoryMetricName (..),++    -- ** LambdaFunctionMemoryMetricStatistic+    LambdaFunctionMemoryMetricStatistic (..),++    -- ** LambdaFunctionMetricName+    LambdaFunctionMetricName (..),++    -- ** LambdaFunctionMetricStatistic+    LambdaFunctionMetricStatistic (..),++    -- ** LambdaFunctionRecommendationFilterName+    LambdaFunctionRecommendationFilterName (..),++    -- ** LambdaFunctionRecommendationFinding+    LambdaFunctionRecommendationFinding (..),++    -- ** LambdaFunctionRecommendationFindingReasonCode+    LambdaFunctionRecommendationFindingReasonCode (..),++    -- ** MetricName+    MetricName (..),++    -- ** MetricStatistic+    MetricStatistic (..),++    -- ** MigrationEffort+    MigrationEffort (..),++    -- ** PlatformDifference+    PlatformDifference (..),++    -- ** RecommendationPreferenceName+    RecommendationPreferenceName (..),++    -- ** RecommendationSourceType+    RecommendationSourceType (..),++    -- ** ResourceType+    ResourceType (..),++    -- ** ScopeName+    ScopeName (..),++    -- ** Status+    Status (..),++    -- ** AccountEnrollmentStatus+    AccountEnrollmentStatus (AccountEnrollmentStatus'),+    newAccountEnrollmentStatus,++    -- ** AutoScalingGroupConfiguration+    AutoScalingGroupConfiguration (AutoScalingGroupConfiguration'),+    newAutoScalingGroupConfiguration,++    -- ** AutoScalingGroupRecommendation+    AutoScalingGroupRecommendation (AutoScalingGroupRecommendation'),+    newAutoScalingGroupRecommendation,++    -- ** AutoScalingGroupRecommendationOption+    AutoScalingGroupRecommendationOption (AutoScalingGroupRecommendationOption'),+    newAutoScalingGroupRecommendationOption,++    -- ** ContainerConfiguration+    ContainerConfiguration (ContainerConfiguration'),+    newContainerConfiguration,++    -- ** ContainerRecommendation+    ContainerRecommendation (ContainerRecommendation'),+    newContainerRecommendation,++    -- ** CurrentPerformanceRiskRatings+    CurrentPerformanceRiskRatings (CurrentPerformanceRiskRatings'),+    newCurrentPerformanceRiskRatings,++    -- ** EBSFilter+    EBSFilter (EBSFilter'),+    newEBSFilter,++    -- ** EBSUtilizationMetric+    EBSUtilizationMetric (EBSUtilizationMetric'),+    newEBSUtilizationMetric,++    -- ** ECSServiceProjectedMetric+    ECSServiceProjectedMetric (ECSServiceProjectedMetric'),+    newECSServiceProjectedMetric,++    -- ** ECSServiceProjectedUtilizationMetric+    ECSServiceProjectedUtilizationMetric (ECSServiceProjectedUtilizationMetric'),+    newECSServiceProjectedUtilizationMetric,++    -- ** ECSServiceRecommendation+    ECSServiceRecommendation (ECSServiceRecommendation'),+    newECSServiceRecommendation,++    -- ** ECSServiceRecommendationFilter+    ECSServiceRecommendationFilter (ECSServiceRecommendationFilter'),+    newECSServiceRecommendationFilter,++    -- ** ECSServiceRecommendationOption+    ECSServiceRecommendationOption (ECSServiceRecommendationOption'),+    newECSServiceRecommendationOption,++    -- ** ECSServiceRecommendedOptionProjectedMetric+    ECSServiceRecommendedOptionProjectedMetric (ECSServiceRecommendedOptionProjectedMetric'),+    newECSServiceRecommendedOptionProjectedMetric,++    -- ** ECSServiceUtilizationMetric+    ECSServiceUtilizationMetric (ECSServiceUtilizationMetric'),+    newECSServiceUtilizationMetric,++    -- ** EffectiveRecommendationPreferences+    EffectiveRecommendationPreferences (EffectiveRecommendationPreferences'),+    newEffectiveRecommendationPreferences,++    -- ** EnrollmentFilter+    EnrollmentFilter (EnrollmentFilter'),+    newEnrollmentFilter,++    -- ** EstimatedMonthlySavings+    EstimatedMonthlySavings (EstimatedMonthlySavings'),+    newEstimatedMonthlySavings,++    -- ** ExportDestination+    ExportDestination (ExportDestination'),+    newExportDestination,++    -- ** ExternalMetricsPreference+    ExternalMetricsPreference (ExternalMetricsPreference'),+    newExternalMetricsPreference,++    -- ** Filter+    Filter (Filter'),+    newFilter,++    -- ** GetRecommendationError+    GetRecommendationError (GetRecommendationError'),+    newGetRecommendationError,++    -- ** InstanceRecommendation+    InstanceRecommendation (InstanceRecommendation'),+    newInstanceRecommendation,++    -- ** InstanceRecommendationOption+    InstanceRecommendationOption (InstanceRecommendationOption'),+    newInstanceRecommendationOption,++    -- ** JobFilter+    JobFilter (JobFilter'),+    newJobFilter,++    -- ** LambdaFunctionMemoryProjectedMetric+    LambdaFunctionMemoryProjectedMetric (LambdaFunctionMemoryProjectedMetric'),+    newLambdaFunctionMemoryProjectedMetric,++    -- ** LambdaFunctionMemoryRecommendationOption+    LambdaFunctionMemoryRecommendationOption (LambdaFunctionMemoryRecommendationOption'),+    newLambdaFunctionMemoryRecommendationOption,++    -- ** LambdaFunctionRecommendation+    LambdaFunctionRecommendation (LambdaFunctionRecommendation'),+    newLambdaFunctionRecommendation,++    -- ** LambdaFunctionRecommendationFilter+    LambdaFunctionRecommendationFilter (LambdaFunctionRecommendationFilter'),+    newLambdaFunctionRecommendationFilter,++    -- ** LambdaFunctionUtilizationMetric+    LambdaFunctionUtilizationMetric (LambdaFunctionUtilizationMetric'),+    newLambdaFunctionUtilizationMetric,++    -- ** MemorySizeConfiguration+    MemorySizeConfiguration (MemorySizeConfiguration'),+    newMemorySizeConfiguration,++    -- ** ProjectedMetric+    ProjectedMetric (ProjectedMetric'),+    newProjectedMetric,++    -- ** ReasonCodeSummary+    ReasonCodeSummary (ReasonCodeSummary'),+    newReasonCodeSummary,++    -- ** RecommendationExportJob+    RecommendationExportJob (RecommendationExportJob'),+    newRecommendationExportJob,++    -- ** RecommendationPreferences+    RecommendationPreferences (RecommendationPreferences'),+    newRecommendationPreferences,++    -- ** RecommendationPreferencesDetail+    RecommendationPreferencesDetail (RecommendationPreferencesDetail'),+    newRecommendationPreferencesDetail,++    -- ** RecommendationSource+    RecommendationSource (RecommendationSource'),+    newRecommendationSource,++    -- ** RecommendationSummary+    RecommendationSummary (RecommendationSummary'),+    newRecommendationSummary,++    -- ** RecommendedOptionProjectedMetric+    RecommendedOptionProjectedMetric (RecommendedOptionProjectedMetric'),+    newRecommendedOptionProjectedMetric,++    -- ** S3Destination+    S3Destination (S3Destination'),+    newS3Destination,++    -- ** S3DestinationConfig+    S3DestinationConfig (S3DestinationConfig'),+    newS3DestinationConfig,++    -- ** SavingsOpportunity+    SavingsOpportunity (SavingsOpportunity'),+    newSavingsOpportunity,++    -- ** Scope+    Scope (Scope'),+    newScope,++    -- ** ServiceConfiguration+    ServiceConfiguration (ServiceConfiguration'),+    newServiceConfiguration,++    -- ** Summary+    Summary (Summary'),+    newSummary,++    -- ** UtilizationMetric+    UtilizationMetric (UtilizationMetric'),+    newUtilizationMetric,++    -- ** VolumeConfiguration+    VolumeConfiguration (VolumeConfiguration'),+    newVolumeConfiguration,++    -- ** VolumeRecommendation+    VolumeRecommendation (VolumeRecommendation'),+    newVolumeRecommendation,++    -- ** VolumeRecommendationOption+    VolumeRecommendationOption (VolumeRecommendationOption'),+    newVolumeRecommendationOption,+  )+where++import Amazonka.ComputeOptimizer.DeleteRecommendationPreferences+import Amazonka.ComputeOptimizer.DescribeRecommendationExportJobs+import Amazonka.ComputeOptimizer.ExportAutoScalingGroupRecommendations+import Amazonka.ComputeOptimizer.ExportEBSVolumeRecommendations+import Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations+import Amazonka.ComputeOptimizer.ExportECSServiceRecommendations+import Amazonka.ComputeOptimizer.ExportLambdaFunctionRecommendations+import Amazonka.ComputeOptimizer.GetAutoScalingGroupRecommendations+import Amazonka.ComputeOptimizer.GetEBSVolumeRecommendations+import Amazonka.ComputeOptimizer.GetEC2InstanceRecommendations+import Amazonka.ComputeOptimizer.GetEC2RecommendationProjectedMetrics+import Amazonka.ComputeOptimizer.GetECSServiceRecommendationProjectedMetrics+import Amazonka.ComputeOptimizer.GetECSServiceRecommendations+import Amazonka.ComputeOptimizer.GetEffectiveRecommendationPreferences+import Amazonka.ComputeOptimizer.GetEnrollmentStatus+import Amazonka.ComputeOptimizer.GetEnrollmentStatusesForOrganization+import Amazonka.ComputeOptimizer.GetLambdaFunctionRecommendations+import Amazonka.ComputeOptimizer.GetRecommendationPreferences+import Amazonka.ComputeOptimizer.GetRecommendationSummaries+import Amazonka.ComputeOptimizer.Lens+import Amazonka.ComputeOptimizer.PutRecommendationPreferences+import Amazonka.ComputeOptimizer.Types+import Amazonka.ComputeOptimizer.UpdateEnrollmentStatus+import Amazonka.ComputeOptimizer.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 'ComputeOptimizer'.++-- $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/ComputeOptimizer/DeleteRecommendationPreferences.hs view
@@ -0,0 +1,257 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.DeleteRecommendationPreferences+-- 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 recommendation preference, such as enhanced infrastructure+-- metrics.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+module Amazonka.ComputeOptimizer.DeleteRecommendationPreferences+  ( -- * Creating a Request+    DeleteRecommendationPreferences (..),+    newDeleteRecommendationPreferences,++    -- * Request Lenses+    deleteRecommendationPreferences_scope,+    deleteRecommendationPreferences_resourceType,+    deleteRecommendationPreferences_recommendationPreferenceNames,++    -- * Destructuring the Response+    DeleteRecommendationPreferencesResponse (..),+    newDeleteRecommendationPreferencesResponse,++    -- * Response Lenses+    deleteRecommendationPreferencesResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newDeleteRecommendationPreferences' smart constructor.+data DeleteRecommendationPreferences = DeleteRecommendationPreferences'+  { -- | An object that describes the scope of the recommendation preference to+    -- delete.+    --+    -- You can delete recommendation preferences that are created at the+    -- organization level (for management accounts of an organization only),+    -- account level, and resource level. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+    -- in the /Compute Optimizer User Guide/.+    scope :: Prelude.Maybe Scope,+    -- | The target resource type of the recommendation preference to delete.+    --+    -- The @Ec2Instance@ option encompasses standalone instances and instances+    -- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+    -- encompasses only instances that are part of an Auto Scaling group.+    --+    -- The valid values for this parameter are @Ec2Instance@ and+    -- @AutoScalingGroup@.+    resourceType :: ResourceType,+    -- | The name of the recommendation preference to delete.+    recommendationPreferenceNames :: [RecommendationPreferenceName]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRecommendationPreferences' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'scope', 'deleteRecommendationPreferences_scope' - An object that describes the scope of the recommendation preference to+-- delete.+--+-- You can delete recommendation preferences that are created at the+-- organization level (for management accounts of an organization only),+-- account level, and resource level. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- 'resourceType', 'deleteRecommendationPreferences_resourceType' - The target resource type of the recommendation preference to delete.+--+-- The @Ec2Instance@ option encompasses standalone instances and instances+-- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+-- encompasses only instances that are part of an Auto Scaling group.+--+-- The valid values for this parameter are @Ec2Instance@ and+-- @AutoScalingGroup@.+--+-- 'recommendationPreferenceNames', 'deleteRecommendationPreferences_recommendationPreferenceNames' - The name of the recommendation preference to delete.+newDeleteRecommendationPreferences ::+  -- | 'resourceType'+  ResourceType ->+  DeleteRecommendationPreferences+newDeleteRecommendationPreferences pResourceType_ =+  DeleteRecommendationPreferences'+    { scope =+        Prelude.Nothing,+      resourceType = pResourceType_,+      recommendationPreferenceNames =+        Prelude.mempty+    }++-- | An object that describes the scope of the recommendation preference to+-- delete.+--+-- You can delete recommendation preferences that are created at the+-- organization level (for management accounts of an organization only),+-- account level, and resource level. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+deleteRecommendationPreferences_scope :: Lens.Lens' DeleteRecommendationPreferences (Prelude.Maybe Scope)+deleteRecommendationPreferences_scope = Lens.lens (\DeleteRecommendationPreferences' {scope} -> scope) (\s@DeleteRecommendationPreferences' {} a -> s {scope = a} :: DeleteRecommendationPreferences)++-- | The target resource type of the recommendation preference to delete.+--+-- The @Ec2Instance@ option encompasses standalone instances and instances+-- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+-- encompasses only instances that are part of an Auto Scaling group.+--+-- The valid values for this parameter are @Ec2Instance@ and+-- @AutoScalingGroup@.+deleteRecommendationPreferences_resourceType :: Lens.Lens' DeleteRecommendationPreferences ResourceType+deleteRecommendationPreferences_resourceType = Lens.lens (\DeleteRecommendationPreferences' {resourceType} -> resourceType) (\s@DeleteRecommendationPreferences' {} a -> s {resourceType = a} :: DeleteRecommendationPreferences)++-- | The name of the recommendation preference to delete.+deleteRecommendationPreferences_recommendationPreferenceNames :: Lens.Lens' DeleteRecommendationPreferences [RecommendationPreferenceName]+deleteRecommendationPreferences_recommendationPreferenceNames = Lens.lens (\DeleteRecommendationPreferences' {recommendationPreferenceNames} -> recommendationPreferenceNames) (\s@DeleteRecommendationPreferences' {} a -> s {recommendationPreferenceNames = a} :: DeleteRecommendationPreferences) Prelude.. Lens.coerced++instance+  Core.AWSRequest+    DeleteRecommendationPreferences+  where+  type+    AWSResponse DeleteRecommendationPreferences =+      DeleteRecommendationPreferencesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          DeleteRecommendationPreferencesResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    DeleteRecommendationPreferences+  where+  hashWithSalt+    _salt+    DeleteRecommendationPreferences' {..} =+      _salt+        `Prelude.hashWithSalt` scope+        `Prelude.hashWithSalt` resourceType+        `Prelude.hashWithSalt` recommendationPreferenceNames++instance+  Prelude.NFData+    DeleteRecommendationPreferences+  where+  rnf DeleteRecommendationPreferences' {..} =+    Prelude.rnf scope+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf recommendationPreferenceNames++instance+  Data.ToHeaders+    DeleteRecommendationPreferences+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.DeleteRecommendationPreferences" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteRecommendationPreferences where+  toJSON DeleteRecommendationPreferences' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("scope" Data..=) Prelude.<$> scope,+            Prelude.Just ("resourceType" Data..= resourceType),+            Prelude.Just+              ( "recommendationPreferenceNames"+                  Data..= recommendationPreferenceNames+              )+          ]+      )++instance Data.ToPath DeleteRecommendationPreferences where+  toPath = Prelude.const "/"++instance Data.ToQuery DeleteRecommendationPreferences where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteRecommendationPreferencesResponse' smart constructor.+data DeleteRecommendationPreferencesResponse = DeleteRecommendationPreferencesResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRecommendationPreferencesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'deleteRecommendationPreferencesResponse_httpStatus' - The response's http status code.+newDeleteRecommendationPreferencesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteRecommendationPreferencesResponse+newDeleteRecommendationPreferencesResponse+  pHttpStatus_ =+    DeleteRecommendationPreferencesResponse'+      { httpStatus =+          pHttpStatus_+      }++-- | The response's http status code.+deleteRecommendationPreferencesResponse_httpStatus :: Lens.Lens' DeleteRecommendationPreferencesResponse Prelude.Int+deleteRecommendationPreferencesResponse_httpStatus = Lens.lens (\DeleteRecommendationPreferencesResponse' {httpStatus} -> httpStatus) (\s@DeleteRecommendationPreferencesResponse' {} a -> s {httpStatus = a} :: DeleteRecommendationPreferencesResponse)++instance+  Prelude.NFData+    DeleteRecommendationPreferencesResponse+  where+  rnf DeleteRecommendationPreferencesResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/DescribeRecommendationExportJobs.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.ComputeOptimizer.DescribeRecommendationExportJobs+-- 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 recommendation export jobs created in the last seven days.+--+-- Use the ExportAutoScalingGroupRecommendations or+-- ExportEC2InstanceRecommendations actions to request an export of your+-- recommendations. Then use the DescribeRecommendationExportJobs action to+-- view your export jobs.+--+-- This operation returns paginated results.+module Amazonka.ComputeOptimizer.DescribeRecommendationExportJobs+  ( -- * Creating a Request+    DescribeRecommendationExportJobs (..),+    newDescribeRecommendationExportJobs,++    -- * Request Lenses+    describeRecommendationExportJobs_filters,+    describeRecommendationExportJobs_jobIds,+    describeRecommendationExportJobs_maxResults,+    describeRecommendationExportJobs_nextToken,++    -- * Destructuring the Response+    DescribeRecommendationExportJobsResponse (..),+    newDescribeRecommendationExportJobsResponse,++    -- * Response Lenses+    describeRecommendationExportJobsResponse_nextToken,+    describeRecommendationExportJobsResponse_recommendationExportJobs,+    describeRecommendationExportJobsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newDescribeRecommendationExportJobs' smart constructor.+data DescribeRecommendationExportJobs = DescribeRecommendationExportJobs'+  { -- | An array of objects to specify a filter that returns a more specific+    -- list of export jobs.+    filters :: Prelude.Maybe [JobFilter],+    -- | The identification numbers of the export jobs to return.+    --+    -- An export job ID is returned when you create an export using the+    -- ExportAutoScalingGroupRecommendations or+    -- ExportEC2InstanceRecommendations actions.+    --+    -- All export jobs created in the last seven days are returned if this+    -- parameter is omitted.+    jobIds :: Prelude.Maybe [Prelude.Text],+    -- | The maximum number of export jobs to return with a single request.+    --+    -- To retrieve the remaining results, make another request with the+    -- returned @nextToken@ value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token to advance to the next page of export jobs.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeRecommendationExportJobs' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'filters', 'describeRecommendationExportJobs_filters' - An array of objects to specify a filter that returns a more specific+-- list of export jobs.+--+-- 'jobIds', 'describeRecommendationExportJobs_jobIds' - The identification numbers of the export jobs to return.+--+-- An export job ID is returned when you create an export using the+-- ExportAutoScalingGroupRecommendations or+-- ExportEC2InstanceRecommendations actions.+--+-- All export jobs created in the last seven days are returned if this+-- parameter is omitted.+--+-- 'maxResults', 'describeRecommendationExportJobs_maxResults' - The maximum number of export jobs to return with a single request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+--+-- 'nextToken', 'describeRecommendationExportJobs_nextToken' - The token to advance to the next page of export jobs.+newDescribeRecommendationExportJobs ::+  DescribeRecommendationExportJobs+newDescribeRecommendationExportJobs =+  DescribeRecommendationExportJobs'+    { filters =+        Prelude.Nothing,+      jobIds = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | An array of objects to specify a filter that returns a more specific+-- list of export jobs.+describeRecommendationExportJobs_filters :: Lens.Lens' DescribeRecommendationExportJobs (Prelude.Maybe [JobFilter])+describeRecommendationExportJobs_filters = Lens.lens (\DescribeRecommendationExportJobs' {filters} -> filters) (\s@DescribeRecommendationExportJobs' {} a -> s {filters = a} :: DescribeRecommendationExportJobs) Prelude.. Lens.mapping Lens.coerced++-- | The identification numbers of the export jobs to return.+--+-- An export job ID is returned when you create an export using the+-- ExportAutoScalingGroupRecommendations or+-- ExportEC2InstanceRecommendations actions.+--+-- All export jobs created in the last seven days are returned if this+-- parameter is omitted.+describeRecommendationExportJobs_jobIds :: Lens.Lens' DescribeRecommendationExportJobs (Prelude.Maybe [Prelude.Text])+describeRecommendationExportJobs_jobIds = Lens.lens (\DescribeRecommendationExportJobs' {jobIds} -> jobIds) (\s@DescribeRecommendationExportJobs' {} a -> s {jobIds = a} :: DescribeRecommendationExportJobs) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of export jobs to return with a single request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+describeRecommendationExportJobs_maxResults :: Lens.Lens' DescribeRecommendationExportJobs (Prelude.Maybe Prelude.Natural)+describeRecommendationExportJobs_maxResults = Lens.lens (\DescribeRecommendationExportJobs' {maxResults} -> maxResults) (\s@DescribeRecommendationExportJobs' {} a -> s {maxResults = a} :: DescribeRecommendationExportJobs)++-- | The token to advance to the next page of export jobs.+describeRecommendationExportJobs_nextToken :: Lens.Lens' DescribeRecommendationExportJobs (Prelude.Maybe Prelude.Text)+describeRecommendationExportJobs_nextToken = Lens.lens (\DescribeRecommendationExportJobs' {nextToken} -> nextToken) (\s@DescribeRecommendationExportJobs' {} a -> s {nextToken = a} :: DescribeRecommendationExportJobs)++instance+  Core.AWSPager+    DescribeRecommendationExportJobs+  where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? describeRecommendationExportJobsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? describeRecommendationExportJobsResponse_recommendationExportJobs+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& describeRecommendationExportJobs_nextToken+          Lens..~ rs+          Lens.^? describeRecommendationExportJobsResponse_nextToken+          Prelude.. Lens._Just++instance+  Core.AWSRequest+    DescribeRecommendationExportJobs+  where+  type+    AWSResponse DescribeRecommendationExportJobs =+      DescribeRecommendationExportJobsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DescribeRecommendationExportJobsResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> ( x+                            Data..?> "recommendationExportJobs"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    DescribeRecommendationExportJobs+  where+  hashWithSalt+    _salt+    DescribeRecommendationExportJobs' {..} =+      _salt+        `Prelude.hashWithSalt` filters+        `Prelude.hashWithSalt` jobIds+        `Prelude.hashWithSalt` maxResults+        `Prelude.hashWithSalt` nextToken++instance+  Prelude.NFData+    DescribeRecommendationExportJobs+  where+  rnf DescribeRecommendationExportJobs' {..} =+    Prelude.rnf filters+      `Prelude.seq` Prelude.rnf jobIds+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance+  Data.ToHeaders+    DescribeRecommendationExportJobs+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.DescribeRecommendationExportJobs" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DescribeRecommendationExportJobs where+  toJSON DescribeRecommendationExportJobs' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("filters" Data..=) Prelude.<$> filters,+            ("jobIds" Data..=) Prelude.<$> jobIds,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath DescribeRecommendationExportJobs where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    DescribeRecommendationExportJobs+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeRecommendationExportJobsResponse' smart constructor.+data DescribeRecommendationExportJobsResponse = DescribeRecommendationExportJobsResponse'+  { -- | The token to use to advance to the next page of export jobs.+    --+    -- This value is null when there are no more pages of export jobs to+    -- return.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that describe recommendation export jobs.+    recommendationExportJobs :: Prelude.Maybe [RecommendationExportJob],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeRecommendationExportJobsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'describeRecommendationExportJobsResponse_nextToken' - The token to use to advance to the next page of export jobs.+--+-- This value is null when there are no more pages of export jobs to+-- return.+--+-- 'recommendationExportJobs', 'describeRecommendationExportJobsResponse_recommendationExportJobs' - An array of objects that describe recommendation export jobs.+--+-- 'httpStatus', 'describeRecommendationExportJobsResponse_httpStatus' - The response's http status code.+newDescribeRecommendationExportJobsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DescribeRecommendationExportJobsResponse+newDescribeRecommendationExportJobsResponse+  pHttpStatus_ =+    DescribeRecommendationExportJobsResponse'+      { nextToken =+          Prelude.Nothing,+        recommendationExportJobs =+          Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The token to use to advance to the next page of export jobs.+--+-- This value is null when there are no more pages of export jobs to+-- return.+describeRecommendationExportJobsResponse_nextToken :: Lens.Lens' DescribeRecommendationExportJobsResponse (Prelude.Maybe Prelude.Text)+describeRecommendationExportJobsResponse_nextToken = Lens.lens (\DescribeRecommendationExportJobsResponse' {nextToken} -> nextToken) (\s@DescribeRecommendationExportJobsResponse' {} a -> s {nextToken = a} :: DescribeRecommendationExportJobsResponse)++-- | An array of objects that describe recommendation export jobs.+describeRecommendationExportJobsResponse_recommendationExportJobs :: Lens.Lens' DescribeRecommendationExportJobsResponse (Prelude.Maybe [RecommendationExportJob])+describeRecommendationExportJobsResponse_recommendationExportJobs = Lens.lens (\DescribeRecommendationExportJobsResponse' {recommendationExportJobs} -> recommendationExportJobs) (\s@DescribeRecommendationExportJobsResponse' {} a -> s {recommendationExportJobs = a} :: DescribeRecommendationExportJobsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+describeRecommendationExportJobsResponse_httpStatus :: Lens.Lens' DescribeRecommendationExportJobsResponse Prelude.Int+describeRecommendationExportJobsResponse_httpStatus = Lens.lens (\DescribeRecommendationExportJobsResponse' {httpStatus} -> httpStatus) (\s@DescribeRecommendationExportJobsResponse' {} a -> s {httpStatus = a} :: DescribeRecommendationExportJobsResponse)++instance+  Prelude.NFData+    DescribeRecommendationExportJobsResponse+  where+  rnf DescribeRecommendationExportJobsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf recommendationExportJobs+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/ExportAutoScalingGroupRecommendations.hs view
@@ -0,0 +1,471 @@+{-# 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.ComputeOptimizer.ExportAutoScalingGroupRecommendations+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Exports optimization recommendations for Auto Scaling groups.+--+-- Recommendations are exported in a comma-separated values (.csv) file,+-- and its metadata in a JavaScript Object Notation (JSON) (.json) file, to+-- an existing Amazon Simple Storage Service (Amazon S3) bucket that you+-- specify. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html Exporting Recommendations>+-- in the /Compute Optimizer User Guide/.+--+-- You can have only one Auto Scaling group export job in progress per+-- Amazon Web Services Region.+module Amazonka.ComputeOptimizer.ExportAutoScalingGroupRecommendations+  ( -- * Creating a Request+    ExportAutoScalingGroupRecommendations (..),+    newExportAutoScalingGroupRecommendations,++    -- * Request Lenses+    exportAutoScalingGroupRecommendations_accountIds,+    exportAutoScalingGroupRecommendations_fieldsToExport,+    exportAutoScalingGroupRecommendations_fileFormat,+    exportAutoScalingGroupRecommendations_filters,+    exportAutoScalingGroupRecommendations_includeMemberAccounts,+    exportAutoScalingGroupRecommendations_recommendationPreferences,+    exportAutoScalingGroupRecommendations_s3DestinationConfig,++    -- * Destructuring the Response+    ExportAutoScalingGroupRecommendationsResponse (..),+    newExportAutoScalingGroupRecommendationsResponse,++    -- * Response Lenses+    exportAutoScalingGroupRecommendationsResponse_jobId,+    exportAutoScalingGroupRecommendationsResponse_s3Destination,+    exportAutoScalingGroupRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newExportAutoScalingGroupRecommendations' smart constructor.+data ExportAutoScalingGroupRecommendations = ExportAutoScalingGroupRecommendations'+  { -- | The IDs of the Amazon Web Services accounts for which to export Auto+    -- Scaling group recommendations.+    --+    -- If your account is the management account of an organization, use this+    -- parameter to specify the member account for which you want to export+    -- recommendations.+    --+    -- This parameter cannot be specified together with the include member+    -- accounts parameter. The parameters are mutually exclusive.+    --+    -- Recommendations for member accounts are not included in the export if+    -- this parameter, or the include member accounts parameter, is omitted.+    --+    -- You can specify multiple account IDs per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | The recommendations data to include in the export file. For more+    -- information about the fields that can be exported, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+    -- in the /Compute Optimizer User Guide/.+    fieldsToExport :: Prelude.Maybe [ExportableAutoScalingGroupField],+    -- | The format of the export file.+    --+    -- The only export file format currently supported is @Csv@.+    fileFormat :: Prelude.Maybe FileFormat,+    -- | An array of objects to specify a filter that exports a more specific set+    -- of Auto Scaling group recommendations.+    filters :: Prelude.Maybe [Filter],+    -- | Indicates whether to include recommendations for resources in all member+    -- accounts of the organization if your account is the management account+    -- of an organization.+    --+    -- The member accounts must also be opted in to Compute Optimizer, and+    -- trusted access for Compute Optimizer must be enabled in the organization+    -- account. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+    -- in the /Compute Optimizer User Guide/.+    --+    -- Recommendations for member accounts of the organization are not included+    -- in the export file if this parameter is omitted.+    --+    -- This parameter cannot be specified together with the account IDs+    -- parameter. The parameters are mutually exclusive.+    --+    -- Recommendations for member accounts are not included in the export if+    -- this parameter, or the account IDs parameter, is omitted.+    includeMemberAccounts :: Prelude.Maybe Prelude.Bool,+    -- | An object to specify the preferences for the Auto Scaling group+    -- recommendations to export.+    recommendationPreferences :: Prelude.Maybe RecommendationPreferences,+    -- | An object to specify the destination Amazon Simple Storage Service+    -- (Amazon S3) bucket name and key prefix for the export job.+    --+    -- You must create the destination Amazon S3 bucket for your+    -- recommendations export before you create the export job. Compute+    -- Optimizer does not create the S3 bucket for you. After you create the S3+    -- bucket, ensure that it has the required permissions policy to allow+    -- Compute Optimizer to write the export file to it. If you plan to specify+    -- an object prefix when you create the export job, you must include the+    -- object prefix in the policy that you add to the S3 bucket. For more+    -- information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>+    -- in the /Compute Optimizer User Guide/.+    s3DestinationConfig :: S3DestinationConfig+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportAutoScalingGroupRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'exportAutoScalingGroupRecommendations_accountIds' - The IDs of the Amazon Web Services accounts for which to export Auto+-- Scaling group recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to export+-- recommendations.+--+-- This parameter cannot be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the include member accounts parameter, is omitted.+--+-- You can specify multiple account IDs per request.+--+-- 'fieldsToExport', 'exportAutoScalingGroupRecommendations_fieldsToExport' - The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+--+-- 'fileFormat', 'exportAutoScalingGroupRecommendations_fileFormat' - The format of the export file.+--+-- The only export file format currently supported is @Csv@.+--+-- 'filters', 'exportAutoScalingGroupRecommendations_filters' - An array of objects to specify a filter that exports a more specific set+-- of Auto Scaling group recommendations.+--+-- 'includeMemberAccounts', 'exportAutoScalingGroupRecommendations_includeMemberAccounts' - Indicates whether to include recommendations for resources in all member+-- accounts of the organization if your account is the management account+-- of an organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- Recommendations for member accounts of the organization are not included+-- in the export file if this parameter is omitted.+--+-- This parameter cannot be specified together with the account IDs+-- parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the account IDs parameter, is omitted.+--+-- 'recommendationPreferences', 'exportAutoScalingGroupRecommendations_recommendationPreferences' - An object to specify the preferences for the Auto Scaling group+-- recommendations to export.+--+-- 's3DestinationConfig', 'exportAutoScalingGroupRecommendations_s3DestinationConfig' - An object to specify the destination Amazon Simple Storage Service+-- (Amazon S3) bucket name and key prefix for the export job.+--+-- You must create the destination Amazon S3 bucket for your+-- recommendations export before you create the export job. Compute+-- Optimizer does not create the S3 bucket for you. After you create the S3+-- bucket, ensure that it has the required permissions policy to allow+-- Compute Optimizer to write the export file to it. If you plan to specify+-- an object prefix when you create the export job, you must include the+-- object prefix in the policy that you add to the S3 bucket. For more+-- information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>+-- in the /Compute Optimizer User Guide/.+newExportAutoScalingGroupRecommendations ::+  -- | 's3DestinationConfig'+  S3DestinationConfig ->+  ExportAutoScalingGroupRecommendations+newExportAutoScalingGroupRecommendations+  pS3DestinationConfig_ =+    ExportAutoScalingGroupRecommendations'+      { accountIds =+          Prelude.Nothing,+        fieldsToExport = Prelude.Nothing,+        fileFormat = Prelude.Nothing,+        filters = Prelude.Nothing,+        includeMemberAccounts =+          Prelude.Nothing,+        recommendationPreferences =+          Prelude.Nothing,+        s3DestinationConfig =+          pS3DestinationConfig_+      }++-- | The IDs of the Amazon Web Services accounts for which to export Auto+-- Scaling group recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to export+-- recommendations.+--+-- This parameter cannot be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the include member accounts parameter, is omitted.+--+-- You can specify multiple account IDs per request.+exportAutoScalingGroupRecommendations_accountIds :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [Prelude.Text])+exportAutoScalingGroupRecommendations_accountIds = Lens.lens (\ExportAutoScalingGroupRecommendations' {accountIds} -> accountIds) (\s@ExportAutoScalingGroupRecommendations' {} a -> s {accountIds = a} :: ExportAutoScalingGroupRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+exportAutoScalingGroupRecommendations_fieldsToExport :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [ExportableAutoScalingGroupField])+exportAutoScalingGroupRecommendations_fieldsToExport = Lens.lens (\ExportAutoScalingGroupRecommendations' {fieldsToExport} -> fieldsToExport) (\s@ExportAutoScalingGroupRecommendations' {} a -> s {fieldsToExport = a} :: ExportAutoScalingGroupRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The format of the export file.+--+-- The only export file format currently supported is @Csv@.+exportAutoScalingGroupRecommendations_fileFormat :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe FileFormat)+exportAutoScalingGroupRecommendations_fileFormat = Lens.lens (\ExportAutoScalingGroupRecommendations' {fileFormat} -> fileFormat) (\s@ExportAutoScalingGroupRecommendations' {} a -> s {fileFormat = a} :: ExportAutoScalingGroupRecommendations)++-- | An array of objects to specify a filter that exports a more specific set+-- of Auto Scaling group recommendations.+exportAutoScalingGroupRecommendations_filters :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe [Filter])+exportAutoScalingGroupRecommendations_filters = Lens.lens (\ExportAutoScalingGroupRecommendations' {filters} -> filters) (\s@ExportAutoScalingGroupRecommendations' {} a -> s {filters = a} :: ExportAutoScalingGroupRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | Indicates whether to include recommendations for resources in all member+-- accounts of the organization if your account is the management account+-- of an organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- Recommendations for member accounts of the organization are not included+-- in the export file if this parameter is omitted.+--+-- This parameter cannot be specified together with the account IDs+-- parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the account IDs parameter, is omitted.+exportAutoScalingGroupRecommendations_includeMemberAccounts :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe Prelude.Bool)+exportAutoScalingGroupRecommendations_includeMemberAccounts = Lens.lens (\ExportAutoScalingGroupRecommendations' {includeMemberAccounts} -> includeMemberAccounts) (\s@ExportAutoScalingGroupRecommendations' {} a -> s {includeMemberAccounts = a} :: ExportAutoScalingGroupRecommendations)++-- | An object to specify the preferences for the Auto Scaling group+-- recommendations to export.+exportAutoScalingGroupRecommendations_recommendationPreferences :: Lens.Lens' ExportAutoScalingGroupRecommendations (Prelude.Maybe RecommendationPreferences)+exportAutoScalingGroupRecommendations_recommendationPreferences = Lens.lens (\ExportAutoScalingGroupRecommendations' {recommendationPreferences} -> recommendationPreferences) (\s@ExportAutoScalingGroupRecommendations' {} a -> s {recommendationPreferences = a} :: ExportAutoScalingGroupRecommendations)++-- | An object to specify the destination Amazon Simple Storage Service+-- (Amazon S3) bucket name and key prefix for the export job.+--+-- You must create the destination Amazon S3 bucket for your+-- recommendations export before you create the export job. Compute+-- Optimizer does not create the S3 bucket for you. After you create the S3+-- bucket, ensure that it has the required permissions policy to allow+-- Compute Optimizer to write the export file to it. If you plan to specify+-- an object prefix when you create the export job, you must include the+-- object prefix in the policy that you add to the S3 bucket. For more+-- information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>+-- in the /Compute Optimizer User Guide/.+exportAutoScalingGroupRecommendations_s3DestinationConfig :: Lens.Lens' ExportAutoScalingGroupRecommendations S3DestinationConfig+exportAutoScalingGroupRecommendations_s3DestinationConfig = Lens.lens (\ExportAutoScalingGroupRecommendations' {s3DestinationConfig} -> s3DestinationConfig) (\s@ExportAutoScalingGroupRecommendations' {} a -> s {s3DestinationConfig = a} :: ExportAutoScalingGroupRecommendations)++instance+  Core.AWSRequest+    ExportAutoScalingGroupRecommendations+  where+  type+    AWSResponse+      ExportAutoScalingGroupRecommendations =+      ExportAutoScalingGroupRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ExportAutoScalingGroupRecommendationsResponse'+            Prelude.<$> (x Data..?> "jobId")+            Prelude.<*> (x Data..?> "s3Destination")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    ExportAutoScalingGroupRecommendations+  where+  hashWithSalt+    _salt+    ExportAutoScalingGroupRecommendations' {..} =+      _salt+        `Prelude.hashWithSalt` accountIds+        `Prelude.hashWithSalt` fieldsToExport+        `Prelude.hashWithSalt` fileFormat+        `Prelude.hashWithSalt` filters+        `Prelude.hashWithSalt` includeMemberAccounts+        `Prelude.hashWithSalt` recommendationPreferences+        `Prelude.hashWithSalt` s3DestinationConfig++instance+  Prelude.NFData+    ExportAutoScalingGroupRecommendations+  where+  rnf ExportAutoScalingGroupRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf fieldsToExport+      `Prelude.seq` Prelude.rnf fileFormat+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf includeMemberAccounts+      `Prelude.seq` Prelude.rnf recommendationPreferences+      `Prelude.seq` Prelude.rnf s3DestinationConfig++instance+  Data.ToHeaders+    ExportAutoScalingGroupRecommendations+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.ExportAutoScalingGroupRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance+  Data.ToJSON+    ExportAutoScalingGroupRecommendations+  where+  toJSON ExportAutoScalingGroupRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("fieldsToExport" Data..=)+              Prelude.<$> fieldsToExport,+            ("fileFormat" Data..=) Prelude.<$> fileFormat,+            ("filters" Data..=) Prelude.<$> filters,+            ("includeMemberAccounts" Data..=)+              Prelude.<$> includeMemberAccounts,+            ("recommendationPreferences" Data..=)+              Prelude.<$> recommendationPreferences,+            Prelude.Just+              ("s3DestinationConfig" Data..= s3DestinationConfig)+          ]+      )++instance+  Data.ToPath+    ExportAutoScalingGroupRecommendations+  where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    ExportAutoScalingGroupRecommendations+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newExportAutoScalingGroupRecommendationsResponse' smart constructor.+data ExportAutoScalingGroupRecommendationsResponse = ExportAutoScalingGroupRecommendationsResponse'+  { -- | The identification number of the export job.+    --+    -- Use the DescribeRecommendationExportJobs action, and specify the job ID+    -- to view the status of an export job.+    jobId :: Prelude.Maybe Prelude.Text,+    -- | An object that describes the destination Amazon S3 bucket of a+    -- recommendations export file.+    s3Destination :: Prelude.Maybe S3Destination,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportAutoScalingGroupRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'jobId', 'exportAutoScalingGroupRecommendationsResponse_jobId' - The identification number of the export job.+--+-- Use the DescribeRecommendationExportJobs action, and specify the job ID+-- to view the status of an export job.+--+-- 's3Destination', 'exportAutoScalingGroupRecommendationsResponse_s3Destination' - An object that describes the destination Amazon S3 bucket of a+-- recommendations export file.+--+-- 'httpStatus', 'exportAutoScalingGroupRecommendationsResponse_httpStatus' - The response's http status code.+newExportAutoScalingGroupRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ExportAutoScalingGroupRecommendationsResponse+newExportAutoScalingGroupRecommendationsResponse+  pHttpStatus_ =+    ExportAutoScalingGroupRecommendationsResponse'+      { jobId =+          Prelude.Nothing,+        s3Destination =+          Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The identification number of the export job.+--+-- Use the DescribeRecommendationExportJobs action, and specify the job ID+-- to view the status of an export job.+exportAutoScalingGroupRecommendationsResponse_jobId :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse (Prelude.Maybe Prelude.Text)+exportAutoScalingGroupRecommendationsResponse_jobId = Lens.lens (\ExportAutoScalingGroupRecommendationsResponse' {jobId} -> jobId) (\s@ExportAutoScalingGroupRecommendationsResponse' {} a -> s {jobId = a} :: ExportAutoScalingGroupRecommendationsResponse)++-- | An object that describes the destination Amazon S3 bucket of a+-- recommendations export file.+exportAutoScalingGroupRecommendationsResponse_s3Destination :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse (Prelude.Maybe S3Destination)+exportAutoScalingGroupRecommendationsResponse_s3Destination = Lens.lens (\ExportAutoScalingGroupRecommendationsResponse' {s3Destination} -> s3Destination) (\s@ExportAutoScalingGroupRecommendationsResponse' {} a -> s {s3Destination = a} :: ExportAutoScalingGroupRecommendationsResponse)++-- | The response's http status code.+exportAutoScalingGroupRecommendationsResponse_httpStatus :: Lens.Lens' ExportAutoScalingGroupRecommendationsResponse Prelude.Int+exportAutoScalingGroupRecommendationsResponse_httpStatus = Lens.lens (\ExportAutoScalingGroupRecommendationsResponse' {httpStatus} -> httpStatus) (\s@ExportAutoScalingGroupRecommendationsResponse' {} a -> s {httpStatus = a} :: ExportAutoScalingGroupRecommendationsResponse)++instance+  Prelude.NFData+    ExportAutoScalingGroupRecommendationsResponse+  where+  rnf+    ExportAutoScalingGroupRecommendationsResponse' {..} =+      Prelude.rnf jobId+        `Prelude.seq` Prelude.rnf s3Destination+        `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/ExportEBSVolumeRecommendations.hs view
@@ -0,0 +1,398 @@+{-# 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.ComputeOptimizer.ExportEBSVolumeRecommendations+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Exports optimization recommendations for Amazon EBS volumes.+--+-- Recommendations are exported in a comma-separated values (.csv) file,+-- and its metadata in a JavaScript Object Notation (JSON) (.json) file, to+-- an existing Amazon Simple Storage Service (Amazon S3) bucket that you+-- specify. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html Exporting Recommendations>+-- in the /Compute Optimizer User Guide/.+--+-- You can have only one Amazon EBS volume export job in progress per+-- Amazon Web Services Region.+module Amazonka.ComputeOptimizer.ExportEBSVolumeRecommendations+  ( -- * Creating a Request+    ExportEBSVolumeRecommendations (..),+    newExportEBSVolumeRecommendations,++    -- * Request Lenses+    exportEBSVolumeRecommendations_accountIds,+    exportEBSVolumeRecommendations_fieldsToExport,+    exportEBSVolumeRecommendations_fileFormat,+    exportEBSVolumeRecommendations_filters,+    exportEBSVolumeRecommendations_includeMemberAccounts,+    exportEBSVolumeRecommendations_s3DestinationConfig,++    -- * Destructuring the Response+    ExportEBSVolumeRecommendationsResponse (..),+    newExportEBSVolumeRecommendationsResponse,++    -- * Response Lenses+    exportEBSVolumeRecommendationsResponse_jobId,+    exportEBSVolumeRecommendationsResponse_s3Destination,+    exportEBSVolumeRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newExportEBSVolumeRecommendations' smart constructor.+data ExportEBSVolumeRecommendations = ExportEBSVolumeRecommendations'+  { -- | The IDs of the Amazon Web Services accounts for which to export Amazon+    -- EBS volume recommendations.+    --+    -- If your account is the management account of an organization, use this+    -- parameter to specify the member account for which you want to export+    -- recommendations.+    --+    -- This parameter cannot be specified together with the include member+    -- accounts parameter. The parameters are mutually exclusive.+    --+    -- Recommendations for member accounts are not included in the export if+    -- this parameter, or the include member accounts parameter, is omitted.+    --+    -- You can specify multiple account IDs per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | The recommendations data to include in the export file. For more+    -- information about the fields that can be exported, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+    -- in the /Compute Optimizer User Guide/.+    fieldsToExport :: Prelude.Maybe [ExportableVolumeField],+    -- | The format of the export file.+    --+    -- The only export file format currently supported is @Csv@.+    fileFormat :: Prelude.Maybe FileFormat,+    -- | An array of objects to specify a filter that exports a more specific set+    -- of Amazon EBS volume recommendations.+    filters :: Prelude.Maybe [EBSFilter],+    -- | Indicates whether to include recommendations for resources in all member+    -- accounts of the organization if your account is the management account+    -- of an organization.+    --+    -- The member accounts must also be opted in to Compute Optimizer, and+    -- trusted access for Compute Optimizer must be enabled in the organization+    -- account. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+    -- in the /Compute Optimizer User Guide/.+    --+    -- Recommendations for member accounts of the organization are not included+    -- in the export file if this parameter is omitted.+    --+    -- This parameter cannot be specified together with the account IDs+    -- parameter. The parameters are mutually exclusive.+    --+    -- Recommendations for member accounts are not included in the export if+    -- this parameter, or the account IDs parameter, is omitted.+    includeMemberAccounts :: Prelude.Maybe Prelude.Bool,+    s3DestinationConfig :: S3DestinationConfig+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportEBSVolumeRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'exportEBSVolumeRecommendations_accountIds' - The IDs of the Amazon Web Services accounts for which to export Amazon+-- EBS volume recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to export+-- recommendations.+--+-- This parameter cannot be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the include member accounts parameter, is omitted.+--+-- You can specify multiple account IDs per request.+--+-- 'fieldsToExport', 'exportEBSVolumeRecommendations_fieldsToExport' - The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+--+-- 'fileFormat', 'exportEBSVolumeRecommendations_fileFormat' - The format of the export file.+--+-- The only export file format currently supported is @Csv@.+--+-- 'filters', 'exportEBSVolumeRecommendations_filters' - An array of objects to specify a filter that exports a more specific set+-- of Amazon EBS volume recommendations.+--+-- 'includeMemberAccounts', 'exportEBSVolumeRecommendations_includeMemberAccounts' - Indicates whether to include recommendations for resources in all member+-- accounts of the organization if your account is the management account+-- of an organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- Recommendations for member accounts of the organization are not included+-- in the export file if this parameter is omitted.+--+-- This parameter cannot be specified together with the account IDs+-- parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the account IDs parameter, is omitted.+--+-- 's3DestinationConfig', 'exportEBSVolumeRecommendations_s3DestinationConfig' - Undocumented member.+newExportEBSVolumeRecommendations ::+  -- | 's3DestinationConfig'+  S3DestinationConfig ->+  ExportEBSVolumeRecommendations+newExportEBSVolumeRecommendations+  pS3DestinationConfig_ =+    ExportEBSVolumeRecommendations'+      { accountIds =+          Prelude.Nothing,+        fieldsToExport = Prelude.Nothing,+        fileFormat = Prelude.Nothing,+        filters = Prelude.Nothing,+        includeMemberAccounts = Prelude.Nothing,+        s3DestinationConfig = pS3DestinationConfig_+      }++-- | The IDs of the Amazon Web Services accounts for which to export Amazon+-- EBS volume recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to export+-- recommendations.+--+-- This parameter cannot be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the include member accounts parameter, is omitted.+--+-- You can specify multiple account IDs per request.+exportEBSVolumeRecommendations_accountIds :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe [Prelude.Text])+exportEBSVolumeRecommendations_accountIds = Lens.lens (\ExportEBSVolumeRecommendations' {accountIds} -> accountIds) (\s@ExportEBSVolumeRecommendations' {} a -> s {accountIds = a} :: ExportEBSVolumeRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+exportEBSVolumeRecommendations_fieldsToExport :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe [ExportableVolumeField])+exportEBSVolumeRecommendations_fieldsToExport = Lens.lens (\ExportEBSVolumeRecommendations' {fieldsToExport} -> fieldsToExport) (\s@ExportEBSVolumeRecommendations' {} a -> s {fieldsToExport = a} :: ExportEBSVolumeRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The format of the export file.+--+-- The only export file format currently supported is @Csv@.+exportEBSVolumeRecommendations_fileFormat :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe FileFormat)+exportEBSVolumeRecommendations_fileFormat = Lens.lens (\ExportEBSVolumeRecommendations' {fileFormat} -> fileFormat) (\s@ExportEBSVolumeRecommendations' {} a -> s {fileFormat = a} :: ExportEBSVolumeRecommendations)++-- | An array of objects to specify a filter that exports a more specific set+-- of Amazon EBS volume recommendations.+exportEBSVolumeRecommendations_filters :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe [EBSFilter])+exportEBSVolumeRecommendations_filters = Lens.lens (\ExportEBSVolumeRecommendations' {filters} -> filters) (\s@ExportEBSVolumeRecommendations' {} a -> s {filters = a} :: ExportEBSVolumeRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | Indicates whether to include recommendations for resources in all member+-- accounts of the organization if your account is the management account+-- of an organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- Recommendations for member accounts of the organization are not included+-- in the export file if this parameter is omitted.+--+-- This parameter cannot be specified together with the account IDs+-- parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the account IDs parameter, is omitted.+exportEBSVolumeRecommendations_includeMemberAccounts :: Lens.Lens' ExportEBSVolumeRecommendations (Prelude.Maybe Prelude.Bool)+exportEBSVolumeRecommendations_includeMemberAccounts = Lens.lens (\ExportEBSVolumeRecommendations' {includeMemberAccounts} -> includeMemberAccounts) (\s@ExportEBSVolumeRecommendations' {} a -> s {includeMemberAccounts = a} :: ExportEBSVolumeRecommendations)++-- | Undocumented member.+exportEBSVolumeRecommendations_s3DestinationConfig :: Lens.Lens' ExportEBSVolumeRecommendations S3DestinationConfig+exportEBSVolumeRecommendations_s3DestinationConfig = Lens.lens (\ExportEBSVolumeRecommendations' {s3DestinationConfig} -> s3DestinationConfig) (\s@ExportEBSVolumeRecommendations' {} a -> s {s3DestinationConfig = a} :: ExportEBSVolumeRecommendations)++instance+  Core.AWSRequest+    ExportEBSVolumeRecommendations+  where+  type+    AWSResponse ExportEBSVolumeRecommendations =+      ExportEBSVolumeRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ExportEBSVolumeRecommendationsResponse'+            Prelude.<$> (x Data..?> "jobId")+            Prelude.<*> (x Data..?> "s3Destination")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    ExportEBSVolumeRecommendations+  where+  hashWithSalt+    _salt+    ExportEBSVolumeRecommendations' {..} =+      _salt+        `Prelude.hashWithSalt` accountIds+        `Prelude.hashWithSalt` fieldsToExport+        `Prelude.hashWithSalt` fileFormat+        `Prelude.hashWithSalt` filters+        `Prelude.hashWithSalt` includeMemberAccounts+        `Prelude.hashWithSalt` s3DestinationConfig++instance+  Prelude.NFData+    ExportEBSVolumeRecommendations+  where+  rnf ExportEBSVolumeRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf fieldsToExport+      `Prelude.seq` Prelude.rnf fileFormat+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf includeMemberAccounts+      `Prelude.seq` Prelude.rnf s3DestinationConfig++instance+  Data.ToHeaders+    ExportEBSVolumeRecommendations+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.ExportEBSVolumeRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ExportEBSVolumeRecommendations where+  toJSON ExportEBSVolumeRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("fieldsToExport" Data..=)+              Prelude.<$> fieldsToExport,+            ("fileFormat" Data..=) Prelude.<$> fileFormat,+            ("filters" Data..=) Prelude.<$> filters,+            ("includeMemberAccounts" Data..=)+              Prelude.<$> includeMemberAccounts,+            Prelude.Just+              ("s3DestinationConfig" Data..= s3DestinationConfig)+          ]+      )++instance Data.ToPath ExportEBSVolumeRecommendations where+  toPath = Prelude.const "/"++instance Data.ToQuery ExportEBSVolumeRecommendations where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newExportEBSVolumeRecommendationsResponse' smart constructor.+data ExportEBSVolumeRecommendationsResponse = ExportEBSVolumeRecommendationsResponse'+  { -- | The identification number of the export job.+    --+    -- Use the DescribeRecommendationExportJobs action, and specify the job ID+    -- to view the status of an export job.+    jobId :: Prelude.Maybe Prelude.Text,+    s3Destination :: Prelude.Maybe S3Destination,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportEBSVolumeRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'jobId', 'exportEBSVolumeRecommendationsResponse_jobId' - The identification number of the export job.+--+-- Use the DescribeRecommendationExportJobs action, and specify the job ID+-- to view the status of an export job.+--+-- 's3Destination', 'exportEBSVolumeRecommendationsResponse_s3Destination' - Undocumented member.+--+-- 'httpStatus', 'exportEBSVolumeRecommendationsResponse_httpStatus' - The response's http status code.+newExportEBSVolumeRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ExportEBSVolumeRecommendationsResponse+newExportEBSVolumeRecommendationsResponse+  pHttpStatus_ =+    ExportEBSVolumeRecommendationsResponse'+      { jobId =+          Prelude.Nothing,+        s3Destination = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The identification number of the export job.+--+-- Use the DescribeRecommendationExportJobs action, and specify the job ID+-- to view the status of an export job.+exportEBSVolumeRecommendationsResponse_jobId :: Lens.Lens' ExportEBSVolumeRecommendationsResponse (Prelude.Maybe Prelude.Text)+exportEBSVolumeRecommendationsResponse_jobId = Lens.lens (\ExportEBSVolumeRecommendationsResponse' {jobId} -> jobId) (\s@ExportEBSVolumeRecommendationsResponse' {} a -> s {jobId = a} :: ExportEBSVolumeRecommendationsResponse)++-- | Undocumented member.+exportEBSVolumeRecommendationsResponse_s3Destination :: Lens.Lens' ExportEBSVolumeRecommendationsResponse (Prelude.Maybe S3Destination)+exportEBSVolumeRecommendationsResponse_s3Destination = Lens.lens (\ExportEBSVolumeRecommendationsResponse' {s3Destination} -> s3Destination) (\s@ExportEBSVolumeRecommendationsResponse' {} a -> s {s3Destination = a} :: ExportEBSVolumeRecommendationsResponse)++-- | The response's http status code.+exportEBSVolumeRecommendationsResponse_httpStatus :: Lens.Lens' ExportEBSVolumeRecommendationsResponse Prelude.Int+exportEBSVolumeRecommendationsResponse_httpStatus = Lens.lens (\ExportEBSVolumeRecommendationsResponse' {httpStatus} -> httpStatus) (\s@ExportEBSVolumeRecommendationsResponse' {} a -> s {httpStatus = a} :: ExportEBSVolumeRecommendationsResponse)++instance+  Prelude.NFData+    ExportEBSVolumeRecommendationsResponse+  where+  rnf ExportEBSVolumeRecommendationsResponse' {..} =+    Prelude.rnf jobId+      `Prelude.seq` Prelude.rnf s3Destination+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/ExportEC2InstanceRecommendations.hs view
@@ -0,0 +1,452 @@+{-# 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.ComputeOptimizer.ExportEC2InstanceRecommendations+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Exports optimization recommendations for Amazon EC2 instances.+--+-- Recommendations are exported in a comma-separated values (.csv) file,+-- and its metadata in a JavaScript Object Notation (JSON) (.json) file, to+-- an existing Amazon Simple Storage Service (Amazon S3) bucket that you+-- specify. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html Exporting Recommendations>+-- in the /Compute Optimizer User Guide/.+--+-- You can have only one Amazon EC2 instance export job in progress per+-- Amazon Web Services Region.+module Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations+  ( -- * Creating a Request+    ExportEC2InstanceRecommendations (..),+    newExportEC2InstanceRecommendations,++    -- * Request Lenses+    exportEC2InstanceRecommendations_accountIds,+    exportEC2InstanceRecommendations_fieldsToExport,+    exportEC2InstanceRecommendations_fileFormat,+    exportEC2InstanceRecommendations_filters,+    exportEC2InstanceRecommendations_includeMemberAccounts,+    exportEC2InstanceRecommendations_recommendationPreferences,+    exportEC2InstanceRecommendations_s3DestinationConfig,++    -- * Destructuring the Response+    ExportEC2InstanceRecommendationsResponse (..),+    newExportEC2InstanceRecommendationsResponse,++    -- * Response Lenses+    exportEC2InstanceRecommendationsResponse_jobId,+    exportEC2InstanceRecommendationsResponse_s3Destination,+    exportEC2InstanceRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newExportEC2InstanceRecommendations' smart constructor.+data ExportEC2InstanceRecommendations = ExportEC2InstanceRecommendations'+  { -- | The IDs of the Amazon Web Services accounts for which to export instance+    -- recommendations.+    --+    -- If your account is the management account of an organization, use this+    -- parameter to specify the member account for which you want to export+    -- recommendations.+    --+    -- This parameter cannot be specified together with the include member+    -- accounts parameter. The parameters are mutually exclusive.+    --+    -- Recommendations for member accounts are not included in the export if+    -- this parameter, or the include member accounts parameter, is omitted.+    --+    -- You can specify multiple account IDs per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | The recommendations data to include in the export file. For more+    -- information about the fields that can be exported, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+    -- in the /Compute Optimizer User Guide/.+    fieldsToExport :: Prelude.Maybe [ExportableInstanceField],+    -- | The format of the export file.+    --+    -- The only export file format currently supported is @Csv@.+    fileFormat :: Prelude.Maybe FileFormat,+    -- | An array of objects to specify a filter that exports a more specific set+    -- of instance recommendations.+    filters :: Prelude.Maybe [Filter],+    -- | Indicates whether to include recommendations for resources in all member+    -- accounts of the organization if your account is the management account+    -- of an organization.+    --+    -- The member accounts must also be opted in to Compute Optimizer, and+    -- trusted access for Compute Optimizer must be enabled in the organization+    -- account. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+    -- in the /Compute Optimizer User Guide/.+    --+    -- Recommendations for member accounts of the organization are not included+    -- in the export file if this parameter is omitted.+    --+    -- Recommendations for member accounts are not included in the export if+    -- this parameter, or the account IDs parameter, is omitted.+    includeMemberAccounts :: Prelude.Maybe Prelude.Bool,+    -- | An object to specify the preferences for the Amazon EC2 instance+    -- recommendations to export.+    recommendationPreferences :: Prelude.Maybe RecommendationPreferences,+    -- | An object to specify the destination Amazon Simple Storage Service+    -- (Amazon S3) bucket name and key prefix for the export job.+    --+    -- You must create the destination Amazon S3 bucket for your+    -- recommendations export before you create the export job. Compute+    -- Optimizer does not create the S3 bucket for you. After you create the S3+    -- bucket, ensure that it has the required permissions policy to allow+    -- Compute Optimizer to write the export file to it. If you plan to specify+    -- an object prefix when you create the export job, you must include the+    -- object prefix in the policy that you add to the S3 bucket. For more+    -- information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>+    -- in the /Compute Optimizer User Guide/.+    s3DestinationConfig :: S3DestinationConfig+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportEC2InstanceRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'exportEC2InstanceRecommendations_accountIds' - The IDs of the Amazon Web Services accounts for which to export instance+-- recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to export+-- recommendations.+--+-- This parameter cannot be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the include member accounts parameter, is omitted.+--+-- You can specify multiple account IDs per request.+--+-- 'fieldsToExport', 'exportEC2InstanceRecommendations_fieldsToExport' - The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+--+-- 'fileFormat', 'exportEC2InstanceRecommendations_fileFormat' - The format of the export file.+--+-- The only export file format currently supported is @Csv@.+--+-- 'filters', 'exportEC2InstanceRecommendations_filters' - An array of objects to specify a filter that exports a more specific set+-- of instance recommendations.+--+-- 'includeMemberAccounts', 'exportEC2InstanceRecommendations_includeMemberAccounts' - Indicates whether to include recommendations for resources in all member+-- accounts of the organization if your account is the management account+-- of an organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- Recommendations for member accounts of the organization are not included+-- in the export file if this parameter is omitted.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the account IDs parameter, is omitted.+--+-- 'recommendationPreferences', 'exportEC2InstanceRecommendations_recommendationPreferences' - An object to specify the preferences for the Amazon EC2 instance+-- recommendations to export.+--+-- 's3DestinationConfig', 'exportEC2InstanceRecommendations_s3DestinationConfig' - An object to specify the destination Amazon Simple Storage Service+-- (Amazon S3) bucket name and key prefix for the export job.+--+-- You must create the destination Amazon S3 bucket for your+-- recommendations export before you create the export job. Compute+-- Optimizer does not create the S3 bucket for you. After you create the S3+-- bucket, ensure that it has the required permissions policy to allow+-- Compute Optimizer to write the export file to it. If you plan to specify+-- an object prefix when you create the export job, you must include the+-- object prefix in the policy that you add to the S3 bucket. For more+-- information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>+-- in the /Compute Optimizer User Guide/.+newExportEC2InstanceRecommendations ::+  -- | 's3DestinationConfig'+  S3DestinationConfig ->+  ExportEC2InstanceRecommendations+newExportEC2InstanceRecommendations+  pS3DestinationConfig_ =+    ExportEC2InstanceRecommendations'+      { accountIds =+          Prelude.Nothing,+        fieldsToExport = Prelude.Nothing,+        fileFormat = Prelude.Nothing,+        filters = Prelude.Nothing,+        includeMemberAccounts = Prelude.Nothing,+        recommendationPreferences =+          Prelude.Nothing,+        s3DestinationConfig =+          pS3DestinationConfig_+      }++-- | The IDs of the Amazon Web Services accounts for which to export instance+-- recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to export+-- recommendations.+--+-- This parameter cannot be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the include member accounts parameter, is omitted.+--+-- You can specify multiple account IDs per request.+exportEC2InstanceRecommendations_accountIds :: Lens.Lens' ExportEC2InstanceRecommendations (Prelude.Maybe [Prelude.Text])+exportEC2InstanceRecommendations_accountIds = Lens.lens (\ExportEC2InstanceRecommendations' {accountIds} -> accountIds) (\s@ExportEC2InstanceRecommendations' {} a -> s {accountIds = a} :: ExportEC2InstanceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+exportEC2InstanceRecommendations_fieldsToExport :: Lens.Lens' ExportEC2InstanceRecommendations (Prelude.Maybe [ExportableInstanceField])+exportEC2InstanceRecommendations_fieldsToExport = Lens.lens (\ExportEC2InstanceRecommendations' {fieldsToExport} -> fieldsToExport) (\s@ExportEC2InstanceRecommendations' {} a -> s {fieldsToExport = a} :: ExportEC2InstanceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The format of the export file.+--+-- The only export file format currently supported is @Csv@.+exportEC2InstanceRecommendations_fileFormat :: Lens.Lens' ExportEC2InstanceRecommendations (Prelude.Maybe FileFormat)+exportEC2InstanceRecommendations_fileFormat = Lens.lens (\ExportEC2InstanceRecommendations' {fileFormat} -> fileFormat) (\s@ExportEC2InstanceRecommendations' {} a -> s {fileFormat = a} :: ExportEC2InstanceRecommendations)++-- | An array of objects to specify a filter that exports a more specific set+-- of instance recommendations.+exportEC2InstanceRecommendations_filters :: Lens.Lens' ExportEC2InstanceRecommendations (Prelude.Maybe [Filter])+exportEC2InstanceRecommendations_filters = Lens.lens (\ExportEC2InstanceRecommendations' {filters} -> filters) (\s@ExportEC2InstanceRecommendations' {} a -> s {filters = a} :: ExportEC2InstanceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | Indicates whether to include recommendations for resources in all member+-- accounts of the organization if your account is the management account+-- of an organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- Recommendations for member accounts of the organization are not included+-- in the export file if this parameter is omitted.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the account IDs parameter, is omitted.+exportEC2InstanceRecommendations_includeMemberAccounts :: Lens.Lens' ExportEC2InstanceRecommendations (Prelude.Maybe Prelude.Bool)+exportEC2InstanceRecommendations_includeMemberAccounts = Lens.lens (\ExportEC2InstanceRecommendations' {includeMemberAccounts} -> includeMemberAccounts) (\s@ExportEC2InstanceRecommendations' {} a -> s {includeMemberAccounts = a} :: ExportEC2InstanceRecommendations)++-- | An object to specify the preferences for the Amazon EC2 instance+-- recommendations to export.+exportEC2InstanceRecommendations_recommendationPreferences :: Lens.Lens' ExportEC2InstanceRecommendations (Prelude.Maybe RecommendationPreferences)+exportEC2InstanceRecommendations_recommendationPreferences = Lens.lens (\ExportEC2InstanceRecommendations' {recommendationPreferences} -> recommendationPreferences) (\s@ExportEC2InstanceRecommendations' {} a -> s {recommendationPreferences = a} :: ExportEC2InstanceRecommendations)++-- | An object to specify the destination Amazon Simple Storage Service+-- (Amazon S3) bucket name and key prefix for the export job.+--+-- You must create the destination Amazon S3 bucket for your+-- recommendations export before you create the export job. Compute+-- Optimizer does not create the S3 bucket for you. After you create the S3+-- bucket, ensure that it has the required permissions policy to allow+-- Compute Optimizer to write the export file to it. If you plan to specify+-- an object prefix when you create the export job, you must include the+-- object prefix in the policy that you add to the S3 bucket. For more+-- information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>+-- in the /Compute Optimizer User Guide/.+exportEC2InstanceRecommendations_s3DestinationConfig :: Lens.Lens' ExportEC2InstanceRecommendations S3DestinationConfig+exportEC2InstanceRecommendations_s3DestinationConfig = Lens.lens (\ExportEC2InstanceRecommendations' {s3DestinationConfig} -> s3DestinationConfig) (\s@ExportEC2InstanceRecommendations' {} a -> s {s3DestinationConfig = a} :: ExportEC2InstanceRecommendations)++instance+  Core.AWSRequest+    ExportEC2InstanceRecommendations+  where+  type+    AWSResponse ExportEC2InstanceRecommendations =+      ExportEC2InstanceRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ExportEC2InstanceRecommendationsResponse'+            Prelude.<$> (x Data..?> "jobId")+            Prelude.<*> (x Data..?> "s3Destination")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    ExportEC2InstanceRecommendations+  where+  hashWithSalt+    _salt+    ExportEC2InstanceRecommendations' {..} =+      _salt+        `Prelude.hashWithSalt` accountIds+        `Prelude.hashWithSalt` fieldsToExport+        `Prelude.hashWithSalt` fileFormat+        `Prelude.hashWithSalt` filters+        `Prelude.hashWithSalt` includeMemberAccounts+        `Prelude.hashWithSalt` recommendationPreferences+        `Prelude.hashWithSalt` s3DestinationConfig++instance+  Prelude.NFData+    ExportEC2InstanceRecommendations+  where+  rnf ExportEC2InstanceRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf fieldsToExport+      `Prelude.seq` Prelude.rnf fileFormat+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf includeMemberAccounts+      `Prelude.seq` Prelude.rnf recommendationPreferences+      `Prelude.seq` Prelude.rnf s3DestinationConfig++instance+  Data.ToHeaders+    ExportEC2InstanceRecommendations+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.ExportEC2InstanceRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ExportEC2InstanceRecommendations where+  toJSON ExportEC2InstanceRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("fieldsToExport" Data..=)+              Prelude.<$> fieldsToExport,+            ("fileFormat" Data..=) Prelude.<$> fileFormat,+            ("filters" Data..=) Prelude.<$> filters,+            ("includeMemberAccounts" Data..=)+              Prelude.<$> includeMemberAccounts,+            ("recommendationPreferences" Data..=)+              Prelude.<$> recommendationPreferences,+            Prelude.Just+              ("s3DestinationConfig" Data..= s3DestinationConfig)+          ]+      )++instance Data.ToPath ExportEC2InstanceRecommendations where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    ExportEC2InstanceRecommendations+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newExportEC2InstanceRecommendationsResponse' smart constructor.+data ExportEC2InstanceRecommendationsResponse = ExportEC2InstanceRecommendationsResponse'+  { -- | The identification number of the export job.+    --+    -- Use the DescribeRecommendationExportJobs action, and specify the job ID+    -- to view the status of an export job.+    jobId :: Prelude.Maybe Prelude.Text,+    -- | An object that describes the destination Amazon S3 bucket of a+    -- recommendations export file.+    s3Destination :: Prelude.Maybe S3Destination,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportEC2InstanceRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'jobId', 'exportEC2InstanceRecommendationsResponse_jobId' - The identification number of the export job.+--+-- Use the DescribeRecommendationExportJobs action, and specify the job ID+-- to view the status of an export job.+--+-- 's3Destination', 'exportEC2InstanceRecommendationsResponse_s3Destination' - An object that describes the destination Amazon S3 bucket of a+-- recommendations export file.+--+-- 'httpStatus', 'exportEC2InstanceRecommendationsResponse_httpStatus' - The response's http status code.+newExportEC2InstanceRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ExportEC2InstanceRecommendationsResponse+newExportEC2InstanceRecommendationsResponse+  pHttpStatus_ =+    ExportEC2InstanceRecommendationsResponse'+      { jobId =+          Prelude.Nothing,+        s3Destination = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The identification number of the export job.+--+-- Use the DescribeRecommendationExportJobs action, and specify the job ID+-- to view the status of an export job.+exportEC2InstanceRecommendationsResponse_jobId :: Lens.Lens' ExportEC2InstanceRecommendationsResponse (Prelude.Maybe Prelude.Text)+exportEC2InstanceRecommendationsResponse_jobId = Lens.lens (\ExportEC2InstanceRecommendationsResponse' {jobId} -> jobId) (\s@ExportEC2InstanceRecommendationsResponse' {} a -> s {jobId = a} :: ExportEC2InstanceRecommendationsResponse)++-- | An object that describes the destination Amazon S3 bucket of a+-- recommendations export file.+exportEC2InstanceRecommendationsResponse_s3Destination :: Lens.Lens' ExportEC2InstanceRecommendationsResponse (Prelude.Maybe S3Destination)+exportEC2InstanceRecommendationsResponse_s3Destination = Lens.lens (\ExportEC2InstanceRecommendationsResponse' {s3Destination} -> s3Destination) (\s@ExportEC2InstanceRecommendationsResponse' {} a -> s {s3Destination = a} :: ExportEC2InstanceRecommendationsResponse)++-- | The response's http status code.+exportEC2InstanceRecommendationsResponse_httpStatus :: Lens.Lens' ExportEC2InstanceRecommendationsResponse Prelude.Int+exportEC2InstanceRecommendationsResponse_httpStatus = Lens.lens (\ExportEC2InstanceRecommendationsResponse' {httpStatus} -> httpStatus) (\s@ExportEC2InstanceRecommendationsResponse' {} a -> s {httpStatus = a} :: ExportEC2InstanceRecommendationsResponse)++instance+  Prelude.NFData+    ExportEC2InstanceRecommendationsResponse+  where+  rnf ExportEC2InstanceRecommendationsResponse' {..} =+    Prelude.rnf jobId+      `Prelude.seq` Prelude.rnf s3Destination+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/ExportECSServiceRecommendations.hs view
@@ -0,0 +1,392 @@+{-# 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.ComputeOptimizer.ExportECSServiceRecommendations+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Exports optimization recommendations for Amazon ECS services on Fargate.+--+-- Recommendations are exported in a CSV file, and its metadata in a JSON+-- file, to an existing Amazon Simple Storage Service (Amazon S3) bucket+-- that you specify. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html Exporting Recommendations>+-- in the /Compute Optimizer User Guide/.+--+-- You can only have one Amazon ECS service export job in progress per+-- Amazon Web Services Region.+module Amazonka.ComputeOptimizer.ExportECSServiceRecommendations+  ( -- * Creating a Request+    ExportECSServiceRecommendations (..),+    newExportECSServiceRecommendations,++    -- * Request Lenses+    exportECSServiceRecommendations_accountIds,+    exportECSServiceRecommendations_fieldsToExport,+    exportECSServiceRecommendations_fileFormat,+    exportECSServiceRecommendations_filters,+    exportECSServiceRecommendations_includeMemberAccounts,+    exportECSServiceRecommendations_s3DestinationConfig,++    -- * Destructuring the Response+    ExportECSServiceRecommendationsResponse (..),+    newExportECSServiceRecommendationsResponse,++    -- * Response Lenses+    exportECSServiceRecommendationsResponse_jobId,+    exportECSServiceRecommendationsResponse_s3Destination,+    exportECSServiceRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newExportECSServiceRecommendations' smart constructor.+data ExportECSServiceRecommendations = ExportECSServiceRecommendations'+  { -- | The Amazon Web Services account IDs for the export ECS service+    -- recommendations.+    --+    -- If your account is the management account or the delegated administrator+    -- of an organization, use this parameter to specify the member account you+    -- want to export recommendations to.+    --+    -- This parameter can\'t be specified together with the include member+    -- accounts parameter. The parameters are mutually exclusive.+    --+    -- If this parameter or the include member accounts parameter is omitted,+    -- the recommendations for member accounts aren\'t included in the export.+    --+    -- You can specify multiple account IDs per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | The recommendations data to include in the export file. For more+    -- information about the fields that can be exported, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+    -- in the /Compute Optimizer User Guide/.+    fieldsToExport :: Prelude.Maybe [ExportableECSServiceField],+    -- | The format of the export file.+    --+    -- The CSV file is the only export file format currently supported.+    fileFormat :: Prelude.Maybe FileFormat,+    -- | An array of objects to specify a filter that exports a more specific set+    -- of ECS service recommendations.+    filters :: Prelude.Maybe [ECSServiceRecommendationFilter],+    -- | If your account is the management account or the delegated administrator+    -- of an organization, this parameter indicates whether to include+    -- recommendations for resources in all member accounts of the+    -- organization.+    --+    -- The member accounts must also be opted in to Compute Optimizer, and+    -- trusted access for Compute Optimizer must be enabled in the organization+    -- account. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+    -- in the /Compute Optimizer User Guide/.+    --+    -- If this parameter is omitted, recommendations for member accounts of the+    -- organization aren\'t included in the export file.+    --+    -- If this parameter or the account ID parameter is omitted,+    -- recommendations for member accounts aren\'t included in the export.+    includeMemberAccounts :: Prelude.Maybe Prelude.Bool,+    s3DestinationConfig :: S3DestinationConfig+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportECSServiceRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'exportECSServiceRecommendations_accountIds' - The Amazon Web Services account IDs for the export ECS service+-- recommendations.+--+-- If your account is the management account or the delegated administrator+-- of an organization, use this parameter to specify the member account you+-- want to export recommendations to.+--+-- This parameter can\'t be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- If this parameter or the include member accounts parameter is omitted,+-- the recommendations for member accounts aren\'t included in the export.+--+-- You can specify multiple account IDs per request.+--+-- 'fieldsToExport', 'exportECSServiceRecommendations_fieldsToExport' - The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+--+-- 'fileFormat', 'exportECSServiceRecommendations_fileFormat' - The format of the export file.+--+-- The CSV file is the only export file format currently supported.+--+-- 'filters', 'exportECSServiceRecommendations_filters' - An array of objects to specify a filter that exports a more specific set+-- of ECS service recommendations.+--+-- 'includeMemberAccounts', 'exportECSServiceRecommendations_includeMemberAccounts' - If your account is the management account or the delegated administrator+-- of an organization, this parameter indicates whether to include+-- recommendations for resources in all member accounts of the+-- organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- If this parameter is omitted, recommendations for member accounts of the+-- organization aren\'t included in the export file.+--+-- If this parameter or the account ID parameter is omitted,+-- recommendations for member accounts aren\'t included in the export.+--+-- 's3DestinationConfig', 'exportECSServiceRecommendations_s3DestinationConfig' - Undocumented member.+newExportECSServiceRecommendations ::+  -- | 's3DestinationConfig'+  S3DestinationConfig ->+  ExportECSServiceRecommendations+newExportECSServiceRecommendations+  pS3DestinationConfig_ =+    ExportECSServiceRecommendations'+      { accountIds =+          Prelude.Nothing,+        fieldsToExport = Prelude.Nothing,+        fileFormat = Prelude.Nothing,+        filters = Prelude.Nothing,+        includeMemberAccounts = Prelude.Nothing,+        s3DestinationConfig =+          pS3DestinationConfig_+      }++-- | The Amazon Web Services account IDs for the export ECS service+-- recommendations.+--+-- If your account is the management account or the delegated administrator+-- of an organization, use this parameter to specify the member account you+-- want to export recommendations to.+--+-- This parameter can\'t be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- If this parameter or the include member accounts parameter is omitted,+-- the recommendations for member accounts aren\'t included in the export.+--+-- You can specify multiple account IDs per request.+exportECSServiceRecommendations_accountIds :: Lens.Lens' ExportECSServiceRecommendations (Prelude.Maybe [Prelude.Text])+exportECSServiceRecommendations_accountIds = Lens.lens (\ExportECSServiceRecommendations' {accountIds} -> accountIds) (\s@ExportECSServiceRecommendations' {} a -> s {accountIds = a} :: ExportECSServiceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+exportECSServiceRecommendations_fieldsToExport :: Lens.Lens' ExportECSServiceRecommendations (Prelude.Maybe [ExportableECSServiceField])+exportECSServiceRecommendations_fieldsToExport = Lens.lens (\ExportECSServiceRecommendations' {fieldsToExport} -> fieldsToExport) (\s@ExportECSServiceRecommendations' {} a -> s {fieldsToExport = a} :: ExportECSServiceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The format of the export file.+--+-- The CSV file is the only export file format currently supported.+exportECSServiceRecommendations_fileFormat :: Lens.Lens' ExportECSServiceRecommendations (Prelude.Maybe FileFormat)+exportECSServiceRecommendations_fileFormat = Lens.lens (\ExportECSServiceRecommendations' {fileFormat} -> fileFormat) (\s@ExportECSServiceRecommendations' {} a -> s {fileFormat = a} :: ExportECSServiceRecommendations)++-- | An array of objects to specify a filter that exports a more specific set+-- of ECS service recommendations.+exportECSServiceRecommendations_filters :: Lens.Lens' ExportECSServiceRecommendations (Prelude.Maybe [ECSServiceRecommendationFilter])+exportECSServiceRecommendations_filters = Lens.lens (\ExportECSServiceRecommendations' {filters} -> filters) (\s@ExportECSServiceRecommendations' {} a -> s {filters = a} :: ExportECSServiceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | If your account is the management account or the delegated administrator+-- of an organization, this parameter indicates whether to include+-- recommendations for resources in all member accounts of the+-- organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- If this parameter is omitted, recommendations for member accounts of the+-- organization aren\'t included in the export file.+--+-- If this parameter or the account ID parameter is omitted,+-- recommendations for member accounts aren\'t included in the export.+exportECSServiceRecommendations_includeMemberAccounts :: Lens.Lens' ExportECSServiceRecommendations (Prelude.Maybe Prelude.Bool)+exportECSServiceRecommendations_includeMemberAccounts = Lens.lens (\ExportECSServiceRecommendations' {includeMemberAccounts} -> includeMemberAccounts) (\s@ExportECSServiceRecommendations' {} a -> s {includeMemberAccounts = a} :: ExportECSServiceRecommendations)++-- | Undocumented member.+exportECSServiceRecommendations_s3DestinationConfig :: Lens.Lens' ExportECSServiceRecommendations S3DestinationConfig+exportECSServiceRecommendations_s3DestinationConfig = Lens.lens (\ExportECSServiceRecommendations' {s3DestinationConfig} -> s3DestinationConfig) (\s@ExportECSServiceRecommendations' {} a -> s {s3DestinationConfig = a} :: ExportECSServiceRecommendations)++instance+  Core.AWSRequest+    ExportECSServiceRecommendations+  where+  type+    AWSResponse ExportECSServiceRecommendations =+      ExportECSServiceRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ExportECSServiceRecommendationsResponse'+            Prelude.<$> (x Data..?> "jobId")+            Prelude.<*> (x Data..?> "s3Destination")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    ExportECSServiceRecommendations+  where+  hashWithSalt+    _salt+    ExportECSServiceRecommendations' {..} =+      _salt+        `Prelude.hashWithSalt` accountIds+        `Prelude.hashWithSalt` fieldsToExport+        `Prelude.hashWithSalt` fileFormat+        `Prelude.hashWithSalt` filters+        `Prelude.hashWithSalt` includeMemberAccounts+        `Prelude.hashWithSalt` s3DestinationConfig++instance+  Prelude.NFData+    ExportECSServiceRecommendations+  where+  rnf ExportECSServiceRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf fieldsToExport+      `Prelude.seq` Prelude.rnf fileFormat+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf includeMemberAccounts+      `Prelude.seq` Prelude.rnf s3DestinationConfig++instance+  Data.ToHeaders+    ExportECSServiceRecommendations+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.ExportECSServiceRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ExportECSServiceRecommendations where+  toJSON ExportECSServiceRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("fieldsToExport" Data..=)+              Prelude.<$> fieldsToExport,+            ("fileFormat" Data..=) Prelude.<$> fileFormat,+            ("filters" Data..=) Prelude.<$> filters,+            ("includeMemberAccounts" Data..=)+              Prelude.<$> includeMemberAccounts,+            Prelude.Just+              ("s3DestinationConfig" Data..= s3DestinationConfig)+          ]+      )++instance Data.ToPath ExportECSServiceRecommendations where+  toPath = Prelude.const "/"++instance Data.ToQuery ExportECSServiceRecommendations where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newExportECSServiceRecommendationsResponse' smart constructor.+data ExportECSServiceRecommendationsResponse = ExportECSServiceRecommendationsResponse'+  { -- | The identification number of the export job.+    --+    -- To view the status of an export job, use the+    -- DescribeRecommendationExportJobs action and specify the job ID.+    jobId :: Prelude.Maybe Prelude.Text,+    s3Destination :: Prelude.Maybe S3Destination,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportECSServiceRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'jobId', 'exportECSServiceRecommendationsResponse_jobId' - The identification number of the export job.+--+-- To view the status of an export job, use the+-- DescribeRecommendationExportJobs action and specify the job ID.+--+-- 's3Destination', 'exportECSServiceRecommendationsResponse_s3Destination' - Undocumented member.+--+-- 'httpStatus', 'exportECSServiceRecommendationsResponse_httpStatus' - The response's http status code.+newExportECSServiceRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ExportECSServiceRecommendationsResponse+newExportECSServiceRecommendationsResponse+  pHttpStatus_ =+    ExportECSServiceRecommendationsResponse'+      { jobId =+          Prelude.Nothing,+        s3Destination = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The identification number of the export job.+--+-- To view the status of an export job, use the+-- DescribeRecommendationExportJobs action and specify the job ID.+exportECSServiceRecommendationsResponse_jobId :: Lens.Lens' ExportECSServiceRecommendationsResponse (Prelude.Maybe Prelude.Text)+exportECSServiceRecommendationsResponse_jobId = Lens.lens (\ExportECSServiceRecommendationsResponse' {jobId} -> jobId) (\s@ExportECSServiceRecommendationsResponse' {} a -> s {jobId = a} :: ExportECSServiceRecommendationsResponse)++-- | Undocumented member.+exportECSServiceRecommendationsResponse_s3Destination :: Lens.Lens' ExportECSServiceRecommendationsResponse (Prelude.Maybe S3Destination)+exportECSServiceRecommendationsResponse_s3Destination = Lens.lens (\ExportECSServiceRecommendationsResponse' {s3Destination} -> s3Destination) (\s@ExportECSServiceRecommendationsResponse' {} a -> s {s3Destination = a} :: ExportECSServiceRecommendationsResponse)++-- | The response's http status code.+exportECSServiceRecommendationsResponse_httpStatus :: Lens.Lens' ExportECSServiceRecommendationsResponse Prelude.Int+exportECSServiceRecommendationsResponse_httpStatus = Lens.lens (\ExportECSServiceRecommendationsResponse' {httpStatus} -> httpStatus) (\s@ExportECSServiceRecommendationsResponse' {} a -> s {httpStatus = a} :: ExportECSServiceRecommendationsResponse)++instance+  Prelude.NFData+    ExportECSServiceRecommendationsResponse+  where+  rnf ExportECSServiceRecommendationsResponse' {..} =+    Prelude.rnf jobId+      `Prelude.seq` Prelude.rnf s3Destination+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/ExportLambdaFunctionRecommendations.hs view
@@ -0,0 +1,410 @@+{-# 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.ComputeOptimizer.ExportLambdaFunctionRecommendations+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Exports optimization recommendations for Lambda functions.+--+-- Recommendations are exported in a comma-separated values (.csv) file,+-- and its metadata in a JavaScript Object Notation (JSON) (.json) file, to+-- an existing Amazon Simple Storage Service (Amazon S3) bucket that you+-- specify. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html Exporting Recommendations>+-- in the /Compute Optimizer User Guide/.+--+-- You can have only one Lambda function export job in progress per Amazon+-- Web Services Region.+module Amazonka.ComputeOptimizer.ExportLambdaFunctionRecommendations+  ( -- * Creating a Request+    ExportLambdaFunctionRecommendations (..),+    newExportLambdaFunctionRecommendations,++    -- * Request Lenses+    exportLambdaFunctionRecommendations_accountIds,+    exportLambdaFunctionRecommendations_fieldsToExport,+    exportLambdaFunctionRecommendations_fileFormat,+    exportLambdaFunctionRecommendations_filters,+    exportLambdaFunctionRecommendations_includeMemberAccounts,+    exportLambdaFunctionRecommendations_s3DestinationConfig,++    -- * Destructuring the Response+    ExportLambdaFunctionRecommendationsResponse (..),+    newExportLambdaFunctionRecommendationsResponse,++    -- * Response Lenses+    exportLambdaFunctionRecommendationsResponse_jobId,+    exportLambdaFunctionRecommendationsResponse_s3Destination,+    exportLambdaFunctionRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newExportLambdaFunctionRecommendations' smart constructor.+data ExportLambdaFunctionRecommendations = ExportLambdaFunctionRecommendations'+  { -- | The IDs of the Amazon Web Services accounts for which to export Lambda+    -- function recommendations.+    --+    -- If your account is the management account of an organization, use this+    -- parameter to specify the member account for which you want to export+    -- recommendations.+    --+    -- This parameter cannot be specified together with the include member+    -- accounts parameter. The parameters are mutually exclusive.+    --+    -- Recommendations for member accounts are not included in the export if+    -- this parameter, or the include member accounts parameter, is omitted.+    --+    -- You can specify multiple account IDs per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | The recommendations data to include in the export file. For more+    -- information about the fields that can be exported, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+    -- in the /Compute Optimizer User Guide/.+    fieldsToExport :: Prelude.Maybe [ExportableLambdaFunctionField],+    -- | The format of the export file.+    --+    -- The only export file format currently supported is @Csv@.+    fileFormat :: Prelude.Maybe FileFormat,+    -- | An array of objects to specify a filter that exports a more specific set+    -- of Lambda function recommendations.+    filters :: Prelude.Maybe [LambdaFunctionRecommendationFilter],+    -- | Indicates whether to include recommendations for resources in all member+    -- accounts of the organization if your account is the management account+    -- of an organization.+    --+    -- The member accounts must also be opted in to Compute Optimizer, and+    -- trusted access for Compute Optimizer must be enabled in the organization+    -- account. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+    -- in the /Compute Optimizer User Guide/.+    --+    -- Recommendations for member accounts of the organization are not included+    -- in the export file if this parameter is omitted.+    --+    -- This parameter cannot be specified together with the account IDs+    -- parameter. The parameters are mutually exclusive.+    --+    -- Recommendations for member accounts are not included in the export if+    -- this parameter, or the account IDs parameter, is omitted.+    includeMemberAccounts :: Prelude.Maybe Prelude.Bool,+    s3DestinationConfig :: S3DestinationConfig+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportLambdaFunctionRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'exportLambdaFunctionRecommendations_accountIds' - The IDs of the Amazon Web Services accounts for which to export Lambda+-- function recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to export+-- recommendations.+--+-- This parameter cannot be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the include member accounts parameter, is omitted.+--+-- You can specify multiple account IDs per request.+--+-- 'fieldsToExport', 'exportLambdaFunctionRecommendations_fieldsToExport' - The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+--+-- 'fileFormat', 'exportLambdaFunctionRecommendations_fileFormat' - The format of the export file.+--+-- The only export file format currently supported is @Csv@.+--+-- 'filters', 'exportLambdaFunctionRecommendations_filters' - An array of objects to specify a filter that exports a more specific set+-- of Lambda function recommendations.+--+-- 'includeMemberAccounts', 'exportLambdaFunctionRecommendations_includeMemberAccounts' - Indicates whether to include recommendations for resources in all member+-- accounts of the organization if your account is the management account+-- of an organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- Recommendations for member accounts of the organization are not included+-- in the export file if this parameter is omitted.+--+-- This parameter cannot be specified together with the account IDs+-- parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the account IDs parameter, is omitted.+--+-- 's3DestinationConfig', 'exportLambdaFunctionRecommendations_s3DestinationConfig' - Undocumented member.+newExportLambdaFunctionRecommendations ::+  -- | 's3DestinationConfig'+  S3DestinationConfig ->+  ExportLambdaFunctionRecommendations+newExportLambdaFunctionRecommendations+  pS3DestinationConfig_ =+    ExportLambdaFunctionRecommendations'+      { accountIds =+          Prelude.Nothing,+        fieldsToExport = Prelude.Nothing,+        fileFormat = Prelude.Nothing,+        filters = Prelude.Nothing,+        includeMemberAccounts =+          Prelude.Nothing,+        s3DestinationConfig =+          pS3DestinationConfig_+      }++-- | The IDs of the Amazon Web Services accounts for which to export Lambda+-- function recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to export+-- recommendations.+--+-- This parameter cannot be specified together with the include member+-- accounts parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the include member accounts parameter, is omitted.+--+-- You can specify multiple account IDs per request.+exportLambdaFunctionRecommendations_accountIds :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe [Prelude.Text])+exportLambdaFunctionRecommendations_accountIds = Lens.lens (\ExportLambdaFunctionRecommendations' {accountIds} -> accountIds) (\s@ExportLambdaFunctionRecommendations' {} a -> s {accountIds = a} :: ExportLambdaFunctionRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The recommendations data to include in the export file. For more+-- information about the fields that can be exported, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/exporting-recommendations.html#exported-files Exported files>+-- in the /Compute Optimizer User Guide/.+exportLambdaFunctionRecommendations_fieldsToExport :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe [ExportableLambdaFunctionField])+exportLambdaFunctionRecommendations_fieldsToExport = Lens.lens (\ExportLambdaFunctionRecommendations' {fieldsToExport} -> fieldsToExport) (\s@ExportLambdaFunctionRecommendations' {} a -> s {fieldsToExport = a} :: ExportLambdaFunctionRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The format of the export file.+--+-- The only export file format currently supported is @Csv@.+exportLambdaFunctionRecommendations_fileFormat :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe FileFormat)+exportLambdaFunctionRecommendations_fileFormat = Lens.lens (\ExportLambdaFunctionRecommendations' {fileFormat} -> fileFormat) (\s@ExportLambdaFunctionRecommendations' {} a -> s {fileFormat = a} :: ExportLambdaFunctionRecommendations)++-- | An array of objects to specify a filter that exports a more specific set+-- of Lambda function recommendations.+exportLambdaFunctionRecommendations_filters :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe [LambdaFunctionRecommendationFilter])+exportLambdaFunctionRecommendations_filters = Lens.lens (\ExportLambdaFunctionRecommendations' {filters} -> filters) (\s@ExportLambdaFunctionRecommendations' {} a -> s {filters = a} :: ExportLambdaFunctionRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | Indicates whether to include recommendations for resources in all member+-- accounts of the organization if your account is the management account+-- of an organization.+--+-- The member accounts must also be opted in to Compute Optimizer, and+-- trusted access for Compute Optimizer must be enabled in the organization+-- account. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html#trusted-service-access Compute Optimizer and Amazon Web Services Organizations trusted access>+-- in the /Compute Optimizer User Guide/.+--+-- Recommendations for member accounts of the organization are not included+-- in the export file if this parameter is omitted.+--+-- This parameter cannot be specified together with the account IDs+-- parameter. The parameters are mutually exclusive.+--+-- Recommendations for member accounts are not included in the export if+-- this parameter, or the account IDs parameter, is omitted.+exportLambdaFunctionRecommendations_includeMemberAccounts :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe Prelude.Bool)+exportLambdaFunctionRecommendations_includeMemberAccounts = Lens.lens (\ExportLambdaFunctionRecommendations' {includeMemberAccounts} -> includeMemberAccounts) (\s@ExportLambdaFunctionRecommendations' {} a -> s {includeMemberAccounts = a} :: ExportLambdaFunctionRecommendations)++-- | Undocumented member.+exportLambdaFunctionRecommendations_s3DestinationConfig :: Lens.Lens' ExportLambdaFunctionRecommendations S3DestinationConfig+exportLambdaFunctionRecommendations_s3DestinationConfig = Lens.lens (\ExportLambdaFunctionRecommendations' {s3DestinationConfig} -> s3DestinationConfig) (\s@ExportLambdaFunctionRecommendations' {} a -> s {s3DestinationConfig = a} :: ExportLambdaFunctionRecommendations)++instance+  Core.AWSRequest+    ExportLambdaFunctionRecommendations+  where+  type+    AWSResponse ExportLambdaFunctionRecommendations =+      ExportLambdaFunctionRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ExportLambdaFunctionRecommendationsResponse'+            Prelude.<$> (x Data..?> "jobId")+            Prelude.<*> (x Data..?> "s3Destination")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    ExportLambdaFunctionRecommendations+  where+  hashWithSalt+    _salt+    ExportLambdaFunctionRecommendations' {..} =+      _salt+        `Prelude.hashWithSalt` accountIds+        `Prelude.hashWithSalt` fieldsToExport+        `Prelude.hashWithSalt` fileFormat+        `Prelude.hashWithSalt` filters+        `Prelude.hashWithSalt` includeMemberAccounts+        `Prelude.hashWithSalt` s3DestinationConfig++instance+  Prelude.NFData+    ExportLambdaFunctionRecommendations+  where+  rnf ExportLambdaFunctionRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf fieldsToExport+      `Prelude.seq` Prelude.rnf fileFormat+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf includeMemberAccounts+      `Prelude.seq` Prelude.rnf s3DestinationConfig++instance+  Data.ToHeaders+    ExportLambdaFunctionRecommendations+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.ExportLambdaFunctionRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance+  Data.ToJSON+    ExportLambdaFunctionRecommendations+  where+  toJSON ExportLambdaFunctionRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("fieldsToExport" Data..=)+              Prelude.<$> fieldsToExport,+            ("fileFormat" Data..=) Prelude.<$> fileFormat,+            ("filters" Data..=) Prelude.<$> filters,+            ("includeMemberAccounts" Data..=)+              Prelude.<$> includeMemberAccounts,+            Prelude.Just+              ("s3DestinationConfig" Data..= s3DestinationConfig)+          ]+      )++instance+  Data.ToPath+    ExportLambdaFunctionRecommendations+  where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    ExportLambdaFunctionRecommendations+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newExportLambdaFunctionRecommendationsResponse' smart constructor.+data ExportLambdaFunctionRecommendationsResponse = ExportLambdaFunctionRecommendationsResponse'+  { -- | The identification number of the export job.+    --+    -- Use the DescribeRecommendationExportJobs action, and specify the job ID+    -- to view the status of an export job.+    jobId :: Prelude.Maybe Prelude.Text,+    s3Destination :: Prelude.Maybe S3Destination,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportLambdaFunctionRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'jobId', 'exportLambdaFunctionRecommendationsResponse_jobId' - The identification number of the export job.+--+-- Use the DescribeRecommendationExportJobs action, and specify the job ID+-- to view the status of an export job.+--+-- 's3Destination', 'exportLambdaFunctionRecommendationsResponse_s3Destination' - Undocumented member.+--+-- 'httpStatus', 'exportLambdaFunctionRecommendationsResponse_httpStatus' - The response's http status code.+newExportLambdaFunctionRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ExportLambdaFunctionRecommendationsResponse+newExportLambdaFunctionRecommendationsResponse+  pHttpStatus_ =+    ExportLambdaFunctionRecommendationsResponse'+      { jobId =+          Prelude.Nothing,+        s3Destination =+          Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The identification number of the export job.+--+-- Use the DescribeRecommendationExportJobs action, and specify the job ID+-- to view the status of an export job.+exportLambdaFunctionRecommendationsResponse_jobId :: Lens.Lens' ExportLambdaFunctionRecommendationsResponse (Prelude.Maybe Prelude.Text)+exportLambdaFunctionRecommendationsResponse_jobId = Lens.lens (\ExportLambdaFunctionRecommendationsResponse' {jobId} -> jobId) (\s@ExportLambdaFunctionRecommendationsResponse' {} a -> s {jobId = a} :: ExportLambdaFunctionRecommendationsResponse)++-- | Undocumented member.+exportLambdaFunctionRecommendationsResponse_s3Destination :: Lens.Lens' ExportLambdaFunctionRecommendationsResponse (Prelude.Maybe S3Destination)+exportLambdaFunctionRecommendationsResponse_s3Destination = Lens.lens (\ExportLambdaFunctionRecommendationsResponse' {s3Destination} -> s3Destination) (\s@ExportLambdaFunctionRecommendationsResponse' {} a -> s {s3Destination = a} :: ExportLambdaFunctionRecommendationsResponse)++-- | The response's http status code.+exportLambdaFunctionRecommendationsResponse_httpStatus :: Lens.Lens' ExportLambdaFunctionRecommendationsResponse Prelude.Int+exportLambdaFunctionRecommendationsResponse_httpStatus = Lens.lens (\ExportLambdaFunctionRecommendationsResponse' {httpStatus} -> httpStatus) (\s@ExportLambdaFunctionRecommendationsResponse' {} a -> s {httpStatus = a} :: ExportLambdaFunctionRecommendationsResponse)++instance+  Prelude.NFData+    ExportLambdaFunctionRecommendationsResponse+  where+  rnf ExportLambdaFunctionRecommendationsResponse' {..} =+    Prelude.rnf jobId+      `Prelude.seq` Prelude.rnf s3Destination+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetAutoScalingGroupRecommendations.hs view
@@ -0,0 +1,366 @@+{-# 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.ComputeOptimizer.GetAutoScalingGroupRecommendations+-- 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 Auto Scaling group recommendations.+--+-- Compute Optimizer generates recommendations for Amazon EC2 Auto Scaling+-- groups that meet a specific set of requirements. For more information,+-- see the+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html Supported resources and requirements>+-- in the /Compute Optimizer User Guide/.+module Amazonka.ComputeOptimizer.GetAutoScalingGroupRecommendations+  ( -- * Creating a Request+    GetAutoScalingGroupRecommendations (..),+    newGetAutoScalingGroupRecommendations,++    -- * Request Lenses+    getAutoScalingGroupRecommendations_accountIds,+    getAutoScalingGroupRecommendations_autoScalingGroupArns,+    getAutoScalingGroupRecommendations_filters,+    getAutoScalingGroupRecommendations_maxResults,+    getAutoScalingGroupRecommendations_nextToken,+    getAutoScalingGroupRecommendations_recommendationPreferences,++    -- * Destructuring the Response+    GetAutoScalingGroupRecommendationsResponse (..),+    newGetAutoScalingGroupRecommendationsResponse,++    -- * Response Lenses+    getAutoScalingGroupRecommendationsResponse_autoScalingGroupRecommendations,+    getAutoScalingGroupRecommendationsResponse_errors,+    getAutoScalingGroupRecommendationsResponse_nextToken,+    getAutoScalingGroupRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetAutoScalingGroupRecommendations' smart constructor.+data GetAutoScalingGroupRecommendations = GetAutoScalingGroupRecommendations'+  { -- | The ID of the Amazon Web Services account for which to return Auto+    -- Scaling group recommendations.+    --+    -- If your account is the management account of an organization, use this+    -- parameter to specify the member account for which you want to return+    -- Auto Scaling group recommendations.+    --+    -- Only one account ID can be specified per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | The Amazon Resource Name (ARN) of the Auto Scaling groups for which to+    -- return recommendations.+    autoScalingGroupArns :: Prelude.Maybe [Prelude.Text],+    -- | An array of objects to specify a filter that returns a more specific+    -- list of Auto Scaling group recommendations.+    filters :: Prelude.Maybe [Filter],+    -- | The maximum number of Auto Scaling group recommendations to return with+    -- a single request.+    --+    -- To retrieve the remaining results, make another request with the+    -- returned @nextToken@ value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token to advance to the next page of Auto Scaling group+    -- recommendations.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An object to specify the preferences for the Auto Scaling group+    -- recommendations to return in the response.+    recommendationPreferences :: Prelude.Maybe RecommendationPreferences+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetAutoScalingGroupRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'getAutoScalingGroupRecommendations_accountIds' - The ID of the Amazon Web Services account for which to return Auto+-- Scaling group recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- Auto Scaling group recommendations.+--+-- Only one account ID can be specified per request.+--+-- 'autoScalingGroupArns', 'getAutoScalingGroupRecommendations_autoScalingGroupArns' - The Amazon Resource Name (ARN) of the Auto Scaling groups for which to+-- return recommendations.+--+-- 'filters', 'getAutoScalingGroupRecommendations_filters' - An array of objects to specify a filter that returns a more specific+-- list of Auto Scaling group recommendations.+--+-- 'maxResults', 'getAutoScalingGroupRecommendations_maxResults' - The maximum number of Auto Scaling group recommendations to return with+-- a single request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+--+-- 'nextToken', 'getAutoScalingGroupRecommendations_nextToken' - The token to advance to the next page of Auto Scaling group+-- recommendations.+--+-- 'recommendationPreferences', 'getAutoScalingGroupRecommendations_recommendationPreferences' - An object to specify the preferences for the Auto Scaling group+-- recommendations to return in the response.+newGetAutoScalingGroupRecommendations ::+  GetAutoScalingGroupRecommendations+newGetAutoScalingGroupRecommendations =+  GetAutoScalingGroupRecommendations'+    { accountIds =+        Prelude.Nothing,+      autoScalingGroupArns = Prelude.Nothing,+      filters = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      recommendationPreferences =+        Prelude.Nothing+    }++-- | The ID of the Amazon Web Services account for which to return Auto+-- Scaling group recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- Auto Scaling group recommendations.+--+-- Only one account ID can be specified per request.+getAutoScalingGroupRecommendations_accountIds :: Lens.Lens' GetAutoScalingGroupRecommendations (Prelude.Maybe [Prelude.Text])+getAutoScalingGroupRecommendations_accountIds = Lens.lens (\GetAutoScalingGroupRecommendations' {accountIds} -> accountIds) (\s@GetAutoScalingGroupRecommendations' {} a -> s {accountIds = a} :: GetAutoScalingGroupRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the Auto Scaling groups for which to+-- return recommendations.+getAutoScalingGroupRecommendations_autoScalingGroupArns :: Lens.Lens' GetAutoScalingGroupRecommendations (Prelude.Maybe [Prelude.Text])+getAutoScalingGroupRecommendations_autoScalingGroupArns = Lens.lens (\GetAutoScalingGroupRecommendations' {autoScalingGroupArns} -> autoScalingGroupArns) (\s@GetAutoScalingGroupRecommendations' {} a -> s {autoScalingGroupArns = a} :: GetAutoScalingGroupRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects to specify a filter that returns a more specific+-- list of Auto Scaling group recommendations.+getAutoScalingGroupRecommendations_filters :: Lens.Lens' GetAutoScalingGroupRecommendations (Prelude.Maybe [Filter])+getAutoScalingGroupRecommendations_filters = Lens.lens (\GetAutoScalingGroupRecommendations' {filters} -> filters) (\s@GetAutoScalingGroupRecommendations' {} a -> s {filters = a} :: GetAutoScalingGroupRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of Auto Scaling group recommendations to return with+-- a single request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+getAutoScalingGroupRecommendations_maxResults :: Lens.Lens' GetAutoScalingGroupRecommendations (Prelude.Maybe Prelude.Natural)+getAutoScalingGroupRecommendations_maxResults = Lens.lens (\GetAutoScalingGroupRecommendations' {maxResults} -> maxResults) (\s@GetAutoScalingGroupRecommendations' {} a -> s {maxResults = a} :: GetAutoScalingGroupRecommendations)++-- | The token to advance to the next page of Auto Scaling group+-- recommendations.+getAutoScalingGroupRecommendations_nextToken :: Lens.Lens' GetAutoScalingGroupRecommendations (Prelude.Maybe Prelude.Text)+getAutoScalingGroupRecommendations_nextToken = Lens.lens (\GetAutoScalingGroupRecommendations' {nextToken} -> nextToken) (\s@GetAutoScalingGroupRecommendations' {} a -> s {nextToken = a} :: GetAutoScalingGroupRecommendations)++-- | An object to specify the preferences for the Auto Scaling group+-- recommendations to return in the response.+getAutoScalingGroupRecommendations_recommendationPreferences :: Lens.Lens' GetAutoScalingGroupRecommendations (Prelude.Maybe RecommendationPreferences)+getAutoScalingGroupRecommendations_recommendationPreferences = Lens.lens (\GetAutoScalingGroupRecommendations' {recommendationPreferences} -> recommendationPreferences) (\s@GetAutoScalingGroupRecommendations' {} a -> s {recommendationPreferences = a} :: GetAutoScalingGroupRecommendations)++instance+  Core.AWSRequest+    GetAutoScalingGroupRecommendations+  where+  type+    AWSResponse GetAutoScalingGroupRecommendations =+      GetAutoScalingGroupRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetAutoScalingGroupRecommendationsResponse'+            Prelude.<$> ( x+                            Data..?> "autoScalingGroupRecommendations"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (x Data..?> "errors" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetAutoScalingGroupRecommendations+  where+  hashWithSalt+    _salt+    GetAutoScalingGroupRecommendations' {..} =+      _salt+        `Prelude.hashWithSalt` accountIds+        `Prelude.hashWithSalt` autoScalingGroupArns+        `Prelude.hashWithSalt` filters+        `Prelude.hashWithSalt` maxResults+        `Prelude.hashWithSalt` nextToken+        `Prelude.hashWithSalt` recommendationPreferences++instance+  Prelude.NFData+    GetAutoScalingGroupRecommendations+  where+  rnf GetAutoScalingGroupRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf autoScalingGroupArns+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf recommendationPreferences++instance+  Data.ToHeaders+    GetAutoScalingGroupRecommendations+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetAutoScalingGroupRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance+  Data.ToJSON+    GetAutoScalingGroupRecommendations+  where+  toJSON GetAutoScalingGroupRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("autoScalingGroupArns" Data..=)+              Prelude.<$> autoScalingGroupArns,+            ("filters" Data..=) Prelude.<$> filters,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("recommendationPreferences" Data..=)+              Prelude.<$> recommendationPreferences+          ]+      )++instance+  Data.ToPath+    GetAutoScalingGroupRecommendations+  where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    GetAutoScalingGroupRecommendations+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetAutoScalingGroupRecommendationsResponse' smart constructor.+data GetAutoScalingGroupRecommendationsResponse = GetAutoScalingGroupRecommendationsResponse'+  { -- | An array of objects that describe Auto Scaling group recommendations.+    autoScalingGroupRecommendations :: Prelude.Maybe [AutoScalingGroupRecommendation],+    -- | An array of objects that describe errors of the request.+    --+    -- For example, an error is returned if you request recommendations for an+    -- unsupported Auto Scaling group.+    errors :: Prelude.Maybe [GetRecommendationError],+    -- | The token to use to advance to the next page of Auto Scaling group+    -- recommendations.+    --+    -- This value is null when there are no more pages of Auto Scaling group+    -- recommendations to return.+    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 'GetAutoScalingGroupRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'autoScalingGroupRecommendations', 'getAutoScalingGroupRecommendationsResponse_autoScalingGroupRecommendations' - An array of objects that describe Auto Scaling group recommendations.+--+-- 'errors', 'getAutoScalingGroupRecommendationsResponse_errors' - An array of objects that describe errors of the request.+--+-- For example, an error is returned if you request recommendations for an+-- unsupported Auto Scaling group.+--+-- 'nextToken', 'getAutoScalingGroupRecommendationsResponse_nextToken' - The token to use to advance to the next page of Auto Scaling group+-- recommendations.+--+-- This value is null when there are no more pages of Auto Scaling group+-- recommendations to return.+--+-- 'httpStatus', 'getAutoScalingGroupRecommendationsResponse_httpStatus' - The response's http status code.+newGetAutoScalingGroupRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetAutoScalingGroupRecommendationsResponse+newGetAutoScalingGroupRecommendationsResponse+  pHttpStatus_ =+    GetAutoScalingGroupRecommendationsResponse'+      { autoScalingGroupRecommendations =+          Prelude.Nothing,+        errors = Prelude.Nothing,+        nextToken = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | An array of objects that describe Auto Scaling group recommendations.+getAutoScalingGroupRecommendationsResponse_autoScalingGroupRecommendations :: Lens.Lens' GetAutoScalingGroupRecommendationsResponse (Prelude.Maybe [AutoScalingGroupRecommendation])+getAutoScalingGroupRecommendationsResponse_autoScalingGroupRecommendations = Lens.lens (\GetAutoScalingGroupRecommendationsResponse' {autoScalingGroupRecommendations} -> autoScalingGroupRecommendations) (\s@GetAutoScalingGroupRecommendationsResponse' {} a -> s {autoScalingGroupRecommendations = a} :: GetAutoScalingGroupRecommendationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects that describe errors of the request.+--+-- For example, an error is returned if you request recommendations for an+-- unsupported Auto Scaling group.+getAutoScalingGroupRecommendationsResponse_errors :: Lens.Lens' GetAutoScalingGroupRecommendationsResponse (Prelude.Maybe [GetRecommendationError])+getAutoScalingGroupRecommendationsResponse_errors = Lens.lens (\GetAutoScalingGroupRecommendationsResponse' {errors} -> errors) (\s@GetAutoScalingGroupRecommendationsResponse' {} a -> s {errors = a} :: GetAutoScalingGroupRecommendationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to use to advance to the next page of Auto Scaling group+-- recommendations.+--+-- This value is null when there are no more pages of Auto Scaling group+-- recommendations to return.+getAutoScalingGroupRecommendationsResponse_nextToken :: Lens.Lens' GetAutoScalingGroupRecommendationsResponse (Prelude.Maybe Prelude.Text)+getAutoScalingGroupRecommendationsResponse_nextToken = Lens.lens (\GetAutoScalingGroupRecommendationsResponse' {nextToken} -> nextToken) (\s@GetAutoScalingGroupRecommendationsResponse' {} a -> s {nextToken = a} :: GetAutoScalingGroupRecommendationsResponse)++-- | The response's http status code.+getAutoScalingGroupRecommendationsResponse_httpStatus :: Lens.Lens' GetAutoScalingGroupRecommendationsResponse Prelude.Int+getAutoScalingGroupRecommendationsResponse_httpStatus = Lens.lens (\GetAutoScalingGroupRecommendationsResponse' {httpStatus} -> httpStatus) (\s@GetAutoScalingGroupRecommendationsResponse' {} a -> s {httpStatus = a} :: GetAutoScalingGroupRecommendationsResponse)++instance+  Prelude.NFData+    GetAutoScalingGroupRecommendationsResponse+  where+  rnf GetAutoScalingGroupRecommendationsResponse' {..} =+    Prelude.rnf autoScalingGroupRecommendations+      `Prelude.seq` Prelude.rnf errors+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetEBSVolumeRecommendations.hs view
@@ -0,0 +1,317 @@+{-# 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.ComputeOptimizer.GetEBSVolumeRecommendations+-- 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 Amazon Elastic Block Store (Amazon EBS) volume recommendations.+--+-- Compute Optimizer generates recommendations for Amazon EBS volumes that+-- meet a specific set of requirements. For more information, see the+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html Supported resources and requirements>+-- in the /Compute Optimizer User Guide/.+module Amazonka.ComputeOptimizer.GetEBSVolumeRecommendations+  ( -- * Creating a Request+    GetEBSVolumeRecommendations (..),+    newGetEBSVolumeRecommendations,++    -- * Request Lenses+    getEBSVolumeRecommendations_accountIds,+    getEBSVolumeRecommendations_filters,+    getEBSVolumeRecommendations_maxResults,+    getEBSVolumeRecommendations_nextToken,+    getEBSVolumeRecommendations_volumeArns,++    -- * Destructuring the Response+    GetEBSVolumeRecommendationsResponse (..),+    newGetEBSVolumeRecommendationsResponse,++    -- * Response Lenses+    getEBSVolumeRecommendationsResponse_errors,+    getEBSVolumeRecommendationsResponse_nextToken,+    getEBSVolumeRecommendationsResponse_volumeRecommendations,+    getEBSVolumeRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetEBSVolumeRecommendations' smart constructor.+data GetEBSVolumeRecommendations = GetEBSVolumeRecommendations'+  { -- | The ID of the Amazon Web Services account for which to return volume+    -- recommendations.+    --+    -- If your account is the management account of an organization, use this+    -- parameter to specify the member account for which you want to return+    -- volume recommendations.+    --+    -- Only one account ID can be specified per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | An array of objects to specify a filter that returns a more specific+    -- list of volume recommendations.+    filters :: Prelude.Maybe [EBSFilter],+    -- | The maximum number of volume recommendations to return with a single+    -- request.+    --+    -- To retrieve the remaining results, make another request with the+    -- returned @nextToken@ value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token to advance to the next page of volume recommendations.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the volumes for which to return+    -- recommendations.+    volumeArns :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEBSVolumeRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'getEBSVolumeRecommendations_accountIds' - The ID of the Amazon Web Services account for which to return volume+-- recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- volume recommendations.+--+-- Only one account ID can be specified per request.+--+-- 'filters', 'getEBSVolumeRecommendations_filters' - An array of objects to specify a filter that returns a more specific+-- list of volume recommendations.+--+-- 'maxResults', 'getEBSVolumeRecommendations_maxResults' - The maximum number of volume recommendations to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+--+-- 'nextToken', 'getEBSVolumeRecommendations_nextToken' - The token to advance to the next page of volume recommendations.+--+-- 'volumeArns', 'getEBSVolumeRecommendations_volumeArns' - The Amazon Resource Name (ARN) of the volumes for which to return+-- recommendations.+newGetEBSVolumeRecommendations ::+  GetEBSVolumeRecommendations+newGetEBSVolumeRecommendations =+  GetEBSVolumeRecommendations'+    { accountIds =+        Prelude.Nothing,+      filters = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      volumeArns = Prelude.Nothing+    }++-- | The ID of the Amazon Web Services account for which to return volume+-- recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- volume recommendations.+--+-- Only one account ID can be specified per request.+getEBSVolumeRecommendations_accountIds :: Lens.Lens' GetEBSVolumeRecommendations (Prelude.Maybe [Prelude.Text])+getEBSVolumeRecommendations_accountIds = Lens.lens (\GetEBSVolumeRecommendations' {accountIds} -> accountIds) (\s@GetEBSVolumeRecommendations' {} a -> s {accountIds = a} :: GetEBSVolumeRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects to specify a filter that returns a more specific+-- list of volume recommendations.+getEBSVolumeRecommendations_filters :: Lens.Lens' GetEBSVolumeRecommendations (Prelude.Maybe [EBSFilter])+getEBSVolumeRecommendations_filters = Lens.lens (\GetEBSVolumeRecommendations' {filters} -> filters) (\s@GetEBSVolumeRecommendations' {} a -> s {filters = a} :: GetEBSVolumeRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of volume recommendations to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+getEBSVolumeRecommendations_maxResults :: Lens.Lens' GetEBSVolumeRecommendations (Prelude.Maybe Prelude.Natural)+getEBSVolumeRecommendations_maxResults = Lens.lens (\GetEBSVolumeRecommendations' {maxResults} -> maxResults) (\s@GetEBSVolumeRecommendations' {} a -> s {maxResults = a} :: GetEBSVolumeRecommendations)++-- | The token to advance to the next page of volume recommendations.+getEBSVolumeRecommendations_nextToken :: Lens.Lens' GetEBSVolumeRecommendations (Prelude.Maybe Prelude.Text)+getEBSVolumeRecommendations_nextToken = Lens.lens (\GetEBSVolumeRecommendations' {nextToken} -> nextToken) (\s@GetEBSVolumeRecommendations' {} a -> s {nextToken = a} :: GetEBSVolumeRecommendations)++-- | The Amazon Resource Name (ARN) of the volumes for which to return+-- recommendations.+getEBSVolumeRecommendations_volumeArns :: Lens.Lens' GetEBSVolumeRecommendations (Prelude.Maybe [Prelude.Text])+getEBSVolumeRecommendations_volumeArns = Lens.lens (\GetEBSVolumeRecommendations' {volumeArns} -> volumeArns) (\s@GetEBSVolumeRecommendations' {} a -> s {volumeArns = a} :: GetEBSVolumeRecommendations) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSRequest GetEBSVolumeRecommendations where+  type+    AWSResponse GetEBSVolumeRecommendations =+      GetEBSVolumeRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetEBSVolumeRecommendationsResponse'+            Prelude.<$> (x Data..?> "errors" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "nextToken")+            Prelude.<*> ( x+                            Data..?> "volumeRecommendations"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetEBSVolumeRecommendations where+  hashWithSalt _salt GetEBSVolumeRecommendations' {..} =+    _salt+      `Prelude.hashWithSalt` accountIds+      `Prelude.hashWithSalt` filters+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` volumeArns++instance Prelude.NFData GetEBSVolumeRecommendations where+  rnf GetEBSVolumeRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf volumeArns++instance Data.ToHeaders GetEBSVolumeRecommendations where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetEBSVolumeRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetEBSVolumeRecommendations where+  toJSON GetEBSVolumeRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("filters" Data..=) Prelude.<$> filters,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("volumeArns" Data..=) Prelude.<$> volumeArns+          ]+      )++instance Data.ToPath GetEBSVolumeRecommendations where+  toPath = Prelude.const "/"++instance Data.ToQuery GetEBSVolumeRecommendations where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetEBSVolumeRecommendationsResponse' smart constructor.+data GetEBSVolumeRecommendationsResponse = GetEBSVolumeRecommendationsResponse'+  { -- | An array of objects that describe errors of the request.+    --+    -- For example, an error is returned if you request recommendations for an+    -- unsupported volume.+    errors :: Prelude.Maybe [GetRecommendationError],+    -- | The token to use to advance to the next page of volume recommendations.+    --+    -- This value is null when there are no more pages of volume+    -- recommendations to return.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that describe volume recommendations.+    volumeRecommendations :: Prelude.Maybe [VolumeRecommendation],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEBSVolumeRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'errors', 'getEBSVolumeRecommendationsResponse_errors' - An array of objects that describe errors of the request.+--+-- For example, an error is returned if you request recommendations for an+-- unsupported volume.+--+-- 'nextToken', 'getEBSVolumeRecommendationsResponse_nextToken' - The token to use to advance to the next page of volume recommendations.+--+-- This value is null when there are no more pages of volume+-- recommendations to return.+--+-- 'volumeRecommendations', 'getEBSVolumeRecommendationsResponse_volumeRecommendations' - An array of objects that describe volume recommendations.+--+-- 'httpStatus', 'getEBSVolumeRecommendationsResponse_httpStatus' - The response's http status code.+newGetEBSVolumeRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetEBSVolumeRecommendationsResponse+newGetEBSVolumeRecommendationsResponse pHttpStatus_ =+  GetEBSVolumeRecommendationsResponse'+    { errors =+        Prelude.Nothing,+      nextToken = Prelude.Nothing,+      volumeRecommendations =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | An array of objects that describe errors of the request.+--+-- For example, an error is returned if you request recommendations for an+-- unsupported volume.+getEBSVolumeRecommendationsResponse_errors :: Lens.Lens' GetEBSVolumeRecommendationsResponse (Prelude.Maybe [GetRecommendationError])+getEBSVolumeRecommendationsResponse_errors = Lens.lens (\GetEBSVolumeRecommendationsResponse' {errors} -> errors) (\s@GetEBSVolumeRecommendationsResponse' {} a -> s {errors = a} :: GetEBSVolumeRecommendationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to use to advance to the next page of volume recommendations.+--+-- This value is null when there are no more pages of volume+-- recommendations to return.+getEBSVolumeRecommendationsResponse_nextToken :: Lens.Lens' GetEBSVolumeRecommendationsResponse (Prelude.Maybe Prelude.Text)+getEBSVolumeRecommendationsResponse_nextToken = Lens.lens (\GetEBSVolumeRecommendationsResponse' {nextToken} -> nextToken) (\s@GetEBSVolumeRecommendationsResponse' {} a -> s {nextToken = a} :: GetEBSVolumeRecommendationsResponse)++-- | An array of objects that describe volume recommendations.+getEBSVolumeRecommendationsResponse_volumeRecommendations :: Lens.Lens' GetEBSVolumeRecommendationsResponse (Prelude.Maybe [VolumeRecommendation])+getEBSVolumeRecommendationsResponse_volumeRecommendations = Lens.lens (\GetEBSVolumeRecommendationsResponse' {volumeRecommendations} -> volumeRecommendations) (\s@GetEBSVolumeRecommendationsResponse' {} a -> s {volumeRecommendations = a} :: GetEBSVolumeRecommendationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getEBSVolumeRecommendationsResponse_httpStatus :: Lens.Lens' GetEBSVolumeRecommendationsResponse Prelude.Int+getEBSVolumeRecommendationsResponse_httpStatus = Lens.lens (\GetEBSVolumeRecommendationsResponse' {httpStatus} -> httpStatus) (\s@GetEBSVolumeRecommendationsResponse' {} a -> s {httpStatus = a} :: GetEBSVolumeRecommendationsResponse)++instance+  Prelude.NFData+    GetEBSVolumeRecommendationsResponse+  where+  rnf GetEBSVolumeRecommendationsResponse' {..} =+    Prelude.rnf errors+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf volumeRecommendations+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetEC2InstanceRecommendations.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.ComputeOptimizer.GetEC2InstanceRecommendations+-- 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 Amazon EC2 instance recommendations.+--+-- Compute Optimizer generates recommendations for Amazon Elastic Compute+-- Cloud (Amazon EC2) instances that meet a specific set of requirements.+-- For more information, see the+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html Supported resources and requirements>+-- in the /Compute Optimizer User Guide/.+module Amazonka.ComputeOptimizer.GetEC2InstanceRecommendations+  ( -- * Creating a Request+    GetEC2InstanceRecommendations (..),+    newGetEC2InstanceRecommendations,++    -- * Request Lenses+    getEC2InstanceRecommendations_accountIds,+    getEC2InstanceRecommendations_filters,+    getEC2InstanceRecommendations_instanceArns,+    getEC2InstanceRecommendations_maxResults,+    getEC2InstanceRecommendations_nextToken,+    getEC2InstanceRecommendations_recommendationPreferences,++    -- * Destructuring the Response+    GetEC2InstanceRecommendationsResponse (..),+    newGetEC2InstanceRecommendationsResponse,++    -- * Response Lenses+    getEC2InstanceRecommendationsResponse_errors,+    getEC2InstanceRecommendationsResponse_instanceRecommendations,+    getEC2InstanceRecommendationsResponse_nextToken,+    getEC2InstanceRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetEC2InstanceRecommendations' smart constructor.+data GetEC2InstanceRecommendations = GetEC2InstanceRecommendations'+  { -- | The ID of the Amazon Web Services account for which to return instance+    -- recommendations.+    --+    -- If your account is the management account of an organization, use this+    -- parameter to specify the member account for which you want to return+    -- instance recommendations.+    --+    -- Only one account ID can be specified per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | An array of objects to specify a filter that returns a more specific+    -- list of instance recommendations.+    filters :: Prelude.Maybe [Filter],+    -- | The Amazon Resource Name (ARN) of the instances for which to return+    -- recommendations.+    instanceArns :: Prelude.Maybe [Prelude.Text],+    -- | The maximum number of instance recommendations to return with a single+    -- request.+    --+    -- To retrieve the remaining results, make another request with the+    -- returned @nextToken@ value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token to advance to the next page of instance recommendations.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An object to specify the preferences for the Amazon EC2 instance+    -- recommendations to return in the response.+    recommendationPreferences :: Prelude.Maybe RecommendationPreferences+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEC2InstanceRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'getEC2InstanceRecommendations_accountIds' - The ID of the Amazon Web Services account for which to return instance+-- recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- instance recommendations.+--+-- Only one account ID can be specified per request.+--+-- 'filters', 'getEC2InstanceRecommendations_filters' - An array of objects to specify a filter that returns a more specific+-- list of instance recommendations.+--+-- 'instanceArns', 'getEC2InstanceRecommendations_instanceArns' - The Amazon Resource Name (ARN) of the instances for which to return+-- recommendations.+--+-- 'maxResults', 'getEC2InstanceRecommendations_maxResults' - The maximum number of instance recommendations to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+--+-- 'nextToken', 'getEC2InstanceRecommendations_nextToken' - The token to advance to the next page of instance recommendations.+--+-- 'recommendationPreferences', 'getEC2InstanceRecommendations_recommendationPreferences' - An object to specify the preferences for the Amazon EC2 instance+-- recommendations to return in the response.+newGetEC2InstanceRecommendations ::+  GetEC2InstanceRecommendations+newGetEC2InstanceRecommendations =+  GetEC2InstanceRecommendations'+    { accountIds =+        Prelude.Nothing,+      filters = Prelude.Nothing,+      instanceArns = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      recommendationPreferences = Prelude.Nothing+    }++-- | The ID of the Amazon Web Services account for which to return instance+-- recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- instance recommendations.+--+-- Only one account ID can be specified per request.+getEC2InstanceRecommendations_accountIds :: Lens.Lens' GetEC2InstanceRecommendations (Prelude.Maybe [Prelude.Text])+getEC2InstanceRecommendations_accountIds = Lens.lens (\GetEC2InstanceRecommendations' {accountIds} -> accountIds) (\s@GetEC2InstanceRecommendations' {} a -> s {accountIds = a} :: GetEC2InstanceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects to specify a filter that returns a more specific+-- list of instance recommendations.+getEC2InstanceRecommendations_filters :: Lens.Lens' GetEC2InstanceRecommendations (Prelude.Maybe [Filter])+getEC2InstanceRecommendations_filters = Lens.lens (\GetEC2InstanceRecommendations' {filters} -> filters) (\s@GetEC2InstanceRecommendations' {} a -> s {filters = a} :: GetEC2InstanceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the instances for which to return+-- recommendations.+getEC2InstanceRecommendations_instanceArns :: Lens.Lens' GetEC2InstanceRecommendations (Prelude.Maybe [Prelude.Text])+getEC2InstanceRecommendations_instanceArns = Lens.lens (\GetEC2InstanceRecommendations' {instanceArns} -> instanceArns) (\s@GetEC2InstanceRecommendations' {} a -> s {instanceArns = a} :: GetEC2InstanceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of instance recommendations to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+getEC2InstanceRecommendations_maxResults :: Lens.Lens' GetEC2InstanceRecommendations (Prelude.Maybe Prelude.Natural)+getEC2InstanceRecommendations_maxResults = Lens.lens (\GetEC2InstanceRecommendations' {maxResults} -> maxResults) (\s@GetEC2InstanceRecommendations' {} a -> s {maxResults = a} :: GetEC2InstanceRecommendations)++-- | The token to advance to the next page of instance recommendations.+getEC2InstanceRecommendations_nextToken :: Lens.Lens' GetEC2InstanceRecommendations (Prelude.Maybe Prelude.Text)+getEC2InstanceRecommendations_nextToken = Lens.lens (\GetEC2InstanceRecommendations' {nextToken} -> nextToken) (\s@GetEC2InstanceRecommendations' {} a -> s {nextToken = a} :: GetEC2InstanceRecommendations)++-- | An object to specify the preferences for the Amazon EC2 instance+-- recommendations to return in the response.+getEC2InstanceRecommendations_recommendationPreferences :: Lens.Lens' GetEC2InstanceRecommendations (Prelude.Maybe RecommendationPreferences)+getEC2InstanceRecommendations_recommendationPreferences = Lens.lens (\GetEC2InstanceRecommendations' {recommendationPreferences} -> recommendationPreferences) (\s@GetEC2InstanceRecommendations' {} a -> s {recommendationPreferences = a} :: GetEC2InstanceRecommendations)++instance+  Core.AWSRequest+    GetEC2InstanceRecommendations+  where+  type+    AWSResponse GetEC2InstanceRecommendations =+      GetEC2InstanceRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetEC2InstanceRecommendationsResponse'+            Prelude.<$> (x Data..?> "errors" Core..!@ Prelude.mempty)+            Prelude.<*> ( x+                            Data..?> "instanceRecommendations"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetEC2InstanceRecommendations+  where+  hashWithSalt _salt GetEC2InstanceRecommendations' {..} =+    _salt+      `Prelude.hashWithSalt` accountIds+      `Prelude.hashWithSalt` filters+      `Prelude.hashWithSalt` instanceArns+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` recommendationPreferences++instance Prelude.NFData GetEC2InstanceRecommendations where+  rnf GetEC2InstanceRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf instanceArns+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf recommendationPreferences++instance Data.ToHeaders GetEC2InstanceRecommendations where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetEC2InstanceRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetEC2InstanceRecommendations where+  toJSON GetEC2InstanceRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("filters" Data..=) Prelude.<$> filters,+            ("instanceArns" Data..=) Prelude.<$> instanceArns,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("recommendationPreferences" Data..=)+              Prelude.<$> recommendationPreferences+          ]+      )++instance Data.ToPath GetEC2InstanceRecommendations where+  toPath = Prelude.const "/"++instance Data.ToQuery GetEC2InstanceRecommendations where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetEC2InstanceRecommendationsResponse' smart constructor.+data GetEC2InstanceRecommendationsResponse = GetEC2InstanceRecommendationsResponse'+  { -- | An array of objects that describe errors of the request.+    --+    -- For example, an error is returned if you request recommendations for an+    -- instance of an unsupported instance family.+    errors :: Prelude.Maybe [GetRecommendationError],+    -- | An array of objects that describe instance recommendations.+    instanceRecommendations :: Prelude.Maybe [InstanceRecommendation],+    -- | The token to use to advance to the next page of instance+    -- recommendations.+    --+    -- This value is null when there are no more pages of instance+    -- recommendations to return.+    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 'GetEC2InstanceRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'errors', 'getEC2InstanceRecommendationsResponse_errors' - An array of objects that describe errors of the request.+--+-- For example, an error is returned if you request recommendations for an+-- instance of an unsupported instance family.+--+-- 'instanceRecommendations', 'getEC2InstanceRecommendationsResponse_instanceRecommendations' - An array of objects that describe instance recommendations.+--+-- 'nextToken', 'getEC2InstanceRecommendationsResponse_nextToken' - The token to use to advance to the next page of instance+-- recommendations.+--+-- This value is null when there are no more pages of instance+-- recommendations to return.+--+-- 'httpStatus', 'getEC2InstanceRecommendationsResponse_httpStatus' - The response's http status code.+newGetEC2InstanceRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetEC2InstanceRecommendationsResponse+newGetEC2InstanceRecommendationsResponse pHttpStatus_ =+  GetEC2InstanceRecommendationsResponse'+    { errors =+        Prelude.Nothing,+      instanceRecommendations =+        Prelude.Nothing,+      nextToken = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | An array of objects that describe errors of the request.+--+-- For example, an error is returned if you request recommendations for an+-- instance of an unsupported instance family.+getEC2InstanceRecommendationsResponse_errors :: Lens.Lens' GetEC2InstanceRecommendationsResponse (Prelude.Maybe [GetRecommendationError])+getEC2InstanceRecommendationsResponse_errors = Lens.lens (\GetEC2InstanceRecommendationsResponse' {errors} -> errors) (\s@GetEC2InstanceRecommendationsResponse' {} a -> s {errors = a} :: GetEC2InstanceRecommendationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects that describe instance recommendations.+getEC2InstanceRecommendationsResponse_instanceRecommendations :: Lens.Lens' GetEC2InstanceRecommendationsResponse (Prelude.Maybe [InstanceRecommendation])+getEC2InstanceRecommendationsResponse_instanceRecommendations = Lens.lens (\GetEC2InstanceRecommendationsResponse' {instanceRecommendations} -> instanceRecommendations) (\s@GetEC2InstanceRecommendationsResponse' {} a -> s {instanceRecommendations = a} :: GetEC2InstanceRecommendationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to use to advance to the next page of instance+-- recommendations.+--+-- This value is null when there are no more pages of instance+-- recommendations to return.+getEC2InstanceRecommendationsResponse_nextToken :: Lens.Lens' GetEC2InstanceRecommendationsResponse (Prelude.Maybe Prelude.Text)+getEC2InstanceRecommendationsResponse_nextToken = Lens.lens (\GetEC2InstanceRecommendationsResponse' {nextToken} -> nextToken) (\s@GetEC2InstanceRecommendationsResponse' {} a -> s {nextToken = a} :: GetEC2InstanceRecommendationsResponse)++-- | The response's http status code.+getEC2InstanceRecommendationsResponse_httpStatus :: Lens.Lens' GetEC2InstanceRecommendationsResponse Prelude.Int+getEC2InstanceRecommendationsResponse_httpStatus = Lens.lens (\GetEC2InstanceRecommendationsResponse' {httpStatus} -> httpStatus) (\s@GetEC2InstanceRecommendationsResponse' {} a -> s {httpStatus = a} :: GetEC2InstanceRecommendationsResponse)++instance+  Prelude.NFData+    GetEC2InstanceRecommendationsResponse+  where+  rnf GetEC2InstanceRecommendationsResponse' {..} =+    Prelude.rnf errors+      `Prelude.seq` Prelude.rnf instanceRecommendations+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetEC2RecommendationProjectedMetrics.hs view
@@ -0,0 +1,297 @@+{-# 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.ComputeOptimizer.GetEC2RecommendationProjectedMetrics+-- 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 projected utilization metrics of Amazon EC2 instance+-- recommendations.+--+-- The @Cpu@ and @Memory@ metrics are the only projected utilization+-- metrics returned when you run this action. Additionally, the @Memory@+-- metric is returned only for resources that have the unified CloudWatch+-- agent installed on them. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+module Amazonka.ComputeOptimizer.GetEC2RecommendationProjectedMetrics+  ( -- * Creating a Request+    GetEC2RecommendationProjectedMetrics (..),+    newGetEC2RecommendationProjectedMetrics,++    -- * Request Lenses+    getEC2RecommendationProjectedMetrics_recommendationPreferences,+    getEC2RecommendationProjectedMetrics_instanceArn,+    getEC2RecommendationProjectedMetrics_stat,+    getEC2RecommendationProjectedMetrics_period,+    getEC2RecommendationProjectedMetrics_startTime,+    getEC2RecommendationProjectedMetrics_endTime,++    -- * Destructuring the Response+    GetEC2RecommendationProjectedMetricsResponse (..),+    newGetEC2RecommendationProjectedMetricsResponse,++    -- * Response Lenses+    getEC2RecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics,+    getEC2RecommendationProjectedMetricsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetEC2RecommendationProjectedMetrics' smart constructor.+data GetEC2RecommendationProjectedMetrics = GetEC2RecommendationProjectedMetrics'+  { -- | An object to specify the preferences for the Amazon EC2 recommendation+    -- projected metrics to return in the response.+    recommendationPreferences :: Prelude.Maybe RecommendationPreferences,+    -- | The Amazon Resource Name (ARN) of the instances for which to return+    -- recommendation projected metrics.+    instanceArn :: Prelude.Text,+    -- | The statistic of the projected metrics.+    stat :: MetricStatistic,+    -- | The granularity, in seconds, of the projected metrics data points.+    period :: Prelude.Int,+    -- | The timestamp of the first projected metrics data point to return.+    startTime :: Data.POSIX,+    -- | The timestamp of the last projected metrics data point to return.+    endTime :: Data.POSIX+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEC2RecommendationProjectedMetrics' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'recommendationPreferences', 'getEC2RecommendationProjectedMetrics_recommendationPreferences' - An object to specify the preferences for the Amazon EC2 recommendation+-- projected metrics to return in the response.+--+-- 'instanceArn', 'getEC2RecommendationProjectedMetrics_instanceArn' - The Amazon Resource Name (ARN) of the instances for which to return+-- recommendation projected metrics.+--+-- 'stat', 'getEC2RecommendationProjectedMetrics_stat' - The statistic of the projected metrics.+--+-- 'period', 'getEC2RecommendationProjectedMetrics_period' - The granularity, in seconds, of the projected metrics data points.+--+-- 'startTime', 'getEC2RecommendationProjectedMetrics_startTime' - The timestamp of the first projected metrics data point to return.+--+-- 'endTime', 'getEC2RecommendationProjectedMetrics_endTime' - The timestamp of the last projected metrics data point to return.+newGetEC2RecommendationProjectedMetrics ::+  -- | 'instanceArn'+  Prelude.Text ->+  -- | 'stat'+  MetricStatistic ->+  -- | 'period'+  Prelude.Int ->+  -- | 'startTime'+  Prelude.UTCTime ->+  -- | 'endTime'+  Prelude.UTCTime ->+  GetEC2RecommendationProjectedMetrics+newGetEC2RecommendationProjectedMetrics+  pInstanceArn_+  pStat_+  pPeriod_+  pStartTime_+  pEndTime_ =+    GetEC2RecommendationProjectedMetrics'+      { recommendationPreferences =+          Prelude.Nothing,+        instanceArn = pInstanceArn_,+        stat = pStat_,+        period = pPeriod_,+        startTime =+          Data._Time Lens.# pStartTime_,+        endTime = Data._Time Lens.# pEndTime_+      }++-- | An object to specify the preferences for the Amazon EC2 recommendation+-- projected metrics to return in the response.+getEC2RecommendationProjectedMetrics_recommendationPreferences :: Lens.Lens' GetEC2RecommendationProjectedMetrics (Prelude.Maybe RecommendationPreferences)+getEC2RecommendationProjectedMetrics_recommendationPreferences = Lens.lens (\GetEC2RecommendationProjectedMetrics' {recommendationPreferences} -> recommendationPreferences) (\s@GetEC2RecommendationProjectedMetrics' {} a -> s {recommendationPreferences = a} :: GetEC2RecommendationProjectedMetrics)++-- | The Amazon Resource Name (ARN) of the instances for which to return+-- recommendation projected metrics.+getEC2RecommendationProjectedMetrics_instanceArn :: Lens.Lens' GetEC2RecommendationProjectedMetrics Prelude.Text+getEC2RecommendationProjectedMetrics_instanceArn = Lens.lens (\GetEC2RecommendationProjectedMetrics' {instanceArn} -> instanceArn) (\s@GetEC2RecommendationProjectedMetrics' {} a -> s {instanceArn = a} :: GetEC2RecommendationProjectedMetrics)++-- | The statistic of the projected metrics.+getEC2RecommendationProjectedMetrics_stat :: Lens.Lens' GetEC2RecommendationProjectedMetrics MetricStatistic+getEC2RecommendationProjectedMetrics_stat = Lens.lens (\GetEC2RecommendationProjectedMetrics' {stat} -> stat) (\s@GetEC2RecommendationProjectedMetrics' {} a -> s {stat = a} :: GetEC2RecommendationProjectedMetrics)++-- | The granularity, in seconds, of the projected metrics data points.+getEC2RecommendationProjectedMetrics_period :: Lens.Lens' GetEC2RecommendationProjectedMetrics Prelude.Int+getEC2RecommendationProjectedMetrics_period = Lens.lens (\GetEC2RecommendationProjectedMetrics' {period} -> period) (\s@GetEC2RecommendationProjectedMetrics' {} a -> s {period = a} :: GetEC2RecommendationProjectedMetrics)++-- | The timestamp of the first projected metrics data point to return.+getEC2RecommendationProjectedMetrics_startTime :: Lens.Lens' GetEC2RecommendationProjectedMetrics Prelude.UTCTime+getEC2RecommendationProjectedMetrics_startTime = Lens.lens (\GetEC2RecommendationProjectedMetrics' {startTime} -> startTime) (\s@GetEC2RecommendationProjectedMetrics' {} a -> s {startTime = a} :: GetEC2RecommendationProjectedMetrics) Prelude.. Data._Time++-- | The timestamp of the last projected metrics data point to return.+getEC2RecommendationProjectedMetrics_endTime :: Lens.Lens' GetEC2RecommendationProjectedMetrics Prelude.UTCTime+getEC2RecommendationProjectedMetrics_endTime = Lens.lens (\GetEC2RecommendationProjectedMetrics' {endTime} -> endTime) (\s@GetEC2RecommendationProjectedMetrics' {} a -> s {endTime = a} :: GetEC2RecommendationProjectedMetrics) Prelude.. Data._Time++instance+  Core.AWSRequest+    GetEC2RecommendationProjectedMetrics+  where+  type+    AWSResponse GetEC2RecommendationProjectedMetrics =+      GetEC2RecommendationProjectedMetricsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetEC2RecommendationProjectedMetricsResponse'+            Prelude.<$> ( x+                            Data..?> "recommendedOptionProjectedMetrics"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetEC2RecommendationProjectedMetrics+  where+  hashWithSalt+    _salt+    GetEC2RecommendationProjectedMetrics' {..} =+      _salt+        `Prelude.hashWithSalt` recommendationPreferences+        `Prelude.hashWithSalt` instanceArn+        `Prelude.hashWithSalt` stat+        `Prelude.hashWithSalt` period+        `Prelude.hashWithSalt` startTime+        `Prelude.hashWithSalt` endTime++instance+  Prelude.NFData+    GetEC2RecommendationProjectedMetrics+  where+  rnf GetEC2RecommendationProjectedMetrics' {..} =+    Prelude.rnf recommendationPreferences+      `Prelude.seq` Prelude.rnf instanceArn+      `Prelude.seq` Prelude.rnf stat+      `Prelude.seq` Prelude.rnf period+      `Prelude.seq` Prelude.rnf startTime+      `Prelude.seq` Prelude.rnf endTime++instance+  Data.ToHeaders+    GetEC2RecommendationProjectedMetrics+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetEC2RecommendationProjectedMetrics" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance+  Data.ToJSON+    GetEC2RecommendationProjectedMetrics+  where+  toJSON GetEC2RecommendationProjectedMetrics' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("recommendationPreferences" Data..=)+              Prelude.<$> recommendationPreferences,+            Prelude.Just ("instanceArn" Data..= instanceArn),+            Prelude.Just ("stat" Data..= stat),+            Prelude.Just ("period" Data..= period),+            Prelude.Just ("startTime" Data..= startTime),+            Prelude.Just ("endTime" Data..= endTime)+          ]+      )++instance+  Data.ToPath+    GetEC2RecommendationProjectedMetrics+  where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    GetEC2RecommendationProjectedMetrics+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetEC2RecommendationProjectedMetricsResponse' smart constructor.+data GetEC2RecommendationProjectedMetricsResponse = GetEC2RecommendationProjectedMetricsResponse'+  { -- | An array of objects that describes projected metrics.+    recommendedOptionProjectedMetrics :: Prelude.Maybe [RecommendedOptionProjectedMetric],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEC2RecommendationProjectedMetricsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'recommendedOptionProjectedMetrics', 'getEC2RecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics' - An array of objects that describes projected metrics.+--+-- 'httpStatus', 'getEC2RecommendationProjectedMetricsResponse_httpStatus' - The response's http status code.+newGetEC2RecommendationProjectedMetricsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetEC2RecommendationProjectedMetricsResponse+newGetEC2RecommendationProjectedMetricsResponse+  pHttpStatus_ =+    GetEC2RecommendationProjectedMetricsResponse'+      { recommendedOptionProjectedMetrics =+          Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | An array of objects that describes projected metrics.+getEC2RecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics :: Lens.Lens' GetEC2RecommendationProjectedMetricsResponse (Prelude.Maybe [RecommendedOptionProjectedMetric])+getEC2RecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics = Lens.lens (\GetEC2RecommendationProjectedMetricsResponse' {recommendedOptionProjectedMetrics} -> recommendedOptionProjectedMetrics) (\s@GetEC2RecommendationProjectedMetricsResponse' {} a -> s {recommendedOptionProjectedMetrics = a} :: GetEC2RecommendationProjectedMetricsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getEC2RecommendationProjectedMetricsResponse_httpStatus :: Lens.Lens' GetEC2RecommendationProjectedMetricsResponse Prelude.Int+getEC2RecommendationProjectedMetricsResponse_httpStatus = Lens.lens (\GetEC2RecommendationProjectedMetricsResponse' {httpStatus} -> httpStatus) (\s@GetEC2RecommendationProjectedMetricsResponse' {} a -> s {httpStatus = a} :: GetEC2RecommendationProjectedMetricsResponse)++instance+  Prelude.NFData+    GetEC2RecommendationProjectedMetricsResponse+  where+  rnf GetEC2RecommendationProjectedMetricsResponse' {..} =+    Prelude.rnf recommendedOptionProjectedMetrics+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetECSServiceRecommendationProjectedMetrics.hs view
@@ -0,0 +1,288 @@+{-# 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.ComputeOptimizer.GetECSServiceRecommendationProjectedMetrics+-- 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 projected metrics of Amazon ECS service recommendations.+module Amazonka.ComputeOptimizer.GetECSServiceRecommendationProjectedMetrics+  ( -- * Creating a Request+    GetECSServiceRecommendationProjectedMetrics (..),+    newGetECSServiceRecommendationProjectedMetrics,++    -- * Request Lenses+    getECSServiceRecommendationProjectedMetrics_serviceArn,+    getECSServiceRecommendationProjectedMetrics_stat,+    getECSServiceRecommendationProjectedMetrics_period,+    getECSServiceRecommendationProjectedMetrics_startTime,+    getECSServiceRecommendationProjectedMetrics_endTime,++    -- * Destructuring the Response+    GetECSServiceRecommendationProjectedMetricsResponse (..),+    newGetECSServiceRecommendationProjectedMetricsResponse,++    -- * Response Lenses+    getECSServiceRecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics,+    getECSServiceRecommendationProjectedMetricsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetECSServiceRecommendationProjectedMetrics' smart constructor.+data GetECSServiceRecommendationProjectedMetrics = GetECSServiceRecommendationProjectedMetrics'+  { -- | The ARN that identifies the ECS service.+    --+    -- The following is the format of the ARN:+    --+    -- @arn:aws:ecs:region:aws_account_id:service\/cluster-name\/service-name@+    serviceArn :: Prelude.Text,+    -- | The statistic of the projected metrics.+    stat :: MetricStatistic,+    -- | The granularity, in seconds, of the projected metrics data points.+    period :: Prelude.Int,+    -- | The timestamp of the first projected metrics data point to return.+    startTime :: Data.POSIX,+    -- | The timestamp of the last projected metrics data point to return.+    endTime :: Data.POSIX+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetECSServiceRecommendationProjectedMetrics' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'serviceArn', 'getECSServiceRecommendationProjectedMetrics_serviceArn' - The ARN that identifies the ECS service.+--+-- The following is the format of the ARN:+--+-- @arn:aws:ecs:region:aws_account_id:service\/cluster-name\/service-name@+--+-- 'stat', 'getECSServiceRecommendationProjectedMetrics_stat' - The statistic of the projected metrics.+--+-- 'period', 'getECSServiceRecommendationProjectedMetrics_period' - The granularity, in seconds, of the projected metrics data points.+--+-- 'startTime', 'getECSServiceRecommendationProjectedMetrics_startTime' - The timestamp of the first projected metrics data point to return.+--+-- 'endTime', 'getECSServiceRecommendationProjectedMetrics_endTime' - The timestamp of the last projected metrics data point to return.+newGetECSServiceRecommendationProjectedMetrics ::+  -- | 'serviceArn'+  Prelude.Text ->+  -- | 'stat'+  MetricStatistic ->+  -- | 'period'+  Prelude.Int ->+  -- | 'startTime'+  Prelude.UTCTime ->+  -- | 'endTime'+  Prelude.UTCTime ->+  GetECSServiceRecommendationProjectedMetrics+newGetECSServiceRecommendationProjectedMetrics+  pServiceArn_+  pStat_+  pPeriod_+  pStartTime_+  pEndTime_ =+    GetECSServiceRecommendationProjectedMetrics'+      { serviceArn =+          pServiceArn_,+        stat = pStat_,+        period = pPeriod_,+        startTime =+          Data._Time+            Lens.# pStartTime_,+        endTime =+          Data._Time Lens.# pEndTime_+      }++-- | The ARN that identifies the ECS service.+--+-- The following is the format of the ARN:+--+-- @arn:aws:ecs:region:aws_account_id:service\/cluster-name\/service-name@+getECSServiceRecommendationProjectedMetrics_serviceArn :: Lens.Lens' GetECSServiceRecommendationProjectedMetrics Prelude.Text+getECSServiceRecommendationProjectedMetrics_serviceArn = Lens.lens (\GetECSServiceRecommendationProjectedMetrics' {serviceArn} -> serviceArn) (\s@GetECSServiceRecommendationProjectedMetrics' {} a -> s {serviceArn = a} :: GetECSServiceRecommendationProjectedMetrics)++-- | The statistic of the projected metrics.+getECSServiceRecommendationProjectedMetrics_stat :: Lens.Lens' GetECSServiceRecommendationProjectedMetrics MetricStatistic+getECSServiceRecommendationProjectedMetrics_stat = Lens.lens (\GetECSServiceRecommendationProjectedMetrics' {stat} -> stat) (\s@GetECSServiceRecommendationProjectedMetrics' {} a -> s {stat = a} :: GetECSServiceRecommendationProjectedMetrics)++-- | The granularity, in seconds, of the projected metrics data points.+getECSServiceRecommendationProjectedMetrics_period :: Lens.Lens' GetECSServiceRecommendationProjectedMetrics Prelude.Int+getECSServiceRecommendationProjectedMetrics_period = Lens.lens (\GetECSServiceRecommendationProjectedMetrics' {period} -> period) (\s@GetECSServiceRecommendationProjectedMetrics' {} a -> s {period = a} :: GetECSServiceRecommendationProjectedMetrics)++-- | The timestamp of the first projected metrics data point to return.+getECSServiceRecommendationProjectedMetrics_startTime :: Lens.Lens' GetECSServiceRecommendationProjectedMetrics Prelude.UTCTime+getECSServiceRecommendationProjectedMetrics_startTime = Lens.lens (\GetECSServiceRecommendationProjectedMetrics' {startTime} -> startTime) (\s@GetECSServiceRecommendationProjectedMetrics' {} a -> s {startTime = a} :: GetECSServiceRecommendationProjectedMetrics) Prelude.. Data._Time++-- | The timestamp of the last projected metrics data point to return.+getECSServiceRecommendationProjectedMetrics_endTime :: Lens.Lens' GetECSServiceRecommendationProjectedMetrics Prelude.UTCTime+getECSServiceRecommendationProjectedMetrics_endTime = Lens.lens (\GetECSServiceRecommendationProjectedMetrics' {endTime} -> endTime) (\s@GetECSServiceRecommendationProjectedMetrics' {} a -> s {endTime = a} :: GetECSServiceRecommendationProjectedMetrics) Prelude.. Data._Time++instance+  Core.AWSRequest+    GetECSServiceRecommendationProjectedMetrics+  where+  type+    AWSResponse+      GetECSServiceRecommendationProjectedMetrics =+      GetECSServiceRecommendationProjectedMetricsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetECSServiceRecommendationProjectedMetricsResponse'+            Prelude.<$> ( x+                            Data..?> "recommendedOptionProjectedMetrics"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetECSServiceRecommendationProjectedMetrics+  where+  hashWithSalt+    _salt+    GetECSServiceRecommendationProjectedMetrics' {..} =+      _salt+        `Prelude.hashWithSalt` serviceArn+        `Prelude.hashWithSalt` stat+        `Prelude.hashWithSalt` period+        `Prelude.hashWithSalt` startTime+        `Prelude.hashWithSalt` endTime++instance+  Prelude.NFData+    GetECSServiceRecommendationProjectedMetrics+  where+  rnf GetECSServiceRecommendationProjectedMetrics' {..} =+    Prelude.rnf serviceArn+      `Prelude.seq` Prelude.rnf stat+      `Prelude.seq` Prelude.rnf period+      `Prelude.seq` Prelude.rnf startTime+      `Prelude.seq` Prelude.rnf endTime++instance+  Data.ToHeaders+    GetECSServiceRecommendationProjectedMetrics+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetECSServiceRecommendationProjectedMetrics" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance+  Data.ToJSON+    GetECSServiceRecommendationProjectedMetrics+  where+  toJSON+    GetECSServiceRecommendationProjectedMetrics' {..} =+      Data.object+        ( Prelude.catMaybes+            [ Prelude.Just ("serviceArn" Data..= serviceArn),+              Prelude.Just ("stat" Data..= stat),+              Prelude.Just ("period" Data..= period),+              Prelude.Just ("startTime" Data..= startTime),+              Prelude.Just ("endTime" Data..= endTime)+            ]+        )++instance+  Data.ToPath+    GetECSServiceRecommendationProjectedMetrics+  where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    GetECSServiceRecommendationProjectedMetrics+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetECSServiceRecommendationProjectedMetricsResponse' smart constructor.+data GetECSServiceRecommendationProjectedMetricsResponse = GetECSServiceRecommendationProjectedMetricsResponse'+  { -- | An array of objects that describes the projected metrics.+    recommendedOptionProjectedMetrics :: Prelude.Maybe [ECSServiceRecommendedOptionProjectedMetric],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetECSServiceRecommendationProjectedMetricsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'recommendedOptionProjectedMetrics', 'getECSServiceRecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics' - An array of objects that describes the projected metrics.+--+-- 'httpStatus', 'getECSServiceRecommendationProjectedMetricsResponse_httpStatus' - The response's http status code.+newGetECSServiceRecommendationProjectedMetricsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetECSServiceRecommendationProjectedMetricsResponse+newGetECSServiceRecommendationProjectedMetricsResponse+  pHttpStatus_ =+    GetECSServiceRecommendationProjectedMetricsResponse'+      { recommendedOptionProjectedMetrics =+          Prelude.Nothing,+        httpStatus =+          pHttpStatus_+      }++-- | An array of objects that describes the projected metrics.+getECSServiceRecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics :: Lens.Lens' GetECSServiceRecommendationProjectedMetricsResponse (Prelude.Maybe [ECSServiceRecommendedOptionProjectedMetric])+getECSServiceRecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics = Lens.lens (\GetECSServiceRecommendationProjectedMetricsResponse' {recommendedOptionProjectedMetrics} -> recommendedOptionProjectedMetrics) (\s@GetECSServiceRecommendationProjectedMetricsResponse' {} a -> s {recommendedOptionProjectedMetrics = a} :: GetECSServiceRecommendationProjectedMetricsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getECSServiceRecommendationProjectedMetricsResponse_httpStatus :: Lens.Lens' GetECSServiceRecommendationProjectedMetricsResponse Prelude.Int+getECSServiceRecommendationProjectedMetricsResponse_httpStatus = Lens.lens (\GetECSServiceRecommendationProjectedMetricsResponse' {httpStatus} -> httpStatus) (\s@GetECSServiceRecommendationProjectedMetricsResponse' {} a -> s {httpStatus = a} :: GetECSServiceRecommendationProjectedMetricsResponse)++instance+  Prelude.NFData+    GetECSServiceRecommendationProjectedMetricsResponse+  where+  rnf+    GetECSServiceRecommendationProjectedMetricsResponse' {..} =+      Prelude.rnf recommendedOptionProjectedMetrics+        `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetECSServiceRecommendations.hs view
@@ -0,0 +1,311 @@+{-# 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.ComputeOptimizer.GetECSServiceRecommendations+-- 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 Amazon ECS service recommendations.+--+-- Compute Optimizer generates recommendations for Amazon ECS services on+-- Fargate that meet a specific set of requirements. For more information,+-- see the+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html Supported resources and requirements>+-- in the /Compute Optimizer User Guide/.+module Amazonka.ComputeOptimizer.GetECSServiceRecommendations+  ( -- * Creating a Request+    GetECSServiceRecommendations (..),+    newGetECSServiceRecommendations,++    -- * Request Lenses+    getECSServiceRecommendations_accountIds,+    getECSServiceRecommendations_filters,+    getECSServiceRecommendations_maxResults,+    getECSServiceRecommendations_nextToken,+    getECSServiceRecommendations_serviceArns,++    -- * Destructuring the Response+    GetECSServiceRecommendationsResponse (..),+    newGetECSServiceRecommendationsResponse,++    -- * Response Lenses+    getECSServiceRecommendationsResponse_ecsServiceRecommendations,+    getECSServiceRecommendationsResponse_errors,+    getECSServiceRecommendationsResponse_nextToken,+    getECSServiceRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetECSServiceRecommendations' smart constructor.+data GetECSServiceRecommendations = GetECSServiceRecommendations'+  { -- | Return the ECS service recommendations to the specified Amazon Web+    -- Services account IDs.+    --+    -- If your account is the management account or the delegated administrator+    -- of an organization, use this parameter to return the ECS service+    -- recommendations to specific member accounts.+    --+    -- You can only specify one account ID per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | An array of objects to specify a filter that returns a more specific+    -- list of ECS service recommendations.+    filters :: Prelude.Maybe [ECSServiceRecommendationFilter],+    -- | The maximum number of ECS service recommendations to return with a+    -- single request.+    --+    -- To retrieve the remaining results, make another request with the+    -- returned @nextToken@ value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token to advance to the next page of ECS service recommendations.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The ARN that identifies the ECS service.+    --+    -- The following is the format of the ARN:+    --+    -- @arn:aws:ecs:region:aws_account_id:service\/cluster-name\/service-name@+    serviceArns :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetECSServiceRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'getECSServiceRecommendations_accountIds' - Return the ECS service recommendations to the specified Amazon Web+-- Services account IDs.+--+-- If your account is the management account or the delegated administrator+-- of an organization, use this parameter to return the ECS service+-- recommendations to specific member accounts.+--+-- You can only specify one account ID per request.+--+-- 'filters', 'getECSServiceRecommendations_filters' - An array of objects to specify a filter that returns a more specific+-- list of ECS service recommendations.+--+-- 'maxResults', 'getECSServiceRecommendations_maxResults' - The maximum number of ECS service recommendations to return with a+-- single request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+--+-- 'nextToken', 'getECSServiceRecommendations_nextToken' - The token to advance to the next page of ECS service recommendations.+--+-- 'serviceArns', 'getECSServiceRecommendations_serviceArns' - The ARN that identifies the ECS service.+--+-- The following is the format of the ARN:+--+-- @arn:aws:ecs:region:aws_account_id:service\/cluster-name\/service-name@+newGetECSServiceRecommendations ::+  GetECSServiceRecommendations+newGetECSServiceRecommendations =+  GetECSServiceRecommendations'+    { accountIds =+        Prelude.Nothing,+      filters = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      serviceArns = Prelude.Nothing+    }++-- | Return the ECS service recommendations to the specified Amazon Web+-- Services account IDs.+--+-- If your account is the management account or the delegated administrator+-- of an organization, use this parameter to return the ECS service+-- recommendations to specific member accounts.+--+-- You can only specify one account ID per request.+getECSServiceRecommendations_accountIds :: Lens.Lens' GetECSServiceRecommendations (Prelude.Maybe [Prelude.Text])+getECSServiceRecommendations_accountIds = Lens.lens (\GetECSServiceRecommendations' {accountIds} -> accountIds) (\s@GetECSServiceRecommendations' {} a -> s {accountIds = a} :: GetECSServiceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects to specify a filter that returns a more specific+-- list of ECS service recommendations.+getECSServiceRecommendations_filters :: Lens.Lens' GetECSServiceRecommendations (Prelude.Maybe [ECSServiceRecommendationFilter])+getECSServiceRecommendations_filters = Lens.lens (\GetECSServiceRecommendations' {filters} -> filters) (\s@GetECSServiceRecommendations' {} a -> s {filters = a} :: GetECSServiceRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of ECS service recommendations to return with a+-- single request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+getECSServiceRecommendations_maxResults :: Lens.Lens' GetECSServiceRecommendations (Prelude.Maybe Prelude.Natural)+getECSServiceRecommendations_maxResults = Lens.lens (\GetECSServiceRecommendations' {maxResults} -> maxResults) (\s@GetECSServiceRecommendations' {} a -> s {maxResults = a} :: GetECSServiceRecommendations)++-- | The token to advance to the next page of ECS service recommendations.+getECSServiceRecommendations_nextToken :: Lens.Lens' GetECSServiceRecommendations (Prelude.Maybe Prelude.Text)+getECSServiceRecommendations_nextToken = Lens.lens (\GetECSServiceRecommendations' {nextToken} -> nextToken) (\s@GetECSServiceRecommendations' {} a -> s {nextToken = a} :: GetECSServiceRecommendations)++-- | The ARN that identifies the ECS service.+--+-- The following is the format of the ARN:+--+-- @arn:aws:ecs:region:aws_account_id:service\/cluster-name\/service-name@+getECSServiceRecommendations_serviceArns :: Lens.Lens' GetECSServiceRecommendations (Prelude.Maybe [Prelude.Text])+getECSServiceRecommendations_serviceArns = Lens.lens (\GetECSServiceRecommendations' {serviceArns} -> serviceArns) (\s@GetECSServiceRecommendations' {} a -> s {serviceArns = a} :: GetECSServiceRecommendations) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSRequest GetECSServiceRecommendations where+  type+    AWSResponse GetECSServiceRecommendations =+      GetECSServiceRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetECSServiceRecommendationsResponse'+            Prelude.<$> ( x+                            Data..?> "ecsServiceRecommendations"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (x Data..?> "errors" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetECSServiceRecommendations+  where+  hashWithSalt _salt GetECSServiceRecommendations' {..} =+    _salt+      `Prelude.hashWithSalt` accountIds+      `Prelude.hashWithSalt` filters+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` serviceArns++instance Prelude.NFData GetECSServiceRecommendations where+  rnf GetECSServiceRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf serviceArns++instance Data.ToHeaders GetECSServiceRecommendations where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetECSServiceRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetECSServiceRecommendations where+  toJSON GetECSServiceRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("filters" Data..=) Prelude.<$> filters,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("serviceArns" Data..=) Prelude.<$> serviceArns+          ]+      )++instance Data.ToPath GetECSServiceRecommendations where+  toPath = Prelude.const "/"++instance Data.ToQuery GetECSServiceRecommendations where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetECSServiceRecommendationsResponse' smart constructor.+data GetECSServiceRecommendationsResponse = GetECSServiceRecommendationsResponse'+  { -- | An array of objects that describe the ECS service recommendations.+    ecsServiceRecommendations :: Prelude.Maybe [ECSServiceRecommendation],+    -- | An array of objects that describe errors of the request.+    errors :: Prelude.Maybe [GetRecommendationError],+    -- | The token to advance to the next page of ECS service recommendations.+    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 'GetECSServiceRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'ecsServiceRecommendations', 'getECSServiceRecommendationsResponse_ecsServiceRecommendations' - An array of objects that describe the ECS service recommendations.+--+-- 'errors', 'getECSServiceRecommendationsResponse_errors' - An array of objects that describe errors of the request.+--+-- 'nextToken', 'getECSServiceRecommendationsResponse_nextToken' - The token to advance to the next page of ECS service recommendations.+--+-- 'httpStatus', 'getECSServiceRecommendationsResponse_httpStatus' - The response's http status code.+newGetECSServiceRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetECSServiceRecommendationsResponse+newGetECSServiceRecommendationsResponse pHttpStatus_ =+  GetECSServiceRecommendationsResponse'+    { ecsServiceRecommendations =+        Prelude.Nothing,+      errors = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | An array of objects that describe the ECS service recommendations.+getECSServiceRecommendationsResponse_ecsServiceRecommendations :: Lens.Lens' GetECSServiceRecommendationsResponse (Prelude.Maybe [ECSServiceRecommendation])+getECSServiceRecommendationsResponse_ecsServiceRecommendations = Lens.lens (\GetECSServiceRecommendationsResponse' {ecsServiceRecommendations} -> ecsServiceRecommendations) (\s@GetECSServiceRecommendationsResponse' {} a -> s {ecsServiceRecommendations = a} :: GetECSServiceRecommendationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects that describe errors of the request.+getECSServiceRecommendationsResponse_errors :: Lens.Lens' GetECSServiceRecommendationsResponse (Prelude.Maybe [GetRecommendationError])+getECSServiceRecommendationsResponse_errors = Lens.lens (\GetECSServiceRecommendationsResponse' {errors} -> errors) (\s@GetECSServiceRecommendationsResponse' {} a -> s {errors = a} :: GetECSServiceRecommendationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to advance to the next page of ECS service recommendations.+getECSServiceRecommendationsResponse_nextToken :: Lens.Lens' GetECSServiceRecommendationsResponse (Prelude.Maybe Prelude.Text)+getECSServiceRecommendationsResponse_nextToken = Lens.lens (\GetECSServiceRecommendationsResponse' {nextToken} -> nextToken) (\s@GetECSServiceRecommendationsResponse' {} a -> s {nextToken = a} :: GetECSServiceRecommendationsResponse)++-- | The response's http status code.+getECSServiceRecommendationsResponse_httpStatus :: Lens.Lens' GetECSServiceRecommendationsResponse Prelude.Int+getECSServiceRecommendationsResponse_httpStatus = Lens.lens (\GetECSServiceRecommendationsResponse' {httpStatus} -> httpStatus) (\s@GetECSServiceRecommendationsResponse' {} a -> s {httpStatus = a} :: GetECSServiceRecommendationsResponse)++instance+  Prelude.NFData+    GetECSServiceRecommendationsResponse+  where+  rnf GetECSServiceRecommendationsResponse' {..} =+    Prelude.rnf ecsServiceRecommendations+      `Prelude.seq` Prelude.rnf errors+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetEffectiveRecommendationPreferences.hs view
@@ -0,0 +1,318 @@+{-# 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.ComputeOptimizer.GetEffectiveRecommendationPreferences+-- 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 recommendation preferences that are in effect for a given+-- resource, such as enhanced infrastructure metrics. Considers all+-- applicable preferences that you might have set at the resource, account,+-- and organization level.+--+-- When you create a recommendation preference, you can set its status to+-- @Active@ or @Inactive@. Use this action to view the recommendation+-- preferences that are in effect, or @Active@.+module Amazonka.ComputeOptimizer.GetEffectiveRecommendationPreferences+  ( -- * Creating a Request+    GetEffectiveRecommendationPreferences (..),+    newGetEffectiveRecommendationPreferences,++    -- * Request Lenses+    getEffectiveRecommendationPreferences_resourceArn,++    -- * Destructuring the Response+    GetEffectiveRecommendationPreferencesResponse (..),+    newGetEffectiveRecommendationPreferencesResponse,++    -- * Response Lenses+    getEffectiveRecommendationPreferencesResponse_enhancedInfrastructureMetrics,+    getEffectiveRecommendationPreferencesResponse_externalMetricsPreference,+    getEffectiveRecommendationPreferencesResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetEffectiveRecommendationPreferences' smart constructor.+data GetEffectiveRecommendationPreferences = GetEffectiveRecommendationPreferences'+  { -- | The Amazon Resource Name (ARN) of the resource for which to confirm+    -- effective recommendation preferences. Only EC2 instance and Auto Scaling+    -- group ARNs are currently supported.+    resourceArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEffectiveRecommendationPreferences' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'getEffectiveRecommendationPreferences_resourceArn' - The Amazon Resource Name (ARN) of the resource for which to confirm+-- effective recommendation preferences. Only EC2 instance and Auto Scaling+-- group ARNs are currently supported.+newGetEffectiveRecommendationPreferences ::+  -- | 'resourceArn'+  Prelude.Text ->+  GetEffectiveRecommendationPreferences+newGetEffectiveRecommendationPreferences+  pResourceArn_ =+    GetEffectiveRecommendationPreferences'+      { resourceArn =+          pResourceArn_+      }++-- | The Amazon Resource Name (ARN) of the resource for which to confirm+-- effective recommendation preferences. Only EC2 instance and Auto Scaling+-- group ARNs are currently supported.+getEffectiveRecommendationPreferences_resourceArn :: Lens.Lens' GetEffectiveRecommendationPreferences Prelude.Text+getEffectiveRecommendationPreferences_resourceArn = Lens.lens (\GetEffectiveRecommendationPreferences' {resourceArn} -> resourceArn) (\s@GetEffectiveRecommendationPreferences' {} a -> s {resourceArn = a} :: GetEffectiveRecommendationPreferences)++instance+  Core.AWSRequest+    GetEffectiveRecommendationPreferences+  where+  type+    AWSResponse+      GetEffectiveRecommendationPreferences =+      GetEffectiveRecommendationPreferencesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetEffectiveRecommendationPreferencesResponse'+            Prelude.<$> (x Data..?> "enhancedInfrastructureMetrics")+            Prelude.<*> (x Data..?> "externalMetricsPreference")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetEffectiveRecommendationPreferences+  where+  hashWithSalt+    _salt+    GetEffectiveRecommendationPreferences' {..} =+      _salt `Prelude.hashWithSalt` resourceArn++instance+  Prelude.NFData+    GetEffectiveRecommendationPreferences+  where+  rnf GetEffectiveRecommendationPreferences' {..} =+    Prelude.rnf resourceArn++instance+  Data.ToHeaders+    GetEffectiveRecommendationPreferences+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetEffectiveRecommendationPreferences" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance+  Data.ToJSON+    GetEffectiveRecommendationPreferences+  where+  toJSON GetEffectiveRecommendationPreferences' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("resourceArn" Data..= resourceArn)]+      )++instance+  Data.ToPath+    GetEffectiveRecommendationPreferences+  where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    GetEffectiveRecommendationPreferences+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetEffectiveRecommendationPreferencesResponse' smart constructor.+data GetEffectiveRecommendationPreferencesResponse = GetEffectiveRecommendationPreferencesResponse'+  { -- | The status of the enhanced infrastructure metrics recommendation+    -- preference. Considers all applicable preferences that you might have set+    -- at the resource, account, and organization level.+    --+    -- A status of @Active@ confirms that the preference is applied in the+    -- latest recommendation refresh, and a status of @Inactive@ confirms that+    -- it\'s not yet applied to recommendations.+    --+    -- To validate whether the preference is applied to your last generated set+    -- of recommendations, review the @effectiveRecommendationPreferences@+    -- value in the response of the GetAutoScalingGroupRecommendations and+    -- GetEC2InstanceRecommendations actions.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+    -- in the /Compute Optimizer User Guide/.+    enhancedInfrastructureMetrics :: Prelude.Maybe EnhancedInfrastructureMetrics,+    -- | The provider of the external metrics recommendation preference.+    -- Considers all applicable preferences that you might have set at the+    -- account and organization level.+    --+    -- If the preference is applied in the latest recommendation refresh, an+    -- object with a valid @source@ value appears in the response. If the+    -- preference isn\'t applied to the recommendations already, then this+    -- object doesn\'t appear in the response.+    --+    -- To validate whether the preference is applied to your last generated set+    -- of recommendations, review the @effectiveRecommendationPreferences@+    -- value in the response of the GetEC2InstanceRecommendations actions.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html Enhanced infrastructure metrics>+    -- in the /Compute Optimizer User Guide/.+    externalMetricsPreference :: Prelude.Maybe ExternalMetricsPreference,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEffectiveRecommendationPreferencesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'enhancedInfrastructureMetrics', 'getEffectiveRecommendationPreferencesResponse_enhancedInfrastructureMetrics' - The status of the enhanced infrastructure metrics recommendation+-- preference. Considers all applicable preferences that you might have set+-- at the resource, account, and organization level.+--+-- A status of @Active@ confirms that the preference is applied in the+-- latest recommendation refresh, and a status of @Inactive@ confirms that+-- it\'s not yet applied to recommendations.+--+-- To validate whether the preference is applied to your last generated set+-- of recommendations, review the @effectiveRecommendationPreferences@+-- value in the response of the GetAutoScalingGroupRecommendations and+-- GetEC2InstanceRecommendations actions.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- 'externalMetricsPreference', 'getEffectiveRecommendationPreferencesResponse_externalMetricsPreference' - The provider of the external metrics recommendation preference.+-- Considers all applicable preferences that you might have set at the+-- account and organization level.+--+-- If the preference is applied in the latest recommendation refresh, an+-- object with a valid @source@ value appears in the response. If the+-- preference isn\'t applied to the recommendations already, then this+-- object doesn\'t appear in the response.+--+-- To validate whether the preference is applied to your last generated set+-- of recommendations, review the @effectiveRecommendationPreferences@+-- value in the response of the GetEC2InstanceRecommendations actions.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- 'httpStatus', 'getEffectiveRecommendationPreferencesResponse_httpStatus' - The response's http status code.+newGetEffectiveRecommendationPreferencesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetEffectiveRecommendationPreferencesResponse+newGetEffectiveRecommendationPreferencesResponse+  pHttpStatus_ =+    GetEffectiveRecommendationPreferencesResponse'+      { enhancedInfrastructureMetrics =+          Prelude.Nothing,+        externalMetricsPreference =+          Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | The status of the enhanced infrastructure metrics recommendation+-- preference. Considers all applicable preferences that you might have set+-- at the resource, account, and organization level.+--+-- A status of @Active@ confirms that the preference is applied in the+-- latest recommendation refresh, and a status of @Inactive@ confirms that+-- it\'s not yet applied to recommendations.+--+-- To validate whether the preference is applied to your last generated set+-- of recommendations, review the @effectiveRecommendationPreferences@+-- value in the response of the GetAutoScalingGroupRecommendations and+-- GetEC2InstanceRecommendations actions.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+getEffectiveRecommendationPreferencesResponse_enhancedInfrastructureMetrics :: Lens.Lens' GetEffectiveRecommendationPreferencesResponse (Prelude.Maybe EnhancedInfrastructureMetrics)+getEffectiveRecommendationPreferencesResponse_enhancedInfrastructureMetrics = Lens.lens (\GetEffectiveRecommendationPreferencesResponse' {enhancedInfrastructureMetrics} -> enhancedInfrastructureMetrics) (\s@GetEffectiveRecommendationPreferencesResponse' {} a -> s {enhancedInfrastructureMetrics = a} :: GetEffectiveRecommendationPreferencesResponse)++-- | The provider of the external metrics recommendation preference.+-- Considers all applicable preferences that you might have set at the+-- account and organization level.+--+-- If the preference is applied in the latest recommendation refresh, an+-- object with a valid @source@ value appears in the response. If the+-- preference isn\'t applied to the recommendations already, then this+-- object doesn\'t appear in the response.+--+-- To validate whether the preference is applied to your last generated set+-- of recommendations, review the @effectiveRecommendationPreferences@+-- value in the response of the GetEC2InstanceRecommendations actions.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+getEffectiveRecommendationPreferencesResponse_externalMetricsPreference :: Lens.Lens' GetEffectiveRecommendationPreferencesResponse (Prelude.Maybe ExternalMetricsPreference)+getEffectiveRecommendationPreferencesResponse_externalMetricsPreference = Lens.lens (\GetEffectiveRecommendationPreferencesResponse' {externalMetricsPreference} -> externalMetricsPreference) (\s@GetEffectiveRecommendationPreferencesResponse' {} a -> s {externalMetricsPreference = a} :: GetEffectiveRecommendationPreferencesResponse)++-- | The response's http status code.+getEffectiveRecommendationPreferencesResponse_httpStatus :: Lens.Lens' GetEffectiveRecommendationPreferencesResponse Prelude.Int+getEffectiveRecommendationPreferencesResponse_httpStatus = Lens.lens (\GetEffectiveRecommendationPreferencesResponse' {httpStatus} -> httpStatus) (\s@GetEffectiveRecommendationPreferencesResponse' {} a -> s {httpStatus = a} :: GetEffectiveRecommendationPreferencesResponse)++instance+  Prelude.NFData+    GetEffectiveRecommendationPreferencesResponse+  where+  rnf+    GetEffectiveRecommendationPreferencesResponse' {..} =+      Prelude.rnf enhancedInfrastructureMetrics+        `Prelude.seq` Prelude.rnf externalMetricsPreference+        `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetEnrollmentStatus.hs view
@@ -0,0 +1,225 @@+{-# 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.ComputeOptimizer.GetEnrollmentStatus+-- 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 enrollment (opt in) status of an account to the Compute+-- Optimizer service.+--+-- If the account is the management account of an organization, this action+-- also confirms the enrollment status of member accounts of the+-- organization. Use the GetEnrollmentStatusesForOrganization action to get+-- detailed information about the enrollment status of member accounts of+-- an organization.+module Amazonka.ComputeOptimizer.GetEnrollmentStatus+  ( -- * Creating a Request+    GetEnrollmentStatus (..),+    newGetEnrollmentStatus,++    -- * Destructuring the Response+    GetEnrollmentStatusResponse (..),+    newGetEnrollmentStatusResponse,++    -- * Response Lenses+    getEnrollmentStatusResponse_lastUpdatedTimestamp,+    getEnrollmentStatusResponse_memberAccountsEnrolled,+    getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn,+    getEnrollmentStatusResponse_status,+    getEnrollmentStatusResponse_statusReason,+    getEnrollmentStatusResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetEnrollmentStatus' smart constructor.+data GetEnrollmentStatus = GetEnrollmentStatus'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEnrollmentStatus' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newGetEnrollmentStatus ::+  GetEnrollmentStatus+newGetEnrollmentStatus = GetEnrollmentStatus'++instance Core.AWSRequest GetEnrollmentStatus where+  type+    AWSResponse GetEnrollmentStatus =+      GetEnrollmentStatusResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetEnrollmentStatusResponse'+            Prelude.<$> (x Data..?> "lastUpdatedTimestamp")+            Prelude.<*> (x Data..?> "memberAccountsEnrolled")+            Prelude.<*> (x Data..?> "numberOfMemberAccountsOptedIn")+            Prelude.<*> (x Data..?> "status")+            Prelude.<*> (x Data..?> "statusReason")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetEnrollmentStatus where+  hashWithSalt _salt _ =+    _salt `Prelude.hashWithSalt` ()++instance Prelude.NFData GetEnrollmentStatus where+  rnf _ = ()++instance Data.ToHeaders GetEnrollmentStatus where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetEnrollmentStatus" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetEnrollmentStatus where+  toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath GetEnrollmentStatus where+  toPath = Prelude.const "/"++instance Data.ToQuery GetEnrollmentStatus where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetEnrollmentStatusResponse' smart constructor.+data GetEnrollmentStatusResponse = GetEnrollmentStatusResponse'+  { -- | The Unix epoch timestamp, in seconds, of when the account enrollment+    -- status was last updated.+    lastUpdatedTimestamp :: Prelude.Maybe Data.POSIX,+    -- | Confirms the enrollment status of member accounts of the organization,+    -- if the account is a management account of an organization.+    memberAccountsEnrolled :: Prelude.Maybe Prelude.Bool,+    -- | The count of organization member accounts that are opted in to the+    -- service, if your account is an organization management account.+    numberOfMemberAccountsOptedIn :: Prelude.Maybe Prelude.Int,+    -- | The enrollment status of the account.+    status :: Prelude.Maybe Status,+    -- | The reason for the enrollment status of the account.+    --+    -- For example, an account might show a status of @Pending@ because member+    -- accounts of an organization require more time to be enrolled in the+    -- service.+    statusReason :: 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 'GetEnrollmentStatusResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'lastUpdatedTimestamp', 'getEnrollmentStatusResponse_lastUpdatedTimestamp' - The Unix epoch timestamp, in seconds, of when the account enrollment+-- status was last updated.+--+-- 'memberAccountsEnrolled', 'getEnrollmentStatusResponse_memberAccountsEnrolled' - Confirms the enrollment status of member accounts of the organization,+-- if the account is a management account of an organization.+--+-- 'numberOfMemberAccountsOptedIn', 'getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn' - The count of organization member accounts that are opted in to the+-- service, if your account is an organization management account.+--+-- 'status', 'getEnrollmentStatusResponse_status' - The enrollment status of the account.+--+-- 'statusReason', 'getEnrollmentStatusResponse_statusReason' - The reason for the enrollment status of the account.+--+-- For example, an account might show a status of @Pending@ because member+-- accounts of an organization require more time to be enrolled in the+-- service.+--+-- 'httpStatus', 'getEnrollmentStatusResponse_httpStatus' - The response's http status code.+newGetEnrollmentStatusResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetEnrollmentStatusResponse+newGetEnrollmentStatusResponse pHttpStatus_ =+  GetEnrollmentStatusResponse'+    { lastUpdatedTimestamp =+        Prelude.Nothing,+      memberAccountsEnrolled = Prelude.Nothing,+      numberOfMemberAccountsOptedIn =+        Prelude.Nothing,+      status = Prelude.Nothing,+      statusReason = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The Unix epoch timestamp, in seconds, of when the account enrollment+-- status was last updated.+getEnrollmentStatusResponse_lastUpdatedTimestamp :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Prelude.UTCTime)+getEnrollmentStatusResponse_lastUpdatedTimestamp = Lens.lens (\GetEnrollmentStatusResponse' {lastUpdatedTimestamp} -> lastUpdatedTimestamp) (\s@GetEnrollmentStatusResponse' {} a -> s {lastUpdatedTimestamp = a} :: GetEnrollmentStatusResponse) Prelude.. Lens.mapping Data._Time++-- | Confirms the enrollment status of member accounts of the organization,+-- if the account is a management account of an organization.+getEnrollmentStatusResponse_memberAccountsEnrolled :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Prelude.Bool)+getEnrollmentStatusResponse_memberAccountsEnrolled = Lens.lens (\GetEnrollmentStatusResponse' {memberAccountsEnrolled} -> memberAccountsEnrolled) (\s@GetEnrollmentStatusResponse' {} a -> s {memberAccountsEnrolled = a} :: GetEnrollmentStatusResponse)++-- | The count of organization member accounts that are opted in to the+-- service, if your account is an organization management account.+getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Prelude.Int)+getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn = Lens.lens (\GetEnrollmentStatusResponse' {numberOfMemberAccountsOptedIn} -> numberOfMemberAccountsOptedIn) (\s@GetEnrollmentStatusResponse' {} a -> s {numberOfMemberAccountsOptedIn = a} :: GetEnrollmentStatusResponse)++-- | The enrollment status of the account.+getEnrollmentStatusResponse_status :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Status)+getEnrollmentStatusResponse_status = Lens.lens (\GetEnrollmentStatusResponse' {status} -> status) (\s@GetEnrollmentStatusResponse' {} a -> s {status = a} :: GetEnrollmentStatusResponse)++-- | The reason for the enrollment status of the account.+--+-- For example, an account might show a status of @Pending@ because member+-- accounts of an organization require more time to be enrolled in the+-- service.+getEnrollmentStatusResponse_statusReason :: Lens.Lens' GetEnrollmentStatusResponse (Prelude.Maybe Prelude.Text)+getEnrollmentStatusResponse_statusReason = Lens.lens (\GetEnrollmentStatusResponse' {statusReason} -> statusReason) (\s@GetEnrollmentStatusResponse' {} a -> s {statusReason = a} :: GetEnrollmentStatusResponse)++-- | The response's http status code.+getEnrollmentStatusResponse_httpStatus :: Lens.Lens' GetEnrollmentStatusResponse Prelude.Int+getEnrollmentStatusResponse_httpStatus = Lens.lens (\GetEnrollmentStatusResponse' {httpStatus} -> httpStatus) (\s@GetEnrollmentStatusResponse' {} a -> s {httpStatus = a} :: GetEnrollmentStatusResponse)++instance Prelude.NFData GetEnrollmentStatusResponse where+  rnf GetEnrollmentStatusResponse' {..} =+    Prelude.rnf lastUpdatedTimestamp+      `Prelude.seq` Prelude.rnf memberAccountsEnrolled+      `Prelude.seq` Prelude.rnf numberOfMemberAccountsOptedIn+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf statusReason+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetEnrollmentStatusesForOrganization.hs view
@@ -0,0 +1,304 @@+{-# 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.ComputeOptimizer.GetEnrollmentStatusesForOrganization+-- 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 Compute Optimizer enrollment (opt-in) status of organization+-- member accounts, if your account is an organization management account.+--+-- To get the enrollment status of standalone accounts, use the+-- GetEnrollmentStatus action.+--+-- This operation returns paginated results.+module Amazonka.ComputeOptimizer.GetEnrollmentStatusesForOrganization+  ( -- * Creating a Request+    GetEnrollmentStatusesForOrganization (..),+    newGetEnrollmentStatusesForOrganization,++    -- * Request Lenses+    getEnrollmentStatusesForOrganization_filters,+    getEnrollmentStatusesForOrganization_maxResults,+    getEnrollmentStatusesForOrganization_nextToken,++    -- * Destructuring the Response+    GetEnrollmentStatusesForOrganizationResponse (..),+    newGetEnrollmentStatusesForOrganizationResponse,++    -- * Response Lenses+    getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses,+    getEnrollmentStatusesForOrganizationResponse_nextToken,+    getEnrollmentStatusesForOrganizationResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetEnrollmentStatusesForOrganization' smart constructor.+data GetEnrollmentStatusesForOrganization = GetEnrollmentStatusesForOrganization'+  { -- | An array of objects to specify a filter that returns a more specific+    -- list of account enrollment statuses.+    filters :: Prelude.Maybe [EnrollmentFilter],+    -- | The maximum number of account enrollment statuses to return with a+    -- single request. You can specify up to 100 statuses to return with each+    -- request.+    --+    -- To retrieve the remaining results, make another request with the+    -- returned @nextToken@ value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token to advance to the next page of account enrollment statuses.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetEnrollmentStatusesForOrganization' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'filters', 'getEnrollmentStatusesForOrganization_filters' - An array of objects to specify a filter that returns a more specific+-- list of account enrollment statuses.+--+-- 'maxResults', 'getEnrollmentStatusesForOrganization_maxResults' - The maximum number of account enrollment statuses to return with a+-- single request. You can specify up to 100 statuses to return with each+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+--+-- 'nextToken', 'getEnrollmentStatusesForOrganization_nextToken' - The token to advance to the next page of account enrollment statuses.+newGetEnrollmentStatusesForOrganization ::+  GetEnrollmentStatusesForOrganization+newGetEnrollmentStatusesForOrganization =+  GetEnrollmentStatusesForOrganization'+    { filters =+        Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | An array of objects to specify a filter that returns a more specific+-- list of account enrollment statuses.+getEnrollmentStatusesForOrganization_filters :: Lens.Lens' GetEnrollmentStatusesForOrganization (Prelude.Maybe [EnrollmentFilter])+getEnrollmentStatusesForOrganization_filters = Lens.lens (\GetEnrollmentStatusesForOrganization' {filters} -> filters) (\s@GetEnrollmentStatusesForOrganization' {} a -> s {filters = a} :: GetEnrollmentStatusesForOrganization) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of account enrollment statuses to return with a+-- single request. You can specify up to 100 statuses to return with each+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+getEnrollmentStatusesForOrganization_maxResults :: Lens.Lens' GetEnrollmentStatusesForOrganization (Prelude.Maybe Prelude.Natural)+getEnrollmentStatusesForOrganization_maxResults = Lens.lens (\GetEnrollmentStatusesForOrganization' {maxResults} -> maxResults) (\s@GetEnrollmentStatusesForOrganization' {} a -> s {maxResults = a} :: GetEnrollmentStatusesForOrganization)++-- | The token to advance to the next page of account enrollment statuses.+getEnrollmentStatusesForOrganization_nextToken :: Lens.Lens' GetEnrollmentStatusesForOrganization (Prelude.Maybe Prelude.Text)+getEnrollmentStatusesForOrganization_nextToken = Lens.lens (\GetEnrollmentStatusesForOrganization' {nextToken} -> nextToken) (\s@GetEnrollmentStatusesForOrganization' {} a -> s {nextToken = a} :: GetEnrollmentStatusesForOrganization)++instance+  Core.AWSPager+    GetEnrollmentStatusesForOrganization+  where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? getEnrollmentStatusesForOrganizationResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& getEnrollmentStatusesForOrganization_nextToken+          Lens..~ rs+          Lens.^? getEnrollmentStatusesForOrganizationResponse_nextToken+          Prelude.. Lens._Just++instance+  Core.AWSRequest+    GetEnrollmentStatusesForOrganization+  where+  type+    AWSResponse GetEnrollmentStatusesForOrganization =+      GetEnrollmentStatusesForOrganizationResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetEnrollmentStatusesForOrganizationResponse'+            Prelude.<$> ( x+                            Data..?> "accountEnrollmentStatuses"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetEnrollmentStatusesForOrganization+  where+  hashWithSalt+    _salt+    GetEnrollmentStatusesForOrganization' {..} =+      _salt+        `Prelude.hashWithSalt` filters+        `Prelude.hashWithSalt` maxResults+        `Prelude.hashWithSalt` nextToken++instance+  Prelude.NFData+    GetEnrollmentStatusesForOrganization+  where+  rnf GetEnrollmentStatusesForOrganization' {..} =+    Prelude.rnf filters+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance+  Data.ToHeaders+    GetEnrollmentStatusesForOrganization+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetEnrollmentStatusesForOrganization" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance+  Data.ToJSON+    GetEnrollmentStatusesForOrganization+  where+  toJSON GetEnrollmentStatusesForOrganization' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("filters" Data..=) Prelude.<$> filters,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance+  Data.ToPath+    GetEnrollmentStatusesForOrganization+  where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    GetEnrollmentStatusesForOrganization+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetEnrollmentStatusesForOrganizationResponse' smart constructor.+data GetEnrollmentStatusesForOrganizationResponse = GetEnrollmentStatusesForOrganizationResponse'+  { -- | An array of objects that describe the enrollment statuses of+    -- organization member accounts.+    accountEnrollmentStatuses :: Prelude.Maybe [AccountEnrollmentStatus],+    -- | The token to use to advance to the next page of account enrollment+    -- statuses.+    --+    -- This value is null when there are no more pages of account enrollment+    -- statuses to return.+    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 'GetEnrollmentStatusesForOrganizationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountEnrollmentStatuses', 'getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses' - An array of objects that describe the enrollment statuses of+-- organization member accounts.+--+-- 'nextToken', 'getEnrollmentStatusesForOrganizationResponse_nextToken' - The token to use to advance to the next page of account enrollment+-- statuses.+--+-- This value is null when there are no more pages of account enrollment+-- statuses to return.+--+-- 'httpStatus', 'getEnrollmentStatusesForOrganizationResponse_httpStatus' - The response's http status code.+newGetEnrollmentStatusesForOrganizationResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetEnrollmentStatusesForOrganizationResponse+newGetEnrollmentStatusesForOrganizationResponse+  pHttpStatus_ =+    GetEnrollmentStatusesForOrganizationResponse'+      { accountEnrollmentStatuses =+          Prelude.Nothing,+        nextToken = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | An array of objects that describe the enrollment statuses of+-- organization member accounts.+getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses :: Lens.Lens' GetEnrollmentStatusesForOrganizationResponse (Prelude.Maybe [AccountEnrollmentStatus])+getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses = Lens.lens (\GetEnrollmentStatusesForOrganizationResponse' {accountEnrollmentStatuses} -> accountEnrollmentStatuses) (\s@GetEnrollmentStatusesForOrganizationResponse' {} a -> s {accountEnrollmentStatuses = a} :: GetEnrollmentStatusesForOrganizationResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to use to advance to the next page of account enrollment+-- statuses.+--+-- This value is null when there are no more pages of account enrollment+-- statuses to return.+getEnrollmentStatusesForOrganizationResponse_nextToken :: Lens.Lens' GetEnrollmentStatusesForOrganizationResponse (Prelude.Maybe Prelude.Text)+getEnrollmentStatusesForOrganizationResponse_nextToken = Lens.lens (\GetEnrollmentStatusesForOrganizationResponse' {nextToken} -> nextToken) (\s@GetEnrollmentStatusesForOrganizationResponse' {} a -> s {nextToken = a} :: GetEnrollmentStatusesForOrganizationResponse)++-- | The response's http status code.+getEnrollmentStatusesForOrganizationResponse_httpStatus :: Lens.Lens' GetEnrollmentStatusesForOrganizationResponse Prelude.Int+getEnrollmentStatusesForOrganizationResponse_httpStatus = Lens.lens (\GetEnrollmentStatusesForOrganizationResponse' {httpStatus} -> httpStatus) (\s@GetEnrollmentStatusesForOrganizationResponse' {} a -> s {httpStatus = a} :: GetEnrollmentStatusesForOrganizationResponse)++instance+  Prelude.NFData+    GetEnrollmentStatusesForOrganizationResponse+  where+  rnf GetEnrollmentStatusesForOrganizationResponse' {..} =+    Prelude.rnf accountEnrollmentStatuses+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetLambdaFunctionRecommendations.hs view
@@ -0,0 +1,370 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.GetLambdaFunctionRecommendations+-- 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 Lambda function recommendations.+--+-- Compute Optimizer generates recommendations for functions that meet a+-- specific set of requirements. For more information, see the+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html Supported resources and requirements>+-- in the /Compute Optimizer User Guide/.+--+-- This operation returns paginated results.+module Amazonka.ComputeOptimizer.GetLambdaFunctionRecommendations+  ( -- * Creating a Request+    GetLambdaFunctionRecommendations (..),+    newGetLambdaFunctionRecommendations,++    -- * Request Lenses+    getLambdaFunctionRecommendations_accountIds,+    getLambdaFunctionRecommendations_filters,+    getLambdaFunctionRecommendations_functionArns,+    getLambdaFunctionRecommendations_maxResults,+    getLambdaFunctionRecommendations_nextToken,++    -- * Destructuring the Response+    GetLambdaFunctionRecommendationsResponse (..),+    newGetLambdaFunctionRecommendationsResponse,++    -- * Response Lenses+    getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations,+    getLambdaFunctionRecommendationsResponse_nextToken,+    getLambdaFunctionRecommendationsResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetLambdaFunctionRecommendations' smart constructor.+data GetLambdaFunctionRecommendations = GetLambdaFunctionRecommendations'+  { -- | The ID of the Amazon Web Services account for which to return function+    -- recommendations.+    --+    -- If your account is the management account of an organization, use this+    -- parameter to specify the member account for which you want to return+    -- function recommendations.+    --+    -- Only one account ID can be specified per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | An array of objects to specify a filter that returns a more specific+    -- list of function recommendations.+    filters :: Prelude.Maybe [LambdaFunctionRecommendationFilter],+    -- | The Amazon Resource Name (ARN) of the functions for which to return+    -- recommendations.+    --+    -- You can specify a qualified or unqualified ARN. If you specify an+    -- unqualified ARN without a function version suffix, Compute Optimizer+    -- will return recommendations for the latest (@$LATEST@) version of the+    -- function. If you specify a qualified ARN with a version suffix, Compute+    -- Optimizer will return recommendations for the specified function+    -- version. For more information about using function versions, see+    -- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using Using versions>+    -- in the /Lambda Developer Guide/.+    functionArns :: Prelude.Maybe [Prelude.Text],+    -- | The maximum number of function recommendations to return with a single+    -- request.+    --+    -- To retrieve the remaining results, make another request with the+    -- returned @nextToken@ value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token to advance to the next page of function recommendations.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetLambdaFunctionRecommendations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'getLambdaFunctionRecommendations_accountIds' - The ID of the Amazon Web Services account for which to return function+-- recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- function recommendations.+--+-- Only one account ID can be specified per request.+--+-- 'filters', 'getLambdaFunctionRecommendations_filters' - An array of objects to specify a filter that returns a more specific+-- list of function recommendations.+--+-- 'functionArns', 'getLambdaFunctionRecommendations_functionArns' - The Amazon Resource Name (ARN) of the functions for which to return+-- recommendations.+--+-- You can specify a qualified or unqualified ARN. If you specify an+-- unqualified ARN without a function version suffix, Compute Optimizer+-- will return recommendations for the latest (@$LATEST@) version of the+-- function. If you specify a qualified ARN with a version suffix, Compute+-- Optimizer will return recommendations for the specified function+-- version. For more information about using function versions, see+-- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using Using versions>+-- in the /Lambda Developer Guide/.+--+-- 'maxResults', 'getLambdaFunctionRecommendations_maxResults' - The maximum number of function recommendations to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+--+-- 'nextToken', 'getLambdaFunctionRecommendations_nextToken' - The token to advance to the next page of function recommendations.+newGetLambdaFunctionRecommendations ::+  GetLambdaFunctionRecommendations+newGetLambdaFunctionRecommendations =+  GetLambdaFunctionRecommendations'+    { accountIds =+        Prelude.Nothing,+      filters = Prelude.Nothing,+      functionArns = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | The ID of the Amazon Web Services account for which to return function+-- recommendations.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- function recommendations.+--+-- Only one account ID can be specified per request.+getLambdaFunctionRecommendations_accountIds :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe [Prelude.Text])+getLambdaFunctionRecommendations_accountIds = Lens.lens (\GetLambdaFunctionRecommendations' {accountIds} -> accountIds) (\s@GetLambdaFunctionRecommendations' {} a -> s {accountIds = a} :: GetLambdaFunctionRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects to specify a filter that returns a more specific+-- list of function recommendations.+getLambdaFunctionRecommendations_filters :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe [LambdaFunctionRecommendationFilter])+getLambdaFunctionRecommendations_filters = Lens.lens (\GetLambdaFunctionRecommendations' {filters} -> filters) (\s@GetLambdaFunctionRecommendations' {} a -> s {filters = a} :: GetLambdaFunctionRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the functions for which to return+-- recommendations.+--+-- You can specify a qualified or unqualified ARN. If you specify an+-- unqualified ARN without a function version suffix, Compute Optimizer+-- will return recommendations for the latest (@$LATEST@) version of the+-- function. If you specify a qualified ARN with a version suffix, Compute+-- Optimizer will return recommendations for the specified function+-- version. For more information about using function versions, see+-- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using Using versions>+-- in the /Lambda Developer Guide/.+getLambdaFunctionRecommendations_functionArns :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe [Prelude.Text])+getLambdaFunctionRecommendations_functionArns = Lens.lens (\GetLambdaFunctionRecommendations' {functionArns} -> functionArns) (\s@GetLambdaFunctionRecommendations' {} a -> s {functionArns = a} :: GetLambdaFunctionRecommendations) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of function recommendations to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+getLambdaFunctionRecommendations_maxResults :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe Prelude.Natural)+getLambdaFunctionRecommendations_maxResults = Lens.lens (\GetLambdaFunctionRecommendations' {maxResults} -> maxResults) (\s@GetLambdaFunctionRecommendations' {} a -> s {maxResults = a} :: GetLambdaFunctionRecommendations)++-- | The token to advance to the next page of function recommendations.+getLambdaFunctionRecommendations_nextToken :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe Prelude.Text)+getLambdaFunctionRecommendations_nextToken = Lens.lens (\GetLambdaFunctionRecommendations' {nextToken} -> nextToken) (\s@GetLambdaFunctionRecommendations' {} a -> s {nextToken = a} :: GetLambdaFunctionRecommendations)++instance+  Core.AWSPager+    GetLambdaFunctionRecommendations+  where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? getLambdaFunctionRecommendationsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& getLambdaFunctionRecommendations_nextToken+          Lens..~ rs+          Lens.^? getLambdaFunctionRecommendationsResponse_nextToken+          Prelude.. Lens._Just++instance+  Core.AWSRequest+    GetLambdaFunctionRecommendations+  where+  type+    AWSResponse GetLambdaFunctionRecommendations =+      GetLambdaFunctionRecommendationsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetLambdaFunctionRecommendationsResponse'+            Prelude.<$> ( x+                            Data..?> "lambdaFunctionRecommendations"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (x Data..?> "nextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetLambdaFunctionRecommendations+  where+  hashWithSalt+    _salt+    GetLambdaFunctionRecommendations' {..} =+      _salt+        `Prelude.hashWithSalt` accountIds+        `Prelude.hashWithSalt` filters+        `Prelude.hashWithSalt` functionArns+        `Prelude.hashWithSalt` maxResults+        `Prelude.hashWithSalt` nextToken++instance+  Prelude.NFData+    GetLambdaFunctionRecommendations+  where+  rnf GetLambdaFunctionRecommendations' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf filters+      `Prelude.seq` Prelude.rnf functionArns+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance+  Data.ToHeaders+    GetLambdaFunctionRecommendations+  where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetLambdaFunctionRecommendations" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetLambdaFunctionRecommendations where+  toJSON GetLambdaFunctionRecommendations' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("filters" Data..=) Prelude.<$> filters,+            ("functionArns" Data..=) Prelude.<$> functionArns,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath GetLambdaFunctionRecommendations where+  toPath = Prelude.const "/"++instance+  Data.ToQuery+    GetLambdaFunctionRecommendations+  where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetLambdaFunctionRecommendationsResponse' smart constructor.+data GetLambdaFunctionRecommendationsResponse = GetLambdaFunctionRecommendationsResponse'+  { -- | An array of objects that describe function recommendations.+    lambdaFunctionRecommendations :: Prelude.Maybe [LambdaFunctionRecommendation],+    -- | The token to use to advance to the next page of function+    -- recommendations.+    --+    -- This value is null when there are no more pages of function+    -- recommendations to return.+    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 'GetLambdaFunctionRecommendationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'lambdaFunctionRecommendations', 'getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations' - An array of objects that describe function recommendations.+--+-- 'nextToken', 'getLambdaFunctionRecommendationsResponse_nextToken' - The token to use to advance to the next page of function+-- recommendations.+--+-- This value is null when there are no more pages of function+-- recommendations to return.+--+-- 'httpStatus', 'getLambdaFunctionRecommendationsResponse_httpStatus' - The response's http status code.+newGetLambdaFunctionRecommendationsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetLambdaFunctionRecommendationsResponse+newGetLambdaFunctionRecommendationsResponse+  pHttpStatus_ =+    GetLambdaFunctionRecommendationsResponse'+      { lambdaFunctionRecommendations =+          Prelude.Nothing,+        nextToken = Prelude.Nothing,+        httpStatus = pHttpStatus_+      }++-- | An array of objects that describe function recommendations.+getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations :: Lens.Lens' GetLambdaFunctionRecommendationsResponse (Prelude.Maybe [LambdaFunctionRecommendation])+getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations = Lens.lens (\GetLambdaFunctionRecommendationsResponse' {lambdaFunctionRecommendations} -> lambdaFunctionRecommendations) (\s@GetLambdaFunctionRecommendationsResponse' {} a -> s {lambdaFunctionRecommendations = a} :: GetLambdaFunctionRecommendationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The token to use to advance to the next page of function+-- recommendations.+--+-- This value is null when there are no more pages of function+-- recommendations to return.+getLambdaFunctionRecommendationsResponse_nextToken :: Lens.Lens' GetLambdaFunctionRecommendationsResponse (Prelude.Maybe Prelude.Text)+getLambdaFunctionRecommendationsResponse_nextToken = Lens.lens (\GetLambdaFunctionRecommendationsResponse' {nextToken} -> nextToken) (\s@GetLambdaFunctionRecommendationsResponse' {} a -> s {nextToken = a} :: GetLambdaFunctionRecommendationsResponse)++-- | The response's http status code.+getLambdaFunctionRecommendationsResponse_httpStatus :: Lens.Lens' GetLambdaFunctionRecommendationsResponse Prelude.Int+getLambdaFunctionRecommendationsResponse_httpStatus = Lens.lens (\GetLambdaFunctionRecommendationsResponse' {httpStatus} -> httpStatus) (\s@GetLambdaFunctionRecommendationsResponse' {} a -> s {httpStatus = a} :: GetLambdaFunctionRecommendationsResponse)++instance+  Prelude.NFData+    GetLambdaFunctionRecommendationsResponse+  where+  rnf GetLambdaFunctionRecommendationsResponse' {..} =+    Prelude.rnf lambdaFunctionRecommendations+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetRecommendationPreferences.hs view
@@ -0,0 +1,338 @@+{-# 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.ComputeOptimizer.GetRecommendationPreferences+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns existing recommendation preferences, such as enhanced+-- infrastructure metrics.+--+-- Use the @scope@ parameter to specify which preferences to return. You+-- can specify to return preferences for an organization, a specific+-- account ID, or a specific EC2 instance or Auto Scaling group Amazon+-- Resource Name (ARN).+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- This operation returns paginated results.+module Amazonka.ComputeOptimizer.GetRecommendationPreferences+  ( -- * Creating a Request+    GetRecommendationPreferences (..),+    newGetRecommendationPreferences,++    -- * Request Lenses+    getRecommendationPreferences_maxResults,+    getRecommendationPreferences_nextToken,+    getRecommendationPreferences_scope,+    getRecommendationPreferences_resourceType,++    -- * Destructuring the Response+    GetRecommendationPreferencesResponse (..),+    newGetRecommendationPreferencesResponse,++    -- * Response Lenses+    getRecommendationPreferencesResponse_nextToken,+    getRecommendationPreferencesResponse_recommendationPreferencesDetails,+    getRecommendationPreferencesResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetRecommendationPreferences' smart constructor.+data GetRecommendationPreferences = GetRecommendationPreferences'+  { -- | The maximum number of recommendation preferences to return with a single+    -- request.+    --+    -- To retrieve the remaining results, make another request with the+    -- returned @nextToken@ value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token to advance to the next page of recommendation preferences.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An object that describes the scope of the recommendation preference to+    -- return.+    --+    -- You can return recommendation preferences that are created at the+    -- organization level (for management accounts of an organization only),+    -- account level, and resource level. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+    -- in the /Compute Optimizer User Guide/.+    scope :: Prelude.Maybe Scope,+    -- | The target resource type of the recommendation preference for which to+    -- return preferences.+    --+    -- The @Ec2Instance@ option encompasses standalone instances and instances+    -- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+    -- encompasses only instances that are part of an Auto Scaling group.+    --+    -- The valid values for this parameter are @Ec2Instance@ and+    -- @AutoScalingGroup@.+    resourceType :: ResourceType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRecommendationPreferences' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'getRecommendationPreferences_maxResults' - The maximum number of recommendation preferences to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+--+-- 'nextToken', 'getRecommendationPreferences_nextToken' - The token to advance to the next page of recommendation preferences.+--+-- 'scope', 'getRecommendationPreferences_scope' - An object that describes the scope of the recommendation preference to+-- return.+--+-- You can return recommendation preferences that are created at the+-- organization level (for management accounts of an organization only),+-- account level, and resource level. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- 'resourceType', 'getRecommendationPreferences_resourceType' - The target resource type of the recommendation preference for which to+-- return preferences.+--+-- The @Ec2Instance@ option encompasses standalone instances and instances+-- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+-- encompasses only instances that are part of an Auto Scaling group.+--+-- The valid values for this parameter are @Ec2Instance@ and+-- @AutoScalingGroup@.+newGetRecommendationPreferences ::+  -- | 'resourceType'+  ResourceType ->+  GetRecommendationPreferences+newGetRecommendationPreferences pResourceType_ =+  GetRecommendationPreferences'+    { maxResults =+        Prelude.Nothing,+      nextToken = Prelude.Nothing,+      scope = Prelude.Nothing,+      resourceType = pResourceType_+    }++-- | The maximum number of recommendation preferences to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+getRecommendationPreferences_maxResults :: Lens.Lens' GetRecommendationPreferences (Prelude.Maybe Prelude.Natural)+getRecommendationPreferences_maxResults = Lens.lens (\GetRecommendationPreferences' {maxResults} -> maxResults) (\s@GetRecommendationPreferences' {} a -> s {maxResults = a} :: GetRecommendationPreferences)++-- | The token to advance to the next page of recommendation preferences.+getRecommendationPreferences_nextToken :: Lens.Lens' GetRecommendationPreferences (Prelude.Maybe Prelude.Text)+getRecommendationPreferences_nextToken = Lens.lens (\GetRecommendationPreferences' {nextToken} -> nextToken) (\s@GetRecommendationPreferences' {} a -> s {nextToken = a} :: GetRecommendationPreferences)++-- | An object that describes the scope of the recommendation preference to+-- return.+--+-- You can return recommendation preferences that are created at the+-- organization level (for management accounts of an organization only),+-- account level, and resource level. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+getRecommendationPreferences_scope :: Lens.Lens' GetRecommendationPreferences (Prelude.Maybe Scope)+getRecommendationPreferences_scope = Lens.lens (\GetRecommendationPreferences' {scope} -> scope) (\s@GetRecommendationPreferences' {} a -> s {scope = a} :: GetRecommendationPreferences)++-- | The target resource type of the recommendation preference for which to+-- return preferences.+--+-- The @Ec2Instance@ option encompasses standalone instances and instances+-- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+-- encompasses only instances that are part of an Auto Scaling group.+--+-- The valid values for this parameter are @Ec2Instance@ and+-- @AutoScalingGroup@.+getRecommendationPreferences_resourceType :: Lens.Lens' GetRecommendationPreferences ResourceType+getRecommendationPreferences_resourceType = Lens.lens (\GetRecommendationPreferences' {resourceType} -> resourceType) (\s@GetRecommendationPreferences' {} a -> s {resourceType = a} :: GetRecommendationPreferences)++instance Core.AWSPager GetRecommendationPreferences where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? getRecommendationPreferencesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? getRecommendationPreferencesResponse_recommendationPreferencesDetails+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& getRecommendationPreferences_nextToken+          Lens..~ rs+          Lens.^? getRecommendationPreferencesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest GetRecommendationPreferences where+  type+    AWSResponse GetRecommendationPreferences =+      GetRecommendationPreferencesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetRecommendationPreferencesResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> ( x+                            Data..?> "recommendationPreferencesDetails"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    GetRecommendationPreferences+  where+  hashWithSalt _salt GetRecommendationPreferences' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` scope+      `Prelude.hashWithSalt` resourceType++instance Prelude.NFData GetRecommendationPreferences where+  rnf GetRecommendationPreferences' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf scope+      `Prelude.seq` Prelude.rnf resourceType++instance Data.ToHeaders GetRecommendationPreferences where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetRecommendationPreferences" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetRecommendationPreferences where+  toJSON GetRecommendationPreferences' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken,+            ("scope" Data..=) Prelude.<$> scope,+            Prelude.Just ("resourceType" Data..= resourceType)+          ]+      )++instance Data.ToPath GetRecommendationPreferences where+  toPath = Prelude.const "/"++instance Data.ToQuery GetRecommendationPreferences where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetRecommendationPreferencesResponse' smart constructor.+data GetRecommendationPreferencesResponse = GetRecommendationPreferencesResponse'+  { -- | The token to use to advance to the next page of recommendation+    -- preferences.+    --+    -- This value is null when there are no more pages of recommendation+    -- preferences to return.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that describe recommendation preferences.+    recommendationPreferencesDetails :: Prelude.Maybe [RecommendationPreferencesDetail],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRecommendationPreferencesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'getRecommendationPreferencesResponse_nextToken' - The token to use to advance to the next page of recommendation+-- preferences.+--+-- This value is null when there are no more pages of recommendation+-- preferences to return.+--+-- 'recommendationPreferencesDetails', 'getRecommendationPreferencesResponse_recommendationPreferencesDetails' - An array of objects that describe recommendation preferences.+--+-- 'httpStatus', 'getRecommendationPreferencesResponse_httpStatus' - The response's http status code.+newGetRecommendationPreferencesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetRecommendationPreferencesResponse+newGetRecommendationPreferencesResponse pHttpStatus_ =+  GetRecommendationPreferencesResponse'+    { nextToken =+        Prelude.Nothing,+      recommendationPreferencesDetails =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The token to use to advance to the next page of recommendation+-- preferences.+--+-- This value is null when there are no more pages of recommendation+-- preferences to return.+getRecommendationPreferencesResponse_nextToken :: Lens.Lens' GetRecommendationPreferencesResponse (Prelude.Maybe Prelude.Text)+getRecommendationPreferencesResponse_nextToken = Lens.lens (\GetRecommendationPreferencesResponse' {nextToken} -> nextToken) (\s@GetRecommendationPreferencesResponse' {} a -> s {nextToken = a} :: GetRecommendationPreferencesResponse)++-- | An array of objects that describe recommendation preferences.+getRecommendationPreferencesResponse_recommendationPreferencesDetails :: Lens.Lens' GetRecommendationPreferencesResponse (Prelude.Maybe [RecommendationPreferencesDetail])+getRecommendationPreferencesResponse_recommendationPreferencesDetails = Lens.lens (\GetRecommendationPreferencesResponse' {recommendationPreferencesDetails} -> recommendationPreferencesDetails) (\s@GetRecommendationPreferencesResponse' {} a -> s {recommendationPreferencesDetails = a} :: GetRecommendationPreferencesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getRecommendationPreferencesResponse_httpStatus :: Lens.Lens' GetRecommendationPreferencesResponse Prelude.Int+getRecommendationPreferencesResponse_httpStatus = Lens.lens (\GetRecommendationPreferencesResponse' {httpStatus} -> httpStatus) (\s@GetRecommendationPreferencesResponse' {} a -> s {httpStatus = a} :: GetRecommendationPreferencesResponse)++instance+  Prelude.NFData+    GetRecommendationPreferencesResponse+  where+  rnf GetRecommendationPreferencesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf recommendationPreferencesDetails+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/GetRecommendationSummaries.hs view
@@ -0,0 +1,303 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.GetRecommendationSummaries+-- 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 optimization findings for an account.+--+-- It returns the number of:+--+-- -   Amazon EC2 instances in an account that are @Underprovisioned@,+--     @Overprovisioned@, or @Optimized@.+--+-- -   Auto Scaling groups in an account that are @NotOptimized@, or+--     @Optimized@.+--+-- -   Amazon EBS volumes in an account that are @NotOptimized@, or+--     @Optimized@.+--+-- -   Lambda functions in an account that are @NotOptimized@, or+--     @Optimized@.+--+-- -   Amazon ECS services in an account that are @Underprovisioned@,+--     @Overprovisioned@, or @Optimized@.+--+-- This operation returns paginated results.+module Amazonka.ComputeOptimizer.GetRecommendationSummaries+  ( -- * Creating a Request+    GetRecommendationSummaries (..),+    newGetRecommendationSummaries,++    -- * Request Lenses+    getRecommendationSummaries_accountIds,+    getRecommendationSummaries_maxResults,+    getRecommendationSummaries_nextToken,++    -- * Destructuring the Response+    GetRecommendationSummariesResponse (..),+    newGetRecommendationSummariesResponse,++    -- * Response Lenses+    getRecommendationSummariesResponse_nextToken,+    getRecommendationSummariesResponse_recommendationSummaries,+    getRecommendationSummariesResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newGetRecommendationSummaries' smart constructor.+data GetRecommendationSummaries = GetRecommendationSummaries'+  { -- | The ID of the Amazon Web Services account for which to return+    -- recommendation summaries.+    --+    -- If your account is the management account of an organization, use this+    -- parameter to specify the member account for which you want to return+    -- recommendation summaries.+    --+    -- Only one account ID can be specified per request.+    accountIds :: Prelude.Maybe [Prelude.Text],+    -- | The maximum number of recommendation summaries to return with a single+    -- request.+    --+    -- To retrieve the remaining results, make another request with the+    -- returned @nextToken@ value.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | The token to advance to the next page of recommendation summaries.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRecommendationSummaries' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'getRecommendationSummaries_accountIds' - The ID of the Amazon Web Services account for which to return+-- recommendation summaries.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- recommendation summaries.+--+-- Only one account ID can be specified per request.+--+-- 'maxResults', 'getRecommendationSummaries_maxResults' - The maximum number of recommendation summaries to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+--+-- 'nextToken', 'getRecommendationSummaries_nextToken' - The token to advance to the next page of recommendation summaries.+newGetRecommendationSummaries ::+  GetRecommendationSummaries+newGetRecommendationSummaries =+  GetRecommendationSummaries'+    { accountIds =+        Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | The ID of the Amazon Web Services account for which to return+-- recommendation summaries.+--+-- If your account is the management account of an organization, use this+-- parameter to specify the member account for which you want to return+-- recommendation summaries.+--+-- Only one account ID can be specified per request.+getRecommendationSummaries_accountIds :: Lens.Lens' GetRecommendationSummaries (Prelude.Maybe [Prelude.Text])+getRecommendationSummaries_accountIds = Lens.lens (\GetRecommendationSummaries' {accountIds} -> accountIds) (\s@GetRecommendationSummaries' {} a -> s {accountIds = a} :: GetRecommendationSummaries) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of recommendation summaries to return with a single+-- request.+--+-- To retrieve the remaining results, make another request with the+-- returned @nextToken@ value.+getRecommendationSummaries_maxResults :: Lens.Lens' GetRecommendationSummaries (Prelude.Maybe Prelude.Natural)+getRecommendationSummaries_maxResults = Lens.lens (\GetRecommendationSummaries' {maxResults} -> maxResults) (\s@GetRecommendationSummaries' {} a -> s {maxResults = a} :: GetRecommendationSummaries)++-- | The token to advance to the next page of recommendation summaries.+getRecommendationSummaries_nextToken :: Lens.Lens' GetRecommendationSummaries (Prelude.Maybe Prelude.Text)+getRecommendationSummaries_nextToken = Lens.lens (\GetRecommendationSummaries' {nextToken} -> nextToken) (\s@GetRecommendationSummaries' {} a -> s {nextToken = a} :: GetRecommendationSummaries)++instance Core.AWSPager GetRecommendationSummaries where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? getRecommendationSummariesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? getRecommendationSummariesResponse_recommendationSummaries+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& getRecommendationSummaries_nextToken+          Lens..~ rs+          Lens.^? getRecommendationSummariesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest GetRecommendationSummaries where+  type+    AWSResponse GetRecommendationSummaries =+      GetRecommendationSummariesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          GetRecommendationSummariesResponse'+            Prelude.<$> (x Data..?> "nextToken")+            Prelude.<*> ( x+                            Data..?> "recommendationSummaries"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable GetRecommendationSummaries where+  hashWithSalt _salt GetRecommendationSummaries' {..} =+    _salt+      `Prelude.hashWithSalt` accountIds+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData GetRecommendationSummaries where+  rnf GetRecommendationSummaries' {..} =+    Prelude.rnf accountIds+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders GetRecommendationSummaries where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.GetRecommendationSummaries" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON GetRecommendationSummaries where+  toJSON GetRecommendationSummaries' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("accountIds" Data..=) Prelude.<$> accountIds,+            ("maxResults" Data..=) Prelude.<$> maxResults,+            ("nextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath GetRecommendationSummaries where+  toPath = Prelude.const "/"++instance Data.ToQuery GetRecommendationSummaries where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetRecommendationSummariesResponse' smart constructor.+data GetRecommendationSummariesResponse = GetRecommendationSummariesResponse'+  { -- | The token to use to advance to the next page of recommendation+    -- summaries.+    --+    -- This value is null when there are no more pages of recommendation+    -- summaries to return.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that summarize a recommendation.+    recommendationSummaries :: Prelude.Maybe [RecommendationSummary],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRecommendationSummariesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'getRecommendationSummariesResponse_nextToken' - The token to use to advance to the next page of recommendation+-- summaries.+--+-- This value is null when there are no more pages of recommendation+-- summaries to return.+--+-- 'recommendationSummaries', 'getRecommendationSummariesResponse_recommendationSummaries' - An array of objects that summarize a recommendation.+--+-- 'httpStatus', 'getRecommendationSummariesResponse_httpStatus' - The response's http status code.+newGetRecommendationSummariesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  GetRecommendationSummariesResponse+newGetRecommendationSummariesResponse pHttpStatus_ =+  GetRecommendationSummariesResponse'+    { nextToken =+        Prelude.Nothing,+      recommendationSummaries =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The token to use to advance to the next page of recommendation+-- summaries.+--+-- This value is null when there are no more pages of recommendation+-- summaries to return.+getRecommendationSummariesResponse_nextToken :: Lens.Lens' GetRecommendationSummariesResponse (Prelude.Maybe Prelude.Text)+getRecommendationSummariesResponse_nextToken = Lens.lens (\GetRecommendationSummariesResponse' {nextToken} -> nextToken) (\s@GetRecommendationSummariesResponse' {} a -> s {nextToken = a} :: GetRecommendationSummariesResponse)++-- | An array of objects that summarize a recommendation.+getRecommendationSummariesResponse_recommendationSummaries :: Lens.Lens' GetRecommendationSummariesResponse (Prelude.Maybe [RecommendationSummary])+getRecommendationSummariesResponse_recommendationSummaries = Lens.lens (\GetRecommendationSummariesResponse' {recommendationSummaries} -> recommendationSummaries) (\s@GetRecommendationSummariesResponse' {} a -> s {recommendationSummaries = a} :: GetRecommendationSummariesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getRecommendationSummariesResponse_httpStatus :: Lens.Lens' GetRecommendationSummariesResponse Prelude.Int+getRecommendationSummariesResponse_httpStatus = Lens.lens (\GetRecommendationSummariesResponse' {httpStatus} -> httpStatus) (\s@GetRecommendationSummariesResponse' {} a -> s {httpStatus = a} :: GetRecommendationSummariesResponse)++instance+  Prelude.NFData+    GetRecommendationSummariesResponse+  where+  rnf GetRecommendationSummariesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf recommendationSummaries+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/Lens.hs view
@@ -0,0 +1,596 @@+{-# 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.ComputeOptimizer.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.ComputeOptimizer.Lens+  ( -- * Operations++    -- ** DeleteRecommendationPreferences+    deleteRecommendationPreferences_scope,+    deleteRecommendationPreferences_resourceType,+    deleteRecommendationPreferences_recommendationPreferenceNames,+    deleteRecommendationPreferencesResponse_httpStatus,++    -- ** DescribeRecommendationExportJobs+    describeRecommendationExportJobs_filters,+    describeRecommendationExportJobs_jobIds,+    describeRecommendationExportJobs_maxResults,+    describeRecommendationExportJobs_nextToken,+    describeRecommendationExportJobsResponse_nextToken,+    describeRecommendationExportJobsResponse_recommendationExportJobs,+    describeRecommendationExportJobsResponse_httpStatus,++    -- ** ExportAutoScalingGroupRecommendations+    exportAutoScalingGroupRecommendations_accountIds,+    exportAutoScalingGroupRecommendations_fieldsToExport,+    exportAutoScalingGroupRecommendations_fileFormat,+    exportAutoScalingGroupRecommendations_filters,+    exportAutoScalingGroupRecommendations_includeMemberAccounts,+    exportAutoScalingGroupRecommendations_recommendationPreferences,+    exportAutoScalingGroupRecommendations_s3DestinationConfig,+    exportAutoScalingGroupRecommendationsResponse_jobId,+    exportAutoScalingGroupRecommendationsResponse_s3Destination,+    exportAutoScalingGroupRecommendationsResponse_httpStatus,++    -- ** ExportEBSVolumeRecommendations+    exportEBSVolumeRecommendations_accountIds,+    exportEBSVolumeRecommendations_fieldsToExport,+    exportEBSVolumeRecommendations_fileFormat,+    exportEBSVolumeRecommendations_filters,+    exportEBSVolumeRecommendations_includeMemberAccounts,+    exportEBSVolumeRecommendations_s3DestinationConfig,+    exportEBSVolumeRecommendationsResponse_jobId,+    exportEBSVolumeRecommendationsResponse_s3Destination,+    exportEBSVolumeRecommendationsResponse_httpStatus,++    -- ** ExportEC2InstanceRecommendations+    exportEC2InstanceRecommendations_accountIds,+    exportEC2InstanceRecommendations_fieldsToExport,+    exportEC2InstanceRecommendations_fileFormat,+    exportEC2InstanceRecommendations_filters,+    exportEC2InstanceRecommendations_includeMemberAccounts,+    exportEC2InstanceRecommendations_recommendationPreferences,+    exportEC2InstanceRecommendations_s3DestinationConfig,+    exportEC2InstanceRecommendationsResponse_jobId,+    exportEC2InstanceRecommendationsResponse_s3Destination,+    exportEC2InstanceRecommendationsResponse_httpStatus,++    -- ** ExportECSServiceRecommendations+    exportECSServiceRecommendations_accountIds,+    exportECSServiceRecommendations_fieldsToExport,+    exportECSServiceRecommendations_fileFormat,+    exportECSServiceRecommendations_filters,+    exportECSServiceRecommendations_includeMemberAccounts,+    exportECSServiceRecommendations_s3DestinationConfig,+    exportECSServiceRecommendationsResponse_jobId,+    exportECSServiceRecommendationsResponse_s3Destination,+    exportECSServiceRecommendationsResponse_httpStatus,++    -- ** ExportLambdaFunctionRecommendations+    exportLambdaFunctionRecommendations_accountIds,+    exportLambdaFunctionRecommendations_fieldsToExport,+    exportLambdaFunctionRecommendations_fileFormat,+    exportLambdaFunctionRecommendations_filters,+    exportLambdaFunctionRecommendations_includeMemberAccounts,+    exportLambdaFunctionRecommendations_s3DestinationConfig,+    exportLambdaFunctionRecommendationsResponse_jobId,+    exportLambdaFunctionRecommendationsResponse_s3Destination,+    exportLambdaFunctionRecommendationsResponse_httpStatus,++    -- ** GetAutoScalingGroupRecommendations+    getAutoScalingGroupRecommendations_accountIds,+    getAutoScalingGroupRecommendations_autoScalingGroupArns,+    getAutoScalingGroupRecommendations_filters,+    getAutoScalingGroupRecommendations_maxResults,+    getAutoScalingGroupRecommendations_nextToken,+    getAutoScalingGroupRecommendations_recommendationPreferences,+    getAutoScalingGroupRecommendationsResponse_autoScalingGroupRecommendations,+    getAutoScalingGroupRecommendationsResponse_errors,+    getAutoScalingGroupRecommendationsResponse_nextToken,+    getAutoScalingGroupRecommendationsResponse_httpStatus,++    -- ** GetEBSVolumeRecommendations+    getEBSVolumeRecommendations_accountIds,+    getEBSVolumeRecommendations_filters,+    getEBSVolumeRecommendations_maxResults,+    getEBSVolumeRecommendations_nextToken,+    getEBSVolumeRecommendations_volumeArns,+    getEBSVolumeRecommendationsResponse_errors,+    getEBSVolumeRecommendationsResponse_nextToken,+    getEBSVolumeRecommendationsResponse_volumeRecommendations,+    getEBSVolumeRecommendationsResponse_httpStatus,++    -- ** GetEC2InstanceRecommendations+    getEC2InstanceRecommendations_accountIds,+    getEC2InstanceRecommendations_filters,+    getEC2InstanceRecommendations_instanceArns,+    getEC2InstanceRecommendations_maxResults,+    getEC2InstanceRecommendations_nextToken,+    getEC2InstanceRecommendations_recommendationPreferences,+    getEC2InstanceRecommendationsResponse_errors,+    getEC2InstanceRecommendationsResponse_instanceRecommendations,+    getEC2InstanceRecommendationsResponse_nextToken,+    getEC2InstanceRecommendationsResponse_httpStatus,++    -- ** GetEC2RecommendationProjectedMetrics+    getEC2RecommendationProjectedMetrics_recommendationPreferences,+    getEC2RecommendationProjectedMetrics_instanceArn,+    getEC2RecommendationProjectedMetrics_stat,+    getEC2RecommendationProjectedMetrics_period,+    getEC2RecommendationProjectedMetrics_startTime,+    getEC2RecommendationProjectedMetrics_endTime,+    getEC2RecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics,+    getEC2RecommendationProjectedMetricsResponse_httpStatus,++    -- ** GetECSServiceRecommendationProjectedMetrics+    getECSServiceRecommendationProjectedMetrics_serviceArn,+    getECSServiceRecommendationProjectedMetrics_stat,+    getECSServiceRecommendationProjectedMetrics_period,+    getECSServiceRecommendationProjectedMetrics_startTime,+    getECSServiceRecommendationProjectedMetrics_endTime,+    getECSServiceRecommendationProjectedMetricsResponse_recommendedOptionProjectedMetrics,+    getECSServiceRecommendationProjectedMetricsResponse_httpStatus,++    -- ** GetECSServiceRecommendations+    getECSServiceRecommendations_accountIds,+    getECSServiceRecommendations_filters,+    getECSServiceRecommendations_maxResults,+    getECSServiceRecommendations_nextToken,+    getECSServiceRecommendations_serviceArns,+    getECSServiceRecommendationsResponse_ecsServiceRecommendations,+    getECSServiceRecommendationsResponse_errors,+    getECSServiceRecommendationsResponse_nextToken,+    getECSServiceRecommendationsResponse_httpStatus,++    -- ** GetEffectiveRecommendationPreferences+    getEffectiveRecommendationPreferences_resourceArn,+    getEffectiveRecommendationPreferencesResponse_enhancedInfrastructureMetrics,+    getEffectiveRecommendationPreferencesResponse_externalMetricsPreference,+    getEffectiveRecommendationPreferencesResponse_httpStatus,++    -- ** GetEnrollmentStatus+    getEnrollmentStatusResponse_lastUpdatedTimestamp,+    getEnrollmentStatusResponse_memberAccountsEnrolled,+    getEnrollmentStatusResponse_numberOfMemberAccountsOptedIn,+    getEnrollmentStatusResponse_status,+    getEnrollmentStatusResponse_statusReason,+    getEnrollmentStatusResponse_httpStatus,++    -- ** GetEnrollmentStatusesForOrganization+    getEnrollmentStatusesForOrganization_filters,+    getEnrollmentStatusesForOrganization_maxResults,+    getEnrollmentStatusesForOrganization_nextToken,+    getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses,+    getEnrollmentStatusesForOrganizationResponse_nextToken,+    getEnrollmentStatusesForOrganizationResponse_httpStatus,++    -- ** GetLambdaFunctionRecommendations+    getLambdaFunctionRecommendations_accountIds,+    getLambdaFunctionRecommendations_filters,+    getLambdaFunctionRecommendations_functionArns,+    getLambdaFunctionRecommendations_maxResults,+    getLambdaFunctionRecommendations_nextToken,+    getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations,+    getLambdaFunctionRecommendationsResponse_nextToken,+    getLambdaFunctionRecommendationsResponse_httpStatus,++    -- ** GetRecommendationPreferences+    getRecommendationPreferences_maxResults,+    getRecommendationPreferences_nextToken,+    getRecommendationPreferences_scope,+    getRecommendationPreferences_resourceType,+    getRecommendationPreferencesResponse_nextToken,+    getRecommendationPreferencesResponse_recommendationPreferencesDetails,+    getRecommendationPreferencesResponse_httpStatus,++    -- ** GetRecommendationSummaries+    getRecommendationSummaries_accountIds,+    getRecommendationSummaries_maxResults,+    getRecommendationSummaries_nextToken,+    getRecommendationSummariesResponse_nextToken,+    getRecommendationSummariesResponse_recommendationSummaries,+    getRecommendationSummariesResponse_httpStatus,++    -- ** PutRecommendationPreferences+    putRecommendationPreferences_enhancedInfrastructureMetrics,+    putRecommendationPreferences_externalMetricsPreference,+    putRecommendationPreferences_inferredWorkloadTypes,+    putRecommendationPreferences_scope,+    putRecommendationPreferences_resourceType,+    putRecommendationPreferencesResponse_httpStatus,++    -- ** UpdateEnrollmentStatus+    updateEnrollmentStatus_includeMemberAccounts,+    updateEnrollmentStatus_status,+    updateEnrollmentStatusResponse_status,+    updateEnrollmentStatusResponse_statusReason,+    updateEnrollmentStatusResponse_httpStatus,++    -- * Types++    -- ** AccountEnrollmentStatus+    accountEnrollmentStatus_accountId,+    accountEnrollmentStatus_lastUpdatedTimestamp,+    accountEnrollmentStatus_status,+    accountEnrollmentStatus_statusReason,++    -- ** AutoScalingGroupConfiguration+    autoScalingGroupConfiguration_desiredCapacity,+    autoScalingGroupConfiguration_instanceType,+    autoScalingGroupConfiguration_maxSize,+    autoScalingGroupConfiguration_minSize,++    -- ** AutoScalingGroupRecommendation+    autoScalingGroupRecommendation_accountId,+    autoScalingGroupRecommendation_autoScalingGroupArn,+    autoScalingGroupRecommendation_autoScalingGroupName,+    autoScalingGroupRecommendation_currentConfiguration,+    autoScalingGroupRecommendation_currentPerformanceRisk,+    autoScalingGroupRecommendation_effectiveRecommendationPreferences,+    autoScalingGroupRecommendation_finding,+    autoScalingGroupRecommendation_inferredWorkloadTypes,+    autoScalingGroupRecommendation_lastRefreshTimestamp,+    autoScalingGroupRecommendation_lookBackPeriodInDays,+    autoScalingGroupRecommendation_recommendationOptions,+    autoScalingGroupRecommendation_utilizationMetrics,++    -- ** AutoScalingGroupRecommendationOption+    autoScalingGroupRecommendationOption_configuration,+    autoScalingGroupRecommendationOption_migrationEffort,+    autoScalingGroupRecommendationOption_performanceRisk,+    autoScalingGroupRecommendationOption_projectedUtilizationMetrics,+    autoScalingGroupRecommendationOption_rank,+    autoScalingGroupRecommendationOption_savingsOpportunity,++    -- ** ContainerConfiguration+    containerConfiguration_containerName,+    containerConfiguration_cpu,+    containerConfiguration_memorySizeConfiguration,++    -- ** ContainerRecommendation+    containerRecommendation_containerName,+    containerRecommendation_cpu,+    containerRecommendation_memorySizeConfiguration,++    -- ** CurrentPerformanceRiskRatings+    currentPerformanceRiskRatings_high,+    currentPerformanceRiskRatings_low,+    currentPerformanceRiskRatings_medium,+    currentPerformanceRiskRatings_veryLow,++    -- ** EBSFilter+    eBSFilter_name,+    eBSFilter_values,++    -- ** EBSUtilizationMetric+    eBSUtilizationMetric_name,+    eBSUtilizationMetric_statistic,+    eBSUtilizationMetric_value,++    -- ** ECSServiceProjectedMetric+    eCSServiceProjectedMetric_lowerBoundValues,+    eCSServiceProjectedMetric_name,+    eCSServiceProjectedMetric_timestamps,+    eCSServiceProjectedMetric_upperBoundValues,++    -- ** ECSServiceProjectedUtilizationMetric+    eCSServiceProjectedUtilizationMetric_lowerBoundValue,+    eCSServiceProjectedUtilizationMetric_name,+    eCSServiceProjectedUtilizationMetric_statistic,+    eCSServiceProjectedUtilizationMetric_upperBoundValue,++    -- ** ECSServiceRecommendation+    eCSServiceRecommendation_accountId,+    eCSServiceRecommendation_currentPerformanceRisk,+    eCSServiceRecommendation_currentServiceConfiguration,+    eCSServiceRecommendation_finding,+    eCSServiceRecommendation_findingReasonCodes,+    eCSServiceRecommendation_lastRefreshTimestamp,+    eCSServiceRecommendation_launchType,+    eCSServiceRecommendation_lookbackPeriodInDays,+    eCSServiceRecommendation_serviceArn,+    eCSServiceRecommendation_serviceRecommendationOptions,+    eCSServiceRecommendation_utilizationMetrics,++    -- ** ECSServiceRecommendationFilter+    eCSServiceRecommendationFilter_name,+    eCSServiceRecommendationFilter_values,++    -- ** ECSServiceRecommendationOption+    eCSServiceRecommendationOption_containerRecommendations,+    eCSServiceRecommendationOption_cpu,+    eCSServiceRecommendationOption_memory,+    eCSServiceRecommendationOption_projectedUtilizationMetrics,+    eCSServiceRecommendationOption_savingsOpportunity,++    -- ** ECSServiceRecommendedOptionProjectedMetric+    eCSServiceRecommendedOptionProjectedMetric_projectedMetrics,+    eCSServiceRecommendedOptionProjectedMetric_recommendedCpuUnits,+    eCSServiceRecommendedOptionProjectedMetric_recommendedMemorySize,++    -- ** ECSServiceUtilizationMetric+    eCSServiceUtilizationMetric_name,+    eCSServiceUtilizationMetric_statistic,+    eCSServiceUtilizationMetric_value,++    -- ** EffectiveRecommendationPreferences+    effectiveRecommendationPreferences_cpuVendorArchitectures,+    effectiveRecommendationPreferences_enhancedInfrastructureMetrics,+    effectiveRecommendationPreferences_externalMetricsPreference,+    effectiveRecommendationPreferences_inferredWorkloadTypes,++    -- ** EnrollmentFilter+    enrollmentFilter_name,+    enrollmentFilter_values,++    -- ** EstimatedMonthlySavings+    estimatedMonthlySavings_currency,+    estimatedMonthlySavings_value,++    -- ** ExportDestination+    exportDestination_s3,++    -- ** ExternalMetricsPreference+    externalMetricsPreference_source,++    -- ** Filter+    filter_name,+    filter_values,++    -- ** GetRecommendationError+    getRecommendationError_code,+    getRecommendationError_identifier,+    getRecommendationError_message,++    -- ** InstanceRecommendation+    instanceRecommendation_accountId,+    instanceRecommendation_currentInstanceType,+    instanceRecommendation_currentPerformanceRisk,+    instanceRecommendation_effectiveRecommendationPreferences,+    instanceRecommendation_finding,+    instanceRecommendation_findingReasonCodes,+    instanceRecommendation_inferredWorkloadTypes,+    instanceRecommendation_instanceArn,+    instanceRecommendation_instanceName,+    instanceRecommendation_lastRefreshTimestamp,+    instanceRecommendation_lookBackPeriodInDays,+    instanceRecommendation_recommendationOptions,+    instanceRecommendation_recommendationSources,+    instanceRecommendation_utilizationMetrics,++    -- ** InstanceRecommendationOption+    instanceRecommendationOption_instanceType,+    instanceRecommendationOption_migrationEffort,+    instanceRecommendationOption_performanceRisk,+    instanceRecommendationOption_platformDifferences,+    instanceRecommendationOption_projectedUtilizationMetrics,+    instanceRecommendationOption_rank,+    instanceRecommendationOption_savingsOpportunity,++    -- ** JobFilter+    jobFilter_name,+    jobFilter_values,++    -- ** LambdaFunctionMemoryProjectedMetric+    lambdaFunctionMemoryProjectedMetric_name,+    lambdaFunctionMemoryProjectedMetric_statistic,+    lambdaFunctionMemoryProjectedMetric_value,++    -- ** LambdaFunctionMemoryRecommendationOption+    lambdaFunctionMemoryRecommendationOption_memorySize,+    lambdaFunctionMemoryRecommendationOption_projectedUtilizationMetrics,+    lambdaFunctionMemoryRecommendationOption_rank,+    lambdaFunctionMemoryRecommendationOption_savingsOpportunity,++    -- ** LambdaFunctionRecommendation+    lambdaFunctionRecommendation_accountId,+    lambdaFunctionRecommendation_currentMemorySize,+    lambdaFunctionRecommendation_currentPerformanceRisk,+    lambdaFunctionRecommendation_finding,+    lambdaFunctionRecommendation_findingReasonCodes,+    lambdaFunctionRecommendation_functionArn,+    lambdaFunctionRecommendation_functionVersion,+    lambdaFunctionRecommendation_lastRefreshTimestamp,+    lambdaFunctionRecommendation_lookbackPeriodInDays,+    lambdaFunctionRecommendation_memorySizeRecommendationOptions,+    lambdaFunctionRecommendation_numberOfInvocations,+    lambdaFunctionRecommendation_utilizationMetrics,++    -- ** LambdaFunctionRecommendationFilter+    lambdaFunctionRecommendationFilter_name,+    lambdaFunctionRecommendationFilter_values,++    -- ** LambdaFunctionUtilizationMetric+    lambdaFunctionUtilizationMetric_name,+    lambdaFunctionUtilizationMetric_statistic,+    lambdaFunctionUtilizationMetric_value,++    -- ** MemorySizeConfiguration+    memorySizeConfiguration_memory,+    memorySizeConfiguration_memoryReservation,++    -- ** ProjectedMetric+    projectedMetric_name,+    projectedMetric_timestamps,+    projectedMetric_values,++    -- ** ReasonCodeSummary+    reasonCodeSummary_name,+    reasonCodeSummary_value,++    -- ** RecommendationExportJob+    recommendationExportJob_creationTimestamp,+    recommendationExportJob_destination,+    recommendationExportJob_failureReason,+    recommendationExportJob_jobId,+    recommendationExportJob_lastUpdatedTimestamp,+    recommendationExportJob_resourceType,+    recommendationExportJob_status,++    -- ** RecommendationPreferences+    recommendationPreferences_cpuVendorArchitectures,++    -- ** RecommendationPreferencesDetail+    recommendationPreferencesDetail_enhancedInfrastructureMetrics,+    recommendationPreferencesDetail_externalMetricsPreference,+    recommendationPreferencesDetail_inferredWorkloadTypes,+    recommendationPreferencesDetail_resourceType,+    recommendationPreferencesDetail_scope,++    -- ** RecommendationSource+    recommendationSource_recommendationSourceArn,+    recommendationSource_recommendationSourceType,++    -- ** RecommendationSummary+    recommendationSummary_accountId,+    recommendationSummary_currentPerformanceRiskRatings,+    recommendationSummary_recommendationResourceType,+    recommendationSummary_savingsOpportunity,+    recommendationSummary_summaries,++    -- ** RecommendedOptionProjectedMetric+    recommendedOptionProjectedMetric_projectedMetrics,+    recommendedOptionProjectedMetric_rank,+    recommendedOptionProjectedMetric_recommendedInstanceType,++    -- ** S3Destination+    s3Destination_bucket,+    s3Destination_key,+    s3Destination_metadataKey,++    -- ** S3DestinationConfig+    s3DestinationConfig_bucket,+    s3DestinationConfig_keyPrefix,++    -- ** SavingsOpportunity+    savingsOpportunity_estimatedMonthlySavings,+    savingsOpportunity_savingsOpportunityPercentage,++    -- ** Scope+    scope_name,+    scope_value,++    -- ** ServiceConfiguration+    serviceConfiguration_autoScalingConfiguration,+    serviceConfiguration_containerConfigurations,+    serviceConfiguration_cpu,+    serviceConfiguration_memory,+    serviceConfiguration_taskDefinitionArn,++    -- ** Summary+    summary_name,+    summary_reasonCodeSummaries,+    summary_value,++    -- ** UtilizationMetric+    utilizationMetric_name,+    utilizationMetric_statistic,+    utilizationMetric_value,++    -- ** VolumeConfiguration+    volumeConfiguration_volumeBaselineIOPS,+    volumeConfiguration_volumeBaselineThroughput,+    volumeConfiguration_volumeBurstIOPS,+    volumeConfiguration_volumeBurstThroughput,+    volumeConfiguration_volumeSize,+    volumeConfiguration_volumeType,++    -- ** VolumeRecommendation+    volumeRecommendation_accountId,+    volumeRecommendation_currentConfiguration,+    volumeRecommendation_currentPerformanceRisk,+    volumeRecommendation_finding,+    volumeRecommendation_lastRefreshTimestamp,+    volumeRecommendation_lookBackPeriodInDays,+    volumeRecommendation_utilizationMetrics,+    volumeRecommendation_volumeArn,+    volumeRecommendation_volumeRecommendationOptions,++    -- ** VolumeRecommendationOption+    volumeRecommendationOption_configuration,+    volumeRecommendationOption_performanceRisk,+    volumeRecommendationOption_rank,+    volumeRecommendationOption_savingsOpportunity,+  )+where++import Amazonka.ComputeOptimizer.DeleteRecommendationPreferences+import Amazonka.ComputeOptimizer.DescribeRecommendationExportJobs+import Amazonka.ComputeOptimizer.ExportAutoScalingGroupRecommendations+import Amazonka.ComputeOptimizer.ExportEBSVolumeRecommendations+import Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations+import Amazonka.ComputeOptimizer.ExportECSServiceRecommendations+import Amazonka.ComputeOptimizer.ExportLambdaFunctionRecommendations+import Amazonka.ComputeOptimizer.GetAutoScalingGroupRecommendations+import Amazonka.ComputeOptimizer.GetEBSVolumeRecommendations+import Amazonka.ComputeOptimizer.GetEC2InstanceRecommendations+import Amazonka.ComputeOptimizer.GetEC2RecommendationProjectedMetrics+import Amazonka.ComputeOptimizer.GetECSServiceRecommendationProjectedMetrics+import Amazonka.ComputeOptimizer.GetECSServiceRecommendations+import Amazonka.ComputeOptimizer.GetEffectiveRecommendationPreferences+import Amazonka.ComputeOptimizer.GetEnrollmentStatus+import Amazonka.ComputeOptimizer.GetEnrollmentStatusesForOrganization+import Amazonka.ComputeOptimizer.GetLambdaFunctionRecommendations+import Amazonka.ComputeOptimizer.GetRecommendationPreferences+import Amazonka.ComputeOptimizer.GetRecommendationSummaries+import Amazonka.ComputeOptimizer.PutRecommendationPreferences+import Amazonka.ComputeOptimizer.Types.AccountEnrollmentStatus+import Amazonka.ComputeOptimizer.Types.AutoScalingGroupConfiguration+import Amazonka.ComputeOptimizer.Types.AutoScalingGroupRecommendation+import Amazonka.ComputeOptimizer.Types.AutoScalingGroupRecommendationOption+import Amazonka.ComputeOptimizer.Types.ContainerConfiguration+import Amazonka.ComputeOptimizer.Types.ContainerRecommendation+import Amazonka.ComputeOptimizer.Types.CurrentPerformanceRiskRatings+import Amazonka.ComputeOptimizer.Types.EBSFilter+import Amazonka.ComputeOptimizer.Types.EBSUtilizationMetric+import Amazonka.ComputeOptimizer.Types.ECSServiceProjectedMetric+import Amazonka.ComputeOptimizer.Types.ECSServiceProjectedUtilizationMetric+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendation+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFilter+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationOption+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendedOptionProjectedMetric+import Amazonka.ComputeOptimizer.Types.ECSServiceUtilizationMetric+import Amazonka.ComputeOptimizer.Types.EffectiveRecommendationPreferences+import Amazonka.ComputeOptimizer.Types.EnrollmentFilter+import Amazonka.ComputeOptimizer.Types.EstimatedMonthlySavings+import Amazonka.ComputeOptimizer.Types.ExportDestination+import Amazonka.ComputeOptimizer.Types.ExternalMetricsPreference+import Amazonka.ComputeOptimizer.Types.Filter+import Amazonka.ComputeOptimizer.Types.GetRecommendationError+import Amazonka.ComputeOptimizer.Types.InstanceRecommendation+import Amazonka.ComputeOptimizer.Types.InstanceRecommendationOption+import Amazonka.ComputeOptimizer.Types.JobFilter+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryProjectedMetric+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryRecommendationOption+import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendation+import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFilter+import Amazonka.ComputeOptimizer.Types.LambdaFunctionUtilizationMetric+import Amazonka.ComputeOptimizer.Types.MemorySizeConfiguration+import Amazonka.ComputeOptimizer.Types.ProjectedMetric+import Amazonka.ComputeOptimizer.Types.ReasonCodeSummary+import Amazonka.ComputeOptimizer.Types.RecommendationExportJob+import Amazonka.ComputeOptimizer.Types.RecommendationPreferences+import Amazonka.ComputeOptimizer.Types.RecommendationPreferencesDetail+import Amazonka.ComputeOptimizer.Types.RecommendationSource+import Amazonka.ComputeOptimizer.Types.RecommendationSummary+import Amazonka.ComputeOptimizer.Types.RecommendedOptionProjectedMetric+import Amazonka.ComputeOptimizer.Types.S3Destination+import Amazonka.ComputeOptimizer.Types.S3DestinationConfig+import Amazonka.ComputeOptimizer.Types.SavingsOpportunity+import Amazonka.ComputeOptimizer.Types.Scope+import Amazonka.ComputeOptimizer.Types.ServiceConfiguration+import Amazonka.ComputeOptimizer.Types.Summary+import Amazonka.ComputeOptimizer.Types.UtilizationMetric+import Amazonka.ComputeOptimizer.Types.VolumeConfiguration+import Amazonka.ComputeOptimizer.Types.VolumeRecommendation+import Amazonka.ComputeOptimizer.Types.VolumeRecommendationOption+import Amazonka.ComputeOptimizer.UpdateEnrollmentStatus
+ gen/Amazonka/ComputeOptimizer/PutRecommendationPreferences.hs view
@@ -0,0 +1,393 @@+{-# 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.ComputeOptimizer.PutRecommendationPreferences+-- 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 new recommendation preference or updates an existing+-- recommendation preference, such as enhanced infrastructure metrics.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+module Amazonka.ComputeOptimizer.PutRecommendationPreferences+  ( -- * Creating a Request+    PutRecommendationPreferences (..),+    newPutRecommendationPreferences,++    -- * Request Lenses+    putRecommendationPreferences_enhancedInfrastructureMetrics,+    putRecommendationPreferences_externalMetricsPreference,+    putRecommendationPreferences_inferredWorkloadTypes,+    putRecommendationPreferences_scope,+    putRecommendationPreferences_resourceType,++    -- * Destructuring the Response+    PutRecommendationPreferencesResponse (..),+    newPutRecommendationPreferencesResponse,++    -- * Response Lenses+    putRecommendationPreferencesResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newPutRecommendationPreferences' smart constructor.+data PutRecommendationPreferences = PutRecommendationPreferences'+  { -- | The status of the enhanced infrastructure metrics recommendation+    -- preference to create or update.+    --+    -- Specify the @Active@ status to activate the preference, or specify+    -- @Inactive@ to deactivate the preference.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+    -- in the /Compute Optimizer User Guide/.+    enhancedInfrastructureMetrics :: Prelude.Maybe EnhancedInfrastructureMetrics,+    -- | The provider of the external metrics recommendation preference to create+    -- or update.+    --+    -- Specify a valid provider in the @source@ field to activate the+    -- preference. To delete this preference, see the+    -- DeleteRecommendationPreferences action.+    --+    -- This preference can only be set for the @Ec2Instance@ resource type.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html External metrics ingestion>+    -- in the /Compute Optimizer User Guide/.+    externalMetricsPreference :: Prelude.Maybe ExternalMetricsPreference,+    -- | The status of the inferred workload types recommendation preference to+    -- create or update.+    --+    -- The inferred workload type feature is active by default. To deactivate+    -- it, create a recommendation preference.+    --+    -- Specify the @Inactive@ status to deactivate the feature, or specify+    -- @Active@ to activate it.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/inferred-workload-types.html Inferred workload types>+    -- in the /Compute Optimizer User Guide/.+    inferredWorkloadTypes :: Prelude.Maybe InferredWorkloadTypesPreference,+    -- | An object that describes the scope of the recommendation preference to+    -- create.+    --+    -- You can create recommendation preferences at the organization level (for+    -- management accounts of an organization only), account level, and+    -- resource level. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+    -- in the /Compute Optimizer User Guide/.+    --+    -- You cannot create recommendation preferences for Auto Scaling groups at+    -- the organization and account levels. You can create recommendation+    -- preferences for Auto Scaling groups only at the resource level by+    -- specifying a scope name of @ResourceArn@ and a scope value of the Auto+    -- Scaling group Amazon Resource Name (ARN). This will configure the+    -- preference for all instances that are part of the specified Auto Scaling+    -- group. You also cannot create recommendation preferences at the resource+    -- level for instances that are part of an Auto Scaling group. You can+    -- create recommendation preferences at the resource level only for+    -- standalone instances.+    scope :: Prelude.Maybe Scope,+    -- | The target resource type of the recommendation preference to create.+    --+    -- The @Ec2Instance@ option encompasses standalone instances and instances+    -- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+    -- encompasses only instances that are part of an Auto Scaling group.+    --+    -- The valid values for this parameter are @Ec2Instance@ and+    -- @AutoScalingGroup@.+    resourceType :: ResourceType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutRecommendationPreferences' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'enhancedInfrastructureMetrics', 'putRecommendationPreferences_enhancedInfrastructureMetrics' - The status of the enhanced infrastructure metrics recommendation+-- preference to create or update.+--+-- Specify the @Active@ status to activate the preference, or specify+-- @Inactive@ to deactivate the preference.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- 'externalMetricsPreference', 'putRecommendationPreferences_externalMetricsPreference' - The provider of the external metrics recommendation preference to create+-- or update.+--+-- Specify a valid provider in the @source@ field to activate the+-- preference. To delete this preference, see the+-- DeleteRecommendationPreferences action.+--+-- This preference can only be set for the @Ec2Instance@ resource type.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html External metrics ingestion>+-- in the /Compute Optimizer User Guide/.+--+-- 'inferredWorkloadTypes', 'putRecommendationPreferences_inferredWorkloadTypes' - The status of the inferred workload types recommendation preference to+-- create or update.+--+-- The inferred workload type feature is active by default. To deactivate+-- it, create a recommendation preference.+--+-- Specify the @Inactive@ status to deactivate the feature, or specify+-- @Active@ to activate it.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/inferred-workload-types.html Inferred workload types>+-- in the /Compute Optimizer User Guide/.+--+-- 'scope', 'putRecommendationPreferences_scope' - An object that describes the scope of the recommendation preference to+-- create.+--+-- You can create recommendation preferences at the organization level (for+-- management accounts of an organization only), account level, and+-- resource level. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- You cannot create recommendation preferences for Auto Scaling groups at+-- the organization and account levels. You can create recommendation+-- preferences for Auto Scaling groups only at the resource level by+-- specifying a scope name of @ResourceArn@ and a scope value of the Auto+-- Scaling group Amazon Resource Name (ARN). This will configure the+-- preference for all instances that are part of the specified Auto Scaling+-- group. You also cannot create recommendation preferences at the resource+-- level for instances that are part of an Auto Scaling group. You can+-- create recommendation preferences at the resource level only for+-- standalone instances.+--+-- 'resourceType', 'putRecommendationPreferences_resourceType' - The target resource type of the recommendation preference to create.+--+-- The @Ec2Instance@ option encompasses standalone instances and instances+-- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+-- encompasses only instances that are part of an Auto Scaling group.+--+-- The valid values for this parameter are @Ec2Instance@ and+-- @AutoScalingGroup@.+newPutRecommendationPreferences ::+  -- | 'resourceType'+  ResourceType ->+  PutRecommendationPreferences+newPutRecommendationPreferences pResourceType_ =+  PutRecommendationPreferences'+    { enhancedInfrastructureMetrics =+        Prelude.Nothing,+      externalMetricsPreference = Prelude.Nothing,+      inferredWorkloadTypes = Prelude.Nothing,+      scope = Prelude.Nothing,+      resourceType = pResourceType_+    }++-- | The status of the enhanced infrastructure metrics recommendation+-- preference to create or update.+--+-- Specify the @Active@ status to activate the preference, or specify+-- @Inactive@ to deactivate the preference.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+putRecommendationPreferences_enhancedInfrastructureMetrics :: Lens.Lens' PutRecommendationPreferences (Prelude.Maybe EnhancedInfrastructureMetrics)+putRecommendationPreferences_enhancedInfrastructureMetrics = Lens.lens (\PutRecommendationPreferences' {enhancedInfrastructureMetrics} -> enhancedInfrastructureMetrics) (\s@PutRecommendationPreferences' {} a -> s {enhancedInfrastructureMetrics = a} :: PutRecommendationPreferences)++-- | The provider of the external metrics recommendation preference to create+-- or update.+--+-- Specify a valid provider in the @source@ field to activate the+-- preference. To delete this preference, see the+-- DeleteRecommendationPreferences action.+--+-- This preference can only be set for the @Ec2Instance@ resource type.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html External metrics ingestion>+-- in the /Compute Optimizer User Guide/.+putRecommendationPreferences_externalMetricsPreference :: Lens.Lens' PutRecommendationPreferences (Prelude.Maybe ExternalMetricsPreference)+putRecommendationPreferences_externalMetricsPreference = Lens.lens (\PutRecommendationPreferences' {externalMetricsPreference} -> externalMetricsPreference) (\s@PutRecommendationPreferences' {} a -> s {externalMetricsPreference = a} :: PutRecommendationPreferences)++-- | The status of the inferred workload types recommendation preference to+-- create or update.+--+-- The inferred workload type feature is active by default. To deactivate+-- it, create a recommendation preference.+--+-- Specify the @Inactive@ status to deactivate the feature, or specify+-- @Active@ to activate it.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/inferred-workload-types.html Inferred workload types>+-- in the /Compute Optimizer User Guide/.+putRecommendationPreferences_inferredWorkloadTypes :: Lens.Lens' PutRecommendationPreferences (Prelude.Maybe InferredWorkloadTypesPreference)+putRecommendationPreferences_inferredWorkloadTypes = Lens.lens (\PutRecommendationPreferences' {inferredWorkloadTypes} -> inferredWorkloadTypes) (\s@PutRecommendationPreferences' {} a -> s {inferredWorkloadTypes = a} :: PutRecommendationPreferences)++-- | An object that describes the scope of the recommendation preference to+-- create.+--+-- You can create recommendation preferences at the organization level (for+-- management accounts of an organization only), account level, and+-- resource level. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- You cannot create recommendation preferences for Auto Scaling groups at+-- the organization and account levels. You can create recommendation+-- preferences for Auto Scaling groups only at the resource level by+-- specifying a scope name of @ResourceArn@ and a scope value of the Auto+-- Scaling group Amazon Resource Name (ARN). This will configure the+-- preference for all instances that are part of the specified Auto Scaling+-- group. You also cannot create recommendation preferences at the resource+-- level for instances that are part of an Auto Scaling group. You can+-- create recommendation preferences at the resource level only for+-- standalone instances.+putRecommendationPreferences_scope :: Lens.Lens' PutRecommendationPreferences (Prelude.Maybe Scope)+putRecommendationPreferences_scope = Lens.lens (\PutRecommendationPreferences' {scope} -> scope) (\s@PutRecommendationPreferences' {} a -> s {scope = a} :: PutRecommendationPreferences)++-- | The target resource type of the recommendation preference to create.+--+-- The @Ec2Instance@ option encompasses standalone instances and instances+-- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+-- encompasses only instances that are part of an Auto Scaling group.+--+-- The valid values for this parameter are @Ec2Instance@ and+-- @AutoScalingGroup@.+putRecommendationPreferences_resourceType :: Lens.Lens' PutRecommendationPreferences ResourceType+putRecommendationPreferences_resourceType = Lens.lens (\PutRecommendationPreferences' {resourceType} -> resourceType) (\s@PutRecommendationPreferences' {} a -> s {resourceType = a} :: PutRecommendationPreferences)++instance Core.AWSRequest PutRecommendationPreferences where+  type+    AWSResponse PutRecommendationPreferences =+      PutRecommendationPreferencesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          PutRecommendationPreferencesResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance+  Prelude.Hashable+    PutRecommendationPreferences+  where+  hashWithSalt _salt PutRecommendationPreferences' {..} =+    _salt+      `Prelude.hashWithSalt` enhancedInfrastructureMetrics+      `Prelude.hashWithSalt` externalMetricsPreference+      `Prelude.hashWithSalt` inferredWorkloadTypes+      `Prelude.hashWithSalt` scope+      `Prelude.hashWithSalt` resourceType++instance Prelude.NFData PutRecommendationPreferences where+  rnf PutRecommendationPreferences' {..} =+    Prelude.rnf enhancedInfrastructureMetrics+      `Prelude.seq` Prelude.rnf externalMetricsPreference+      `Prelude.seq` Prelude.rnf inferredWorkloadTypes+      `Prelude.seq` Prelude.rnf scope+      `Prelude.seq` Prelude.rnf resourceType++instance Data.ToHeaders PutRecommendationPreferences where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.PutRecommendationPreferences" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON PutRecommendationPreferences where+  toJSON PutRecommendationPreferences' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("enhancedInfrastructureMetrics" Data..=)+              Prelude.<$> enhancedInfrastructureMetrics,+            ("externalMetricsPreference" Data..=)+              Prelude.<$> externalMetricsPreference,+            ("inferredWorkloadTypes" Data..=)+              Prelude.<$> inferredWorkloadTypes,+            ("scope" Data..=) Prelude.<$> scope,+            Prelude.Just ("resourceType" Data..= resourceType)+          ]+      )++instance Data.ToPath PutRecommendationPreferences where+  toPath = Prelude.const "/"++instance Data.ToQuery PutRecommendationPreferences where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutRecommendationPreferencesResponse' smart constructor.+data PutRecommendationPreferencesResponse = PutRecommendationPreferencesResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutRecommendationPreferencesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'putRecommendationPreferencesResponse_httpStatus' - The response's http status code.+newPutRecommendationPreferencesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  PutRecommendationPreferencesResponse+newPutRecommendationPreferencesResponse pHttpStatus_ =+  PutRecommendationPreferencesResponse'+    { httpStatus =+        pHttpStatus_+    }++-- | The response's http status code.+putRecommendationPreferencesResponse_httpStatus :: Lens.Lens' PutRecommendationPreferencesResponse Prelude.Int+putRecommendationPreferencesResponse_httpStatus = Lens.lens (\PutRecommendationPreferencesResponse' {httpStatus} -> httpStatus) (\s@PutRecommendationPreferencesResponse' {} a -> s {httpStatus = a} :: PutRecommendationPreferencesResponse)++instance+  Prelude.NFData+    PutRecommendationPreferencesResponse+  where+  rnf PutRecommendationPreferencesResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/Types.hs view
@@ -0,0 +1,808 @@+{-# 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.ComputeOptimizer.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.ComputeOptimizer.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _AccessDeniedException,+    _InternalServerException,+    _InvalidParameterValueException,+    _LimitExceededException,+    _MissingAuthenticationToken,+    _OptInRequiredException,+    _ResourceNotFoundException,+    _ServiceUnavailableException,+    _ThrottlingException,++    -- * AutoScalingConfiguration+    AutoScalingConfiguration (..),++    -- * CpuVendorArchitecture+    CpuVendorArchitecture (..),++    -- * Currency+    Currency (..),++    -- * CurrentPerformanceRisk+    CurrentPerformanceRisk (..),++    -- * EBSFilterName+    EBSFilterName (..),++    -- * EBSFinding+    EBSFinding (..),++    -- * EBSMetricName+    EBSMetricName (..),++    -- * ECSServiceLaunchType+    ECSServiceLaunchType (..),++    -- * ECSServiceMetricName+    ECSServiceMetricName (..),++    -- * ECSServiceMetricStatistic+    ECSServiceMetricStatistic (..),++    -- * ECSServiceRecommendationFilterName+    ECSServiceRecommendationFilterName (..),++    -- * ECSServiceRecommendationFinding+    ECSServiceRecommendationFinding (..),++    -- * ECSServiceRecommendationFindingReasonCode+    ECSServiceRecommendationFindingReasonCode (..),++    -- * EnhancedInfrastructureMetrics+    EnhancedInfrastructureMetrics (..),++    -- * EnrollmentFilterName+    EnrollmentFilterName (..),++    -- * ExportableAutoScalingGroupField+    ExportableAutoScalingGroupField (..),++    -- * ExportableECSServiceField+    ExportableECSServiceField (..),++    -- * ExportableInstanceField+    ExportableInstanceField (..),++    -- * ExportableLambdaFunctionField+    ExportableLambdaFunctionField (..),++    -- * ExportableVolumeField+    ExportableVolumeField (..),++    -- * ExternalMetricsSource+    ExternalMetricsSource (..),++    -- * FileFormat+    FileFormat (..),++    -- * FilterName+    FilterName (..),++    -- * Finding+    Finding (..),++    -- * FindingReasonCode+    FindingReasonCode (..),++    -- * InferredWorkloadType+    InferredWorkloadType (..),++    -- * InferredWorkloadTypesPreference+    InferredWorkloadTypesPreference (..),++    -- * InstanceRecommendationFindingReasonCode+    InstanceRecommendationFindingReasonCode (..),++    -- * JobFilterName+    JobFilterName (..),++    -- * JobStatus+    JobStatus (..),++    -- * LambdaFunctionMemoryMetricName+    LambdaFunctionMemoryMetricName (..),++    -- * LambdaFunctionMemoryMetricStatistic+    LambdaFunctionMemoryMetricStatistic (..),++    -- * LambdaFunctionMetricName+    LambdaFunctionMetricName (..),++    -- * LambdaFunctionMetricStatistic+    LambdaFunctionMetricStatistic (..),++    -- * LambdaFunctionRecommendationFilterName+    LambdaFunctionRecommendationFilterName (..),++    -- * LambdaFunctionRecommendationFinding+    LambdaFunctionRecommendationFinding (..),++    -- * LambdaFunctionRecommendationFindingReasonCode+    LambdaFunctionRecommendationFindingReasonCode (..),++    -- * MetricName+    MetricName (..),++    -- * MetricStatistic+    MetricStatistic (..),++    -- * MigrationEffort+    MigrationEffort (..),++    -- * PlatformDifference+    PlatformDifference (..),++    -- * RecommendationPreferenceName+    RecommendationPreferenceName (..),++    -- * RecommendationSourceType+    RecommendationSourceType (..),++    -- * ResourceType+    ResourceType (..),++    -- * ScopeName+    ScopeName (..),++    -- * Status+    Status (..),++    -- * AccountEnrollmentStatus+    AccountEnrollmentStatus (..),+    newAccountEnrollmentStatus,+    accountEnrollmentStatus_accountId,+    accountEnrollmentStatus_lastUpdatedTimestamp,+    accountEnrollmentStatus_status,+    accountEnrollmentStatus_statusReason,++    -- * AutoScalingGroupConfiguration+    AutoScalingGroupConfiguration (..),+    newAutoScalingGroupConfiguration,+    autoScalingGroupConfiguration_desiredCapacity,+    autoScalingGroupConfiguration_instanceType,+    autoScalingGroupConfiguration_maxSize,+    autoScalingGroupConfiguration_minSize,++    -- * AutoScalingGroupRecommendation+    AutoScalingGroupRecommendation (..),+    newAutoScalingGroupRecommendation,+    autoScalingGroupRecommendation_accountId,+    autoScalingGroupRecommendation_autoScalingGroupArn,+    autoScalingGroupRecommendation_autoScalingGroupName,+    autoScalingGroupRecommendation_currentConfiguration,+    autoScalingGroupRecommendation_currentPerformanceRisk,+    autoScalingGroupRecommendation_effectiveRecommendationPreferences,+    autoScalingGroupRecommendation_finding,+    autoScalingGroupRecommendation_inferredWorkloadTypes,+    autoScalingGroupRecommendation_lastRefreshTimestamp,+    autoScalingGroupRecommendation_lookBackPeriodInDays,+    autoScalingGroupRecommendation_recommendationOptions,+    autoScalingGroupRecommendation_utilizationMetrics,++    -- * AutoScalingGroupRecommendationOption+    AutoScalingGroupRecommendationOption (..),+    newAutoScalingGroupRecommendationOption,+    autoScalingGroupRecommendationOption_configuration,+    autoScalingGroupRecommendationOption_migrationEffort,+    autoScalingGroupRecommendationOption_performanceRisk,+    autoScalingGroupRecommendationOption_projectedUtilizationMetrics,+    autoScalingGroupRecommendationOption_rank,+    autoScalingGroupRecommendationOption_savingsOpportunity,++    -- * ContainerConfiguration+    ContainerConfiguration (..),+    newContainerConfiguration,+    containerConfiguration_containerName,+    containerConfiguration_cpu,+    containerConfiguration_memorySizeConfiguration,++    -- * ContainerRecommendation+    ContainerRecommendation (..),+    newContainerRecommendation,+    containerRecommendation_containerName,+    containerRecommendation_cpu,+    containerRecommendation_memorySizeConfiguration,++    -- * CurrentPerformanceRiskRatings+    CurrentPerformanceRiskRatings (..),+    newCurrentPerformanceRiskRatings,+    currentPerformanceRiskRatings_high,+    currentPerformanceRiskRatings_low,+    currentPerformanceRiskRatings_medium,+    currentPerformanceRiskRatings_veryLow,++    -- * EBSFilter+    EBSFilter (..),+    newEBSFilter,+    eBSFilter_name,+    eBSFilter_values,++    -- * EBSUtilizationMetric+    EBSUtilizationMetric (..),+    newEBSUtilizationMetric,+    eBSUtilizationMetric_name,+    eBSUtilizationMetric_statistic,+    eBSUtilizationMetric_value,++    -- * ECSServiceProjectedMetric+    ECSServiceProjectedMetric (..),+    newECSServiceProjectedMetric,+    eCSServiceProjectedMetric_lowerBoundValues,+    eCSServiceProjectedMetric_name,+    eCSServiceProjectedMetric_timestamps,+    eCSServiceProjectedMetric_upperBoundValues,++    -- * ECSServiceProjectedUtilizationMetric+    ECSServiceProjectedUtilizationMetric (..),+    newECSServiceProjectedUtilizationMetric,+    eCSServiceProjectedUtilizationMetric_lowerBoundValue,+    eCSServiceProjectedUtilizationMetric_name,+    eCSServiceProjectedUtilizationMetric_statistic,+    eCSServiceProjectedUtilizationMetric_upperBoundValue,++    -- * ECSServiceRecommendation+    ECSServiceRecommendation (..),+    newECSServiceRecommendation,+    eCSServiceRecommendation_accountId,+    eCSServiceRecommendation_currentPerformanceRisk,+    eCSServiceRecommendation_currentServiceConfiguration,+    eCSServiceRecommendation_finding,+    eCSServiceRecommendation_findingReasonCodes,+    eCSServiceRecommendation_lastRefreshTimestamp,+    eCSServiceRecommendation_launchType,+    eCSServiceRecommendation_lookbackPeriodInDays,+    eCSServiceRecommendation_serviceArn,+    eCSServiceRecommendation_serviceRecommendationOptions,+    eCSServiceRecommendation_utilizationMetrics,++    -- * ECSServiceRecommendationFilter+    ECSServiceRecommendationFilter (..),+    newECSServiceRecommendationFilter,+    eCSServiceRecommendationFilter_name,+    eCSServiceRecommendationFilter_values,++    -- * ECSServiceRecommendationOption+    ECSServiceRecommendationOption (..),+    newECSServiceRecommendationOption,+    eCSServiceRecommendationOption_containerRecommendations,+    eCSServiceRecommendationOption_cpu,+    eCSServiceRecommendationOption_memory,+    eCSServiceRecommendationOption_projectedUtilizationMetrics,+    eCSServiceRecommendationOption_savingsOpportunity,++    -- * ECSServiceRecommendedOptionProjectedMetric+    ECSServiceRecommendedOptionProjectedMetric (..),+    newECSServiceRecommendedOptionProjectedMetric,+    eCSServiceRecommendedOptionProjectedMetric_projectedMetrics,+    eCSServiceRecommendedOptionProjectedMetric_recommendedCpuUnits,+    eCSServiceRecommendedOptionProjectedMetric_recommendedMemorySize,++    -- * ECSServiceUtilizationMetric+    ECSServiceUtilizationMetric (..),+    newECSServiceUtilizationMetric,+    eCSServiceUtilizationMetric_name,+    eCSServiceUtilizationMetric_statistic,+    eCSServiceUtilizationMetric_value,++    -- * EffectiveRecommendationPreferences+    EffectiveRecommendationPreferences (..),+    newEffectiveRecommendationPreferences,+    effectiveRecommendationPreferences_cpuVendorArchitectures,+    effectiveRecommendationPreferences_enhancedInfrastructureMetrics,+    effectiveRecommendationPreferences_externalMetricsPreference,+    effectiveRecommendationPreferences_inferredWorkloadTypes,++    -- * EnrollmentFilter+    EnrollmentFilter (..),+    newEnrollmentFilter,+    enrollmentFilter_name,+    enrollmentFilter_values,++    -- * EstimatedMonthlySavings+    EstimatedMonthlySavings (..),+    newEstimatedMonthlySavings,+    estimatedMonthlySavings_currency,+    estimatedMonthlySavings_value,++    -- * ExportDestination+    ExportDestination (..),+    newExportDestination,+    exportDestination_s3,++    -- * ExternalMetricsPreference+    ExternalMetricsPreference (..),+    newExternalMetricsPreference,+    externalMetricsPreference_source,++    -- * Filter+    Filter (..),+    newFilter,+    filter_name,+    filter_values,++    -- * GetRecommendationError+    GetRecommendationError (..),+    newGetRecommendationError,+    getRecommendationError_code,+    getRecommendationError_identifier,+    getRecommendationError_message,++    -- * InstanceRecommendation+    InstanceRecommendation (..),+    newInstanceRecommendation,+    instanceRecommendation_accountId,+    instanceRecommendation_currentInstanceType,+    instanceRecommendation_currentPerformanceRisk,+    instanceRecommendation_effectiveRecommendationPreferences,+    instanceRecommendation_finding,+    instanceRecommendation_findingReasonCodes,+    instanceRecommendation_inferredWorkloadTypes,+    instanceRecommendation_instanceArn,+    instanceRecommendation_instanceName,+    instanceRecommendation_lastRefreshTimestamp,+    instanceRecommendation_lookBackPeriodInDays,+    instanceRecommendation_recommendationOptions,+    instanceRecommendation_recommendationSources,+    instanceRecommendation_utilizationMetrics,++    -- * InstanceRecommendationOption+    InstanceRecommendationOption (..),+    newInstanceRecommendationOption,+    instanceRecommendationOption_instanceType,+    instanceRecommendationOption_migrationEffort,+    instanceRecommendationOption_performanceRisk,+    instanceRecommendationOption_platformDifferences,+    instanceRecommendationOption_projectedUtilizationMetrics,+    instanceRecommendationOption_rank,+    instanceRecommendationOption_savingsOpportunity,++    -- * JobFilter+    JobFilter (..),+    newJobFilter,+    jobFilter_name,+    jobFilter_values,++    -- * LambdaFunctionMemoryProjectedMetric+    LambdaFunctionMemoryProjectedMetric (..),+    newLambdaFunctionMemoryProjectedMetric,+    lambdaFunctionMemoryProjectedMetric_name,+    lambdaFunctionMemoryProjectedMetric_statistic,+    lambdaFunctionMemoryProjectedMetric_value,++    -- * LambdaFunctionMemoryRecommendationOption+    LambdaFunctionMemoryRecommendationOption (..),+    newLambdaFunctionMemoryRecommendationOption,+    lambdaFunctionMemoryRecommendationOption_memorySize,+    lambdaFunctionMemoryRecommendationOption_projectedUtilizationMetrics,+    lambdaFunctionMemoryRecommendationOption_rank,+    lambdaFunctionMemoryRecommendationOption_savingsOpportunity,++    -- * LambdaFunctionRecommendation+    LambdaFunctionRecommendation (..),+    newLambdaFunctionRecommendation,+    lambdaFunctionRecommendation_accountId,+    lambdaFunctionRecommendation_currentMemorySize,+    lambdaFunctionRecommendation_currentPerformanceRisk,+    lambdaFunctionRecommendation_finding,+    lambdaFunctionRecommendation_findingReasonCodes,+    lambdaFunctionRecommendation_functionArn,+    lambdaFunctionRecommendation_functionVersion,+    lambdaFunctionRecommendation_lastRefreshTimestamp,+    lambdaFunctionRecommendation_lookbackPeriodInDays,+    lambdaFunctionRecommendation_memorySizeRecommendationOptions,+    lambdaFunctionRecommendation_numberOfInvocations,+    lambdaFunctionRecommendation_utilizationMetrics,++    -- * LambdaFunctionRecommendationFilter+    LambdaFunctionRecommendationFilter (..),+    newLambdaFunctionRecommendationFilter,+    lambdaFunctionRecommendationFilter_name,+    lambdaFunctionRecommendationFilter_values,++    -- * LambdaFunctionUtilizationMetric+    LambdaFunctionUtilizationMetric (..),+    newLambdaFunctionUtilizationMetric,+    lambdaFunctionUtilizationMetric_name,+    lambdaFunctionUtilizationMetric_statistic,+    lambdaFunctionUtilizationMetric_value,++    -- * MemorySizeConfiguration+    MemorySizeConfiguration (..),+    newMemorySizeConfiguration,+    memorySizeConfiguration_memory,+    memorySizeConfiguration_memoryReservation,++    -- * ProjectedMetric+    ProjectedMetric (..),+    newProjectedMetric,+    projectedMetric_name,+    projectedMetric_timestamps,+    projectedMetric_values,++    -- * ReasonCodeSummary+    ReasonCodeSummary (..),+    newReasonCodeSummary,+    reasonCodeSummary_name,+    reasonCodeSummary_value,++    -- * RecommendationExportJob+    RecommendationExportJob (..),+    newRecommendationExportJob,+    recommendationExportJob_creationTimestamp,+    recommendationExportJob_destination,+    recommendationExportJob_failureReason,+    recommendationExportJob_jobId,+    recommendationExportJob_lastUpdatedTimestamp,+    recommendationExportJob_resourceType,+    recommendationExportJob_status,++    -- * RecommendationPreferences+    RecommendationPreferences (..),+    newRecommendationPreferences,+    recommendationPreferences_cpuVendorArchitectures,++    -- * RecommendationPreferencesDetail+    RecommendationPreferencesDetail (..),+    newRecommendationPreferencesDetail,+    recommendationPreferencesDetail_enhancedInfrastructureMetrics,+    recommendationPreferencesDetail_externalMetricsPreference,+    recommendationPreferencesDetail_inferredWorkloadTypes,+    recommendationPreferencesDetail_resourceType,+    recommendationPreferencesDetail_scope,++    -- * RecommendationSource+    RecommendationSource (..),+    newRecommendationSource,+    recommendationSource_recommendationSourceArn,+    recommendationSource_recommendationSourceType,++    -- * RecommendationSummary+    RecommendationSummary (..),+    newRecommendationSummary,+    recommendationSummary_accountId,+    recommendationSummary_currentPerformanceRiskRatings,+    recommendationSummary_recommendationResourceType,+    recommendationSummary_savingsOpportunity,+    recommendationSummary_summaries,++    -- * RecommendedOptionProjectedMetric+    RecommendedOptionProjectedMetric (..),+    newRecommendedOptionProjectedMetric,+    recommendedOptionProjectedMetric_projectedMetrics,+    recommendedOptionProjectedMetric_rank,+    recommendedOptionProjectedMetric_recommendedInstanceType,++    -- * S3Destination+    S3Destination (..),+    newS3Destination,+    s3Destination_bucket,+    s3Destination_key,+    s3Destination_metadataKey,++    -- * S3DestinationConfig+    S3DestinationConfig (..),+    newS3DestinationConfig,+    s3DestinationConfig_bucket,+    s3DestinationConfig_keyPrefix,++    -- * SavingsOpportunity+    SavingsOpportunity (..),+    newSavingsOpportunity,+    savingsOpportunity_estimatedMonthlySavings,+    savingsOpportunity_savingsOpportunityPercentage,++    -- * Scope+    Scope (..),+    newScope,+    scope_name,+    scope_value,++    -- * ServiceConfiguration+    ServiceConfiguration (..),+    newServiceConfiguration,+    serviceConfiguration_autoScalingConfiguration,+    serviceConfiguration_containerConfigurations,+    serviceConfiguration_cpu,+    serviceConfiguration_memory,+    serviceConfiguration_taskDefinitionArn,++    -- * Summary+    Summary (..),+    newSummary,+    summary_name,+    summary_reasonCodeSummaries,+    summary_value,++    -- * UtilizationMetric+    UtilizationMetric (..),+    newUtilizationMetric,+    utilizationMetric_name,+    utilizationMetric_statistic,+    utilizationMetric_value,++    -- * VolumeConfiguration+    VolumeConfiguration (..),+    newVolumeConfiguration,+    volumeConfiguration_volumeBaselineIOPS,+    volumeConfiguration_volumeBaselineThroughput,+    volumeConfiguration_volumeBurstIOPS,+    volumeConfiguration_volumeBurstThroughput,+    volumeConfiguration_volumeSize,+    volumeConfiguration_volumeType,++    -- * VolumeRecommendation+    VolumeRecommendation (..),+    newVolumeRecommendation,+    volumeRecommendation_accountId,+    volumeRecommendation_currentConfiguration,+    volumeRecommendation_currentPerformanceRisk,+    volumeRecommendation_finding,+    volumeRecommendation_lastRefreshTimestamp,+    volumeRecommendation_lookBackPeriodInDays,+    volumeRecommendation_utilizationMetrics,+    volumeRecommendation_volumeArn,+    volumeRecommendation_volumeRecommendationOptions,++    -- * VolumeRecommendationOption+    VolumeRecommendationOption (..),+    newVolumeRecommendationOption,+    volumeRecommendationOption_configuration,+    volumeRecommendationOption_performanceRisk,+    volumeRecommendationOption_rank,+    volumeRecommendationOption_savingsOpportunity,+  )+where++import Amazonka.ComputeOptimizer.Types.AccountEnrollmentStatus+import Amazonka.ComputeOptimizer.Types.AutoScalingConfiguration+import Amazonka.ComputeOptimizer.Types.AutoScalingGroupConfiguration+import Amazonka.ComputeOptimizer.Types.AutoScalingGroupRecommendation+import Amazonka.ComputeOptimizer.Types.AutoScalingGroupRecommendationOption+import Amazonka.ComputeOptimizer.Types.ContainerConfiguration+import Amazonka.ComputeOptimizer.Types.ContainerRecommendation+import Amazonka.ComputeOptimizer.Types.CpuVendorArchitecture+import Amazonka.ComputeOptimizer.Types.Currency+import Amazonka.ComputeOptimizer.Types.CurrentPerformanceRisk+import Amazonka.ComputeOptimizer.Types.CurrentPerformanceRiskRatings+import Amazonka.ComputeOptimizer.Types.EBSFilter+import Amazonka.ComputeOptimizer.Types.EBSFilterName+import Amazonka.ComputeOptimizer.Types.EBSFinding+import Amazonka.ComputeOptimizer.Types.EBSMetricName+import Amazonka.ComputeOptimizer.Types.EBSUtilizationMetric+import Amazonka.ComputeOptimizer.Types.ECSServiceLaunchType+import Amazonka.ComputeOptimizer.Types.ECSServiceMetricName+import Amazonka.ComputeOptimizer.Types.ECSServiceMetricStatistic+import Amazonka.ComputeOptimizer.Types.ECSServiceProjectedMetric+import Amazonka.ComputeOptimizer.Types.ECSServiceProjectedUtilizationMetric+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendation+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFilter+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFilterName+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFinding+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFindingReasonCode+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationOption+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendedOptionProjectedMetric+import Amazonka.ComputeOptimizer.Types.ECSServiceUtilizationMetric+import Amazonka.ComputeOptimizer.Types.EffectiveRecommendationPreferences+import Amazonka.ComputeOptimizer.Types.EnhancedInfrastructureMetrics+import Amazonka.ComputeOptimizer.Types.EnrollmentFilter+import Amazonka.ComputeOptimizer.Types.EnrollmentFilterName+import Amazonka.ComputeOptimizer.Types.EstimatedMonthlySavings+import Amazonka.ComputeOptimizer.Types.ExportDestination+import Amazonka.ComputeOptimizer.Types.ExportableAutoScalingGroupField+import Amazonka.ComputeOptimizer.Types.ExportableECSServiceField+import Amazonka.ComputeOptimizer.Types.ExportableInstanceField+import Amazonka.ComputeOptimizer.Types.ExportableLambdaFunctionField+import Amazonka.ComputeOptimizer.Types.ExportableVolumeField+import Amazonka.ComputeOptimizer.Types.ExternalMetricsPreference+import Amazonka.ComputeOptimizer.Types.ExternalMetricsSource+import Amazonka.ComputeOptimizer.Types.FileFormat+import Amazonka.ComputeOptimizer.Types.Filter+import Amazonka.ComputeOptimizer.Types.FilterName+import Amazonka.ComputeOptimizer.Types.Finding+import Amazonka.ComputeOptimizer.Types.FindingReasonCode+import Amazonka.ComputeOptimizer.Types.GetRecommendationError+import Amazonka.ComputeOptimizer.Types.InferredWorkloadType+import Amazonka.ComputeOptimizer.Types.InferredWorkloadTypesPreference+import Amazonka.ComputeOptimizer.Types.InstanceRecommendation+import Amazonka.ComputeOptimizer.Types.InstanceRecommendationFindingReasonCode+import Amazonka.ComputeOptimizer.Types.InstanceRecommendationOption+import Amazonka.ComputeOptimizer.Types.JobFilter+import Amazonka.ComputeOptimizer.Types.JobFilterName+import Amazonka.ComputeOptimizer.Types.JobStatus+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryMetricName+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryMetricStatistic+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryProjectedMetric+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryRecommendationOption+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMetricName+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMetricStatistic+import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendation+import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFilter+import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFilterName+import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFinding+import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFindingReasonCode+import Amazonka.ComputeOptimizer.Types.LambdaFunctionUtilizationMetric+import Amazonka.ComputeOptimizer.Types.MemorySizeConfiguration+import Amazonka.ComputeOptimizer.Types.MetricName+import Amazonka.ComputeOptimizer.Types.MetricStatistic+import Amazonka.ComputeOptimizer.Types.MigrationEffort+import Amazonka.ComputeOptimizer.Types.PlatformDifference+import Amazonka.ComputeOptimizer.Types.ProjectedMetric+import Amazonka.ComputeOptimizer.Types.ReasonCodeSummary+import Amazonka.ComputeOptimizer.Types.RecommendationExportJob+import Amazonka.ComputeOptimizer.Types.RecommendationPreferenceName+import Amazonka.ComputeOptimizer.Types.RecommendationPreferences+import Amazonka.ComputeOptimizer.Types.RecommendationPreferencesDetail+import Amazonka.ComputeOptimizer.Types.RecommendationSource+import Amazonka.ComputeOptimizer.Types.RecommendationSourceType+import Amazonka.ComputeOptimizer.Types.RecommendationSummary+import Amazonka.ComputeOptimizer.Types.RecommendedOptionProjectedMetric+import Amazonka.ComputeOptimizer.Types.ResourceType+import Amazonka.ComputeOptimizer.Types.S3Destination+import Amazonka.ComputeOptimizer.Types.S3DestinationConfig+import Amazonka.ComputeOptimizer.Types.SavingsOpportunity+import Amazonka.ComputeOptimizer.Types.Scope+import Amazonka.ComputeOptimizer.Types.ScopeName+import Amazonka.ComputeOptimizer.Types.ServiceConfiguration+import Amazonka.ComputeOptimizer.Types.Status+import Amazonka.ComputeOptimizer.Types.Summary+import Amazonka.ComputeOptimizer.Types.UtilizationMetric+import Amazonka.ComputeOptimizer.Types.VolumeConfiguration+import Amazonka.ComputeOptimizer.Types.VolumeRecommendation+import Amazonka.ComputeOptimizer.Types.VolumeRecommendationOption+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 @2019-11-01@ of the Amazon Compute Optimizer SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "ComputeOptimizer",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "compute-optimizer",+      Core.signingName = "compute-optimizer",+      Core.version = "2019-11-01",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseJSONError "ComputeOptimizer",+      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++-- | You do not have sufficient access to perform this action.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+  Core._MatchServiceError+    defaultService+    "AccessDeniedException"++-- | An internal error has occurred. Try your call again.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+  Core._MatchServiceError+    defaultService+    "InternalServerException"++-- | The value supplied for the input parameter is out of range or not valid.+_InvalidParameterValueException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidParameterValueException =+  Core._MatchServiceError+    defaultService+    "InvalidParameterValueException"++-- | The request exceeds a limit of the service.+_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_LimitExceededException =+  Core._MatchServiceError+    defaultService+    "LimitExceededException"++-- | The request must contain either a valid (registered) Amazon Web Services+-- access key ID or X.509 certificate.+_MissingAuthenticationToken :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_MissingAuthenticationToken =+  Core._MatchServiceError+    defaultService+    "MissingAuthenticationToken"++-- | The account is not opted in to Compute Optimizer.+_OptInRequiredException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_OptInRequiredException =+  Core._MatchServiceError+    defaultService+    "OptInRequiredException"++-- | 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 has failed due to a temporary failure of the server.+_ServiceUnavailableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceUnavailableException =+  Core._MatchServiceError+    defaultService+    "ServiceUnavailableException"++-- | The request was denied due to request throttling.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+  Core._MatchServiceError+    defaultService+    "ThrottlingException"
+ gen/Amazonka/ComputeOptimizer/Types/AccountEnrollmentStatus.hs view
@@ -0,0 +1,126 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.AccountEnrollmentStatus+-- 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.ComputeOptimizer.Types.AccountEnrollmentStatus where++import Amazonka.ComputeOptimizer.Types.Status+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the enrollment status of an organization\'s member accounts in+-- Compute Optimizer.+--+-- /See:/ 'newAccountEnrollmentStatus' smart constructor.+data AccountEnrollmentStatus = AccountEnrollmentStatus'+  { -- | The Amazon Web Services account ID.+    accountId :: Prelude.Maybe Prelude.Text,+    -- | The Unix epoch timestamp, in seconds, of when the account enrollment+    -- status was last updated.+    lastUpdatedTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The account enrollment status.+    status :: Prelude.Maybe Status,+    -- | The reason for the account enrollment status.+    --+    -- For example, an account might show a status of @Pending@ because member+    -- accounts of an organization require more time to be enrolled in the+    -- service.+    statusReason :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AccountEnrollmentStatus' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'accountEnrollmentStatus_accountId' - The Amazon Web Services account ID.+--+-- 'lastUpdatedTimestamp', 'accountEnrollmentStatus_lastUpdatedTimestamp' - The Unix epoch timestamp, in seconds, of when the account enrollment+-- status was last updated.+--+-- 'status', 'accountEnrollmentStatus_status' - The account enrollment status.+--+-- 'statusReason', 'accountEnrollmentStatus_statusReason' - The reason for the account enrollment status.+--+-- For example, an account might show a status of @Pending@ because member+-- accounts of an organization require more time to be enrolled in the+-- service.+newAccountEnrollmentStatus ::+  AccountEnrollmentStatus+newAccountEnrollmentStatus =+  AccountEnrollmentStatus'+    { accountId =+        Prelude.Nothing,+      lastUpdatedTimestamp = Prelude.Nothing,+      status = Prelude.Nothing,+      statusReason = Prelude.Nothing+    }++-- | The Amazon Web Services account ID.+accountEnrollmentStatus_accountId :: Lens.Lens' AccountEnrollmentStatus (Prelude.Maybe Prelude.Text)+accountEnrollmentStatus_accountId = Lens.lens (\AccountEnrollmentStatus' {accountId} -> accountId) (\s@AccountEnrollmentStatus' {} a -> s {accountId = a} :: AccountEnrollmentStatus)++-- | The Unix epoch timestamp, in seconds, of when the account enrollment+-- status was last updated.+accountEnrollmentStatus_lastUpdatedTimestamp :: Lens.Lens' AccountEnrollmentStatus (Prelude.Maybe Prelude.UTCTime)+accountEnrollmentStatus_lastUpdatedTimestamp = Lens.lens (\AccountEnrollmentStatus' {lastUpdatedTimestamp} -> lastUpdatedTimestamp) (\s@AccountEnrollmentStatus' {} a -> s {lastUpdatedTimestamp = a} :: AccountEnrollmentStatus) Prelude.. Lens.mapping Data._Time++-- | The account enrollment status.+accountEnrollmentStatus_status :: Lens.Lens' AccountEnrollmentStatus (Prelude.Maybe Status)+accountEnrollmentStatus_status = Lens.lens (\AccountEnrollmentStatus' {status} -> status) (\s@AccountEnrollmentStatus' {} a -> s {status = a} :: AccountEnrollmentStatus)++-- | The reason for the account enrollment status.+--+-- For example, an account might show a status of @Pending@ because member+-- accounts of an organization require more time to be enrolled in the+-- service.+accountEnrollmentStatus_statusReason :: Lens.Lens' AccountEnrollmentStatus (Prelude.Maybe Prelude.Text)+accountEnrollmentStatus_statusReason = Lens.lens (\AccountEnrollmentStatus' {statusReason} -> statusReason) (\s@AccountEnrollmentStatus' {} a -> s {statusReason = a} :: AccountEnrollmentStatus)++instance Data.FromJSON AccountEnrollmentStatus where+  parseJSON =+    Data.withObject+      "AccountEnrollmentStatus"+      ( \x ->+          AccountEnrollmentStatus'+            Prelude.<$> (x Data..:? "accountId")+            Prelude.<*> (x Data..:? "lastUpdatedTimestamp")+            Prelude.<*> (x Data..:? "status")+            Prelude.<*> (x Data..:? "statusReason")+      )++instance Prelude.Hashable AccountEnrollmentStatus where+  hashWithSalt _salt AccountEnrollmentStatus' {..} =+    _salt+      `Prelude.hashWithSalt` accountId+      `Prelude.hashWithSalt` lastUpdatedTimestamp+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` statusReason++instance Prelude.NFData AccountEnrollmentStatus where+  rnf AccountEnrollmentStatus' {..} =+    Prelude.rnf accountId+      `Prelude.seq` Prelude.rnf lastUpdatedTimestamp+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf statusReason
+ gen/Amazonka/ComputeOptimizer/Types/AutoScalingConfiguration.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.AutoScalingConfiguration+-- 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.ComputeOptimizer.Types.AutoScalingConfiguration+  ( AutoScalingConfiguration+      ( ..,+        AutoScalingConfiguration_TargetTrackingScalingCpu,+        AutoScalingConfiguration_TargetTrackingScalingMemory+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AutoScalingConfiguration = AutoScalingConfiguration'+  { fromAutoScalingConfiguration ::+      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 AutoScalingConfiguration_TargetTrackingScalingCpu :: AutoScalingConfiguration+pattern AutoScalingConfiguration_TargetTrackingScalingCpu = AutoScalingConfiguration' "TargetTrackingScalingCpu"++pattern AutoScalingConfiguration_TargetTrackingScalingMemory :: AutoScalingConfiguration+pattern AutoScalingConfiguration_TargetTrackingScalingMemory = AutoScalingConfiguration' "TargetTrackingScalingMemory"++{-# COMPLETE+  AutoScalingConfiguration_TargetTrackingScalingCpu,+  AutoScalingConfiguration_TargetTrackingScalingMemory,+  AutoScalingConfiguration'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/AutoScalingGroupConfiguration.hs view
@@ -0,0 +1,121 @@+{-# 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.ComputeOptimizer.Types.AutoScalingGroupConfiguration+-- 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.ComputeOptimizer.Types.AutoScalingGroupConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the configuration of an Auto Scaling group.+--+-- /See:/ 'newAutoScalingGroupConfiguration' smart constructor.+data AutoScalingGroupConfiguration = AutoScalingGroupConfiguration'+  { -- | The desired capacity, or number of instances, for the Auto Scaling+    -- group.+    desiredCapacity :: Prelude.Maybe Prelude.Int,+    -- | The instance type for the Auto Scaling group.+    instanceType :: Prelude.Maybe Prelude.Text,+    -- | The maximum size, or maximum number of instances, for the Auto Scaling+    -- group.+    maxSize :: Prelude.Maybe Prelude.Int,+    -- | The minimum size, or minimum number of instances, for the Auto Scaling+    -- group.+    minSize :: Prelude.Maybe Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AutoScalingGroupConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'desiredCapacity', 'autoScalingGroupConfiguration_desiredCapacity' - The desired capacity, or number of instances, for the Auto Scaling+-- group.+--+-- 'instanceType', 'autoScalingGroupConfiguration_instanceType' - The instance type for the Auto Scaling group.+--+-- 'maxSize', 'autoScalingGroupConfiguration_maxSize' - The maximum size, or maximum number of instances, for the Auto Scaling+-- group.+--+-- 'minSize', 'autoScalingGroupConfiguration_minSize' - The minimum size, or minimum number of instances, for the Auto Scaling+-- group.+newAutoScalingGroupConfiguration ::+  AutoScalingGroupConfiguration+newAutoScalingGroupConfiguration =+  AutoScalingGroupConfiguration'+    { desiredCapacity =+        Prelude.Nothing,+      instanceType = Prelude.Nothing,+      maxSize = Prelude.Nothing,+      minSize = Prelude.Nothing+    }++-- | The desired capacity, or number of instances, for the Auto Scaling+-- group.+autoScalingGroupConfiguration_desiredCapacity :: Lens.Lens' AutoScalingGroupConfiguration (Prelude.Maybe Prelude.Int)+autoScalingGroupConfiguration_desiredCapacity = Lens.lens (\AutoScalingGroupConfiguration' {desiredCapacity} -> desiredCapacity) (\s@AutoScalingGroupConfiguration' {} a -> s {desiredCapacity = a} :: AutoScalingGroupConfiguration)++-- | The instance type for the Auto Scaling group.+autoScalingGroupConfiguration_instanceType :: Lens.Lens' AutoScalingGroupConfiguration (Prelude.Maybe Prelude.Text)+autoScalingGroupConfiguration_instanceType = Lens.lens (\AutoScalingGroupConfiguration' {instanceType} -> instanceType) (\s@AutoScalingGroupConfiguration' {} a -> s {instanceType = a} :: AutoScalingGroupConfiguration)++-- | The maximum size, or maximum number of instances, for the Auto Scaling+-- group.+autoScalingGroupConfiguration_maxSize :: Lens.Lens' AutoScalingGroupConfiguration (Prelude.Maybe Prelude.Int)+autoScalingGroupConfiguration_maxSize = Lens.lens (\AutoScalingGroupConfiguration' {maxSize} -> maxSize) (\s@AutoScalingGroupConfiguration' {} a -> s {maxSize = a} :: AutoScalingGroupConfiguration)++-- | The minimum size, or minimum number of instances, for the Auto Scaling+-- group.+autoScalingGroupConfiguration_minSize :: Lens.Lens' AutoScalingGroupConfiguration (Prelude.Maybe Prelude.Int)+autoScalingGroupConfiguration_minSize = Lens.lens (\AutoScalingGroupConfiguration' {minSize} -> minSize) (\s@AutoScalingGroupConfiguration' {} a -> s {minSize = a} :: AutoScalingGroupConfiguration)++instance Data.FromJSON AutoScalingGroupConfiguration where+  parseJSON =+    Data.withObject+      "AutoScalingGroupConfiguration"+      ( \x ->+          AutoScalingGroupConfiguration'+            Prelude.<$> (x Data..:? "desiredCapacity")+            Prelude.<*> (x Data..:? "instanceType")+            Prelude.<*> (x Data..:? "maxSize")+            Prelude.<*> (x Data..:? "minSize")+      )++instance+  Prelude.Hashable+    AutoScalingGroupConfiguration+  where+  hashWithSalt _salt AutoScalingGroupConfiguration' {..} =+    _salt+      `Prelude.hashWithSalt` desiredCapacity+      `Prelude.hashWithSalt` instanceType+      `Prelude.hashWithSalt` maxSize+      `Prelude.hashWithSalt` minSize++instance Prelude.NFData AutoScalingGroupConfiguration where+  rnf AutoScalingGroupConfiguration' {..} =+    Prelude.rnf desiredCapacity+      `Prelude.seq` Prelude.rnf instanceType+      `Prelude.seq` Prelude.rnf maxSize+      `Prelude.seq` Prelude.rnf minSize
+ gen/Amazonka/ComputeOptimizer/Types/AutoScalingGroupRecommendation.hs view
@@ -0,0 +1,362 @@+{-# 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.ComputeOptimizer.Types.AutoScalingGroupRecommendation+-- 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.ComputeOptimizer.Types.AutoScalingGroupRecommendation where++import Amazonka.ComputeOptimizer.Types.AutoScalingGroupConfiguration+import Amazonka.ComputeOptimizer.Types.AutoScalingGroupRecommendationOption+import Amazonka.ComputeOptimizer.Types.CurrentPerformanceRisk+import Amazonka.ComputeOptimizer.Types.EffectiveRecommendationPreferences+import Amazonka.ComputeOptimizer.Types.Finding+import Amazonka.ComputeOptimizer.Types.InferredWorkloadType+import Amazonka.ComputeOptimizer.Types.UtilizationMetric+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes an Auto Scaling group recommendation.+--+-- /See:/ 'newAutoScalingGroupRecommendation' smart constructor.+data AutoScalingGroupRecommendation = AutoScalingGroupRecommendation'+  { -- | The Amazon Web Services account ID of the Auto Scaling group.+    accountId :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the Auto Scaling group.+    autoScalingGroupArn :: Prelude.Maybe Prelude.Text,+    -- | The name of the Auto Scaling group.+    autoScalingGroupName :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that describe the current configuration of the Auto+    -- Scaling group.+    currentConfiguration :: Prelude.Maybe AutoScalingGroupConfiguration,+    -- | The risk of the current Auto Scaling group not meeting the performance+    -- needs of its workloads. The higher the risk, the more likely the current+    -- Auto Scaling group configuration has insufficient capacity and cannot+    -- meet workload requirements.+    currentPerformanceRisk :: Prelude.Maybe CurrentPerformanceRisk,+    -- | An object that describes the effective recommendation preferences for+    -- the Auto Scaling group.+    effectiveRecommendationPreferences :: Prelude.Maybe EffectiveRecommendationPreferences,+    -- | The finding classification of the Auto Scaling group.+    --+    -- Findings for Auto Scaling groups include:+    --+    -- -   __@NotOptimized@__ —An Auto Scaling group is considered not+    --     optimized when Compute Optimizer identifies a recommendation that+    --     can provide better performance for your workload.+    --+    -- -   __@Optimized@__ —An Auto Scaling group is considered optimized when+    --     Compute Optimizer determines that the group is correctly provisioned+    --     to run your workload based on the chosen instance type. For+    --     optimized resources, Compute Optimizer might recommend a new+    --     generation instance type.+    finding :: Prelude.Maybe Finding,+    -- | The applications that might be running on the instances in the Auto+    -- Scaling group as inferred by Compute Optimizer.+    --+    -- Compute Optimizer can infer if one of the following applications might+    -- be running on the instances:+    --+    -- -   @AmazonEmr@ - Infers that Amazon EMR might be running on the+    --     instances.+    --+    -- -   @ApacheCassandra@ - Infers that Apache Cassandra might be running on+    --     the instances.+    --+    -- -   @ApacheHadoop@ - Infers that Apache Hadoop might be running on the+    --     instances.+    --+    -- -   @Memcached@ - Infers that Memcached might be running on the+    --     instances.+    --+    -- -   @NGINX@ - Infers that NGINX might be running on the instances.+    --+    -- -   @PostgreSql@ - Infers that PostgreSQL might be running on the+    --     instances.+    --+    -- -   @Redis@ - Infers that Redis might be running on the instances.+    inferredWorkloadTypes :: Prelude.Maybe [InferredWorkloadType],+    -- | The timestamp of when the Auto Scaling group recommendation was last+    -- generated.+    lastRefreshTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The number of days for which utilization metrics were analyzed for the+    -- Auto Scaling group.+    lookBackPeriodInDays :: Prelude.Maybe Prelude.Double,+    -- | An array of objects that describe the recommendation options for the+    -- Auto Scaling group.+    recommendationOptions :: Prelude.Maybe [AutoScalingGroupRecommendationOption],+    -- | An array of objects that describe the utilization metrics of the Auto+    -- Scaling group.+    utilizationMetrics :: Prelude.Maybe [UtilizationMetric]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AutoScalingGroupRecommendation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'autoScalingGroupRecommendation_accountId' - The Amazon Web Services account ID of the Auto Scaling group.+--+-- 'autoScalingGroupArn', 'autoScalingGroupRecommendation_autoScalingGroupArn' - The Amazon Resource Name (ARN) of the Auto Scaling group.+--+-- 'autoScalingGroupName', 'autoScalingGroupRecommendation_autoScalingGroupName' - The name of the Auto Scaling group.+--+-- 'currentConfiguration', 'autoScalingGroupRecommendation_currentConfiguration' - An array of objects that describe the current configuration of the Auto+-- Scaling group.+--+-- 'currentPerformanceRisk', 'autoScalingGroupRecommendation_currentPerformanceRisk' - The risk of the current Auto Scaling group not meeting the performance+-- needs of its workloads. The higher the risk, the more likely the current+-- Auto Scaling group configuration has insufficient capacity and cannot+-- meet workload requirements.+--+-- 'effectiveRecommendationPreferences', 'autoScalingGroupRecommendation_effectiveRecommendationPreferences' - An object that describes the effective recommendation preferences for+-- the Auto Scaling group.+--+-- 'finding', 'autoScalingGroupRecommendation_finding' - The finding classification of the Auto Scaling group.+--+-- Findings for Auto Scaling groups include:+--+-- -   __@NotOptimized@__ —An Auto Scaling group is considered not+--     optimized when Compute Optimizer identifies a recommendation that+--     can provide better performance for your workload.+--+-- -   __@Optimized@__ —An Auto Scaling group is considered optimized when+--     Compute Optimizer determines that the group is correctly provisioned+--     to run your workload based on the chosen instance type. For+--     optimized resources, Compute Optimizer might recommend a new+--     generation instance type.+--+-- 'inferredWorkloadTypes', 'autoScalingGroupRecommendation_inferredWorkloadTypes' - The applications that might be running on the instances in the Auto+-- Scaling group as inferred by Compute Optimizer.+--+-- Compute Optimizer can infer if one of the following applications might+-- be running on the instances:+--+-- -   @AmazonEmr@ - Infers that Amazon EMR might be running on the+--     instances.+--+-- -   @ApacheCassandra@ - Infers that Apache Cassandra might be running on+--     the instances.+--+-- -   @ApacheHadoop@ - Infers that Apache Hadoop might be running on the+--     instances.+--+-- -   @Memcached@ - Infers that Memcached might be running on the+--     instances.+--+-- -   @NGINX@ - Infers that NGINX might be running on the instances.+--+-- -   @PostgreSql@ - Infers that PostgreSQL might be running on the+--     instances.+--+-- -   @Redis@ - Infers that Redis might be running on the instances.+--+-- 'lastRefreshTimestamp', 'autoScalingGroupRecommendation_lastRefreshTimestamp' - The timestamp of when the Auto Scaling group recommendation was last+-- generated.+--+-- 'lookBackPeriodInDays', 'autoScalingGroupRecommendation_lookBackPeriodInDays' - The number of days for which utilization metrics were analyzed for the+-- Auto Scaling group.+--+-- 'recommendationOptions', 'autoScalingGroupRecommendation_recommendationOptions' - An array of objects that describe the recommendation options for the+-- Auto Scaling group.+--+-- 'utilizationMetrics', 'autoScalingGroupRecommendation_utilizationMetrics' - An array of objects that describe the utilization metrics of the Auto+-- Scaling group.+newAutoScalingGroupRecommendation ::+  AutoScalingGroupRecommendation+newAutoScalingGroupRecommendation =+  AutoScalingGroupRecommendation'+    { accountId =+        Prelude.Nothing,+      autoScalingGroupArn = Prelude.Nothing,+      autoScalingGroupName = Prelude.Nothing,+      currentConfiguration = Prelude.Nothing,+      currentPerformanceRisk = Prelude.Nothing,+      effectiveRecommendationPreferences =+        Prelude.Nothing,+      finding = Prelude.Nothing,+      inferredWorkloadTypes = Prelude.Nothing,+      lastRefreshTimestamp = Prelude.Nothing,+      lookBackPeriodInDays = Prelude.Nothing,+      recommendationOptions = Prelude.Nothing,+      utilizationMetrics = Prelude.Nothing+    }++-- | The Amazon Web Services account ID of the Auto Scaling group.+autoScalingGroupRecommendation_accountId :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.Text)+autoScalingGroupRecommendation_accountId = Lens.lens (\AutoScalingGroupRecommendation' {accountId} -> accountId) (\s@AutoScalingGroupRecommendation' {} a -> s {accountId = a} :: AutoScalingGroupRecommendation)++-- | The Amazon Resource Name (ARN) of the Auto Scaling group.+autoScalingGroupRecommendation_autoScalingGroupArn :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.Text)+autoScalingGroupRecommendation_autoScalingGroupArn = Lens.lens (\AutoScalingGroupRecommendation' {autoScalingGroupArn} -> autoScalingGroupArn) (\s@AutoScalingGroupRecommendation' {} a -> s {autoScalingGroupArn = a} :: AutoScalingGroupRecommendation)++-- | The name of the Auto Scaling group.+autoScalingGroupRecommendation_autoScalingGroupName :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.Text)+autoScalingGroupRecommendation_autoScalingGroupName = Lens.lens (\AutoScalingGroupRecommendation' {autoScalingGroupName} -> autoScalingGroupName) (\s@AutoScalingGroupRecommendation' {} a -> s {autoScalingGroupName = a} :: AutoScalingGroupRecommendation)++-- | An array of objects that describe the current configuration of the Auto+-- Scaling group.+autoScalingGroupRecommendation_currentConfiguration :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe AutoScalingGroupConfiguration)+autoScalingGroupRecommendation_currentConfiguration = Lens.lens (\AutoScalingGroupRecommendation' {currentConfiguration} -> currentConfiguration) (\s@AutoScalingGroupRecommendation' {} a -> s {currentConfiguration = a} :: AutoScalingGroupRecommendation)++-- | The risk of the current Auto Scaling group not meeting the performance+-- needs of its workloads. The higher the risk, the more likely the current+-- Auto Scaling group configuration has insufficient capacity and cannot+-- meet workload requirements.+autoScalingGroupRecommendation_currentPerformanceRisk :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe CurrentPerformanceRisk)+autoScalingGroupRecommendation_currentPerformanceRisk = Lens.lens (\AutoScalingGroupRecommendation' {currentPerformanceRisk} -> currentPerformanceRisk) (\s@AutoScalingGroupRecommendation' {} a -> s {currentPerformanceRisk = a} :: AutoScalingGroupRecommendation)++-- | An object that describes the effective recommendation preferences for+-- the Auto Scaling group.+autoScalingGroupRecommendation_effectiveRecommendationPreferences :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe EffectiveRecommendationPreferences)+autoScalingGroupRecommendation_effectiveRecommendationPreferences = Lens.lens (\AutoScalingGroupRecommendation' {effectiveRecommendationPreferences} -> effectiveRecommendationPreferences) (\s@AutoScalingGroupRecommendation' {} a -> s {effectiveRecommendationPreferences = a} :: AutoScalingGroupRecommendation)++-- | The finding classification of the Auto Scaling group.+--+-- Findings for Auto Scaling groups include:+--+-- -   __@NotOptimized@__ —An Auto Scaling group is considered not+--     optimized when Compute Optimizer identifies a recommendation that+--     can provide better performance for your workload.+--+-- -   __@Optimized@__ —An Auto Scaling group is considered optimized when+--     Compute Optimizer determines that the group is correctly provisioned+--     to run your workload based on the chosen instance type. For+--     optimized resources, Compute Optimizer might recommend a new+--     generation instance type.+autoScalingGroupRecommendation_finding :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Finding)+autoScalingGroupRecommendation_finding = Lens.lens (\AutoScalingGroupRecommendation' {finding} -> finding) (\s@AutoScalingGroupRecommendation' {} a -> s {finding = a} :: AutoScalingGroupRecommendation)++-- | The applications that might be running on the instances in the Auto+-- Scaling group as inferred by Compute Optimizer.+--+-- Compute Optimizer can infer if one of the following applications might+-- be running on the instances:+--+-- -   @AmazonEmr@ - Infers that Amazon EMR might be running on the+--     instances.+--+-- -   @ApacheCassandra@ - Infers that Apache Cassandra might be running on+--     the instances.+--+-- -   @ApacheHadoop@ - Infers that Apache Hadoop might be running on the+--     instances.+--+-- -   @Memcached@ - Infers that Memcached might be running on the+--     instances.+--+-- -   @NGINX@ - Infers that NGINX might be running on the instances.+--+-- -   @PostgreSql@ - Infers that PostgreSQL might be running on the+--     instances.+--+-- -   @Redis@ - Infers that Redis might be running on the instances.+autoScalingGroupRecommendation_inferredWorkloadTypes :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe [InferredWorkloadType])+autoScalingGroupRecommendation_inferredWorkloadTypes = Lens.lens (\AutoScalingGroupRecommendation' {inferredWorkloadTypes} -> inferredWorkloadTypes) (\s@AutoScalingGroupRecommendation' {} a -> s {inferredWorkloadTypes = a} :: AutoScalingGroupRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | The timestamp of when the Auto Scaling group recommendation was last+-- generated.+autoScalingGroupRecommendation_lastRefreshTimestamp :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.UTCTime)+autoScalingGroupRecommendation_lastRefreshTimestamp = Lens.lens (\AutoScalingGroupRecommendation' {lastRefreshTimestamp} -> lastRefreshTimestamp) (\s@AutoScalingGroupRecommendation' {} a -> s {lastRefreshTimestamp = a} :: AutoScalingGroupRecommendation) Prelude.. Lens.mapping Data._Time++-- | The number of days for which utilization metrics were analyzed for the+-- Auto Scaling group.+autoScalingGroupRecommendation_lookBackPeriodInDays :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.Double)+autoScalingGroupRecommendation_lookBackPeriodInDays = Lens.lens (\AutoScalingGroupRecommendation' {lookBackPeriodInDays} -> lookBackPeriodInDays) (\s@AutoScalingGroupRecommendation' {} a -> s {lookBackPeriodInDays = a} :: AutoScalingGroupRecommendation)++-- | An array of objects that describe the recommendation options for the+-- Auto Scaling group.+autoScalingGroupRecommendation_recommendationOptions :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe [AutoScalingGroupRecommendationOption])+autoScalingGroupRecommendation_recommendationOptions = Lens.lens (\AutoScalingGroupRecommendation' {recommendationOptions} -> recommendationOptions) (\s@AutoScalingGroupRecommendation' {} a -> s {recommendationOptions = a} :: AutoScalingGroupRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects that describe the utilization metrics of the Auto+-- Scaling group.+autoScalingGroupRecommendation_utilizationMetrics :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe [UtilizationMetric])+autoScalingGroupRecommendation_utilizationMetrics = Lens.lens (\AutoScalingGroupRecommendation' {utilizationMetrics} -> utilizationMetrics) (\s@AutoScalingGroupRecommendation' {} a -> s {utilizationMetrics = a} :: AutoScalingGroupRecommendation) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON AutoScalingGroupRecommendation where+  parseJSON =+    Data.withObject+      "AutoScalingGroupRecommendation"+      ( \x ->+          AutoScalingGroupRecommendation'+            Prelude.<$> (x Data..:? "accountId")+            Prelude.<*> (x Data..:? "autoScalingGroupArn")+            Prelude.<*> (x Data..:? "autoScalingGroupName")+            Prelude.<*> (x Data..:? "currentConfiguration")+            Prelude.<*> (x Data..:? "currentPerformanceRisk")+            Prelude.<*> (x Data..:? "effectiveRecommendationPreferences")+            Prelude.<*> (x Data..:? "finding")+            Prelude.<*> ( x+                            Data..:? "inferredWorkloadTypes"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "lastRefreshTimestamp")+            Prelude.<*> (x Data..:? "lookBackPeriodInDays")+            Prelude.<*> ( x+                            Data..:? "recommendationOptions"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> ( x+                            Data..:? "utilizationMetrics"+                            Data..!= Prelude.mempty+                        )+      )++instance+  Prelude.Hashable+    AutoScalingGroupRecommendation+  where+  hashWithSalt+    _salt+    AutoScalingGroupRecommendation' {..} =+      _salt+        `Prelude.hashWithSalt` accountId+        `Prelude.hashWithSalt` autoScalingGroupArn+        `Prelude.hashWithSalt` autoScalingGroupName+        `Prelude.hashWithSalt` currentConfiguration+        `Prelude.hashWithSalt` currentPerformanceRisk+        `Prelude.hashWithSalt` effectiveRecommendationPreferences+        `Prelude.hashWithSalt` finding+        `Prelude.hashWithSalt` inferredWorkloadTypes+        `Prelude.hashWithSalt` lastRefreshTimestamp+        `Prelude.hashWithSalt` lookBackPeriodInDays+        `Prelude.hashWithSalt` recommendationOptions+        `Prelude.hashWithSalt` utilizationMetrics++instance+  Prelude.NFData+    AutoScalingGroupRecommendation+  where+  rnf AutoScalingGroupRecommendation' {..} =+    Prelude.rnf accountId+      `Prelude.seq` Prelude.rnf autoScalingGroupArn+      `Prelude.seq` Prelude.rnf autoScalingGroupName+      `Prelude.seq` Prelude.rnf currentConfiguration+      `Prelude.seq` Prelude.rnf currentPerformanceRisk+      `Prelude.seq` Prelude.rnf effectiveRecommendationPreferences+      `Prelude.seq` Prelude.rnf finding+      `Prelude.seq` Prelude.rnf inferredWorkloadTypes+      `Prelude.seq` Prelude.rnf lastRefreshTimestamp+      `Prelude.seq` Prelude.rnf lookBackPeriodInDays+      `Prelude.seq` Prelude.rnf recommendationOptions+      `Prelude.seq` Prelude.rnf utilizationMetrics
+ gen/Amazonka/ComputeOptimizer/Types/AutoScalingGroupRecommendationOption.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.ComputeOptimizer.Types.AutoScalingGroupRecommendationOption+-- 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.ComputeOptimizer.Types.AutoScalingGroupRecommendationOption where++import Amazonka.ComputeOptimizer.Types.AutoScalingGroupConfiguration+import Amazonka.ComputeOptimizer.Types.MigrationEffort+import Amazonka.ComputeOptimizer.Types.SavingsOpportunity+import Amazonka.ComputeOptimizer.Types.UtilizationMetric+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a recommendation option for an Auto Scaling group.+--+-- /See:/ 'newAutoScalingGroupRecommendationOption' smart constructor.+data AutoScalingGroupRecommendationOption = AutoScalingGroupRecommendationOption'+  { -- | An array of objects that describe an Auto Scaling group configuration.+    configuration :: Prelude.Maybe AutoScalingGroupConfiguration,+    -- | The level of effort required to migrate from the current instance type+    -- to the recommended instance type.+    --+    -- For example, the migration effort is @Low@ if Amazon EMR is the inferred+    -- workload type and an Amazon Web Services Graviton instance type is+    -- recommended. The migration effort is @Medium@ if a workload type+    -- couldn\'t be inferred but an Amazon Web Services Graviton instance type+    -- is recommended. The migration effort is @VeryLow@ if both the current+    -- and recommended instance types are of the same CPU architecture.+    migrationEffort :: Prelude.Maybe MigrationEffort,+    -- | The performance risk of the Auto Scaling group configuration+    -- recommendation.+    --+    -- Performance risk indicates the likelihood of the recommended instance+    -- type not meeting the resource needs of your workload. Compute Optimizer+    -- calculates an individual performance risk score for each specification+    -- of the recommended instance, including CPU, memory, EBS throughput, EBS+    -- IOPS, disk throughput, disk IOPS, network throughput, and network PPS.+    -- The performance risk of the recommended instance is calculated as the+    -- maximum performance risk score across the analyzed resource+    -- specifications.+    --+    -- The value ranges from @0@ - @4@, with @0@ meaning that the recommended+    -- resource is predicted to always provide enough hardware capability. The+    -- higher the performance risk is, the more likely you should validate+    -- whether the recommendation will meet the performance requirements of+    -- your workload before migrating your resource.+    performanceRisk :: Prelude.Maybe Prelude.Double,+    -- | An array of objects that describe the projected utilization metrics of+    -- the Auto Scaling group recommendation option.+    --+    -- The @Cpu@ and @Memory@ metrics are the only projected utilization+    -- metrics returned. Additionally, the @Memory@ metric is returned only for+    -- resources that have the unified CloudWatch agent installed on them. For+    -- more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+    projectedUtilizationMetrics :: Prelude.Maybe [UtilizationMetric],+    -- | The rank of the Auto Scaling group recommendation option.+    --+    -- The top recommendation option is ranked as @1@.+    rank :: Prelude.Maybe Prelude.Int,+    -- | An object that describes the savings opportunity for the Auto Scaling+    -- group recommendation option. Savings opportunity includes the estimated+    -- monthly savings amount and percentage.+    savingsOpportunity :: Prelude.Maybe SavingsOpportunity+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AutoScalingGroupRecommendationOption' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'configuration', 'autoScalingGroupRecommendationOption_configuration' - An array of objects that describe an Auto Scaling group configuration.+--+-- 'migrationEffort', 'autoScalingGroupRecommendationOption_migrationEffort' - The level of effort required to migrate from the current instance type+-- to the recommended instance type.+--+-- For example, the migration effort is @Low@ if Amazon EMR is the inferred+-- workload type and an Amazon Web Services Graviton instance type is+-- recommended. The migration effort is @Medium@ if a workload type+-- couldn\'t be inferred but an Amazon Web Services Graviton instance type+-- is recommended. The migration effort is @VeryLow@ if both the current+-- and recommended instance types are of the same CPU architecture.+--+-- 'performanceRisk', 'autoScalingGroupRecommendationOption_performanceRisk' - The performance risk of the Auto Scaling group configuration+-- recommendation.+--+-- Performance risk indicates the likelihood of the recommended instance+-- type not meeting the resource needs of your workload. Compute Optimizer+-- calculates an individual performance risk score for each specification+-- of the recommended instance, including CPU, memory, EBS throughput, EBS+-- IOPS, disk throughput, disk IOPS, network throughput, and network PPS.+-- The performance risk of the recommended instance is calculated as the+-- maximum performance risk score across the analyzed resource+-- specifications.+--+-- The value ranges from @0@ - @4@, with @0@ meaning that the recommended+-- resource is predicted to always provide enough hardware capability. The+-- higher the performance risk is, the more likely you should validate+-- whether the recommendation will meet the performance requirements of+-- your workload before migrating your resource.+--+-- 'projectedUtilizationMetrics', 'autoScalingGroupRecommendationOption_projectedUtilizationMetrics' - An array of objects that describe the projected utilization metrics of+-- the Auto Scaling group recommendation option.+--+-- The @Cpu@ and @Memory@ metrics are the only projected utilization+-- metrics returned. Additionally, the @Memory@ metric is returned only for+-- resources that have the unified CloudWatch agent installed on them. For+-- more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+--+-- 'rank', 'autoScalingGroupRecommendationOption_rank' - The rank of the Auto Scaling group recommendation option.+--+-- The top recommendation option is ranked as @1@.+--+-- 'savingsOpportunity', 'autoScalingGroupRecommendationOption_savingsOpportunity' - An object that describes the savings opportunity for the Auto Scaling+-- group recommendation option. Savings opportunity includes the estimated+-- monthly savings amount and percentage.+newAutoScalingGroupRecommendationOption ::+  AutoScalingGroupRecommendationOption+newAutoScalingGroupRecommendationOption =+  AutoScalingGroupRecommendationOption'+    { configuration =+        Prelude.Nothing,+      migrationEffort = Prelude.Nothing,+      performanceRisk = Prelude.Nothing,+      projectedUtilizationMetrics =+        Prelude.Nothing,+      rank = Prelude.Nothing,+      savingsOpportunity = Prelude.Nothing+    }++-- | An array of objects that describe an Auto Scaling group configuration.+autoScalingGroupRecommendationOption_configuration :: Lens.Lens' AutoScalingGroupRecommendationOption (Prelude.Maybe AutoScalingGroupConfiguration)+autoScalingGroupRecommendationOption_configuration = Lens.lens (\AutoScalingGroupRecommendationOption' {configuration} -> configuration) (\s@AutoScalingGroupRecommendationOption' {} a -> s {configuration = a} :: AutoScalingGroupRecommendationOption)++-- | The level of effort required to migrate from the current instance type+-- to the recommended instance type.+--+-- For example, the migration effort is @Low@ if Amazon EMR is the inferred+-- workload type and an Amazon Web Services Graviton instance type is+-- recommended. The migration effort is @Medium@ if a workload type+-- couldn\'t be inferred but an Amazon Web Services Graviton instance type+-- is recommended. The migration effort is @VeryLow@ if both the current+-- and recommended instance types are of the same CPU architecture.+autoScalingGroupRecommendationOption_migrationEffort :: Lens.Lens' AutoScalingGroupRecommendationOption (Prelude.Maybe MigrationEffort)+autoScalingGroupRecommendationOption_migrationEffort = Lens.lens (\AutoScalingGroupRecommendationOption' {migrationEffort} -> migrationEffort) (\s@AutoScalingGroupRecommendationOption' {} a -> s {migrationEffort = a} :: AutoScalingGroupRecommendationOption)++-- | The performance risk of the Auto Scaling group configuration+-- recommendation.+--+-- Performance risk indicates the likelihood of the recommended instance+-- type not meeting the resource needs of your workload. Compute Optimizer+-- calculates an individual performance risk score for each specification+-- of the recommended instance, including CPU, memory, EBS throughput, EBS+-- IOPS, disk throughput, disk IOPS, network throughput, and network PPS.+-- The performance risk of the recommended instance is calculated as the+-- maximum performance risk score across the analyzed resource+-- specifications.+--+-- The value ranges from @0@ - @4@, with @0@ meaning that the recommended+-- resource is predicted to always provide enough hardware capability. The+-- higher the performance risk is, the more likely you should validate+-- whether the recommendation will meet the performance requirements of+-- your workload before migrating your resource.+autoScalingGroupRecommendationOption_performanceRisk :: Lens.Lens' AutoScalingGroupRecommendationOption (Prelude.Maybe Prelude.Double)+autoScalingGroupRecommendationOption_performanceRisk = Lens.lens (\AutoScalingGroupRecommendationOption' {performanceRisk} -> performanceRisk) (\s@AutoScalingGroupRecommendationOption' {} a -> s {performanceRisk = a} :: AutoScalingGroupRecommendationOption)++-- | An array of objects that describe the projected utilization metrics of+-- the Auto Scaling group recommendation option.+--+-- The @Cpu@ and @Memory@ metrics are the only projected utilization+-- metrics returned. Additionally, the @Memory@ metric is returned only for+-- resources that have the unified CloudWatch agent installed on them. For+-- more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+autoScalingGroupRecommendationOption_projectedUtilizationMetrics :: Lens.Lens' AutoScalingGroupRecommendationOption (Prelude.Maybe [UtilizationMetric])+autoScalingGroupRecommendationOption_projectedUtilizationMetrics = Lens.lens (\AutoScalingGroupRecommendationOption' {projectedUtilizationMetrics} -> projectedUtilizationMetrics) (\s@AutoScalingGroupRecommendationOption' {} a -> s {projectedUtilizationMetrics = a} :: AutoScalingGroupRecommendationOption) Prelude.. Lens.mapping Lens.coerced++-- | The rank of the Auto Scaling group recommendation option.+--+-- The top recommendation option is ranked as @1@.+autoScalingGroupRecommendationOption_rank :: Lens.Lens' AutoScalingGroupRecommendationOption (Prelude.Maybe Prelude.Int)+autoScalingGroupRecommendationOption_rank = Lens.lens (\AutoScalingGroupRecommendationOption' {rank} -> rank) (\s@AutoScalingGroupRecommendationOption' {} a -> s {rank = a} :: AutoScalingGroupRecommendationOption)++-- | An object that describes the savings opportunity for the Auto Scaling+-- group recommendation option. Savings opportunity includes the estimated+-- monthly savings amount and percentage.+autoScalingGroupRecommendationOption_savingsOpportunity :: Lens.Lens' AutoScalingGroupRecommendationOption (Prelude.Maybe SavingsOpportunity)+autoScalingGroupRecommendationOption_savingsOpportunity = Lens.lens (\AutoScalingGroupRecommendationOption' {savingsOpportunity} -> savingsOpportunity) (\s@AutoScalingGroupRecommendationOption' {} a -> s {savingsOpportunity = a} :: AutoScalingGroupRecommendationOption)++instance+  Data.FromJSON+    AutoScalingGroupRecommendationOption+  where+  parseJSON =+    Data.withObject+      "AutoScalingGroupRecommendationOption"+      ( \x ->+          AutoScalingGroupRecommendationOption'+            Prelude.<$> (x Data..:? "configuration")+            Prelude.<*> (x Data..:? "migrationEffort")+            Prelude.<*> (x Data..:? "performanceRisk")+            Prelude.<*> ( x+                            Data..:? "projectedUtilizationMetrics"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "rank")+            Prelude.<*> (x Data..:? "savingsOpportunity")+      )++instance+  Prelude.Hashable+    AutoScalingGroupRecommendationOption+  where+  hashWithSalt+    _salt+    AutoScalingGroupRecommendationOption' {..} =+      _salt+        `Prelude.hashWithSalt` configuration+        `Prelude.hashWithSalt` migrationEffort+        `Prelude.hashWithSalt` performanceRisk+        `Prelude.hashWithSalt` projectedUtilizationMetrics+        `Prelude.hashWithSalt` rank+        `Prelude.hashWithSalt` savingsOpportunity++instance+  Prelude.NFData+    AutoScalingGroupRecommendationOption+  where+  rnf AutoScalingGroupRecommendationOption' {..} =+    Prelude.rnf configuration+      `Prelude.seq` Prelude.rnf migrationEffort+      `Prelude.seq` Prelude.rnf performanceRisk+      `Prelude.seq` Prelude.rnf projectedUtilizationMetrics+      `Prelude.seq` Prelude.rnf rank+      `Prelude.seq` Prelude.rnf savingsOpportunity
+ gen/Amazonka/ComputeOptimizer/Types/ContainerConfiguration.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.ComputeOptimizer.Types.ContainerConfiguration+-- 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.ComputeOptimizer.Types.ContainerConfiguration where++import Amazonka.ComputeOptimizer.Types.MemorySizeConfiguration+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the container configurations within the tasks of your Amazon+-- ECS service.+--+-- /See:/ 'newContainerConfiguration' smart constructor.+data ContainerConfiguration = ContainerConfiguration'+  { -- | The name of the container.+    containerName :: Prelude.Maybe Prelude.Text,+    -- | The number of CPU units reserved for the container.+    cpu :: Prelude.Maybe Prelude.Int,+    -- | The memory size configurations for the container.+    memorySizeConfiguration :: Prelude.Maybe MemorySizeConfiguration+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ContainerConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'containerName', 'containerConfiguration_containerName' - The name of the container.+--+-- 'cpu', 'containerConfiguration_cpu' - The number of CPU units reserved for the container.+--+-- 'memorySizeConfiguration', 'containerConfiguration_memorySizeConfiguration' - The memory size configurations for the container.+newContainerConfiguration ::+  ContainerConfiguration+newContainerConfiguration =+  ContainerConfiguration'+    { containerName =+        Prelude.Nothing,+      cpu = Prelude.Nothing,+      memorySizeConfiguration = Prelude.Nothing+    }++-- | The name of the container.+containerConfiguration_containerName :: Lens.Lens' ContainerConfiguration (Prelude.Maybe Prelude.Text)+containerConfiguration_containerName = Lens.lens (\ContainerConfiguration' {containerName} -> containerName) (\s@ContainerConfiguration' {} a -> s {containerName = a} :: ContainerConfiguration)++-- | The number of CPU units reserved for the container.+containerConfiguration_cpu :: Lens.Lens' ContainerConfiguration (Prelude.Maybe Prelude.Int)+containerConfiguration_cpu = Lens.lens (\ContainerConfiguration' {cpu} -> cpu) (\s@ContainerConfiguration' {} a -> s {cpu = a} :: ContainerConfiguration)++-- | The memory size configurations for the container.+containerConfiguration_memorySizeConfiguration :: Lens.Lens' ContainerConfiguration (Prelude.Maybe MemorySizeConfiguration)+containerConfiguration_memorySizeConfiguration = Lens.lens (\ContainerConfiguration' {memorySizeConfiguration} -> memorySizeConfiguration) (\s@ContainerConfiguration' {} a -> s {memorySizeConfiguration = a} :: ContainerConfiguration)++instance Data.FromJSON ContainerConfiguration where+  parseJSON =+    Data.withObject+      "ContainerConfiguration"+      ( \x ->+          ContainerConfiguration'+            Prelude.<$> (x Data..:? "containerName")+            Prelude.<*> (x Data..:? "cpu")+            Prelude.<*> (x Data..:? "memorySizeConfiguration")+      )++instance Prelude.Hashable ContainerConfiguration where+  hashWithSalt _salt ContainerConfiguration' {..} =+    _salt+      `Prelude.hashWithSalt` containerName+      `Prelude.hashWithSalt` cpu+      `Prelude.hashWithSalt` memorySizeConfiguration++instance Prelude.NFData ContainerConfiguration where+  rnf ContainerConfiguration' {..} =+    Prelude.rnf containerName+      `Prelude.seq` Prelude.rnf cpu+      `Prelude.seq` Prelude.rnf memorySizeConfiguration
+ gen/Amazonka/ComputeOptimizer/Types/ContainerRecommendation.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.ComputeOptimizer.Types.ContainerRecommendation+-- 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.ComputeOptimizer.Types.ContainerRecommendation where++import Amazonka.ComputeOptimizer.Types.MemorySizeConfiguration+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 CPU and memory recommendations for a container within the tasks of+-- your Amazon ECS service.+--+-- /See:/ 'newContainerRecommendation' smart constructor.+data ContainerRecommendation = ContainerRecommendation'+  { -- | The name of the container.+    containerName :: Prelude.Maybe Prelude.Text,+    -- | The recommended number of CPU units reserved for the container.+    cpu :: Prelude.Maybe Prelude.Int,+    -- | The recommended memory size configurations for the container.+    memorySizeConfiguration :: Prelude.Maybe MemorySizeConfiguration+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ContainerRecommendation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'containerName', 'containerRecommendation_containerName' - The name of the container.+--+-- 'cpu', 'containerRecommendation_cpu' - The recommended number of CPU units reserved for the container.+--+-- 'memorySizeConfiguration', 'containerRecommendation_memorySizeConfiguration' - The recommended memory size configurations for the container.+newContainerRecommendation ::+  ContainerRecommendation+newContainerRecommendation =+  ContainerRecommendation'+    { containerName =+        Prelude.Nothing,+      cpu = Prelude.Nothing,+      memorySizeConfiguration = Prelude.Nothing+    }++-- | The name of the container.+containerRecommendation_containerName :: Lens.Lens' ContainerRecommendation (Prelude.Maybe Prelude.Text)+containerRecommendation_containerName = Lens.lens (\ContainerRecommendation' {containerName} -> containerName) (\s@ContainerRecommendation' {} a -> s {containerName = a} :: ContainerRecommendation)++-- | The recommended number of CPU units reserved for the container.+containerRecommendation_cpu :: Lens.Lens' ContainerRecommendation (Prelude.Maybe Prelude.Int)+containerRecommendation_cpu = Lens.lens (\ContainerRecommendation' {cpu} -> cpu) (\s@ContainerRecommendation' {} a -> s {cpu = a} :: ContainerRecommendation)++-- | The recommended memory size configurations for the container.+containerRecommendation_memorySizeConfiguration :: Lens.Lens' ContainerRecommendation (Prelude.Maybe MemorySizeConfiguration)+containerRecommendation_memorySizeConfiguration = Lens.lens (\ContainerRecommendation' {memorySizeConfiguration} -> memorySizeConfiguration) (\s@ContainerRecommendation' {} a -> s {memorySizeConfiguration = a} :: ContainerRecommendation)++instance Data.FromJSON ContainerRecommendation where+  parseJSON =+    Data.withObject+      "ContainerRecommendation"+      ( \x ->+          ContainerRecommendation'+            Prelude.<$> (x Data..:? "containerName")+            Prelude.<*> (x Data..:? "cpu")+            Prelude.<*> (x Data..:? "memorySizeConfiguration")+      )++instance Prelude.Hashable ContainerRecommendation where+  hashWithSalt _salt ContainerRecommendation' {..} =+    _salt+      `Prelude.hashWithSalt` containerName+      `Prelude.hashWithSalt` cpu+      `Prelude.hashWithSalt` memorySizeConfiguration++instance Prelude.NFData ContainerRecommendation where+  rnf ContainerRecommendation' {..} =+    Prelude.rnf containerName+      `Prelude.seq` Prelude.rnf cpu+      `Prelude.seq` Prelude.rnf memorySizeConfiguration
+ gen/Amazonka/ComputeOptimizer/Types/CpuVendorArchitecture.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.CpuVendorArchitecture+-- 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.ComputeOptimizer.Types.CpuVendorArchitecture+  ( CpuVendorArchitecture+      ( ..,+        CpuVendorArchitecture_AWS_ARM64,+        CpuVendorArchitecture_CURRENT+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype CpuVendorArchitecture = CpuVendorArchitecture'+  { fromCpuVendorArchitecture ::+      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 CpuVendorArchitecture_AWS_ARM64 :: CpuVendorArchitecture+pattern CpuVendorArchitecture_AWS_ARM64 = CpuVendorArchitecture' "AWS_ARM64"++pattern CpuVendorArchitecture_CURRENT :: CpuVendorArchitecture+pattern CpuVendorArchitecture_CURRENT = CpuVendorArchitecture' "CURRENT"++{-# COMPLETE+  CpuVendorArchitecture_AWS_ARM64,+  CpuVendorArchitecture_CURRENT,+  CpuVendorArchitecture'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/Currency.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.Currency+-- 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.ComputeOptimizer.Types.Currency+  ( Currency+      ( ..,+        Currency_CNY,+        Currency_USD+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Currency = Currency'+  { fromCurrency ::+      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 Currency_CNY :: Currency+pattern Currency_CNY = Currency' "CNY"++pattern Currency_USD :: Currency+pattern Currency_USD = Currency' "USD"++{-# COMPLETE+  Currency_CNY,+  Currency_USD,+  Currency'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/CurrentPerformanceRisk.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.ComputeOptimizer.Types.CurrentPerformanceRisk+-- 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.ComputeOptimizer.Types.CurrentPerformanceRisk+  ( CurrentPerformanceRisk+      ( ..,+        CurrentPerformanceRisk_High,+        CurrentPerformanceRisk_Low,+        CurrentPerformanceRisk_Medium,+        CurrentPerformanceRisk_VeryLow+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype CurrentPerformanceRisk = CurrentPerformanceRisk'+  { fromCurrentPerformanceRisk ::+      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 CurrentPerformanceRisk_High :: CurrentPerformanceRisk+pattern CurrentPerformanceRisk_High = CurrentPerformanceRisk' "High"++pattern CurrentPerformanceRisk_Low :: CurrentPerformanceRisk+pattern CurrentPerformanceRisk_Low = CurrentPerformanceRisk' "Low"++pattern CurrentPerformanceRisk_Medium :: CurrentPerformanceRisk+pattern CurrentPerformanceRisk_Medium = CurrentPerformanceRisk' "Medium"++pattern CurrentPerformanceRisk_VeryLow :: CurrentPerformanceRisk+pattern CurrentPerformanceRisk_VeryLow = CurrentPerformanceRisk' "VeryLow"++{-# COMPLETE+  CurrentPerformanceRisk_High,+  CurrentPerformanceRisk_Low,+  CurrentPerformanceRisk_Medium,+  CurrentPerformanceRisk_VeryLow,+  CurrentPerformanceRisk'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/CurrentPerformanceRiskRatings.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.ComputeOptimizer.Types.CurrentPerformanceRiskRatings+-- 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.ComputeOptimizer.Types.CurrentPerformanceRiskRatings where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the performance risk ratings for a given resource type.+--+-- Resources with a @high@ or @medium@ rating are at risk of not meeting+-- the performance needs of their workloads, while resources with a @low@+-- rating are performing well in their workloads.+--+-- /See:/ 'newCurrentPerformanceRiskRatings' smart constructor.+data CurrentPerformanceRiskRatings = CurrentPerformanceRiskRatings'+  { -- | A count of the applicable resource types with a high performance risk+    -- rating.+    high :: Prelude.Maybe Prelude.Integer,+    -- | A count of the applicable resource types with a low performance risk+    -- rating.+    low :: Prelude.Maybe Prelude.Integer,+    -- | A count of the applicable resource types with a medium performance risk+    -- rating.+    medium :: Prelude.Maybe Prelude.Integer,+    -- | A count of the applicable resource types with a very low performance+    -- risk rating.+    veryLow :: Prelude.Maybe Prelude.Integer+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CurrentPerformanceRiskRatings' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'high', 'currentPerformanceRiskRatings_high' - A count of the applicable resource types with a high performance risk+-- rating.+--+-- 'low', 'currentPerformanceRiskRatings_low' - A count of the applicable resource types with a low performance risk+-- rating.+--+-- 'medium', 'currentPerformanceRiskRatings_medium' - A count of the applicable resource types with a medium performance risk+-- rating.+--+-- 'veryLow', 'currentPerformanceRiskRatings_veryLow' - A count of the applicable resource types with a very low performance+-- risk rating.+newCurrentPerformanceRiskRatings ::+  CurrentPerformanceRiskRatings+newCurrentPerformanceRiskRatings =+  CurrentPerformanceRiskRatings'+    { high =+        Prelude.Nothing,+      low = Prelude.Nothing,+      medium = Prelude.Nothing,+      veryLow = Prelude.Nothing+    }++-- | A count of the applicable resource types with a high performance risk+-- rating.+currentPerformanceRiskRatings_high :: Lens.Lens' CurrentPerformanceRiskRatings (Prelude.Maybe Prelude.Integer)+currentPerformanceRiskRatings_high = Lens.lens (\CurrentPerformanceRiskRatings' {high} -> high) (\s@CurrentPerformanceRiskRatings' {} a -> s {high = a} :: CurrentPerformanceRiskRatings)++-- | A count of the applicable resource types with a low performance risk+-- rating.+currentPerformanceRiskRatings_low :: Lens.Lens' CurrentPerformanceRiskRatings (Prelude.Maybe Prelude.Integer)+currentPerformanceRiskRatings_low = Lens.lens (\CurrentPerformanceRiskRatings' {low} -> low) (\s@CurrentPerformanceRiskRatings' {} a -> s {low = a} :: CurrentPerformanceRiskRatings)++-- | A count of the applicable resource types with a medium performance risk+-- rating.+currentPerformanceRiskRatings_medium :: Lens.Lens' CurrentPerformanceRiskRatings (Prelude.Maybe Prelude.Integer)+currentPerformanceRiskRatings_medium = Lens.lens (\CurrentPerformanceRiskRatings' {medium} -> medium) (\s@CurrentPerformanceRiskRatings' {} a -> s {medium = a} :: CurrentPerformanceRiskRatings)++-- | A count of the applicable resource types with a very low performance+-- risk rating.+currentPerformanceRiskRatings_veryLow :: Lens.Lens' CurrentPerformanceRiskRatings (Prelude.Maybe Prelude.Integer)+currentPerformanceRiskRatings_veryLow = Lens.lens (\CurrentPerformanceRiskRatings' {veryLow} -> veryLow) (\s@CurrentPerformanceRiskRatings' {} a -> s {veryLow = a} :: CurrentPerformanceRiskRatings)++instance Data.FromJSON CurrentPerformanceRiskRatings where+  parseJSON =+    Data.withObject+      "CurrentPerformanceRiskRatings"+      ( \x ->+          CurrentPerformanceRiskRatings'+            Prelude.<$> (x Data..:? "high")+            Prelude.<*> (x Data..:? "low")+            Prelude.<*> (x Data..:? "medium")+            Prelude.<*> (x Data..:? "veryLow")+      )++instance+  Prelude.Hashable+    CurrentPerformanceRiskRatings+  where+  hashWithSalt _salt CurrentPerformanceRiskRatings' {..} =+    _salt+      `Prelude.hashWithSalt` high+      `Prelude.hashWithSalt` low+      `Prelude.hashWithSalt` medium+      `Prelude.hashWithSalt` veryLow++instance Prelude.NFData CurrentPerformanceRiskRatings where+  rnf CurrentPerformanceRiskRatings' {..} =+    Prelude.rnf high+      `Prelude.seq` Prelude.rnf low+      `Prelude.seq` Prelude.rnf medium+      `Prelude.seq` Prelude.rnf veryLow
+ gen/Amazonka/ComputeOptimizer/Types/EBSFilter.hs view
@@ -0,0 +1,106 @@+{-# 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.ComputeOptimizer.Types.EBSFilter+-- 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.ComputeOptimizer.Types.EBSFilter where++import Amazonka.ComputeOptimizer.Types.EBSFilterName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a filter that returns a more specific list of Amazon Elastic+-- Block Store (Amazon EBS) volume recommendations. Use this filter with+-- the GetEBSVolumeRecommendations action.+--+-- You can use @LambdaFunctionRecommendationFilter@ with the+-- GetLambdaFunctionRecommendations action, @JobFilter@ with the+-- DescribeRecommendationExportJobs action, and @Filter@ with the+-- GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations+-- actions.+--+-- /See:/ 'newEBSFilter' smart constructor.+data EBSFilter = EBSFilter'+  { -- | The name of the filter.+    --+    -- Specify @Finding@ to return recommendations with a specific finding+    -- classification (for example, @NotOptimized@).+    name :: Prelude.Maybe EBSFilterName,+    -- | The value of the filter.+    --+    -- The valid values are @Optimized@, or @NotOptimized@.+    values :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EBSFilter' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'eBSFilter_name' - The name of the filter.+--+-- Specify @Finding@ to return recommendations with a specific finding+-- classification (for example, @NotOptimized@).+--+-- 'values', 'eBSFilter_values' - The value of the filter.+--+-- The valid values are @Optimized@, or @NotOptimized@.+newEBSFilter ::+  EBSFilter+newEBSFilter =+  EBSFilter'+    { name = Prelude.Nothing,+      values = Prelude.Nothing+    }++-- | The name of the filter.+--+-- Specify @Finding@ to return recommendations with a specific finding+-- classification (for example, @NotOptimized@).+eBSFilter_name :: Lens.Lens' EBSFilter (Prelude.Maybe EBSFilterName)+eBSFilter_name = Lens.lens (\EBSFilter' {name} -> name) (\s@EBSFilter' {} a -> s {name = a} :: EBSFilter)++-- | The value of the filter.+--+-- The valid values are @Optimized@, or @NotOptimized@.+eBSFilter_values :: Lens.Lens' EBSFilter (Prelude.Maybe [Prelude.Text])+eBSFilter_values = Lens.lens (\EBSFilter' {values} -> values) (\s@EBSFilter' {} a -> s {values = a} :: EBSFilter) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable EBSFilter where+  hashWithSalt _salt EBSFilter' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` values++instance Prelude.NFData EBSFilter where+  rnf EBSFilter' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON EBSFilter where+  toJSON EBSFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("name" Data..=) Prelude.<$> name,+            ("values" Data..=) Prelude.<$> values+          ]+      )
+ gen/Amazonka/ComputeOptimizer/Types/EBSFilterName.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.ComputeOptimizer.Types.EBSFilterName+-- 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.ComputeOptimizer.Types.EBSFilterName+  ( EBSFilterName+      ( ..,+        EBSFilterName_Finding+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EBSFilterName = EBSFilterName'+  { fromEBSFilterName ::+      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 EBSFilterName_Finding :: EBSFilterName+pattern EBSFilterName_Finding = EBSFilterName' "Finding"++{-# COMPLETE+  EBSFilterName_Finding,+  EBSFilterName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/EBSFinding.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.EBSFinding+-- 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.ComputeOptimizer.Types.EBSFinding+  ( EBSFinding+      ( ..,+        EBSFinding_NotOptimized,+        EBSFinding_Optimized+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EBSFinding = EBSFinding'+  { fromEBSFinding ::+      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 EBSFinding_NotOptimized :: EBSFinding+pattern EBSFinding_NotOptimized = EBSFinding' "NotOptimized"++pattern EBSFinding_Optimized :: EBSFinding+pattern EBSFinding_Optimized = EBSFinding' "Optimized"++{-# COMPLETE+  EBSFinding_NotOptimized,+  EBSFinding_Optimized,+  EBSFinding'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/EBSMetricName.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.ComputeOptimizer.Types.EBSMetricName+-- 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.ComputeOptimizer.Types.EBSMetricName+  ( EBSMetricName+      ( ..,+        EBSMetricName_VolumeReadBytesPerSecond,+        EBSMetricName_VolumeReadOpsPerSecond,+        EBSMetricName_VolumeWriteBytesPerSecond,+        EBSMetricName_VolumeWriteOpsPerSecond+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EBSMetricName = EBSMetricName'+  { fromEBSMetricName ::+      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 EBSMetricName_VolumeReadBytesPerSecond :: EBSMetricName+pattern EBSMetricName_VolumeReadBytesPerSecond = EBSMetricName' "VolumeReadBytesPerSecond"++pattern EBSMetricName_VolumeReadOpsPerSecond :: EBSMetricName+pattern EBSMetricName_VolumeReadOpsPerSecond = EBSMetricName' "VolumeReadOpsPerSecond"++pattern EBSMetricName_VolumeWriteBytesPerSecond :: EBSMetricName+pattern EBSMetricName_VolumeWriteBytesPerSecond = EBSMetricName' "VolumeWriteBytesPerSecond"++pattern EBSMetricName_VolumeWriteOpsPerSecond :: EBSMetricName+pattern EBSMetricName_VolumeWriteOpsPerSecond = EBSMetricName' "VolumeWriteOpsPerSecond"++{-# COMPLETE+  EBSMetricName_VolumeReadBytesPerSecond,+  EBSMetricName_VolumeReadOpsPerSecond,+  EBSMetricName_VolumeWriteBytesPerSecond,+  EBSMetricName_VolumeWriteOpsPerSecond,+  EBSMetricName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/EBSUtilizationMetric.hs view
@@ -0,0 +1,208 @@+{-# 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.ComputeOptimizer.Types.EBSUtilizationMetric+-- 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.ComputeOptimizer.Types.EBSUtilizationMetric where++import Amazonka.ComputeOptimizer.Types.EBSMetricName+import Amazonka.ComputeOptimizer.Types.MetricStatistic+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a utilization metric of an Amazon Elastic Block Store (Amazon+-- EBS) volume.+--+-- Compare the utilization metric data of your resource against its+-- projected utilization metric data to determine the performance+-- difference between your current resource and the recommended option.+--+-- /See:/ 'newEBSUtilizationMetric' smart constructor.+data EBSUtilizationMetric = EBSUtilizationMetric'+  { -- | The name of the utilization metric.+    --+    -- The following utilization metrics are available:+    --+    -- -   @VolumeReadOpsPerSecond@ - The completed read operations per second+    --     from the volume in a specified period of time.+    --+    --     Unit: Count+    --+    -- -   @VolumeWriteOpsPerSecond@ - The completed write operations per+    --     second to the volume in a specified period of time.+    --+    --     Unit: Count+    --+    -- -   @VolumeReadBytesPerSecond@ - The bytes read per second from the+    --     volume in a specified period of time.+    --+    --     Unit: Bytes+    --+    -- -   @VolumeWriteBytesPerSecond@ - The bytes written to the volume in a+    --     specified period of time.+    --+    --     Unit: Bytes+    name :: Prelude.Maybe EBSMetricName,+    -- | The statistic of the utilization metric.+    --+    -- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+    -- utilization metrics using only the @Maximum@ statistic, which is the+    -- highest value observed during the specified period.+    --+    -- The Compute Optimizer console displays graphs for some utilization+    -- metrics using the @Average@ statistic, which is the value of @Sum@ \/+    -- @SampleCount@ during the specified period. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+    -- in the /Compute Optimizer User Guide/. You can also get averaged+    -- utilization metric data for your resources using Amazon CloudWatch. For+    -- more information, see the+    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+    statistic :: Prelude.Maybe MetricStatistic,+    -- | The value of the utilization metric.+    value :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EBSUtilizationMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'eBSUtilizationMetric_name' - The name of the utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @VolumeReadOpsPerSecond@ - The completed read operations per second+--     from the volume in a specified period of time.+--+--     Unit: Count+--+-- -   @VolumeWriteOpsPerSecond@ - The completed write operations per+--     second to the volume in a specified period of time.+--+--     Unit: Count+--+-- -   @VolumeReadBytesPerSecond@ - The bytes read per second from the+--     volume in a specified period of time.+--+--     Unit: Bytes+--+-- -   @VolumeWriteBytesPerSecond@ - The bytes written to the volume in a+--     specified period of time.+--+--     Unit: Bytes+--+-- 'statistic', 'eBSUtilizationMetric_statistic' - The statistic of the utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+--+-- 'value', 'eBSUtilizationMetric_value' - The value of the utilization metric.+newEBSUtilizationMetric ::+  EBSUtilizationMetric+newEBSUtilizationMetric =+  EBSUtilizationMetric'+    { name = Prelude.Nothing,+      statistic = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The name of the utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @VolumeReadOpsPerSecond@ - The completed read operations per second+--     from the volume in a specified period of time.+--+--     Unit: Count+--+-- -   @VolumeWriteOpsPerSecond@ - The completed write operations per+--     second to the volume in a specified period of time.+--+--     Unit: Count+--+-- -   @VolumeReadBytesPerSecond@ - The bytes read per second from the+--     volume in a specified period of time.+--+--     Unit: Bytes+--+-- -   @VolumeWriteBytesPerSecond@ - The bytes written to the volume in a+--     specified period of time.+--+--     Unit: Bytes+eBSUtilizationMetric_name :: Lens.Lens' EBSUtilizationMetric (Prelude.Maybe EBSMetricName)+eBSUtilizationMetric_name = Lens.lens (\EBSUtilizationMetric' {name} -> name) (\s@EBSUtilizationMetric' {} a -> s {name = a} :: EBSUtilizationMetric)++-- | The statistic of the utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+eBSUtilizationMetric_statistic :: Lens.Lens' EBSUtilizationMetric (Prelude.Maybe MetricStatistic)+eBSUtilizationMetric_statistic = Lens.lens (\EBSUtilizationMetric' {statistic} -> statistic) (\s@EBSUtilizationMetric' {} a -> s {statistic = a} :: EBSUtilizationMetric)++-- | The value of the utilization metric.+eBSUtilizationMetric_value :: Lens.Lens' EBSUtilizationMetric (Prelude.Maybe Prelude.Double)+eBSUtilizationMetric_value = Lens.lens (\EBSUtilizationMetric' {value} -> value) (\s@EBSUtilizationMetric' {} a -> s {value = a} :: EBSUtilizationMetric)++instance Data.FromJSON EBSUtilizationMetric where+  parseJSON =+    Data.withObject+      "EBSUtilizationMetric"+      ( \x ->+          EBSUtilizationMetric'+            Prelude.<$> (x Data..:? "name")+            Prelude.<*> (x Data..:? "statistic")+            Prelude.<*> (x Data..:? "value")+      )++instance Prelude.Hashable EBSUtilizationMetric where+  hashWithSalt _salt EBSUtilizationMetric' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` statistic+      `Prelude.hashWithSalt` value++instance Prelude.NFData EBSUtilizationMetric where+  rnf EBSUtilizationMetric' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf statistic+      `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceLaunchType.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.ECSServiceLaunchType+-- 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.ComputeOptimizer.Types.ECSServiceLaunchType+  ( ECSServiceLaunchType+      ( ..,+        ECSServiceLaunchType_EC2,+        ECSServiceLaunchType_Fargate+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ECSServiceLaunchType = ECSServiceLaunchType'+  { fromECSServiceLaunchType ::+      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 ECSServiceLaunchType_EC2 :: ECSServiceLaunchType+pattern ECSServiceLaunchType_EC2 = ECSServiceLaunchType' "EC2"++pattern ECSServiceLaunchType_Fargate :: ECSServiceLaunchType+pattern ECSServiceLaunchType_Fargate = ECSServiceLaunchType' "Fargate"++{-# COMPLETE+  ECSServiceLaunchType_EC2,+  ECSServiceLaunchType_Fargate,+  ECSServiceLaunchType'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceMetricName.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.ECSServiceMetricName+-- 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.ComputeOptimizer.Types.ECSServiceMetricName+  ( ECSServiceMetricName+      ( ..,+        ECSServiceMetricName_Cpu,+        ECSServiceMetricName_Memory+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ECSServiceMetricName = ECSServiceMetricName'+  { fromECSServiceMetricName ::+      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 ECSServiceMetricName_Cpu :: ECSServiceMetricName+pattern ECSServiceMetricName_Cpu = ECSServiceMetricName' "Cpu"++pattern ECSServiceMetricName_Memory :: ECSServiceMetricName+pattern ECSServiceMetricName_Memory = ECSServiceMetricName' "Memory"++{-# COMPLETE+  ECSServiceMetricName_Cpu,+  ECSServiceMetricName_Memory,+  ECSServiceMetricName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceMetricStatistic.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.ECSServiceMetricStatistic+-- 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.ComputeOptimizer.Types.ECSServiceMetricStatistic+  ( ECSServiceMetricStatistic+      ( ..,+        ECSServiceMetricStatistic_Average,+        ECSServiceMetricStatistic_Maximum+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ECSServiceMetricStatistic = ECSServiceMetricStatistic'+  { fromECSServiceMetricStatistic ::+      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 ECSServiceMetricStatistic_Average :: ECSServiceMetricStatistic+pattern ECSServiceMetricStatistic_Average = ECSServiceMetricStatistic' "Average"++pattern ECSServiceMetricStatistic_Maximum :: ECSServiceMetricStatistic+pattern ECSServiceMetricStatistic_Maximum = ECSServiceMetricStatistic' "Maximum"++{-# COMPLETE+  ECSServiceMetricStatistic_Average,+  ECSServiceMetricStatistic_Maximum,+  ECSServiceMetricStatistic'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceProjectedMetric.hs view
@@ -0,0 +1,145 @@+{-# 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.ComputeOptimizer.Types.ECSServiceProjectedMetric+-- 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.ComputeOptimizer.Types.ECSServiceProjectedMetric where++import Amazonka.ComputeOptimizer.Types.ECSServiceMetricName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the projected metrics of an Amazon ECS service recommendation+-- option.+--+-- To determine the performance difference between your current ECS service+-- and the recommended option, compare the metric data of your service+-- against its projected metric data.+--+-- /See:/ 'newECSServiceProjectedMetric' smart constructor.+data ECSServiceProjectedMetric = ECSServiceProjectedMetric'+  { -- | The lower bound values for the projected metric.+    lowerBoundValues :: Prelude.Maybe [Prelude.Double],+    -- | The name of the projected metric.+    --+    -- The following metrics are available:+    --+    -- -   @CPU@ — The percentage of allocated compute units that are currently+    --     in use on the ECS service tasks.+    --+    -- -   @Memory@ — The percentage of memory that is currently in use on the+    --     ECS service tasks.+    name :: Prelude.Maybe ECSServiceMetricName,+    -- | The timestamps of the projected metric.+    timestamps :: Prelude.Maybe [Data.POSIX],+    -- | The upper bound values for the projected metric.+    upperBoundValues :: Prelude.Maybe [Prelude.Double]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ECSServiceProjectedMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'lowerBoundValues', 'eCSServiceProjectedMetric_lowerBoundValues' - The lower bound values for the projected metric.+--+-- 'name', 'eCSServiceProjectedMetric_name' - The name of the projected metric.+--+-- The following metrics are available:+--+-- -   @CPU@ — The percentage of allocated compute units that are currently+--     in use on the ECS service tasks.+--+-- -   @Memory@ — The percentage of memory that is currently in use on the+--     ECS service tasks.+--+-- 'timestamps', 'eCSServiceProjectedMetric_timestamps' - The timestamps of the projected metric.+--+-- 'upperBoundValues', 'eCSServiceProjectedMetric_upperBoundValues' - The upper bound values for the projected metric.+newECSServiceProjectedMetric ::+  ECSServiceProjectedMetric+newECSServiceProjectedMetric =+  ECSServiceProjectedMetric'+    { lowerBoundValues =+        Prelude.Nothing,+      name = Prelude.Nothing,+      timestamps = Prelude.Nothing,+      upperBoundValues = Prelude.Nothing+    }++-- | The lower bound values for the projected metric.+eCSServiceProjectedMetric_lowerBoundValues :: Lens.Lens' ECSServiceProjectedMetric (Prelude.Maybe [Prelude.Double])+eCSServiceProjectedMetric_lowerBoundValues = Lens.lens (\ECSServiceProjectedMetric' {lowerBoundValues} -> lowerBoundValues) (\s@ECSServiceProjectedMetric' {} a -> s {lowerBoundValues = a} :: ECSServiceProjectedMetric) Prelude.. Lens.mapping Lens.coerced++-- | The name of the projected metric.+--+-- The following metrics are available:+--+-- -   @CPU@ — The percentage of allocated compute units that are currently+--     in use on the ECS service tasks.+--+-- -   @Memory@ — The percentage of memory that is currently in use on the+--     ECS service tasks.+eCSServiceProjectedMetric_name :: Lens.Lens' ECSServiceProjectedMetric (Prelude.Maybe ECSServiceMetricName)+eCSServiceProjectedMetric_name = Lens.lens (\ECSServiceProjectedMetric' {name} -> name) (\s@ECSServiceProjectedMetric' {} a -> s {name = a} :: ECSServiceProjectedMetric)++-- | The timestamps of the projected metric.+eCSServiceProjectedMetric_timestamps :: Lens.Lens' ECSServiceProjectedMetric (Prelude.Maybe [Prelude.UTCTime])+eCSServiceProjectedMetric_timestamps = Lens.lens (\ECSServiceProjectedMetric' {timestamps} -> timestamps) (\s@ECSServiceProjectedMetric' {} a -> s {timestamps = a} :: ECSServiceProjectedMetric) Prelude.. Lens.mapping Lens.coerced++-- | The upper bound values for the projected metric.+eCSServiceProjectedMetric_upperBoundValues :: Lens.Lens' ECSServiceProjectedMetric (Prelude.Maybe [Prelude.Double])+eCSServiceProjectedMetric_upperBoundValues = Lens.lens (\ECSServiceProjectedMetric' {upperBoundValues} -> upperBoundValues) (\s@ECSServiceProjectedMetric' {} a -> s {upperBoundValues = a} :: ECSServiceProjectedMetric) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON ECSServiceProjectedMetric where+  parseJSON =+    Data.withObject+      "ECSServiceProjectedMetric"+      ( \x ->+          ECSServiceProjectedMetric'+            Prelude.<$> ( x+                            Data..:? "lowerBoundValues"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "name")+            Prelude.<*> (x Data..:? "timestamps" Data..!= Prelude.mempty)+            Prelude.<*> ( x+                            Data..:? "upperBoundValues"+                            Data..!= Prelude.mempty+                        )+      )++instance Prelude.Hashable ECSServiceProjectedMetric where+  hashWithSalt _salt ECSServiceProjectedMetric' {..} =+    _salt+      `Prelude.hashWithSalt` lowerBoundValues+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` timestamps+      `Prelude.hashWithSalt` upperBoundValues++instance Prelude.NFData ECSServiceProjectedMetric where+  rnf ECSServiceProjectedMetric' {..} =+    Prelude.rnf lowerBoundValues+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf timestamps+      `Prelude.seq` Prelude.rnf upperBoundValues
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceProjectedUtilizationMetric.hs view
@@ -0,0 +1,190 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.ECSServiceProjectedUtilizationMetric+-- 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.ComputeOptimizer.Types.ECSServiceProjectedUtilizationMetric where++import Amazonka.ComputeOptimizer.Types.ECSServiceMetricName+import Amazonka.ComputeOptimizer.Types.ECSServiceMetricStatistic+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the projected utilization metrics of an Amazon ECS service+-- recommendation option.+--+-- To determine the performance difference between your current ECS service+-- and the recommended option, compare the utilization metric data of your+-- service against its projected utilization metric data.+--+-- /See:/ 'newECSServiceProjectedUtilizationMetric' smart constructor.+data ECSServiceProjectedUtilizationMetric = ECSServiceProjectedUtilizationMetric'+  { -- | The lower bound values for the projected utilization metrics.+    lowerBoundValue :: Prelude.Maybe Prelude.Double,+    -- | The name of the projected utilization metric.+    --+    -- The following utilization metrics are available:+    --+    -- -   @CPU@ — The percentage of allocated compute units that are currently+    --     in use on the ECS service tasks.+    --+    -- -   @Memory@ — The percentage of memory that is currently in use on the+    --     ECS service tasks.+    name :: Prelude.Maybe ECSServiceMetricName,+    -- | The statistic of the projected utilization metric.+    --+    -- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+    -- utilization metrics using only the @Maximum@ statistic, which is the+    -- highest value observed during the specified period.+    --+    -- The Compute Optimizer console displays graphs for some utilization+    -- metrics using the @Average@ statistic, which is the value of @Sum@ \/+    -- @SampleCount@ during the specified period. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+    -- in the /Compute Optimizer User Guide/. You can also get averaged+    -- utilization metric data for your resources using Amazon CloudWatch. For+    -- more information, see the+    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+    statistic :: Prelude.Maybe ECSServiceMetricStatistic,+    -- | The upper bound values for the projected utilization metrics.+    upperBoundValue :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ECSServiceProjectedUtilizationMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'lowerBoundValue', 'eCSServiceProjectedUtilizationMetric_lowerBoundValue' - The lower bound values for the projected utilization metrics.+--+-- 'name', 'eCSServiceProjectedUtilizationMetric_name' - The name of the projected utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @CPU@ — The percentage of allocated compute units that are currently+--     in use on the ECS service tasks.+--+-- -   @Memory@ — The percentage of memory that is currently in use on the+--     ECS service tasks.+--+-- 'statistic', 'eCSServiceProjectedUtilizationMetric_statistic' - The statistic of the projected utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+--+-- 'upperBoundValue', 'eCSServiceProjectedUtilizationMetric_upperBoundValue' - The upper bound values for the projected utilization metrics.+newECSServiceProjectedUtilizationMetric ::+  ECSServiceProjectedUtilizationMetric+newECSServiceProjectedUtilizationMetric =+  ECSServiceProjectedUtilizationMetric'+    { lowerBoundValue =+        Prelude.Nothing,+      name = Prelude.Nothing,+      statistic = Prelude.Nothing,+      upperBoundValue = Prelude.Nothing+    }++-- | The lower bound values for the projected utilization metrics.+eCSServiceProjectedUtilizationMetric_lowerBoundValue :: Lens.Lens' ECSServiceProjectedUtilizationMetric (Prelude.Maybe Prelude.Double)+eCSServiceProjectedUtilizationMetric_lowerBoundValue = Lens.lens (\ECSServiceProjectedUtilizationMetric' {lowerBoundValue} -> lowerBoundValue) (\s@ECSServiceProjectedUtilizationMetric' {} a -> s {lowerBoundValue = a} :: ECSServiceProjectedUtilizationMetric)++-- | The name of the projected utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @CPU@ — The percentage of allocated compute units that are currently+--     in use on the ECS service tasks.+--+-- -   @Memory@ — The percentage of memory that is currently in use on the+--     ECS service tasks.+eCSServiceProjectedUtilizationMetric_name :: Lens.Lens' ECSServiceProjectedUtilizationMetric (Prelude.Maybe ECSServiceMetricName)+eCSServiceProjectedUtilizationMetric_name = Lens.lens (\ECSServiceProjectedUtilizationMetric' {name} -> name) (\s@ECSServiceProjectedUtilizationMetric' {} a -> s {name = a} :: ECSServiceProjectedUtilizationMetric)++-- | The statistic of the projected utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+eCSServiceProjectedUtilizationMetric_statistic :: Lens.Lens' ECSServiceProjectedUtilizationMetric (Prelude.Maybe ECSServiceMetricStatistic)+eCSServiceProjectedUtilizationMetric_statistic = Lens.lens (\ECSServiceProjectedUtilizationMetric' {statistic} -> statistic) (\s@ECSServiceProjectedUtilizationMetric' {} a -> s {statistic = a} :: ECSServiceProjectedUtilizationMetric)++-- | The upper bound values for the projected utilization metrics.+eCSServiceProjectedUtilizationMetric_upperBoundValue :: Lens.Lens' ECSServiceProjectedUtilizationMetric (Prelude.Maybe Prelude.Double)+eCSServiceProjectedUtilizationMetric_upperBoundValue = Lens.lens (\ECSServiceProjectedUtilizationMetric' {upperBoundValue} -> upperBoundValue) (\s@ECSServiceProjectedUtilizationMetric' {} a -> s {upperBoundValue = a} :: ECSServiceProjectedUtilizationMetric)++instance+  Data.FromJSON+    ECSServiceProjectedUtilizationMetric+  where+  parseJSON =+    Data.withObject+      "ECSServiceProjectedUtilizationMetric"+      ( \x ->+          ECSServiceProjectedUtilizationMetric'+            Prelude.<$> (x Data..:? "lowerBoundValue")+            Prelude.<*> (x Data..:? "name")+            Prelude.<*> (x Data..:? "statistic")+            Prelude.<*> (x Data..:? "upperBoundValue")+      )++instance+  Prelude.Hashable+    ECSServiceProjectedUtilizationMetric+  where+  hashWithSalt+    _salt+    ECSServiceProjectedUtilizationMetric' {..} =+      _salt+        `Prelude.hashWithSalt` lowerBoundValue+        `Prelude.hashWithSalt` name+        `Prelude.hashWithSalt` statistic+        `Prelude.hashWithSalt` upperBoundValue++instance+  Prelude.NFData+    ECSServiceProjectedUtilizationMetric+  where+  rnf ECSServiceProjectedUtilizationMetric' {..} =+    Prelude.rnf lowerBoundValue+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf statistic+      `Prelude.seq` Prelude.rnf upperBoundValue
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceRecommendation.hs view
@@ -0,0 +1,356 @@+{-# 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.ComputeOptimizer.Types.ECSServiceRecommendation+-- 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.ComputeOptimizer.Types.ECSServiceRecommendation where++import Amazonka.ComputeOptimizer.Types.CurrentPerformanceRisk+import Amazonka.ComputeOptimizer.Types.ECSServiceLaunchType+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFinding+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFindingReasonCode+import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationOption+import Amazonka.ComputeOptimizer.Types.ECSServiceUtilizationMetric+import Amazonka.ComputeOptimizer.Types.ServiceConfiguration+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes an Amazon ECS service recommendation.+--+-- /See:/ 'newECSServiceRecommendation' smart constructor.+data ECSServiceRecommendation = ECSServiceRecommendation'+  { -- | The Amazon Web Services account ID of the ECS service.+    accountId :: Prelude.Maybe Prelude.Text,+    -- | The risk of the current ECS service not meeting the performance needs of+    -- its workloads. The higher the risk, the more likely the current service+    -- can\'t meet the performance requirements of its workload.+    currentPerformanceRisk :: Prelude.Maybe CurrentPerformanceRisk,+    -- | The configuration of the current ECS service.+    currentServiceConfiguration :: Prelude.Maybe ServiceConfiguration,+    -- | The finding classification of an ECS service.+    --+    -- Findings for ECS services include:+    --+    -- -   __@Underprovisioned@__ — When Compute Optimizer detects that there’s+    --     not enough memory or CPU, an ECS service is considered+    --     under-provisioned. An under-provisioned ECS service might result in+    --     poor application performance.+    --+    -- -   __@Overprovisioned@__ — When Compute Optimizer detects that there’s+    --     excessive memory or CPU, an ECS service is considered+    --     over-provisioned. An over-provisioned ECS service might result in+    --     additional infrastructure costs.+    --+    -- -   __@Optimized@__ — When both the CPU and memory of your ECS service+    --     meet the performance requirements of your workload, the service is+    --     considered optimized.+    finding :: Prelude.Maybe ECSServiceRecommendationFinding,+    -- | The reason for the finding classification of an ECS service.+    --+    -- Finding reason codes for ECS services include:+    --+    -- -   __@CPUUnderprovisioned@__ — The ECS service CPU configuration can be+    --     sized up to enhance the performance of your workload. This is+    --     identified by analyzing the @CPUUtilization@ metric of the current+    --     service during the look-back period.+    --+    -- -   __@CPUOverprovisioned@__ — The ECS service CPU configuration can be+    --     sized down while still meeting the performance requirements of your+    --     workload. This is identified by analyzing the @CPUUtilization@+    --     metric of the current service during the look-back period.+    --+    -- -   __@MemoryUnderprovisioned@__ — The ECS service memory configuration+    --     can be sized up to enhance the performance of your workload. This is+    --     identified by analyzing the @MemoryUtilization@ metric of the+    --     current service during the look-back period.+    --+    -- -   __@MemoryOverprovisioned@__ — The ECS service memory configuration+    --     can be sized down while still meeting the performance requirements+    --     of your workload. This is identified by analyzing the+    --     @MemoryUtilization@ metric of the current service during the+    --     look-back period.+    findingReasonCodes :: Prelude.Maybe [ECSServiceRecommendationFindingReasonCode],+    -- | The timestamp of when the ECS service recommendation was last generated.+    lastRefreshTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The launch type the ECS service is using.+    --+    -- Compute Optimizer only supports the Fargate launch type.+    launchType :: Prelude.Maybe ECSServiceLaunchType,+    -- | The number of days the ECS service utilization metrics were analyzed.+    lookbackPeriodInDays :: Prelude.Maybe Prelude.Double,+    -- | The Amazon Resource Name (ARN) of the current ECS service.+    --+    -- The following is the format of the ARN:+    --+    -- @arn:aws:ecs:region:aws_account_id:service\/cluster-name\/service-name@+    serviceArn :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that describe the recommendation options for the ECS+    -- service.+    serviceRecommendationOptions :: Prelude.Maybe [ECSServiceRecommendationOption],+    -- | An array of objects that describe the utilization metrics of the ECS+    -- service.+    utilizationMetrics :: Prelude.Maybe [ECSServiceUtilizationMetric]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ECSServiceRecommendation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'eCSServiceRecommendation_accountId' - The Amazon Web Services account ID of the ECS service.+--+-- 'currentPerformanceRisk', 'eCSServiceRecommendation_currentPerformanceRisk' - The risk of the current ECS service not meeting the performance needs of+-- its workloads. The higher the risk, the more likely the current service+-- can\'t meet the performance requirements of its workload.+--+-- 'currentServiceConfiguration', 'eCSServiceRecommendation_currentServiceConfiguration' - The configuration of the current ECS service.+--+-- 'finding', 'eCSServiceRecommendation_finding' - The finding classification of an ECS service.+--+-- Findings for ECS services include:+--+-- -   __@Underprovisioned@__ — When Compute Optimizer detects that there’s+--     not enough memory or CPU, an ECS service is considered+--     under-provisioned. An under-provisioned ECS service might result in+--     poor application performance.+--+-- -   __@Overprovisioned@__ — When Compute Optimizer detects that there’s+--     excessive memory or CPU, an ECS service is considered+--     over-provisioned. An over-provisioned ECS service might result in+--     additional infrastructure costs.+--+-- -   __@Optimized@__ — When both the CPU and memory of your ECS service+--     meet the performance requirements of your workload, the service is+--     considered optimized.+--+-- 'findingReasonCodes', 'eCSServiceRecommendation_findingReasonCodes' - The reason for the finding classification of an ECS service.+--+-- Finding reason codes for ECS services include:+--+-- -   __@CPUUnderprovisioned@__ — The ECS service CPU configuration can be+--     sized up to enhance the performance of your workload. This is+--     identified by analyzing the @CPUUtilization@ metric of the current+--     service during the look-back period.+--+-- -   __@CPUOverprovisioned@__ — The ECS service CPU configuration can be+--     sized down while still meeting the performance requirements of your+--     workload. This is identified by analyzing the @CPUUtilization@+--     metric of the current service during the look-back period.+--+-- -   __@MemoryUnderprovisioned@__ — The ECS service memory configuration+--     can be sized up to enhance the performance of your workload. This is+--     identified by analyzing the @MemoryUtilization@ metric of the+--     current service during the look-back period.+--+-- -   __@MemoryOverprovisioned@__ — The ECS service memory configuration+--     can be sized down while still meeting the performance requirements+--     of your workload. This is identified by analyzing the+--     @MemoryUtilization@ metric of the current service during the+--     look-back period.+--+-- 'lastRefreshTimestamp', 'eCSServiceRecommendation_lastRefreshTimestamp' - The timestamp of when the ECS service recommendation was last generated.+--+-- 'launchType', 'eCSServiceRecommendation_launchType' - The launch type the ECS service is using.+--+-- Compute Optimizer only supports the Fargate launch type.+--+-- 'lookbackPeriodInDays', 'eCSServiceRecommendation_lookbackPeriodInDays' - The number of days the ECS service utilization metrics were analyzed.+--+-- 'serviceArn', 'eCSServiceRecommendation_serviceArn' - The Amazon Resource Name (ARN) of the current ECS service.+--+-- The following is the format of the ARN:+--+-- @arn:aws:ecs:region:aws_account_id:service\/cluster-name\/service-name@+--+-- 'serviceRecommendationOptions', 'eCSServiceRecommendation_serviceRecommendationOptions' - An array of objects that describe the recommendation options for the ECS+-- service.+--+-- 'utilizationMetrics', 'eCSServiceRecommendation_utilizationMetrics' - An array of objects that describe the utilization metrics of the ECS+-- service.+newECSServiceRecommendation ::+  ECSServiceRecommendation+newECSServiceRecommendation =+  ECSServiceRecommendation'+    { accountId =+        Prelude.Nothing,+      currentPerformanceRisk = Prelude.Nothing,+      currentServiceConfiguration = Prelude.Nothing,+      finding = Prelude.Nothing,+      findingReasonCodes = Prelude.Nothing,+      lastRefreshTimestamp = Prelude.Nothing,+      launchType = Prelude.Nothing,+      lookbackPeriodInDays = Prelude.Nothing,+      serviceArn = Prelude.Nothing,+      serviceRecommendationOptions = Prelude.Nothing,+      utilizationMetrics = Prelude.Nothing+    }++-- | The Amazon Web Services account ID of the ECS service.+eCSServiceRecommendation_accountId :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe Prelude.Text)+eCSServiceRecommendation_accountId = Lens.lens (\ECSServiceRecommendation' {accountId} -> accountId) (\s@ECSServiceRecommendation' {} a -> s {accountId = a} :: ECSServiceRecommendation)++-- | The risk of the current ECS service not meeting the performance needs of+-- its workloads. The higher the risk, the more likely the current service+-- can\'t meet the performance requirements of its workload.+eCSServiceRecommendation_currentPerformanceRisk :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe CurrentPerformanceRisk)+eCSServiceRecommendation_currentPerformanceRisk = Lens.lens (\ECSServiceRecommendation' {currentPerformanceRisk} -> currentPerformanceRisk) (\s@ECSServiceRecommendation' {} a -> s {currentPerformanceRisk = a} :: ECSServiceRecommendation)++-- | The configuration of the current ECS service.+eCSServiceRecommendation_currentServiceConfiguration :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe ServiceConfiguration)+eCSServiceRecommendation_currentServiceConfiguration = Lens.lens (\ECSServiceRecommendation' {currentServiceConfiguration} -> currentServiceConfiguration) (\s@ECSServiceRecommendation' {} a -> s {currentServiceConfiguration = a} :: ECSServiceRecommendation)++-- | The finding classification of an ECS service.+--+-- Findings for ECS services include:+--+-- -   __@Underprovisioned@__ — When Compute Optimizer detects that there’s+--     not enough memory or CPU, an ECS service is considered+--     under-provisioned. An under-provisioned ECS service might result in+--     poor application performance.+--+-- -   __@Overprovisioned@__ — When Compute Optimizer detects that there’s+--     excessive memory or CPU, an ECS service is considered+--     over-provisioned. An over-provisioned ECS service might result in+--     additional infrastructure costs.+--+-- -   __@Optimized@__ — When both the CPU and memory of your ECS service+--     meet the performance requirements of your workload, the service is+--     considered optimized.+eCSServiceRecommendation_finding :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe ECSServiceRecommendationFinding)+eCSServiceRecommendation_finding = Lens.lens (\ECSServiceRecommendation' {finding} -> finding) (\s@ECSServiceRecommendation' {} a -> s {finding = a} :: ECSServiceRecommendation)++-- | The reason for the finding classification of an ECS service.+--+-- Finding reason codes for ECS services include:+--+-- -   __@CPUUnderprovisioned@__ — The ECS service CPU configuration can be+--     sized up to enhance the performance of your workload. This is+--     identified by analyzing the @CPUUtilization@ metric of the current+--     service during the look-back period.+--+-- -   __@CPUOverprovisioned@__ — The ECS service CPU configuration can be+--     sized down while still meeting the performance requirements of your+--     workload. This is identified by analyzing the @CPUUtilization@+--     metric of the current service during the look-back period.+--+-- -   __@MemoryUnderprovisioned@__ — The ECS service memory configuration+--     can be sized up to enhance the performance of your workload. This is+--     identified by analyzing the @MemoryUtilization@ metric of the+--     current service during the look-back period.+--+-- -   __@MemoryOverprovisioned@__ — The ECS service memory configuration+--     can be sized down while still meeting the performance requirements+--     of your workload. This is identified by analyzing the+--     @MemoryUtilization@ metric of the current service during the+--     look-back period.+eCSServiceRecommendation_findingReasonCodes :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe [ECSServiceRecommendationFindingReasonCode])+eCSServiceRecommendation_findingReasonCodes = Lens.lens (\ECSServiceRecommendation' {findingReasonCodes} -> findingReasonCodes) (\s@ECSServiceRecommendation' {} a -> s {findingReasonCodes = a} :: ECSServiceRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | The timestamp of when the ECS service recommendation was last generated.+eCSServiceRecommendation_lastRefreshTimestamp :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe Prelude.UTCTime)+eCSServiceRecommendation_lastRefreshTimestamp = Lens.lens (\ECSServiceRecommendation' {lastRefreshTimestamp} -> lastRefreshTimestamp) (\s@ECSServiceRecommendation' {} a -> s {lastRefreshTimestamp = a} :: ECSServiceRecommendation) Prelude.. Lens.mapping Data._Time++-- | The launch type the ECS service is using.+--+-- Compute Optimizer only supports the Fargate launch type.+eCSServiceRecommendation_launchType :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe ECSServiceLaunchType)+eCSServiceRecommendation_launchType = Lens.lens (\ECSServiceRecommendation' {launchType} -> launchType) (\s@ECSServiceRecommendation' {} a -> s {launchType = a} :: ECSServiceRecommendation)++-- | The number of days the ECS service utilization metrics were analyzed.+eCSServiceRecommendation_lookbackPeriodInDays :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe Prelude.Double)+eCSServiceRecommendation_lookbackPeriodInDays = Lens.lens (\ECSServiceRecommendation' {lookbackPeriodInDays} -> lookbackPeriodInDays) (\s@ECSServiceRecommendation' {} a -> s {lookbackPeriodInDays = a} :: ECSServiceRecommendation)++-- | The Amazon Resource Name (ARN) of the current ECS service.+--+-- The following is the format of the ARN:+--+-- @arn:aws:ecs:region:aws_account_id:service\/cluster-name\/service-name@+eCSServiceRecommendation_serviceArn :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe Prelude.Text)+eCSServiceRecommendation_serviceArn = Lens.lens (\ECSServiceRecommendation' {serviceArn} -> serviceArn) (\s@ECSServiceRecommendation' {} a -> s {serviceArn = a} :: ECSServiceRecommendation)++-- | An array of objects that describe the recommendation options for the ECS+-- service.+eCSServiceRecommendation_serviceRecommendationOptions :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe [ECSServiceRecommendationOption])+eCSServiceRecommendation_serviceRecommendationOptions = Lens.lens (\ECSServiceRecommendation' {serviceRecommendationOptions} -> serviceRecommendationOptions) (\s@ECSServiceRecommendation' {} a -> s {serviceRecommendationOptions = a} :: ECSServiceRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects that describe the utilization metrics of the ECS+-- service.+eCSServiceRecommendation_utilizationMetrics :: Lens.Lens' ECSServiceRecommendation (Prelude.Maybe [ECSServiceUtilizationMetric])+eCSServiceRecommendation_utilizationMetrics = Lens.lens (\ECSServiceRecommendation' {utilizationMetrics} -> utilizationMetrics) (\s@ECSServiceRecommendation' {} a -> s {utilizationMetrics = a} :: ECSServiceRecommendation) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON ECSServiceRecommendation where+  parseJSON =+    Data.withObject+      "ECSServiceRecommendation"+      ( \x ->+          ECSServiceRecommendation'+            Prelude.<$> (x Data..:? "accountId")+            Prelude.<*> (x Data..:? "currentPerformanceRisk")+            Prelude.<*> (x Data..:? "currentServiceConfiguration")+            Prelude.<*> (x Data..:? "finding")+            Prelude.<*> ( x+                            Data..:? "findingReasonCodes"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "lastRefreshTimestamp")+            Prelude.<*> (x Data..:? "launchType")+            Prelude.<*> (x Data..:? "lookbackPeriodInDays")+            Prelude.<*> (x Data..:? "serviceArn")+            Prelude.<*> ( x+                            Data..:? "serviceRecommendationOptions"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> ( x+                            Data..:? "utilizationMetrics"+                            Data..!= Prelude.mempty+                        )+      )++instance Prelude.Hashable ECSServiceRecommendation where+  hashWithSalt _salt ECSServiceRecommendation' {..} =+    _salt+      `Prelude.hashWithSalt` accountId+      `Prelude.hashWithSalt` currentPerformanceRisk+      `Prelude.hashWithSalt` currentServiceConfiguration+      `Prelude.hashWithSalt` finding+      `Prelude.hashWithSalt` findingReasonCodes+      `Prelude.hashWithSalt` lastRefreshTimestamp+      `Prelude.hashWithSalt` launchType+      `Prelude.hashWithSalt` lookbackPeriodInDays+      `Prelude.hashWithSalt` serviceArn+      `Prelude.hashWithSalt` serviceRecommendationOptions+      `Prelude.hashWithSalt` utilizationMetrics++instance Prelude.NFData ECSServiceRecommendation where+  rnf ECSServiceRecommendation' {..} =+    Prelude.rnf accountId+      `Prelude.seq` Prelude.rnf currentPerformanceRisk+      `Prelude.seq` Prelude.rnf currentServiceConfiguration+      `Prelude.seq` Prelude.rnf finding+      `Prelude.seq` Prelude.rnf findingReasonCodes+      `Prelude.seq` Prelude.rnf lastRefreshTimestamp+      `Prelude.seq` Prelude.rnf launchType+      `Prelude.seq` Prelude.rnf lookbackPeriodInDays+      `Prelude.seq` Prelude.rnf serviceArn+      `Prelude.seq` Prelude.rnf serviceRecommendationOptions+      `Prelude.seq` Prelude.rnf utilizationMetrics
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceRecommendationFilter.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.ComputeOptimizer.Types.ECSServiceRecommendationFilter+-- 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.ComputeOptimizer.Types.ECSServiceRecommendationFilter where++import Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFilterName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a filter that returns a more specific list of Amazon ECS+-- service recommendations. Use this filter with the+-- GetECSServiceRecommendations action.+--+-- /See:/ 'newECSServiceRecommendationFilter' smart constructor.+data ECSServiceRecommendationFilter = ECSServiceRecommendationFilter'+  { -- | The name of the filter.+    --+    -- Specify @Finding@ to return recommendations with a specific finding+    -- classification.+    --+    -- Specify @FindingReasonCode@ to return recommendations with a specific+    -- finding reason code.+    name :: Prelude.Maybe ECSServiceRecommendationFilterName,+    -- | The value of the filter.+    --+    -- The valid values for this parameter are as follows:+    --+    -- -   If you specify the @name@ parameter as @Finding@, specify+    --     @Optimized@, @NotOptimized@, or @Unavailable@.+    --+    -- -   If you specify the @name@ parameter as @FindingReasonCode@, specify+    --     @CPUUnderprovisioned@, @CPUOverprovisioned@,+    --     @MemoryUnderprovisioned@, or @MemoryOverprovisioned@.+    values :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ECSServiceRecommendationFilter' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'eCSServiceRecommendationFilter_name' - The name of the filter.+--+-- Specify @Finding@ to return recommendations with a specific finding+-- classification.+--+-- Specify @FindingReasonCode@ to return recommendations with a specific+-- finding reason code.+--+-- 'values', 'eCSServiceRecommendationFilter_values' - The value of the filter.+--+-- The valid values for this parameter are as follows:+--+-- -   If you specify the @name@ parameter as @Finding@, specify+--     @Optimized@, @NotOptimized@, or @Unavailable@.+--+-- -   If you specify the @name@ parameter as @FindingReasonCode@, specify+--     @CPUUnderprovisioned@, @CPUOverprovisioned@,+--     @MemoryUnderprovisioned@, or @MemoryOverprovisioned@.+newECSServiceRecommendationFilter ::+  ECSServiceRecommendationFilter+newECSServiceRecommendationFilter =+  ECSServiceRecommendationFilter'+    { name =+        Prelude.Nothing,+      values = Prelude.Nothing+    }++-- | The name of the filter.+--+-- Specify @Finding@ to return recommendations with a specific finding+-- classification.+--+-- Specify @FindingReasonCode@ to return recommendations with a specific+-- finding reason code.+eCSServiceRecommendationFilter_name :: Lens.Lens' ECSServiceRecommendationFilter (Prelude.Maybe ECSServiceRecommendationFilterName)+eCSServiceRecommendationFilter_name = Lens.lens (\ECSServiceRecommendationFilter' {name} -> name) (\s@ECSServiceRecommendationFilter' {} a -> s {name = a} :: ECSServiceRecommendationFilter)++-- | The value of the filter.+--+-- The valid values for this parameter are as follows:+--+-- -   If you specify the @name@ parameter as @Finding@, specify+--     @Optimized@, @NotOptimized@, or @Unavailable@.+--+-- -   If you specify the @name@ parameter as @FindingReasonCode@, specify+--     @CPUUnderprovisioned@, @CPUOverprovisioned@,+--     @MemoryUnderprovisioned@, or @MemoryOverprovisioned@.+eCSServiceRecommendationFilter_values :: Lens.Lens' ECSServiceRecommendationFilter (Prelude.Maybe [Prelude.Text])+eCSServiceRecommendationFilter_values = Lens.lens (\ECSServiceRecommendationFilter' {values} -> values) (\s@ECSServiceRecommendationFilter' {} a -> s {values = a} :: ECSServiceRecommendationFilter) Prelude.. Lens.mapping Lens.coerced++instance+  Prelude.Hashable+    ECSServiceRecommendationFilter+  where+  hashWithSalt+    _salt+    ECSServiceRecommendationFilter' {..} =+      _salt+        `Prelude.hashWithSalt` name+        `Prelude.hashWithSalt` values++instance+  Prelude.NFData+    ECSServiceRecommendationFilter+  where+  rnf ECSServiceRecommendationFilter' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON ECSServiceRecommendationFilter where+  toJSON ECSServiceRecommendationFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("name" Data..=) Prelude.<$> name,+            ("values" Data..=) Prelude.<$> values+          ]+      )
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceRecommendationFilterName.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.ECSServiceRecommendationFilterName+-- 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.ComputeOptimizer.Types.ECSServiceRecommendationFilterName+  ( ECSServiceRecommendationFilterName+      ( ..,+        ECSServiceRecommendationFilterName_Finding,+        ECSServiceRecommendationFilterName_FindingReasonCode+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ECSServiceRecommendationFilterName = ECSServiceRecommendationFilterName'+  { fromECSServiceRecommendationFilterName ::+      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 ECSServiceRecommendationFilterName_Finding :: ECSServiceRecommendationFilterName+pattern ECSServiceRecommendationFilterName_Finding = ECSServiceRecommendationFilterName' "Finding"++pattern ECSServiceRecommendationFilterName_FindingReasonCode :: ECSServiceRecommendationFilterName+pattern ECSServiceRecommendationFilterName_FindingReasonCode = ECSServiceRecommendationFilterName' "FindingReasonCode"++{-# COMPLETE+  ECSServiceRecommendationFilterName_Finding,+  ECSServiceRecommendationFilterName_FindingReasonCode,+  ECSServiceRecommendationFilterName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceRecommendationFinding.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.ComputeOptimizer.Types.ECSServiceRecommendationFinding+-- 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.ComputeOptimizer.Types.ECSServiceRecommendationFinding+  ( ECSServiceRecommendationFinding+      ( ..,+        ECSServiceRecommendationFinding_Optimized,+        ECSServiceRecommendationFinding_Overprovisioned,+        ECSServiceRecommendationFinding_Underprovisioned+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ECSServiceRecommendationFinding = ECSServiceRecommendationFinding'+  { fromECSServiceRecommendationFinding ::+      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 ECSServiceRecommendationFinding_Optimized :: ECSServiceRecommendationFinding+pattern ECSServiceRecommendationFinding_Optimized = ECSServiceRecommendationFinding' "Optimized"++pattern ECSServiceRecommendationFinding_Overprovisioned :: ECSServiceRecommendationFinding+pattern ECSServiceRecommendationFinding_Overprovisioned = ECSServiceRecommendationFinding' "Overprovisioned"++pattern ECSServiceRecommendationFinding_Underprovisioned :: ECSServiceRecommendationFinding+pattern ECSServiceRecommendationFinding_Underprovisioned = ECSServiceRecommendationFinding' "Underprovisioned"++{-# COMPLETE+  ECSServiceRecommendationFinding_Optimized,+  ECSServiceRecommendationFinding_Overprovisioned,+  ECSServiceRecommendationFinding_Underprovisioned,+  ECSServiceRecommendationFinding'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceRecommendationFindingReasonCode.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.ComputeOptimizer.Types.ECSServiceRecommendationFindingReasonCode+-- 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.ComputeOptimizer.Types.ECSServiceRecommendationFindingReasonCode+  ( ECSServiceRecommendationFindingReasonCode+      ( ..,+        ECSServiceRecommendationFindingReasonCode_CPUOverprovisioned,+        ECSServiceRecommendationFindingReasonCode_CPUUnderprovisioned,+        ECSServiceRecommendationFindingReasonCode_MemoryOverprovisioned,+        ECSServiceRecommendationFindingReasonCode_MemoryUnderprovisioned+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ECSServiceRecommendationFindingReasonCode = ECSServiceRecommendationFindingReasonCode'+  { fromECSServiceRecommendationFindingReasonCode ::+      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 ECSServiceRecommendationFindingReasonCode_CPUOverprovisioned :: ECSServiceRecommendationFindingReasonCode+pattern ECSServiceRecommendationFindingReasonCode_CPUOverprovisioned = ECSServiceRecommendationFindingReasonCode' "CPUOverprovisioned"++pattern ECSServiceRecommendationFindingReasonCode_CPUUnderprovisioned :: ECSServiceRecommendationFindingReasonCode+pattern ECSServiceRecommendationFindingReasonCode_CPUUnderprovisioned = ECSServiceRecommendationFindingReasonCode' "CPUUnderprovisioned"++pattern ECSServiceRecommendationFindingReasonCode_MemoryOverprovisioned :: ECSServiceRecommendationFindingReasonCode+pattern ECSServiceRecommendationFindingReasonCode_MemoryOverprovisioned = ECSServiceRecommendationFindingReasonCode' "MemoryOverprovisioned"++pattern ECSServiceRecommendationFindingReasonCode_MemoryUnderprovisioned :: ECSServiceRecommendationFindingReasonCode+pattern ECSServiceRecommendationFindingReasonCode_MemoryUnderprovisioned = ECSServiceRecommendationFindingReasonCode' "MemoryUnderprovisioned"++{-# COMPLETE+  ECSServiceRecommendationFindingReasonCode_CPUOverprovisioned,+  ECSServiceRecommendationFindingReasonCode_CPUUnderprovisioned,+  ECSServiceRecommendationFindingReasonCode_MemoryOverprovisioned,+  ECSServiceRecommendationFindingReasonCode_MemoryUnderprovisioned,+  ECSServiceRecommendationFindingReasonCode'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceRecommendationOption.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.ComputeOptimizer.Types.ECSServiceRecommendationOption+-- 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.ComputeOptimizer.Types.ECSServiceRecommendationOption where++import Amazonka.ComputeOptimizer.Types.ContainerRecommendation+import Amazonka.ComputeOptimizer.Types.ECSServiceProjectedUtilizationMetric+import Amazonka.ComputeOptimizer.Types.SavingsOpportunity+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the recommendation options for an Amazon ECS service.+--+-- /See:/ 'newECSServiceRecommendationOption' smart constructor.+data ECSServiceRecommendationOption = ECSServiceRecommendationOption'+  { -- | The CPU and memory size recommendations for the containers within the+    -- task of your ECS service.+    containerRecommendations :: Prelude.Maybe [ContainerRecommendation],+    -- | The CPU size of the ECS service recommendation option.+    cpu :: Prelude.Maybe Prelude.Int,+    -- | The memory size of the ECS service recommendation option.+    memory :: Prelude.Maybe Prelude.Int,+    -- | An array of objects that describe the projected utilization metrics of+    -- the ECS service recommendation option.+    projectedUtilizationMetrics :: Prelude.Maybe [ECSServiceProjectedUtilizationMetric],+    savingsOpportunity :: Prelude.Maybe SavingsOpportunity+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ECSServiceRecommendationOption' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'containerRecommendations', 'eCSServiceRecommendationOption_containerRecommendations' - The CPU and memory size recommendations for the containers within the+-- task of your ECS service.+--+-- 'cpu', 'eCSServiceRecommendationOption_cpu' - The CPU size of the ECS service recommendation option.+--+-- 'memory', 'eCSServiceRecommendationOption_memory' - The memory size of the ECS service recommendation option.+--+-- 'projectedUtilizationMetrics', 'eCSServiceRecommendationOption_projectedUtilizationMetrics' - An array of objects that describe the projected utilization metrics of+-- the ECS service recommendation option.+--+-- 'savingsOpportunity', 'eCSServiceRecommendationOption_savingsOpportunity' - Undocumented member.+newECSServiceRecommendationOption ::+  ECSServiceRecommendationOption+newECSServiceRecommendationOption =+  ECSServiceRecommendationOption'+    { containerRecommendations =+        Prelude.Nothing,+      cpu = Prelude.Nothing,+      memory = Prelude.Nothing,+      projectedUtilizationMetrics =+        Prelude.Nothing,+      savingsOpportunity = Prelude.Nothing+    }++-- | The CPU and memory size recommendations for the containers within the+-- task of your ECS service.+eCSServiceRecommendationOption_containerRecommendations :: Lens.Lens' ECSServiceRecommendationOption (Prelude.Maybe [ContainerRecommendation])+eCSServiceRecommendationOption_containerRecommendations = Lens.lens (\ECSServiceRecommendationOption' {containerRecommendations} -> containerRecommendations) (\s@ECSServiceRecommendationOption' {} a -> s {containerRecommendations = a} :: ECSServiceRecommendationOption) Prelude.. Lens.mapping Lens.coerced++-- | The CPU size of the ECS service recommendation option.+eCSServiceRecommendationOption_cpu :: Lens.Lens' ECSServiceRecommendationOption (Prelude.Maybe Prelude.Int)+eCSServiceRecommendationOption_cpu = Lens.lens (\ECSServiceRecommendationOption' {cpu} -> cpu) (\s@ECSServiceRecommendationOption' {} a -> s {cpu = a} :: ECSServiceRecommendationOption)++-- | The memory size of the ECS service recommendation option.+eCSServiceRecommendationOption_memory :: Lens.Lens' ECSServiceRecommendationOption (Prelude.Maybe Prelude.Int)+eCSServiceRecommendationOption_memory = Lens.lens (\ECSServiceRecommendationOption' {memory} -> memory) (\s@ECSServiceRecommendationOption' {} a -> s {memory = a} :: ECSServiceRecommendationOption)++-- | An array of objects that describe the projected utilization metrics of+-- the ECS service recommendation option.+eCSServiceRecommendationOption_projectedUtilizationMetrics :: Lens.Lens' ECSServiceRecommendationOption (Prelude.Maybe [ECSServiceProjectedUtilizationMetric])+eCSServiceRecommendationOption_projectedUtilizationMetrics = Lens.lens (\ECSServiceRecommendationOption' {projectedUtilizationMetrics} -> projectedUtilizationMetrics) (\s@ECSServiceRecommendationOption' {} a -> s {projectedUtilizationMetrics = a} :: ECSServiceRecommendationOption) Prelude.. Lens.mapping Lens.coerced++-- | Undocumented member.+eCSServiceRecommendationOption_savingsOpportunity :: Lens.Lens' ECSServiceRecommendationOption (Prelude.Maybe SavingsOpportunity)+eCSServiceRecommendationOption_savingsOpportunity = Lens.lens (\ECSServiceRecommendationOption' {savingsOpportunity} -> savingsOpportunity) (\s@ECSServiceRecommendationOption' {} a -> s {savingsOpportunity = a} :: ECSServiceRecommendationOption)++instance Data.FromJSON ECSServiceRecommendationOption where+  parseJSON =+    Data.withObject+      "ECSServiceRecommendationOption"+      ( \x ->+          ECSServiceRecommendationOption'+            Prelude.<$> ( x+                            Data..:? "containerRecommendations"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "cpu")+            Prelude.<*> (x Data..:? "memory")+            Prelude.<*> ( x+                            Data..:? "projectedUtilizationMetrics"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "savingsOpportunity")+      )++instance+  Prelude.Hashable+    ECSServiceRecommendationOption+  where+  hashWithSalt+    _salt+    ECSServiceRecommendationOption' {..} =+      _salt+        `Prelude.hashWithSalt` containerRecommendations+        `Prelude.hashWithSalt` cpu+        `Prelude.hashWithSalt` memory+        `Prelude.hashWithSalt` projectedUtilizationMetrics+        `Prelude.hashWithSalt` savingsOpportunity++instance+  Prelude.NFData+    ECSServiceRecommendationOption+  where+  rnf ECSServiceRecommendationOption' {..} =+    Prelude.rnf containerRecommendations+      `Prelude.seq` Prelude.rnf cpu+      `Prelude.seq` Prelude.rnf memory+      `Prelude.seq` Prelude.rnf projectedUtilizationMetrics+      `Prelude.seq` Prelude.rnf savingsOpportunity
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceRecommendedOptionProjectedMetric.hs view
@@ -0,0 +1,119 @@+{-# 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.ComputeOptimizer.Types.ECSServiceRecommendedOptionProjectedMetric+-- 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.ComputeOptimizer.Types.ECSServiceRecommendedOptionProjectedMetric where++import Amazonka.ComputeOptimizer.Types.ECSServiceProjectedMetric+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the projected metrics of an Amazon ECS service recommendation+-- option.+--+-- To determine the performance difference between your current ECS service+-- and the recommended option, compare the metric data of your service+-- against its projected metric data.+--+-- /See:/ 'newECSServiceRecommendedOptionProjectedMetric' smart constructor.+data ECSServiceRecommendedOptionProjectedMetric = ECSServiceRecommendedOptionProjectedMetric'+  { -- | An array of objects that describe the projected metric.+    projectedMetrics :: Prelude.Maybe [ECSServiceProjectedMetric],+    -- | The recommended CPU size for the ECS service.+    recommendedCpuUnits :: Prelude.Maybe Prelude.Int,+    -- | The recommended memory size for the ECS service.+    recommendedMemorySize :: Prelude.Maybe Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ECSServiceRecommendedOptionProjectedMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'projectedMetrics', 'eCSServiceRecommendedOptionProjectedMetric_projectedMetrics' - An array of objects that describe the projected metric.+--+-- 'recommendedCpuUnits', 'eCSServiceRecommendedOptionProjectedMetric_recommendedCpuUnits' - The recommended CPU size for the ECS service.+--+-- 'recommendedMemorySize', 'eCSServiceRecommendedOptionProjectedMetric_recommendedMemorySize' - The recommended memory size for the ECS service.+newECSServiceRecommendedOptionProjectedMetric ::+  ECSServiceRecommendedOptionProjectedMetric+newECSServiceRecommendedOptionProjectedMetric =+  ECSServiceRecommendedOptionProjectedMetric'+    { projectedMetrics =+        Prelude.Nothing,+      recommendedCpuUnits =+        Prelude.Nothing,+      recommendedMemorySize =+        Prelude.Nothing+    }++-- | An array of objects that describe the projected metric.+eCSServiceRecommendedOptionProjectedMetric_projectedMetrics :: Lens.Lens' ECSServiceRecommendedOptionProjectedMetric (Prelude.Maybe [ECSServiceProjectedMetric])+eCSServiceRecommendedOptionProjectedMetric_projectedMetrics = Lens.lens (\ECSServiceRecommendedOptionProjectedMetric' {projectedMetrics} -> projectedMetrics) (\s@ECSServiceRecommendedOptionProjectedMetric' {} a -> s {projectedMetrics = a} :: ECSServiceRecommendedOptionProjectedMetric) Prelude.. Lens.mapping Lens.coerced++-- | The recommended CPU size for the ECS service.+eCSServiceRecommendedOptionProjectedMetric_recommendedCpuUnits :: Lens.Lens' ECSServiceRecommendedOptionProjectedMetric (Prelude.Maybe Prelude.Int)+eCSServiceRecommendedOptionProjectedMetric_recommendedCpuUnits = Lens.lens (\ECSServiceRecommendedOptionProjectedMetric' {recommendedCpuUnits} -> recommendedCpuUnits) (\s@ECSServiceRecommendedOptionProjectedMetric' {} a -> s {recommendedCpuUnits = a} :: ECSServiceRecommendedOptionProjectedMetric)++-- | The recommended memory size for the ECS service.+eCSServiceRecommendedOptionProjectedMetric_recommendedMemorySize :: Lens.Lens' ECSServiceRecommendedOptionProjectedMetric (Prelude.Maybe Prelude.Int)+eCSServiceRecommendedOptionProjectedMetric_recommendedMemorySize = Lens.lens (\ECSServiceRecommendedOptionProjectedMetric' {recommendedMemorySize} -> recommendedMemorySize) (\s@ECSServiceRecommendedOptionProjectedMetric' {} a -> s {recommendedMemorySize = a} :: ECSServiceRecommendedOptionProjectedMetric)++instance+  Data.FromJSON+    ECSServiceRecommendedOptionProjectedMetric+  where+  parseJSON =+    Data.withObject+      "ECSServiceRecommendedOptionProjectedMetric"+      ( \x ->+          ECSServiceRecommendedOptionProjectedMetric'+            Prelude.<$> ( x+                            Data..:? "projectedMetrics"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "recommendedCpuUnits")+            Prelude.<*> (x Data..:? "recommendedMemorySize")+      )++instance+  Prelude.Hashable+    ECSServiceRecommendedOptionProjectedMetric+  where+  hashWithSalt+    _salt+    ECSServiceRecommendedOptionProjectedMetric' {..} =+      _salt+        `Prelude.hashWithSalt` projectedMetrics+        `Prelude.hashWithSalt` recommendedCpuUnits+        `Prelude.hashWithSalt` recommendedMemorySize++instance+  Prelude.NFData+    ECSServiceRecommendedOptionProjectedMetric+  where+  rnf ECSServiceRecommendedOptionProjectedMetric' {..} =+    Prelude.rnf projectedMetrics+      `Prelude.seq` Prelude.rnf recommendedCpuUnits+      `Prelude.seq` Prelude.rnf recommendedMemorySize
+ gen/Amazonka/ComputeOptimizer/Types/ECSServiceUtilizationMetric.hs view
@@ -0,0 +1,160 @@+{-# 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.ComputeOptimizer.Types.ECSServiceUtilizationMetric+-- 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.ComputeOptimizer.Types.ECSServiceUtilizationMetric where++import Amazonka.ComputeOptimizer.Types.ECSServiceMetricName+import Amazonka.ComputeOptimizer.Types.ECSServiceMetricStatistic+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the utilization metric of an Amazon ECS service.+--+-- To determine the performance difference between your current ECS service+-- and the recommended option, compare the utilization metric data of your+-- service against its projected utilization metric data.+--+-- /See:/ 'newECSServiceUtilizationMetric' smart constructor.+data ECSServiceUtilizationMetric = ECSServiceUtilizationMetric'+  { -- | The name of the utilization metric.+    --+    -- The following utilization metrics are available:+    --+    -- -   @Cpu@ — The amount of CPU units that are used in the service.+    --+    -- -   @Memory@ — The amount of memory that is used in the service.+    name :: Prelude.Maybe ECSServiceMetricName,+    -- | The statistic of the utilization metric.+    --+    -- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+    -- utilization metrics using only the @Maximum@ statistic, which is the+    -- highest value observed during the specified period.+    --+    -- The Compute Optimizer console displays graphs for some utilization+    -- metrics using the @Average@ statistic, which is the value of @Sum@ \/+    -- @SampleCount@ during the specified period. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+    -- in the /Compute Optimizer User Guide/. You can also get averaged+    -- utilization metric data for your resources using Amazon CloudWatch. For+    -- more information, see the+    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+    statistic :: Prelude.Maybe ECSServiceMetricStatistic,+    -- | The value of the utilization metric.+    value :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ECSServiceUtilizationMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'eCSServiceUtilizationMetric_name' - The name of the utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @Cpu@ — The amount of CPU units that are used in the service.+--+-- -   @Memory@ — The amount of memory that is used in the service.+--+-- 'statistic', 'eCSServiceUtilizationMetric_statistic' - The statistic of the utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+--+-- 'value', 'eCSServiceUtilizationMetric_value' - The value of the utilization metric.+newECSServiceUtilizationMetric ::+  ECSServiceUtilizationMetric+newECSServiceUtilizationMetric =+  ECSServiceUtilizationMetric'+    { name =+        Prelude.Nothing,+      statistic = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The name of the utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @Cpu@ — The amount of CPU units that are used in the service.+--+-- -   @Memory@ — The amount of memory that is used in the service.+eCSServiceUtilizationMetric_name :: Lens.Lens' ECSServiceUtilizationMetric (Prelude.Maybe ECSServiceMetricName)+eCSServiceUtilizationMetric_name = Lens.lens (\ECSServiceUtilizationMetric' {name} -> name) (\s@ECSServiceUtilizationMetric' {} a -> s {name = a} :: ECSServiceUtilizationMetric)++-- | The statistic of the utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+eCSServiceUtilizationMetric_statistic :: Lens.Lens' ECSServiceUtilizationMetric (Prelude.Maybe ECSServiceMetricStatistic)+eCSServiceUtilizationMetric_statistic = Lens.lens (\ECSServiceUtilizationMetric' {statistic} -> statistic) (\s@ECSServiceUtilizationMetric' {} a -> s {statistic = a} :: ECSServiceUtilizationMetric)++-- | The value of the utilization metric.+eCSServiceUtilizationMetric_value :: Lens.Lens' ECSServiceUtilizationMetric (Prelude.Maybe Prelude.Double)+eCSServiceUtilizationMetric_value = Lens.lens (\ECSServiceUtilizationMetric' {value} -> value) (\s@ECSServiceUtilizationMetric' {} a -> s {value = a} :: ECSServiceUtilizationMetric)++instance Data.FromJSON ECSServiceUtilizationMetric where+  parseJSON =+    Data.withObject+      "ECSServiceUtilizationMetric"+      ( \x ->+          ECSServiceUtilizationMetric'+            Prelude.<$> (x Data..:? "name")+            Prelude.<*> (x Data..:? "statistic")+            Prelude.<*> (x Data..:? "value")+      )++instance Prelude.Hashable ECSServiceUtilizationMetric where+  hashWithSalt _salt ECSServiceUtilizationMetric' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` statistic+      `Prelude.hashWithSalt` value++instance Prelude.NFData ECSServiceUtilizationMetric where+  rnf ECSServiceUtilizationMetric' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf statistic+      `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/ComputeOptimizer/Types/EffectiveRecommendationPreferences.hs view
@@ -0,0 +1,237 @@+{-# 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.ComputeOptimizer.Types.EffectiveRecommendationPreferences+-- 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.ComputeOptimizer.Types.EffectiveRecommendationPreferences where++import Amazonka.ComputeOptimizer.Types.CpuVendorArchitecture+import Amazonka.ComputeOptimizer.Types.EnhancedInfrastructureMetrics+import Amazonka.ComputeOptimizer.Types.ExternalMetricsPreference+import Amazonka.ComputeOptimizer.Types.InferredWorkloadTypesPreference+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the effective recommendation preferences for a resource.+--+-- /See:/ 'newEffectiveRecommendationPreferences' smart constructor.+data EffectiveRecommendationPreferences = EffectiveRecommendationPreferences'+  { -- | Describes the CPU vendor and architecture for an instance or Auto+    -- Scaling group recommendations.+    --+    -- For example, when you specify @AWS_ARM64@ with:+    --+    -- -   A GetEC2InstanceRecommendations or+    --     GetAutoScalingGroupRecommendations request, Compute Optimizer+    --     returns recommendations that consist of Graviton2 instance types+    --     only.+    --+    -- -   A GetEC2RecommendationProjectedMetrics request, Compute Optimizer+    --     returns projected utilization metrics for Graviton2 instance type+    --     recommendations only.+    --+    -- -   A ExportEC2InstanceRecommendations or+    --     ExportAutoScalingGroupRecommendations request, Compute Optimizer+    --     exports recommendations that consist of Graviton2 instance types+    --     only.+    cpuVendorArchitectures :: Prelude.Maybe [CpuVendorArchitecture],+    -- | Describes the activation status of the enhanced infrastructure metrics+    -- preference.+    --+    -- A status of @Active@ confirms that the preference is applied in the+    -- latest recommendation refresh, and a status of @Inactive@ confirms that+    -- it\'s not yet applied to recommendations.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+    -- in the /Compute Optimizer User Guide/.+    enhancedInfrastructureMetrics :: Prelude.Maybe EnhancedInfrastructureMetrics,+    -- | An object that describes the external metrics recommendation preference.+    --+    -- If the preference is applied in the latest recommendation refresh, an+    -- object with a valid @source@ value appears in the response. If the+    -- preference isn\'t applied to the recommendations already, then this+    -- object doesn\'t appear in the response.+    externalMetricsPreference :: Prelude.Maybe ExternalMetricsPreference,+    -- | Describes the activation status of the inferred workload types+    -- preference.+    --+    -- A status of @Active@ confirms that the preference is applied in the+    -- latest recommendation refresh. A status of @Inactive@ confirms that+    -- it\'s not yet applied to recommendations.+    inferredWorkloadTypes :: Prelude.Maybe InferredWorkloadTypesPreference+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EffectiveRecommendationPreferences' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'cpuVendorArchitectures', 'effectiveRecommendationPreferences_cpuVendorArchitectures' - Describes the CPU vendor and architecture for an instance or Auto+-- Scaling group recommendations.+--+-- For example, when you specify @AWS_ARM64@ with:+--+-- -   A GetEC2InstanceRecommendations or+--     GetAutoScalingGroupRecommendations request, Compute Optimizer+--     returns recommendations that consist of Graviton2 instance types+--     only.+--+-- -   A GetEC2RecommendationProjectedMetrics request, Compute Optimizer+--     returns projected utilization metrics for Graviton2 instance type+--     recommendations only.+--+-- -   A ExportEC2InstanceRecommendations or+--     ExportAutoScalingGroupRecommendations request, Compute Optimizer+--     exports recommendations that consist of Graviton2 instance types+--     only.+--+-- 'enhancedInfrastructureMetrics', 'effectiveRecommendationPreferences_enhancedInfrastructureMetrics' - Describes the activation status of the enhanced infrastructure metrics+-- preference.+--+-- A status of @Active@ confirms that the preference is applied in the+-- latest recommendation refresh, and a status of @Inactive@ confirms that+-- it\'s not yet applied to recommendations.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- 'externalMetricsPreference', 'effectiveRecommendationPreferences_externalMetricsPreference' - An object that describes the external metrics recommendation preference.+--+-- If the preference is applied in the latest recommendation refresh, an+-- object with a valid @source@ value appears in the response. If the+-- preference isn\'t applied to the recommendations already, then this+-- object doesn\'t appear in the response.+--+-- 'inferredWorkloadTypes', 'effectiveRecommendationPreferences_inferredWorkloadTypes' - Describes the activation status of the inferred workload types+-- preference.+--+-- A status of @Active@ confirms that the preference is applied in the+-- latest recommendation refresh. A status of @Inactive@ confirms that+-- it\'s not yet applied to recommendations.+newEffectiveRecommendationPreferences ::+  EffectiveRecommendationPreferences+newEffectiveRecommendationPreferences =+  EffectiveRecommendationPreferences'+    { cpuVendorArchitectures =+        Prelude.Nothing,+      enhancedInfrastructureMetrics =+        Prelude.Nothing,+      externalMetricsPreference =+        Prelude.Nothing,+      inferredWorkloadTypes = Prelude.Nothing+    }++-- | Describes the CPU vendor and architecture for an instance or Auto+-- Scaling group recommendations.+--+-- For example, when you specify @AWS_ARM64@ with:+--+-- -   A GetEC2InstanceRecommendations or+--     GetAutoScalingGroupRecommendations request, Compute Optimizer+--     returns recommendations that consist of Graviton2 instance types+--     only.+--+-- -   A GetEC2RecommendationProjectedMetrics request, Compute Optimizer+--     returns projected utilization metrics for Graviton2 instance type+--     recommendations only.+--+-- -   A ExportEC2InstanceRecommendations or+--     ExportAutoScalingGroupRecommendations request, Compute Optimizer+--     exports recommendations that consist of Graviton2 instance types+--     only.+effectiveRecommendationPreferences_cpuVendorArchitectures :: Lens.Lens' EffectiveRecommendationPreferences (Prelude.Maybe [CpuVendorArchitecture])+effectiveRecommendationPreferences_cpuVendorArchitectures = Lens.lens (\EffectiveRecommendationPreferences' {cpuVendorArchitectures} -> cpuVendorArchitectures) (\s@EffectiveRecommendationPreferences' {} a -> s {cpuVendorArchitectures = a} :: EffectiveRecommendationPreferences) Prelude.. Lens.mapping Lens.coerced++-- | Describes the activation status of the enhanced infrastructure metrics+-- preference.+--+-- A status of @Active@ confirms that the preference is applied in the+-- latest recommendation refresh, and a status of @Inactive@ confirms that+-- it\'s not yet applied to recommendations.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+effectiveRecommendationPreferences_enhancedInfrastructureMetrics :: Lens.Lens' EffectiveRecommendationPreferences (Prelude.Maybe EnhancedInfrastructureMetrics)+effectiveRecommendationPreferences_enhancedInfrastructureMetrics = Lens.lens (\EffectiveRecommendationPreferences' {enhancedInfrastructureMetrics} -> enhancedInfrastructureMetrics) (\s@EffectiveRecommendationPreferences' {} a -> s {enhancedInfrastructureMetrics = a} :: EffectiveRecommendationPreferences)++-- | An object that describes the external metrics recommendation preference.+--+-- If the preference is applied in the latest recommendation refresh, an+-- object with a valid @source@ value appears in the response. If the+-- preference isn\'t applied to the recommendations already, then this+-- object doesn\'t appear in the response.+effectiveRecommendationPreferences_externalMetricsPreference :: Lens.Lens' EffectiveRecommendationPreferences (Prelude.Maybe ExternalMetricsPreference)+effectiveRecommendationPreferences_externalMetricsPreference = Lens.lens (\EffectiveRecommendationPreferences' {externalMetricsPreference} -> externalMetricsPreference) (\s@EffectiveRecommendationPreferences' {} a -> s {externalMetricsPreference = a} :: EffectiveRecommendationPreferences)++-- | Describes the activation status of the inferred workload types+-- preference.+--+-- A status of @Active@ confirms that the preference is applied in the+-- latest recommendation refresh. A status of @Inactive@ confirms that+-- it\'s not yet applied to recommendations.+effectiveRecommendationPreferences_inferredWorkloadTypes :: Lens.Lens' EffectiveRecommendationPreferences (Prelude.Maybe InferredWorkloadTypesPreference)+effectiveRecommendationPreferences_inferredWorkloadTypes = Lens.lens (\EffectiveRecommendationPreferences' {inferredWorkloadTypes} -> inferredWorkloadTypes) (\s@EffectiveRecommendationPreferences' {} a -> s {inferredWorkloadTypes = a} :: EffectiveRecommendationPreferences)++instance+  Data.FromJSON+    EffectiveRecommendationPreferences+  where+  parseJSON =+    Data.withObject+      "EffectiveRecommendationPreferences"+      ( \x ->+          EffectiveRecommendationPreferences'+            Prelude.<$> ( x+                            Data..:? "cpuVendorArchitectures"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "enhancedInfrastructureMetrics")+            Prelude.<*> (x Data..:? "externalMetricsPreference")+            Prelude.<*> (x Data..:? "inferredWorkloadTypes")+      )++instance+  Prelude.Hashable+    EffectiveRecommendationPreferences+  where+  hashWithSalt+    _salt+    EffectiveRecommendationPreferences' {..} =+      _salt+        `Prelude.hashWithSalt` cpuVendorArchitectures+        `Prelude.hashWithSalt` enhancedInfrastructureMetrics+        `Prelude.hashWithSalt` externalMetricsPreference+        `Prelude.hashWithSalt` inferredWorkloadTypes++instance+  Prelude.NFData+    EffectiveRecommendationPreferences+  where+  rnf EffectiveRecommendationPreferences' {..} =+    Prelude.rnf cpuVendorArchitectures+      `Prelude.seq` Prelude.rnf enhancedInfrastructureMetrics+      `Prelude.seq` Prelude.rnf externalMetricsPreference+      `Prelude.seq` Prelude.rnf inferredWorkloadTypes
+ gen/Amazonka/ComputeOptimizer/Types/EnhancedInfrastructureMetrics.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.EnhancedInfrastructureMetrics+-- 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.ComputeOptimizer.Types.EnhancedInfrastructureMetrics+  ( EnhancedInfrastructureMetrics+      ( ..,+        EnhancedInfrastructureMetrics_Active,+        EnhancedInfrastructureMetrics_Inactive+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EnhancedInfrastructureMetrics = EnhancedInfrastructureMetrics'+  { fromEnhancedInfrastructureMetrics ::+      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 EnhancedInfrastructureMetrics_Active :: EnhancedInfrastructureMetrics+pattern EnhancedInfrastructureMetrics_Active = EnhancedInfrastructureMetrics' "Active"++pattern EnhancedInfrastructureMetrics_Inactive :: EnhancedInfrastructureMetrics+pattern EnhancedInfrastructureMetrics_Inactive = EnhancedInfrastructureMetrics' "Inactive"++{-# COMPLETE+  EnhancedInfrastructureMetrics_Active,+  EnhancedInfrastructureMetrics_Inactive,+  EnhancedInfrastructureMetrics'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/EnrollmentFilter.hs view
@@ -0,0 +1,100 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.EnrollmentFilter+-- 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.ComputeOptimizer.Types.EnrollmentFilter where++import Amazonka.ComputeOptimizer.Types.EnrollmentFilterName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a filter that returns a more specific list of account+-- enrollment statuses. Use this filter with the+-- GetEnrollmentStatusesForOrganization action.+--+-- /See:/ 'newEnrollmentFilter' smart constructor.+data EnrollmentFilter = EnrollmentFilter'+  { -- | The name of the filter.+    --+    -- Specify @Status@ to return accounts with a specific enrollment status+    -- (for example, @Active@).+    name :: Prelude.Maybe EnrollmentFilterName,+    -- | The value of the filter.+    --+    -- The valid values are @Active@, @Inactive@, @Pending@, and @Failed@.+    values :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnrollmentFilter' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'enrollmentFilter_name' - The name of the filter.+--+-- Specify @Status@ to return accounts with a specific enrollment status+-- (for example, @Active@).+--+-- 'values', 'enrollmentFilter_values' - The value of the filter.+--+-- The valid values are @Active@, @Inactive@, @Pending@, and @Failed@.+newEnrollmentFilter ::+  EnrollmentFilter+newEnrollmentFilter =+  EnrollmentFilter'+    { name = Prelude.Nothing,+      values = Prelude.Nothing+    }++-- | The name of the filter.+--+-- Specify @Status@ to return accounts with a specific enrollment status+-- (for example, @Active@).+enrollmentFilter_name :: Lens.Lens' EnrollmentFilter (Prelude.Maybe EnrollmentFilterName)+enrollmentFilter_name = Lens.lens (\EnrollmentFilter' {name} -> name) (\s@EnrollmentFilter' {} a -> s {name = a} :: EnrollmentFilter)++-- | The value of the filter.+--+-- The valid values are @Active@, @Inactive@, @Pending@, and @Failed@.+enrollmentFilter_values :: Lens.Lens' EnrollmentFilter (Prelude.Maybe [Prelude.Text])+enrollmentFilter_values = Lens.lens (\EnrollmentFilter' {values} -> values) (\s@EnrollmentFilter' {} a -> s {values = a} :: EnrollmentFilter) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable EnrollmentFilter where+  hashWithSalt _salt EnrollmentFilter' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` values++instance Prelude.NFData EnrollmentFilter where+  rnf EnrollmentFilter' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON EnrollmentFilter where+  toJSON EnrollmentFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("name" Data..=) Prelude.<$> name,+            ("values" Data..=) Prelude.<$> values+          ]+      )
+ gen/Amazonka/ComputeOptimizer/Types/EnrollmentFilterName.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.ComputeOptimizer.Types.EnrollmentFilterName+-- 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.ComputeOptimizer.Types.EnrollmentFilterName+  ( EnrollmentFilterName+      ( ..,+        EnrollmentFilterName_Status+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EnrollmentFilterName = EnrollmentFilterName'+  { fromEnrollmentFilterName ::+      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 EnrollmentFilterName_Status :: EnrollmentFilterName+pattern EnrollmentFilterName_Status = EnrollmentFilterName' "Status"++{-# COMPLETE+  EnrollmentFilterName_Status,+  EnrollmentFilterName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/EstimatedMonthlySavings.hs view
@@ -0,0 +1,92 @@+{-# 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.ComputeOptimizer.Types.EstimatedMonthlySavings+-- 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.ComputeOptimizer.Types.EstimatedMonthlySavings where++import Amazonka.ComputeOptimizer.Types.Currency+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the estimated monthly savings amount possible, based on+-- On-Demand instance pricing, by adopting Compute Optimizer+-- recommendations for a given resource.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/view-ec2-recommendations.html#ec2-savings-calculation Estimated monthly savings and savings opportunities>+-- in the /Compute Optimizer User Guide/.+--+-- /See:/ 'newEstimatedMonthlySavings' smart constructor.+data EstimatedMonthlySavings = EstimatedMonthlySavings'+  { -- | The currency of the estimated monthly savings.+    currency :: Prelude.Maybe Currency,+    -- | The value of the estimated monthly savings.+    value :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EstimatedMonthlySavings' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'currency', 'estimatedMonthlySavings_currency' - The currency of the estimated monthly savings.+--+-- 'value', 'estimatedMonthlySavings_value' - The value of the estimated monthly savings.+newEstimatedMonthlySavings ::+  EstimatedMonthlySavings+newEstimatedMonthlySavings =+  EstimatedMonthlySavings'+    { currency =+        Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The currency of the estimated monthly savings.+estimatedMonthlySavings_currency :: Lens.Lens' EstimatedMonthlySavings (Prelude.Maybe Currency)+estimatedMonthlySavings_currency = Lens.lens (\EstimatedMonthlySavings' {currency} -> currency) (\s@EstimatedMonthlySavings' {} a -> s {currency = a} :: EstimatedMonthlySavings)++-- | The value of the estimated monthly savings.+estimatedMonthlySavings_value :: Lens.Lens' EstimatedMonthlySavings (Prelude.Maybe Prelude.Double)+estimatedMonthlySavings_value = Lens.lens (\EstimatedMonthlySavings' {value} -> value) (\s@EstimatedMonthlySavings' {} a -> s {value = a} :: EstimatedMonthlySavings)++instance Data.FromJSON EstimatedMonthlySavings where+  parseJSON =+    Data.withObject+      "EstimatedMonthlySavings"+      ( \x ->+          EstimatedMonthlySavings'+            Prelude.<$> (x Data..:? "currency")+            Prelude.<*> (x Data..:? "value")+      )++instance Prelude.Hashable EstimatedMonthlySavings where+  hashWithSalt _salt EstimatedMonthlySavings' {..} =+    _salt+      `Prelude.hashWithSalt` currency+      `Prelude.hashWithSalt` value++instance Prelude.NFData EstimatedMonthlySavings where+  rnf EstimatedMonthlySavings' {..} =+    Prelude.rnf currency+      `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/ComputeOptimizer/Types/ExportDestination.hs view
@@ -0,0 +1,75 @@+{-# 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.ComputeOptimizer.Types.ExportDestination+-- 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.ComputeOptimizer.Types.ExportDestination where++import Amazonka.ComputeOptimizer.Types.S3Destination+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the destination of the recommendations export and metadata+-- files.+--+-- /See:/ 'newExportDestination' smart constructor.+data ExportDestination = ExportDestination'+  { -- | An object that describes the destination Amazon Simple Storage Service+    -- (Amazon S3) bucket name and object keys of a recommendations export+    -- file, and its associated metadata file.+    s3 :: Prelude.Maybe S3Destination+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExportDestination' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 's3', 'exportDestination_s3' - An object that describes the destination Amazon Simple Storage Service+-- (Amazon S3) bucket name and object keys of a recommendations export+-- file, and its associated metadata file.+newExportDestination ::+  ExportDestination+newExportDestination =+  ExportDestination' {s3 = Prelude.Nothing}++-- | An object that describes the destination Amazon Simple Storage Service+-- (Amazon S3) bucket name and object keys of a recommendations export+-- file, and its associated metadata file.+exportDestination_s3 :: Lens.Lens' ExportDestination (Prelude.Maybe S3Destination)+exportDestination_s3 = Lens.lens (\ExportDestination' {s3} -> s3) (\s@ExportDestination' {} a -> s {s3 = a} :: ExportDestination)++instance Data.FromJSON ExportDestination where+  parseJSON =+    Data.withObject+      "ExportDestination"+      ( \x ->+          ExportDestination' Prelude.<$> (x Data..:? "s3")+      )++instance Prelude.Hashable ExportDestination where+  hashWithSalt _salt ExportDestination' {..} =+    _salt `Prelude.hashWithSalt` s3++instance Prelude.NFData ExportDestination where+  rnf ExportDestination' {..} = Prelude.rnf s3
+ gen/Amazonka/ComputeOptimizer/Types/ExportableAutoScalingGroupField.hs view
@@ -0,0 +1,331 @@+{-# 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.ComputeOptimizer.Types.ExportableAutoScalingGroupField+-- 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.ComputeOptimizer.Types.ExportableAutoScalingGroupField+  ( ExportableAutoScalingGroupField+      ( ..,+        ExportableAutoScalingGroupField_AccountId,+        ExportableAutoScalingGroupField_AutoScalingGroupArn,+        ExportableAutoScalingGroupField_AutoScalingGroupName,+        ExportableAutoScalingGroupField_CurrentConfigurationDesiredCapacity,+        ExportableAutoScalingGroupField_CurrentConfigurationInstanceType,+        ExportableAutoScalingGroupField_CurrentConfigurationMaxSize,+        ExportableAutoScalingGroupField_CurrentConfigurationMinSize,+        ExportableAutoScalingGroupField_CurrentMemory,+        ExportableAutoScalingGroupField_CurrentNetwork,+        ExportableAutoScalingGroupField_CurrentOnDemandPrice,+        ExportableAutoScalingGroupField_CurrentPerformanceRisk,+        ExportableAutoScalingGroupField_CurrentStandardOneYearNoUpfrontReservedPrice,+        ExportableAutoScalingGroupField_CurrentStandardThreeYearNoUpfrontReservedPrice,+        ExportableAutoScalingGroupField_CurrentStorage,+        ExportableAutoScalingGroupField_CurrentVCpus,+        ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesCpuVendorArchitectures,+        ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics,+        ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesInferredWorkloadTypes,+        ExportableAutoScalingGroupField_Finding,+        ExportableAutoScalingGroupField_InferredWorkloadTypes,+        ExportableAutoScalingGroupField_LastRefreshTimestamp,+        ExportableAutoScalingGroupField_LookbackPeriodInDays,+        ExportableAutoScalingGroupField_RecommendationOptionsConfigurationDesiredCapacity,+        ExportableAutoScalingGroupField_RecommendationOptionsConfigurationInstanceType,+        ExportableAutoScalingGroupField_RecommendationOptionsConfigurationMaxSize,+        ExportableAutoScalingGroupField_RecommendationOptionsConfigurationMinSize,+        ExportableAutoScalingGroupField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+        ExportableAutoScalingGroupField_RecommendationOptionsEstimatedMonthlySavingsValue,+        ExportableAutoScalingGroupField_RecommendationOptionsMemory,+        ExportableAutoScalingGroupField_RecommendationOptionsMigrationEffort,+        ExportableAutoScalingGroupField_RecommendationOptionsNetwork,+        ExportableAutoScalingGroupField_RecommendationOptionsOnDemandPrice,+        ExportableAutoScalingGroupField_RecommendationOptionsPerformanceRisk,+        ExportableAutoScalingGroupField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum,+        ExportableAutoScalingGroupField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum,+        ExportableAutoScalingGroupField_RecommendationOptionsSavingsOpportunityPercentage,+        ExportableAutoScalingGroupField_RecommendationOptionsStandardOneYearNoUpfrontReservedPrice,+        ExportableAutoScalingGroupField_RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice,+        ExportableAutoScalingGroupField_RecommendationOptionsStorage,+        ExportableAutoScalingGroupField_RecommendationOptionsVcpus,+        ExportableAutoScalingGroupField_UtilizationMetricsCpuMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsDiskReadBytesPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsDiskReadOpsPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsDiskWriteBytesPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsDiskWriteOpsPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsEbsReadBytesPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsEbsReadOpsPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsEbsWriteBytesPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsEbsWriteOpsPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsMemoryMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsNetworkInBytesPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsNetworkOutBytesPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsNetworkPacketsInPerSecondMaximum,+        ExportableAutoScalingGroupField_UtilizationMetricsNetworkPacketsOutPerSecondMaximum+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ExportableAutoScalingGroupField = ExportableAutoScalingGroupField'+  { fromExportableAutoScalingGroupField ::+      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 ExportableAutoScalingGroupField_AccountId :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_AccountId = ExportableAutoScalingGroupField' "AccountId"++pattern ExportableAutoScalingGroupField_AutoScalingGroupArn :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_AutoScalingGroupArn = ExportableAutoScalingGroupField' "AutoScalingGroupArn"++pattern ExportableAutoScalingGroupField_AutoScalingGroupName :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_AutoScalingGroupName = ExportableAutoScalingGroupField' "AutoScalingGroupName"++pattern ExportableAutoScalingGroupField_CurrentConfigurationDesiredCapacity :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentConfigurationDesiredCapacity = ExportableAutoScalingGroupField' "CurrentConfigurationDesiredCapacity"++pattern ExportableAutoScalingGroupField_CurrentConfigurationInstanceType :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentConfigurationInstanceType = ExportableAutoScalingGroupField' "CurrentConfigurationInstanceType"++pattern ExportableAutoScalingGroupField_CurrentConfigurationMaxSize :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentConfigurationMaxSize = ExportableAutoScalingGroupField' "CurrentConfigurationMaxSize"++pattern ExportableAutoScalingGroupField_CurrentConfigurationMinSize :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentConfigurationMinSize = ExportableAutoScalingGroupField' "CurrentConfigurationMinSize"++pattern ExportableAutoScalingGroupField_CurrentMemory :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentMemory = ExportableAutoScalingGroupField' "CurrentMemory"++pattern ExportableAutoScalingGroupField_CurrentNetwork :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentNetwork = ExportableAutoScalingGroupField' "CurrentNetwork"++pattern ExportableAutoScalingGroupField_CurrentOnDemandPrice :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentOnDemandPrice = ExportableAutoScalingGroupField' "CurrentOnDemandPrice"++pattern ExportableAutoScalingGroupField_CurrentPerformanceRisk :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentPerformanceRisk = ExportableAutoScalingGroupField' "CurrentPerformanceRisk"++pattern ExportableAutoScalingGroupField_CurrentStandardOneYearNoUpfrontReservedPrice :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentStandardOneYearNoUpfrontReservedPrice = ExportableAutoScalingGroupField' "CurrentStandardOneYearNoUpfrontReservedPrice"++pattern ExportableAutoScalingGroupField_CurrentStandardThreeYearNoUpfrontReservedPrice :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentStandardThreeYearNoUpfrontReservedPrice = ExportableAutoScalingGroupField' "CurrentStandardThreeYearNoUpfrontReservedPrice"++pattern ExportableAutoScalingGroupField_CurrentStorage :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentStorage = ExportableAutoScalingGroupField' "CurrentStorage"++pattern ExportableAutoScalingGroupField_CurrentVCpus :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_CurrentVCpus = ExportableAutoScalingGroupField' "CurrentVCpus"++pattern ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesCpuVendorArchitectures :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesCpuVendorArchitectures = ExportableAutoScalingGroupField' "EffectiveRecommendationPreferencesCpuVendorArchitectures"++pattern ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics = ExportableAutoScalingGroupField' "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics"++pattern ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesInferredWorkloadTypes :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesInferredWorkloadTypes = ExportableAutoScalingGroupField' "EffectiveRecommendationPreferencesInferredWorkloadTypes"++pattern ExportableAutoScalingGroupField_Finding :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_Finding = ExportableAutoScalingGroupField' "Finding"++pattern ExportableAutoScalingGroupField_InferredWorkloadTypes :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_InferredWorkloadTypes = ExportableAutoScalingGroupField' "InferredWorkloadTypes"++pattern ExportableAutoScalingGroupField_LastRefreshTimestamp :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_LastRefreshTimestamp = ExportableAutoScalingGroupField' "LastRefreshTimestamp"++pattern ExportableAutoScalingGroupField_LookbackPeriodInDays :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_LookbackPeriodInDays = ExportableAutoScalingGroupField' "LookbackPeriodInDays"++pattern ExportableAutoScalingGroupField_RecommendationOptionsConfigurationDesiredCapacity :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsConfigurationDesiredCapacity = ExportableAutoScalingGroupField' "RecommendationOptionsConfigurationDesiredCapacity"++pattern ExportableAutoScalingGroupField_RecommendationOptionsConfigurationInstanceType :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsConfigurationInstanceType = ExportableAutoScalingGroupField' "RecommendationOptionsConfigurationInstanceType"++pattern ExportableAutoScalingGroupField_RecommendationOptionsConfigurationMaxSize :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsConfigurationMaxSize = ExportableAutoScalingGroupField' "RecommendationOptionsConfigurationMaxSize"++pattern ExportableAutoScalingGroupField_RecommendationOptionsConfigurationMinSize :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsConfigurationMinSize = ExportableAutoScalingGroupField' "RecommendationOptionsConfigurationMinSize"++pattern ExportableAutoScalingGroupField_RecommendationOptionsEstimatedMonthlySavingsCurrency :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsEstimatedMonthlySavingsCurrency = ExportableAutoScalingGroupField' "RecommendationOptionsEstimatedMonthlySavingsCurrency"++pattern ExportableAutoScalingGroupField_RecommendationOptionsEstimatedMonthlySavingsValue :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsEstimatedMonthlySavingsValue = ExportableAutoScalingGroupField' "RecommendationOptionsEstimatedMonthlySavingsValue"++pattern ExportableAutoScalingGroupField_RecommendationOptionsMemory :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsMemory = ExportableAutoScalingGroupField' "RecommendationOptionsMemory"++pattern ExportableAutoScalingGroupField_RecommendationOptionsMigrationEffort :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsMigrationEffort = ExportableAutoScalingGroupField' "RecommendationOptionsMigrationEffort"++pattern ExportableAutoScalingGroupField_RecommendationOptionsNetwork :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsNetwork = ExportableAutoScalingGroupField' "RecommendationOptionsNetwork"++pattern ExportableAutoScalingGroupField_RecommendationOptionsOnDemandPrice :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsOnDemandPrice = ExportableAutoScalingGroupField' "RecommendationOptionsOnDemandPrice"++pattern ExportableAutoScalingGroupField_RecommendationOptionsPerformanceRisk :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsPerformanceRisk = ExportableAutoScalingGroupField' "RecommendationOptionsPerformanceRisk"++pattern ExportableAutoScalingGroupField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum = ExportableAutoScalingGroupField' "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum"++pattern ExportableAutoScalingGroupField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum = ExportableAutoScalingGroupField' "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum"++pattern ExportableAutoScalingGroupField_RecommendationOptionsSavingsOpportunityPercentage :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsSavingsOpportunityPercentage = ExportableAutoScalingGroupField' "RecommendationOptionsSavingsOpportunityPercentage"++pattern ExportableAutoScalingGroupField_RecommendationOptionsStandardOneYearNoUpfrontReservedPrice :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsStandardOneYearNoUpfrontReservedPrice = ExportableAutoScalingGroupField' "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice"++pattern ExportableAutoScalingGroupField_RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice = ExportableAutoScalingGroupField' "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice"++pattern ExportableAutoScalingGroupField_RecommendationOptionsStorage :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsStorage = ExportableAutoScalingGroupField' "RecommendationOptionsStorage"++pattern ExportableAutoScalingGroupField_RecommendationOptionsVcpus :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_RecommendationOptionsVcpus = ExportableAutoScalingGroupField' "RecommendationOptionsVcpus"++pattern ExportableAutoScalingGroupField_UtilizationMetricsCpuMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsCpuMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsCpuMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsDiskReadBytesPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsDiskReadBytesPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsDiskReadBytesPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsDiskReadOpsPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsDiskReadOpsPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsDiskReadOpsPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsDiskWriteBytesPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsDiskWriteBytesPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsDiskWriteBytesPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsDiskWriteOpsPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsDiskWriteOpsPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsDiskWriteOpsPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsEbsReadBytesPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsEbsReadBytesPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsEbsReadBytesPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsEbsReadOpsPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsEbsReadOpsPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsEbsReadOpsPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsEbsWriteBytesPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsEbsWriteBytesPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsEbsWriteBytesPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsEbsWriteOpsPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsEbsWriteOpsPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsEbsWriteOpsPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsMemoryMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsMemoryMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsMemoryMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsNetworkInBytesPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsNetworkInBytesPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsNetworkInBytesPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsNetworkOutBytesPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsNetworkOutBytesPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsNetworkOutBytesPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsNetworkPacketsInPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsNetworkPacketsInPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsNetworkPacketsInPerSecondMaximum"++pattern ExportableAutoScalingGroupField_UtilizationMetricsNetworkPacketsOutPerSecondMaximum :: ExportableAutoScalingGroupField+pattern ExportableAutoScalingGroupField_UtilizationMetricsNetworkPacketsOutPerSecondMaximum = ExportableAutoScalingGroupField' "UtilizationMetricsNetworkPacketsOutPerSecondMaximum"++{-# COMPLETE+  ExportableAutoScalingGroupField_AccountId,+  ExportableAutoScalingGroupField_AutoScalingGroupArn,+  ExportableAutoScalingGroupField_AutoScalingGroupName,+  ExportableAutoScalingGroupField_CurrentConfigurationDesiredCapacity,+  ExportableAutoScalingGroupField_CurrentConfigurationInstanceType,+  ExportableAutoScalingGroupField_CurrentConfigurationMaxSize,+  ExportableAutoScalingGroupField_CurrentConfigurationMinSize,+  ExportableAutoScalingGroupField_CurrentMemory,+  ExportableAutoScalingGroupField_CurrentNetwork,+  ExportableAutoScalingGroupField_CurrentOnDemandPrice,+  ExportableAutoScalingGroupField_CurrentPerformanceRisk,+  ExportableAutoScalingGroupField_CurrentStandardOneYearNoUpfrontReservedPrice,+  ExportableAutoScalingGroupField_CurrentStandardThreeYearNoUpfrontReservedPrice,+  ExportableAutoScalingGroupField_CurrentStorage,+  ExportableAutoScalingGroupField_CurrentVCpus,+  ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesCpuVendorArchitectures,+  ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics,+  ExportableAutoScalingGroupField_EffectiveRecommendationPreferencesInferredWorkloadTypes,+  ExportableAutoScalingGroupField_Finding,+  ExportableAutoScalingGroupField_InferredWorkloadTypes,+  ExportableAutoScalingGroupField_LastRefreshTimestamp,+  ExportableAutoScalingGroupField_LookbackPeriodInDays,+  ExportableAutoScalingGroupField_RecommendationOptionsConfigurationDesiredCapacity,+  ExportableAutoScalingGroupField_RecommendationOptionsConfigurationInstanceType,+  ExportableAutoScalingGroupField_RecommendationOptionsConfigurationMaxSize,+  ExportableAutoScalingGroupField_RecommendationOptionsConfigurationMinSize,+  ExportableAutoScalingGroupField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+  ExportableAutoScalingGroupField_RecommendationOptionsEstimatedMonthlySavingsValue,+  ExportableAutoScalingGroupField_RecommendationOptionsMemory,+  ExportableAutoScalingGroupField_RecommendationOptionsMigrationEffort,+  ExportableAutoScalingGroupField_RecommendationOptionsNetwork,+  ExportableAutoScalingGroupField_RecommendationOptionsOnDemandPrice,+  ExportableAutoScalingGroupField_RecommendationOptionsPerformanceRisk,+  ExportableAutoScalingGroupField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum,+  ExportableAutoScalingGroupField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum,+  ExportableAutoScalingGroupField_RecommendationOptionsSavingsOpportunityPercentage,+  ExportableAutoScalingGroupField_RecommendationOptionsStandardOneYearNoUpfrontReservedPrice,+  ExportableAutoScalingGroupField_RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice,+  ExportableAutoScalingGroupField_RecommendationOptionsStorage,+  ExportableAutoScalingGroupField_RecommendationOptionsVcpus,+  ExportableAutoScalingGroupField_UtilizationMetricsCpuMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsDiskReadBytesPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsDiskReadOpsPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsDiskWriteBytesPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsDiskWriteOpsPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsEbsReadBytesPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsEbsReadOpsPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsEbsWriteBytesPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsEbsWriteOpsPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsMemoryMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsNetworkInBytesPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsNetworkOutBytesPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsNetworkPacketsInPerSecondMaximum,+  ExportableAutoScalingGroupField_UtilizationMetricsNetworkPacketsOutPerSecondMaximum,+  ExportableAutoScalingGroupField'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ExportableECSServiceField.hs view
@@ -0,0 +1,176 @@+{-# 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.ComputeOptimizer.Types.ExportableECSServiceField+-- 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.ComputeOptimizer.Types.ExportableECSServiceField+  ( ExportableECSServiceField+      ( ..,+        ExportableECSServiceField_AccountId,+        ExportableECSServiceField_CurrentPerformanceRisk,+        ExportableECSServiceField_CurrentServiceConfigurationAutoScalingConfiguration,+        ExportableECSServiceField_CurrentServiceConfigurationCpu,+        ExportableECSServiceField_CurrentServiceConfigurationMemory,+        ExportableECSServiceField_CurrentServiceConfigurationTaskDefinitionArn,+        ExportableECSServiceField_CurrentServiceContainerConfigurations,+        ExportableECSServiceField_Finding,+        ExportableECSServiceField_FindingReasonCodes,+        ExportableECSServiceField_LastRefreshTimestamp,+        ExportableECSServiceField_LaunchType,+        ExportableECSServiceField_LookbackPeriodInDays,+        ExportableECSServiceField_RecommendationOptionsContainerRecommendations,+        ExportableECSServiceField_RecommendationOptionsCpu,+        ExportableECSServiceField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+        ExportableECSServiceField_RecommendationOptionsEstimatedMonthlySavingsValue,+        ExportableECSServiceField_RecommendationOptionsMemory,+        ExportableECSServiceField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum,+        ExportableECSServiceField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum,+        ExportableECSServiceField_RecommendationOptionsSavingsOpportunityPercentage,+        ExportableECSServiceField_ServiceArn,+        ExportableECSServiceField_UtilizationMetricsCpuMaximum,+        ExportableECSServiceField_UtilizationMetricsMemoryMaximum+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ExportableECSServiceField = ExportableECSServiceField'+  { fromExportableECSServiceField ::+      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 ExportableECSServiceField_AccountId :: ExportableECSServiceField+pattern ExportableECSServiceField_AccountId = ExportableECSServiceField' "AccountId"++pattern ExportableECSServiceField_CurrentPerformanceRisk :: ExportableECSServiceField+pattern ExportableECSServiceField_CurrentPerformanceRisk = ExportableECSServiceField' "CurrentPerformanceRisk"++pattern ExportableECSServiceField_CurrentServiceConfigurationAutoScalingConfiguration :: ExportableECSServiceField+pattern ExportableECSServiceField_CurrentServiceConfigurationAutoScalingConfiguration = ExportableECSServiceField' "CurrentServiceConfigurationAutoScalingConfiguration"++pattern ExportableECSServiceField_CurrentServiceConfigurationCpu :: ExportableECSServiceField+pattern ExportableECSServiceField_CurrentServiceConfigurationCpu = ExportableECSServiceField' "CurrentServiceConfigurationCpu"++pattern ExportableECSServiceField_CurrentServiceConfigurationMemory :: ExportableECSServiceField+pattern ExportableECSServiceField_CurrentServiceConfigurationMemory = ExportableECSServiceField' "CurrentServiceConfigurationMemory"++pattern ExportableECSServiceField_CurrentServiceConfigurationTaskDefinitionArn :: ExportableECSServiceField+pattern ExportableECSServiceField_CurrentServiceConfigurationTaskDefinitionArn = ExportableECSServiceField' "CurrentServiceConfigurationTaskDefinitionArn"++pattern ExportableECSServiceField_CurrentServiceContainerConfigurations :: ExportableECSServiceField+pattern ExportableECSServiceField_CurrentServiceContainerConfigurations = ExportableECSServiceField' "CurrentServiceContainerConfigurations"++pattern ExportableECSServiceField_Finding :: ExportableECSServiceField+pattern ExportableECSServiceField_Finding = ExportableECSServiceField' "Finding"++pattern ExportableECSServiceField_FindingReasonCodes :: ExportableECSServiceField+pattern ExportableECSServiceField_FindingReasonCodes = ExportableECSServiceField' "FindingReasonCodes"++pattern ExportableECSServiceField_LastRefreshTimestamp :: ExportableECSServiceField+pattern ExportableECSServiceField_LastRefreshTimestamp = ExportableECSServiceField' "LastRefreshTimestamp"++pattern ExportableECSServiceField_LaunchType :: ExportableECSServiceField+pattern ExportableECSServiceField_LaunchType = ExportableECSServiceField' "LaunchType"++pattern ExportableECSServiceField_LookbackPeriodInDays :: ExportableECSServiceField+pattern ExportableECSServiceField_LookbackPeriodInDays = ExportableECSServiceField' "LookbackPeriodInDays"++pattern ExportableECSServiceField_RecommendationOptionsContainerRecommendations :: ExportableECSServiceField+pattern ExportableECSServiceField_RecommendationOptionsContainerRecommendations = ExportableECSServiceField' "RecommendationOptionsContainerRecommendations"++pattern ExportableECSServiceField_RecommendationOptionsCpu :: ExportableECSServiceField+pattern ExportableECSServiceField_RecommendationOptionsCpu = ExportableECSServiceField' "RecommendationOptionsCpu"++pattern ExportableECSServiceField_RecommendationOptionsEstimatedMonthlySavingsCurrency :: ExportableECSServiceField+pattern ExportableECSServiceField_RecommendationOptionsEstimatedMonthlySavingsCurrency = ExportableECSServiceField' "RecommendationOptionsEstimatedMonthlySavingsCurrency"++pattern ExportableECSServiceField_RecommendationOptionsEstimatedMonthlySavingsValue :: ExportableECSServiceField+pattern ExportableECSServiceField_RecommendationOptionsEstimatedMonthlySavingsValue = ExportableECSServiceField' "RecommendationOptionsEstimatedMonthlySavingsValue"++pattern ExportableECSServiceField_RecommendationOptionsMemory :: ExportableECSServiceField+pattern ExportableECSServiceField_RecommendationOptionsMemory = ExportableECSServiceField' "RecommendationOptionsMemory"++pattern ExportableECSServiceField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum :: ExportableECSServiceField+pattern ExportableECSServiceField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum = ExportableECSServiceField' "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum"++pattern ExportableECSServiceField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum :: ExportableECSServiceField+pattern ExportableECSServiceField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum = ExportableECSServiceField' "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum"++pattern ExportableECSServiceField_RecommendationOptionsSavingsOpportunityPercentage :: ExportableECSServiceField+pattern ExportableECSServiceField_RecommendationOptionsSavingsOpportunityPercentage = ExportableECSServiceField' "RecommendationOptionsSavingsOpportunityPercentage"++pattern ExportableECSServiceField_ServiceArn :: ExportableECSServiceField+pattern ExportableECSServiceField_ServiceArn = ExportableECSServiceField' "ServiceArn"++pattern ExportableECSServiceField_UtilizationMetricsCpuMaximum :: ExportableECSServiceField+pattern ExportableECSServiceField_UtilizationMetricsCpuMaximum = ExportableECSServiceField' "UtilizationMetricsCpuMaximum"++pattern ExportableECSServiceField_UtilizationMetricsMemoryMaximum :: ExportableECSServiceField+pattern ExportableECSServiceField_UtilizationMetricsMemoryMaximum = ExportableECSServiceField' "UtilizationMetricsMemoryMaximum"++{-# COMPLETE+  ExportableECSServiceField_AccountId,+  ExportableECSServiceField_CurrentPerformanceRisk,+  ExportableECSServiceField_CurrentServiceConfigurationAutoScalingConfiguration,+  ExportableECSServiceField_CurrentServiceConfigurationCpu,+  ExportableECSServiceField_CurrentServiceConfigurationMemory,+  ExportableECSServiceField_CurrentServiceConfigurationTaskDefinitionArn,+  ExportableECSServiceField_CurrentServiceContainerConfigurations,+  ExportableECSServiceField_Finding,+  ExportableECSServiceField_FindingReasonCodes,+  ExportableECSServiceField_LastRefreshTimestamp,+  ExportableECSServiceField_LaunchType,+  ExportableECSServiceField_LookbackPeriodInDays,+  ExportableECSServiceField_RecommendationOptionsContainerRecommendations,+  ExportableECSServiceField_RecommendationOptionsCpu,+  ExportableECSServiceField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+  ExportableECSServiceField_RecommendationOptionsEstimatedMonthlySavingsValue,+  ExportableECSServiceField_RecommendationOptionsMemory,+  ExportableECSServiceField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum,+  ExportableECSServiceField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum,+  ExportableECSServiceField_RecommendationOptionsSavingsOpportunityPercentage,+  ExportableECSServiceField_ServiceArn,+  ExportableECSServiceField_UtilizationMetricsCpuMaximum,+  ExportableECSServiceField_UtilizationMetricsMemoryMaximum,+  ExportableECSServiceField'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ExportableInstanceField.hs view
@@ -0,0 +1,326 @@+{-# 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.ComputeOptimizer.Types.ExportableInstanceField+-- 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.ComputeOptimizer.Types.ExportableInstanceField+  ( ExportableInstanceField+      ( ..,+        ExportableInstanceField_AccountId,+        ExportableInstanceField_CurrentInstanceType,+        ExportableInstanceField_CurrentMemory,+        ExportableInstanceField_CurrentNetwork,+        ExportableInstanceField_CurrentOnDemandPrice,+        ExportableInstanceField_CurrentPerformanceRisk,+        ExportableInstanceField_CurrentStandardOneYearNoUpfrontReservedPrice,+        ExportableInstanceField_CurrentStandardThreeYearNoUpfrontReservedPrice,+        ExportableInstanceField_CurrentStorage,+        ExportableInstanceField_CurrentVCpus,+        ExportableInstanceField_EffectiveRecommendationPreferencesCpuVendorArchitectures,+        ExportableInstanceField_EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics,+        ExportableInstanceField_EffectiveRecommendationPreferencesExternalMetricsSource,+        ExportableInstanceField_EffectiveRecommendationPreferencesInferredWorkloadTypes,+        ExportableInstanceField_Finding,+        ExportableInstanceField_FindingReasonCodes,+        ExportableInstanceField_InferredWorkloadTypes,+        ExportableInstanceField_InstanceArn,+        ExportableInstanceField_InstanceName,+        ExportableInstanceField_LastRefreshTimestamp,+        ExportableInstanceField_LookbackPeriodInDays,+        ExportableInstanceField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+        ExportableInstanceField_RecommendationOptionsEstimatedMonthlySavingsValue,+        ExportableInstanceField_RecommendationOptionsInstanceType,+        ExportableInstanceField_RecommendationOptionsMemory,+        ExportableInstanceField_RecommendationOptionsMigrationEffort,+        ExportableInstanceField_RecommendationOptionsNetwork,+        ExportableInstanceField_RecommendationOptionsOnDemandPrice,+        ExportableInstanceField_RecommendationOptionsPerformanceRisk,+        ExportableInstanceField_RecommendationOptionsPlatformDifferences,+        ExportableInstanceField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum,+        ExportableInstanceField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum,+        ExportableInstanceField_RecommendationOptionsSavingsOpportunityPercentage,+        ExportableInstanceField_RecommendationOptionsStandardOneYearNoUpfrontReservedPrice,+        ExportableInstanceField_RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice,+        ExportableInstanceField_RecommendationOptionsStorage,+        ExportableInstanceField_RecommendationOptionsVcpus,+        ExportableInstanceField_RecommendationsSourcesRecommendationSourceArn,+        ExportableInstanceField_RecommendationsSourcesRecommendationSourceType,+        ExportableInstanceField_UtilizationMetricsCpuMaximum,+        ExportableInstanceField_UtilizationMetricsDiskReadBytesPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsDiskReadOpsPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsDiskWriteBytesPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsDiskWriteOpsPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsEbsReadBytesPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsEbsReadOpsPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsEbsWriteBytesPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsEbsWriteOpsPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsMemoryMaximum,+        ExportableInstanceField_UtilizationMetricsNetworkInBytesPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsNetworkOutBytesPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsNetworkPacketsInPerSecondMaximum,+        ExportableInstanceField_UtilizationMetricsNetworkPacketsOutPerSecondMaximum+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ExportableInstanceField = ExportableInstanceField'+  { fromExportableInstanceField ::+      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 ExportableInstanceField_AccountId :: ExportableInstanceField+pattern ExportableInstanceField_AccountId = ExportableInstanceField' "AccountId"++pattern ExportableInstanceField_CurrentInstanceType :: ExportableInstanceField+pattern ExportableInstanceField_CurrentInstanceType = ExportableInstanceField' "CurrentInstanceType"++pattern ExportableInstanceField_CurrentMemory :: ExportableInstanceField+pattern ExportableInstanceField_CurrentMemory = ExportableInstanceField' "CurrentMemory"++pattern ExportableInstanceField_CurrentNetwork :: ExportableInstanceField+pattern ExportableInstanceField_CurrentNetwork = ExportableInstanceField' "CurrentNetwork"++pattern ExportableInstanceField_CurrentOnDemandPrice :: ExportableInstanceField+pattern ExportableInstanceField_CurrentOnDemandPrice = ExportableInstanceField' "CurrentOnDemandPrice"++pattern ExportableInstanceField_CurrentPerformanceRisk :: ExportableInstanceField+pattern ExportableInstanceField_CurrentPerformanceRisk = ExportableInstanceField' "CurrentPerformanceRisk"++pattern ExportableInstanceField_CurrentStandardOneYearNoUpfrontReservedPrice :: ExportableInstanceField+pattern ExportableInstanceField_CurrentStandardOneYearNoUpfrontReservedPrice = ExportableInstanceField' "CurrentStandardOneYearNoUpfrontReservedPrice"++pattern ExportableInstanceField_CurrentStandardThreeYearNoUpfrontReservedPrice :: ExportableInstanceField+pattern ExportableInstanceField_CurrentStandardThreeYearNoUpfrontReservedPrice = ExportableInstanceField' "CurrentStandardThreeYearNoUpfrontReservedPrice"++pattern ExportableInstanceField_CurrentStorage :: ExportableInstanceField+pattern ExportableInstanceField_CurrentStorage = ExportableInstanceField' "CurrentStorage"++pattern ExportableInstanceField_CurrentVCpus :: ExportableInstanceField+pattern ExportableInstanceField_CurrentVCpus = ExportableInstanceField' "CurrentVCpus"++pattern ExportableInstanceField_EffectiveRecommendationPreferencesCpuVendorArchitectures :: ExportableInstanceField+pattern ExportableInstanceField_EffectiveRecommendationPreferencesCpuVendorArchitectures = ExportableInstanceField' "EffectiveRecommendationPreferencesCpuVendorArchitectures"++pattern ExportableInstanceField_EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics :: ExportableInstanceField+pattern ExportableInstanceField_EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics = ExportableInstanceField' "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics"++pattern ExportableInstanceField_EffectiveRecommendationPreferencesExternalMetricsSource :: ExportableInstanceField+pattern ExportableInstanceField_EffectiveRecommendationPreferencesExternalMetricsSource = ExportableInstanceField' "EffectiveRecommendationPreferencesExternalMetricsSource"++pattern ExportableInstanceField_EffectiveRecommendationPreferencesInferredWorkloadTypes :: ExportableInstanceField+pattern ExportableInstanceField_EffectiveRecommendationPreferencesInferredWorkloadTypes = ExportableInstanceField' "EffectiveRecommendationPreferencesInferredWorkloadTypes"++pattern ExportableInstanceField_Finding :: ExportableInstanceField+pattern ExportableInstanceField_Finding = ExportableInstanceField' "Finding"++pattern ExportableInstanceField_FindingReasonCodes :: ExportableInstanceField+pattern ExportableInstanceField_FindingReasonCodes = ExportableInstanceField' "FindingReasonCodes"++pattern ExportableInstanceField_InferredWorkloadTypes :: ExportableInstanceField+pattern ExportableInstanceField_InferredWorkloadTypes = ExportableInstanceField' "InferredWorkloadTypes"++pattern ExportableInstanceField_InstanceArn :: ExportableInstanceField+pattern ExportableInstanceField_InstanceArn = ExportableInstanceField' "InstanceArn"++pattern ExportableInstanceField_InstanceName :: ExportableInstanceField+pattern ExportableInstanceField_InstanceName = ExportableInstanceField' "InstanceName"++pattern ExportableInstanceField_LastRefreshTimestamp :: ExportableInstanceField+pattern ExportableInstanceField_LastRefreshTimestamp = ExportableInstanceField' "LastRefreshTimestamp"++pattern ExportableInstanceField_LookbackPeriodInDays :: ExportableInstanceField+pattern ExportableInstanceField_LookbackPeriodInDays = ExportableInstanceField' "LookbackPeriodInDays"++pattern ExportableInstanceField_RecommendationOptionsEstimatedMonthlySavingsCurrency :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsEstimatedMonthlySavingsCurrency = ExportableInstanceField' "RecommendationOptionsEstimatedMonthlySavingsCurrency"++pattern ExportableInstanceField_RecommendationOptionsEstimatedMonthlySavingsValue :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsEstimatedMonthlySavingsValue = ExportableInstanceField' "RecommendationOptionsEstimatedMonthlySavingsValue"++pattern ExportableInstanceField_RecommendationOptionsInstanceType :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsInstanceType = ExportableInstanceField' "RecommendationOptionsInstanceType"++pattern ExportableInstanceField_RecommendationOptionsMemory :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsMemory = ExportableInstanceField' "RecommendationOptionsMemory"++pattern ExportableInstanceField_RecommendationOptionsMigrationEffort :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsMigrationEffort = ExportableInstanceField' "RecommendationOptionsMigrationEffort"++pattern ExportableInstanceField_RecommendationOptionsNetwork :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsNetwork = ExportableInstanceField' "RecommendationOptionsNetwork"++pattern ExportableInstanceField_RecommendationOptionsOnDemandPrice :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsOnDemandPrice = ExportableInstanceField' "RecommendationOptionsOnDemandPrice"++pattern ExportableInstanceField_RecommendationOptionsPerformanceRisk :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsPerformanceRisk = ExportableInstanceField' "RecommendationOptionsPerformanceRisk"++pattern ExportableInstanceField_RecommendationOptionsPlatformDifferences :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsPlatformDifferences = ExportableInstanceField' "RecommendationOptionsPlatformDifferences"++pattern ExportableInstanceField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum = ExportableInstanceField' "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum"++pattern ExportableInstanceField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum = ExportableInstanceField' "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum"++pattern ExportableInstanceField_RecommendationOptionsSavingsOpportunityPercentage :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsSavingsOpportunityPercentage = ExportableInstanceField' "RecommendationOptionsSavingsOpportunityPercentage"++pattern ExportableInstanceField_RecommendationOptionsStandardOneYearNoUpfrontReservedPrice :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsStandardOneYearNoUpfrontReservedPrice = ExportableInstanceField' "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice"++pattern ExportableInstanceField_RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice = ExportableInstanceField' "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice"++pattern ExportableInstanceField_RecommendationOptionsStorage :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsStorage = ExportableInstanceField' "RecommendationOptionsStorage"++pattern ExportableInstanceField_RecommendationOptionsVcpus :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationOptionsVcpus = ExportableInstanceField' "RecommendationOptionsVcpus"++pattern ExportableInstanceField_RecommendationsSourcesRecommendationSourceArn :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationsSourcesRecommendationSourceArn = ExportableInstanceField' "RecommendationsSourcesRecommendationSourceArn"++pattern ExportableInstanceField_RecommendationsSourcesRecommendationSourceType :: ExportableInstanceField+pattern ExportableInstanceField_RecommendationsSourcesRecommendationSourceType = ExportableInstanceField' "RecommendationsSourcesRecommendationSourceType"++pattern ExportableInstanceField_UtilizationMetricsCpuMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsCpuMaximum = ExportableInstanceField' "UtilizationMetricsCpuMaximum"++pattern ExportableInstanceField_UtilizationMetricsDiskReadBytesPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsDiskReadBytesPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsDiskReadBytesPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsDiskReadOpsPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsDiskReadOpsPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsDiskReadOpsPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsDiskWriteBytesPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsDiskWriteBytesPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsDiskWriteBytesPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsDiskWriteOpsPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsDiskWriteOpsPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsDiskWriteOpsPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsEbsReadBytesPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsEbsReadBytesPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsEbsReadBytesPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsEbsReadOpsPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsEbsReadOpsPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsEbsReadOpsPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsEbsWriteBytesPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsEbsWriteBytesPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsEbsWriteBytesPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsEbsWriteOpsPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsEbsWriteOpsPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsEbsWriteOpsPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsMemoryMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsMemoryMaximum = ExportableInstanceField' "UtilizationMetricsMemoryMaximum"++pattern ExportableInstanceField_UtilizationMetricsNetworkInBytesPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsNetworkInBytesPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsNetworkInBytesPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsNetworkOutBytesPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsNetworkOutBytesPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsNetworkOutBytesPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsNetworkPacketsInPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsNetworkPacketsInPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsNetworkPacketsInPerSecondMaximum"++pattern ExportableInstanceField_UtilizationMetricsNetworkPacketsOutPerSecondMaximum :: ExportableInstanceField+pattern ExportableInstanceField_UtilizationMetricsNetworkPacketsOutPerSecondMaximum = ExportableInstanceField' "UtilizationMetricsNetworkPacketsOutPerSecondMaximum"++{-# COMPLETE+  ExportableInstanceField_AccountId,+  ExportableInstanceField_CurrentInstanceType,+  ExportableInstanceField_CurrentMemory,+  ExportableInstanceField_CurrentNetwork,+  ExportableInstanceField_CurrentOnDemandPrice,+  ExportableInstanceField_CurrentPerformanceRisk,+  ExportableInstanceField_CurrentStandardOneYearNoUpfrontReservedPrice,+  ExportableInstanceField_CurrentStandardThreeYearNoUpfrontReservedPrice,+  ExportableInstanceField_CurrentStorage,+  ExportableInstanceField_CurrentVCpus,+  ExportableInstanceField_EffectiveRecommendationPreferencesCpuVendorArchitectures,+  ExportableInstanceField_EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics,+  ExportableInstanceField_EffectiveRecommendationPreferencesExternalMetricsSource,+  ExportableInstanceField_EffectiveRecommendationPreferencesInferredWorkloadTypes,+  ExportableInstanceField_Finding,+  ExportableInstanceField_FindingReasonCodes,+  ExportableInstanceField_InferredWorkloadTypes,+  ExportableInstanceField_InstanceArn,+  ExportableInstanceField_InstanceName,+  ExportableInstanceField_LastRefreshTimestamp,+  ExportableInstanceField_LookbackPeriodInDays,+  ExportableInstanceField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+  ExportableInstanceField_RecommendationOptionsEstimatedMonthlySavingsValue,+  ExportableInstanceField_RecommendationOptionsInstanceType,+  ExportableInstanceField_RecommendationOptionsMemory,+  ExportableInstanceField_RecommendationOptionsMigrationEffort,+  ExportableInstanceField_RecommendationOptionsNetwork,+  ExportableInstanceField_RecommendationOptionsOnDemandPrice,+  ExportableInstanceField_RecommendationOptionsPerformanceRisk,+  ExportableInstanceField_RecommendationOptionsPlatformDifferences,+  ExportableInstanceField_RecommendationOptionsProjectedUtilizationMetricsCpuMaximum,+  ExportableInstanceField_RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum,+  ExportableInstanceField_RecommendationOptionsSavingsOpportunityPercentage,+  ExportableInstanceField_RecommendationOptionsStandardOneYearNoUpfrontReservedPrice,+  ExportableInstanceField_RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice,+  ExportableInstanceField_RecommendationOptionsStorage,+  ExportableInstanceField_RecommendationOptionsVcpus,+  ExportableInstanceField_RecommendationsSourcesRecommendationSourceArn,+  ExportableInstanceField_RecommendationsSourcesRecommendationSourceType,+  ExportableInstanceField_UtilizationMetricsCpuMaximum,+  ExportableInstanceField_UtilizationMetricsDiskReadBytesPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsDiskReadOpsPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsDiskWriteBytesPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsDiskWriteOpsPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsEbsReadBytesPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsEbsReadOpsPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsEbsWriteBytesPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsEbsWriteOpsPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsMemoryMaximum,+  ExportableInstanceField_UtilizationMetricsNetworkInBytesPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsNetworkOutBytesPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsNetworkPacketsInPerSecondMaximum,+  ExportableInstanceField_UtilizationMetricsNetworkPacketsOutPerSecondMaximum,+  ExportableInstanceField'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ExportableLambdaFunctionField.hs view
@@ -0,0 +1,191 @@+{-# 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.ComputeOptimizer.Types.ExportableLambdaFunctionField+-- 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.ComputeOptimizer.Types.ExportableLambdaFunctionField+  ( ExportableLambdaFunctionField+      ( ..,+        ExportableLambdaFunctionField_AccountId,+        ExportableLambdaFunctionField_CurrentConfigurationMemorySize,+        ExportableLambdaFunctionField_CurrentConfigurationTimeout,+        ExportableLambdaFunctionField_CurrentCostAverage,+        ExportableLambdaFunctionField_CurrentCostTotal,+        ExportableLambdaFunctionField_CurrentPerformanceRisk,+        ExportableLambdaFunctionField_Finding,+        ExportableLambdaFunctionField_FindingReasonCodes,+        ExportableLambdaFunctionField_FunctionArn,+        ExportableLambdaFunctionField_FunctionVersion,+        ExportableLambdaFunctionField_LastRefreshTimestamp,+        ExportableLambdaFunctionField_LookbackPeriodInDays,+        ExportableLambdaFunctionField_NumberOfInvocations,+        ExportableLambdaFunctionField_RecommendationOptionsConfigurationMemorySize,+        ExportableLambdaFunctionField_RecommendationOptionsCostHigh,+        ExportableLambdaFunctionField_RecommendationOptionsCostLow,+        ExportableLambdaFunctionField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+        ExportableLambdaFunctionField_RecommendationOptionsEstimatedMonthlySavingsValue,+        ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationExpected,+        ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationLowerBound,+        ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationUpperBound,+        ExportableLambdaFunctionField_RecommendationOptionsSavingsOpportunityPercentage,+        ExportableLambdaFunctionField_UtilizationMetricsDurationAverage,+        ExportableLambdaFunctionField_UtilizationMetricsDurationMaximum,+        ExportableLambdaFunctionField_UtilizationMetricsMemoryAverage,+        ExportableLambdaFunctionField_UtilizationMetricsMemoryMaximum+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ExportableLambdaFunctionField = ExportableLambdaFunctionField'+  { fromExportableLambdaFunctionField ::+      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 ExportableLambdaFunctionField_AccountId :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_AccountId = ExportableLambdaFunctionField' "AccountId"++pattern ExportableLambdaFunctionField_CurrentConfigurationMemorySize :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_CurrentConfigurationMemorySize = ExportableLambdaFunctionField' "CurrentConfigurationMemorySize"++pattern ExportableLambdaFunctionField_CurrentConfigurationTimeout :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_CurrentConfigurationTimeout = ExportableLambdaFunctionField' "CurrentConfigurationTimeout"++pattern ExportableLambdaFunctionField_CurrentCostAverage :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_CurrentCostAverage = ExportableLambdaFunctionField' "CurrentCostAverage"++pattern ExportableLambdaFunctionField_CurrentCostTotal :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_CurrentCostTotal = ExportableLambdaFunctionField' "CurrentCostTotal"++pattern ExportableLambdaFunctionField_CurrentPerformanceRisk :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_CurrentPerformanceRisk = ExportableLambdaFunctionField' "CurrentPerformanceRisk"++pattern ExportableLambdaFunctionField_Finding :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_Finding = ExportableLambdaFunctionField' "Finding"++pattern ExportableLambdaFunctionField_FindingReasonCodes :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_FindingReasonCodes = ExportableLambdaFunctionField' "FindingReasonCodes"++pattern ExportableLambdaFunctionField_FunctionArn :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_FunctionArn = ExportableLambdaFunctionField' "FunctionArn"++pattern ExportableLambdaFunctionField_FunctionVersion :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_FunctionVersion = ExportableLambdaFunctionField' "FunctionVersion"++pattern ExportableLambdaFunctionField_LastRefreshTimestamp :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_LastRefreshTimestamp = ExportableLambdaFunctionField' "LastRefreshTimestamp"++pattern ExportableLambdaFunctionField_LookbackPeriodInDays :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_LookbackPeriodInDays = ExportableLambdaFunctionField' "LookbackPeriodInDays"++pattern ExportableLambdaFunctionField_NumberOfInvocations :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_NumberOfInvocations = ExportableLambdaFunctionField' "NumberOfInvocations"++pattern ExportableLambdaFunctionField_RecommendationOptionsConfigurationMemorySize :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_RecommendationOptionsConfigurationMemorySize = ExportableLambdaFunctionField' "RecommendationOptionsConfigurationMemorySize"++pattern ExportableLambdaFunctionField_RecommendationOptionsCostHigh :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_RecommendationOptionsCostHigh = ExportableLambdaFunctionField' "RecommendationOptionsCostHigh"++pattern ExportableLambdaFunctionField_RecommendationOptionsCostLow :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_RecommendationOptionsCostLow = ExportableLambdaFunctionField' "RecommendationOptionsCostLow"++pattern ExportableLambdaFunctionField_RecommendationOptionsEstimatedMonthlySavingsCurrency :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_RecommendationOptionsEstimatedMonthlySavingsCurrency = ExportableLambdaFunctionField' "RecommendationOptionsEstimatedMonthlySavingsCurrency"++pattern ExportableLambdaFunctionField_RecommendationOptionsEstimatedMonthlySavingsValue :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_RecommendationOptionsEstimatedMonthlySavingsValue = ExportableLambdaFunctionField' "RecommendationOptionsEstimatedMonthlySavingsValue"++pattern ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationExpected :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationExpected = ExportableLambdaFunctionField' "RecommendationOptionsProjectedUtilizationMetricsDurationExpected"++pattern ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationLowerBound :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationLowerBound = ExportableLambdaFunctionField' "RecommendationOptionsProjectedUtilizationMetricsDurationLowerBound"++pattern ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationUpperBound :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationUpperBound = ExportableLambdaFunctionField' "RecommendationOptionsProjectedUtilizationMetricsDurationUpperBound"++pattern ExportableLambdaFunctionField_RecommendationOptionsSavingsOpportunityPercentage :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_RecommendationOptionsSavingsOpportunityPercentage = ExportableLambdaFunctionField' "RecommendationOptionsSavingsOpportunityPercentage"++pattern ExportableLambdaFunctionField_UtilizationMetricsDurationAverage :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_UtilizationMetricsDurationAverage = ExportableLambdaFunctionField' "UtilizationMetricsDurationAverage"++pattern ExportableLambdaFunctionField_UtilizationMetricsDurationMaximum :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_UtilizationMetricsDurationMaximum = ExportableLambdaFunctionField' "UtilizationMetricsDurationMaximum"++pattern ExportableLambdaFunctionField_UtilizationMetricsMemoryAverage :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_UtilizationMetricsMemoryAverage = ExportableLambdaFunctionField' "UtilizationMetricsMemoryAverage"++pattern ExportableLambdaFunctionField_UtilizationMetricsMemoryMaximum :: ExportableLambdaFunctionField+pattern ExportableLambdaFunctionField_UtilizationMetricsMemoryMaximum = ExportableLambdaFunctionField' "UtilizationMetricsMemoryMaximum"++{-# COMPLETE+  ExportableLambdaFunctionField_AccountId,+  ExportableLambdaFunctionField_CurrentConfigurationMemorySize,+  ExportableLambdaFunctionField_CurrentConfigurationTimeout,+  ExportableLambdaFunctionField_CurrentCostAverage,+  ExportableLambdaFunctionField_CurrentCostTotal,+  ExportableLambdaFunctionField_CurrentPerformanceRisk,+  ExportableLambdaFunctionField_Finding,+  ExportableLambdaFunctionField_FindingReasonCodes,+  ExportableLambdaFunctionField_FunctionArn,+  ExportableLambdaFunctionField_FunctionVersion,+  ExportableLambdaFunctionField_LastRefreshTimestamp,+  ExportableLambdaFunctionField_LookbackPeriodInDays,+  ExportableLambdaFunctionField_NumberOfInvocations,+  ExportableLambdaFunctionField_RecommendationOptionsConfigurationMemorySize,+  ExportableLambdaFunctionField_RecommendationOptionsCostHigh,+  ExportableLambdaFunctionField_RecommendationOptionsCostLow,+  ExportableLambdaFunctionField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+  ExportableLambdaFunctionField_RecommendationOptionsEstimatedMonthlySavingsValue,+  ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationExpected,+  ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationLowerBound,+  ExportableLambdaFunctionField_RecommendationOptionsProjectedUtilizationMetricsDurationUpperBound,+  ExportableLambdaFunctionField_RecommendationOptionsSavingsOpportunityPercentage,+  ExportableLambdaFunctionField_UtilizationMetricsDurationAverage,+  ExportableLambdaFunctionField_UtilizationMetricsDurationMaximum,+  ExportableLambdaFunctionField_UtilizationMetricsMemoryAverage,+  ExportableLambdaFunctionField_UtilizationMetricsMemoryMaximum,+  ExportableLambdaFunctionField'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ExportableVolumeField.hs view
@@ -0,0 +1,201 @@+{-# 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.ComputeOptimizer.Types.ExportableVolumeField+-- 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.ComputeOptimizer.Types.ExportableVolumeField+  ( ExportableVolumeField+      ( ..,+        ExportableVolumeField_AccountId,+        ExportableVolumeField_CurrentConfigurationVolumeBaselineIOPS,+        ExportableVolumeField_CurrentConfigurationVolumeBaselineThroughput,+        ExportableVolumeField_CurrentConfigurationVolumeBurstIOPS,+        ExportableVolumeField_CurrentConfigurationVolumeBurstThroughput,+        ExportableVolumeField_CurrentConfigurationVolumeSize,+        ExportableVolumeField_CurrentConfigurationVolumeType,+        ExportableVolumeField_CurrentMonthlyPrice,+        ExportableVolumeField_CurrentPerformanceRisk,+        ExportableVolumeField_Finding,+        ExportableVolumeField_LastRefreshTimestamp,+        ExportableVolumeField_LookbackPeriodInDays,+        ExportableVolumeField_RecommendationOptionsConfigurationVolumeBaselineIOPS,+        ExportableVolumeField_RecommendationOptionsConfigurationVolumeBaselineThroughput,+        ExportableVolumeField_RecommendationOptionsConfigurationVolumeBurstIOPS,+        ExportableVolumeField_RecommendationOptionsConfigurationVolumeBurstThroughput,+        ExportableVolumeField_RecommendationOptionsConfigurationVolumeSize,+        ExportableVolumeField_RecommendationOptionsConfigurationVolumeType,+        ExportableVolumeField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+        ExportableVolumeField_RecommendationOptionsEstimatedMonthlySavingsValue,+        ExportableVolumeField_RecommendationOptionsMonthlyPrice,+        ExportableVolumeField_RecommendationOptionsPerformanceRisk,+        ExportableVolumeField_RecommendationOptionsSavingsOpportunityPercentage,+        ExportableVolumeField_UtilizationMetricsVolumeReadBytesPerSecondMaximum,+        ExportableVolumeField_UtilizationMetricsVolumeReadOpsPerSecondMaximum,+        ExportableVolumeField_UtilizationMetricsVolumeWriteBytesPerSecondMaximum,+        ExportableVolumeField_UtilizationMetricsVolumeWriteOpsPerSecondMaximum,+        ExportableVolumeField_VolumeArn+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ExportableVolumeField = ExportableVolumeField'+  { fromExportableVolumeField ::+      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 ExportableVolumeField_AccountId :: ExportableVolumeField+pattern ExportableVolumeField_AccountId = ExportableVolumeField' "AccountId"++pattern ExportableVolumeField_CurrentConfigurationVolumeBaselineIOPS :: ExportableVolumeField+pattern ExportableVolumeField_CurrentConfigurationVolumeBaselineIOPS = ExportableVolumeField' "CurrentConfigurationVolumeBaselineIOPS"++pattern ExportableVolumeField_CurrentConfigurationVolumeBaselineThroughput :: ExportableVolumeField+pattern ExportableVolumeField_CurrentConfigurationVolumeBaselineThroughput = ExportableVolumeField' "CurrentConfigurationVolumeBaselineThroughput"++pattern ExportableVolumeField_CurrentConfigurationVolumeBurstIOPS :: ExportableVolumeField+pattern ExportableVolumeField_CurrentConfigurationVolumeBurstIOPS = ExportableVolumeField' "CurrentConfigurationVolumeBurstIOPS"++pattern ExportableVolumeField_CurrentConfigurationVolumeBurstThroughput :: ExportableVolumeField+pattern ExportableVolumeField_CurrentConfigurationVolumeBurstThroughput = ExportableVolumeField' "CurrentConfigurationVolumeBurstThroughput"++pattern ExportableVolumeField_CurrentConfigurationVolumeSize :: ExportableVolumeField+pattern ExportableVolumeField_CurrentConfigurationVolumeSize = ExportableVolumeField' "CurrentConfigurationVolumeSize"++pattern ExportableVolumeField_CurrentConfigurationVolumeType :: ExportableVolumeField+pattern ExportableVolumeField_CurrentConfigurationVolumeType = ExportableVolumeField' "CurrentConfigurationVolumeType"++pattern ExportableVolumeField_CurrentMonthlyPrice :: ExportableVolumeField+pattern ExportableVolumeField_CurrentMonthlyPrice = ExportableVolumeField' "CurrentMonthlyPrice"++pattern ExportableVolumeField_CurrentPerformanceRisk :: ExportableVolumeField+pattern ExportableVolumeField_CurrentPerformanceRisk = ExportableVolumeField' "CurrentPerformanceRisk"++pattern ExportableVolumeField_Finding :: ExportableVolumeField+pattern ExportableVolumeField_Finding = ExportableVolumeField' "Finding"++pattern ExportableVolumeField_LastRefreshTimestamp :: ExportableVolumeField+pattern ExportableVolumeField_LastRefreshTimestamp = ExportableVolumeField' "LastRefreshTimestamp"++pattern ExportableVolumeField_LookbackPeriodInDays :: ExportableVolumeField+pattern ExportableVolumeField_LookbackPeriodInDays = ExportableVolumeField' "LookbackPeriodInDays"++pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeBaselineIOPS :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeBaselineIOPS = ExportableVolumeField' "RecommendationOptionsConfigurationVolumeBaselineIOPS"++pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeBaselineThroughput :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeBaselineThroughput = ExportableVolumeField' "RecommendationOptionsConfigurationVolumeBaselineThroughput"++pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeBurstIOPS :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeBurstIOPS = ExportableVolumeField' "RecommendationOptionsConfigurationVolumeBurstIOPS"++pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeBurstThroughput :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeBurstThroughput = ExportableVolumeField' "RecommendationOptionsConfigurationVolumeBurstThroughput"++pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeSize :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeSize = ExportableVolumeField' "RecommendationOptionsConfigurationVolumeSize"++pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeType :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsConfigurationVolumeType = ExportableVolumeField' "RecommendationOptionsConfigurationVolumeType"++pattern ExportableVolumeField_RecommendationOptionsEstimatedMonthlySavingsCurrency :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsEstimatedMonthlySavingsCurrency = ExportableVolumeField' "RecommendationOptionsEstimatedMonthlySavingsCurrency"++pattern ExportableVolumeField_RecommendationOptionsEstimatedMonthlySavingsValue :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsEstimatedMonthlySavingsValue = ExportableVolumeField' "RecommendationOptionsEstimatedMonthlySavingsValue"++pattern ExportableVolumeField_RecommendationOptionsMonthlyPrice :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsMonthlyPrice = ExportableVolumeField' "RecommendationOptionsMonthlyPrice"++pattern ExportableVolumeField_RecommendationOptionsPerformanceRisk :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsPerformanceRisk = ExportableVolumeField' "RecommendationOptionsPerformanceRisk"++pattern ExportableVolumeField_RecommendationOptionsSavingsOpportunityPercentage :: ExportableVolumeField+pattern ExportableVolumeField_RecommendationOptionsSavingsOpportunityPercentage = ExportableVolumeField' "RecommendationOptionsSavingsOpportunityPercentage"++pattern ExportableVolumeField_UtilizationMetricsVolumeReadBytesPerSecondMaximum :: ExportableVolumeField+pattern ExportableVolumeField_UtilizationMetricsVolumeReadBytesPerSecondMaximum = ExportableVolumeField' "UtilizationMetricsVolumeReadBytesPerSecondMaximum"++pattern ExportableVolumeField_UtilizationMetricsVolumeReadOpsPerSecondMaximum :: ExportableVolumeField+pattern ExportableVolumeField_UtilizationMetricsVolumeReadOpsPerSecondMaximum = ExportableVolumeField' "UtilizationMetricsVolumeReadOpsPerSecondMaximum"++pattern ExportableVolumeField_UtilizationMetricsVolumeWriteBytesPerSecondMaximum :: ExportableVolumeField+pattern ExportableVolumeField_UtilizationMetricsVolumeWriteBytesPerSecondMaximum = ExportableVolumeField' "UtilizationMetricsVolumeWriteBytesPerSecondMaximum"++pattern ExportableVolumeField_UtilizationMetricsVolumeWriteOpsPerSecondMaximum :: ExportableVolumeField+pattern ExportableVolumeField_UtilizationMetricsVolumeWriteOpsPerSecondMaximum = ExportableVolumeField' "UtilizationMetricsVolumeWriteOpsPerSecondMaximum"++pattern ExportableVolumeField_VolumeArn :: ExportableVolumeField+pattern ExportableVolumeField_VolumeArn = ExportableVolumeField' "VolumeArn"++{-# COMPLETE+  ExportableVolumeField_AccountId,+  ExportableVolumeField_CurrentConfigurationVolumeBaselineIOPS,+  ExportableVolumeField_CurrentConfigurationVolumeBaselineThroughput,+  ExportableVolumeField_CurrentConfigurationVolumeBurstIOPS,+  ExportableVolumeField_CurrentConfigurationVolumeBurstThroughput,+  ExportableVolumeField_CurrentConfigurationVolumeSize,+  ExportableVolumeField_CurrentConfigurationVolumeType,+  ExportableVolumeField_CurrentMonthlyPrice,+  ExportableVolumeField_CurrentPerformanceRisk,+  ExportableVolumeField_Finding,+  ExportableVolumeField_LastRefreshTimestamp,+  ExportableVolumeField_LookbackPeriodInDays,+  ExportableVolumeField_RecommendationOptionsConfigurationVolumeBaselineIOPS,+  ExportableVolumeField_RecommendationOptionsConfigurationVolumeBaselineThroughput,+  ExportableVolumeField_RecommendationOptionsConfigurationVolumeBurstIOPS,+  ExportableVolumeField_RecommendationOptionsConfigurationVolumeBurstThroughput,+  ExportableVolumeField_RecommendationOptionsConfigurationVolumeSize,+  ExportableVolumeField_RecommendationOptionsConfigurationVolumeType,+  ExportableVolumeField_RecommendationOptionsEstimatedMonthlySavingsCurrency,+  ExportableVolumeField_RecommendationOptionsEstimatedMonthlySavingsValue,+  ExportableVolumeField_RecommendationOptionsMonthlyPrice,+  ExportableVolumeField_RecommendationOptionsPerformanceRisk,+  ExportableVolumeField_RecommendationOptionsSavingsOpportunityPercentage,+  ExportableVolumeField_UtilizationMetricsVolumeReadBytesPerSecondMaximum,+  ExportableVolumeField_UtilizationMetricsVolumeReadOpsPerSecondMaximum,+  ExportableVolumeField_UtilizationMetricsVolumeWriteBytesPerSecondMaximum,+  ExportableVolumeField_UtilizationMetricsVolumeWriteOpsPerSecondMaximum,+  ExportableVolumeField_VolumeArn,+  ExportableVolumeField'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ExternalMetricsPreference.hs view
@@ -0,0 +1,81 @@+{-# 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.ComputeOptimizer.Types.ExternalMetricsPreference+-- 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.ComputeOptimizer.Types.ExternalMetricsPreference where++import Amazonka.ComputeOptimizer.Types.ExternalMetricsSource+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the external metrics preferences for EC2 rightsizing+-- recommendations.+--+-- /See:/ 'newExternalMetricsPreference' smart constructor.+data ExternalMetricsPreference = ExternalMetricsPreference'+  { -- | Contains the source options for external metrics preferences.+    source :: Prelude.Maybe ExternalMetricsSource+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExternalMetricsPreference' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'source', 'externalMetricsPreference_source' - Contains the source options for external metrics preferences.+newExternalMetricsPreference ::+  ExternalMetricsPreference+newExternalMetricsPreference =+  ExternalMetricsPreference'+    { source =+        Prelude.Nothing+    }++-- | Contains the source options for external metrics preferences.+externalMetricsPreference_source :: Lens.Lens' ExternalMetricsPreference (Prelude.Maybe ExternalMetricsSource)+externalMetricsPreference_source = Lens.lens (\ExternalMetricsPreference' {source} -> source) (\s@ExternalMetricsPreference' {} a -> s {source = a} :: ExternalMetricsPreference)++instance Data.FromJSON ExternalMetricsPreference where+  parseJSON =+    Data.withObject+      "ExternalMetricsPreference"+      ( \x ->+          ExternalMetricsPreference'+            Prelude.<$> (x Data..:? "source")+      )++instance Prelude.Hashable ExternalMetricsPreference where+  hashWithSalt _salt ExternalMetricsPreference' {..} =+    _salt `Prelude.hashWithSalt` source++instance Prelude.NFData ExternalMetricsPreference where+  rnf ExternalMetricsPreference' {..} =+    Prelude.rnf source++instance Data.ToJSON ExternalMetricsPreference where+  toJSON ExternalMetricsPreference' {..} =+    Data.object+      ( Prelude.catMaybes+          [("source" Data..=) Prelude.<$> source]+      )
+ gen/Amazonka/ComputeOptimizer/Types/ExternalMetricsSource.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.ComputeOptimizer.Types.ExternalMetricsSource+-- 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.ComputeOptimizer.Types.ExternalMetricsSource+  ( ExternalMetricsSource+      ( ..,+        ExternalMetricsSource_Datadog,+        ExternalMetricsSource_Dynatrace,+        ExternalMetricsSource_Instana,+        ExternalMetricsSource_NewRelic+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ExternalMetricsSource = ExternalMetricsSource'+  { fromExternalMetricsSource ::+      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 ExternalMetricsSource_Datadog :: ExternalMetricsSource+pattern ExternalMetricsSource_Datadog = ExternalMetricsSource' "Datadog"++pattern ExternalMetricsSource_Dynatrace :: ExternalMetricsSource+pattern ExternalMetricsSource_Dynatrace = ExternalMetricsSource' "Dynatrace"++pattern ExternalMetricsSource_Instana :: ExternalMetricsSource+pattern ExternalMetricsSource_Instana = ExternalMetricsSource' "Instana"++pattern ExternalMetricsSource_NewRelic :: ExternalMetricsSource+pattern ExternalMetricsSource_NewRelic = ExternalMetricsSource' "NewRelic"++{-# COMPLETE+  ExternalMetricsSource_Datadog,+  ExternalMetricsSource_Dynatrace,+  ExternalMetricsSource_Instana,+  ExternalMetricsSource_NewRelic,+  ExternalMetricsSource'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/FileFormat.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.ComputeOptimizer.Types.FileFormat+-- 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.ComputeOptimizer.Types.FileFormat+  ( FileFormat+      ( ..,+        FileFormat_Csv+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FileFormat = FileFormat'+  { fromFileFormat ::+      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 FileFormat_Csv :: FileFormat+pattern FileFormat_Csv = FileFormat' "Csv"++{-# COMPLETE+  FileFormat_Csv,+  FileFormat'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/Filter.hs view
@@ -0,0 +1,393 @@+{-# 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.ComputeOptimizer.Types.Filter+-- 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.ComputeOptimizer.Types.Filter where++import Amazonka.ComputeOptimizer.Types.FilterName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a filter that returns a more specific list of recommendations.+-- Use this filter with the GetAutoScalingGroupRecommendations and+-- GetEC2InstanceRecommendations actions.+--+-- You can use @EBSFilter@ with the GetEBSVolumeRecommendations action,+-- @LambdaFunctionRecommendationFilter@ with the+-- GetLambdaFunctionRecommendations action, and @JobFilter@ with the+-- DescribeRecommendationExportJobs action.+--+-- /See:/ 'newFilter' smart constructor.+data Filter = Filter'+  { -- | The name of the filter.+    --+    -- Specify @Finding@ to return recommendations with a specific finding+    -- classification (for example, @Underprovisioned@).+    --+    -- Specify @RecommendationSourceType@ to return recommendations of a+    -- specific resource type (for example, @Ec2Instance@).+    --+    -- Specify @FindingReasonCodes@ to return recommendations with a specific+    -- finding reason code (for example, @CPUUnderprovisioned@).+    name :: Prelude.Maybe FilterName,+    -- | The value of the filter.+    --+    -- The valid values for this parameter are as follows, depending on what+    -- you specify for the @name@ parameter and the resource type that you wish+    -- to filter results for:+    --+    -- -   Specify @Optimized@ or @NotOptimized@ if you specify the @name@+    --     parameter as @Finding@ and you want to filter results for Auto+    --     Scaling groups.+    --+    -- -   Specify @Underprovisioned@, @Overprovisioned@, or @Optimized@ if you+    --     specify the @name@ parameter as @Finding@ and you want to filter+    --     results for EC2 instances.+    --+    -- -   Specify @Ec2Instance@ or @AutoScalingGroup@ if you specify the+    --     @name@ parameter as @RecommendationSourceType@.+    --+    -- -   Specify one of the following options if you specify the @name@+    --     parameter as @FindingReasonCodes@:+    --+    --     -   __@CPUOverprovisioned@__ — The instance’s CPU configuration can+    --         be sized down while still meeting the performance requirements+    --         of your workload.+    --+    --     -   __@CPUUnderprovisioned@__ — The instance’s CPU configuration+    --         doesn\'t meet the performance requirements of your workload and+    --         there is an alternative instance type that provides better CPU+    --         performance.+    --+    --     -   __@MemoryOverprovisioned@__ — The instance’s memory+    --         configuration can be sized down while still meeting the+    --         performance requirements of your workload.+    --+    --     -   __@MemoryUnderprovisioned@__ — The instance’s memory+    --         configuration doesn\'t meet the performance requirements of your+    --         workload and there is an alternative instance type that provides+    --         better memory performance.+    --+    --     -   __@EBSThroughputOverprovisioned@__ — The instance’s EBS+    --         throughput configuration can be sized down while still meeting+    --         the performance requirements of your workload.+    --+    --     -   __@EBSThroughputUnderprovisioned@__ — The instance’s EBS+    --         throughput configuration doesn\'t meet the performance+    --         requirements of your workload and there is an alternative+    --         instance type that provides better EBS throughput performance.+    --+    --     -   __@EBSIOPSOverprovisioned@__ — The instance’s EBS IOPS+    --         configuration can be sized down while still meeting the+    --         performance requirements of your workload.+    --+    --     -   __@EBSIOPSUnderprovisioned@__ — The instance’s EBS IOPS+    --         configuration doesn\'t meet the performance requirements of your+    --         workload and there is an alternative instance type that provides+    --         better EBS IOPS performance.+    --+    --     -   __@NetworkBandwidthOverprovisioned@__ — The instance’s network+    --         bandwidth configuration can be sized down while still meeting+    --         the performance requirements of your workload.+    --+    --     -   __@NetworkBandwidthUnderprovisioned@__ — The instance’s network+    --         bandwidth configuration doesn\'t meet the performance+    --         requirements of your workload and there is an alternative+    --         instance type that provides better network bandwidth+    --         performance. This finding reason happens when the @NetworkIn@ or+    --         @NetworkOut@ performance of an instance is impacted.+    --+    --     -   __@NetworkPPSOverprovisioned@__ — The instance’s network PPS+    --         (packets per second) configuration can be sized down while still+    --         meeting the performance requirements of your workload.+    --+    --     -   __@NetworkPPSUnderprovisioned@__ — The instance’s network PPS+    --         (packets per second) configuration doesn\'t meet the performance+    --         requirements of your workload and there is an alternative+    --         instance type that provides better network PPS performance.+    --+    --     -   __@DiskIOPSOverprovisioned@__ — The instance’s disk IOPS+    --         configuration can be sized down while still meeting the+    --         performance requirements of your workload.+    --+    --     -   __@DiskIOPSUnderprovisioned@__ — The instance’s disk IOPS+    --         configuration doesn\'t meet the performance requirements of your+    --         workload and there is an alternative instance type that provides+    --         better disk IOPS performance.+    --+    --     -   __@DiskThroughputOverprovisioned@__ — The instance’s disk+    --         throughput configuration can be sized down while still meeting+    --         the performance requirements of your workload.+    --+    --     -   __@DiskThroughputUnderprovisioned@__ — The instance’s disk+    --         throughput configuration doesn\'t meet the performance+    --         requirements of your workload and there is an alternative+    --         instance type that provides better disk throughput performance.+    values :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Filter' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'filter_name' - The name of the filter.+--+-- Specify @Finding@ to return recommendations with a specific finding+-- classification (for example, @Underprovisioned@).+--+-- Specify @RecommendationSourceType@ to return recommendations of a+-- specific resource type (for example, @Ec2Instance@).+--+-- Specify @FindingReasonCodes@ to return recommendations with a specific+-- finding reason code (for example, @CPUUnderprovisioned@).+--+-- 'values', 'filter_values' - The value of the filter.+--+-- The valid values for this parameter are as follows, depending on what+-- you specify for the @name@ parameter and the resource type that you wish+-- to filter results for:+--+-- -   Specify @Optimized@ or @NotOptimized@ if you specify the @name@+--     parameter as @Finding@ and you want to filter results for Auto+--     Scaling groups.+--+-- -   Specify @Underprovisioned@, @Overprovisioned@, or @Optimized@ if you+--     specify the @name@ parameter as @Finding@ and you want to filter+--     results for EC2 instances.+--+-- -   Specify @Ec2Instance@ or @AutoScalingGroup@ if you specify the+--     @name@ parameter as @RecommendationSourceType@.+--+-- -   Specify one of the following options if you specify the @name@+--     parameter as @FindingReasonCodes@:+--+--     -   __@CPUOverprovisioned@__ — The instance’s CPU configuration can+--         be sized down while still meeting the performance requirements+--         of your workload.+--+--     -   __@CPUUnderprovisioned@__ — The instance’s CPU configuration+--         doesn\'t meet the performance requirements of your workload and+--         there is an alternative instance type that provides better CPU+--         performance.+--+--     -   __@MemoryOverprovisioned@__ — The instance’s memory+--         configuration can be sized down while still meeting the+--         performance requirements of your workload.+--+--     -   __@MemoryUnderprovisioned@__ — The instance’s memory+--         configuration doesn\'t meet the performance requirements of your+--         workload and there is an alternative instance type that provides+--         better memory performance.+--+--     -   __@EBSThroughputOverprovisioned@__ — The instance’s EBS+--         throughput configuration can be sized down while still meeting+--         the performance requirements of your workload.+--+--     -   __@EBSThroughputUnderprovisioned@__ — The instance’s EBS+--         throughput configuration doesn\'t meet the performance+--         requirements of your workload and there is an alternative+--         instance type that provides better EBS throughput performance.+--+--     -   __@EBSIOPSOverprovisioned@__ — The instance’s EBS IOPS+--         configuration can be sized down while still meeting the+--         performance requirements of your workload.+--+--     -   __@EBSIOPSUnderprovisioned@__ — The instance’s EBS IOPS+--         configuration doesn\'t meet the performance requirements of your+--         workload and there is an alternative instance type that provides+--         better EBS IOPS performance.+--+--     -   __@NetworkBandwidthOverprovisioned@__ — The instance’s network+--         bandwidth configuration can be sized down while still meeting+--         the performance requirements of your workload.+--+--     -   __@NetworkBandwidthUnderprovisioned@__ — The instance’s network+--         bandwidth configuration doesn\'t meet the performance+--         requirements of your workload and there is an alternative+--         instance type that provides better network bandwidth+--         performance. This finding reason happens when the @NetworkIn@ or+--         @NetworkOut@ performance of an instance is impacted.+--+--     -   __@NetworkPPSOverprovisioned@__ — The instance’s network PPS+--         (packets per second) configuration can be sized down while still+--         meeting the performance requirements of your workload.+--+--     -   __@NetworkPPSUnderprovisioned@__ — The instance’s network PPS+--         (packets per second) configuration doesn\'t meet the performance+--         requirements of your workload and there is an alternative+--         instance type that provides better network PPS performance.+--+--     -   __@DiskIOPSOverprovisioned@__ — The instance’s disk IOPS+--         configuration can be sized down while still meeting the+--         performance requirements of your workload.+--+--     -   __@DiskIOPSUnderprovisioned@__ — The instance’s disk IOPS+--         configuration doesn\'t meet the performance requirements of your+--         workload and there is an alternative instance type that provides+--         better disk IOPS performance.+--+--     -   __@DiskThroughputOverprovisioned@__ — The instance’s disk+--         throughput configuration can be sized down while still meeting+--         the performance requirements of your workload.+--+--     -   __@DiskThroughputUnderprovisioned@__ — The instance’s disk+--         throughput configuration doesn\'t meet the performance+--         requirements of your workload and there is an alternative+--         instance type that provides better disk throughput performance.+newFilter ::+  Filter+newFilter =+  Filter'+    { name = Prelude.Nothing,+      values = Prelude.Nothing+    }++-- | The name of the filter.+--+-- Specify @Finding@ to return recommendations with a specific finding+-- classification (for example, @Underprovisioned@).+--+-- Specify @RecommendationSourceType@ to return recommendations of a+-- specific resource type (for example, @Ec2Instance@).+--+-- Specify @FindingReasonCodes@ to return recommendations with a specific+-- finding reason code (for example, @CPUUnderprovisioned@).+filter_name :: Lens.Lens' Filter (Prelude.Maybe FilterName)+filter_name = Lens.lens (\Filter' {name} -> name) (\s@Filter' {} a -> s {name = a} :: Filter)++-- | The value of the filter.+--+-- The valid values for this parameter are as follows, depending on what+-- you specify for the @name@ parameter and the resource type that you wish+-- to filter results for:+--+-- -   Specify @Optimized@ or @NotOptimized@ if you specify the @name@+--     parameter as @Finding@ and you want to filter results for Auto+--     Scaling groups.+--+-- -   Specify @Underprovisioned@, @Overprovisioned@, or @Optimized@ if you+--     specify the @name@ parameter as @Finding@ and you want to filter+--     results for EC2 instances.+--+-- -   Specify @Ec2Instance@ or @AutoScalingGroup@ if you specify the+--     @name@ parameter as @RecommendationSourceType@.+--+-- -   Specify one of the following options if you specify the @name@+--     parameter as @FindingReasonCodes@:+--+--     -   __@CPUOverprovisioned@__ — The instance’s CPU configuration can+--         be sized down while still meeting the performance requirements+--         of your workload.+--+--     -   __@CPUUnderprovisioned@__ — The instance’s CPU configuration+--         doesn\'t meet the performance requirements of your workload and+--         there is an alternative instance type that provides better CPU+--         performance.+--+--     -   __@MemoryOverprovisioned@__ — The instance’s memory+--         configuration can be sized down while still meeting the+--         performance requirements of your workload.+--+--     -   __@MemoryUnderprovisioned@__ — The instance’s memory+--         configuration doesn\'t meet the performance requirements of your+--         workload and there is an alternative instance type that provides+--         better memory performance.+--+--     -   __@EBSThroughputOverprovisioned@__ — The instance’s EBS+--         throughput configuration can be sized down while still meeting+--         the performance requirements of your workload.+--+--     -   __@EBSThroughputUnderprovisioned@__ — The instance’s EBS+--         throughput configuration doesn\'t meet the performance+--         requirements of your workload and there is an alternative+--         instance type that provides better EBS throughput performance.+--+--     -   __@EBSIOPSOverprovisioned@__ — The instance’s EBS IOPS+--         configuration can be sized down while still meeting the+--         performance requirements of your workload.+--+--     -   __@EBSIOPSUnderprovisioned@__ — The instance’s EBS IOPS+--         configuration doesn\'t meet the performance requirements of your+--         workload and there is an alternative instance type that provides+--         better EBS IOPS performance.+--+--     -   __@NetworkBandwidthOverprovisioned@__ — The instance’s network+--         bandwidth configuration can be sized down while still meeting+--         the performance requirements of your workload.+--+--     -   __@NetworkBandwidthUnderprovisioned@__ — The instance’s network+--         bandwidth configuration doesn\'t meet the performance+--         requirements of your workload and there is an alternative+--         instance type that provides better network bandwidth+--         performance. This finding reason happens when the @NetworkIn@ or+--         @NetworkOut@ performance of an instance is impacted.+--+--     -   __@NetworkPPSOverprovisioned@__ — The instance’s network PPS+--         (packets per second) configuration can be sized down while still+--         meeting the performance requirements of your workload.+--+--     -   __@NetworkPPSUnderprovisioned@__ — The instance’s network PPS+--         (packets per second) configuration doesn\'t meet the performance+--         requirements of your workload and there is an alternative+--         instance type that provides better network PPS performance.+--+--     -   __@DiskIOPSOverprovisioned@__ — The instance’s disk IOPS+--         configuration can be sized down while still meeting the+--         performance requirements of your workload.+--+--     -   __@DiskIOPSUnderprovisioned@__ — The instance’s disk IOPS+--         configuration doesn\'t meet the performance requirements of your+--         workload and there is an alternative instance type that provides+--         better disk IOPS performance.+--+--     -   __@DiskThroughputOverprovisioned@__ — The instance’s disk+--         throughput configuration can be sized down while still meeting+--         the performance requirements of your workload.+--+--     -   __@DiskThroughputUnderprovisioned@__ — The instance’s disk+--         throughput configuration doesn\'t meet the performance+--         requirements of your workload and there is an alternative+--         instance type that provides better disk throughput performance.+filter_values :: Lens.Lens' Filter (Prelude.Maybe [Prelude.Text])+filter_values = Lens.lens (\Filter' {values} -> values) (\s@Filter' {} a -> s {values = a} :: Filter) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable Filter where+  hashWithSalt _salt Filter' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` values++instance Prelude.NFData Filter where+  rnf Filter' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON Filter where+  toJSON Filter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("name" Data..=) Prelude.<$> name,+            ("values" Data..=) Prelude.<$> values+          ]+      )
+ gen/Amazonka/ComputeOptimizer/Types/FilterName.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.ComputeOptimizer.Types.FilterName+-- 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.ComputeOptimizer.Types.FilterName+  ( FilterName+      ( ..,+        FilterName_Finding,+        FilterName_FindingReasonCodes,+        FilterName_RecommendationSourceType+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FilterName = FilterName'+  { fromFilterName ::+      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 FilterName_Finding :: FilterName+pattern FilterName_Finding = FilterName' "Finding"++pattern FilterName_FindingReasonCodes :: FilterName+pattern FilterName_FindingReasonCodes = FilterName' "FindingReasonCodes"++pattern FilterName_RecommendationSourceType :: FilterName+pattern FilterName_RecommendationSourceType = FilterName' "RecommendationSourceType"++{-# COMPLETE+  FilterName_Finding,+  FilterName_FindingReasonCodes,+  FilterName_RecommendationSourceType,+  FilterName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/Finding.hs view
@@ -0,0 +1,78 @@+{-# 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.ComputeOptimizer.Types.Finding+-- 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.ComputeOptimizer.Types.Finding+  ( Finding+      ( ..,+        Finding_NotOptimized,+        Finding_Optimized,+        Finding_Overprovisioned,+        Finding_Underprovisioned+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Finding = Finding' {fromFinding :: 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 Finding_NotOptimized :: Finding+pattern Finding_NotOptimized = Finding' "NotOptimized"++pattern Finding_Optimized :: Finding+pattern Finding_Optimized = Finding' "Optimized"++pattern Finding_Overprovisioned :: Finding+pattern Finding_Overprovisioned = Finding' "Overprovisioned"++pattern Finding_Underprovisioned :: Finding+pattern Finding_Underprovisioned = Finding' "Underprovisioned"++{-# COMPLETE+  Finding_NotOptimized,+  Finding_Optimized,+  Finding_Overprovisioned,+  Finding_Underprovisioned,+  Finding'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/FindingReasonCode.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.FindingReasonCode+-- 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.ComputeOptimizer.Types.FindingReasonCode+  ( FindingReasonCode+      ( ..,+        FindingReasonCode_MemoryOverprovisioned,+        FindingReasonCode_MemoryUnderprovisioned+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FindingReasonCode = FindingReasonCode'+  { fromFindingReasonCode ::+      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 FindingReasonCode_MemoryOverprovisioned :: FindingReasonCode+pattern FindingReasonCode_MemoryOverprovisioned = FindingReasonCode' "MemoryOverprovisioned"++pattern FindingReasonCode_MemoryUnderprovisioned :: FindingReasonCode+pattern FindingReasonCode_MemoryUnderprovisioned = FindingReasonCode' "MemoryUnderprovisioned"++{-# COMPLETE+  FindingReasonCode_MemoryOverprovisioned,+  FindingReasonCode_MemoryUnderprovisioned,+  FindingReasonCode'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/GetRecommendationError.hs view
@@ -0,0 +1,100 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.GetRecommendationError+-- 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.ComputeOptimizer.Types.GetRecommendationError where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes an error experienced when getting recommendations.+--+-- For example, an error is returned if you request recommendations for an+-- unsupported Auto Scaling group, or if you request recommendations for an+-- instance of an unsupported instance family.+--+-- /See:/ 'newGetRecommendationError' smart constructor.+data GetRecommendationError = GetRecommendationError'+  { -- | The error code.+    code :: Prelude.Maybe Prelude.Text,+    -- | The ID of the error.+    identifier :: Prelude.Maybe Prelude.Text,+    -- | The message, or reason, for the error.+    message :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetRecommendationError' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'code', 'getRecommendationError_code' - The error code.+--+-- 'identifier', 'getRecommendationError_identifier' - The ID of the error.+--+-- 'message', 'getRecommendationError_message' - The message, or reason, for the error.+newGetRecommendationError ::+  GetRecommendationError+newGetRecommendationError =+  GetRecommendationError'+    { code = Prelude.Nothing,+      identifier = Prelude.Nothing,+      message = Prelude.Nothing+    }++-- | The error code.+getRecommendationError_code :: Lens.Lens' GetRecommendationError (Prelude.Maybe Prelude.Text)+getRecommendationError_code = Lens.lens (\GetRecommendationError' {code} -> code) (\s@GetRecommendationError' {} a -> s {code = a} :: GetRecommendationError)++-- | The ID of the error.+getRecommendationError_identifier :: Lens.Lens' GetRecommendationError (Prelude.Maybe Prelude.Text)+getRecommendationError_identifier = Lens.lens (\GetRecommendationError' {identifier} -> identifier) (\s@GetRecommendationError' {} a -> s {identifier = a} :: GetRecommendationError)++-- | The message, or reason, for the error.+getRecommendationError_message :: Lens.Lens' GetRecommendationError (Prelude.Maybe Prelude.Text)+getRecommendationError_message = Lens.lens (\GetRecommendationError' {message} -> message) (\s@GetRecommendationError' {} a -> s {message = a} :: GetRecommendationError)++instance Data.FromJSON GetRecommendationError where+  parseJSON =+    Data.withObject+      "GetRecommendationError"+      ( \x ->+          GetRecommendationError'+            Prelude.<$> (x Data..:? "code")+            Prelude.<*> (x Data..:? "identifier")+            Prelude.<*> (x Data..:? "message")+      )++instance Prelude.Hashable GetRecommendationError where+  hashWithSalt _salt GetRecommendationError' {..} =+    _salt+      `Prelude.hashWithSalt` code+      `Prelude.hashWithSalt` identifier+      `Prelude.hashWithSalt` message++instance Prelude.NFData GetRecommendationError where+  rnf GetRecommendationError' {..} =+    Prelude.rnf code+      `Prelude.seq` Prelude.rnf identifier+      `Prelude.seq` Prelude.rnf message
+ gen/Amazonka/ComputeOptimizer/Types/InferredWorkloadType.hs view
@@ -0,0 +1,96 @@+{-# 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.ComputeOptimizer.Types.InferredWorkloadType+-- 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.ComputeOptimizer.Types.InferredWorkloadType+  ( InferredWorkloadType+      ( ..,+        InferredWorkloadType_AmazonEmr,+        InferredWorkloadType_ApacheCassandra,+        InferredWorkloadType_ApacheHadoop,+        InferredWorkloadType_Memcached,+        InferredWorkloadType_Nginx,+        InferredWorkloadType_PostgreSql,+        InferredWorkloadType_Redis+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype InferredWorkloadType = InferredWorkloadType'+  { fromInferredWorkloadType ::+      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 InferredWorkloadType_AmazonEmr :: InferredWorkloadType+pattern InferredWorkloadType_AmazonEmr = InferredWorkloadType' "AmazonEmr"++pattern InferredWorkloadType_ApacheCassandra :: InferredWorkloadType+pattern InferredWorkloadType_ApacheCassandra = InferredWorkloadType' "ApacheCassandra"++pattern InferredWorkloadType_ApacheHadoop :: InferredWorkloadType+pattern InferredWorkloadType_ApacheHadoop = InferredWorkloadType' "ApacheHadoop"++pattern InferredWorkloadType_Memcached :: InferredWorkloadType+pattern InferredWorkloadType_Memcached = InferredWorkloadType' "Memcached"++pattern InferredWorkloadType_Nginx :: InferredWorkloadType+pattern InferredWorkloadType_Nginx = InferredWorkloadType' "Nginx"++pattern InferredWorkloadType_PostgreSql :: InferredWorkloadType+pattern InferredWorkloadType_PostgreSql = InferredWorkloadType' "PostgreSql"++pattern InferredWorkloadType_Redis :: InferredWorkloadType+pattern InferredWorkloadType_Redis = InferredWorkloadType' "Redis"++{-# COMPLETE+  InferredWorkloadType_AmazonEmr,+  InferredWorkloadType_ApacheCassandra,+  InferredWorkloadType_ApacheHadoop,+  InferredWorkloadType_Memcached,+  InferredWorkloadType_Nginx,+  InferredWorkloadType_PostgreSql,+  InferredWorkloadType_Redis,+  InferredWorkloadType'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/InferredWorkloadTypesPreference.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.InferredWorkloadTypesPreference+-- 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.ComputeOptimizer.Types.InferredWorkloadTypesPreference+  ( InferredWorkloadTypesPreference+      ( ..,+        InferredWorkloadTypesPreference_Active,+        InferredWorkloadTypesPreference_Inactive+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype InferredWorkloadTypesPreference = InferredWorkloadTypesPreference'+  { fromInferredWorkloadTypesPreference ::+      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 InferredWorkloadTypesPreference_Active :: InferredWorkloadTypesPreference+pattern InferredWorkloadTypesPreference_Active = InferredWorkloadTypesPreference' "Active"++pattern InferredWorkloadTypesPreference_Inactive :: InferredWorkloadTypesPreference+pattern InferredWorkloadTypesPreference_Inactive = InferredWorkloadTypesPreference' "Inactive"++{-# COMPLETE+  InferredWorkloadTypesPreference_Active,+  InferredWorkloadTypesPreference_Inactive,+  InferredWorkloadTypesPreference'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/InstanceRecommendation.hs view
@@ -0,0 +1,781 @@+{-# 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.ComputeOptimizer.Types.InstanceRecommendation+-- 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.ComputeOptimizer.Types.InstanceRecommendation where++import Amazonka.ComputeOptimizer.Types.CurrentPerformanceRisk+import Amazonka.ComputeOptimizer.Types.EffectiveRecommendationPreferences+import Amazonka.ComputeOptimizer.Types.Finding+import Amazonka.ComputeOptimizer.Types.InferredWorkloadType+import Amazonka.ComputeOptimizer.Types.InstanceRecommendationFindingReasonCode+import Amazonka.ComputeOptimizer.Types.InstanceRecommendationOption+import Amazonka.ComputeOptimizer.Types.RecommendationSource+import Amazonka.ComputeOptimizer.Types.UtilizationMetric+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes an Amazon EC2 instance recommendation.+--+-- /See:/ 'newInstanceRecommendation' smart constructor.+data InstanceRecommendation = InstanceRecommendation'+  { -- | The Amazon Web Services account ID of the instance.+    accountId :: Prelude.Maybe Prelude.Text,+    -- | The instance type of the current instance.+    currentInstanceType :: Prelude.Maybe Prelude.Text,+    -- | The risk of the current instance not meeting the performance needs of+    -- its workloads. The higher the risk, the more likely the current instance+    -- cannot meet the performance requirements of its workload.+    currentPerformanceRisk :: Prelude.Maybe CurrentPerformanceRisk,+    -- | An object that describes the effective recommendation preferences for+    -- the instance.+    effectiveRecommendationPreferences :: Prelude.Maybe EffectiveRecommendationPreferences,+    -- | The finding classification of the instance.+    --+    -- Findings for instances include:+    --+    -- -   __@Underprovisioned@__ —An instance is considered under-provisioned+    --     when at least one specification of your instance, such as CPU,+    --     memory, or network, does not meet the performance requirements of+    --     your workload. Under-provisioned instances may lead to poor+    --     application performance.+    --+    -- -   __@Overprovisioned@__ —An instance is considered over-provisioned+    --     when at least one specification of your instance, such as CPU,+    --     memory, or network, can be sized down while still meeting the+    --     performance requirements of your workload, and no specification is+    --     under-provisioned. Over-provisioned instances may lead to+    --     unnecessary infrastructure cost.+    --+    -- -   __@Optimized@__ —An instance is considered optimized when all+    --     specifications of your instance, such as CPU, memory, and network,+    --     meet the performance requirements of your workload and is not over+    --     provisioned. For optimized resources, Compute Optimizer might+    --     recommend a new generation instance type.+    finding :: Prelude.Maybe Finding,+    -- | The reason for the finding classification of the instance.+    --+    -- Finding reason codes for instances include:+    --+    -- -   __@CPUOverprovisioned@__ — The instance’s CPU configuration can be+    --     sized down while still meeting the performance requirements of your+    --     workload. This is identified by analyzing the @CPUUtilization@+    --     metric of the current instance during the look-back period.+    --+    -- -   __@CPUUnderprovisioned@__ — The instance’s CPU configuration+    --     doesn\'t meet the performance requirements of your workload and+    --     there is an alternative instance type that provides better CPU+    --     performance. This is identified by analyzing the @CPUUtilization@+    --     metric of the current instance during the look-back period.+    --+    -- -   __@MemoryOverprovisioned@__ — The instance’s memory configuration+    --     can be sized down while still meeting the performance requirements+    --     of your workload. This is identified by analyzing the memory+    --     utilization metric of the current instance during the look-back+    --     period.+    --+    -- -   __@MemoryUnderprovisioned@__ — The instance’s memory configuration+    --     doesn\'t meet the performance requirements of your workload and+    --     there is an alternative instance type that provides better memory+    --     performance. This is identified by analyzing the memory utilization+    --     metric of the current instance during the look-back period.+    --+    --     Memory utilization is analyzed only for resources that have the+    --     unified CloudWatch agent installed on them. For more information,+    --     see+    --     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling memory utilization with the Amazon CloudWatch Agent>+    --     in the /Compute Optimizer User Guide/. On Linux instances, Compute+    --     Optimizer analyses the @mem_used_percent@ metric in the @CWAgent@+    --     namespace, or the legacy @MemoryUtilization@ metric in the+    --     @System\/Linux@ namespace. On Windows instances, Compute Optimizer+    --     analyses the @Memory % Committed Bytes In Use@ metric in the+    --     @CWAgent@ namespace.+    --+    -- -   __@EBSThroughputOverprovisioned@__ — The instance’s EBS throughput+    --     configuration can be sized down while still meeting the performance+    --     requirements of your workload. This is identified by analyzing the+    --     @VolumeReadOps@ and @VolumeWriteOps@ metrics of EBS volumes attached+    --     to the current instance during the look-back period.+    --+    -- -   __@EBSThroughputUnderprovisioned@__ — The instance’s EBS throughput+    --     configuration doesn\'t meet the performance requirements of your+    --     workload and there is an alternative instance type that provides+    --     better EBS throughput performance. This is identified by analyzing+    --     the @VolumeReadOps@ and @VolumeWriteOps@ metrics of EBS volumes+    --     attached to the current instance during the look-back period.+    --+    -- -   __@EBSIOPSOverprovisioned@__ — The instance’s EBS IOPS configuration+    --     can be sized down while still meeting the performance requirements+    --     of your workload. This is identified by analyzing the+    --     @VolumeReadBytes@ and @VolumeWriteBytes@ metric of EBS volumes+    --     attached to the current instance during the look-back period.+    --+    -- -   __@EBSIOPSUnderprovisioned@__ — The instance’s EBS IOPS+    --     configuration doesn\'t meet the performance requirements of your+    --     workload and there is an alternative instance type that provides+    --     better EBS IOPS performance. This is identified by analyzing the+    --     @VolumeReadBytes@ and @VolumeWriteBytes@ metric of EBS volumes+    --     attached to the current instance during the look-back period.+    --+    -- -   __@NetworkBandwidthOverprovisioned@__ — The instance’s network+    --     bandwidth configuration can be sized down while still meeting the+    --     performance requirements of your workload. This is identified by+    --     analyzing the @NetworkIn@ and @NetworkOut@ metrics of the current+    --     instance during the look-back period.+    --+    -- -   __@NetworkBandwidthUnderprovisioned@__ — The instance’s network+    --     bandwidth configuration doesn\'t meet the performance requirements+    --     of your workload and there is an alternative instance type that+    --     provides better network bandwidth performance. This is identified by+    --     analyzing the @NetworkIn@ and @NetworkOut@ metrics of the current+    --     instance during the look-back period. This finding reason happens+    --     when the @NetworkIn@ or @NetworkOut@ performance of an instance is+    --     impacted.+    --+    -- -   __@NetworkPPSOverprovisioned@__ — The instance’s network PPS+    --     (packets per second) configuration can be sized down while still+    --     meeting the performance requirements of your workload. This is+    --     identified by analyzing the @NetworkPacketsIn@ and+    --     @NetworkPacketsIn@ metrics of the current instance during the+    --     look-back period.+    --+    -- -   __@NetworkPPSUnderprovisioned@__ — The instance’s network PPS+    --     (packets per second) configuration doesn\'t meet the performance+    --     requirements of your workload and there is an alternative instance+    --     type that provides better network PPS performance. This is+    --     identified by analyzing the @NetworkPacketsIn@ and+    --     @NetworkPacketsIn@ metrics of the current instance during the+    --     look-back period.+    --+    -- -   __@DiskIOPSOverprovisioned@__ — The instance’s disk IOPS+    --     configuration can be sized down while still meeting the performance+    --     requirements of your workload. This is identified by analyzing the+    --     @DiskReadOps@ and @DiskWriteOps@ metrics of the current instance+    --     during the look-back period.+    --+    -- -   __@DiskIOPSUnderprovisioned@__ — The instance’s disk IOPS+    --     configuration doesn\'t meet the performance requirements of your+    --     workload and there is an alternative instance type that provides+    --     better disk IOPS performance. This is identified by analyzing the+    --     @DiskReadOps@ and @DiskWriteOps@ metrics of the current instance+    --     during the look-back period.+    --+    -- -   __@DiskThroughputOverprovisioned@__ — The instance’s disk throughput+    --     configuration can be sized down while still meeting the performance+    --     requirements of your workload. This is identified by analyzing the+    --     @DiskReadBytes@ and @DiskWriteBytes@ metrics of the current instance+    --     during the look-back period.+    --+    -- -   __@DiskThroughputUnderprovisioned@__ — The instance’s disk+    --     throughput configuration doesn\'t meet the performance requirements+    --     of your workload and there is an alternative instance type that+    --     provides better disk throughput performance. This is identified by+    --     analyzing the @DiskReadBytes@ and @DiskWriteBytes@ metrics of the+    --     current instance during the look-back period.+    --+    -- For more information about instance metrics, see+    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html List the available CloudWatch metrics for your instances>+    -- in the /Amazon Elastic Compute Cloud User Guide/. For more information+    -- about EBS volume metrics, see+    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html Amazon CloudWatch metrics for Amazon EBS>+    -- in the /Amazon Elastic Compute Cloud User Guide/.+    findingReasonCodes :: Prelude.Maybe [InstanceRecommendationFindingReasonCode],+    -- | The applications that might be running on the instance as inferred by+    -- Compute Optimizer.+    --+    -- Compute Optimizer can infer if one of the following applications might+    -- be running on the instance:+    --+    -- -   @AmazonEmr@ - Infers that Amazon EMR might be running on the+    --     instance.+    --+    -- -   @ApacheCassandra@ - Infers that Apache Cassandra might be running on+    --     the instance.+    --+    -- -   @ApacheHadoop@ - Infers that Apache Hadoop might be running on the+    --     instance.+    --+    -- -   @Memcached@ - Infers that Memcached might be running on the+    --     instance.+    --+    -- -   @NGINX@ - Infers that NGINX might be running on the instance.+    --+    -- -   @PostgreSql@ - Infers that PostgreSQL might be running on the+    --     instance.+    --+    -- -   @Redis@ - Infers that Redis might be running on the instance.+    inferredWorkloadTypes :: Prelude.Maybe [InferredWorkloadType],+    -- | The Amazon Resource Name (ARN) of the current instance.+    instanceArn :: Prelude.Maybe Prelude.Text,+    -- | The name of the current instance.+    instanceName :: Prelude.Maybe Prelude.Text,+    -- | The timestamp of when the instance recommendation was last generated.+    lastRefreshTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The number of days for which utilization metrics were analyzed for the+    -- instance.+    lookBackPeriodInDays :: Prelude.Maybe Prelude.Double,+    -- | An array of objects that describe the recommendation options for the+    -- instance.+    recommendationOptions :: Prelude.Maybe [InstanceRecommendationOption],+    -- | An array of objects that describe the source resource of the+    -- recommendation.+    recommendationSources :: Prelude.Maybe [RecommendationSource],+    -- | An array of objects that describe the utilization metrics of the+    -- instance.+    utilizationMetrics :: Prelude.Maybe [UtilizationMetric]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InstanceRecommendation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'instanceRecommendation_accountId' - The Amazon Web Services account ID of the instance.+--+-- 'currentInstanceType', 'instanceRecommendation_currentInstanceType' - The instance type of the current instance.+--+-- 'currentPerformanceRisk', 'instanceRecommendation_currentPerformanceRisk' - The risk of the current instance not meeting the performance needs of+-- its workloads. The higher the risk, the more likely the current instance+-- cannot meet the performance requirements of its workload.+--+-- 'effectiveRecommendationPreferences', 'instanceRecommendation_effectiveRecommendationPreferences' - An object that describes the effective recommendation preferences for+-- the instance.+--+-- 'finding', 'instanceRecommendation_finding' - The finding classification of the instance.+--+-- Findings for instances include:+--+-- -   __@Underprovisioned@__ —An instance is considered under-provisioned+--     when at least one specification of your instance, such as CPU,+--     memory, or network, does not meet the performance requirements of+--     your workload. Under-provisioned instances may lead to poor+--     application performance.+--+-- -   __@Overprovisioned@__ —An instance is considered over-provisioned+--     when at least one specification of your instance, such as CPU,+--     memory, or network, can be sized down while still meeting the+--     performance requirements of your workload, and no specification is+--     under-provisioned. Over-provisioned instances may lead to+--     unnecessary infrastructure cost.+--+-- -   __@Optimized@__ —An instance is considered optimized when all+--     specifications of your instance, such as CPU, memory, and network,+--     meet the performance requirements of your workload and is not over+--     provisioned. For optimized resources, Compute Optimizer might+--     recommend a new generation instance type.+--+-- 'findingReasonCodes', 'instanceRecommendation_findingReasonCodes' - The reason for the finding classification of the instance.+--+-- Finding reason codes for instances include:+--+-- -   __@CPUOverprovisioned@__ — The instance’s CPU configuration can be+--     sized down while still meeting the performance requirements of your+--     workload. This is identified by analyzing the @CPUUtilization@+--     metric of the current instance during the look-back period.+--+-- -   __@CPUUnderprovisioned@__ — The instance’s CPU configuration+--     doesn\'t meet the performance requirements of your workload and+--     there is an alternative instance type that provides better CPU+--     performance. This is identified by analyzing the @CPUUtilization@+--     metric of the current instance during the look-back period.+--+-- -   __@MemoryOverprovisioned@__ — The instance’s memory configuration+--     can be sized down while still meeting the performance requirements+--     of your workload. This is identified by analyzing the memory+--     utilization metric of the current instance during the look-back+--     period.+--+-- -   __@MemoryUnderprovisioned@__ — The instance’s memory configuration+--     doesn\'t meet the performance requirements of your workload and+--     there is an alternative instance type that provides better memory+--     performance. This is identified by analyzing the memory utilization+--     metric of the current instance during the look-back period.+--+--     Memory utilization is analyzed only for resources that have the+--     unified CloudWatch agent installed on them. For more information,+--     see+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling memory utilization with the Amazon CloudWatch Agent>+--     in the /Compute Optimizer User Guide/. On Linux instances, Compute+--     Optimizer analyses the @mem_used_percent@ metric in the @CWAgent@+--     namespace, or the legacy @MemoryUtilization@ metric in the+--     @System\/Linux@ namespace. On Windows instances, Compute Optimizer+--     analyses the @Memory % Committed Bytes In Use@ metric in the+--     @CWAgent@ namespace.+--+-- -   __@EBSThroughputOverprovisioned@__ — The instance’s EBS throughput+--     configuration can be sized down while still meeting the performance+--     requirements of your workload. This is identified by analyzing the+--     @VolumeReadOps@ and @VolumeWriteOps@ metrics of EBS volumes attached+--     to the current instance during the look-back period.+--+-- -   __@EBSThroughputUnderprovisioned@__ — The instance’s EBS throughput+--     configuration doesn\'t meet the performance requirements of your+--     workload and there is an alternative instance type that provides+--     better EBS throughput performance. This is identified by analyzing+--     the @VolumeReadOps@ and @VolumeWriteOps@ metrics of EBS volumes+--     attached to the current instance during the look-back period.+--+-- -   __@EBSIOPSOverprovisioned@__ — The instance’s EBS IOPS configuration+--     can be sized down while still meeting the performance requirements+--     of your workload. This is identified by analyzing the+--     @VolumeReadBytes@ and @VolumeWriteBytes@ metric of EBS volumes+--     attached to the current instance during the look-back period.+--+-- -   __@EBSIOPSUnderprovisioned@__ — The instance’s EBS IOPS+--     configuration doesn\'t meet the performance requirements of your+--     workload and there is an alternative instance type that provides+--     better EBS IOPS performance. This is identified by analyzing the+--     @VolumeReadBytes@ and @VolumeWriteBytes@ metric of EBS volumes+--     attached to the current instance during the look-back period.+--+-- -   __@NetworkBandwidthOverprovisioned@__ — The instance’s network+--     bandwidth configuration can be sized down while still meeting the+--     performance requirements of your workload. This is identified by+--     analyzing the @NetworkIn@ and @NetworkOut@ metrics of the current+--     instance during the look-back period.+--+-- -   __@NetworkBandwidthUnderprovisioned@__ — The instance’s network+--     bandwidth configuration doesn\'t meet the performance requirements+--     of your workload and there is an alternative instance type that+--     provides better network bandwidth performance. This is identified by+--     analyzing the @NetworkIn@ and @NetworkOut@ metrics of the current+--     instance during the look-back period. This finding reason happens+--     when the @NetworkIn@ or @NetworkOut@ performance of an instance is+--     impacted.+--+-- -   __@NetworkPPSOverprovisioned@__ — The instance’s network PPS+--     (packets per second) configuration can be sized down while still+--     meeting the performance requirements of your workload. This is+--     identified by analyzing the @NetworkPacketsIn@ and+--     @NetworkPacketsIn@ metrics of the current instance during the+--     look-back period.+--+-- -   __@NetworkPPSUnderprovisioned@__ — The instance’s network PPS+--     (packets per second) configuration doesn\'t meet the performance+--     requirements of your workload and there is an alternative instance+--     type that provides better network PPS performance. This is+--     identified by analyzing the @NetworkPacketsIn@ and+--     @NetworkPacketsIn@ metrics of the current instance during the+--     look-back period.+--+-- -   __@DiskIOPSOverprovisioned@__ — The instance’s disk IOPS+--     configuration can be sized down while still meeting the performance+--     requirements of your workload. This is identified by analyzing the+--     @DiskReadOps@ and @DiskWriteOps@ metrics of the current instance+--     during the look-back period.+--+-- -   __@DiskIOPSUnderprovisioned@__ — The instance’s disk IOPS+--     configuration doesn\'t meet the performance requirements of your+--     workload and there is an alternative instance type that provides+--     better disk IOPS performance. This is identified by analyzing the+--     @DiskReadOps@ and @DiskWriteOps@ metrics of the current instance+--     during the look-back period.+--+-- -   __@DiskThroughputOverprovisioned@__ — The instance’s disk throughput+--     configuration can be sized down while still meeting the performance+--     requirements of your workload. This is identified by analyzing the+--     @DiskReadBytes@ and @DiskWriteBytes@ metrics of the current instance+--     during the look-back period.+--+-- -   __@DiskThroughputUnderprovisioned@__ — The instance’s disk+--     throughput configuration doesn\'t meet the performance requirements+--     of your workload and there is an alternative instance type that+--     provides better disk throughput performance. This is identified by+--     analyzing the @DiskReadBytes@ and @DiskWriteBytes@ metrics of the+--     current instance during the look-back period.+--+-- For more information about instance metrics, see+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html List the available CloudWatch metrics for your instances>+-- in the /Amazon Elastic Compute Cloud User Guide/. For more information+-- about EBS volume metrics, see+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html Amazon CloudWatch metrics for Amazon EBS>+-- in the /Amazon Elastic Compute Cloud User Guide/.+--+-- 'inferredWorkloadTypes', 'instanceRecommendation_inferredWorkloadTypes' - The applications that might be running on the instance as inferred by+-- Compute Optimizer.+--+-- Compute Optimizer can infer if one of the following applications might+-- be running on the instance:+--+-- -   @AmazonEmr@ - Infers that Amazon EMR might be running on the+--     instance.+--+-- -   @ApacheCassandra@ - Infers that Apache Cassandra might be running on+--     the instance.+--+-- -   @ApacheHadoop@ - Infers that Apache Hadoop might be running on the+--     instance.+--+-- -   @Memcached@ - Infers that Memcached might be running on the+--     instance.+--+-- -   @NGINX@ - Infers that NGINX might be running on the instance.+--+-- -   @PostgreSql@ - Infers that PostgreSQL might be running on the+--     instance.+--+-- -   @Redis@ - Infers that Redis might be running on the instance.+--+-- 'instanceArn', 'instanceRecommendation_instanceArn' - The Amazon Resource Name (ARN) of the current instance.+--+-- 'instanceName', 'instanceRecommendation_instanceName' - The name of the current instance.+--+-- 'lastRefreshTimestamp', 'instanceRecommendation_lastRefreshTimestamp' - The timestamp of when the instance recommendation was last generated.+--+-- 'lookBackPeriodInDays', 'instanceRecommendation_lookBackPeriodInDays' - The number of days for which utilization metrics were analyzed for the+-- instance.+--+-- 'recommendationOptions', 'instanceRecommendation_recommendationOptions' - An array of objects that describe the recommendation options for the+-- instance.+--+-- 'recommendationSources', 'instanceRecommendation_recommendationSources' - An array of objects that describe the source resource of the+-- recommendation.+--+-- 'utilizationMetrics', 'instanceRecommendation_utilizationMetrics' - An array of objects that describe the utilization metrics of the+-- instance.+newInstanceRecommendation ::+  InstanceRecommendation+newInstanceRecommendation =+  InstanceRecommendation'+    { accountId =+        Prelude.Nothing,+      currentInstanceType = Prelude.Nothing,+      currentPerformanceRisk = Prelude.Nothing,+      effectiveRecommendationPreferences =+        Prelude.Nothing,+      finding = Prelude.Nothing,+      findingReasonCodes = Prelude.Nothing,+      inferredWorkloadTypes = Prelude.Nothing,+      instanceArn = Prelude.Nothing,+      instanceName = Prelude.Nothing,+      lastRefreshTimestamp = Prelude.Nothing,+      lookBackPeriodInDays = Prelude.Nothing,+      recommendationOptions = Prelude.Nothing,+      recommendationSources = Prelude.Nothing,+      utilizationMetrics = Prelude.Nothing+    }++-- | The Amazon Web Services account ID of the instance.+instanceRecommendation_accountId :: Lens.Lens' InstanceRecommendation (Prelude.Maybe Prelude.Text)+instanceRecommendation_accountId = Lens.lens (\InstanceRecommendation' {accountId} -> accountId) (\s@InstanceRecommendation' {} a -> s {accountId = a} :: InstanceRecommendation)++-- | The instance type of the current instance.+instanceRecommendation_currentInstanceType :: Lens.Lens' InstanceRecommendation (Prelude.Maybe Prelude.Text)+instanceRecommendation_currentInstanceType = Lens.lens (\InstanceRecommendation' {currentInstanceType} -> currentInstanceType) (\s@InstanceRecommendation' {} a -> s {currentInstanceType = a} :: InstanceRecommendation)++-- | The risk of the current instance not meeting the performance needs of+-- its workloads. The higher the risk, the more likely the current instance+-- cannot meet the performance requirements of its workload.+instanceRecommendation_currentPerformanceRisk :: Lens.Lens' InstanceRecommendation (Prelude.Maybe CurrentPerformanceRisk)+instanceRecommendation_currentPerformanceRisk = Lens.lens (\InstanceRecommendation' {currentPerformanceRisk} -> currentPerformanceRisk) (\s@InstanceRecommendation' {} a -> s {currentPerformanceRisk = a} :: InstanceRecommendation)++-- | An object that describes the effective recommendation preferences for+-- the instance.+instanceRecommendation_effectiveRecommendationPreferences :: Lens.Lens' InstanceRecommendation (Prelude.Maybe EffectiveRecommendationPreferences)+instanceRecommendation_effectiveRecommendationPreferences = Lens.lens (\InstanceRecommendation' {effectiveRecommendationPreferences} -> effectiveRecommendationPreferences) (\s@InstanceRecommendation' {} a -> s {effectiveRecommendationPreferences = a} :: InstanceRecommendation)++-- | The finding classification of the instance.+--+-- Findings for instances include:+--+-- -   __@Underprovisioned@__ —An instance is considered under-provisioned+--     when at least one specification of your instance, such as CPU,+--     memory, or network, does not meet the performance requirements of+--     your workload. Under-provisioned instances may lead to poor+--     application performance.+--+-- -   __@Overprovisioned@__ —An instance is considered over-provisioned+--     when at least one specification of your instance, such as CPU,+--     memory, or network, can be sized down while still meeting the+--     performance requirements of your workload, and no specification is+--     under-provisioned. Over-provisioned instances may lead to+--     unnecessary infrastructure cost.+--+-- -   __@Optimized@__ —An instance is considered optimized when all+--     specifications of your instance, such as CPU, memory, and network,+--     meet the performance requirements of your workload and is not over+--     provisioned. For optimized resources, Compute Optimizer might+--     recommend a new generation instance type.+instanceRecommendation_finding :: Lens.Lens' InstanceRecommendation (Prelude.Maybe Finding)+instanceRecommendation_finding = Lens.lens (\InstanceRecommendation' {finding} -> finding) (\s@InstanceRecommendation' {} a -> s {finding = a} :: InstanceRecommendation)++-- | The reason for the finding classification of the instance.+--+-- Finding reason codes for instances include:+--+-- -   __@CPUOverprovisioned@__ — The instance’s CPU configuration can be+--     sized down while still meeting the performance requirements of your+--     workload. This is identified by analyzing the @CPUUtilization@+--     metric of the current instance during the look-back period.+--+-- -   __@CPUUnderprovisioned@__ — The instance’s CPU configuration+--     doesn\'t meet the performance requirements of your workload and+--     there is an alternative instance type that provides better CPU+--     performance. This is identified by analyzing the @CPUUtilization@+--     metric of the current instance during the look-back period.+--+-- -   __@MemoryOverprovisioned@__ — The instance’s memory configuration+--     can be sized down while still meeting the performance requirements+--     of your workload. This is identified by analyzing the memory+--     utilization metric of the current instance during the look-back+--     period.+--+-- -   __@MemoryUnderprovisioned@__ — The instance’s memory configuration+--     doesn\'t meet the performance requirements of your workload and+--     there is an alternative instance type that provides better memory+--     performance. This is identified by analyzing the memory utilization+--     metric of the current instance during the look-back period.+--+--     Memory utilization is analyzed only for resources that have the+--     unified CloudWatch agent installed on them. For more information,+--     see+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling memory utilization with the Amazon CloudWatch Agent>+--     in the /Compute Optimizer User Guide/. On Linux instances, Compute+--     Optimizer analyses the @mem_used_percent@ metric in the @CWAgent@+--     namespace, or the legacy @MemoryUtilization@ metric in the+--     @System\/Linux@ namespace. On Windows instances, Compute Optimizer+--     analyses the @Memory % Committed Bytes In Use@ metric in the+--     @CWAgent@ namespace.+--+-- -   __@EBSThroughputOverprovisioned@__ — The instance’s EBS throughput+--     configuration can be sized down while still meeting the performance+--     requirements of your workload. This is identified by analyzing the+--     @VolumeReadOps@ and @VolumeWriteOps@ metrics of EBS volumes attached+--     to the current instance during the look-back period.+--+-- -   __@EBSThroughputUnderprovisioned@__ — The instance’s EBS throughput+--     configuration doesn\'t meet the performance requirements of your+--     workload and there is an alternative instance type that provides+--     better EBS throughput performance. This is identified by analyzing+--     the @VolumeReadOps@ and @VolumeWriteOps@ metrics of EBS volumes+--     attached to the current instance during the look-back period.+--+-- -   __@EBSIOPSOverprovisioned@__ — The instance’s EBS IOPS configuration+--     can be sized down while still meeting the performance requirements+--     of your workload. This is identified by analyzing the+--     @VolumeReadBytes@ and @VolumeWriteBytes@ metric of EBS volumes+--     attached to the current instance during the look-back period.+--+-- -   __@EBSIOPSUnderprovisioned@__ — The instance’s EBS IOPS+--     configuration doesn\'t meet the performance requirements of your+--     workload and there is an alternative instance type that provides+--     better EBS IOPS performance. This is identified by analyzing the+--     @VolumeReadBytes@ and @VolumeWriteBytes@ metric of EBS volumes+--     attached to the current instance during the look-back period.+--+-- -   __@NetworkBandwidthOverprovisioned@__ — The instance’s network+--     bandwidth configuration can be sized down while still meeting the+--     performance requirements of your workload. This is identified by+--     analyzing the @NetworkIn@ and @NetworkOut@ metrics of the current+--     instance during the look-back period.+--+-- -   __@NetworkBandwidthUnderprovisioned@__ — The instance’s network+--     bandwidth configuration doesn\'t meet the performance requirements+--     of your workload and there is an alternative instance type that+--     provides better network bandwidth performance. This is identified by+--     analyzing the @NetworkIn@ and @NetworkOut@ metrics of the current+--     instance during the look-back period. This finding reason happens+--     when the @NetworkIn@ or @NetworkOut@ performance of an instance is+--     impacted.+--+-- -   __@NetworkPPSOverprovisioned@__ — The instance’s network PPS+--     (packets per second) configuration can be sized down while still+--     meeting the performance requirements of your workload. This is+--     identified by analyzing the @NetworkPacketsIn@ and+--     @NetworkPacketsIn@ metrics of the current instance during the+--     look-back period.+--+-- -   __@NetworkPPSUnderprovisioned@__ — The instance’s network PPS+--     (packets per second) configuration doesn\'t meet the performance+--     requirements of your workload and there is an alternative instance+--     type that provides better network PPS performance. This is+--     identified by analyzing the @NetworkPacketsIn@ and+--     @NetworkPacketsIn@ metrics of the current instance during the+--     look-back period.+--+-- -   __@DiskIOPSOverprovisioned@__ — The instance’s disk IOPS+--     configuration can be sized down while still meeting the performance+--     requirements of your workload. This is identified by analyzing the+--     @DiskReadOps@ and @DiskWriteOps@ metrics of the current instance+--     during the look-back period.+--+-- -   __@DiskIOPSUnderprovisioned@__ — The instance’s disk IOPS+--     configuration doesn\'t meet the performance requirements of your+--     workload and there is an alternative instance type that provides+--     better disk IOPS performance. This is identified by analyzing the+--     @DiskReadOps@ and @DiskWriteOps@ metrics of the current instance+--     during the look-back period.+--+-- -   __@DiskThroughputOverprovisioned@__ — The instance’s disk throughput+--     configuration can be sized down while still meeting the performance+--     requirements of your workload. This is identified by analyzing the+--     @DiskReadBytes@ and @DiskWriteBytes@ metrics of the current instance+--     during the look-back period.+--+-- -   __@DiskThroughputUnderprovisioned@__ — The instance’s disk+--     throughput configuration doesn\'t meet the performance requirements+--     of your workload and there is an alternative instance type that+--     provides better disk throughput performance. This is identified by+--     analyzing the @DiskReadBytes@ and @DiskWriteBytes@ metrics of the+--     current instance during the look-back period.+--+-- For more information about instance metrics, see+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html List the available CloudWatch metrics for your instances>+-- in the /Amazon Elastic Compute Cloud User Guide/. For more information+-- about EBS volume metrics, see+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html Amazon CloudWatch metrics for Amazon EBS>+-- in the /Amazon Elastic Compute Cloud User Guide/.+instanceRecommendation_findingReasonCodes :: Lens.Lens' InstanceRecommendation (Prelude.Maybe [InstanceRecommendationFindingReasonCode])+instanceRecommendation_findingReasonCodes = Lens.lens (\InstanceRecommendation' {findingReasonCodes} -> findingReasonCodes) (\s@InstanceRecommendation' {} a -> s {findingReasonCodes = a} :: InstanceRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | The applications that might be running on the instance as inferred by+-- Compute Optimizer.+--+-- Compute Optimizer can infer if one of the following applications might+-- be running on the instance:+--+-- -   @AmazonEmr@ - Infers that Amazon EMR might be running on the+--     instance.+--+-- -   @ApacheCassandra@ - Infers that Apache Cassandra might be running on+--     the instance.+--+-- -   @ApacheHadoop@ - Infers that Apache Hadoop might be running on the+--     instance.+--+-- -   @Memcached@ - Infers that Memcached might be running on the+--     instance.+--+-- -   @NGINX@ - Infers that NGINX might be running on the instance.+--+-- -   @PostgreSql@ - Infers that PostgreSQL might be running on the+--     instance.+--+-- -   @Redis@ - Infers that Redis might be running on the instance.+instanceRecommendation_inferredWorkloadTypes :: Lens.Lens' InstanceRecommendation (Prelude.Maybe [InferredWorkloadType])+instanceRecommendation_inferredWorkloadTypes = Lens.lens (\InstanceRecommendation' {inferredWorkloadTypes} -> inferredWorkloadTypes) (\s@InstanceRecommendation' {} a -> s {inferredWorkloadTypes = a} :: InstanceRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the current instance.+instanceRecommendation_instanceArn :: Lens.Lens' InstanceRecommendation (Prelude.Maybe Prelude.Text)+instanceRecommendation_instanceArn = Lens.lens (\InstanceRecommendation' {instanceArn} -> instanceArn) (\s@InstanceRecommendation' {} a -> s {instanceArn = a} :: InstanceRecommendation)++-- | The name of the current instance.+instanceRecommendation_instanceName :: Lens.Lens' InstanceRecommendation (Prelude.Maybe Prelude.Text)+instanceRecommendation_instanceName = Lens.lens (\InstanceRecommendation' {instanceName} -> instanceName) (\s@InstanceRecommendation' {} a -> s {instanceName = a} :: InstanceRecommendation)++-- | The timestamp of when the instance recommendation was last generated.+instanceRecommendation_lastRefreshTimestamp :: Lens.Lens' InstanceRecommendation (Prelude.Maybe Prelude.UTCTime)+instanceRecommendation_lastRefreshTimestamp = Lens.lens (\InstanceRecommendation' {lastRefreshTimestamp} -> lastRefreshTimestamp) (\s@InstanceRecommendation' {} a -> s {lastRefreshTimestamp = a} :: InstanceRecommendation) Prelude.. Lens.mapping Data._Time++-- | The number of days for which utilization metrics were analyzed for the+-- instance.+instanceRecommendation_lookBackPeriodInDays :: Lens.Lens' InstanceRecommendation (Prelude.Maybe Prelude.Double)+instanceRecommendation_lookBackPeriodInDays = Lens.lens (\InstanceRecommendation' {lookBackPeriodInDays} -> lookBackPeriodInDays) (\s@InstanceRecommendation' {} a -> s {lookBackPeriodInDays = a} :: InstanceRecommendation)++-- | An array of objects that describe the recommendation options for the+-- instance.+instanceRecommendation_recommendationOptions :: Lens.Lens' InstanceRecommendation (Prelude.Maybe [InstanceRecommendationOption])+instanceRecommendation_recommendationOptions = Lens.lens (\InstanceRecommendation' {recommendationOptions} -> recommendationOptions) (\s@InstanceRecommendation' {} a -> s {recommendationOptions = a} :: InstanceRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects that describe the source resource of the+-- recommendation.+instanceRecommendation_recommendationSources :: Lens.Lens' InstanceRecommendation (Prelude.Maybe [RecommendationSource])+instanceRecommendation_recommendationSources = Lens.lens (\InstanceRecommendation' {recommendationSources} -> recommendationSources) (\s@InstanceRecommendation' {} a -> s {recommendationSources = a} :: InstanceRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects that describe the utilization metrics of the+-- instance.+instanceRecommendation_utilizationMetrics :: Lens.Lens' InstanceRecommendation (Prelude.Maybe [UtilizationMetric])+instanceRecommendation_utilizationMetrics = Lens.lens (\InstanceRecommendation' {utilizationMetrics} -> utilizationMetrics) (\s@InstanceRecommendation' {} a -> s {utilizationMetrics = a} :: InstanceRecommendation) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON InstanceRecommendation where+  parseJSON =+    Data.withObject+      "InstanceRecommendation"+      ( \x ->+          InstanceRecommendation'+            Prelude.<$> (x Data..:? "accountId")+            Prelude.<*> (x Data..:? "currentInstanceType")+            Prelude.<*> (x Data..:? "currentPerformanceRisk")+            Prelude.<*> (x Data..:? "effectiveRecommendationPreferences")+            Prelude.<*> (x Data..:? "finding")+            Prelude.<*> ( x+                            Data..:? "findingReasonCodes"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> ( x+                            Data..:? "inferredWorkloadTypes"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "instanceArn")+            Prelude.<*> (x Data..:? "instanceName")+            Prelude.<*> (x Data..:? "lastRefreshTimestamp")+            Prelude.<*> (x Data..:? "lookBackPeriodInDays")+            Prelude.<*> ( x+                            Data..:? "recommendationOptions"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> ( x+                            Data..:? "recommendationSources"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> ( x+                            Data..:? "utilizationMetrics"+                            Data..!= Prelude.mempty+                        )+      )++instance Prelude.Hashable InstanceRecommendation where+  hashWithSalt _salt InstanceRecommendation' {..} =+    _salt+      `Prelude.hashWithSalt` accountId+      `Prelude.hashWithSalt` currentInstanceType+      `Prelude.hashWithSalt` currentPerformanceRisk+      `Prelude.hashWithSalt` effectiveRecommendationPreferences+      `Prelude.hashWithSalt` finding+      `Prelude.hashWithSalt` findingReasonCodes+      `Prelude.hashWithSalt` inferredWorkloadTypes+      `Prelude.hashWithSalt` instanceArn+      `Prelude.hashWithSalt` instanceName+      `Prelude.hashWithSalt` lastRefreshTimestamp+      `Prelude.hashWithSalt` lookBackPeriodInDays+      `Prelude.hashWithSalt` recommendationOptions+      `Prelude.hashWithSalt` recommendationSources+      `Prelude.hashWithSalt` utilizationMetrics++instance Prelude.NFData InstanceRecommendation where+  rnf InstanceRecommendation' {..} =+    Prelude.rnf accountId+      `Prelude.seq` Prelude.rnf currentInstanceType+      `Prelude.seq` Prelude.rnf currentPerformanceRisk+      `Prelude.seq` Prelude.rnf effectiveRecommendationPreferences+      `Prelude.seq` Prelude.rnf finding+      `Prelude.seq` Prelude.rnf findingReasonCodes+      `Prelude.seq` Prelude.rnf inferredWorkloadTypes+      `Prelude.seq` Prelude.rnf instanceArn+      `Prelude.seq` Prelude.rnf instanceName+      `Prelude.seq` Prelude.rnf lastRefreshTimestamp+      `Prelude.seq` Prelude.rnf lookBackPeriodInDays+      `Prelude.seq` Prelude.rnf recommendationOptions+      `Prelude.seq` Prelude.rnf recommendationSources+      `Prelude.seq` Prelude.rnf utilizationMetrics
+ gen/Amazonka/ComputeOptimizer/Types/InstanceRecommendationFindingReasonCode.hs view
@@ -0,0 +1,141 @@+{-# 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.ComputeOptimizer.Types.InstanceRecommendationFindingReasonCode+-- 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.ComputeOptimizer.Types.InstanceRecommendationFindingReasonCode+  ( InstanceRecommendationFindingReasonCode+      ( ..,+        InstanceRecommendationFindingReasonCode_CPUOverprovisioned,+        InstanceRecommendationFindingReasonCode_CPUUnderprovisioned,+        InstanceRecommendationFindingReasonCode_DiskIOPSOverprovisioned,+        InstanceRecommendationFindingReasonCode_DiskIOPSUnderprovisioned,+        InstanceRecommendationFindingReasonCode_DiskThroughputOverprovisioned,+        InstanceRecommendationFindingReasonCode_DiskThroughputUnderprovisioned,+        InstanceRecommendationFindingReasonCode_EBSIOPSOverprovisioned,+        InstanceRecommendationFindingReasonCode_EBSIOPSUnderprovisioned,+        InstanceRecommendationFindingReasonCode_EBSThroughputOverprovisioned,+        InstanceRecommendationFindingReasonCode_EBSThroughputUnderprovisioned,+        InstanceRecommendationFindingReasonCode_MemoryOverprovisioned,+        InstanceRecommendationFindingReasonCode_MemoryUnderprovisioned,+        InstanceRecommendationFindingReasonCode_NetworkBandwidthOverprovisioned,+        InstanceRecommendationFindingReasonCode_NetworkBandwidthUnderprovisioned,+        InstanceRecommendationFindingReasonCode_NetworkPPSOverprovisioned,+        InstanceRecommendationFindingReasonCode_NetworkPPSUnderprovisioned+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype InstanceRecommendationFindingReasonCode = InstanceRecommendationFindingReasonCode'+  { fromInstanceRecommendationFindingReasonCode ::+      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 InstanceRecommendationFindingReasonCode_CPUOverprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_CPUOverprovisioned = InstanceRecommendationFindingReasonCode' "CPUOverprovisioned"++pattern InstanceRecommendationFindingReasonCode_CPUUnderprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_CPUUnderprovisioned = InstanceRecommendationFindingReasonCode' "CPUUnderprovisioned"++pattern InstanceRecommendationFindingReasonCode_DiskIOPSOverprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_DiskIOPSOverprovisioned = InstanceRecommendationFindingReasonCode' "DiskIOPSOverprovisioned"++pattern InstanceRecommendationFindingReasonCode_DiskIOPSUnderprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_DiskIOPSUnderprovisioned = InstanceRecommendationFindingReasonCode' "DiskIOPSUnderprovisioned"++pattern InstanceRecommendationFindingReasonCode_DiskThroughputOverprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_DiskThroughputOverprovisioned = InstanceRecommendationFindingReasonCode' "DiskThroughputOverprovisioned"++pattern InstanceRecommendationFindingReasonCode_DiskThroughputUnderprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_DiskThroughputUnderprovisioned = InstanceRecommendationFindingReasonCode' "DiskThroughputUnderprovisioned"++pattern InstanceRecommendationFindingReasonCode_EBSIOPSOverprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_EBSIOPSOverprovisioned = InstanceRecommendationFindingReasonCode' "EBSIOPSOverprovisioned"++pattern InstanceRecommendationFindingReasonCode_EBSIOPSUnderprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_EBSIOPSUnderprovisioned = InstanceRecommendationFindingReasonCode' "EBSIOPSUnderprovisioned"++pattern InstanceRecommendationFindingReasonCode_EBSThroughputOverprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_EBSThroughputOverprovisioned = InstanceRecommendationFindingReasonCode' "EBSThroughputOverprovisioned"++pattern InstanceRecommendationFindingReasonCode_EBSThroughputUnderprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_EBSThroughputUnderprovisioned = InstanceRecommendationFindingReasonCode' "EBSThroughputUnderprovisioned"++pattern InstanceRecommendationFindingReasonCode_MemoryOverprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_MemoryOverprovisioned = InstanceRecommendationFindingReasonCode' "MemoryOverprovisioned"++pattern InstanceRecommendationFindingReasonCode_MemoryUnderprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_MemoryUnderprovisioned = InstanceRecommendationFindingReasonCode' "MemoryUnderprovisioned"++pattern InstanceRecommendationFindingReasonCode_NetworkBandwidthOverprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_NetworkBandwidthOverprovisioned = InstanceRecommendationFindingReasonCode' "NetworkBandwidthOverprovisioned"++pattern InstanceRecommendationFindingReasonCode_NetworkBandwidthUnderprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_NetworkBandwidthUnderprovisioned = InstanceRecommendationFindingReasonCode' "NetworkBandwidthUnderprovisioned"++pattern InstanceRecommendationFindingReasonCode_NetworkPPSOverprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_NetworkPPSOverprovisioned = InstanceRecommendationFindingReasonCode' "NetworkPPSOverprovisioned"++pattern InstanceRecommendationFindingReasonCode_NetworkPPSUnderprovisioned :: InstanceRecommendationFindingReasonCode+pattern InstanceRecommendationFindingReasonCode_NetworkPPSUnderprovisioned = InstanceRecommendationFindingReasonCode' "NetworkPPSUnderprovisioned"++{-# COMPLETE+  InstanceRecommendationFindingReasonCode_CPUOverprovisioned,+  InstanceRecommendationFindingReasonCode_CPUUnderprovisioned,+  InstanceRecommendationFindingReasonCode_DiskIOPSOverprovisioned,+  InstanceRecommendationFindingReasonCode_DiskIOPSUnderprovisioned,+  InstanceRecommendationFindingReasonCode_DiskThroughputOverprovisioned,+  InstanceRecommendationFindingReasonCode_DiskThroughputUnderprovisioned,+  InstanceRecommendationFindingReasonCode_EBSIOPSOverprovisioned,+  InstanceRecommendationFindingReasonCode_EBSIOPSUnderprovisioned,+  InstanceRecommendationFindingReasonCode_EBSThroughputOverprovisioned,+  InstanceRecommendationFindingReasonCode_EBSThroughputUnderprovisioned,+  InstanceRecommendationFindingReasonCode_MemoryOverprovisioned,+  InstanceRecommendationFindingReasonCode_MemoryUnderprovisioned,+  InstanceRecommendationFindingReasonCode_NetworkBandwidthOverprovisioned,+  InstanceRecommendationFindingReasonCode_NetworkBandwidthUnderprovisioned,+  InstanceRecommendationFindingReasonCode_NetworkPPSOverprovisioned,+  InstanceRecommendationFindingReasonCode_NetworkPPSUnderprovisioned,+  InstanceRecommendationFindingReasonCode'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/InstanceRecommendationOption.hs view
@@ -0,0 +1,533 @@+{-# 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.ComputeOptimizer.Types.InstanceRecommendationOption+-- 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.ComputeOptimizer.Types.InstanceRecommendationOption where++import Amazonka.ComputeOptimizer.Types.MigrationEffort+import Amazonka.ComputeOptimizer.Types.PlatformDifference+import Amazonka.ComputeOptimizer.Types.SavingsOpportunity+import Amazonka.ComputeOptimizer.Types.UtilizationMetric+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a recommendation option for an Amazon EC2 instance.+--+-- /See:/ 'newInstanceRecommendationOption' smart constructor.+data InstanceRecommendationOption = InstanceRecommendationOption'+  { -- | The instance type of the instance recommendation.+    instanceType :: Prelude.Maybe Prelude.Text,+    -- | The level of effort required to migrate from the current instance type+    -- to the recommended instance type.+    --+    -- For example, the migration effort is @Low@ if Amazon EMR is the inferred+    -- workload type and an Amazon Web Services Graviton instance type is+    -- recommended. The migration effort is @Medium@ if a workload type+    -- couldn\'t be inferred but an Amazon Web Services Graviton instance type+    -- is recommended. The migration effort is @VeryLow@ if both the current+    -- and recommended instance types are of the same CPU architecture.+    migrationEffort :: Prelude.Maybe MigrationEffort,+    -- | The performance risk of the instance recommendation option.+    --+    -- Performance risk indicates the likelihood of the recommended instance+    -- type not meeting the resource needs of your workload. Compute Optimizer+    -- calculates an individual performance risk score for each specification+    -- of the recommended instance, including CPU, memory, EBS throughput, EBS+    -- IOPS, disk throughput, disk IOPS, network throughput, and network PPS.+    -- The performance risk of the recommended instance is calculated as the+    -- maximum performance risk score across the analyzed resource+    -- specifications.+    --+    -- The value ranges from @0@ - @4@, with @0@ meaning that the recommended+    -- resource is predicted to always provide enough hardware capability. The+    -- higher the performance risk is, the more likely you should validate+    -- whether the recommendation will meet the performance requirements of+    -- your workload before migrating your resource.+    performanceRisk :: Prelude.Maybe Prelude.Double,+    -- | Describes the configuration differences between the current instance and+    -- the recommended instance type. You should consider the configuration+    -- differences before migrating your workloads from the current instance to+    -- the recommended instance type. The+    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html Change the instance type guide for Linux>+    -- and+    -- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-resize.html Change the instance type guide for Windows>+    -- provide general guidance for getting started with an instance migration.+    --+    -- Platform differences include:+    --+    -- -   __@Hypervisor@__ — The hypervisor of the recommended instance type+    --     is different than that of the current instance. For example, the+    --     recommended instance type uses a Nitro hypervisor and the current+    --     instance uses a Xen hypervisor. The differences that you should+    --     consider between these hypervisors are covered in the+    --     <http://aws.amazon.com/ec2/faqs/#Nitro_Hypervisor Nitro Hypervisor>+    --     section of the Amazon EC2 frequently asked questions. For more+    --     information, see+    --     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances Instances built on the Nitro System>+    --     in the /Amazon EC2 User Guide for Linux/, or+    --     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#ec2-nitro-instances Instances built on the Nitro System>+    --     in the /Amazon EC2 User Guide for Windows/.+    --+    -- -   __@NetworkInterface@__ — The network interface of the recommended+    --     instance type is different than that of the current instance. For+    --     example, the recommended instance type supports enhanced networking+    --     and the current instance might not. To enable enhanced networking+    --     for the recommended instance type, you must install the Elastic+    --     Network Adapter (ENA) driver or the Intel 82599 Virtual Function+    --     driver. For more information, see+    --     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#instance-networking-storage Networking and storage features>+    --     and+    --     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html Enhanced networking on Linux>+    --     in the /Amazon EC2 User Guide for Linux/, or+    --     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#instance-networking-storage Networking and storage features>+    --     and+    --     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/enhanced-networking.html Enhanced networking on Windows>+    --     in the /Amazon EC2 User Guide for Windows/.+    --+    -- -   __@StorageInterface@__ — The storage interface of the recommended+    --     instance type is different than that of the current instance. For+    --     example, the recommended instance type uses an NVMe storage+    --     interface and the current instance does not. To access NVMe volumes+    --     for the recommended instance type, you will need to install or+    --     upgrade the NVMe driver. For more information, see+    --     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#instance-networking-storage Networking and storage features>+    --     and+    --     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html Amazon EBS and NVMe on Linux instances>+    --     in the /Amazon EC2 User Guide for Linux/, or+    --     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#instance-networking-storage Networking and storage features>+    --     and+    --     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/nvme-ebs-volumes.html Amazon EBS and NVMe on Windows instances>+    --     in the /Amazon EC2 User Guide for Windows/.+    --+    -- -   __@InstanceStoreAvailability@__ — The recommended instance type does+    --     not support instance store volumes and the current instance does.+    --     Before migrating, you might need to back up the data on your+    --     instance store volumes if you want to preserve them. For more+    --     information, see+    --     <https://aws.amazon.com/premiumsupport/knowledge-center/back-up-instance-store-ebs/ How do I back up an instance store volume on my Amazon EC2 instance to Amazon EBS?>+    --     in the /Amazon Web Services Premium Support Knowledge Base/. For+    --     more information, see+    --     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#instance-networking-storage Networking and storage features>+    --     and+    --     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html Amazon EC2 instance store>+    --     in the /Amazon EC2 User Guide for Linux/, or see+    --     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#instance-networking-storage Networking and storage features>+    --     and+    --     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/InstanceStorage.html Amazon EC2 instance store>+    --     in the /Amazon EC2 User Guide for Windows/.+    --+    -- -   __@VirtualizationType@__ — The recommended instance type uses the+    --     hardware virtual machine (HVM) virtualization type and the current+    --     instance uses the paravirtual (PV) virtualization type. For more+    --     information about the differences between these virtualization+    --     types, see+    --     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/virtualization_types.html Linux AMI virtualization types>+    --     in the /Amazon EC2 User Guide for Linux/, or+    --     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/windows-ami-version-history.html#virtualization-types Windows AMI virtualization types>+    --     in the /Amazon EC2 User Guide for Windows/.+    --+    -- -   __@Architecture@__ — The CPU architecture between the recommended+    --     instance type and the current instance is different. For example,+    --     the recommended instance type might use an Arm CPU architecture and+    --     the current instance type might use a different one, such as x86.+    --     Before migrating, you should consider recompiling the software on+    --     your instance for the new architecture. Alternatively, you might+    --     switch to an Amazon Machine Image (AMI) that supports the new+    --     architecture. For more information about the CPU architecture for+    --     each instance type, see+    --     <http://aws.amazon.com/ec2/instance-types/ Amazon EC2 Instance Types>.+    platformDifferences :: Prelude.Maybe [PlatformDifference],+    -- | An array of objects that describe the projected utilization metrics of+    -- the instance recommendation option.+    --+    -- The @Cpu@ and @Memory@ metrics are the only projected utilization+    -- metrics returned. Additionally, the @Memory@ metric is returned only for+    -- resources that have the unified CloudWatch agent installed on them. For+    -- more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+    projectedUtilizationMetrics :: Prelude.Maybe [UtilizationMetric],+    -- | The rank of the instance recommendation option.+    --+    -- The top recommendation option is ranked as @1@.+    rank :: Prelude.Maybe Prelude.Int,+    -- | An object that describes the savings opportunity for the instance+    -- recommendation option. Savings opportunity includes the estimated+    -- monthly savings amount and percentage.+    savingsOpportunity :: Prelude.Maybe SavingsOpportunity+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InstanceRecommendationOption' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'instanceType', 'instanceRecommendationOption_instanceType' - The instance type of the instance recommendation.+--+-- 'migrationEffort', 'instanceRecommendationOption_migrationEffort' - The level of effort required to migrate from the current instance type+-- to the recommended instance type.+--+-- For example, the migration effort is @Low@ if Amazon EMR is the inferred+-- workload type and an Amazon Web Services Graviton instance type is+-- recommended. The migration effort is @Medium@ if a workload type+-- couldn\'t be inferred but an Amazon Web Services Graviton instance type+-- is recommended. The migration effort is @VeryLow@ if both the current+-- and recommended instance types are of the same CPU architecture.+--+-- 'performanceRisk', 'instanceRecommendationOption_performanceRisk' - The performance risk of the instance recommendation option.+--+-- Performance risk indicates the likelihood of the recommended instance+-- type not meeting the resource needs of your workload. Compute Optimizer+-- calculates an individual performance risk score for each specification+-- of the recommended instance, including CPU, memory, EBS throughput, EBS+-- IOPS, disk throughput, disk IOPS, network throughput, and network PPS.+-- The performance risk of the recommended instance is calculated as the+-- maximum performance risk score across the analyzed resource+-- specifications.+--+-- The value ranges from @0@ - @4@, with @0@ meaning that the recommended+-- resource is predicted to always provide enough hardware capability. The+-- higher the performance risk is, the more likely you should validate+-- whether the recommendation will meet the performance requirements of+-- your workload before migrating your resource.+--+-- 'platformDifferences', 'instanceRecommendationOption_platformDifferences' - Describes the configuration differences between the current instance and+-- the recommended instance type. You should consider the configuration+-- differences before migrating your workloads from the current instance to+-- the recommended instance type. The+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html Change the instance type guide for Linux>+-- and+-- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-resize.html Change the instance type guide for Windows>+-- provide general guidance for getting started with an instance migration.+--+-- Platform differences include:+--+-- -   __@Hypervisor@__ — The hypervisor of the recommended instance type+--     is different than that of the current instance. For example, the+--     recommended instance type uses a Nitro hypervisor and the current+--     instance uses a Xen hypervisor. The differences that you should+--     consider between these hypervisors are covered in the+--     <http://aws.amazon.com/ec2/faqs/#Nitro_Hypervisor Nitro Hypervisor>+--     section of the Amazon EC2 frequently asked questions. For more+--     information, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances Instances built on the Nitro System>+--     in the /Amazon EC2 User Guide for Linux/, or+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#ec2-nitro-instances Instances built on the Nitro System>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@NetworkInterface@__ — The network interface of the recommended+--     instance type is different than that of the current instance. For+--     example, the recommended instance type supports enhanced networking+--     and the current instance might not. To enable enhanced networking+--     for the recommended instance type, you must install the Elastic+--     Network Adapter (ENA) driver or the Intel 82599 Virtual Function+--     driver. For more information, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html Enhanced networking on Linux>+--     in the /Amazon EC2 User Guide for Linux/, or+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/enhanced-networking.html Enhanced networking on Windows>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@StorageInterface@__ — The storage interface of the recommended+--     instance type is different than that of the current instance. For+--     example, the recommended instance type uses an NVMe storage+--     interface and the current instance does not. To access NVMe volumes+--     for the recommended instance type, you will need to install or+--     upgrade the NVMe driver. For more information, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html Amazon EBS and NVMe on Linux instances>+--     in the /Amazon EC2 User Guide for Linux/, or+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/nvme-ebs-volumes.html Amazon EBS and NVMe on Windows instances>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@InstanceStoreAvailability@__ — The recommended instance type does+--     not support instance store volumes and the current instance does.+--     Before migrating, you might need to back up the data on your+--     instance store volumes if you want to preserve them. For more+--     information, see+--     <https://aws.amazon.com/premiumsupport/knowledge-center/back-up-instance-store-ebs/ How do I back up an instance store volume on my Amazon EC2 instance to Amazon EBS?>+--     in the /Amazon Web Services Premium Support Knowledge Base/. For+--     more information, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html Amazon EC2 instance store>+--     in the /Amazon EC2 User Guide for Linux/, or see+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/InstanceStorage.html Amazon EC2 instance store>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@VirtualizationType@__ — The recommended instance type uses the+--     hardware virtual machine (HVM) virtualization type and the current+--     instance uses the paravirtual (PV) virtualization type. For more+--     information about the differences between these virtualization+--     types, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/virtualization_types.html Linux AMI virtualization types>+--     in the /Amazon EC2 User Guide for Linux/, or+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/windows-ami-version-history.html#virtualization-types Windows AMI virtualization types>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@Architecture@__ — The CPU architecture between the recommended+--     instance type and the current instance is different. For example,+--     the recommended instance type might use an Arm CPU architecture and+--     the current instance type might use a different one, such as x86.+--     Before migrating, you should consider recompiling the software on+--     your instance for the new architecture. Alternatively, you might+--     switch to an Amazon Machine Image (AMI) that supports the new+--     architecture. For more information about the CPU architecture for+--     each instance type, see+--     <http://aws.amazon.com/ec2/instance-types/ Amazon EC2 Instance Types>.+--+-- 'projectedUtilizationMetrics', 'instanceRecommendationOption_projectedUtilizationMetrics' - An array of objects that describe the projected utilization metrics of+-- the instance recommendation option.+--+-- The @Cpu@ and @Memory@ metrics are the only projected utilization+-- metrics returned. Additionally, the @Memory@ metric is returned only for+-- resources that have the unified CloudWatch agent installed on them. For+-- more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+--+-- 'rank', 'instanceRecommendationOption_rank' - The rank of the instance recommendation option.+--+-- The top recommendation option is ranked as @1@.+--+-- 'savingsOpportunity', 'instanceRecommendationOption_savingsOpportunity' - An object that describes the savings opportunity for the instance+-- recommendation option. Savings opportunity includes the estimated+-- monthly savings amount and percentage.+newInstanceRecommendationOption ::+  InstanceRecommendationOption+newInstanceRecommendationOption =+  InstanceRecommendationOption'+    { instanceType =+        Prelude.Nothing,+      migrationEffort = Prelude.Nothing,+      performanceRisk = Prelude.Nothing,+      platformDifferences = Prelude.Nothing,+      projectedUtilizationMetrics = Prelude.Nothing,+      rank = Prelude.Nothing,+      savingsOpportunity = Prelude.Nothing+    }++-- | The instance type of the instance recommendation.+instanceRecommendationOption_instanceType :: Lens.Lens' InstanceRecommendationOption (Prelude.Maybe Prelude.Text)+instanceRecommendationOption_instanceType = Lens.lens (\InstanceRecommendationOption' {instanceType} -> instanceType) (\s@InstanceRecommendationOption' {} a -> s {instanceType = a} :: InstanceRecommendationOption)++-- | The level of effort required to migrate from the current instance type+-- to the recommended instance type.+--+-- For example, the migration effort is @Low@ if Amazon EMR is the inferred+-- workload type and an Amazon Web Services Graviton instance type is+-- recommended. The migration effort is @Medium@ if a workload type+-- couldn\'t be inferred but an Amazon Web Services Graviton instance type+-- is recommended. The migration effort is @VeryLow@ if both the current+-- and recommended instance types are of the same CPU architecture.+instanceRecommendationOption_migrationEffort :: Lens.Lens' InstanceRecommendationOption (Prelude.Maybe MigrationEffort)+instanceRecommendationOption_migrationEffort = Lens.lens (\InstanceRecommendationOption' {migrationEffort} -> migrationEffort) (\s@InstanceRecommendationOption' {} a -> s {migrationEffort = a} :: InstanceRecommendationOption)++-- | The performance risk of the instance recommendation option.+--+-- Performance risk indicates the likelihood of the recommended instance+-- type not meeting the resource needs of your workload. Compute Optimizer+-- calculates an individual performance risk score for each specification+-- of the recommended instance, including CPU, memory, EBS throughput, EBS+-- IOPS, disk throughput, disk IOPS, network throughput, and network PPS.+-- The performance risk of the recommended instance is calculated as the+-- maximum performance risk score across the analyzed resource+-- specifications.+--+-- The value ranges from @0@ - @4@, with @0@ meaning that the recommended+-- resource is predicted to always provide enough hardware capability. The+-- higher the performance risk is, the more likely you should validate+-- whether the recommendation will meet the performance requirements of+-- your workload before migrating your resource.+instanceRecommendationOption_performanceRisk :: Lens.Lens' InstanceRecommendationOption (Prelude.Maybe Prelude.Double)+instanceRecommendationOption_performanceRisk = Lens.lens (\InstanceRecommendationOption' {performanceRisk} -> performanceRisk) (\s@InstanceRecommendationOption' {} a -> s {performanceRisk = a} :: InstanceRecommendationOption)++-- | Describes the configuration differences between the current instance and+-- the recommended instance type. You should consider the configuration+-- differences before migrating your workloads from the current instance to+-- the recommended instance type. The+-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html Change the instance type guide for Linux>+-- and+-- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-resize.html Change the instance type guide for Windows>+-- provide general guidance for getting started with an instance migration.+--+-- Platform differences include:+--+-- -   __@Hypervisor@__ — The hypervisor of the recommended instance type+--     is different than that of the current instance. For example, the+--     recommended instance type uses a Nitro hypervisor and the current+--     instance uses a Xen hypervisor. The differences that you should+--     consider between these hypervisors are covered in the+--     <http://aws.amazon.com/ec2/faqs/#Nitro_Hypervisor Nitro Hypervisor>+--     section of the Amazon EC2 frequently asked questions. For more+--     information, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances Instances built on the Nitro System>+--     in the /Amazon EC2 User Guide for Linux/, or+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#ec2-nitro-instances Instances built on the Nitro System>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@NetworkInterface@__ — The network interface of the recommended+--     instance type is different than that of the current instance. For+--     example, the recommended instance type supports enhanced networking+--     and the current instance might not. To enable enhanced networking+--     for the recommended instance type, you must install the Elastic+--     Network Adapter (ENA) driver or the Intel 82599 Virtual Function+--     driver. For more information, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html Enhanced networking on Linux>+--     in the /Amazon EC2 User Guide for Linux/, or+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/enhanced-networking.html Enhanced networking on Windows>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@StorageInterface@__ — The storage interface of the recommended+--     instance type is different than that of the current instance. For+--     example, the recommended instance type uses an NVMe storage+--     interface and the current instance does not. To access NVMe volumes+--     for the recommended instance type, you will need to install or+--     upgrade the NVMe driver. For more information, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html Amazon EBS and NVMe on Linux instances>+--     in the /Amazon EC2 User Guide for Linux/, or+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/nvme-ebs-volumes.html Amazon EBS and NVMe on Windows instances>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@InstanceStoreAvailability@__ — The recommended instance type does+--     not support instance store volumes and the current instance does.+--     Before migrating, you might need to back up the data on your+--     instance store volumes if you want to preserve them. For more+--     information, see+--     <https://aws.amazon.com/premiumsupport/knowledge-center/back-up-instance-store-ebs/ How do I back up an instance store volume on my Amazon EC2 instance to Amazon EBS?>+--     in the /Amazon Web Services Premium Support Knowledge Base/. For+--     more information, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html Amazon EC2 instance store>+--     in the /Amazon EC2 User Guide for Linux/, or see+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html#instance-networking-storage Networking and storage features>+--     and+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/InstanceStorage.html Amazon EC2 instance store>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@VirtualizationType@__ — The recommended instance type uses the+--     hardware virtual machine (HVM) virtualization type and the current+--     instance uses the paravirtual (PV) virtualization type. For more+--     information about the differences between these virtualization+--     types, see+--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/virtualization_types.html Linux AMI virtualization types>+--     in the /Amazon EC2 User Guide for Linux/, or+--     <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/windows-ami-version-history.html#virtualization-types Windows AMI virtualization types>+--     in the /Amazon EC2 User Guide for Windows/.+--+-- -   __@Architecture@__ — The CPU architecture between the recommended+--     instance type and the current instance is different. For example,+--     the recommended instance type might use an Arm CPU architecture and+--     the current instance type might use a different one, such as x86.+--     Before migrating, you should consider recompiling the software on+--     your instance for the new architecture. Alternatively, you might+--     switch to an Amazon Machine Image (AMI) that supports the new+--     architecture. For more information about the CPU architecture for+--     each instance type, see+--     <http://aws.amazon.com/ec2/instance-types/ Amazon EC2 Instance Types>.+instanceRecommendationOption_platformDifferences :: Lens.Lens' InstanceRecommendationOption (Prelude.Maybe [PlatformDifference])+instanceRecommendationOption_platformDifferences = Lens.lens (\InstanceRecommendationOption' {platformDifferences} -> platformDifferences) (\s@InstanceRecommendationOption' {} a -> s {platformDifferences = a} :: InstanceRecommendationOption) Prelude.. Lens.mapping Lens.coerced++-- | An array of objects that describe the projected utilization metrics of+-- the instance recommendation option.+--+-- The @Cpu@ and @Memory@ metrics are the only projected utilization+-- metrics returned. Additionally, the @Memory@ metric is returned only for+-- resources that have the unified CloudWatch agent installed on them. For+-- more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+instanceRecommendationOption_projectedUtilizationMetrics :: Lens.Lens' InstanceRecommendationOption (Prelude.Maybe [UtilizationMetric])+instanceRecommendationOption_projectedUtilizationMetrics = Lens.lens (\InstanceRecommendationOption' {projectedUtilizationMetrics} -> projectedUtilizationMetrics) (\s@InstanceRecommendationOption' {} a -> s {projectedUtilizationMetrics = a} :: InstanceRecommendationOption) Prelude.. Lens.mapping Lens.coerced++-- | The rank of the instance recommendation option.+--+-- The top recommendation option is ranked as @1@.+instanceRecommendationOption_rank :: Lens.Lens' InstanceRecommendationOption (Prelude.Maybe Prelude.Int)+instanceRecommendationOption_rank = Lens.lens (\InstanceRecommendationOption' {rank} -> rank) (\s@InstanceRecommendationOption' {} a -> s {rank = a} :: InstanceRecommendationOption)++-- | An object that describes the savings opportunity for the instance+-- recommendation option. Savings opportunity includes the estimated+-- monthly savings amount and percentage.+instanceRecommendationOption_savingsOpportunity :: Lens.Lens' InstanceRecommendationOption (Prelude.Maybe SavingsOpportunity)+instanceRecommendationOption_savingsOpportunity = Lens.lens (\InstanceRecommendationOption' {savingsOpportunity} -> savingsOpportunity) (\s@InstanceRecommendationOption' {} a -> s {savingsOpportunity = a} :: InstanceRecommendationOption)++instance Data.FromJSON InstanceRecommendationOption where+  parseJSON =+    Data.withObject+      "InstanceRecommendationOption"+      ( \x ->+          InstanceRecommendationOption'+            Prelude.<$> (x Data..:? "instanceType")+            Prelude.<*> (x Data..:? "migrationEffort")+            Prelude.<*> (x Data..:? "performanceRisk")+            Prelude.<*> ( x+                            Data..:? "platformDifferences"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> ( x+                            Data..:? "projectedUtilizationMetrics"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "rank")+            Prelude.<*> (x Data..:? "savingsOpportunity")+      )++instance+  Prelude.Hashable+    InstanceRecommendationOption+  where+  hashWithSalt _salt InstanceRecommendationOption' {..} =+    _salt+      `Prelude.hashWithSalt` instanceType+      `Prelude.hashWithSalt` migrationEffort+      `Prelude.hashWithSalt` performanceRisk+      `Prelude.hashWithSalt` platformDifferences+      `Prelude.hashWithSalt` projectedUtilizationMetrics+      `Prelude.hashWithSalt` rank+      `Prelude.hashWithSalt` savingsOpportunity++instance Prelude.NFData InstanceRecommendationOption where+  rnf InstanceRecommendationOption' {..} =+    Prelude.rnf instanceType+      `Prelude.seq` Prelude.rnf migrationEffort+      `Prelude.seq` Prelude.rnf performanceRisk+      `Prelude.seq` Prelude.rnf platformDifferences+      `Prelude.seq` Prelude.rnf projectedUtilizationMetrics+      `Prelude.seq` Prelude.rnf rank+      `Prelude.seq` Prelude.rnf savingsOpportunity
+ gen/Amazonka/ComputeOptimizer/Types/JobFilter.hs view
@@ -0,0 +1,142 @@+{-# 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.ComputeOptimizer.Types.JobFilter+-- 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.ComputeOptimizer.Types.JobFilter where++import Amazonka.ComputeOptimizer.Types.JobFilterName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a filter that returns a more specific list of recommendation+-- export jobs. Use this filter with the DescribeRecommendationExportJobs+-- action.+--+-- You can use @EBSFilter@ with the GetEBSVolumeRecommendations action,+-- @LambdaFunctionRecommendationFilter@ with the+-- GetLambdaFunctionRecommendations action, and @Filter@ with the+-- GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations+-- actions.+--+-- /See:/ 'newJobFilter' smart constructor.+data JobFilter = JobFilter'+  { -- | The name of the filter.+    --+    -- Specify @ResourceType@ to return export jobs of a specific resource type+    -- (for example, @Ec2Instance@).+    --+    -- Specify @JobStatus@ to return export jobs with a specific status (e.g,+    -- @Complete@).+    name :: Prelude.Maybe JobFilterName,+    -- | The value of the filter.+    --+    -- The valid values for this parameter are as follows, depending on what+    -- you specify for the @name@ parameter:+    --+    -- -   Specify @Ec2Instance@ or @AutoScalingGroup@ if you specify the+    --     @name@ parameter as @ResourceType@. There is no filter for EBS+    --     volumes because volume recommendations cannot be exported at this+    --     time.+    --+    -- -   Specify @Queued@, @InProgress@, @Complete@, or @Failed@ if you+    --     specify the @name@ parameter as @JobStatus@.+    values :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'JobFilter' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'jobFilter_name' - The name of the filter.+--+-- Specify @ResourceType@ to return export jobs of a specific resource type+-- (for example, @Ec2Instance@).+--+-- Specify @JobStatus@ to return export jobs with a specific status (e.g,+-- @Complete@).+--+-- 'values', 'jobFilter_values' - The value of the filter.+--+-- The valid values for this parameter are as follows, depending on what+-- you specify for the @name@ parameter:+--+-- -   Specify @Ec2Instance@ or @AutoScalingGroup@ if you specify the+--     @name@ parameter as @ResourceType@. There is no filter for EBS+--     volumes because volume recommendations cannot be exported at this+--     time.+--+-- -   Specify @Queued@, @InProgress@, @Complete@, or @Failed@ if you+--     specify the @name@ parameter as @JobStatus@.+newJobFilter ::+  JobFilter+newJobFilter =+  JobFilter'+    { name = Prelude.Nothing,+      values = Prelude.Nothing+    }++-- | The name of the filter.+--+-- Specify @ResourceType@ to return export jobs of a specific resource type+-- (for example, @Ec2Instance@).+--+-- Specify @JobStatus@ to return export jobs with a specific status (e.g,+-- @Complete@).+jobFilter_name :: Lens.Lens' JobFilter (Prelude.Maybe JobFilterName)+jobFilter_name = Lens.lens (\JobFilter' {name} -> name) (\s@JobFilter' {} a -> s {name = a} :: JobFilter)++-- | The value of the filter.+--+-- The valid values for this parameter are as follows, depending on what+-- you specify for the @name@ parameter:+--+-- -   Specify @Ec2Instance@ or @AutoScalingGroup@ if you specify the+--     @name@ parameter as @ResourceType@. There is no filter for EBS+--     volumes because volume recommendations cannot be exported at this+--     time.+--+-- -   Specify @Queued@, @InProgress@, @Complete@, or @Failed@ if you+--     specify the @name@ parameter as @JobStatus@.+jobFilter_values :: Lens.Lens' JobFilter (Prelude.Maybe [Prelude.Text])+jobFilter_values = Lens.lens (\JobFilter' {values} -> values) (\s@JobFilter' {} a -> s {values = a} :: JobFilter) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable JobFilter where+  hashWithSalt _salt JobFilter' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` values++instance Prelude.NFData JobFilter where+  rnf JobFilter' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON JobFilter where+  toJSON JobFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("name" Data..=) Prelude.<$> name,+            ("values" Data..=) Prelude.<$> values+          ]+      )
+ gen/Amazonka/ComputeOptimizer/Types/JobFilterName.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.JobFilterName+-- 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.ComputeOptimizer.Types.JobFilterName+  ( JobFilterName+      ( ..,+        JobFilterName_JobStatus,+        JobFilterName_ResourceType+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype JobFilterName = JobFilterName'+  { fromJobFilterName ::+      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 JobFilterName_JobStatus :: JobFilterName+pattern JobFilterName_JobStatus = JobFilterName' "JobStatus"++pattern JobFilterName_ResourceType :: JobFilterName+pattern JobFilterName_ResourceType = JobFilterName' "ResourceType"++{-# COMPLETE+  JobFilterName_JobStatus,+  JobFilterName_ResourceType,+  JobFilterName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/JobStatus.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.ComputeOptimizer.Types.JobStatus+-- 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.ComputeOptimizer.Types.JobStatus+  ( JobStatus+      ( ..,+        JobStatus_Complete,+        JobStatus_Failed,+        JobStatus_InProgress,+        JobStatus_Queued+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype JobStatus = JobStatus'+  { fromJobStatus ::+      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 JobStatus_Complete :: JobStatus+pattern JobStatus_Complete = JobStatus' "Complete"++pattern JobStatus_Failed :: JobStatus+pattern JobStatus_Failed = JobStatus' "Failed"++pattern JobStatus_InProgress :: JobStatus+pattern JobStatus_InProgress = JobStatus' "InProgress"++pattern JobStatus_Queued :: JobStatus+pattern JobStatus_Queued = JobStatus' "Queued"++{-# COMPLETE+  JobStatus_Complete,+  JobStatus_Failed,+  JobStatus_InProgress,+  JobStatus_Queued,+  JobStatus'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionMemoryMetricName.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.ComputeOptimizer.Types.LambdaFunctionMemoryMetricName+-- 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.ComputeOptimizer.Types.LambdaFunctionMemoryMetricName+  ( LambdaFunctionMemoryMetricName+      ( ..,+        LambdaFunctionMemoryMetricName_Duration+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LambdaFunctionMemoryMetricName = LambdaFunctionMemoryMetricName'+  { fromLambdaFunctionMemoryMetricName ::+      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 LambdaFunctionMemoryMetricName_Duration :: LambdaFunctionMemoryMetricName+pattern LambdaFunctionMemoryMetricName_Duration = LambdaFunctionMemoryMetricName' "Duration"++{-# COMPLETE+  LambdaFunctionMemoryMetricName_Duration,+  LambdaFunctionMemoryMetricName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionMemoryMetricStatistic.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.ComputeOptimizer.Types.LambdaFunctionMemoryMetricStatistic+-- 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.ComputeOptimizer.Types.LambdaFunctionMemoryMetricStatistic+  ( LambdaFunctionMemoryMetricStatistic+      ( ..,+        LambdaFunctionMemoryMetricStatistic_Expected,+        LambdaFunctionMemoryMetricStatistic_LowerBound,+        LambdaFunctionMemoryMetricStatistic_UpperBound+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LambdaFunctionMemoryMetricStatistic = LambdaFunctionMemoryMetricStatistic'+  { fromLambdaFunctionMemoryMetricStatistic ::+      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 LambdaFunctionMemoryMetricStatistic_Expected :: LambdaFunctionMemoryMetricStatistic+pattern LambdaFunctionMemoryMetricStatistic_Expected = LambdaFunctionMemoryMetricStatistic' "Expected"++pattern LambdaFunctionMemoryMetricStatistic_LowerBound :: LambdaFunctionMemoryMetricStatistic+pattern LambdaFunctionMemoryMetricStatistic_LowerBound = LambdaFunctionMemoryMetricStatistic' "LowerBound"++pattern LambdaFunctionMemoryMetricStatistic_UpperBound :: LambdaFunctionMemoryMetricStatistic+pattern LambdaFunctionMemoryMetricStatistic_UpperBound = LambdaFunctionMemoryMetricStatistic' "UpperBound"++{-# COMPLETE+  LambdaFunctionMemoryMetricStatistic_Expected,+  LambdaFunctionMemoryMetricStatistic_LowerBound,+  LambdaFunctionMemoryMetricStatistic_UpperBound,+  LambdaFunctionMemoryMetricStatistic'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionMemoryProjectedMetric.hs view
@@ -0,0 +1,111 @@+{-# 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.ComputeOptimizer.Types.LambdaFunctionMemoryProjectedMetric+-- 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.ComputeOptimizer.Types.LambdaFunctionMemoryProjectedMetric where++import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryMetricName+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryMetricStatistic+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a projected utilization metric of an Lambda function+-- recommendation option.+--+-- /See:/ 'newLambdaFunctionMemoryProjectedMetric' smart constructor.+data LambdaFunctionMemoryProjectedMetric = LambdaFunctionMemoryProjectedMetric'+  { -- | The name of the projected utilization metric.+    name :: Prelude.Maybe LambdaFunctionMemoryMetricName,+    -- | The statistic of the projected utilization metric.+    statistic :: Prelude.Maybe LambdaFunctionMemoryMetricStatistic,+    -- | The values of the projected utilization metrics.+    value :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaFunctionMemoryProjectedMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'lambdaFunctionMemoryProjectedMetric_name' - The name of the projected utilization metric.+--+-- 'statistic', 'lambdaFunctionMemoryProjectedMetric_statistic' - The statistic of the projected utilization metric.+--+-- 'value', 'lambdaFunctionMemoryProjectedMetric_value' - The values of the projected utilization metrics.+newLambdaFunctionMemoryProjectedMetric ::+  LambdaFunctionMemoryProjectedMetric+newLambdaFunctionMemoryProjectedMetric =+  LambdaFunctionMemoryProjectedMetric'+    { name =+        Prelude.Nothing,+      statistic = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The name of the projected utilization metric.+lambdaFunctionMemoryProjectedMetric_name :: Lens.Lens' LambdaFunctionMemoryProjectedMetric (Prelude.Maybe LambdaFunctionMemoryMetricName)+lambdaFunctionMemoryProjectedMetric_name = Lens.lens (\LambdaFunctionMemoryProjectedMetric' {name} -> name) (\s@LambdaFunctionMemoryProjectedMetric' {} a -> s {name = a} :: LambdaFunctionMemoryProjectedMetric)++-- | The statistic of the projected utilization metric.+lambdaFunctionMemoryProjectedMetric_statistic :: Lens.Lens' LambdaFunctionMemoryProjectedMetric (Prelude.Maybe LambdaFunctionMemoryMetricStatistic)+lambdaFunctionMemoryProjectedMetric_statistic = Lens.lens (\LambdaFunctionMemoryProjectedMetric' {statistic} -> statistic) (\s@LambdaFunctionMemoryProjectedMetric' {} a -> s {statistic = a} :: LambdaFunctionMemoryProjectedMetric)++-- | The values of the projected utilization metrics.+lambdaFunctionMemoryProjectedMetric_value :: Lens.Lens' LambdaFunctionMemoryProjectedMetric (Prelude.Maybe Prelude.Double)+lambdaFunctionMemoryProjectedMetric_value = Lens.lens (\LambdaFunctionMemoryProjectedMetric' {value} -> value) (\s@LambdaFunctionMemoryProjectedMetric' {} a -> s {value = a} :: LambdaFunctionMemoryProjectedMetric)++instance+  Data.FromJSON+    LambdaFunctionMemoryProjectedMetric+  where+  parseJSON =+    Data.withObject+      "LambdaFunctionMemoryProjectedMetric"+      ( \x ->+          LambdaFunctionMemoryProjectedMetric'+            Prelude.<$> (x Data..:? "name")+            Prelude.<*> (x Data..:? "statistic")+            Prelude.<*> (x Data..:? "value")+      )++instance+  Prelude.Hashable+    LambdaFunctionMemoryProjectedMetric+  where+  hashWithSalt+    _salt+    LambdaFunctionMemoryProjectedMetric' {..} =+      _salt+        `Prelude.hashWithSalt` name+        `Prelude.hashWithSalt` statistic+        `Prelude.hashWithSalt` value++instance+  Prelude.NFData+    LambdaFunctionMemoryProjectedMetric+  where+  rnf LambdaFunctionMemoryProjectedMetric' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf statistic+      `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionMemoryRecommendationOption.hs view
@@ -0,0 +1,142 @@+{-# 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.ComputeOptimizer.Types.LambdaFunctionMemoryRecommendationOption+-- 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.ComputeOptimizer.Types.LambdaFunctionMemoryRecommendationOption where++import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryProjectedMetric+import Amazonka.ComputeOptimizer.Types.SavingsOpportunity+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a recommendation option for an Lambda function.+--+-- /See:/ 'newLambdaFunctionMemoryRecommendationOption' smart constructor.+data LambdaFunctionMemoryRecommendationOption = LambdaFunctionMemoryRecommendationOption'+  { -- | The memory size, in MB, of the function recommendation option.+    memorySize :: Prelude.Maybe Prelude.Int,+    -- | An array of objects that describe the projected utilization metrics of+    -- the function recommendation option.+    projectedUtilizationMetrics :: Prelude.Maybe [LambdaFunctionMemoryProjectedMetric],+    -- | The rank of the function recommendation option.+    --+    -- The top recommendation option is ranked as @1@.+    rank :: Prelude.Maybe Prelude.Int,+    -- | An object that describes the savings opportunity for the Lambda function+    -- recommendation option. Savings opportunity includes the estimated+    -- monthly savings amount and percentage.+    savingsOpportunity :: Prelude.Maybe SavingsOpportunity+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaFunctionMemoryRecommendationOption' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'memorySize', 'lambdaFunctionMemoryRecommendationOption_memorySize' - The memory size, in MB, of the function recommendation option.+--+-- 'projectedUtilizationMetrics', 'lambdaFunctionMemoryRecommendationOption_projectedUtilizationMetrics' - An array of objects that describe the projected utilization metrics of+-- the function recommendation option.+--+-- 'rank', 'lambdaFunctionMemoryRecommendationOption_rank' - The rank of the function recommendation option.+--+-- The top recommendation option is ranked as @1@.+--+-- 'savingsOpportunity', 'lambdaFunctionMemoryRecommendationOption_savingsOpportunity' - An object that describes the savings opportunity for the Lambda function+-- recommendation option. Savings opportunity includes the estimated+-- monthly savings amount and percentage.+newLambdaFunctionMemoryRecommendationOption ::+  LambdaFunctionMemoryRecommendationOption+newLambdaFunctionMemoryRecommendationOption =+  LambdaFunctionMemoryRecommendationOption'+    { memorySize =+        Prelude.Nothing,+      projectedUtilizationMetrics =+        Prelude.Nothing,+      rank = Prelude.Nothing,+      savingsOpportunity =+        Prelude.Nothing+    }++-- | The memory size, in MB, of the function recommendation option.+lambdaFunctionMemoryRecommendationOption_memorySize :: Lens.Lens' LambdaFunctionMemoryRecommendationOption (Prelude.Maybe Prelude.Int)+lambdaFunctionMemoryRecommendationOption_memorySize = Lens.lens (\LambdaFunctionMemoryRecommendationOption' {memorySize} -> memorySize) (\s@LambdaFunctionMemoryRecommendationOption' {} a -> s {memorySize = a} :: LambdaFunctionMemoryRecommendationOption)++-- | An array of objects that describe the projected utilization metrics of+-- the function recommendation option.+lambdaFunctionMemoryRecommendationOption_projectedUtilizationMetrics :: Lens.Lens' LambdaFunctionMemoryRecommendationOption (Prelude.Maybe [LambdaFunctionMemoryProjectedMetric])+lambdaFunctionMemoryRecommendationOption_projectedUtilizationMetrics = Lens.lens (\LambdaFunctionMemoryRecommendationOption' {projectedUtilizationMetrics} -> projectedUtilizationMetrics) (\s@LambdaFunctionMemoryRecommendationOption' {} a -> s {projectedUtilizationMetrics = a} :: LambdaFunctionMemoryRecommendationOption) Prelude.. Lens.mapping Lens.coerced++-- | The rank of the function recommendation option.+--+-- The top recommendation option is ranked as @1@.+lambdaFunctionMemoryRecommendationOption_rank :: Lens.Lens' LambdaFunctionMemoryRecommendationOption (Prelude.Maybe Prelude.Int)+lambdaFunctionMemoryRecommendationOption_rank = Lens.lens (\LambdaFunctionMemoryRecommendationOption' {rank} -> rank) (\s@LambdaFunctionMemoryRecommendationOption' {} a -> s {rank = a} :: LambdaFunctionMemoryRecommendationOption)++-- | An object that describes the savings opportunity for the Lambda function+-- recommendation option. Savings opportunity includes the estimated+-- monthly savings amount and percentage.+lambdaFunctionMemoryRecommendationOption_savingsOpportunity :: Lens.Lens' LambdaFunctionMemoryRecommendationOption (Prelude.Maybe SavingsOpportunity)+lambdaFunctionMemoryRecommendationOption_savingsOpportunity = Lens.lens (\LambdaFunctionMemoryRecommendationOption' {savingsOpportunity} -> savingsOpportunity) (\s@LambdaFunctionMemoryRecommendationOption' {} a -> s {savingsOpportunity = a} :: LambdaFunctionMemoryRecommendationOption)++instance+  Data.FromJSON+    LambdaFunctionMemoryRecommendationOption+  where+  parseJSON =+    Data.withObject+      "LambdaFunctionMemoryRecommendationOption"+      ( \x ->+          LambdaFunctionMemoryRecommendationOption'+            Prelude.<$> (x Data..:? "memorySize")+            Prelude.<*> ( x+                            Data..:? "projectedUtilizationMetrics"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "rank")+            Prelude.<*> (x Data..:? "savingsOpportunity")+      )++instance+  Prelude.Hashable+    LambdaFunctionMemoryRecommendationOption+  where+  hashWithSalt+    _salt+    LambdaFunctionMemoryRecommendationOption' {..} =+      _salt+        `Prelude.hashWithSalt` memorySize+        `Prelude.hashWithSalt` projectedUtilizationMetrics+        `Prelude.hashWithSalt` rank+        `Prelude.hashWithSalt` savingsOpportunity++instance+  Prelude.NFData+    LambdaFunctionMemoryRecommendationOption+  where+  rnf LambdaFunctionMemoryRecommendationOption' {..} =+    Prelude.rnf memorySize+      `Prelude.seq` Prelude.rnf projectedUtilizationMetrics+      `Prelude.seq` Prelude.rnf rank+      `Prelude.seq` Prelude.rnf savingsOpportunity
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionMetricName.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.LambdaFunctionMetricName+-- 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.ComputeOptimizer.Types.LambdaFunctionMetricName+  ( LambdaFunctionMetricName+      ( ..,+        LambdaFunctionMetricName_Duration,+        LambdaFunctionMetricName_Memory+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LambdaFunctionMetricName = LambdaFunctionMetricName'+  { fromLambdaFunctionMetricName ::+      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 LambdaFunctionMetricName_Duration :: LambdaFunctionMetricName+pattern LambdaFunctionMetricName_Duration = LambdaFunctionMetricName' "Duration"++pattern LambdaFunctionMetricName_Memory :: LambdaFunctionMetricName+pattern LambdaFunctionMetricName_Memory = LambdaFunctionMetricName' "Memory"++{-# COMPLETE+  LambdaFunctionMetricName_Duration,+  LambdaFunctionMetricName_Memory,+  LambdaFunctionMetricName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionMetricStatistic.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.LambdaFunctionMetricStatistic+-- 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.ComputeOptimizer.Types.LambdaFunctionMetricStatistic+  ( LambdaFunctionMetricStatistic+      ( ..,+        LambdaFunctionMetricStatistic_Average,+        LambdaFunctionMetricStatistic_Maximum+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LambdaFunctionMetricStatistic = LambdaFunctionMetricStatistic'+  { fromLambdaFunctionMetricStatistic ::+      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 LambdaFunctionMetricStatistic_Average :: LambdaFunctionMetricStatistic+pattern LambdaFunctionMetricStatistic_Average = LambdaFunctionMetricStatistic' "Average"++pattern LambdaFunctionMetricStatistic_Maximum :: LambdaFunctionMetricStatistic+pattern LambdaFunctionMetricStatistic_Maximum = LambdaFunctionMetricStatistic' "Maximum"++{-# COMPLETE+  LambdaFunctionMetricStatistic_Average,+  LambdaFunctionMetricStatistic_Maximum,+  LambdaFunctionMetricStatistic'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionRecommendation.hs view
@@ -0,0 +1,409 @@+{-# 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.ComputeOptimizer.Types.LambdaFunctionRecommendation+-- 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.ComputeOptimizer.Types.LambdaFunctionRecommendation where++import Amazonka.ComputeOptimizer.Types.CurrentPerformanceRisk+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryRecommendationOption+import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFinding+import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFindingReasonCode+import Amazonka.ComputeOptimizer.Types.LambdaFunctionUtilizationMetric+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes an Lambda function recommendation.+--+-- /See:/ 'newLambdaFunctionRecommendation' smart constructor.+data LambdaFunctionRecommendation = LambdaFunctionRecommendation'+  { -- | The Amazon Web Services account ID of the function.+    accountId :: Prelude.Maybe Prelude.Text,+    -- | The amount of memory, in MB, that\'s allocated to the current function.+    currentMemorySize :: Prelude.Maybe Prelude.Int,+    -- | The risk of the current Lambda function not meeting the performance+    -- needs of its workloads. The higher the risk, the more likely the current+    -- Lambda function requires more memory.+    currentPerformanceRisk :: Prelude.Maybe CurrentPerformanceRisk,+    -- | The finding classification of the function.+    --+    -- Findings for functions include:+    --+    -- -   __@Optimized@__ — The function is correctly provisioned to run your+    --     workload based on its current configuration and its utilization+    --     history. This finding classification does not include finding reason+    --     codes.+    --+    -- -   __@NotOptimized@__ — The function is performing at a higher level+    --     (over-provisioned) or at a lower level (under-provisioned) than+    --     required for your workload because its current configuration is not+    --     optimal. Over-provisioned resources might lead to unnecessary+    --     infrastructure cost, and under-provisioned resources might lead to+    --     poor application performance. This finding classification can+    --     include the @MemoryUnderprovisioned@ and @MemoryUnderprovisioned@+    --     finding reason codes.+    --+    -- -   __@Unavailable@__ — Compute Optimizer was unable to generate a+    --     recommendation for the function. This could be because the function+    --     has not accumulated sufficient metric data, or the function does not+    --     qualify for a recommendation. This finding classification can+    --     include the @InsufficientData@ and @Inconclusive@ finding reason+    --     codes.+    --+    --     Functions with a finding of unavailable are not returned unless you+    --     specify the @filter@ parameter with a value of @Unavailable@ in your+    --     @GetLambdaFunctionRecommendations@ request.+    finding :: Prelude.Maybe LambdaFunctionRecommendationFinding,+    -- | The reason for the finding classification of the function.+    --+    -- Functions that have a finding classification of @Optimized@ don\'t have+    -- a finding reason code.+    --+    -- Finding reason codes for functions include:+    --+    -- -   __@MemoryOverprovisioned@__ — The function is over-provisioned when+    --     its memory configuration can be sized down while still meeting the+    --     performance requirements of your workload. An over-provisioned+    --     function might lead to unnecessary infrastructure cost. This finding+    --     reason code is part of the @NotOptimized@ finding classification.+    --+    -- -   __@MemoryUnderprovisioned@__ — The function is under-provisioned+    --     when its memory configuration doesn\'t meet the performance+    --     requirements of the workload. An under-provisioned function might+    --     lead to poor application performance. This finding reason code is+    --     part of the @NotOptimized@ finding classification.+    --+    -- -   __@InsufficientData@__ — The function does not have sufficient+    --     metric data for Compute Optimizer to generate a recommendation. For+    --     more information, see the+    --     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html Supported resources and requirements>+    --     in the /Compute Optimizer User Guide/. This finding reason code is+    --     part of the @Unavailable@ finding classification.+    --+    -- -   __@Inconclusive@__ — The function does not qualify for a+    --     recommendation because Compute Optimizer cannot generate a+    --     recommendation with a high degree of confidence. This finding reason+    --     code is part of the @Unavailable@ finding classification.+    findingReasonCodes :: Prelude.Maybe [LambdaFunctionRecommendationFindingReasonCode],+    -- | The Amazon Resource Name (ARN) of the current function.+    functionArn :: Prelude.Maybe Prelude.Text,+    -- | The version number of the current function.+    functionVersion :: Prelude.Maybe Prelude.Text,+    -- | The timestamp of when the function recommendation was last generated.+    lastRefreshTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The number of days for which utilization metrics were analyzed for the+    -- function.+    lookbackPeriodInDays :: Prelude.Maybe Prelude.Double,+    -- | An array of objects that describe the memory configuration+    -- recommendation options for the function.+    memorySizeRecommendationOptions :: Prelude.Maybe [LambdaFunctionMemoryRecommendationOption],+    -- | The number of times your function code was applied during the look-back+    -- period.+    numberOfInvocations :: Prelude.Maybe Prelude.Integer,+    -- | An array of objects that describe the utilization metrics of the+    -- function.+    utilizationMetrics :: Prelude.Maybe [LambdaFunctionUtilizationMetric]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaFunctionRecommendation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'lambdaFunctionRecommendation_accountId' - The Amazon Web Services account ID of the function.+--+-- 'currentMemorySize', 'lambdaFunctionRecommendation_currentMemorySize' - The amount of memory, in MB, that\'s allocated to the current function.+--+-- 'currentPerformanceRisk', 'lambdaFunctionRecommendation_currentPerformanceRisk' - The risk of the current Lambda function not meeting the performance+-- needs of its workloads. The higher the risk, the more likely the current+-- Lambda function requires more memory.+--+-- 'finding', 'lambdaFunctionRecommendation_finding' - The finding classification of the function.+--+-- Findings for functions include:+--+-- -   __@Optimized@__ — The function is correctly provisioned to run your+--     workload based on its current configuration and its utilization+--     history. This finding classification does not include finding reason+--     codes.+--+-- -   __@NotOptimized@__ — The function is performing at a higher level+--     (over-provisioned) or at a lower level (under-provisioned) than+--     required for your workload because its current configuration is not+--     optimal. Over-provisioned resources might lead to unnecessary+--     infrastructure cost, and under-provisioned resources might lead to+--     poor application performance. This finding classification can+--     include the @MemoryUnderprovisioned@ and @MemoryUnderprovisioned@+--     finding reason codes.+--+-- -   __@Unavailable@__ — Compute Optimizer was unable to generate a+--     recommendation for the function. This could be because the function+--     has not accumulated sufficient metric data, or the function does not+--     qualify for a recommendation. This finding classification can+--     include the @InsufficientData@ and @Inconclusive@ finding reason+--     codes.+--+--     Functions with a finding of unavailable are not returned unless you+--     specify the @filter@ parameter with a value of @Unavailable@ in your+--     @GetLambdaFunctionRecommendations@ request.+--+-- 'findingReasonCodes', 'lambdaFunctionRecommendation_findingReasonCodes' - The reason for the finding classification of the function.+--+-- Functions that have a finding classification of @Optimized@ don\'t have+-- a finding reason code.+--+-- Finding reason codes for functions include:+--+-- -   __@MemoryOverprovisioned@__ — The function is over-provisioned when+--     its memory configuration can be sized down while still meeting the+--     performance requirements of your workload. An over-provisioned+--     function might lead to unnecessary infrastructure cost. This finding+--     reason code is part of the @NotOptimized@ finding classification.+--+-- -   __@MemoryUnderprovisioned@__ — The function is under-provisioned+--     when its memory configuration doesn\'t meet the performance+--     requirements of the workload. An under-provisioned function might+--     lead to poor application performance. This finding reason code is+--     part of the @NotOptimized@ finding classification.+--+-- -   __@InsufficientData@__ — The function does not have sufficient+--     metric data for Compute Optimizer to generate a recommendation. For+--     more information, see the+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html Supported resources and requirements>+--     in the /Compute Optimizer User Guide/. This finding reason code is+--     part of the @Unavailable@ finding classification.+--+-- -   __@Inconclusive@__ — The function does not qualify for a+--     recommendation because Compute Optimizer cannot generate a+--     recommendation with a high degree of confidence. This finding reason+--     code is part of the @Unavailable@ finding classification.+--+-- 'functionArn', 'lambdaFunctionRecommendation_functionArn' - The Amazon Resource Name (ARN) of the current function.+--+-- 'functionVersion', 'lambdaFunctionRecommendation_functionVersion' - The version number of the current function.+--+-- 'lastRefreshTimestamp', 'lambdaFunctionRecommendation_lastRefreshTimestamp' - The timestamp of when the function recommendation was last generated.+--+-- 'lookbackPeriodInDays', 'lambdaFunctionRecommendation_lookbackPeriodInDays' - The number of days for which utilization metrics were analyzed for the+-- function.+--+-- 'memorySizeRecommendationOptions', 'lambdaFunctionRecommendation_memorySizeRecommendationOptions' - An array of objects that describe the memory configuration+-- recommendation options for the function.+--+-- 'numberOfInvocations', 'lambdaFunctionRecommendation_numberOfInvocations' - The number of times your function code was applied during the look-back+-- period.+--+-- 'utilizationMetrics', 'lambdaFunctionRecommendation_utilizationMetrics' - An array of objects that describe the utilization metrics of the+-- function.+newLambdaFunctionRecommendation ::+  LambdaFunctionRecommendation+newLambdaFunctionRecommendation =+  LambdaFunctionRecommendation'+    { accountId =+        Prelude.Nothing,+      currentMemorySize = Prelude.Nothing,+      currentPerformanceRisk = Prelude.Nothing,+      finding = Prelude.Nothing,+      findingReasonCodes = Prelude.Nothing,+      functionArn = Prelude.Nothing,+      functionVersion = Prelude.Nothing,+      lastRefreshTimestamp = Prelude.Nothing,+      lookbackPeriodInDays = Prelude.Nothing,+      memorySizeRecommendationOptions =+        Prelude.Nothing,+      numberOfInvocations = Prelude.Nothing,+      utilizationMetrics = Prelude.Nothing+    }++-- | The Amazon Web Services account ID of the function.+lambdaFunctionRecommendation_accountId :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Text)+lambdaFunctionRecommendation_accountId = Lens.lens (\LambdaFunctionRecommendation' {accountId} -> accountId) (\s@LambdaFunctionRecommendation' {} a -> s {accountId = a} :: LambdaFunctionRecommendation)++-- | The amount of memory, in MB, that\'s allocated to the current function.+lambdaFunctionRecommendation_currentMemorySize :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Int)+lambdaFunctionRecommendation_currentMemorySize = Lens.lens (\LambdaFunctionRecommendation' {currentMemorySize} -> currentMemorySize) (\s@LambdaFunctionRecommendation' {} a -> s {currentMemorySize = a} :: LambdaFunctionRecommendation)++-- | The risk of the current Lambda function not meeting the performance+-- needs of its workloads. The higher the risk, the more likely the current+-- Lambda function requires more memory.+lambdaFunctionRecommendation_currentPerformanceRisk :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe CurrentPerformanceRisk)+lambdaFunctionRecommendation_currentPerformanceRisk = Lens.lens (\LambdaFunctionRecommendation' {currentPerformanceRisk} -> currentPerformanceRisk) (\s@LambdaFunctionRecommendation' {} a -> s {currentPerformanceRisk = a} :: LambdaFunctionRecommendation)++-- | The finding classification of the function.+--+-- Findings for functions include:+--+-- -   __@Optimized@__ — The function is correctly provisioned to run your+--     workload based on its current configuration and its utilization+--     history. This finding classification does not include finding reason+--     codes.+--+-- -   __@NotOptimized@__ — The function is performing at a higher level+--     (over-provisioned) or at a lower level (under-provisioned) than+--     required for your workload because its current configuration is not+--     optimal. Over-provisioned resources might lead to unnecessary+--     infrastructure cost, and under-provisioned resources might lead to+--     poor application performance. This finding classification can+--     include the @MemoryUnderprovisioned@ and @MemoryUnderprovisioned@+--     finding reason codes.+--+-- -   __@Unavailable@__ — Compute Optimizer was unable to generate a+--     recommendation for the function. This could be because the function+--     has not accumulated sufficient metric data, or the function does not+--     qualify for a recommendation. This finding classification can+--     include the @InsufficientData@ and @Inconclusive@ finding reason+--     codes.+--+--     Functions with a finding of unavailable are not returned unless you+--     specify the @filter@ parameter with a value of @Unavailable@ in your+--     @GetLambdaFunctionRecommendations@ request.+lambdaFunctionRecommendation_finding :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe LambdaFunctionRecommendationFinding)+lambdaFunctionRecommendation_finding = Lens.lens (\LambdaFunctionRecommendation' {finding} -> finding) (\s@LambdaFunctionRecommendation' {} a -> s {finding = a} :: LambdaFunctionRecommendation)++-- | The reason for the finding classification of the function.+--+-- Functions that have a finding classification of @Optimized@ don\'t have+-- a finding reason code.+--+-- Finding reason codes for functions include:+--+-- -   __@MemoryOverprovisioned@__ — The function is over-provisioned when+--     its memory configuration can be sized down while still meeting the+--     performance requirements of your workload. An over-provisioned+--     function might lead to unnecessary infrastructure cost. This finding+--     reason code is part of the @NotOptimized@ finding classification.+--+-- -   __@MemoryUnderprovisioned@__ — The function is under-provisioned+--     when its memory configuration doesn\'t meet the performance+--     requirements of the workload. An under-provisioned function might+--     lead to poor application performance. This finding reason code is+--     part of the @NotOptimized@ finding classification.+--+-- -   __@InsufficientData@__ — The function does not have sufficient+--     metric data for Compute Optimizer to generate a recommendation. For+--     more information, see the+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html Supported resources and requirements>+--     in the /Compute Optimizer User Guide/. This finding reason code is+--     part of the @Unavailable@ finding classification.+--+-- -   __@Inconclusive@__ — The function does not qualify for a+--     recommendation because Compute Optimizer cannot generate a+--     recommendation with a high degree of confidence. This finding reason+--     code is part of the @Unavailable@ finding classification.+lambdaFunctionRecommendation_findingReasonCodes :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe [LambdaFunctionRecommendationFindingReasonCode])+lambdaFunctionRecommendation_findingReasonCodes = Lens.lens (\LambdaFunctionRecommendation' {findingReasonCodes} -> findingReasonCodes) (\s@LambdaFunctionRecommendation' {} a -> s {findingReasonCodes = a} :: LambdaFunctionRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the current function.+lambdaFunctionRecommendation_functionArn :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Text)+lambdaFunctionRecommendation_functionArn = Lens.lens (\LambdaFunctionRecommendation' {functionArn} -> functionArn) (\s@LambdaFunctionRecommendation' {} a -> s {functionArn = a} :: LambdaFunctionRecommendation)++-- | The version number of the current function.+lambdaFunctionRecommendation_functionVersion :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Text)+lambdaFunctionRecommendation_functionVersion = Lens.lens (\LambdaFunctionRecommendation' {functionVersion} -> functionVersion) (\s@LambdaFunctionRecommendation' {} a -> s {functionVersion = a} :: LambdaFunctionRecommendation)++-- | The timestamp of when the function recommendation was last generated.+lambdaFunctionRecommendation_lastRefreshTimestamp :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.UTCTime)+lambdaFunctionRecommendation_lastRefreshTimestamp = Lens.lens (\LambdaFunctionRecommendation' {lastRefreshTimestamp} -> lastRefreshTimestamp) (\s@LambdaFunctionRecommendation' {} a -> s {lastRefreshTimestamp = a} :: LambdaFunctionRecommendation) Prelude.. Lens.mapping Data._Time++-- | The number of days for which utilization metrics were analyzed for the+-- function.+lambdaFunctionRecommendation_lookbackPeriodInDays :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Double)+lambdaFunctionRecommendation_lookbackPeriodInDays = Lens.lens (\LambdaFunctionRecommendation' {lookbackPeriodInDays} -> lookbackPeriodInDays) (\s@LambdaFunctionRecommendation' {} a -> s {lookbackPeriodInDays = a} :: LambdaFunctionRecommendation)++-- | An array of objects that describe the memory configuration+-- recommendation options for the function.+lambdaFunctionRecommendation_memorySizeRecommendationOptions :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe [LambdaFunctionMemoryRecommendationOption])+lambdaFunctionRecommendation_memorySizeRecommendationOptions = Lens.lens (\LambdaFunctionRecommendation' {memorySizeRecommendationOptions} -> memorySizeRecommendationOptions) (\s@LambdaFunctionRecommendation' {} a -> s {memorySizeRecommendationOptions = a} :: LambdaFunctionRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | The number of times your function code was applied during the look-back+-- period.+lambdaFunctionRecommendation_numberOfInvocations :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Integer)+lambdaFunctionRecommendation_numberOfInvocations = Lens.lens (\LambdaFunctionRecommendation' {numberOfInvocations} -> numberOfInvocations) (\s@LambdaFunctionRecommendation' {} a -> s {numberOfInvocations = a} :: LambdaFunctionRecommendation)++-- | An array of objects that describe the utilization metrics of the+-- function.+lambdaFunctionRecommendation_utilizationMetrics :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe [LambdaFunctionUtilizationMetric])+lambdaFunctionRecommendation_utilizationMetrics = Lens.lens (\LambdaFunctionRecommendation' {utilizationMetrics} -> utilizationMetrics) (\s@LambdaFunctionRecommendation' {} a -> s {utilizationMetrics = a} :: LambdaFunctionRecommendation) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON LambdaFunctionRecommendation where+  parseJSON =+    Data.withObject+      "LambdaFunctionRecommendation"+      ( \x ->+          LambdaFunctionRecommendation'+            Prelude.<$> (x Data..:? "accountId")+            Prelude.<*> (x Data..:? "currentMemorySize")+            Prelude.<*> (x Data..:? "currentPerformanceRisk")+            Prelude.<*> (x Data..:? "finding")+            Prelude.<*> ( x+                            Data..:? "findingReasonCodes"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "functionArn")+            Prelude.<*> (x Data..:? "functionVersion")+            Prelude.<*> (x Data..:? "lastRefreshTimestamp")+            Prelude.<*> (x Data..:? "lookbackPeriodInDays")+            Prelude.<*> ( x+                            Data..:? "memorySizeRecommendationOptions"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "numberOfInvocations")+            Prelude.<*> ( x+                            Data..:? "utilizationMetrics"+                            Data..!= Prelude.mempty+                        )+      )++instance+  Prelude.Hashable+    LambdaFunctionRecommendation+  where+  hashWithSalt _salt LambdaFunctionRecommendation' {..} =+    _salt+      `Prelude.hashWithSalt` accountId+      `Prelude.hashWithSalt` currentMemorySize+      `Prelude.hashWithSalt` currentPerformanceRisk+      `Prelude.hashWithSalt` finding+      `Prelude.hashWithSalt` findingReasonCodes+      `Prelude.hashWithSalt` functionArn+      `Prelude.hashWithSalt` functionVersion+      `Prelude.hashWithSalt` lastRefreshTimestamp+      `Prelude.hashWithSalt` lookbackPeriodInDays+      `Prelude.hashWithSalt` memorySizeRecommendationOptions+      `Prelude.hashWithSalt` numberOfInvocations+      `Prelude.hashWithSalt` utilizationMetrics++instance Prelude.NFData LambdaFunctionRecommendation where+  rnf LambdaFunctionRecommendation' {..} =+    Prelude.rnf accountId+      `Prelude.seq` Prelude.rnf currentMemorySize+      `Prelude.seq` Prelude.rnf currentPerformanceRisk+      `Prelude.seq` Prelude.rnf finding+      `Prelude.seq` Prelude.rnf findingReasonCodes+      `Prelude.seq` Prelude.rnf functionArn+      `Prelude.seq` Prelude.rnf functionVersion+      `Prelude.seq` Prelude.rnf lastRefreshTimestamp+      `Prelude.seq` Prelude.rnf lookbackPeriodInDays+      `Prelude.seq` Prelude.rnf memorySizeRecommendationOptions+      `Prelude.seq` Prelude.rnf numberOfInvocations+      `Prelude.seq` Prelude.rnf utilizationMetrics
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionRecommendationFilter.hs view
@@ -0,0 +1,150 @@+{-# 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.ComputeOptimizer.Types.LambdaFunctionRecommendationFilter+-- 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.ComputeOptimizer.Types.LambdaFunctionRecommendationFilter where++import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFilterName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a filter that returns a more specific list of Lambda function+-- recommendations. Use this filter with the+-- GetLambdaFunctionRecommendations action.+--+-- You can use @EBSFilter@ with the GetEBSVolumeRecommendations action,+-- @JobFilter@ with the DescribeRecommendationExportJobs action, and+-- @Filter@ with the GetAutoScalingGroupRecommendations and+-- GetEC2InstanceRecommendations actions.+--+-- /See:/ 'newLambdaFunctionRecommendationFilter' smart constructor.+data LambdaFunctionRecommendationFilter = LambdaFunctionRecommendationFilter'+  { -- | The name of the filter.+    --+    -- Specify @Finding@ to return recommendations with a specific finding+    -- classification (for example, @NotOptimized@).+    --+    -- Specify @FindingReasonCode@ to return recommendations with a specific+    -- finding reason code (for example, @MemoryUnderprovisioned@).+    name :: Prelude.Maybe LambdaFunctionRecommendationFilterName,+    -- | The value of the filter.+    --+    -- The valid values for this parameter are as follows, depending on what+    -- you specify for the @name@ parameter:+    --+    -- -   Specify @Optimized@, @NotOptimized@, or @Unavailable@ if you specify+    --     the @name@ parameter as @Finding@.+    --+    -- -   Specify @MemoryOverprovisioned@, @MemoryUnderprovisioned@,+    --     @InsufficientData@, or @Inconclusive@ if you specify the @name@+    --     parameter as @FindingReasonCode@.+    values :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaFunctionRecommendationFilter' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'lambdaFunctionRecommendationFilter_name' - The name of the filter.+--+-- Specify @Finding@ to return recommendations with a specific finding+-- classification (for example, @NotOptimized@).+--+-- Specify @FindingReasonCode@ to return recommendations with a specific+-- finding reason code (for example, @MemoryUnderprovisioned@).+--+-- 'values', 'lambdaFunctionRecommendationFilter_values' - The value of the filter.+--+-- The valid values for this parameter are as follows, depending on what+-- you specify for the @name@ parameter:+--+-- -   Specify @Optimized@, @NotOptimized@, or @Unavailable@ if you specify+--     the @name@ parameter as @Finding@.+--+-- -   Specify @MemoryOverprovisioned@, @MemoryUnderprovisioned@,+--     @InsufficientData@, or @Inconclusive@ if you specify the @name@+--     parameter as @FindingReasonCode@.+newLambdaFunctionRecommendationFilter ::+  LambdaFunctionRecommendationFilter+newLambdaFunctionRecommendationFilter =+  LambdaFunctionRecommendationFilter'+    { name =+        Prelude.Nothing,+      values = Prelude.Nothing+    }++-- | The name of the filter.+--+-- Specify @Finding@ to return recommendations with a specific finding+-- classification (for example, @NotOptimized@).+--+-- Specify @FindingReasonCode@ to return recommendations with a specific+-- finding reason code (for example, @MemoryUnderprovisioned@).+lambdaFunctionRecommendationFilter_name :: Lens.Lens' LambdaFunctionRecommendationFilter (Prelude.Maybe LambdaFunctionRecommendationFilterName)+lambdaFunctionRecommendationFilter_name = Lens.lens (\LambdaFunctionRecommendationFilter' {name} -> name) (\s@LambdaFunctionRecommendationFilter' {} a -> s {name = a} :: LambdaFunctionRecommendationFilter)++-- | The value of the filter.+--+-- The valid values for this parameter are as follows, depending on what+-- you specify for the @name@ parameter:+--+-- -   Specify @Optimized@, @NotOptimized@, or @Unavailable@ if you specify+--     the @name@ parameter as @Finding@.+--+-- -   Specify @MemoryOverprovisioned@, @MemoryUnderprovisioned@,+--     @InsufficientData@, or @Inconclusive@ if you specify the @name@+--     parameter as @FindingReasonCode@.+lambdaFunctionRecommendationFilter_values :: Lens.Lens' LambdaFunctionRecommendationFilter (Prelude.Maybe [Prelude.Text])+lambdaFunctionRecommendationFilter_values = Lens.lens (\LambdaFunctionRecommendationFilter' {values} -> values) (\s@LambdaFunctionRecommendationFilter' {} a -> s {values = a} :: LambdaFunctionRecommendationFilter) Prelude.. Lens.mapping Lens.coerced++instance+  Prelude.Hashable+    LambdaFunctionRecommendationFilter+  where+  hashWithSalt+    _salt+    LambdaFunctionRecommendationFilter' {..} =+      _salt+        `Prelude.hashWithSalt` name+        `Prelude.hashWithSalt` values++instance+  Prelude.NFData+    LambdaFunctionRecommendationFilter+  where+  rnf LambdaFunctionRecommendationFilter' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance+  Data.ToJSON+    LambdaFunctionRecommendationFilter+  where+  toJSON LambdaFunctionRecommendationFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("name" Data..=) Prelude.<$> name,+            ("values" Data..=) Prelude.<$> values+          ]+      )
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionRecommendationFilterName.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFilterName+-- 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.ComputeOptimizer.Types.LambdaFunctionRecommendationFilterName+  ( LambdaFunctionRecommendationFilterName+      ( ..,+        LambdaFunctionRecommendationFilterName_Finding,+        LambdaFunctionRecommendationFilterName_FindingReasonCode+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LambdaFunctionRecommendationFilterName = LambdaFunctionRecommendationFilterName'+  { fromLambdaFunctionRecommendationFilterName ::+      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 LambdaFunctionRecommendationFilterName_Finding :: LambdaFunctionRecommendationFilterName+pattern LambdaFunctionRecommendationFilterName_Finding = LambdaFunctionRecommendationFilterName' "Finding"++pattern LambdaFunctionRecommendationFilterName_FindingReasonCode :: LambdaFunctionRecommendationFilterName+pattern LambdaFunctionRecommendationFilterName_FindingReasonCode = LambdaFunctionRecommendationFilterName' "FindingReasonCode"++{-# COMPLETE+  LambdaFunctionRecommendationFilterName_Finding,+  LambdaFunctionRecommendationFilterName_FindingReasonCode,+  LambdaFunctionRecommendationFilterName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionRecommendationFinding.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.ComputeOptimizer.Types.LambdaFunctionRecommendationFinding+-- 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.ComputeOptimizer.Types.LambdaFunctionRecommendationFinding+  ( LambdaFunctionRecommendationFinding+      ( ..,+        LambdaFunctionRecommendationFinding_NotOptimized,+        LambdaFunctionRecommendationFinding_Optimized,+        LambdaFunctionRecommendationFinding_Unavailable+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LambdaFunctionRecommendationFinding = LambdaFunctionRecommendationFinding'+  { fromLambdaFunctionRecommendationFinding ::+      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 LambdaFunctionRecommendationFinding_NotOptimized :: LambdaFunctionRecommendationFinding+pattern LambdaFunctionRecommendationFinding_NotOptimized = LambdaFunctionRecommendationFinding' "NotOptimized"++pattern LambdaFunctionRecommendationFinding_Optimized :: LambdaFunctionRecommendationFinding+pattern LambdaFunctionRecommendationFinding_Optimized = LambdaFunctionRecommendationFinding' "Optimized"++pattern LambdaFunctionRecommendationFinding_Unavailable :: LambdaFunctionRecommendationFinding+pattern LambdaFunctionRecommendationFinding_Unavailable = LambdaFunctionRecommendationFinding' "Unavailable"++{-# COMPLETE+  LambdaFunctionRecommendationFinding_NotOptimized,+  LambdaFunctionRecommendationFinding_Optimized,+  LambdaFunctionRecommendationFinding_Unavailable,+  LambdaFunctionRecommendationFinding'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionRecommendationFindingReasonCode.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.ComputeOptimizer.Types.LambdaFunctionRecommendationFindingReasonCode+-- 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.ComputeOptimizer.Types.LambdaFunctionRecommendationFindingReasonCode+  ( LambdaFunctionRecommendationFindingReasonCode+      ( ..,+        LambdaFunctionRecommendationFindingReasonCode_Inconclusive,+        LambdaFunctionRecommendationFindingReasonCode_InsufficientData,+        LambdaFunctionRecommendationFindingReasonCode_MemoryOverprovisioned,+        LambdaFunctionRecommendationFindingReasonCode_MemoryUnderprovisioned+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LambdaFunctionRecommendationFindingReasonCode = LambdaFunctionRecommendationFindingReasonCode'+  { fromLambdaFunctionRecommendationFindingReasonCode ::+      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 LambdaFunctionRecommendationFindingReasonCode_Inconclusive :: LambdaFunctionRecommendationFindingReasonCode+pattern LambdaFunctionRecommendationFindingReasonCode_Inconclusive = LambdaFunctionRecommendationFindingReasonCode' "Inconclusive"++pattern LambdaFunctionRecommendationFindingReasonCode_InsufficientData :: LambdaFunctionRecommendationFindingReasonCode+pattern LambdaFunctionRecommendationFindingReasonCode_InsufficientData = LambdaFunctionRecommendationFindingReasonCode' "InsufficientData"++pattern LambdaFunctionRecommendationFindingReasonCode_MemoryOverprovisioned :: LambdaFunctionRecommendationFindingReasonCode+pattern LambdaFunctionRecommendationFindingReasonCode_MemoryOverprovisioned = LambdaFunctionRecommendationFindingReasonCode' "MemoryOverprovisioned"++pattern LambdaFunctionRecommendationFindingReasonCode_MemoryUnderprovisioned :: LambdaFunctionRecommendationFindingReasonCode+pattern LambdaFunctionRecommendationFindingReasonCode_MemoryUnderprovisioned = LambdaFunctionRecommendationFindingReasonCode' "MemoryUnderprovisioned"++{-# COMPLETE+  LambdaFunctionRecommendationFindingReasonCode_Inconclusive,+  LambdaFunctionRecommendationFindingReasonCode_InsufficientData,+  LambdaFunctionRecommendationFindingReasonCode_MemoryOverprovisioned,+  LambdaFunctionRecommendationFindingReasonCode_MemoryUnderprovisioned,+  LambdaFunctionRecommendationFindingReasonCode'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/LambdaFunctionUtilizationMetric.hs view
@@ -0,0 +1,170 @@+{-# 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.ComputeOptimizer.Types.LambdaFunctionUtilizationMetric+-- 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.ComputeOptimizer.Types.LambdaFunctionUtilizationMetric where++import Amazonka.ComputeOptimizer.Types.LambdaFunctionMetricName+import Amazonka.ComputeOptimizer.Types.LambdaFunctionMetricStatistic+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a utilization metric of an Lambda function.+--+-- /See:/ 'newLambdaFunctionUtilizationMetric' smart constructor.+data LambdaFunctionUtilizationMetric = LambdaFunctionUtilizationMetric'+  { -- | The name of the utilization metric.+    --+    -- The following utilization metrics are available:+    --+    -- -   @Duration@ - The amount of time that your function code spends+    --     processing an event.+    --+    -- -   @Memory@ - The amount of memory used per invocation.+    name :: Prelude.Maybe LambdaFunctionMetricName,+    -- | The statistic of the utilization metric.+    --+    -- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+    -- utilization metrics using only the @Maximum@ statistic, which is the+    -- highest value observed during the specified period.+    --+    -- The Compute Optimizer console displays graphs for some utilization+    -- metrics using the @Average@ statistic, which is the value of @Sum@ \/+    -- @SampleCount@ during the specified period. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+    -- in the /Compute Optimizer User Guide/. You can also get averaged+    -- utilization metric data for your resources using Amazon CloudWatch. For+    -- more information, see the+    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+    statistic :: Prelude.Maybe LambdaFunctionMetricStatistic,+    -- | The value of the utilization metric.+    value :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaFunctionUtilizationMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'lambdaFunctionUtilizationMetric_name' - The name of the utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @Duration@ - The amount of time that your function code spends+--     processing an event.+--+-- -   @Memory@ - The amount of memory used per invocation.+--+-- 'statistic', 'lambdaFunctionUtilizationMetric_statistic' - The statistic of the utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+--+-- 'value', 'lambdaFunctionUtilizationMetric_value' - The value of the utilization metric.+newLambdaFunctionUtilizationMetric ::+  LambdaFunctionUtilizationMetric+newLambdaFunctionUtilizationMetric =+  LambdaFunctionUtilizationMetric'+    { name =+        Prelude.Nothing,+      statistic = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The name of the utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @Duration@ - The amount of time that your function code spends+--     processing an event.+--+-- -   @Memory@ - The amount of memory used per invocation.+lambdaFunctionUtilizationMetric_name :: Lens.Lens' LambdaFunctionUtilizationMetric (Prelude.Maybe LambdaFunctionMetricName)+lambdaFunctionUtilizationMetric_name = Lens.lens (\LambdaFunctionUtilizationMetric' {name} -> name) (\s@LambdaFunctionUtilizationMetric' {} a -> s {name = a} :: LambdaFunctionUtilizationMetric)++-- | The statistic of the utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+lambdaFunctionUtilizationMetric_statistic :: Lens.Lens' LambdaFunctionUtilizationMetric (Prelude.Maybe LambdaFunctionMetricStatistic)+lambdaFunctionUtilizationMetric_statistic = Lens.lens (\LambdaFunctionUtilizationMetric' {statistic} -> statistic) (\s@LambdaFunctionUtilizationMetric' {} a -> s {statistic = a} :: LambdaFunctionUtilizationMetric)++-- | The value of the utilization metric.+lambdaFunctionUtilizationMetric_value :: Lens.Lens' LambdaFunctionUtilizationMetric (Prelude.Maybe Prelude.Double)+lambdaFunctionUtilizationMetric_value = Lens.lens (\LambdaFunctionUtilizationMetric' {value} -> value) (\s@LambdaFunctionUtilizationMetric' {} a -> s {value = a} :: LambdaFunctionUtilizationMetric)++instance+  Data.FromJSON+    LambdaFunctionUtilizationMetric+  where+  parseJSON =+    Data.withObject+      "LambdaFunctionUtilizationMetric"+      ( \x ->+          LambdaFunctionUtilizationMetric'+            Prelude.<$> (x Data..:? "name")+            Prelude.<*> (x Data..:? "statistic")+            Prelude.<*> (x Data..:? "value")+      )++instance+  Prelude.Hashable+    LambdaFunctionUtilizationMetric+  where+  hashWithSalt+    _salt+    LambdaFunctionUtilizationMetric' {..} =+      _salt+        `Prelude.hashWithSalt` name+        `Prelude.hashWithSalt` statistic+        `Prelude.hashWithSalt` value++instance+  Prelude.NFData+    LambdaFunctionUtilizationMetric+  where+  rnf LambdaFunctionUtilizationMetric' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf statistic+      `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/ComputeOptimizer/Types/MemorySizeConfiguration.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.ComputeOptimizer.Types.MemorySizeConfiguration+-- 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.ComputeOptimizer.Types.MemorySizeConfiguration 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++-- | The memory size configurations of a container.+--+-- /See:/ 'newMemorySizeConfiguration' smart constructor.+data MemorySizeConfiguration = MemorySizeConfiguration'+  { -- | The amount of memory in the container.+    memory :: Prelude.Maybe Prelude.Int,+    -- | The limit of memory reserve for the container.+    memoryReservation :: Prelude.Maybe Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MemorySizeConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'memory', 'memorySizeConfiguration_memory' - The amount of memory in the container.+--+-- 'memoryReservation', 'memorySizeConfiguration_memoryReservation' - The limit of memory reserve for the container.+newMemorySizeConfiguration ::+  MemorySizeConfiguration+newMemorySizeConfiguration =+  MemorySizeConfiguration'+    { memory = Prelude.Nothing,+      memoryReservation = Prelude.Nothing+    }++-- | The amount of memory in the container.+memorySizeConfiguration_memory :: Lens.Lens' MemorySizeConfiguration (Prelude.Maybe Prelude.Int)+memorySizeConfiguration_memory = Lens.lens (\MemorySizeConfiguration' {memory} -> memory) (\s@MemorySizeConfiguration' {} a -> s {memory = a} :: MemorySizeConfiguration)++-- | The limit of memory reserve for the container.+memorySizeConfiguration_memoryReservation :: Lens.Lens' MemorySizeConfiguration (Prelude.Maybe Prelude.Int)+memorySizeConfiguration_memoryReservation = Lens.lens (\MemorySizeConfiguration' {memoryReservation} -> memoryReservation) (\s@MemorySizeConfiguration' {} a -> s {memoryReservation = a} :: MemorySizeConfiguration)++instance Data.FromJSON MemorySizeConfiguration where+  parseJSON =+    Data.withObject+      "MemorySizeConfiguration"+      ( \x ->+          MemorySizeConfiguration'+            Prelude.<$> (x Data..:? "memory")+            Prelude.<*> (x Data..:? "memoryReservation")+      )++instance Prelude.Hashable MemorySizeConfiguration where+  hashWithSalt _salt MemorySizeConfiguration' {..} =+    _salt+      `Prelude.hashWithSalt` memory+      `Prelude.hashWithSalt` memoryReservation++instance Prelude.NFData MemorySizeConfiguration where+  rnf MemorySizeConfiguration' {..} =+    Prelude.rnf memory+      `Prelude.seq` Prelude.rnf memoryReservation
+ gen/Amazonka/ComputeOptimizer/Types/MetricName.hs view
@@ -0,0 +1,131 @@+{-# 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.ComputeOptimizer.Types.MetricName+-- 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.ComputeOptimizer.Types.MetricName+  ( MetricName+      ( ..,+        MetricName_Cpu,+        MetricName_DISK_READ_BYTES_PER_SECOND,+        MetricName_DISK_READ_OPS_PER_SECOND,+        MetricName_DISK_WRITE_BYTES_PER_SECOND,+        MetricName_DISK_WRITE_OPS_PER_SECOND,+        MetricName_EBS_READ_BYTES_PER_SECOND,+        MetricName_EBS_READ_OPS_PER_SECOND,+        MetricName_EBS_WRITE_BYTES_PER_SECOND,+        MetricName_EBS_WRITE_OPS_PER_SECOND,+        MetricName_Memory,+        MetricName_NETWORK_IN_BYTES_PER_SECOND,+        MetricName_NETWORK_OUT_BYTES_PER_SECOND,+        MetricName_NETWORK_PACKETS_IN_PER_SECOND,+        MetricName_NETWORK_PACKETS_OUT_PER_SECOND+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype MetricName = MetricName'+  { fromMetricName ::+      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 MetricName_Cpu :: MetricName+pattern MetricName_Cpu = MetricName' "Cpu"++pattern MetricName_DISK_READ_BYTES_PER_SECOND :: MetricName+pattern MetricName_DISK_READ_BYTES_PER_SECOND = MetricName' "DISK_READ_BYTES_PER_SECOND"++pattern MetricName_DISK_READ_OPS_PER_SECOND :: MetricName+pattern MetricName_DISK_READ_OPS_PER_SECOND = MetricName' "DISK_READ_OPS_PER_SECOND"++pattern MetricName_DISK_WRITE_BYTES_PER_SECOND :: MetricName+pattern MetricName_DISK_WRITE_BYTES_PER_SECOND = MetricName' "DISK_WRITE_BYTES_PER_SECOND"++pattern MetricName_DISK_WRITE_OPS_PER_SECOND :: MetricName+pattern MetricName_DISK_WRITE_OPS_PER_SECOND = MetricName' "DISK_WRITE_OPS_PER_SECOND"++pattern MetricName_EBS_READ_BYTES_PER_SECOND :: MetricName+pattern MetricName_EBS_READ_BYTES_PER_SECOND = MetricName' "EBS_READ_BYTES_PER_SECOND"++pattern MetricName_EBS_READ_OPS_PER_SECOND :: MetricName+pattern MetricName_EBS_READ_OPS_PER_SECOND = MetricName' "EBS_READ_OPS_PER_SECOND"++pattern MetricName_EBS_WRITE_BYTES_PER_SECOND :: MetricName+pattern MetricName_EBS_WRITE_BYTES_PER_SECOND = MetricName' "EBS_WRITE_BYTES_PER_SECOND"++pattern MetricName_EBS_WRITE_OPS_PER_SECOND :: MetricName+pattern MetricName_EBS_WRITE_OPS_PER_SECOND = MetricName' "EBS_WRITE_OPS_PER_SECOND"++pattern MetricName_Memory :: MetricName+pattern MetricName_Memory = MetricName' "Memory"++pattern MetricName_NETWORK_IN_BYTES_PER_SECOND :: MetricName+pattern MetricName_NETWORK_IN_BYTES_PER_SECOND = MetricName' "NETWORK_IN_BYTES_PER_SECOND"++pattern MetricName_NETWORK_OUT_BYTES_PER_SECOND :: MetricName+pattern MetricName_NETWORK_OUT_BYTES_PER_SECOND = MetricName' "NETWORK_OUT_BYTES_PER_SECOND"++pattern MetricName_NETWORK_PACKETS_IN_PER_SECOND :: MetricName+pattern MetricName_NETWORK_PACKETS_IN_PER_SECOND = MetricName' "NETWORK_PACKETS_IN_PER_SECOND"++pattern MetricName_NETWORK_PACKETS_OUT_PER_SECOND :: MetricName+pattern MetricName_NETWORK_PACKETS_OUT_PER_SECOND = MetricName' "NETWORK_PACKETS_OUT_PER_SECOND"++{-# COMPLETE+  MetricName_Cpu,+  MetricName_DISK_READ_BYTES_PER_SECOND,+  MetricName_DISK_READ_OPS_PER_SECOND,+  MetricName_DISK_WRITE_BYTES_PER_SECOND,+  MetricName_DISK_WRITE_OPS_PER_SECOND,+  MetricName_EBS_READ_BYTES_PER_SECOND,+  MetricName_EBS_READ_OPS_PER_SECOND,+  MetricName_EBS_WRITE_BYTES_PER_SECOND,+  MetricName_EBS_WRITE_OPS_PER_SECOND,+  MetricName_Memory,+  MetricName_NETWORK_IN_BYTES_PER_SECOND,+  MetricName_NETWORK_OUT_BYTES_PER_SECOND,+  MetricName_NETWORK_PACKETS_IN_PER_SECOND,+  MetricName_NETWORK_PACKETS_OUT_PER_SECOND,+  MetricName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/MetricStatistic.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.MetricStatistic+-- 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.ComputeOptimizer.Types.MetricStatistic+  ( MetricStatistic+      ( ..,+        MetricStatistic_Average,+        MetricStatistic_Maximum+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype MetricStatistic = MetricStatistic'+  { fromMetricStatistic ::+      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 MetricStatistic_Average :: MetricStatistic+pattern MetricStatistic_Average = MetricStatistic' "Average"++pattern MetricStatistic_Maximum :: MetricStatistic+pattern MetricStatistic_Maximum = MetricStatistic' "Maximum"++{-# COMPLETE+  MetricStatistic_Average,+  MetricStatistic_Maximum,+  MetricStatistic'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/MigrationEffort.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.ComputeOptimizer.Types.MigrationEffort+-- 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.ComputeOptimizer.Types.MigrationEffort+  ( MigrationEffort+      ( ..,+        MigrationEffort_High,+        MigrationEffort_Low,+        MigrationEffort_Medium,+        MigrationEffort_VeryLow+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype MigrationEffort = MigrationEffort'+  { fromMigrationEffort ::+      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 MigrationEffort_High :: MigrationEffort+pattern MigrationEffort_High = MigrationEffort' "High"++pattern MigrationEffort_Low :: MigrationEffort+pattern MigrationEffort_Low = MigrationEffort' "Low"++pattern MigrationEffort_Medium :: MigrationEffort+pattern MigrationEffort_Medium = MigrationEffort' "Medium"++pattern MigrationEffort_VeryLow :: MigrationEffort+pattern MigrationEffort_VeryLow = MigrationEffort' "VeryLow"++{-# COMPLETE+  MigrationEffort_High,+  MigrationEffort_Low,+  MigrationEffort_Medium,+  MigrationEffort_VeryLow,+  MigrationEffort'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/PlatformDifference.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.PlatformDifference+-- 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.ComputeOptimizer.Types.PlatformDifference+  ( PlatformDifference+      ( ..,+        PlatformDifference_Architecture,+        PlatformDifference_Hypervisor,+        PlatformDifference_InstanceStoreAvailability,+        PlatformDifference_NetworkInterface,+        PlatformDifference_StorageInterface,+        PlatformDifference_VirtualizationType+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PlatformDifference = PlatformDifference'+  { fromPlatformDifference ::+      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 PlatformDifference_Architecture :: PlatformDifference+pattern PlatformDifference_Architecture = PlatformDifference' "Architecture"++pattern PlatformDifference_Hypervisor :: PlatformDifference+pattern PlatformDifference_Hypervisor = PlatformDifference' "Hypervisor"++pattern PlatformDifference_InstanceStoreAvailability :: PlatformDifference+pattern PlatformDifference_InstanceStoreAvailability = PlatformDifference' "InstanceStoreAvailability"++pattern PlatformDifference_NetworkInterface :: PlatformDifference+pattern PlatformDifference_NetworkInterface = PlatformDifference' "NetworkInterface"++pattern PlatformDifference_StorageInterface :: PlatformDifference+pattern PlatformDifference_StorageInterface = PlatformDifference' "StorageInterface"++pattern PlatformDifference_VirtualizationType :: PlatformDifference+pattern PlatformDifference_VirtualizationType = PlatformDifference' "VirtualizationType"++{-# COMPLETE+  PlatformDifference_Architecture,+  PlatformDifference_Hypervisor,+  PlatformDifference_InstanceStoreAvailability,+  PlatformDifference_NetworkInterface,+  PlatformDifference_StorageInterface,+  PlatformDifference_VirtualizationType,+  PlatformDifference'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ProjectedMetric.hs view
@@ -0,0 +1,189 @@+{-# 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.ComputeOptimizer.Types.ProjectedMetric+-- 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.ComputeOptimizer.Types.ProjectedMetric where++import Amazonka.ComputeOptimizer.Types.MetricName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a projected utilization metric of a recommendation option,+-- such as an Amazon EC2 instance. This represents the projected+-- utilization of a recommendation option had you used that resource during+-- the analyzed period.+--+-- Compare the utilization metric data of your resource against its+-- projected utilization metric data to determine the performance+-- difference between your current resource and the recommended option.+--+-- The @Cpu@ and @Memory@ metrics are the only projected utilization+-- metrics returned when you run the GetEC2RecommendationProjectedMetrics+-- action. Additionally, the @Memory@ metric is returned only for resources+-- that have the unified CloudWatch agent installed on them. For more+-- information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+--+-- /See:/ 'newProjectedMetric' smart constructor.+data ProjectedMetric = ProjectedMetric'+  { -- | The name of the projected utilization metric.+    --+    -- The following projected utilization metrics are returned:+    --+    -- -   @Cpu@ - The projected percentage of allocated EC2 compute units that+    --     would be in use on the recommendation option had you used that+    --     resource during the analyzed period. This metric identifies the+    --     processing power required to run an application on the+    --     recommendation option.+    --+    --     Depending on the instance type, tools in your operating system can+    --     show a lower percentage than CloudWatch when the instance is not+    --     allocated a full processor core.+    --+    --     Units: Percent+    --+    -- -   @Memory@ - The percentage of memory that would be in use on the+    --     recommendation option had you used that resource during the analyzed+    --     period. This metric identifies the amount of memory required to run+    --     an application on the recommendation option.+    --+    --     Units: Percent+    --+    --     The @Memory@ metric is returned only for resources that have the+    --     unified CloudWatch agent installed on them. For more information,+    --     see+    --     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+    name :: Prelude.Maybe MetricName,+    -- | The timestamps of the projected utilization metric.+    timestamps :: Prelude.Maybe [Data.POSIX],+    -- | The values of the projected utilization metrics.+    values :: Prelude.Maybe [Prelude.Double]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ProjectedMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'projectedMetric_name' - The name of the projected utilization metric.+--+-- The following projected utilization metrics are returned:+--+-- -   @Cpu@ - The projected percentage of allocated EC2 compute units that+--     would be in use on the recommendation option had you used that+--     resource during the analyzed period. This metric identifies the+--     processing power required to run an application on the+--     recommendation option.+--+--     Depending on the instance type, tools in your operating system can+--     show a lower percentage than CloudWatch when the instance is not+--     allocated a full processor core.+--+--     Units: Percent+--+-- -   @Memory@ - The percentage of memory that would be in use on the+--     recommendation option had you used that resource during the analyzed+--     period. This metric identifies the amount of memory required to run+--     an application on the recommendation option.+--+--     Units: Percent+--+--     The @Memory@ metric is returned only for resources that have the+--     unified CloudWatch agent installed on them. For more information,+--     see+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+--+-- 'timestamps', 'projectedMetric_timestamps' - The timestamps of the projected utilization metric.+--+-- 'values', 'projectedMetric_values' - The values of the projected utilization metrics.+newProjectedMetric ::+  ProjectedMetric+newProjectedMetric =+  ProjectedMetric'+    { name = Prelude.Nothing,+      timestamps = Prelude.Nothing,+      values = Prelude.Nothing+    }++-- | The name of the projected utilization metric.+--+-- The following projected utilization metrics are returned:+--+-- -   @Cpu@ - The projected percentage of allocated EC2 compute units that+--     would be in use on the recommendation option had you used that+--     resource during the analyzed period. This metric identifies the+--     processing power required to run an application on the+--     recommendation option.+--+--     Depending on the instance type, tools in your operating system can+--     show a lower percentage than CloudWatch when the instance is not+--     allocated a full processor core.+--+--     Units: Percent+--+-- -   @Memory@ - The percentage of memory that would be in use on the+--     recommendation option had you used that resource during the analyzed+--     period. This metric identifies the amount of memory required to run+--     an application on the recommendation option.+--+--     Units: Percent+--+--     The @Memory@ metric is returned only for resources that have the+--     unified CloudWatch agent installed on them. For more information,+--     see+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+projectedMetric_name :: Lens.Lens' ProjectedMetric (Prelude.Maybe MetricName)+projectedMetric_name = Lens.lens (\ProjectedMetric' {name} -> name) (\s@ProjectedMetric' {} a -> s {name = a} :: ProjectedMetric)++-- | The timestamps of the projected utilization metric.+projectedMetric_timestamps :: Lens.Lens' ProjectedMetric (Prelude.Maybe [Prelude.UTCTime])+projectedMetric_timestamps = Lens.lens (\ProjectedMetric' {timestamps} -> timestamps) (\s@ProjectedMetric' {} a -> s {timestamps = a} :: ProjectedMetric) Prelude.. Lens.mapping Lens.coerced++-- | The values of the projected utilization metrics.+projectedMetric_values :: Lens.Lens' ProjectedMetric (Prelude.Maybe [Prelude.Double])+projectedMetric_values = Lens.lens (\ProjectedMetric' {values} -> values) (\s@ProjectedMetric' {} a -> s {values = a} :: ProjectedMetric) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON ProjectedMetric where+  parseJSON =+    Data.withObject+      "ProjectedMetric"+      ( \x ->+          ProjectedMetric'+            Prelude.<$> (x Data..:? "name")+            Prelude.<*> (x Data..:? "timestamps" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "values" Data..!= Prelude.mempty)+      )++instance Prelude.Hashable ProjectedMetric where+  hashWithSalt _salt ProjectedMetric' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` timestamps+      `Prelude.hashWithSalt` values++instance Prelude.NFData ProjectedMetric where+  rnf ProjectedMetric' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf timestamps+      `Prelude.seq` Prelude.rnf values
+ gen/Amazonka/ComputeOptimizer/Types/ReasonCodeSummary.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.ComputeOptimizer.Types.ReasonCodeSummary+-- 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.ComputeOptimizer.Types.ReasonCodeSummary where++import Amazonka.ComputeOptimizer.Types.FindingReasonCode+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 summary of a finding reason code.+--+-- /See:/ 'newReasonCodeSummary' smart constructor.+data ReasonCodeSummary = ReasonCodeSummary'+  { -- | The name of the finding reason code.+    name :: Prelude.Maybe FindingReasonCode,+    -- | The value of the finding reason code summary.+    value :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ReasonCodeSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'reasonCodeSummary_name' - The name of the finding reason code.+--+-- 'value', 'reasonCodeSummary_value' - The value of the finding reason code summary.+newReasonCodeSummary ::+  ReasonCodeSummary+newReasonCodeSummary =+  ReasonCodeSummary'+    { name = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The name of the finding reason code.+reasonCodeSummary_name :: Lens.Lens' ReasonCodeSummary (Prelude.Maybe FindingReasonCode)+reasonCodeSummary_name = Lens.lens (\ReasonCodeSummary' {name} -> name) (\s@ReasonCodeSummary' {} a -> s {name = a} :: ReasonCodeSummary)++-- | The value of the finding reason code summary.+reasonCodeSummary_value :: Lens.Lens' ReasonCodeSummary (Prelude.Maybe Prelude.Double)+reasonCodeSummary_value = Lens.lens (\ReasonCodeSummary' {value} -> value) (\s@ReasonCodeSummary' {} a -> s {value = a} :: ReasonCodeSummary)++instance Data.FromJSON ReasonCodeSummary where+  parseJSON =+    Data.withObject+      "ReasonCodeSummary"+      ( \x ->+          ReasonCodeSummary'+            Prelude.<$> (x Data..:? "name")+            Prelude.<*> (x Data..:? "value")+      )++instance Prelude.Hashable ReasonCodeSummary where+  hashWithSalt _salt ReasonCodeSummary' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` value++instance Prelude.NFData ReasonCodeSummary where+  rnf ReasonCodeSummary' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/ComputeOptimizer/Types/RecommendationExportJob.hs view
@@ -0,0 +1,155 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.RecommendationExportJob+-- 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.ComputeOptimizer.Types.RecommendationExportJob where++import Amazonka.ComputeOptimizer.Types.ExportDestination+import Amazonka.ComputeOptimizer.Types.JobStatus+import Amazonka.ComputeOptimizer.Types.ResourceType+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a recommendation export job.+--+-- Use the DescribeRecommendationExportJobs action to view your+-- recommendation export jobs.+--+-- Use the ExportAutoScalingGroupRecommendations or+-- ExportEC2InstanceRecommendations actions to request an export of your+-- recommendations.+--+-- /See:/ 'newRecommendationExportJob' smart constructor.+data RecommendationExportJob = RecommendationExportJob'+  { -- | The timestamp of when the export job was created.+    creationTimestamp :: Prelude.Maybe Data.POSIX,+    -- | An object that describes the destination of the export file.+    destination :: Prelude.Maybe ExportDestination,+    -- | The reason for an export job failure.+    failureReason :: Prelude.Maybe Prelude.Text,+    -- | The identification number of the export job.+    jobId :: Prelude.Maybe Prelude.Text,+    -- | The timestamp of when the export job was last updated.+    lastUpdatedTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The resource type of the exported recommendations.+    resourceType :: Prelude.Maybe ResourceType,+    -- | The status of the export job.+    status :: Prelude.Maybe JobStatus+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecommendationExportJob' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'creationTimestamp', 'recommendationExportJob_creationTimestamp' - The timestamp of when the export job was created.+--+-- 'destination', 'recommendationExportJob_destination' - An object that describes the destination of the export file.+--+-- 'failureReason', 'recommendationExportJob_failureReason' - The reason for an export job failure.+--+-- 'jobId', 'recommendationExportJob_jobId' - The identification number of the export job.+--+-- 'lastUpdatedTimestamp', 'recommendationExportJob_lastUpdatedTimestamp' - The timestamp of when the export job was last updated.+--+-- 'resourceType', 'recommendationExportJob_resourceType' - The resource type of the exported recommendations.+--+-- 'status', 'recommendationExportJob_status' - The status of the export job.+newRecommendationExportJob ::+  RecommendationExportJob+newRecommendationExportJob =+  RecommendationExportJob'+    { creationTimestamp =+        Prelude.Nothing,+      destination = Prelude.Nothing,+      failureReason = Prelude.Nothing,+      jobId = Prelude.Nothing,+      lastUpdatedTimestamp = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      status = Prelude.Nothing+    }++-- | The timestamp of when the export job was created.+recommendationExportJob_creationTimestamp :: Lens.Lens' RecommendationExportJob (Prelude.Maybe Prelude.UTCTime)+recommendationExportJob_creationTimestamp = Lens.lens (\RecommendationExportJob' {creationTimestamp} -> creationTimestamp) (\s@RecommendationExportJob' {} a -> s {creationTimestamp = a} :: RecommendationExportJob) Prelude.. Lens.mapping Data._Time++-- | An object that describes the destination of the export file.+recommendationExportJob_destination :: Lens.Lens' RecommendationExportJob (Prelude.Maybe ExportDestination)+recommendationExportJob_destination = Lens.lens (\RecommendationExportJob' {destination} -> destination) (\s@RecommendationExportJob' {} a -> s {destination = a} :: RecommendationExportJob)++-- | The reason for an export job failure.+recommendationExportJob_failureReason :: Lens.Lens' RecommendationExportJob (Prelude.Maybe Prelude.Text)+recommendationExportJob_failureReason = Lens.lens (\RecommendationExportJob' {failureReason} -> failureReason) (\s@RecommendationExportJob' {} a -> s {failureReason = a} :: RecommendationExportJob)++-- | The identification number of the export job.+recommendationExportJob_jobId :: Lens.Lens' RecommendationExportJob (Prelude.Maybe Prelude.Text)+recommendationExportJob_jobId = Lens.lens (\RecommendationExportJob' {jobId} -> jobId) (\s@RecommendationExportJob' {} a -> s {jobId = a} :: RecommendationExportJob)++-- | The timestamp of when the export job was last updated.+recommendationExportJob_lastUpdatedTimestamp :: Lens.Lens' RecommendationExportJob (Prelude.Maybe Prelude.UTCTime)+recommendationExportJob_lastUpdatedTimestamp = Lens.lens (\RecommendationExportJob' {lastUpdatedTimestamp} -> lastUpdatedTimestamp) (\s@RecommendationExportJob' {} a -> s {lastUpdatedTimestamp = a} :: RecommendationExportJob) Prelude.. Lens.mapping Data._Time++-- | The resource type of the exported recommendations.+recommendationExportJob_resourceType :: Lens.Lens' RecommendationExportJob (Prelude.Maybe ResourceType)+recommendationExportJob_resourceType = Lens.lens (\RecommendationExportJob' {resourceType} -> resourceType) (\s@RecommendationExportJob' {} a -> s {resourceType = a} :: RecommendationExportJob)++-- | The status of the export job.+recommendationExportJob_status :: Lens.Lens' RecommendationExportJob (Prelude.Maybe JobStatus)+recommendationExportJob_status = Lens.lens (\RecommendationExportJob' {status} -> status) (\s@RecommendationExportJob' {} a -> s {status = a} :: RecommendationExportJob)++instance Data.FromJSON RecommendationExportJob where+  parseJSON =+    Data.withObject+      "RecommendationExportJob"+      ( \x ->+          RecommendationExportJob'+            Prelude.<$> (x Data..:? "creationTimestamp")+            Prelude.<*> (x Data..:? "destination")+            Prelude.<*> (x Data..:? "failureReason")+            Prelude.<*> (x Data..:? "jobId")+            Prelude.<*> (x Data..:? "lastUpdatedTimestamp")+            Prelude.<*> (x Data..:? "resourceType")+            Prelude.<*> (x Data..:? "status")+      )++instance Prelude.Hashable RecommendationExportJob where+  hashWithSalt _salt RecommendationExportJob' {..} =+    _salt+      `Prelude.hashWithSalt` creationTimestamp+      `Prelude.hashWithSalt` destination+      `Prelude.hashWithSalt` failureReason+      `Prelude.hashWithSalt` jobId+      `Prelude.hashWithSalt` lastUpdatedTimestamp+      `Prelude.hashWithSalt` resourceType+      `Prelude.hashWithSalt` status++instance Prelude.NFData RecommendationExportJob where+  rnf RecommendationExportJob' {..} =+    Prelude.rnf creationTimestamp+      `Prelude.seq` Prelude.rnf destination+      `Prelude.seq` Prelude.rnf failureReason+      `Prelude.seq` Prelude.rnf jobId+      `Prelude.seq` Prelude.rnf lastUpdatedTimestamp+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/ComputeOptimizer/Types/RecommendationPreferenceName.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.ComputeOptimizer.Types.RecommendationPreferenceName+-- 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.ComputeOptimizer.Types.RecommendationPreferenceName+  ( RecommendationPreferenceName+      ( ..,+        RecommendationPreferenceName_EnhancedInfrastructureMetrics,+        RecommendationPreferenceName_ExternalMetricsPreference,+        RecommendationPreferenceName_InferredWorkloadTypes+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RecommendationPreferenceName = RecommendationPreferenceName'+  { fromRecommendationPreferenceName ::+      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 RecommendationPreferenceName_EnhancedInfrastructureMetrics :: RecommendationPreferenceName+pattern RecommendationPreferenceName_EnhancedInfrastructureMetrics = RecommendationPreferenceName' "EnhancedInfrastructureMetrics"++pattern RecommendationPreferenceName_ExternalMetricsPreference :: RecommendationPreferenceName+pattern RecommendationPreferenceName_ExternalMetricsPreference = RecommendationPreferenceName' "ExternalMetricsPreference"++pattern RecommendationPreferenceName_InferredWorkloadTypes :: RecommendationPreferenceName+pattern RecommendationPreferenceName_InferredWorkloadTypes = RecommendationPreferenceName' "InferredWorkloadTypes"++{-# COMPLETE+  RecommendationPreferenceName_EnhancedInfrastructureMetrics,+  RecommendationPreferenceName_ExternalMetricsPreference,+  RecommendationPreferenceName_InferredWorkloadTypes,+  RecommendationPreferenceName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/RecommendationPreferences.hs view
@@ -0,0 +1,126 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.RecommendationPreferences+-- 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.ComputeOptimizer.Types.RecommendationPreferences where++import Amazonka.ComputeOptimizer.Types.CpuVendorArchitecture+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the recommendation preferences to return in the response of a+-- GetAutoScalingGroupRecommendations, GetEC2InstanceRecommendations, and+-- GetEC2RecommendationProjectedMetrics request.+--+-- /See:/ 'newRecommendationPreferences' smart constructor.+data RecommendationPreferences = RecommendationPreferences'+  { -- | Specifies the CPU vendor and architecture for Amazon EC2 instance and+    -- Auto Scaling group recommendations.+    --+    -- For example, when you specify @AWS_ARM64@ with:+    --+    -- -   A GetEC2InstanceRecommendations or+    --     GetAutoScalingGroupRecommendations request, Compute Optimizer+    --     returns recommendations that consist of Graviton2 instance types+    --     only.+    --+    -- -   A GetEC2RecommendationProjectedMetrics request, Compute Optimizer+    --     returns projected utilization metrics for Graviton2 instance type+    --     recommendations only.+    --+    -- -   A ExportEC2InstanceRecommendations or+    --     ExportAutoScalingGroupRecommendations request, Compute Optimizer+    --     exports recommendations that consist of Graviton2 instance types+    --     only.+    cpuVendorArchitectures :: Prelude.Maybe [CpuVendorArchitecture]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecommendationPreferences' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'cpuVendorArchitectures', 'recommendationPreferences_cpuVendorArchitectures' - Specifies the CPU vendor and architecture for Amazon EC2 instance and+-- Auto Scaling group recommendations.+--+-- For example, when you specify @AWS_ARM64@ with:+--+-- -   A GetEC2InstanceRecommendations or+--     GetAutoScalingGroupRecommendations request, Compute Optimizer+--     returns recommendations that consist of Graviton2 instance types+--     only.+--+-- -   A GetEC2RecommendationProjectedMetrics request, Compute Optimizer+--     returns projected utilization metrics for Graviton2 instance type+--     recommendations only.+--+-- -   A ExportEC2InstanceRecommendations or+--     ExportAutoScalingGroupRecommendations request, Compute Optimizer+--     exports recommendations that consist of Graviton2 instance types+--     only.+newRecommendationPreferences ::+  RecommendationPreferences+newRecommendationPreferences =+  RecommendationPreferences'+    { cpuVendorArchitectures =+        Prelude.Nothing+    }++-- | Specifies the CPU vendor and architecture for Amazon EC2 instance and+-- Auto Scaling group recommendations.+--+-- For example, when you specify @AWS_ARM64@ with:+--+-- -   A GetEC2InstanceRecommendations or+--     GetAutoScalingGroupRecommendations request, Compute Optimizer+--     returns recommendations that consist of Graviton2 instance types+--     only.+--+-- -   A GetEC2RecommendationProjectedMetrics request, Compute Optimizer+--     returns projected utilization metrics for Graviton2 instance type+--     recommendations only.+--+-- -   A ExportEC2InstanceRecommendations or+--     ExportAutoScalingGroupRecommendations request, Compute Optimizer+--     exports recommendations that consist of Graviton2 instance types+--     only.+recommendationPreferences_cpuVendorArchitectures :: Lens.Lens' RecommendationPreferences (Prelude.Maybe [CpuVendorArchitecture])+recommendationPreferences_cpuVendorArchitectures = Lens.lens (\RecommendationPreferences' {cpuVendorArchitectures} -> cpuVendorArchitectures) (\s@RecommendationPreferences' {} a -> s {cpuVendorArchitectures = a} :: RecommendationPreferences) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable RecommendationPreferences where+  hashWithSalt _salt RecommendationPreferences' {..} =+    _salt `Prelude.hashWithSalt` cpuVendorArchitectures++instance Prelude.NFData RecommendationPreferences where+  rnf RecommendationPreferences' {..} =+    Prelude.rnf cpuVendorArchitectures++instance Data.ToJSON RecommendationPreferences where+  toJSON RecommendationPreferences' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("cpuVendorArchitectures" Data..=)+              Prelude.<$> cpuVendorArchitectures+          ]+      )
+ gen/Amazonka/ComputeOptimizer/Types/RecommendationPreferencesDetail.hs view
@@ -0,0 +1,228 @@+{-# 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.ComputeOptimizer.Types.RecommendationPreferencesDetail+-- 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.ComputeOptimizer.Types.RecommendationPreferencesDetail where++import Amazonka.ComputeOptimizer.Types.EnhancedInfrastructureMetrics+import Amazonka.ComputeOptimizer.Types.ExternalMetricsPreference+import Amazonka.ComputeOptimizer.Types.InferredWorkloadTypesPreference+import Amazonka.ComputeOptimizer.Types.ResourceType+import Amazonka.ComputeOptimizer.Types.Scope+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a recommendation preference.+--+-- /See:/ 'newRecommendationPreferencesDetail' smart constructor.+data RecommendationPreferencesDetail = RecommendationPreferencesDetail'+  { -- | The status of the enhanced infrastructure metrics recommendation+    -- preference.+    --+    -- When the recommendations page is refreshed, a status of @Active@+    -- confirms that the preference is applied to the recommendations, and a+    -- status of @Inactive@ confirms that the preference isn\'t yet applied to+    -- recommendations.+    --+    -- For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+    -- in the /Compute Optimizer User Guide/.+    enhancedInfrastructureMetrics :: Prelude.Maybe EnhancedInfrastructureMetrics,+    -- | An object that describes the external metrics recommendation preference.+    --+    -- If the preference is applied in the latest recommendation refresh, an+    -- object with a valid @source@ value appears in the response. If the+    -- preference isn\'t applied to the recommendations already, then this+    -- object doesn\'t appear in the response.+    externalMetricsPreference :: Prelude.Maybe ExternalMetricsPreference,+    -- | The status of the inferred workload types recommendation preference.+    --+    -- When the recommendations page is refreshed, a status of @Active@+    -- confirms that the preference is applied to the recommendations, and a+    -- status of @Inactive@ confirms that the preference isn\'t yet applied to+    -- recommendations.+    inferredWorkloadTypes :: Prelude.Maybe InferredWorkloadTypesPreference,+    -- | The target resource type of the recommendation preference to create.+    --+    -- The @Ec2Instance@ option encompasses standalone instances and instances+    -- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+    -- encompasses only instances that are part of an Auto Scaling group.+    resourceType :: Prelude.Maybe ResourceType,+    -- | An object that describes the scope of the recommendation preference.+    --+    -- Recommendation preferences can be created at the organization level (for+    -- management accounts of an organization only), account level, and+    -- resource level. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+    -- in the /Compute Optimizer User Guide/.+    scope :: Prelude.Maybe Scope+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecommendationPreferencesDetail' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'enhancedInfrastructureMetrics', 'recommendationPreferencesDetail_enhancedInfrastructureMetrics' - The status of the enhanced infrastructure metrics recommendation+-- preference.+--+-- When the recommendations page is refreshed, a status of @Active@+-- confirms that the preference is applied to the recommendations, and a+-- status of @Inactive@ confirms that the preference isn\'t yet applied to+-- recommendations.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- 'externalMetricsPreference', 'recommendationPreferencesDetail_externalMetricsPreference' - An object that describes the external metrics recommendation preference.+--+-- If the preference is applied in the latest recommendation refresh, an+-- object with a valid @source@ value appears in the response. If the+-- preference isn\'t applied to the recommendations already, then this+-- object doesn\'t appear in the response.+--+-- 'inferredWorkloadTypes', 'recommendationPreferencesDetail_inferredWorkloadTypes' - The status of the inferred workload types recommendation preference.+--+-- When the recommendations page is refreshed, a status of @Active@+-- confirms that the preference is applied to the recommendations, and a+-- status of @Inactive@ confirms that the preference isn\'t yet applied to+-- recommendations.+--+-- 'resourceType', 'recommendationPreferencesDetail_resourceType' - The target resource type of the recommendation preference to create.+--+-- The @Ec2Instance@ option encompasses standalone instances and instances+-- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+-- encompasses only instances that are part of an Auto Scaling group.+--+-- 'scope', 'recommendationPreferencesDetail_scope' - An object that describes the scope of the recommendation preference.+--+-- Recommendation preferences can be created at the organization level (for+-- management accounts of an organization only), account level, and+-- resource level. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+newRecommendationPreferencesDetail ::+  RecommendationPreferencesDetail+newRecommendationPreferencesDetail =+  RecommendationPreferencesDetail'+    { enhancedInfrastructureMetrics =+        Prelude.Nothing,+      externalMetricsPreference =+        Prelude.Nothing,+      inferredWorkloadTypes = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      scope = Prelude.Nothing+    }++-- | The status of the enhanced infrastructure metrics recommendation+-- preference.+--+-- When the recommendations page is refreshed, a status of @Active@+-- confirms that the preference is applied to the recommendations, and a+-- status of @Inactive@ confirms that the preference isn\'t yet applied to+-- recommendations.+--+-- For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+recommendationPreferencesDetail_enhancedInfrastructureMetrics :: Lens.Lens' RecommendationPreferencesDetail (Prelude.Maybe EnhancedInfrastructureMetrics)+recommendationPreferencesDetail_enhancedInfrastructureMetrics = Lens.lens (\RecommendationPreferencesDetail' {enhancedInfrastructureMetrics} -> enhancedInfrastructureMetrics) (\s@RecommendationPreferencesDetail' {} a -> s {enhancedInfrastructureMetrics = a} :: RecommendationPreferencesDetail)++-- | An object that describes the external metrics recommendation preference.+--+-- If the preference is applied in the latest recommendation refresh, an+-- object with a valid @source@ value appears in the response. If the+-- preference isn\'t applied to the recommendations already, then this+-- object doesn\'t appear in the response.+recommendationPreferencesDetail_externalMetricsPreference :: Lens.Lens' RecommendationPreferencesDetail (Prelude.Maybe ExternalMetricsPreference)+recommendationPreferencesDetail_externalMetricsPreference = Lens.lens (\RecommendationPreferencesDetail' {externalMetricsPreference} -> externalMetricsPreference) (\s@RecommendationPreferencesDetail' {} a -> s {externalMetricsPreference = a} :: RecommendationPreferencesDetail)++-- | The status of the inferred workload types recommendation preference.+--+-- When the recommendations page is refreshed, a status of @Active@+-- confirms that the preference is applied to the recommendations, and a+-- status of @Inactive@ confirms that the preference isn\'t yet applied to+-- recommendations.+recommendationPreferencesDetail_inferredWorkloadTypes :: Lens.Lens' RecommendationPreferencesDetail (Prelude.Maybe InferredWorkloadTypesPreference)+recommendationPreferencesDetail_inferredWorkloadTypes = Lens.lens (\RecommendationPreferencesDetail' {inferredWorkloadTypes} -> inferredWorkloadTypes) (\s@RecommendationPreferencesDetail' {} a -> s {inferredWorkloadTypes = a} :: RecommendationPreferencesDetail)++-- | The target resource type of the recommendation preference to create.+--+-- The @Ec2Instance@ option encompasses standalone instances and instances+-- that are part of Auto Scaling groups. The @AutoScalingGroup@ option+-- encompasses only instances that are part of an Auto Scaling group.+recommendationPreferencesDetail_resourceType :: Lens.Lens' RecommendationPreferencesDetail (Prelude.Maybe ResourceType)+recommendationPreferencesDetail_resourceType = Lens.lens (\RecommendationPreferencesDetail' {resourceType} -> resourceType) (\s@RecommendationPreferencesDetail' {} a -> s {resourceType = a} :: RecommendationPreferencesDetail)++-- | An object that describes the scope of the recommendation preference.+--+-- Recommendation preferences can be created at the organization level (for+-- management accounts of an organization only), account level, and+-- resource level. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+recommendationPreferencesDetail_scope :: Lens.Lens' RecommendationPreferencesDetail (Prelude.Maybe Scope)+recommendationPreferencesDetail_scope = Lens.lens (\RecommendationPreferencesDetail' {scope} -> scope) (\s@RecommendationPreferencesDetail' {} a -> s {scope = a} :: RecommendationPreferencesDetail)++instance+  Data.FromJSON+    RecommendationPreferencesDetail+  where+  parseJSON =+    Data.withObject+      "RecommendationPreferencesDetail"+      ( \x ->+          RecommendationPreferencesDetail'+            Prelude.<$> (x Data..:? "enhancedInfrastructureMetrics")+            Prelude.<*> (x Data..:? "externalMetricsPreference")+            Prelude.<*> (x Data..:? "inferredWorkloadTypes")+            Prelude.<*> (x Data..:? "resourceType")+            Prelude.<*> (x Data..:? "scope")+      )++instance+  Prelude.Hashable+    RecommendationPreferencesDetail+  where+  hashWithSalt+    _salt+    RecommendationPreferencesDetail' {..} =+      _salt+        `Prelude.hashWithSalt` enhancedInfrastructureMetrics+        `Prelude.hashWithSalt` externalMetricsPreference+        `Prelude.hashWithSalt` inferredWorkloadTypes+        `Prelude.hashWithSalt` resourceType+        `Prelude.hashWithSalt` scope++instance+  Prelude.NFData+    RecommendationPreferencesDetail+  where+  rnf RecommendationPreferencesDetail' {..} =+    Prelude.rnf enhancedInfrastructureMetrics+      `Prelude.seq` Prelude.rnf externalMetricsPreference+      `Prelude.seq` Prelude.rnf inferredWorkloadTypes+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf scope
+ gen/Amazonka/ComputeOptimizer/Types/RecommendationSource.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.RecommendationSource+-- 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.ComputeOptimizer.Types.RecommendationSource where++import Amazonka.ComputeOptimizer.Types.RecommendationSourceType+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the source of a recommendation, such as an Amazon EC2 instance+-- or Auto Scaling group.+--+-- /See:/ 'newRecommendationSource' smart constructor.+data RecommendationSource = RecommendationSource'+  { -- | The Amazon Resource Name (ARN) of the recommendation source.+    recommendationSourceArn :: Prelude.Maybe Prelude.Text,+    -- | The resource type of the recommendation source.+    recommendationSourceType :: Prelude.Maybe RecommendationSourceType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecommendationSource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'recommendationSourceArn', 'recommendationSource_recommendationSourceArn' - The Amazon Resource Name (ARN) of the recommendation source.+--+-- 'recommendationSourceType', 'recommendationSource_recommendationSourceType' - The resource type of the recommendation source.+newRecommendationSource ::+  RecommendationSource+newRecommendationSource =+  RecommendationSource'+    { recommendationSourceArn =+        Prelude.Nothing,+      recommendationSourceType = Prelude.Nothing+    }++-- | The Amazon Resource Name (ARN) of the recommendation source.+recommendationSource_recommendationSourceArn :: Lens.Lens' RecommendationSource (Prelude.Maybe Prelude.Text)+recommendationSource_recommendationSourceArn = Lens.lens (\RecommendationSource' {recommendationSourceArn} -> recommendationSourceArn) (\s@RecommendationSource' {} a -> s {recommendationSourceArn = a} :: RecommendationSource)++-- | The resource type of the recommendation source.+recommendationSource_recommendationSourceType :: Lens.Lens' RecommendationSource (Prelude.Maybe RecommendationSourceType)+recommendationSource_recommendationSourceType = Lens.lens (\RecommendationSource' {recommendationSourceType} -> recommendationSourceType) (\s@RecommendationSource' {} a -> s {recommendationSourceType = a} :: RecommendationSource)++instance Data.FromJSON RecommendationSource where+  parseJSON =+    Data.withObject+      "RecommendationSource"+      ( \x ->+          RecommendationSource'+            Prelude.<$> (x Data..:? "recommendationSourceArn")+            Prelude.<*> (x Data..:? "recommendationSourceType")+      )++instance Prelude.Hashable RecommendationSource where+  hashWithSalt _salt RecommendationSource' {..} =+    _salt+      `Prelude.hashWithSalt` recommendationSourceArn+      `Prelude.hashWithSalt` recommendationSourceType++instance Prelude.NFData RecommendationSource where+  rnf RecommendationSource' {..} =+    Prelude.rnf recommendationSourceArn+      `Prelude.seq` Prelude.rnf recommendationSourceType
+ gen/Amazonka/ComputeOptimizer/Types/RecommendationSourceType.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.ComputeOptimizer.Types.RecommendationSourceType+-- 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.ComputeOptimizer.Types.RecommendationSourceType+  ( RecommendationSourceType+      ( ..,+        RecommendationSourceType_AutoScalingGroup,+        RecommendationSourceType_EbsVolume,+        RecommendationSourceType_Ec2Instance,+        RecommendationSourceType_EcsService,+        RecommendationSourceType_LambdaFunction+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RecommendationSourceType = RecommendationSourceType'+  { fromRecommendationSourceType ::+      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 RecommendationSourceType_AutoScalingGroup :: RecommendationSourceType+pattern RecommendationSourceType_AutoScalingGroup = RecommendationSourceType' "AutoScalingGroup"++pattern RecommendationSourceType_EbsVolume :: RecommendationSourceType+pattern RecommendationSourceType_EbsVolume = RecommendationSourceType' "EbsVolume"++pattern RecommendationSourceType_Ec2Instance :: RecommendationSourceType+pattern RecommendationSourceType_Ec2Instance = RecommendationSourceType' "Ec2Instance"++pattern RecommendationSourceType_EcsService :: RecommendationSourceType+pattern RecommendationSourceType_EcsService = RecommendationSourceType' "EcsService"++pattern RecommendationSourceType_LambdaFunction :: RecommendationSourceType+pattern RecommendationSourceType_LambdaFunction = RecommendationSourceType' "LambdaFunction"++{-# COMPLETE+  RecommendationSourceType_AutoScalingGroup,+  RecommendationSourceType_EbsVolume,+  RecommendationSourceType_Ec2Instance,+  RecommendationSourceType_EcsService,+  RecommendationSourceType_LambdaFunction,+  RecommendationSourceType'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/RecommendationSummary.hs view
@@ -0,0 +1,133 @@+{-# 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.ComputeOptimizer.Types.RecommendationSummary+-- 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.ComputeOptimizer.Types.RecommendationSummary where++import Amazonka.ComputeOptimizer.Types.CurrentPerformanceRiskRatings+import Amazonka.ComputeOptimizer.Types.RecommendationSourceType+import Amazonka.ComputeOptimizer.Types.SavingsOpportunity+import Amazonka.ComputeOptimizer.Types.Summary+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 summary of a recommendation.+--+-- /See:/ 'newRecommendationSummary' smart constructor.+data RecommendationSummary = RecommendationSummary'+  { -- | The Amazon Web Services account ID of the recommendation summary.+    accountId :: Prelude.Maybe Prelude.Text,+    -- | An object that describes the performance risk ratings for a given+    -- resource type.+    currentPerformanceRiskRatings :: Prelude.Maybe CurrentPerformanceRiskRatings,+    -- | The resource type that the recommendation summary applies to.+    recommendationResourceType :: Prelude.Maybe RecommendationSourceType,+    -- | An object that describes the savings opportunity for a given resource+    -- type. Savings opportunity includes the estimated monthly savings amount+    -- and percentage.+    savingsOpportunity :: Prelude.Maybe SavingsOpportunity,+    -- | An array of objects that describe a recommendation summary.+    summaries :: Prelude.Maybe [Summary]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecommendationSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'recommendationSummary_accountId' - The Amazon Web Services account ID of the recommendation summary.+--+-- 'currentPerformanceRiskRatings', 'recommendationSummary_currentPerformanceRiskRatings' - An object that describes the performance risk ratings for a given+-- resource type.+--+-- 'recommendationResourceType', 'recommendationSummary_recommendationResourceType' - The resource type that the recommendation summary applies to.+--+-- 'savingsOpportunity', 'recommendationSummary_savingsOpportunity' - An object that describes the savings opportunity for a given resource+-- type. Savings opportunity includes the estimated monthly savings amount+-- and percentage.+--+-- 'summaries', 'recommendationSummary_summaries' - An array of objects that describe a recommendation summary.+newRecommendationSummary ::+  RecommendationSummary+newRecommendationSummary =+  RecommendationSummary'+    { accountId = Prelude.Nothing,+      currentPerformanceRiskRatings = Prelude.Nothing,+      recommendationResourceType = Prelude.Nothing,+      savingsOpportunity = Prelude.Nothing,+      summaries = Prelude.Nothing+    }++-- | The Amazon Web Services account ID of the recommendation summary.+recommendationSummary_accountId :: Lens.Lens' RecommendationSummary (Prelude.Maybe Prelude.Text)+recommendationSummary_accountId = Lens.lens (\RecommendationSummary' {accountId} -> accountId) (\s@RecommendationSummary' {} a -> s {accountId = a} :: RecommendationSummary)++-- | An object that describes the performance risk ratings for a given+-- resource type.+recommendationSummary_currentPerformanceRiskRatings :: Lens.Lens' RecommendationSummary (Prelude.Maybe CurrentPerformanceRiskRatings)+recommendationSummary_currentPerformanceRiskRatings = Lens.lens (\RecommendationSummary' {currentPerformanceRiskRatings} -> currentPerformanceRiskRatings) (\s@RecommendationSummary' {} a -> s {currentPerformanceRiskRatings = a} :: RecommendationSummary)++-- | The resource type that the recommendation summary applies to.+recommendationSummary_recommendationResourceType :: Lens.Lens' RecommendationSummary (Prelude.Maybe RecommendationSourceType)+recommendationSummary_recommendationResourceType = Lens.lens (\RecommendationSummary' {recommendationResourceType} -> recommendationResourceType) (\s@RecommendationSummary' {} a -> s {recommendationResourceType = a} :: RecommendationSummary)++-- | An object that describes the savings opportunity for a given resource+-- type. Savings opportunity includes the estimated monthly savings amount+-- and percentage.+recommendationSummary_savingsOpportunity :: Lens.Lens' RecommendationSummary (Prelude.Maybe SavingsOpportunity)+recommendationSummary_savingsOpportunity = Lens.lens (\RecommendationSummary' {savingsOpportunity} -> savingsOpportunity) (\s@RecommendationSummary' {} a -> s {savingsOpportunity = a} :: RecommendationSummary)++-- | An array of objects that describe a recommendation summary.+recommendationSummary_summaries :: Lens.Lens' RecommendationSummary (Prelude.Maybe [Summary])+recommendationSummary_summaries = Lens.lens (\RecommendationSummary' {summaries} -> summaries) (\s@RecommendationSummary' {} a -> s {summaries = a} :: RecommendationSummary) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON RecommendationSummary where+  parseJSON =+    Data.withObject+      "RecommendationSummary"+      ( \x ->+          RecommendationSummary'+            Prelude.<$> (x Data..:? "accountId")+            Prelude.<*> (x Data..:? "currentPerformanceRiskRatings")+            Prelude.<*> (x Data..:? "recommendationResourceType")+            Prelude.<*> (x Data..:? "savingsOpportunity")+            Prelude.<*> (x Data..:? "summaries" Data..!= Prelude.mempty)+      )++instance Prelude.Hashable RecommendationSummary where+  hashWithSalt _salt RecommendationSummary' {..} =+    _salt+      `Prelude.hashWithSalt` accountId+      `Prelude.hashWithSalt` currentPerformanceRiskRatings+      `Prelude.hashWithSalt` recommendationResourceType+      `Prelude.hashWithSalt` savingsOpportunity+      `Prelude.hashWithSalt` summaries++instance Prelude.NFData RecommendationSummary where+  rnf RecommendationSummary' {..} =+    Prelude.rnf accountId+      `Prelude.seq` Prelude.rnf currentPerformanceRiskRatings+      `Prelude.seq` Prelude.rnf recommendationResourceType+      `Prelude.seq` Prelude.rnf savingsOpportunity+      `Prelude.seq` Prelude.rnf summaries
+ gen/Amazonka/ComputeOptimizer/Types/RecommendedOptionProjectedMetric.hs view
@@ -0,0 +1,137 @@+{-# 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.ComputeOptimizer.Types.RecommendedOptionProjectedMetric+-- 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.ComputeOptimizer.Types.RecommendedOptionProjectedMetric where++import Amazonka.ComputeOptimizer.Types.ProjectedMetric+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a projected utilization metric of a recommendation option.+--+-- The @Cpu@ and @Memory@ metrics are the only projected utilization+-- metrics returned when you run the GetEC2RecommendationProjectedMetrics+-- action. Additionally, the @Memory@ metric is returned only for resources+-- that have the unified CloudWatch agent installed on them. For more+-- information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+--+-- /See:/ 'newRecommendedOptionProjectedMetric' smart constructor.+data RecommendedOptionProjectedMetric = RecommendedOptionProjectedMetric'+  { -- | An array of objects that describe a projected utilization metric.+    projectedMetrics :: Prelude.Maybe [ProjectedMetric],+    -- | The rank of the recommendation option projected metric.+    --+    -- The top recommendation option is ranked as @1@.+    --+    -- The projected metric rank correlates to the recommendation option rank.+    -- For example, the projected metric ranked as @1@ is related to the+    -- recommendation option that is also ranked as @1@ in the same response.+    rank :: Prelude.Maybe Prelude.Int,+    -- | The recommended instance type.+    recommendedInstanceType :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RecommendedOptionProjectedMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'projectedMetrics', 'recommendedOptionProjectedMetric_projectedMetrics' - An array of objects that describe a projected utilization metric.+--+-- 'rank', 'recommendedOptionProjectedMetric_rank' - The rank of the recommendation option projected metric.+--+-- The top recommendation option is ranked as @1@.+--+-- The projected metric rank correlates to the recommendation option rank.+-- For example, the projected metric ranked as @1@ is related to the+-- recommendation option that is also ranked as @1@ in the same response.+--+-- 'recommendedInstanceType', 'recommendedOptionProjectedMetric_recommendedInstanceType' - The recommended instance type.+newRecommendedOptionProjectedMetric ::+  RecommendedOptionProjectedMetric+newRecommendedOptionProjectedMetric =+  RecommendedOptionProjectedMetric'+    { projectedMetrics =+        Prelude.Nothing,+      rank = Prelude.Nothing,+      recommendedInstanceType = Prelude.Nothing+    }++-- | An array of objects that describe a projected utilization metric.+recommendedOptionProjectedMetric_projectedMetrics :: Lens.Lens' RecommendedOptionProjectedMetric (Prelude.Maybe [ProjectedMetric])+recommendedOptionProjectedMetric_projectedMetrics = Lens.lens (\RecommendedOptionProjectedMetric' {projectedMetrics} -> projectedMetrics) (\s@RecommendedOptionProjectedMetric' {} a -> s {projectedMetrics = a} :: RecommendedOptionProjectedMetric) Prelude.. Lens.mapping Lens.coerced++-- | The rank of the recommendation option projected metric.+--+-- The top recommendation option is ranked as @1@.+--+-- The projected metric rank correlates to the recommendation option rank.+-- For example, the projected metric ranked as @1@ is related to the+-- recommendation option that is also ranked as @1@ in the same response.+recommendedOptionProjectedMetric_rank :: Lens.Lens' RecommendedOptionProjectedMetric (Prelude.Maybe Prelude.Int)+recommendedOptionProjectedMetric_rank = Lens.lens (\RecommendedOptionProjectedMetric' {rank} -> rank) (\s@RecommendedOptionProjectedMetric' {} a -> s {rank = a} :: RecommendedOptionProjectedMetric)++-- | The recommended instance type.+recommendedOptionProjectedMetric_recommendedInstanceType :: Lens.Lens' RecommendedOptionProjectedMetric (Prelude.Maybe Prelude.Text)+recommendedOptionProjectedMetric_recommendedInstanceType = Lens.lens (\RecommendedOptionProjectedMetric' {recommendedInstanceType} -> recommendedInstanceType) (\s@RecommendedOptionProjectedMetric' {} a -> s {recommendedInstanceType = a} :: RecommendedOptionProjectedMetric)++instance+  Data.FromJSON+    RecommendedOptionProjectedMetric+  where+  parseJSON =+    Data.withObject+      "RecommendedOptionProjectedMetric"+      ( \x ->+          RecommendedOptionProjectedMetric'+            Prelude.<$> ( x+                            Data..:? "projectedMetrics"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "rank")+            Prelude.<*> (x Data..:? "recommendedInstanceType")+      )++instance+  Prelude.Hashable+    RecommendedOptionProjectedMetric+  where+  hashWithSalt+    _salt+    RecommendedOptionProjectedMetric' {..} =+      _salt+        `Prelude.hashWithSalt` projectedMetrics+        `Prelude.hashWithSalt` rank+        `Prelude.hashWithSalt` recommendedInstanceType++instance+  Prelude.NFData+    RecommendedOptionProjectedMetric+  where+  rnf RecommendedOptionProjectedMetric' {..} =+    Prelude.rnf projectedMetrics+      `Prelude.seq` Prelude.rnf rank+      `Prelude.seq` Prelude.rnf recommendedInstanceType
+ gen/Amazonka/ComputeOptimizer/Types/ResourceType.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.ResourceType+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.ComputeOptimizer.Types.ResourceType+  ( ResourceType+      ( ..,+        ResourceType_AutoScalingGroup,+        ResourceType_EbsVolume,+        ResourceType_Ec2Instance,+        ResourceType_EcsService,+        ResourceType_LambdaFunction,+        ResourceType_NotApplicable+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceType = ResourceType'+  { fromResourceType ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern ResourceType_AutoScalingGroup :: ResourceType+pattern ResourceType_AutoScalingGroup = ResourceType' "AutoScalingGroup"++pattern ResourceType_EbsVolume :: ResourceType+pattern ResourceType_EbsVolume = ResourceType' "EbsVolume"++pattern ResourceType_Ec2Instance :: ResourceType+pattern ResourceType_Ec2Instance = ResourceType' "Ec2Instance"++pattern ResourceType_EcsService :: ResourceType+pattern ResourceType_EcsService = ResourceType' "EcsService"++pattern ResourceType_LambdaFunction :: ResourceType+pattern ResourceType_LambdaFunction = ResourceType' "LambdaFunction"++pattern ResourceType_NotApplicable :: ResourceType+pattern ResourceType_NotApplicable = ResourceType' "NotApplicable"++{-# COMPLETE+  ResourceType_AutoScalingGroup,+  ResourceType_EbsVolume,+  ResourceType_Ec2Instance,+  ResourceType_EcsService,+  ResourceType_LambdaFunction,+  ResourceType_NotApplicable,+  ResourceType'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/S3Destination.hs view
@@ -0,0 +1,119 @@+{-# 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.ComputeOptimizer.Types.S3Destination+-- 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.ComputeOptimizer.Types.S3Destination where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the destination Amazon Simple Storage Service (Amazon S3)+-- bucket name and object keys of a recommendations export file, and its+-- associated metadata file.+--+-- /See:/ 'newS3Destination' smart constructor.+data S3Destination = S3Destination'+  { -- | The name of the Amazon S3 bucket used as the destination of an export+    -- file.+    bucket :: Prelude.Maybe Prelude.Text,+    -- | The Amazon S3 bucket key of an export file.+    --+    -- The key uniquely identifies the object, or export file, in the S3+    -- bucket.+    key :: Prelude.Maybe Prelude.Text,+    -- | The Amazon S3 bucket key of a metadata file.+    --+    -- The key uniquely identifies the object, or metadata file, in the S3+    -- bucket.+    metadataKey :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'S3Destination' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'bucket', 's3Destination_bucket' - The name of the Amazon S3 bucket used as the destination of an export+-- file.+--+-- 'key', 's3Destination_key' - The Amazon S3 bucket key of an export file.+--+-- The key uniquely identifies the object, or export file, in the S3+-- bucket.+--+-- 'metadataKey', 's3Destination_metadataKey' - The Amazon S3 bucket key of a metadata file.+--+-- The key uniquely identifies the object, or metadata file, in the S3+-- bucket.+newS3Destination ::+  S3Destination+newS3Destination =+  S3Destination'+    { bucket = Prelude.Nothing,+      key = Prelude.Nothing,+      metadataKey = Prelude.Nothing+    }++-- | The name of the Amazon S3 bucket used as the destination of an export+-- file.+s3Destination_bucket :: Lens.Lens' S3Destination (Prelude.Maybe Prelude.Text)+s3Destination_bucket = Lens.lens (\S3Destination' {bucket} -> bucket) (\s@S3Destination' {} a -> s {bucket = a} :: S3Destination)++-- | The Amazon S3 bucket key of an export file.+--+-- The key uniquely identifies the object, or export file, in the S3+-- bucket.+s3Destination_key :: Lens.Lens' S3Destination (Prelude.Maybe Prelude.Text)+s3Destination_key = Lens.lens (\S3Destination' {key} -> key) (\s@S3Destination' {} a -> s {key = a} :: S3Destination)++-- | The Amazon S3 bucket key of a metadata file.+--+-- The key uniquely identifies the object, or metadata file, in the S3+-- bucket.+s3Destination_metadataKey :: Lens.Lens' S3Destination (Prelude.Maybe Prelude.Text)+s3Destination_metadataKey = Lens.lens (\S3Destination' {metadataKey} -> metadataKey) (\s@S3Destination' {} a -> s {metadataKey = a} :: S3Destination)++instance Data.FromJSON S3Destination where+  parseJSON =+    Data.withObject+      "S3Destination"+      ( \x ->+          S3Destination'+            Prelude.<$> (x Data..:? "bucket")+            Prelude.<*> (x Data..:? "key")+            Prelude.<*> (x Data..:? "metadataKey")+      )++instance Prelude.Hashable S3Destination where+  hashWithSalt _salt S3Destination' {..} =+    _salt+      `Prelude.hashWithSalt` bucket+      `Prelude.hashWithSalt` key+      `Prelude.hashWithSalt` metadataKey++instance Prelude.NFData S3Destination where+  rnf S3Destination' {..} =+    Prelude.rnf bucket+      `Prelude.seq` Prelude.rnf key+      `Prelude.seq` Prelude.rnf metadataKey
+ gen/Amazonka/ComputeOptimizer/Types/S3DestinationConfig.hs view
@@ -0,0 +1,98 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.ComputeOptimizer.Types.S3DestinationConfig+-- 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.ComputeOptimizer.Types.S3DestinationConfig where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the destination Amazon Simple Storage Service (Amazon S3)+-- bucket name and key prefix for a recommendations export job.+--+-- You must create the destination Amazon S3 bucket for your+-- recommendations export before you create the export job. Compute+-- Optimizer does not create the S3 bucket for you. After you create the S3+-- bucket, ensure that it has the required permission policy to allow+-- Compute Optimizer to write the export file to it. If you plan to specify+-- an object prefix when you create the export job, you must include the+-- object prefix in the policy that you add to the S3 bucket. For more+-- information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html Amazon S3 Bucket Policy for Compute Optimizer>+-- in the /Compute Optimizer User Guide/.+--+-- /See:/ 'newS3DestinationConfig' smart constructor.+data S3DestinationConfig = S3DestinationConfig'+  { -- | The name of the Amazon S3 bucket to use as the destination for an export+    -- job.+    bucket :: Prelude.Maybe Prelude.Text,+    -- | The Amazon S3 bucket prefix for an export job.+    keyPrefix :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'S3DestinationConfig' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'bucket', 's3DestinationConfig_bucket' - The name of the Amazon S3 bucket to use as the destination for an export+-- job.+--+-- 'keyPrefix', 's3DestinationConfig_keyPrefix' - The Amazon S3 bucket prefix for an export job.+newS3DestinationConfig ::+  S3DestinationConfig+newS3DestinationConfig =+  S3DestinationConfig'+    { bucket = Prelude.Nothing,+      keyPrefix = Prelude.Nothing+    }++-- | The name of the Amazon S3 bucket to use as the destination for an export+-- job.+s3DestinationConfig_bucket :: Lens.Lens' S3DestinationConfig (Prelude.Maybe Prelude.Text)+s3DestinationConfig_bucket = Lens.lens (\S3DestinationConfig' {bucket} -> bucket) (\s@S3DestinationConfig' {} a -> s {bucket = a} :: S3DestinationConfig)++-- | The Amazon S3 bucket prefix for an export job.+s3DestinationConfig_keyPrefix :: Lens.Lens' S3DestinationConfig (Prelude.Maybe Prelude.Text)+s3DestinationConfig_keyPrefix = Lens.lens (\S3DestinationConfig' {keyPrefix} -> keyPrefix) (\s@S3DestinationConfig' {} a -> s {keyPrefix = a} :: S3DestinationConfig)++instance Prelude.Hashable S3DestinationConfig where+  hashWithSalt _salt S3DestinationConfig' {..} =+    _salt+      `Prelude.hashWithSalt` bucket+      `Prelude.hashWithSalt` keyPrefix++instance Prelude.NFData S3DestinationConfig where+  rnf S3DestinationConfig' {..} =+    Prelude.rnf bucket+      `Prelude.seq` Prelude.rnf keyPrefix++instance Data.ToJSON S3DestinationConfig where+  toJSON S3DestinationConfig' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("bucket" Data..=) Prelude.<$> bucket,+            ("keyPrefix" Data..=) Prelude.<$> keyPrefix+          ]+      )
+ gen/Amazonka/ComputeOptimizer/Types/SavingsOpportunity.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.ComputeOptimizer.Types.SavingsOpportunity+-- 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.ComputeOptimizer.Types.SavingsOpportunity where++import Amazonka.ComputeOptimizer.Types.EstimatedMonthlySavings+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the savings opportunity for recommendations of a given+-- resource type or for the recommendation option of an individual+-- resource.+--+-- Savings opportunity represents the estimated monthly savings you can+-- achieve by implementing a given Compute Optimizer recommendation.+--+-- Savings opportunity data requires that you opt in to Cost Explorer, as+-- well as activate __Receive Amazon EC2 resource recommendations__ in the+-- Cost Explorer preferences page. That creates a connection between Cost+-- Explorer and Compute Optimizer. With this connection, Cost Explorer+-- generates savings estimates considering the price of existing resources,+-- the price of recommended resources, and historical usage data. Estimated+-- monthly savings reflects the projected dollar savings associated with+-- each of the recommendations generated. For more information, see+-- <https://docs.aws.amazon.com/cost-management/latest/userguide/ce-enable.html Enabling Cost Explorer>+-- and+-- <https://docs.aws.amazon.com/cost-management/latest/userguide/ce-rightsizing.html Optimizing your cost with Rightsizing Recommendations>+-- in the /Cost Management User Guide/.+--+-- /See:/ 'newSavingsOpportunity' smart constructor.+data SavingsOpportunity = SavingsOpportunity'+  { -- | An object that describes the estimated monthly savings amount possible,+    -- based on On-Demand instance pricing, by adopting Compute Optimizer+    -- recommendations for a given resource.+    estimatedMonthlySavings :: Prelude.Maybe EstimatedMonthlySavings,+    -- | The estimated monthly savings possible as a percentage of monthly cost+    -- by adopting Compute Optimizer recommendations for a given resource.+    savingsOpportunityPercentage :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SavingsOpportunity' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'estimatedMonthlySavings', 'savingsOpportunity_estimatedMonthlySavings' - An object that describes the estimated monthly savings amount possible,+-- based on On-Demand instance pricing, by adopting Compute Optimizer+-- recommendations for a given resource.+--+-- 'savingsOpportunityPercentage', 'savingsOpportunity_savingsOpportunityPercentage' - The estimated monthly savings possible as a percentage of monthly cost+-- by adopting Compute Optimizer recommendations for a given resource.+newSavingsOpportunity ::+  SavingsOpportunity+newSavingsOpportunity =+  SavingsOpportunity'+    { estimatedMonthlySavings =+        Prelude.Nothing,+      savingsOpportunityPercentage = Prelude.Nothing+    }++-- | An object that describes the estimated monthly savings amount possible,+-- based on On-Demand instance pricing, by adopting Compute Optimizer+-- recommendations for a given resource.+savingsOpportunity_estimatedMonthlySavings :: Lens.Lens' SavingsOpportunity (Prelude.Maybe EstimatedMonthlySavings)+savingsOpportunity_estimatedMonthlySavings = Lens.lens (\SavingsOpportunity' {estimatedMonthlySavings} -> estimatedMonthlySavings) (\s@SavingsOpportunity' {} a -> s {estimatedMonthlySavings = a} :: SavingsOpportunity)++-- | The estimated monthly savings possible as a percentage of monthly cost+-- by adopting Compute Optimizer recommendations for a given resource.+savingsOpportunity_savingsOpportunityPercentage :: Lens.Lens' SavingsOpportunity (Prelude.Maybe Prelude.Double)+savingsOpportunity_savingsOpportunityPercentage = Lens.lens (\SavingsOpportunity' {savingsOpportunityPercentage} -> savingsOpportunityPercentage) (\s@SavingsOpportunity' {} a -> s {savingsOpportunityPercentage = a} :: SavingsOpportunity)++instance Data.FromJSON SavingsOpportunity where+  parseJSON =+    Data.withObject+      "SavingsOpportunity"+      ( \x ->+          SavingsOpportunity'+            Prelude.<$> (x Data..:? "estimatedMonthlySavings")+            Prelude.<*> (x Data..:? "savingsOpportunityPercentage")+      )++instance Prelude.Hashable SavingsOpportunity where+  hashWithSalt _salt SavingsOpportunity' {..} =+    _salt+      `Prelude.hashWithSalt` estimatedMonthlySavings+      `Prelude.hashWithSalt` savingsOpportunityPercentage++instance Prelude.NFData SavingsOpportunity where+  rnf SavingsOpportunity' {..} =+    Prelude.rnf estimatedMonthlySavings+      `Prelude.seq` Prelude.rnf savingsOpportunityPercentage
+ gen/Amazonka/ComputeOptimizer/Types/Scope.hs view
@@ -0,0 +1,185 @@+{-# 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.ComputeOptimizer.Types.Scope+-- 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.ComputeOptimizer.Types.Scope where++import Amazonka.ComputeOptimizer.Types.ScopeName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the scope of a recommendation preference.+--+-- Recommendation preferences can be created at the organization level (for+-- management accounts of an organization only), account level, and+-- resource level. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html Activating enhanced infrastructure metrics>+-- in the /Compute Optimizer User Guide/.+--+-- You cannot create recommendation preferences for Auto Scaling groups at+-- the organization and account levels. You can create recommendation+-- preferences for Auto Scaling groups only at the resource level by+-- specifying a scope name of @ResourceArn@ and a scope value of the Auto+-- Scaling group Amazon Resource Name (ARN). This will configure the+-- preference for all instances that are part of the specified Auto Scaling+-- group. You also cannot create recommendation preferences at the resource+-- level for instances that are part of an Auto Scaling group. You can+-- create recommendation preferences at the resource level only for+-- standalone instances.+--+-- /See:/ 'newScope' smart constructor.+data Scope = Scope'+  { -- | The name of the scope.+    --+    -- The following scopes are possible:+    --+    -- -   @Organization@ - Specifies that the recommendation preference+    --     applies at the organization level, for all member accounts of an+    --     organization.+    --+    -- -   @AccountId@ - Specifies that the recommendation preference applies+    --     at the account level, for all resources of a given resource type in+    --     an account.+    --+    -- -   @ResourceArn@ - Specifies that the recommendation preference applies+    --     at the individual resource level.+    name :: Prelude.Maybe ScopeName,+    -- | The value of the scope.+    --+    -- If you specified the @name@ of the scope as:+    --+    -- -   @Organization@ - The @value@ must be @ALL_ACCOUNTS@.+    --+    -- -   @AccountId@ - The @value@ must be a 12-digit Amazon Web Services+    --     account ID.+    --+    -- -   @ResourceArn@ - The @value@ must be the Amazon Resource Name (ARN)+    --     of an EC2 instance or an Auto Scaling group.+    --+    -- Only EC2 instance and Auto Scaling group ARNs are currently supported.+    value :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Scope' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'scope_name' - The name of the scope.+--+-- The following scopes are possible:+--+-- -   @Organization@ - Specifies that the recommendation preference+--     applies at the organization level, for all member accounts of an+--     organization.+--+-- -   @AccountId@ - Specifies that the recommendation preference applies+--     at the account level, for all resources of a given resource type in+--     an account.+--+-- -   @ResourceArn@ - Specifies that the recommendation preference applies+--     at the individual resource level.+--+-- 'value', 'scope_value' - The value of the scope.+--+-- If you specified the @name@ of the scope as:+--+-- -   @Organization@ - The @value@ must be @ALL_ACCOUNTS@.+--+-- -   @AccountId@ - The @value@ must be a 12-digit Amazon Web Services+--     account ID.+--+-- -   @ResourceArn@ - The @value@ must be the Amazon Resource Name (ARN)+--     of an EC2 instance or an Auto Scaling group.+--+-- Only EC2 instance and Auto Scaling group ARNs are currently supported.+newScope ::+  Scope+newScope =+  Scope'+    { name = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The name of the scope.+--+-- The following scopes are possible:+--+-- -   @Organization@ - Specifies that the recommendation preference+--     applies at the organization level, for all member accounts of an+--     organization.+--+-- -   @AccountId@ - Specifies that the recommendation preference applies+--     at the account level, for all resources of a given resource type in+--     an account.+--+-- -   @ResourceArn@ - Specifies that the recommendation preference applies+--     at the individual resource level.+scope_name :: Lens.Lens' Scope (Prelude.Maybe ScopeName)+scope_name = Lens.lens (\Scope' {name} -> name) (\s@Scope' {} a -> s {name = a} :: Scope)++-- | The value of the scope.+--+-- If you specified the @name@ of the scope as:+--+-- -   @Organization@ - The @value@ must be @ALL_ACCOUNTS@.+--+-- -   @AccountId@ - The @value@ must be a 12-digit Amazon Web Services+--     account ID.+--+-- -   @ResourceArn@ - The @value@ must be the Amazon Resource Name (ARN)+--     of an EC2 instance or an Auto Scaling group.+--+-- Only EC2 instance and Auto Scaling group ARNs are currently supported.+scope_value :: Lens.Lens' Scope (Prelude.Maybe Prelude.Text)+scope_value = Lens.lens (\Scope' {value} -> value) (\s@Scope' {} a -> s {value = a} :: Scope)++instance Data.FromJSON Scope where+  parseJSON =+    Data.withObject+      "Scope"+      ( \x ->+          Scope'+            Prelude.<$> (x Data..:? "name")+            Prelude.<*> (x Data..:? "value")+      )++instance Prelude.Hashable Scope where+  hashWithSalt _salt Scope' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` value++instance Prelude.NFData Scope where+  rnf Scope' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf value++instance Data.ToJSON Scope where+  toJSON Scope' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("name" Data..=) Prelude.<$> name,+            ("value" Data..=) Prelude.<$> value+          ]+      )
+ gen/Amazonka/ComputeOptimizer/Types/ScopeName.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.ComputeOptimizer.Types.ScopeName+-- 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.ComputeOptimizer.Types.ScopeName+  ( ScopeName+      ( ..,+        ScopeName_AccountId,+        ScopeName_Organization,+        ScopeName_ResourceArn+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScopeName = ScopeName'+  { fromScopeName ::+      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 ScopeName_AccountId :: ScopeName+pattern ScopeName_AccountId = ScopeName' "AccountId"++pattern ScopeName_Organization :: ScopeName+pattern ScopeName_Organization = ScopeName' "Organization"++pattern ScopeName_ResourceArn :: ScopeName+pattern ScopeName_ResourceArn = ScopeName' "ResourceArn"++{-# COMPLETE+  ScopeName_AccountId,+  ScopeName_Organization,+  ScopeName_ResourceArn,+  ScopeName'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/ServiceConfiguration.hs view
@@ -0,0 +1,183 @@+{-# 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.ComputeOptimizer.Types.ServiceConfiguration+-- 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.ComputeOptimizer.Types.ServiceConfiguration where++import Amazonka.ComputeOptimizer.Types.AutoScalingConfiguration+import Amazonka.ComputeOptimizer.Types.ContainerConfiguration+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 Amazon ECS service configurations used for recommendations.+--+-- /See:/ 'newServiceConfiguration' smart constructor.+data ServiceConfiguration = ServiceConfiguration'+  { -- | Describes the Auto Scaling configuration methods for an Amazon ECS+    -- service. This affects the generated recommendations. For example, if+    -- Auto Scaling is configured on a ECS service’s CPU, then Compute+    -- Optimizer doesn’t generate CPU size recommendations.+    --+    -- The Auto Scaling configuration methods include:+    --+    -- -   @TARGET_TRACKING_SCALING_CPU@ — If the ECS service is configured to+    --     use target scaling on CPU, Compute Optimizer doesn\'t generate CPU+    --     recommendations.+    --+    -- -   @TARGET_TRACKING_SCALING_MEMORY@ — If the ECS service is configured+    --     to use target scaling on memory, Compute Optimizer doesn\'t generate+    --     memory recommendations.+    --+    -- For more information about step scaling and target scaling, see+    -- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html Step scaling policies for Application Auto Scaling>+    -- and+    -- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html Target tracking scaling policies for Application Auto Scaling>+    -- in the /Application Auto Scaling User Guide/.+    autoScalingConfiguration :: Prelude.Maybe AutoScalingConfiguration,+    -- | The container configurations within a task of an ECS service.+    containerConfigurations :: Prelude.Maybe [ContainerConfiguration],+    -- | The number of CPU units used by the tasks in the ECS service.+    cpu :: Prelude.Maybe Prelude.Int,+    -- | The amount of memory used by the tasks in the ECS service.+    memory :: Prelude.Maybe Prelude.Int,+    -- | The task definition ARN used by the tasks in the ECS service.+    taskDefinitionArn :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ServiceConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'autoScalingConfiguration', 'serviceConfiguration_autoScalingConfiguration' - Describes the Auto Scaling configuration methods for an Amazon ECS+-- service. This affects the generated recommendations. For example, if+-- Auto Scaling is configured on a ECS service’s CPU, then Compute+-- Optimizer doesn’t generate CPU size recommendations.+--+-- The Auto Scaling configuration methods include:+--+-- -   @TARGET_TRACKING_SCALING_CPU@ — If the ECS service is configured to+--     use target scaling on CPU, Compute Optimizer doesn\'t generate CPU+--     recommendations.+--+-- -   @TARGET_TRACKING_SCALING_MEMORY@ — If the ECS service is configured+--     to use target scaling on memory, Compute Optimizer doesn\'t generate+--     memory recommendations.+--+-- For more information about step scaling and target scaling, see+-- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html Step scaling policies for Application Auto Scaling>+-- and+-- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html Target tracking scaling policies for Application Auto Scaling>+-- in the /Application Auto Scaling User Guide/.+--+-- 'containerConfigurations', 'serviceConfiguration_containerConfigurations' - The container configurations within a task of an ECS service.+--+-- 'cpu', 'serviceConfiguration_cpu' - The number of CPU units used by the tasks in the ECS service.+--+-- 'memory', 'serviceConfiguration_memory' - The amount of memory used by the tasks in the ECS service.+--+-- 'taskDefinitionArn', 'serviceConfiguration_taskDefinitionArn' - The task definition ARN used by the tasks in the ECS service.+newServiceConfiguration ::+  ServiceConfiguration+newServiceConfiguration =+  ServiceConfiguration'+    { autoScalingConfiguration =+        Prelude.Nothing,+      containerConfigurations = Prelude.Nothing,+      cpu = Prelude.Nothing,+      memory = Prelude.Nothing,+      taskDefinitionArn = Prelude.Nothing+    }++-- | Describes the Auto Scaling configuration methods for an Amazon ECS+-- service. This affects the generated recommendations. For example, if+-- Auto Scaling is configured on a ECS service’s CPU, then Compute+-- Optimizer doesn’t generate CPU size recommendations.+--+-- The Auto Scaling configuration methods include:+--+-- -   @TARGET_TRACKING_SCALING_CPU@ — If the ECS service is configured to+--     use target scaling on CPU, Compute Optimizer doesn\'t generate CPU+--     recommendations.+--+-- -   @TARGET_TRACKING_SCALING_MEMORY@ — If the ECS service is configured+--     to use target scaling on memory, Compute Optimizer doesn\'t generate+--     memory recommendations.+--+-- For more information about step scaling and target scaling, see+-- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html Step scaling policies for Application Auto Scaling>+-- and+-- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html Target tracking scaling policies for Application Auto Scaling>+-- in the /Application Auto Scaling User Guide/.+serviceConfiguration_autoScalingConfiguration :: Lens.Lens' ServiceConfiguration (Prelude.Maybe AutoScalingConfiguration)+serviceConfiguration_autoScalingConfiguration = Lens.lens (\ServiceConfiguration' {autoScalingConfiguration} -> autoScalingConfiguration) (\s@ServiceConfiguration' {} a -> s {autoScalingConfiguration = a} :: ServiceConfiguration)++-- | The container configurations within a task of an ECS service.+serviceConfiguration_containerConfigurations :: Lens.Lens' ServiceConfiguration (Prelude.Maybe [ContainerConfiguration])+serviceConfiguration_containerConfigurations = Lens.lens (\ServiceConfiguration' {containerConfigurations} -> containerConfigurations) (\s@ServiceConfiguration' {} a -> s {containerConfigurations = a} :: ServiceConfiguration) Prelude.. Lens.mapping Lens.coerced++-- | The number of CPU units used by the tasks in the ECS service.+serviceConfiguration_cpu :: Lens.Lens' ServiceConfiguration (Prelude.Maybe Prelude.Int)+serviceConfiguration_cpu = Lens.lens (\ServiceConfiguration' {cpu} -> cpu) (\s@ServiceConfiguration' {} a -> s {cpu = a} :: ServiceConfiguration)++-- | The amount of memory used by the tasks in the ECS service.+serviceConfiguration_memory :: Lens.Lens' ServiceConfiguration (Prelude.Maybe Prelude.Int)+serviceConfiguration_memory = Lens.lens (\ServiceConfiguration' {memory} -> memory) (\s@ServiceConfiguration' {} a -> s {memory = a} :: ServiceConfiguration)++-- | The task definition ARN used by the tasks in the ECS service.+serviceConfiguration_taskDefinitionArn :: Lens.Lens' ServiceConfiguration (Prelude.Maybe Prelude.Text)+serviceConfiguration_taskDefinitionArn = Lens.lens (\ServiceConfiguration' {taskDefinitionArn} -> taskDefinitionArn) (\s@ServiceConfiguration' {} a -> s {taskDefinitionArn = a} :: ServiceConfiguration)++instance Data.FromJSON ServiceConfiguration where+  parseJSON =+    Data.withObject+      "ServiceConfiguration"+      ( \x ->+          ServiceConfiguration'+            Prelude.<$> (x Data..:? "autoScalingConfiguration")+            Prelude.<*> ( x+                            Data..:? "containerConfigurations"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "cpu")+            Prelude.<*> (x Data..:? "memory")+            Prelude.<*> (x Data..:? "taskDefinitionArn")+      )++instance Prelude.Hashable ServiceConfiguration where+  hashWithSalt _salt ServiceConfiguration' {..} =+    _salt+      `Prelude.hashWithSalt` autoScalingConfiguration+      `Prelude.hashWithSalt` containerConfigurations+      `Prelude.hashWithSalt` cpu+      `Prelude.hashWithSalt` memory+      `Prelude.hashWithSalt` taskDefinitionArn++instance Prelude.NFData ServiceConfiguration where+  rnf ServiceConfiguration' {..} =+    Prelude.rnf autoScalingConfiguration+      `Prelude.seq` Prelude.rnf containerConfigurations+      `Prelude.seq` Prelude.rnf cpu+      `Prelude.seq` Prelude.rnf memory+      `Prelude.seq` Prelude.rnf taskDefinitionArn
+ gen/Amazonka/ComputeOptimizer/Types/Status.hs view
@@ -0,0 +1,78 @@+{-# 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.ComputeOptimizer.Types.Status+-- 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.ComputeOptimizer.Types.Status+  ( Status+      ( ..,+        Status_Active,+        Status_Failed,+        Status_Inactive,+        Status_Pending+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Status = Status' {fromStatus :: 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 Status_Active :: Status+pattern Status_Active = Status' "Active"++pattern Status_Failed :: Status+pattern Status_Failed = Status' "Failed"++pattern Status_Inactive :: Status+pattern Status_Inactive = Status' "Inactive"++pattern Status_Pending :: Status+pattern Status_Pending = Status' "Pending"++{-# COMPLETE+  Status_Active,+  Status_Failed,+  Status_Inactive,+  Status_Pending,+  Status'+  #-}
+ gen/Amazonka/ComputeOptimizer/Types/Summary.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.ComputeOptimizer.Types.Summary+-- 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.ComputeOptimizer.Types.Summary where++import Amazonka.ComputeOptimizer.Types.Finding+import Amazonka.ComputeOptimizer.Types.ReasonCodeSummary+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 summary of a recommendation.+--+-- /See:/ 'newSummary' smart constructor.+data Summary = Summary'+  { -- | The finding classification of the recommendation.+    name :: Prelude.Maybe Finding,+    -- | An array of objects that summarize a finding reason code.+    reasonCodeSummaries :: Prelude.Maybe [ReasonCodeSummary],+    -- | The value of the recommendation summary.+    value :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Summary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'summary_name' - The finding classification of the recommendation.+--+-- 'reasonCodeSummaries', 'summary_reasonCodeSummaries' - An array of objects that summarize a finding reason code.+--+-- 'value', 'summary_value' - The value of the recommendation summary.+newSummary ::+  Summary+newSummary =+  Summary'+    { name = Prelude.Nothing,+      reasonCodeSummaries = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The finding classification of the recommendation.+summary_name :: Lens.Lens' Summary (Prelude.Maybe Finding)+summary_name = Lens.lens (\Summary' {name} -> name) (\s@Summary' {} a -> s {name = a} :: Summary)++-- | An array of objects that summarize a finding reason code.+summary_reasonCodeSummaries :: Lens.Lens' Summary (Prelude.Maybe [ReasonCodeSummary])+summary_reasonCodeSummaries = Lens.lens (\Summary' {reasonCodeSummaries} -> reasonCodeSummaries) (\s@Summary' {} a -> s {reasonCodeSummaries = a} :: Summary) Prelude.. Lens.mapping Lens.coerced++-- | The value of the recommendation summary.+summary_value :: Lens.Lens' Summary (Prelude.Maybe Prelude.Double)+summary_value = Lens.lens (\Summary' {value} -> value) (\s@Summary' {} a -> s {value = a} :: Summary)++instance Data.FromJSON Summary where+  parseJSON =+    Data.withObject+      "Summary"+      ( \x ->+          Summary'+            Prelude.<$> (x Data..:? "name")+            Prelude.<*> ( x+                            Data..:? "reasonCodeSummaries"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "value")+      )++instance Prelude.Hashable Summary where+  hashWithSalt _salt Summary' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` reasonCodeSummaries+      `Prelude.hashWithSalt` value++instance Prelude.NFData Summary where+  rnf Summary' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf reasonCodeSummaries+      `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/ComputeOptimizer/Types/UtilizationMetric.hs view
@@ -0,0 +1,421 @@+{-# 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.ComputeOptimizer.Types.UtilizationMetric+-- 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.ComputeOptimizer.Types.UtilizationMetric where++import Amazonka.ComputeOptimizer.Types.MetricName+import Amazonka.ComputeOptimizer.Types.MetricStatistic+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a utilization metric of a resource, such as an Amazon EC2+-- instance.+--+-- Compare the utilization metric data of your resource against its+-- projected utilization metric data to determine the performance+-- difference between your current resource and the recommended option.+--+-- /See:/ 'newUtilizationMetric' smart constructor.+data UtilizationMetric = UtilizationMetric'+  { -- | The name of the utilization metric.+    --+    -- The following utilization metrics are available:+    --+    -- -   @Cpu@ - The percentage of allocated EC2 compute units that are+    --     currently in use on the instance. This metric identifies the+    --     processing power required to run an application on the instance.+    --+    --     Depending on the instance type, tools in your operating system can+    --     show a lower percentage than CloudWatch when the instance is not+    --     allocated a full processor core.+    --+    --     Units: Percent+    --+    -- -   @Memory@ - The percentage of memory that is currently in use on the+    --     instance. This metric identifies the amount of memory required to+    --     run an application on the instance.+    --+    --     Units: Percent+    --+    --     The @Memory@ metric is returned only for resources that have the+    --     unified CloudWatch agent installed on them. For more information,+    --     see+    --     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+    --+    -- -   @EBS_READ_OPS_PER_SECOND@ - The completed read operations from all+    --     EBS volumes attached to the instance in a specified period of time.+    --+    --     Unit: Count+    --+    -- -   @EBS_WRITE_OPS_PER_SECOND@ - The completed write operations to all+    --     EBS volumes attached to the instance in a specified period of time.+    --+    --     Unit: Count+    --+    -- -   @EBS_READ_BYTES_PER_SECOND@ - The bytes read from all EBS volumes+    --     attached to the instance in a specified period of time.+    --+    --     Unit: Bytes+    --+    -- -   @EBS_WRITE_BYTES_PER_SECOND@ - The bytes written to all EBS volumes+    --     attached to the instance in a specified period of time.+    --+    --     Unit: Bytes+    --+    -- -   @DISK_READ_OPS_PER_SECOND@ - The completed read operations from all+    --     instance store volumes available to the instance in a specified+    --     period of time.+    --+    --     If there are no instance store volumes, either the value is @0@ or+    --     the metric is not reported.+    --+    -- -   @DISK_WRITE_OPS_PER_SECOND@ - The completed write operations from+    --     all instance store volumes available to the instance in a specified+    --     period of time.+    --+    --     If there are no instance store volumes, either the value is @0@ or+    --     the metric is not reported.+    --+    -- -   @DISK_READ_BYTES_PER_SECOND@ - The bytes read from all instance+    --     store volumes available to the instance. This metric is used to+    --     determine the volume of the data the application reads from the disk+    --     of the instance. This can be used to determine the speed of the+    --     application.+    --+    --     If there are no instance store volumes, either the value is @0@ or+    --     the metric is not reported.+    --+    -- -   @DISK_WRITE_BYTES_PER_SECOND@ - The bytes written to all instance+    --     store volumes available to the instance. This metric is used to+    --     determine the volume of the data the application writes onto the+    --     disk of the instance. This can be used to determine the speed of the+    --     application.+    --+    --     If there are no instance store volumes, either the value is @0@ or+    --     the metric is not reported.+    --+    -- -   @NETWORK_IN_BYTES_PER_SECOND@ - The number of bytes received by the+    --     instance on all network interfaces. This metric identifies the+    --     volume of incoming network traffic to a single instance.+    --+    -- -   @NETWORK_OUT_BYTES_PER_SECOND@ - The number of bytes sent out by the+    --     instance on all network interfaces. This metric identifies the+    --     volume of outgoing network traffic from a single instance.+    --+    -- -   @NETWORK_PACKETS_IN_PER_SECOND@ - The number of packets received by+    --     the instance on all network interfaces. This metric identifies the+    --     volume of incoming traffic in terms of the number of packets on a+    --     single instance.+    --+    -- -   @NETWORK_PACKETS_OUT_PER_SECOND@ - The number of packets sent out by+    --     the instance on all network interfaces. This metric identifies the+    --     volume of outgoing traffic in terms of the number of packets on a+    --     single instance.+    name :: Prelude.Maybe MetricName,+    -- | The statistic of the utilization metric.+    --+    -- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+    -- utilization metrics using only the @Maximum@ statistic, which is the+    -- highest value observed during the specified period.+    --+    -- The Compute Optimizer console displays graphs for some utilization+    -- metrics using the @Average@ statistic, which is the value of @Sum@ \/+    -- @SampleCount@ during the specified period. For more information, see+    -- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+    -- in the /Compute Optimizer User Guide/. You can also get averaged+    -- utilization metric data for your resources using Amazon CloudWatch. For+    -- more information, see the+    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+    statistic :: Prelude.Maybe MetricStatistic,+    -- | The value of the utilization metric.+    value :: Prelude.Maybe Prelude.Double+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UtilizationMetric' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'utilizationMetric_name' - The name of the utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @Cpu@ - The percentage of allocated EC2 compute units that are+--     currently in use on the instance. This metric identifies the+--     processing power required to run an application on the instance.+--+--     Depending on the instance type, tools in your operating system can+--     show a lower percentage than CloudWatch when the instance is not+--     allocated a full processor core.+--+--     Units: Percent+--+-- -   @Memory@ - The percentage of memory that is currently in use on the+--     instance. This metric identifies the amount of memory required to+--     run an application on the instance.+--+--     Units: Percent+--+--     The @Memory@ metric is returned only for resources that have the+--     unified CloudWatch agent installed on them. For more information,+--     see+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+--+-- -   @EBS_READ_OPS_PER_SECOND@ - The completed read operations from all+--     EBS volumes attached to the instance in a specified period of time.+--+--     Unit: Count+--+-- -   @EBS_WRITE_OPS_PER_SECOND@ - The completed write operations to all+--     EBS volumes attached to the instance in a specified period of time.+--+--     Unit: Count+--+-- -   @EBS_READ_BYTES_PER_SECOND@ - The bytes read from all EBS volumes+--     attached to the instance in a specified period of time.+--+--     Unit: Bytes+--+-- -   @EBS_WRITE_BYTES_PER_SECOND@ - The bytes written to all EBS volumes+--     attached to the instance in a specified period of time.+--+--     Unit: Bytes+--+-- -   @DISK_READ_OPS_PER_SECOND@ - The completed read operations from all+--     instance store volumes available to the instance in a specified+--     period of time.+--+--     If there are no instance store volumes, either the value is @0@ or+--     the metric is not reported.+--+-- -   @DISK_WRITE_OPS_PER_SECOND@ - The completed write operations from+--     all instance store volumes available to the instance in a specified+--     period of time.+--+--     If there are no instance store volumes, either the value is @0@ or+--     the metric is not reported.+--+-- -   @DISK_READ_BYTES_PER_SECOND@ - The bytes read from all instance+--     store volumes available to the instance. This metric is used to+--     determine the volume of the data the application reads from the disk+--     of the instance. This can be used to determine the speed of the+--     application.+--+--     If there are no instance store volumes, either the value is @0@ or+--     the metric is not reported.+--+-- -   @DISK_WRITE_BYTES_PER_SECOND@ - The bytes written to all instance+--     store volumes available to the instance. This metric is used to+--     determine the volume of the data the application writes onto the+--     disk of the instance. This can be used to determine the speed of the+--     application.+--+--     If there are no instance store volumes, either the value is @0@ or+--     the metric is not reported.+--+-- -   @NETWORK_IN_BYTES_PER_SECOND@ - The number of bytes received by the+--     instance on all network interfaces. This metric identifies the+--     volume of incoming network traffic to a single instance.+--+-- -   @NETWORK_OUT_BYTES_PER_SECOND@ - The number of bytes sent out by the+--     instance on all network interfaces. This metric identifies the+--     volume of outgoing network traffic from a single instance.+--+-- -   @NETWORK_PACKETS_IN_PER_SECOND@ - The number of packets received by+--     the instance on all network interfaces. This metric identifies the+--     volume of incoming traffic in terms of the number of packets on a+--     single instance.+--+-- -   @NETWORK_PACKETS_OUT_PER_SECOND@ - The number of packets sent out by+--     the instance on all network interfaces. This metric identifies the+--     volume of outgoing traffic in terms of the number of packets on a+--     single instance.+--+-- 'statistic', 'utilizationMetric_statistic' - The statistic of the utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+--+-- 'value', 'utilizationMetric_value' - The value of the utilization metric.+newUtilizationMetric ::+  UtilizationMetric+newUtilizationMetric =+  UtilizationMetric'+    { name = Prelude.Nothing,+      statistic = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The name of the utilization metric.+--+-- The following utilization metrics are available:+--+-- -   @Cpu@ - The percentage of allocated EC2 compute units that are+--     currently in use on the instance. This metric identifies the+--     processing power required to run an application on the instance.+--+--     Depending on the instance type, tools in your operating system can+--     show a lower percentage than CloudWatch when the instance is not+--     allocated a full processor core.+--+--     Units: Percent+--+-- -   @Memory@ - The percentage of memory that is currently in use on the+--     instance. This metric identifies the amount of memory required to+--     run an application on the instance.+--+--     Units: Percent+--+--     The @Memory@ metric is returned only for resources that have the+--     unified CloudWatch agent installed on them. For more information,+--     see+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent Enabling Memory Utilization with the CloudWatch Agent>.+--+-- -   @EBS_READ_OPS_PER_SECOND@ - The completed read operations from all+--     EBS volumes attached to the instance in a specified period of time.+--+--     Unit: Count+--+-- -   @EBS_WRITE_OPS_PER_SECOND@ - The completed write operations to all+--     EBS volumes attached to the instance in a specified period of time.+--+--     Unit: Count+--+-- -   @EBS_READ_BYTES_PER_SECOND@ - The bytes read from all EBS volumes+--     attached to the instance in a specified period of time.+--+--     Unit: Bytes+--+-- -   @EBS_WRITE_BYTES_PER_SECOND@ - The bytes written to all EBS volumes+--     attached to the instance in a specified period of time.+--+--     Unit: Bytes+--+-- -   @DISK_READ_OPS_PER_SECOND@ - The completed read operations from all+--     instance store volumes available to the instance in a specified+--     period of time.+--+--     If there are no instance store volumes, either the value is @0@ or+--     the metric is not reported.+--+-- -   @DISK_WRITE_OPS_PER_SECOND@ - The completed write operations from+--     all instance store volumes available to the instance in a specified+--     period of time.+--+--     If there are no instance store volumes, either the value is @0@ or+--     the metric is not reported.+--+-- -   @DISK_READ_BYTES_PER_SECOND@ - The bytes read from all instance+--     store volumes available to the instance. This metric is used to+--     determine the volume of the data the application reads from the disk+--     of the instance. This can be used to determine the speed of the+--     application.+--+--     If there are no instance store volumes, either the value is @0@ or+--     the metric is not reported.+--+-- -   @DISK_WRITE_BYTES_PER_SECOND@ - The bytes written to all instance+--     store volumes available to the instance. This metric is used to+--     determine the volume of the data the application writes onto the+--     disk of the instance. This can be used to determine the speed of the+--     application.+--+--     If there are no instance store volumes, either the value is @0@ or+--     the metric is not reported.+--+-- -   @NETWORK_IN_BYTES_PER_SECOND@ - The number of bytes received by the+--     instance on all network interfaces. This metric identifies the+--     volume of incoming network traffic to a single instance.+--+-- -   @NETWORK_OUT_BYTES_PER_SECOND@ - The number of bytes sent out by the+--     instance on all network interfaces. This metric identifies the+--     volume of outgoing network traffic from a single instance.+--+-- -   @NETWORK_PACKETS_IN_PER_SECOND@ - The number of packets received by+--     the instance on all network interfaces. This metric identifies the+--     volume of incoming traffic in terms of the number of packets on a+--     single instance.+--+-- -   @NETWORK_PACKETS_OUT_PER_SECOND@ - The number of packets sent out by+--     the instance on all network interfaces. This metric identifies the+--     volume of outgoing traffic in terms of the number of packets on a+--     single instance.+utilizationMetric_name :: Lens.Lens' UtilizationMetric (Prelude.Maybe MetricName)+utilizationMetric_name = Lens.lens (\UtilizationMetric' {name} -> name) (\s@UtilizationMetric' {} a -> s {name = a} :: UtilizationMetric)++-- | The statistic of the utilization metric.+--+-- The Compute Optimizer API, Command Line Interface (CLI), and SDKs return+-- utilization metrics using only the @Maximum@ statistic, which is the+-- highest value observed during the specified period.+--+-- The Compute Optimizer console displays graphs for some utilization+-- metrics using the @Average@ statistic, which is the value of @Sum@ \/+-- @SampleCount@ during the specified period. For more information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html Viewing resource recommendations>+-- in the /Compute Optimizer User Guide/. You can also get averaged+-- utilization metric data for your resources using Amazon CloudWatch. For+-- more information, see the+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.+utilizationMetric_statistic :: Lens.Lens' UtilizationMetric (Prelude.Maybe MetricStatistic)+utilizationMetric_statistic = Lens.lens (\UtilizationMetric' {statistic} -> statistic) (\s@UtilizationMetric' {} a -> s {statistic = a} :: UtilizationMetric)++-- | The value of the utilization metric.+utilizationMetric_value :: Lens.Lens' UtilizationMetric (Prelude.Maybe Prelude.Double)+utilizationMetric_value = Lens.lens (\UtilizationMetric' {value} -> value) (\s@UtilizationMetric' {} a -> s {value = a} :: UtilizationMetric)++instance Data.FromJSON UtilizationMetric where+  parseJSON =+    Data.withObject+      "UtilizationMetric"+      ( \x ->+          UtilizationMetric'+            Prelude.<$> (x Data..:? "name")+            Prelude.<*> (x Data..:? "statistic")+            Prelude.<*> (x Data..:? "value")+      )++instance Prelude.Hashable UtilizationMetric where+  hashWithSalt _salt UtilizationMetric' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` statistic+      `Prelude.hashWithSalt` value++instance Prelude.NFData UtilizationMetric where+  rnf UtilizationMetric' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf statistic+      `Prelude.seq` Prelude.rnf value
+ gen/Amazonka/ComputeOptimizer/Types/VolumeConfiguration.hs view
@@ -0,0 +1,146 @@+{-# 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.ComputeOptimizer.Types.VolumeConfiguration+-- 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.ComputeOptimizer.Types.VolumeConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes the configuration of an Amazon Elastic Block Store (Amazon+-- EBS) volume.+--+-- /See:/ 'newVolumeConfiguration' smart constructor.+data VolumeConfiguration = VolumeConfiguration'+  { -- | The baseline IOPS of the volume.+    volumeBaselineIOPS :: Prelude.Maybe Prelude.Int,+    -- | The baseline throughput of the volume.+    volumeBaselineThroughput :: Prelude.Maybe Prelude.Int,+    -- | The burst IOPS of the volume.+    volumeBurstIOPS :: Prelude.Maybe Prelude.Int,+    -- | The burst throughput of the volume.+    volumeBurstThroughput :: Prelude.Maybe Prelude.Int,+    -- | The size of the volume, in GiB.+    volumeSize :: Prelude.Maybe Prelude.Int,+    -- | The volume type.+    --+    -- This can be @gp2@ for General Purpose SSD, @io1@ or @io2@ for+    -- Provisioned IOPS SSD, @st1@ for Throughput Optimized HDD, @sc1@ for Cold+    -- HDD, or @standard@ for Magnetic volumes.+    volumeType :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VolumeConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'volumeBaselineIOPS', 'volumeConfiguration_volumeBaselineIOPS' - The baseline IOPS of the volume.+--+-- 'volumeBaselineThroughput', 'volumeConfiguration_volumeBaselineThroughput' - The baseline throughput of the volume.+--+-- 'volumeBurstIOPS', 'volumeConfiguration_volumeBurstIOPS' - The burst IOPS of the volume.+--+-- 'volumeBurstThroughput', 'volumeConfiguration_volumeBurstThroughput' - The burst throughput of the volume.+--+-- 'volumeSize', 'volumeConfiguration_volumeSize' - The size of the volume, in GiB.+--+-- 'volumeType', 'volumeConfiguration_volumeType' - The volume type.+--+-- This can be @gp2@ for General Purpose SSD, @io1@ or @io2@ for+-- Provisioned IOPS SSD, @st1@ for Throughput Optimized HDD, @sc1@ for Cold+-- HDD, or @standard@ for Magnetic volumes.+newVolumeConfiguration ::+  VolumeConfiguration+newVolumeConfiguration =+  VolumeConfiguration'+    { volumeBaselineIOPS =+        Prelude.Nothing,+      volumeBaselineThroughput = Prelude.Nothing,+      volumeBurstIOPS = Prelude.Nothing,+      volumeBurstThroughput = Prelude.Nothing,+      volumeSize = Prelude.Nothing,+      volumeType = Prelude.Nothing+    }++-- | The baseline IOPS of the volume.+volumeConfiguration_volumeBaselineIOPS :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)+volumeConfiguration_volumeBaselineIOPS = Lens.lens (\VolumeConfiguration' {volumeBaselineIOPS} -> volumeBaselineIOPS) (\s@VolumeConfiguration' {} a -> s {volumeBaselineIOPS = a} :: VolumeConfiguration)++-- | The baseline throughput of the volume.+volumeConfiguration_volumeBaselineThroughput :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)+volumeConfiguration_volumeBaselineThroughput = Lens.lens (\VolumeConfiguration' {volumeBaselineThroughput} -> volumeBaselineThroughput) (\s@VolumeConfiguration' {} a -> s {volumeBaselineThroughput = a} :: VolumeConfiguration)++-- | The burst IOPS of the volume.+volumeConfiguration_volumeBurstIOPS :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)+volumeConfiguration_volumeBurstIOPS = Lens.lens (\VolumeConfiguration' {volumeBurstIOPS} -> volumeBurstIOPS) (\s@VolumeConfiguration' {} a -> s {volumeBurstIOPS = a} :: VolumeConfiguration)++-- | The burst throughput of the volume.+volumeConfiguration_volumeBurstThroughput :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)+volumeConfiguration_volumeBurstThroughput = Lens.lens (\VolumeConfiguration' {volumeBurstThroughput} -> volumeBurstThroughput) (\s@VolumeConfiguration' {} a -> s {volumeBurstThroughput = a} :: VolumeConfiguration)++-- | The size of the volume, in GiB.+volumeConfiguration_volumeSize :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)+volumeConfiguration_volumeSize = Lens.lens (\VolumeConfiguration' {volumeSize} -> volumeSize) (\s@VolumeConfiguration' {} a -> s {volumeSize = a} :: VolumeConfiguration)++-- | The volume type.+--+-- This can be @gp2@ for General Purpose SSD, @io1@ or @io2@ for+-- Provisioned IOPS SSD, @st1@ for Throughput Optimized HDD, @sc1@ for Cold+-- HDD, or @standard@ for Magnetic volumes.+volumeConfiguration_volumeType :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Text)+volumeConfiguration_volumeType = Lens.lens (\VolumeConfiguration' {volumeType} -> volumeType) (\s@VolumeConfiguration' {} a -> s {volumeType = a} :: VolumeConfiguration)++instance Data.FromJSON VolumeConfiguration where+  parseJSON =+    Data.withObject+      "VolumeConfiguration"+      ( \x ->+          VolumeConfiguration'+            Prelude.<$> (x Data..:? "volumeBaselineIOPS")+            Prelude.<*> (x Data..:? "volumeBaselineThroughput")+            Prelude.<*> (x Data..:? "volumeBurstIOPS")+            Prelude.<*> (x Data..:? "volumeBurstThroughput")+            Prelude.<*> (x Data..:? "volumeSize")+            Prelude.<*> (x Data..:? "volumeType")+      )++instance Prelude.Hashable VolumeConfiguration where+  hashWithSalt _salt VolumeConfiguration' {..} =+    _salt+      `Prelude.hashWithSalt` volumeBaselineIOPS+      `Prelude.hashWithSalt` volumeBaselineThroughput+      `Prelude.hashWithSalt` volumeBurstIOPS+      `Prelude.hashWithSalt` volumeBurstThroughput+      `Prelude.hashWithSalt` volumeSize+      `Prelude.hashWithSalt` volumeType++instance Prelude.NFData VolumeConfiguration where+  rnf VolumeConfiguration' {..} =+    Prelude.rnf volumeBaselineIOPS+      `Prelude.seq` Prelude.rnf volumeBaselineThroughput+      `Prelude.seq` Prelude.rnf volumeBurstIOPS+      `Prelude.seq` Prelude.rnf volumeBurstThroughput+      `Prelude.seq` Prelude.rnf volumeSize+      `Prelude.seq` Prelude.rnf volumeType
+ gen/Amazonka/ComputeOptimizer/Types/VolumeRecommendation.hs view
@@ -0,0 +1,231 @@+{-# 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.ComputeOptimizer.Types.VolumeRecommendation+-- 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.ComputeOptimizer.Types.VolumeRecommendation where++import Amazonka.ComputeOptimizer.Types.CurrentPerformanceRisk+import Amazonka.ComputeOptimizer.Types.EBSFinding+import Amazonka.ComputeOptimizer.Types.EBSUtilizationMetric+import Amazonka.ComputeOptimizer.Types.VolumeConfiguration+import Amazonka.ComputeOptimizer.Types.VolumeRecommendationOption+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes an Amazon Elastic Block Store (Amazon EBS) volume+-- recommendation.+--+-- /See:/ 'newVolumeRecommendation' smart constructor.+data VolumeRecommendation = VolumeRecommendation'+  { -- | The Amazon Web Services account ID of the volume.+    accountId :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that describe the current configuration of the+    -- volume.+    currentConfiguration :: Prelude.Maybe VolumeConfiguration,+    -- | The risk of the current EBS volume not meeting the performance needs of+    -- its workloads. The higher the risk, the more likely the current EBS+    -- volume doesn\'t have sufficient capacity.+    currentPerformanceRisk :: Prelude.Maybe CurrentPerformanceRisk,+    -- | The finding classification of the volume.+    --+    -- Findings for volumes include:+    --+    -- -   __@NotOptimized@__ —A volume is considered not optimized when+    --     Compute Optimizer identifies a recommendation that can provide+    --     better performance for your workload.+    --+    -- -   __@Optimized@__ —An volume is considered optimized when Compute+    --     Optimizer determines that the volume is correctly provisioned to run+    --     your workload based on the chosen volume type. For optimized+    --     resources, Compute Optimizer might recommend a new generation volume+    --     type.+    finding :: Prelude.Maybe EBSFinding,+    -- | The timestamp of when the volume recommendation was last generated.+    lastRefreshTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The number of days for which utilization metrics were analyzed for the+    -- volume.+    lookBackPeriodInDays :: Prelude.Maybe Prelude.Double,+    -- | An array of objects that describe the utilization metrics of the volume.+    utilizationMetrics :: Prelude.Maybe [EBSUtilizationMetric],+    -- | The Amazon Resource Name (ARN) of the current volume.+    volumeArn :: Prelude.Maybe Prelude.Text,+    -- | An array of objects that describe the recommendation options for the+    -- volume.+    volumeRecommendationOptions :: Prelude.Maybe [VolumeRecommendationOption]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VolumeRecommendation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.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', 'volumeRecommendation_accountId' - The Amazon Web Services account ID of the volume.+--+-- 'currentConfiguration', 'volumeRecommendation_currentConfiguration' - An array of objects that describe the current configuration of the+-- volume.+--+-- 'currentPerformanceRisk', 'volumeRecommendation_currentPerformanceRisk' - The risk of the current EBS volume not meeting the performance needs of+-- its workloads. The higher the risk, the more likely the current EBS+-- volume doesn\'t have sufficient capacity.+--+-- 'finding', 'volumeRecommendation_finding' - The finding classification of the volume.+--+-- Findings for volumes include:+--+-- -   __@NotOptimized@__ —A volume is considered not optimized when+--     Compute Optimizer identifies a recommendation that can provide+--     better performance for your workload.+--+-- -   __@Optimized@__ —An volume is considered optimized when Compute+--     Optimizer determines that the volume is correctly provisioned to run+--     your workload based on the chosen volume type. For optimized+--     resources, Compute Optimizer might recommend a new generation volume+--     type.+--+-- 'lastRefreshTimestamp', 'volumeRecommendation_lastRefreshTimestamp' - The timestamp of when the volume recommendation was last generated.+--+-- 'lookBackPeriodInDays', 'volumeRecommendation_lookBackPeriodInDays' - The number of days for which utilization metrics were analyzed for the+-- volume.+--+-- 'utilizationMetrics', 'volumeRecommendation_utilizationMetrics' - An array of objects that describe the utilization metrics of the volume.+--+-- 'volumeArn', 'volumeRecommendation_volumeArn' - The Amazon Resource Name (ARN) of the current volume.+--+-- 'volumeRecommendationOptions', 'volumeRecommendation_volumeRecommendationOptions' - An array of objects that describe the recommendation options for the+-- volume.+newVolumeRecommendation ::+  VolumeRecommendation+newVolumeRecommendation =+  VolumeRecommendation'+    { accountId = Prelude.Nothing,+      currentConfiguration = Prelude.Nothing,+      currentPerformanceRisk = Prelude.Nothing,+      finding = Prelude.Nothing,+      lastRefreshTimestamp = Prelude.Nothing,+      lookBackPeriodInDays = Prelude.Nothing,+      utilizationMetrics = Prelude.Nothing,+      volumeArn = Prelude.Nothing,+      volumeRecommendationOptions = Prelude.Nothing+    }++-- | The Amazon Web Services account ID of the volume.+volumeRecommendation_accountId :: Lens.Lens' VolumeRecommendation (Prelude.Maybe Prelude.Text)+volumeRecommendation_accountId = Lens.lens (\VolumeRecommendation' {accountId} -> accountId) (\s@VolumeRecommendation' {} a -> s {accountId = a} :: VolumeRecommendation)++-- | An array of objects that describe the current configuration of the+-- volume.+volumeRecommendation_currentConfiguration :: Lens.Lens' VolumeRecommendation (Prelude.Maybe VolumeConfiguration)+volumeRecommendation_currentConfiguration = Lens.lens (\VolumeRecommendation' {currentConfiguration} -> currentConfiguration) (\s@VolumeRecommendation' {} a -> s {currentConfiguration = a} :: VolumeRecommendation)++-- | The risk of the current EBS volume not meeting the performance needs of+-- its workloads. The higher the risk, the more likely the current EBS+-- volume doesn\'t have sufficient capacity.+volumeRecommendation_currentPerformanceRisk :: Lens.Lens' VolumeRecommendation (Prelude.Maybe CurrentPerformanceRisk)+volumeRecommendation_currentPerformanceRisk = Lens.lens (\VolumeRecommendation' {currentPerformanceRisk} -> currentPerformanceRisk) (\s@VolumeRecommendation' {} a -> s {currentPerformanceRisk = a} :: VolumeRecommendation)++-- | The finding classification of the volume.+--+-- Findings for volumes include:+--+-- -   __@NotOptimized@__ —A volume is considered not optimized when+--     Compute Optimizer identifies a recommendation that can provide+--     better performance for your workload.+--+-- -   __@Optimized@__ —An volume is considered optimized when Compute+--     Optimizer determines that the volume is correctly provisioned to run+--     your workload based on the chosen volume type. For optimized+--     resources, Compute Optimizer might recommend a new generation volume+--     type.+volumeRecommendation_finding :: Lens.Lens' VolumeRecommendation (Prelude.Maybe EBSFinding)+volumeRecommendation_finding = Lens.lens (\VolumeRecommendation' {finding} -> finding) (\s@VolumeRecommendation' {} a -> s {finding = a} :: VolumeRecommendation)++-- | The timestamp of when the volume recommendation was last generated.+volumeRecommendation_lastRefreshTimestamp :: Lens.Lens' VolumeRecommendation (Prelude.Maybe Prelude.UTCTime)+volumeRecommendation_lastRefreshTimestamp = Lens.lens (\VolumeRecommendation' {lastRefreshTimestamp} -> lastRefreshTimestamp) (\s@VolumeRecommendation' {} a -> s {lastRefreshTimestamp = a} :: VolumeRecommendation) Prelude.. Lens.mapping Data._Time++-- | The number of days for which utilization metrics were analyzed for the+-- volume.+volumeRecommendation_lookBackPeriodInDays :: Lens.Lens' VolumeRecommendation (Prelude.Maybe Prelude.Double)+volumeRecommendation_lookBackPeriodInDays = Lens.lens (\VolumeRecommendation' {lookBackPeriodInDays} -> lookBackPeriodInDays) (\s@VolumeRecommendation' {} a -> s {lookBackPeriodInDays = a} :: VolumeRecommendation)++-- | An array of objects that describe the utilization metrics of the volume.+volumeRecommendation_utilizationMetrics :: Lens.Lens' VolumeRecommendation (Prelude.Maybe [EBSUtilizationMetric])+volumeRecommendation_utilizationMetrics = Lens.lens (\VolumeRecommendation' {utilizationMetrics} -> utilizationMetrics) (\s@VolumeRecommendation' {} a -> s {utilizationMetrics = a} :: VolumeRecommendation) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the current volume.+volumeRecommendation_volumeArn :: Lens.Lens' VolumeRecommendation (Prelude.Maybe Prelude.Text)+volumeRecommendation_volumeArn = Lens.lens (\VolumeRecommendation' {volumeArn} -> volumeArn) (\s@VolumeRecommendation' {} a -> s {volumeArn = a} :: VolumeRecommendation)++-- | An array of objects that describe the recommendation options for the+-- volume.+volumeRecommendation_volumeRecommendationOptions :: Lens.Lens' VolumeRecommendation (Prelude.Maybe [VolumeRecommendationOption])+volumeRecommendation_volumeRecommendationOptions = Lens.lens (\VolumeRecommendation' {volumeRecommendationOptions} -> volumeRecommendationOptions) (\s@VolumeRecommendation' {} a -> s {volumeRecommendationOptions = a} :: VolumeRecommendation) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON VolumeRecommendation where+  parseJSON =+    Data.withObject+      "VolumeRecommendation"+      ( \x ->+          VolumeRecommendation'+            Prelude.<$> (x Data..:? "accountId")+            Prelude.<*> (x Data..:? "currentConfiguration")+            Prelude.<*> (x Data..:? "currentPerformanceRisk")+            Prelude.<*> (x Data..:? "finding")+            Prelude.<*> (x Data..:? "lastRefreshTimestamp")+            Prelude.<*> (x Data..:? "lookBackPeriodInDays")+            Prelude.<*> ( x+                            Data..:? "utilizationMetrics"+                            Data..!= Prelude.mempty+                        )+            Prelude.<*> (x Data..:? "volumeArn")+            Prelude.<*> ( x+                            Data..:? "volumeRecommendationOptions"+                            Data..!= Prelude.mempty+                        )+      )++instance Prelude.Hashable VolumeRecommendation where+  hashWithSalt _salt VolumeRecommendation' {..} =+    _salt+      `Prelude.hashWithSalt` accountId+      `Prelude.hashWithSalt` currentConfiguration+      `Prelude.hashWithSalt` currentPerformanceRisk+      `Prelude.hashWithSalt` finding+      `Prelude.hashWithSalt` lastRefreshTimestamp+      `Prelude.hashWithSalt` lookBackPeriodInDays+      `Prelude.hashWithSalt` utilizationMetrics+      `Prelude.hashWithSalt` volumeArn+      `Prelude.hashWithSalt` volumeRecommendationOptions++instance Prelude.NFData VolumeRecommendation where+  rnf VolumeRecommendation' {..} =+    Prelude.rnf accountId+      `Prelude.seq` Prelude.rnf currentConfiguration+      `Prelude.seq` Prelude.rnf currentPerformanceRisk+      `Prelude.seq` Prelude.rnf finding+      `Prelude.seq` Prelude.rnf lastRefreshTimestamp+      `Prelude.seq` Prelude.rnf lookBackPeriodInDays+      `Prelude.seq` Prelude.rnf utilizationMetrics+      `Prelude.seq` Prelude.rnf volumeArn+      `Prelude.seq` Prelude.rnf volumeRecommendationOptions
+ gen/Amazonka/ComputeOptimizer/Types/VolumeRecommendationOption.hs view
@@ -0,0 +1,151 @@+{-# 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.ComputeOptimizer.Types.VolumeRecommendationOption+-- 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.ComputeOptimizer.Types.VolumeRecommendationOption where++import Amazonka.ComputeOptimizer.Types.SavingsOpportunity+import Amazonka.ComputeOptimizer.Types.VolumeConfiguration+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Describes a recommendation option for an Amazon Elastic Block Store+-- (Amazon EBS) instance.+--+-- /See:/ 'newVolumeRecommendationOption' smart constructor.+data VolumeRecommendationOption = VolumeRecommendationOption'+  { -- | An array of objects that describe a volume configuration.+    configuration :: Prelude.Maybe VolumeConfiguration,+    -- | The performance risk of the volume recommendation option.+    --+    -- Performance risk is the likelihood of the recommended volume type+    -- meeting the performance requirement of your workload.+    --+    -- The value ranges from @0@ - @4@, with @0@ meaning that the recommended+    -- resource is predicted to always provide enough hardware capability. The+    -- higher the performance risk is, the more likely you should validate+    -- whether the recommendation will meet the performance requirements of+    -- your workload before migrating your resource.+    performanceRisk :: Prelude.Maybe Prelude.Double,+    -- | The rank of the volume recommendation option.+    --+    -- The top recommendation option is ranked as @1@.+    rank :: Prelude.Maybe Prelude.Int,+    -- | An object that describes the savings opportunity for the EBS volume+    -- recommendation option. Savings opportunity includes the estimated+    -- monthly savings amount and percentage.+    savingsOpportunity :: Prelude.Maybe SavingsOpportunity+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VolumeRecommendationOption' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'configuration', 'volumeRecommendationOption_configuration' - An array of objects that describe a volume configuration.+--+-- 'performanceRisk', 'volumeRecommendationOption_performanceRisk' - The performance risk of the volume recommendation option.+--+-- Performance risk is the likelihood of the recommended volume type+-- meeting the performance requirement of your workload.+--+-- The value ranges from @0@ - @4@, with @0@ meaning that the recommended+-- resource is predicted to always provide enough hardware capability. The+-- higher the performance risk is, the more likely you should validate+-- whether the recommendation will meet the performance requirements of+-- your workload before migrating your resource.+--+-- 'rank', 'volumeRecommendationOption_rank' - The rank of the volume recommendation option.+--+-- The top recommendation option is ranked as @1@.+--+-- 'savingsOpportunity', 'volumeRecommendationOption_savingsOpportunity' - An object that describes the savings opportunity for the EBS volume+-- recommendation option. Savings opportunity includes the estimated+-- monthly savings amount and percentage.+newVolumeRecommendationOption ::+  VolumeRecommendationOption+newVolumeRecommendationOption =+  VolumeRecommendationOption'+    { configuration =+        Prelude.Nothing,+      performanceRisk = Prelude.Nothing,+      rank = Prelude.Nothing,+      savingsOpportunity = Prelude.Nothing+    }++-- | An array of objects that describe a volume configuration.+volumeRecommendationOption_configuration :: Lens.Lens' VolumeRecommendationOption (Prelude.Maybe VolumeConfiguration)+volumeRecommendationOption_configuration = Lens.lens (\VolumeRecommendationOption' {configuration} -> configuration) (\s@VolumeRecommendationOption' {} a -> s {configuration = a} :: VolumeRecommendationOption)++-- | The performance risk of the volume recommendation option.+--+-- Performance risk is the likelihood of the recommended volume type+-- meeting the performance requirement of your workload.+--+-- The value ranges from @0@ - @4@, with @0@ meaning that the recommended+-- resource is predicted to always provide enough hardware capability. The+-- higher the performance risk is, the more likely you should validate+-- whether the recommendation will meet the performance requirements of+-- your workload before migrating your resource.+volumeRecommendationOption_performanceRisk :: Lens.Lens' VolumeRecommendationOption (Prelude.Maybe Prelude.Double)+volumeRecommendationOption_performanceRisk = Lens.lens (\VolumeRecommendationOption' {performanceRisk} -> performanceRisk) (\s@VolumeRecommendationOption' {} a -> s {performanceRisk = a} :: VolumeRecommendationOption)++-- | The rank of the volume recommendation option.+--+-- The top recommendation option is ranked as @1@.+volumeRecommendationOption_rank :: Lens.Lens' VolumeRecommendationOption (Prelude.Maybe Prelude.Int)+volumeRecommendationOption_rank = Lens.lens (\VolumeRecommendationOption' {rank} -> rank) (\s@VolumeRecommendationOption' {} a -> s {rank = a} :: VolumeRecommendationOption)++-- | An object that describes the savings opportunity for the EBS volume+-- recommendation option. Savings opportunity includes the estimated+-- monthly savings amount and percentage.+volumeRecommendationOption_savingsOpportunity :: Lens.Lens' VolumeRecommendationOption (Prelude.Maybe SavingsOpportunity)+volumeRecommendationOption_savingsOpportunity = Lens.lens (\VolumeRecommendationOption' {savingsOpportunity} -> savingsOpportunity) (\s@VolumeRecommendationOption' {} a -> s {savingsOpportunity = a} :: VolumeRecommendationOption)++instance Data.FromJSON VolumeRecommendationOption where+  parseJSON =+    Data.withObject+      "VolumeRecommendationOption"+      ( \x ->+          VolumeRecommendationOption'+            Prelude.<$> (x Data..:? "configuration")+            Prelude.<*> (x Data..:? "performanceRisk")+            Prelude.<*> (x Data..:? "rank")+            Prelude.<*> (x Data..:? "savingsOpportunity")+      )++instance Prelude.Hashable VolumeRecommendationOption where+  hashWithSalt _salt VolumeRecommendationOption' {..} =+    _salt+      `Prelude.hashWithSalt` configuration+      `Prelude.hashWithSalt` performanceRisk+      `Prelude.hashWithSalt` rank+      `Prelude.hashWithSalt` savingsOpportunity++instance Prelude.NFData VolumeRecommendationOption where+  rnf VolumeRecommendationOption' {..} =+    Prelude.rnf configuration+      `Prelude.seq` Prelude.rnf performanceRisk+      `Prelude.seq` Prelude.rnf rank+      `Prelude.seq` Prelude.rnf savingsOpportunity
+ gen/Amazonka/ComputeOptimizer/UpdateEnrollmentStatus.hs view
@@ -0,0 +1,279 @@+{-# 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.ComputeOptimizer.UpdateEnrollmentStatus+-- 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 enrollment (opt in and opt out) status of an account to the+-- Compute Optimizer service.+--+-- If the account is a management account of an organization, this action+-- can also be used to enroll member accounts of the organization.+--+-- You must have the appropriate permissions to opt in to Compute+-- Optimizer, to view its recommendations, and to opt out. For more+-- information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/security-iam.html Controlling access with Amazon Web Services Identity and Access Management>+-- in the /Compute Optimizer User Guide/.+--+-- When you opt in, Compute Optimizer automatically creates a+-- service-linked role in your account to access its data. For more+-- information, see+-- <https://docs.aws.amazon.com/compute-optimizer/latest/ug/using-service-linked-roles.html Using Service-Linked Roles for Compute Optimizer>+-- in the /Compute Optimizer User Guide/.+module Amazonka.ComputeOptimizer.UpdateEnrollmentStatus+  ( -- * Creating a Request+    UpdateEnrollmentStatus (..),+    newUpdateEnrollmentStatus,++    -- * Request Lenses+    updateEnrollmentStatus_includeMemberAccounts,+    updateEnrollmentStatus_status,++    -- * Destructuring the Response+    UpdateEnrollmentStatusResponse (..),+    newUpdateEnrollmentStatusResponse,++    -- * Response Lenses+    updateEnrollmentStatusResponse_status,+    updateEnrollmentStatusResponse_statusReason,+    updateEnrollmentStatusResponse_httpStatus,+  )+where++import Amazonka.ComputeOptimizer.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:/ 'newUpdateEnrollmentStatus' smart constructor.+data UpdateEnrollmentStatus = UpdateEnrollmentStatus'+  { -- | Indicates whether to enroll member accounts of the organization if the+    -- account is the management account of an organization.+    includeMemberAccounts :: Prelude.Maybe Prelude.Bool,+    -- | The new enrollment status of the account.+    --+    -- The following status options are available:+    --+    -- -   @Active@ - Opts in your account to the Compute Optimizer service.+    --     Compute Optimizer begins analyzing the configuration and utilization+    --     metrics of your Amazon Web Services resources after you opt in. For+    --     more information, see+    --     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html Metrics analyzed by Compute Optimizer>+    --     in the /Compute Optimizer User Guide/.+    --+    -- -   @Inactive@ - Opts out your account from the Compute Optimizer+    --     service. Your account\'s recommendations and related metrics data+    --     will be deleted from Compute Optimizer after you opt out.+    --+    -- The @Pending@ and @Failed@ options cannot be used to update the+    -- enrollment status of an account. They are returned in the response of a+    -- request to update the enrollment status of an account.+    status :: Status+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateEnrollmentStatus' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'includeMemberAccounts', 'updateEnrollmentStatus_includeMemberAccounts' - Indicates whether to enroll member accounts of the organization if the+-- account is the management account of an organization.+--+-- 'status', 'updateEnrollmentStatus_status' - The new enrollment status of the account.+--+-- The following status options are available:+--+-- -   @Active@ - Opts in your account to the Compute Optimizer service.+--     Compute Optimizer begins analyzing the configuration and utilization+--     metrics of your Amazon Web Services resources after you opt in. For+--     more information, see+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html Metrics analyzed by Compute Optimizer>+--     in the /Compute Optimizer User Guide/.+--+-- -   @Inactive@ - Opts out your account from the Compute Optimizer+--     service. Your account\'s recommendations and related metrics data+--     will be deleted from Compute Optimizer after you opt out.+--+-- The @Pending@ and @Failed@ options cannot be used to update the+-- enrollment status of an account. They are returned in the response of a+-- request to update the enrollment status of an account.+newUpdateEnrollmentStatus ::+  -- | 'status'+  Status ->+  UpdateEnrollmentStatus+newUpdateEnrollmentStatus pStatus_ =+  UpdateEnrollmentStatus'+    { includeMemberAccounts =+        Prelude.Nothing,+      status = pStatus_+    }++-- | Indicates whether to enroll member accounts of the organization if the+-- account is the management account of an organization.+updateEnrollmentStatus_includeMemberAccounts :: Lens.Lens' UpdateEnrollmentStatus (Prelude.Maybe Prelude.Bool)+updateEnrollmentStatus_includeMemberAccounts = Lens.lens (\UpdateEnrollmentStatus' {includeMemberAccounts} -> includeMemberAccounts) (\s@UpdateEnrollmentStatus' {} a -> s {includeMemberAccounts = a} :: UpdateEnrollmentStatus)++-- | The new enrollment status of the account.+--+-- The following status options are available:+--+-- -   @Active@ - Opts in your account to the Compute Optimizer service.+--     Compute Optimizer begins analyzing the configuration and utilization+--     metrics of your Amazon Web Services resources after you opt in. For+--     more information, see+--     <https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html Metrics analyzed by Compute Optimizer>+--     in the /Compute Optimizer User Guide/.+--+-- -   @Inactive@ - Opts out your account from the Compute Optimizer+--     service. Your account\'s recommendations and related metrics data+--     will be deleted from Compute Optimizer after you opt out.+--+-- The @Pending@ and @Failed@ options cannot be used to update the+-- enrollment status of an account. They are returned in the response of a+-- request to update the enrollment status of an account.+updateEnrollmentStatus_status :: Lens.Lens' UpdateEnrollmentStatus Status+updateEnrollmentStatus_status = Lens.lens (\UpdateEnrollmentStatus' {status} -> status) (\s@UpdateEnrollmentStatus' {} a -> s {status = a} :: UpdateEnrollmentStatus)++instance Core.AWSRequest UpdateEnrollmentStatus where+  type+    AWSResponse UpdateEnrollmentStatus =+      UpdateEnrollmentStatusResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UpdateEnrollmentStatusResponse'+            Prelude.<$> (x Data..?> "status")+            Prelude.<*> (x Data..?> "statusReason")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UpdateEnrollmentStatus where+  hashWithSalt _salt UpdateEnrollmentStatus' {..} =+    _salt+      `Prelude.hashWithSalt` includeMemberAccounts+      `Prelude.hashWithSalt` status++instance Prelude.NFData UpdateEnrollmentStatus where+  rnf UpdateEnrollmentStatus' {..} =+    Prelude.rnf includeMemberAccounts+      `Prelude.seq` Prelude.rnf status++instance Data.ToHeaders UpdateEnrollmentStatus where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "X-Amz-Target"+              Data.=# ( "ComputeOptimizerService.UpdateEnrollmentStatus" ::+                          Prelude.ByteString+                      ),+            "Content-Type"+              Data.=# ( "application/x-amz-json-1.0" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateEnrollmentStatus where+  toJSON UpdateEnrollmentStatus' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("includeMemberAccounts" Data..=)+              Prelude.<$> includeMemberAccounts,+            Prelude.Just ("status" Data..= status)+          ]+      )++instance Data.ToPath UpdateEnrollmentStatus where+  toPath = Prelude.const "/"++instance Data.ToQuery UpdateEnrollmentStatus where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateEnrollmentStatusResponse' smart constructor.+data UpdateEnrollmentStatusResponse = UpdateEnrollmentStatusResponse'+  { -- | The enrollment status of the account.+    status :: Prelude.Maybe Status,+    -- | The reason for the enrollment status of the account. For example, an+    -- account might show a status of @Pending@ because member accounts of an+    -- organization require more time to be enrolled in the service.+    statusReason :: 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 'UpdateEnrollmentStatusResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'status', 'updateEnrollmentStatusResponse_status' - The enrollment status of the account.+--+-- 'statusReason', 'updateEnrollmentStatusResponse_statusReason' - The reason for the enrollment status of the account. For example, an+-- account might show a status of @Pending@ because member accounts of an+-- organization require more time to be enrolled in the service.+--+-- 'httpStatus', 'updateEnrollmentStatusResponse_httpStatus' - The response's http status code.+newUpdateEnrollmentStatusResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UpdateEnrollmentStatusResponse+newUpdateEnrollmentStatusResponse pHttpStatus_ =+  UpdateEnrollmentStatusResponse'+    { status =+        Prelude.Nothing,+      statusReason = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The enrollment status of the account.+updateEnrollmentStatusResponse_status :: Lens.Lens' UpdateEnrollmentStatusResponse (Prelude.Maybe Status)+updateEnrollmentStatusResponse_status = Lens.lens (\UpdateEnrollmentStatusResponse' {status} -> status) (\s@UpdateEnrollmentStatusResponse' {} a -> s {status = a} :: UpdateEnrollmentStatusResponse)++-- | The reason for the enrollment status of the account. For example, an+-- account might show a status of @Pending@ because member accounts of an+-- organization require more time to be enrolled in the service.+updateEnrollmentStatusResponse_statusReason :: Lens.Lens' UpdateEnrollmentStatusResponse (Prelude.Maybe Prelude.Text)+updateEnrollmentStatusResponse_statusReason = Lens.lens (\UpdateEnrollmentStatusResponse' {statusReason} -> statusReason) (\s@UpdateEnrollmentStatusResponse' {} a -> s {statusReason = a} :: UpdateEnrollmentStatusResponse)++-- | The response's http status code.+updateEnrollmentStatusResponse_httpStatus :: Lens.Lens' UpdateEnrollmentStatusResponse Prelude.Int+updateEnrollmentStatusResponse_httpStatus = Lens.lens (\UpdateEnrollmentStatusResponse' {httpStatus} -> httpStatus) (\s@UpdateEnrollmentStatusResponse' {} a -> s {httpStatus = a} :: UpdateEnrollmentStatusResponse)++instance+  Prelude.NFData+    UpdateEnrollmentStatusResponse+  where+  rnf UpdateEnrollmentStatusResponse' {..} =+    Prelude.rnf status+      `Prelude.seq` Prelude.rnf statusReason+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/ComputeOptimizer/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.ComputeOptimizer.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.ComputeOptimizer.Waiters where++import Amazonka.ComputeOptimizer.Lens+import Amazonka.ComputeOptimizer.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.ComputeOptimizer+import Test.Amazonka.ComputeOptimizer.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "ComputeOptimizer"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/ComputeOptimizer.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.ComputeOptimizer+-- 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.ComputeOptimizer+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/ComputeOptimizer/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.ComputeOptimizer.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.ComputeOptimizer.Internal where
+ test/Test/Amazonka/Gen/ComputeOptimizer.hs view
@@ -0,0 +1,458 @@+{-# 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.ComputeOptimizer+-- 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.ComputeOptimizer where++import Amazonka.ComputeOptimizer+import qualified Data.Proxy as Proxy+import Test.Amazonka.ComputeOptimizer.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"+--         [ requestDeleteRecommendationPreferences $+--             newDeleteRecommendationPreferences+--+--         , requestDescribeRecommendationExportJobs $+--             newDescribeRecommendationExportJobs+--+--         , requestExportAutoScalingGroupRecommendations $+--             newExportAutoScalingGroupRecommendations+--+--         , requestExportEBSVolumeRecommendations $+--             newExportEBSVolumeRecommendations+--+--         , requestExportEC2InstanceRecommendations $+--             newExportEC2InstanceRecommendations+--+--         , requestExportECSServiceRecommendations $+--             newExportECSServiceRecommendations+--+--         , requestExportLambdaFunctionRecommendations $+--             newExportLambdaFunctionRecommendations+--+--         , requestGetAutoScalingGroupRecommendations $+--             newGetAutoScalingGroupRecommendations+--+--         , requestGetEBSVolumeRecommendations $+--             newGetEBSVolumeRecommendations+--+--         , requestGetEC2InstanceRecommendations $+--             newGetEC2InstanceRecommendations+--+--         , requestGetEC2RecommendationProjectedMetrics $+--             newGetEC2RecommendationProjectedMetrics+--+--         , requestGetECSServiceRecommendationProjectedMetrics $+--             newGetECSServiceRecommendationProjectedMetrics+--+--         , requestGetECSServiceRecommendations $+--             newGetECSServiceRecommendations+--+--         , requestGetEffectiveRecommendationPreferences $+--             newGetEffectiveRecommendationPreferences+--+--         , requestGetEnrollmentStatus $+--             newGetEnrollmentStatus+--+--         , requestGetEnrollmentStatusesForOrganization $+--             newGetEnrollmentStatusesForOrganization+--+--         , requestGetLambdaFunctionRecommendations $+--             newGetLambdaFunctionRecommendations+--+--         , requestGetRecommendationPreferences $+--             newGetRecommendationPreferences+--+--         , requestGetRecommendationSummaries $+--             newGetRecommendationSummaries+--+--         , requestPutRecommendationPreferences $+--             newPutRecommendationPreferences+--+--         , requestUpdateEnrollmentStatus $+--             newUpdateEnrollmentStatus+--+--           ]++--     , testGroup "response"+--         [ responseDeleteRecommendationPreferences $+--             newDeleteRecommendationPreferencesResponse+--+--         , responseDescribeRecommendationExportJobs $+--             newDescribeRecommendationExportJobsResponse+--+--         , responseExportAutoScalingGroupRecommendations $+--             newExportAutoScalingGroupRecommendationsResponse+--+--         , responseExportEBSVolumeRecommendations $+--             newExportEBSVolumeRecommendationsResponse+--+--         , responseExportEC2InstanceRecommendations $+--             newExportEC2InstanceRecommendationsResponse+--+--         , responseExportECSServiceRecommendations $+--             newExportECSServiceRecommendationsResponse+--+--         , responseExportLambdaFunctionRecommendations $+--             newExportLambdaFunctionRecommendationsResponse+--+--         , responseGetAutoScalingGroupRecommendations $+--             newGetAutoScalingGroupRecommendationsResponse+--+--         , responseGetEBSVolumeRecommendations $+--             newGetEBSVolumeRecommendationsResponse+--+--         , responseGetEC2InstanceRecommendations $+--             newGetEC2InstanceRecommendationsResponse+--+--         , responseGetEC2RecommendationProjectedMetrics $+--             newGetEC2RecommendationProjectedMetricsResponse+--+--         , responseGetECSServiceRecommendationProjectedMetrics $+--             newGetECSServiceRecommendationProjectedMetricsResponse+--+--         , responseGetECSServiceRecommendations $+--             newGetECSServiceRecommendationsResponse+--+--         , responseGetEffectiveRecommendationPreferences $+--             newGetEffectiveRecommendationPreferencesResponse+--+--         , responseGetEnrollmentStatus $+--             newGetEnrollmentStatusResponse+--+--         , responseGetEnrollmentStatusesForOrganization $+--             newGetEnrollmentStatusesForOrganizationResponse+--+--         , responseGetLambdaFunctionRecommendations $+--             newGetLambdaFunctionRecommendationsResponse+--+--         , responseGetRecommendationPreferences $+--             newGetRecommendationPreferencesResponse+--+--         , responseGetRecommendationSummaries $+--             newGetRecommendationSummariesResponse+--+--         , responsePutRecommendationPreferences $+--             newPutRecommendationPreferencesResponse+--+--         , responseUpdateEnrollmentStatus $+--             newUpdateEnrollmentStatusResponse+--+--           ]+--     ]++-- Requests++requestDeleteRecommendationPreferences :: DeleteRecommendationPreferences -> TestTree+requestDeleteRecommendationPreferences =+  req+    "DeleteRecommendationPreferences"+    "fixture/DeleteRecommendationPreferences.yaml"++requestDescribeRecommendationExportJobs :: DescribeRecommendationExportJobs -> TestTree+requestDescribeRecommendationExportJobs =+  req+    "DescribeRecommendationExportJobs"+    "fixture/DescribeRecommendationExportJobs.yaml"++requestExportAutoScalingGroupRecommendations :: ExportAutoScalingGroupRecommendations -> TestTree+requestExportAutoScalingGroupRecommendations =+  req+    "ExportAutoScalingGroupRecommendations"+    "fixture/ExportAutoScalingGroupRecommendations.yaml"++requestExportEBSVolumeRecommendations :: ExportEBSVolumeRecommendations -> TestTree+requestExportEBSVolumeRecommendations =+  req+    "ExportEBSVolumeRecommendations"+    "fixture/ExportEBSVolumeRecommendations.yaml"++requestExportEC2InstanceRecommendations :: ExportEC2InstanceRecommendations -> TestTree+requestExportEC2InstanceRecommendations =+  req+    "ExportEC2InstanceRecommendations"+    "fixture/ExportEC2InstanceRecommendations.yaml"++requestExportECSServiceRecommendations :: ExportECSServiceRecommendations -> TestTree+requestExportECSServiceRecommendations =+  req+    "ExportECSServiceRecommendations"+    "fixture/ExportECSServiceRecommendations.yaml"++requestExportLambdaFunctionRecommendations :: ExportLambdaFunctionRecommendations -> TestTree+requestExportLambdaFunctionRecommendations =+  req+    "ExportLambdaFunctionRecommendations"+    "fixture/ExportLambdaFunctionRecommendations.yaml"++requestGetAutoScalingGroupRecommendations :: GetAutoScalingGroupRecommendations -> TestTree+requestGetAutoScalingGroupRecommendations =+  req+    "GetAutoScalingGroupRecommendations"+    "fixture/GetAutoScalingGroupRecommendations.yaml"++requestGetEBSVolumeRecommendations :: GetEBSVolumeRecommendations -> TestTree+requestGetEBSVolumeRecommendations =+  req+    "GetEBSVolumeRecommendations"+    "fixture/GetEBSVolumeRecommendations.yaml"++requestGetEC2InstanceRecommendations :: GetEC2InstanceRecommendations -> TestTree+requestGetEC2InstanceRecommendations =+  req+    "GetEC2InstanceRecommendations"+    "fixture/GetEC2InstanceRecommendations.yaml"++requestGetEC2RecommendationProjectedMetrics :: GetEC2RecommendationProjectedMetrics -> TestTree+requestGetEC2RecommendationProjectedMetrics =+  req+    "GetEC2RecommendationProjectedMetrics"+    "fixture/GetEC2RecommendationProjectedMetrics.yaml"++requestGetECSServiceRecommendationProjectedMetrics :: GetECSServiceRecommendationProjectedMetrics -> TestTree+requestGetECSServiceRecommendationProjectedMetrics =+  req+    "GetECSServiceRecommendationProjectedMetrics"+    "fixture/GetECSServiceRecommendationProjectedMetrics.yaml"++requestGetECSServiceRecommendations :: GetECSServiceRecommendations -> TestTree+requestGetECSServiceRecommendations =+  req+    "GetECSServiceRecommendations"+    "fixture/GetECSServiceRecommendations.yaml"++requestGetEffectiveRecommendationPreferences :: GetEffectiveRecommendationPreferences -> TestTree+requestGetEffectiveRecommendationPreferences =+  req+    "GetEffectiveRecommendationPreferences"+    "fixture/GetEffectiveRecommendationPreferences.yaml"++requestGetEnrollmentStatus :: GetEnrollmentStatus -> TestTree+requestGetEnrollmentStatus =+  req+    "GetEnrollmentStatus"+    "fixture/GetEnrollmentStatus.yaml"++requestGetEnrollmentStatusesForOrganization :: GetEnrollmentStatusesForOrganization -> TestTree+requestGetEnrollmentStatusesForOrganization =+  req+    "GetEnrollmentStatusesForOrganization"+    "fixture/GetEnrollmentStatusesForOrganization.yaml"++requestGetLambdaFunctionRecommendations :: GetLambdaFunctionRecommendations -> TestTree+requestGetLambdaFunctionRecommendations =+  req+    "GetLambdaFunctionRecommendations"+    "fixture/GetLambdaFunctionRecommendations.yaml"++requestGetRecommendationPreferences :: GetRecommendationPreferences -> TestTree+requestGetRecommendationPreferences =+  req+    "GetRecommendationPreferences"+    "fixture/GetRecommendationPreferences.yaml"++requestGetRecommendationSummaries :: GetRecommendationSummaries -> TestTree+requestGetRecommendationSummaries =+  req+    "GetRecommendationSummaries"+    "fixture/GetRecommendationSummaries.yaml"++requestPutRecommendationPreferences :: PutRecommendationPreferences -> TestTree+requestPutRecommendationPreferences =+  req+    "PutRecommendationPreferences"+    "fixture/PutRecommendationPreferences.yaml"++requestUpdateEnrollmentStatus :: UpdateEnrollmentStatus -> TestTree+requestUpdateEnrollmentStatus =+  req+    "UpdateEnrollmentStatus"+    "fixture/UpdateEnrollmentStatus.yaml"++-- Responses++responseDeleteRecommendationPreferences :: DeleteRecommendationPreferencesResponse -> TestTree+responseDeleteRecommendationPreferences =+  res+    "DeleteRecommendationPreferencesResponse"+    "fixture/DeleteRecommendationPreferencesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteRecommendationPreferences)++responseDescribeRecommendationExportJobs :: DescribeRecommendationExportJobsResponse -> TestTree+responseDescribeRecommendationExportJobs =+  res+    "DescribeRecommendationExportJobsResponse"+    "fixture/DescribeRecommendationExportJobsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DescribeRecommendationExportJobs)++responseExportAutoScalingGroupRecommendations :: ExportAutoScalingGroupRecommendationsResponse -> TestTree+responseExportAutoScalingGroupRecommendations =+  res+    "ExportAutoScalingGroupRecommendationsResponse"+    "fixture/ExportAutoScalingGroupRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ExportAutoScalingGroupRecommendations)++responseExportEBSVolumeRecommendations :: ExportEBSVolumeRecommendationsResponse -> TestTree+responseExportEBSVolumeRecommendations =+  res+    "ExportEBSVolumeRecommendationsResponse"+    "fixture/ExportEBSVolumeRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ExportEBSVolumeRecommendations)++responseExportEC2InstanceRecommendations :: ExportEC2InstanceRecommendationsResponse -> TestTree+responseExportEC2InstanceRecommendations =+  res+    "ExportEC2InstanceRecommendationsResponse"+    "fixture/ExportEC2InstanceRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ExportEC2InstanceRecommendations)++responseExportECSServiceRecommendations :: ExportECSServiceRecommendationsResponse -> TestTree+responseExportECSServiceRecommendations =+  res+    "ExportECSServiceRecommendationsResponse"+    "fixture/ExportECSServiceRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ExportECSServiceRecommendations)++responseExportLambdaFunctionRecommendations :: ExportLambdaFunctionRecommendationsResponse -> TestTree+responseExportLambdaFunctionRecommendations =+  res+    "ExportLambdaFunctionRecommendationsResponse"+    "fixture/ExportLambdaFunctionRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ExportLambdaFunctionRecommendations)++responseGetAutoScalingGroupRecommendations :: GetAutoScalingGroupRecommendationsResponse -> TestTree+responseGetAutoScalingGroupRecommendations =+  res+    "GetAutoScalingGroupRecommendationsResponse"+    "fixture/GetAutoScalingGroupRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetAutoScalingGroupRecommendations)++responseGetEBSVolumeRecommendations :: GetEBSVolumeRecommendationsResponse -> TestTree+responseGetEBSVolumeRecommendations =+  res+    "GetEBSVolumeRecommendationsResponse"+    "fixture/GetEBSVolumeRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetEBSVolumeRecommendations)++responseGetEC2InstanceRecommendations :: GetEC2InstanceRecommendationsResponse -> TestTree+responseGetEC2InstanceRecommendations =+  res+    "GetEC2InstanceRecommendationsResponse"+    "fixture/GetEC2InstanceRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetEC2InstanceRecommendations)++responseGetEC2RecommendationProjectedMetrics :: GetEC2RecommendationProjectedMetricsResponse -> TestTree+responseGetEC2RecommendationProjectedMetrics =+  res+    "GetEC2RecommendationProjectedMetricsResponse"+    "fixture/GetEC2RecommendationProjectedMetricsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetEC2RecommendationProjectedMetrics)++responseGetECSServiceRecommendationProjectedMetrics :: GetECSServiceRecommendationProjectedMetricsResponse -> TestTree+responseGetECSServiceRecommendationProjectedMetrics =+  res+    "GetECSServiceRecommendationProjectedMetricsResponse"+    "fixture/GetECSServiceRecommendationProjectedMetricsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetECSServiceRecommendationProjectedMetrics)++responseGetECSServiceRecommendations :: GetECSServiceRecommendationsResponse -> TestTree+responseGetECSServiceRecommendations =+  res+    "GetECSServiceRecommendationsResponse"+    "fixture/GetECSServiceRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetECSServiceRecommendations)++responseGetEffectiveRecommendationPreferences :: GetEffectiveRecommendationPreferencesResponse -> TestTree+responseGetEffectiveRecommendationPreferences =+  res+    "GetEffectiveRecommendationPreferencesResponse"+    "fixture/GetEffectiveRecommendationPreferencesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetEffectiveRecommendationPreferences)++responseGetEnrollmentStatus :: GetEnrollmentStatusResponse -> TestTree+responseGetEnrollmentStatus =+  res+    "GetEnrollmentStatusResponse"+    "fixture/GetEnrollmentStatusResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetEnrollmentStatus)++responseGetEnrollmentStatusesForOrganization :: GetEnrollmentStatusesForOrganizationResponse -> TestTree+responseGetEnrollmentStatusesForOrganization =+  res+    "GetEnrollmentStatusesForOrganizationResponse"+    "fixture/GetEnrollmentStatusesForOrganizationResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetEnrollmentStatusesForOrganization)++responseGetLambdaFunctionRecommendations :: GetLambdaFunctionRecommendationsResponse -> TestTree+responseGetLambdaFunctionRecommendations =+  res+    "GetLambdaFunctionRecommendationsResponse"+    "fixture/GetLambdaFunctionRecommendationsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetLambdaFunctionRecommendations)++responseGetRecommendationPreferences :: GetRecommendationPreferencesResponse -> TestTree+responseGetRecommendationPreferences =+  res+    "GetRecommendationPreferencesResponse"+    "fixture/GetRecommendationPreferencesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetRecommendationPreferences)++responseGetRecommendationSummaries :: GetRecommendationSummariesResponse -> TestTree+responseGetRecommendationSummaries =+  res+    "GetRecommendationSummariesResponse"+    "fixture/GetRecommendationSummariesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy GetRecommendationSummaries)++responsePutRecommendationPreferences :: PutRecommendationPreferencesResponse -> TestTree+responsePutRecommendationPreferences =+  res+    "PutRecommendationPreferencesResponse"+    "fixture/PutRecommendationPreferencesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy PutRecommendationPreferences)++responseUpdateEnrollmentStatus :: UpdateEnrollmentStatusResponse -> TestTree+responseUpdateEnrollmentStatus =+  res+    "UpdateEnrollmentStatusResponse"+    "fixture/UpdateEnrollmentStatusResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateEnrollmentStatus)