{-# 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.OpsWorks.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 specified stack.
--
-- __Required Permissions__: To use this action, an IAM user must have a
-- Manage permissions level for the stack, or an attached policy that
-- explicitly grants permissions. For more information on user permissions,
-- see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html Managing User Permissions>.
module Amazonka.OpsWorks.UpdateStack
  ( -- * Creating a Request
    UpdateStack (..),
    newUpdateStack,

    -- * Request Lenses
    updateStack_agentVersion,
    updateStack_attributes,
    updateStack_chefConfiguration,
    updateStack_configurationManager,
    updateStack_customCookbooksSource,
    updateStack_customJson,
    updateStack_defaultAvailabilityZone,
    updateStack_defaultInstanceProfileArn,
    updateStack_defaultOs,
    updateStack_defaultRootDeviceType,
    updateStack_defaultSshKeyName,
    updateStack_defaultSubnetId,
    updateStack_hostnameTheme,
    updateStack_name,
    updateStack_serviceRoleArn,
    updateStack_useCustomCookbooks,
    updateStack_useOpsworksSecurityGroups,
    updateStack_stackId,

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

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

-- | /See:/ 'newUpdateStack' smart constructor.
data UpdateStack = UpdateStack'
  { -- | The default AWS OpsWorks Stacks agent version. You have the following
    -- options:
    --
    -- -   Auto-update - Set this parameter to @LATEST@. AWS OpsWorks Stacks
    --     automatically installs new agent versions on the stack\'s instances
    --     as soon as they are available.
    --
    -- -   Fixed version - Set this parameter to your preferred agent version.
    --     To update the agent version, you must edit the stack configuration
    --     and specify a new version. AWS OpsWorks Stacks then automatically
    --     installs that version on the stack\'s instances.
    --
    -- The default setting is @LATEST@. To specify an agent version, you must
    -- use the complete version number, not the abbreviated number shown on the
    -- console. For a list of available agent version numbers, call
    -- DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.
    --
    -- You can also specify an agent version when you create or update an
    -- instance, which overrides the stack\'s default setting.
    UpdateStack -> Maybe Text
agentVersion :: Prelude.Maybe Prelude.Text,
    -- | One or more user-defined key-value pairs to be added to the stack
    -- attributes.
    UpdateStack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes :: Prelude.Maybe (Prelude.HashMap StackAttributesKeys (Prelude.Maybe Prelude.Text)),
    -- | A @ChefConfiguration@ object that specifies whether to enable Berkshelf
    -- and the Berkshelf version on Chef 11.10 stacks. For more information,
    -- see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html Create a New Stack>.
    UpdateStack -> Maybe ChefConfiguration
chefConfiguration :: Prelude.Maybe ChefConfiguration,
    -- | The configuration manager. When you update a stack, we recommend that
    -- you use the configuration manager to specify the Chef version: 12,
    -- 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default
    -- value for Linux stacks is currently 12.
    UpdateStack -> Maybe StackConfigurationManager
configurationManager :: Prelude.Maybe StackConfigurationManager,
    -- | Contains the information required to retrieve an app or cookbook from a
    -- repository. For more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html Adding Apps>
    -- or
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html Cookbooks and Recipes>.
    UpdateStack -> Maybe Source
customCookbooksSource :: Prelude.Maybe Source,
    -- | A string that contains user-defined, custom JSON. It can be used to
    -- override the corresponding default stack configuration JSON values or to
    -- pass data to recipes. The string should be in the following format:
    --
    -- @\"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\",...}\"@
    --
    -- For more information about custom JSON, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html Use Custom JSON to Modify the Stack Configuration Attributes>.
    UpdateStack -> Maybe Text
customJson :: Prelude.Maybe Prelude.Text,
    -- | The stack\'s default Availability Zone, which must be in the stack\'s
    -- region. For more information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/rande.html Regions and Endpoints>.
    -- If you also specify a value for @DefaultSubnetId@, the subnet must be in
    -- the same zone. For more information, see CreateStack.
    UpdateStack -> Maybe Text
defaultAvailabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The ARN of an IAM profile that is the default profile for all of the
    -- stack\'s EC2 instances. For more information about IAM ARNs, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
    UpdateStack -> Maybe Text
defaultInstanceProfileArn :: Prelude.Maybe Prelude.Text,
    -- | The stack\'s operating system, which must be set to one of the
    -- following:
    --
    -- -   A supported Linux operating system: An Amazon Linux version, such as
    --     @Amazon Linux 2018.03@, @Amazon Linux 2017.09@,
    --     @Amazon Linux 2017.03@, @Amazon Linux 2016.09@,
    --     @Amazon Linux 2016.03@, @Amazon Linux 2015.09@, or
    --     @Amazon Linux 2015.03@.
    --
    -- -   A supported Ubuntu operating system, such as @Ubuntu 16.04 LTS@,
    --     @Ubuntu 14.04 LTS@, or @Ubuntu 12.04 LTS@.
    --
    -- -   @CentOS Linux 7@
    --
    -- -   @Red Hat Enterprise Linux 7@
    --
    -- -   A supported Windows operating system, such as
    --     @Microsoft Windows Server 2012 R2 Base@,
    --     @Microsoft Windows Server 2012 R2 with SQL Server Express@,
    --     @Microsoft Windows Server 2012 R2 with SQL Server Standard@, or
    --     @Microsoft Windows Server 2012 R2 with SQL Server Web@.
    --
    -- -   A custom AMI: @Custom@. You specify the custom AMI you want to use
    --     when you create instances. For more information about how to use
    --     custom AMIs with OpsWorks, see
    --     <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html Using Custom AMIs>.
    --
    -- The default option is the stack\'s current operating system. For more
    -- information about supported operating systems, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html AWS OpsWorks Stacks Operating Systems>.
    UpdateStack -> Maybe Text
defaultOs :: Prelude.Maybe Prelude.Text,
    -- | The default root device type. This value is used by default for all
    -- instances in the stack, but you can override it when you create an
    -- instance. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device Storage for the Root Device>.
    UpdateStack -> Maybe RootDeviceType
defaultRootDeviceType :: Prelude.Maybe RootDeviceType,
    -- | A default Amazon EC2 key-pair name. The default value is @none@. If you
    -- specify a key-pair name, AWS OpsWorks Stacks installs the public key on
    -- the instance and you can use the private key with an SSH client to log
    -- in to the instance. For more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html Using SSH to Communicate with an Instance>
    -- and
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html Managing SSH Access>.
    -- You can override this setting by specifying a different key pair, or no
    -- key pair, when you
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html create an instance>.
    UpdateStack -> Maybe Text
defaultSshKeyName :: Prelude.Maybe Prelude.Text,
    -- | The stack\'s default VPC subnet ID. This parameter is required if you
    -- specify a value for the @VpcId@ parameter. All instances are launched
    -- into this subnet unless you specify otherwise when you create the
    -- instance. If you also specify a value for @DefaultAvailabilityZone@, the
    -- subnet must be in that zone. For information on default values and when
    -- this parameter is required, see the @VpcId@ parameter description.
    UpdateStack -> Maybe Text
defaultSubnetId :: Prelude.Maybe Prelude.Text,
    -- | The stack\'s new host name theme, with spaces replaced by underscores.
    -- The theme is used to generate host names for the stack\'s instances. By
    -- default, @HostnameTheme@ is set to @Layer_Dependent@, which creates host
    -- names by appending integers to the layer\'s short name. The other themes
    -- are:
    --
    -- -   @Baked_Goods@
    --
    -- -   @Clouds@
    --
    -- -   @Europe_Cities@
    --
    -- -   @Fruits@
    --
    -- -   @Greek_Deities_and_Titans@
    --
    -- -   @Legendary_creatures_from_Japan@
    --
    -- -   @Planets_and_Moons@
    --
    -- -   @Roman_Deities@
    --
    -- -   @Scottish_Islands@
    --
    -- -   @US_Cities@
    --
    -- -   @Wild_Cats@
    --
    -- To obtain a generated host name, call @GetHostNameSuggestion@, which
    -- returns a host name based on the current theme.
    UpdateStack -> Maybe Text
hostnameTheme :: Prelude.Maybe Prelude.Text,
    -- | The stack\'s new name.
    UpdateStack -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Do not use this parameter. You cannot update a stack\'s service role.
    UpdateStack -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Whether the stack uses custom cookbooks.
    UpdateStack -> Maybe Bool
useCustomCookbooks :: Prelude.Maybe Prelude.Bool,
    -- | Whether to associate the AWS OpsWorks Stacks built-in security groups
    -- with the stack\'s layers.
    --
    -- AWS OpsWorks Stacks provides a standard set of built-in security groups,
    -- one for each layer, which are associated with layers by default.
    -- @UseOpsworksSecurityGroups@ allows you to provide your own custom
    -- security groups instead of using the built-in groups.
    -- @UseOpsworksSecurityGroups@ has the following settings:
    --
    -- -   True - AWS OpsWorks Stacks automatically associates the appropriate
    --     built-in security group with each layer (default setting). You can
    --     associate additional security groups with a layer after you create
    --     it, but you cannot delete the built-in security group.
    --
    -- -   False - AWS OpsWorks Stacks does not associate built-in security
    --     groups with layers. You must create appropriate EC2 security groups
    --     and associate a security group with each layer that you create.
    --     However, you can still manually associate a built-in security group
    --     with a layer on. Custom security groups are required only for those
    --     layers that need custom settings.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html Create a New Stack>.
    UpdateStack -> Maybe Bool
useOpsworksSecurityGroups :: Prelude.Maybe Prelude.Bool,
    -- | The stack ID.
    UpdateStack -> Text
stackId :: 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:
--
-- 'agentVersion', 'updateStack_agentVersion' - The default AWS OpsWorks Stacks agent version. You have the following
-- options:
--
-- -   Auto-update - Set this parameter to @LATEST@. AWS OpsWorks Stacks
--     automatically installs new agent versions on the stack\'s instances
--     as soon as they are available.
--
-- -   Fixed version - Set this parameter to your preferred agent version.
--     To update the agent version, you must edit the stack configuration
--     and specify a new version. AWS OpsWorks Stacks then automatically
--     installs that version on the stack\'s instances.
--
-- The default setting is @LATEST@. To specify an agent version, you must
-- use the complete version number, not the abbreviated number shown on the
-- console. For a list of available agent version numbers, call
-- DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.
--
-- You can also specify an agent version when you create or update an
-- instance, which overrides the stack\'s default setting.
--
-- 'attributes', 'updateStack_attributes' - One or more user-defined key-value pairs to be added to the stack
-- attributes.
--
-- 'chefConfiguration', 'updateStack_chefConfiguration' - A @ChefConfiguration@ object that specifies whether to enable Berkshelf
-- and the Berkshelf version on Chef 11.10 stacks. For more information,
-- see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html Create a New Stack>.
--
-- 'configurationManager', 'updateStack_configurationManager' - The configuration manager. When you update a stack, we recommend that
-- you use the configuration manager to specify the Chef version: 12,
-- 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default
-- value for Linux stacks is currently 12.
--
-- 'customCookbooksSource', 'updateStack_customCookbooksSource' - Contains the information required to retrieve an app or cookbook from a
-- repository. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html Adding Apps>
-- or
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html Cookbooks and Recipes>.
--
-- 'customJson', 'updateStack_customJson' - A string that contains user-defined, custom JSON. It can be used to
-- override the corresponding default stack configuration JSON values or to
-- pass data to recipes. The string should be in the following format:
--
-- @\"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\",...}\"@
--
-- For more information about custom JSON, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html Use Custom JSON to Modify the Stack Configuration Attributes>.
--
-- 'defaultAvailabilityZone', 'updateStack_defaultAvailabilityZone' - The stack\'s default Availability Zone, which must be in the stack\'s
-- region. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html Regions and Endpoints>.
-- If you also specify a value for @DefaultSubnetId@, the subnet must be in
-- the same zone. For more information, see CreateStack.
--
-- 'defaultInstanceProfileArn', 'updateStack_defaultInstanceProfileArn' - The ARN of an IAM profile that is the default profile for all of the
-- stack\'s EC2 instances. For more information about IAM ARNs, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
--
-- 'defaultOs', 'updateStack_defaultOs' - The stack\'s operating system, which must be set to one of the
-- following:
--
-- -   A supported Linux operating system: An Amazon Linux version, such as
--     @Amazon Linux 2018.03@, @Amazon Linux 2017.09@,
--     @Amazon Linux 2017.03@, @Amazon Linux 2016.09@,
--     @Amazon Linux 2016.03@, @Amazon Linux 2015.09@, or
--     @Amazon Linux 2015.03@.
--
-- -   A supported Ubuntu operating system, such as @Ubuntu 16.04 LTS@,
--     @Ubuntu 14.04 LTS@, or @Ubuntu 12.04 LTS@.
--
-- -   @CentOS Linux 7@
--
-- -   @Red Hat Enterprise Linux 7@
--
-- -   A supported Windows operating system, such as
--     @Microsoft Windows Server 2012 R2 Base@,
--     @Microsoft Windows Server 2012 R2 with SQL Server Express@,
--     @Microsoft Windows Server 2012 R2 with SQL Server Standard@, or
--     @Microsoft Windows Server 2012 R2 with SQL Server Web@.
--
-- -   A custom AMI: @Custom@. You specify the custom AMI you want to use
--     when you create instances. For more information about how to use
--     custom AMIs with OpsWorks, see
--     <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html Using Custom AMIs>.
--
-- The default option is the stack\'s current operating system. For more
-- information about supported operating systems, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html AWS OpsWorks Stacks Operating Systems>.
--
-- 'defaultRootDeviceType', 'updateStack_defaultRootDeviceType' - The default root device type. This value is used by default for all
-- instances in the stack, but you can override it when you create an
-- instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device Storage for the Root Device>.
--
-- 'defaultSshKeyName', 'updateStack_defaultSshKeyName' - A default Amazon EC2 key-pair name. The default value is @none@. If you
-- specify a key-pair name, AWS OpsWorks Stacks installs the public key on
-- the instance and you can use the private key with an SSH client to log
-- in to the instance. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html Using SSH to Communicate with an Instance>
-- and
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html Managing SSH Access>.
-- You can override this setting by specifying a different key pair, or no
-- key pair, when you
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html create an instance>.
--
-- 'defaultSubnetId', 'updateStack_defaultSubnetId' - The stack\'s default VPC subnet ID. This parameter is required if you
-- specify a value for the @VpcId@ parameter. All instances are launched
-- into this subnet unless you specify otherwise when you create the
-- instance. If you also specify a value for @DefaultAvailabilityZone@, the
-- subnet must be in that zone. For information on default values and when
-- this parameter is required, see the @VpcId@ parameter description.
--
-- 'hostnameTheme', 'updateStack_hostnameTheme' - The stack\'s new host name theme, with spaces replaced by underscores.
-- The theme is used to generate host names for the stack\'s instances. By
-- default, @HostnameTheme@ is set to @Layer_Dependent@, which creates host
-- names by appending integers to the layer\'s short name. The other themes
-- are:
--
-- -   @Baked_Goods@
--
-- -   @Clouds@
--
-- -   @Europe_Cities@
--
-- -   @Fruits@
--
-- -   @Greek_Deities_and_Titans@
--
-- -   @Legendary_creatures_from_Japan@
--
-- -   @Planets_and_Moons@
--
-- -   @Roman_Deities@
--
-- -   @Scottish_Islands@
--
-- -   @US_Cities@
--
-- -   @Wild_Cats@
--
-- To obtain a generated host name, call @GetHostNameSuggestion@, which
-- returns a host name based on the current theme.
--
-- 'name', 'updateStack_name' - The stack\'s new name.
--
-- 'serviceRoleArn', 'updateStack_serviceRoleArn' - Do not use this parameter. You cannot update a stack\'s service role.
--
-- 'useCustomCookbooks', 'updateStack_useCustomCookbooks' - Whether the stack uses custom cookbooks.
--
-- 'useOpsworksSecurityGroups', 'updateStack_useOpsworksSecurityGroups' - Whether to associate the AWS OpsWorks Stacks built-in security groups
-- with the stack\'s layers.
--
-- AWS OpsWorks Stacks provides a standard set of built-in security groups,
-- one for each layer, which are associated with layers by default.
-- @UseOpsworksSecurityGroups@ allows you to provide your own custom
-- security groups instead of using the built-in groups.
-- @UseOpsworksSecurityGroups@ has the following settings:
--
-- -   True - AWS OpsWorks Stacks automatically associates the appropriate
--     built-in security group with each layer (default setting). You can
--     associate additional security groups with a layer after you create
--     it, but you cannot delete the built-in security group.
--
-- -   False - AWS OpsWorks Stacks does not associate built-in security
--     groups with layers. You must create appropriate EC2 security groups
--     and associate a security group with each layer that you create.
--     However, you can still manually associate a built-in security group
--     with a layer on. Custom security groups are required only for those
--     layers that need custom settings.
--
-- For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html Create a New Stack>.
--
-- 'stackId', 'updateStack_stackId' - The stack ID.
newUpdateStack ::
  -- | 'stackId'
  Prelude.Text ->
  UpdateStack
newUpdateStack :: Text -> UpdateStack
newUpdateStack Text
pStackId_ =
  UpdateStack'
    { $sel:agentVersion:UpdateStack' :: Maybe Text
agentVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:attributes:UpdateStack' :: Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes = forall a. Maybe a
Prelude.Nothing,
      $sel:chefConfiguration:UpdateStack' :: Maybe ChefConfiguration
chefConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:configurationManager:UpdateStack' :: Maybe StackConfigurationManager
configurationManager = forall a. Maybe a
Prelude.Nothing,
      $sel:customCookbooksSource:UpdateStack' :: Maybe Source
customCookbooksSource = forall a. Maybe a
Prelude.Nothing,
      $sel:customJson:UpdateStack' :: Maybe Text
customJson = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultAvailabilityZone:UpdateStack' :: Maybe Text
defaultAvailabilityZone = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultInstanceProfileArn:UpdateStack' :: Maybe Text
defaultInstanceProfileArn = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultOs:UpdateStack' :: Maybe Text
defaultOs = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRootDeviceType:UpdateStack' :: Maybe RootDeviceType
defaultRootDeviceType = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultSshKeyName:UpdateStack' :: Maybe Text
defaultSshKeyName = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultSubnetId:UpdateStack' :: Maybe Text
defaultSubnetId = forall a. Maybe a
Prelude.Nothing,
      $sel:hostnameTheme:UpdateStack' :: Maybe Text
hostnameTheme = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateStack' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRoleArn:UpdateStack' :: Maybe Text
serviceRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:useCustomCookbooks:UpdateStack' :: Maybe Bool
useCustomCookbooks = forall a. Maybe a
Prelude.Nothing,
      $sel:useOpsworksSecurityGroups:UpdateStack' :: Maybe Bool
useOpsworksSecurityGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:UpdateStack' :: Text
stackId = Text
pStackId_
    }

-- | The default AWS OpsWorks Stacks agent version. You have the following
-- options:
--
-- -   Auto-update - Set this parameter to @LATEST@. AWS OpsWorks Stacks
--     automatically installs new agent versions on the stack\'s instances
--     as soon as they are available.
--
-- -   Fixed version - Set this parameter to your preferred agent version.
--     To update the agent version, you must edit the stack configuration
--     and specify a new version. AWS OpsWorks Stacks then automatically
--     installs that version on the stack\'s instances.
--
-- The default setting is @LATEST@. To specify an agent version, you must
-- use the complete version number, not the abbreviated number shown on the
-- console. For a list of available agent version numbers, call
-- DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.
--
-- You can also specify an agent version when you create or update an
-- instance, which overrides the stack\'s default setting.
updateStack_agentVersion :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_agentVersion :: Lens' UpdateStack (Maybe Text)
updateStack_agentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
agentVersion :: Maybe Text
$sel:agentVersion:UpdateStack' :: UpdateStack -> Maybe Text
agentVersion} -> Maybe Text
agentVersion) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:agentVersion:UpdateStack' :: Maybe Text
agentVersion = Maybe Text
a} :: UpdateStack)

-- | One or more user-defined key-value pairs to be added to the stack
-- attributes.
updateStack_attributes :: Lens.Lens' UpdateStack (Prelude.Maybe (Prelude.HashMap StackAttributesKeys (Prelude.Maybe Prelude.Text)))
updateStack_attributes :: Lens'
  UpdateStack (Maybe (HashMap StackAttributesKeys (Maybe Text)))
updateStack_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes :: Maybe (HashMap StackAttributesKeys (Maybe Text))
$sel:attributes:UpdateStack' :: UpdateStack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes} -> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes) (\s :: UpdateStack
s@UpdateStack' {} Maybe (HashMap StackAttributesKeys (Maybe Text))
a -> UpdateStack
s {$sel:attributes:UpdateStack' :: Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes = Maybe (HashMap StackAttributesKeys (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 @ChefConfiguration@ object that specifies whether to enable Berkshelf
-- and the Berkshelf version on Chef 11.10 stacks. For more information,
-- see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html Create a New Stack>.
updateStack_chefConfiguration :: Lens.Lens' UpdateStack (Prelude.Maybe ChefConfiguration)
updateStack_chefConfiguration :: Lens' UpdateStack (Maybe ChefConfiguration)
updateStack_chefConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe ChefConfiguration
chefConfiguration :: Maybe ChefConfiguration
$sel:chefConfiguration:UpdateStack' :: UpdateStack -> Maybe ChefConfiguration
chefConfiguration} -> Maybe ChefConfiguration
chefConfiguration) (\s :: UpdateStack
s@UpdateStack' {} Maybe ChefConfiguration
a -> UpdateStack
s {$sel:chefConfiguration:UpdateStack' :: Maybe ChefConfiguration
chefConfiguration = Maybe ChefConfiguration
a} :: UpdateStack)

-- | The configuration manager. When you update a stack, we recommend that
-- you use the configuration manager to specify the Chef version: 12,
-- 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default
-- value for Linux stacks is currently 12.
updateStack_configurationManager :: Lens.Lens' UpdateStack (Prelude.Maybe StackConfigurationManager)
updateStack_configurationManager :: Lens' UpdateStack (Maybe StackConfigurationManager)
updateStack_configurationManager = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe StackConfigurationManager
configurationManager :: Maybe StackConfigurationManager
$sel:configurationManager:UpdateStack' :: UpdateStack -> Maybe StackConfigurationManager
configurationManager} -> Maybe StackConfigurationManager
configurationManager) (\s :: UpdateStack
s@UpdateStack' {} Maybe StackConfigurationManager
a -> UpdateStack
s {$sel:configurationManager:UpdateStack' :: Maybe StackConfigurationManager
configurationManager = Maybe StackConfigurationManager
a} :: UpdateStack)

-- | Contains the information required to retrieve an app or cookbook from a
-- repository. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html Adding Apps>
-- or
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html Cookbooks and Recipes>.
updateStack_customCookbooksSource :: Lens.Lens' UpdateStack (Prelude.Maybe Source)
updateStack_customCookbooksSource :: Lens' UpdateStack (Maybe Source)
updateStack_customCookbooksSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Source
customCookbooksSource :: Maybe Source
$sel:customCookbooksSource:UpdateStack' :: UpdateStack -> Maybe Source
customCookbooksSource} -> Maybe Source
customCookbooksSource) (\s :: UpdateStack
s@UpdateStack' {} Maybe Source
a -> UpdateStack
s {$sel:customCookbooksSource:UpdateStack' :: Maybe Source
customCookbooksSource = Maybe Source
a} :: UpdateStack)

-- | A string that contains user-defined, custom JSON. It can be used to
-- override the corresponding default stack configuration JSON values or to
-- pass data to recipes. The string should be in the following format:
--
-- @\"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\",...}\"@
--
-- For more information about custom JSON, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html Use Custom JSON to Modify the Stack Configuration Attributes>.
updateStack_customJson :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_customJson :: Lens' UpdateStack (Maybe Text)
updateStack_customJson = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
customJson :: Maybe Text
$sel:customJson:UpdateStack' :: UpdateStack -> Maybe Text
customJson} -> Maybe Text
customJson) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:customJson:UpdateStack' :: Maybe Text
customJson = Maybe Text
a} :: UpdateStack)

-- | The stack\'s default Availability Zone, which must be in the stack\'s
-- region. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html Regions and Endpoints>.
-- If you also specify a value for @DefaultSubnetId@, the subnet must be in
-- the same zone. For more information, see CreateStack.
updateStack_defaultAvailabilityZone :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_defaultAvailabilityZone :: Lens' UpdateStack (Maybe Text)
updateStack_defaultAvailabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
defaultAvailabilityZone :: Maybe Text
$sel:defaultAvailabilityZone:UpdateStack' :: UpdateStack -> Maybe Text
defaultAvailabilityZone} -> Maybe Text
defaultAvailabilityZone) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:defaultAvailabilityZone:UpdateStack' :: Maybe Text
defaultAvailabilityZone = Maybe Text
a} :: UpdateStack)

-- | The ARN of an IAM profile that is the default profile for all of the
-- stack\'s EC2 instances. For more information about IAM ARNs, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
updateStack_defaultInstanceProfileArn :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_defaultInstanceProfileArn :: Lens' UpdateStack (Maybe Text)
updateStack_defaultInstanceProfileArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
defaultInstanceProfileArn :: Maybe Text
$sel:defaultInstanceProfileArn:UpdateStack' :: UpdateStack -> Maybe Text
defaultInstanceProfileArn} -> Maybe Text
defaultInstanceProfileArn) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:defaultInstanceProfileArn:UpdateStack' :: Maybe Text
defaultInstanceProfileArn = Maybe Text
a} :: UpdateStack)

-- | The stack\'s operating system, which must be set to one of the
-- following:
--
-- -   A supported Linux operating system: An Amazon Linux version, such as
--     @Amazon Linux 2018.03@, @Amazon Linux 2017.09@,
--     @Amazon Linux 2017.03@, @Amazon Linux 2016.09@,
--     @Amazon Linux 2016.03@, @Amazon Linux 2015.09@, or
--     @Amazon Linux 2015.03@.
--
-- -   A supported Ubuntu operating system, such as @Ubuntu 16.04 LTS@,
--     @Ubuntu 14.04 LTS@, or @Ubuntu 12.04 LTS@.
--
-- -   @CentOS Linux 7@
--
-- -   @Red Hat Enterprise Linux 7@
--
-- -   A supported Windows operating system, such as
--     @Microsoft Windows Server 2012 R2 Base@,
--     @Microsoft Windows Server 2012 R2 with SQL Server Express@,
--     @Microsoft Windows Server 2012 R2 with SQL Server Standard@, or
--     @Microsoft Windows Server 2012 R2 with SQL Server Web@.
--
-- -   A custom AMI: @Custom@. You specify the custom AMI you want to use
--     when you create instances. For more information about how to use
--     custom AMIs with OpsWorks, see
--     <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html Using Custom AMIs>.
--
-- The default option is the stack\'s current operating system. For more
-- information about supported operating systems, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html AWS OpsWorks Stacks Operating Systems>.
updateStack_defaultOs :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_defaultOs :: Lens' UpdateStack (Maybe Text)
updateStack_defaultOs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
defaultOs :: Maybe Text
$sel:defaultOs:UpdateStack' :: UpdateStack -> Maybe Text
defaultOs} -> Maybe Text
defaultOs) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:defaultOs:UpdateStack' :: Maybe Text
defaultOs = Maybe Text
a} :: UpdateStack)

-- | The default root device type. This value is used by default for all
-- instances in the stack, but you can override it when you create an
-- instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device Storage for the Root Device>.
updateStack_defaultRootDeviceType :: Lens.Lens' UpdateStack (Prelude.Maybe RootDeviceType)
updateStack_defaultRootDeviceType :: Lens' UpdateStack (Maybe RootDeviceType)
updateStack_defaultRootDeviceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe RootDeviceType
defaultRootDeviceType :: Maybe RootDeviceType
$sel:defaultRootDeviceType:UpdateStack' :: UpdateStack -> Maybe RootDeviceType
defaultRootDeviceType} -> Maybe RootDeviceType
defaultRootDeviceType) (\s :: UpdateStack
s@UpdateStack' {} Maybe RootDeviceType
a -> UpdateStack
s {$sel:defaultRootDeviceType:UpdateStack' :: Maybe RootDeviceType
defaultRootDeviceType = Maybe RootDeviceType
a} :: UpdateStack)

-- | A default Amazon EC2 key-pair name. The default value is @none@. If you
-- specify a key-pair name, AWS OpsWorks Stacks installs the public key on
-- the instance and you can use the private key with an SSH client to log
-- in to the instance. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html Using SSH to Communicate with an Instance>
-- and
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/security-ssh-access.html Managing SSH Access>.
-- You can override this setting by specifying a different key pair, or no
-- key pair, when you
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html create an instance>.
updateStack_defaultSshKeyName :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_defaultSshKeyName :: Lens' UpdateStack (Maybe Text)
updateStack_defaultSshKeyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
defaultSshKeyName :: Maybe Text
$sel:defaultSshKeyName:UpdateStack' :: UpdateStack -> Maybe Text
defaultSshKeyName} -> Maybe Text
defaultSshKeyName) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:defaultSshKeyName:UpdateStack' :: Maybe Text
defaultSshKeyName = Maybe Text
a} :: UpdateStack)

-- | The stack\'s default VPC subnet ID. This parameter is required if you
-- specify a value for the @VpcId@ parameter. All instances are launched
-- into this subnet unless you specify otherwise when you create the
-- instance. If you also specify a value for @DefaultAvailabilityZone@, the
-- subnet must be in that zone. For information on default values and when
-- this parameter is required, see the @VpcId@ parameter description.
updateStack_defaultSubnetId :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_defaultSubnetId :: Lens' UpdateStack (Maybe Text)
updateStack_defaultSubnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
defaultSubnetId :: Maybe Text
$sel:defaultSubnetId:UpdateStack' :: UpdateStack -> Maybe Text
defaultSubnetId} -> Maybe Text
defaultSubnetId) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:defaultSubnetId:UpdateStack' :: Maybe Text
defaultSubnetId = Maybe Text
a} :: UpdateStack)

-- | The stack\'s new host name theme, with spaces replaced by underscores.
-- The theme is used to generate host names for the stack\'s instances. By
-- default, @HostnameTheme@ is set to @Layer_Dependent@, which creates host
-- names by appending integers to the layer\'s short name. The other themes
-- are:
--
-- -   @Baked_Goods@
--
-- -   @Clouds@
--
-- -   @Europe_Cities@
--
-- -   @Fruits@
--
-- -   @Greek_Deities_and_Titans@
--
-- -   @Legendary_creatures_from_Japan@
--
-- -   @Planets_and_Moons@
--
-- -   @Roman_Deities@
--
-- -   @Scottish_Islands@
--
-- -   @US_Cities@
--
-- -   @Wild_Cats@
--
-- To obtain a generated host name, call @GetHostNameSuggestion@, which
-- returns a host name based on the current theme.
updateStack_hostnameTheme :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_hostnameTheme :: Lens' UpdateStack (Maybe Text)
updateStack_hostnameTheme = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
hostnameTheme :: Maybe Text
$sel:hostnameTheme:UpdateStack' :: UpdateStack -> Maybe Text
hostnameTheme} -> Maybe Text
hostnameTheme) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:hostnameTheme:UpdateStack' :: Maybe Text
hostnameTheme = Maybe Text
a} :: UpdateStack)

-- | The stack\'s new name.
updateStack_name :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_name :: Lens' UpdateStack (Maybe Text)
updateStack_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
name :: Maybe Text
$sel:name:UpdateStack' :: UpdateStack -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:name:UpdateStack' :: Maybe Text
name = Maybe Text
a} :: UpdateStack)

-- | Do not use this parameter. You cannot update a stack\'s service role.
updateStack_serviceRoleArn :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Text)
updateStack_serviceRoleArn :: Lens' UpdateStack (Maybe Text)
updateStack_serviceRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Text
serviceRoleArn :: Maybe Text
$sel:serviceRoleArn:UpdateStack' :: UpdateStack -> Maybe Text
serviceRoleArn} -> Maybe Text
serviceRoleArn) (\s :: UpdateStack
s@UpdateStack' {} Maybe Text
a -> UpdateStack
s {$sel:serviceRoleArn:UpdateStack' :: Maybe Text
serviceRoleArn = Maybe Text
a} :: UpdateStack)

-- | Whether the stack uses custom cookbooks.
updateStack_useCustomCookbooks :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Bool)
updateStack_useCustomCookbooks :: Lens' UpdateStack (Maybe Bool)
updateStack_useCustomCookbooks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Bool
useCustomCookbooks :: Maybe Bool
$sel:useCustomCookbooks:UpdateStack' :: UpdateStack -> Maybe Bool
useCustomCookbooks} -> Maybe Bool
useCustomCookbooks) (\s :: UpdateStack
s@UpdateStack' {} Maybe Bool
a -> UpdateStack
s {$sel:useCustomCookbooks:UpdateStack' :: Maybe Bool
useCustomCookbooks = Maybe Bool
a} :: UpdateStack)

-- | Whether to associate the AWS OpsWorks Stacks built-in security groups
-- with the stack\'s layers.
--
-- AWS OpsWorks Stacks provides a standard set of built-in security groups,
-- one for each layer, which are associated with layers by default.
-- @UseOpsworksSecurityGroups@ allows you to provide your own custom
-- security groups instead of using the built-in groups.
-- @UseOpsworksSecurityGroups@ has the following settings:
--
-- -   True - AWS OpsWorks Stacks automatically associates the appropriate
--     built-in security group with each layer (default setting). You can
--     associate additional security groups with a layer after you create
--     it, but you cannot delete the built-in security group.
--
-- -   False - AWS OpsWorks Stacks does not associate built-in security
--     groups with layers. You must create appropriate EC2 security groups
--     and associate a security group with each layer that you create.
--     However, you can still manually associate a built-in security group
--     with a layer on. Custom security groups are required only for those
--     layers that need custom settings.
--
-- For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html Create a New Stack>.
updateStack_useOpsworksSecurityGroups :: Lens.Lens' UpdateStack (Prelude.Maybe Prelude.Bool)
updateStack_useOpsworksSecurityGroups :: Lens' UpdateStack (Maybe Bool)
updateStack_useOpsworksSecurityGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Maybe Bool
useOpsworksSecurityGroups :: Maybe Bool
$sel:useOpsworksSecurityGroups:UpdateStack' :: UpdateStack -> Maybe Bool
useOpsworksSecurityGroups} -> Maybe Bool
useOpsworksSecurityGroups) (\s :: UpdateStack
s@UpdateStack' {} Maybe Bool
a -> UpdateStack
s {$sel:useOpsworksSecurityGroups:UpdateStack' :: Maybe Bool
useOpsworksSecurityGroups = Maybe Bool
a} :: UpdateStack)

-- | The stack ID.
updateStack_stackId :: Lens.Lens' UpdateStack Prelude.Text
updateStack_stackId :: Lens' UpdateStack Text
updateStack_stackId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStack' {Text
stackId :: Text
$sel:stackId:UpdateStack' :: UpdateStack -> Text
stackId} -> Text
stackId) (\s :: UpdateStack
s@UpdateStack' {} Text
a -> UpdateStack
s {$sel:stackId:UpdateStack' :: Text
stackId = 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, ToJSON a) => Service -> a -> Request a
Request.postJSON (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 =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull UpdateStackResponse
UpdateStackResponse'

instance Prelude.Hashable UpdateStack where
  hashWithSalt :: Int -> UpdateStack -> Int
hashWithSalt Int
_salt UpdateStack' {Maybe Bool
Maybe Text
Maybe (HashMap StackAttributesKeys (Maybe Text))
Maybe ChefConfiguration
Maybe RootDeviceType
Maybe Source
Maybe StackConfigurationManager
Text
stackId :: Text
useOpsworksSecurityGroups :: Maybe Bool
useCustomCookbooks :: Maybe Bool
serviceRoleArn :: Maybe Text
name :: Maybe Text
hostnameTheme :: Maybe Text
defaultSubnetId :: Maybe Text
defaultSshKeyName :: Maybe Text
defaultRootDeviceType :: Maybe RootDeviceType
defaultOs :: Maybe Text
defaultInstanceProfileArn :: Maybe Text
defaultAvailabilityZone :: Maybe Text
customJson :: Maybe Text
customCookbooksSource :: Maybe Source
configurationManager :: Maybe StackConfigurationManager
chefConfiguration :: Maybe ChefConfiguration
attributes :: Maybe (HashMap StackAttributesKeys (Maybe Text))
agentVersion :: Maybe Text
$sel:stackId:UpdateStack' :: UpdateStack -> Text
$sel:useOpsworksSecurityGroups:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:useCustomCookbooks:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:serviceRoleArn:UpdateStack' :: UpdateStack -> Maybe Text
$sel:name:UpdateStack' :: UpdateStack -> Maybe Text
$sel:hostnameTheme:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultSubnetId:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultSshKeyName:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultRootDeviceType:UpdateStack' :: UpdateStack -> Maybe RootDeviceType
$sel:defaultOs:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultInstanceProfileArn:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultAvailabilityZone:UpdateStack' :: UpdateStack -> Maybe Text
$sel:customJson:UpdateStack' :: UpdateStack -> Maybe Text
$sel:customCookbooksSource:UpdateStack' :: UpdateStack -> Maybe Source
$sel:configurationManager:UpdateStack' :: UpdateStack -> Maybe StackConfigurationManager
$sel:chefConfiguration:UpdateStack' :: UpdateStack -> Maybe ChefConfiguration
$sel:attributes:UpdateStack' :: UpdateStack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
$sel:agentVersion:UpdateStack' :: UpdateStack -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
agentVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChefConfiguration
chefConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StackConfigurationManager
configurationManager
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Source
customCookbooksSource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customJson
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultAvailabilityZone
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultInstanceProfileArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultOs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RootDeviceType
defaultRootDeviceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultSshKeyName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultSubnetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hostnameTheme
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
useCustomCookbooks
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
useOpsworksSecurityGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackId

instance Prelude.NFData UpdateStack where
  rnf :: UpdateStack -> ()
rnf UpdateStack' {Maybe Bool
Maybe Text
Maybe (HashMap StackAttributesKeys (Maybe Text))
Maybe ChefConfiguration
Maybe RootDeviceType
Maybe Source
Maybe StackConfigurationManager
Text
stackId :: Text
useOpsworksSecurityGroups :: Maybe Bool
useCustomCookbooks :: Maybe Bool
serviceRoleArn :: Maybe Text
name :: Maybe Text
hostnameTheme :: Maybe Text
defaultSubnetId :: Maybe Text
defaultSshKeyName :: Maybe Text
defaultRootDeviceType :: Maybe RootDeviceType
defaultOs :: Maybe Text
defaultInstanceProfileArn :: Maybe Text
defaultAvailabilityZone :: Maybe Text
customJson :: Maybe Text
customCookbooksSource :: Maybe Source
configurationManager :: Maybe StackConfigurationManager
chefConfiguration :: Maybe ChefConfiguration
attributes :: Maybe (HashMap StackAttributesKeys (Maybe Text))
agentVersion :: Maybe Text
$sel:stackId:UpdateStack' :: UpdateStack -> Text
$sel:useOpsworksSecurityGroups:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:useCustomCookbooks:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:serviceRoleArn:UpdateStack' :: UpdateStack -> Maybe Text
$sel:name:UpdateStack' :: UpdateStack -> Maybe Text
$sel:hostnameTheme:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultSubnetId:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultSshKeyName:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultRootDeviceType:UpdateStack' :: UpdateStack -> Maybe RootDeviceType
$sel:defaultOs:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultInstanceProfileArn:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultAvailabilityZone:UpdateStack' :: UpdateStack -> Maybe Text
$sel:customJson:UpdateStack' :: UpdateStack -> Maybe Text
$sel:customCookbooksSource:UpdateStack' :: UpdateStack -> Maybe Source
$sel:configurationManager:UpdateStack' :: UpdateStack -> Maybe StackConfigurationManager
$sel:chefConfiguration:UpdateStack' :: UpdateStack -> Maybe ChefConfiguration
$sel:attributes:UpdateStack' :: UpdateStack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
$sel:agentVersion:UpdateStack' :: UpdateStack -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
agentVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ChefConfiguration
chefConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StackConfigurationManager
configurationManager
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Source
customCookbooksSource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customJson
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultAvailabilityZone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultInstanceProfileArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultOs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RootDeviceType
defaultRootDeviceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultSshKeyName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultSubnetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hostnameTheme
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
useCustomCookbooks
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Bool
useOpsworksSecurityGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackId

instance Data.ToHeaders UpdateStack where
  toHeaders :: UpdateStack -> [Header]
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"OpsWorks_20130218.UpdateStack" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateStack where
  toJSON :: UpdateStack -> Value
toJSON UpdateStack' {Maybe Bool
Maybe Text
Maybe (HashMap StackAttributesKeys (Maybe Text))
Maybe ChefConfiguration
Maybe RootDeviceType
Maybe Source
Maybe StackConfigurationManager
Text
stackId :: Text
useOpsworksSecurityGroups :: Maybe Bool
useCustomCookbooks :: Maybe Bool
serviceRoleArn :: Maybe Text
name :: Maybe Text
hostnameTheme :: Maybe Text
defaultSubnetId :: Maybe Text
defaultSshKeyName :: Maybe Text
defaultRootDeviceType :: Maybe RootDeviceType
defaultOs :: Maybe Text
defaultInstanceProfileArn :: Maybe Text
defaultAvailabilityZone :: Maybe Text
customJson :: Maybe Text
customCookbooksSource :: Maybe Source
configurationManager :: Maybe StackConfigurationManager
chefConfiguration :: Maybe ChefConfiguration
attributes :: Maybe (HashMap StackAttributesKeys (Maybe Text))
agentVersion :: Maybe Text
$sel:stackId:UpdateStack' :: UpdateStack -> Text
$sel:useOpsworksSecurityGroups:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:useCustomCookbooks:UpdateStack' :: UpdateStack -> Maybe Bool
$sel:serviceRoleArn:UpdateStack' :: UpdateStack -> Maybe Text
$sel:name:UpdateStack' :: UpdateStack -> Maybe Text
$sel:hostnameTheme:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultSubnetId:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultSshKeyName:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultRootDeviceType:UpdateStack' :: UpdateStack -> Maybe RootDeviceType
$sel:defaultOs:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultInstanceProfileArn:UpdateStack' :: UpdateStack -> Maybe Text
$sel:defaultAvailabilityZone:UpdateStack' :: UpdateStack -> Maybe Text
$sel:customJson:UpdateStack' :: UpdateStack -> Maybe Text
$sel:customCookbooksSource:UpdateStack' :: UpdateStack -> Maybe Source
$sel:configurationManager:UpdateStack' :: UpdateStack -> Maybe StackConfigurationManager
$sel:chefConfiguration:UpdateStack' :: UpdateStack -> Maybe ChefConfiguration
$sel:attributes:UpdateStack' :: UpdateStack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
$sel:agentVersion:UpdateStack' :: UpdateStack -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AgentVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
agentVersion,
            (Key
"Attributes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes,
            (Key
"ChefConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChefConfiguration
chefConfiguration,
            (Key
"ConfigurationManager" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StackConfigurationManager
configurationManager,
            (Key
"CustomCookbooksSource" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Source
customCookbooksSource,
            (Key
"CustomJson" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customJson,
            (Key
"DefaultAvailabilityZone" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultAvailabilityZone,
            (Key
"DefaultInstanceProfileArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultInstanceProfileArn,
            (Key
"DefaultOs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultOs,
            (Key
"DefaultRootDeviceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RootDeviceType
defaultRootDeviceType,
            (Key
"DefaultSshKeyName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultSshKeyName,
            (Key
"DefaultSubnetId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultSubnetId,
            (Key
"HostnameTheme" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
hostnameTheme,
            (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Key
"ServiceRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serviceRoleArn,
            (Key
"UseCustomCookbooks" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useCustomCookbooks,
            (Key
"UseOpsworksSecurityGroups" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useOpsworksSecurityGroups,
            forall a. a -> Maybe a
Prelude.Just (Key
"StackId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
stackId)
          ]
      )

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 = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateStackResponse' smart constructor.
data UpdateStackResponse = UpdateStackResponse'
  {
  }
  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.
newUpdateStackResponse ::
  UpdateStackResponse
newUpdateStackResponse :: UpdateStackResponse
newUpdateStackResponse = UpdateStackResponse
UpdateStackResponse'

instance Prelude.NFData UpdateStackResponse where
  rnf :: UpdateStackResponse -> ()
rnf UpdateStackResponse
_ = ()