1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes a utilization metric of a resource, such as an Amazon EC2 instance.</p>
/// <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>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UtilizationMetric {
/// <p>The name of the utilization metric.</p>
/// <p>The following utilization metrics are available:</p>
/// <ul>
/// <li>
/// <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>
/// <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>
/// <p>Units: Percent</p></li>
/// <li>
/// <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>
/// <p>Units: Percent</p><note>
/// <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>
/// </note></li>
/// <li>
/// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
/// <li>
/// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
/// <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>
/// </note></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub name: ::std::option::Option<crate::types::MetricName>,
/// <p>The statistic of the utilization metric.</p>
/// <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>
/// <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>
pub statistic: ::std::option::Option<crate::types::MetricStatistic>,
/// <p>The value of the utilization metric.</p>
pub value: f64,
}
impl UtilizationMetric {
/// <p>The name of the utilization metric.</p>
/// <p>The following utilization metrics are available:</p>
/// <ul>
/// <li>
/// <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>
/// <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>
/// <p>Units: Percent</p></li>
/// <li>
/// <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>
/// <p>Units: Percent</p><note>
/// <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>
/// </note></li>
/// <li>
/// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
/// <li>
/// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
/// <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>
/// </note></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn name(&self) -> ::std::option::Option<&crate::types::MetricName> {
self.name.as_ref()
}
/// <p>The statistic of the utilization metric.</p>
/// <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>
/// <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>
pub fn statistic(&self) -> ::std::option::Option<&crate::types::MetricStatistic> {
self.statistic.as_ref()
}
/// <p>The value of the utilization metric.</p>
pub fn value(&self) -> f64 {
self.value
}
}
impl UtilizationMetric {
/// Creates a new builder-style object to manufacture [`UtilizationMetric`](crate::types::UtilizationMetric).
pub fn builder() -> crate::types::builders::UtilizationMetricBuilder {
crate::types::builders::UtilizationMetricBuilder::default()
}
}
/// A builder for [`UtilizationMetric`](crate::types::UtilizationMetric).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UtilizationMetricBuilder {
pub(crate) name: ::std::option::Option<crate::types::MetricName>,
pub(crate) statistic: ::std::option::Option<crate::types::MetricStatistic>,
pub(crate) value: ::std::option::Option<f64>,
}
impl UtilizationMetricBuilder {
/// <p>The name of the utilization metric.</p>
/// <p>The following utilization metrics are available:</p>
/// <ul>
/// <li>
/// <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>
/// <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>
/// <p>Units: Percent</p></li>
/// <li>
/// <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>
/// <p>Units: Percent</p><note>
/// <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>
/// </note></li>
/// <li>
/// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
/// <li>
/// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
/// <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>
/// </note></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn name(mut self, input: crate::types::MetricName) -> Self {
self.name = ::std::option::Option::Some(input);
self
}
/// <p>The name of the utilization metric.</p>
/// <p>The following utilization metrics are available:</p>
/// <ul>
/// <li>
/// <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>
/// <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>
/// <p>Units: Percent</p></li>
/// <li>
/// <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>
/// <p>Units: Percent</p><note>
/// <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>
/// </note></li>
/// <li>
/// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
/// <li>
/// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
/// <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>
/// </note></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn set_name(mut self, input: ::std::option::Option<crate::types::MetricName>) -> Self {
self.name = input;
self
}
/// <p>The name of the utilization metric.</p>
/// <p>The following utilization metrics are available:</p>
/// <ul>
/// <li>
/// <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>
/// <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>
/// <p>Units: Percent</p></li>
/// <li>
/// <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>
/// <p>Units: Percent</p><note>
/// <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>
/// </note></li>
/// <li>
/// <p><code>GPU</code> - The percentage of allocated GPUs that currently run on the instance.</p></li>
/// <li>
/// <p><code>GPU_MEMORY</code> - The percentage of total GPU memory that currently runs on the instance.</p><note>
/// <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>
/// </note></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Count</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>Unit: Bytes</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <p>If there are no instance store volumes, either the value is <code>0</code> or the metric is not reported.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn get_name(&self) -> &::std::option::Option<crate::types::MetricName> {
&self.name
}
/// <p>The statistic of the utilization metric.</p>
/// <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>
/// <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>
pub fn statistic(mut self, input: crate::types::MetricStatistic) -> Self {
self.statistic = ::std::option::Option::Some(input);
self
}
/// <p>The statistic of the utilization metric.</p>
/// <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>
/// <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>
pub fn set_statistic(mut self, input: ::std::option::Option<crate::types::MetricStatistic>) -> Self {
self.statistic = input;
self
}
/// <p>The statistic of the utilization metric.</p>
/// <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>
/// <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>
pub fn get_statistic(&self) -> &::std::option::Option<crate::types::MetricStatistic> {
&self.statistic
}
/// <p>The value of the utilization metric.</p>
pub fn value(mut self, input: f64) -> Self {
self.value = ::std::option::Option::Some(input);
self
}
/// <p>The value of the utilization metric.</p>
pub fn set_value(mut self, input: ::std::option::Option<f64>) -> Self {
self.value = input;
self
}
/// <p>The value of the utilization metric.</p>
pub fn get_value(&self) -> &::std::option::Option<f64> {
&self.value
}
/// Consumes the builder and constructs a [`UtilizationMetric`](crate::types::UtilizationMetric).
pub fn build(self) -> crate::types::UtilizationMetric {
crate::types::UtilizationMetric {
name: self.name,
statistic: self.statistic,
value: self.value.unwrap_or_default(),
}
}
}