module Stratosphere.Shield.Protection (
module Exports, Protection(..), mkProtection
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Shield.Protection.ApplicationLayerAutomaticResponseConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Protection
=
Protection {Protection -> ()
haddock_workaround_ :: (),
Protection
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
applicationLayerAutomaticResponseConfiguration :: (Prelude.Maybe ApplicationLayerAutomaticResponseConfigurationProperty),
Protection -> Maybe (ValueList Text)
healthCheckArns :: (Prelude.Maybe (ValueList Prelude.Text)),
Protection -> Value Text
name :: (Value Prelude.Text),
Protection -> Value Text
resourceArn :: (Value Prelude.Text),
Protection -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Protection -> Protection -> Bool
(Protection -> Protection -> Bool)
-> (Protection -> Protection -> Bool) -> Eq Protection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Protection -> Protection -> Bool
== :: Protection -> Protection -> Bool
$c/= :: Protection -> Protection -> Bool
/= :: Protection -> Protection -> Bool
Prelude.Eq, Int -> Protection -> ShowS
[Protection] -> ShowS
Protection -> String
(Int -> Protection -> ShowS)
-> (Protection -> String)
-> ([Protection] -> ShowS)
-> Show Protection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Protection -> ShowS
showsPrec :: Int -> Protection -> ShowS
$cshow :: Protection -> String
show :: Protection -> String
$cshowList :: [Protection] -> ShowS
showList :: [Protection] -> ShowS
Prelude.Show)
mkProtection ::
Value Prelude.Text -> Value Prelude.Text -> Protection
mkProtection :: Value Text -> Value Text -> Protection
mkProtection Value Text
name Value Text
resourceArn
= Protection
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, resourceArn :: Value Text
resourceArn = Value Text
resourceArn,
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
applicationLayerAutomaticResponseConfiguration = Maybe ApplicationLayerAutomaticResponseConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
healthCheckArns :: Maybe (ValueList Text)
healthCheckArns = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Protection where
toResourceProperties :: Protection -> ResourceProperties
toResourceProperties Protection {Maybe [Tag]
Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: Protection -> ()
applicationLayerAutomaticResponseConfiguration :: Protection
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Protection -> Maybe (ValueList Text)
name :: Protection -> Value Text
resourceArn :: Protection -> Value Text
tags :: Protection -> Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Shield::Protection", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"Name" 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
name, Key
"ResourceArn" 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
resourceArn]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key
-> ApplicationLayerAutomaticResponseConfigurationProperty
-> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ApplicationLayerAutomaticResponseConfiguration"
(ApplicationLayerAutomaticResponseConfigurationProperty
-> (Key, Value))
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
applicationLayerAutomaticResponseConfiguration,
Key -> ValueList 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
"HealthCheckArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
healthCheckArns,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Protection where
toJSON :: Protection -> Value
toJSON Protection {Maybe [Tag]
Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: Protection -> ()
applicationLayerAutomaticResponseConfiguration :: Protection
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Protection -> Maybe (ValueList Text)
name :: Protection -> Value Text
resourceArn :: Protection -> Value Text
tags :: Protection -> Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
..}
= [(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
"Name" 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
name, Key
"ResourceArn" 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
resourceArn]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key
-> ApplicationLayerAutomaticResponseConfigurationProperty
-> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ApplicationLayerAutomaticResponseConfiguration"
(ApplicationLayerAutomaticResponseConfigurationProperty
-> (Key, Value))
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
applicationLayerAutomaticResponseConfiguration,
Key -> ValueList 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
"HealthCheckArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
healthCheckArns,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "ApplicationLayerAutomaticResponseConfiguration" Protection where
type PropertyType "ApplicationLayerAutomaticResponseConfiguration" Protection = ApplicationLayerAutomaticResponseConfigurationProperty
set :: PropertyType
"ApplicationLayerAutomaticResponseConfiguration" Protection
-> Protection -> Protection
set PropertyType
"ApplicationLayerAutomaticResponseConfiguration" Protection
newValue Protection {Maybe [Tag]
Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: Protection -> ()
applicationLayerAutomaticResponseConfiguration :: Protection
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Protection -> Maybe (ValueList Text)
name :: Protection -> Value Text
resourceArn :: Protection -> Value Text
tags :: Protection -> Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
..}
= Protection
{applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
applicationLayerAutomaticResponseConfiguration = ApplicationLayerAutomaticResponseConfigurationProperty
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure
PropertyType
"ApplicationLayerAutomaticResponseConfiguration" Protection
ApplicationLayerAutomaticResponseConfigurationProperty
newValue,
Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
..}
instance Property "HealthCheckArns" Protection where
type PropertyType "HealthCheckArns" Protection = ValueList Prelude.Text
set :: PropertyType "HealthCheckArns" Protection
-> Protection -> Protection
set PropertyType "HealthCheckArns" Protection
newValue Protection {Maybe [Tag]
Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: Protection -> ()
applicationLayerAutomaticResponseConfiguration :: Protection
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Protection -> Maybe (ValueList Text)
name :: Protection -> Value Text
resourceArn :: Protection -> Value Text
tags :: Protection -> Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
..}
= Protection {healthCheckArns :: Maybe (ValueList Text)
healthCheckArns = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HealthCheckArns" Protection
ValueList Text
newValue, Maybe [Tag]
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" Protection where
type PropertyType "Name" Protection = Value Prelude.Text
set :: PropertyType "Name" Protection -> Protection -> Protection
set PropertyType "Name" Protection
newValue Protection {Maybe [Tag]
Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: Protection -> ()
applicationLayerAutomaticResponseConfiguration :: Protection
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Protection -> Maybe (ValueList Text)
name :: Protection -> Value Text
resourceArn :: Protection -> Value Text
tags :: Protection -> Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
..} = Protection {name :: Value Text
name = PropertyType "Name" Protection
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
resourceArn :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
resourceArn :: Value Text
tags :: Maybe [Tag]
..}
instance Property "ResourceArn" Protection where
type PropertyType "ResourceArn" Protection = Value Prelude.Text
set :: PropertyType "ResourceArn" Protection -> Protection -> Protection
set PropertyType "ResourceArn" Protection
newValue Protection {Maybe [Tag]
Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: Protection -> ()
applicationLayerAutomaticResponseConfiguration :: Protection
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Protection -> Maybe (ValueList Text)
name :: Protection -> Value Text
resourceArn :: Protection -> Value Text
tags :: Protection -> Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
..}
= Protection {resourceArn :: Value Text
resourceArn = PropertyType "ResourceArn" Protection
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" Protection where
type PropertyType "Tags" Protection = [Tag]
set :: PropertyType "Tags" Protection -> Protection -> Protection
set PropertyType "Tags" Protection
newValue Protection {Maybe [Tag]
Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: Protection -> ()
applicationLayerAutomaticResponseConfiguration :: Protection
-> Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Protection -> Maybe (ValueList Text)
name :: Protection -> Value Text
resourceArn :: Protection -> Value Text
tags :: Protection -> Maybe [Tag]
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
tags :: Maybe [Tag]
..}
= Protection {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Protection
newValue, Maybe (ValueList Text)
Maybe ApplicationLayerAutomaticResponseConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
haddock_workaround_ :: ()
applicationLayerAutomaticResponseConfiguration :: Maybe ApplicationLayerAutomaticResponseConfigurationProperty
healthCheckArns :: Maybe (ValueList Text)
name :: Value Text
resourceArn :: Value Text
..}