Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Retrieves the alarms for the specified metric. To filter the results, specify a statistic, period, or unit.
This operation retrieves only standard alarms that are based on the specified metric. It does not return alarms based on math expressions that use the specified metric, or composite alarms that use the specified metric.
Synopsis
- data DescribeAlarmsForMetric = DescribeAlarmsForMetric' {
- period :: Maybe Natural
- dimensions :: Maybe [Dimension]
- unit :: Maybe StandardUnit
- statistic :: Maybe Statistic
- extendedStatistic :: Maybe Text
- metricName :: Text
- namespace :: Text
- newDescribeAlarmsForMetric :: Text -> Text -> DescribeAlarmsForMetric
- describeAlarmsForMetric_period :: Lens' DescribeAlarmsForMetric (Maybe Natural)
- describeAlarmsForMetric_dimensions :: Lens' DescribeAlarmsForMetric (Maybe [Dimension])
- describeAlarmsForMetric_unit :: Lens' DescribeAlarmsForMetric (Maybe StandardUnit)
- describeAlarmsForMetric_statistic :: Lens' DescribeAlarmsForMetric (Maybe Statistic)
- describeAlarmsForMetric_extendedStatistic :: Lens' DescribeAlarmsForMetric (Maybe Text)
- describeAlarmsForMetric_metricName :: Lens' DescribeAlarmsForMetric Text
- describeAlarmsForMetric_namespace :: Lens' DescribeAlarmsForMetric Text
- data DescribeAlarmsForMetricResponse = DescribeAlarmsForMetricResponse' {
- metricAlarms :: Maybe [MetricAlarm]
- httpStatus :: Int
- newDescribeAlarmsForMetricResponse :: Int -> DescribeAlarmsForMetricResponse
- describeAlarmsForMetricResponse_metricAlarms :: Lens' DescribeAlarmsForMetricResponse (Maybe [MetricAlarm])
- describeAlarmsForMetricResponse_httpStatus :: Lens' DescribeAlarmsForMetricResponse Int
Creating a Request
data DescribeAlarmsForMetric Source #
See: newDescribeAlarmsForMetric
smart constructor.
DescribeAlarmsForMetric' | |
|
Instances
newDescribeAlarmsForMetric Source #
:: Text | |
-> Text | |
-> DescribeAlarmsForMetric |
Create a value of DescribeAlarmsForMetric
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:period:DescribeAlarmsForMetric'
, describeAlarmsForMetric_period
- The period, in seconds, over which the statistic is applied.
$sel:dimensions:DescribeAlarmsForMetric'
, describeAlarmsForMetric_dimensions
- The dimensions associated with the metric. If the metric has any
associated dimensions, you must specify them in order for the call to
succeed.
$sel:unit:DescribeAlarmsForMetric'
, describeAlarmsForMetric_unit
- The unit for the metric.
$sel:statistic:DescribeAlarmsForMetric'
, describeAlarmsForMetric_statistic
- The statistic for the metric, other than percentiles. For percentile
statistics, use ExtendedStatistics
.
$sel:extendedStatistic:DescribeAlarmsForMetric'
, describeAlarmsForMetric_extendedStatistic
- The percentile statistic for the metric. Specify a value between p0.0
and p100.
$sel:metricName:DescribeAlarmsForMetric'
, describeAlarmsForMetric_metricName
- The name of the metric.
$sel:namespace:DescribeAlarmsForMetric'
, describeAlarmsForMetric_namespace
- The namespace of the metric.
Request Lenses
describeAlarmsForMetric_period :: Lens' DescribeAlarmsForMetric (Maybe Natural) Source #
The period, in seconds, over which the statistic is applied.
describeAlarmsForMetric_dimensions :: Lens' DescribeAlarmsForMetric (Maybe [Dimension]) Source #
The dimensions associated with the metric. If the metric has any associated dimensions, you must specify them in order for the call to succeed.
describeAlarmsForMetric_unit :: Lens' DescribeAlarmsForMetric (Maybe StandardUnit) Source #
The unit for the metric.
describeAlarmsForMetric_statistic :: Lens' DescribeAlarmsForMetric (Maybe Statistic) Source #
The statistic for the metric, other than percentiles. For percentile
statistics, use ExtendedStatistics
.
describeAlarmsForMetric_extendedStatistic :: Lens' DescribeAlarmsForMetric (Maybe Text) Source #
The percentile statistic for the metric. Specify a value between p0.0 and p100.
describeAlarmsForMetric_metricName :: Lens' DescribeAlarmsForMetric Text Source #
The name of the metric.
describeAlarmsForMetric_namespace :: Lens' DescribeAlarmsForMetric Text Source #
The namespace of the metric.
Destructuring the Response
data DescribeAlarmsForMetricResponse Source #
See: newDescribeAlarmsForMetricResponse
smart constructor.
DescribeAlarmsForMetricResponse' | |
|
Instances
Eq DescribeAlarmsForMetricResponse Source # | |
Read DescribeAlarmsForMetricResponse Source # | |
Show DescribeAlarmsForMetricResponse Source # | |
Defined in Amazonka.CloudWatch.DescribeAlarmsForMetric | |
Generic DescribeAlarmsForMetricResponse Source # | |
NFData DescribeAlarmsForMetricResponse Source # | |
Defined in Amazonka.CloudWatch.DescribeAlarmsForMetric rnf :: DescribeAlarmsForMetricResponse -> () # | |
type Rep DescribeAlarmsForMetricResponse Source # | |
Defined in Amazonka.CloudWatch.DescribeAlarmsForMetric type Rep DescribeAlarmsForMetricResponse = D1 ('MetaData "DescribeAlarmsForMetricResponse" "Amazonka.CloudWatch.DescribeAlarmsForMetric" "libZSservicesZSamazonka-cloudwatchZSamazonka-cloudwatch" 'False) (C1 ('MetaCons "DescribeAlarmsForMetricResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "metricAlarms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [MetricAlarm])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newDescribeAlarmsForMetricResponse Source #
Create a value of DescribeAlarmsForMetricResponse
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:metricAlarms:DescribeAlarmsForMetricResponse'
, describeAlarmsForMetricResponse_metricAlarms
- The information for each alarm with the specified metric.
$sel:httpStatus:DescribeAlarmsForMetricResponse'
, describeAlarmsForMetricResponse_httpStatus
- The response's http status code.
Response Lenses
describeAlarmsForMetricResponse_metricAlarms :: Lens' DescribeAlarmsForMetricResponse (Maybe [MetricAlarm]) Source #
The information for each alarm with the specified metric.
describeAlarmsForMetricResponse_httpStatus :: Lens' DescribeAlarmsForMetricResponse Int Source #
The response's http status code.