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

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

-- |
-- Module      : Amazonka.AutoScaling.CreateLaunchConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a launch configuration.
--
-- If you exceed your maximum limit of launch configurations, the call
-- fails. To query this limit, call the DescribeAccountLimits API. For
-- information about updating this limit, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-quotas.html Quotas for Amazon EC2 Auto Scaling>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html Launch configurations>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- Amazon EC2 Auto Scaling configures instances launched as part of an Auto
-- Scaling group using either a launch template or a launch configuration.
-- We strongly recommend that you do not use launch configurations. They do
-- not provide full functionality for Amazon EC2 Auto Scaling or Amazon
-- EC2. For information about using launch templates, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html Launch templates>
-- in the /Amazon EC2 Auto Scaling User Guide/.
module Amazonka.AutoScaling.CreateLaunchConfiguration
  ( -- * Creating a Request
    CreateLaunchConfiguration (..),
    newCreateLaunchConfiguration,

    -- * Request Lenses
    createLaunchConfiguration_associatePublicIpAddress,
    createLaunchConfiguration_blockDeviceMappings,
    createLaunchConfiguration_classicLinkVPCId,
    createLaunchConfiguration_classicLinkVPCSecurityGroups,
    createLaunchConfiguration_ebsOptimized,
    createLaunchConfiguration_iamInstanceProfile,
    createLaunchConfiguration_imageId,
    createLaunchConfiguration_instanceId,
    createLaunchConfiguration_instanceMonitoring,
    createLaunchConfiguration_instanceType,
    createLaunchConfiguration_kernelId,
    createLaunchConfiguration_keyName,
    createLaunchConfiguration_metadataOptions,
    createLaunchConfiguration_placementTenancy,
    createLaunchConfiguration_ramdiskId,
    createLaunchConfiguration_securityGroups,
    createLaunchConfiguration_spotPrice,
    createLaunchConfiguration_userData,
    createLaunchConfiguration_launchConfigurationName,

    -- * Destructuring the Response
    CreateLaunchConfigurationResponse (..),
    newCreateLaunchConfigurationResponse,
  )
where

