{-# 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. InstanceRecommendationOption -> Maybe Text 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. InstanceRecommendationOption -> Maybe MigrationEffort 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. InstanceRecommendationOption -> Maybe Double 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>. InstanceRecommendationOption -> Maybe [PlatformDifference] 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>. InstanceRecommendationOption -> Maybe [UtilizationMetric] projectedUtilizationMetrics :: Prelude.Maybe [UtilizationMetric], -- | The rank of the instance recommendation option. -- -- The top recommendation option is ranked as @1@. InstanceRecommendationOption -> Maybe Int 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. InstanceRecommendationOption -> Maybe SavingsOpportunity savingsOpportunity :: Prelude.Maybe SavingsOpportunity } deriving (InstanceRecommendationOption -> InstanceRecommendationOption -> Bool forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: InstanceRecommendationOption -> InstanceRecommendationOption -> Bool $c/= :: InstanceRecommendationOption -> InstanceRecommendationOption -> Bool == :: InstanceRecommendationOption -> InstanceRecommendationOption -> Bool $c== :: InstanceRecommendationOption -> InstanceRecommendationOption -> Bool Prelude.Eq, ReadPrec [InstanceRecommendationOption] ReadPrec InstanceRecommendationOption Int -> ReadS InstanceRecommendationOption ReadS [InstanceRecommendationOption] forall a. (Int -> ReadS a) -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a readListPrec :: ReadPrec [InstanceRecommendationOption] $creadListPrec :: ReadPrec [InstanceRecommendationOption] readPrec :: ReadPrec InstanceRecommendationOption $creadPrec :: ReadPrec InstanceRecommendationOption readList :: ReadS [InstanceRecommendationOption] $creadList :: ReadS [InstanceRecommendationOption] readsPrec :: Int -> ReadS InstanceRecommendationOption $creadsPrec :: Int -> ReadS InstanceRecommendationOption Prelude.Read, Int -> InstanceRecommendationOption -> ShowS [InstanceRecommendationOption] -> ShowS InstanceRecommendationOption -> String forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [InstanceRecommendationOption] -> ShowS $cshowList :: [InstanceRecommendationOption] -> ShowS show :: InstanceRecommendationOption -> String $cshow :: InstanceRecommendationOption -> String showsPrec :: Int -> InstanceRecommendationOption -> ShowS $cshowsPrec :: Int -> InstanceRecommendationOption -> ShowS Prelude.Show, forall x. Rep InstanceRecommendationOption x -> InstanceRecommendationOption forall x. InstanceRecommendationOption -> Rep InstanceRecommendationOption x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cto :: forall x. Rep InstanceRecommendationOption x -> InstanceRecommendationOption $cfrom :: forall x. InstanceRecommendationOption -> Rep InstanceRecommendationOption x 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 newInstanceRecommendationOption = InstanceRecommendationOption' { $sel:instanceType:InstanceRecommendationOption' :: Maybe Text instanceType = forall a. Maybe a Prelude.Nothing, $sel:migrationEffort:InstanceRecommendationOption' :: Maybe MigrationEffort migrationEffort = forall a. Maybe a Prelude.Nothing, $sel:performanceRisk:InstanceRecommendationOption' :: Maybe Double performanceRisk = forall a. Maybe a Prelude.Nothing, $sel:platformDifferences:InstanceRecommendationOption' :: Maybe [PlatformDifference] platformDifferences = forall a. Maybe a Prelude.Nothing, $sel:projectedUtilizationMetrics:InstanceRecommendationOption' :: Maybe [UtilizationMetric] projectedUtilizationMetrics = forall a. Maybe a Prelude.Nothing, $sel:rank:InstanceRecommendationOption' :: Maybe Int rank = forall a. Maybe a Prelude.Nothing, $sel:savingsOpportunity:InstanceRecommendationOption' :: Maybe SavingsOpportunity savingsOpportunity = forall a. Maybe a Prelude.Nothing } -- | The instance type of the instance recommendation. instanceRecommendationOption_instanceType :: Lens.Lens' InstanceRecommendationOption (Prelude.Maybe Prelude.Text) instanceRecommendationOption_instanceType :: Lens' InstanceRecommendationOption (Maybe Text) instanceRecommendationOption_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\InstanceRecommendationOption' {Maybe Text instanceType :: Maybe Text $sel:instanceType:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe Text instanceType} -> Maybe Text instanceType) (\s :: InstanceRecommendationOption s@InstanceRecommendationOption' {} Maybe Text a -> InstanceRecommendationOption s {$sel:instanceType:InstanceRecommendationOption' :: Maybe Text instanceType = Maybe Text 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' InstanceRecommendationOption (Maybe MigrationEffort) instanceRecommendationOption_migrationEffort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\InstanceRecommendationOption' {Maybe MigrationEffort migrationEffort :: Maybe MigrationEffort $sel:migrationEffort:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe MigrationEffort migrationEffort} -> Maybe MigrationEffort migrationEffort) (\s :: InstanceRecommendationOption s@InstanceRecommendationOption' {} Maybe MigrationEffort a -> InstanceRecommendationOption s {$sel:migrationEffort:InstanceRecommendationOption' :: Maybe MigrationEffort migrationEffort = Maybe 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' InstanceRecommendationOption (Maybe Double) instanceRecommendationOption_performanceRisk = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\InstanceRecommendationOption' {Maybe Double performanceRisk :: Maybe Double $sel:performanceRisk:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe Double performanceRisk} -> Maybe Double performanceRisk) (\s :: InstanceRecommendationOption s@InstanceRecommendationOption' {} Maybe Double a -> InstanceRecommendationOption s {$sel:performanceRisk:InstanceRecommendationOption' :: Maybe Double performanceRisk = Maybe Double 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' InstanceRecommendationOption (Maybe [PlatformDifference]) instanceRecommendationOption_platformDifferences = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\InstanceRecommendationOption' {Maybe [PlatformDifference] platformDifferences :: Maybe [PlatformDifference] $sel:platformDifferences:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe [PlatformDifference] platformDifferences} -> Maybe [PlatformDifference] platformDifferences) (\s :: InstanceRecommendationOption s@InstanceRecommendationOption' {} Maybe [PlatformDifference] a -> InstanceRecommendationOption s {$sel:platformDifferences:InstanceRecommendationOption' :: Maybe [PlatformDifference] platformDifferences = Maybe [PlatformDifference] a} :: InstanceRecommendationOption) forall b c a. (b -> c) -> (a -> b) -> a -> c Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b. (Functor f, Functor g) => AnIso s t a b -> Iso (f s) (g t) (f a) (g b) Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b 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' InstanceRecommendationOption (Maybe [UtilizationMetric]) instanceRecommendationOption_projectedUtilizationMetrics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\InstanceRecommendationOption' {Maybe [UtilizationMetric] projectedUtilizationMetrics :: Maybe [UtilizationMetric] $sel:projectedUtilizationMetrics:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe [UtilizationMetric] projectedUtilizationMetrics} -> Maybe [UtilizationMetric] projectedUtilizationMetrics) (\s :: InstanceRecommendationOption s@InstanceRecommendationOption' {} Maybe [UtilizationMetric] a -> InstanceRecommendationOption s {$sel:projectedUtilizationMetrics:InstanceRecommendationOption' :: Maybe [UtilizationMetric] projectedUtilizationMetrics = Maybe [UtilizationMetric] a} :: InstanceRecommendationOption) forall b c a. (b -> c) -> (a -> b) -> a -> c Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b. (Functor f, Functor g) => AnIso s t a b -> Iso (f s) (g t) (f a) (g b) Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b 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' InstanceRecommendationOption (Maybe Int) instanceRecommendationOption_rank = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\InstanceRecommendationOption' {Maybe Int rank :: Maybe Int $sel:rank:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe Int rank} -> Maybe Int rank) (\s :: InstanceRecommendationOption s@InstanceRecommendationOption' {} Maybe Int a -> InstanceRecommendationOption s {$sel:rank:InstanceRecommendationOption' :: Maybe Int rank = Maybe Int 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' InstanceRecommendationOption (Maybe SavingsOpportunity) instanceRecommendationOption_savingsOpportunity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\InstanceRecommendationOption' {Maybe SavingsOpportunity savingsOpportunity :: Maybe SavingsOpportunity $sel:savingsOpportunity:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe SavingsOpportunity savingsOpportunity} -> Maybe SavingsOpportunity savingsOpportunity) (\s :: InstanceRecommendationOption s@InstanceRecommendationOption' {} Maybe SavingsOpportunity a -> InstanceRecommendationOption s {$sel:savingsOpportunity:InstanceRecommendationOption' :: Maybe SavingsOpportunity savingsOpportunity = Maybe SavingsOpportunity a} :: InstanceRecommendationOption) instance Data.FromJSON InstanceRecommendationOption where parseJSON :: Value -> Parser InstanceRecommendationOption parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a Data.withObject String "InstanceRecommendationOption" ( \Object x -> Maybe Text -> Maybe MigrationEffort -> Maybe Double -> Maybe [PlatformDifference] -> Maybe [UtilizationMetric] -> Maybe Int -> Maybe SavingsOpportunity -> InstanceRecommendationOption InstanceRecommendationOption' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude.<$> (Object x forall a. FromJSON a => Object -> Key -> Parser (Maybe a) Data..:? Key "instanceType") forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b Prelude.<*> (Object x forall a. FromJSON a => Object -> Key -> Parser (Maybe a) Data..:? Key "migrationEffort") forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b Prelude.<*> (Object x forall a. FromJSON a => Object -> Key -> Parser (Maybe a) Data..:? Key "performanceRisk") forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b Prelude.<*> ( Object x forall a. FromJSON a => Object -> Key -> Parser (Maybe a) Data..:? Key "platformDifferences" forall a. Parser (Maybe a) -> a -> Parser a Data..!= forall a. Monoid a => a Prelude.mempty ) forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b Prelude.<*> ( Object x forall a. FromJSON a => Object -> Key -> Parser (Maybe a) Data..:? Key "projectedUtilizationMetrics" forall a. Parser (Maybe a) -> a -> Parser a Data..!= forall a. Monoid a => a Prelude.mempty ) forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b Prelude.<*> (Object x forall a. FromJSON a => Object -> Key -> Parser (Maybe a) Data..:? Key "rank") forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b Prelude.<*> (Object x forall a. FromJSON a => Object -> Key -> Parser (Maybe a) Data..:? Key "savingsOpportunity") ) instance Prelude.Hashable InstanceRecommendationOption where hashWithSalt :: Int -> InstanceRecommendationOption -> Int hashWithSalt Int _salt InstanceRecommendationOption' {Maybe Double Maybe Int Maybe [PlatformDifference] Maybe [UtilizationMetric] Maybe Text Maybe MigrationEffort Maybe SavingsOpportunity savingsOpportunity :: Maybe SavingsOpportunity rank :: Maybe Int projectedUtilizationMetrics :: Maybe [UtilizationMetric] platformDifferences :: Maybe [PlatformDifference] performanceRisk :: Maybe Double migrationEffort :: Maybe MigrationEffort instanceType :: Maybe Text $sel:savingsOpportunity:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe SavingsOpportunity $sel:rank:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe Int $sel:projectedUtilizationMetrics:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe [UtilizationMetric] $sel:platformDifferences:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe [PlatformDifference] $sel:performanceRisk:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe Double $sel:migrationEffort:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe MigrationEffort $sel:instanceType:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe Text ..} = Int _salt forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` Maybe Text instanceType forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` Maybe MigrationEffort migrationEffort forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` Maybe Double performanceRisk forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` Maybe [PlatformDifference] platformDifferences forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` Maybe [UtilizationMetric] projectedUtilizationMetrics forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` Maybe Int rank forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` Maybe SavingsOpportunity savingsOpportunity instance Prelude.NFData InstanceRecommendationOption where rnf :: InstanceRecommendationOption -> () rnf InstanceRecommendationOption' {Maybe Double Maybe Int Maybe [PlatformDifference] Maybe [UtilizationMetric] Maybe Text Maybe MigrationEffort Maybe SavingsOpportunity savingsOpportunity :: Maybe SavingsOpportunity rank :: Maybe Int projectedUtilizationMetrics :: Maybe [UtilizationMetric] platformDifferences :: Maybe [PlatformDifference] performanceRisk :: Maybe Double migrationEffort :: Maybe MigrationEffort instanceType :: Maybe Text $sel:savingsOpportunity:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe SavingsOpportunity $sel:rank:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe Int $sel:projectedUtilizationMetrics:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe [UtilizationMetric] $sel:platformDifferences:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe [PlatformDifference] $sel:performanceRisk:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe Double $sel:migrationEffort:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe MigrationEffort $sel:instanceType:InstanceRecommendationOption' :: InstanceRecommendationOption -> Maybe Text ..} = forall a. NFData a => a -> () Prelude.rnf Maybe Text instanceType seq :: forall a b. a -> b -> b `Prelude.seq` forall a. NFData a => a -> () Prelude.rnf Maybe MigrationEffort migrationEffort seq :: forall a b. a -> b -> b `Prelude.seq` forall a. NFData a => a -> () Prelude.rnf Maybe Double performanceRisk seq :: forall a b. a -> b -> b `Prelude.seq` forall a. NFData a => a -> () Prelude.rnf Maybe [PlatformDifference] platformDifferences seq :: forall a b. a -> b -> b `Prelude.seq` forall a. NFData a => a -> () Prelude.rnf Maybe [UtilizationMetric] projectedUtilizationMetrics seq :: forall a b. a -> b -> b `Prelude.seq` forall a. NFData a => a -> () Prelude.rnf Maybe Int rank seq :: forall a b. a -> b -> b `Prelude.seq` forall a. NFData a => a -> () Prelude.rnf Maybe SavingsOpportunity savingsOpportunity