{-# 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.CreateChangeSet
-- 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 list of changes that will be applied to a stack so that you
-- can review the changes before executing them. You can create a change
-- set for a stack that doesn\'t exist or an existing stack. If you create
-- a change set for a stack that doesn\'t exist, the change set shows all
-- of the resources that CloudFormation will create. If you create a change
-- set for an existing stack, CloudFormation compares the stack\'s
-- information with the information that you submit in the change set and
-- lists the differences. Use change sets to understand which resources
-- CloudFormation will create or change, and how it will change resources
-- in an existing stack, before you create or update a stack.
--
-- To create a change set for a stack that doesn\'t exist, for the
-- @ChangeSetType@ parameter, specify @CREATE@. To create a change set for
-- an existing stack, specify @UPDATE@ for the @ChangeSetType@ parameter.
-- To create a change set for an import operation, specify @IMPORT@ for the
-- @ChangeSetType@ parameter. After the @CreateChangeSet@ call successfully
-- completes, CloudFormation starts creating the change set. To check the
-- status of the change set or to review it, use the DescribeChangeSet
-- action.
--
-- When you are satisfied with the changes the change set will make,
-- execute the change set by using the ExecuteChangeSet action.
-- CloudFormation doesn\'t make changes until you execute the change set.
--
-- To create a change set for the entire stack hierarchy, set
-- @IncludeNestedStacks@ to @True@.
module Amazonka.CloudFormation.CreateChangeSet
  ( -- * Creating a Request
    CreateChangeSet (..),
    newCreateChangeSet,

    -- * Request Lenses
    createChangeSet_capabilities,
    createChangeSet_changeSetType,
    createChangeSet_clientToken,
    createChangeSet_description,
    createChangeSet_includeNestedStacks,
    createChangeSet_notificationARNs,
    createChangeSet_parameters,
    createChangeSet_resourceTypes,
    createChangeSet_resourcesToImport,
    createChangeSet_roleARN,
    createChangeSet_rollbackConfiguration,
    createChangeSet_tags,
    createChangeSet_templateBody,
    createChangeSet_templateURL,
    createChangeSet_usePreviousTemplate,
    createChangeSet_stackName,
    createChangeSet_changeSetName,

    -- * Destructuring the Response
    CreateChangeSetResponse (..),
    newCreateChangeSetResponse,

    -- * Response Lenses
    createChangeSetResponse_id,
    createChangeSetResponse_stackId,
    createChangeSetResponse_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 the CreateChangeSet action.
--
-- /See:/ 'newCreateChangeSet' smart constructor.
data CreateChangeSet = CreateChangeSet'
  { -- | 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 suggest 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.
    --
    --     This capacity doesn\'t apply to creating change sets, and specifying
    --     it when creating change sets has no effect.
    --
    --     If you want to create a stack from a stack template that contains
    --     macros /and/ nested stacks, you must create or update the stack
    --     directly from the template using the CreateStack or UpdateStack
    --     action, and specifying this capability.
    --
    --     For more information about macros, see
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation macros to perform custom processing on templates>.
    CreateChangeSet -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability],
    -- | The type of change set operation. To create a change set for a new
    -- stack, specify @CREATE@. To create a change set for an existing stack,
    -- specify @UPDATE@. To create a change set for an import operation,
    -- specify @IMPORT@.
    --
    -- If you create a change set for a new stack, CloudFormation creates a
    -- stack with a unique stack ID, but no template or resources. The stack
    -- will be in the
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#d0e11995 REVIEW_IN_PROGRESS>
    -- state until you execute the change set.
    --
    -- By default, CloudFormation specifies @UPDATE@. You can\'t use the
    -- @UPDATE@ type to create a change set for a new stack or the @CREATE@
    -- type to create a change set for an existing stack.
    CreateChangeSet -> Maybe ChangeSetType
changeSetType :: Prelude.Maybe ChangeSetType,
    -- | A unique identifier for this @CreateChangeSet@ request. Specify this
    -- token if you plan to retry requests so that CloudFormation knows that
    -- you\'re not attempting to create another change set with the same name.
    -- You might retry @CreateChangeSet@ requests to ensure that CloudFormation
    -- successfully received them.
    CreateChangeSet -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | A description to help you identify this change set.
    CreateChangeSet -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Creates a change set for the all nested stacks specified in the
    -- template. The default behavior of this action is set to @False@. To
    -- include nested sets in a change set, specify @True@.
    CreateChangeSet -> Maybe Bool
includeNestedStacks :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Names (ARNs) of Amazon Simple Notification Service
    -- (Amazon SNS) topics that CloudFormation associates with the stack. To
    -- remove all associated notification topics, specify an empty list.
    CreateChangeSet -> Maybe [Text]
notificationARNs :: Prelude.Maybe [Prelude.Text],
    -- | A list of @Parameter@ structures that specify input parameters for the
    -- change set. For more information, see the Parameter data type.
    CreateChangeSet -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | The template resource types that you have permissions to work with if
    -- you execute this change set, such as @AWS::EC2::Instance@,
    -- @AWS::EC2::*@, or @Custom::MyCustomInstance@.
    --
    -- If the list of resource types doesn\'t include a resource type that
    -- you\'re updating, the stack update fails. By default, CloudFormation
    -- grants permissions to all resource types. Identity and Access Management
    -- (IAM) uses this parameter for condition keys in IAM policies for
    -- CloudFormation. For more information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html Controlling access with Identity and Access Management>
    -- in the CloudFormation User Guide.
    CreateChangeSet -> Maybe [Text]
resourceTypes :: Prelude.Maybe [Prelude.Text],
    -- | The resources to import into your stack.
    CreateChangeSet -> Maybe [ResourceToImport]
resourcesToImport :: Prelude.Maybe [ResourceToImport],
    -- | The Amazon Resource Name (ARN) of an Identity and Access Management
    -- (IAM) role that CloudFormation assumes when executing the change set.
    -- CloudFormation uses the role\'s credentials to make calls on your
    -- behalf. CloudFormation 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 permission.
    --
    -- 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 is generated from your user
    -- credentials.
    CreateChangeSet -> 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.
    CreateChangeSet -> Maybe RollbackConfiguration
rollbackConfiguration :: Prelude.Maybe RollbackConfiguration,
    -- | Key-value pairs to associate with this stack. CloudFormation also
    -- propagates these tags to resources in the stack. You can specify a
    -- maximum of 50 tags.
    CreateChangeSet -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A structure that contains the body of the revised template, with a
    -- minimum length of 1 byte and a maximum length of 51,200 bytes.
    -- CloudFormation generates the change set by comparing this template with
    -- the template of the stack that you specified.
    --
    -- Conditional: You must specify only @TemplateBody@ or @TemplateURL@.
    CreateChangeSet -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text,
    -- | The location of the file that contains the revised template. 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. CloudFormation generates
    -- the change set by comparing this template with the stack that you
    -- specified.
    --
    -- Conditional: You must specify only @TemplateBody@ or @TemplateURL@.
    CreateChangeSet -> Maybe Text
templateURL :: Prelude.Maybe Prelude.Text,
    -- | Whether to reuse the template that\'s associated with the stack to
    -- create the change set.
    CreateChangeSet -> Maybe Bool
usePreviousTemplate :: Prelude.Maybe Prelude.Bool,
    -- | The name or the unique ID of the stack for which you are creating a
    -- change set. CloudFormation generates the change set by comparing this
    -- stack\'s information with the information that you submit, such as a
    -- modified template or different parameter input values.
    CreateChangeSet -> Text
stackName :: Prelude.Text,
    -- | The name of the change set. The name must be unique among all change
    -- sets that are associated with the specified stack.
    --
    -- A change set name can contain only alphanumeric, case sensitive
    -- characters, and hyphens. It must start with an alphabetical character
    -- and can\'t exceed 128 characters.
    CreateChangeSet -> Text
changeSetName :: Prelude.Text
  }
  deriving (CreateChangeSet -> CreateChangeSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateChangeSet -> CreateChangeSet -> Bool
$c/= :: CreateChangeSet -> CreateChangeSet -> Bool
== :: CreateChangeSet -> CreateChangeSet -> Bool
$c== :: CreateChangeSet -> CreateChangeSet -> Bool
Prelude.Eq, ReadPrec [CreateChangeSet]
ReadPrec CreateChangeSet
Int -> ReadS CreateChangeSet
ReadS [CreateChangeSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateChangeSet]
$creadListPrec :: ReadPrec [CreateChangeSet]
readPrec :: ReadPrec CreateChangeSet
$creadPrec :: ReadPrec CreateChangeSet
readList :: ReadS [CreateChangeSet]
$creadList :: ReadS [CreateChangeSet]
readsPrec :: Int -> ReadS CreateChangeSet
$creadsPrec :: Int -> ReadS CreateChangeSet
Prelude.Read, Int -> CreateChangeSet -> ShowS
[CreateChangeSet] -> ShowS
CreateChangeSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateChangeSet] -> ShowS
$cshowList :: [CreateChangeSet] -> ShowS
show :: CreateChangeSet -> String
$cshow :: CreateChangeSet -> String
showsPrec :: Int -> CreateChangeSet -> ShowS
$cshowsPrec :: Int -> CreateChangeSet -> ShowS
Prelude.Show, forall x. Rep CreateChangeSet x -> CreateChangeSet
forall x. CreateChangeSet -> Rep CreateChangeSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateChangeSet x -> CreateChangeSet
$cfrom :: forall x. CreateChangeSet -> Rep CreateChangeSet x
Prelude.Generic)