import Amazonka.AutoScaling.Types
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateLaunchConfiguration' smart constructor.
data CreateLaunchConfiguration = CreateLaunchConfiguration'
  { -- | 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.
    --
    -- If you specify @true@, each instance in the Auto Scaling group receives
    -- a unique public IPv4 address. 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/.
    --
    -- If you specify this property, you must specify at least one subnet for
    -- @VPCZoneIdentifier@ when you create your group.
    CreateLaunchConfiguration -> 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 mappings>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    CreateLaunchConfiguration -> Maybe [BlockDeviceMapping]
blockDeviceMappings :: Prelude.Maybe [BlockDeviceMapping],
    -- | Available for backward compatibility.
    CreateLaunchConfiguration -> Maybe Text
classicLinkVPCId :: Prelude.Maybe Prelude.Text,
    -- | Available for backward compatibility.
    CreateLaunchConfiguration -> Maybe [Text]
classicLinkVPCSecurityGroups :: Prelude.Maybe [Prelude.Text],
    -- | Specifies whether the launch configuration is optimized for EBS I\/O
    -- (@true@) or not (@false@). The optimization provides dedicated
    -- throughput to Amazon EBS and an optimized configuration stack to provide
    -- optimal I\/O performance. This optimization is not available with all
    -- instance types. Additional fees are incurred when you enable EBS
    -- optimization for an instance type that is not EBS-optimized by default.
    -- 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/.
    --
    -- The default value is @false@.
    CreateLaunchConfiguration -> 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/.
    CreateLaunchConfiguration -> Maybe Text
iamInstanceProfile :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Amazon Machine Image (AMI) that was assigned during
    -- registration. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html Finding a Linux AMI>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    --
    -- If you specify @InstanceId@, an @ImageId@ is not required.
    CreateLaunchConfiguration -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the instance to use to create the launch configuration. The
    -- new launch configuration derives attributes from the instance, except
    -- for the block device mapping.
    --
    -- To create a launch configuration with a block device mapping or override
    -- any other instance attributes, specify them as part of the same request.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html Creating a launch configuration using an EC2 instance>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateLaunchConfiguration -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | Controls whether instances in this group are launched with detailed
    -- (@true@) or basic (@false@) monitoring.
    --
    -- The default value is @true@ (enabled).
    --
    -- When detailed monitoring is enabled, Amazon CloudWatch generates metrics
    -- every minute and your account is charged a fee. When you disable
    -- detailed monitoring, CloudWatch generates metrics every 5 minutes. 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/.
    CreateLaunchConfiguration -> Maybe InstanceMonitoring
instanceMonitoring :: Prelude.Maybe InstanceMonitoring,
    -- | Specifies the instance type of the EC2 instance. 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/.
    --
    -- If you specify @InstanceId@, an @InstanceType@ is not required.
    CreateLaunchConfiguration -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
    -- | The ID of the kernel associated with the AMI.
    --
    -- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html User provided kernels>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    CreateLaunchConfiguration -> 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 and Linux instances>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    CreateLaunchConfiguration -> Maybe Text
keyName :: 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/.
    CreateLaunchConfiguration -> 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. To launch dedicated
    -- instances into a shared tenancy VPC (a VPC with the instance placement
    -- tenancy attribute set to @default@), you must set the value of this
    -- property to @dedicated@. 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/.
    --
    -- If you specify @PlacementTenancy@, you must specify at least one subnet
    -- for @VPCZoneIdentifier@ when you create your group.
    --
    -- Valid values: @default@ | @dedicated@
    CreateLaunchConfiguration -> Maybe Text
placementTenancy :: Prelude.Maybe Prelude.Text,
    -- | The ID of the RAM disk to select.
    --
    -- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html User provided kernels>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    CreateLaunchConfiguration -> Maybe Text
ramdiskId :: Prelude.Maybe Prelude.Text,
    -- | A list that contains the security group IDs 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 Control traffic to resources using security groups>
    -- in the /Amazon Virtual Private Cloud User Guide/.
    CreateLaunchConfiguration -> 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/launch-template-spot-instances.html Request Spot Instances for fault-tolerant and flexible applications>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    --
    -- Valid Range: Minimum value of 0.001
    --
    -- When you change your maximum price by creating a new launch
    -- configuration, running instances will continue to run as long as the
    -- maximum price for those running instances is higher than the current
    -- Spot price.
    CreateLaunchConfiguration -> 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.
    CreateLaunchConfiguration -> Maybe Text
userData :: Prelude.Maybe Prelude.Text,
    -- | The name of the launch configuration. This name must be unique per
    -- Region per account.
    CreateLaunchConfiguration -> Text
launchConfigurationName :: Prelude.Text
  }
  deriving (CreateLaunchConfiguration -> CreateLaunchConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLaunchConfiguration -> CreateLaunchConfiguration -> Bool
$c/= :: CreateLaunchConfiguration -> CreateLaunchConfiguration -> Bool
== :: CreateLaunchConfiguration -> CreateLaunchConfiguration -> Bool
$c== :: CreateLaunchConfiguration -> CreateLaunchConfiguration -> Bool
Prelude.Eq, ReadPrec [CreateLaunchConfiguration]
ReadPrec CreateLaunchConfiguration
Int -> ReadS CreateLaunchConfiguration
ReadS [CreateLaunchConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLaunchConfiguration]
$creadListPrec :: ReadPrec [CreateLaunchConfiguration]
readPrec :: ReadPrec CreateLaunchConfiguration
$creadPrec :: ReadPrec CreateLaunchConfiguration
readList :: ReadS [CreateLaunchConfiguration]
$creadList :: ReadS [CreateLaunchConfiguration]
readsPrec :: Int -> ReadS CreateLaunchConfiguration
$creadsPrec :: Int -> ReadS CreateLaunchConfiguration
Prelude.Read, Int -> CreateLaunchConfiguration -> ShowS
[CreateLaunchConfiguration] -> ShowS
CreateLaunchConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLaunchConfiguration] -> ShowS
$cshowList :: [CreateLaunchConfiguration] -> ShowS
show :: CreateLaunchConfiguration -> String
$cshow :: CreateLaunchConfiguration -> String
showsPrec :: Int -> CreateLaunchConfiguration -> ShowS
$cshowsPrec :: Int -> CreateLaunchConfiguration -> ShowS
Prelude.Show, forall x.
Rep CreateLaunchConfiguration x -> CreateLaunchConfiguration
forall x.
CreateLaunchConfiguration -> Rep CreateLaunchConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLaunchConfiguration x -> CreateLaunchConfiguration
$cfrom :: forall x.
CreateLaunchConfiguration -> Rep CreateLaunchConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'CreateLaunchConfiguration' 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', 'createLaunchConfiguration_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.
--
-- If you specify @true@, each instance in the Auto Scaling group receives
-- a unique public IPv4 address. 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/.
--
-- If you specify this property, you must specify at least one subnet for
-- @VPCZoneIdentifier@ when you create your group.
--
-- 'blockDeviceMappings', 'createLaunchConfiguration_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 mappings>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'classicLinkVPCId', 'createLaunchConfiguration_classicLinkVPCId' - Available for backward compatibility.
--
-- 'classicLinkVPCSecurityGroups', 'createLaunchConfiguration_classicLinkVPCSecurityGroups' - Available for backward compatibility.
--
-- 'ebsOptimized', 'createLaunchConfiguration_ebsOptimized' - Specifies whether the launch configuration is optimized for EBS I\/O
-- (@true@) or not (@false@). The optimization provides dedicated
-- throughput to Amazon EBS and an optimized configuration stack to provide
-- optimal I\/O performance. This optimization is not available with all
-- instance types. Additional fees are incurred when you enable EBS
-- optimization for an instance type that is not EBS-optimized by default.
-- 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/.
--
-- The default value is @false@.
--
-- 'iamInstanceProfile', 'createLaunchConfiguration_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/.
--
-- 'imageId', 'createLaunchConfiguration_imageId' - The ID of the Amazon Machine Image (AMI) that was assigned during
-- registration. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html Finding a Linux AMI>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- If you specify @InstanceId@, an @ImageId@ is not required.
--
-- 'instanceId', 'createLaunchConfiguration_instanceId' - The ID of the instance to use to create the launch configuration. The
-- new launch configuration derives attributes from the instance, except
-- for the block device mapping.
--
-- To create a launch configuration with a block device mapping or override
-- any other instance attributes, specify them as part of the same request.
--
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html Creating a launch configuration using an EC2 instance>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'instanceMonitoring', 'createLaunchConfiguration_instanceMonitoring' - Controls whether instances in this group are launched with detailed
-- (@true@) or basic (@false@) monitoring.
--
-- The default value is @true@ (enabled).
--
-- When detailed monitoring is enabled, Amazon CloudWatch generates metrics
-- every minute and your account is charged a fee. When you disable
-- detailed monitoring, CloudWatch generates metrics every 5 minutes. 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/.
--
-- 'instanceType', 'createLaunchConfiguration_instanceType' - Specifies the instance type of the EC2 instance. 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/.
--
-- If you specify @InstanceId@, an @InstanceType@ is not required.
--
-- 'kernelId', 'createLaunchConfiguration_kernelId' - The ID of the kernel associated with the AMI.
--
-- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html User provided kernels>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'keyName', 'createLaunchConfiguration_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 and Linux instances>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'metadataOptions', 'createLaunchConfiguration_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', 'createLaunchConfiguration_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. To launch dedicated
-- instances into a shared tenancy VPC (a VPC with the instance placement
-- tenancy attribute set to @default@), you must set the value of this
-- property to @dedicated@. 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/.
--
-- If you specify @PlacementTenancy@, you must specify at least one subnet
-- for @VPCZoneIdentifier@ when you create your group.
--
-- Valid values: @default@ | @dedicated@
--
-- 'ramdiskId', 'createLaunchConfiguration_ramdiskId' - The ID of the RAM disk to select.
--
-- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html User provided kernels>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'securityGroups', 'createLaunchConfiguration_securityGroups' - A list that contains the security group IDs 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 Control traffic to resources using security groups>
-- in the /Amazon Virtual Private Cloud User Guide/.
--
-- 'spotPrice', 'createLaunchConfiguration_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/launch-template-spot-instances.html Request Spot Instances for fault-tolerant and flexible applications>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- Valid Range: Minimum value of 0.001
--
-- When you change your maximum price by creating a new launch
-- configuration, running instances will continue to run as long as the
-- maximum price for those running instances is higher than the current
-- Spot price.
--
-- 'userData', 'createLaunchConfiguration_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', 'createLaunchConfiguration_launchConfigurationName' - The name of the launch configuration. This name must be unique per
-- Region per account.
newCreateLaunchConfiguration ::
  -- | 'launchConfigurationName'
  Prelude.Text ->
  CreateLaunchConfiguration
