Class MetricDatum
- All Implemented Interfaces:
Serializable
,Cloneable
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
A list of dimensions associated with the metric.The name of the metric.A set of statistical values describing the metric.The time stamp used for the metric in ISO 8601 Universal Coordinated Time (UTC) format.getUnit()
The unit of the metric.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 in ISO 8601 Universal Coordinated Time (UTC) format.void
setUnit
(StandardUnit unit) The unit of the metric.void
The unit of the metric.void
The value for the metric.toString()
Returns a string representation of this object; useful for testing and debugging.withDimensions
(Dimension... dimensions) A list of dimensions associated with the metric.withDimensions
(Collection<Dimension> dimensions) A list of dimensions associated with the metric.withMetricName
(String metricName) The name of the metric.withStatisticValues
(StatisticSet statisticValues) A set of statistical values describing the metric.withTimestamp
(Date timestamp) The time stamp used for the metric in ISO 8601 Universal Coordinated Time (UTC) format.withUnit
(StandardUnit unit) The unit of the metric.The unit of the metric.The value for the metric.
-
Constructor Details
-
MetricDatum
public MetricDatum()
-
-
Method Details
-
setMetricName
The name of the metric.
- Parameters:
metricName
- The name of the metric.
-
getMetricName
The name of the metric.
- Returns:
- The name of the metric.
-
withMetricName
The name of the metric.
- Parameters:
metricName
- The name of the metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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).
- Returns:
- 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).
-
setDimensions
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).
- Parameters:
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).
-
withDimensions
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).
NOTE: This method appends the values to the existing list (if any). Use
setDimensions(java.util.Collection)
orwithDimensions(java.util.Collection)
if you want to override the existing values.- Parameters:
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:
- Returns a reference to this object so that method calls can be chained together.
-
withDimensions
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).
- Parameters:
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:
- Returns a reference to this object so that method calls can be chained together.
-
setTimestamp
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.
- Parameters:
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.
-
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.
- Returns:
- 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.
-
withTimestamp
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.
- Parameters:
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:
- Returns a reference to this object so that method calls can be chained together.
-
setValue
The value for the metric.
Although the Value
parameter accepts numbers of typeDouble
, 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.- Parameters:
value
- The value for the metric.Although the Value
parameter accepts numbers of typeDouble
, 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.
-
getValue
The value for the metric.
Although the Value
parameter accepts numbers of typeDouble
, 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:
- The value for the metric.
Although the Value
parameter accepts numbers of typeDouble
, 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.
-
withValue
The value for the metric.
Although the Value
parameter accepts numbers of typeDouble
, 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.- Parameters:
value
- The value for the metric.Although the Value
parameter accepts numbers of typeDouble
, 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:
- Returns a reference to this object so that method calls can be chained together.
-
setStatisticValues
A set of statistical values describing the metric.
- Parameters:
statisticValues
- A set of statistical values describing the metric.
-
getStatisticValues
A set of statistical values describing the metric.
- Returns:
- A set of statistical values describing the metric.
-
withStatisticValues
A set of statistical values describing the metric.
- Parameters:
statisticValues
- A set of statistical values describing the metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUnit
The unit of the metric.
- Parameters:
unit
- The unit of the metric.- See Also:
-
getUnit
The unit of the metric.
- Returns:
- The unit of the metric.
- See Also:
-
withUnit
The unit of the metric.
- Parameters:
unit
- The unit of the metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setUnit
The unit of the metric.
- Parameters:
unit
- The unit of the metric.- See Also:
-
withUnit
The unit of the metric.
- Parameters:
unit
- The unit of the metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-