amazonka-cloudwatch-1.6.1: 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 #

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 #

See: getMetricData smart constructor.

Instances
Eq GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Data GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

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 # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Show GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Generic GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Associated Types

type Rep GetMetricData :: Type -> Type #

Hashable GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

AWSRequest GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Associated Types

type Rs GetMetricData :: Type #

ToHeaders GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

ToPath GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

ToQuery GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

NFData GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Methods

rnf :: GetMetricData -> () #

type Rep GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

type Rep GetMetricData = D1 (MetaData "GetMetricData" "Network.AWS.CloudWatch.GetMetricData" "amazonka-cloudwatch-1.6.1-BXV5tDksdKY1j2VjYSSfII" False) (C1 (MetaCons "GetMetricData'" PrefixI True) ((S1 (MetaSel (Just "_gmdMaxDatapoints") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Int)) :*: (S1 (MetaSel (Just "_gmdNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_gmdScanBy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ScanBy)))) :*: (S1 (MetaSel (Just "_gmdMetricDataQueries") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [MetricDataQuery]) :*: (S1 (MetaSel (Just "_gmdStartTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ISO8601) :*: S1 (MetaSel (Just "_gmdEndTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ISO8601)))))
type Rs GetMetricData # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Request Lenses

gmdMaxDatapoints :: Lens' GetMetricData (Maybe Int) #

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) #

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

gmdScanBy :: Lens' GetMetricData (Maybe ScanBy) #

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] #

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 #

The time stamp indicating the earliest data to be returned.

gmdEndTime :: Lens' GetMetricData UTCTime #

The time stamp indicating the latest data to be returned.

Destructuring the Response

getMetricDataResponse #

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 #

See: getMetricDataResponse smart constructor.

Instances
Eq GetMetricDataResponse # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Data GetMetricDataResponse # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

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 # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Show GetMetricDataResponse # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Generic GetMetricDataResponse # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Associated Types

type Rep GetMetricDataResponse :: Type -> Type #

NFData GetMetricDataResponse # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

Methods

rnf :: GetMetricDataResponse -> () #

type Rep GetMetricDataResponse # 
Instance details

Defined in Network.AWS.CloudWatch.GetMetricData

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

Response Lenses

gmdrsMetricDataResults :: Lens' GetMetricDataResponse [MetricDataResult] #

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

gmdrsNextToken :: Lens' GetMetricDataResponse (Maybe Text) #

A token that marks the next batch of returned results.

gmdrsResponseStatus :: Lens' GetMetricDataResponse Int #

  • - | The response status code.