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

Amazonka.CloudWatch.ListMetrics

Description

List the specified metrics. You can use the returned metrics with GetMetricData or GetMetricStatistics to obtain statistical data.

Up to 500 results are returned for any one call. To retrieve additional results, use the returned token with subsequent calls.

After you create a metric, allow up to 15 minutes before the metric appears. You can see statistics about the metric sooner by using GetMetricData or GetMetricStatistics.

ListMetrics doesn't return information about metrics if those metrics haven't reported data in the past two weeks. To retrieve those metrics, use GetMetricData or GetMetricStatistics.

This operation returns paginated results.

Synopsis

Creating a Request

data ListMetrics Source #

See: newListMetrics smart constructor.

Constructors

ListMetrics' 

Fields

  • metricName :: Maybe Text

    The name of the metric to filter against. Only the metrics with names that match exactly will be returned.

  • namespace :: Maybe Text

    The metric namespace to filter against. Only the namespace that matches exactly will be returned.

  • nextToken :: Maybe Text

    The token returned by a previous call to indicate that there is more data available.

  • recentlyActive :: Maybe RecentlyActive

    To filter the results to show only metrics that have had data points published in the past three hours, specify this parameter with a value of PT3H. This is the only valid value for this parameter.

    The results that are returned are an approximation of the value you specify. There is a low probability that the returned results include metrics with last published data as much as 40 minutes more than the specified time interval.

  • dimensions :: Maybe [DimensionFilter]

    The dimensions to filter against. Only the dimensions that match exactly will be returned.

Instances

Instances details
Eq ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Read ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Show ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Generic ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Associated Types

type Rep ListMetrics :: Type -> Type #

NFData ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Methods

rnf :: ListMetrics -> () #

Hashable ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

AWSPager ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

AWSRequest ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Associated Types

type AWSResponse ListMetrics #

ToHeaders ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Methods

toHeaders :: ListMetrics -> [Header] #

ToPath ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

ToQuery ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

type Rep ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

type Rep ListMetrics = D1 ('MetaData "ListMetrics" "Amazonka.CloudWatch.ListMetrics" "libZSservicesZSamazonka-cloudwatchZSamazonka-cloudwatch" 'False) (C1 ('MetaCons "ListMetrics'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "metricName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "namespace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "recentlyActive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RecentlyActive)) :*: S1 ('MetaSel ('Just "dimensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [DimensionFilter]))))))
type AWSResponse ListMetrics Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

newListMetrics :: ListMetrics Source #

Create a value of ListMetrics with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:metricName:ListMetrics', listMetrics_metricName - The name of the metric to filter against. Only the metrics with names that match exactly will be returned.

$sel:namespace:ListMetrics', listMetrics_namespace - The metric namespace to filter against. Only the namespace that matches exactly will be returned.

$sel:nextToken:ListMetrics', listMetrics_nextToken - The token returned by a previous call to indicate that there is more data available.

$sel:recentlyActive:ListMetrics', listMetrics_recentlyActive - To filter the results to show only metrics that have had data points published in the past three hours, specify this parameter with a value of PT3H. This is the only valid value for this parameter.

The results that are returned are an approximation of the value you specify. There is a low probability that the returned results include metrics with last published data as much as 40 minutes more than the specified time interval.

$sel:dimensions:ListMetrics', listMetrics_dimensions - The dimensions to filter against. Only the dimensions that match exactly will be returned.

Request Lenses

listMetrics_metricName :: Lens' ListMetrics (Maybe Text) Source #

The name of the metric to filter against. Only the metrics with names that match exactly will be returned.

listMetrics_namespace :: Lens' ListMetrics (Maybe Text) Source #

The metric namespace to filter against. Only the namespace that matches exactly will be returned.

listMetrics_nextToken :: Lens' ListMetrics (Maybe Text) Source #

The token returned by a previous call to indicate that there is more data available.

listMetrics_recentlyActive :: Lens' ListMetrics (Maybe RecentlyActive) Source #

To filter the results to show only metrics that have had data points published in the past three hours, specify this parameter with a value of PT3H. This is the only valid value for this parameter.

The results that are returned are an approximation of the value you specify. There is a low probability that the returned results include metrics with last published data as much as 40 minutes more than the specified time interval.

listMetrics_dimensions :: Lens' ListMetrics (Maybe [DimensionFilter]) Source #

The dimensions to filter against. Only the dimensions that match exactly will be returned.

Destructuring the Response

data ListMetricsResponse Source #

See: newListMetricsResponse smart constructor.

Constructors

ListMetricsResponse' 

Fields

Instances

Instances details
Eq ListMetricsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Read ListMetricsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Show ListMetricsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Generic ListMetricsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Associated Types

type Rep ListMetricsResponse :: Type -> Type #

NFData ListMetricsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

Methods

rnf :: ListMetricsResponse -> () #

type Rep ListMetricsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.ListMetrics

type Rep ListMetricsResponse = D1 ('MetaData "ListMetricsResponse" "Amazonka.CloudWatch.ListMetrics" "libZSservicesZSamazonka-cloudwatchZSamazonka-cloudwatch" 'False) (C1 ('MetaCons "ListMetricsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "metrics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Metric])) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newListMetricsResponse Source #

Create a value of ListMetricsResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:metrics:ListMetricsResponse', listMetricsResponse_metrics - The metrics that match your request.

$sel:nextToken:ListMetrics', listMetricsResponse_nextToken - The token that marks the start of the next batch of returned results.

$sel:httpStatus:ListMetricsResponse', listMetricsResponse_httpStatus - The response's http status code.

Response Lenses

listMetricsResponse_metrics :: Lens' ListMetricsResponse (Maybe [Metric]) Source #

The metrics that match your request.

listMetricsResponse_nextToken :: Lens' ListMetricsResponse (Maybe Text) Source #

The token that marks the start of the next batch of returned results.