{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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 hierachy, set
-- @IncludeNestedStacks@ to @True@.
module Amazonka.CloudFormation.CreateChangeSet
  ( -- * Creating a Request
    CreateChangeSet (..),
    newCreateChangeSet,

    -- * Request Lenses
    createChangeSet_changeSetType,
    createChangeSet_usePreviousTemplate,
    createChangeSet_clientToken,
    createChangeSet_notificationARNs,
    createChangeSet_includeNestedStacks,
    createChangeSet_resourcesToImport,
    createChangeSet_parameters,
    createChangeSet_templateBody,
    createChangeSet_templateURL,
    createChangeSet_description,
    createChangeSet_capabilities,
    createChangeSet_rollbackConfiguration,
    createChangeSet_resourceTypes,
    createChangeSet_tags,
    createChangeSet_roleARN,
    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.Lens as Lens
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'
  { -- | 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,
    -- | Whether to reuse the template that is associated with the stack to
    -- create the change set.
    CreateChangeSet -> Maybe Bool
usePreviousTemplate :: Prelude.Maybe Prelude.Bool,
    -- | 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,
    -- | 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],
    -- | 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 resources to import into your stack.
    CreateChangeSet -> Maybe [ResourceToImport]
resourcesToImport :: Prelude.Maybe [ResourceToImport],
    -- | 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],
    -- | 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 is located in an
    -- 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,
    -- | A description to help you identify this change set.
    CreateChangeSet -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | 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.
    --
    --     This capacity does not 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 on 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 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,
    -- | 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],
    -- | 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],
    -- | 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. As long as 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 is generated from your user
    -- credentials.
    CreateChangeSet -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | 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 alphabetic character and
    -- cannot exceed 128 characters.
    CreateChangeSet -> Text
changeSetName :: Prelude.Text
  }
  deriving (CreateChangeSet -> CreateChangeSet -> Bool
(CreateChangeSet -> CreateChangeSet -> Bool)
-> (CreateChangeSet -> CreateChangeSet -> Bool)
-> Eq CreateChangeSet
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]
(Int -> ReadS CreateChangeSet)
-> ReadS [CreateChangeSet]
-> ReadPrec CreateChangeSet
-> ReadPrec [CreateChangeSet]
-> Read 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
(Int -> CreateChangeSet -> ShowS)
-> (CreateChangeSet -> String)
-> ([CreateChangeSet] -> ShowS)
-> Show CreateChangeSet
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. CreateChangeSet -> Rep CreateChangeSet x)
-> (forall x. Rep CreateChangeSet x -> CreateChangeSet)
-> Generic CreateChangeSet
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:
--
-- '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.
--
-- 'usePreviousTemplate', 'createChangeSet_usePreviousTemplate' - Whether to reuse the template that is associated with the stack to
-- create the change set.
--
-- '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.
--
-- '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.
--
-- '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@.
--
-- 'resourcesToImport', 'createChangeSet_resourcesToImport' - The resources to import into your stack.
--
-- 'parameters', 'createChangeSet_parameters' - A list of @Parameter@ structures that specify input parameters for the
-- change set. For more information, see the Parameter data type.
--
-- '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 is located in an
-- 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@.
--
-- 'description', 'createChangeSet_description' - A description to help you identify this change set.
--
-- '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 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.
--
--     This capacity does not 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 on macros, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation Macros to Perform Custom Processing on Templates>.
--
-- 'rollbackConfiguration', 'createChangeSet_rollbackConfiguration' - The rollback triggers for CloudFormation to monitor during stack
-- creation and updating operations, and for the specified monitoring
-- period afterwards.
--
-- '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.
--
-- '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.
--
-- '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. As long as 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 is generated from your user
-- credentials.
--
-- '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 alphabetic character and
-- cannot exceed 128 characters.
newCreateChangeSet ::
  -- | 'stackName'
  Prelude.Text ->
  -- | 'changeSetName'
  Prelude.Text ->
  CreateChangeSet
