com.amazonaws.services.cloudwatch.model
Class ListMetricsRequest

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

public class ListMetricsRequest
extends AmazonWebServiceRequest

Container for the parameters to the ListMetrics operation.

Returns a list of valid metrics stored for the AWS account owner. Returned metrics can be used with GetMetricStatistics to obtain statistical data for a given metric.

NOTE: Up to 500 results are returned for any one call. To retrieve further results, use returned NextToken values with subsequent ListMetrics operations.

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.

See Also:
AmazonCloudWatch.listMetrics(ListMetricsRequest)

Constructor Summary
ListMetricsRequest()
           
 
Method Summary
 boolean equals(Object obj)
           
 List<DimensionFilter> getDimensions()
          A list of dimensions to filter against.
 String getMetricName()
          The name of the metric to filter against.
 String getNamespace()
          The namespace to filter against.
 String getNextToken()
          The token returned by a previous call to indicate that there is more data available.
 int hashCode()
           
 void setDimensions(Collection<DimensionFilter> dimensions)
          A list of dimensions to filter against.
 void setMetricName(String metricName)
          The name of the metric to filter against.
 void setNamespace(String namespace)
          The namespace to filter against.
 void setNextToken(String nextToken)
          The token returned by a previous call to indicate that there is more data available.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 ListMetricsRequest withDimensions(Collection<DimensionFilter> dimensions)
          A list of dimensions to filter against.
 ListMetricsRequest withDimensions(DimensionFilter... dimensions)
          A list of dimensions to filter against.
 ListMetricsRequest withMetricName(String metricName)
          The name of the metric to filter against.
 ListMetricsRequest withNamespace(String namespace)
          The namespace to filter against.
 ListMetricsRequest withNextToken(String nextToken)
          The token returned by a previous call to indicate that there is more data available.
 
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

ListMetricsRequest

public ListMetricsRequest()
Method Detail

getNamespace

public String getNamespace()
The namespace to filter against.

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

Returns:
The namespace to filter against.

setNamespace

public void setNamespace(String namespace)
The namespace to filter against.

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

Parameters:
namespace - The namespace to filter against.

withNamespace

public ListMetricsRequest withNamespace(String namespace)
The namespace to filter against.

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

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

Parameters:
namespace - The namespace to filter against.
Returns:
A reference to this updated object so that method calls can be chained together.

getMetricName

public String getMetricName()
The name of the metric to filter against.

Constraints:
Length: 1 - 255

Returns:
The name of the metric to filter against.

setMetricName

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

Constraints:
Length: 1 - 255

Parameters:
metricName - The name of the metric to filter against.

withMetricName

public ListMetricsRequest withMetricName(String metricName)
The name of the metric to filter against.

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 to filter against.
Returns:
A reference to this updated object so that method calls can be chained together.

getDimensions

public List<DimensionFilter> getDimensions()
A list of dimensions to filter against.

Constraints:
Length: 0 - 10

Returns:
A list of dimensions to filter against.

setDimensions

public void setDimensions(Collection<DimensionFilter> dimensions)
A list of dimensions to filter against.

Constraints:
Length: 0 - 10

Parameters:
dimensions - A list of dimensions to filter against.

withDimensions

public ListMetricsRequest withDimensions(DimensionFilter... dimensions)
A list of dimensions to filter against.

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

Constraints:
Length: 0 - 10

Parameters:
dimensions - A list of dimensions to filter against.
Returns:
A reference to this updated object so that method calls can be chained together.

withDimensions

public ListMetricsRequest withDimensions(Collection<DimensionFilter> dimensions)
A list of dimensions to filter against.

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

Constraints:
Length: 0 - 10

Parameters:
dimensions - A list of dimensions to filter against.
Returns:
A reference to this updated object so that method calls can be chained together.

getNextToken

public String getNextToken()
The token returned by a previous call to indicate that there is more data available.

Returns:
The token returned by a previous call to indicate that there is more data available.

setNextToken

public void setNextToken(String nextToken)
The token returned by a previous call to indicate that there is more data available.

Parameters:
nextToken - The token returned by a previous call to indicate that there is more data available.

withNextToken

public ListMetricsRequest withNextToken(String nextToken)
The token returned by a previous call to indicate that there is more data available.

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

Parameters:
nextToken - The token returned by a previous call to indicate that there is more data available.
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.