{-# 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-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)
--
-- 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 via 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_disableRollback,
    updateStack_usePreviousTemplate,
    updateStack_notificationARNs,
    updateStack_stackPolicyBody,
    updateStack_stackPolicyDuringUpdateBody,
    updateStack_stackPolicyDuringUpdateURL,
    updateStack_parameters,
    updateStack_stackPolicyURL,
    updateStack_templateBody,
    updateStack_templateURL,
    updateStack_clientRequestToken,
    updateStack_capabilities,
    updateStack_rollbackConfiguration,
    updateStack_resourceTypes,
    updateStack_tags,
    updateStack_roleARN,
    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.Lens as Lens
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'
  { -- | Preserve the state of previously provisioned resources when an operation
    -- fails.
    --
    -- Default: @False@
    UpdateStack -> Maybe Bool
disableRollback :: Prelude.Maybe Prelude.Bool,
    -- | 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,
    -- | 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],
    -- | 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 do not
    -- 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 do not 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 do not specify a
    -- stack policy, the current policy that is associated with the stack will
    -- be used.
    UpdateStack -> Maybe Text
stackPolicyDuringUpdateURL :: 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],
    -- | 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 do not
    -- specify a stack policy, the current policy that is associated with the
    -- stack is unchanged.
    UpdateStack -> Maybe Text
stackPolicyURL :: Prelude.Maybe Prelude.Text,
    -- | 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 is 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,
    -- | 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,
    -- | 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 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 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],
    -- | 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,
    -- | 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],
    -- | 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],
    -- | 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. 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.
    UpdateStack -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | The name or unique stack ID of the stack to update.
    UpdateStack -> Text
stackName :: Prelude.Text
  }
  deriving (UpdateStack -> UpdateStack -> Bool
(UpdateStack -> UpdateStack -> Bool)
-> (UpdateStack -> UpdateStack -> Bool) -> Eq UpdateStack
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]
(Int -> ReadS UpdateStack)
-> ReadS [UpdateStack]
-> ReadPrec UpdateStack
-> ReadPrec [UpdateStack]
-> Read 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
(Int -> UpdateStack -> ShowS)
-> (UpdateStack -> String)
-> ([UpdateStack] -> ShowS)
-> Show UpdateStack
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. UpdateStack -> Rep UpdateStack x)
-> (forall x. Rep UpdateStack x -> UpdateStack)
-> Generic UpdateStack
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:
--
-- 'disableRollback', 'updateStack_disableRollback' - Preserve the state of previously provisioned resources when an operation
-- fails.
--
-- Default: @False@
--
-- '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@.
--
-- '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.
--
-- '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 do not
-- 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 do not 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 do not specify a
-- stack policy, the current policy that is associated with the stack will
-- be used.
--
-- '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.
--
-- '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 do not
-- specify a stack policy, the current policy that is associated with the
-- stack is unchanged.
--
-- '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 is 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@.
--
-- '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@.
--
-- '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 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 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>.
--
-- 'rollbackConfiguration', 'updateStack_rollbackConfiguration' - The rollback triggers for CloudFormation to monitor during stack
-- creation and updating operations, and for the specified monitoring
-- period afterwards.
--
-- '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>.
--
-- '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.
--
-- '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. 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', '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' :: Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Parameter]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Capability]
-> Maybe RollbackConfiguration
-> Maybe [Text]
-> Maybe [Tag]
-> Maybe Text
-> Text
-> UpdateStack
UpdateStack'
    { $sel:disableRollback:UpdateStack' :: Maybe Bool
disableRollback = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:usePreviousTemplate:UpdateStack' :: Maybe Bool
usePreviousTemplate = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationARNs:UpdateStack' :: Maybe [Text]
notificationARNs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyBody:UpdateStack' :: Maybe Text
stackPolicyBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyDuringUpdateBody:UpdateStack' :: Maybe Text
stackPolicyDuringUpdateBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyDuringUpdateURL:UpdateStack' :: Maybe Text
stackPolicyDuringUpdateURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:UpdateStack' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackPolicyURL:UpdateStack' :: Maybe Text
stackPolicyURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:UpdateStack' :: Maybe Text
templateBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateURL:UpdateStack' :: Maybe Text
templateURL = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:UpdateStack' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:capabilities:UpdateStack' :: Maybe [Capability]
capabilities = Maybe [Capability]
forall a. Maybe a
Prelude.Nothing,
      $sel:rollbackConfiguration:UpdateStack' :: Maybe RollbackConfiguration
rollbackConfiguration = Maybe RollbackConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceTypes:UpdateStack' :: Maybe [Text]
resourceTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateStack' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:UpdateStack' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:UpdateStack' :: Text
stackName = Text
pStackName_
    }

