module Stratosphere.RDS.DBSecurityGroup (
module Exports, DBSecurityGroup(..), mkDBSecurityGroup
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.RDS.DBSecurityGroup.IngressProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data DBSecurityGroup
=
DBSecurityGroup {DBSecurityGroup -> ()
haddock_workaround_ :: (),
DBSecurityGroup -> [IngressProperty]
dBSecurityGroupIngress :: [IngressProperty],
DBSecurityGroup -> Maybe (Value Text)
eC2VpcId :: (Prelude.Maybe (Value Prelude.Text)),
DBSecurityGroup -> Value Text
groupDescription :: (Value Prelude.Text),
DBSecurityGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (DBSecurityGroup -> DBSecurityGroup -> Bool
(DBSecurityGroup -> DBSecurityGroup -> Bool)
-> (DBSecurityGroup -> DBSecurityGroup -> Bool)
-> Eq DBSecurityGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DBSecurityGroup -> DBSecurityGroup -> Bool
== :: DBSecurityGroup -> DBSecurityGroup -> Bool
$c/= :: DBSecurityGroup -> DBSecurityGroup -> Bool
/= :: DBSecurityGroup -> DBSecurityGroup -> Bool
Prelude.Eq, Int -> DBSecurityGroup -> ShowS
[DBSecurityGroup] -> ShowS
DBSecurityGroup -> String
(Int -> DBSecurityGroup -> ShowS)
-> (DBSecurityGroup -> String)
-> ([DBSecurityGroup] -> ShowS)
-> Show DBSecurityGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DBSecurityGroup -> ShowS
showsPrec :: Int -> DBSecurityGroup -> ShowS
$cshow :: DBSecurityGroup -> String
show :: DBSecurityGroup -> String
$cshowList :: [DBSecurityGroup] -> ShowS
showList :: [DBSecurityGroup] -> ShowS
Prelude.Show)
mkDBSecurityGroup ::
[IngressProperty] -> Value Prelude.Text -> DBSecurityGroup
mkDBSecurityGroup :: [IngressProperty] -> Value Text -> DBSecurityGroup
mkDBSecurityGroup [IngressProperty]
dBSecurityGroupIngress Value Text
groupDescription
= DBSecurityGroup
{haddock_workaround_ :: ()
haddock_workaround_ = (),
dBSecurityGroupIngress :: [IngressProperty]
dBSecurityGroupIngress = [IngressProperty]
dBSecurityGroupIngress,
groupDescription :: Value Text
groupDescription = Value Text
groupDescription, eC2VpcId :: Maybe (Value Text)
eC2VpcId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DBSecurityGroup where
toResourceProperties :: DBSecurityGroup -> ResourceProperties
toResourceProperties DBSecurityGroup {[IngressProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DBSecurityGroup -> ()
dBSecurityGroupIngress :: DBSecurityGroup -> [IngressProperty]
eC2VpcId :: DBSecurityGroup -> Maybe (Value Text)
groupDescription :: DBSecurityGroup -> Value Text
tags :: DBSecurityGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
groupDescription :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::RDS::DBSecurityGroup",
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
"DBSecurityGroupIngress" Key -> [IngressProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [IngressProperty]
dBSecurityGroupIngress,
Key
"GroupDescription" 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
groupDescription]
([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
"EC2VpcId" (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)
eC2VpcId,
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 DBSecurityGroup where
toJSON :: DBSecurityGroup -> Value
toJSON DBSecurityGroup {[IngressProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DBSecurityGroup -> ()
dBSecurityGroupIngress :: DBSecurityGroup -> [IngressProperty]
eC2VpcId :: DBSecurityGroup -> Maybe (Value Text)
groupDescription :: DBSecurityGroup -> Value Text
tags :: DBSecurityGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
groupDescription :: 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
"DBSecurityGroupIngress" Key -> [IngressProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [IngressProperty]
dBSecurityGroupIngress,
Key
"GroupDescription" 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
groupDescription]
([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
"EC2VpcId" (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)
eC2VpcId,
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 "DBSecurityGroupIngress" DBSecurityGroup where
type PropertyType "DBSecurityGroupIngress" DBSecurityGroup = [IngressProperty]
set :: PropertyType "DBSecurityGroupIngress" DBSecurityGroup
-> DBSecurityGroup -> DBSecurityGroup
set PropertyType "DBSecurityGroupIngress" DBSecurityGroup
newValue DBSecurityGroup {[IngressProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DBSecurityGroup -> ()
dBSecurityGroupIngress :: DBSecurityGroup -> [IngressProperty]
eC2VpcId :: DBSecurityGroup -> Maybe (Value Text)
groupDescription :: DBSecurityGroup -> Value Text
tags :: DBSecurityGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
groupDescription :: Value Text
tags :: Maybe [Tag]
..}
= DBSecurityGroup {dBSecurityGroupIngress :: [IngressProperty]
dBSecurityGroupIngress = [IngressProperty]
PropertyType "DBSecurityGroupIngress" DBSecurityGroup
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
eC2VpcId :: Maybe (Value Text)
groupDescription :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
eC2VpcId :: Maybe (Value Text)
groupDescription :: Value Text
tags :: Maybe [Tag]
..}
instance Property "EC2VpcId" DBSecurityGroup where
type PropertyType "EC2VpcId" DBSecurityGroup = Value Prelude.Text
set :: PropertyType "EC2VpcId" DBSecurityGroup
-> DBSecurityGroup -> DBSecurityGroup
set PropertyType "EC2VpcId" DBSecurityGroup
newValue DBSecurityGroup {[IngressProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DBSecurityGroup -> ()
dBSecurityGroupIngress :: DBSecurityGroup -> [IngressProperty]
eC2VpcId :: DBSecurityGroup -> Maybe (Value Text)
groupDescription :: DBSecurityGroup -> Value Text
tags :: DBSecurityGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
groupDescription :: Value Text
tags :: Maybe [Tag]
..}
= DBSecurityGroup {eC2VpcId :: Maybe (Value Text)
eC2VpcId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EC2VpcId" DBSecurityGroup
Value Text
newValue, [IngressProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
groupDescription :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
groupDescription :: Value Text
tags :: Maybe [Tag]
..}
instance Property "GroupDescription" DBSecurityGroup where
type PropertyType "GroupDescription" DBSecurityGroup = Value Prelude.Text
set :: PropertyType "GroupDescription" DBSecurityGroup
-> DBSecurityGroup -> DBSecurityGroup
set PropertyType "GroupDescription" DBSecurityGroup
newValue DBSecurityGroup {[IngressProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DBSecurityGroup -> ()
dBSecurityGroupIngress :: DBSecurityGroup -> [IngressProperty]
eC2VpcId :: DBSecurityGroup -> Maybe (Value Text)
groupDescription :: DBSecurityGroup -> Value Text
tags :: DBSecurityGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
groupDescription :: Value Text
tags :: Maybe [Tag]
..}
= DBSecurityGroup {groupDescription :: Value Text
groupDescription = PropertyType "GroupDescription" DBSecurityGroup
Value Text
newValue, [IngressProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" DBSecurityGroup where
type PropertyType "Tags" DBSecurityGroup = [Tag]
set :: PropertyType "Tags" DBSecurityGroup
-> DBSecurityGroup -> DBSecurityGroup
set PropertyType "Tags" DBSecurityGroup
newValue DBSecurityGroup {[IngressProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DBSecurityGroup -> ()
dBSecurityGroupIngress :: DBSecurityGroup -> [IngressProperty]
eC2VpcId :: DBSecurityGroup -> Maybe (Value Text)
groupDescription :: DBSecurityGroup -> Value Text
tags :: DBSecurityGroup -> Maybe [Tag]
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
groupDescription :: Value Text
tags :: Maybe [Tag]
..}
= DBSecurityGroup {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" DBSecurityGroup
newValue, [IngressProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
groupDescription :: Value Text
haddock_workaround_ :: ()
dBSecurityGroupIngress :: [IngressProperty]
eC2VpcId :: Maybe (Value Text)
groupDescription :: Value Text
..}