{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudFormation.CreateStack
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a stack as specified in the template. After the call completes
-- successfully, the stack creation starts. You can check the status of the
-- stack through the DescribeStacksoperation.
module Amazonka.CloudFormation.CreateStack
  ( -- * Creating a Request
    CreateStack (..),
    newCreateStack,

    -- * Request Lenses
    createStack_capabilities,
    createStack_clientRequestToken,
    createStack_disableRollback,
    createStack_enableTerminationProtection,
    createStack_notificationARNs,
    createStack_onFailure,
    createStack_parameters,
    createStack_resourceTypes,
    createStack_roleARN,
    createStack_rollbackConfiguration,
    createStack_stackPolicyBody,
    createStack_stackPolicyURL,
    createStack_tags,
    createStack_templateBody,
    createStack_templateURL,
    createStack_timeoutInMinutes,
    createStack_stackName,

    -- * Destructuring the Response
    CreateStackResponse (..),
    newCreateStackResponse,

    -- * Response Lenses
    createStackResponse_stackId,
    createStackResponse_httpStatus,
  )
where

import Amazonka.CloudFormation.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | The input for CreateStack action.
--
-- /See:/ 'newCreateStack' smart constructor.
data CreateStack = CreateStack'
  { -- | In some cases, you must explicitly acknowledge that your stack template
    -- contains certain capabilities in order for CloudFormation to create the
    -- stack.
    --
    -- -   @CAPABILITY_IAM@ and @CAPABILITY_NAMED_IAM@
    --
    --     Some stack templates might include resources that can affect
    --     permissions in your Amazon Web Services account; for example, by
    --     creating new Identity and Access Management (IAM) users. For those
    --     stacks, you must explicitly acknowledge this by specifying one of
    --     these capabilities.
    --
    --     The following IAM resources require you to specify either the
    --     @CAPABILITY_IAM@ or @CAPABILITY_NAMED_IAM@ capability.
    --
    --     -   If you have IAM resources, you can specify either capability.
    --
    --     -   If you have IAM resources with custom names, you /must/ specify
    --         @CAPABILITY_NAMED_IAM@.
    --
    --     -   If you don\'t specify either of these capabilities,
    --         CloudFormation returns an @InsufficientCapabilities@ error.
    --
    --     If your stack template contains these resources, we recommend that
    --     you review all permissions associated with them and edit their
    --     permissions if necessary.
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html AWS::IAM::AccessKey>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html AWS::IAM::Policy>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html AWS::IAM::User>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html AWS::IAM::UserToGroupAddition>
    --
    --     For more information, see
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates>.
    --
    -- -   @CAPABILITY_AUTO_EXPAND@
    --
    --     Some template contain macros. Macros perform custom processing on
    --     templates; this can include simple actions like find-and-replace
    --     operations, all the way to extensive transformations of entire
    --     templates. Because of this, users typically create a change set from
    --     the processed template, so that they can review the changes
    --     resulting from the macros before actually creating the stack. If
    --     your stack template contains one or more macros, and you choose to
    --     create a stack directly from the processed template, without first
    --     reviewing the resulting changes in a change set, you must
    --     acknowledge this capability. This includes the
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html AWS::Include>
    --     and
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html AWS::Serverless>
    --     transforms, which are macros hosted by CloudFormation.
    --
    --     If you want to create a stack from a stack template that contains
    --     macros /and/ nested stacks, you must create the stack directly from
    --     the template using this capability.
    --
    --     You should only create stacks directly from a stack template that
    --     contains macros if you know what processing the macro performs.
    --
    --     Each macro relies on an underlying Lambda service function for
    --     processing stack templates. Be aware that the Lambda function owner
    --     can update the function operation without CloudFormation being
    --     notified.
    --
    --     For more information, see
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation macros to perform custom processing on templates>.
    CreateStack -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability],
    -- | A unique identifier for this @CreateStack@ request. Specify this token
    -- if you plan to retry requests so that CloudFormation knows that you\'re
    -- not attempting to create a stack with the same name. You might retry
    -- @CreateStack@ requests to ensure that CloudFormation successfully
    -- received them.
    --
    -- All events initiated by a given stack operation are assigned the same
    -- client request token, which you can use to track operations. For
    -- example, if you execute a @CreateStack@ operation with the token
    -- @token1@, then all the @StackEvents@ generated by that operation will
    -- have @ClientRequestToken@ set as @token1@.
    --
    -- In the console, stack operations display the client request token on the
    -- Events tab. Stack operations that are initiated from the console use the
    -- token format /Console-StackOperation-ID/, which helps you easily
    -- identify the stack operation . For example, if you create a stack using
    -- the console, each stack event would be assigned the same token in the
    -- following format:
    -- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@.
    CreateStack -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Set to @true@ to disable rollback of the stack if stack creation failed.
    -- You can specify either @DisableRollback@ or @OnFailure@, but not both.
    --
    -- Default: @false@
    CreateStack -> Maybe Bool
disableRollback :: Prelude.Maybe Prelude.Bool,
    -- | Whether to enable termination protection on the specified stack. If a
    -- user attempts to delete a stack with termination protection enabled, the
    -- operation fails and the stack remains unchanged. For more information,
    -- see
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html Protecting a Stack From Being Deleted>
    -- in the /CloudFormation User Guide/. Termination protection is
    -- deactivated on stacks by default.
    --
    -- For
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html nested stacks>,
    -- termination protection is set on the root stack and can\'t be changed
    -- directly on the nested stack.
    CreateStack -> Maybe Bool
enableTerminationProtection :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Simple Notification Service (Amazon SNS) topic ARNs to
    -- publish stack related events. You can find your Amazon SNS topic ARNs
    -- using the Amazon SNS console or your Command Line Interface (CLI).
    CreateStack -> Maybe [Text]
notificationARNs :: Prelude.Maybe [Prelude.Text],
    -- | Determines what action will be taken if stack creation fails. This must
    -- be one of: @DO_NOTHING@, @ROLLBACK@, or @DELETE@. You can specify either
    -- @OnFailure@ or @DisableRollback@, but not both.
    --
    -- Default: @ROLLBACK@
    CreateStack -> Maybe OnFailure
onFailure :: Prelude.Maybe OnFailure,
    -- | A list of @Parameter@ structures that specify input parameters for the
    -- stack. For more information, see the
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html Parameter>
    -- data type.
    CreateStack -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | The template resource types that you have permissions to work with for
    -- this create stack action, such as @AWS::EC2::Instance@, @AWS::EC2::*@,
    -- or @Custom::MyCustomInstance@. Use the following syntax to describe
    -- template resource types: @AWS::*@ (for all Amazon Web Services
    -- resources), @Custom::*@ (for all custom resources),
    -- @Custom::@/@logical_ID@/@ @ (for a specific custom resource),
    -- @AWS::@/@service_name@/@::*@ (for all resources of a particular Amazon
    -- Web Services service), and
    -- @AWS::@/@service_name@/@::@/@resource_logical_ID@/@ @ (for a specific
    -- Amazon Web Services resource).
    --
    -- If the list of resource types doesn\'t include a resource that you\'re
    -- creating, the stack creation fails. By default, CloudFormation grants
    -- permissions to all resource types. Identity and Access Management (IAM)
    -- uses this parameter for CloudFormation-specific condition keys in IAM
    -- policies. For more information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html Controlling Access with Identity and Access Management>.
    CreateStack -> Maybe [Text]
resourceTypes :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of an Identity and Access Management
    -- (IAM) role that CloudFormation assumes to create the stack.
    -- CloudFormation uses the role\'s credentials to make calls on your
    -- behalf. CloudFormation always uses this role for all future operations
    -- on the stack. Provided that users have permission to operate on the
    -- stack, CloudFormation uses this role even if the users don\'t have
    -- permission to pass it. Ensure that the role grants least privilege.
    --
    -- If you don\'t specify a value, CloudFormation uses the role that was
    -- previously associated with the stack. If no role is available,
    -- CloudFormation uses a temporary session that\'s generated from your user
    -- credentials.
    CreateStack -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | The rollback triggers for CloudFormation to monitor during stack
    -- creation and updating operations, and for the specified monitoring
    -- period afterwards.
    CreateStack -> Maybe RollbackConfiguration
rollbackConfiguration :: Prelude.Maybe RollbackConfiguration,
    -- | Structure containing the stack policy body. For more information, go to
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html Prevent Updates to Stack Resources>
    -- in the /CloudFormation User Guide/. You can specify either the
    -- @StackPolicyBody@ or the @StackPolicyURL@ parameter, but not both.
    CreateStack -> Maybe Text
stackPolicyBody :: Prelude.Maybe Prelude.Text,
    -- | Location of a file containing the stack policy. The URL must point to a
    -- policy (maximum size: 16 KB) located in an S3 bucket in the same Region
    -- as the stack. You can specify either the @StackPolicyBody@ or the
    -- @StackPolicyURL@ parameter, but not both.
    CreateStack -> Maybe Text
stackPolicyURL :: Prelude.Maybe Prelude.Text,
    -- | Key-value pairs to associate with this stack. CloudFormation also
    -- propagates these tags to the resources created in the stack. A maximum
    -- number of 50 tags can be specified.
    CreateStack -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | Structure containing the template body with a minimum length of 1 byte
    -- and a maximum length of 51,200 bytes. For more information, go to
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template anatomy>
    -- in the CloudFormation User Guide.
    --
    -- Conditional: You must specify either the @TemplateBody@ or the
    -- @TemplateURL@ parameter, but not both.
    CreateStack -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text,
    -- | Location of file containing the template body. The URL must point to a
    -- template (max size: 460,800 bytes) that\'s located in an Amazon S3
    -- bucket or a Systems Manager document. For more information, go to the
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template anatomy>
    -- in the CloudFormation User Guide.
    --
    -- Conditional: You must specify either the @TemplateBody@ or the
    -- @TemplateURL@ parameter, but not both.
    CreateStack -> Maybe Text
templateURL :: Prelude.Maybe Prelude.Text,
    -- | The amount of time that can pass before the stack status becomes
    -- CREATE_FAILED; if @DisableRollback@ is not set or is set to @false@, the
    -- stack will be rolled back.
    CreateStack -> Maybe Natural
timeoutInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | The name that\'s associated with the stack. The name must be unique in
    -- the Region in which you are creating the stack.
    --
    -- A stack name can contain only alphanumeric characters (case sensitive)
    -- and hyphens. It must start with an alphabetical character and can\'t be
    -- longer than 128 characters.
    CreateStack -> Text
stackName :: Prelude.Text
  }
  deriving (CreateStack -> CreateStack -> Bool
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]
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
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. 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)

