public class MetricDatum
extends java.lang.Object
implements java.io.Serializable
The MetricDatum
data type encapsulates the information sent with
PutMetricData to either create a new metric or add new values to be
aggregated into an existing metric.
Constructor and Description |
---|
MetricDatum() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<Dimension> |
getDimensions()
A list of dimensions associated with the metric.
|
java.lang.String |
getMetricName()
The name of the metric.
|
StatisticSet |
getStatisticValues()
A set of statistical values describing the metric.
|
java.util.Date |
getTimestamp()
The time stamp used for the metric in ISO 8601 Universal Coordinated Time
(UTC) format.
|
java.lang.String |
getUnit()
The unit of the metric.
|
java.lang.Double |
getValue()
The value for the metric.
|
int |
hashCode() |
void |
setDimensions(java.util.Collection<Dimension> dimensions)
A list of dimensions associated with the metric.
|
void |
setMetricName(java.lang.String metricName)
The name of the metric.
|
void |
setStatisticValues(StatisticSet statisticValues)
A set of statistical values describing the metric.
|
void |
setTimestamp(java.util.Date timestamp)
The time stamp used for the metric in ISO 8601 Universal Coordinated Time
(UTC) format.
|
void |
setUnit(StandardUnit unit)
The unit of the metric.
|
void |
setUnit(java.lang.String unit)
The unit of the metric.
|
void |
setValue(java.lang.Double value)
The value for the metric.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
MetricDatum |
withDimensions(java.util.Collection<Dimension> dimensions)
A list of dimensions associated with the metric.
|
MetricDatum |
withDimensions(Dimension... dimensions)
A list of dimensions associated with the metric.
|
MetricDatum |
withMetricName(java.lang.String metricName)
The name of the metric.
|
MetricDatum |
withStatisticValues(StatisticSet statisticValues)
A set of statistical values describing the metric.
|
MetricDatum |
withTimestamp(java.util.Date timestamp)
The time stamp used for the metric in ISO 8601 Universal Coordinated Time
(UTC) format.
|
MetricDatum |
withUnit(StandardUnit unit)
The unit of the metric.
|
MetricDatum |
withUnit(java.lang.String unit)
The unit of the metric.
|
MetricDatum |
withValue(java.lang.Double value)
The value for the metric.
|
public java.lang.String getMetricName()
The name of the metric.
Constraints:
Length: 1 - 255
The name of the metric.
public void setMetricName(java.lang.String metricName)
The name of the metric.
Constraints:
Length: 1 - 255
metricName
- The name of the metric.
public MetricDatum withMetricName(java.lang.String metricName)
The name of the metric.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
metricName
- The name of the metric.
public java.util.List<Dimension> getDimensions()
A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
public void setDimensions(java.util.Collection<Dimension> dimensions)
A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
dimensions
- A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
public MetricDatum withDimensions(Dimension... dimensions)
A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
Returns a reference to this object so that method calls can be chained together.
dimensions
- A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
public MetricDatum withDimensions(java.util.Collection<Dimension> dimensions)
A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
Returns a reference to this object so that method calls can be chained together.
dimensions
- A list of dimensions associated with the metric. Note, when using the Dimensions value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
public java.util.Date getTimestamp()
The time stamp used for the metric in ISO 8601 Universal Coordinated Time (UTC) format. If not specified, the default value is set to the time the metric data was received.
The time stamp used for the metric in ISO 8601 Universal Coordinated Time (UTC) format. If not specified, the default value is set to the time the metric data was received.
public void setTimestamp(java.util.Date timestamp)
The time stamp used for the metric in ISO 8601 Universal Coordinated Time (UTC) format. If not specified, the default value is set to the time the metric data was received.
timestamp
- The time stamp used for the metric in ISO 8601 Universal Coordinated Time (UTC) format. If not specified, the default value is set to the time the metric data was received.
public MetricDatum withTimestamp(java.util.Date timestamp)
The time stamp used for the metric in ISO 8601 Universal Coordinated Time (UTC) format. If not specified, the default value is set to the time the metric data was received.
Returns a reference to this object so that method calls can be chained together.
timestamp
- The time stamp used for the metric in ISO 8601 Universal Coordinated Time (UTC) format. If not specified, the default value is set to the time the metric data was received.
public java.lang.Double getValue()
The value for the metric.
Value
parameter accepts numbers of
type Double
, Amazon CloudWatch rejects values that are
either too small or too large. Values must be in the range of
8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). In
addition, special values (e.g., NaN, +Infinity, -Infinity) are not
supported. The value for the metric.
Value
parameter accepts
numbers of type Double
, Amazon CloudWatch rejects
values that are either too small or too large. Values must be in
the range of 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360
to 2e360 (Base 2). In addition, special values (e.g., NaN,
+Infinity, -Infinity) are not supported. public void setValue(java.lang.Double value)
The value for the metric.
Value
parameter accepts numbers of
type Double
, Amazon CloudWatch rejects values that are
either too small or too large. Values must be in the range of
8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). In
addition, special values (e.g., NaN, +Infinity, -Infinity) are not
supported. value
- The value for the metric.
Value
parameter accepts
numbers of type Double
, Amazon CloudWatch rejects
values that are either too small or too large. Values must be
in the range of 8.515920e-109 to 1.174271e+108 (Base 10) or
2e-360 to 2e360 (Base 2). In addition, special values (e.g.,
NaN, +Infinity, -Infinity) are not supported. public MetricDatum withValue(java.lang.Double value)
The value for the metric.
Value
parameter accepts numbers of
type Double
, Amazon CloudWatch rejects values that are
either too small or too large. Values must be in the range of
8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). In
addition, special values (e.g., NaN, +Infinity, -Infinity) are not
supported. Returns a reference to this object so that method calls can be chained together.
value
- The value for the metric.
Value
parameter accepts
numbers of type Double
, Amazon CloudWatch rejects
values that are either too small or too large. Values must be
in the range of 8.515920e-109 to 1.174271e+108 (Base 10) or
2e-360 to 2e360 (Base 2). In addition, special values (e.g.,
NaN, +Infinity, -Infinity) are not supported. public StatisticSet getStatisticValues()
A set of statistical values describing the metric.
A set of statistical values describing the metric.
public void setStatisticValues(StatisticSet statisticValues)
A set of statistical values describing the metric.
statisticValues
- A set of statistical values describing the metric.
public MetricDatum withStatisticValues(StatisticSet statisticValues)
A set of statistical values describing the metric.
Returns a reference to this object so that method calls can be chained together.
statisticValues
- A set of statistical values describing the metric.
public java.lang.String getUnit()
The unit of the metric.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
The unit of the metric.
StandardUnit
public void setUnit(java.lang.String unit)
The unit of the metric.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
unit
- The unit of the metric.
StandardUnit
public MetricDatum withUnit(java.lang.String unit)
The unit of the metric.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
unit
- The unit of the metric.
StandardUnit
public void setUnit(StandardUnit unit)
The unit of the metric.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
unit
- The unit of the metric.
StandardUnit
public MetricDatum withUnit(StandardUnit unit)
The unit of the metric.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
unit
- The unit of the metric.
StandardUnit
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.