{-# 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.UpdateStack
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a stack as specified in the template. After the call completes
-- successfully, the stack update starts. You can check the status of the
-- stack through the DescribeStacks action.
--
-- To get a copy of the template for an existing stack, you can use the
-- GetTemplate action.
--
-- For more information about creating an update template, updating a
-- stack, and monitoring the progress of the update, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html Updating a Stack>.
module Amazonka.CloudFormation.UpdateStack
  ( -- * Creating a Request
    UpdateStack (..),
    newUpdateStack,

    -- * Request Lenses
    updateStack_capabilities,
    updateStack_clientRequestToken,
    updateStack_disableRollback,
    updateStack_notificationARNs,
    updateStack_parameters,
    updateStack_resourceTypes,
    updateStack_roleARN,
    updateStack_rollbackConfiguration,
    updateStack_stackPolicyBody,
    updateStack_stackPolicyDuringUpdateBody,
    updateStack_stackPolicyDuringUpdateURL,
    updateStack_stackPolicyURL,
    updateStack_tags,
    updateStack_templateBody,
    updateStack_templateURL,
    updateStack_usePreviousTemplate,
    updateStack_stackName,

    -- * Destructuring the Response
    UpdateStackResponse (..),
    newUpdateStackResponse,

    -- * Response Lenses
    updateStackResponse_stackId,
    updateStackResponse_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 an UpdateStack action.
--
-- /See:/ 'newUpdateStack' smart constructor.
data UpdateStack = UpdateStack'
  { -- | In some cases, you must explicitly acknowledge that your stack template
    -- contains certain capabilities in order for CloudFormation to update 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 updating the stack. If
    --     your stack template contains one or more macros, and you choose to
    --     update a stack directly from the processed template, without first
    --     reviewing the resulting changes in a change set, you must
    --     acknowledge this capability. This includes the
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html AWS::Include>
    --     and
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html AWS::Serverless>
    --     transforms, which are macros hosted by CloudFormation.
    --
    --     If you want to update a stack from a stack template that contains
    --     macros /and/ nested stacks, you must update the stack directly from
    --     the template using this capability.
    --
    --     You should only update stacks directly from a stack template that
    --     contains macros if you know what processing the macro performs.
    --
    --     Each macro relies on an underlying Lambda service function for
    --     processing stack templates. Be aware that the Lambda function owner
    --     can update the function operation without CloudFormation being
    --     notified.
    --
    --     For more information, see
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation Macros to Perform Custom Processing on Templates>.
    UpdateStack -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability],
    -- | A unique identifier for this @UpdateStack@ request. Specify this token
    -- if you plan to retry requests so that CloudFormation knows that you\'re
    -- not attempting to update a stack with the same name. You might retry
    -- @UpdateStack@ requests to ensure that CloudFormation successfully
    -- received them.
    --
    -- All events triggered by a given stack operation are assigned the same
    -- client request token, which you can use to track operations. For
    -- example, if you execute a @CreateStack@ operation with the token
    -- @token1@, then all the @StackEvents@ generated by that operation will
    -- have @ClientRequestToken@ set as @token1@.
    --
    -- In the console, stack operations display the client request token on the
    -- Events tab. Stack operations that are initiated from the console use the
    -- token format /Console-StackOperation-ID/, which helps you easily
    -- identify the stack operation . For example, if you create a stack using
    -- the console, each stack event would be assigned the same token in the
    -- following format:
    -- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@.
    UpdateStack -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Preserve the state of previously provisioned resources when an operation
    -- fails.
    --
    -- Default: @False@
    UpdateStack -> Maybe Bool
disableRollback :: Prelude.Maybe Prelude.Bool,
    -- | Amazon Simple Notification Service topic Amazon Resource Names (ARNs)
    -- that CloudFormation associates with the stack. Specify an empty list to
    -- remove all notification topics.
    UpdateStack -> Maybe [Text]
notificationARNs :: Prelude.Maybe [Prelude.Text],
    -- | A list of @Parameter@ structures that specify input parameters for the
    -- stack. For more information, see the
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html Parameter>
    -- data type.
    UpdateStack -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | The template resource types that you have permissions to work with for
    -- this update stack action, such as @AWS::EC2::Instance@, @AWS::EC2::*@,
    -- or @Custom::MyCustomInstance@.
    --
    -- If the list of resource types doesn\'t include a resource 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 CloudFormation-specific condition keys in IAM
    -- policies. For more information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html Controlling Access with Identity and Access Management>.
    UpdateStack -> Maybe [Text]
resourceTypes :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of an Identity and Access Management
    -- (IAM) role that CloudFormation assumes to update the stack.
    -- CloudFormation uses the role\'s credentials to make calls on your
    -- behalf. CloudFormation always uses this role for all future operations
    -- on the stack. Provided that users have permission to operate on the
    -- stack, CloudFormation uses this role even if the users don\'t have
    -- permission to pass it. Ensure that the role grants least privilege.
    --
    -- If you don\'t specify a value, CloudFormation uses the role that was
    -- previously associated with the stack. If no role is available,
    -- CloudFormation uses a temporary session that is generated from your user
    -- credentials.
    UpdateStack -> 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.
    UpdateStack -> Maybe RollbackConfiguration
rollbackConfiguration :: Prelude.Maybe RollbackConfiguration,
    -- | Structure containing a new stack policy body. You can specify either the
    -- @StackPolicyBody@ or the @StackPolicyURL@ parameter, but not both.
    --
    -- You might update the stack policy, for example, in order to protect a
    -- new resource that you created during a stack update. If you don\'t
    -- specify a stack policy, the current policy that is associated with the
    -- stack is unchanged.
    UpdateStack -> Maybe Text
stackPolicyBody :: Prelude.Maybe Prelude.Text,
    -- | Structure containing the temporary overriding stack policy body. You can
    -- specify either the @StackPolicyDuringUpdateBody@ or the
    -- @StackPolicyDuringUpdateURL@ parameter, but not both.
    --
    -- If you want to update protected resources, specify a temporary
    -- overriding stack policy during this update. If you don\'t specify a
    -- stack policy, the current policy that is associated with the stack will
    -- be used.
    UpdateStack -> Maybe Text
stackPolicyDuringUpdateBody :: Prelude.Maybe Prelude.Text,
    -- | Location of a file containing the temporary overriding stack policy. The
    -- URL must point to a policy (max size: 16KB) located in an S3 bucket in
    -- the same Region as the stack. You can specify either the
    -- @StackPolicyDuringUpdateBody@ or the @StackPolicyDuringUpdateURL@
    -- parameter, but not both.
    --
    -- If you want to update protected resources, specify a temporary
    -- overriding stack policy during this update. If you don\'t specify a
    -- stack policy, the current policy that is associated with the stack will
    -- be used.
    UpdateStack -> Maybe Text
stackPolicyDuringUpdateURL :: Prelude.Maybe Prelude.Text,
    -- | Location of a file containing the updated stack policy. The URL must
    -- point to a policy (max size: 16KB) located in an S3 bucket in the same
    -- Region as the stack. You can specify either the @StackPolicyBody@ or the
    -- @StackPolicyURL@ parameter, but not both.
    --
    -- You might update the stack policy, for example, in order to protect a
    -- new resource that you created during a stack update. If you don\'t
    -- specify a stack policy, the current policy that is associated with the
    -- stack is unchanged.
    UpdateStack -> Maybe Text
stackPolicyURL :: Prelude.Maybe Prelude.Text,
    -- | Key-value pairs to associate with this stack. CloudFormation also
    -- propagates these tags to supported resources in the stack. You can
    -- specify a maximum number of 50 tags.
    --
    -- If you don\'t specify this parameter, CloudFormation doesn\'t modify the
    -- stack\'s tags. If you specify an empty value, CloudFormation removes all
    -- associated tags.
    UpdateStack -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | Structure containing the template body with a minimum length of 1 byte
    -- and a maximum length of 51,200 bytes. (For more information, go to
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
    -- in the CloudFormation User Guide.)
    --
    -- Conditional: You must specify only one of the following parameters:
    -- @TemplateBody@, @TemplateURL@, or set the @UsePreviousTemplate@ to
    -- @true@.
    UpdateStack -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text,
    -- | Location of file containing the template body. The URL must point to a
    -- template that\'s located in an Amazon S3 bucket or a Systems Manager
    -- document. For more information, go to
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
    -- in the CloudFormation User Guide.
    --
    -- Conditional: You must specify only one of the following parameters:
    -- @TemplateBody@, @TemplateURL@, or set the @UsePreviousTemplate@ to
    -- @true@.
    UpdateStack -> Maybe Text
templateURL :: Prelude.Maybe Prelude.Text,
    -- | Reuse the existing template that is associated with the stack that you
    -- are updating.
    --
    -- Conditional: You must specify only one of the following parameters:
    -- @TemplateBody@, @TemplateURL@, or set the @UsePreviousTemplate@ to
    -- @true@.
    UpdateStack -> Maybe Bool
usePreviousTemplate :: Prelude.Maybe Prelude.Bool,
    -- | The name or unique stack ID of the stack to update.
    UpdateStack -> Text
stackName :: Prelude.Text
  }
  deriving (UpdateStack -> UpdateStack -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStack -> UpdateStack -> Bool
$c/= :: UpdateStack -> UpdateStack -> Bool
== :: UpdateStack -> UpdateStack -> Bool
$c== :: UpdateStack -> UpdateStack -> Bool
Prelude.Eq, ReadPrec [UpdateStack]
ReadPrec UpdateStack
Int -> ReadS UpdateStack
ReadS [UpdateStack]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStack]
$creadListPrec :: ReadPrec [UpdateStack]
readPrec :: ReadPrec UpdateStack
$creadPrec :: ReadPrec UpdateStack
readList :: ReadS [UpdateStack]
$creadList :: ReadS [UpdateStack]
readsPrec :: Int -> ReadS UpdateStack
$creadsPrec :: Int -> ReadS UpdateStack
Prelude.Read, Int -> UpdateStack -> ShowS
[UpdateStack] -> ShowS
UpdateStack -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStack] -> ShowS
$cshowList :: [UpdateStack] -> ShowS
show :: UpdateStack -> String
$cshow :: UpdateStack -> String
showsPrec :: Int -> UpdateStack -> ShowS
$cshowsPrec :: Int -> UpdateStack -> ShowS
Prelude.Show, forall x. Rep UpdateStack x -> UpdateStack
forall x. UpdateStack -> Rep UpdateStack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateStack x -> UpdateStack
$cfrom :: forall x. UpdateStack -> Rep UpdateStack x
Prelude.Generic)