newCreateChangeSet :: Text -> Text -> CreateChangeSet
newCreateChangeSet Text
pStackName_ Text
pChangeSetName_ =
  CreateChangeSet' :: Maybe ChangeSetType
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe [ResourceToImport]
-> Maybe [Parameter]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Capability]
-> Maybe RollbackConfiguration
-> Maybe [Text]
-> Maybe [Tag]
-> Maybe Text
-> Text
-> Text
-> CreateChangeSet
CreateChangeSet'
    { $sel:changeSetType:CreateChangeSet' :: Maybe ChangeSetType
changeSetType = Maybe ChangeSetType
forall a. Maybe a
Prelude.Nothing,
      $sel:usePreviousTemplate:CreateChangeSet' :: Maybe Bool
usePreviousTemplate = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:CreateChangeSet' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationARNs:CreateChangeSet' :: Maybe [Text]
notificationARNs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:includeNestedStacks:CreateChangeSet' :: Maybe Bool
includeNestedStacks = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:resourcesToImport:CreateChangeSet' :: Maybe [ResourceToImport]
resourcesToImport = Maybe [ResourceToImport]
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:CreateChangeSet' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:CreateChangeSet' :: Maybe Text
templateBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateURL:CreateChangeSet' :: Maybe Text
templateURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateChangeSet' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:capabilities:CreateChangeSet' :: Maybe [Capability]
capabilities = Maybe [Capability]
forall a. Maybe a
Prelude.Nothing,
      $sel:rollbackConfiguration:CreateChangeSet' :: Maybe RollbackConfiguration
rollbackConfiguration = Maybe RollbackConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceTypes:CreateChangeSet' :: Maybe [Text]
resourceTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateChangeSet' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:CreateChangeSet' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:CreateChangeSet' :: Text
stackName = Text
pStackName_,
      $sel:changeSetName:CreateChangeSet' :: Text
changeSetName = Text
pChangeSetName_
    }

-- | 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 :: (Maybe ChangeSetType -> f (Maybe ChangeSetType))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_changeSetType = (CreateChangeSet -> Maybe ChangeSetType)
-> (CreateChangeSet -> Maybe ChangeSetType -> CreateChangeSet)
-> Lens
     CreateChangeSet
     CreateChangeSet
     (Maybe ChangeSetType)
     (Maybe 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)

-- | Whether to reuse the template that is associated with the stack to
-- create the change set.
createChangeSet_usePreviousTemplate :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Bool)
createChangeSet_usePreviousTemplate :: (Maybe Bool -> f (Maybe Bool))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_usePreviousTemplate = (CreateChangeSet -> Maybe Bool)
-> (CreateChangeSet -> Maybe Bool -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_clientToken = (CreateChangeSet -> Maybe Text)
-> (CreateChangeSet -> Maybe Text -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_notificationARNs = (CreateChangeSet -> Maybe [Text])
-> (CreateChangeSet -> Maybe [Text] -> CreateChangeSet)
-> Lens
     CreateChangeSet CreateChangeSet (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateChangeSet -> f CreateChangeSet)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateChangeSet
-> f CreateChangeSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_includeNestedStacks = (CreateChangeSet -> Maybe Bool)
-> (CreateChangeSet -> Maybe Bool -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet (Maybe Bool) (Maybe Bool)
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 resources to import into your stack.
createChangeSet_resourcesToImport :: Lens.Lens' CreateChangeSet (Prelude.Maybe [ResourceToImport])
createChangeSet_resourcesToImport :: (Maybe [ResourceToImport] -> f (Maybe [ResourceToImport]))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_resourcesToImport = (CreateChangeSet -> Maybe [ResourceToImport])
-> (CreateChangeSet -> Maybe [ResourceToImport] -> CreateChangeSet)
-> Lens
     CreateChangeSet
     CreateChangeSet
     (Maybe [ResourceToImport])
     (Maybe [ResourceToImport])
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) ((Maybe [ResourceToImport] -> f (Maybe [ResourceToImport]))
 -> CreateChangeSet -> f CreateChangeSet)
-> ((Maybe [ResourceToImport] -> f (Maybe [ResourceToImport]))
    -> Maybe [ResourceToImport] -> f (Maybe [ResourceToImport]))
-> (Maybe [ResourceToImport] -> f (Maybe [ResourceToImport]))
-> CreateChangeSet
-> f CreateChangeSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResourceToImport]
  [ResourceToImport]
  [ResourceToImport]
  [ResourceToImport]
-> Iso
     (Maybe [ResourceToImport])
     (Maybe [ResourceToImport])
     (Maybe [ResourceToImport])
     (Maybe [ResourceToImport])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [ResourceToImport]
  [ResourceToImport]
  [ResourceToImport]
  [ResourceToImport]
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 :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_parameters = (CreateChangeSet -> Maybe [Parameter])
-> (CreateChangeSet -> Maybe [Parameter] -> CreateChangeSet)
-> Lens
     CreateChangeSet
     CreateChangeSet
     (Maybe [Parameter])
     (Maybe [Parameter])
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) ((Maybe [Parameter] -> f (Maybe [Parameter]))
 -> CreateChangeSet -> f CreateChangeSet)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> CreateChangeSet
