{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- 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/as-account-limits.html Amazon EC2 Auto Scaling service quotas>
-- 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/.
module Amazonka.AutoScaling.CreateLaunchConfiguration
  ( -- * Creating a Request
    CreateLaunchConfiguration (..),
    newCreateLaunchConfiguration,

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

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

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

-- | /See:/ 'newCreateLaunchConfiguration' smart constructor.
data CreateLaunchConfiguration = 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/.
    --
    -- If you do not specify @InstanceId@, you must specify both @ImageId@ and
    -- @InstanceType@.
    CreateLaunchConfiguration -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | For Auto Scaling groups that are running in a virtual private cloud
    -- (VPC), specifies whether to assign a public IP address to the group\'s
    -- instances. If you specify @true@, each instance in the Auto Scaling
    -- group receives a unique public IP 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 parameter, you must specify at least one subnet for
    -- @VPCZoneIdentifier@ when you create your group.
    --
    -- If the instance is launched into a default subnet, the default is to
    -- assign a public IP address, unless you disabled the option to assign a
    -- public IP address on the subnet. If the instance is launched into a
    -- nondefault subnet, the default is not to assign a public IP address,
    -- unless you enabled the option to assign a public IP address on the
    -- subnet.
    CreateLaunchConfiguration -> Maybe Bool
associatePublicIpAddress :: Prelude.Maybe Prelude.Bool,
    -- | A list that contains the security groups to assign to the instances in
    -- the Auto Scaling group.
    --
    -- [EC2-VPC] Specify the security group IDs. 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/.
    --
    -- [EC2-Classic] Specify either the security group names or the security
    -- group IDs. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html Amazon EC2 Security Groups>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    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/asg-launch-spot-instances.html Requesting Spot Instances>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    --
    -- 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,
    -- | 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,
    -- | 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/.
    CreateLaunchConfiguration -> Maybe Text
keyName :: Prelude.Maybe Prelude.Text,
    -- | The IDs of one or more security groups for the specified
    -- ClassicLink-enabled VPC. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
    -- in the /Amazon EC2 User Guide for Linux Instances/ and
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    --
    -- If you specify the @ClassicLinkVPCId@ parameter, you must specify this
    -- parameter.
    CreateLaunchConfiguration -> Maybe [Text]
classicLinkVPCSecurityGroups :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the RAM disk to select.
    CreateLaunchConfiguration -> Maybe Text
ramdiskId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the kernel associated with the AMI.
    CreateLaunchConfiguration -> Maybe Text
kernelId :: Prelude.Maybe Prelude.Text,
    -- | 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 do not specify @InstanceId@, you must specify @InstanceType@.
    CreateLaunchConfiguration -> Maybe Text
instanceType :: 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 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 ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
    -- to. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
    -- in the /Amazon EC2 User Guide for Linux Instances/ and
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    --
    -- This parameter can only be used if you are launching EC2-Classic
    -- instances.
    CreateLaunchConfiguration -> Maybe Text
classicLinkVPCId :: Prelude.Maybe Prelude.Text,
    -- | The name or the Amazon Resource Name (ARN) of the instance profile
    -- associated with the IAM role for the instance. The instance profile
    -- contains the IAM role.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html IAM role for applications that run on Amazon EC2 instances>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    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 an AMI>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    --
    -- If you do not specify @InstanceId@, you must specify @ImageId@.
    CreateLaunchConfiguration -> Maybe Text
imageId :: 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. 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 parameter to @dedicated@.
    --
    -- If you specify @PlacementTenancy@, you must specify at least one subnet
    -- for @VPCZoneIdentifier@ when you create your group.
    --
    -- 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/.
    --
    -- Valid Values: @default@ | @dedicated@
    CreateLaunchConfiguration -> Maybe Text
placementTenancy :: Prelude.Maybe Prelude.Text,
    -- | A block device mapping, which specifies the block devices for the
    -- instance. You can specify virtual devices and EBS volumes. 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/.
    CreateLaunchConfiguration -> Maybe [BlockDeviceMapping]
blockDeviceMappings :: Prelude.Maybe [BlockDeviceMapping],
    -- | The name of the launch configuration. This name must be unique per
    -- Region per account.
    CreateLaunchConfiguration -> Text
launchConfigurationName :: Prelude.Text
  }
  deriving (CreateLaunchConfiguration -> CreateLaunchConfiguration -> Bool
(CreateLaunchConfiguration -> CreateLaunchConfiguration -> Bool)
-> (CreateLaunchConfiguration -> CreateLaunchConfiguration -> Bool)
-> Eq CreateLaunchConfiguration
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]
(Int -> ReadS CreateLaunchConfiguration)
-> ReadS [CreateLaunchConfiguration]
-> ReadPrec CreateLaunchConfiguration
-> ReadPrec [CreateLaunchConfiguration]
-> Read 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
(Int -> CreateLaunchConfiguration -> ShowS)
-> (CreateLaunchConfiguration -> String)
-> ([CreateLaunchConfiguration] -> ShowS)
-> Show CreateLaunchConfiguration
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.
 CreateLaunchConfiguration -> Rep CreateLaunchConfiguration x)
