{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AutoScaling.Types.LaunchConfiguration
-- 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)
module Amazonka.AutoScaling.Types.LaunchConfiguration where

import Amazonka.AutoScaling.Types.BlockDeviceMapping
import Amazonka.AutoScaling.Types.InstanceMetadataOptions
import Amazonka.AutoScaling.Types.InstanceMonitoring
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes a launch configuration.
--
-- /See:/ 'newLaunchConfiguration' smart constructor.
data LaunchConfiguration = LaunchConfiguration'
  { -- | For Auto Scaling groups that are running in a VPC, specifies whether to
    -- assign a public IP address to the group\'s instances. For more
    -- information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html Launching Auto Scaling instances in a VPC>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    LaunchConfiguration -> Maybe Bool
associatePublicIpAddress :: Prelude.Maybe Prelude.Bool,
    -- | A list that contains the security groups to assign to the instances in
    -- the Auto Scaling group. For more information, see
    -- <https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html Security Groups for Your VPC>
    -- in the /Amazon Virtual Private Cloud User Guide/.
    LaunchConfiguration -> Maybe [Text]
securityGroups :: Prelude.Maybe [Prelude.Text],
    -- | The maximum hourly price to be paid for any Spot Instance launched to
    -- fulfill the request. Spot Instances are launched when the price you
    -- specify exceeds the current Spot price. For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html Requesting Spot Instances>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    LaunchConfiguration -> Maybe Text
spotPrice :: Prelude.Maybe Prelude.Text,
    -- | Controls whether instances in this group are launched with detailed
    -- (@true@) or basic (@false@) monitoring.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/latest/userguide/enable-as-instance-metrics.html Configure Monitoring for Auto Scaling Instances>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    LaunchConfiguration -> Maybe InstanceMonitoring
instanceMonitoring :: Prelude.Maybe InstanceMonitoring,
    -- | The name of the key pair.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html Amazon EC2 Key Pairs>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    LaunchConfiguration -> Maybe Text
keyName :: Prelude.Maybe Prelude.Text,
    -- | The IDs of one or more security groups for the VPC specified in
    -- @ClassicLinkVPCId@.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
    -- in the /Amazon EC2 User Guide for Linux Instances/ and
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    LaunchConfiguration -> Maybe [Text]
classicLinkVPCSecurityGroups :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the RAM disk associated with the AMI.
    LaunchConfiguration -> Maybe Text
ramdiskId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the kernel associated with the AMI.
    LaunchConfiguration -> Maybe Text
kernelId :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the launch configuration is optimized for EBS I\/O
    -- (@true@) or not (@false@). For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html Amazon EBS-Optimized Instances>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    LaunchConfiguration -> Maybe Bool
ebsOptimized :: Prelude.Maybe Prelude.Bool,
    -- | The user data to make available to the launched EC2 instances. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html Instance metadata and user data>
    -- (Linux) and
    -- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html Instance metadata and user data>
    -- (Windows). If you are using a command line tool, base64-encoding is
    -- performed for you, and you can load the text from a file. Otherwise, you
    -- must provide base64-encoded text. User data is limited to 16 KB.
    LaunchConfiguration -> Maybe Text
userData :: Prelude.Maybe Prelude.Text,
    -- | The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
    -- to. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
    -- in the /Amazon EC2 User Guide for Linux Instances/ and
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    LaunchConfiguration -> Maybe Text
classicLinkVPCId :: Prelude.Maybe Prelude.Text,
    -- | The name or the Amazon Resource Name (ARN) of the instance profile
    -- associated with the IAM role for the instance. The instance profile
    -- contains the IAM role. For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html IAM role for applications that run on Amazon EC2 instances>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    LaunchConfiguration -> Maybe Text
iamInstanceProfile :: Prelude.Maybe Prelude.Text,
    -- | The metadata options for the instances. For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds Configuring the Instance Metadata Options>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    LaunchConfiguration -> Maybe InstanceMetadataOptions
metadataOptions :: Prelude.Maybe InstanceMetadataOptions,
    -- | The Amazon Resource Name (ARN) of the launch configuration.
    LaunchConfiguration -> Maybe Text
launchConfigurationARN :: Prelude.Maybe Prelude.Text,
    -- | The tenancy of the instance, either @default@ or @dedicated@. An
    -- instance with @dedicated@ tenancy runs on isolated, single-tenant
    -- hardware and can only be launched into a VPC.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-dedicated-instances.html Configuring instance tenancy with Amazon EC2 Auto Scaling>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    LaunchConfiguration -> Maybe Text
placementTenancy :: Prelude.Maybe Prelude.Text,
    -- | A block device mapping, which specifies the block devices for the
    -- instance. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html Block Device Mapping>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    LaunchConfiguration -> Maybe [BlockDeviceMapping]
blockDeviceMappings :: Prelude.Maybe [BlockDeviceMapping],
    -- | The name of the launch configuration.
    LaunchConfiguration -> Text
launchConfigurationName :: Prelude.Text,
    -- | The ID of the Amazon Machine Image (AMI) to use to launch your EC2
    -- instances. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html Finding an AMI>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    LaunchConfiguration -> Text
imageId :: Prelude.Text,
    -- | The instance type for the instances.
    --
    -- For information about available instance types, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes Available Instance Types>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    LaunchConfiguration -> Text
instanceType :: Prelude.Text,
    -- | The creation date and time for the launch configuration.
    LaunchConfiguration -> ISO8601
createdTime :: Core.ISO8601
  }
  deriving (LaunchConfiguration -> LaunchConfiguration -> Bool
(LaunchConfiguration -> LaunchConfiguration -> Bool)
-> (LaunchConfiguration -> LaunchConfiguration -> Bool)
-> Eq LaunchConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchConfiguration -> LaunchConfiguration -> Bool
$c/= :: LaunchConfiguration -> LaunchConfiguration -> Bool
== :: LaunchConfiguration -> LaunchConfiguration -> Bool
$c== :: LaunchConfiguration -> LaunchConfiguration -> Bool
Prelude.Eq, ReadPrec [LaunchConfiguration]
ReadPrec LaunchConfiguration
Int -> ReadS LaunchConfiguration
ReadS [LaunchConfiguration]
(Int -> ReadS LaunchConfiguration)
-> ReadS [LaunchConfiguration]
-> ReadPrec LaunchConfiguration
-> ReadPrec [LaunchConfiguration]
-> Read LaunchConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LaunchConfiguration]
$creadListPrec :: ReadPrec [LaunchConfiguration]
readPrec :: ReadPrec LaunchConfiguration
$creadPrec :: ReadPrec LaunchConfiguration
readList :: ReadS [LaunchConfiguration]
$creadList :: ReadS [LaunchConfiguration]
readsPrec :: Int -> ReadS LaunchConfiguration
$creadsPrec :: Int -> ReadS LaunchConfiguration
Prelude.Read, Int -> LaunchConfiguration -> ShowS
[LaunchConfiguration] -> ShowS
LaunchConfiguration -> String
(Int -> LaunchConfiguration -> ShowS)
-> (LaunchConfiguration -> String)
-> ([LaunchConfiguration] -> ShowS)
-> Show LaunchConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchConfiguration] -> ShowS
$cshowList :: [LaunchConfiguration] -> ShowS
show :: LaunchConfiguration -> String
$cshow :: LaunchConfiguration -> String
showsPrec :: Int -> LaunchConfiguration -> ShowS
$cshowsPrec :: Int -> LaunchConfiguration -> ShowS
Prelude.Show, (forall x. LaunchConfiguration -> Rep LaunchConfiguration x)
-> (forall x. Rep LaunchConfiguration x -> LaunchConfiguration)
-> Generic LaunchConfiguration
forall x. Rep LaunchConfiguration x -> LaunchConfiguration
forall x. LaunchConfiguration -> Rep LaunchConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LaunchConfiguration x -> LaunchConfiguration
$cfrom :: forall x. LaunchConfiguration -> Rep LaunchConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'LaunchConfiguration' 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:
--
-- 'associatePublicIpAddress', 'launchConfiguration_associatePublicIpAddress' - For Auto Scaling groups that are running in a VPC, specifies whether to
-- assign a public IP address to the group\'s instances. For more
-- information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html Launching Auto Scaling instances in a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'securityGroups', 'launchConfiguration_securityGroups' - A list that contains the security groups to assign to the instances in
-- the Auto Scaling group. For more information, see
-- <https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html Security Groups for Your VPC>
-- in the /Amazon Virtual Private Cloud User Guide/.
--
-- 'spotPrice', 'launchConfiguration_spotPrice' - The maximum hourly price to be paid for any Spot Instance launched to
-- fulfill the request. Spot Instances are launched when the price you
-- specify exceeds the current Spot price. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html Requesting Spot Instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'instanceMonitoring', 'launchConfiguration_instanceMonitoring' - Controls whether instances in this group are launched with detailed
-- (@true@) or basic (@false@) monitoring.
--
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/latest/userguide/enable-as-instance-metrics.html Configure Monitoring for Auto Scaling Instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'keyName', 'launchConfiguration_keyName' - The name of the key pair.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html Amazon EC2 Key Pairs>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'classicLinkVPCSecurityGroups', 'launchConfiguration_classicLinkVPCSecurityGroups' - The IDs of one or more security groups for the VPC specified in
-- @ClassicLinkVPCId@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
-- in the /Amazon EC2 User Guide for Linux Instances/ and
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'ramdiskId', 'launchConfiguration_ramdiskId' - The ID of the RAM disk associated with the AMI.
--
-- 'kernelId', 'launchConfiguration_kernelId' - The ID of the kernel associated with the AMI.
--
-- 'ebsOptimized', 'launchConfiguration_ebsOptimized' - Specifies whether the launch configuration is optimized for EBS I\/O
-- (@true@) or not (@false@). For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html Amazon EBS-Optimized Instances>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'userData', 'launchConfiguration_userData' - The user data to make available to the launched EC2 instances. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html Instance metadata and user data>
-- (Linux) and
-- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html Instance metadata and user data>
-- (Windows). If you are using a command line tool, base64-encoding is
-- performed for you, and you can load the text from a file. Otherwise, you
-- must provide base64-encoded text. User data is limited to 16 KB.
--
-- 'classicLinkVPCId', 'launchConfiguration_classicLinkVPCId' - The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
-- to. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
-- in the /Amazon EC2 User Guide for Linux Instances/ and
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'iamInstanceProfile', 'launchConfiguration_iamInstanceProfile' - The name or the Amazon Resource Name (ARN) of the instance profile
-- associated with the IAM role for the instance. The instance profile
-- contains the IAM role. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html IAM role for applications that run on Amazon EC2 instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'metadataOptions', 'launchConfiguration_metadataOptions' - The metadata options for the instances. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds Configuring the Instance Metadata Options>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'launchConfigurationARN', 'launchConfiguration_launchConfigurationARN' - The Amazon Resource Name (ARN) of the launch configuration.
--
-- 'placementTenancy', 'launchConfiguration_placementTenancy' - The tenancy of the instance, either @default@ or @dedicated@. An
-- instance with @dedicated@ tenancy runs on isolated, single-tenant
-- hardware and can only be launched into a VPC.
--
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-dedicated-instances.html Configuring instance tenancy with Amazon EC2 Auto Scaling>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'blockDeviceMappings', 'launchConfiguration_blockDeviceMappings' - A block device mapping, which specifies the block devices for the
-- instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html Block Device Mapping>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'launchConfigurationName', 'launchConfiguration_launchConfigurationName' - The name of the launch configuration.
--
-- 'imageId', 'launchConfiguration_imageId' - The ID of the Amazon Machine Image (AMI) to use to launch your EC2
-- instances. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html Finding an AMI>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'instanceType', 'launchConfiguration_instanceType' - The instance type for the instances.
--
-- For information about available instance types, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes Available Instance Types>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'createdTime', 'launchConfiguration_createdTime' - The creation date and time for the launch configuration.
newLaunchConfiguration ::
  -- | 'launchConfigurationName'
  Prelude.Text ->
  -- | 'imageId'
  Prelude.Text ->
  -- | 'instanceType'
  Prelude.Text ->
  -- | 'createdTime'
  Prelude.UTCTime ->
  LaunchConfiguration