-> f CreateChangeSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Parameter] [Parameter] [Parameter] [Parameter]
-> Iso
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Parameter] [Parameter] [Parameter] [Parameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_templateBody = (CreateChangeSet -> Maybe Text)
-> (CreateChangeSet -> Maybe Text -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet (Maybe Text) (Maybe Text)
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 is located in an
-- 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 :: (Maybe Text -> f (Maybe Text))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_templateURL = (CreateChangeSet -> Maybe Text)
-> (CreateChangeSet -> Maybe Text -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet (Maybe Text) (Maybe Text)
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)

-- | A description to help you identify this change set.
createChangeSet_description :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Text)
createChangeSet_description :: (Maybe Text -> f (Maybe Text))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_description = (CreateChangeSet -> Maybe Text)
-> (CreateChangeSet -> Maybe Text -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet (Maybe Text) (Maybe Text)
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)

-- | 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.
--
--     This capacity does not 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 on 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 :: (Maybe [Capability] -> f (Maybe [Capability]))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_capabilities = (CreateChangeSet -> Maybe [Capability])
-> (CreateChangeSet -> Maybe [Capability] -> CreateChangeSet)
-> Lens
     CreateChangeSet
     CreateChangeSet
     (Maybe [Capability])
     (Maybe [Capability])
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) ((Maybe [Capability] -> f (Maybe [Capability]))
 -> CreateChangeSet -> f CreateChangeSet)
-> ((Maybe [Capability] -> f (Maybe [Capability]))
    -> Maybe [Capability] -> f (Maybe [Capability]))
-> (Maybe [Capability] -> f (Maybe [Capability]))
-> CreateChangeSet
-> f CreateChangeSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Capability] [Capability] [Capability] [Capability]
-> Iso
     (Maybe [Capability])
     (Maybe [Capability])
     (Maybe [Capability])
     (Maybe [Capability])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Capability] [Capability] [Capability] [Capability]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe RollbackConfiguration -> f (Maybe RollbackConfiguration))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_rollbackConfiguration = (CreateChangeSet -> Maybe RollbackConfiguration)
-> (CreateChangeSet
    -> Maybe RollbackConfiguration -> CreateChangeSet)
-> Lens
     CreateChangeSet
     CreateChangeSet
     (Maybe RollbackConfiguration)
     (Maybe 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)

-- | 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 :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_resourceTypes = (CreateChangeSet -> Maybe [Text])
-> (CreateChangeSet -> Maybe [Text] -> CreateChangeSet)
-> Lens
     CreateChangeSet CreateChangeSet (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateChangeSet -> f CreateChangeSet)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateChangeSet
-> f CreateChangeSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_tags = (CreateChangeSet -> Maybe [Tag])
-> (CreateChangeSet -> Maybe [Tag] -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet (Maybe [Tag]) (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateChangeSet -> f CreateChangeSet)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateChangeSet
-> f CreateChangeSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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. As long as 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 is generated from your user
-- credentials.
createChangeSet_roleARN :: Lens.Lens' CreateChangeSet (Prelude.Maybe Prelude.Text)
createChangeSet_roleARN :: (Maybe Text -> f (Maybe Text))
-> CreateChangeSet -> f CreateChangeSet
createChangeSet_roleARN = (CreateChangeSet -> Maybe Text)
-> (CreateChangeSet -> Maybe Text -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet (Maybe Text) (Maybe Text)
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 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 :: (Text -> f Text) -> CreateChangeSet -> f CreateChangeSet
createChangeSet_stackName = (CreateChangeSet -> Text)
-> (CreateChangeSet -> Text -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet Text Text
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 alphabetic character and
-- cannot exceed 128 characters.
createChangeSet_changeSetName :: Lens.Lens' CreateChangeSet Prelude.Text
createChangeSet_changeSetName :: (Text -> f Text) -> CreateChangeSet -> f CreateChangeSet
createChangeSet_changeSetName = (CreateChangeSet -> Text)
-> (CreateChangeSet -> Text -> CreateChangeSet)
-> Lens CreateChangeSet CreateChangeSet Text Text
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 :: CreateChangeSet -> Request CreateChangeSet
request = Service -> CreateChangeSet -> Request CreateChangeSet
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateChangeSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateChangeSet)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateChangeSet))
-> Logger
-> Service
-> Proxy CreateChangeSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateChangeSet)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateChangeSetResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Maybe Text -> Int -> CreateChangeSetResponse
CreateChangeSetResponse'
            (Maybe Text -> Maybe Text -> Int -> CreateChangeSetResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateChangeSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Id")
            Either String (Maybe Text -> Int -> CreateChangeSetResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateChangeSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StackId")
            Either String (Int -> CreateChangeSetResponse)
-> Either String Int -> Either String CreateChangeSetResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateChangeSet

instance Prelude.NFData CreateChangeSet

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

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

instance Core.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
roleARN :: Maybe Text
tags :: Maybe [Tag]
resourceTypes :: Maybe [Text]
rollbackConfiguration :: Maybe RollbackConfiguration
capabilities :: Maybe [Capability]
description :: Maybe Text
templateURL :: Maybe Text
templateBody :: Maybe Text
parameters :: Maybe [Parameter]
resourcesToImport :: Maybe [ResourceToImport]
includeNestedStacks :: Maybe Bool
notificationARNs :: Maybe [Text]
clientToken :: Maybe Text
usePreviousTemplate :: Maybe Bool
changeSetType :: Maybe ChangeSetType
$sel:changeSetName:CreateChangeSet' :: CreateChangeSet -> Text
$sel:stackName:CreateChangeSet' :: CreateChangeSet -> Text
$sel:roleARN:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:tags:CreateChangeSet' :: CreateChangeSet -> Maybe [Tag]
$sel:resourceTypes:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
$sel:rollbackConfiguration:CreateChangeSet' :: CreateChangeSet -> Maybe RollbackConfiguration
$sel:capabilities:CreateChangeSet' :: CreateChangeSet -> Maybe [Capability]
$sel:description:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:templateURL:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:templateBody:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:parameters:CreateChangeSet' :: CreateChangeSet -> Maybe [Parameter]
$sel:resourcesToImport:CreateChangeSet' :: CreateChangeSet -> Maybe [ResourceToImport]
$sel:includeNestedStacks:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
$sel:notificationARNs:CreateChangeSet' :: CreateChangeSet -> Maybe [Text]
$sel:clientToken:CreateChangeSet' :: CreateChangeSet -> Maybe Text
$sel:usePreviousTemplate:CreateChangeSet' :: CreateChangeSet -> Maybe Bool
$sel:changeSetType:CreateChangeSet' :: CreateChangeSet -> Maybe ChangeSetType
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateChangeSet" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"ChangeSetType" ByteString -> Maybe ChangeSetType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ChangeSetType
changeSetType,
        ByteString
"UsePreviousTemplate" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
usePreviousTemplate,
        ByteString
"ClientToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clientToken,
        ByteString
"NotificationARNs"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
notificationARNs
            ),
        ByteString
"IncludeNestedStacks" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
includeNestedStacks,
        ByteString
"ResourcesToImport"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [ResourceToImport] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([ResourceToImport] -> QueryString)
-> Maybe [ResourceToImport] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceToImport]
resourcesToImport
            ),
        ByteString
