{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Describes a launch configuration.
--
-- /See:/ 'newLaunchConfiguration' smart constructor.
data LaunchConfiguration = LaunchConfiguration'
  { -- | Specifies whether to assign a public IPv4 address to the group\'s
    -- instances. If the instance is launched into a default subnet, the
    -- default is to assign a public IPv4 address, unless you disabled the
    -- option to assign a public IPv4 address on the subnet. If the instance is
    -- launched into a nondefault subnet, the default is not to assign a public
    -- IPv4 address, unless you enabled the option to assign a public IPv4
    -- address on the subnet. 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,
    -- | The block device mapping entries that define the block devices to attach
    -- to the instances at launch. By default, the block devices specified in
    -- the block device mapping for the AMI are used. 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],
    -- | Available for backward compatibility.
    LaunchConfiguration -> Maybe Text
classicLinkVPCId :: Prelude.Maybe Prelude.Text,
    -- | Available for backward compatibility.
    LaunchConfiguration -> Maybe [Text]
classicLinkVPCSecurityGroups :: 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 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,
    -- | 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 ID of the kernel associated with the AMI.
    LaunchConfiguration -> Maybe Text
kernelId :: Prelude.Maybe Prelude.Text,
    -- | 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 Amazon Resource Name (ARN) of the launch configuration.
    LaunchConfiguration -> Maybe Text
launchConfigurationARN :: 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 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,
    -- | The ID of the RAM disk associated with the AMI.
    LaunchConfiguration -> Maybe Text
ramdiskId :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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 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 Find a Linux 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 :: Data.ISO8601
  }
  deriving (LaunchConfiguration -> LaunchConfiguration -> Bool
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]
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
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. 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' - Specifies whether to assign a public IPv4 address to the group\'s
-- instances. If the instance is launched into a default subnet, the
-- default is to assign a public IPv4 address, unless you disabled the
-- option to assign a public IPv4 address on the subnet. If the instance is
-- launched into a nondefault subnet, the default is not to assign a public
-- IPv4 address, unless you enabled the option to assign a public IPv4
-- address on the subnet. 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/.
--
-- 'blockDeviceMappings', 'launchConfiguration_blockDeviceMappings' - The block device mapping entries that define the block devices to attach
-- to the instances at launch. By default, the block devices specified in
-- the block device mapping for the AMI are used. 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/.
--
-- 'classicLinkVPCId', 'launchConfiguration_classicLinkVPCId' - Available for backward compatibility.
--
-- 'classicLinkVPCSecurityGroups', 'launchConfiguration_classicLinkVPCSecurityGroups' - Available for backward compatibility.
--
-- '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/.
--
-- '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/.
--
-- '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/.
--
-- 'kernelId', 'launchConfiguration_kernelId' - The ID of the kernel associated with the AMI.
--
-- '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/.
--
-- 'launchConfigurationARN', 'launchConfiguration_launchConfigurationARN' - The Amazon Resource Name (ARN) of the launch configuration.
--
-- '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/.
--
-- '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/.
--
-- 'ramdiskId', 'launchConfiguration_ramdiskId' - The ID of the RAM disk associated with the AMI.
--
-- '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/.
--
-- '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.
--
-- '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 Find a Linux 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'
      { $sel:associatePublicIpAddress:LaunchConfiguration' :: Maybe Bool
associatePublicIpAddress =
          forall a. Maybe a
Prelude.Nothing,
        $sel:blockDeviceMappings:LaunchConfiguration' :: Maybe [BlockDeviceMapping]
blockDeviceMappings = forall a. Maybe a
Prelude.Nothing,
        $sel:classicLinkVPCId:LaunchConfiguration' :: Maybe Text
classicLinkVPCId = forall a. Maybe a
Prelude.Nothing,
        $sel:classicLinkVPCSecurityGroups:LaunchConfiguration' :: Maybe [Text]
classicLinkVPCSecurityGroups = forall a. Maybe a
Prelude.Nothing,
        $sel:ebsOptimized:LaunchConfiguration' :: Maybe Bool
ebsOptimized = forall a. Maybe a
Prelude.Nothing,
        $sel:iamInstanceProfile:LaunchConfiguration' :: Maybe Text
iamInstanceProfile = forall a. Maybe a
Prelude.Nothing,
        $sel:instanceMonitoring:LaunchConfiguration' :: Maybe InstanceMonitoring
instanceMonitoring = forall a. Maybe a
Prelude.Nothing,
        $sel:kernelId:LaunchConfiguration' :: Maybe Text
kernelId = forall a. Maybe a
Prelude.Nothing,
        $sel:keyName:LaunchConfiguration' :: Maybe Text
keyName = forall a. Maybe a
Prelude.Nothing,
        $sel:launchConfigurationARN:LaunchConfiguration' :: Maybe Text
launchConfigurationARN = forall a. Maybe a
Prelude.Nothing,
        $sel:metadataOptions:LaunchConfiguration' :: Maybe InstanceMetadataOptions
metadataOptions = forall a. Maybe a
Prelude.Nothing,
        $sel:placementTenancy:LaunchConfiguration' :: Maybe Text
placementTenancy = forall a. Maybe a
Prelude.Nothing,
        $sel:ramdiskId:LaunchConfiguration' :: Maybe Text
ramdiskId = forall a. Maybe a
Prelude.Nothing,
        $sel:securityGroups:LaunchConfiguration' :: Maybe [Text]
securityGroups = forall a. Maybe a
Prelude.Nothing,
        $sel:spotPrice:LaunchConfiguration' :: Maybe Text
spotPrice = forall a. Maybe a
Prelude.Nothing,
        $sel:userData:LaunchConfiguration' :: Maybe Text
userData = 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 = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedTime_
      }