-> (forall x.
    Rep CreateLaunchConfiguration x -> CreateLaunchConfiguration)
-> Generic CreateLaunchConfiguration
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:
--
-- '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/.
--
-- If you do not specify @InstanceId@, you must specify both @ImageId@ and
-- @InstanceType@.
--
-- 'associatePublicIpAddress', 'createLaunchConfiguration_associatePublicIpAddress' - For Auto Scaling groups that are running in a virtual private cloud
-- (VPC), specifies whether to assign a public IP address to the group\'s
-- instances. If you specify @true@, each instance in the Auto Scaling
-- group receives a unique public IP 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 parameter, you must specify at least one subnet for
-- @VPCZoneIdentifier@ when you create your group.
--
-- If the instance is launched into a default subnet, the default is to
-- assign a public IP address, unless you disabled the option to assign a
-- public IP address on the subnet. If the instance is launched into a
-- nondefault subnet, the default is not to assign a public IP address,
-- unless you enabled the option to assign a public IP address on the
-- subnet.
--
-- 'securityGroups', 'createLaunchConfiguration_securityGroups' - A list that contains the security groups to assign to the instances in
-- the Auto Scaling group.
--
-- [EC2-VPC] Specify the security group IDs. 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/.
--
-- [EC2-Classic] Specify either the security group names or the security
-- group IDs. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html Amazon EC2 Security Groups>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- '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/asg-launch-spot-instances.html Requesting Spot Instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 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.
--
-- '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/.
--
-- '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>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'classicLinkVPCSecurityGroups', 'createLaunchConfiguration_classicLinkVPCSecurityGroups' - The IDs of one or more security groups for the specified
-- ClassicLink-enabled VPC. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
-- in the /Amazon EC2 User Guide for Linux Instances/ and
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- If you specify the @ClassicLinkVPCId@ parameter, you must specify this
-- parameter.
--
-- 'ramdiskId', 'createLaunchConfiguration_ramdiskId' - The ID of the RAM disk to select.
--
-- 'kernelId', 'createLaunchConfiguration_kernelId' - The ID of the kernel associated with the AMI.
--
-- '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 do not specify @InstanceId@, you must specify @InstanceType@.
--
-- '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@.
--
-- '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.
--
-- 'classicLinkVPCId', 'createLaunchConfiguration_classicLinkVPCId' - The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
-- to. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
-- in the /Amazon EC2 User Guide for Linux Instances/ and
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- This parameter can only be used if you are launching EC2-Classic
-- instances.
--
-- '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 an AMI>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- If you do not specify @InstanceId@, you must specify @ImageId@.
--
-- '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. 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 parameter to @dedicated@.
--
-- If you specify @PlacementTenancy@, you must specify at least one subnet
-- for @VPCZoneIdentifier@ when you create your group.
--
-- 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/.
--
-- Valid Values: @default@ | @dedicated@
--
-- 'blockDeviceMappings', 'createLaunchConfiguration_blockDeviceMappings' - A block device mapping, which specifies the block devices for the
-- instance. You can specify virtual devices and EBS volumes. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html Block Device Mapping>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'launchConfigurationName', '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' :: Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe InstanceMonitoring
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstanceMetadataOptions
-> Maybe Text
-> Maybe [BlockDeviceMapping]
-> Text
-> CreateLaunchConfiguration
CreateLaunchConfiguration'
      { $sel:instanceId:CreateLaunchConfiguration' :: Maybe Text
instanceId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:associatePublicIpAddress:CreateLaunchConfiguration' :: Maybe Bool
associatePublicIpAddress = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:securityGroups:CreateLaunchConfiguration' :: Maybe [Text]
securityGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:spotPrice:CreateLaunchConfiguration' :: Maybe Text
spotPrice = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceMonitoring:CreateLaunchConfiguration' :: Maybe InstanceMonitoring
instanceMonitoring = Maybe InstanceMonitoring
forall a. Maybe a
Prelude.Nothing,
        $sel:keyName:CreateLaunchConfiguration' :: Maybe Text
keyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:classicLinkVPCSecurityGroups:CreateLaunchConfiguration' :: Maybe [Text]
classicLinkVPCSecurityGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:ramdiskId:CreateLaunchConfiguration' :: Maybe Text
ramdiskId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kernelId:CreateLaunchConfiguration' :: Maybe Text
kernelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceType:CreateLaunchConfiguration' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:ebsOptimized:CreateLaunchConfiguration' :: Maybe Bool
ebsOptimized = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:userData:CreateLaunchConfiguration' :: Maybe Text
userData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:classicLinkVPCId:CreateLaunchConfiguration' :: Maybe Text
classicLinkVPCId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:iamInstanceProfile:CreateLaunchConfiguration' :: Maybe Text
iamInstanceProfile = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:imageId:CreateLaunchConfiguration' :: Maybe Text
imageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:metadataOptions:CreateLaunchConfiguration' :: Maybe InstanceMetadataOptions
metadataOptions = Maybe InstanceMetadataOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:placementTenancy:CreateLaunchConfiguration' :: Maybe Text
placementTenancy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:blockDeviceMappings:CreateLaunchConfiguration' :: Maybe [BlockDeviceMapping]
blockDeviceMappings = Maybe [BlockDeviceMapping]
forall a. Maybe a
Prelude.Nothing,
        $sel:launchConfigurationName:CreateLaunchConfiguration' :: Text
launchConfigurationName =
          Text
pLaunchConfigurationName_
      }

