Skip to main content

aws_sdk_computeoptimizer/types/
_utilization_metric.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes a utilization metric of a resource, such as an Amazon EC2 instance.</p>
4/// <p>Compare the utilization metric data of your resource against its projected utilization metric data to determine the performance difference between your current resource and the recommended option.</p>
5#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct UtilizationMetric {
8    /// <p>The name of the utilization metric.</p>
9    /// <p>The following utilization metrics are available:</p>
10    /// <ul>
11    /// <li>
12    /// <p><code>Cpu</code> - The percentage of allocated EC2 compute units that are currently in use on the instance. This metric identifies the processing power required to run an application on the instance.</p>
13    /// <p>Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when the instance is not allocated a full processor core.</p>
14    /// <p>Units: Percent</p></li>
15    /// <li>
16    /// <p><code>Memory</code> - The percentage of memory that is currently in use on the instance. This metric identifies the amount of memory required to run an application on the instance.</p>
17    /// <p>Units: Percent</p><note>
18    /// <p>The <code>Memory</code> metric is returned 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 CloudWatch Agent</a>.</p>
19    /// </note></li>
20    /// <li>
21    /// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
22    /// <li>
23    /// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
24    /// <p>The <code>GPU</code> and <code>GPU_MEMORY</code> metrics are only returned for resources with the unified CloudWatch Agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#nvidia-cw-agent">Enabling NVIDIA GPU utilization with the CloudWatch Agent</a>.</p>
25    /// </note></li>
26    /// <li>
27    /// <p><code>EBS_READ_OPS_PER_SECOND</code> - The completed read operations from all EBS volumes attached to the instance in a specified period of time.</p>
28    /// <p>Unit: Count</p></li>
29    /// <li>
30    /// <p><code>EBS_WRITE_OPS_PER_SECOND</code> - The completed write operations to all EBS volumes attached to the instance in a specified period of time.</p>
31    /// <p>Unit: Count</p></li>
32    /// <li>
33    /// <p><code>EBS_READ_BYTES_PER_SECOND</code> - The bytes read from all EBS volumes attached to the instance in a specified period of time.</p>
34    /// <p>Unit: Bytes</p></li>
35    /// <li>
36    /// <p><code>EBS_WRITE_BYTES_PER_SECOND</code> - The bytes written to all EBS volumes attached to the instance in a specified period of time.</p>
37    /// <p>Unit: Bytes</p></li>
38    /// <li>
39    /// <p><code>DISK_READ_OPS_PER_SECOND</code> - The completed read operations from all instance store volumes available to the instance in a specified period of time.</p>
40    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
41    /// <li>
42    /// <p><code>DISK_WRITE_OPS_PER_SECOND</code> - The completed write operations from all instance store volumes available to the instance in a specified period of time.</p>
43    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
44    /// <li>
45    /// <p><code>DISK_READ_BYTES_PER_SECOND</code> - The bytes read from all instance store volumes available to the instance. This metric is used to determine the volume of the data the application reads from the disk of the instance. This can be used to determine the speed of the application.</p>
46    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
47    /// <li>
48    /// <p><code>DISK_WRITE_BYTES_PER_SECOND</code> - The bytes written to all instance store volumes available to the instance. This metric is used to determine the volume of the data the application writes onto the disk of the instance. This can be used to determine the speed of the application.</p>
49    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
50    /// <li>
51    /// <p><code>NETWORK_IN_BYTES_PER_SECOND</code> - The number of bytes received by the instance on all network interfaces. This metric identifies the volume of incoming network traffic to a single instance.</p></li>
52    /// <li>
53    /// <p><code>NETWORK_OUT_BYTES_PER_SECOND</code> - The number of bytes sent out by the instance on all network interfaces. This metric identifies the volume of outgoing network traffic from a single instance.</p></li>
54    /// <li>
55    /// <p><code>NETWORK_PACKETS_IN_PER_SECOND</code> - The number of packets received by the instance on all network interfaces. This metric identifies the volume of incoming traffic in terms of the number of packets on a single instance.</p></li>
56    /// <li>
57    /// <p><code>NETWORK_PACKETS_OUT_PER_SECOND</code> - The number of packets sent out by the instance on all network interfaces. This metric identifies the volume of outgoing traffic in terms of the number of packets on a single instance.</p></li>
58    /// </ul>
59    pub name: ::std::option::Option<crate::types::MetricName>,
60    /// <p>The statistic of the utilization metric.</p>
61    /// <p>The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the <code>Maximum</code> statistic, which is the highest value observed during the specified period.</p>
62    /// <p>The Compute Optimizer console displays graphs for some utilization metrics using the <code>Average</code> statistic, which is the value of <code>Sum</code> / <code>SampleCount</code> during the specified period. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html">Viewing resource recommendations</a> in the <i>Compute Optimizer User Guide</i>. You can also get averaged utilization metric data for your resources using Amazon CloudWatch. For more information, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html">Amazon CloudWatch User Guide</a>.</p>
63    pub statistic: ::std::option::Option<crate::types::MetricStatistic>,
64    /// <p>The value of the utilization metric.</p>
65    pub value: f64,
66}
67impl UtilizationMetric {
68    /// <p>The name of the utilization metric.</p>
69    /// <p>The following utilization metrics are available:</p>
70    /// <ul>
71    /// <li>
72    /// <p><code>Cpu</code> - The percentage of allocated EC2 compute units that are currently in use on the instance. This metric identifies the processing power required to run an application on the instance.</p>
73    /// <p>Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when the instance is not allocated a full processor core.</p>
74    /// <p>Units: Percent</p></li>
75    /// <li>
76    /// <p><code>Memory</code> - The percentage of memory that is currently in use on the instance. This metric identifies the amount of memory required to run an application on the instance.</p>
77    /// <p>Units: Percent</p><note>
78    /// <p>The <code>Memory</code> metric is returned 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 CloudWatch Agent</a>.</p>
79    /// </note></li>
80    /// <li>
81    /// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
82    /// <li>
83    /// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
84    /// <p>The <code>GPU</code> and <code>GPU_MEMORY</code> metrics are only returned for resources with the unified CloudWatch Agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#nvidia-cw-agent">Enabling NVIDIA GPU utilization with the CloudWatch Agent</a>.</p>
85    /// </note></li>
86    /// <li>
87    /// <p><code>EBS_READ_OPS_PER_SECOND</code> - The completed read operations from all EBS volumes attached to the instance in a specified period of time.</p>
88    /// <p>Unit: Count</p></li>
89    /// <li>
90    /// <p><code>EBS_WRITE_OPS_PER_SECOND</code> - The completed write operations to all EBS volumes attached to the instance in a specified period of time.</p>
91    /// <p>Unit: Count</p></li>
92    /// <li>
93    /// <p><code>EBS_READ_BYTES_PER_SECOND</code> - The bytes read from all EBS volumes attached to the instance in a specified period of time.</p>
94    /// <p>Unit: Bytes</p></li>
95    /// <li>
96    /// <p><code>EBS_WRITE_BYTES_PER_SECOND</code> - The bytes written to all EBS volumes attached to the instance in a specified period of time.</p>
97    /// <p>Unit: Bytes</p></li>
98    /// <li>
99    /// <p><code>DISK_READ_OPS_PER_SECOND</code> - The completed read operations from all instance store volumes available to the instance in a specified period of time.</p>
100    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
101    /// <li>
102    /// <p><code>DISK_WRITE_OPS_PER_SECOND</code> - The completed write operations from all instance store volumes available to the instance in a specified period of time.</p>
103    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
104    /// <li>
105    /// <p><code>DISK_READ_BYTES_PER_SECOND</code> - The bytes read from all instance store volumes available to the instance. This metric is used to determine the volume of the data the application reads from the disk of the instance. This can be used to determine the speed of the application.</p>
106    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
107    /// <li>
108    /// <p><code>DISK_WRITE_BYTES_PER_SECOND</code> - The bytes written to all instance store volumes available to the instance. This metric is used to determine the volume of the data the application writes onto the disk of the instance. This can be used to determine the speed of the application.</p>
109    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
110    /// <li>
111    /// <p><code>NETWORK_IN_BYTES_PER_SECOND</code> - The number of bytes received by the instance on all network interfaces. This metric identifies the volume of incoming network traffic to a single instance.</p></li>
112    /// <li>
113    /// <p><code>NETWORK_OUT_BYTES_PER_SECOND</code> - The number of bytes sent out by the instance on all network interfaces. This metric identifies the volume of outgoing network traffic from a single instance.</p></li>
114    /// <li>
115    /// <p><code>NETWORK_PACKETS_IN_PER_SECOND</code> - The number of packets received by the instance on all network interfaces. This metric identifies the volume of incoming traffic in terms of the number of packets on a single instance.</p></li>
116    /// <li>
117    /// <p><code>NETWORK_PACKETS_OUT_PER_SECOND</code> - The number of packets sent out by the instance on all network interfaces. This metric identifies the volume of outgoing traffic in terms of the number of packets on a single instance.</p></li>
118    /// </ul>
119    pub fn name(&self) -> ::std::option::Option<&crate::types::MetricName> {
120        self.name.as_ref()
121    }
122    /// <p>The statistic of the utilization metric.</p>
123    /// <p>The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the <code>Maximum</code> statistic, which is the highest value observed during the specified period.</p>
124    /// <p>The Compute Optimizer console displays graphs for some utilization metrics using the <code>Average</code> statistic, which is the value of <code>Sum</code> / <code>SampleCount</code> during the specified period. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html">Viewing resource recommendations</a> in the <i>Compute Optimizer User Guide</i>. You can also get averaged utilization metric data for your resources using Amazon CloudWatch. For more information, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html">Amazon CloudWatch User Guide</a>.</p>
125    pub fn statistic(&self) -> ::std::option::Option<&crate::types::MetricStatistic> {
126        self.statistic.as_ref()
127    }
128    /// <p>The value of the utilization metric.</p>
129    pub fn value(&self) -> f64 {
130        self.value
131    }
132}
133impl UtilizationMetric {
134    /// Creates a new builder-style object to manufacture [`UtilizationMetric`](crate::types::UtilizationMetric).
135    pub fn builder() -> crate::types::builders::UtilizationMetricBuilder {
136        crate::types::builders::UtilizationMetricBuilder::default()
137    }
138}
139
140/// A builder for [`UtilizationMetric`](crate::types::UtilizationMetric).
141#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
142#[non_exhaustive]
143pub struct UtilizationMetricBuilder {
144    pub(crate) name: ::std::option::Option<crate::types::MetricName>,
145    pub(crate) statistic: ::std::option::Option<crate::types::MetricStatistic>,
146    pub(crate) value: ::std::option::Option<f64>,
147}
148impl UtilizationMetricBuilder {
149    /// <p>The name of the utilization metric.</p>
150    /// <p>The following utilization metrics are available:</p>
151    /// <ul>
152    /// <li>
153    /// <p><code>Cpu</code> - The percentage of allocated EC2 compute units that are currently in use on the instance. This metric identifies the processing power required to run an application on the instance.</p>
154    /// <p>Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when the instance is not allocated a full processor core.</p>
155    /// <p>Units: Percent</p></li>
156    /// <li>
157    /// <p><code>Memory</code> - The percentage of memory that is currently in use on the instance. This metric identifies the amount of memory required to run an application on the instance.</p>
158    /// <p>Units: Percent</p><note>
159    /// <p>The <code>Memory</code> metric is returned 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 CloudWatch Agent</a>.</p>
160    /// </note></li>
161    /// <li>
162    /// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
163    /// <li>
164    /// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
165    /// <p>The <code>GPU</code> and <code>GPU_MEMORY</code> metrics are only returned for resources with the unified CloudWatch Agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#nvidia-cw-agent">Enabling NVIDIA GPU utilization with the CloudWatch Agent</a>.</p>
166    /// </note></li>
167    /// <li>
168    /// <p><code>EBS_READ_OPS_PER_SECOND</code> - The completed read operations from all EBS volumes attached to the instance in a specified period of time.</p>
169    /// <p>Unit: Count</p></li>
170    /// <li>
171    /// <p><code>EBS_WRITE_OPS_PER_SECOND</code> - The completed write operations to all EBS volumes attached to the instance in a specified period of time.</p>
172    /// <p>Unit: Count</p></li>
173    /// <li>
174    /// <p><code>EBS_READ_BYTES_PER_SECOND</code> - The bytes read from all EBS volumes attached to the instance in a specified period of time.</p>
175    /// <p>Unit: Bytes</p></li>
176    /// <li>
177    /// <p><code>EBS_WRITE_BYTES_PER_SECOND</code> - The bytes written to all EBS volumes attached to the instance in a specified period of time.</p>
178    /// <p>Unit: Bytes</p></li>
179    /// <li>
180    /// <p><code>DISK_READ_OPS_PER_SECOND</code> - The completed read operations from all instance store volumes available to the instance in a specified period of time.</p>
181    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
182    /// <li>
183    /// <p><code>DISK_WRITE_OPS_PER_SECOND</code> - The completed write operations from all instance store volumes available to the instance in a specified period of time.</p>
184    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
185    /// <li>
186    /// <p><code>DISK_READ_BYTES_PER_SECOND</code> - The bytes read from all instance store volumes available to the instance. This metric is used to determine the volume of the data the application reads from the disk of the instance. This can be used to determine the speed of the application.</p>
187    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
188    /// <li>
189    /// <p><code>DISK_WRITE_BYTES_PER_SECOND</code> - The bytes written to all instance store volumes available to the instance. This metric is used to determine the volume of the data the application writes onto the disk of the instance. This can be used to determine the speed of the application.</p>
190    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
191    /// <li>
192    /// <p><code>NETWORK_IN_BYTES_PER_SECOND</code> - The number of bytes received by the instance on all network interfaces. This metric identifies the volume of incoming network traffic to a single instance.</p></li>
193    /// <li>
194    /// <p><code>NETWORK_OUT_BYTES_PER_SECOND</code> - The number of bytes sent out by the instance on all network interfaces. This metric identifies the volume of outgoing network traffic from a single instance.</p></li>
195    /// <li>
196    /// <p><code>NETWORK_PACKETS_IN_PER_SECOND</code> - The number of packets received by the instance on all network interfaces. This metric identifies the volume of incoming traffic in terms of the number of packets on a single instance.</p></li>
197    /// <li>
198    /// <p><code>NETWORK_PACKETS_OUT_PER_SECOND</code> - The number of packets sent out by the instance on all network interfaces. This metric identifies the volume of outgoing traffic in terms of the number of packets on a single instance.</p></li>
199    /// </ul>
200    pub fn name(mut self, input: crate::types::MetricName) -> Self {
201        self.name = ::std::option::Option::Some(input);
202        self
203    }
204    /// <p>The name of the utilization metric.</p>
205    /// <p>The following utilization metrics are available:</p>
206    /// <ul>
207    /// <li>
208    /// <p><code>Cpu</code> - The percentage of allocated EC2 compute units that are currently in use on the instance. This metric identifies the processing power required to run an application on the instance.</p>
209    /// <p>Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when the instance is not allocated a full processor core.</p>
210    /// <p>Units: Percent</p></li>
211    /// <li>
212    /// <p><code>Memory</code> - The percentage of memory that is currently in use on the instance. This metric identifies the amount of memory required to run an application on the instance.</p>
213    /// <p>Units: Percent</p><note>
214    /// <p>The <code>Memory</code> metric is returned 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 CloudWatch Agent</a>.</p>
215    /// </note></li>
216    /// <li>
217    /// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
218    /// <li>
219    /// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
220    /// <p>The <code>GPU</code> and <code>GPU_MEMORY</code> metrics are only returned for resources with the unified CloudWatch Agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#nvidia-cw-agent">Enabling NVIDIA GPU utilization with the CloudWatch Agent</a>.</p>
221    /// </note></li>
222    /// <li>
223    /// <p><code>EBS_READ_OPS_PER_SECOND</code> - The completed read operations from all EBS volumes attached to the instance in a specified period of time.</p>
224    /// <p>Unit: Count</p></li>
225    /// <li>
226    /// <p><code>EBS_WRITE_OPS_PER_SECOND</code> - The completed write operations to all EBS volumes attached to the instance in a specified period of time.</p>
227    /// <p>Unit: Count</p></li>
228    /// <li>
229    /// <p><code>EBS_READ_BYTES_PER_SECOND</code> - The bytes read from all EBS volumes attached to the instance in a specified period of time.</p>
230    /// <p>Unit: Bytes</p></li>
231    /// <li>
232    /// <p><code>EBS_WRITE_BYTES_PER_SECOND</code> - The bytes written to all EBS volumes attached to the instance in a specified period of time.</p>
233    /// <p>Unit: Bytes</p></li>
234    /// <li>
235    /// <p><code>DISK_READ_OPS_PER_SECOND</code> - The completed read operations from all instance store volumes available to the instance in a specified period of time.</p>
236    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
237    /// <li>
238    /// <p><code>DISK_WRITE_OPS_PER_SECOND</code> - The completed write operations from all instance store volumes available to the instance in a specified period of time.</p>
239    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
240    /// <li>
241    /// <p><code>DISK_READ_BYTES_PER_SECOND</code> - The bytes read from all instance store volumes available to the instance. This metric is used to determine the volume of the data the application reads from the disk of the instance. This can be used to determine the speed of the application.</p>
242    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
243    /// <li>
244    /// <p><code>DISK_WRITE_BYTES_PER_SECOND</code> - The bytes written to all instance store volumes available to the instance. This metric is used to determine the volume of the data the application writes onto the disk of the instance. This can be used to determine the speed of the application.</p>
245    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
246    /// <li>
247    /// <p><code>NETWORK_IN_BYTES_PER_SECOND</code> - The number of bytes received by the instance on all network interfaces. This metric identifies the volume of incoming network traffic to a single instance.</p></li>
248    /// <li>
249    /// <p><code>NETWORK_OUT_BYTES_PER_SECOND</code> - The number of bytes sent out by the instance on all network interfaces. This metric identifies the volume of outgoing network traffic from a single instance.</p></li>
250    /// <li>
251    /// <p><code>NETWORK_PACKETS_IN_PER_SECOND</code> - The number of packets received by the instance on all network interfaces. This metric identifies the volume of incoming traffic in terms of the number of packets on a single instance.</p></li>
252    /// <li>
253    /// <p><code>NETWORK_PACKETS_OUT_PER_SECOND</code> - The number of packets sent out by the instance on all network interfaces. This metric identifies the volume of outgoing traffic in terms of the number of packets on a single instance.</p></li>
254    /// </ul>
255    pub fn set_name(mut self, input: ::std::option::Option<crate::types::MetricName>) -> Self {
256        self.name = input;
257        self
258    }
259    /// <p>The name of the utilization metric.</p>
260    /// <p>The following utilization metrics are available:</p>
261    /// <ul>
262    /// <li>
263    /// <p><code>Cpu</code> - The percentage of allocated EC2 compute units that are currently in use on the instance. This metric identifies the processing power required to run an application on the instance.</p>
264    /// <p>Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when the instance is not allocated a full processor core.</p>
265    /// <p>Units: Percent</p></li>
266    /// <li>
267    /// <p><code>Memory</code> - The percentage of memory that is currently in use on the instance. This metric identifies the amount of memory required to run an application on the instance.</p>
268    /// <p>Units: Percent</p><note>
269    /// <p>The <code>Memory</code> metric is returned 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 CloudWatch Agent</a>.</p>
270    /// </note></li>
271    /// <li>
272    /// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
273    /// <li>
274    /// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
275    /// <p>The <code>GPU</code> and <code>GPU_MEMORY</code> metrics are only returned for resources with the unified CloudWatch Agent installed on them. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/metrics.html#nvidia-cw-agent">Enabling NVIDIA GPU utilization with the CloudWatch Agent</a>.</p>
276    /// </note></li>
277    /// <li>
278    /// <p><code>EBS_READ_OPS_PER_SECOND</code> - The completed read operations from all EBS volumes attached to the instance in a specified period of time.</p>
279    /// <p>Unit: Count</p></li>
280    /// <li>
281    /// <p><code>EBS_WRITE_OPS_PER_SECOND</code> - The completed write operations to all EBS volumes attached to the instance in a specified period of time.</p>
282    /// <p>Unit: Count</p></li>
283    /// <li>
284    /// <p><code>EBS_READ_BYTES_PER_SECOND</code> - The bytes read from all EBS volumes attached to the instance in a specified period of time.</p>
285    /// <p>Unit: Bytes</p></li>
286    /// <li>
287    /// <p><code>EBS_WRITE_BYTES_PER_SECOND</code> - The bytes written to all EBS volumes attached to the instance in a specified period of time.</p>
288    /// <p>Unit: Bytes</p></li>
289    /// <li>
290    /// <p><code>DISK_READ_OPS_PER_SECOND</code> - The completed read operations from all instance store volumes available to the instance in a specified period of time.</p>
291    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
292    /// <li>
293    /// <p><code>DISK_WRITE_OPS_PER_SECOND</code> - The completed write operations from all instance store volumes available to the instance in a specified period of time.</p>
294    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
295    /// <li>
296    /// <p><code>DISK_READ_BYTES_PER_SECOND</code> - The bytes read from all instance store volumes available to the instance. This metric is used to determine the volume of the data the application reads from the disk of the instance. This can be used to determine the speed of the application.</p>
297    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
298    /// <li>
299    /// <p><code>DISK_WRITE_BYTES_PER_SECOND</code> - The bytes written to all instance store volumes available to the instance. This metric is used to determine the volume of the data the application writes onto the disk of the instance. This can be used to determine the speed of the application.</p>
300    /// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
301    /// <li>
302    /// <p><code>NETWORK_IN_BYTES_PER_SECOND</code> - The number of bytes received by the instance on all network interfaces. This metric identifies the volume of incoming network traffic to a single instance.</p></li>
303    /// <li>
304    /// <p><code>NETWORK_OUT_BYTES_PER_SECOND</code> - The number of bytes sent out by the instance on all network interfaces. This metric identifies the volume of outgoing network traffic from a single instance.</p></li>
305    /// <li>
306    /// <p><code>NETWORK_PACKETS_IN_PER_SECOND</code> - The number of packets received by the instance on all network interfaces. This metric identifies the volume of incoming traffic in terms of the number of packets on a single instance.</p></li>
307    /// <li>
308    /// <p><code>NETWORK_PACKETS_OUT_PER_SECOND</code> - The number of packets sent out by the instance on all network interfaces. This metric identifies the volume of outgoing traffic in terms of the number of packets on a single instance.</p></li>
309    /// </ul>
310    pub fn get_name(&self) -> &::std::option::Option<crate::types::MetricName> {
311        &self.name
312    }
313    /// <p>The statistic of the utilization metric.</p>
314    /// <p>The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the <code>Maximum</code> statistic, which is the highest value observed during the specified period.</p>
315    /// <p>The Compute Optimizer console displays graphs for some utilization metrics using the <code>Average</code> statistic, which is the value of <code>Sum</code> / <code>SampleCount</code> during the specified period. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html">Viewing resource recommendations</a> in the <i>Compute Optimizer User Guide</i>. You can also get averaged utilization metric data for your resources using Amazon CloudWatch. For more information, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html">Amazon CloudWatch User Guide</a>.</p>
316    pub fn statistic(mut self, input: crate::types::MetricStatistic) -> Self {
317        self.statistic = ::std::option::Option::Some(input);
318        self
319    }
320    /// <p>The statistic of the utilization metric.</p>
321    /// <p>The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the <code>Maximum</code> statistic, which is the highest value observed during the specified period.</p>
322    /// <p>The Compute Optimizer console displays graphs for some utilization metrics using the <code>Average</code> statistic, which is the value of <code>Sum</code> / <code>SampleCount</code> during the specified period. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html">Viewing resource recommendations</a> in the <i>Compute Optimizer User Guide</i>. You can also get averaged utilization metric data for your resources using Amazon CloudWatch. For more information, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html">Amazon CloudWatch User Guide</a>.</p>
323    pub fn set_statistic(mut self, input: ::std::option::Option<crate::types::MetricStatistic>) -> Self {
324        self.statistic = input;
325        self
326    }
327    /// <p>The statistic of the utilization metric.</p>
328    /// <p>The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the <code>Maximum</code> statistic, which is the highest value observed during the specified period.</p>
329    /// <p>The Compute Optimizer console displays graphs for some utilization metrics using the <code>Average</code> statistic, which is the value of <code>Sum</code> / <code>SampleCount</code> during the specified period. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/viewing-recommendations.html">Viewing resource recommendations</a> in the <i>Compute Optimizer User Guide</i>. You can also get averaged utilization metric data for your resources using Amazon CloudWatch. For more information, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html">Amazon CloudWatch User Guide</a>.</p>
330    pub fn get_statistic(&self) -> &::std::option::Option<crate::types::MetricStatistic> {
331        &self.statistic
332    }
333    /// <p>The value of the utilization metric.</p>
334    pub fn value(mut self, input: f64) -> Self {
335        self.value = ::std::option::Option::Some(input);
336        self
337    }
338    /// <p>The value of the utilization metric.</p>
339    pub fn set_value(mut self, input: ::std::option::Option<f64>) -> Self {
340        self.value = input;
341        self
342    }
343    /// <p>The value of the utilization metric.</p>
344    pub fn get_value(&self) -> &::std::option::Option<f64> {
345        &self.value
346    }
347    /// Consumes the builder and constructs a [`UtilizationMetric`](crate::types::UtilizationMetric).
348    pub fn build(self) -> crate::types::UtilizationMetric {
349        crate::types::UtilizationMetric {
350            name: self.name,
351            statistic: self.statistic,
352            value: self.value.unwrap_or_default(),
353        }
354    }
355}