amazonka-cloudwatch-1.4.3: Amazon CloudWatch SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.CloudWatch.GetMetricStatistics

Contents

Description

Gets statistics for the specified metric.

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:

  • 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 Dimensions Reference in the Amazon CloudWatch Developer Guide.

Synopsis

Creating a Request

data GetMetricStatistics Source #

See: getMetricStatistics smart constructor.

Instances

Eq GetMetricStatistics Source # 
Data GetMetricStatistics Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetMetricStatistics -> c GetMetricStatistics #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetMetricStatistics #

toConstr :: GetMetricStatistics -> Constr #

dataTypeOf :: GetMetricStatistics -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GetMetricStatistics) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetMetricStatistics) #

gmapT :: (forall b. Data b => b -> b) -> GetMetricStatistics -> GetMetricStatistics #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetMetricStatistics -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetMetricStatistics -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetMetricStatistics -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetMetricStatistics -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetMetricStatistics -> m GetMetricStatistics #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetMetricStatistics -> m GetMetricStatistics #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetMetricStatistics -> m GetMetricStatistics #

Read GetMetricStatistics Source # 
Show GetMetricStatistics Source # 
Generic GetMetricStatistics Source # 
Hashable GetMetricStatistics Source # 
NFData GetMetricStatistics Source # 

Methods

rnf :: GetMetricStatistics -> () #

AWSRequest GetMetricStatistics Source # 
ToQuery GetMetricStatistics Source # 
ToPath GetMetricStatistics Source # 
ToHeaders GetMetricStatistics Source # 
type Rep GetMetricStatistics Source # 
type Rs GetMetricStatistics Source # 

Request Lenses

gmsDimensions :: Lens' GetMetricStatistics [Dimension] Source #

A list of dimensions describing qualities of the metric.

gmsNamespace :: Lens' GetMetricStatistics Text Source #

The namespace of the metric, with or without spaces.

gmsMetricName :: Lens' GetMetricStatistics Text Source #

The name of the metric, with or without spaces.

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. 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.

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. The time stamp must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).

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.

gmsStatistics :: Lens' GetMetricStatistics (NonEmpty Statistic) Source #

The metric statistics to return. For information about specific statistics returned by GetMetricStatistics, see Statistics in the Amazon CloudWatch Developer Guide.

Destructuring the Response

getMetricStatisticsResponse Source #

Creates a value of GetMetricStatisticsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data GetMetricStatisticsResponse Source #

The output for the GetMetricStatistics action.

See: getMetricStatisticsResponse smart constructor.

Instances

Eq GetMetricStatisticsResponse Source # 
Data GetMetricStatisticsResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetMetricStatisticsResponse -> c GetMetricStatisticsResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetMetricStatisticsResponse #

toConstr :: GetMetricStatisticsResponse -> Constr #

dataTypeOf :: GetMetricStatisticsResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c GetMetricStatisticsResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetMetricStatisticsResponse) #

gmapT :: (forall b. Data b => b -> b) -> GetMetricStatisticsResponse -> GetMetricStatisticsResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetMetricStatisticsResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetMetricStatisticsResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetMetricStatisticsResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetMetricStatisticsResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetMetricStatisticsResponse -> m GetMetricStatisticsResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetMetricStatisticsResponse -> m GetMetricStatisticsResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetMetricStatisticsResponse -> m GetMetricStatisticsResponse #

Read GetMetricStatisticsResponse Source # 
Show GetMetricStatisticsResponse Source # 
Generic GetMetricStatisticsResponse Source # 
NFData GetMetricStatisticsResponse Source # 
type Rep GetMetricStatisticsResponse Source # 
type Rep GetMetricStatisticsResponse = D1 (MetaData "GetMetricStatisticsResponse" "Network.AWS.CloudWatch.GetMetricStatistics" "amazonka-cloudwatch-1.4.3-3zWFSmEqe9z5oTCwMKJaW0" False) (C1 (MetaCons "GetMetricStatisticsResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gmsrsDatapoints") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Datapoint]))) ((:*:) (S1 (MetaSel (Just Symbol "_gmsrsLabel") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_gmsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

gmsrsDatapoints :: Lens' GetMetricStatisticsResponse [Datapoint] Source #

The datapoints for the specified metric.

gmsrsLabel :: Lens' GetMetricStatisticsResponse (Maybe Text) Source #

A label describing the specified metric.