{-# 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.UpdateLayer
-- 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 layer.
--
-- __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.UpdateLayer
  ( -- * Creating a Request
    UpdateLayer (..),
    newUpdateLayer,

    -- * Request Lenses
    updateLayer_attributes,
    updateLayer_autoAssignElasticIps,
    updateLayer_autoAssignPublicIps,
    updateLayer_cloudWatchLogsConfiguration,
    updateLayer_customInstanceProfileArn,
    updateLayer_customJson,
    updateLayer_customRecipes,
    updateLayer_customSecurityGroupIds,
    updateLayer_enableAutoHealing,
    updateLayer_installUpdatesOnBoot,
    updateLayer_lifecycleEventConfiguration,
    updateLayer_name,
    updateLayer_packages,
    updateLayer_shortname,
    updateLayer_useEbsOptimizedInstances,
    updateLayer_volumeConfigurations,
    updateLayer_layerId,

    -- * Destructuring the Response
    UpdateLayerResponse (..),
    newUpdateLayerResponse,
  )
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:/ 'newUpdateLayer' smart constructor.
data UpdateLayer = UpdateLayer'
  { -- | One or more user-defined key\/value pairs to be added to the stack
    -- attributes.
    UpdateLayer -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes :: Prelude.Maybe (Prelude.HashMap LayerAttributesKeys (Prelude.Maybe Prelude.Text)),
    -- | Whether to automatically assign an
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html Elastic IP address>
    -- to the layer\'s instances. For more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
    UpdateLayer -> Maybe Bool
autoAssignElasticIps :: Prelude.Maybe Prelude.Bool,
    -- | For stacks that are running in a VPC, whether to automatically assign a
    -- public IP address to the layer\'s instances. For more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
    UpdateLayer -> Maybe Bool
autoAssignPublicIps :: Prelude.Maybe Prelude.Bool,
    -- | Specifies CloudWatch Logs configuration options for the layer. For more
    -- information, see CloudWatchLogsLogStream.
    UpdateLayer -> Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration :: Prelude.Maybe CloudWatchLogsConfiguration,
    -- | The ARN of an IAM profile to be used for all of the layer\'s EC2
    -- instances. For more information about IAM ARNs, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
    UpdateLayer -> Maybe Text
customInstanceProfileArn :: Prelude.Maybe Prelude.Text,
    -- | A JSON-formatted string containing custom stack configuration and
    -- deployment attributes to be installed on the layer\'s instances. For
    -- more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html Using Custom JSON>.
    UpdateLayer -> Maybe Text
customJson :: Prelude.Maybe Prelude.Text,
    -- | A @LayerCustomRecipes@ object that specifies the layer\'s custom
    -- recipes.
    UpdateLayer -> Maybe Recipes
customRecipes :: Prelude.Maybe Recipes,
    -- | An array containing the layer\'s custom security group IDs.
    UpdateLayer -> Maybe [Text]
customSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | Whether to disable auto healing for the layer.
    UpdateLayer -> Maybe Bool
enableAutoHealing :: Prelude.Maybe Prelude.Bool,
    -- | Whether to install operating system and package updates when the
    -- instance boots. The default value is @true@. To control when updates are
    -- installed, set this value to @false@. You must then update your
    -- instances manually by using CreateDeployment to run the
    -- @update_dependencies@ stack command or manually running @yum@ (Amazon
    -- Linux) or @apt-get@ (Ubuntu) on the instances.
    --
    -- We strongly recommend using the default value of @true@, to ensure that
    -- your instances have the latest security updates.
    UpdateLayer -> Maybe Bool
installUpdatesOnBoot :: Prelude.Maybe Prelude.Bool,
    UpdateLayer -> Maybe LifecycleEventConfiguration
lifecycleEventConfiguration :: Prelude.Maybe LifecycleEventConfiguration,
    -- | The layer name, which is used by the console.
    UpdateLayer -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | An array of @Package@ objects that describe the layer\'s packages.
    UpdateLayer -> Maybe [Text]
packages :: Prelude.Maybe [Prelude.Text],
    -- | For custom layers only, use this parameter to specify the layer\'s short
    -- name, which is used internally by AWS OpsWorks Stacks and by Chef. The
    -- short name is also used as the name for the directory where your app
    -- files are installed. It can have a maximum of 200 characters and must be
    -- in the following format: \/\\A[a-z0-9\\-\\_\\.]+\\Z\/.
    --
    -- The built-in layers\' short names are defined by AWS OpsWorks Stacks.
    -- For more information, see the
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/layers.html Layer Reference>
    UpdateLayer -> Maybe Text
shortname :: Prelude.Maybe Prelude.Text,
    -- | Whether to use Amazon EBS-optimized instances.
    UpdateLayer -> Maybe Bool
useEbsOptimizedInstances :: Prelude.Maybe Prelude.Bool,
    -- | A @VolumeConfigurations@ object that describes the layer\'s Amazon EBS
    -- volumes.
    UpdateLayer -> Maybe [VolumeConfiguration]
volumeConfigurations :: Prelude.Maybe [VolumeConfiguration],
    -- | The layer ID.
    UpdateLayer -> Text
layerId :: Prelude.Text
  }
  deriving (UpdateLayer -> UpdateLayer -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLayer -> UpdateLayer -> Bool
$c/= :: UpdateLayer -> UpdateLayer -> Bool
== :: UpdateLayer -> UpdateLayer -> Bool
$c== :: UpdateLayer -> UpdateLayer -> Bool
Prelude.Eq, ReadPrec [UpdateLayer]
ReadPrec UpdateLayer
Int -> ReadS UpdateLayer
ReadS [UpdateLayer]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLayer]
$creadListPrec :: ReadPrec [UpdateLayer]
readPrec :: ReadPrec UpdateLayer
$creadPrec :: ReadPrec UpdateLayer
readList :: ReadS [UpdateLayer]
$creadList :: ReadS [UpdateLayer]
readsPrec :: Int -> ReadS UpdateLayer
$creadsPrec :: Int -> ReadS UpdateLayer
Prelude.Read, Int -> UpdateLayer -> ShowS
[UpdateLayer] -> ShowS
UpdateLayer -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLayer] -> ShowS
$cshowList :: [UpdateLayer] -> ShowS
show :: UpdateLayer -> String
$cshow :: UpdateLayer -> String
showsPrec :: Int -> UpdateLayer -> ShowS
$cshowsPrec :: Int -> UpdateLayer -> ShowS
Prelude.Show, forall x. Rep UpdateLayer x -> UpdateLayer
forall x. UpdateLayer -> Rep UpdateLayer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateLayer x -> UpdateLayer
$cfrom :: forall x. UpdateLayer -> Rep UpdateLayer x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLayer' 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:
--
-- 'attributes', 'updateLayer_attributes' - One or more user-defined key\/value pairs to be added to the stack
-- attributes.
--
-- 'autoAssignElasticIps', 'updateLayer_autoAssignElasticIps' - Whether to automatically assign an
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html Elastic IP address>
-- to the layer\'s instances. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
--
-- 'autoAssignPublicIps', 'updateLayer_autoAssignPublicIps' - For stacks that are running in a VPC, whether to automatically assign a
-- public IP address to the layer\'s instances. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
--
-- 'cloudWatchLogsConfiguration', 'updateLayer_cloudWatchLogsConfiguration' - Specifies CloudWatch Logs configuration options for the layer. For more
-- information, see CloudWatchLogsLogStream.
--
-- 'customInstanceProfileArn', 'updateLayer_customInstanceProfileArn' - The ARN of an IAM profile to be used for all of the layer\'s EC2
-- instances. For more information about IAM ARNs, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
--
-- 'customJson', 'updateLayer_customJson' - A JSON-formatted string containing custom stack configuration and
-- deployment attributes to be installed on the layer\'s instances. For
-- more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html Using Custom JSON>.
--
-- 'customRecipes', 'updateLayer_customRecipes' - A @LayerCustomRecipes@ object that specifies the layer\'s custom
-- recipes.
--
-- 'customSecurityGroupIds', 'updateLayer_customSecurityGroupIds' - An array containing the layer\'s custom security group IDs.
--
-- 'enableAutoHealing', 'updateLayer_enableAutoHealing' - Whether to disable auto healing for the layer.
--
-- 'installUpdatesOnBoot', 'updateLayer_installUpdatesOnBoot' - Whether to install operating system and package updates when the
-- instance boots. The default value is @true@. To control when updates are
-- installed, set this value to @false@. You must then update your
-- instances manually by using CreateDeployment to run the
-- @update_dependencies@ stack command or manually running @yum@ (Amazon
-- Linux) or @apt-get@ (Ubuntu) on the instances.
--
-- We strongly recommend using the default value of @true@, to ensure that
-- your instances have the latest security updates.
--
-- 'lifecycleEventConfiguration', 'updateLayer_lifecycleEventConfiguration' -
--
-- 'name', 'updateLayer_name' - The layer name, which is used by the console.
--
-- 'packages', 'updateLayer_packages' - An array of @Package@ objects that describe the layer\'s packages.
--
-- 'shortname', 'updateLayer_shortname' - For custom layers only, use this parameter to specify the layer\'s short
-- name, which is used internally by AWS OpsWorks Stacks and by Chef. The
-- short name is also used as the name for the directory where your app
-- files are installed. It can have a maximum of 200 characters and must be
-- in the following format: \/\\A[a-z0-9\\-\\_\\.]+\\Z\/.
--
-- The built-in layers\' short names are defined by AWS OpsWorks Stacks.
-- For more information, see the
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/layers.html Layer Reference>
--
-- 'useEbsOptimizedInstances', 'updateLayer_useEbsOptimizedInstances' - Whether to use Amazon EBS-optimized instances.
--
-- 'volumeConfigurations', 'updateLayer_volumeConfigurations' - A @VolumeConfigurations@ object that describes the layer\'s Amazon EBS
-- volumes.
--
-- 'layerId', 'updateLayer_layerId' - The layer ID.
newUpdateLayer ::
  -- | 'layerId'
  Prelude.Text ->
  UpdateLayer
newUpdateLayer :: Text -> UpdateLayer
newUpdateLayer Text
pLayerId_ =
  UpdateLayer'
    { $sel:attributes:UpdateLayer' :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes = forall a. Maybe a
Prelude.Nothing,
      $sel:autoAssignElasticIps:UpdateLayer' :: Maybe Bool
autoAssignElasticIps = forall a. Maybe a
Prelude.Nothing,
      $sel:autoAssignPublicIps:UpdateLayer' :: Maybe Bool
autoAssignPublicIps = forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLogsConfiguration:UpdateLayer' :: Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:customInstanceProfileArn:UpdateLayer' :: Maybe Text
customInstanceProfileArn = forall a. Maybe a
Prelude.Nothing,
      $sel:customJson:UpdateLayer' :: Maybe Text
customJson = forall a. Maybe a
Prelude.Nothing,
      $sel:customRecipes:UpdateLayer' :: Maybe Recipes
customRecipes = forall a. Maybe a
Prelude.Nothing,
      $sel:customSecurityGroupIds:UpdateLayer' :: Maybe [Text]
customSecurityGroupIds = forall a. Maybe a
Prelude.Nothing,
      $sel:enableAutoHealing:UpdateLayer' :: Maybe Bool
enableAutoHealing = forall a. Maybe a
Prelude.Nothing,
      $sel:installUpdatesOnBoot:UpdateLayer' :: Maybe Bool
installUpdatesOnBoot = forall a. Maybe a
Prelude.Nothing,
      $sel:lifecycleEventConfiguration:UpdateLayer' :: Maybe LifecycleEventConfiguration
lifecycleEventConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateLayer' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:packages:UpdateLayer' :: Maybe [Text]
packages = forall a. Maybe a
Prelude.Nothing,
      $sel:shortname:UpdateLayer' :: Maybe Text
shortname = forall a. Maybe a
Prelude.Nothing,
      $sel:useEbsOptimizedInstances:UpdateLayer' :: Maybe Bool
useEbsOptimizedInstances = forall a. Maybe a
Prelude.Nothing,
      $sel:volumeConfigurations:UpdateLayer' :: Maybe [VolumeConfiguration]
volumeConfigurations = forall a. Maybe a
Prelude.Nothing,
      $sel:layerId:UpdateLayer' :: Text
layerId = Text
pLayerId_
    }

-- | One or more user-defined key\/value pairs to be added to the stack
-- attributes.
updateLayer_attributes :: Lens.Lens' UpdateLayer (Prelude.Maybe (Prelude.HashMap LayerAttributesKeys (Prelude.Maybe Prelude.Text)))
updateLayer_attributes :: Lens'
  UpdateLayer (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
updateLayer_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
$sel:attributes:UpdateLayer' :: UpdateLayer -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes} -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe (HashMap LayerAttributesKeys (Maybe Text))
a -> UpdateLayer
s {$sel:attributes:UpdateLayer' :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes = Maybe (HashMap LayerAttributesKeys (Maybe Text))
a} :: UpdateLayer) 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

-- | Whether to automatically assign an
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html Elastic IP address>
-- to the layer\'s instances. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
updateLayer_autoAssignElasticIps :: Lens.Lens' UpdateLayer (Prelude.Maybe Prelude.Bool)
updateLayer_autoAssignElasticIps :: Lens' UpdateLayer (Maybe Bool)
updateLayer_autoAssignElasticIps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe Bool
autoAssignElasticIps :: Maybe Bool
$sel:autoAssignElasticIps:UpdateLayer' :: UpdateLayer -> Maybe Bool
autoAssignElasticIps} -> Maybe Bool
autoAssignElasticIps) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe Bool
a -> UpdateLayer
s {$sel:autoAssignElasticIps:UpdateLayer' :: Maybe Bool
autoAssignElasticIps = Maybe Bool
a} :: UpdateLayer)

-- | For stacks that are running in a VPC, whether to automatically assign a
-- public IP address to the layer\'s instances. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
updateLayer_autoAssignPublicIps :: Lens.Lens' UpdateLayer (Prelude.Maybe Prelude.Bool)
updateLayer_autoAssignPublicIps :: Lens' UpdateLayer (Maybe Bool)
updateLayer_autoAssignPublicIps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe Bool
autoAssignPublicIps :: Maybe Bool
$sel:autoAssignPublicIps:UpdateLayer' :: UpdateLayer -> Maybe Bool
autoAssignPublicIps} -> Maybe Bool
autoAssignPublicIps) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe Bool
a -> UpdateLayer
s {$sel:autoAssignPublicIps:UpdateLayer' :: Maybe Bool
autoAssignPublicIps = Maybe Bool
a} :: UpdateLayer)

-- | Specifies CloudWatch Logs configuration options for the layer. For more
-- information, see CloudWatchLogsLogStream.
updateLayer_cloudWatchLogsConfiguration :: Lens.Lens' UpdateLayer (Prelude.Maybe CloudWatchLogsConfiguration)
updateLayer_cloudWatchLogsConfiguration :: Lens' UpdateLayer (Maybe CloudWatchLogsConfiguration)
updateLayer_cloudWatchLogsConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration :: Maybe CloudWatchLogsConfiguration
$sel:cloudWatchLogsConfiguration:UpdateLayer' :: UpdateLayer -> Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration} -> Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe CloudWatchLogsConfiguration
a -> UpdateLayer
s {$sel:cloudWatchLogsConfiguration:UpdateLayer' :: Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration = Maybe CloudWatchLogsConfiguration
a} :: UpdateLayer)

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

-- | A JSON-formatted string containing custom stack configuration and
-- deployment attributes to be installed on the layer\'s instances. For
-- more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html Using Custom JSON>.
updateLayer_customJson :: Lens.Lens' UpdateLayer (Prelude.Maybe Prelude.Text)
updateLayer_customJson :: Lens' UpdateLayer (Maybe Text)
updateLayer_customJson = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe Text
customJson :: Maybe Text
$sel:customJson:UpdateLayer' :: UpdateLayer -> Maybe Text
customJson} -> Maybe Text
customJson) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe Text
a -> UpdateLayer
s {$sel:customJson:UpdateLayer' :: Maybe Text
customJson = Maybe Text
a} :: UpdateLayer)

-- | A @LayerCustomRecipes@ object that specifies the layer\'s custom
-- recipes.
updateLayer_customRecipes :: Lens.Lens' UpdateLayer (Prelude.Maybe Recipes)
updateLayer_customRecipes :: Lens' UpdateLayer (Maybe Recipes)
updateLayer_customRecipes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe Recipes
customRecipes :: Maybe Recipes
$sel:customRecipes:UpdateLayer' :: UpdateLayer -> Maybe Recipes
customRecipes} -> Maybe Recipes
customRecipes) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe Recipes
a -> UpdateLayer
s {$sel:customRecipes:UpdateLayer' :: Maybe Recipes
customRecipes = Maybe Recipes
a} :: UpdateLayer)

-- | An array containing the layer\'s custom security group IDs.
updateLayer_customSecurityGroupIds :: Lens.Lens' UpdateLayer (Prelude.Maybe [Prelude.Text])
updateLayer_customSecurityGroupIds :: Lens' UpdateLayer (Maybe [Text])
updateLayer_customSecurityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe [Text]
customSecurityGroupIds :: Maybe [Text]
$sel:customSecurityGroupIds:UpdateLayer' :: UpdateLayer -> Maybe [Text]
customSecurityGroupIds} -> Maybe [Text]
customSecurityGroupIds) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe [Text]
a -> UpdateLayer
s {$sel:customSecurityGroupIds:UpdateLayer' :: Maybe [Text]
customSecurityGroupIds = Maybe [Text]
a} :: UpdateLayer) 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

-- | Whether to disable auto healing for the layer.
updateLayer_enableAutoHealing :: Lens.Lens' UpdateLayer (Prelude.Maybe Prelude.Bool)
updateLayer_enableAutoHealing :: Lens' UpdateLayer (Maybe Bool)
updateLayer_enableAutoHealing = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe Bool
enableAutoHealing :: Maybe Bool
$sel:enableAutoHealing:UpdateLayer' :: UpdateLayer -> Maybe Bool
enableAutoHealing} -> Maybe Bool
enableAutoHealing) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe Bool
a -> UpdateLayer
s {$sel:enableAutoHealing:UpdateLayer' :: Maybe Bool
enableAutoHealing = Maybe Bool
a} :: UpdateLayer)

-- | Whether to install operating system and package updates when the
-- instance boots. The default value is @true@. To control when updates are
-- installed, set this value to @false@. You must then update your
-- instances manually by using CreateDeployment to run the
-- @update_dependencies@ stack command or manually running @yum@ (Amazon
-- Linux) or @apt-get@ (Ubuntu) on the instances.
--
-- We strongly recommend using the default value of @true@, to ensure that
-- your instances have the latest security updates.
updateLayer_installUpdatesOnBoot :: Lens.Lens' UpdateLayer (Prelude.Maybe Prelude.Bool)
updateLayer_installUpdatesOnBoot :: Lens' UpdateLayer (Maybe Bool)
updateLayer_installUpdatesOnBoot = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe Bool
installUpdatesOnBoot :: Maybe Bool
$sel:installUpdatesOnBoot:UpdateLayer' :: UpdateLayer -> Maybe Bool
installUpdatesOnBoot} -> Maybe Bool
installUpdatesOnBoot) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe Bool
a -> UpdateLayer
s {$sel:installUpdatesOnBoot:UpdateLayer' :: Maybe Bool
installUpdatesOnBoot = Maybe Bool
a} :: UpdateLayer)

updateLayer_lifecycleEventConfiguration :: Lens.Lens' UpdateLayer (Prelude.Maybe LifecycleEventConfiguration)
updateLayer_lifecycleEventConfiguration :: Lens' UpdateLayer (Maybe LifecycleEventConfiguration)
updateLayer_lifecycleEventConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe LifecycleEventConfiguration
lifecycleEventConfiguration :: Maybe LifecycleEventConfiguration
$sel:lifecycleEventConfiguration:UpdateLayer' :: UpdateLayer -> Maybe LifecycleEventConfiguration
lifecycleEventConfiguration} -> Maybe LifecycleEventConfiguration
lifecycleEventConfiguration) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe LifecycleEventConfiguration
a -> UpdateLayer
s {$sel:lifecycleEventConfiguration:UpdateLayer' :: Maybe LifecycleEventConfiguration
lifecycleEventConfiguration = Maybe LifecycleEventConfiguration
a} :: UpdateLayer)

-- | The layer name, which is used by the console.
updateLayer_name :: Lens.Lens' UpdateLayer (Prelude.Maybe Prelude.Text)
updateLayer_name :: Lens' UpdateLayer (Maybe Text)
updateLayer_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe Text
name :: Maybe Text
$sel:name:UpdateLayer' :: UpdateLayer -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe Text
a -> UpdateLayer
s {$sel:name:UpdateLayer' :: Maybe Text
name = Maybe Text
a} :: UpdateLayer)

-- | An array of @Package@ objects that describe the layer\'s packages.
updateLayer_packages :: Lens.Lens' UpdateLayer (Prelude.Maybe [Prelude.Text])
updateLayer_packages :: Lens' UpdateLayer (Maybe [Text])
updateLayer_packages = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe [Text]
packages :: Maybe [Text]
$sel:packages:UpdateLayer' :: UpdateLayer -> Maybe [Text]
packages} -> Maybe [Text]
packages) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe [Text]
a -> UpdateLayer
s {$sel:packages:UpdateLayer' :: Maybe [Text]
packages = Maybe [Text]
a} :: UpdateLayer) 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

-- | For custom layers only, use this parameter to specify the layer\'s short
-- name, which is used internally by AWS OpsWorks Stacks and by Chef. The
-- short name is also used as the name for the directory where your app
-- files are installed. It can have a maximum of 200 characters and must be
-- in the following format: \/\\A[a-z0-9\\-\\_\\.]+\\Z\/.
--
-- The built-in layers\' short names are defined by AWS OpsWorks Stacks.
-- For more information, see the
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/layers.html Layer Reference>
updateLayer_shortname :: Lens.Lens' UpdateLayer (Prelude.Maybe Prelude.Text)
updateLayer_shortname :: Lens' UpdateLayer (Maybe Text)
updateLayer_shortname = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe Text
shortname :: Maybe Text
$sel:shortname:UpdateLayer' :: UpdateLayer -> Maybe Text
shortname} -> Maybe Text
shortname) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe Text
a -> UpdateLayer
s {$sel:shortname:UpdateLayer' :: Maybe Text
shortname = Maybe Text
a} :: UpdateLayer)

-- | Whether to use Amazon EBS-optimized instances.
updateLayer_useEbsOptimizedInstances :: Lens.Lens' UpdateLayer (Prelude.Maybe Prelude.Bool)
updateLayer_useEbsOptimizedInstances :: Lens' UpdateLayer (Maybe Bool)
updateLayer_useEbsOptimizedInstances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe Bool
useEbsOptimizedInstances :: Maybe Bool
$sel:useEbsOptimizedInstances:UpdateLayer' :: UpdateLayer -> Maybe Bool
useEbsOptimizedInstances} -> Maybe Bool
useEbsOptimizedInstances) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe Bool
a -> UpdateLayer
s {$sel:useEbsOptimizedInstances:UpdateLayer' :: Maybe Bool
useEbsOptimizedInstances = Maybe Bool
a} :: UpdateLayer)

-- | A @VolumeConfigurations@ object that describes the layer\'s Amazon EBS
-- volumes.
updateLayer_volumeConfigurations :: Lens.Lens' UpdateLayer (Prelude.Maybe [VolumeConfiguration])
updateLayer_volumeConfigurations :: Lens' UpdateLayer (Maybe [VolumeConfiguration])
updateLayer_volumeConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Maybe [VolumeConfiguration]
volumeConfigurations :: Maybe [VolumeConfiguration]
$sel:volumeConfigurations:UpdateLayer' :: UpdateLayer -> Maybe [VolumeConfiguration]
volumeConfigurations} -> Maybe [VolumeConfiguration]
volumeConfigurations) (\s :: UpdateLayer
s@UpdateLayer' {} Maybe [VolumeConfiguration]
a -> UpdateLayer
s {$sel:volumeConfigurations:UpdateLayer' :: Maybe [VolumeConfiguration]
volumeConfigurations = Maybe [VolumeConfiguration]
a} :: UpdateLayer) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The layer ID.
updateLayer_layerId :: Lens.Lens' UpdateLayer Prelude.Text
updateLayer_layerId :: Lens' UpdateLayer Text
updateLayer_layerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLayer' {Text
layerId :: Text
$sel:layerId:UpdateLayer' :: UpdateLayer -> Text
layerId} -> Text
layerId) (\s :: UpdateLayer
s@UpdateLayer' {} Text
a -> UpdateLayer
s {$sel:layerId:UpdateLayer' :: Text
layerId = Text
a} :: UpdateLayer)

instance Core.AWSRequest UpdateLayer where
  type AWSResponse UpdateLayer = UpdateLayerResponse
  request :: (Service -> Service) -> UpdateLayer -> Request UpdateLayer
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 UpdateLayer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateLayer)))
response = forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull UpdateLayerResponse
UpdateLayerResponse'

instance Prelude.Hashable UpdateLayer where
  hashWithSalt :: Int -> UpdateLayer -> Int
hashWithSalt Int
_salt UpdateLayer' {Maybe Bool
Maybe [Text]
Maybe [VolumeConfiguration]
Maybe Text
Maybe (HashMap LayerAttributesKeys (Maybe Text))
Maybe CloudWatchLogsConfiguration
Maybe Recipes
Maybe LifecycleEventConfiguration
Text
layerId :: Text
volumeConfigurations :: Maybe [VolumeConfiguration]
useEbsOptimizedInstances :: Maybe Bool
shortname :: Maybe Text
packages :: Maybe [Text]
name :: Maybe Text
lifecycleEventConfiguration :: Maybe LifecycleEventConfiguration
installUpdatesOnBoot :: Maybe Bool
enableAutoHealing :: Maybe Bool
customSecurityGroupIds :: Maybe [Text]
customRecipes :: Maybe Recipes
customJson :: Maybe Text
customInstanceProfileArn :: Maybe Text
cloudWatchLogsConfiguration :: Maybe CloudWatchLogsConfiguration
autoAssignPublicIps :: Maybe Bool
autoAssignElasticIps :: Maybe Bool
attributes :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
$sel:layerId:UpdateLayer' :: UpdateLayer -> Text
$sel:volumeConfigurations:UpdateLayer' :: UpdateLayer -> Maybe [VolumeConfiguration]
$sel:useEbsOptimizedInstances:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:shortname:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:packages:UpdateLayer' :: UpdateLayer -> Maybe [Text]
$sel:name:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:lifecycleEventConfiguration:UpdateLayer' :: UpdateLayer -> Maybe LifecycleEventConfiguration
$sel:installUpdatesOnBoot:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:enableAutoHealing:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:customSecurityGroupIds:UpdateLayer' :: UpdateLayer -> Maybe [Text]
$sel:customRecipes:UpdateLayer' :: UpdateLayer -> Maybe Recipes
$sel:customJson:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:customInstanceProfileArn:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:cloudWatchLogsConfiguration:UpdateLayer' :: UpdateLayer -> Maybe CloudWatchLogsConfiguration
$sel:autoAssignPublicIps:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:autoAssignElasticIps:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:attributes:UpdateLayer' :: UpdateLayer -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
autoAssignElasticIps
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
autoAssignPublicIps
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customInstanceProfileArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customJson
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Recipes
customRecipes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
customSecurityGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableAutoHealing
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
installUpdatesOnBoot
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LifecycleEventConfiguration
lifecycleEventConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
packages
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
shortname
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
useEbsOptimizedInstances
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [VolumeConfiguration]
volumeConfigurations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
layerId

instance Prelude.NFData UpdateLayer where
  rnf :: UpdateLayer -> ()
rnf UpdateLayer' {Maybe Bool
Maybe [Text]
Maybe [VolumeConfiguration]
Maybe Text
Maybe (HashMap LayerAttributesKeys (Maybe Text))
Maybe CloudWatchLogsConfiguration
Maybe Recipes
Maybe LifecycleEventConfiguration
Text
layerId :: Text
volumeConfigurations :: Maybe [VolumeConfiguration]
useEbsOptimizedInstances :: Maybe Bool
shortname :: Maybe Text
packages :: Maybe [Text]
name :: Maybe Text
lifecycleEventConfiguration :: Maybe LifecycleEventConfiguration
installUpdatesOnBoot :: Maybe Bool
enableAutoHealing :: Maybe Bool
customSecurityGroupIds :: Maybe [Text]
customRecipes :: Maybe Recipes
customJson :: Maybe Text
customInstanceProfileArn :: Maybe Text
cloudWatchLogsConfiguration :: Maybe CloudWatchLogsConfiguration
autoAssignPublicIps :: Maybe Bool
autoAssignElasticIps :: Maybe Bool
attributes :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
$sel:layerId:UpdateLayer' :: UpdateLayer -> Text
$sel:volumeConfigurations:UpdateLayer' :: UpdateLayer -> Maybe [VolumeConfiguration]
$sel:useEbsOptimizedInstances:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:shortname:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:packages:UpdateLayer' :: UpdateLayer -> Maybe [Text]
$sel:name:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:lifecycleEventConfiguration:UpdateLayer' :: UpdateLayer -> Maybe LifecycleEventConfiguration
$sel:installUpdatesOnBoot:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:enableAutoHealing:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:customSecurityGroupIds:UpdateLayer' :: UpdateLayer -> Maybe [Text]
$sel:customRecipes:UpdateLayer' :: UpdateLayer -> Maybe Recipes
$sel:customJson:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:customInstanceProfileArn:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:cloudWatchLogsConfiguration:UpdateLayer' :: UpdateLayer -> Maybe CloudWatchLogsConfiguration
$sel:autoAssignPublicIps:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:autoAssignElasticIps:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:attributes:UpdateLayer' :: UpdateLayer -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
autoAssignElasticIps
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
autoAssignPublicIps
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customInstanceProfileArn
      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 Recipes
customRecipes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
customSecurityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableAutoHealing
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
installUpdatesOnBoot
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LifecycleEventConfiguration
lifecycleEventConfiguration
      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]
packages
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
shortname
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
useEbsOptimizedInstances
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [VolumeConfiguration]
volumeConfigurations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
layerId

instance Data.ToHeaders UpdateLayer where
  toHeaders :: UpdateLayer -> [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.UpdateLayer" ::
                          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 UpdateLayer where
  toJSON :: UpdateLayer -> Value
toJSON UpdateLayer' {Maybe Bool
Maybe [Text]
Maybe [VolumeConfiguration]
Maybe Text
Maybe (HashMap LayerAttributesKeys (Maybe Text))
Maybe CloudWatchLogsConfiguration
Maybe Recipes
Maybe LifecycleEventConfiguration
Text
layerId :: Text
volumeConfigurations :: Maybe [VolumeConfiguration]
useEbsOptimizedInstances :: Maybe Bool
shortname :: Maybe Text
packages :: Maybe [Text]
name :: Maybe Text
lifecycleEventConfiguration :: Maybe LifecycleEventConfiguration
installUpdatesOnBoot :: Maybe Bool
enableAutoHealing :: Maybe Bool
customSecurityGroupIds :: Maybe [Text]
customRecipes :: Maybe Recipes
customJson :: Maybe Text
customInstanceProfileArn :: Maybe Text
cloudWatchLogsConfiguration :: Maybe CloudWatchLogsConfiguration
autoAssignPublicIps :: Maybe Bool
autoAssignElasticIps :: Maybe Bool
attributes :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
$sel:layerId:UpdateLayer' :: UpdateLayer -> Text
$sel:volumeConfigurations:UpdateLayer' :: UpdateLayer -> Maybe [VolumeConfiguration]
$sel:useEbsOptimizedInstances:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:shortname:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:packages:UpdateLayer' :: UpdateLayer -> Maybe [Text]
$sel:name:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:lifecycleEventConfiguration:UpdateLayer' :: UpdateLayer -> Maybe LifecycleEventConfiguration
$sel:installUpdatesOnBoot:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:enableAutoHealing:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:customSecurityGroupIds:UpdateLayer' :: UpdateLayer -> Maybe [Text]
$sel:customRecipes:UpdateLayer' :: UpdateLayer -> Maybe Recipes
$sel:customJson:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:customInstanceProfileArn:UpdateLayer' :: UpdateLayer -> Maybe Text
$sel:cloudWatchLogsConfiguration:UpdateLayer' :: UpdateLayer -> Maybe CloudWatchLogsConfiguration
$sel:autoAssignPublicIps:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:autoAssignElasticIps:UpdateLayer' :: UpdateLayer -> Maybe Bool
$sel:attributes:UpdateLayer' :: UpdateLayer -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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 LayerAttributesKeys (Maybe Text))
attributes,
            (Key
"AutoAssignElasticIps" 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
autoAssignElasticIps,
            (Key
"AutoAssignPublicIps" 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
autoAssignPublicIps,
            (Key
"CloudWatchLogsConfiguration" 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 CloudWatchLogsConfiguration
cloudWatchLogsConfiguration,
            (Key
"CustomInstanceProfileArn" 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
customInstanceProfileArn,
            (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
"CustomRecipes" 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 Recipes
customRecipes,
            (Key
"CustomSecurityGroupIds" 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]
customSecurityGroupIds,
            (Key
"EnableAutoHealing" 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
enableAutoHealing,
            (Key
"InstallUpdatesOnBoot" 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
installUpdatesOnBoot,
            (Key
"LifecycleEventConfiguration" 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 LifecycleEventConfiguration
lifecycleEventConfiguration,
            (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
"Packages" 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]
packages,
            (Key
"Shortname" 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
shortname,
            (Key
"UseEbsOptimizedInstances" 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
useEbsOptimizedInstances,
            (Key
"VolumeConfigurations" 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 [VolumeConfiguration]
volumeConfigurations,
            forall a. a -> Maybe a
Prelude.Just (Key
"LayerId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
layerId)
          ]
      )

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

instance Data.ToQuery UpdateLayer where
  toQuery :: UpdateLayer -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateLayerResponse' smart constructor.
data UpdateLayerResponse = UpdateLayerResponse'
  {
  }
  deriving (UpdateLayerResponse -> UpdateLayerResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLayerResponse -> UpdateLayerResponse -> Bool
$c/= :: UpdateLayerResponse -> UpdateLayerResponse -> Bool
== :: UpdateLayerResponse -> UpdateLayerResponse -> Bool
$c== :: UpdateLayerResponse -> UpdateLayerResponse -> Bool
Prelude.Eq, ReadPrec [UpdateLayerResponse]
ReadPrec UpdateLayerResponse
Int -> ReadS UpdateLayerResponse
ReadS [UpdateLayerResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLayerResponse]
$creadListPrec :: ReadPrec [UpdateLayerResponse]
readPrec :: ReadPrec UpdateLayerResponse
$creadPrec :: ReadPrec UpdateLayerResponse
readList :: ReadS [UpdateLayerResponse]
$creadList :: ReadS [UpdateLayerResponse]
readsPrec :: Int -> ReadS UpdateLayerResponse
$creadsPrec :: Int -> ReadS UpdateLayerResponse
Prelude.Read, Int -> UpdateLayerResponse -> ShowS
[UpdateLayerResponse] -> ShowS
UpdateLayerResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLayerResponse] -> ShowS
$cshowList :: [UpdateLayerResponse] -> ShowS
show :: UpdateLayerResponse -> String
$cshow :: UpdateLayerResponse -> String
showsPrec :: Int -> UpdateLayerResponse -> ShowS
$cshowsPrec :: Int -> UpdateLayerResponse -> ShowS
Prelude.Show, forall x. Rep UpdateLayerResponse x -> UpdateLayerResponse
forall x. UpdateLayerResponse -> Rep UpdateLayerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateLayerResponse x -> UpdateLayerResponse
$cfrom :: forall x. UpdateLayerResponse -> Rep UpdateLayerResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLayerResponse' 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.
newUpdateLayerResponse ::
  UpdateLayerResponse
newUpdateLayerResponse :: UpdateLayerResponse
newUpdateLayerResponse = UpdateLayerResponse
UpdateLayerResponse'

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