-- |
-- Create a value of 'CreateStack' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'capabilities', 'createStack_capabilities' - In some cases, you must explicitly acknowledge that your stack template
-- contains certain capabilities in order for CloudFormation to create the
-- stack.
--
-- -   @CAPABILITY_IAM@ and @CAPABILITY_NAMED_IAM@
--
--     Some stack templates might include resources that can affect
--     permissions in your Amazon Web Services account; for example, by
--     creating new Identity and Access Management (IAM) users. For those
--     stacks, you must explicitly acknowledge this by specifying one of
--     these capabilities.
--
--     The following IAM resources require you to specify either the
--     @CAPABILITY_IAM@ or @CAPABILITY_NAMED_IAM@ capability.
--
--     -   If you have IAM resources, you can specify either capability.
--
--     -   If you have IAM resources with custom names, you /must/ specify
--         @CAPABILITY_NAMED_IAM@.
--
--     -   If you don\'t specify either of these capabilities,
--         CloudFormation returns an @InsufficientCapabilities@ error.
--
--     If your stack template contains these resources, we recommend that
--     you review all permissions associated with them and edit their
--     permissions if necessary.
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html AWS::IAM::AccessKey>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html AWS::IAM::Policy>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html AWS::IAM::User>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html AWS::IAM::UserToGroupAddition>
--
--     For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates>.
--
-- -   @CAPABILITY_AUTO_EXPAND@
--
--     Some template contain macros. Macros perform custom processing on
--     templates; this can include simple actions like find-and-replace
--     operations, all the way to extensive transformations of entire
--     templates. Because of this, users typically create a change set from
--     the processed template, so that they can review the changes
--     resulting from the macros before actually creating the stack. If
--     your stack template contains one or more macros, and you choose to
--     create a stack directly from the processed template, without first
--     reviewing the resulting changes in a change set, you must
--     acknowledge this capability. This includes the
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html AWS::Include>
--     and
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html AWS::Serverless>
--     transforms, which are macros hosted by CloudFormation.
--
--     If you want to create a stack from a stack template that contains
--     macros /and/ nested stacks, you must create the stack directly from
--     the template using this capability.
--
--     You should only create stacks directly from a stack template that
--     contains macros if you know what processing the macro performs.
--
--     Each macro relies on an underlying Lambda service function for
--     processing stack templates. Be aware that the Lambda function owner
--     can update the function operation without CloudFormation being
--     notified.
--
--     For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation macros to perform custom processing on templates>.
--
-- 'clientRequestToken', 'createStack_clientRequestToken' - A unique identifier for this @CreateStack@ request. Specify this token
-- if you plan to retry requests so that CloudFormation knows that you\'re
-- not attempting to create a stack with the same name. You might retry
-- @CreateStack@ requests to ensure that CloudFormation successfully
-- received them.
--
-- All events initiated by a given stack operation are assigned the same
-- client request token, which you can use to track operations. For
-- example, if you execute a @CreateStack@ operation with the token
-- @token1@, then all the @StackEvents@ generated by that operation will
-- have @ClientRequestToken@ set as @token1@.
--
-- In the console, stack operations display the client request token on the
-- Events tab. Stack operations that are initiated from the console use the
-- token format /Console-StackOperation-ID/, which helps you easily
-- identify the stack operation . For example, if you create a stack using
-- the console, each stack event would be assigned the same token in the
-- following format:
-- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@.
--
-- 'disableRollback', 'createStack_disableRollback' - Set to @true@ to disable rollback of the stack if stack creation failed.
-- You can specify either @DisableRollback@ or @OnFailure@, but not both.
--
-- Default: @false@
--
-- 'enableTerminationProtection', 'createStack_enableTerminationProtection' - Whether to enable termination protection on the specified stack. If a
-- user attempts to delete a stack with termination protection enabled, the
-- operation fails and the stack remains unchanged. For more information,
-- see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html Protecting a Stack From Being Deleted>
-- in the /CloudFormation User Guide/. Termination protection is
-- deactivated on stacks by default.
--
-- For
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html nested stacks>,
-- termination protection is set on the root stack and can\'t be changed
-- directly on the nested stack.
--
-- 'notificationARNs', 'createStack_notificationARNs' - The Amazon Simple Notification Service (Amazon SNS) topic ARNs to
-- publish stack related events. You can find your Amazon SNS topic ARNs
-- using the Amazon SNS console or your Command Line Interface (CLI).
--
-- 'onFailure', 'createStack_onFailure' - Determines what action will be taken if stack creation fails. This must
-- be one of: @DO_NOTHING@, @ROLLBACK@, or @DELETE@. You can specify either
-- @OnFailure@ or @DisableRollback@, but not both.
--
-- Default: @ROLLBACK@
--
-- 'parameters', 'createStack_parameters' - A list of @Parameter@ structures that specify input parameters for the
-- stack. For more information, see the
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html Parameter>
-- data type.
--
-- 'resourceTypes', 'createStack_resourceTypes' - The template resource types that you have permissions to work with for
-- this create stack action, such as @AWS::EC2::Instance@, @AWS::EC2::*@,
-- or @Custom::MyCustomInstance@. Use the following syntax to describe
-- template resource types: @AWS::*@ (for all Amazon Web Services
-- resources), @Custom::*@ (for all custom resources),
-- @Custom::@/@logical_ID@/@ @ (for a specific custom resource),
-- @AWS::@/@service_name@/@::*@ (for all resources of a particular Amazon
-- Web Services service), and
-- @AWS::@/@service_name@/@::@/@resource_logical_ID@/@ @ (for a specific
-- Amazon Web Services resource).
--
-- If the list of resource types doesn\'t include a resource that you\'re
-- creating, the stack creation fails. By default, CloudFormation grants
-- permissions to all resource types. Identity and Access Management (IAM)
-- uses this parameter for CloudFormation-specific condition keys in IAM
-- policies. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html Controlling Access with Identity and Access Management>.
--
-- 'roleARN', 'createStack_roleARN' - The Amazon Resource Name (ARN) of an Identity and Access Management
-- (IAM) role that CloudFormation assumes to create the stack.
-- CloudFormation uses the role\'s credentials to make calls on your
-- behalf. CloudFormation always uses this role for all future operations
-- on the stack. Provided that users have permission to operate on the
-- stack, CloudFormation uses this role even if the users don\'t have
-- permission to pass it. Ensure that the role grants least privilege.
--
-- If you don\'t specify a value, CloudFormation uses the role that was
-- previously associated with the stack. If no role is available,
-- CloudFormation uses a temporary session that\'s generated from your user
-- credentials.
--
-- 'rollbackConfiguration', 'createStack_rollbackConfiguration' - The rollback triggers for CloudFormation to monitor during stack
-- creation and updating operations, and for the specified monitoring
-- period afterwards.
--
-- 'stackPolicyBody', 'createStack_stackPolicyBody' - Structure containing the stack policy body. For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html Prevent Updates to Stack Resources>
-- in the /CloudFormation User Guide/. You can specify either the
-- @StackPolicyBody@ or the @StackPolicyURL@ parameter, but not both.
--
-- 'stackPolicyURL', 'createStack_stackPolicyURL' - Location of a file containing the stack policy. The URL must point to a
-- policy (maximum size: 16 KB) located in an S3 bucket in the same Region
-- as the stack. You can specify either the @StackPolicyBody@ or the
-- @StackPolicyURL@ parameter, but not both.
--
-- 'tags', 'createStack_tags' - Key-value pairs to associate with this stack. CloudFormation also
-- propagates these tags to the resources created in the stack. A maximum
-- number of 50 tags can be specified.
--
-- 'templateBody', 'createStack_templateBody' - Structure containing the template body with a minimum length of 1 byte
-- and a maximum length of 51,200 bytes. For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify either the @TemplateBody@ or the
-- @TemplateURL@ parameter, but not both.
--
-- 'templateURL', 'createStack_templateURL' - Location of file containing the template body. The URL must point to a
-- template (max size: 460,800 bytes) that\'s located in an Amazon S3
-- bucket or a Systems Manager document. For more information, go to the
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify either the @TemplateBody@ or the
-- @TemplateURL@ parameter, but not both.
--
-- 'timeoutInMinutes', 'createStack_timeoutInMinutes' - The amount of time that can pass before the stack status becomes
-- CREATE_FAILED; if @DisableRollback@ is not set or is set to @false@, the
-- stack will be rolled back.
--
-- 'stackName', 'createStack_stackName' - The name that\'s associated with the stack. The name must be unique in
-- the Region in which you are creating the stack.
--
-- A stack name can contain only alphanumeric characters (case sensitive)
-- and hyphens. It must start with an alphabetical character and can\'t be
-- longer than 128 characters.
newCreateStack ::
  -- | 'stackName'
  Prelude.Text ->
  CreateStack