-- | Preserve the state of previously provisioned resources when an operation
-- fails.
--
-- Default: @False@
updateStack_disableRollback :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Bool)
updateStack_disableRollback :: (Maybe Bool -> f (Maybe Bool)) -> UpdateStack -> f UpdateStack
updateStack_disableRollback = (UpdateStack -> Maybe Bool)
-> (UpdateStack -> Maybe Bool -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> UpdateStack -> f UpdateStack
updateStack_usePreviousTemplate = (UpdateStack -> Maybe Bool)
-> (UpdateStack -> Maybe Bool -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe [Text] -> f (Maybe [Text])) -> UpdateStack -> f UpdateStack
updateStack_notificationARNs = (UpdateStack -> Maybe [Text])
-> (UpdateStack -> Maybe [Text] -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateStack -> f UpdateStack)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateStack
-> f UpdateStack
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

-- | 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 do not
-- 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 :: (Maybe Text -> f (Maybe Text)) -> UpdateStack -> f UpdateStack
updateStack_stackPolicyBody = (UpdateStack -> Maybe Text)
-> (UpdateStack -> Maybe Text -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe Text) (Maybe Text)
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 do not 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 :: (Maybe Text -> f (Maybe Text)) -> UpdateStack -> f UpdateStack
updateStack_stackPolicyDuringUpdateBody = (UpdateStack -> Maybe Text)
-> (UpdateStack -> Maybe Text -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe Text) (Maybe Text)
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 do not 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 :: (Maybe Text -> f (Maybe Text)) -> UpdateStack -> f UpdateStack
updateStack_stackPolicyDuringUpdateURL = (UpdateStack -> Maybe Text)
-> (UpdateStack -> Maybe Text -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> UpdateStack -> f UpdateStack
updateStack_parameters = (UpdateStack -> Maybe [Parameter])
-> (UpdateStack -> Maybe [Parameter] -> UpdateStack)
-> Lens
     UpdateStack UpdateStack (Maybe [Parameter]) (Maybe [Parameter])
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) ((Maybe [Parameter] -> f (Maybe [Parameter]))
 -> UpdateStack -> f UpdateStack)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> UpdateStack
-> f UpdateStack
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

-- | 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 do not
-- 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 :: (Maybe Text -> f (Maybe Text)) -> UpdateStack -> f UpdateStack
updateStack_stackPolicyURL = (UpdateStack -> Maybe Text)
-> (UpdateStack -> Maybe Text -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> UpdateStack -> f UpdateStack
updateStack_templateBody = (UpdateStack -> Maybe Text)
-> (UpdateStack -> Maybe Text -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe Text) (Maybe Text)
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 is 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 :: (Maybe Text -> f (Maybe Text)) -> UpdateStack -> f UpdateStack
updateStack_templateURL = (UpdateStack -> Maybe Text)
-> (UpdateStack -> Maybe Text -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe Text) (Maybe Text)
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)

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

-- | 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 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 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 :: (Maybe [Capability] -> f (Maybe [Capability]))
-> UpdateStack -> f UpdateStack
updateStack_capabilities = (UpdateStack -> Maybe [Capability])
-> (UpdateStack -> Maybe [Capability] -> UpdateStack)
-> Lens
     UpdateStack UpdateStack (Maybe [Capability]) (Maybe [Capability])
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) ((Maybe [Capability] -> f (Maybe [Capability]))
 -> UpdateStack -> f UpdateStack)
-> ((Maybe [Capability] -> f (Maybe [Capability]))
    -> Maybe [Capability] -> f (Maybe [Capability]))