-- |
-- Create a value of 'UpdateStack' 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', 'updateStack_capabilities' - In some cases, you must explicitly acknowledge that your stack template
-- contains certain capabilities in order for CloudFormation to update 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 updating the stack. If
--     your stack template contains one or more macros, and you choose to
--     update a stack directly from the processed template, without first
--     reviewing the resulting changes in a change set, you must
--     acknowledge this capability. This includes the
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html AWS::Include>
--     and
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html AWS::Serverless>
--     transforms, which are macros hosted by CloudFormation.
--
--     If you want to update a stack from a stack template that contains
--     macros /and/ nested stacks, you must update the stack directly from
--     the template using this capability.
--
--     You should only update stacks directly from a stack template that
--     contains macros if you know what processing the macro performs.
--
--     Each macro relies on an underlying Lambda service function for
--     processing stack templates. Be aware that the Lambda function owner
--     can update the function operation without CloudFormation being
--     notified.
--
--     For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation Macros to Perform Custom Processing on Templates>.
--
-- 'clientRequestToken', 'updateStack_clientRequestToken' - A unique identifier for this @UpdateStack@ request. Specify this token
-- if you plan to retry requests so that CloudFormation knows that you\'re
-- not attempting to update a stack with the same name. You might retry
-- @UpdateStack@ requests to ensure that CloudFormation successfully
-- received them.
--
-- All events triggered by a given stack operation are assigned the same
-- client request token, which you can use to track operations. For
-- example, if you execute a @CreateStack@ operation with the token
-- @token1@, then all the @StackEvents@ generated by that operation will
-- have @ClientRequestToken@ set as @token1@.
--
-- In the console, stack operations display the client request token on the
-- Events tab. Stack operations that are initiated from the console use the
-- token format /Console-StackOperation-ID/, which helps you easily
-- identify the stack operation . For example, if you create a stack using
-- the console, each stack event would be assigned the same token in the
-- following format:
-- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@.
--
-- 'disableRollback', 'updateStack_disableRollback' - Preserve the state of previously provisioned resources when an operation
-- fails.
--
-- Default: @False@
--
-- 'notificationARNs', 'updateStack_notificationARNs' - Amazon Simple Notification Service topic Amazon Resource Names (ARNs)
-- that CloudFormation associates with the stack. Specify an empty list to
-- remove all notification topics.
--
-- 'parameters', 'updateStack_parameters' - A list of @Parameter@ structures that specify input parameters for the
-- stack. For more information, see the
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html Parameter>
-- data type.
--
-- 'resourceTypes', 'updateStack_resourceTypes' - The template resource types that you have permissions to work with for
-- this update stack action, such as @AWS::EC2::Instance@, @AWS::EC2::*@,
-- or @Custom::MyCustomInstance@.
--
-- If the list of resource types doesn\'t include a resource 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 CloudFormation-specific condition keys in IAM
-- policies. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html Controlling Access with Identity and Access Management>.
--
-- 'roleARN', 'updateStack_roleARN' - The Amazon Resource Name (ARN) of an Identity and Access Management
-- (IAM) role that CloudFormation assumes to update the stack.
-- CloudFormation uses the role\'s credentials to make calls on your
-- behalf. CloudFormation always uses this role for all future operations
-- on the stack. Provided that users have permission to operate on the
-- stack, CloudFormation uses this role even if the users don\'t have
-- permission to pass it. Ensure that the role grants least privilege.
--
-- If you don\'t specify a value, CloudFormation uses the role that was
-- previously associated with the stack. If no role is available,
-- CloudFormation uses a temporary session that is generated from your user
-- credentials.
--
-- 'rollbackConfiguration', 'updateStack_rollbackConfiguration' - The rollback triggers for CloudFormation to monitor during stack
-- creation and updating operations, and for the specified monitoring
-- period afterwards.
--
-- 'stackPolicyBody', 'updateStack_stackPolicyBody' - Structure containing a new stack policy body. You can specify either the
-- @StackPolicyBody@ or the @StackPolicyURL@ parameter, but not both.
--
-- You might update the stack policy, for example, in order to protect a
-- new resource that you created during a stack update. If you don\'t
-- specify a stack policy, the current policy that is associated with the
-- stack is unchanged.
--
-- 'stackPolicyDuringUpdateBody', 'updateStack_stackPolicyDuringUpdateBody' - Structure containing the temporary overriding stack policy body. You can
-- specify either the @StackPolicyDuringUpdateBody@ or the
-- @StackPolicyDuringUpdateURL@ parameter, but not both.
--
-- If you want to update protected resources, specify a temporary
-- overriding stack policy during this update. If you don\'t specify a
-- stack policy, the current policy that is associated with the stack will
-- be used.
--
-- 'stackPolicyDuringUpdateURL', 'updateStack_stackPolicyDuringUpdateURL' - Location of a file containing the temporary overriding stack policy. The
-- URL must point to a policy (max size: 16KB) located in an S3 bucket in
-- the same Region as the stack. You can specify either the
-- @StackPolicyDuringUpdateBody@ or the @StackPolicyDuringUpdateURL@
-- parameter, but not both.
--
-- If you want to update protected resources, specify a temporary
-- overriding stack policy during this update. If you don\'t specify a
-- stack policy, the current policy that is associated with the stack will
-- be used.
--
-- 'stackPolicyURL', 'updateStack_stackPolicyURL' - Location of a file containing the updated stack policy. The URL must
-- point to a policy (max size: 16KB) located in an S3 bucket in the same
-- Region as the stack. You can specify either the @StackPolicyBody@ or the
-- @StackPolicyURL@ parameter, but not both.
--
-- You might update the stack policy, for example, in order to protect a
-- new resource that you created during a stack update. If you don\'t
-- specify a stack policy, the current policy that is associated with the
-- stack is unchanged.
--
-- 'tags', 'updateStack_tags' - Key-value pairs to associate with this stack. CloudFormation also
-- propagates these tags to supported resources in the stack. You can
-- specify a maximum number of 50 tags.
--
-- If you don\'t specify this parameter, CloudFormation doesn\'t modify the
-- stack\'s tags. If you specify an empty value, CloudFormation removes all
-- associated tags.
--
-- 'templateBody', 'updateStack_templateBody' - Structure containing the template body with a minimum length of 1 byte
-- and a maximum length of 51,200 bytes. (For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.)
--
-- Conditional: You must specify only one of the following parameters:
-- @TemplateBody@, @TemplateURL@, or set the @UsePreviousTemplate@ to
-- @true@.
--
-- 'templateURL', 'updateStack_templateURL' - Location of file containing the template body. The URL must point to a
-- template that\'s located in an Amazon S3 bucket or a Systems Manager
-- document. For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify only one of the following parameters:
-- @TemplateBody@, @TemplateURL@, or set the @UsePreviousTemplate@ to
-- @true@.
--
-- 'usePreviousTemplate', 'updateStack_usePreviousTemplate' - Reuse the existing template that is associated with the stack that you
-- are updating.
--
-- Conditional: You must specify only one of the following parameters:
-- @TemplateBody@, @TemplateURL@, or set the @UsePreviousTemplate@ to
-- @true@.
--
-- 'stackName', 'updateStack_stackName' - The name or unique stack ID of the stack to update.
newUpdateStack ::
  -- | 'stackName'
  Prelude.Text ->
  UpdateStack