newCreateStack :: Text -> CreateStack
newCreateStack Text
pStackName_ =
  CreateStack'
    { $sel:capabilities:CreateStack' :: Maybe [Capability]
capabilities = forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:CreateStack' :: Maybe Text
clientRequestToken = forall a. Maybe a
Prelude.Nothing,
      $sel:disableRollback:CreateStack' :: Maybe Bool
disableRollback = forall a. Maybe a
Prelude.Nothing,
      $sel:enableTerminationProtection:CreateStack' :: Maybe Bool
enableTerminationProtection = forall a. Maybe a
Prelude.Nothing,
      $sel:notificationARNs:CreateStack' :: Maybe [Text]
notificationARNs = forall a. Maybe a
Prelude.Nothing,
      $sel:onFailure:CreateStack' :: Maybe OnFailure
onFailure = forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:CreateStack' :: Maybe [Parameter]
parameters = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceTypes:CreateStack' :: Maybe [Text]
resourceTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:CreateStack' :: Maybe Text
roleARN = forall a. Maybe a
Prelude.Nothing,
      $sel:rollbackConfiguration:CreateStack' :: Maybe RollbackConfiguration
rollbackConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyBody:CreateStack' :: Maybe Text
stackPolicyBody = forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyURL:CreateStack' :: Maybe Text
stackPolicyURL = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateStack' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:CreateStack' :: Maybe Text
templateBody = forall a. Maybe a
Prelude.Nothing,
      $sel:templateURL:CreateStack' :: Maybe Text
templateURL = forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMinutes:CreateStack' :: Maybe Natural
timeoutInMinutes = forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:CreateStack' :: Text
stackName = Text
pStackName_
    }

