aws_sdk_computeoptimizer/types/_instance_recommendation.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes an Amazon EC2 instance recommendation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct InstanceRecommendation {
7 /// <p>The Amazon Resource Name (ARN) of the current instance.</p>
8 pub instance_arn: ::std::option::Option<::std::string::String>,
9 /// <p>The Amazon Web Services account ID of the instance.</p>
10 pub account_id: ::std::option::Option<::std::string::String>,
11 /// <p>The name of the current instance.</p>
12 pub instance_name: ::std::option::Option<::std::string::String>,
13 /// <p>The instance type of the current instance.</p>
14 pub current_instance_type: ::std::option::Option<::std::string::String>,
15 /// <p>The finding classification of the instance.</p>
16 /// <p>Findings for instances include:</p>
17 /// <ul>
18 /// <li>
19 /// <p><b> <code>Underprovisioned</code> </b>—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.</p></li>
20 /// <li>
21 /// <p><b> <code>Overprovisioned</code> </b>—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.</p></li>
22 /// <li>
23 /// <p><b> <code>Optimized</code> </b>—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.</p></li>
24 /// </ul><note>
25 /// <p>The valid values in your API responses appear as OVER_PROVISIONED, UNDER_PROVISIONED, or OPTIMIZED.</p>
26 /// </note>
27 pub finding: ::std::option::Option<crate::types::Finding>,
28 /// <p>The reason for the finding classification of the instance.</p>
29 /// <p>Finding reason codes for instances include:</p>
30 /// <ul>
31 /// <li>
32 /// <p><b> <code>CPUOverprovisioned</code> </b> — The instance’s CPU configuration can be sized down while still meeting the performance requirements of your workload. This is identified by analyzing the <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
33 /// <li>
34 /// <p><b> <code>CPUUnderprovisioned</code> </b> — 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 <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
35 /// <li>
36 /// <p><b> <code>MemoryOverprovisioned</code> </b> — 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.</p></li>
37 /// <li>
38 /// <p><b> <code>MemoryUnderprovisioned</code> </b> — 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.</p><note>
39 /// <p>Memory utilization is analyzed only for resources that have the unified CloudWatch agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent">Enabling memory utilization with the Amazon CloudWatch Agent</a> in the <i>Compute Optimizer User Guide</i>. On Linux instances, Compute Optimizer analyses the <code>mem_used_percent</code> metric in the <code>CWAgent</code> namespace, or the legacy <code>MemoryUtilization</code> metric in the <code>System/Linux</code> namespace. On Windows instances, Compute Optimizer analyses the <code>Memory % Committed Bytes In Use</code> metric in the <code>CWAgent</code> namespace.</p>
40 /// </note></li>
41 /// <li>
42 /// <p><b> <code>EBSThroughputOverprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
43 /// <li>
44 /// <p><b> <code>EBSThroughputUnderprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
45 /// <li>
46 /// <p><b> <code>EBSIOPSOverprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
47 /// <li>
48 /// <p><b> <code>EBSIOPSUnderprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
49 /// <li>
50 /// <p><b> <code>NetworkBandwidthOverprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period.</p></li>
51 /// <li>
52 /// <p><b> <code>NetworkBandwidthUnderprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period. This finding reason happens when the <code>NetworkIn</code> or <code>NetworkOut</code> performance of an instance is impacted.</p></li>
53 /// <li>
54 /// <p><b> <code>NetworkPPSOverprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
55 /// <li>
56 /// <p><b> <code>NetworkPPSUnderprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
57 /// <li>
58 /// <p><b> <code>DiskIOPSOverprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
59 /// <li>
60 /// <p><b> <code>DiskIOPSUnderprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
61 /// <li>
62 /// <p><b> <code>DiskThroughputOverprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
63 /// <li>
64 /// <p><b> <code>DiskThroughputUnderprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
65 /// </ul><note>
66 /// <p>For more information about instance metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html">List the available CloudWatch metrics for your instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about EBS volume metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html">Amazon CloudWatch metrics for Amazon EBS</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
67 /// </note>
68 pub finding_reason_codes: ::std::option::Option<::std::vec::Vec<crate::types::InstanceRecommendationFindingReasonCode>>,
69 /// <p>An array of objects that describe the utilization metrics of the instance.</p>
70 pub utilization_metrics: ::std::option::Option<::std::vec::Vec<crate::types::UtilizationMetric>>,
71 /// <p>The number of days for which utilization metrics were analyzed for the instance.</p>
72 pub look_back_period_in_days: f64,
73 /// <p>An array of objects that describe the recommendation options for the instance.</p>
74 pub recommendation_options: ::std::option::Option<::std::vec::Vec<crate::types::InstanceRecommendationOption>>,
75 /// <p>An array of objects that describe the source resource of the recommendation.</p>
76 pub recommendation_sources: ::std::option::Option<::std::vec::Vec<crate::types::RecommendationSource>>,
77 /// <p>The timestamp of when the instance recommendation was last generated.</p>
78 pub last_refresh_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
79 /// <p>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.</p>
80 pub current_performance_risk: ::std::option::Option<crate::types::CurrentPerformanceRisk>,
81 /// <p>An object that describes the effective recommendation preferences for the instance.</p>
82 pub effective_recommendation_preferences: ::std::option::Option<crate::types::EffectiveRecommendationPreferences>,
83 /// <p>The applications that might be running on the instance as inferred by Compute Optimizer.</p>
84 /// <p>Compute Optimizer can infer if one of the following applications might be running on the instance:</p>
85 /// <ul>
86 /// <li>
87 /// <p><code>AmazonEmr</code> - Infers that Amazon EMR might be running on the instance.</p></li>
88 /// <li>
89 /// <p><code>ApacheCassandra</code> - Infers that Apache Cassandra might be running on the instance.</p></li>
90 /// <li>
91 /// <p><code>ApacheHadoop</code> - Infers that Apache Hadoop might be running on the instance.</p></li>
92 /// <li>
93 /// <p><code>Memcached</code> - Infers that Memcached might be running on the instance.</p></li>
94 /// <li>
95 /// <p><code>NGINX</code> - Infers that NGINX might be running on the instance.</p></li>
96 /// <li>
97 /// <p><code>PostgreSql</code> - Infers that PostgreSQL might be running on the instance.</p></li>
98 /// <li>
99 /// <p><code>Redis</code> - Infers that Redis might be running on the instance.</p></li>
100 /// <li>
101 /// <p><code>Kafka</code> - Infers that Kafka might be running on the instance.</p></li>
102 /// <li>
103 /// <p><code>SQLServer</code> - Infers that SQLServer might be running on the instance.</p></li>
104 /// </ul>
105 pub inferred_workload_types: ::std::option::Option<::std::vec::Vec<crate::types::InferredWorkloadType>>,
106 /// <p>The state of the instance when the recommendation was generated.</p>
107 pub instance_state: ::std::option::Option<crate::types::InstanceState>,
108 /// <p>A list of tags assigned to your Amazon EC2 instance recommendations.</p>
109 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
110 /// <p>An object that describes Compute Optimizer's integration status with your external metrics provider.</p>
111 pub external_metric_status: ::std::option::Option<crate::types::ExternalMetricStatus>,
112 /// <p>Describes the GPU accelerator settings for the current instance type.</p>
113 pub current_instance_gpu_info: ::std::option::Option<crate::types::GpuInfo>,
114 /// <p>Describes if an Amazon EC2 instance is idle.</p>
115 pub idle: ::std::option::Option<crate::types::InstanceIdle>,
116}
117impl InstanceRecommendation {
118 /// <p>The Amazon Resource Name (ARN) of the current instance.</p>
119 pub fn instance_arn(&self) -> ::std::option::Option<&str> {
120 self.instance_arn.as_deref()
121 }
122 /// <p>The Amazon Web Services account ID of the instance.</p>
123 pub fn account_id(&self) -> ::std::option::Option<&str> {
124 self.account_id.as_deref()
125 }
126 /// <p>The name of the current instance.</p>
127 pub fn instance_name(&self) -> ::std::option::Option<&str> {
128 self.instance_name.as_deref()
129 }
130 /// <p>The instance type of the current instance.</p>
131 pub fn current_instance_type(&self) -> ::std::option::Option<&str> {
132 self.current_instance_type.as_deref()
133 }
134 /// <p>The finding classification of the instance.</p>
135 /// <p>Findings for instances include:</p>
136 /// <ul>
137 /// <li>
138 /// <p><b> <code>Underprovisioned</code> </b>—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.</p></li>
139 /// <li>
140 /// <p><b> <code>Overprovisioned</code> </b>—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.</p></li>
141 /// <li>
142 /// <p><b> <code>Optimized</code> </b>—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.</p></li>
143 /// </ul><note>
144 /// <p>The valid values in your API responses appear as OVER_PROVISIONED, UNDER_PROVISIONED, or OPTIMIZED.</p>
145 /// </note>
146 pub fn finding(&self) -> ::std::option::Option<&crate::types::Finding> {
147 self.finding.as_ref()
148 }
149 /// <p>The reason for the finding classification of the instance.</p>
150 /// <p>Finding reason codes for instances include:</p>
151 /// <ul>
152 /// <li>
153 /// <p><b> <code>CPUOverprovisioned</code> </b> — The instance’s CPU configuration can be sized down while still meeting the performance requirements of your workload. This is identified by analyzing the <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
154 /// <li>
155 /// <p><b> <code>CPUUnderprovisioned</code> </b> — 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 <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
156 /// <li>
157 /// <p><b> <code>MemoryOverprovisioned</code> </b> — 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.</p></li>
158 /// <li>
159 /// <p><b> <code>MemoryUnderprovisioned</code> </b> — 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.</p><note>
160 /// <p>Memory utilization is analyzed only for resources that have the unified CloudWatch agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent">Enabling memory utilization with the Amazon CloudWatch Agent</a> in the <i>Compute Optimizer User Guide</i>. On Linux instances, Compute Optimizer analyses the <code>mem_used_percent</code> metric in the <code>CWAgent</code> namespace, or the legacy <code>MemoryUtilization</code> metric in the <code>System/Linux</code> namespace. On Windows instances, Compute Optimizer analyses the <code>Memory % Committed Bytes In Use</code> metric in the <code>CWAgent</code> namespace.</p>
161 /// </note></li>
162 /// <li>
163 /// <p><b> <code>EBSThroughputOverprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
164 /// <li>
165 /// <p><b> <code>EBSThroughputUnderprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
166 /// <li>
167 /// <p><b> <code>EBSIOPSOverprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
168 /// <li>
169 /// <p><b> <code>EBSIOPSUnderprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
170 /// <li>
171 /// <p><b> <code>NetworkBandwidthOverprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period.</p></li>
172 /// <li>
173 /// <p><b> <code>NetworkBandwidthUnderprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period. This finding reason happens when the <code>NetworkIn</code> or <code>NetworkOut</code> performance of an instance is impacted.</p></li>
174 /// <li>
175 /// <p><b> <code>NetworkPPSOverprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
176 /// <li>
177 /// <p><b> <code>NetworkPPSUnderprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
178 /// <li>
179 /// <p><b> <code>DiskIOPSOverprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
180 /// <li>
181 /// <p><b> <code>DiskIOPSUnderprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
182 /// <li>
183 /// <p><b> <code>DiskThroughputOverprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
184 /// <li>
185 /// <p><b> <code>DiskThroughputUnderprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
186 /// </ul><note>
187 /// <p>For more information about instance metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html">List the available CloudWatch metrics for your instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about EBS volume metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html">Amazon CloudWatch metrics for Amazon EBS</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
188 /// </note>
189 ///
190 /// 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()`.
191 pub fn finding_reason_codes(&self) -> &[crate::types::InstanceRecommendationFindingReasonCode] {
192 self.finding_reason_codes.as_deref().unwrap_or_default()
193 }
194 /// <p>An array of objects that describe the utilization metrics of the instance.</p>
195 ///
196 /// 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()`.
197 pub fn utilization_metrics(&self) -> &[crate::types::UtilizationMetric] {
198 self.utilization_metrics.as_deref().unwrap_or_default()
199 }
200 /// <p>The number of days for which utilization metrics were analyzed for the instance.</p>
201 pub fn look_back_period_in_days(&self) -> f64 {
202 self.look_back_period_in_days
203 }
204 /// <p>An array of objects that describe the recommendation options for the instance.</p>
205 ///
206 /// 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()`.
207 pub fn recommendation_options(&self) -> &[crate::types::InstanceRecommendationOption] {
208 self.recommendation_options.as_deref().unwrap_or_default()
209 }
210 /// <p>An array of objects that describe the source resource of the recommendation.</p>
211 ///
212 /// 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()`.
213 pub fn recommendation_sources(&self) -> &[crate::types::RecommendationSource] {
214 self.recommendation_sources.as_deref().unwrap_or_default()
215 }
216 /// <p>The timestamp of when the instance recommendation was last generated.</p>
217 pub fn last_refresh_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
218 self.last_refresh_timestamp.as_ref()
219 }
220 /// <p>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.</p>
221 pub fn current_performance_risk(&self) -> ::std::option::Option<&crate::types::CurrentPerformanceRisk> {
222 self.current_performance_risk.as_ref()
223 }
224 /// <p>An object that describes the effective recommendation preferences for the instance.</p>
225 pub fn effective_recommendation_preferences(&self) -> ::std::option::Option<&crate::types::EffectiveRecommendationPreferences> {
226 self.effective_recommendation_preferences.as_ref()
227 }
228 /// <p>The applications that might be running on the instance as inferred by Compute Optimizer.</p>
229 /// <p>Compute Optimizer can infer if one of the following applications might be running on the instance:</p>
230 /// <ul>
231 /// <li>
232 /// <p><code>AmazonEmr</code> - Infers that Amazon EMR might be running on the instance.</p></li>
233 /// <li>
234 /// <p><code>ApacheCassandra</code> - Infers that Apache Cassandra might be running on the instance.</p></li>
235 /// <li>
236 /// <p><code>ApacheHadoop</code> - Infers that Apache Hadoop might be running on the instance.</p></li>
237 /// <li>
238 /// <p><code>Memcached</code> - Infers that Memcached might be running on the instance.</p></li>
239 /// <li>
240 /// <p><code>NGINX</code> - Infers that NGINX might be running on the instance.</p></li>
241 /// <li>
242 /// <p><code>PostgreSql</code> - Infers that PostgreSQL might be running on the instance.</p></li>
243 /// <li>
244 /// <p><code>Redis</code> - Infers that Redis might be running on the instance.</p></li>
245 /// <li>
246 /// <p><code>Kafka</code> - Infers that Kafka might be running on the instance.</p></li>
247 /// <li>
248 /// <p><code>SQLServer</code> - Infers that SQLServer might be running on the instance.</p></li>
249 /// </ul>
250 ///
251 /// 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()`.
252 pub fn inferred_workload_types(&self) -> &[crate::types::InferredWorkloadType] {
253 self.inferred_workload_types.as_deref().unwrap_or_default()
254 }
255 /// <p>The state of the instance when the recommendation was generated.</p>
256 pub fn instance_state(&self) -> ::std::option::Option<&crate::types::InstanceState> {
257 self.instance_state.as_ref()
258 }
259 /// <p>A list of tags assigned to your Amazon EC2 instance recommendations.</p>
260 ///
261 /// 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()`.
262 pub fn tags(&self) -> &[crate::types::Tag] {
263 self.tags.as_deref().unwrap_or_default()
264 }
265 /// <p>An object that describes Compute Optimizer's integration status with your external metrics provider.</p>
266 pub fn external_metric_status(&self) -> ::std::option::Option<&crate::types::ExternalMetricStatus> {
267 self.external_metric_status.as_ref()
268 }
269 /// <p>Describes the GPU accelerator settings for the current instance type.</p>
270 pub fn current_instance_gpu_info(&self) -> ::std::option::Option<&crate::types::GpuInfo> {
271 self.current_instance_gpu_info.as_ref()
272 }
273 /// <p>Describes if an Amazon EC2 instance is idle.</p>
274 pub fn idle(&self) -> ::std::option::Option<&crate::types::InstanceIdle> {
275 self.idle.as_ref()
276 }
277}
278impl InstanceRecommendation {
279 /// Creates a new builder-style object to manufacture [`InstanceRecommendation`](crate::types::InstanceRecommendation).
280 pub fn builder() -> crate::types::builders::InstanceRecommendationBuilder {
281 crate::types::builders::InstanceRecommendationBuilder::default()
282 }
283}
284
285/// A builder for [`InstanceRecommendation`](crate::types::InstanceRecommendation).
286#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
287#[non_exhaustive]
288pub struct InstanceRecommendationBuilder {
289 pub(crate) instance_arn: ::std::option::Option<::std::string::String>,
290 pub(crate) account_id: ::std::option::Option<::std::string::String>,
291 pub(crate) instance_name: ::std::option::Option<::std::string::String>,
292 pub(crate) current_instance_type: ::std::option::Option<::std::string::String>,
293 pub(crate) finding: ::std::option::Option<crate::types::Finding>,
294 pub(crate) finding_reason_codes: ::std::option::Option<::std::vec::Vec<crate::types::InstanceRecommendationFindingReasonCode>>,
295 pub(crate) utilization_metrics: ::std::option::Option<::std::vec::Vec<crate::types::UtilizationMetric>>,
296 pub(crate) look_back_period_in_days: ::std::option::Option<f64>,
297 pub(crate) recommendation_options: ::std::option::Option<::std::vec::Vec<crate::types::InstanceRecommendationOption>>,
298 pub(crate) recommendation_sources: ::std::option::Option<::std::vec::Vec<crate::types::RecommendationSource>>,
299 pub(crate) last_refresh_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
300 pub(crate) current_performance_risk: ::std::option::Option<crate::types::CurrentPerformanceRisk>,
301 pub(crate) effective_recommendation_preferences: ::std::option::Option<crate::types::EffectiveRecommendationPreferences>,
302 pub(crate) inferred_workload_types: ::std::option::Option<::std::vec::Vec<crate::types::InferredWorkloadType>>,
303 pub(crate) instance_state: ::std::option::Option<crate::types::InstanceState>,
304 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
305 pub(crate) external_metric_status: ::std::option::Option<crate::types::ExternalMetricStatus>,
306 pub(crate) current_instance_gpu_info: ::std::option::Option<crate::types::GpuInfo>,
307 pub(crate) idle: ::std::option::Option<crate::types::InstanceIdle>,
308}
309impl InstanceRecommendationBuilder {
310 /// <p>The Amazon Resource Name (ARN) of the current instance.</p>
311 pub fn instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
312 self.instance_arn = ::std::option::Option::Some(input.into());
313 self
314 }
315 /// <p>The Amazon Resource Name (ARN) of the current instance.</p>
316 pub fn set_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
317 self.instance_arn = input;
318 self
319 }
320 /// <p>The Amazon Resource Name (ARN) of the current instance.</p>
321 pub fn get_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
322 &self.instance_arn
323 }
324 /// <p>The Amazon Web Services account ID of the instance.</p>
325 pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
326 self.account_id = ::std::option::Option::Some(input.into());
327 self
328 }
329 /// <p>The Amazon Web Services account ID of the instance.</p>
330 pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
331 self.account_id = input;
332 self
333 }
334 /// <p>The Amazon Web Services account ID of the instance.</p>
335 pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
336 &self.account_id
337 }
338 /// <p>The name of the current instance.</p>
339 pub fn instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
340 self.instance_name = ::std::option::Option::Some(input.into());
341 self
342 }
343 /// <p>The name of the current instance.</p>
344 pub fn set_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
345 self.instance_name = input;
346 self
347 }
348 /// <p>The name of the current instance.</p>
349 pub fn get_instance_name(&self) -> &::std::option::Option<::std::string::String> {
350 &self.instance_name
351 }
352 /// <p>The instance type of the current instance.</p>
353 pub fn current_instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
354 self.current_instance_type = ::std::option::Option::Some(input.into());
355 self
356 }
357 /// <p>The instance type of the current instance.</p>
358 pub fn set_current_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
359 self.current_instance_type = input;
360 self
361 }
362 /// <p>The instance type of the current instance.</p>
363 pub fn get_current_instance_type(&self) -> &::std::option::Option<::std::string::String> {
364 &self.current_instance_type
365 }
366 /// <p>The finding classification of the instance.</p>
367 /// <p>Findings for instances include:</p>
368 /// <ul>
369 /// <li>
370 /// <p><b> <code>Underprovisioned</code> </b>—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.</p></li>
371 /// <li>
372 /// <p><b> <code>Overprovisioned</code> </b>—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.</p></li>
373 /// <li>
374 /// <p><b> <code>Optimized</code> </b>—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.</p></li>
375 /// </ul><note>
376 /// <p>The valid values in your API responses appear as OVER_PROVISIONED, UNDER_PROVISIONED, or OPTIMIZED.</p>
377 /// </note>
378 pub fn finding(mut self, input: crate::types::Finding) -> Self {
379 self.finding = ::std::option::Option::Some(input);
380 self
381 }
382 /// <p>The finding classification of the instance.</p>
383 /// <p>Findings for instances include:</p>
384 /// <ul>
385 /// <li>
386 /// <p><b> <code>Underprovisioned</code> </b>—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.</p></li>
387 /// <li>
388 /// <p><b> <code>Overprovisioned</code> </b>—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.</p></li>
389 /// <li>
390 /// <p><b> <code>Optimized</code> </b>—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.</p></li>
391 /// </ul><note>
392 /// <p>The valid values in your API responses appear as OVER_PROVISIONED, UNDER_PROVISIONED, or OPTIMIZED.</p>
393 /// </note>
394 pub fn set_finding(mut self, input: ::std::option::Option<crate::types::Finding>) -> Self {
395 self.finding = input;
396 self
397 }
398 /// <p>The finding classification of the instance.</p>
399 /// <p>Findings for instances include:</p>
400 /// <ul>
401 /// <li>
402 /// <p><b> <code>Underprovisioned</code> </b>—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.</p></li>
403 /// <li>
404 /// <p><b> <code>Overprovisioned</code> </b>—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.</p></li>
405 /// <li>
406 /// <p><b> <code>Optimized</code> </b>—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.</p></li>
407 /// </ul><note>
408 /// <p>The valid values in your API responses appear as OVER_PROVISIONED, UNDER_PROVISIONED, or OPTIMIZED.</p>
409 /// </note>
410 pub fn get_finding(&self) -> &::std::option::Option<crate::types::Finding> {
411 &self.finding
412 }
413 /// Appends an item to `finding_reason_codes`.
414 ///
415 /// To override the contents of this collection use [`set_finding_reason_codes`](Self::set_finding_reason_codes).
416 ///
417 /// <p>The reason for the finding classification of the instance.</p>
418 /// <p>Finding reason codes for instances include:</p>
419 /// <ul>
420 /// <li>
421 /// <p><b> <code>CPUOverprovisioned</code> </b> — The instance’s CPU configuration can be sized down while still meeting the performance requirements of your workload. This is identified by analyzing the <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
422 /// <li>
423 /// <p><b> <code>CPUUnderprovisioned</code> </b> — 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 <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
424 /// <li>
425 /// <p><b> <code>MemoryOverprovisioned</code> </b> — 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.</p></li>
426 /// <li>
427 /// <p><b> <code>MemoryUnderprovisioned</code> </b> — 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.</p><note>
428 /// <p>Memory utilization is analyzed only for resources that have the unified CloudWatch agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent">Enabling memory utilization with the Amazon CloudWatch Agent</a> in the <i>Compute Optimizer User Guide</i>. On Linux instances, Compute Optimizer analyses the <code>mem_used_percent</code> metric in the <code>CWAgent</code> namespace, or the legacy <code>MemoryUtilization</code> metric in the <code>System/Linux</code> namespace. On Windows instances, Compute Optimizer analyses the <code>Memory % Committed Bytes In Use</code> metric in the <code>CWAgent</code> namespace.</p>
429 /// </note></li>
430 /// <li>
431 /// <p><b> <code>EBSThroughputOverprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
432 /// <li>
433 /// <p><b> <code>EBSThroughputUnderprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
434 /// <li>
435 /// <p><b> <code>EBSIOPSOverprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
436 /// <li>
437 /// <p><b> <code>EBSIOPSUnderprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
438 /// <li>
439 /// <p><b> <code>NetworkBandwidthOverprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period.</p></li>
440 /// <li>
441 /// <p><b> <code>NetworkBandwidthUnderprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period. This finding reason happens when the <code>NetworkIn</code> or <code>NetworkOut</code> performance of an instance is impacted.</p></li>
442 /// <li>
443 /// <p><b> <code>NetworkPPSOverprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
444 /// <li>
445 /// <p><b> <code>NetworkPPSUnderprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
446 /// <li>
447 /// <p><b> <code>DiskIOPSOverprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
448 /// <li>
449 /// <p><b> <code>DiskIOPSUnderprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
450 /// <li>
451 /// <p><b> <code>DiskThroughputOverprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
452 /// <li>
453 /// <p><b> <code>DiskThroughputUnderprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
454 /// </ul><note>
455 /// <p>For more information about instance metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html">List the available CloudWatch metrics for your instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about EBS volume metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html">Amazon CloudWatch metrics for Amazon EBS</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
456 /// </note>
457 pub fn finding_reason_codes(mut self, input: crate::types::InstanceRecommendationFindingReasonCode) -> Self {
458 let mut v = self.finding_reason_codes.unwrap_or_default();
459 v.push(input);
460 self.finding_reason_codes = ::std::option::Option::Some(v);
461 self
462 }
463 /// <p>The reason for the finding classification of the instance.</p>
464 /// <p>Finding reason codes for instances include:</p>
465 /// <ul>
466 /// <li>
467 /// <p><b> <code>CPUOverprovisioned</code> </b> — The instance’s CPU configuration can be sized down while still meeting the performance requirements of your workload. This is identified by analyzing the <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
468 /// <li>
469 /// <p><b> <code>CPUUnderprovisioned</code> </b> — 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 <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
470 /// <li>
471 /// <p><b> <code>MemoryOverprovisioned</code> </b> — 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.</p></li>
472 /// <li>
473 /// <p><b> <code>MemoryUnderprovisioned</code> </b> — 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.</p><note>
474 /// <p>Memory utilization is analyzed only for resources that have the unified CloudWatch agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent">Enabling memory utilization with the Amazon CloudWatch Agent</a> in the <i>Compute Optimizer User Guide</i>. On Linux instances, Compute Optimizer analyses the <code>mem_used_percent</code> metric in the <code>CWAgent</code> namespace, or the legacy <code>MemoryUtilization</code> metric in the <code>System/Linux</code> namespace. On Windows instances, Compute Optimizer analyses the <code>Memory % Committed Bytes In Use</code> metric in the <code>CWAgent</code> namespace.</p>
475 /// </note></li>
476 /// <li>
477 /// <p><b> <code>EBSThroughputOverprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
478 /// <li>
479 /// <p><b> <code>EBSThroughputUnderprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
480 /// <li>
481 /// <p><b> <code>EBSIOPSOverprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
482 /// <li>
483 /// <p><b> <code>EBSIOPSUnderprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
484 /// <li>
485 /// <p><b> <code>NetworkBandwidthOverprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period.</p></li>
486 /// <li>
487 /// <p><b> <code>NetworkBandwidthUnderprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period. This finding reason happens when the <code>NetworkIn</code> or <code>NetworkOut</code> performance of an instance is impacted.</p></li>
488 /// <li>
489 /// <p><b> <code>NetworkPPSOverprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
490 /// <li>
491 /// <p><b> <code>NetworkPPSUnderprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
492 /// <li>
493 /// <p><b> <code>DiskIOPSOverprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
494 /// <li>
495 /// <p><b> <code>DiskIOPSUnderprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
496 /// <li>
497 /// <p><b> <code>DiskThroughputOverprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
498 /// <li>
499 /// <p><b> <code>DiskThroughputUnderprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
500 /// </ul><note>
501 /// <p>For more information about instance metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html">List the available CloudWatch metrics for your instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about EBS volume metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html">Amazon CloudWatch metrics for Amazon EBS</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
502 /// </note>
503 pub fn set_finding_reason_codes(
504 mut self,
505 input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceRecommendationFindingReasonCode>>,
506 ) -> Self {
507 self.finding_reason_codes = input;
508 self
509 }
510 /// <p>The reason for the finding classification of the instance.</p>
511 /// <p>Finding reason codes for instances include:</p>
512 /// <ul>
513 /// <li>
514 /// <p><b> <code>CPUOverprovisioned</code> </b> — The instance’s CPU configuration can be sized down while still meeting the performance requirements of your workload. This is identified by analyzing the <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
515 /// <li>
516 /// <p><b> <code>CPUUnderprovisioned</code> </b> — 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 <code>CPUUtilization</code> metric of the current instance during the look-back period.</p></li>
517 /// <li>
518 /// <p><b> <code>MemoryOverprovisioned</code> </b> — 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.</p></li>
519 /// <li>
520 /// <p><b> <code>MemoryUnderprovisioned</code> </b> — 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.</p><note>
521 /// <p>Memory utilization is analyzed only for resources that have the unified CloudWatch agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#cw-agent">Enabling memory utilization with the Amazon CloudWatch Agent</a> in the <i>Compute Optimizer User Guide</i>. On Linux instances, Compute Optimizer analyses the <code>mem_used_percent</code> metric in the <code>CWAgent</code> namespace, or the legacy <code>MemoryUtilization</code> metric in the <code>System/Linux</code> namespace. On Windows instances, Compute Optimizer analyses the <code>Memory % Committed Bytes In Use</code> metric in the <code>CWAgent</code> namespace.</p>
522 /// </note></li>
523 /// <li>
524 /// <p><b> <code>EBSThroughputOverprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
525 /// <li>
526 /// <p><b> <code>EBSThroughputUnderprovisioned</code> </b> — 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 <code>VolumeReadBytes</code> and <code>VolumeWriteBytes</code> metrics of EBS volumes attached to the current instance during the look-back period.</p></li>
527 /// <li>
528 /// <p><b> <code>EBSIOPSOverprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
529 /// <li>
530 /// <p><b> <code>EBSIOPSUnderprovisioned</code> </b> — 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 <code>VolumeReadOps</code> and <code>VolumeWriteOps</code> metric of EBS volumes attached to the current instance during the look-back period.</p></li>
531 /// <li>
532 /// <p><b> <code>NetworkBandwidthOverprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period.</p></li>
533 /// <li>
534 /// <p><b> <code>NetworkBandwidthUnderprovisioned</code> </b> — 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 <code>NetworkIn</code> and <code>NetworkOut</code> metrics of the current instance during the look-back period. This finding reason happens when the <code>NetworkIn</code> or <code>NetworkOut</code> performance of an instance is impacted.</p></li>
535 /// <li>
536 /// <p><b> <code>NetworkPPSOverprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
537 /// <li>
538 /// <p><b> <code>NetworkPPSUnderprovisioned</code> </b> — 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 <code>NetworkPacketsIn</code> and <code>NetworkPacketsIn</code> metrics of the current instance during the look-back period.</p></li>
539 /// <li>
540 /// <p><b> <code>DiskIOPSOverprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
541 /// <li>
542 /// <p><b> <code>DiskIOPSUnderprovisioned</code> </b> — 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 <code>DiskReadOps</code> and <code>DiskWriteOps</code> metrics of the current instance during the look-back period.</p></li>
543 /// <li>
544 /// <p><b> <code>DiskThroughputOverprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
545 /// <li>
546 /// <p><b> <code>DiskThroughputUnderprovisioned</code> </b> — 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 <code>DiskReadBytes</code> and <code>DiskWriteBytes</code> metrics of the current instance during the look-back period.</p></li>
547 /// </ul><note>
548 /// <p>For more information about instance metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.html">List the available CloudWatch metrics for your instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about EBS volume metrics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html">Amazon CloudWatch metrics for Amazon EBS</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
549 /// </note>
550 pub fn get_finding_reason_codes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceRecommendationFindingReasonCode>> {
551 &self.finding_reason_codes
552 }
553 /// Appends an item to `utilization_metrics`.
554 ///
555 /// To override the contents of this collection use [`set_utilization_metrics`](Self::set_utilization_metrics).
556 ///
557 /// <p>An array of objects that describe the utilization metrics of the instance.</p>
558 pub fn utilization_metrics(mut self, input: crate::types::UtilizationMetric) -> Self {
559 let mut v = self.utilization_metrics.unwrap_or_default();
560 v.push(input);
561 self.utilization_metrics = ::std::option::Option::Some(v);
562 self
563 }
564 /// <p>An array of objects that describe the utilization metrics of the instance.</p>
565 pub fn set_utilization_metrics(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UtilizationMetric>>) -> Self {
566 self.utilization_metrics = input;
567 self
568 }
569 /// <p>An array of objects that describe the utilization metrics of the instance.</p>
570 pub fn get_utilization_metrics(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UtilizationMetric>> {
571 &self.utilization_metrics
572 }
573 /// <p>The number of days for which utilization metrics were analyzed for the instance.</p>
574 pub fn look_back_period_in_days(mut self, input: f64) -> Self {
575 self.look_back_period_in_days = ::std::option::Option::Some(input);
576 self
577 }
578 /// <p>The number of days for which utilization metrics were analyzed for the instance.</p>
579 pub fn set_look_back_period_in_days(mut self, input: ::std::option::Option<f64>) -> Self {
580 self.look_back_period_in_days = input;
581 self
582 }
583 /// <p>The number of days for which utilization metrics were analyzed for the instance.</p>
584 pub fn get_look_back_period_in_days(&self) -> &::std::option::Option<f64> {
585 &self.look_back_period_in_days
586 }
587 /// Appends an item to `recommendation_options`.
588 ///
589 /// To override the contents of this collection use [`set_recommendation_options`](Self::set_recommendation_options).
590 ///
591 /// <p>An array of objects that describe the recommendation options for the instance.</p>
592 pub fn recommendation_options(mut self, input: crate::types::InstanceRecommendationOption) -> Self {
593 let mut v = self.recommendation_options.unwrap_or_default();
594 v.push(input);
595 self.recommendation_options = ::std::option::Option::Some(v);
596 self
597 }
598 /// <p>An array of objects that describe the recommendation options for the instance.</p>
599 pub fn set_recommendation_options(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceRecommendationOption>>) -> Self {
600 self.recommendation_options = input;
601 self
602 }
603 /// <p>An array of objects that describe the recommendation options for the instance.</p>
604 pub fn get_recommendation_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceRecommendationOption>> {
605 &self.recommendation_options
606 }
607 /// Appends an item to `recommendation_sources`.
608 ///
609 /// To override the contents of this collection use [`set_recommendation_sources`](Self::set_recommendation_sources).
610 ///
611 /// <p>An array of objects that describe the source resource of the recommendation.</p>
612 pub fn recommendation_sources(mut self, input: crate::types::RecommendationSource) -> Self {
613 let mut v = self.recommendation_sources.unwrap_or_default();
614 v.push(input);
615 self.recommendation_sources = ::std::option::Option::Some(v);
616 self
617 }
618 /// <p>An array of objects that describe the source resource of the recommendation.</p>
619 pub fn set_recommendation_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RecommendationSource>>) -> Self {
620 self.recommendation_sources = input;
621 self
622 }
623 /// <p>An array of objects that describe the source resource of the recommendation.</p>
624 pub fn get_recommendation_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RecommendationSource>> {
625 &self.recommendation_sources
626 }
627 /// <p>The timestamp of when the instance recommendation was last generated.</p>
628 pub fn last_refresh_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
629 self.last_refresh_timestamp = ::std::option::Option::Some(input);
630 self
631 }
632 /// <p>The timestamp of when the instance recommendation was last generated.</p>
633 pub fn set_last_refresh_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
634 self.last_refresh_timestamp = input;
635 self
636 }
637 /// <p>The timestamp of when the instance recommendation was last generated.</p>
638 pub fn get_last_refresh_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
639 &self.last_refresh_timestamp
640 }
641 /// <p>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.</p>
642 pub fn current_performance_risk(mut self, input: crate::types::CurrentPerformanceRisk) -> Self {
643 self.current_performance_risk = ::std::option::Option::Some(input);
644 self
645 }
646 /// <p>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.</p>
647 pub fn set_current_performance_risk(mut self, input: ::std::option::Option<crate::types::CurrentPerformanceRisk>) -> Self {
648 self.current_performance_risk = input;
649 self
650 }
651 /// <p>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.</p>
652 pub fn get_current_performance_risk(&self) -> &::std::option::Option<crate::types::CurrentPerformanceRisk> {
653 &self.current_performance_risk
654 }
655 /// <p>An object that describes the effective recommendation preferences for the instance.</p>
656 pub fn effective_recommendation_preferences(mut self, input: crate::types::EffectiveRecommendationPreferences) -> Self {
657 self.effective_recommendation_preferences = ::std::option::Option::Some(input);
658 self
659 }
660 /// <p>An object that describes the effective recommendation preferences for the instance.</p>
661 pub fn set_effective_recommendation_preferences(
662 mut self,
663 input: ::std::option::Option<crate::types::EffectiveRecommendationPreferences>,
664 ) -> Self {
665 self.effective_recommendation_preferences = input;
666 self
667 }
668 /// <p>An object that describes the effective recommendation preferences for the instance.</p>
669 pub fn get_effective_recommendation_preferences(&self) -> &::std::option::Option<crate::types::EffectiveRecommendationPreferences> {
670 &self.effective_recommendation_preferences
671 }
672 /// Appends an item to `inferred_workload_types`.
673 ///
674 /// To override the contents of this collection use [`set_inferred_workload_types`](Self::set_inferred_workload_types).
675 ///
676 /// <p>The applications that might be running on the instance as inferred by Compute Optimizer.</p>
677 /// <p>Compute Optimizer can infer if one of the following applications might be running on the instance:</p>
678 /// <ul>
679 /// <li>
680 /// <p><code>AmazonEmr</code> - Infers that Amazon EMR might be running on the instance.</p></li>
681 /// <li>
682 /// <p><code>ApacheCassandra</code> - Infers that Apache Cassandra might be running on the instance.</p></li>
683 /// <li>
684 /// <p><code>ApacheHadoop</code> - Infers that Apache Hadoop might be running on the instance.</p></li>
685 /// <li>
686 /// <p><code>Memcached</code> - Infers that Memcached might be running on the instance.</p></li>
687 /// <li>
688 /// <p><code>NGINX</code> - Infers that NGINX might be running on the instance.</p></li>
689 /// <li>
690 /// <p><code>PostgreSql</code> - Infers that PostgreSQL might be running on the instance.</p></li>
691 /// <li>
692 /// <p><code>Redis</code> - Infers that Redis might be running on the instance.</p></li>
693 /// <li>
694 /// <p><code>Kafka</code> - Infers that Kafka might be running on the instance.</p></li>
695 /// <li>
696 /// <p><code>SQLServer</code> - Infers that SQLServer might be running on the instance.</p></li>
697 /// </ul>
698 pub fn inferred_workload_types(mut self, input: crate::types::InferredWorkloadType) -> Self {
699 let mut v = self.inferred_workload_types.unwrap_or_default();
700 v.push(input);
701 self.inferred_workload_types = ::std::option::Option::Some(v);
702 self
703 }
704 /// <p>The applications that might be running on the instance as inferred by Compute Optimizer.</p>
705 /// <p>Compute Optimizer can infer if one of the following applications might be running on the instance:</p>
706 /// <ul>
707 /// <li>
708 /// <p><code>AmazonEmr</code> - Infers that Amazon EMR might be running on the instance.</p></li>
709 /// <li>
710 /// <p><code>ApacheCassandra</code> - Infers that Apache Cassandra might be running on the instance.</p></li>
711 /// <li>
712 /// <p><code>ApacheHadoop</code> - Infers that Apache Hadoop might be running on the instance.</p></li>
713 /// <li>
714 /// <p><code>Memcached</code> - Infers that Memcached might be running on the instance.</p></li>
715 /// <li>
716 /// <p><code>NGINX</code> - Infers that NGINX might be running on the instance.</p></li>
717 /// <li>
718 /// <p><code>PostgreSql</code> - Infers that PostgreSQL might be running on the instance.</p></li>
719 /// <li>
720 /// <p><code>Redis</code> - Infers that Redis might be running on the instance.</p></li>
721 /// <li>
722 /// <p><code>Kafka</code> - Infers that Kafka might be running on the instance.</p></li>
723 /// <li>
724 /// <p><code>SQLServer</code> - Infers that SQLServer might be running on the instance.</p></li>
725 /// </ul>
726 pub fn set_inferred_workload_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InferredWorkloadType>>) -> Self {
727 self.inferred_workload_types = input;
728 self
729 }
730 /// <p>The applications that might be running on the instance as inferred by Compute Optimizer.</p>
731 /// <p>Compute Optimizer can infer if one of the following applications might be running on the instance:</p>
732 /// <ul>
733 /// <li>
734 /// <p><code>AmazonEmr</code> - Infers that Amazon EMR might be running on the instance.</p></li>
735 /// <li>
736 /// <p><code>ApacheCassandra</code> - Infers that Apache Cassandra might be running on the instance.</p></li>
737 /// <li>
738 /// <p><code>ApacheHadoop</code> - Infers that Apache Hadoop might be running on the instance.</p></li>
739 /// <li>
740 /// <p><code>Memcached</code> - Infers that Memcached might be running on the instance.</p></li>
741 /// <li>
742 /// <p><code>NGINX</code> - Infers that NGINX might be running on the instance.</p></li>
743 /// <li>
744 /// <p><code>PostgreSql</code> - Infers that PostgreSQL might be running on the instance.</p></li>
745 /// <li>
746 /// <p><code>Redis</code> - Infers that Redis might be running on the instance.</p></li>
747 /// <li>
748 /// <p><code>Kafka</code> - Infers that Kafka might be running on the instance.</p></li>
749 /// <li>
750 /// <p><code>SQLServer</code> - Infers that SQLServer might be running on the instance.</p></li>
751 /// </ul>
752 pub fn get_inferred_workload_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InferredWorkloadType>> {
753 &self.inferred_workload_types
754 }
755 /// <p>The state of the instance when the recommendation was generated.</p>
756 pub fn instance_state(mut self, input: crate::types::InstanceState) -> Self {
757 self.instance_state = ::std::option::Option::Some(input);
758 self
759 }
760 /// <p>The state of the instance when the recommendation was generated.</p>
761 pub fn set_instance_state(mut self, input: ::std::option::Option<crate::types::InstanceState>) -> Self {
762 self.instance_state = input;
763 self
764 }
765 /// <p>The state of the instance when the recommendation was generated.</p>
766 pub fn get_instance_state(&self) -> &::std::option::Option<crate::types::InstanceState> {
767 &self.instance_state
768 }
769 /// Appends an item to `tags`.
770 ///
771 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
772 ///
773 /// <p>A list of tags assigned to your Amazon EC2 instance recommendations.</p>
774 pub fn tags(mut self, input: crate::types::Tag) -> Self {
775 let mut v = self.tags.unwrap_or_default();
776 v.push(input);
777 self.tags = ::std::option::Option::Some(v);
778 self
779 }
780 /// <p>A list of tags assigned to your Amazon EC2 instance recommendations.</p>
781 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
782 self.tags = input;
783 self
784 }
785 /// <p>A list of tags assigned to your Amazon EC2 instance recommendations.</p>
786 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
787 &self.tags
788 }
789 /// <p>An object that describes Compute Optimizer's integration status with your external metrics provider.</p>
790 pub fn external_metric_status(mut self, input: crate::types::ExternalMetricStatus) -> Self {
791 self.external_metric_status = ::std::option::Option::Some(input);
792 self
793 }
794 /// <p>An object that describes Compute Optimizer's integration status with your external metrics provider.</p>
795 pub fn set_external_metric_status(mut self, input: ::std::option::Option<crate::types::ExternalMetricStatus>) -> Self {
796 self.external_metric_status = input;
797 self
798 }
799 /// <p>An object that describes Compute Optimizer's integration status with your external metrics provider.</p>
800 pub fn get_external_metric_status(&self) -> &::std::option::Option<crate::types::ExternalMetricStatus> {
801 &self.external_metric_status
802 }
803 /// <p>Describes the GPU accelerator settings for the current instance type.</p>
804 pub fn current_instance_gpu_info(mut self, input: crate::types::GpuInfo) -> Self {
805 self.current_instance_gpu_info = ::std::option::Option::Some(input);
806 self
807 }
808 /// <p>Describes the GPU accelerator settings for the current instance type.</p>
809 pub fn set_current_instance_gpu_info(mut self, input: ::std::option::Option<crate::types::GpuInfo>) -> Self {
810 self.current_instance_gpu_info = input;
811 self
812 }
813 /// <p>Describes the GPU accelerator settings for the current instance type.</p>
814 pub fn get_current_instance_gpu_info(&self) -> &::std::option::Option<crate::types::GpuInfo> {
815 &self.current_instance_gpu_info
816 }
817 /// <p>Describes if an Amazon EC2 instance is idle.</p>
818 pub fn idle(mut self, input: crate::types::InstanceIdle) -> Self {
819 self.idle = ::std::option::Option::Some(input);
820 self
821 }
822 /// <p>Describes if an Amazon EC2 instance is idle.</p>
823 pub fn set_idle(mut self, input: ::std::option::Option<crate::types::InstanceIdle>) -> Self {
824 self.idle = input;
825 self
826 }
827 /// <p>Describes if an Amazon EC2 instance is idle.</p>
828 pub fn get_idle(&self) -> &::std::option::Option<crate::types::InstanceIdle> {
829 &self.idle
830 }
831 /// Consumes the builder and constructs a [`InstanceRecommendation`](crate::types::InstanceRecommendation).
832 pub fn build(self) -> crate::types::InstanceRecommendation {
833 crate::types::InstanceRecommendation {
834 instance_arn: self.instance_arn,
835 account_id: self.account_id,
836 instance_name: self.instance_name,
837 current_instance_type: self.current_instance_type,
838 finding: self.finding,
839 finding_reason_codes: self.finding_reason_codes,
840 utilization_metrics: self.utilization_metrics,
841 look_back_period_in_days: self.look_back_period_in_days.unwrap_or_default(),
842 recommendation_options: self.recommendation_options,
843 recommendation_sources: self.recommendation_sources,
844 last_refresh_timestamp: self.last_refresh_timestamp,
845 current_performance_risk: self.current_performance_risk,
846 effective_recommendation_preferences: self.effective_recommendation_preferences,
847 inferred_workload_types: self.inferred_workload_types,
848 instance_state: self.instance_state,
849 tags: self.tags,
850 external_metric_status: self.external_metric_status,
851 current_instance_gpu_info: self.current_instance_gpu_info,
852 idle: self.idle,
853 }
854 }
855}