com.amazonaws.services.cloudwatch.model
Class MetricDatum

java.lang.Object
  extended by com.amazonaws.services.cloudwatch.model.MetricDatum

public class MetricDatum
extends Object

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 Summary
MetricDatum()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetricDatum

public MetricDatum()
Method Detail

getMetricName

public String getMetricName()
The name of the metric.

Constraints:
Length: 1 - 255

Returns:
The name of the metric.

setMetricName

public void setMetricName(String metricName)
The name of the metric.

Constraints:
Length: 1 - 255

Parameters:
metricName - The name of the metric.

withMetricName

public MetricDatum withMetricName(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

Parameters:
metricName - The name of the metric.
Returns:
A reference to this updated object so that method calls can be chained together.

getDimensions

public List<Dimension> getDimensions()
A list of dimensions associated with the metric.

Constraints:
Length: 0 - 10

Returns:
A list of dimensions associated with the metric.

setDimensions

public void setDimensions(Collection<Dimension> dimensions)
A list of dimensions associated with the metric.

Constraints:
Length: 0 - 10

Parameters:
dimensions - A list of dimensions associated with the metric.

withDimensions

public MetricDatum withDimensions(Dimension... dimensions)
A list of dimensions associated with the metric.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10

Parameters:
dimensions - A list of dimensions associated with the metric.
Returns:
A reference to this updated object so that method calls can be chained together.

withDimensions

public MetricDatum withDimensions(Collection<Dimension> dimensions)
A list of dimensions associated with the metric.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10

Parameters:
dimensions - A list of dimensions associated with the metric.
Returns:
A reference to this updated object so that method calls can be chained together.

getTimestamp

public Date getTimestamp()
The time stamp used for the metric. If not specified, the default value is set to the time the metric data was received.

Returns:
The time stamp used for the metric. If not specified, the default value is set to the time the metric data was received.

setTimestamp

public void setTimestamp(Date timestamp)
The time stamp used for the metric. 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. If not specified, the default value is set to the time the metric data was received.

withTimestamp

public MetricDatum withTimestamp(Date timestamp)
The time stamp used for the metric. 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.

Parameters:
timestamp - The time stamp used for the metric. If not specified, the default value is set to the time the metric data was received.
Returns:
A reference to this updated object so that method calls can be chained together.

getValue

public Double getValue()
The value for the metric. Although the 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:
The value for the metric. Although the 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.

setValue

public void setValue(Double value)
The value for the metric. Although the 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.

Parameters:
value - The value for the metric. Although the 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.

withValue

public MetricDatum withValue(Double value)
The value for the metric. Although the 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.

Parameters:
value - The value for the metric. Although the 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 updated object so that method calls can be chained together.

getStatisticValues

public StatisticSet getStatisticValues()
A set of statistical values describing the metric.

Returns:
A set of statistical values describing the metric.

setStatisticValues

public void setStatisticValues(StatisticSet statisticValues)
A set of statistical values describing the metric.

Parameters:
statisticValues - A set of statistical values describing the metric.

withStatisticValues

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.

Parameters:
statisticValues - A set of statistical values describing the metric.
Returns:
A reference to this updated object so that method calls can be chained together.

getUnit

public 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

Returns:
The unit of the metric.
See Also:
StandardUnit

setUnit

public void setUnit(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

Parameters:
unit - The unit of the metric.
See Also:
StandardUnit

withUnit

public MetricDatum withUnit(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

Parameters:
unit - The unit of the metric.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
StandardUnit

setUnit

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

Parameters:
unit - The unit of the metric.
See Also:
StandardUnit

withUnit

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

Parameters:
unit - The unit of the metric.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
StandardUnit

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.