newUpdateStack :: Text -> UpdateStack
newUpdateStack Text
pStackName_ =
  UpdateStack'
    { $sel:capabilities:UpdateStack' :: Maybe [Capability]
capabilities = forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:UpdateStack' :: Maybe Text
clientRequestToken = forall a. Maybe a
Prelude.Nothing,
      $sel:disableRollback:UpdateStack' :: Maybe Bool
disableRollback = forall a. Maybe a
Prelude.Nothing,
      $sel:notificationARNs:UpdateStack' :: Maybe [Text]
notificationARNs = forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:UpdateStack' :: Maybe [Parameter]
parameters = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceTypes:UpdateStack' :: Maybe [Text]
resourceTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:UpdateStack' :: Maybe Text
roleARN = forall a. Maybe a
Prelude.Nothing,
      $sel:rollbackConfiguration:UpdateStack' :: Maybe RollbackConfiguration
rollbackConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyBody:UpdateStack' :: Maybe Text
stackPolicyBody = forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyDuringUpdateBody:UpdateStack' :: Maybe Text
stackPolicyDuringUpdateBody = forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyDuringUpdateURL:UpdateStack' :: Maybe Text
stackPolicyDuringUpdateURL = forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyURL:UpdateStack' :: Maybe Text
stackPolicyURL = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateStack' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:UpdateStack' :: Maybe Text
templateBody = forall a. Maybe a
Prelude.Nothing,
      $sel:templateURL:UpdateStack' :: Maybe Text
templateURL = forall a. Maybe a
Prelude.Nothing,
      $sel:usePreviousTemplate:UpdateStack' :: Maybe Bool
usePreviousTemplate = forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:UpdateStack' :: Text
stackName = Text
pStackName_
    }