-- | In some cases, you must explicitly acknowledge that your stack template
-- contains certain capabilities in order for CloudFormation to create the
-- stack.
--
-- -   @CAPABILITY_IAM@ and @CAPABILITY_NAMED_IAM@
--
--     Some stack templates might include resources that can affect
--     permissions in your Amazon Web Services account; for example, by
--     creating new Identity and Access Management (IAM) users. For those
--     stacks, you must explicitly acknowledge this by specifying one of
--     these capabilities.
--
--     The following IAM resources require you to specify either the
--     @CAPABILITY_IAM@ or @CAPABILITY_NAMED_IAM@ capability.
--
--     -   If you have IAM resources, you can specify either capability.
--
--     -   If you have IAM resources with custom names, you /must/ specify
--         @CAPABILITY_NAMED_IAM@.
--
--     -   If you don\'t specify either of these capabilities,
--         CloudFormation returns an @InsufficientCapabilities@ error.
--
--     If your stack template contains these resources, we recommend that
--     you review all permissions associated with them and edit their
--     permissions if necessary.
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html AWS::IAM::AccessKey>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html AWS::IAM::Policy>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html AWS::IAM::User>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html AWS::IAM::UserToGroupAddition>
--
--     For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates>.
--
-- -   @CAPABILITY_AUTO_EXPAND@
--
--     Some template contain macros. Macros perform custom processing on
--     templates; this can include simple actions like find-and-replace
--     operations, all the way to extensive transformations of entire
--     templates. Because of this, users typically create a change set from
--     the processed template, so that they can review the changes
--     resulting from the macros before actually creating the stack. If
--     your stack template contains one or more macros, and you choose to
--     create a stack directly from the processed template, without first
--     reviewing the resulting changes in a change set, you must
--     acknowledge this capability. This includes the
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html AWS::Include>
--     and
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html AWS::Serverless>
--     transforms, which are macros hosted by CloudFormation.
--
--     If you want to create a stack from a stack template that contains
--     macros /and/ nested stacks, you must create the stack directly from
--     the template using this capability.
--
--     You should only create stacks directly from a stack template that
--     contains macros if you know what processing the macro performs.
--
--     Each macro relies on an underlying Lambda service function for
--     processing stack templates. Be aware that the Lambda function owner
--     can update the function operation without CloudFormation being
--     notified.
--
--     For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation macros to perform custom processing on templates>.
createStack_capabilities :: Lens.Lens' CreateStack (Prelude.Maybe [Capability])
createStack_capabilities :: Lens' CreateStack (Maybe [Capability])
createStack_capabilities = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique identifier for this @CreateStack@ request. Specify this token
-- if you plan to retry requests so that CloudFormation knows that you\'re
-- not attempting to create a stack with the same name. You might retry
-- @CreateStack@ requests to ensure that CloudFormation successfully
-- received them.
--
-- All events initiated by a given stack operation are assigned the same
-- client request token, which you can use to track operations. For
-- example, if you execute a @CreateStack@ operation with the token
-- @token1@, then all the @StackEvents@ generated by that operation will
-- have @ClientRequestToken@ set as @token1@.
--
-- In the console, stack operations display the client request token on the
-- Events tab. Stack operations that are initiated from the console use the
-- token format /Console-StackOperation-ID/, which helps you easily
-- identify the stack operation . For example, if you create a stack using
-- the console, each stack event would be assigned the same token in the
-- following format:
-- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@.
createStack_clientRequestToken :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_clientRequestToken :: Lens' CreateStack (Maybe Text)
createStack_clientRequestToken = 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)

