#[non_exhaustive]pub struct InstanceRecommendation {Show 19 fields
pub instance_arn: Option<String>,
pub account_id: Option<String>,
pub instance_name: Option<String>,
pub current_instance_type: Option<String>,
pub finding: Option<Finding>,
pub finding_reason_codes: Option<Vec<InstanceRecommendationFindingReasonCode>>,
pub utilization_metrics: Option<Vec<UtilizationMetric>>,
pub look_back_period_in_days: f64,
pub recommendation_options: Option<Vec<InstanceRecommendationOption>>,
pub recommendation_sources: Option<Vec<RecommendationSource>>,
pub last_refresh_timestamp: Option<DateTime>,
pub current_performance_risk: Option<CurrentPerformanceRisk>,
pub effective_recommendation_preferences: Option<EffectiveRecommendationPreferences>,
pub inferred_workload_types: Option<Vec<InferredWorkloadType>>,
pub instance_state: Option<InstanceState>,
pub tags: Option<Vec<Tag>>,
pub external_metric_status: Option<ExternalMetricStatus>,
pub current_instance_gpu_info: Option<GpuInfo>,
pub idle: Option<InstanceIdle>,
}
Expand description
Describes an Amazon EC2 instance recommendation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.instance_arn: Option<String>
The Amazon Resource Name (ARN) of the current instance.
account_id: Option<String>
The Amazon Web Services account ID of the instance.
instance_name: Option<String>
The name of the current instance.
current_instance_type: Option<String>
The instance type of the current instance.
finding: Option<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.
finding_reason_codes: Option<Vec<InstanceRecommendationFindingReasonCode>>
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 theCPUUtilization
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 theCPUUtilization
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 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 theCWAgent
namespace, or the legacyMemoryUtilization
metric in theSystem/Linux
namespace. On Windows instances, Compute Optimizer analyses theMemory % Committed Bytes In Use
metric in theCWAgent
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 theVolumeReadBytes
andVolumeWriteBytes
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 theVolumeReadBytes
andVolumeWriteBytes
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 theVolumeReadOps
andVolumeWriteOps
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 theVolumeReadOps
andVolumeWriteOps
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 theNetworkIn
andNetworkOut
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 theNetworkIn
andNetworkOut
metrics of the current instance during the look-back period. This finding reason happens when theNetworkIn
orNetworkOut
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 theNetworkPacketsIn
andNetworkPacketsIn
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 theNetworkPacketsIn
andNetworkPacketsIn
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 theDiskReadOps
andDiskWriteOps
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 theDiskReadOps
andDiskWriteOps
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 theDiskReadBytes
andDiskWriteBytes
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 theDiskReadBytes
andDiskWriteBytes
metrics of the current instance during the look-back period.
For more information about instance metrics, see List the available CloudWatch metrics for your instances in the Amazon Elastic Compute Cloud User Guide. For more information about EBS volume metrics, see Amazon CloudWatch metrics for Amazon EBS in the Amazon Elastic Compute Cloud User Guide.
utilization_metrics: Option<Vec<UtilizationMetric>>
An array of objects that describe the utilization metrics of the instance.
look_back_period_in_days: f64
The number of days for which utilization metrics were analyzed for the instance.
recommendation_options: Option<Vec<InstanceRecommendationOption>>
An array of objects that describe the recommendation options for the instance.
recommendation_sources: Option<Vec<RecommendationSource>>
An array of objects that describe the source resource of the recommendation.
last_refresh_timestamp: Option<DateTime>
The timestamp of when the instance recommendation was last generated.
current_performance_risk: Option<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.
effective_recommendation_preferences: Option<EffectiveRecommendationPreferences>
An object that describes the effective recommendation preferences for the instance.
inferred_workload_types: Option<Vec<InferredWorkloadType>>
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. -
Kafka
- Infers that Kafka might be running on the instance. -
SQLServer
- Infers that SQLServer might be running on the instance.
instance_state: Option<InstanceState>
The state of the instance when the recommendation was generated.
A list of tags assigned to your Amazon EC2 instance recommendations.
external_metric_status: Option<ExternalMetricStatus>
An object that describes Compute Optimizer's integration status with your external metrics provider.
current_instance_gpu_info: Option<GpuInfo>
Describes the GPU accelerator settings for the current instance type.
idle: Option<InstanceIdle>
Describes if an Amazon EC2 instance is idle.
Implementations§
source§impl InstanceRecommendation
impl InstanceRecommendation
sourcepub fn instance_arn(&self) -> Option<&str>
pub fn instance_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the current instance.
sourcepub fn account_id(&self) -> Option<&str>
pub fn account_id(&self) -> Option<&str>
The Amazon Web Services account ID of the instance.
sourcepub fn instance_name(&self) -> Option<&str>
pub fn instance_name(&self) -> Option<&str>
The name of the current instance.
sourcepub fn current_instance_type(&self) -> Option<&str>
pub fn current_instance_type(&self) -> Option<&str>
The instance type of the current instance.
sourcepub fn finding(&self) -> Option<&Finding>
pub fn finding(&self) -> Option<&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.
sourcepub fn finding_reason_codes(&self) -> &[InstanceRecommendationFindingReasonCode]
pub fn finding_reason_codes(&self) -> &[InstanceRecommendationFindingReasonCode]
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 theCPUUtilization
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 theCPUUtilization
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 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 theCWAgent
namespace, or the legacyMemoryUtilization
metric in theSystem/Linux
namespace. On Windows instances, Compute Optimizer analyses theMemory % Committed Bytes In Use
metric in theCWAgent
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 theVolumeReadBytes
andVolumeWriteBytes
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 theVolumeReadBytes
andVolumeWriteBytes
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 theVolumeReadOps
andVolumeWriteOps
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 theVolumeReadOps
andVolumeWriteOps
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 theNetworkIn
andNetworkOut
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 theNetworkIn
andNetworkOut
metrics of the current instance during the look-back period. This finding reason happens when theNetworkIn
orNetworkOut
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 theNetworkPacketsIn
andNetworkPacketsIn
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 theNetworkPacketsIn
andNetworkPacketsIn
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 theDiskReadOps
andDiskWriteOps
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 theDiskReadOps
andDiskWriteOps
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 theDiskReadBytes
andDiskWriteBytes
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 theDiskReadBytes
andDiskWriteBytes
metrics of the current instance during the look-back period.
For more information about instance metrics, see List the available CloudWatch metrics for your instances in the Amazon Elastic Compute Cloud User Guide. For more information about EBS volume metrics, see Amazon CloudWatch metrics for Amazon EBS in the Amazon Elastic Compute Cloud User Guide.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .finding_reason_codes.is_none()
.
sourcepub fn utilization_metrics(&self) -> &[UtilizationMetric]
pub fn utilization_metrics(&self) -> &[UtilizationMetric]
An array of objects that describe the utilization metrics of the instance.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .utilization_metrics.is_none()
.
sourcepub fn look_back_period_in_days(&self) -> f64
pub fn look_back_period_in_days(&self) -> f64
The number of days for which utilization metrics were analyzed for the instance.
sourcepub fn recommendation_options(&self) -> &[InstanceRecommendationOption]
pub fn recommendation_options(&self) -> &[InstanceRecommendationOption]
An array of objects that describe the recommendation options for the instance.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .recommendation_options.is_none()
.
sourcepub fn recommendation_sources(&self) -> &[RecommendationSource]
pub fn recommendation_sources(&self) -> &[RecommendationSource]
An array of objects that describe the source resource of the recommendation.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .recommendation_sources.is_none()
.
sourcepub fn last_refresh_timestamp(&self) -> Option<&DateTime>
pub fn last_refresh_timestamp(&self) -> Option<&DateTime>
The timestamp of when the instance recommendation was last generated.
sourcepub fn current_performance_risk(&self) -> Option<&CurrentPerformanceRisk>
pub fn current_performance_risk(&self) -> Option<&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.
sourcepub fn effective_recommendation_preferences(
&self
) -> Option<&EffectiveRecommendationPreferences>
pub fn effective_recommendation_preferences( &self ) -> Option<&EffectiveRecommendationPreferences>
An object that describes the effective recommendation preferences for the instance.
sourcepub fn inferred_workload_types(&self) -> &[InferredWorkloadType]
pub fn inferred_workload_types(&self) -> &[InferredWorkloadType]
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. -
Kafka
- Infers that Kafka might be running on the instance. -
SQLServer
- Infers that SQLServer might be running on the instance.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .inferred_workload_types.is_none()
.
sourcepub fn instance_state(&self) -> Option<&InstanceState>
pub fn instance_state(&self) -> Option<&InstanceState>
The state of the instance when the recommendation was generated.
A list of tags assigned to your Amazon EC2 instance recommendations.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .tags.is_none()
.
sourcepub fn external_metric_status(&self) -> Option<&ExternalMetricStatus>
pub fn external_metric_status(&self) -> Option<&ExternalMetricStatus>
An object that describes Compute Optimizer's integration status with your external metrics provider.
sourcepub fn current_instance_gpu_info(&self) -> Option<&GpuInfo>
pub fn current_instance_gpu_info(&self) -> Option<&GpuInfo>
Describes the GPU accelerator settings for the current instance type.
sourcepub fn idle(&self) -> Option<&InstanceIdle>
pub fn idle(&self) -> Option<&InstanceIdle>
Describes if an Amazon EC2 instance is idle.
source§impl InstanceRecommendation
impl InstanceRecommendation
sourcepub fn builder() -> InstanceRecommendationBuilder
pub fn builder() -> InstanceRecommendationBuilder
Creates a new builder-style object to manufacture InstanceRecommendation
.
Trait Implementations§
source§impl Clone for InstanceRecommendation
impl Clone for InstanceRecommendation
source§fn clone(&self) -> InstanceRecommendation
fn clone(&self) -> InstanceRecommendation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InstanceRecommendation
impl Debug for InstanceRecommendation
source§impl PartialEq for InstanceRecommendation
impl PartialEq for InstanceRecommendation
source§fn eq(&self, other: &InstanceRecommendation) -> bool
fn eq(&self, other: &InstanceRecommendation) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for InstanceRecommendation
Auto Trait Implementations§
impl Freeze for InstanceRecommendation
impl RefUnwindSafe for InstanceRecommendation
impl Send for InstanceRecommendation
impl Sync for InstanceRecommendation
impl Unpin for InstanceRecommendation
impl UnwindSafe for InstanceRecommendation
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more