-- | In some cases, you must explicitly acknowledge that your stack template
-- contains certain capabilities in order for CloudFormation to update 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 updating the stack. If
--     your stack template contains one or more macros, and you choose to
--     update a stack directly from the processed template, without first
--     reviewing the resulting changes in a change set, you must
--     acknowledge this capability. This includes the
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html AWS::Include>
--     and
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html AWS::Serverless>
--     transforms, which are macros hosted by CloudFormation.
--
--     If you want to update a stack from a stack template that contains
--     macros /and/ nested stacks, you must update the stack directly from
--     the template using this capability.
--
--     You should only update stacks directly from a stack template that
--     contains macros if you know what processing the macro performs.
--
--     Each macro relies on an underlying Lambda service function for
--     processing stack templates. Be aware that the Lambda function owner
--     can update the function operation without CloudFormation being
--     notified.
--
--     For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation Macros to Perform Custom Processing on Templates>.
updateStack_capabilities :: Lens.Lens' UpdateStack (Prelude.Maybe [Capability])
updateStack_capabilities :: Lens' UpdateStack (Maybe [Capability])
updateStack_capabilities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe [Capability]
capabilities :: Maybe [Capability]
$sel:capabilities:UpdateStack' :: UpdateStack -> Maybe [Capability]
capabilities} -> Maybe [Capability]
capabilities) (\s :: UpdateStack
s@UpdateStack' {} Maybe [Capability]
a -> UpdateStack
s {$sel:capabilities:UpdateStack' :: Maybe [Capability]
capabilities = Maybe [Capability]
a} :: UpdateStack) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | Preserve the state of previously provisioned resources when an operation
-- fails.
--
-- Default: @False@
updateStack_disableRollback :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Bool)
updateStack_disableRollback :: Lens' UpdateStack (Maybe Bool)
updateStack_disableRollback = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Bool
disableRollback :: Maybe Bool
$sel:disableRollback:UpdateStack' :: UpdateStack -> Maybe Bool
disableRollback} -> Maybe Bool
disableRollback) (\s :: UpdateStack
s@UpdateStack' {} Maybe Bool
a -> UpdateStack
s {$sel:disableRollback:UpdateStack' :: Maybe Bool
disableRollback = Maybe Bool
a} :: UpdateStack)