-- | Set to @true@ to disable rollback of the stack if stack creation failed.
-- You can specify either @DisableRollback@ or @OnFailure@, but not both.
--
-- Default: @false@
createStack_disableRollback :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Bool)
createStack_disableRollback :: Lens' CreateStack (Maybe Bool)
createStack_disableRollback = 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)

-- | Whether to enable termination protection on the specified stack. If a
-- user attempts to delete a stack with termination protection enabled, the
-- operation fails and the stack remains unchanged. For more information,
-- see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html Protecting a Stack From Being Deleted>
-- in the /CloudFormation User Guide/. Termination protection is
-- deactivated on stacks by default.
--
-- For
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html nested stacks>,
-- termination protection is set on the root stack and can\'t be changed
-- directly on the nested stack.
createStack_enableTerminationProtection :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Bool)
createStack_enableTerminationProtection :: Lens' CreateStack (Maybe Bool)
createStack_enableTerminationProtection = 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)

-- | The Amazon Simple Notification Service (Amazon SNS) topic ARNs to
-- publish stack related events. You can find your Amazon SNS topic ARNs
-- using the Amazon SNS console or your Command Line Interface (CLI).
createStack_notificationARNs :: Lens.Lens' CreateStack (Prelude.Maybe [Prelude.Text])
createStack_notificationARNs :: Lens' CreateStack (Maybe [Text])
createStack_notificationARNs = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Determines what action will be taken if stack creation fails. This must
-- be one of: @DO_NOTHING@, @ROLLBACK@, or @DELETE@. You can specify either
-- @OnFailure@ or @DisableRollback@, but not both.
--
-- Default: @ROLLBACK@
createStack_onFailure :: Lens.Lens' CreateStack (Prelude.Maybe OnFailure)
createStack_onFailure :: Lens' CreateStack (Maybe OnFailure)
createStack_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)

