Class MetricStat
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<MetricStat.Builder,
MetricStat>
This structure defines the metric to be used as the service level indicator, along with the statistics, period, and unit.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricStat.Builder
builder()
final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
final Metric
metric()
The metric to use as the service level indicator, including the metric name, namespace, and dimensions.final Integer
period()
The granularity, in seconds, to be used for the metric.static Class
<? extends MetricStat.Builder> final String
stat()
The statistic to use for comparison to the threshold.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final StandardUnit
unit()
If you omitUnit
then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch.final String
If you omitUnit
then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
metric
The metric to use as the service level indicator, including the metric name, namespace, and dimensions.
- Returns:
- The metric to use as the service level indicator, including the metric name, namespace, and dimensions.
-
period
The granularity, in seconds, to be used for the metric. For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a
PutMetricData
call that includes aStorageResolution
of 1 second.- Returns:
- The granularity, in seconds, to be used for the metric. For metrics with regular resolution, a period can
be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are
collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of
60. High-resolution metrics are those metrics stored by a
PutMetricData
call that includes aStorageResolution
of 1 second.
-
stat
The statistic to use for comparison to the threshold. It can be any CloudWatch statistic or extended statistic. For more information about statistics, see CloudWatch statistics definitions.
- Returns:
- The statistic to use for comparison to the threshold. It can be any CloudWatch statistic or extended statistic. For more information about statistics, see CloudWatch statistics definitions.
-
unit
If you omit
Unit
then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions.If the service returns an enum value that is not available in the current SDK version,
unit
will returnStandardUnit.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromunitAsString()
.- Returns:
- If you omit
Unit
then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions. - See Also:
-
unitAsString
If you omit
Unit
then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions.If the service returns an enum value that is not available in the current SDK version,
unit
will returnStandardUnit.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromunitAsString()
.- Returns:
- If you omit
Unit
then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions. - See Also:
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<MetricStat.Builder,
MetricStat> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-