newCreateLaunchConfiguration :: Text -> CreateLaunchConfiguration
newCreateLaunchConfiguration
  Text
pLaunchConfigurationName_ =
    CreateLaunchConfiguration'
      { $sel:associatePublicIpAddress:CreateLaunchConfiguration' :: Maybe Bool
associatePublicIpAddress =
          forall a. Maybe a
Prelude.Nothing,
        $sel:blockDeviceMappings:CreateLaunchConfiguration' :: Maybe [BlockDeviceMapping]
blockDeviceMappings = forall a. Maybe a
Prelude.Nothing,
        $sel:classicLinkVPCId:CreateLaunchConfiguration' :: Maybe Text
classicLinkVPCId = forall a. Maybe a
Prelude.Nothing,
        $sel:classicLinkVPCSecurityGroups:CreateLaunchConfiguration' :: Maybe [Text]
classicLinkVPCSecurityGroups = forall a. Maybe a
Prelude.Nothing,
        $sel:ebsOptimized:CreateLaunchConfiguration' :: Maybe Bool
ebsOptimized = forall a. Maybe a
Prelude.Nothing,
        $sel:iamInstanceProfile:CreateLaunchConfiguration' :: Maybe Text
iamInstanceProfile = forall a. Maybe a
Prelude.Nothing,
        $sel:imageId:CreateLaunchConfiguration' :: Maybe Text
imageId = forall a. Maybe a
Prelude.Nothing,
        $sel:instanceId:CreateLaunchConfiguration' :: Maybe Text
instanceId = forall a. Maybe a
Prelude.Nothing,
        $sel:instanceMonitoring:CreateLaunchConfiguration' :: Maybe InstanceMonitoring
instanceMonitoring = forall a. Maybe a
Prelude.Nothing,
        $sel:instanceType:CreateLaunchConfiguration' :: Maybe Text
instanceType = forall a. Maybe a
Prelude.Nothing,
        $sel:kernelId:CreateLaunchConfiguration' :: Maybe Text
kernelId = forall a. Maybe a
Prelude.Nothing,
        $sel:keyName:CreateLaunchConfiguration' :: Maybe Text
keyName = forall a. Maybe a
Prelude.Nothing,
        $sel:metadataOptions:CreateLaunchConfiguration' :: Maybe InstanceMetadataOptions
metadataOptions = forall a. Maybe a
Prelude.Nothing,
        $sel:placementTenancy:CreateLaunchConfiguration' :: Maybe Text
placementTenancy = forall a. Maybe a
Prelude.Nothing,
        $sel:ramdiskId:CreateLaunchConfiguration' :: Maybe Text
ramdiskId = forall a. Maybe a
Prelude.Nothing,
        $sel:securityGroups:CreateLaunchConfiguration' :: Maybe [Text]
securityGroups = forall a. Maybe a
Prelude.Nothing,
        $sel:spotPrice:CreateLaunchConfiguration' :: Maybe Text
spotPrice = forall a. Maybe a
Prelude.Nothing,
        $sel:userData:CreateLaunchConfiguration' :: Maybe Text
userData = forall a. Maybe a
Prelude.Nothing,
        $sel:launchConfigurationName:CreateLaunchConfiguration' :: Text
launchConfigurationName =
          Text
pLaunchConfigurationName_
      }

