module Stratosphere.IoT.TopicRule.CloudwatchMetricActionProperty (
CloudwatchMetricActionProperty(..),
mkCloudwatchMetricActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CloudwatchMetricActionProperty
=
CloudwatchMetricActionProperty {CloudwatchMetricActionProperty -> ()
haddock_workaround_ :: (),
CloudwatchMetricActionProperty -> Value Text
metricName :: (Value Prelude.Text),
CloudwatchMetricActionProperty -> Value Text
metricNamespace :: (Value Prelude.Text),
CloudwatchMetricActionProperty -> Maybe (Value Text)
metricTimestamp :: (Prelude.Maybe (Value Prelude.Text)),
CloudwatchMetricActionProperty -> Value Text
metricUnit :: (Value Prelude.Text),
CloudwatchMetricActionProperty -> Value Text
metricValue :: (Value Prelude.Text),
CloudwatchMetricActionProperty -> Value Text
roleArn :: (Value Prelude.Text)}
deriving stock (CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> Bool
(CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> Bool)
-> (CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> Bool)
-> Eq CloudwatchMetricActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> Bool
== :: CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> Bool
$c/= :: CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> Bool
/= :: CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> Bool
Prelude.Eq, Int -> CloudwatchMetricActionProperty -> ShowS
[CloudwatchMetricActionProperty] -> ShowS
CloudwatchMetricActionProperty -> String
(Int -> CloudwatchMetricActionProperty -> ShowS)
-> (CloudwatchMetricActionProperty -> String)
-> ([CloudwatchMetricActionProperty] -> ShowS)
-> Show CloudwatchMetricActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CloudwatchMetricActionProperty -> ShowS
showsPrec :: Int -> CloudwatchMetricActionProperty -> ShowS
$cshow :: CloudwatchMetricActionProperty -> String
show :: CloudwatchMetricActionProperty -> String
$cshowList :: [CloudwatchMetricActionProperty] -> ShowS
showList :: [CloudwatchMetricActionProperty] -> ShowS
Prelude.Show)
mkCloudwatchMetricActionProperty ::
Value Prelude.Text
-> Value Prelude.Text
-> Value Prelude.Text
-> Value Prelude.Text
-> Value Prelude.Text -> CloudwatchMetricActionProperty
mkCloudwatchMetricActionProperty :: Value Text
-> Value Text
-> Value Text
-> Value Text
-> Value Text
-> CloudwatchMetricActionProperty
mkCloudwatchMetricActionProperty
Value Text
metricName
Value Text
metricNamespace
Value Text
metricUnit
Value Text
metricValue
Value Text
roleArn
= CloudwatchMetricActionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), metricName :: Value Text
metricName = Value Text
metricName,
metricNamespace :: Value Text
metricNamespace = Value Text
metricNamespace, metricUnit :: Value Text
metricUnit = Value Text
metricUnit,
metricValue :: Value Text
metricValue = Value Text
metricValue, roleArn :: Value Text
roleArn = Value Text
roleArn,
metricTimestamp :: Maybe (Value Text)
metricTimestamp = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CloudwatchMetricActionProperty where
toResourceProperties :: CloudwatchMetricActionProperty -> ResourceProperties
toResourceProperties CloudwatchMetricActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudwatchMetricActionProperty -> ()
metricName :: CloudwatchMetricActionProperty -> Value Text
metricNamespace :: CloudwatchMetricActionProperty -> Value Text
metricTimestamp :: CloudwatchMetricActionProperty -> Maybe (Value Text)
metricUnit :: CloudwatchMetricActionProperty -> Value Text
metricValue :: CloudwatchMetricActionProperty -> Value Text
roleArn :: CloudwatchMetricActionProperty -> Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::TopicRule.CloudwatchMetricAction",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"MetricName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
metricName,
Key
"MetricNamespace" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
metricNamespace,
Key
"MetricUnit" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
metricUnit, Key
"MetricValue" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
metricValue,
Key
"RoleArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
roleArn]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MetricTimestamp" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
metricTimestamp]))}
instance JSON.ToJSON CloudwatchMetricActionProperty where
toJSON :: CloudwatchMetricActionProperty -> Value
toJSON CloudwatchMetricActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudwatchMetricActionProperty -> ()
metricName :: CloudwatchMetricActionProperty -> Value Text
metricNamespace :: CloudwatchMetricActionProperty -> Value Text
metricTimestamp :: CloudwatchMetricActionProperty -> Maybe (Value Text)
metricUnit :: CloudwatchMetricActionProperty -> Value Text
metricValue :: CloudwatchMetricActionProperty -> Value Text
roleArn :: CloudwatchMetricActionProperty -> Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"MetricName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
metricName,
Key
"MetricNamespace" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
metricNamespace,
Key
"MetricUnit" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
metricUnit, Key
"MetricValue" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
metricValue,
Key
"RoleArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
roleArn]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MetricTimestamp" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
metricTimestamp])))
instance Property "MetricName" CloudwatchMetricActionProperty where
type PropertyType "MetricName" CloudwatchMetricActionProperty = Value Prelude.Text
set :: PropertyType "MetricName" CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> CloudwatchMetricActionProperty
set PropertyType "MetricName" CloudwatchMetricActionProperty
newValue CloudwatchMetricActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudwatchMetricActionProperty -> ()
metricName :: CloudwatchMetricActionProperty -> Value Text
metricNamespace :: CloudwatchMetricActionProperty -> Value Text
metricTimestamp :: CloudwatchMetricActionProperty -> Maybe (Value Text)
metricUnit :: CloudwatchMetricActionProperty -> Value Text
metricValue :: CloudwatchMetricActionProperty -> Value Text
roleArn :: CloudwatchMetricActionProperty -> Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
= CloudwatchMetricActionProperty {metricName :: Value Text
metricName = PropertyType "MetricName" CloudwatchMetricActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
haddock_workaround_ :: ()
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
instance Property "MetricNamespace" CloudwatchMetricActionProperty where
type PropertyType "MetricNamespace" CloudwatchMetricActionProperty = Value Prelude.Text
set :: PropertyType "MetricNamespace" CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> CloudwatchMetricActionProperty
set PropertyType "MetricNamespace" CloudwatchMetricActionProperty
newValue CloudwatchMetricActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudwatchMetricActionProperty -> ()
metricName :: CloudwatchMetricActionProperty -> Value Text
metricNamespace :: CloudwatchMetricActionProperty -> Value Text
metricTimestamp :: CloudwatchMetricActionProperty -> Maybe (Value Text)
metricUnit :: CloudwatchMetricActionProperty -> Value Text
metricValue :: CloudwatchMetricActionProperty -> Value Text
roleArn :: CloudwatchMetricActionProperty -> Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
= CloudwatchMetricActionProperty {metricNamespace :: Value Text
metricNamespace = PropertyType "MetricNamespace" CloudwatchMetricActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
instance Property "MetricTimestamp" CloudwatchMetricActionProperty where
type PropertyType "MetricTimestamp" CloudwatchMetricActionProperty = Value Prelude.Text
set :: PropertyType "MetricTimestamp" CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> CloudwatchMetricActionProperty
set PropertyType "MetricTimestamp" CloudwatchMetricActionProperty
newValue CloudwatchMetricActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudwatchMetricActionProperty -> ()
metricName :: CloudwatchMetricActionProperty -> Value Text
metricNamespace :: CloudwatchMetricActionProperty -> Value Text
metricTimestamp :: CloudwatchMetricActionProperty -> Maybe (Value Text)
metricUnit :: CloudwatchMetricActionProperty -> Value Text
metricValue :: CloudwatchMetricActionProperty -> Value Text
roleArn :: CloudwatchMetricActionProperty -> Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
= CloudwatchMetricActionProperty
{metricTimestamp :: Maybe (Value Text)
metricTimestamp = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MetricTimestamp" CloudwatchMetricActionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
instance Property "MetricUnit" CloudwatchMetricActionProperty where
type PropertyType "MetricUnit" CloudwatchMetricActionProperty = Value Prelude.Text
set :: PropertyType "MetricUnit" CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> CloudwatchMetricActionProperty
set PropertyType "MetricUnit" CloudwatchMetricActionProperty
newValue CloudwatchMetricActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudwatchMetricActionProperty -> ()
metricName :: CloudwatchMetricActionProperty -> Value Text
metricNamespace :: CloudwatchMetricActionProperty -> Value Text
metricTimestamp :: CloudwatchMetricActionProperty -> Maybe (Value Text)
metricUnit :: CloudwatchMetricActionProperty -> Value Text
metricValue :: CloudwatchMetricActionProperty -> Value Text
roleArn :: CloudwatchMetricActionProperty -> Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
= CloudwatchMetricActionProperty {metricUnit :: Value Text
metricUnit = PropertyType "MetricUnit" CloudwatchMetricActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricValue :: Value Text
roleArn :: Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricValue :: Value Text
roleArn :: Value Text
..}
instance Property "MetricValue" CloudwatchMetricActionProperty where
type PropertyType "MetricValue" CloudwatchMetricActionProperty = Value Prelude.Text
set :: PropertyType "MetricValue" CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> CloudwatchMetricActionProperty
set PropertyType "MetricValue" CloudwatchMetricActionProperty
newValue CloudwatchMetricActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudwatchMetricActionProperty -> ()
metricName :: CloudwatchMetricActionProperty -> Value Text
metricNamespace :: CloudwatchMetricActionProperty -> Value Text
metricTimestamp :: CloudwatchMetricActionProperty -> Maybe (Value Text)
metricUnit :: CloudwatchMetricActionProperty -> Value Text
metricValue :: CloudwatchMetricActionProperty -> Value Text
roleArn :: CloudwatchMetricActionProperty -> Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
= CloudwatchMetricActionProperty {metricValue :: Value Text
metricValue = PropertyType "MetricValue" CloudwatchMetricActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
roleArn :: Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
roleArn :: Value Text
..}
instance Property "RoleArn" CloudwatchMetricActionProperty where
type PropertyType "RoleArn" CloudwatchMetricActionProperty = Value Prelude.Text
set :: PropertyType "RoleArn" CloudwatchMetricActionProperty
-> CloudwatchMetricActionProperty -> CloudwatchMetricActionProperty
set PropertyType "RoleArn" CloudwatchMetricActionProperty
newValue CloudwatchMetricActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudwatchMetricActionProperty -> ()
metricName :: CloudwatchMetricActionProperty -> Value Text
metricNamespace :: CloudwatchMetricActionProperty -> Value Text
metricTimestamp :: CloudwatchMetricActionProperty -> Maybe (Value Text)
metricUnit :: CloudwatchMetricActionProperty -> Value Text
metricValue :: CloudwatchMetricActionProperty -> Value Text
roleArn :: CloudwatchMetricActionProperty -> Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
roleArn :: Value Text
..}
= CloudwatchMetricActionProperty {roleArn :: Value Text
roleArn = PropertyType "RoleArn" CloudwatchMetricActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
haddock_workaround_ :: ()
metricName :: Value Text
metricNamespace :: Value Text
metricTimestamp :: Maybe (Value Text)
metricUnit :: Value Text
metricValue :: Value Text
..}