newLaunchConfiguration :: Text -> Text -> Text -> UTCTime -> LaunchConfiguration
newLaunchConfiguration
  Text
pLaunchConfigurationName_
  Text
pImageId_
  Text
pInstanceType_
  UTCTime
pCreatedTime_ =
    LaunchConfiguration' :: Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe InstanceMonitoring
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstanceMetadataOptions
-> Maybe Text
-> Maybe Text
-> Maybe [BlockDeviceMapping]
-> Text
-> Text
-> Text
-> ISO8601
-> LaunchConfiguration
LaunchConfiguration'
      { $sel:associatePublicIpAddress:LaunchConfiguration' :: Maybe Bool
associatePublicIpAddress =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:securityGroups:LaunchConfiguration' :: Maybe [Text]
securityGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:spotPrice:LaunchConfiguration' :: Maybe Text
spotPrice = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceMonitoring:LaunchConfiguration' :: Maybe InstanceMonitoring
instanceMonitoring = Maybe InstanceMonitoring
forall a. Maybe a
Prelude.Nothing,
        $sel:keyName:LaunchConfiguration' :: Maybe Text
keyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:classicLinkVPCSecurityGroups:LaunchConfiguration' :: Maybe [Text]
classicLinkVPCSecurityGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:ramdiskId:LaunchConfiguration' :: Maybe Text
ramdiskId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kernelId:LaunchConfiguration' :: Maybe Text
kernelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:ebsOptimized:LaunchConfiguration' :: Maybe Bool
ebsOptimized = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:userData:LaunchConfiguration' :: Maybe Text
userData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:classicLinkVPCId:LaunchConfiguration' :: Maybe Text
classicLinkVPCId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:iamInstanceProfile:LaunchConfiguration' :: Maybe Text
iamInstanceProfile = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:metadataOptions:LaunchConfiguration' :: Maybe InstanceMetadataOptions
metadataOptions = Maybe InstanceMetadataOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:launchConfigurationARN:LaunchConfiguration' :: Maybe Text
launchConfigurationARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:placementTenancy:LaunchConfiguration' :: Maybe Text
placementTenancy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:blockDeviceMappings:LaunchConfiguration' :: Maybe [BlockDeviceMapping]
blockDeviceMappings = Maybe [BlockDeviceMapping]
forall a. Maybe a
Prelude.Nothing,
        $sel:launchConfigurationName:LaunchConfiguration' :: Text
launchConfigurationName = Text
pLaunchConfigurationName_,
        $sel:imageId:LaunchConfiguration' :: Text
imageId = Text
pImageId_,
        $sel:instanceType:LaunchConfiguration' :: Text
instanceType = Text
pInstanceType_,
        $sel:createdTime:LaunchConfiguration' :: ISO8601
createdTime = Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged ISO8601 (Identity ISO8601))
-> UTCTime -> ISO8601
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedTime_
      }

