amazonka-cloudwatch-1.6.0: Amazon CloudWatch SDK.

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

Network.AWS.CloudWatch.GetMetricData

Contents

Description

You can use the GetMetricData API to retrieve as many as 100 different metrics in a single request, with a total of as many as 100,800 datapoints. You can also optionally perform math expressions on the values of the returned statistics, to create new time series that represent new insights into your data. For example, using Lambda metrics, you could divide the Errors metric by the Invocations metric to get an error rate time series. For more information about metric math expressions, see Metric Math Syntax and Functions in the Amazon CloudWatch User Guide .

Calls to the GetMetricData API have a different pricing structure than calls to GetMetricStatistics . For more information about pricing, see Amazon CloudWatch Pricing .

Synopsis

Creating a Request

getMetricData Source #

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

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

  • gmdMaxDatapoints - The maximum number of data points the request should return before paginating. If you omit this, the default of 100,800 is used.
  • gmdNextToken - Include this value, if it was returned by the previous call, to get the next set of data points.
  • gmdScanBy - The order in which data points should be returned. TimestampDescending returns the newest data first and paginates when the MaxDatapoints limit is reached. TimestampAscending returns the oldest data first and paginates when the MaxDatapoints limit is reached.
  • gmdMetricDataQueries - The metric queries to be returned. A single GetMetricData call can include as many as 100 MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, or a math expression to perform on retrieved data.
  • gmdStartTime - The time stamp indicating the earliest data to be returned.
  • gmdEndTime - The time stamp indicating the latest data to be returned.

data GetMetricData Source #

See: getMetricData smart constructor.

Instances

Eq GetMetricData Source # 
Data GetMetricData Source # 

Methods

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

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

toConstr :: GetMetricData -> Constr #

dataTypeOf :: GetMetricData -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetMetricData Source # 
Show GetMetricData Source # 
Generic GetMetricData Source # 

Associated Types

type Rep GetMetricData :: * -> * #

Hashable GetMetricData Source # 
NFData GetMetricData Source # 

Methods

rnf :: GetMetricData -> () #

AWSRequest GetMetricData Source # 
ToHeaders GetMetricData Source # 
ToPath GetMetricData Source # 
ToQuery GetMetricData Source # 
type Rep GetMetricData Source # 
type Rep GetMetricData = D1 * (MetaData "GetMetricData" "Network.AWS.CloudWatch.GetMetricData" "amazonka-cloudwatch-1.6.0-9Bblpq0vnZd2Ryjsugueuz" False) (C1 * (MetaCons "GetMetricData'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_gmdMaxDatapoints") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Int))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gmdNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_gmdScanBy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe ScanBy))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gmdMetricDataQueries") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * [MetricDataQuery])) ((:*:) * (S1 * (MetaSel (Just Symbol "_gmdStartTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * ISO8601)) (S1 * (MetaSel (Just Symbol "_gmdEndTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * ISO8601))))))
type Rs GetMetricData Source # 

Request Lenses

gmdMaxDatapoints :: Lens' GetMetricData (Maybe Int) Source #

The maximum number of data points the request should return before paginating. If you omit this, the default of 100,800 is used.

gmdNextToken :: Lens' GetMetricData (Maybe Text) Source #

Include this value, if it was returned by the previous call, to get the next set of data points.

gmdScanBy :: Lens' GetMetricData (Maybe ScanBy) Source #

The order in which data points should be returned. TimestampDescending returns the newest data first and paginates when the MaxDatapoints limit is reached. TimestampAscending returns the oldest data first and paginates when the MaxDatapoints limit is reached.

gmdMetricDataQueries :: Lens' GetMetricData [MetricDataQuery] Source #

The metric queries to be returned. A single GetMetricData call can include as many as 100 MetricDataQuery structures. Each of these structures can specify either a metric to retrieve, or a math expression to perform on retrieved data.

gmdStartTime :: Lens' GetMetricData UTCTime Source #

The time stamp indicating the earliest data to be returned.

gmdEndTime :: Lens' GetMetricData UTCTime Source #

The time stamp indicating the latest data to be returned.

Destructuring the Response

getMetricDataResponse Source #

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

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

data GetMetricDataResponse Source #

See: getMetricDataResponse smart constructor.

Instances

Eq GetMetricDataResponse Source # 
Data GetMetricDataResponse Source # 

Methods

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

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

toConstr :: GetMetricDataResponse -> Constr #

dataTypeOf :: GetMetricDataResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetMetricDataResponse Source # 
Show GetMetricDataResponse Source # 
Generic GetMetricDataResponse Source # 
NFData GetMetricDataResponse Source # 

Methods

rnf :: GetMetricDataResponse -> () #

type Rep GetMetricDataResponse Source # 
type Rep GetMetricDataResponse = D1 * (MetaData "GetMetricDataResponse" "Network.AWS.CloudWatch.GetMetricData" "amazonka-cloudwatch-1.6.0-9Bblpq0vnZd2Ryjsugueuz" False) (C1 * (MetaCons "GetMetricDataResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_gmdrsMetricDataResults") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [MetricDataResult]))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gmdrsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_gmdrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

Response Lenses

gmdrsMetricDataResults :: Lens' GetMetricDataResponse [MetricDataResult] Source #

The metrics that are returned, including the metric name, namespace, and dimensions.

gmdrsNextToken :: Lens' GetMetricDataResponse (Maybe Text) Source #

A token that marks the next batch of returned results.

gmdrsResponseStatus :: Lens' GetMetricDataResponse Int Source #

  • - | The response status code.