com.amazonaws.services.cloudwatch.model
Class PutMetricDataRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.cloudwatch.model.PutMetricDataRequest

public class PutMetricDataRequest
extends AmazonWebServiceRequest

Container for the parameters to the PutMetricData operation.

Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch associates the data points with the specified metric. If the specified metric does not exist, Amazon CloudWatch creates the metric.

NOTE: If you create a metric with the PutMetricData action, allow up to fifteen minutes for the metric to appear in calls to the ListMetrics action.

The size of a PutMetricData request is limited to 8 KB for HTTP GET requests and 40 KB for HTTP POST requests.

IMPORTANT: 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.

See Also:
AmazonCloudWatch.putMetricData(PutMetricDataRequest)

Constructor Summary
PutMetricDataRequest()
           
 
Method Summary
 boolean equals(Object obj)
           
 List<MetricDatum> getMetricData()
          A list of data describing the metric.
 String getNamespace()
          The namespace for the metric data.
 int hashCode()
           
 void setMetricData(Collection<MetricDatum> metricData)
          A list of data describing the metric.
 void setNamespace(String namespace)
          The namespace for the metric data.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 PutMetricDataRequest withMetricData(Collection<MetricDatum> metricData)
          A list of data describing the metric.
 PutMetricDataRequest withMetricData(MetricDatum... metricData)
          A list of data describing the metric.
 PutMetricDataRequest withNamespace(String namespace)
          The namespace for the metric data.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PutMetricDataRequest

public PutMetricDataRequest()
Method Detail

getNamespace

public String getNamespace()
The namespace for the metric data.

Constraints:
Length: 1 - 255
Pattern: [^:].*

Returns:
The namespace for the metric data.

setNamespace

public void setNamespace(String namespace)
The namespace for the metric data.

Constraints:
Length: 1 - 255
Pattern: [^:].*

Parameters:
namespace - The namespace for the metric data.

withNamespace

public PutMetricDataRequest withNamespace(String namespace)
The namespace for the metric data.

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

Constraints:
Length: 1 - 255
Pattern: [^:].*

Parameters:
namespace - The namespace for the metric data.
Returns:
A reference to this updated object so that method calls can be chained together.

getMetricData

public List<MetricDatum> getMetricData()
A list of data describing the metric.

Returns:
A list of data describing the metric.

setMetricData

public void setMetricData(Collection<MetricDatum> metricData)
A list of data describing the metric.

Parameters:
metricData - A list of data describing the metric.

withMetricData

public PutMetricDataRequest withMetricData(MetricDatum... metricData)
A list of data describing the metric.

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

Parameters:
metricData - A list of data describing the metric.
Returns:
A reference to this updated object so that method calls can be chained together.

withMetricData

public PutMetricDataRequest withMetricData(Collection<MetricDatum> metricData)
A list of data describing the metric.

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

Parameters:
metricData - A list of data describing the metric.
Returns:
A reference to this updated object so that method calls can be chained together.

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.