Safe Haskell | None |
---|---|
Language | Haskell2010 |
Gets statistics for the specified metric.
The maximum number of data points returned from a single GetMetricStatistics
request is 1,440, wereas the maximum number of data points that can be
queried is 50,850. 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.
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:
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 Amazon CloudWatch Metrics, Namespaces, and DimensionsReference in the Amazon CloudWatch Developer Guide.
http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html
- data GetMetricStatistics
- getMetricStatistics :: Text -> Text -> UTCTime -> UTCTime -> Natural -> NonEmpty Statistic -> GetMetricStatistics
- gmsDimensions :: Lens' GetMetricStatistics [Dimension]
- gmsEndTime :: Lens' GetMetricStatistics UTCTime
- gmsMetricName :: Lens' GetMetricStatistics Text
- gmsNamespace :: Lens' GetMetricStatistics Text
- gmsPeriod :: Lens' GetMetricStatistics Natural
- gmsStartTime :: Lens' GetMetricStatistics UTCTime
- gmsStatistics :: Lens' GetMetricStatistics (NonEmpty Statistic)
- gmsUnit :: Lens' GetMetricStatistics (Maybe StandardUnit)
- data GetMetricStatisticsResponse
- getMetricStatisticsResponse :: GetMetricStatisticsResponse
- gmsrDatapoints :: Lens' GetMetricStatisticsResponse [Datapoint]
- gmsrLabel :: Lens' GetMetricStatisticsResponse (Maybe Text)
Request
Request constructor
GetMetricStatistics
constructor.
The fields accessible through corresponding lenses are:
Request lenses
gmsDimensions :: Lens' GetMetricStatistics [Dimension] Source
A list of dimensions describing qualities of the metric.
gmsEndTime :: Lens' GetMetricStatistics UTCTime Source
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.
gmsMetricName :: Lens' GetMetricStatistics Text Source
The name of the metric, with or without spaces.
gmsNamespace :: Lens' GetMetricStatistics Text Source
The namespace of the metric, with or without spaces.
gmsPeriod :: Lens' GetMetricStatistics Natural Source
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.
gmsStartTime :: Lens' GetMetricStatistics UTCTime Source
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.
gmsStatistics :: Lens' GetMetricStatistics (NonEmpty Statistic) Source
The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, go to Statistics in the Amazon CloudWatchDeveloper Guide.
Valid Values: 'Average | Sum | SampleCount | Maximum | Minimum'
gmsUnit :: Lens' GetMetricStatistics (Maybe StandardUnit) Source
The unit for the metric.
Response
Response constructor
getMetricStatisticsResponse :: GetMetricStatisticsResponse Source
GetMetricStatisticsResponse
constructor.
The fields accessible through corresponding lenses are:
gmsrDatapoints
::
[Datapoint
]gmsrLabel
::
Maybe
Text
Response lenses
gmsrDatapoints :: Lens' GetMetricStatisticsResponse [Datapoint] Source
The datapoints for the specified metric.