-- | 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.
--
-- If you specify @true@, each instance in the Auto Scaling group receives
-- a unique public IPv4 address. 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/.
--
-- If you specify this property, you must specify at least one subnet for
-- @VPCZoneIdentifier@ when you create your group.
createLaunchConfiguration_associatePublicIpAddress :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Bool)
createLaunchConfiguration_associatePublicIpAddress :: Lens' CreateLaunchConfiguration (Maybe Bool)
createLaunchConfiguration_associatePublicIpAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Bool
associatePublicIpAddress :: Maybe Bool
$sel:associatePublicIpAddress:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Bool
associatePublicIpAddress} -> Maybe Bool
associatePublicIpAddress) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Bool
a -> CreateLaunchConfiguration
s {$sel:associatePublicIpAddress:CreateLaunchConfiguration' :: Maybe Bool
associatePublicIpAddress = Maybe Bool
a} :: CreateLaunchConfiguration)

-- | 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 mappings>
-- in the /Amazon EC2 User Guide for Linux Instances/.
createLaunchConfiguration_blockDeviceMappings :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe [BlockDeviceMapping])
createLaunchConfiguration_blockDeviceMappings :: Lens' CreateLaunchConfiguration (Maybe [BlockDeviceMapping])
createLaunchConfiguration_blockDeviceMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe [BlockDeviceMapping]
blockDeviceMappings :: Maybe [BlockDeviceMapping]
$sel:blockDeviceMappings:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [BlockDeviceMapping]
blockDeviceMappings} -> Maybe [BlockDeviceMapping]
blockDeviceMappings) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe [BlockDeviceMapping]
a -> CreateLaunchConfiguration
s {$sel:blockDeviceMappings:CreateLaunchConfiguration' :: Maybe [BlockDeviceMapping]
blockDeviceMappings = Maybe [BlockDeviceMapping]
a} :: CreateLaunchConfiguration) 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.
createLaunchConfiguration_classicLinkVPCId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_classicLinkVPCId :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_classicLinkVPCId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
classicLinkVPCId :: Maybe Text
$sel:classicLinkVPCId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
classicLinkVPCId} -> Maybe Text
classicLinkVPCId) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:classicLinkVPCId:CreateLaunchConfiguration' :: Maybe Text
classicLinkVPCId = Maybe Text
a} :: CreateLaunchConfiguration)