-- | 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/.
--
-- If you do not specify @InstanceId@, you must specify both @ImageId@ and
-- @InstanceType@.
createLaunchConfiguration_instanceId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_instanceId :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_instanceId = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | For Auto Scaling groups that are running in a virtual private cloud
-- (VPC), specifies whether to assign a public IP address to the group\'s
-- instances. If you specify @true@, each instance in the Auto Scaling
-- group receives a unique public IP 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 parameter, you must specify at least one subnet for
-- @VPCZoneIdentifier@ when you create your group.
--
-- If the instance is launched into a default subnet, the default is to
-- assign a public IP address, unless you disabled the option to assign a
-- public IP address on the subnet. If the instance is launched into a
-- nondefault subnet, the default is not to assign a public IP address,
-- unless you enabled the option to assign a public IP address on the
-- subnet.
createLaunchConfiguration_associatePublicIpAddress :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Bool)
createLaunchConfiguration_associatePublicIpAddress :: (Maybe Bool -> f (Maybe Bool))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_associatePublicIpAddress = (CreateLaunchConfiguration -> Maybe Bool)
-> (CreateLaunchConfiguration
    -> Maybe Bool -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Bool)
     (Maybe Bool)
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)

-- | A list that contains the security groups to assign to the instances in
-- the Auto Scaling group.
--
-- [EC2-VPC] Specify the security group IDs. 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/.
--
-- [EC2-Classic] Specify either the security group names or the security
-- group IDs. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html Amazon EC2 Security Groups>
-- in the /Amazon EC2 User Guide for Linux Instances/.
createLaunchConfiguration_securityGroups :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe [Prelude.Text])
createLaunchConfiguration_securityGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_securityGroups = (CreateLaunchConfiguration -> Maybe [Text])
-> (CreateLaunchConfiguration
    -> Maybe [Text] -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe [Text])
     (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateLaunchConfiguration -> f CreateLaunchConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateLaunchConfiguration
-> f CreateLaunchConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum hourly price to be paid for any Spot Instance launched to
-- fulfill the request. Spot Instances are launched when the price you
-- specify exceeds the current Spot price. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html Requesting Spot Instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 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 :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_spotPrice = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe InstanceMonitoring -> f (Maybe InstanceMonitoring))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_instanceMonitoring = (CreateLaunchConfiguration -> Maybe InstanceMonitoring)
-> (CreateLaunchConfiguration
    -> Maybe InstanceMonitoring -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe InstanceMonitoring)
     (Maybe 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)

-- | 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/.
createLaunchConfiguration_keyName :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_keyName :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_keyName = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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 IDs of one or more security groups for the specified
-- ClassicLink-enabled VPC. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
-- in the /Amazon EC2 User Guide for Linux Instances/ and
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- If you specify the @ClassicLinkVPCId@ parameter, you must specify this
-- parameter.
createLaunchConfiguration_classicLinkVPCSecurityGroups :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe [Prelude.Text])
createLaunchConfiguration_classicLinkVPCSecurityGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_classicLinkVPCSecurityGroups = (CreateLaunchConfiguration -> Maybe [Text])
-> (CreateLaunchConfiguration
    -> Maybe [Text] -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe [Text])
     (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateLaunchConfiguration -> f CreateLaunchConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateLaunchConfiguration
-> f CreateLaunchConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the RAM disk to select.
createLaunchConfiguration_ramdiskId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_ramdiskId :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_ramdiskId = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | The ID of the kernel associated with the AMI.
createLaunchConfiguration_kernelId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_kernelId :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_kernelId = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 do not specify @InstanceId@, you must specify @InstanceType@.
createLaunchConfiguration_instanceType :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_instanceType :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_instanceType = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_ebsOptimized = (CreateLaunchConfiguration -> Maybe Bool)
-> (CreateLaunchConfiguration
    -> Maybe Bool -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Bool)
     (Maybe Bool)
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 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 :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_userData = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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 ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
-- to. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html ClassicLink>
-- in the /Amazon EC2 User Guide for Linux Instances/ and
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink Linking EC2-Classic instances to a VPC>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- This parameter can only be used if you are launching EC2-Classic
-- instances.
createLaunchConfiguration_classicLinkVPCId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_classicLinkVPCId :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_classicLinkVPCId = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_iamInstanceProfile = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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 an AMI>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- If you do not specify @InstanceId@, you must specify @ImageId@.
createLaunchConfiguration_imageId :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_imageId :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_imageId = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe InstanceMetadataOptions
 -> f (Maybe InstanceMetadataOptions))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_metadataOptions = (CreateLaunchConfiguration -> Maybe InstanceMetadataOptions)
-> (CreateLaunchConfiguration
    -> Maybe InstanceMetadataOptions -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe InstanceMetadataOptions)
     (Maybe InstanceMetadataOptions)
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. 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 parameter to @dedicated@.
--
-- If you specify @PlacementTenancy@, you must specify at least one subnet
-- for @VPCZoneIdentifier@ when you create your group.
--
-- 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/.
--
-- Valid Values: @default@ | @dedicated@
createLaunchConfiguration_placementTenancy :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe Prelude.Text)
createLaunchConfiguration_placementTenancy :: (Maybe Text -> f (Maybe Text))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_placementTenancy = (CreateLaunchConfiguration -> Maybe Text)
-> (CreateLaunchConfiguration
    -> Maybe Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
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)

-- | A block device mapping, which specifies the block devices for the
-- instance. You can specify virtual devices and EBS volumes. 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/.
createLaunchConfiguration_blockDeviceMappings :: Lens.Lens' CreateLaunchConfiguration (Prelude.Maybe [BlockDeviceMapping])
createLaunchConfiguration_blockDeviceMappings :: (Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_blockDeviceMappings = (CreateLaunchConfiguration -> Maybe [BlockDeviceMapping])
-> (CreateLaunchConfiguration
    -> Maybe [BlockDeviceMapping] -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration
     CreateLaunchConfiguration
     (Maybe [BlockDeviceMapping])
     (Maybe [BlockDeviceMapping])
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) ((Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
 -> CreateLaunchConfiguration -> f CreateLaunchConfiguration)
-> ((Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
    -> Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
-> (Maybe [BlockDeviceMapping] -> f (Maybe [BlockDeviceMapping]))
-> CreateLaunchConfiguration
-> f CreateLaunchConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BlockDeviceMapping]
  [BlockDeviceMapping]
  [BlockDeviceMapping]
  [BlockDeviceMapping]
-> Iso
     (Maybe [BlockDeviceMapping])
     (Maybe [BlockDeviceMapping])
     (Maybe [BlockDeviceMapping])
     (Maybe [BlockDeviceMapping])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [BlockDeviceMapping]
  [BlockDeviceMapping]
  [BlockDeviceMapping]
  [BlockDeviceMapping]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the launch configuration. This name must be unique per
-- Region per account.
createLaunchConfiguration_launchConfigurationName :: Lens.Lens' CreateLaunchConfiguration Prelude.Text
createLaunchConfiguration_launchConfigurationName :: (Text -> f Text)
-> CreateLaunchConfiguration -> f CreateLaunchConfiguration
createLaunchConfiguration_launchConfigurationName = (CreateLaunchConfiguration -> Text)
-> (CreateLaunchConfiguration -> Text -> CreateLaunchConfiguration)
-> Lens
     CreateLaunchConfiguration CreateLaunchConfiguration Text Text
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 :: CreateLaunchConfiguration -> Request CreateLaunchConfiguration
request = Service
-> CreateLaunchConfiguration -> Request CreateLaunchConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateLaunchConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateLaunchConfiguration)))
response =
    AWSResponse CreateLaunchConfiguration
-> Logger
-> Service
-> Proxy CreateLaunchConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateLaunchConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse CreateLaunchConfiguration
CreateLaunchConfigurationResponse
CreateLaunchConfigurationResponse'

instance Prelude.Hashable CreateLaunchConfiguration

instance Prelude.NFData CreateLaunchConfiguration

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

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

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

-- | /See:/ 'newCreateLaunchConfigurationResponse' smart constructor.
data CreateLaunchConfigurationResponse = CreateLaunchConfigurationResponse'
  {
  }
  deriving (CreateLaunchConfigurationResponse
-> CreateLaunchConfigurationResponse -> Bool
(CreateLaunchConfigurationResponse
 -> CreateLaunchConfigurationResponse -> Bool)
-> (CreateLaunchConfigurationResponse
    -> CreateLaunchConfigurationResponse -> Bool)
-> Eq CreateLaunchConfigurationResponse
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]
(Int -> ReadS CreateLaunchConfigurationResponse)
-> ReadS [CreateLaunchConfigurationResponse]
-> ReadPrec CreateLaunchConfigurationResponse
-> ReadPrec [CreateLaunchConfigurationResponse]
-> Read 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
(Int -> CreateLaunchConfigurationResponse -> ShowS)
-> (CreateLaunchConfigurationResponse -> String)
-> ([CreateLaunchConfigurationResponse] -> ShowS)
-> Show CreateLaunchConfigurationResponse
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.
 CreateLaunchConfigurationResponse
 -> Rep CreateLaunchConfigurationResponse x)
-> (forall x.
    Rep CreateLaunchConfigurationResponse x
    -> CreateLaunchConfigurationResponse)
-> Generic CreateLaunchConfigurationResponse
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