-- | Specifies whether to assign a public IPv4 address to the group\'s
-- instances. If the instance is launched into a default subnet, the
-- default is to assign a public IPv4 address, unless you disabled the
-- option to assign a public IPv4 address on the subnet. If the instance is
-- launched into a nondefault subnet, the default is not to assign a public
-- IPv4 address, unless you enabled the option to assign a public IPv4
-- address on the subnet. 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 :: Lens' LaunchConfiguration (Maybe Bool)
launchConfiguration_associatePublicIpAddress = 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)

-- | The block device mapping entries that define the block devices to attach
-- to the instances at launch. By default, the block devices specified in
-- the block device mapping for the AMI are used. 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 :: Lens' LaunchConfiguration (Maybe [BlockDeviceMapping])
launchConfiguration_blockDeviceMappings = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Available for backward compatibility.
launchConfiguration_classicLinkVPCId :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_classicLinkVPCId :: Lens' LaunchConfiguration (Maybe Text)
launchConfiguration_classicLinkVPCId = 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)

-- | Available for backward compatibility.
launchConfiguration_classicLinkVPCSecurityGroups :: Lens.Lens' LaunchConfiguration (Prelude.Maybe [Prelude.Text])
launchConfiguration_classicLinkVPCSecurityGroups :: Lens' LaunchConfiguration (Maybe [Text])
launchConfiguration_classicLinkVPCSecurityGroups = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: Lens' LaunchConfiguration (Maybe Bool)
launchConfiguration_ebsOptimized = 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 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 :: Lens' LaunchConfiguration (Maybe Text)
launchConfiguration_iamInstanceProfile = 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)

-- | 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 :: Lens' LaunchConfiguration (Maybe InstanceMonitoring)
launchConfiguration_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 ID of the kernel associated with the AMI.
launchConfiguration_kernelId :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_kernelId :: Lens' LaunchConfiguration (Maybe Text)
launchConfiguration_kernelId = 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)

-- | 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 :: Lens' LaunchConfiguration (Maybe Text)
launchConfiguration_keyName = 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 Amazon Resource Name (ARN) of the launch configuration.
launchConfiguration_launchConfigurationARN :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_launchConfigurationARN :: Lens' LaunchConfiguration (Maybe Text)
launchConfiguration_launchConfigurationARN = 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 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 :: Lens' LaunchConfiguration (Maybe InstanceMetadataOptions)
launchConfiguration_metadataOptions = 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 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 :: Lens' LaunchConfiguration (Maybe Text)
launchConfiguration_placementTenancy = 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)

-- | The ID of the RAM disk associated with the AMI.
launchConfiguration_ramdiskId :: Lens.Lens' LaunchConfiguration (Prelude.Maybe Prelude.Text)
launchConfiguration_ramdiskId :: Lens' LaunchConfiguration (Maybe Text)
launchConfiguration_ramdiskId = 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)

-- | 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 :: Lens' LaunchConfiguration (Maybe [Text])
launchConfiguration_securityGroups = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 :: Lens' LaunchConfiguration (Maybe Text)
launchConfiguration_spotPrice = 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)

-- | 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 :: Lens' LaunchConfiguration (Maybe Text)
launchConfiguration_userData = 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 name of the launch configuration.
launchConfiguration_launchConfigurationName :: Lens.Lens' LaunchConfiguration Prelude.Text
launchConfiguration_launchConfigurationName :: Lens' LaunchConfiguration Text
launchConfiguration_launchConfigurationName = 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 Find a Linux AMI>
-- in the /Amazon EC2 User Guide for Linux Instances/.
launchConfiguration_imageId :: Lens.Lens' LaunchConfiguration Prelude.Text
launchConfiguration_imageId :: Lens' LaunchConfiguration Text
launchConfiguration_imageId = 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 :: Lens' LaunchConfiguration Text
launchConfiguration_instanceType = 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 :: Lens' LaunchConfiguration UTCTime
launchConfiguration_createdTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

instance Prelude.Hashable LaunchConfiguration where
  hashWithSalt :: Int -> LaunchConfiguration -> Int
hashWithSalt Int
_salt LaunchConfiguration' {Maybe Bool
Maybe [Text]
Maybe [BlockDeviceMapping]
Maybe Text
Maybe InstanceMetadataOptions
Maybe InstanceMonitoring
Text
ISO8601
createdTime :: ISO8601
instanceType :: Text
imageId :: Text
launchConfigurationName :: Text
userData :: Maybe Text
spotPrice :: Maybe Text
securityGroups :: Maybe [Text]
ramdiskId :: Maybe Text
placementTenancy :: Maybe Text
metadataOptions :: Maybe InstanceMetadataOptions
launchConfigurationARN :: Maybe Text
keyName :: Maybe Text
kernelId :: Maybe Text
instanceMonitoring :: Maybe InstanceMonitoring
iamInstanceProfile :: Maybe Text
ebsOptimized :: Maybe Bool
classicLinkVPCSecurityGroups :: Maybe [Text]
classicLinkVPCId :: Maybe Text
blockDeviceMappings :: Maybe [BlockDeviceMapping]
associatePublicIpAddress :: Maybe Bool
$sel:createdTime:LaunchConfiguration' :: LaunchConfiguration -> ISO8601
$sel:instanceType:LaunchConfiguration' :: LaunchConfiguration -> Text
$sel:imageId:LaunchConfiguration' :: LaunchConfiguration -> Text
$sel:launchConfigurationName:LaunchConfiguration' :: LaunchConfiguration -> Text
$sel:userData:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:spotPrice:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:securityGroups:LaunchConfiguration' :: LaunchConfiguration -> Maybe [Text]
$sel:ramdiskId:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:placementTenancy:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:metadataOptions:LaunchConfiguration' :: LaunchConfiguration -> Maybe InstanceMetadataOptions
$sel:launchConfigurationARN:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:keyName:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:kernelId:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:instanceMonitoring:LaunchConfiguration' :: LaunchConfiguration -> Maybe InstanceMonitoring
$sel:iamInstanceProfile:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:ebsOptimized:LaunchConfiguration' :: LaunchConfiguration -> Maybe Bool
$sel:classicLinkVPCSecurityGroups:LaunchConfiguration' :: LaunchConfiguration -> Maybe [Text]
$sel:classicLinkVPCId:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:blockDeviceMappings:LaunchConfiguration' :: LaunchConfiguration -> Maybe [BlockDeviceMapping]
$sel:associatePublicIpAddress:LaunchConfiguration' :: LaunchConfiguration -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
associatePublicIpAddress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [BlockDeviceMapping]
blockDeviceMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
classicLinkVPCId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
classicLinkVPCSecurityGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
ebsOptimized
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
iamInstanceProfile
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceMonitoring
instanceMonitoring
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kernelId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
keyName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
launchConfigurationARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceMetadataOptions
metadataOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
placementTenancy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ramdiskId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
spotPrice
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userData
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
launchConfigurationName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
imageId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
createdTime

instance Prelude.NFData LaunchConfiguration where
  rnf :: LaunchConfiguration -> ()
rnf LaunchConfiguration' {Maybe Bool
Maybe [Text]
Maybe [BlockDeviceMapping]
Maybe Text
Maybe InstanceMetadataOptions
Maybe InstanceMonitoring
Text
ISO8601
createdTime :: ISO8601
instanceType :: Text
imageId :: Text
launchConfigurationName :: Text
userData :: Maybe Text
spotPrice :: Maybe Text
securityGroups :: Maybe [Text]
ramdiskId :: Maybe Text
placementTenancy :: Maybe Text
metadataOptions :: Maybe InstanceMetadataOptions
launchConfigurationARN :: Maybe Text
keyName :: Maybe Text
kernelId :: Maybe Text
instanceMonitoring :: Maybe InstanceMonitoring
iamInstanceProfile :: Maybe Text
ebsOptimized :: Maybe Bool
classicLinkVPCSecurityGroups :: Maybe [Text]
classicLinkVPCId :: Maybe Text
blockDeviceMappings :: Maybe [BlockDeviceMapping]
associatePublicIpAddress :: Maybe Bool
$sel:createdTime:LaunchConfiguration' :: LaunchConfiguration -> ISO8601
$sel:instanceType:LaunchConfiguration' :: LaunchConfiguration -> Text
$sel:imageId:LaunchConfiguration' :: LaunchConfiguration -> Text
$sel:launchConfigurationName:LaunchConfiguration' :: LaunchConfiguration -> Text
$sel:userData:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:spotPrice:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:securityGroups:LaunchConfiguration' :: LaunchConfiguration -> Maybe [Text]
$sel:ramdiskId:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:placementTenancy:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:metadataOptions:LaunchConfiguration' :: LaunchConfiguration -> Maybe InstanceMetadataOptions
$sel:launchConfigurationARN:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:keyName:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:kernelId:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:instanceMonitoring:LaunchConfiguration' :: LaunchConfiguration -> Maybe InstanceMonitoring
$sel:iamInstanceProfile:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:ebsOptimized:LaunchConfiguration' :: LaunchConfiguration -> Maybe Bool
$sel:classicLinkVPCSecurityGroups:LaunchConfiguration' :: LaunchConfiguration -> Maybe [Text]
$sel:classicLinkVPCId:LaunchConfiguration' :: LaunchConfiguration -> Maybe Text
$sel:blockDeviceMappings:LaunchConfiguration' :: LaunchConfiguration -> Maybe [BlockDeviceMapping]
$sel:associatePublicIpAddress:LaunchConfiguration' :: LaunchConfiguration -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
associatePublicIpAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [BlockDeviceMapping]
blockDeviceMappings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
classicLinkVPCId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
classicLinkVPCSecurityGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
ebsOptimized
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
iamInstanceProfile
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceMonitoring
instanceMonitoring
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kernelId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
keyName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
launchConfigurationARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceMetadataOptions
metadataOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
placementTenancy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ramdiskId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
securityGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
spotPrice
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
launchConfigurationName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
imageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
instanceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
createdTime