"Parameters"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Parameter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Parameter] -> QueryString)
-> Maybe [Parameter] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Parameter]
parameters),
        ByteString
"TemplateBody" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateBody,
        ByteString
"TemplateURL" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateURL,
        ByteString
"Description" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
description,
        ByteString
"Capabilities"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Capability] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Capability] -> QueryString)
-> Maybe [Capability] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Capability]
capabilities),
        ByteString
"RollbackConfiguration"
          ByteString -> Maybe RollbackConfiguration -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe RollbackConfiguration
rollbackConfiguration,
        ByteString
"ResourceTypes"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourceTypes
            ),
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"RoleARN" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
roleARN,
        ByteString
"StackName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackName,
        ByteString
"ChangeSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: 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
(CreateChangeSetResponse -> CreateChangeSetResponse -> Bool)
-> (CreateChangeSetResponse -> CreateChangeSetResponse -> Bool)
-> Eq CreateChangeSetResponse
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]
(Int -> ReadS CreateChangeSetResponse)
-> ReadS [CreateChangeSetResponse]
-> ReadPrec CreateChangeSetResponse
-> ReadPrec [CreateChangeSetResponse]
-> Read 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
(Int -> CreateChangeSetResponse -> ShowS)
-> (CreateChangeSetResponse -> String)
-> ([CreateChangeSetResponse] -> ShowS)
-> Show CreateChangeSetResponse
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.
 CreateChangeSetResponse -> Rep CreateChangeSetResponse x)
-> (forall x.
    Rep CreateChangeSetResponse x -> CreateChangeSetResponse)
-> Generic CreateChangeSetResponse
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' :: Maybe Text -> Maybe Text -> Int -> CreateChangeSetResponse
CreateChangeSetResponse'
    { $sel:id:CreateChangeSetResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:CreateChangeSetResponse' :: Maybe Text
stackId = Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> CreateChangeSetResponse -> f CreateChangeSetResponse
createChangeSetResponse_id = (CreateChangeSetResponse -> Maybe Text)
-> (CreateChangeSetResponse
    -> Maybe Text -> CreateChangeSetResponse)
-> Lens
     CreateChangeSetResponse
     CreateChangeSetResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> CreateChangeSetResponse -> f CreateChangeSetResponse
createChangeSetResponse_stackId = (CreateChangeSetResponse -> Maybe Text)
-> (CreateChangeSetResponse
    -> Maybe Text -> CreateChangeSetResponse)
-> Lens
     CreateChangeSetResponse
     CreateChangeSetResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Int -> f Int)
-> CreateChangeSetResponse -> f CreateChangeSetResponse
createChangeSetResponse_httpStatus = (CreateChangeSetResponse -> Int)
-> (CreateChangeSetResponse -> Int -> CreateChangeSetResponse)
-> Lens CreateChangeSetResponse CreateChangeSetResponse Int Int
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