-- | Amazon Simple Notification Service topic Amazon Resource Names (ARNs)
-- that CloudFormation associates with the stack. Specify an empty list to
-- remove all notification topics.
updateStack_notificationARNs :: Lens.Lens' UpdateStack (Prelude.Maybe [Prelude.Text])
updateStack_notificationARNs :: Lens' UpdateStack (Maybe [Text])
updateStack_notificationARNs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe [Text]
notificationARNs :: Maybe [Text]
$sel:notificationARNs:UpdateStack' :: UpdateStack -> Maybe [Text]
notificationARNs} -> Maybe [Text]
notificationARNs) (\s :: UpdateStack
s@UpdateStack' {} Maybe [Text]
a -> UpdateStack
s {$sel:notificationARNs:UpdateStack' :: Maybe [Text]
notificationARNs = Maybe [Text]
a} :: UpdateStack) 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
-- stack. For more information, see the
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html Parameter>
-- data type.
updateStack_parameters :: Lens.Lens' UpdateStack (Prelude.Maybe [Parameter])
updateStack_parameters :: Lens' UpdateStack (Maybe [Parameter])
updateStack_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:UpdateStack' :: UpdateStack -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: UpdateStack
s@UpdateStack' {} Maybe [Parameter]
a -> UpdateStack
s {$sel:parameters:UpdateStack' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: UpdateStack) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The template resource types that you have permissions to work with for
-- this update stack action, such as @AWS::EC2::Instance@, @AWS::EC2::*@,
-- or @Custom::MyCustomInstance@.
--
-- If the list of resource types doesn\'t include a resource 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 CloudFormation-specific condition keys in IAM
-- policies. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html Controlling Access with Identity and Access Management>.
updateStack_resourceTypes :: Lens.Lens' UpdateStack (Prelude.Maybe [Prelude.Text])
updateStack_resourceTypes :: Lens' UpdateStack (Maybe [Text])
updateStack_resourceTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe [Text]
resourceTypes :: Maybe [Text]
$sel:resourceTypes:UpdateStack' :: UpdateStack -> Maybe [Text]
resourceTypes} -> Maybe [Text]
resourceTypes) (\s :: UpdateStack
s@UpdateStack' {} Maybe [Text]
a -> UpdateStack
s {$sel:resourceTypes:UpdateStack' :: Maybe [Text]
resourceTypes = Maybe [Text]
a} :: UpdateStack) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

-- | Structure containing a new stack policy body. You can specify either the
-- @StackPolicyBody@ or the @StackPolicyURL@ parameter, but not both.
--
-- You might update the stack policy, for example, in order to protect a
-- new resource that you created during a stack update. If you don\'t
-- specify a stack policy, the current policy that is associated with the
-- stack is unchanged.
updateStack_stackPolicyBody :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_stackPolicyBody :: Lens' UpdateStack (Maybe Text)
updateStack_stackPolicyBody = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
stackPolicyBody :: Maybe Text
$sel:stackPolicyBody:UpdateStack' :: UpdateStack -> Maybe Text
stackPolicyBody} -> Maybe Text
stackPolicyBody) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:stackPolicyBody:UpdateStack' :: Maybe Text
stackPolicyBody = Maybe Text
a} :: UpdateStack)

-- | Structure containing the temporary overriding stack policy body. You can
-- specify either the @StackPolicyDuringUpdateBody@ or the
-- @StackPolicyDuringUpdateURL@ parameter, but not both.
--
-- If you want to update protected resources, specify a temporary
-- overriding stack policy during this update. If you don\'t specify a
-- stack policy, the current policy that is associated with the stack will
-- be used.
updateStack_stackPolicyDuringUpdateBody :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_stackPolicyDuringUpdateBody :: Lens' UpdateStack (Maybe Text)
updateStack_stackPolicyDuringUpdateBody = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
stackPolicyDuringUpdateBody :: Maybe Text
$sel:stackPolicyDuringUpdateBody:UpdateStack' :: UpdateStack -> Maybe Text
stackPolicyDuringUpdateBody} -> Maybe Text
stackPolicyDuringUpdateBody) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:stackPolicyDuringUpdateBody:UpdateStack' :: Maybe Text
stackPolicyDuringUpdateBody = Maybe Text
a} :: UpdateStack)

-- | Location of a file containing the temporary overriding stack policy. The
-- URL must point to a policy (max size: 16KB) located in an S3 bucket in
-- the same Region as the stack. You can specify either the
-- @StackPolicyDuringUpdateBody@ or the @StackPolicyDuringUpdateURL@
-- parameter, but not both.
--
-- If you want to update protected resources, specify a temporary
-- overriding stack policy during this update. If you don\'t specify a
-- stack policy, the current policy that is associated with the stack will
-- be used.
updateStack_stackPolicyDuringUpdateURL :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_stackPolicyDuringUpdateURL :: Lens' UpdateStack (Maybe Text)
updateStack_stackPolicyDuringUpdateURL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
stackPolicyDuringUpdateURL :: Maybe Text
$sel:stackPolicyDuringUpdateURL:UpdateStack' :: UpdateStack -> Maybe Text
stackPolicyDuringUpdateURL} -> Maybe Text
stackPolicyDuringUpdateURL) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:stackPolicyDuringUpdateURL:UpdateStack' :: Maybe Text
stackPolicyDuringUpdateURL = Maybe Text
a} :: UpdateStack)

-- | Location of a file containing the updated stack policy. The URL must
-- point to a policy (max size: 16KB) located in an S3 bucket in the same
-- Region as the stack. You can specify either the @StackPolicyBody@ or the
-- @StackPolicyURL@ parameter, but not both.
--
-- You might update the stack policy, for example, in order to protect a
-- new resource that you created during a stack update. If you don\'t
-- specify a stack policy, the current policy that is associated with the
-- stack is unchanged.
updateStack_stackPolicyURL :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_stackPolicyURL :: Lens' UpdateStack (Maybe Text)
updateStack_stackPolicyURL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
stackPolicyURL :: Maybe Text
$sel:stackPolicyURL:UpdateStack' :: UpdateStack -> Maybe Text
stackPolicyURL} -> Maybe Text
stackPolicyURL) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:stackPolicyURL:UpdateStack' :: Maybe Text
stackPolicyURL = Maybe Text
a} :: UpdateStack)

-- | Key-value pairs to associate with this stack. CloudFormation also
-- propagates these tags to supported resources in the stack. You can
-- specify a maximum number of 50 tags.
--
-- If you don\'t specify this parameter, CloudFormation doesn\'t modify the
-- stack\'s tags. If you specify an empty value, CloudFormation removes all
-- associated tags.
updateStack_tags :: Lens.Lens' UpdateStack (Prelude.Maybe [Tag])
updateStack_tags :: Lens' UpdateStack (Maybe [Tag])
updateStack_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:UpdateStack' :: UpdateStack -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: UpdateStack
s@UpdateStack' {} Maybe [Tag]
a -> UpdateStack
s {$sel:tags:UpdateStack' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: UpdateStack) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Structure containing the template body with a minimum length of 1 byte
-- and a maximum length of 51,200 bytes. (For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.)
--
-- Conditional: You must specify only one of the following parameters:
-- @TemplateBody@, @TemplateURL@, or set the @UsePreviousTemplate@ to
-- @true@.
updateStack_templateBody :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_templateBody :: Lens' UpdateStack (Maybe Text)
updateStack_templateBody = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
templateBody :: Maybe Text
$sel:templateBody:UpdateStack' :: UpdateStack -> Maybe Text
templateBody} -> Maybe Text
templateBody) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:templateBody:UpdateStack' :: Maybe Text
templateBody = Maybe Text
a} :: UpdateStack)

-- | Location of file containing the template body. The URL must point to a
-- template that\'s located in an Amazon S3 bucket or a Systems Manager
-- document. For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify only one of the following parameters:
-- @TemplateBody@, @TemplateURL@, or set the @UsePreviousTemplate@ to
-- @true@.
updateStack_templateURL :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_templateURL :: Lens' UpdateStack (Maybe Text)
updateStack_templateURL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
templateURL :: Maybe Text
$sel:templateURL:UpdateStack' :: UpdateStack -> Maybe Text
templateURL} -> Maybe Text
templateURL) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:templateURL:UpdateStack' :: Maybe Text
templateURL = Maybe Text
a} :: UpdateStack)

-- | Reuse the existing template that is associated with the stack that you
-- are updating.
--
-- Conditional: You must specify only one of the following parameters:
-- @TemplateBody@, @TemplateURL@, or set the @UsePreviousTemplate@ to
-- @true@.
updateStack_usePreviousTemplate :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Bool)
updateStack_usePreviousTemplate :: Lens' UpdateStack (Maybe Bool)
updateStack_usePreviousTemplate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Bool
usePreviousTemplate :: Maybe Bool
$sel:usePreviousTemplate:UpdateStack' :: UpdateStack -> Maybe Bool
usePreviousTemplate} -> Maybe Bool
usePreviousTemplate) (\s :: UpdateStack
s@UpdateStack' {} Maybe Bool
a -> UpdateStack
s {$sel:usePreviousTemplate:UpdateStack' :: Maybe Bool
usePreviousTemplate = Maybe Bool
a} :: UpdateStack)

-- | The name or unique stack ID of the stack to update.
updateStack_stackName :: Lens.Lens' UpdateStack Prelude.Text
updateStack_stackName :: Lens' UpdateStack Text
updateStack_stackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Text
stackName :: Text
$sel:stackName:UpdateStack' :: UpdateStack -> Text
stackName} -> Text
stackName) (\s :: UpdateStack
s@UpdateStack' {} Text
a -> UpdateStack
s {$sel:stackName:UpdateStack' :: Text
stackName = Text
a} :: UpdateStack)

instance Core.AWSRequest UpdateStack where
  type AWSResponse UpdateStack = UpdateStackResponse
  request :: (Service -> Service) -> UpdateStack -> Request UpdateStack
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 UpdateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateStack)))
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
"UpdateStackResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> UpdateStackResponse
UpdateStackResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"StackId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateStack where
  hashWithSalt :: Int -> UpdateStack -> Int
