@Generated(value="software.amazon.awssdk:codegen") public final class ProjectedMetric extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ProjectedMetric.Builder,ProjectedMetric>
Describes a projected utilization metric of a recommendation option, such as an Amazon EC2 instance. This represents the projected utilization of a recommendation option had you used that resource during the analyzed period.
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.
The Cpu and Memory metrics are the only projected utilization metrics returned when you run
the GetEC2RecommendationProjectedMetrics action. Additionally, the Memory metric is returned only
for resources that have the unified CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with
the CloudWatch Agent.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ProjectedMetric.Builder |
| Modifier and Type | Method and Description |
|---|---|
static ProjectedMetric.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasTimestamps()
For responses, this returns true if the service returned a value for the Timestamps property.
|
boolean |
hasValues()
For responses, this returns true if the service returned a value for the Values property.
|
MetricName |
name()
The name of the projected utilization metric.
|
String |
nameAsString()
The name of the projected utilization metric.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends ProjectedMetric.Builder> |
serializableBuilderClass() |
List<Instant> |
timestamps()
The timestamps of the projected utilization metric.
|
ProjectedMetric.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
List<Double> |
values()
The values of the projected utilization metrics.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final MetricName name()
The name of the projected utilization metric.
The following projected utilization metrics are returned:
Cpu - The projected percentage of allocated EC2 compute units that would be in use on the
recommendation option had you used that resource during the analyzed period. This metric identifies the
processing power required to run an application on the recommendation option.
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.
Units: Percent
Memory - The percentage of memory that would be in use on the recommendation option had you used
that resource during the analyzed period. This metric identifies the amount of memory required to run an
application on the recommendation option.
Units: Percent
The Memory metric is returned only for resources that have the unified CloudWatch agent installed on
them. For more information, see Enabling Memory Utilization
with the CloudWatch Agent.
If the service returns an enum value that is not available in the current SDK version, name will return
MetricName.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
nameAsString().
The following projected utilization metrics are returned:
Cpu - The projected percentage of allocated EC2 compute units that would be in use on the
recommendation option had you used that resource during the analyzed period. This metric identifies the
processing power required to run an application on the recommendation option.
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.
Units: Percent
Memory - The percentage of memory that would be in use on the recommendation option had you
used that resource during the analyzed period. This metric identifies the amount of memory required to
run an application on the recommendation option.
Units: Percent
The Memory metric is returned only for resources that have the unified CloudWatch agent
installed on them. For more information, see Enabling Memory
Utilization with the CloudWatch Agent.
MetricNamepublic final String nameAsString()
The name of the projected utilization metric.
The following projected utilization metrics are returned:
Cpu - The projected percentage of allocated EC2 compute units that would be in use on the
recommendation option had you used that resource during the analyzed period. This metric identifies the
processing power required to run an application on the recommendation option.
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.
Units: Percent
Memory - The percentage of memory that would be in use on the recommendation option had you used
that resource during the analyzed period. This metric identifies the amount of memory required to run an
application on the recommendation option.
Units: Percent
The Memory metric is returned only for resources that have the unified CloudWatch agent installed on
them. For more information, see Enabling Memory Utilization
with the CloudWatch Agent.
If the service returns an enum value that is not available in the current SDK version, name will return
MetricName.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
nameAsString().
The following projected utilization metrics are returned:
Cpu - The projected percentage of allocated EC2 compute units that would be in use on the
recommendation option had you used that resource during the analyzed period. This metric identifies the
processing power required to run an application on the recommendation option.
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.
Units: Percent
Memory - The percentage of memory that would be in use on the recommendation option had you
used that resource during the analyzed period. This metric identifies the amount of memory required to
run an application on the recommendation option.
Units: Percent
The Memory metric is returned only for resources that have the unified CloudWatch agent
installed on them. For more information, see Enabling Memory
Utilization with the CloudWatch Agent.
MetricNamepublic final boolean hasTimestamps()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<Instant> timestamps()
The timestamps of the projected utilization metric.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasTimestamps() method.
public final boolean hasValues()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<Double> values()
The values of the projected utilization metrics.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasValues() method.
public ProjectedMetric.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<ProjectedMetric.Builder,ProjectedMetric>public static ProjectedMetric.Builder builder()
public static Class<? extends ProjectedMetric.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.