Container for the parameters to the 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:

  • Statistics for up to 400 instances for a span of one hour
  • Statistics for up to 35 instances over a span of 24 hours
  • Statistics for up to 2 instances over a span of 2 weeks

For information about the namespace, metric names, and dimensions that other Amazon Web Services products use to send metrics to Cloudwatch, go to CloudWatch Support for AWS Products in the Amazon CloudWatch Developer Guide .

Namespace: Amazon.CloudWatch.Model
Assembly: AWSSDK (in AWSSDK.dll) Version: 1.4.10.0 (1.4.10.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public class GetMetricStatisticsRequest : AmazonWebServiceRequest
Public Class GetMetricStatisticsRequest _
	Inherits AmazonWebServiceRequest
public ref class GetMetricStatisticsRequest : public AmazonWebServiceRequest

Members

            
 All Members  Constructors   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
GetMetricStatisticsRequest()()()()
Initializes a new instance of the GetMetricStatisticsRequest class
Dimensions
A list of dimensions describing qualities of the metric.

Constraints:

Length
0 - 10

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.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
MetricName
The name of the metric.

Constraints:

Length
1 - 255

Namespace
The namespace of the metric.

Constraints:

Length
1 - 255
Pattern
[^:].*

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 -

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.
Note:
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.
Statistics
The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, go to Statistics in the Amazon CloudWatch Developer Guide. Valid Values: Average | Sum | SampleCount | Maximum | Minimum

Constraints:

Length
1 - 5

ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Unit
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

WithDimensions(array<Dimension>[]()[][])
Adds elements to the Dimensions collection
WithDimensions(IEnumerable<(Of <<'(Dimension>)>>))
Adds elements to the Dimensions collection
WithEndTime(DateTime)
Sets the EndTime property
WithMetricName(String)
Sets the MetricName property
WithNamespace(String)
Sets the Namespace property
WithPeriod(Int32)
Sets the Period property
WithStartTime(DateTime)
Sets the StartTime property
WithStatistics(IEnumerable<(Of <<'(String>)>>))
Adds elements to the Statistics collection
WithStatistics(array<String>[]()[][])
Adds elements to the Statistics collection
WithUnit(String)
Sets the Unit property

Inheritance Hierarchy

System..::..Object
  Amazon.Runtime..::..AmazonWebServiceRequest
    Amazon.CloudWatch.Model..::..GetMetricStatisticsRequest

See Also