-- | A list of @Parameter@ structures that specify input parameters for the
-- stack. For more information, see the
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html Parameter>
-- data type.
createStack_parameters :: Lens.Lens' CreateStack (Prelude.Maybe [Parameter])
createStack_parameters :: Lens' CreateStack (Maybe [Parameter])
createStack_parameters = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The template resource types that you have permissions to work with for
-- this create stack action, such as @AWS::EC2::Instance@, @AWS::EC2::*@,
-- or @Custom::MyCustomInstance@. Use the following syntax to describe
-- template resource types: @AWS::*@ (for all Amazon Web Services
-- resources), @Custom::*@ (for all custom resources),
-- @Custom::@/@logical_ID@/@ @ (for a specific custom resource),
-- @AWS::@/@service_name@/@::*@ (for all resources of a particular Amazon
-- Web Services service), and
-- @AWS::@/@service_name@/@::@/@resource_logical_ID@/@ @ (for a specific
-- Amazon Web Services resource).
--
-- If the list of resource types doesn\'t include a resource that you\'re
-- creating, the stack creation fails. By default, CloudFormation grants
-- permissions to all resource types. Identity and Access Management (IAM)
-- uses this parameter for CloudFormation-specific condition keys in IAM
-- policies. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html Controlling Access with Identity and Access Management>.
createStack_resourceTypes :: Lens.Lens' CreateStack (Prelude.Maybe [Prelude.Text])
createStack_resourceTypes :: Lens' CreateStack (Maybe [Text])
createStack_resourceTypes = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of an Identity and Access Management
-- (IAM) role that CloudFormation assumes to create the stack.
-- CloudFormation uses the role\'s credentials to make calls on your
-- behalf. CloudFormation always uses this role for all future operations
-- on the stack. Provided that users have permission to operate on the
-- stack, CloudFormation uses this role even if the users don\'t have
-- permission to pass it. Ensure that the role grants least privilege.
--
-- If you don\'t specify a value, CloudFormation uses the role that was
-- previously associated with the stack. If no role is available,
-- CloudFormation uses a temporary session that\'s generated from your user
-- credentials.
createStack_roleARN :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_roleARN :: Lens' CreateStack (Maybe Text)
createStack_roleARN = 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)

-- | The rollback triggers for CloudFormation to monitor during stack
-- creation and updating operations, and for the specified monitoring
-- period afterwards.
createStack_rollbackConfiguration :: Lens.Lens' CreateStack (Prelude.Maybe RollbackConfiguration)
createStack_rollbackConfiguration :: Lens' CreateStack (Maybe RollbackConfiguration)
createStack_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)

-- | Structure containing the stack policy body. For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html Prevent Updates to Stack Resources>
-- in the /CloudFormation User Guide/. You can specify either the
-- @StackPolicyBody@ or the @StackPolicyURL@ parameter, but not both.
createStack_stackPolicyBody :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_stackPolicyBody :: Lens' CreateStack (Maybe Text)
createStack_stackPolicyBody = 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)

-- | Location of a file containing the stack policy. The URL must point to a
-- policy (maximum size: 16 KB) located in an S3 bucket in the same Region
-- as the stack. You can specify either the @StackPolicyBody@ or the
-- @StackPolicyURL@ parameter, but not both.
createStack_stackPolicyURL :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_stackPolicyURL :: Lens' CreateStack (Maybe Text)
createStack_stackPolicyURL = 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)

-- | Key-value pairs to associate with this stack. CloudFormation also
-- propagates these tags to the resources created in the stack. A maximum
-- number of 50 tags can be specified.
createStack_tags :: Lens.Lens' CreateStack (Prelude.Maybe [Tag])
createStack_tags :: Lens' CreateStack (Maybe [Tag])
createStack_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Structure containing the template body with a minimum length of 1 byte
-- and a maximum length of 51,200 bytes. For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify either the @TemplateBody@ or the
-- @TemplateURL@ parameter, but not both.
createStack_templateBody :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_templateBody :: Lens' CreateStack (Maybe Text)
createStack_templateBody = 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)

-- | Location of file containing the template body. The URL must point to a
-- template (max size: 460,800 bytes) that\'s located in an Amazon S3
-- bucket or a Systems Manager document. For more information, go to the
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify either the @TemplateBody@ or the
-- @TemplateURL@ parameter, but not both.
createStack_templateURL :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Text)
createStack_templateURL :: Lens' CreateStack (Maybe Text)
createStack_templateURL = 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)

-- | The amount of time that can pass before the stack status becomes
-- CREATE_FAILED; if @DisableRollback@ is not set or is set to @false@, the
-- stack will be rolled back.
createStack_timeoutInMinutes :: Lens.Lens' CreateStack (Prelude.Maybe Prelude.Natural)
createStack_timeoutInMinutes :: Lens' CreateStack (Maybe Natural)
createStack_timeoutInMinutes = 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)

