module Stratosphere.SecretsManager.RotationSchedule (
module Exports, RotationSchedule(..), mkRotationSchedule
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SecretsManager.RotationSchedule.HostedRotationLambdaProperty as Exports
import {-# SOURCE #-} Stratosphere.SecretsManager.RotationSchedule.RotationRulesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RotationSchedule
=
RotationSchedule {RotationSchedule -> ()
haddock_workaround_ :: (),
RotationSchedule -> Maybe HostedRotationLambdaProperty
hostedRotationLambda :: (Prelude.Maybe HostedRotationLambdaProperty),
RotationSchedule -> Maybe (Value Bool)
rotateImmediatelyOnUpdate :: (Prelude.Maybe (Value Prelude.Bool)),
RotationSchedule -> Maybe (Value Text)
rotationLambdaARN :: (Prelude.Maybe (Value Prelude.Text)),
RotationSchedule -> Maybe RotationRulesProperty
rotationRules :: (Prelude.Maybe RotationRulesProperty),
RotationSchedule -> Value Text
secretId :: (Value Prelude.Text)}
deriving stock (RotationSchedule -> RotationSchedule -> Bool
(RotationSchedule -> RotationSchedule -> Bool)
-> (RotationSchedule -> RotationSchedule -> Bool)
-> Eq RotationSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RotationSchedule -> RotationSchedule -> Bool
== :: RotationSchedule -> RotationSchedule -> Bool
$c/= :: RotationSchedule -> RotationSchedule -> Bool
/= :: RotationSchedule -> RotationSchedule -> Bool
Prelude.Eq, Int -> RotationSchedule -> ShowS
[RotationSchedule] -> ShowS
RotationSchedule -> String
(Int -> RotationSchedule -> ShowS)
-> (RotationSchedule -> String)
-> ([RotationSchedule] -> ShowS)
-> Show RotationSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RotationSchedule -> ShowS
showsPrec :: Int -> RotationSchedule -> ShowS
$cshow :: RotationSchedule -> String
show :: RotationSchedule -> String
$cshowList :: [RotationSchedule] -> ShowS
showList :: [RotationSchedule] -> ShowS
Prelude.Show)
mkRotationSchedule :: Value Prelude.Text -> RotationSchedule
mkRotationSchedule :: Value Text -> RotationSchedule
mkRotationSchedule Value Text
secretId
= RotationSchedule
{haddock_workaround_ :: ()
haddock_workaround_ = (), secretId :: Value Text
secretId = Value Text
secretId,
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
hostedRotationLambda = Maybe HostedRotationLambdaProperty
forall a. Maybe a
Prelude.Nothing,
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotateImmediatelyOnUpdate = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
rotationLambdaARN :: Maybe (Value Text)
rotationLambdaARN = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
rotationRules :: Maybe RotationRulesProperty
rotationRules = Maybe RotationRulesProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RotationSchedule where
toResourceProperties :: RotationSchedule -> ResourceProperties
toResourceProperties RotationSchedule {Maybe (Value Bool)
Maybe (Value Text)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: RotationSchedule -> ()
hostedRotationLambda :: RotationSchedule -> Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: RotationSchedule -> Maybe (Value Bool)
rotationLambdaARN :: RotationSchedule -> Maybe (Value Text)
rotationRules :: RotationSchedule -> Maybe RotationRulesProperty
secretId :: RotationSchedule -> Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SecretsManager::RotationSchedule",
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
"SecretId" 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
secretId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> HostedRotationLambdaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HostedRotationLambda" (HostedRotationLambdaProperty -> (Key, Value))
-> Maybe HostedRotationLambdaProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HostedRotationLambdaProperty
hostedRotationLambda,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RotateImmediatelyOnUpdate"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
rotateImmediatelyOnUpdate,
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
"RotationLambdaARN" (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)
rotationLambdaARN,
Key -> RotationRulesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RotationRules" (RotationRulesProperty -> (Key, Value))
-> Maybe RotationRulesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RotationRulesProperty
rotationRules]))}
instance JSON.ToJSON RotationSchedule where
toJSON :: RotationSchedule -> Value
toJSON RotationSchedule {Maybe (Value Bool)
Maybe (Value Text)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: RotationSchedule -> ()
hostedRotationLambda :: RotationSchedule -> Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: RotationSchedule -> Maybe (Value Bool)
rotationLambdaARN :: RotationSchedule -> Maybe (Value Text)
rotationRules :: RotationSchedule -> Maybe RotationRulesProperty
secretId :: RotationSchedule -> Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: 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
"SecretId" 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
secretId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> HostedRotationLambdaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HostedRotationLambda" (HostedRotationLambdaProperty -> (Key, Value))
-> Maybe HostedRotationLambdaProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HostedRotationLambdaProperty
hostedRotationLambda,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RotateImmediatelyOnUpdate"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
rotateImmediatelyOnUpdate,
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
"RotationLambdaARN" (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)
rotationLambdaARN,
Key -> RotationRulesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RotationRules" (RotationRulesProperty -> (Key, Value))
-> Maybe RotationRulesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RotationRulesProperty
rotationRules])))
instance Property "HostedRotationLambda" RotationSchedule where
type PropertyType "HostedRotationLambda" RotationSchedule = HostedRotationLambdaProperty
set :: PropertyType "HostedRotationLambda" RotationSchedule
-> RotationSchedule -> RotationSchedule
set PropertyType "HostedRotationLambda" RotationSchedule
newValue RotationSchedule {Maybe (Value Bool)
Maybe (Value Text)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: RotationSchedule -> ()
hostedRotationLambda :: RotationSchedule -> Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: RotationSchedule -> Maybe (Value Bool)
rotationLambdaARN :: RotationSchedule -> Maybe (Value Text)
rotationRules :: RotationSchedule -> Maybe RotationRulesProperty
secretId :: RotationSchedule -> Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
..}
= RotationSchedule
{hostedRotationLambda :: Maybe HostedRotationLambdaProperty
hostedRotationLambda = HostedRotationLambdaProperty -> Maybe HostedRotationLambdaProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HostedRotationLambda" RotationSchedule
HostedRotationLambdaProperty
newValue, Maybe (Value Bool)
Maybe (Value Text)
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: ()
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
haddock_workaround_ :: ()
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
..}
instance Property "RotateImmediatelyOnUpdate" RotationSchedule where
type PropertyType "RotateImmediatelyOnUpdate" RotationSchedule = Value Prelude.Bool
set :: PropertyType "RotateImmediatelyOnUpdate" RotationSchedule
-> RotationSchedule -> RotationSchedule
set PropertyType "RotateImmediatelyOnUpdate" RotationSchedule
newValue RotationSchedule {Maybe (Value Bool)
Maybe (Value Text)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: RotationSchedule -> ()
hostedRotationLambda :: RotationSchedule -> Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: RotationSchedule -> Maybe (Value Bool)
rotationLambdaARN :: RotationSchedule -> Maybe (Value Text)
rotationRules :: RotationSchedule -> Maybe RotationRulesProperty
secretId :: RotationSchedule -> Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
..}
= RotationSchedule
{rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotateImmediatelyOnUpdate = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RotateImmediatelyOnUpdate" RotationSchedule
Value Bool
newValue, Maybe (Value Text)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
..}
instance Property "RotationLambdaARN" RotationSchedule where
type PropertyType "RotationLambdaARN" RotationSchedule = Value Prelude.Text
set :: PropertyType "RotationLambdaARN" RotationSchedule
-> RotationSchedule -> RotationSchedule
set PropertyType "RotationLambdaARN" RotationSchedule
newValue RotationSchedule {Maybe (Value Bool)
Maybe (Value Text)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: RotationSchedule -> ()
hostedRotationLambda :: RotationSchedule -> Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: RotationSchedule -> Maybe (Value Bool)
rotationLambdaARN :: RotationSchedule -> Maybe (Value Text)
rotationRules :: RotationSchedule -> Maybe RotationRulesProperty
secretId :: RotationSchedule -> Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
..}
= RotationSchedule {rotationLambdaARN :: Maybe (Value Text)
rotationLambdaARN = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RotationLambdaARN" RotationSchedule
Value Text
newValue, Maybe (Value Bool)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
..}
instance Property "RotationRules" RotationSchedule where
type PropertyType "RotationRules" RotationSchedule = RotationRulesProperty
set :: PropertyType "RotationRules" RotationSchedule
-> RotationSchedule -> RotationSchedule
set PropertyType "RotationRules" RotationSchedule
newValue RotationSchedule {Maybe (Value Bool)
Maybe (Value Text)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: RotationSchedule -> ()
hostedRotationLambda :: RotationSchedule -> Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: RotationSchedule -> Maybe (Value Bool)
rotationLambdaARN :: RotationSchedule -> Maybe (Value Text)
rotationRules :: RotationSchedule -> Maybe RotationRulesProperty
secretId :: RotationSchedule -> Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
..}
= RotationSchedule {rotationRules :: Maybe RotationRulesProperty
rotationRules = RotationRulesProperty -> Maybe RotationRulesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RotationRules" RotationSchedule
RotationRulesProperty
newValue, Maybe (Value Bool)
Maybe (Value Text)
Maybe HostedRotationLambdaProperty
()
Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
secretId :: Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
secretId :: Value Text
..}
instance Property "SecretId" RotationSchedule where
type PropertyType "SecretId" RotationSchedule = Value Prelude.Text
set :: PropertyType "SecretId" RotationSchedule
-> RotationSchedule -> RotationSchedule
set PropertyType "SecretId" RotationSchedule
newValue RotationSchedule {Maybe (Value Bool)
Maybe (Value Text)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
Value Text
haddock_workaround_ :: RotationSchedule -> ()
hostedRotationLambda :: RotationSchedule -> Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: RotationSchedule -> Maybe (Value Bool)
rotationLambdaARN :: RotationSchedule -> Maybe (Value Text)
rotationRules :: RotationSchedule -> Maybe RotationRulesProperty
secretId :: RotationSchedule -> Value Text
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
secretId :: Value Text
..}
= RotationSchedule {secretId :: Value Text
secretId = PropertyType "SecretId" RotationSchedule
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
Maybe HostedRotationLambdaProperty
Maybe RotationRulesProperty
()
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
haddock_workaround_ :: ()
hostedRotationLambda :: Maybe HostedRotationLambdaProperty
rotateImmediatelyOnUpdate :: Maybe (Value Bool)
rotationLambdaARN :: Maybe (Value Text)
rotationRules :: Maybe RotationRulesProperty
..}