{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CloudWatch.DescribeAlarmsForMetric
(
DescribeAlarmsForMetric (..),
newDescribeAlarmsForMetric,
describeAlarmsForMetric_period,
describeAlarmsForMetric_dimensions,
describeAlarmsForMetric_unit,
describeAlarmsForMetric_statistic,
describeAlarmsForMetric_extendedStatistic,
describeAlarmsForMetric_metricName,
describeAlarmsForMetric_namespace,
DescribeAlarmsForMetricResponse (..),
newDescribeAlarmsForMetricResponse,
describeAlarmsForMetricResponse_metricAlarms,
describeAlarmsForMetricResponse_httpStatus,
)
where
import Amazonka.CloudWatch.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeAlarmsForMetric = DescribeAlarmsForMetric'
{
DescribeAlarmsForMetric -> Maybe Natural
period :: Prelude.Maybe Prelude.Natural,
DescribeAlarmsForMetric -> Maybe [Dimension]
dimensions :: Prelude.Maybe [Dimension],
DescribeAlarmsForMetric -> Maybe StandardUnit
unit :: Prelude.Maybe StandardUnit,
DescribeAlarmsForMetric -> Maybe Statistic
statistic :: Prelude.Maybe Statistic,
DescribeAlarmsForMetric -> Maybe Text
extendedStatistic :: Prelude.Maybe Prelude.Text,
DescribeAlarmsForMetric -> Text
metricName :: Prelude.Text,
DescribeAlarmsForMetric -> Text
namespace :: Prelude.Text
}
deriving (DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
(DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool)
-> (DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool)
-> Eq DescribeAlarmsForMetric
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
$c/= :: DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
== :: DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
$c== :: DescribeAlarmsForMetric -> DescribeAlarmsForMetric -> Bool
Prelude.Eq, ReadPrec [DescribeAlarmsForMetric]
ReadPrec DescribeAlarmsForMetric
Int -> ReadS DescribeAlarmsForMetric
ReadS [DescribeAlarmsForMetric]
(Int -> ReadS DescribeAlarmsForMetric)
-> ReadS [DescribeAlarmsForMetric]
-> ReadPrec DescribeAlarmsForMetric
-> ReadPrec [DescribeAlarmsForMetric]
-> Read DescribeAlarmsForMetric
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAlarmsForMetric]
$creadListPrec :: ReadPrec [DescribeAlarmsForMetric]
readPrec :: ReadPrec DescribeAlarmsForMetric
$creadPrec :: ReadPrec DescribeAlarmsForMetric
readList :: ReadS [DescribeAlarmsForMetric]
$creadList :: ReadS [DescribeAlarmsForMetric]
readsPrec :: Int -> ReadS DescribeAlarmsForMetric
$creadsPrec :: Int -> ReadS DescribeAlarmsForMetric
Prelude.Read, Int -> DescribeAlarmsForMetric -> ShowS
[DescribeAlarmsForMetric] -> ShowS
DescribeAlarmsForMetric -> String
(Int -> DescribeAlarmsForMetric -> ShowS)
-> (DescribeAlarmsForMetric -> String)
-> ([DescribeAlarmsForMetric] -> ShowS)
-> Show DescribeAlarmsForMetric
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAlarmsForMetric] -> ShowS
$cshowList :: [DescribeAlarmsForMetric] -> ShowS
show :: DescribeAlarmsForMetric -> String
$cshow :: DescribeAlarmsForMetric -> String
showsPrec :: Int -> DescribeAlarmsForMetric -> ShowS
$cshowsPrec :: Int -> DescribeAlarmsForMetric -> ShowS
Prelude.Show, (forall x.
DescribeAlarmsForMetric -> Rep DescribeAlarmsForMetric x)
-> (forall x.
Rep DescribeAlarmsForMetric x -> DescribeAlarmsForMetric)
-> Generic DescribeAlarmsForMetric
forall x. Rep DescribeAlarmsForMetric x -> DescribeAlarmsForMetric
forall x. DescribeAlarmsForMetric -> Rep DescribeAlarmsForMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAlarmsForMetric x -> DescribeAlarmsForMetric
$cfrom :: forall x. DescribeAlarmsForMetric -> Rep DescribeAlarmsForMetric x
Prelude.Generic)
newDescribeAlarmsForMetric ::
Prelude.Text ->
Prelude.Text ->
DescribeAlarmsForMetric
newDescribeAlarmsForMetric :: Text -> Text -> DescribeAlarmsForMetric
newDescribeAlarmsForMetric Text
pMetricName_ Text
pNamespace_ =
DescribeAlarmsForMetric' :: Maybe Natural
-> Maybe [Dimension]
-> Maybe StandardUnit
-> Maybe Statistic
-> Maybe Text
-> Text
-> Text
-> DescribeAlarmsForMetric
DescribeAlarmsForMetric'
{ $sel:period:DescribeAlarmsForMetric' :: Maybe Natural
period = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:dimensions:DescribeAlarmsForMetric' :: Maybe [Dimension]
dimensions = Maybe [Dimension]
forall a. Maybe a
Prelude.Nothing,
$sel:unit:DescribeAlarmsForMetric' :: Maybe StandardUnit
unit = Maybe StandardUnit
forall a. Maybe a
Prelude.Nothing,
$sel:statistic:DescribeAlarmsForMetric' :: Maybe Statistic
statistic = Maybe Statistic
forall a. Maybe a
Prelude.Nothing,
$sel:extendedStatistic:DescribeAlarmsForMetric' :: Maybe Text
extendedStatistic = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:metricName:DescribeAlarmsForMetric' :: Text
metricName = Text
pMetricName_,
$sel:namespace:DescribeAlarmsForMetric' :: Text
namespace = Text
pNamespace_
}
describeAlarmsForMetric_period :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe Prelude.Natural)
describeAlarmsForMetric_period :: (Maybe Natural -> f (Maybe Natural))
-> DescribeAlarmsForMetric -> f DescribeAlarmsForMetric
describeAlarmsForMetric_period = (DescribeAlarmsForMetric -> Maybe Natural)
-> (DescribeAlarmsForMetric
-> Maybe Natural -> DescribeAlarmsForMetric)
-> Lens
DescribeAlarmsForMetric
DescribeAlarmsForMetric
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe Natural
period :: Maybe Natural
$sel:period:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Natural
period} -> Maybe Natural
period) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe Natural
a -> DescribeAlarmsForMetric
s {$sel:period:DescribeAlarmsForMetric' :: Maybe Natural
period = Maybe Natural
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_dimensions :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe [Dimension])
describeAlarmsForMetric_dimensions :: (Maybe [Dimension] -> f (Maybe [Dimension]))
-> DescribeAlarmsForMetric -> f DescribeAlarmsForMetric
describeAlarmsForMetric_dimensions = (DescribeAlarmsForMetric -> Maybe [Dimension])
-> (DescribeAlarmsForMetric
-> Maybe [Dimension] -> DescribeAlarmsForMetric)
-> Lens
DescribeAlarmsForMetric
DescribeAlarmsForMetric
(Maybe [Dimension])
(Maybe [Dimension])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe [Dimension]
dimensions :: Maybe [Dimension]
$sel:dimensions:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe [Dimension]
dimensions} -> Maybe [Dimension]
dimensions) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe [Dimension]
a -> DescribeAlarmsForMetric
s {$sel:dimensions:DescribeAlarmsForMetric' :: Maybe [Dimension]
dimensions = Maybe [Dimension]
a} :: DescribeAlarmsForMetric) ((Maybe [Dimension] -> f (Maybe [Dimension]))
-> DescribeAlarmsForMetric -> f DescribeAlarmsForMetric)
-> ((Maybe [Dimension] -> f (Maybe [Dimension]))
-> Maybe [Dimension] -> f (Maybe [Dimension]))
-> (Maybe [Dimension] -> f (Maybe [Dimension]))
-> DescribeAlarmsForMetric
-> f DescribeAlarmsForMetric
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Dimension] [Dimension] [Dimension] [Dimension]
-> Iso
(Maybe [Dimension])
(Maybe [Dimension])
(Maybe [Dimension])
(Maybe [Dimension])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Dimension] [Dimension] [Dimension] [Dimension]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeAlarmsForMetric_unit :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe StandardUnit)
describeAlarmsForMetric_unit :: (Maybe StandardUnit -> f (Maybe StandardUnit))
-> DescribeAlarmsForMetric -> f DescribeAlarmsForMetric
describeAlarmsForMetric_unit = (DescribeAlarmsForMetric -> Maybe StandardUnit)
-> (DescribeAlarmsForMetric
-> Maybe StandardUnit -> DescribeAlarmsForMetric)
-> Lens
DescribeAlarmsForMetric
DescribeAlarmsForMetric
(Maybe StandardUnit)
(Maybe StandardUnit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe StandardUnit
unit :: Maybe StandardUnit
$sel:unit:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe StandardUnit
unit} -> Maybe StandardUnit
unit) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe StandardUnit
a -> DescribeAlarmsForMetric
s {$sel:unit:DescribeAlarmsForMetric' :: Maybe StandardUnit
unit = Maybe StandardUnit
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_statistic :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe Statistic)
describeAlarmsForMetric_statistic :: (Maybe Statistic -> f (Maybe Statistic))
-> DescribeAlarmsForMetric -> f DescribeAlarmsForMetric
describeAlarmsForMetric_statistic = (DescribeAlarmsForMetric -> Maybe Statistic)
-> (DescribeAlarmsForMetric
-> Maybe Statistic -> DescribeAlarmsForMetric)
-> Lens
DescribeAlarmsForMetric
DescribeAlarmsForMetric
(Maybe Statistic)
(Maybe Statistic)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe Statistic
statistic :: Maybe Statistic
$sel:statistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Statistic
statistic} -> Maybe Statistic
statistic) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe Statistic
a -> DescribeAlarmsForMetric
s {$sel:statistic:DescribeAlarmsForMetric' :: Maybe Statistic
statistic = Maybe Statistic
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_extendedStatistic :: Lens.Lens' DescribeAlarmsForMetric (Prelude.Maybe Prelude.Text)
describeAlarmsForMetric_extendedStatistic :: (Maybe Text -> f (Maybe Text))
-> DescribeAlarmsForMetric -> f DescribeAlarmsForMetric
describeAlarmsForMetric_extendedStatistic = (DescribeAlarmsForMetric -> Maybe Text)
-> (DescribeAlarmsForMetric
-> Maybe Text -> DescribeAlarmsForMetric)
-> Lens
DescribeAlarmsForMetric
DescribeAlarmsForMetric
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Maybe Text
extendedStatistic :: Maybe Text
$sel:extendedStatistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Text
extendedStatistic} -> Maybe Text
extendedStatistic) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Maybe Text
a -> DescribeAlarmsForMetric
s {$sel:extendedStatistic:DescribeAlarmsForMetric' :: Maybe Text
extendedStatistic = Maybe Text
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_metricName :: Lens.Lens' DescribeAlarmsForMetric Prelude.Text
describeAlarmsForMetric_metricName :: (Text -> f Text)
-> DescribeAlarmsForMetric -> f DescribeAlarmsForMetric
describeAlarmsForMetric_metricName = (DescribeAlarmsForMetric -> Text)
-> (DescribeAlarmsForMetric -> Text -> DescribeAlarmsForMetric)
-> Lens DescribeAlarmsForMetric DescribeAlarmsForMetric Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Text
metricName :: Text
$sel:metricName:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
metricName} -> Text
metricName) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Text
a -> DescribeAlarmsForMetric
s {$sel:metricName:DescribeAlarmsForMetric' :: Text
metricName = Text
a} :: DescribeAlarmsForMetric)
describeAlarmsForMetric_namespace :: Lens.Lens' DescribeAlarmsForMetric Prelude.Text
describeAlarmsForMetric_namespace :: (Text -> f Text)
-> DescribeAlarmsForMetric -> f DescribeAlarmsForMetric
describeAlarmsForMetric_namespace = (DescribeAlarmsForMetric -> Text)
-> (DescribeAlarmsForMetric -> Text -> DescribeAlarmsForMetric)
-> Lens DescribeAlarmsForMetric DescribeAlarmsForMetric Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetric' {Text
namespace :: Text
$sel:namespace:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
namespace} -> Text
namespace) (\s :: DescribeAlarmsForMetric
s@DescribeAlarmsForMetric' {} Text
a -> DescribeAlarmsForMetric
s {$sel:namespace:DescribeAlarmsForMetric' :: Text
namespace = Text
a} :: DescribeAlarmsForMetric)
instance Core.AWSRequest DescribeAlarmsForMetric where
type
AWSResponse DescribeAlarmsForMetric =
DescribeAlarmsForMetricResponse
request :: DescribeAlarmsForMetric -> Request DescribeAlarmsForMetric
request = Service
-> DescribeAlarmsForMetric -> Request DescribeAlarmsForMetric
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAlarmsForMetric
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAlarmsForMetric)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeAlarmsForMetric))
-> Logger
-> Service
-> Proxy DescribeAlarmsForMetric
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAlarmsForMetric)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DescribeAlarmsForMetricResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [MetricAlarm] -> Int -> DescribeAlarmsForMetricResponse
DescribeAlarmsForMetricResponse'
(Maybe [MetricAlarm] -> Int -> DescribeAlarmsForMetricResponse)
-> Either String (Maybe [MetricAlarm])
-> Either String (Int -> DescribeAlarmsForMetricResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MetricAlarms" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [MetricAlarm]))
-> Either String (Maybe [MetricAlarm])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [MetricAlarm])
-> [Node] -> Either String (Maybe [MetricAlarm])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [MetricAlarm]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Int -> DescribeAlarmsForMetricResponse)
-> Either String Int
-> Either String DescribeAlarmsForMetricResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DescribeAlarmsForMetric
instance Prelude.NFData DescribeAlarmsForMetric
instance Core.ToHeaders DescribeAlarmsForMetric where
toHeaders :: DescribeAlarmsForMetric -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeAlarmsForMetric -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeAlarmsForMetric where
toPath :: DescribeAlarmsForMetric -> ByteString
toPath = ByteString -> DescribeAlarmsForMetric -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeAlarmsForMetric where
toQuery :: DescribeAlarmsForMetric -> QueryString
toQuery DescribeAlarmsForMetric' {Maybe Natural
Maybe [Dimension]
Maybe Text
Maybe StandardUnit
Maybe Statistic
Text
namespace :: Text
metricName :: Text
extendedStatistic :: Maybe Text
statistic :: Maybe Statistic
unit :: Maybe StandardUnit
dimensions :: Maybe [Dimension]
period :: Maybe Natural
$sel:namespace:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
$sel:metricName:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Text
$sel:extendedStatistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Text
$sel:statistic:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Statistic
$sel:unit:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe StandardUnit
$sel:dimensions:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe [Dimension]
$sel:period:DescribeAlarmsForMetric' :: DescribeAlarmsForMetric -> Maybe Natural
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeAlarmsForMetric" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-08-01" :: Prelude.ByteString),
ByteString
"Period" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
period,
ByteString
"Dimensions"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Dimension] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Dimension] -> QueryString)
-> Maybe [Dimension] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Dimension]
dimensions),
ByteString
"Unit" ByteString -> Maybe StandardUnit -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe StandardUnit
unit,
ByteString
"Statistic" ByteString -> Maybe Statistic -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Statistic
statistic,
ByteString
"ExtendedStatistic" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
extendedStatistic,
ByteString
"MetricName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
metricName,
ByteString
"Namespace" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
namespace
]
data DescribeAlarmsForMetricResponse = DescribeAlarmsForMetricResponse'
{
DescribeAlarmsForMetricResponse -> Maybe [MetricAlarm]
metricAlarms :: Prelude.Maybe [MetricAlarm],
DescribeAlarmsForMetricResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
(DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool)
-> (DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool)
-> Eq DescribeAlarmsForMetricResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
$c/= :: DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
== :: DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
$c== :: DescribeAlarmsForMetricResponse
-> DescribeAlarmsForMetricResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAlarmsForMetricResponse]
ReadPrec DescribeAlarmsForMetricResponse
Int -> ReadS DescribeAlarmsForMetricResponse
ReadS [DescribeAlarmsForMetricResponse]
(Int -> ReadS DescribeAlarmsForMetricResponse)
-> ReadS [DescribeAlarmsForMetricResponse]
-> ReadPrec DescribeAlarmsForMetricResponse
-> ReadPrec [DescribeAlarmsForMetricResponse]
-> Read DescribeAlarmsForMetricResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAlarmsForMetricResponse]
$creadListPrec :: ReadPrec [DescribeAlarmsForMetricResponse]
readPrec :: ReadPrec DescribeAlarmsForMetricResponse
$creadPrec :: ReadPrec DescribeAlarmsForMetricResponse
readList :: ReadS [DescribeAlarmsForMetricResponse]
$creadList :: ReadS [DescribeAlarmsForMetricResponse]
readsPrec :: Int -> ReadS DescribeAlarmsForMetricResponse
$creadsPrec :: Int -> ReadS DescribeAlarmsForMetricResponse
Prelude.Read, Int -> DescribeAlarmsForMetricResponse -> ShowS
[DescribeAlarmsForMetricResponse] -> ShowS
DescribeAlarmsForMetricResponse -> String
(Int -> DescribeAlarmsForMetricResponse -> ShowS)
-> (DescribeAlarmsForMetricResponse -> String)
-> ([DescribeAlarmsForMetricResponse] -> ShowS)
-> Show DescribeAlarmsForMetricResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAlarmsForMetricResponse] -> ShowS
$cshowList :: [DescribeAlarmsForMetricResponse] -> ShowS
show :: DescribeAlarmsForMetricResponse -> String
$cshow :: DescribeAlarmsForMetricResponse -> String
showsPrec :: Int -> DescribeAlarmsForMetricResponse -> ShowS
$cshowsPrec :: Int -> DescribeAlarmsForMetricResponse -> ShowS
Prelude.Show, (forall x.
DescribeAlarmsForMetricResponse
-> Rep DescribeAlarmsForMetricResponse x)
-> (forall x.
Rep DescribeAlarmsForMetricResponse x
-> DescribeAlarmsForMetricResponse)
-> Generic DescribeAlarmsForMetricResponse
forall x.
Rep DescribeAlarmsForMetricResponse x
-> DescribeAlarmsForMetricResponse
forall x.
DescribeAlarmsForMetricResponse
-> Rep DescribeAlarmsForMetricResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAlarmsForMetricResponse x
-> DescribeAlarmsForMetricResponse
$cfrom :: forall x.
DescribeAlarmsForMetricResponse
-> Rep DescribeAlarmsForMetricResponse x
Prelude.Generic)
newDescribeAlarmsForMetricResponse ::
Prelude.Int ->
DescribeAlarmsForMetricResponse
newDescribeAlarmsForMetricResponse :: Int -> DescribeAlarmsForMetricResponse
newDescribeAlarmsForMetricResponse Int
pHttpStatus_ =
DescribeAlarmsForMetricResponse' :: Maybe [MetricAlarm] -> Int -> DescribeAlarmsForMetricResponse
DescribeAlarmsForMetricResponse'
{ $sel:metricAlarms:DescribeAlarmsForMetricResponse' :: Maybe [MetricAlarm]
metricAlarms =
Maybe [MetricAlarm]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAlarmsForMetricResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAlarmsForMetricResponse_metricAlarms :: Lens.Lens' DescribeAlarmsForMetricResponse (Prelude.Maybe [MetricAlarm])
describeAlarmsForMetricResponse_metricAlarms :: (Maybe [MetricAlarm] -> f (Maybe [MetricAlarm]))
-> DescribeAlarmsForMetricResponse
-> f DescribeAlarmsForMetricResponse
describeAlarmsForMetricResponse_metricAlarms = (DescribeAlarmsForMetricResponse -> Maybe [MetricAlarm])
-> (DescribeAlarmsForMetricResponse
-> Maybe [MetricAlarm] -> DescribeAlarmsForMetricResponse)
-> Lens
DescribeAlarmsForMetricResponse
DescribeAlarmsForMetricResponse
(Maybe [MetricAlarm])
(Maybe [MetricAlarm])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetricResponse' {Maybe [MetricAlarm]
metricAlarms :: Maybe [MetricAlarm]
$sel:metricAlarms:DescribeAlarmsForMetricResponse' :: DescribeAlarmsForMetricResponse -> Maybe [MetricAlarm]
metricAlarms} -> Maybe [MetricAlarm]
metricAlarms) (\s :: DescribeAlarmsForMetricResponse
s@DescribeAlarmsForMetricResponse' {} Maybe [MetricAlarm]
a -> DescribeAlarmsForMetricResponse
s {$sel:metricAlarms:DescribeAlarmsForMetricResponse' :: Maybe [MetricAlarm]
metricAlarms = Maybe [MetricAlarm]
a} :: DescribeAlarmsForMetricResponse) ((Maybe [MetricAlarm] -> f (Maybe [MetricAlarm]))
-> DescribeAlarmsForMetricResponse
-> f DescribeAlarmsForMetricResponse)
-> ((Maybe [MetricAlarm] -> f (Maybe [MetricAlarm]))
-> Maybe [MetricAlarm] -> f (Maybe [MetricAlarm]))
-> (Maybe [MetricAlarm] -> f (Maybe [MetricAlarm]))
-> DescribeAlarmsForMetricResponse
-> f DescribeAlarmsForMetricResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MetricAlarm] [MetricAlarm] [MetricAlarm] [MetricAlarm]
-> Iso
(Maybe [MetricAlarm])
(Maybe [MetricAlarm])
(Maybe [MetricAlarm])
(Maybe [MetricAlarm])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [MetricAlarm] [MetricAlarm] [MetricAlarm] [MetricAlarm]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeAlarmsForMetricResponse_httpStatus :: Lens.Lens' DescribeAlarmsForMetricResponse Prelude.Int
describeAlarmsForMetricResponse_httpStatus :: (Int -> f Int)
-> DescribeAlarmsForMetricResponse
-> f DescribeAlarmsForMetricResponse
describeAlarmsForMetricResponse_httpStatus = (DescribeAlarmsForMetricResponse -> Int)
-> (DescribeAlarmsForMetricResponse
-> Int -> DescribeAlarmsForMetricResponse)
-> Lens
DescribeAlarmsForMetricResponse
DescribeAlarmsForMetricResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsForMetricResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAlarmsForMetricResponse' :: DescribeAlarmsForMetricResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAlarmsForMetricResponse
s@DescribeAlarmsForMetricResponse' {} Int
a -> DescribeAlarmsForMetricResponse
s {$sel:httpStatus:DescribeAlarmsForMetricResponse' :: Int
httpStatus = Int
a} :: DescribeAlarmsForMetricResponse)
instance
Prelude.NFData
DescribeAlarmsForMetricResponse