-- | The name that\'s associated with the stack. The name must be unique in
-- the Region in which you are creating the stack.
--
-- A stack name can contain only alphanumeric characters (case sensitive)
-- and hyphens. It must start with an alphabetical character and can\'t be
-- longer than 128 characters.
createStack_stackName :: Lens.Lens' CreateStack Prelude.Text
createStack_stackName :: Lens' CreateStack Text
createStack_stackName = 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 :: (Service -> Service) -> CreateStack -> Request CreateStack
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStack)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"StackId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateStack where
  hashWithSalt :: Int -> CreateStack -> Int
hashWithSalt Int
_salt CreateStack' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe OnFailure
Maybe RollbackConfiguration
Text
stackName :: Text
timeoutInMinutes :: Maybe Natural
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
stackPolicyURL :: Maybe Text
stackPolicyBody :: Maybe Text
rollbackConfiguration :: Maybe RollbackConfiguration
roleARN :: Maybe Text
resourceTypes :: Maybe [Text]
parameters :: Maybe [Parameter]
onFailure :: Maybe OnFailure
notificationARNs :: Maybe [Text]
enableTerminationProtection :: Maybe Bool
disableRollback :: Maybe Bool
clientRequestToken :: Maybe Text
capabilities :: Maybe [Capability]
$sel:stackName:CreateStack' :: CreateStack -> Text
$sel:timeoutInMinutes:CreateStack' :: CreateStack -> Maybe Natural
$sel:templateURL:CreateStack' :: CreateStack -> Maybe Text
$sel:templateBody:CreateStack' :: CreateStack -> Maybe Text
$sel:tags:CreateStack' :: CreateStack -> Maybe [Tag]
$sel:stackPolicyURL:CreateStack' :: CreateStack -> Maybe Text
$sel:stackPolicyBody:CreateStack' :: CreateStack -> Maybe Text
$sel:rollbackConfiguration:CreateStack' :: CreateStack -> Maybe RollbackConfiguration
$sel:roleARN:CreateStack' :: CreateStack -> Maybe Text
$sel:resourceTypes:CreateStack' :: CreateStack -> Maybe [Text]
$sel:parameters:CreateStack' :: CreateStack -> Maybe [Parameter]
$sel:onFailure:CreateStack' :: CreateStack -> Maybe OnFailure
$sel:notificationARNs:CreateStack' :: CreateStack -> Maybe [Text]
$sel:enableTerminationProtection:CreateStack' :: CreateStack -> Maybe Bool
$sel:disableRollback:CreateStack' :: CreateStack -> Maybe Bool
$sel:clientRequestToken:CreateStack' :: CreateStack -> Maybe Text
$sel:capabilities:CreateStack' :: CreateStack -> Maybe [Capability]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Capability]
capabilities
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableRollback
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableTerminationProtection
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
notificationARNs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OnFailure
onFailure
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Parameter]
parameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
resourceTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RollbackConfiguration
rollbackConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackPolicyBody
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackPolicyURL
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateBody
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateURL
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeoutInMinutes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackName

instance Prelude.NFData CreateStack where
  rnf :: CreateStack -> ()
rnf CreateStack' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe OnFailure
Maybe RollbackConfiguration
Text
stackName :: Text
timeoutInMinutes :: Maybe Natural
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
stackPolicyURL :: Maybe Text
stackPolicyBody :: Maybe Text
rollbackConfiguration :: Maybe RollbackConfiguration
roleARN :: Maybe Text
resourceTypes :: Maybe [Text]
parameters :: Maybe [Parameter]
onFailure :: Maybe OnFailure
notificationARNs :: Maybe [Text]
enableTerminationProtection :: Maybe Bool
disableRollback :: Maybe Bool
clientRequestToken :: Maybe Text
capabilities :: Maybe [Capability]
$sel:stackName:CreateStack' :: CreateStack -> Text
$sel:timeoutInMinutes:CreateStack' :: CreateStack -> Maybe Natural
$sel:templateURL:CreateStack' :: CreateStack -> Maybe Text
$sel:templateBody:CreateStack' :: CreateStack -> Maybe Text
$sel:tags:CreateStack' :: CreateStack -> Maybe [Tag]
$sel:stackPolicyURL:CreateStack' :: CreateStack -> Maybe Text
$sel:stackPolicyBody:CreateStack' :: CreateStack -> Maybe Text
$sel:rollbackConfiguration:CreateStack' :: CreateStack -> Maybe RollbackConfiguration
$sel:roleARN:CreateStack' :: CreateStack -> Maybe Text
$sel:resourceTypes:CreateStack' :: CreateStack -> Maybe [Text]
$sel:parameters:CreateStack' :: CreateStack -> Maybe [Parameter]
$sel:onFailure:CreateStack' :: CreateStack -> Maybe OnFailure
$sel:notificationARNs:CreateStack' :: CreateStack -> Maybe [Text]
$sel:enableTerminationProtection:CreateStack' :: CreateStack -> Maybe Bool
$sel:disableRollback:CreateStack' :: CreateStack -> Maybe Bool
$sel:clientRequestToken:CreateStack' :: CreateStack -> Maybe Text
$sel:capabilities:CreateStack' :: CreateStack -> Maybe [Capability]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Capability]
capabilities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableRollback
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableTerminationProtection
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
notificationARNs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OnFailure
onFailure
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Parameter]
parameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
resourceTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RollbackConfiguration
rollbackConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackPolicyBody
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackPolicyURL
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateBody
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateURL
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeoutInMinutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackName

instance Data.ToHeaders CreateStack where
  toHeaders :: CreateStack -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath CreateStack where
  toPath :: CreateStack -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.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
timeoutInMinutes :: Maybe Natural
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
stackPolicyURL :: Maybe Text
stackPolicyBody :: Maybe Text
rollbackConfiguration :: Maybe RollbackConfiguration
roleARN :: Maybe Text
resourceTypes :: Maybe [Text]
parameters :: Maybe [Parameter]
onFailure :: Maybe OnFailure
notificationARNs :: Maybe [Text]
enableTerminationProtection :: Maybe Bool
disableRollback :: Maybe Bool
clientRequestToken :: Maybe Text
capabilities :: Maybe [Capability]
$sel:stackName:CreateStack' :: CreateStack -> Text
$sel:timeoutInMinutes:CreateStack' :: CreateStack -> Maybe Natural
$sel:templateURL:CreateStack' :: CreateStack -> Maybe Text
$sel:templateBody:CreateStack' :: CreateStack -> Maybe Text
$sel:tags:CreateStack' :: CreateStack -> Maybe [Tag]
$sel:stackPolicyURL:CreateStack' :: CreateStack -> Maybe Text
$sel:stackPolicyBody:CreateStack' :: CreateStack -> Maybe Text
$sel:rollbackConfiguration:CreateStack' :: CreateStack -> Maybe RollbackConfiguration
$sel:roleARN:CreateStack' :: CreateStack -> Maybe Text
$sel:resourceTypes:CreateStack' :: CreateStack -> Maybe [Text]
$sel:parameters:CreateStack' :: CreateStack -> Maybe [Parameter]
$sel:onFailure:CreateStack' :: CreateStack -> Maybe OnFailure
$sel:notificationARNs:CreateStack' :: CreateStack -> Maybe [Text]
$sel:enableTerminationProtection:CreateStack' :: CreateStack -> Maybe Bool
$sel:disableRollback:CreateStack' :: CreateStack -> Maybe Bool
$sel:clientRequestToken:CreateStack' :: CreateStack -> Maybe Text
$sel:capabilities:CreateStack' :: CreateStack -> Maybe [Capability]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateStack" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"Capabilities"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Capability]
capabilities),
        ByteString
"ClientRequestToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientRequestToken,
        ByteString
"DisableRollback" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
disableRollback,
        ByteString
"EnableTerminationProtection"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
enableTerminationProtection,
        ByteString
"NotificationARNs"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
notificationARNs
            ),
        ByteString
"OnFailure" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe OnFailure
onFailure,
        ByteString
"Parameters"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Parameter]
parameters),
        ByteString
"ResourceTypes"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourceTypes
            ),
        ByteString
"RoleARN" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
roleARN,
        ByteString
"RollbackConfiguration"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe RollbackConfiguration
rollbackConfiguration,
        ByteString
"StackPolicyBody" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackPolicyBody,
        ByteString
"StackPolicyURL" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackPolicyURL,
        ByteString
"Tags"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"TemplateBody" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
templateBody,
        ByteString
"TemplateURL" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
templateURL,
        ByteString
"TimeoutInMinutes" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
timeoutInMinutes,
        ByteString
"StackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
stackName
      ]

-- | The output for a CreateStack action.
--
-- /See:/ 'newCreateStackResponse' smart constructor.
data CreateStackResponse = CreateStackResponse'
  { -- | Unique identifier of the stack.
    CreateStackResponse -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateStackResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateStackResponse -> CreateStackResponse -> Bool
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]
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
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. 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)

-- |
-- Create a value of 'CreateStackResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'stackId', 'createStackResponse_stackId' - Unique identifier of the stack.
--
-- 'httpStatus', 'createStackResponse_httpStatus' - The response's http status code.
newCreateStackResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateStackResponse
newCreateStackResponse :: Int -> CreateStackResponse
newCreateStackResponse Int
pHttpStatus_ =
  CreateStackResponse'
    { $sel:stackId:CreateStackResponse' :: Maybe Text
stackId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateStackResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Unique identifier of the stack.
createStackResponse_stackId :: Lens.Lens' CreateStackResponse (Prelude.Maybe Prelude.Text)
createStackResponse_stackId :: Lens' CreateStackResponse (Maybe Text)
createStackResponse_stackId = 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)

-- | The response's http status code.
createStackResponse_httpStatus :: Lens.Lens' CreateStackResponse Prelude.Int
createStackResponse_httpStatus :: Lens' CreateStackResponse Int
createStackResponse_httpStatus = 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 where
  rnf :: CreateStackResponse -> ()
rnf CreateStackResponse' {Int
Maybe Text
httpStatus :: Int
stackId :: Maybe Text
$sel:httpStatus:CreateStackResponse' :: CreateStackResponse -> Int
$sel:stackId:CreateStackResponse' :: CreateStackResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus