Class GetMetricStatisticsRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest
-
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
public class GetMetricStatisticsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description GetMetricStatisticsRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetMetricStatisticsRequest
clone()
Creates a shallow clone of this request.boolean
equals(Object obj)
List<Dimension>
getDimensions()
A list of dimensions describing qualities of the metric.Date
getEndTime()
The time stamp to use for determining the last datapoint to return.String
getMetricName()
The name of the metric, with or without spaces.String
getNamespace()
The namespace of the metric, with or without spaces.Integer
getPeriod()
The granularity, in seconds, of the returned datapoints.Date
getStartTime()
The time stamp to use for determining the first datapoint to return.List<String>
getStatistics()
The metric statistics to return.String
getUnit()
The unit for the metric.int
hashCode()
void
setDimensions(Collection<Dimension> dimensions)
A list of dimensions describing qualities of the metric.void
setEndTime(Date endTime)
The time stamp to use for determining the last datapoint to return.void
setMetricName(String metricName)
The name of the metric, with or without spaces.void
setNamespace(String namespace)
The namespace of the metric, with or without spaces.void
setPeriod(Integer period)
The granularity, in seconds, of the returned datapoints.void
setStartTime(Date startTime)
The time stamp to use for determining the first datapoint to return.void
setStatistics(Collection<String> statistics)
The metric statistics to return.void
setUnit(StandardUnit unit)
The unit for the metric.void
setUnit(String unit)
The unit for the metric.String
toString()
Returns a string representation of this object; useful for testing and debugging.GetMetricStatisticsRequest
withDimensions(Dimension... dimensions)
A list of dimensions describing qualities of the metric.GetMetricStatisticsRequest
withDimensions(Collection<Dimension> dimensions)
A list of dimensions describing qualities of the metric.GetMetricStatisticsRequest
withEndTime(Date endTime)
The time stamp to use for determining the last datapoint to return.GetMetricStatisticsRequest
withMetricName(String metricName)
The name of the metric, with or without spaces.GetMetricStatisticsRequest
withNamespace(String namespace)
The namespace of the metric, with or without spaces.GetMetricStatisticsRequest
withPeriod(Integer period)
The granularity, in seconds, of the returned datapoints.GetMetricStatisticsRequest
withStartTime(Date startTime)
The time stamp to use for determining the first datapoint to return.GetMetricStatisticsRequest
withStatistics(Statistic... statistics)
The metric statistics to return.GetMetricStatisticsRequest
withStatistics(String... statistics)
The metric statistics to return.GetMetricStatisticsRequest
withStatistics(Collection<String> statistics)
The metric statistics to return.GetMetricStatisticsRequest
withUnit(StandardUnit unit)
The unit for the metric.GetMetricStatisticsRequest
withUnit(String unit)
The unit for the metric.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
-
-
-
Method Detail
-
setNamespace
public void setNamespace(String namespace)
The namespace of the metric, with or without spaces.
- Parameters:
namespace
- The namespace of the metric, with or without spaces.
-
getNamespace
public String getNamespace()
The namespace of the metric, with or without spaces.
- Returns:
- The namespace of the metric, with or without spaces.
-
withNamespace
public GetMetricStatisticsRequest withNamespace(String namespace)
The namespace of the metric, with or without spaces.
- Parameters:
namespace
- The namespace of the metric, with or without spaces.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMetricName
public void setMetricName(String metricName)
The name of the metric, with or without spaces.
- Parameters:
metricName
- The name of the metric, with or without spaces.
-
getMetricName
public String getMetricName()
The name of the metric, with or without spaces.
- Returns:
- The name of the metric, with or without spaces.
-
withMetricName
public GetMetricStatisticsRequest withMetricName(String metricName)
The name of the metric, with or without spaces.
- Parameters:
metricName
- The name of the metric, with or without spaces.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getDimensions
public List<Dimension> getDimensions()
A list of dimensions describing qualities of the metric.
- Returns:
- A list of dimensions describing qualities of the metric.
-
setDimensions
public void setDimensions(Collection<Dimension> dimensions)
A list of dimensions describing qualities of the metric.
- Parameters:
dimensions
- A list of dimensions describing qualities of the metric.
-
withDimensions
public GetMetricStatisticsRequest withDimensions(Dimension... dimensions)
A list of dimensions describing qualities of the metric.
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 describing qualities of the metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withDimensions
public GetMetricStatisticsRequest withDimensions(Collection<Dimension> dimensions)
A list of dimensions describing qualities of the metric.
- Parameters:
dimensions
- A list of dimensions describing qualities of the metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStartTime
public void setStartTime(Date startTime)
The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks. Data that is timestamped 24 hours or more in the past may take in excess of 48 hours to become available from submission time using
GetMetricStatistics
.- Parameters:
startTime
- The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks. Data that is timestamped 24 hours or more in the past may take in excess of 48 hours to become available from submission time using
GetMetricStatistics
.
-
getStartTime
public Date getStartTime()
The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks. Data that is timestamped 24 hours or more in the past may take in excess of 48 hours to become available from submission time using
GetMetricStatistics
.- Returns:
- The time stamp to use for determining the first datapoint to
return. The value specified is inclusive; results include
datapoints with the time stamp specified. The time stamp must be
in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks. Data that is timestamped 24 hours or more in the past may take in excess of 48 hours to become available from submission time using
GetMetricStatistics
.
-
withStartTime
public GetMetricStatisticsRequest withStartTime(Date startTime)
The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks. Data that is timestamped 24 hours or more in the past may take in excess of 48 hours to become available from submission time using
GetMetricStatistics
.- Parameters:
startTime
- The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).The specified start time is rounded down to the nearest value. Datapoints are returned for start times up to two weeks in the past. Specified start times that are more than two weeks in the past will not return datapoints for metrics that are older than two weeks. Data that is timestamped 24 hours or more in the past may take in excess of 48 hours to become available from submission time using
GetMetricStatistics
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEndTime
public void setEndTime(Date endTime)
The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
- Parameters:
endTime
- The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
-
getEndTime
public Date getEndTime()
The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
- Returns:
- The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
-
withEndTime
public GetMetricStatisticsRequest withEndTime(Date endTime)
The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
- Parameters:
endTime
- The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPeriod
public void setPeriod(Integer period)
The granularity, in seconds, of the returned datapoints.
Period
must be at least 60 seconds and must be a multiple of 60. The default value is 60.- Parameters:
period
- The granularity, in seconds, of the returned datapoints.Period
must be at least 60 seconds and must be a multiple of 60. The default value is 60.
-
getPeriod
public Integer getPeriod()
The granularity, in seconds, of the returned datapoints.
Period
must be at least 60 seconds and must be a multiple of 60. The default value is 60.- Returns:
- The granularity, in seconds, of the returned datapoints.
Period
must be at least 60 seconds and must be a multiple of 60. The default value is 60.
-
withPeriod
public GetMetricStatisticsRequest withPeriod(Integer period)
The granularity, in seconds, of the returned datapoints.
Period
must be at least 60 seconds and must be a multiple of 60. The default value is 60.- Parameters:
period
- The granularity, in seconds, of the returned datapoints.Period
must be at least 60 seconds and must be a multiple of 60. The default value is 60.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getStatistics
public List<String> getStatistics()
The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.
- Returns:
- The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.
- See Also:
Statistic
-
setStatistics
public void setStatistics(Collection<String> statistics)
The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.
- Parameters:
statistics
- The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.- See Also:
Statistic
-
withStatistics
public GetMetricStatisticsRequest withStatistics(String... statistics)
The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.
NOTE: This method appends the values to the existing list (if any). Use
setStatistics(java.util.Collection)
orwithStatistics(java.util.Collection)
if you want to override the existing values.- Parameters:
statistics
- The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
Statistic
-
withStatistics
public GetMetricStatisticsRequest withStatistics(Collection<String> statistics)
The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.
- Parameters:
statistics
- The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
Statistic
-
withStatistics
public GetMetricStatisticsRequest withStatistics(Statistic... statistics)
The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.
- Parameters:
statistics
- The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
Statistic
-
setUnit
public void setUnit(String unit)
The unit for the metric.
- Parameters:
unit
- The unit for the metric.- See Also:
StandardUnit
-
getUnit
public String getUnit()
The unit for the metric.
- Returns:
- The unit for the metric.
- See Also:
StandardUnit
-
withUnit
public GetMetricStatisticsRequest withUnit(String unit)
The unit for the metric.
- Parameters:
unit
- The unit for the metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StandardUnit
-
setUnit
public void setUnit(StandardUnit unit)
The unit for the metric.
- Parameters:
unit
- The unit for the metric.- See Also:
StandardUnit
-
withUnit
public GetMetricStatisticsRequest withUnit(StandardUnit unit)
The unit for the metric.
- Parameters:
unit
- The unit for the metric.- Returns:
- Returns a reference to this 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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public GetMetricStatisticsRequest clone()
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
Object.clone()
-
-