-- | For Auto Scaling groups that are running in a VPC, specifies whether to
-- assign a public IP address to the group\'s instances. For more
-- information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html Launching Auto Scaling instances in a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
launchConfiguration_associatePublicIpAddress :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Bool)
launchConfiguration_associatePublicIpAddress :: (Maybe Bool -> f (Maybe Bool))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_associatePublicIpAddress = (LaunchConfiguration -> Maybe Bool)
-> (LaunchConfiguration -> Maybe Bool -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Bool
associatePublicIpAddress :: Maybe Bool
$sel:associatePublicIpAddress:LaunchConfiguration' :: LaunchConfiguration -> Maybe Bool
associatePublicIpAddress} -> Maybe Bool
associatePublicIpAddress) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Bool
a -> LaunchConfiguration
s {$sel:associatePublicIpAddress:LaunchConfiguration' :: Maybe Bool
associatePublicIpAddress = Maybe Bool
a} :: LaunchConfiguration)

-- | A list that contains the security groups to assign to the instances in
-- the Auto Scaling group. For more information, see
-- <https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html Security Groups for Your VPC>
-- in the /Amazon Virtual Private Cloud User Guide/.
launchConfiguration_securityGroups :: Lens.Lens' LaunchConfiguration (Prelude.Maybe [Prelude.Text])
launchConfiguration_securityGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_securityGroups = (LaunchConfiguration -> Maybe [Text])
-> (LaunchConfiguration -> Maybe [Text] -> LaunchConfiguration)
-> Lens
     LaunchConfiguration
     LaunchConfiguration
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe [Text]
securityGroups :: Maybe [Text]
$sel:securityGroups:LaunchConfiguration' :: LaunchConfiguration -> Maybe [Text]
securityGroups} -> Maybe [Text]
securityGroups) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe [Text]
a -> LaunchConfiguration
s {$sel:securityGroups:LaunchConfiguration' :: Maybe [Text]
securityGroups = Maybe [Text]
a} :: LaunchConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
 -> LaunchConfiguration -> f LaunchConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> LaunchConfiguration
-> f LaunchConfiguration
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 maximum hourly price to be paid for any Spot Instance launched to
-- fulfill the request. Spot Instances are launched when the price you
-- specify exceeds the current Spot price. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html Requesting Spot Instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
launchConfiguration_spotPrice :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_spotPrice :: (Maybe Text -> f (Maybe Text))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_spotPrice = (LaunchConfiguration -> Maybe Text)
-> (LaunchConfiguration -> Maybe Text -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Text
spotPrice :: Maybe Text
$sel:spotPrice:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
spotPrice} -> Maybe Text
spotPrice) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Text
a -> LaunchConfiguration
s {$sel:spotPrice:LaunchConfiguration' :: Maybe Text
spotPrice = Maybe Text
a} :: LaunchConfiguration)

-- | Controls whether instances in this group are launched with detailed
-- (@true@) or basic (@false@) monitoring.
--
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/latest/userguide/enable-as-instance-metrics.html Configure Monitoring for Auto Scaling Instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
launchConfiguration_instanceMonitoring :: Lens.Lens' LaunchConfiguration (Prelude.Maybe InstanceMonitoring)
launchConfiguration_instanceMonitoring :: (Maybe InstanceMonitoring -> f (Maybe InstanceMonitoring))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_instanceMonitoring = (LaunchConfiguration -> Maybe InstanceMonitoring)
-> (LaunchConfiguration
    -> Maybe InstanceMonitoring -> LaunchConfiguration)
-> Lens
     LaunchConfiguration
     LaunchConfiguration
     (Maybe InstanceMonitoring)
     (Maybe InstanceMonitoring)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe InstanceMonitoring
instanceMonitoring :: Maybe InstanceMonitoring
$sel:instanceMonitoring:LaunchConfiguration' :: LaunchConfiguration -> Maybe InstanceMonitoring
instanceMonitoring} -> Maybe InstanceMonitoring
instanceMonitoring) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe InstanceMonitoring
a -> LaunchConfiguration
s {$sel:instanceMonitoring:LaunchConfiguration' :: Maybe InstanceMonitoring
instanceMonitoring = Maybe InstanceMonitoring
a} :: LaunchConfiguration)

-- | The name of the key pair.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html Amazon EC2 Key Pairs>
-- in the /Amazon EC2 User Guide for Linux Instances/.
launchConfiguration_keyName :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_keyName :: (Maybe Text -> f (Maybe Text))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_keyName = (LaunchConfiguration -> Maybe Text)
-> (LaunchConfiguration -> Maybe Text -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Text
keyName :: Maybe Text
$sel:keyName:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
keyName} -> Maybe Text
keyName) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Text
a -> LaunchConfiguration
s {$sel:keyName:LaunchConfiguration' :: Maybe Text
keyName = Maybe Text
a} :: LaunchConfiguration)

-- | The IDs of one or more security groups for the VPC specified in
-- @ClassicLinkVPCId@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
-- in the /Amazon EC2 User Guide for Linux Instances/ and
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
launchConfiguration_classicLinkVPCSecurityGroups :: Lens.Lens' LaunchConfiguration (Prelude.Maybe [Prelude.Text])
launchConfiguration_classicLinkVPCSecurityGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_classicLinkVPCSecurityGroups = (LaunchConfiguration -> Maybe [Text])
-> (LaunchConfiguration -> Maybe [Text] -> LaunchConfiguration)
-> Lens
     LaunchConfiguration
     LaunchConfiguration
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe [Text]
classicLinkVPCSecurityGroups :: Maybe [Text]
$sel:classicLinkVPCSecurityGroups:LaunchConfiguration' :: LaunchConfiguration -> Maybe [Text]
classicLinkVPCSecurityGroups} -> Maybe [Text]
classicLinkVPCSecurityGroups) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe [Text]
a -> LaunchConfiguration
s {$sel:classicLinkVPCSecurityGroups:LaunchConfiguration' :: Maybe [Text]
classicLinkVPCSecurityGroups = Maybe [Text]
a} :: LaunchConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
 -> LaunchConfiguration -> f LaunchConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> LaunchConfiguration
-> f LaunchConfiguration
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 ID of the RAM disk associated with the AMI.
launchConfiguration_ramdiskId :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_ramdiskId :: (Maybe Text -> f (Maybe Text))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_ramdiskId = (LaunchConfiguration -> Maybe Text)
-> (LaunchConfiguration -> Maybe Text -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Text
ramdiskId :: Maybe Text
$sel:ramdiskId:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
ramdiskId} -> Maybe Text
ramdiskId) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Text
a -> LaunchConfiguration
s {$sel:ramdiskId:LaunchConfiguration' :: Maybe Text
ramdiskId = Maybe Text
a} :: LaunchConfiguration)

-- | The ID of the kernel associated with the AMI.
launchConfiguration_kernelId :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_kernelId :: (Maybe Text -> f (Maybe Text))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_kernelId = (LaunchConfiguration -> Maybe Text)
-> (LaunchConfiguration -> Maybe Text -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Text
kernelId :: Maybe Text
$sel:kernelId:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
kernelId} -> Maybe Text
kernelId) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Text
a -> LaunchConfiguration
s {$sel:kernelId:LaunchConfiguration' :: Maybe Text
kernelId = Maybe Text
a} :: LaunchConfiguration)

-- | Specifies whether the launch configuration is optimized for EBS I\/O
-- (@true@) or not (@false@). For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html Amazon EBS-Optimized Instances>
-- in the /Amazon EC2 User Guide for Linux Instances/.
launchConfiguration_ebsOptimized :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Bool)
launchConfiguration_ebsOptimized :: (Maybe Bool -> f (Maybe Bool))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_ebsOptimized = (LaunchConfiguration -> Maybe Bool)
-> (LaunchConfiguration -> Maybe Bool -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Bool
ebsOptimized :: Maybe Bool
$sel:ebsOptimized:LaunchConfiguration' :: LaunchConfiguration -> Maybe Bool
ebsOptimized} -> Maybe Bool
ebsOptimized) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Bool
a -> LaunchConfiguration
s {$sel:ebsOptimized:LaunchConfiguration' :: Maybe Bool
ebsOptimized = Maybe Bool
a} :: LaunchConfiguration)

-- | The user data to make available to the launched EC2 instances. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html Instance metadata and user data>
-- (Linux) and
-- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html Instance metadata and user data>
-- (Windows). If you are using a command line tool, base64-encoding is
-- performed for you, and you can load the text from a file. Otherwise, you
-- must provide base64-encoded text. User data is limited to 16 KB.
launchConfiguration_userData :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_userData :: (Maybe Text -> f (Maybe Text))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_userData = (LaunchConfiguration -> Maybe Text)
-> (LaunchConfiguration -> Maybe Text -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Text
userData :: Maybe Text
$sel:userData:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
userData} -> Maybe Text
userData) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Text
a -> LaunchConfiguration
s {$sel:userData:LaunchConfiguration' :: Maybe Text
userData = Maybe Text
a} :: LaunchConfiguration)

-- | The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
-- to. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
-- in the /Amazon EC2 User Guide for Linux Instances/ and
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
launchConfiguration_classicLinkVPCId :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_classicLinkVPCId :: (Maybe Text -> f (Maybe Text))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_classicLinkVPCId = (LaunchConfiguration -> Maybe Text)
-> (LaunchConfiguration -> Maybe Text -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Text
classicLinkVPCId :: Maybe Text
$sel:classicLinkVPCId:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
classicLinkVPCId} -> Maybe Text
classicLinkVPCId) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Text
a -> LaunchConfiguration
s {$sel:classicLinkVPCId:LaunchConfiguration' :: Maybe Text
classicLinkVPCId = Maybe Text
a} :: LaunchConfiguration)

-- | The name or the Amazon Resource Name (ARN) of the instance profile
-- associated with the IAM role for the instance. The instance profile
-- contains the IAM role. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html IAM role for applications that run on Amazon EC2 instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
launchConfiguration_iamInstanceProfile :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_iamInstanceProfile :: (Maybe Text -> f (Maybe Text))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_iamInstanceProfile = (LaunchConfiguration -> Maybe Text)
-> (LaunchConfiguration -> Maybe Text -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Text
iamInstanceProfile :: Maybe Text
$sel:iamInstanceProfile:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
iamInstanceProfile} -> Maybe Text
iamInstanceProfile) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Text
a -> LaunchConfiguration
s {$sel:iamInstanceProfile:LaunchConfiguration' :: Maybe Text
iamInstanceProfile = Maybe Text
a} :: LaunchConfiguration)

-- | The metadata options for the instances. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds Configuring the Instance Metadata Options>
-- in the /Amazon EC2 Auto Scaling User Guide/.
launchConfiguration_metadataOptions :: Lens.Lens' LaunchConfiguration (Prelude.Maybe InstanceMetadataOptions)
launchConfiguration_metadataOptions :: (Maybe InstanceMetadataOptions
 -> f (Maybe InstanceMetadataOptions))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_metadataOptions = (LaunchConfiguration -> Maybe InstanceMetadataOptions)
-> (LaunchConfiguration
    -> Maybe InstanceMetadataOptions -> LaunchConfiguration)
-> Lens
     LaunchConfiguration
     LaunchConfiguration
     (Maybe InstanceMetadataOptions)
     (Maybe InstanceMetadataOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe InstanceMetadataOptions
metadataOptions :: Maybe InstanceMetadataOptions
$sel:metadataOptions:LaunchConfiguration' :: LaunchConfiguration -> Maybe InstanceMetadataOptions
metadataOptions} -> Maybe InstanceMetadataOptions
metadataOptions) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe InstanceMetadataOptions
a -> LaunchConfiguration
s {$sel:metadataOptions:LaunchConfiguration' :: Maybe InstanceMetadataOptions
metadataOptions = Maybe InstanceMetadataOptions
a} :: LaunchConfiguration)

-- | The Amazon Resource Name (ARN) of the launch configuration.
launchConfiguration_launchConfigurationARN :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_launchConfigurationARN :: (Maybe Text -> f (Maybe Text))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_launchConfigurationARN = (LaunchConfiguration -> Maybe Text)
-> (LaunchConfiguration -> Maybe Text -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Text
launchConfigurationARN :: Maybe Text
$sel:launchConfigurationARN:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
launchConfigurationARN} -> Maybe Text
launchConfigurationARN) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Text
a -> LaunchConfiguration
s {$sel:launchConfigurationARN:LaunchConfiguration' :: Maybe Text
launchConfigurationARN = Maybe Text
a} :: LaunchConfiguration)

-- | The tenancy of the instance, either @default@ or @dedicated@. An
-- instance with @dedicated@ tenancy runs on isolated, single-tenant
-- hardware and can only be launched into a VPC.
--
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-dedicated-instances.html Configuring instance tenancy with Amazon EC2 Auto Scaling>
-- in the /Amazon EC2 Auto Scaling User Guide/.
launchConfiguration_placementTenancy :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_placementTenancy :: (Maybe Text -> f (Maybe Text))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_placementTenancy = (LaunchConfiguration -> Maybe Text)
-> (LaunchConfiguration -> Maybe Text -> LaunchConfiguration)
-> Lens
     LaunchConfiguration LaunchConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe Text
placementTenancy :: Maybe Text
$sel:placementTenancy:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
placementTenancy} -> Maybe Text
placementTenancy) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe Text
a -> LaunchConfiguration
s {$sel:placementTenancy:LaunchConfiguration' :: Maybe Text
placementTenancy = Maybe Text
a} :: LaunchConfiguration)

-- | A block device mapping, which specifies the block devices for the
-- instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html Block Device Mapping>
-- in the /Amazon EC2 User Guide for Linux Instances/.
launchConfiguration_blockDeviceMappings :: Lens.Lens' LaunchConfiguration (Prelude.Maybe [BlockDeviceMapping])
launchConfiguration_blockDeviceMappings :: (Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_blockDeviceMappings = (LaunchConfiguration -> Maybe [BlockDeviceMapping])
-> (LaunchConfiguration
    -> Maybe [BlockDeviceMapping] -> LaunchConfiguration)
-> Lens
     LaunchConfiguration
     LaunchConfiguration
     (Maybe [BlockDeviceMapping])
     (Maybe [BlockDeviceMapping])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Maybe [BlockDeviceMapping]
blockDeviceMappings :: Maybe [BlockDeviceMapping]
$sel:blockDeviceMappings:LaunchConfiguration' :: LaunchConfiguration -> Maybe [BlockDeviceMapping]
blockDeviceMappings} -> Maybe [BlockDeviceMapping]
blockDeviceMappings) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Maybe [BlockDeviceMapping]
a -> LaunchConfiguration
s {$sel:blockDeviceMappings:LaunchConfiguration' :: Maybe [BlockDeviceMapping]
blockDeviceMappings = Maybe [BlockDeviceMapping]
a} :: LaunchConfiguration) ((Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
 -> LaunchConfiguration -> f LaunchConfiguration)
-> ((Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
    -> Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
-> (Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
-> LaunchConfiguration
-> f LaunchConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BlockDeviceMapping]
  [BlockDeviceMapping]
  [BlockDeviceMapping]
  [BlockDeviceMapping]
-> Iso
     (Maybe [BlockDeviceMapping])
     (Maybe [BlockDeviceMapping])
     (Maybe [BlockDeviceMapping])
     (Maybe [BlockDeviceMapping])
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
  [BlockDeviceMapping]
  [BlockDeviceMapping]
  [BlockDeviceMapping]
  [BlockDeviceMapping]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the launch configuration.
launchConfiguration_launchConfigurationName :: Lens.Lens' LaunchConfiguration Prelude.Text
launchConfiguration_launchConfigurationName :: (Text -> f Text) -> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_launchConfigurationName = (LaunchConfiguration -> Text)
-> (LaunchConfiguration -> Text -> LaunchConfiguration)
-> Lens LaunchConfiguration LaunchConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Text
launchConfigurationName :: Text
$sel:launchConfigurationName:LaunchConfiguration' :: LaunchConfiguration -> Text
launchConfigurationName} -> Text
launchConfigurationName) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Text
a -> LaunchConfiguration
s {$sel:launchConfigurationName:LaunchConfiguration' :: Text
launchConfigurationName = Text
a} :: LaunchConfiguration)

-- | The ID of the Amazon Machine Image (AMI) to use to launch your EC2
-- instances. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html Finding an AMI>
-- in the /Amazon EC2 User Guide for Linux Instances/.
launchConfiguration_imageId :: Lens.Lens' LaunchConfiguration Prelude.Text
launchConfiguration_imageId :: (Text -> f Text) -> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_imageId = (LaunchConfiguration -> Text)
-> (LaunchConfiguration -> Text -> LaunchConfiguration)
-> Lens LaunchConfiguration LaunchConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Text
imageId :: Text
$sel:imageId:LaunchConfiguration' :: LaunchConfiguration -> Text
imageId} -> Text
imageId) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Text
a -> LaunchConfiguration
s {$sel:imageId:LaunchConfiguration' :: Text
imageId = Text
a} :: LaunchConfiguration)

-- | The instance type for the instances.
--
-- For information about available instance types, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes Available Instance Types>
-- in the /Amazon EC2 User Guide for Linux Instances/.
launchConfiguration_instanceType :: Lens.Lens' LaunchConfiguration Prelude.Text
launchConfiguration_instanceType :: (Text -> f Text) -> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_instanceType = (LaunchConfiguration -> Text)
-> (LaunchConfiguration -> Text -> LaunchConfiguration)
-> Lens LaunchConfiguration LaunchConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {Text
instanceType :: Text
$sel:instanceType:LaunchConfiguration' :: LaunchConfiguration -> Text
instanceType} -> Text
instanceType) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} Text
a -> LaunchConfiguration
s {$sel:instanceType:LaunchConfiguration' :: Text
instanceType = Text
a} :: LaunchConfiguration)

-- | The creation date and time for the launch configuration.
launchConfiguration_createdTime :: Lens.Lens' LaunchConfiguration Prelude.UTCTime
launchConfiguration_createdTime :: (UTCTime -> f UTCTime)
-> LaunchConfiguration -> f LaunchConfiguration
launchConfiguration_createdTime = (LaunchConfiguration -> ISO8601)
-> (LaunchConfiguration -> ISO8601 -> LaunchConfiguration)
-> Lens LaunchConfiguration LaunchConfiguration ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchConfiguration' {ISO8601
createdTime :: ISO8601
$sel:createdTime:LaunchConfiguration' :: LaunchConfiguration -> ISO8601
createdTime} -> ISO8601
createdTime) (\s :: LaunchConfiguration
s@LaunchConfiguration' {} ISO8601
a -> LaunchConfiguration
s {$sel:createdTime:LaunchConfiguration' :: ISO8601
createdTime = ISO8601
a} :: LaunchConfiguration) ((ISO8601 -> f ISO8601)
 -> LaunchConfiguration -> f LaunchConfiguration)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> LaunchConfiguration
-> f LaunchConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromXML LaunchConfiguration where
  parseXML :: [Node] -> Either String LaunchConfiguration
parseXML [Node]
x =
    Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe InstanceMonitoring
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstanceMetadataOptions
-> Maybe Text
-> Maybe Text
-> Maybe [BlockDeviceMapping]
-> Text
-> Text
-> Text
-> ISO8601
-> LaunchConfiguration
LaunchConfiguration'
      (Maybe Bool
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe InstanceMonitoring
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe InstanceMetadataOptions
 -> Maybe Text
 -> Maybe Text
 -> Maybe [BlockDeviceMapping]
 -> Text
 -> Text
 -> Text
 -> ISO8601
 -> LaunchConfiguration)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe InstanceMonitoring
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AssociatePublicIpAddress")
      Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe InstanceMonitoring
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe InstanceMonitoring
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SecurityGroups" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Text
   -> Maybe InstanceMonitoring
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe InstanceMonitoring
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SpotPrice")
      Either
  String
  (Maybe InstanceMonitoring
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe InstanceMonitoring)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe InstanceMonitoring)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"InstanceMonitoring")
      Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KeyName")
      Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ClassicLinkVPCSecurityGroups"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"RamdiskId")
      Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KernelId")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EbsOptimized")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UserData")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ClassicLinkVPCId")
      Either
  String
  (Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IamInstanceProfile")
      Either
  String
  (Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe InstanceMetadataOptions)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe InstanceMetadataOptions)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MetadataOptions")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [BlockDeviceMapping]
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LaunchConfigurationARN")
      Either
  String
  (Maybe Text
   -> Maybe [BlockDeviceMapping]
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> LaunchConfiguration)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [BlockDeviceMapping]
      -> Text -> Text -> Text -> ISO8601 -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PlacementTenancy")
      Either
  String
  (Maybe [BlockDeviceMapping]
   -> Text -> Text -> Text -> ISO8601 -> LaunchConfiguration)
-> Either String (Maybe [BlockDeviceMapping])
-> Either
     String (Text -> Text -> Text -> ISO8601 -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"BlockDeviceMappings"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [BlockDeviceMapping]))
-> Either String (Maybe [BlockDeviceMapping])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [BlockDeviceMapping])
-> [Node] -> Either String (Maybe [BlockDeviceMapping])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [BlockDeviceMapping]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String (Text -> Text -> Text -> ISO8601 -> LaunchConfiguration)
-> Either String Text
-> Either String (Text -> Text -> ISO8601 -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"LaunchConfigurationName")
      Either String (Text -> Text -> ISO8601 -> LaunchConfiguration)
-> Either String Text
-> Either String (Text -> ISO8601 -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ImageId")
      Either String (Text -> ISO8601 -> LaunchConfiguration)
-> Either String Text
-> Either String (ISO8601 -> LaunchConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"InstanceType")
      Either String (ISO8601 -> LaunchConfiguration)
-> Either String ISO8601 -> Either String LaunchConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ISO8601
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"CreatedTime")

instance Prelude.Hashable LaunchConfiguration

instance Prelude.NFData LaunchConfiguration