public class MetricDatum extends Object implements 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(Object obj) |
List<Dimension> |
getDimensions()
A list of dimensions associated with the metric.
|
String |
getMetricName()
The name of the metric.
|
StatisticSet |
getStatisticValues()
A set of statistical values describing the metric.
|
Date |
getTimestamp()
The time stamp used for the metric.
|
String |
getUnit()
The unit of the metric.
|
Double |
getValue()
The value for the metric.
|
int |
hashCode() |
void |
setDimensions(Collection<Dimension> dimensions)
A list of dimensions associated with the metric.
|
void |
setMetricName(String metricName)
The name of the metric.
|
void |
setStatisticValues(StatisticSet statisticValues)
A set of statistical values describing the metric.
|
void |
setTimestamp(Date timestamp)
The time stamp used for the metric.
|
void |
setUnit(StandardUnit unit)
The unit of the metric.
|
void |
setUnit(String unit)
The unit of the metric.
|
void |
setValue(Double value)
The value for the metric.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
MetricDatum |
withDimensions(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(String metricName)
The name of the metric.
|
MetricDatum |
withStatisticValues(StatisticSet statisticValues)
A set of statistical values describing the metric.
|
MetricDatum |
withTimestamp(Date timestamp)
The time stamp used for the metric.
|
MetricDatum |
withUnit(StandardUnit unit)
The unit of the metric.
|
MetricDatum |
withUnit(String unit)
The unit of the metric.
|
MetricDatum |
withValue(Double value)
The value for the metric.
|
public String getMetricName()
Constraints:
Length: 1 - 255
public void setMetricName(String metricName)
Constraints:
Length: 1 - 255
metricName - The name of the metric.public MetricDatum withMetricName(String metricName)
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 List<Dimension> getDimensions()
Constraints:
Length: 0 - 10
public void setDimensions(Collection<Dimension> dimensions)
Constraints:
Length: 0 - 10
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)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10
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(Collection<Dimension> dimensions)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10
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 Date getTimestamp()
public void setTimestamp(Date timestamp)
timestamp - The time stamp used for the metric. If not specified, the default
value is set to the time the metric data was received. Amazon
CloudWatch uses Coordinated Universal Time (UTC) when returning time
stamps, which do not accommodate seasonal adjustments such as daylight
savings time. For more information, see Time
stamps in the Amazon CloudWatch Developer Guide.public MetricDatum withTimestamp(Date timestamp)
Returns a reference to this object so that method calls can be chained together.
timestamp - The time stamp used for the metric. If not specified, the default
value is set to the time the metric data was received. Amazon
CloudWatch uses Coordinated Universal Time (UTC) when returning time
stamps, which do not accommodate seasonal adjustments such as daylight
savings time. For more information, see Time
stamps in the Amazon CloudWatch Developer Guide.public Double getValue()
Value
parameter accepts numbers of type Double, Amazon
CloudWatch truncates values with very large exponents. Values with
base-10 exponents greater than 126 (1 x 10^126) are truncated.
Likewise, values with base-10 exponents less than -130 (1 x 10^-130)
are also truncated. Value
parameter accepts numbers of type Double, Amazon
CloudWatch truncates values with very large exponents. Values with
base-10 exponents greater than 126 (1 x 10^126) are truncated.
Likewise, values with base-10 exponents less than -130 (1 x 10^-130)
are also truncated. public void setValue(Double value)
Value
parameter accepts numbers of type Double, Amazon
CloudWatch truncates values with very large exponents. Values with
base-10 exponents greater than 126 (1 x 10^126) are truncated.
Likewise, values with base-10 exponents less than -130 (1 x 10^-130)
are also truncated. value - The value for the metric. Value
parameter accepts numbers of type Double, Amazon
CloudWatch truncates values with very large exponents. Values with
base-10 exponents greater than 126 (1 x 10^126) are truncated.
Likewise, values with base-10 exponents less than -130 (1 x 10^-130)
are also truncated. public MetricDatum withValue(Double value)
Value
parameter accepts numbers of type Double, Amazon
CloudWatch truncates values with very large exponents. Values with
base-10 exponents greater than 126 (1 x 10^126) are truncated.
Likewise, values with base-10 exponents less than -130 (1 x 10^-130)
are also truncated. 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 truncates values with very large exponents. Values with
base-10 exponents greater than 126 (1 x 10^126) are truncated.
Likewise, values with base-10 exponents less than -130 (1 x 10^-130)
are also truncated. public StatisticSet getStatisticValues()
public void setStatisticValues(StatisticSet statisticValues)
statisticValues - A set of statistical values describing the metric.public MetricDatum withStatisticValues(StatisticSet statisticValues)
Returns a reference to this object so that method calls can be chained together.
statisticValues - A set of statistical values describing the metric.public String getUnit()
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
StandardUnitpublic void setUnit(String unit)
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.StandardUnitpublic MetricDatum withUnit(String unit)
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.StandardUnitpublic void setUnit(StandardUnit unit)
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.StandardUnitpublic MetricDatum withUnit(StandardUnit unit)
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.StandardUnitpublic String toString()
toString in class ObjectObject.toString()Copyright © 2016. All rights reserved.