{-# 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.CloudFormation.CreateStack
(
CreateStack (..),
newCreateStack,
createStack_disableRollback,
createStack_notificationARNs,
createStack_enableTerminationProtection,
createStack_stackPolicyBody,
createStack_parameters,
createStack_stackPolicyURL,
createStack_templateBody,
createStack_templateURL,
createStack_clientRequestToken,
createStack_capabilities,
createStack_rollbackConfiguration,
createStack_onFailure,
createStack_resourceTypes,
createStack_tags,
createStack_timeoutInMinutes,
createStack_roleARN,
createStack_stackName,
CreateStackResponse (..),
newCreateStackResponse,
createStackResponse_stackId,
createStackResponse_httpStatus,
)
where
import Amazonka.CloudFormation.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 CreateStack = CreateStack'
{
CreateStack -> Maybe Bool
disableRollback :: Prelude.Maybe Prelude.Bool,
CreateStack -> Maybe [Text]
notificationARNs :: Prelude.Maybe [Prelude.Text],
CreateStack -> Maybe Bool
enableTerminationProtection :: Prelude.Maybe Prelude.Bool,
CreateStack -> Maybe Text
stackPolicyBody :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
CreateStack -> Maybe Text
stackPolicyURL :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe Text
templateURL :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CreateStack -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability],
CreateStack -> Maybe RollbackConfiguration
rollbackConfiguration :: Prelude.Maybe RollbackConfiguration,
CreateStack -> Maybe OnFailure
onFailure :: Prelude.Maybe OnFailure,
CreateStack -> Maybe [Text]
resourceTypes :: Prelude.Maybe [Prelude.Text],
CreateStack -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateStack -> Maybe Natural
timeoutInMinutes :: Prelude.Maybe Prelude.Natural,
CreateStack -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
CreateStack -> Text
stackName :: Prelude.Text
}
deriving (CreateStack -> CreateStack -> Bool
(CreateStack -> CreateStack -> Bool)
-> (CreateStack -> CreateStack -> Bool) -> Eq CreateStack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStack -> CreateStack -> Bool
$c/= :: CreateStack -> CreateStack -> Bool
== :: CreateStack -> CreateStack -> Bool
$c== :: CreateStack -> CreateStack -> Bool
Prelude.Eq, ReadPrec [CreateStack]
ReadPrec CreateStack
Int -> ReadS CreateStack
ReadS [CreateStack]
(Int -> ReadS CreateStack)
-> ReadS [CreateStack]
-> ReadPrec CreateStack
-> ReadPrec [CreateStack]
-> Read CreateStack
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStack]
$creadListPrec :: ReadPrec [CreateStack]
readPrec :: ReadPrec CreateStack
$creadPrec :: ReadPrec CreateStack
readList :: ReadS [CreateStack]
$creadList :: ReadS [CreateStack]
readsPrec :: Int -> ReadS CreateStack
$creadsPrec :: Int -> ReadS CreateStack
Prelude.Read, Int -> CreateStack -> ShowS
[CreateStack] -> ShowS
CreateStack -> String
(Int -> CreateStack -> ShowS)
-> (CreateStack -> String)
-> ([CreateStack] -> ShowS)
-> Show CreateStack
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStack] -> ShowS
$cshowList :: [CreateStack] -> ShowS
show :: CreateStack -> String
$cshow :: CreateStack -> String
showsPrec :: Int -> CreateStack -> ShowS
$cshowsPrec :: Int -> CreateStack -> ShowS
Prelude.Show, (forall x. CreateStack -> Rep CreateStack x)
-> (forall x. Rep CreateStack x -> CreateStack)
-> Generic CreateStack
forall x. Rep CreateStack x -> CreateStack
forall x. CreateStack -> Rep CreateStack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStack x -> CreateStack
$cfrom :: forall x. CreateStack -> Rep CreateStack x
Prelude.Generic)
newCreateStack ::
Prelude.Text ->
CreateStack
newCreateStack :: Text -> CreateStack
newCreateStack Text
pStackName_ =
CreateStack' :: Maybe Bool
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe [Parameter]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Capability]
-> Maybe RollbackConfiguration
-> Maybe OnFailure
-> Maybe [Text]
-> Maybe [Tag]
-> Maybe Natural
-> Maybe Text
-> Text
-> CreateStack
CreateStack'
{ $sel:disableRollback:CreateStack' :: Maybe Bool
disableRollback = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:notificationARNs:CreateStack' :: Maybe [Text]
notificationARNs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:enableTerminationProtection:CreateStack' :: Maybe Bool
enableTerminationProtection = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:stackPolicyBody:CreateStack' :: Maybe Text
stackPolicyBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:CreateStack' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
$sel:stackPolicyURL:CreateStack' :: Maybe Text
stackPolicyURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:templateBody:CreateStack' :: Maybe Text
templateBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:templateURL:CreateStack' :: Maybe Text
templateURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:CreateStack' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:capabilities:CreateStack' :: Maybe [Capability]
capabilities = Maybe [Capability]
forall a. Maybe a
Prelude.Nothing,
$sel:rollbackConfiguration:CreateStack' :: Maybe RollbackConfiguration
rollbackConfiguration = Maybe RollbackConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:onFailure:CreateStack' :: Maybe OnFailure
onFailure = Maybe OnFailure
forall a. Maybe a
Prelude.Nothing,
$sel:resourceTypes:CreateStack' :: Maybe [Text]
resourceTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateStack' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:timeoutInMinutes:CreateStack' :: Maybe Natural
timeoutInMinutes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:CreateStack' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:stackName:CreateStack' :: Text
stackName = Text
pStackName_
}
createStack_disableRollback :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Bool)
createStack_disableRollback :: (Maybe Bool -> f (Maybe Bool)) -> CreateStack -> f CreateStack
createStack_disableRollback = (CreateStack -> Maybe Bool)
-> (CreateStack -> Maybe Bool -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Bool
disableRollback :: Maybe Bool
$sel:disableRollback:CreateStack' :: CreateStack -> Maybe Bool
disableRollback} -> Maybe Bool
disableRollback) (\s :: CreateStack
s@CreateStack' {} Maybe Bool
a -> CreateStack
s {$sel:disableRollback:CreateStack' :: Maybe Bool
disableRollback = Maybe Bool
a} :: CreateStack)
createStack_notificationARNs :: Lens.Lens' CreateStack (Prelude.Maybe [Prelude.Text])
createStack_notificationARNs :: (Maybe [Text] -> f (Maybe [Text])) -> CreateStack -> f CreateStack
createStack_notificationARNs = (CreateStack -> Maybe [Text])
-> (CreateStack -> Maybe [Text] -> CreateStack)
-> Lens CreateStack CreateStack (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe [Text]
notificationARNs :: Maybe [Text]
$sel:notificationARNs:CreateStack' :: CreateStack -> Maybe [Text]
notificationARNs} -> Maybe [Text]
notificationARNs) (\s :: CreateStack
s@CreateStack' {} Maybe [Text]
a -> CreateStack
s {$sel:notificationARNs:CreateStack' :: Maybe [Text]
notificationARNs = Maybe [Text]
a} :: CreateStack) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateStack -> f CreateStack)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateStack
-> f CreateStack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStack_enableTerminationProtection :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Bool)
createStack_enableTerminationProtection :: (Maybe Bool -> f (Maybe Bool)) -> CreateStack -> f CreateStack
createStack_enableTerminationProtection = (CreateStack -> Maybe Bool)
-> (CreateStack -> Maybe Bool -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Bool
enableTerminationProtection :: Maybe Bool
$sel:enableTerminationProtection:CreateStack' :: CreateStack -> Maybe Bool
enableTerminationProtection} -> Maybe Bool
enableTerminationProtection) (\s :: CreateStack
s@CreateStack' {} Maybe Bool
a -> CreateStack
s {$sel:enableTerminationProtection:CreateStack' :: Maybe Bool
enableTerminationProtection = Maybe Bool
a} :: CreateStack)
createStack_stackPolicyBody :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_stackPolicyBody :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_stackPolicyBody = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
stackPolicyBody :: Maybe Text
$sel:stackPolicyBody:CreateStack' :: CreateStack -> Maybe Text
stackPolicyBody} -> Maybe Text
stackPolicyBody) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:stackPolicyBody:CreateStack' :: Maybe Text
stackPolicyBody = Maybe Text
a} :: CreateStack)
createStack_parameters :: Lens.Lens' CreateStack (Prelude.Maybe [Parameter])
createStack_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> CreateStack -> f CreateStack
createStack_parameters = (CreateStack -> Maybe [Parameter])
-> (CreateStack -> Maybe [Parameter] -> CreateStack)
-> Lens
CreateStack CreateStack (Maybe [Parameter]) (Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:CreateStack' :: CreateStack -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: CreateStack
s@CreateStack' {} Maybe [Parameter]
a -> CreateStack
s {$sel:parameters:CreateStack' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: CreateStack) ((Maybe [Parameter] -> f (Maybe [Parameter]))
-> CreateStack -> f CreateStack)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
-> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> CreateStack
-> f CreateStack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Parameter] [Parameter] [Parameter] [Parameter]
-> Iso
(Maybe [Parameter])
(Maybe [Parameter])
(Maybe [Parameter])
(Maybe [Parameter])
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 [Parameter] [Parameter] [Parameter] [Parameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStack_stackPolicyURL :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_stackPolicyURL :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_stackPolicyURL = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
stackPolicyURL :: Maybe Text
$sel:stackPolicyURL:CreateStack' :: CreateStack -> Maybe Text
stackPolicyURL} -> Maybe Text
stackPolicyURL) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:stackPolicyURL:CreateStack' :: Maybe Text
stackPolicyURL = Maybe Text
a} :: CreateStack)
createStack_templateBody :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_templateBody :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_templateBody = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
templateBody :: Maybe Text
$sel:templateBody:CreateStack' :: CreateStack -> Maybe Text
templateBody} -> Maybe Text
templateBody) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:templateBody:CreateStack' :: Maybe Text
templateBody = Maybe Text
a} :: CreateStack)
createStack_templateURL :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_templateURL :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_templateURL = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
templateURL :: Maybe Text
$sel:templateURL:CreateStack' :: CreateStack -> Maybe Text
templateURL} -> Maybe Text
templateURL) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:templateURL:CreateStack' :: Maybe Text
templateURL = Maybe Text
a} :: CreateStack)
createStack_clientRequestToken :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_clientRequestToken :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_clientRequestToken = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateStack' :: CreateStack -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:clientRequestToken:CreateStack' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateStack)
createStack_capabilities :: Lens.Lens' CreateStack (Prelude.Maybe [Capability])
createStack_capabilities :: (Maybe [Capability] -> f (Maybe [Capability]))
-> CreateStack -> f CreateStack
createStack_capabilities = (CreateStack -> Maybe [Capability])
-> (CreateStack -> Maybe [Capability] -> CreateStack)
-> Lens
CreateStack CreateStack (Maybe [Capability]) (Maybe [Capability])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe [Capability]
capabilities :: Maybe [Capability]
$sel:capabilities:CreateStack' :: CreateStack -> Maybe [Capability]
capabilities} -> Maybe [Capability]
capabilities) (\s :: CreateStack
s@CreateStack' {} Maybe [Capability]
a -> CreateStack
s {$sel:capabilities:CreateStack' :: Maybe [Capability]
capabilities = Maybe [Capability]
a} :: CreateStack) ((Maybe [Capability] -> f (Maybe [Capability]))
-> CreateStack -> f CreateStack)
-> ((Maybe [Capability] -> f (Maybe [Capability]))
-> Maybe [Capability] -> f (Maybe [Capability]))
-> (Maybe [Capability] -> f (Maybe [Capability]))
-> CreateStack
-> f CreateStack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Capability] [Capability] [Capability] [Capability]
-> Iso
(Maybe [Capability])
(Maybe [Capability])
(Maybe [Capability])
(Maybe [Capability])
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 [Capability] [Capability] [Capability] [Capability]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStack_rollbackConfiguration :: Lens.Lens' CreateStack (Prelude.Maybe RollbackConfiguration)
createStack_rollbackConfiguration :: (Maybe RollbackConfiguration -> f (Maybe RollbackConfiguration))
-> CreateStack -> f CreateStack
createStack_rollbackConfiguration = (CreateStack -> Maybe RollbackConfiguration)
-> (CreateStack -> Maybe RollbackConfiguration -> CreateStack)
-> Lens
CreateStack
CreateStack
(Maybe RollbackConfiguration)
(Maybe RollbackConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe RollbackConfiguration
rollbackConfiguration :: Maybe RollbackConfiguration
$sel:rollbackConfiguration:CreateStack' :: CreateStack -> Maybe RollbackConfiguration
rollbackConfiguration} -> Maybe RollbackConfiguration
rollbackConfiguration) (\s :: CreateStack
s@CreateStack' {} Maybe RollbackConfiguration
a -> CreateStack
s {$sel:rollbackConfiguration:CreateStack' :: Maybe RollbackConfiguration
rollbackConfiguration = Maybe RollbackConfiguration
a} :: CreateStack)
createStack_onFailure :: Lens.Lens' CreateStack (Prelude.Maybe OnFailure)
createStack_onFailure :: (Maybe OnFailure -> f (Maybe OnFailure))
-> CreateStack -> f CreateStack
createStack_onFailure = (CreateStack -> Maybe OnFailure)
-> (CreateStack -> Maybe OnFailure -> CreateStack)
-> Lens CreateStack CreateStack (Maybe OnFailure) (Maybe OnFailure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe OnFailure
onFailure :: Maybe OnFailure
$sel:onFailure:CreateStack' :: CreateStack -> Maybe OnFailure
onFailure} -> Maybe OnFailure
onFailure) (\s :: CreateStack
s@CreateStack' {} Maybe OnFailure
a -> CreateStack
s {$sel:onFailure:CreateStack' :: Maybe OnFailure
onFailure = Maybe OnFailure
a} :: CreateStack)
createStack_resourceTypes :: Lens.Lens' CreateStack (Prelude.Maybe [Prelude.Text])
createStack_resourceTypes :: (Maybe [Text] -> f (Maybe [Text])) -> CreateStack -> f CreateStack
createStack_resourceTypes = (CreateStack -> Maybe [Text])
-> (CreateStack -> Maybe [Text] -> CreateStack)
-> Lens CreateStack CreateStack (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe [Text]
resourceTypes :: Maybe [Text]
$sel:resourceTypes:CreateStack' :: CreateStack -> Maybe [Text]
resourceTypes} -> Maybe [Text]
resourceTypes) (\s :: CreateStack
s@CreateStack' {} Maybe [Text]
a -> CreateStack
s {$sel:resourceTypes:CreateStack' :: Maybe [Text]
resourceTypes = Maybe [Text]
a} :: CreateStack) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateStack -> f CreateStack)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateStack
-> f CreateStack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStack_tags :: Lens.Lens' CreateStack (Prelude.Maybe [Tag])
createStack_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> CreateStack -> f CreateStack
createStack_tags = (CreateStack -> Maybe [Tag])
-> (CreateStack -> Maybe [Tag] -> CreateStack)
-> Lens CreateStack CreateStack (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateStack' :: CreateStack -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateStack
s@CreateStack' {} Maybe [Tag]
a -> CreateStack
s {$sel:tags:CreateStack' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateStack) ((Maybe [Tag] -> f (Maybe [Tag])) -> CreateStack -> f CreateStack)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateStack
-> f CreateStack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createStack_timeoutInMinutes :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Natural)
createStack_timeoutInMinutes :: (Maybe Natural -> f (Maybe Natural))
-> CreateStack -> f CreateStack
createStack_timeoutInMinutes = (CreateStack -> Maybe Natural)
-> (CreateStack -> Maybe Natural -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Natural
timeoutInMinutes :: Maybe Natural
$sel:timeoutInMinutes:CreateStack' :: CreateStack -> Maybe Natural
timeoutInMinutes} -> Maybe Natural
timeoutInMinutes) (\s :: CreateStack
s@CreateStack' {} Maybe Natural
a -> CreateStack
s {$sel:timeoutInMinutes:CreateStack' :: Maybe Natural
timeoutInMinutes = Maybe Natural
a} :: CreateStack)
createStack_roleARN :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_roleARN :: (Maybe Text -> f (Maybe Text)) -> CreateStack -> f CreateStack
createStack_roleARN = (CreateStack -> Maybe Text)
-> (CreateStack -> Maybe Text -> CreateStack)
-> Lens CreateStack CreateStack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:CreateStack' :: CreateStack -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: CreateStack
s@CreateStack' {} Maybe Text
a -> CreateStack
s {$sel:roleARN:CreateStack' :: Maybe Text
roleARN = Maybe Text
a} :: CreateStack)
createStack_stackName :: Lens.Lens' CreateStack Prelude.Text
createStack_stackName :: (Text -> f Text) -> CreateStack -> f CreateStack
createStack_stackName = (CreateStack -> Text)
-> (CreateStack -> Text -> CreateStack)
-> Lens CreateStack CreateStack Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStack' {Text
stackName :: Text
$sel:stackName:CreateStack' :: CreateStack -> Text
stackName} -> Text
stackName) (\s :: CreateStack
s@CreateStack' {} Text
a -> CreateStack
s {$sel:stackName:CreateStack' :: Text
stackName = Text
a} :: CreateStack)
instance Core.AWSRequest CreateStack where
type AWSResponse CreateStack = CreateStackResponse
request :: CreateStack -> Request CreateStack
request = Service -> CreateStack -> Request CreateStack
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy CreateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStack)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse CreateStack))
-> Logger
-> Service
-> Proxy CreateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStack)))
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
"CreateStackResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text -> Int -> CreateStackResponse
CreateStackResponse'
(Maybe Text -> Int -> CreateStackResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateStackResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StackId")
Either String (Int -> CreateStackResponse)
-> Either String Int -> Either String CreateStackResponse
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 CreateStack
instance Prelude.NFData CreateStack
instance Core.ToHeaders CreateStack where
toHeaders :: CreateStack -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateStack -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath CreateStack where
toPath :: CreateStack -> ByteString
toPath = ByteString -> CreateStack -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateStack where
toQuery :: CreateStack -> QueryString
toQuery CreateStack' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe OnFailure
Maybe RollbackConfiguration
Text
stackName :: Text
roleARN :: Maybe Text
timeoutInMinutes :: Maybe Natural
tags :: Maybe [Tag]
resourceTypes :: Maybe [Text]
onFailure :: Maybe OnFailure
rollbackConfiguration :: Maybe RollbackConfiguration
capabilities :: Maybe [Capability]
clientRequestToken :: Maybe Text
templateURL :: Maybe Text
templateBody :: Maybe Text
stackPolicyURL :: Maybe Text
parameters :: Maybe [Parameter]
stackPolicyBody :: Maybe Text
enableTerminationProtection :: Maybe Bool
notificationARNs :: Maybe [Text]
disableRollback :: Maybe Bool
$sel:stackName:CreateStack' :: CreateStack -> Text
$sel:roleARN:CreateStack' :: CreateStack -> Maybe Text
$sel:timeoutInMinutes:CreateStack' :: CreateStack -> Maybe Natural
$sel:tags:CreateStack' :: CreateStack -> Maybe [Tag]
$sel:resourceTypes:CreateStack' :: CreateStack -> Maybe [Text]
$sel:onFailure:CreateStack' :: CreateStack -> Maybe OnFailure
$sel:rollbackConfiguration:CreateStack' :: CreateStack -> Maybe RollbackConfiguration
$sel:capabilities:CreateStack' :: CreateStack -> Maybe [Capability]
$sel:clientRequestToken:CreateStack' :: CreateStack -> Maybe Text
$sel:templateURL:CreateStack' :: CreateStack -> Maybe Text
$sel:templateBody:CreateStack' :: CreateStack -> Maybe Text
$sel:stackPolicyURL:CreateStack' :: CreateStack -> Maybe Text
$sel:parameters:CreateStack' :: CreateStack -> Maybe [Parameter]
$sel:stackPolicyBody:CreateStack' :: CreateStack -> Maybe Text
$sel:enableTerminationProtection:CreateStack' :: CreateStack -> Maybe Bool
$sel:notificationARNs:CreateStack' :: CreateStack -> Maybe [Text]
$sel:disableRollback:CreateStack' :: CreateStack -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateStack" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"DisableRollback" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
disableRollback,
ByteString
"NotificationARNs"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
notificationARNs
),
ByteString
"EnableTerminationProtection"
ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enableTerminationProtection,
ByteString
"StackPolicyBody" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
stackPolicyBody,
ByteString
"Parameters"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Parameter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Parameter] -> QueryString)
-> Maybe [Parameter] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Parameter]
parameters),
ByteString
"StackPolicyURL" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
stackPolicyURL,
ByteString
"TemplateBody" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateBody,
ByteString
"TemplateURL" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateURL,
ByteString
"ClientRequestToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clientRequestToken,
ByteString
"Capabilities"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Capability] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Capability] -> QueryString)
-> Maybe [Capability] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Capability]
capabilities),
ByteString
"RollbackConfiguration"
ByteString -> Maybe RollbackConfiguration -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe RollbackConfiguration
rollbackConfiguration,
ByteString
"OnFailure" ByteString -> Maybe OnFailure -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe OnFailure
onFailure,
ByteString
"ResourceTypes"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourceTypes
),
ByteString
"Tags"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
ByteString
"TimeoutInMinutes" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
timeoutInMinutes,
ByteString
"RoleARN" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
roleARN,
ByteString
"StackName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackName
]
data CreateStackResponse = CreateStackResponse'
{
CreateStackResponse -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
CreateStackResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateStackResponse -> CreateStackResponse -> Bool
(CreateStackResponse -> CreateStackResponse -> Bool)
-> (CreateStackResponse -> CreateStackResponse -> Bool)
-> Eq CreateStackResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStackResponse -> CreateStackResponse -> Bool
$c/= :: CreateStackResponse -> CreateStackResponse -> Bool
== :: CreateStackResponse -> CreateStackResponse -> Bool
$c== :: CreateStackResponse -> CreateStackResponse -> Bool
Prelude.Eq, ReadPrec [CreateStackResponse]
ReadPrec CreateStackResponse
Int -> ReadS CreateStackResponse
ReadS [CreateStackResponse]
(Int -> ReadS CreateStackResponse)
-> ReadS [CreateStackResponse]
-> ReadPrec CreateStackResponse
-> ReadPrec [CreateStackResponse]
-> Read CreateStackResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStackResponse]
$creadListPrec :: ReadPrec [CreateStackResponse]
readPrec :: ReadPrec CreateStackResponse
$creadPrec :: ReadPrec CreateStackResponse
readList :: ReadS [CreateStackResponse]
$creadList :: ReadS [CreateStackResponse]
readsPrec :: Int -> ReadS CreateStackResponse
$creadsPrec :: Int -> ReadS CreateStackResponse
Prelude.Read, Int -> CreateStackResponse -> ShowS
[CreateStackResponse] -> ShowS
CreateStackResponse -> String
(Int -> CreateStackResponse -> ShowS)
-> (CreateStackResponse -> String)
-> ([CreateStackResponse] -> ShowS)
-> Show CreateStackResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStackResponse] -> ShowS
$cshowList :: [CreateStackResponse] -> ShowS
show :: CreateStackResponse -> String
$cshow :: CreateStackResponse -> String
showsPrec :: Int -> CreateStackResponse -> ShowS
$cshowsPrec :: Int -> CreateStackResponse -> ShowS
Prelude.Show, (forall x. CreateStackResponse -> Rep CreateStackResponse x)
-> (forall x. Rep CreateStackResponse x -> CreateStackResponse)
-> Generic CreateStackResponse
forall x. Rep CreateStackResponse x -> CreateStackResponse
forall x. CreateStackResponse -> Rep CreateStackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStackResponse x -> CreateStackResponse
$cfrom :: forall x. CreateStackResponse -> Rep CreateStackResponse x
Prelude.Generic)
newCreateStackResponse ::
Prelude.Int ->
CreateStackResponse
newCreateStackResponse :: Int -> CreateStackResponse
newCreateStackResponse Int
pHttpStatus_ =
CreateStackResponse' :: Maybe Text -> Int -> CreateStackResponse
CreateStackResponse'
{ $sel:stackId:CreateStackResponse' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateStackResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createStackResponse_stackId :: Lens.Lens' CreateStackResponse (Prelude.Maybe Prelude.Text)
createStackResponse_stackId :: (Maybe Text -> f (Maybe Text))
-> CreateStackResponse -> f CreateStackResponse
createStackResponse_stackId = (CreateStackResponse -> Maybe Text)
-> (CreateStackResponse -> Maybe Text -> CreateStackResponse)
-> Lens
CreateStackResponse CreateStackResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackResponse' {Maybe Text
stackId :: Maybe Text
$sel:stackId:CreateStackResponse' :: CreateStackResponse -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: CreateStackResponse
s@CreateStackResponse' {} Maybe Text
a -> CreateStackResponse
s {$sel:stackId:CreateStackResponse' :: Maybe Text
stackId = Maybe Text
a} :: CreateStackResponse)
createStackResponse_httpStatus :: Lens.Lens' CreateStackResponse Prelude.Int
createStackResponse_httpStatus :: (Int -> f Int) -> CreateStackResponse -> f CreateStackResponse
createStackResponse_httpStatus = (CreateStackResponse -> Int)
-> (CreateStackResponse -> Int -> CreateStackResponse)
-> Lens CreateStackResponse CreateStackResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateStackResponse' :: CreateStackResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateStackResponse
s@CreateStackResponse' {} Int
a -> CreateStackResponse
s {$sel:httpStatus:CreateStackResponse' :: Int
httpStatus = Int
a} :: CreateStackResponse)
instance Prelude.NFData CreateStackResponse