-- |
-- Create a value of 'CreateChangeSet' 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', 'createChangeSet_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 suggest 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.
--
--     This capacity doesn\'t apply to creating change sets, and specifying
--     it when creating change sets has no effect.
--
--     If you want to create a stack from a stack template that contains
--     macros /and/ nested stacks, you must create or update the stack
--     directly from the template using the CreateStack or UpdateStack
--     action, and specifying this capability.
--
--     For more information about macros, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation macros to perform custom processing on templates>.
--
-- 'changeSetType', 'createChangeSet_changeSetType' - The type of change set operation. To create a change set for a new
-- stack, specify @CREATE@. To create a change set for an existing stack,
-- specify @UPDATE@. To create a change set for an import operation,
-- specify @IMPORT@.
--
-- If you create a change set for a new stack, CloudFormation creates a
-- stack with a unique stack ID, but no template or resources. The stack
-- will be in the
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#d0e11995 REVIEW_IN_PROGRESS>
-- state until you execute the change set.
--
-- By default, CloudFormation specifies @UPDATE@. You can\'t use the
-- @UPDATE@ type to create a change set for a new stack or the @CREATE@
-- type to create a change set for an existing stack.
--
-- 'clientToken', 'createChangeSet_clientToken' - A unique identifier for this @CreateChangeSet@ request. Specify this
-- token if you plan to retry requests so that CloudFormation knows that
-- you\'re not attempting to create another change set with the same name.
-- You might retry @CreateChangeSet@ requests to ensure that CloudFormation
-- successfully received them.
--
-- 'description', 'createChangeSet_description' - A description to help you identify this change set.
--
-- 'includeNestedStacks', 'createChangeSet_includeNestedStacks' - Creates a change set for the all nested stacks specified in the
-- template. The default behavior of this action is set to @False@. To
-- include nested sets in a change set, specify @True@.
--
-- 'notificationARNs', 'createChangeSet_notificationARNs' - The Amazon Resource Names (ARNs) of Amazon Simple Notification Service
-- (Amazon SNS) topics that CloudFormation associates with the stack. To
-- remove all associated notification topics, specify an empty list.
--
-- 'parameters', 'createChangeSet_parameters' - A list of @Parameter@ structures that specify input parameters for the
-- change set. For more information, see the Parameter data type.
--
-- 'resourceTypes', 'createChangeSet_resourceTypes' - The template resource types that you have permissions to work with if
-- you execute this change set, such as @AWS::EC2::Instance@,
-- @AWS::EC2::*@, or @Custom::MyCustomInstance@.
--
-- If the list of resource types doesn\'t include a resource type that
-- you\'re updating, the stack update fails. By default, CloudFormation
-- grants permissions to all resource types. Identity and Access Management
-- (IAM) uses this parameter for condition keys in IAM policies for
-- CloudFormation. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html Controlling access with Identity and Access Management>
-- in the CloudFormation User Guide.
--
-- 'resourcesToImport', 'createChangeSet_resourcesToImport' - The resources to import into your stack.
--
-- 'roleARN', 'createChangeSet_roleARN' - The Amazon Resource Name (ARN) of an Identity and Access Management
-- (IAM) role that CloudFormation assumes when executing the change set.
-- CloudFormation uses the role\'s credentials to make calls on your
-- behalf. CloudFormation 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 permission.
--
-- 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 is generated from your user
-- credentials.
--
-- 'rollbackConfiguration', 'createChangeSet_rollbackConfiguration' - The rollback triggers for CloudFormation to monitor during stack
-- creation and updating operations, and for the specified monitoring
-- period afterwards.
--
-- 'tags', 'createChangeSet_tags' - Key-value pairs to associate with this stack. CloudFormation also
-- propagates these tags to resources in the stack. You can specify a
-- maximum of 50 tags.
--
-- 'templateBody', 'createChangeSet_templateBody' - A structure that contains the body of the revised template, with a
-- minimum length of 1 byte and a maximum length of 51,200 bytes.
-- CloudFormation generates the change set by comparing this template with
-- the template of the stack that you specified.
--
-- Conditional: You must specify only @TemplateBody@ or @TemplateURL@.
--
-- 'templateURL', 'createChangeSet_templateURL' - The location of the file that contains the revised template. 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. CloudFormation generates
-- the change set by comparing this template with the stack that you
-- specified.
--
-- Conditional: You must specify only @TemplateBody@ or @TemplateURL@.
--
-- 'usePreviousTemplate', 'createChangeSet_usePreviousTemplate' - Whether to reuse the template that\'s associated with the stack to
-- create the change set.
--
-- 'stackName', 'createChangeSet_stackName' - The name or the unique ID of the stack for which you are creating a
-- change set. CloudFormation generates the change set by comparing this
-- stack\'s information with the information that you submit, such as a
-- modified template or different parameter input values.
--
-- 'changeSetName', 'createChangeSet_changeSetName' - The name of the change set. The name must be unique among all change
-- sets that are associated with the specified stack.
--
-- A change set name can contain only alphanumeric, case sensitive
-- characters, and hyphens. It must start with an alphabetical character
-- and can\'t exceed 128 characters.
newCreateChangeSet ::
  -- | 'stackName'
  Prelude.Text ->
  -- | 'changeSetName'
  Prelude.Text ->
  CreateChangeSet