hashWithSalt Int
_salt UpdateStack' {Maybe Bool
Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe RollbackConfiguration
Text
stackName :: Text
usePreviousTemplate :: Maybe Bool
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
stackPolicyURL :: Maybe Text
stackPolicyDuringUpdateURL :: Maybe Text
stackPolicyDuringUpdateBody :: Maybe Text
stackPolicyBody :: Maybe Text
rollbackConfiguration :: Maybe RollbackConfiguration
roleARN :: Maybe Text
resourceTypes :: Maybe [Text]
parameters :: Maybe [Parameter]
notificationARNs :: Maybe [Text]
disableRollback :: Maybe Bool
clientRequestToken :: Maybe Text
capabilities :: Maybe [Capability]
$sel:stackName:UpdateStack' :: UpdateStack -> Text
$sel:usePreviousTemplate:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:templateURL:UpdateStack' :: UpdateStack -> Maybe Text
$sel:templateBody:UpdateStack' :: UpdateStack -> Maybe Text
$sel:tags:UpdateStack' :: UpdateStack -> Maybe [Tag]
$sel:stackPolicyURL:UpdateStack' :: UpdateStack -> Maybe Text
$sel:stackPolicyDuringUpdateURL:UpdateStack' :: UpdateStack -> Maybe Text
$sel:stackPolicyDuringUpdateBody:UpdateStack' :: UpdateStack -> Maybe Text
$sel:stackPolicyBody:UpdateStack' :: UpdateStack -> Maybe Text
$sel:rollbackConfiguration:UpdateStack' :: UpdateStack -> Maybe RollbackConfiguration
$sel:roleARN:UpdateStack' :: UpdateStack -> Maybe Text
$sel:resourceTypes:UpdateStack' :: UpdateStack -> Maybe [Text]
$sel:parameters:UpdateStack' :: UpdateStack -> Maybe [Parameter]
$sel:notificationARNs:UpdateStack' :: UpdateStack -> Maybe [Text]
$sel:disableRollback:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:clientRequestToken:UpdateStack' :: UpdateStack -> Maybe Text
$sel:capabilities:UpdateStack' :: UpdateStack -> Maybe [Capability]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Capability]
capabilities
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableRollback
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [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 Text
roleARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RollbackConfiguration
rollbackConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackPolicyBody
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackPolicyDuringUpdateBody
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackPolicyDuringUpdateURL
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackPolicyURL
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateBody
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateURL
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
usePreviousTemplate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackName

instance Prelude.NFData UpdateStack where
  rnf :: UpdateStack -> ()
rnf UpdateStack' {Maybe Bool
Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe RollbackConfiguration
Text
stackName :: Text
usePreviousTemplate :: Maybe Bool
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
stackPolicyURL :: Maybe Text
stackPolicyDuringUpdateURL :: Maybe Text
stackPolicyDuringUpdateBody :: Maybe Text
stackPolicyBody :: Maybe Text
rollbackConfiguration :: Maybe RollbackConfiguration
roleARN :: Maybe Text
resourceTypes :: Maybe [Text]
parameters :: Maybe [Parameter]
notificationARNs :: Maybe [Text]
disableRollback :: Maybe Bool
clientRequestToken :: Maybe Text
capabilities :: Maybe [Capability]
$sel:stackName:UpdateStack' :: UpdateStack -> Text
$sel:usePreviousTemplate:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:templateURL:UpdateStack' :: UpdateStack -> Maybe Text
$sel:templateBody:UpdateStack' :: UpdateStack -> Maybe Text
$sel:tags:UpdateStack' :: UpdateStack -> Maybe [Tag]
$sel:stackPolicyURL:UpdateStack' :: UpdateStack -> Maybe Text
$sel:stackPolicyDuringUpdateURL:UpdateStack' :: UpdateStack -> Maybe Text
$sel:stackPolicyDuringUpdateBody:UpdateStack' :: UpdateStack -> Maybe Text
$sel:stackPolicyBody:UpdateStack' :: UpdateStack -> Maybe Text
$sel:rollbackConfiguration:UpdateStack' :: UpdateStack -> Maybe RollbackConfiguration
$sel:roleARN:UpdateStack' :: UpdateStack -> Maybe Text
$sel:resourceTypes:UpdateStack' :: UpdateStack -> Maybe [Text]
$sel:parameters:UpdateStack' :: UpdateStack -> Maybe [Parameter]
$sel:notificationARNs:UpdateStack' :: UpdateStack -> Maybe [Text]
$sel:disableRollback:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:clientRequestToken:UpdateStack' :: UpdateStack -> Maybe Text
$sel:capabilities:UpdateStack' :: UpdateStack -> Maybe [Capability]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Capability]
capabilities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableRollback
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [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 Text
roleARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RollbackConfiguration
rollbackConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackPolicyBody
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackPolicyDuringUpdateBody
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackPolicyDuringUpdateURL
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackPolicyURL
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateBody
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateURL
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
usePreviousTemplate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackName

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

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

instance Data.ToQuery UpdateStack where
  toQuery :: UpdateStack -> QueryString
toQuery UpdateStack' {Maybe Bool
Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe RollbackConfiguration
Text
stackName :: Text
usePreviousTemplate :: Maybe Bool
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
stackPolicyURL :: Maybe Text
stackPolicyDuringUpdateURL :: Maybe Text
stackPolicyDuringUpdateBody :: Maybe Text
stackPolicyBody :: Maybe Text
rollbackConfiguration :: Maybe RollbackConfiguration
roleARN :: Maybe Text
resourceTypes :: Maybe [Text]
parameters :: Maybe [Parameter]
notificationARNs :: Maybe [Text]
disableRollback :: Maybe Bool
clientRequestToken :: Maybe Text
capabilities :: Maybe [Capability]
$sel:stackName:UpdateStack' :: UpdateStack -> Text
$sel:usePreviousTemplate:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:templateURL:UpdateStack' :: UpdateStack -> Maybe Text
$sel:templateBody:UpdateStack' :: UpdateStack -> Maybe Text
$sel:tags:UpdateStack' :: UpdateStack -> Maybe [Tag]
$sel:stackPolicyURL:UpdateStack' :: UpdateStack -> Maybe Text
$sel:stackPolicyDuringUpdateURL:UpdateStack' :: UpdateStack -> Maybe Text
$sel:stackPolicyDuringUpdateBody:UpdateStack' :: UpdateStack -> Maybe Text
$sel:stackPolicyBody:UpdateStack' :: UpdateStack -> Maybe Text
$sel:rollbackConfiguration:UpdateStack' :: UpdateStack -> Maybe RollbackConfiguration
$sel:roleARN:UpdateStack' :: UpdateStack -> Maybe Text
$sel:resourceTypes:UpdateStack' :: UpdateStack -> Maybe [Text]
$sel:parameters:UpdateStack' :: UpdateStack -> Maybe [Parameter]
$sel:notificationARNs:UpdateStack' :: UpdateStack -> Maybe [Text]
$sel:disableRollback:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:clientRequestToken:UpdateStack' :: UpdateStack -> Maybe Text
$sel:capabilities:UpdateStack' :: UpdateStack -> Maybe [Capability]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"UpdateStack" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"Capabilities"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Capability]
capabilities),
        ByteString
"ClientRequestToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientRequestToken,
        ByteString
"DisableRollback" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
disableRollback,
        ByteString
"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
"RoleARN" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
roleARN,
        ByteString
"RollbackConfiguration"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe RollbackConfiguration
rollbackConfiguration,
        ByteString
"StackPolicyBody" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackPolicyBody,
        ByteString
"StackPolicyDuringUpdateBody"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackPolicyDuringUpdateBody,
        ByteString
"StackPolicyDuringUpdateURL"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackPolicyDuringUpdateURL,
        ByteString
"StackPolicyURL" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackPolicyURL,
        ByteString
"Tags"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"TemplateBody" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
templateBody,
        ByteString
"TemplateURL" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
templateURL,
        ByteString
"UsePreviousTemplate" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
usePreviousTemplate,
        ByteString
"StackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
stackName
      ]