-- | Available for backward compatibility.
createLaunchConfiguration_classicLinkVPCSecurityGroups :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe [Prelude.Text])
createLaunchConfiguration_classicLinkVPCSecurityGroups :: Lens' CreateLaunchConfiguration (Maybe [Text])
createLaunchConfiguration_classicLinkVPCSecurityGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe [Text]
classicLinkVPCSecurityGroups :: Maybe [Text]
$sel:classicLinkVPCSecurityGroups:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [Text]
classicLinkVPCSecurityGroups} -> Maybe [Text]
classicLinkVPCSecurityGroups) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe [Text]
a -> CreateLaunchConfiguration
s {$sel:classicLinkVPCSecurityGroups:CreateLaunchConfiguration' :: Maybe [Text]
classicLinkVPCSecurityGroups = Maybe [Text]
a} :: CreateLaunchConfiguration) 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@). The optimization provides dedicated
-- throughput to Amazon EBS and an optimized configuration stack to provide
-- optimal I\/O performance. This optimization is not available with all
-- instance types. Additional fees are incurred when you enable EBS
-- optimization for an instance type that is not EBS-optimized by default.
-- 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/.
--
-- The default value is @false@.
createLaunchConfiguration_ebsOptimized :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Bool)
createLaunchConfiguration_ebsOptimized :: Lens' CreateLaunchConfiguration (Maybe Bool)
createLaunchConfiguration_ebsOptimized = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Bool
ebsOptimized :: Maybe Bool
$sel:ebsOptimized:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Bool
ebsOptimized} -> Maybe Bool
ebsOptimized) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Bool
a -> CreateLaunchConfiguration
s {$sel:ebsOptimized:CreateLaunchConfiguration' :: Maybe Bool
ebsOptimized = Maybe Bool
a} :: CreateLaunchConfiguration)

-- | 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/.
createLaunchConfiguration_iamInstanceProfile :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_iamInstanceProfile :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_iamInstanceProfile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
iamInstanceProfile :: Maybe Text
$sel:iamInstanceProfile:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
iamInstanceProfile} -> Maybe Text
iamInstanceProfile) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:iamInstanceProfile:CreateLaunchConfiguration' :: Maybe Text
iamInstanceProfile = Maybe Text
a} :: CreateLaunchConfiguration)

-- | The ID of the Amazon Machine Image (AMI) that was assigned during
-- registration. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html Finding a Linux AMI>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- If you specify @InstanceId@, an @ImageId@ is not required.
createLaunchConfiguration_imageId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_imageId :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_imageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
imageId :: Maybe Text
$sel:imageId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:imageId:CreateLaunchConfiguration' :: Maybe Text
imageId = Maybe Text
a} :: CreateLaunchConfiguration)

-- | The ID of the instance to use to create the launch configuration. The
-- new launch configuration derives attributes from the instance, except
-- for the block device mapping.
--
-- To create a launch configuration with a block device mapping or override
-- any other instance attributes, specify them as part of the same request.
--
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html Creating a launch configuration using an EC2 instance>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createLaunchConfiguration_instanceId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_instanceId :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:instanceId:CreateLaunchConfiguration' :: Maybe Text
instanceId = Maybe Text
a} :: CreateLaunchConfiguration)

-- | Controls whether instances in this group are launched with detailed
-- (@true@) or basic (@false@) monitoring.
--
-- The default value is @true@ (enabled).
--
-- When detailed monitoring is enabled, Amazon CloudWatch generates metrics
-- every minute and your account is charged a fee. When you disable
-- detailed monitoring, CloudWatch generates metrics every 5 minutes. 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/.
createLaunchConfiguration_instanceMonitoring :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe InstanceMonitoring)
createLaunchConfiguration_instanceMonitoring :: Lens' CreateLaunchConfiguration (Maybe InstanceMonitoring)
createLaunchConfiguration_instanceMonitoring = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe InstanceMonitoring
instanceMonitoring :: Maybe InstanceMonitoring
$sel:instanceMonitoring:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe InstanceMonitoring
instanceMonitoring} -> Maybe InstanceMonitoring
instanceMonitoring) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe InstanceMonitoring
a -> CreateLaunchConfiguration
s {$sel:instanceMonitoring:CreateLaunchConfiguration' :: Maybe InstanceMonitoring
instanceMonitoring = Maybe InstanceMonitoring
a} :: CreateLaunchConfiguration)

-- | Specifies the instance type of the EC2 instance. 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/.
--
-- If you specify @InstanceId@, an @InstanceType@ is not required.
createLaunchConfiguration_instanceType :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_instanceType :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:instanceType:CreateLaunchConfiguration' :: Maybe Text
instanceType = Maybe Text
a} :: CreateLaunchConfiguration)

-- | The ID of the kernel associated with the AMI.
--
-- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html User provided kernels>
-- in the /Amazon EC2 User Guide for Linux Instances/.
createLaunchConfiguration_kernelId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_kernelId :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_kernelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
kernelId :: Maybe Text
$sel:kernelId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
kernelId} -> Maybe Text
kernelId) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:kernelId:CreateLaunchConfiguration' :: Maybe Text
kernelId = Maybe Text
a} :: CreateLaunchConfiguration)

-- | 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 and Linux instances>
-- in the /Amazon EC2 User Guide for Linux Instances/.
createLaunchConfiguration_keyName :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_keyName :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_keyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
keyName :: Maybe Text
$sel:keyName:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
keyName} -> Maybe Text
keyName) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:keyName:CreateLaunchConfiguration' :: Maybe Text
keyName = Maybe Text
a} :: CreateLaunchConfiguration)

-- | 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/.
createLaunchConfiguration_metadataOptions :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe InstanceMetadataOptions)
createLaunchConfiguration_metadataOptions :: Lens' CreateLaunchConfiguration (Maybe InstanceMetadataOptions)
createLaunchConfiguration_metadataOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe InstanceMetadataOptions
metadataOptions :: Maybe InstanceMetadataOptions
$sel:metadataOptions:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe InstanceMetadataOptions
metadataOptions} -> Maybe InstanceMetadataOptions
metadataOptions) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe InstanceMetadataOptions
a -> CreateLaunchConfiguration
s {$sel:metadataOptions:CreateLaunchConfiguration' :: Maybe InstanceMetadataOptions
metadataOptions = Maybe InstanceMetadataOptions
a} :: CreateLaunchConfiguration)

-- | 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. To launch dedicated
-- instances into a shared tenancy VPC (a VPC with the instance placement
-- tenancy attribute set to @default@), you must set the value of this
-- property to @dedicated@. 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/.
--
-- If you specify @PlacementTenancy@, you must specify at least one subnet
-- for @VPCZoneIdentifier@ when you create your group.
--
-- Valid values: @default@ | @dedicated@
createLaunchConfiguration_placementTenancy :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_placementTenancy :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_placementTenancy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
placementTenancy :: Maybe Text
$sel:placementTenancy:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
placementTenancy} -> Maybe Text
placementTenancy) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:placementTenancy:CreateLaunchConfiguration' :: Maybe Text
placementTenancy = Maybe Text
a} :: CreateLaunchConfiguration)

-- | The ID of the RAM disk to select.
--
-- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html User provided kernels>
-- in the /Amazon EC2 User Guide for Linux Instances/.
createLaunchConfiguration_ramdiskId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_ramdiskId :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_ramdiskId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
ramdiskId :: Maybe Text
$sel:ramdiskId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
ramdiskId} -> Maybe Text
ramdiskId) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:ramdiskId:CreateLaunchConfiguration' :: Maybe Text
ramdiskId = Maybe Text
a} :: CreateLaunchConfiguration)

-- | A list that contains the security group IDs 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 Control traffic to resources using security groups>
-- in the /Amazon Virtual Private Cloud User Guide/.
createLaunchConfiguration_securityGroups :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe [Prelude.Text])
createLaunchConfiguration_securityGroups :: Lens' CreateLaunchConfiguration (Maybe [Text])
createLaunchConfiguration_securityGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe [Text]
securityGroups :: Maybe [Text]
$sel:securityGroups:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [Text]
securityGroups} -> Maybe [Text]
securityGroups) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe [Text]
a -> CreateLaunchConfiguration
s {$sel:securityGroups:CreateLaunchConfiguration' :: Maybe [Text]
securityGroups = Maybe [Text]
a} :: CreateLaunchConfiguration) 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/launch-template-spot-instances.html Request Spot Instances for fault-tolerant and flexible applications>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- Valid Range: Minimum value of 0.001
--
-- When you change your maximum price by creating a new launch
-- configuration, running instances will continue to run as long as the
-- maximum price for those running instances is higher than the current
-- Spot price.
createLaunchConfiguration_spotPrice :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_spotPrice :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_spotPrice = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
spotPrice :: Maybe Text
$sel:spotPrice:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
spotPrice} -> Maybe Text
spotPrice) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:spotPrice:CreateLaunchConfiguration' :: Maybe Text
spotPrice = Maybe Text
a} :: CreateLaunchConfiguration)

-- | 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.
createLaunchConfiguration_userData :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_userData :: Lens' CreateLaunchConfiguration (Maybe Text)
createLaunchConfiguration_userData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Maybe Text
userData :: Maybe Text
$sel:userData:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
userData} -> Maybe Text
userData) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Maybe Text
a -> CreateLaunchConfiguration
s {$sel:userData:CreateLaunchConfiguration' :: Maybe Text
userData = Maybe Text
a} :: CreateLaunchConfiguration)

-- | The name of the launch configuration. This name must be unique per
-- Region per account.
createLaunchConfiguration_launchConfigurationName :: Lens.Lens' CreateLaunchConfiguration Prelude.Text
createLaunchConfiguration_launchConfigurationName :: Lens' CreateLaunchConfiguration Text
createLaunchConfiguration_launchConfigurationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLaunchConfiguration' {Text
launchConfigurationName :: Text
$sel:launchConfigurationName:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Text
launchConfigurationName} -> Text
launchConfigurationName) (\s :: CreateLaunchConfiguration
s@CreateLaunchConfiguration' {} Text
a -> CreateLaunchConfiguration
s {$sel:launchConfigurationName:CreateLaunchConfiguration' :: Text
launchConfigurationName = Text
a} :: CreateLaunchConfiguration)

instance Core.AWSRequest CreateLaunchConfiguration where
  type
    AWSResponse CreateLaunchConfiguration =
      CreateLaunchConfigurationResponse
  request :: (Service -> Service)
-> CreateLaunchConfiguration -> Request CreateLaunchConfiguration
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateLaunchConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateLaunchConfiguration)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      CreateLaunchConfigurationResponse
CreateLaunchConfigurationResponse'

instance Prelude.Hashable CreateLaunchConfiguration where
  hashWithSalt :: Int -> CreateLaunchConfiguration -> Int
hashWithSalt Int
_salt CreateLaunchConfiguration' {Maybe Bool
Maybe [Text]
Maybe [BlockDeviceMapping]
Maybe Text
Maybe InstanceMetadataOptions
Maybe InstanceMonitoring
Text
launchConfigurationName :: Text
userData :: Maybe Text
spotPrice :: Maybe Text
securityGroups :: Maybe [Text]
ramdiskId :: Maybe Text
placementTenancy :: Maybe Text
metadataOptions :: Maybe InstanceMetadataOptions
keyName :: Maybe Text
kernelId :: Maybe Text
instanceType :: Maybe Text
instanceMonitoring :: Maybe InstanceMonitoring
instanceId :: Maybe Text
imageId :: Maybe Text
iamInstanceProfile :: Maybe Text
ebsOptimized :: Maybe Bool
classicLinkVPCSecurityGroups :: Maybe [Text]
classicLinkVPCId :: Maybe Text
blockDeviceMappings :: Maybe [BlockDeviceMapping]
associatePublicIpAddress :: Maybe Bool
$sel:launchConfigurationName:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Text
$sel:userData:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:spotPrice:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:securityGroups:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [Text]
$sel:ramdiskId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:placementTenancy:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:metadataOptions:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe InstanceMetadataOptions
$sel:keyName:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:kernelId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:instanceType:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:instanceMonitoring:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe InstanceMonitoring
$sel:instanceId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:imageId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:iamInstanceProfile:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:ebsOptimized:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Bool
$sel:classicLinkVPCSecurityGroups:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [Text]
$sel:classicLinkVPCId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:blockDeviceMappings:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [BlockDeviceMapping]
$sel:associatePublicIpAddress:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> 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 Text
imageId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceMonitoring
instanceMonitoring
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceType
      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 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

instance Prelude.NFData CreateLaunchConfiguration where
  rnf :: CreateLaunchConfiguration -> ()
rnf CreateLaunchConfiguration' {Maybe Bool
Maybe [Text]
Maybe [BlockDeviceMapping]
Maybe Text
Maybe InstanceMetadataOptions
Maybe InstanceMonitoring
Text
launchConfigurationName :: Text
userData :: Maybe Text
spotPrice :: Maybe Text
securityGroups :: Maybe [Text]
ramdiskId :: Maybe Text
placementTenancy :: Maybe Text
metadataOptions :: Maybe InstanceMetadataOptions
keyName :: Maybe Text
kernelId :: Maybe Text
instanceType :: Maybe Text
instanceMonitoring :: Maybe InstanceMonitoring
instanceId :: Maybe Text
imageId :: Maybe Text
iamInstanceProfile :: Maybe Text
ebsOptimized :: Maybe Bool
classicLinkVPCSecurityGroups :: Maybe [Text]
classicLinkVPCId :: Maybe Text
blockDeviceMappings :: Maybe [BlockDeviceMapping]
associatePublicIpAddress :: Maybe Bool
$sel:launchConfigurationName:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Text
$sel:userData:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:spotPrice:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:securityGroups:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [Text]
$sel:ramdiskId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:placementTenancy:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:metadataOptions:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe InstanceMetadataOptions
$sel:keyName:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:kernelId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:instanceType:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:instanceMonitoring:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe InstanceMonitoring
$sel:instanceId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:imageId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:iamInstanceProfile:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:ebsOptimized:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Bool
$sel:classicLinkVPCSecurityGroups:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [Text]
$sel:classicLinkVPCId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:blockDeviceMappings:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [BlockDeviceMapping]
$sel:associatePublicIpAddress:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> 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 Text
imageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceId
      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
instanceType
      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 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

instance Data.ToHeaders CreateLaunchConfiguration where
  toHeaders :: CreateLaunchConfiguration -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery CreateLaunchConfiguration where
  toQuery :: CreateLaunchConfiguration -> QueryString
toQuery CreateLaunchConfiguration' {Maybe Bool
Maybe [Text]
Maybe [BlockDeviceMapping]
Maybe Text
Maybe InstanceMetadataOptions
Maybe InstanceMonitoring
Text
launchConfigurationName :: Text
userData :: Maybe Text
spotPrice :: Maybe Text
securityGroups :: Maybe [Text]
ramdiskId :: Maybe Text
placementTenancy :: Maybe Text
metadataOptions :: Maybe InstanceMetadataOptions
keyName :: Maybe Text
kernelId :: Maybe Text
instanceType :: Maybe Text
instanceMonitoring :: Maybe InstanceMonitoring
instanceId :: Maybe Text
imageId :: Maybe Text
iamInstanceProfile :: Maybe Text
ebsOptimized :: Maybe Bool
classicLinkVPCSecurityGroups :: Maybe [Text]
classicLinkVPCId :: Maybe Text
blockDeviceMappings :: Maybe [BlockDeviceMapping]
associatePublicIpAddress :: Maybe Bool
$sel:launchConfigurationName:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Text
$sel:userData:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:spotPrice:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:securityGroups:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [Text]
$sel:ramdiskId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:placementTenancy:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:metadataOptions:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe InstanceMetadataOptions
$sel:keyName:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:kernelId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:instanceType:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:instanceMonitoring:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe InstanceMonitoring
$sel:instanceId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:imageId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:iamInstanceProfile:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:ebsOptimized:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Bool
$sel:classicLinkVPCSecurityGroups:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [Text]
$sel:classicLinkVPCId:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Text
$sel:blockDeviceMappings:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe [BlockDeviceMapping]
$sel:associatePublicIpAddress:CreateLaunchConfiguration' :: CreateLaunchConfiguration -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateLaunchConfiguration" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2011-01-01" :: Prelude.ByteString),
        ByteString
"AssociatePublicIpAddress"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
associatePublicIpAddress,
        ByteString
"BlockDeviceMappings"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [BlockDeviceMapping]
blockDeviceMappings
            ),
        ByteString
"ClassicLinkVPCId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
classicLinkVPCId,
        ByteString
"ClassicLinkVPCSecurityGroups"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
classicLinkVPCSecurityGroups
            ),
        ByteString
"EbsOptimized" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
ebsOptimized,
        ByteString
"IamInstanceProfile" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
iamInstanceProfile,
        ByteString
"ImageId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
imageId,
        ByteString
"InstanceId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
instanceId,
        ByteString
"InstanceMonitoring" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe InstanceMonitoring
instanceMonitoring,
        ByteString
"InstanceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
instanceType,
        ByteString
"KernelId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
kernelId,
        ByteString
"KeyName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
keyName,
        ByteString
"MetadataOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe InstanceMetadataOptions
metadataOptions,
        ByteString
"PlacementTenancy" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
placementTenancy,
        ByteString
"RamdiskId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ramdiskId,
        ByteString
"SecurityGroups"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroups
            ),
        ByteString
"SpotPrice" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
spotPrice,
        ByteString
"UserData" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
userData,
        ByteString
"LaunchConfigurationName"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
launchConfigurationName
      ]

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

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

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