-> (Maybe [Capability] -> f (Maybe [Capability]))
-> UpdateStack
-> f UpdateStack
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.
updateStack_rollbackConfiguration :: Lens.Lens' UpdateStack (Prelude.Maybe RollbackConfiguration)
updateStack_rollbackConfiguration :: (Maybe RollbackConfiguration -> f (Maybe RollbackConfiguration))
-> UpdateStack -> f UpdateStack
updateStack_rollbackConfiguration = (UpdateStack -> Maybe RollbackConfiguration)
-> (UpdateStack -> Maybe RollbackConfiguration -> UpdateStack)
-> Lens
     UpdateStack
     UpdateStack
     (Maybe RollbackConfiguration)
     (Maybe 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)

-- | 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 :: (Maybe [Text] -> f (Maybe [Text])) -> UpdateStack -> f UpdateStack
updateStack_resourceTypes = (UpdateStack -> Maybe [Text])
-> (UpdateStack -> Maybe [Text] -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateStack -> f UpdateStack)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateStack
-> f UpdateStack
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 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 :: (Maybe [Tag] -> f (Maybe [Tag])) -> UpdateStack -> f UpdateStack
updateStack_tags = (UpdateStack -> Maybe [Tag])
-> (UpdateStack -> Maybe [Tag] -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe [Tag]) (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag])) -> UpdateStack -> f UpdateStack)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> UpdateStack
-> f UpdateStack
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 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. 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.
updateStack_roleARN :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_roleARN :: (Maybe Text -> f (Maybe Text)) -> UpdateStack -> f UpdateStack
updateStack_roleARN = (UpdateStack -> Maybe Text)
-> (UpdateStack -> Maybe Text -> UpdateStack)
-> Lens UpdateStack UpdateStack (Maybe Text) (Maybe Text)
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 name or unique stack ID of the stack to update.
updateStack_stackName :: Lens.Lens' UpdateStack Prelude.Text
updateStack_stackName :: (Text -> f Text) -> UpdateStack -> f UpdateStack
updateStack_stackName = (UpdateStack -> Text)
-> (UpdateStack -> Text -> UpdateStack)
-> Lens UpdateStack UpdateStack Text Text
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 :: UpdateStack -> Request UpdateStack
request = Service -> UpdateStack -> Request UpdateStack
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateStack)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse UpdateStack))
-> Logger
-> Service
-> Proxy UpdateStack
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateStack)))
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
"UpdateStackResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> UpdateStackResponse
UpdateStackResponse'
            (Maybe Text -> Int -> UpdateStackResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateStackResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StackId")
            Either String (Int -> UpdateStackResponse)
-> Either String Int -> Either String UpdateStackResponse
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 UpdateStack

instance Prelude.NFData UpdateStack

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

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

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

-- | 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
(UpdateStackResponse -> UpdateStackResponse -> Bool)
-> (UpdateStackResponse -> UpdateStackResponse -> Bool)
-> Eq UpdateStackResponse
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]
(Int -> ReadS UpdateStackResponse)
-> ReadS [UpdateStackResponse]
-> ReadPrec UpdateStackResponse
-> ReadPrec [UpdateStackResponse]
-> Read 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
(Int -> UpdateStackResponse -> ShowS)
-> (UpdateStackResponse -> String)
-> ([UpdateStackResponse] -> ShowS)
-> Show UpdateStackResponse
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. UpdateStackResponse -> Rep UpdateStackResponse x)
-> (forall x. Rep UpdateStackResponse x -> UpdateStackResponse)
-> Generic UpdateStackResponse
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' :: Maybe Text -> Int -> UpdateStackResponse
UpdateStackResponse'
    { $sel:stackId:UpdateStackResponse' :: Maybe Text
stackId = Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateStackResponse -> f UpdateStackResponse
updateStackResponse_stackId = (UpdateStackResponse -> Maybe Text)
-> (UpdateStackResponse -> Maybe Text -> UpdateStackResponse)
-> Lens
     UpdateStackResponse UpdateStackResponse (Maybe Text) (Maybe Text)
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 :: (Int -> f Int) -> UpdateStackResponse -> f UpdateStackResponse
updateStackResponse_httpStatus = (UpdateStackResponse -> Int)
-> (UpdateStackResponse -> Int -> UpdateStackResponse)
-> Lens UpdateStackResponse UpdateStackResponse Int Int
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