newCreateChangeSet :: Text -> Text -> CreateChangeSet
newCreateChangeSet Text
pStackName_ Text
pChangeSetName_ =
  CreateChangeSet'
    { $sel:capabilities:CreateChangeSet' :: Maybe [Capability]
capabilities = forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetType:CreateChangeSet' :: Maybe ChangeSetType
changeSetType = forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:CreateChangeSet' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateChangeSet' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:includeNestedStacks:CreateChangeSet' :: Maybe Bool
includeNestedStacks = forall a. Maybe a
Prelude.Nothing,
      $sel:notificationARNs:CreateChangeSet' :: Maybe [Text]
notificationARNs = forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:CreateChangeSet' :: Maybe [Parameter]
parameters = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceTypes:CreateChangeSet' :: Maybe [Text]
resourceTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:resourcesToImport:CreateChangeSet' :: Maybe [ResourceToImport]
resourcesToImport = forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:CreateChangeSet' :: Maybe Text
roleARN = forall a. Maybe a
Prelude.Nothing,
      $sel:rollbackConfiguration:CreateChangeSet' :: Maybe RollbackConfiguration
rollbackConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateChangeSet' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:CreateChangeSet' :: Maybe Text
templateBody = forall a. Maybe a
Prelude.Nothing,
      $sel:templateURL:CreateChangeSet' :: Maybe Text
templateURL = forall a. Maybe a
Prelude.Nothing,
      $sel:usePreviousTemplate:CreateChangeSet' :: Maybe Bool
usePreviousTemplate = forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:CreateChangeSet' :: Text
stackName = Text
pStackName_,
      $sel:changeSetName:CreateChangeSet' :: Text
changeSetName = Text
pChangeSetName_
    }

-- | 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 suggest 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.
--
--     This capacity doesn\'t apply to creating change sets, and specifying
--     it when creating change sets has no effect.
--
--     If you want to create a stack from a stack template that contains
--     macros /and/ nested stacks, you must create or update the stack
--     directly from the template using the CreateStack or UpdateStack
--     action, and specifying this capability.
--
--     For more information about macros, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation macros to perform custom processing on templates>.
createChangeSet_capabilities :: Lens.Lens' CreateChangeSet (Prelude.Maybe [Capability])
createChangeSet_capabilities :: Lens' CreateChangeSet (Maybe [Capability])
createChangeSet_capabilities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe [Capability]
capabilities :: Maybe [Capability]
$sel:capabilities:CreateChangeSet' :: CreateChangeSet -> Maybe [Capability]
capabilities} -> Maybe [Capability]
capabilities) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe [Capability]
a -> CreateChangeSet
s {$sel:capabilities:CreateChangeSet' :: Maybe [Capability]
capabilities = Maybe [Capability]
a} :: CreateChangeSet) 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 type of change set operation. To create a change set for a new
-- stack, specify @CREATE@. To create a change set for an existing stack,
-- specify @UPDATE@. To create a change set for an import operation,
-- specify @IMPORT@.
--
-- If you create a change set for a new stack, CloudFormation creates a
-- stack with a unique stack ID, but no template or resources. The stack
-- will be in the
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#d0e11995 REVIEW_IN_PROGRESS>
-- state until you execute the change set.
--
-- By default, CloudFormation specifies @UPDATE@. You can\'t use the
-- @UPDATE@ type to create a change set for a new stack or the @CREATE@
-- type to create a change set for an existing stack.
createChangeSet_changeSetType :: Lens.Lens' CreateChangeSet (Prelude.Maybe ChangeSetType)
createChangeSet_changeSetType :: Lens' CreateChangeSet (Maybe ChangeSetType)
createChangeSet_changeSetType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe ChangeSetType
changeSetType :: Maybe ChangeSetType
$sel:changeSetType:CreateChangeSet' :: CreateChangeSet -> Maybe ChangeSetType
changeSetType} -> Maybe ChangeSetType
changeSetType) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe ChangeSetType
a -> CreateChangeSet
s {$sel:changeSetType:CreateChangeSet' :: Maybe ChangeSetType
changeSetType = Maybe ChangeSetType
a} :: CreateChangeSet)

-- | A unique identifier for this @CreateChangeSet@ request. Specify this
-- token if you plan to retry requests so that CloudFormation knows that
-- you\'re not attempting to create another change set with the same name.
-- You might retry @CreateChangeSet@ requests to ensure that CloudFormation
-- successfully received them.
createChangeSet_clientToken :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Text)
createChangeSet_clientToken :: Lens' CreateChangeSet (Maybe Text)
createChangeSet_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateChangeSet' :: CreateChangeSet -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe Text
a -> CreateChangeSet
s {$sel:clientToken:CreateChangeSet' :: Maybe Text
clientToken = Maybe Text
a} :: CreateChangeSet)

-- | A description to help you identify this change set.
createChangeSet_description :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Text)
createChangeSet_description :: Lens' CreateChangeSet (Maybe Text)
createChangeSet_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe Text
description :: Maybe Text
$sel:description:CreateChangeSet' :: CreateChangeSet -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe Text
a -> CreateChangeSet
s {$sel:description:CreateChangeSet' :: Maybe Text
description = Maybe Text
a} :: CreateChangeSet)

-- | Creates a change set for the all nested stacks specified in the
-- template. The default behavior of this action is set to @False@. To
-- include nested sets in a change set, specify @True@.
createChangeSet_includeNestedStacks :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Bool)
createChangeSet_includeNestedStacks :: Lens' CreateChangeSet (Maybe Bool)
createChangeSet_includeNestedStacks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe Bool
includeNestedStacks :: Maybe Bool
$sel:includeNestedStacks:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
includeNestedStacks} -> Maybe Bool
includeNestedStacks) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe Bool
a -> CreateChangeSet
s {$sel:includeNestedStacks:CreateChangeSet' :: Maybe Bool
includeNestedStacks = Maybe Bool
a} :: CreateChangeSet)

-- | The Amazon Resource Names (ARNs) of Amazon Simple Notification Service
-- (Amazon SNS) topics that CloudFormation associates with the stack. To
-- remove all associated notification topics, specify an empty list.
createChangeSet_notificationARNs :: Lens.Lens' CreateChangeSet (Prelude.Maybe [Prelude.Text])
createChangeSet_notificationARNs :: Lens' CreateChangeSet (Maybe [Text])
createChangeSet_notificationARNs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe [Text]
notificationARNs :: Maybe [Text]
$sel:notificationARNs:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
notificationARNs} -> Maybe [Text]
notificationARNs) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe [Text]
a -> CreateChangeSet
s {$sel:notificationARNs:CreateChangeSet' :: Maybe [Text]
notificationARNs = Maybe [Text]
a} :: CreateChangeSet) 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 list of @Parameter@ structures that specify input parameters for the
-- change set. For more information, see the Parameter data type.
createChangeSet_parameters :: Lens.Lens' CreateChangeSet (Prelude.Maybe [Parameter])
createChangeSet_parameters :: Lens' CreateChangeSet (Maybe [Parameter])
createChangeSet_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:CreateChangeSet' :: CreateChangeSet -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe [Parameter]
a -> CreateChangeSet
s {$sel:parameters:CreateChangeSet' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: CreateChangeSet) 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 if
-- you execute this change set, such as @AWS::EC2::Instance@,
-- @AWS::EC2::*@, or @Custom::MyCustomInstance@.
--
-- If the list of resource types doesn\'t include a resource type that
-- you\'re updating, the stack update fails. By default, CloudFormation
-- grants permissions to all resource types. Identity and Access Management
-- (IAM) uses this parameter for condition keys in IAM policies for
-- CloudFormation. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html Controlling access with Identity and Access Management>
-- in the CloudFormation User Guide.
createChangeSet_resourceTypes :: Lens.Lens' CreateChangeSet (Prelude.Maybe [Prelude.Text])
createChangeSet_resourceTypes :: Lens' CreateChangeSet (Maybe [Text])
createChangeSet_resourceTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe [Text]
resourceTypes :: Maybe [Text]
$sel:resourceTypes:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
resourceTypes} -> Maybe [Text]
resourceTypes) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe [Text]
a -> CreateChangeSet
s {$sel:resourceTypes:CreateChangeSet' :: Maybe [Text]
resourceTypes = Maybe [Text]
a} :: CreateChangeSet) 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 resources to import into your stack.
createChangeSet_resourcesToImport :: Lens.Lens' CreateChangeSet (Prelude.Maybe [ResourceToImport])
createChangeSet_resourcesToImport :: Lens' CreateChangeSet (Maybe [ResourceToImport])
createChangeSet_resourcesToImport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe [ResourceToImport]
resourcesToImport :: Maybe [ResourceToImport]
$sel:resourcesToImport:CreateChangeSet' :: CreateChangeSet -> Maybe [ResourceToImport]
resourcesToImport} -> Maybe [ResourceToImport]
resourcesToImport) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe [ResourceToImport]
a -> CreateChangeSet
s {$sel:resourcesToImport:CreateChangeSet' :: Maybe [ResourceToImport]
resourcesToImport = Maybe [ResourceToImport]
a} :: CreateChangeSet) 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 when executing the change set.
-- CloudFormation uses the role\'s credentials to make calls on your
-- behalf. CloudFormation 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 permission.
--
-- 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 is generated from your user
-- credentials.
createChangeSet_roleARN :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Text)
createChangeSet_roleARN :: Lens' CreateChangeSet (Maybe Text)
createChangeSet_roleARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:CreateChangeSet' :: CreateChangeSet -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe Text
a -> CreateChangeSet
s {$sel:roleARN:CreateChangeSet' :: Maybe Text
roleARN = Maybe Text
a} :: CreateChangeSet)

-- | The rollback triggers for CloudFormation to monitor during stack
-- creation and updating operations, and for the specified monitoring
-- period afterwards.
createChangeSet_rollbackConfiguration :: Lens.Lens' CreateChangeSet (Prelude.Maybe RollbackConfiguration)
createChangeSet_rollbackConfiguration :: Lens' CreateChangeSet (Maybe RollbackConfiguration)
createChangeSet_rollbackConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe RollbackConfiguration
rollbackConfiguration :: Maybe RollbackConfiguration
$sel:rollbackConfiguration:CreateChangeSet' :: CreateChangeSet -> Maybe RollbackConfiguration
rollbackConfiguration} -> Maybe RollbackConfiguration
rollbackConfiguration) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe RollbackConfiguration
a -> CreateChangeSet
s {$sel:rollbackConfiguration:CreateChangeSet' :: Maybe RollbackConfiguration
rollbackConfiguration = Maybe RollbackConfiguration
a} :: CreateChangeSet)

-- | Key-value pairs to associate with this stack. CloudFormation also
-- propagates these tags to resources in the stack. You can specify a
-- maximum of 50 tags.
createChangeSet_tags :: Lens.Lens' CreateChangeSet (Prelude.Maybe [Tag])
createChangeSet_tags :: Lens' CreateChangeSet (Maybe [Tag])
createChangeSet_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateChangeSet' :: CreateChangeSet -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe [Tag]
a -> CreateChangeSet
s {$sel:tags:CreateChangeSet' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateChangeSet) 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 structure that contains the body of the revised template, with a
-- minimum length of 1 byte and a maximum length of 51,200 bytes.
-- CloudFormation generates the change set by comparing this template with
-- the template of the stack that you specified.
--
-- Conditional: You must specify only @TemplateBody@ or @TemplateURL@.
createChangeSet_templateBody :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Text)
createChangeSet_templateBody :: Lens' CreateChangeSet (Maybe Text)
createChangeSet_templateBody = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe Text
templateBody :: Maybe Text
$sel:templateBody:CreateChangeSet' :: CreateChangeSet -> Maybe Text
templateBody} -> Maybe Text
templateBody) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe Text
a -> CreateChangeSet
s {$sel:templateBody:CreateChangeSet' :: Maybe Text
templateBody = Maybe Text
a} :: CreateChangeSet)

-- | The location of the file that contains the revised template. 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. CloudFormation generates
-- the change set by comparing this template with the stack that you
-- specified.
--
-- Conditional: You must specify only @TemplateBody@ or @TemplateURL@.
createChangeSet_templateURL :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Text)
createChangeSet_templateURL :: Lens' CreateChangeSet (Maybe Text)
createChangeSet_templateURL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe Text
templateURL :: Maybe Text
$sel:templateURL:CreateChangeSet' :: CreateChangeSet -> Maybe Text
templateURL} -> Maybe Text
templateURL) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe Text
a -> CreateChangeSet
s {$sel:templateURL:CreateChangeSet' :: Maybe Text
templateURL = Maybe Text
a} :: CreateChangeSet)

-- | Whether to reuse the template that\'s associated with the stack to
-- create the change set.
createChangeSet_usePreviousTemplate :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Bool)
createChangeSet_usePreviousTemplate :: Lens' CreateChangeSet (Maybe Bool)
createChangeSet_usePreviousTemplate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Maybe Bool
usePreviousTemplate :: Maybe Bool
$sel:usePreviousTemplate:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
usePreviousTemplate} -> Maybe Bool
usePreviousTemplate) (\s :: CreateChangeSet
s@CreateChangeSet' {} Maybe Bool
a -> CreateChangeSet
s {$sel:usePreviousTemplate:CreateChangeSet' :: Maybe Bool
usePreviousTemplate = Maybe Bool
a} :: CreateChangeSet)

-- | The name or the unique ID of the stack for which you are creating a
-- change set. CloudFormation generates the change set by comparing this
-- stack\'s information with the information that you submit, such as a
-- modified template or different parameter input values.
createChangeSet_stackName :: Lens.Lens' CreateChangeSet Prelude.Text
createChangeSet_stackName :: Lens' CreateChangeSet Text
createChangeSet_stackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Text
stackName :: Text
$sel:stackName:CreateChangeSet' :: CreateChangeSet -> Text
stackName} -> Text
stackName) (\s :: CreateChangeSet
s@CreateChangeSet' {} Text
a -> CreateChangeSet
s {$sel:stackName:CreateChangeSet' :: Text
stackName = Text
a} :: CreateChangeSet)

-- | The name of the change set. The name must be unique among all change
-- sets that are associated with the specified stack.
--
-- A change set name can contain only alphanumeric, case sensitive
-- characters, and hyphens. It must start with an alphabetical character
-- and can\'t exceed 128 characters.
createChangeSet_changeSetName :: Lens.Lens' CreateChangeSet Prelude.Text
createChangeSet_changeSetName :: Lens' CreateChangeSet Text
createChangeSet_changeSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSet' {Text
changeSetName :: Text
$sel:changeSetName:CreateChangeSet' :: CreateChangeSet -> Text
changeSetName} -> Text
changeSetName) (\s :: CreateChangeSet
s@CreateChangeSet' {} Text
a -> CreateChangeSet
s {$sel:changeSetName:CreateChangeSet' :: Text
changeSetName = Text
a} :: CreateChangeSet)

instance Core.AWSRequest CreateChangeSet where
  type
    AWSResponse CreateChangeSet =
      CreateChangeSetResponse
  request :: (Service -> Service) -> CreateChangeSet -> Request CreateChangeSet
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 CreateChangeSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateChangeSet)))
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
"CreateChangeSetResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Maybe Text -> Int -> CreateChangeSetResponse
CreateChangeSetResponse'
            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
"Id")
            forall (f :: * -> *) a b. Applicative f => 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 CreateChangeSet where
  hashWithSalt :: Int -> CreateChangeSet -> Int
hashWithSalt Int
_salt CreateChangeSet' {Maybe Bool
Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [ResourceToImport]
Maybe [Tag]
Maybe Text
Maybe ChangeSetType
Maybe RollbackConfiguration
Text
changeSetName :: Text
stackName :: Text
usePreviousTemplate :: Maybe Bool
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
rollbackConfiguration :: Maybe RollbackConfiguration
roleARN :: Maybe Text
resourcesToImport :: Maybe [ResourceToImport]
resourceTypes :: Maybe [Text]
parameters :: Maybe [Parameter]
notificationARNs :: Maybe [Text]
includeNestedStacks :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
changeSetType :: Maybe ChangeSetType
capabilities :: Maybe [Capability]
$sel:changeSetName:CreateChangeSet' :: CreateChangeSet -> Text
$sel:stackName:CreateChangeSet' :: CreateChangeSet -> Text
$sel:usePreviousTemplate:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
$sel:templateURL:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:templateBody:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:tags:CreateChangeSet' :: CreateChangeSet -> Maybe [Tag]
$sel:rollbackConfiguration:CreateChangeSet' :: CreateChangeSet -> Maybe RollbackConfiguration
$sel:roleARN:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:resourcesToImport:CreateChangeSet' :: CreateChangeSet -> Maybe [ResourceToImport]
$sel:resourceTypes:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
$sel:parameters:CreateChangeSet' :: CreateChangeSet -> Maybe [Parameter]
$sel:notificationARNs:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
$sel:includeNestedStacks:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
$sel:description:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:clientToken:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:changeSetType:CreateChangeSet' :: CreateChangeSet -> Maybe ChangeSetType
$sel:capabilities:CreateChangeSet' :: CreateChangeSet -> 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 ChangeSetType
changeSetType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeNestedStacks
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
notificationARNs
      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 [ResourceToImport]
resourcesToImport
      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 [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 Bool
usePreviousTemplate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
changeSetName

instance Prelude.NFData CreateChangeSet where
  rnf :: CreateChangeSet -> ()
rnf CreateChangeSet' {Maybe Bool
Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [ResourceToImport]
Maybe [Tag]
Maybe Text
Maybe ChangeSetType
Maybe RollbackConfiguration
Text
changeSetName :: Text
stackName :: Text
usePreviousTemplate :: Maybe Bool
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
rollbackConfiguration :: Maybe RollbackConfiguration
roleARN :: Maybe Text
resourcesToImport :: Maybe [ResourceToImport]
resourceTypes :: Maybe [Text]
parameters :: Maybe [Parameter]
notificationARNs :: Maybe [Text]
includeNestedStacks :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
changeSetType :: Maybe ChangeSetType
capabilities :: Maybe [Capability]
$sel:changeSetName:CreateChangeSet' :: CreateChangeSet -> Text
$sel:stackName:CreateChangeSet' :: CreateChangeSet -> Text
$sel:usePreviousTemplate:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
$sel:templateURL:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:templateBody:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:tags:CreateChangeSet' :: CreateChangeSet -> Maybe [Tag]
$sel:rollbackConfiguration:CreateChangeSet' :: CreateChangeSet -> Maybe RollbackConfiguration
$sel:roleARN:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:resourcesToImport:CreateChangeSet' :: CreateChangeSet -> Maybe [ResourceToImport]
$sel:resourceTypes:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
$sel:parameters:CreateChangeSet' :: CreateChangeSet -> Maybe [Parameter]
$sel:notificationARNs:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
$sel:includeNestedStacks:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
$sel:description:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:clientToken:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:changeSetType:CreateChangeSet' :: CreateChangeSet -> Maybe ChangeSetType
$sel:capabilities:CreateChangeSet' :: CreateChangeSet -> 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 ChangeSetType
changeSetType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeNestedStacks
      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 [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 [ResourceToImport]
resourcesToImport
      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 [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 Bool
usePreviousTemplate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
changeSetName

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

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

instance Data.ToQuery CreateChangeSet where
  toQuery :: CreateChangeSet -> QueryString
toQuery CreateChangeSet' {Maybe Bool
Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [ResourceToImport]
Maybe [Tag]
Maybe Text
Maybe ChangeSetType
Maybe RollbackConfiguration
Text
changeSetName :: Text
stackName :: Text
usePreviousTemplate :: Maybe Bool
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
rollbackConfiguration :: Maybe RollbackConfiguration
roleARN :: Maybe Text
resourcesToImport :: Maybe [ResourceToImport]
resourceTypes :: Maybe [Text]
parameters :: Maybe [Parameter]
notificationARNs :: Maybe [Text]
includeNestedStacks :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
changeSetType :: Maybe ChangeSetType
capabilities :: Maybe [Capability]
$sel:changeSetName:CreateChangeSet' :: CreateChangeSet -> Text
$sel:stackName:CreateChangeSet' :: CreateChangeSet -> Text
$sel:usePreviousTemplate:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
$sel:templateURL:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:templateBody:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:tags:CreateChangeSet' :: CreateChangeSet -> Maybe [Tag]
$sel:rollbackConfiguration:CreateChangeSet' :: CreateChangeSet -> Maybe RollbackConfiguration
$sel:roleARN:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:resourcesToImport:CreateChangeSet' :: CreateChangeSet -> Maybe [ResourceToImport]
$sel:resourceTypes:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
$sel:parameters:CreateChangeSet' :: CreateChangeSet -> Maybe [Parameter]
$sel:notificationARNs:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
$sel:includeNestedStacks:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
$sel:description:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:clientToken:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:changeSetType:CreateChangeSet' :: CreateChangeSet -> Maybe ChangeSetType
$sel:capabilities:CreateChangeSet' :: CreateChangeSet -> Maybe [Capability]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateChangeSet" :: 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
"ChangeSetType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ChangeSetType
changeSetType,
        ByteString
"ClientToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientToken,
        ByteString
"Description" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
description,
        ByteString
"IncludeNestedStacks" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
includeNestedStacks,
        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
"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
"ResourcesToImport"
          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 [ResourceToImport]
resourcesToImport
            ),
        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
"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
"UsePreviousTemplate" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
usePreviousTemplate,
        ByteString
"StackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
stackName,
        ByteString
"ChangeSetName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
changeSetName
      ]

-- | The output for the CreateChangeSet action.
--
-- /See:/ 'newCreateChangeSetResponse' smart constructor.
data CreateChangeSetResponse = CreateChangeSetResponse'
  { -- | The Amazon Resource Name (ARN) of the change set.
    CreateChangeSetResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The unique ID of the stack.
    CreateChangeSetResponse -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateChangeSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateChangeSetResponse -> CreateChangeSetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateChangeSetResponse -> CreateChangeSetResponse -> Bool
$c/= :: CreateChangeSetResponse -> CreateChangeSetResponse -> Bool
== :: CreateChangeSetResponse -> CreateChangeSetResponse -> Bool
$c== :: CreateChangeSetResponse -> CreateChangeSetResponse -> Bool
Prelude.Eq, ReadPrec [CreateChangeSetResponse]
ReadPrec CreateChangeSetResponse
Int -> ReadS CreateChangeSetResponse
ReadS [CreateChangeSetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateChangeSetResponse]
$creadListPrec :: ReadPrec [CreateChangeSetResponse]
readPrec :: ReadPrec CreateChangeSetResponse
$creadPrec :: ReadPrec CreateChangeSetResponse
readList :: ReadS [CreateChangeSetResponse]
$creadList :: ReadS [CreateChangeSetResponse]
readsPrec :: Int -> ReadS CreateChangeSetResponse
$creadsPrec :: Int -> ReadS CreateChangeSetResponse
Prelude.Read, Int -> CreateChangeSetResponse -> ShowS
[CreateChangeSetResponse] -> ShowS
CreateChangeSetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateChangeSetResponse] -> ShowS
$cshowList :: [CreateChangeSetResponse] -> ShowS
show :: CreateChangeSetResponse -> String
$cshow :: CreateChangeSetResponse -> String
showsPrec :: Int -> CreateChangeSetResponse -> ShowS
$cshowsPrec :: Int -> CreateChangeSetResponse -> ShowS
Prelude.Show, forall x. Rep CreateChangeSetResponse x -> CreateChangeSetResponse
forall x. CreateChangeSetResponse -> Rep CreateChangeSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateChangeSetResponse x -> CreateChangeSetResponse
$cfrom :: forall x. CreateChangeSetResponse -> Rep CreateChangeSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateChangeSetResponse' 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:
--
-- 'id', 'createChangeSetResponse_id' - The Amazon Resource Name (ARN) of the change set.
--
-- 'stackId', 'createChangeSetResponse_stackId' - The unique ID of the stack.
--
-- 'httpStatus', 'createChangeSetResponse_httpStatus' - The response's http status code.
newCreateChangeSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateChangeSetResponse
newCreateChangeSetResponse :: Int -> CreateChangeSetResponse
newCreateChangeSetResponse Int
pHttpStatus_ =
  CreateChangeSetResponse'
    { $sel:id:CreateChangeSetResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:CreateChangeSetResponse' :: Maybe Text
stackId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateChangeSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the change set.
createChangeSetResponse_id :: Lens.Lens' CreateChangeSetResponse (Prelude.Maybe Prelude.Text)
createChangeSetResponse_id :: Lens' CreateChangeSetResponse (Maybe Text)
createChangeSetResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSetResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateChangeSetResponse' :: CreateChangeSetResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateChangeSetResponse
s@CreateChangeSetResponse' {} Maybe Text
a -> CreateChangeSetResponse
s {$sel:id:CreateChangeSetResponse' :: Maybe Text
id = Maybe Text
a} :: CreateChangeSetResponse)

-- | The unique ID of the stack.
createChangeSetResponse_stackId :: Lens.Lens' CreateChangeSetResponse (Prelude.Maybe Prelude.Text)
createChangeSetResponse_stackId :: Lens' CreateChangeSetResponse (Maybe Text)
createChangeSetResponse_stackId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSetResponse' {Maybe Text
stackId :: Maybe Text
$sel:stackId:CreateChangeSetResponse' :: CreateChangeSetResponse -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: CreateChangeSetResponse
s@CreateChangeSetResponse' {} Maybe Text
a -> CreateChangeSetResponse
s {$sel:stackId:CreateChangeSetResponse' :: Maybe Text
stackId = Maybe Text
a} :: CreateChangeSetResponse)

-- | The response's http status code.
createChangeSetResponse_httpStatus :: Lens.Lens' CreateChangeSetResponse Prelude.Int
createChangeSetResponse_httpStatus :: Lens' CreateChangeSetResponse Int
createChangeSetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateChangeSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateChangeSetResponse' :: CreateChangeSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateChangeSetResponse
s@CreateChangeSetResponse' {} Int
a -> CreateChangeSetResponse
s {$sel:httpStatus:CreateChangeSetResponse' :: Int
httpStatus = Int
a} :: CreateChangeSetResponse)

instance Prelude.NFData CreateChangeSetResponse where
  rnf :: CreateChangeSetResponse -> ()
rnf CreateChangeSetResponse' {Int
Maybe Text
httpStatus :: Int
stackId :: Maybe Text
id :: Maybe Text
$sel:httpStatus:CreateChangeSetResponse' :: CreateChangeSetResponse -> Int
$sel:stackId:CreateChangeSetResponse' :: CreateChangeSetResponse -> Maybe Text
$sel:id:CreateChangeSetResponse' :: CreateChangeSetResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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