The maximum number of data points that can be queried is 50,850, whereas the
maximum number of data points returned from a single
GetMetricStatistics request is 1,440. If you make a request that
generates more than 1,440 data points, Amazon CloudWatch returns an error. In
such a case, you can alter the request by narrowing the specified time range
or increasing the specified period. Alternatively, you can make multiple
requests across adjacent time ranges. GetMetricStatistics does
not return the data in chronological order.

Amazon CloudWatch aggregates data points based on the length of the
period that you specify. For example, if you request statistics
with a one-minute granularity, Amazon CloudWatch aggregates data points with
time stamps that fall within the same one-minute period. In such a case, the
data points queried can greatly outnumber the data points returned.

The following examples show various statistics allowed by the data point
query maximum of 50,850 when you call GetMetricStatistics on
Amazon EC2 instances with detailed (one-minute) monitoring enabled:

withDimensions

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

Parameters:

dimensions -

A list of dimensions describing qualities of the metric.

Returns:

A reference to this updated object so that method calls can be
chained together.

getStartTime

public java.util.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.

setStartTime

public void setStartTime(java.util.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.

withStartTime

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 a reference to this object so that method calls can be chained
together.

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:

A reference to this updated object so that method calls can be
chained together.

getEndTime

public java.util.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).

setEndTime

public void setEndTime(java.util.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).

withEndTime

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 a reference to this object so that method calls can be chained
together.

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:

A reference to this updated object so that method calls can be
chained together.

getPeriod

public java.lang.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.

Constraints:Range: 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.

setPeriod

public void setPeriod(java.lang.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.

Constraints:Range: 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.