Package | com.amazonaws.services.cloudwatch.model |
Class | public class GetMetricStatisticsRequest |
Inheritance | GetMetricStatisticsRequest ![]() ![]() |
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Since : | July 17. 2011 |
Runtime Versions : | Flash Player 10.1, AIR 2.5 |
com.amazonaws.services.cloudwatch.AmazonCloudWatchClient.getMetricStatistics
operation.
Gets statistics for the specified metric.
NOTE: The maximum number of data points returned from a single GetMetricStatistics request is 1,440.
If a request is made that generates more than 1,440 data points, Amazon CloudWatch returns an error.
In such a case, alter the request by narrowing the specified time range or increasing the specified period.
Alternatively, make multiple requests across adjacent time ranges.
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.
NOTE: The maximum number of data points that can be queried is 50,850; whereas the maximum number of data points returned is 1,440.
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:
See also
Method | Defined By | ||
---|---|---|---|
Default C'tor. | GetMetricStatisticsRequest | ||
getDimensions():Array
A list of dimensions (com.amazonaws.services.cloudwatch.model.Dimension) describing qualities of the metric. | GetMetricStatisticsRequest | ||
getEndTime():Date
The time stamp to use for determining the last datapoint to return. | GetMetricStatisticsRequest | ||
getMetricName():String
The name of the metric. | GetMetricStatisticsRequest | ||
getNamespace():String
The namespace of the metric. | GetMetricStatisticsRequest | ||
getPeriod():Number
The granularity, in seconds, of the returned datapoints. | GetMetricStatisticsRequest | ||
getStartTime():Date
The time stamp to use for determining the first datapoint to return. | GetMetricStatisticsRequest | ||
getStatistics():Array
The metric statistics to return. | GetMetricStatisticsRequest | ||
getUnit():String
The unit for the metric. | GetMetricStatisticsRequest | ||
setDimensions(dimensions:Array):void
A list of dimensions (com.amazonaws.services.cloudwatch.model.Dimension) describing qualities of the metric. | GetMetricStatisticsRequest | ||
setEndTime(endTime:Date):void
The time stamp to use for determining the last datapoint to return. | GetMetricStatisticsRequest | ||
setMetricName(metricName:String):void
The name of the metric. | GetMetricStatisticsRequest | ||
setNamespace(namespace:String):void
The namespace of the metric. | GetMetricStatisticsRequest | ||
setPeriod(period:Number):void
The granularity, in seconds, of the returned datapoints. | GetMetricStatisticsRequest | ||
setStartTime(startTime:Date):void
The time stamp to use for determining the first datapoint to return. | GetMetricStatisticsRequest | ||
setStatistics(statistics:Array):void
The metric statistics to return. | GetMetricStatisticsRequest | ||
setUnit(unit:String):void
The unit for the metric. | GetMetricStatisticsRequest | ||
toString():String
Returns a string representation of this object; useful for testing and debugging. | GetMetricStatisticsRequest | ||
withDimensions(dimensions:Array):GetMetricStatisticsRequest
A list of dimensions (com.amazonaws.services.cloudwatch.model.Dimension) describing qualities of the metric. | GetMetricStatisticsRequest | ||
withEndTime(endTime:Date):GetMetricStatisticsRequest
The time stamp to use for determining the last datapoint to return. | GetMetricStatisticsRequest | ||
withMetricName(metricName:String):GetMetricStatisticsRequest
The name of the metric. | GetMetricStatisticsRequest | ||
withNamespace(namespace:String):GetMetricStatisticsRequest
The namespace of the metric. | GetMetricStatisticsRequest | ||
withPeriod(period:Number):GetMetricStatisticsRequest
The granularity, in seconds, of the returned datapoints. | GetMetricStatisticsRequest | ||
withStartTime(startTime:Date):GetMetricStatisticsRequest
The time stamp to use for determining the first datapoint to return. | GetMetricStatisticsRequest | ||
withStatistics(statistics:Array):GetMetricStatisticsRequest
The metric statistics to return. | GetMetricStatisticsRequest | ||
withUnit(unit:String):GetMetricStatisticsRequest
The unit for the metric. | GetMetricStatisticsRequest |
GetMetricStatisticsRequest | () | Constructor |
public function GetMetricStatisticsRequest()
Default C'tor.
getDimensions | () | method |
public function getDimensions():Array
A list of dimensions (com.amazonaws.services.cloudwatch.model.Dimension
) describing qualities of the metric.
Array — A list of dimensions describing qualities of the metric.
|
See also
getEndTime | () | method |
public function getEndTime():Date
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.
ReturnsDate — 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.
|
getMetricName | () | method |
public function getMetricName():String
The name of the metric.
Length: 1 - 255 ReturnsString — The name of the metric.
|
getNamespace | () | method |
public function getNamespace():String
The namespace of the metric.
Length: 1 - 255 Pattern: [^:]. ReturnsString — The namespace of the metric.
|
getPeriod | () | method |
public function getPeriod():Number
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.
Range: 60 - ReturnsNumber — 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.
|
getStartTime | () | method |
public function getStartTime():Date
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 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.
ReturnsDate — 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 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.
|
getStatistics | () | method |
public function getStatistics():Array
The metric statistics to return.
Length: 1 - 5 ReturnsArray — The metric statistics to return (Average | Sum | SampleCount | Maximum | Minimum).
|
getUnit | () | method |
public function getUnit():String
The unit for 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 ReturnsString — The unit for the metric.
|
See also
setDimensions | () | method |
public function setDimensions(dimensions:Array):void
A list of dimensions (com.amazonaws.services.cloudwatch.model.Dimension
) describing qualities of the metric.
Parameters
dimensions:Array — A list of dimensions (com.amazonaws.services.cloudwatch.model.Dimension instances) describing qualities of the metric.
|
See also
setEndTime | () | method |
public function setEndTime(endTime:Date):void
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.
Parameters
endTime:Date — 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.
|
setMetricName | () | method |
public function setMetricName(metricName:String):void
The name of the metric.
Length: 1 - 255Parameters
metricName:String — The name of the metric.
|
setNamespace | () | method |
public function setNamespace(namespace:String):void
The namespace of the metric.
Length: 1 - 255 Pattern: [^:].Parameters
namespace:String — The namespace of the metric.
|
setPeriod | () | method |
public function setPeriod(period:Number):void
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.
Range: 60 -Parameters
period:Number — 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.
|
setStartTime | () | method |
public function setStartTime(startTime:Date):void
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 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.
Parameters
startTime:Date — 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 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.
|
setStatistics | () | method |
public function setStatistics(statistics:Array):void
The metric statistics to return.
Length: 1 - 5Parameters
statistics:Array — The metric statistics to return (Average | Sum | SampleCount | Maximum | Minimum).
|
setUnit | () | method |
public function setUnit(unit:String):void
The unit for 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, NoneParameters
unit:String — The unit for the metric.
|
See also
toString | () | method |
public function toString():String
Returns a string representation of this object; useful for testing and debugging.
ReturnsString — A string representation of this object.
|
withDimensions | () | method |
public function withDimensions(dimensions:Array):GetMetricStatisticsRequest
A list of dimensions (com.amazonaws.services.cloudwatch.model.Dimension
) describing qualities of the metric.
Returns a reference to this object so that method calls can be chained together.
Parameters
dimensions:Array — A list of dimensions (com.amazonaws.services.cloudwatch.model.Dimension instances) describing qualities of the metric.
|
GetMetricStatisticsRequest — A reference to this updated object so that method calls can be chained together.
|
See also
withEndTime | () | method |
public function withEndTime(endTime:Date):GetMetricStatisticsRequest
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. Returns a reference to this object so that method calls can be chained together.
Parameters
endTime:Date — 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.
|
GetMetricStatisticsRequest — A reference to this updated object so that method calls can be chained together.
|
withMetricName | () | method |
public function withMetricName(metricName:String):GetMetricStatisticsRequest
The name of the metric. Returns a reference to this object so that method calls can be chained together.
Length: 1 - 255Parameters
metricName:String — The name of the metric.
|
GetMetricStatisticsRequest — A reference to this updated object so that method calls can be chained together.
|
withNamespace | () | method |
public function withNamespace(namespace:String):GetMetricStatisticsRequest
The namespace of the metric. Returns a reference to this object so that method calls can be chained together.
Length: 1 - 255 Pattern: [^:].Parameters
namespace:String — The namespace of the metric.
|
GetMetricStatisticsRequest — A reference to this updated object so that method calls can be chained together.
|
withPeriod | () | method |
public function withPeriod(period:Number):GetMetricStatisticsRequest
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 a reference to this object so that method calls can be chained together.
Range: 60 -Parameters
period:Number — 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.
|
GetMetricStatisticsRequest — A reference to this updated object so that method calls can be chained together.
|
withStartTime | () | method |
public function withStartTime(startTime:Date):GetMetricStatisticsRequest
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 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.
Returns a reference to this object so that method calls can be chained together.Parameters
startTime:Date — 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 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.
|
GetMetricStatisticsRequest — A reference to this updated object so that method calls can be chained together.
|
withStatistics | () | method |
public function withStatistics(statistics:Array):GetMetricStatisticsRequest
The metric statistics to return. Returns a reference to this object so that method calls can be chained together.
Length: 1 - 5Parameters
statistics:Array — The metric statistics to return (Average | Sum | SampleCount | Maximum | Minimum).
|
GetMetricStatisticsRequest — A reference to this updated object so that method calls can be chained together.
|
withUnit | () | method |
public function withUnit(unit:String):GetMetricStatisticsRequest
The unit for 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, NoneParameters
unit:String — The unit for the metric.
|
GetMetricStatisticsRequest — The unit for the metric.
|
See also