-- | The output for an UpdateStack action.
--
-- /See:/ 'newUpdateStackResponse' smart constructor.
data UpdateStackResponse = UpdateStackResponse'
  { -- | Unique identifier of the stack.
    UpdateStackResponse -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateStackResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateStackResponse -> UpdateStackResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStackResponse -> UpdateStackResponse -> Bool
$c/= :: UpdateStackResponse -> UpdateStackResponse -> Bool
== :: UpdateStackResponse -> UpdateStackResponse -> Bool
$c== :: UpdateStackResponse -> UpdateStackResponse -> Bool
Prelude.Eq, ReadPrec [UpdateStackResponse]
ReadPrec UpdateStackResponse
Int -> ReadS UpdateStackResponse
ReadS [UpdateStackResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStackResponse]
$creadListPrec :: ReadPrec [UpdateStackResponse]
readPrec :: ReadPrec UpdateStackResponse
$creadPrec :: ReadPrec UpdateStackResponse
readList :: ReadS [UpdateStackResponse]
$creadList :: ReadS [UpdateStackResponse]
readsPrec :: Int -> ReadS UpdateStackResponse
$creadsPrec :: Int -> ReadS UpdateStackResponse
Prelude.Read, Int -> UpdateStackResponse -> ShowS
[UpdateStackResponse] -> ShowS
UpdateStackResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStackResponse] -> ShowS
$cshowList :: [UpdateStackResponse] -> ShowS
show :: UpdateStackResponse -> String
$cshow :: UpdateStackResponse -> String
showsPrec :: Int -> UpdateStackResponse -> ShowS
$cshowsPrec :: Int -> UpdateStackResponse -> ShowS
Prelude.Show, forall x. Rep UpdateStackResponse x -> UpdateStackResponse
forall x. UpdateStackResponse -> Rep UpdateStackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateStackResponse x -> UpdateStackResponse
$cfrom :: forall x. UpdateStackResponse -> Rep UpdateStackResponse x
Prelude.Generic)

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

-- | Unique identifier of the stack.
updateStackResponse_stackId :: Lens.Lens' UpdateStackResponse (Prelude.Maybe Prelude.Text)
updateStackResponse_stackId :: Lens' UpdateStackResponse (Maybe Text)
updateStackResponse_stackId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStackResponse' {Maybe Text
stackId :: Maybe Text
$sel:stackId:UpdateStackResponse' :: UpdateStackResponse -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: UpdateStackResponse
s@UpdateStackResponse' {} Maybe Text
a -> UpdateStackResponse
s {$sel:stackId:UpdateStackResponse' :: Maybe Text
stackId = Maybe Text
a} :: UpdateStackResponse)

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

instance Prelude.NFData UpdateStackResponse where
  rnf :: UpdateStackResponse -> ()
rnf UpdateStackResponse' {Int
Maybe Text
httpStatus :: Int
stackId :: Maybe Text
$sel:httpStatus:UpdateStackResponse' :: UpdateStackResponse -> Int
$sel:stackId:UpdateStackResponse' :: UpdateStackResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus