{-# 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.ImageBuilder.UpdateInfrastructureConfiguration
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a new infrastructure configuration. An infrastructure
-- configuration defines the environment in which your image will be built
-- and tested.
module Amazonka.ImageBuilder.UpdateInfrastructureConfiguration
  ( -- * Creating a Request
    UpdateInfrastructureConfiguration (..),
    newUpdateInfrastructureConfiguration,

    -- * Request Lenses
    updateInfrastructureConfiguration_securityGroupIds,
    updateInfrastructureConfiguration_snsTopicArn,
    updateInfrastructureConfiguration_instanceTypes,
    updateInfrastructureConfiguration_keyPair,
    updateInfrastructureConfiguration_resourceTags,
    updateInfrastructureConfiguration_subnetId,
    updateInfrastructureConfiguration_instanceMetadataOptions,
    updateInfrastructureConfiguration_logging,
    updateInfrastructureConfiguration_description,
    updateInfrastructureConfiguration_terminateInstanceOnFailure,
    updateInfrastructureConfiguration_infrastructureConfigurationArn,
    updateInfrastructureConfiguration_instanceProfileName,
    updateInfrastructureConfiguration_clientToken,

    -- * Destructuring the Response
    UpdateInfrastructureConfigurationResponse (..),
    newUpdateInfrastructureConfigurationResponse,

    -- * Response Lenses
    updateInfrastructureConfigurationResponse_requestId,
    updateInfrastructureConfigurationResponse_infrastructureConfigurationArn,
    updateInfrastructureConfigurationResponse_clientToken,
    updateInfrastructureConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateInfrastructureConfiguration' smart constructor.
data UpdateInfrastructureConfiguration = UpdateInfrastructureConfiguration'
  { -- | The security group IDs to associate with the instance used to customize
    -- your Amazon EC2 AMI.
    UpdateInfrastructureConfiguration -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | The SNS topic on which to send image build events.
    UpdateInfrastructureConfiguration -> Maybe Text
snsTopicArn :: Prelude.Maybe Prelude.Text,
    -- | The instance types of the infrastructure configuration. You can specify
    -- one or more instance types to use for this build. The service will pick
    -- one of these instance types based on availability.
    UpdateInfrastructureConfiguration -> Maybe [Text]
instanceTypes :: Prelude.Maybe [Prelude.Text],
    -- | The key pair of the infrastructure configuration. You can use this to
    -- log on to and debug the instance used to create your image.
    UpdateInfrastructureConfiguration -> Maybe Text
keyPair :: Prelude.Maybe Prelude.Text,
    -- | The tags attached to the resource created by Image Builder.
    UpdateInfrastructureConfiguration -> Maybe (HashMap Text Text)
resourceTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The subnet ID to place the instance used to customize your Amazon EC2
    -- AMI in.
    UpdateInfrastructureConfiguration -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
    -- | The instance metadata options that you can set for the HTTP requests
    -- that pipeline builds use to launch EC2 build and test instances. For
    -- more information about instance metadata options, see one of the
    -- following links:
    --
    -- -   <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html Configure the instance metadata options>
    --     in the //Amazon EC2 User Guide// for Linux instances.
    --
    -- -   <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/configuring-instance-metadata-options.html Configure the instance metadata options>
    --     in the //Amazon EC2 Windows Guide// for Windows instances.
    UpdateInfrastructureConfiguration -> Maybe InstanceMetadataOptions
instanceMetadataOptions :: Prelude.Maybe InstanceMetadataOptions,
    -- | The logging configuration of the infrastructure configuration.
    UpdateInfrastructureConfiguration -> Maybe Logging
logging :: Prelude.Maybe Logging,
    -- | The description of the infrastructure configuration.
    UpdateInfrastructureConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The terminate instance on failure setting of the infrastructure
    -- configuration. Set to false if you want Image Builder to retain the
    -- instance used to configure your AMI if the build or test phase of your
    -- workflow fails.
    UpdateInfrastructureConfiguration -> Maybe Bool
terminateInstanceOnFailure :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the infrastructure configuration that
    -- you want to update.
    UpdateInfrastructureConfiguration -> Text
infrastructureConfigurationArn :: Prelude.Text,
    -- | The instance profile to associate with the instance used to customize
    -- your Amazon EC2 AMI.
    UpdateInfrastructureConfiguration -> Text
instanceProfileName :: Prelude.Text,
    -- | The idempotency token used to make this request idempotent.
    UpdateInfrastructureConfiguration -> Text
clientToken :: Prelude.Text
  }
  deriving (UpdateInfrastructureConfiguration
-> UpdateInfrastructureConfiguration -> Bool
(UpdateInfrastructureConfiguration
 -> UpdateInfrastructureConfiguration -> Bool)
-> (UpdateInfrastructureConfiguration
    -> UpdateInfrastructureConfiguration -> Bool)
-> Eq UpdateInfrastructureConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInfrastructureConfiguration
-> UpdateInfrastructureConfiguration -> Bool
$c/= :: UpdateInfrastructureConfiguration
-> UpdateInfrastructureConfiguration -> Bool
== :: UpdateInfrastructureConfiguration
-> UpdateInfrastructureConfiguration -> Bool
$c== :: UpdateInfrastructureConfiguration
-> UpdateInfrastructureConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateInfrastructureConfiguration]
ReadPrec UpdateInfrastructureConfiguration
Int -> ReadS UpdateInfrastructureConfiguration
ReadS [UpdateInfrastructureConfiguration]
(Int -> ReadS UpdateInfrastructureConfiguration)
-> ReadS [UpdateInfrastructureConfiguration]
-> ReadPrec UpdateInfrastructureConfiguration
-> ReadPrec [UpdateInfrastructureConfiguration]
-> Read UpdateInfrastructureConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInfrastructureConfiguration]
$creadListPrec :: ReadPrec [UpdateInfrastructureConfiguration]
readPrec :: ReadPrec UpdateInfrastructureConfiguration
$creadPrec :: ReadPrec UpdateInfrastructureConfiguration
readList :: ReadS [UpdateInfrastructureConfiguration]
$creadList :: ReadS [UpdateInfrastructureConfiguration]
readsPrec :: Int -> ReadS UpdateInfrastructureConfiguration
$creadsPrec :: Int -> ReadS UpdateInfrastructureConfiguration
Prelude.Read, Int -> UpdateInfrastructureConfiguration -> ShowS
[UpdateInfrastructureConfiguration] -> ShowS
UpdateInfrastructureConfiguration -> String
(Int -> UpdateInfrastructureConfiguration -> ShowS)
-> (UpdateInfrastructureConfiguration -> String)
-> ([UpdateInfrastructureConfiguration] -> ShowS)
-> Show UpdateInfrastructureConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInfrastructureConfiguration] -> ShowS
$cshowList :: [UpdateInfrastructureConfiguration] -> ShowS
show :: UpdateInfrastructureConfiguration -> String
$cshow :: UpdateInfrastructureConfiguration -> String
showsPrec :: Int -> UpdateInfrastructureConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateInfrastructureConfiguration -> ShowS
Prelude.Show, (forall x.
 UpdateInfrastructureConfiguration
 -> Rep UpdateInfrastructureConfiguration x)
-> (forall x.
    Rep UpdateInfrastructureConfiguration x
    -> UpdateInfrastructureConfiguration)
-> Generic UpdateInfrastructureConfiguration
forall x.
Rep UpdateInfrastructureConfiguration x
-> UpdateInfrastructureConfiguration
forall x.
UpdateInfrastructureConfiguration
-> Rep UpdateInfrastructureConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateInfrastructureConfiguration x
-> UpdateInfrastructureConfiguration
$cfrom :: forall x.
UpdateInfrastructureConfiguration
-> Rep UpdateInfrastructureConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateInfrastructureConfiguration' 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:
--
-- 'securityGroupIds', 'updateInfrastructureConfiguration_securityGroupIds' - The security group IDs to associate with the instance used to customize
-- your Amazon EC2 AMI.
--
-- 'snsTopicArn', 'updateInfrastructureConfiguration_snsTopicArn' - The SNS topic on which to send image build events.
--
-- 'instanceTypes', 'updateInfrastructureConfiguration_instanceTypes' - The instance types of the infrastructure configuration. You can specify
-- one or more instance types to use for this build. The service will pick
-- one of these instance types based on availability.
--
-- 'keyPair', 'updateInfrastructureConfiguration_keyPair' - The key pair of the infrastructure configuration. You can use this to
-- log on to and debug the instance used to create your image.
--
-- 'resourceTags', 'updateInfrastructureConfiguration_resourceTags' - The tags attached to the resource created by Image Builder.
--
-- 'subnetId', 'updateInfrastructureConfiguration_subnetId' - The subnet ID to place the instance used to customize your Amazon EC2
-- AMI in.
--
-- 'instanceMetadataOptions', 'updateInfrastructureConfiguration_instanceMetadataOptions' - The instance metadata options that you can set for the HTTP requests
-- that pipeline builds use to launch EC2 build and test instances. For
-- more information about instance metadata options, see one of the
-- following links:
--
-- -   <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html Configure the instance metadata options>
--     in the //Amazon EC2 User Guide// for Linux instances.
--
-- -   <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/configuring-instance-metadata-options.html Configure the instance metadata options>
--     in the //Amazon EC2 Windows Guide// for Windows instances.
--
-- 'logging', 'updateInfrastructureConfiguration_logging' - The logging configuration of the infrastructure configuration.
--
-- 'description', 'updateInfrastructureConfiguration_description' - The description of the infrastructure configuration.
--
-- 'terminateInstanceOnFailure', 'updateInfrastructureConfiguration_terminateInstanceOnFailure' - The terminate instance on failure setting of the infrastructure
-- configuration. Set to false if you want Image Builder to retain the
-- instance used to configure your AMI if the build or test phase of your
-- workflow fails.
--
-- 'infrastructureConfigurationArn', 'updateInfrastructureConfiguration_infrastructureConfigurationArn' - The Amazon Resource Name (ARN) of the infrastructure configuration that
-- you want to update.
--
-- 'instanceProfileName', 'updateInfrastructureConfiguration_instanceProfileName' - The instance profile to associate with the instance used to customize
-- your Amazon EC2 AMI.
--
-- 'clientToken', 'updateInfrastructureConfiguration_clientToken' - The idempotency token used to make this request idempotent.
newUpdateInfrastructureConfiguration ::
  -- | 'infrastructureConfigurationArn'
  Prelude.Text ->
  -- | 'instanceProfileName'
  Prelude.Text ->
  -- | 'clientToken'
  Prelude.Text ->
  UpdateInfrastructureConfiguration
newUpdateInfrastructureConfiguration :: Text -> Text -> Text -> UpdateInfrastructureConfiguration
newUpdateInfrastructureConfiguration
  Text
pInfrastructureConfigurationArn_
  Text
pInstanceProfileName_
  Text
pClientToken_ =
    UpdateInfrastructureConfiguration' :: Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe InstanceMetadataOptions
-> Maybe Logging
-> Maybe Text
-> Maybe Bool
-> Text
-> Text
-> Text
-> UpdateInfrastructureConfiguration
UpdateInfrastructureConfiguration'
      { $sel:securityGroupIds:UpdateInfrastructureConfiguration' :: Maybe [Text]
securityGroupIds =
          Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:snsTopicArn:UpdateInfrastructureConfiguration' :: Maybe Text
snsTopicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceTypes:UpdateInfrastructureConfiguration' :: Maybe [Text]
instanceTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:keyPair:UpdateInfrastructureConfiguration' :: Maybe Text
keyPair = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:resourceTags:UpdateInfrastructureConfiguration' :: Maybe (HashMap Text Text)
resourceTags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:subnetId:UpdateInfrastructureConfiguration' :: Maybe Text
subnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceMetadataOptions:UpdateInfrastructureConfiguration' :: Maybe InstanceMetadataOptions
instanceMetadataOptions =
          Maybe InstanceMetadataOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:logging:UpdateInfrastructureConfiguration' :: Maybe Logging
logging = Maybe Logging
forall a. Maybe a
Prelude.Nothing,
        $sel:description:UpdateInfrastructureConfiguration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:terminateInstanceOnFailure:UpdateInfrastructureConfiguration' :: Maybe Bool
terminateInstanceOnFailure =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:infrastructureConfigurationArn:UpdateInfrastructureConfiguration' :: Text
infrastructureConfigurationArn =
          Text
pInfrastructureConfigurationArn_,
        $sel:instanceProfileName:UpdateInfrastructureConfiguration' :: Text
instanceProfileName =
          Text
pInstanceProfileName_,
        $sel:clientToken:UpdateInfrastructureConfiguration' :: Text
clientToken = Text
pClientToken_
      }

-- | The security group IDs to associate with the instance used to customize
-- your Amazon EC2 AMI.
updateInfrastructureConfiguration_securityGroupIds :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe [Prelude.Text])
updateInfrastructureConfiguration_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_securityGroupIds = (UpdateInfrastructureConfiguration -> Maybe [Text])
-> (UpdateInfrastructureConfiguration
    -> Maybe [Text] -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe [Text]
a -> UpdateInfrastructureConfiguration
s {$sel:securityGroupIds:UpdateInfrastructureConfiguration' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: UpdateInfrastructureConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateInfrastructureConfiguration
 -> f UpdateInfrastructureConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The SNS topic on which to send image build events.
updateInfrastructureConfiguration_snsTopicArn :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe Prelude.Text)
updateInfrastructureConfiguration_snsTopicArn :: (Maybe Text -> f (Maybe Text))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_snsTopicArn = (UpdateInfrastructureConfiguration -> Maybe Text)
-> (UpdateInfrastructureConfiguration
    -> Maybe Text -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe Text
snsTopicArn :: Maybe Text
$sel:snsTopicArn:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Text
snsTopicArn} -> Maybe Text
snsTopicArn) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe Text
a -> UpdateInfrastructureConfiguration
s {$sel:snsTopicArn:UpdateInfrastructureConfiguration' :: Maybe Text
snsTopicArn = Maybe Text
a} :: UpdateInfrastructureConfiguration)

-- | The instance types of the infrastructure configuration. You can specify
-- one or more instance types to use for this build. The service will pick
-- one of these instance types based on availability.
updateInfrastructureConfiguration_instanceTypes :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe [Prelude.Text])
updateInfrastructureConfiguration_instanceTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_instanceTypes = (UpdateInfrastructureConfiguration -> Maybe [Text])
-> (UpdateInfrastructureConfiguration
    -> Maybe [Text] -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe [Text]
instanceTypes :: Maybe [Text]
$sel:instanceTypes:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe [Text]
instanceTypes} -> Maybe [Text]
instanceTypes) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe [Text]
a -> UpdateInfrastructureConfiguration
s {$sel:instanceTypes:UpdateInfrastructureConfiguration' :: Maybe [Text]
instanceTypes = Maybe [Text]
a} :: UpdateInfrastructureConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateInfrastructureConfiguration
 -> f UpdateInfrastructureConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The key pair of the infrastructure configuration. You can use this to
-- log on to and debug the instance used to create your image.
updateInfrastructureConfiguration_keyPair :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe Prelude.Text)
updateInfrastructureConfiguration_keyPair :: (Maybe Text -> f (Maybe Text))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_keyPair = (UpdateInfrastructureConfiguration -> Maybe Text)
-> (UpdateInfrastructureConfiguration
    -> Maybe Text -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe Text
keyPair :: Maybe Text
$sel:keyPair:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Text
keyPair} -> Maybe Text
keyPair) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe Text
a -> UpdateInfrastructureConfiguration
s {$sel:keyPair:UpdateInfrastructureConfiguration' :: Maybe Text
keyPair = Maybe Text
a} :: UpdateInfrastructureConfiguration)

-- | The tags attached to the resource created by Image Builder.
updateInfrastructureConfiguration_resourceTags :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateInfrastructureConfiguration_resourceTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_resourceTags = (UpdateInfrastructureConfiguration -> Maybe (HashMap Text Text))
-> (UpdateInfrastructureConfiguration
    -> Maybe (HashMap Text Text) -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe (HashMap Text Text)
resourceTags :: Maybe (HashMap Text Text)
$sel:resourceTags:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe (HashMap Text Text)
resourceTags} -> Maybe (HashMap Text Text)
resourceTags) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe (HashMap Text Text)
a -> UpdateInfrastructureConfiguration
s {$sel:resourceTags:UpdateInfrastructureConfiguration' :: Maybe (HashMap Text Text)
resourceTags = Maybe (HashMap Text Text)
a} :: UpdateInfrastructureConfiguration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateInfrastructureConfiguration
 -> f UpdateInfrastructureConfiguration)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The subnet ID to place the instance used to customize your Amazon EC2
-- AMI in.
updateInfrastructureConfiguration_subnetId :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe Prelude.Text)
updateInfrastructureConfiguration_subnetId :: (Maybe Text -> f (Maybe Text))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_subnetId = (UpdateInfrastructureConfiguration -> Maybe Text)
-> (UpdateInfrastructureConfiguration
    -> Maybe Text -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe Text
a -> UpdateInfrastructureConfiguration
s {$sel:subnetId:UpdateInfrastructureConfiguration' :: Maybe Text
subnetId = Maybe Text
a} :: UpdateInfrastructureConfiguration)

-- | The instance metadata options that you can set for the HTTP requests
-- that pipeline builds use to launch EC2 build and test instances. For
-- more information about instance metadata options, see one of the
-- following links:
--
-- -   <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html Configure the instance metadata options>
--     in the //Amazon EC2 User Guide// for Linux instances.
--
-- -   <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/configuring-instance-metadata-options.html Configure the instance metadata options>
--     in the //Amazon EC2 Windows Guide// for Windows instances.
updateInfrastructureConfiguration_instanceMetadataOptions :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe InstanceMetadataOptions)
updateInfrastructureConfiguration_instanceMetadataOptions :: (Maybe InstanceMetadataOptions
 -> f (Maybe InstanceMetadataOptions))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_instanceMetadataOptions = (UpdateInfrastructureConfiguration
 -> Maybe InstanceMetadataOptions)
-> (UpdateInfrastructureConfiguration
    -> Maybe InstanceMetadataOptions
    -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe InstanceMetadataOptions)
     (Maybe InstanceMetadataOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe InstanceMetadataOptions
instanceMetadataOptions :: Maybe InstanceMetadataOptions
$sel:instanceMetadataOptions:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe InstanceMetadataOptions
instanceMetadataOptions} -> Maybe InstanceMetadataOptions
instanceMetadataOptions) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe InstanceMetadataOptions
a -> UpdateInfrastructureConfiguration
s {$sel:instanceMetadataOptions:UpdateInfrastructureConfiguration' :: Maybe InstanceMetadataOptions
instanceMetadataOptions = Maybe InstanceMetadataOptions
a} :: UpdateInfrastructureConfiguration)

-- | The logging configuration of the infrastructure configuration.
updateInfrastructureConfiguration_logging :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe Logging)
updateInfrastructureConfiguration_logging :: (Maybe Logging -> f (Maybe Logging))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_logging = (UpdateInfrastructureConfiguration -> Maybe Logging)
-> (UpdateInfrastructureConfiguration
    -> Maybe Logging -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe Logging)
     (Maybe Logging)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe Logging
logging :: Maybe Logging
$sel:logging:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Logging
logging} -> Maybe Logging
logging) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe Logging
a -> UpdateInfrastructureConfiguration
s {$sel:logging:UpdateInfrastructureConfiguration' :: Maybe Logging
logging = Maybe Logging
a} :: UpdateInfrastructureConfiguration)

-- | The description of the infrastructure configuration.
updateInfrastructureConfiguration_description :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe Prelude.Text)
updateInfrastructureConfiguration_description :: (Maybe Text -> f (Maybe Text))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_description = (UpdateInfrastructureConfiguration -> Maybe Text)
-> (UpdateInfrastructureConfiguration
    -> Maybe Text -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe Text
a -> UpdateInfrastructureConfiguration
s {$sel:description:UpdateInfrastructureConfiguration' :: Maybe Text
description = Maybe Text
a} :: UpdateInfrastructureConfiguration)

-- | The terminate instance on failure setting of the infrastructure
-- configuration. Set to false if you want Image Builder to retain the
-- instance used to configure your AMI if the build or test phase of your
-- workflow fails.
updateInfrastructureConfiguration_terminateInstanceOnFailure :: Lens.Lens' UpdateInfrastructureConfiguration (Prelude.Maybe Prelude.Bool)
updateInfrastructureConfiguration_terminateInstanceOnFailure :: (Maybe Bool -> f (Maybe Bool))
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_terminateInstanceOnFailure = (UpdateInfrastructureConfiguration -> Maybe Bool)
-> (UpdateInfrastructureConfiguration
    -> Maybe Bool -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Maybe Bool
terminateInstanceOnFailure :: Maybe Bool
$sel:terminateInstanceOnFailure:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Bool
terminateInstanceOnFailure} -> Maybe Bool
terminateInstanceOnFailure) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Maybe Bool
a -> UpdateInfrastructureConfiguration
s {$sel:terminateInstanceOnFailure:UpdateInfrastructureConfiguration' :: Maybe Bool
terminateInstanceOnFailure = Maybe Bool
a} :: UpdateInfrastructureConfiguration)

-- | The Amazon Resource Name (ARN) of the infrastructure configuration that
-- you want to update.
updateInfrastructureConfiguration_infrastructureConfigurationArn :: Lens.Lens' UpdateInfrastructureConfiguration Prelude.Text
updateInfrastructureConfiguration_infrastructureConfigurationArn :: (Text -> f Text)
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_infrastructureConfigurationArn = (UpdateInfrastructureConfiguration -> Text)
-> (UpdateInfrastructureConfiguration
    -> Text -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Text
infrastructureConfigurationArn :: Text
$sel:infrastructureConfigurationArn:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Text
infrastructureConfigurationArn} -> Text
infrastructureConfigurationArn) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Text
a -> UpdateInfrastructureConfiguration
s {$sel:infrastructureConfigurationArn:UpdateInfrastructureConfiguration' :: Text
infrastructureConfigurationArn = Text
a} :: UpdateInfrastructureConfiguration)

-- | The instance profile to associate with the instance used to customize
-- your Amazon EC2 AMI.
updateInfrastructureConfiguration_instanceProfileName :: Lens.Lens' UpdateInfrastructureConfiguration Prelude.Text
updateInfrastructureConfiguration_instanceProfileName :: (Text -> f Text)
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_instanceProfileName = (UpdateInfrastructureConfiguration -> Text)
-> (UpdateInfrastructureConfiguration
    -> Text -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Text
instanceProfileName :: Text
$sel:instanceProfileName:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Text
instanceProfileName} -> Text
instanceProfileName) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Text
a -> UpdateInfrastructureConfiguration
s {$sel:instanceProfileName:UpdateInfrastructureConfiguration' :: Text
instanceProfileName = Text
a} :: UpdateInfrastructureConfiguration)

-- | The idempotency token used to make this request idempotent.
updateInfrastructureConfiguration_clientToken :: Lens.Lens' UpdateInfrastructureConfiguration Prelude.Text
updateInfrastructureConfiguration_clientToken :: (Text -> f Text)
-> UpdateInfrastructureConfiguration
-> f UpdateInfrastructureConfiguration
updateInfrastructureConfiguration_clientToken = (UpdateInfrastructureConfiguration -> Text)
-> (UpdateInfrastructureConfiguration
    -> Text -> UpdateInfrastructureConfiguration)
-> Lens
     UpdateInfrastructureConfiguration
     UpdateInfrastructureConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfiguration' {Text
clientToken :: Text
$sel:clientToken:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Text
clientToken} -> Text
clientToken) (\s :: UpdateInfrastructureConfiguration
s@UpdateInfrastructureConfiguration' {} Text
a -> UpdateInfrastructureConfiguration
s {$sel:clientToken:UpdateInfrastructureConfiguration' :: Text
clientToken = Text
a} :: UpdateInfrastructureConfiguration)

instance
  Core.AWSRequest
    UpdateInfrastructureConfiguration
  where
  type
    AWSResponse UpdateInfrastructureConfiguration =
      UpdateInfrastructureConfigurationResponse
  request :: UpdateInfrastructureConfiguration
-> Request UpdateInfrastructureConfiguration
request = Service
-> UpdateInfrastructureConfiguration
-> Request UpdateInfrastructureConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateInfrastructureConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateInfrastructureConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateInfrastructureConfiguration))
-> Logger
-> Service
-> Proxy UpdateInfrastructureConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateInfrastructureConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateInfrastructureConfigurationResponse
UpdateInfrastructureConfigurationResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> UpdateInfrastructureConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> UpdateInfrastructureConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"requestId")
              Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> UpdateInfrastructureConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Int -> UpdateInfrastructureConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"infrastructureConfigurationArn")
              Either
  String
  (Maybe Text -> Int -> UpdateInfrastructureConfigurationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateInfrastructureConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"clientToken")
              Either String (Int -> UpdateInfrastructureConfigurationResponse)
-> Either String Int
-> Either String UpdateInfrastructureConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    UpdateInfrastructureConfiguration

instance
  Prelude.NFData
    UpdateInfrastructureConfiguration

instance
  Core.ToHeaders
    UpdateInfrastructureConfiguration
  where
  toHeaders :: UpdateInfrastructureConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> UpdateInfrastructureConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Core.ToJSON
    UpdateInfrastructureConfiguration
  where
  toJSON :: UpdateInfrastructureConfiguration -> Value
toJSON UpdateInfrastructureConfiguration' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe InstanceMetadataOptions
Maybe Logging
Text
clientToken :: Text
instanceProfileName :: Text
infrastructureConfigurationArn :: Text
terminateInstanceOnFailure :: Maybe Bool
description :: Maybe Text
logging :: Maybe Logging
instanceMetadataOptions :: Maybe InstanceMetadataOptions
subnetId :: Maybe Text
resourceTags :: Maybe (HashMap Text Text)
keyPair :: Maybe Text
instanceTypes :: Maybe [Text]
snsTopicArn :: Maybe Text
securityGroupIds :: Maybe [Text]
$sel:clientToken:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Text
$sel:instanceProfileName:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Text
$sel:infrastructureConfigurationArn:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Text
$sel:terminateInstanceOnFailure:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Bool
$sel:description:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Text
$sel:logging:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Logging
$sel:instanceMetadataOptions:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe InstanceMetadataOptions
$sel:subnetId:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Text
$sel:resourceTags:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe (HashMap Text Text)
$sel:keyPair:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Text
$sel:instanceTypes:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe [Text]
$sel:snsTopicArn:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe Text
$sel:securityGroupIds:UpdateInfrastructureConfiguration' :: UpdateInfrastructureConfiguration -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"securityGroupIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupIds,
            (Text
"snsTopicArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
snsTopicArn,
            (Text
"instanceTypes" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
instanceTypes,
            (Text
"keyPair" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
keyPair,
            (Text
"resourceTags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
resourceTags,
            (Text
"subnetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
subnetId,
            (Text
"instanceMetadataOptions" Text -> InstanceMetadataOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InstanceMetadataOptions -> Pair)
-> Maybe InstanceMetadataOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceMetadataOptions
instanceMetadataOptions,
            (Text
"logging" Text -> Logging -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Logging -> Pair) -> Maybe Logging -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Logging
logging,
            (Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Text
"terminateInstanceOnFailure" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
terminateInstanceOnFailure,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"infrastructureConfigurationArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
infrastructureConfigurationArn
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"instanceProfileName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
instanceProfileName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
          ]
      )

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

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

-- | /See:/ 'newUpdateInfrastructureConfigurationResponse' smart constructor.
data UpdateInfrastructureConfigurationResponse = UpdateInfrastructureConfigurationResponse'
  { -- | The request ID that uniquely identifies this request.
    UpdateInfrastructureConfigurationResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the infrastructure configuration that
    -- was updated by this request.
    UpdateInfrastructureConfigurationResponse -> Maybe Text
infrastructureConfigurationArn :: Prelude.Maybe Prelude.Text,
    -- | The idempotency token used to make this request idempotent.
    UpdateInfrastructureConfigurationResponse -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateInfrastructureConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateInfrastructureConfigurationResponse
-> UpdateInfrastructureConfigurationResponse -> Bool
(UpdateInfrastructureConfigurationResponse
 -> UpdateInfrastructureConfigurationResponse -> Bool)
-> (UpdateInfrastructureConfigurationResponse
    -> UpdateInfrastructureConfigurationResponse -> Bool)
-> Eq UpdateInfrastructureConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInfrastructureConfigurationResponse
-> UpdateInfrastructureConfigurationResponse -> Bool
$c/= :: UpdateInfrastructureConfigurationResponse
-> UpdateInfrastructureConfigurationResponse -> Bool
== :: UpdateInfrastructureConfigurationResponse
-> UpdateInfrastructureConfigurationResponse -> Bool
$c== :: UpdateInfrastructureConfigurationResponse
-> UpdateInfrastructureConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateInfrastructureConfigurationResponse]
ReadPrec UpdateInfrastructureConfigurationResponse
Int -> ReadS UpdateInfrastructureConfigurationResponse
ReadS [UpdateInfrastructureConfigurationResponse]
(Int -> ReadS UpdateInfrastructureConfigurationResponse)
-> ReadS [UpdateInfrastructureConfigurationResponse]
-> ReadPrec UpdateInfrastructureConfigurationResponse
-> ReadPrec [UpdateInfrastructureConfigurationResponse]
-> Read UpdateInfrastructureConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInfrastructureConfigurationResponse]
$creadListPrec :: ReadPrec [UpdateInfrastructureConfigurationResponse]
readPrec :: ReadPrec UpdateInfrastructureConfigurationResponse
$creadPrec :: ReadPrec UpdateInfrastructureConfigurationResponse
readList :: ReadS [UpdateInfrastructureConfigurationResponse]
$creadList :: ReadS [UpdateInfrastructureConfigurationResponse]
readsPrec :: Int -> ReadS UpdateInfrastructureConfigurationResponse
$creadsPrec :: Int -> ReadS UpdateInfrastructureConfigurationResponse
Prelude.Read, Int -> UpdateInfrastructureConfigurationResponse -> ShowS
[UpdateInfrastructureConfigurationResponse] -> ShowS
UpdateInfrastructureConfigurationResponse -> String
(Int -> UpdateInfrastructureConfigurationResponse -> ShowS)
-> (UpdateInfrastructureConfigurationResponse -> String)
-> ([UpdateInfrastructureConfigurationResponse] -> ShowS)
-> Show UpdateInfrastructureConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInfrastructureConfigurationResponse] -> ShowS
$cshowList :: [UpdateInfrastructureConfigurationResponse] -> ShowS
show :: UpdateInfrastructureConfigurationResponse -> String
$cshow :: UpdateInfrastructureConfigurationResponse -> String
showsPrec :: Int -> UpdateInfrastructureConfigurationResponse -> ShowS
$cshowsPrec :: Int -> UpdateInfrastructureConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 UpdateInfrastructureConfigurationResponse
 -> Rep UpdateInfrastructureConfigurationResponse x)
-> (forall x.
    Rep UpdateInfrastructureConfigurationResponse x
    -> UpdateInfrastructureConfigurationResponse)
-> Generic UpdateInfrastructureConfigurationResponse
forall x.
Rep UpdateInfrastructureConfigurationResponse x
-> UpdateInfrastructureConfigurationResponse
forall x.
UpdateInfrastructureConfigurationResponse
-> Rep UpdateInfrastructureConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateInfrastructureConfigurationResponse x
-> UpdateInfrastructureConfigurationResponse
$cfrom :: forall x.
UpdateInfrastructureConfigurationResponse
-> Rep UpdateInfrastructureConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateInfrastructureConfigurationResponse' 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:
--
-- 'requestId', 'updateInfrastructureConfigurationResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'infrastructureConfigurationArn', 'updateInfrastructureConfigurationResponse_infrastructureConfigurationArn' - The Amazon Resource Name (ARN) of the infrastructure configuration that
-- was updated by this request.
--
-- 'clientToken', 'updateInfrastructureConfigurationResponse_clientToken' - The idempotency token used to make this request idempotent.
--
-- 'httpStatus', 'updateInfrastructureConfigurationResponse_httpStatus' - The response's http status code.
newUpdateInfrastructureConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateInfrastructureConfigurationResponse
newUpdateInfrastructureConfigurationResponse :: Int -> UpdateInfrastructureConfigurationResponse
newUpdateInfrastructureConfigurationResponse
  Int
pHttpStatus_ =
    UpdateInfrastructureConfigurationResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateInfrastructureConfigurationResponse
UpdateInfrastructureConfigurationResponse'
      { $sel:requestId:UpdateInfrastructureConfigurationResponse' :: Maybe Text
requestId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:infrastructureConfigurationArn:UpdateInfrastructureConfigurationResponse' :: Maybe Text
infrastructureConfigurationArn =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:clientToken:UpdateInfrastructureConfigurationResponse' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateInfrastructureConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The request ID that uniquely identifies this request.
updateInfrastructureConfigurationResponse_requestId :: Lens.Lens' UpdateInfrastructureConfigurationResponse (Prelude.Maybe Prelude.Text)
updateInfrastructureConfigurationResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> UpdateInfrastructureConfigurationResponse
-> f UpdateInfrastructureConfigurationResponse
updateInfrastructureConfigurationResponse_requestId = (UpdateInfrastructureConfigurationResponse -> Maybe Text)
-> (UpdateInfrastructureConfigurationResponse
    -> Maybe Text -> UpdateInfrastructureConfigurationResponse)
-> Lens
     UpdateInfrastructureConfigurationResponse
     UpdateInfrastructureConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfigurationResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:UpdateInfrastructureConfigurationResponse' :: UpdateInfrastructureConfigurationResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: UpdateInfrastructureConfigurationResponse
s@UpdateInfrastructureConfigurationResponse' {} Maybe Text
a -> UpdateInfrastructureConfigurationResponse
s {$sel:requestId:UpdateInfrastructureConfigurationResponse' :: Maybe Text
requestId = Maybe Text
a} :: UpdateInfrastructureConfigurationResponse)

-- | The Amazon Resource Name (ARN) of the infrastructure configuration that
-- was updated by this request.
updateInfrastructureConfigurationResponse_infrastructureConfigurationArn :: Lens.Lens' UpdateInfrastructureConfigurationResponse (Prelude.Maybe Prelude.Text)
updateInfrastructureConfigurationResponse_infrastructureConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> UpdateInfrastructureConfigurationResponse
-> f UpdateInfrastructureConfigurationResponse
updateInfrastructureConfigurationResponse_infrastructureConfigurationArn = (UpdateInfrastructureConfigurationResponse -> Maybe Text)
-> (UpdateInfrastructureConfigurationResponse
    -> Maybe Text -> UpdateInfrastructureConfigurationResponse)
-> Lens
     UpdateInfrastructureConfigurationResponse
     UpdateInfrastructureConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfigurationResponse' {Maybe Text
infrastructureConfigurationArn :: Maybe Text
$sel:infrastructureConfigurationArn:UpdateInfrastructureConfigurationResponse' :: UpdateInfrastructureConfigurationResponse -> Maybe Text
infrastructureConfigurationArn} -> Maybe Text
infrastructureConfigurationArn) (\s :: UpdateInfrastructureConfigurationResponse
s@UpdateInfrastructureConfigurationResponse' {} Maybe Text
a -> UpdateInfrastructureConfigurationResponse
s {$sel:infrastructureConfigurationArn:UpdateInfrastructureConfigurationResponse' :: Maybe Text
infrastructureConfigurationArn = Maybe Text
a} :: UpdateInfrastructureConfigurationResponse)

-- | The idempotency token used to make this request idempotent.
updateInfrastructureConfigurationResponse_clientToken :: Lens.Lens' UpdateInfrastructureConfigurationResponse (Prelude.Maybe Prelude.Text)
updateInfrastructureConfigurationResponse_clientToken :: (Maybe Text -> f (Maybe Text))
-> UpdateInfrastructureConfigurationResponse
-> f UpdateInfrastructureConfigurationResponse
updateInfrastructureConfigurationResponse_clientToken = (UpdateInfrastructureConfigurationResponse -> Maybe Text)
-> (UpdateInfrastructureConfigurationResponse
    -> Maybe Text -> UpdateInfrastructureConfigurationResponse)
-> Lens
     UpdateInfrastructureConfigurationResponse
     UpdateInfrastructureConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInfrastructureConfigurationResponse' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateInfrastructureConfigurationResponse' :: UpdateInfrastructureConfigurationResponse -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateInfrastructureConfigurationResponse
s@UpdateInfrastructureConfigurationResponse' {} Maybe Text
a -> UpdateInfrastructureConfigurationResponse
s {$sel:clientToken:UpdateInfrastructureConfigurationResponse' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateInfrastructureConfigurationResponse)

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

instance
  Prelude.NFData
    UpdateInfrastructureConfigurationResponse