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

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

-- |
-- Module      : Amazonka.EC2.Types.ScheduledInstancesLaunchSpecification
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.ScheduledInstancesLaunchSpecification where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.ScheduledInstancesBlockDeviceMapping
import Amazonka.EC2.Types.ScheduledInstancesIamInstanceProfile
import Amazonka.EC2.Types.ScheduledInstancesMonitoring
import Amazonka.EC2.Types.ScheduledInstancesNetworkInterface
import Amazonka.EC2.Types.ScheduledInstancesPlacement
import qualified Amazonka.Prelude as Prelude

-- | Describes the launch specification for a Scheduled Instance.
--
-- If you are launching the Scheduled Instance in EC2-VPC, you must specify
-- the ID of the subnet. You can specify the subnet using either @SubnetId@
-- or @NetworkInterface@.
--
-- /See:/ 'newScheduledInstancesLaunchSpecification' smart constructor.
data ScheduledInstancesLaunchSpecification = ScheduledInstancesLaunchSpecification'
  { -- | The block device mapping entries.
    ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesBlockDeviceMapping]
blockDeviceMappings :: Prelude.Maybe [ScheduledInstancesBlockDeviceMapping],
    -- | Indicates whether the instances are optimized for EBS I\/O. This
    -- optimization provides dedicated throughput to Amazon EBS and an
    -- optimized configuration stack to provide optimal EBS I\/O performance.
    -- This optimization isn\'t available with all instance types. Additional
    -- usage charges apply when using an EBS-optimized instance.
    --
    -- Default: @false@
    ScheduledInstancesLaunchSpecification -> Maybe Bool
ebsOptimized :: Prelude.Maybe Prelude.Bool,
    -- | The IAM instance profile.
    ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesIamInstanceProfile
iamInstanceProfile :: Prelude.Maybe ScheduledInstancesIamInstanceProfile,
    -- | The instance type.
    ScheduledInstancesLaunchSpecification -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
    -- | The ID of the kernel.
    ScheduledInstancesLaunchSpecification -> Maybe Text
kernelId :: Prelude.Maybe Prelude.Text,
    -- | The name of the key pair.
    ScheduledInstancesLaunchSpecification -> Maybe Text
keyName :: Prelude.Maybe Prelude.Text,
    -- | Enable or disable monitoring for the instances.
    ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesMonitoring
monitoring :: Prelude.Maybe ScheduledInstancesMonitoring,
    -- | The network interfaces.
    ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesNetworkInterface]
networkInterfaces :: Prelude.Maybe [ScheduledInstancesNetworkInterface],
    -- | The placement information.
    ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesPlacement
placement :: Prelude.Maybe ScheduledInstancesPlacement,
    -- | The ID of the RAM disk.
    ScheduledInstancesLaunchSpecification -> Maybe Text
ramdiskId :: Prelude.Maybe Prelude.Text,
    -- | The IDs of the security groups.
    ScheduledInstancesLaunchSpecification -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the subnet in which to launch the instances.
    ScheduledInstancesLaunchSpecification -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
    -- | The base64-encoded MIME user data.
    ScheduledInstancesLaunchSpecification -> Maybe Text
userData :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Amazon Machine Image (AMI).
    ScheduledInstancesLaunchSpecification -> Text
imageId :: Prelude.Text
  }
  deriving (ScheduledInstancesLaunchSpecification
-> ScheduledInstancesLaunchSpecification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduledInstancesLaunchSpecification
-> ScheduledInstancesLaunchSpecification -> Bool
$c/= :: ScheduledInstancesLaunchSpecification
-> ScheduledInstancesLaunchSpecification -> Bool
== :: ScheduledInstancesLaunchSpecification
-> ScheduledInstancesLaunchSpecification -> Bool
$c== :: ScheduledInstancesLaunchSpecification
-> ScheduledInstancesLaunchSpecification -> Bool
Prelude.Eq, ReadPrec [ScheduledInstancesLaunchSpecification]
ReadPrec ScheduledInstancesLaunchSpecification
Int -> ReadS ScheduledInstancesLaunchSpecification
ReadS [ScheduledInstancesLaunchSpecification]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduledInstancesLaunchSpecification]
$creadListPrec :: ReadPrec [ScheduledInstancesLaunchSpecification]
readPrec :: ReadPrec ScheduledInstancesLaunchSpecification
$creadPrec :: ReadPrec ScheduledInstancesLaunchSpecification
readList :: ReadS [ScheduledInstancesLaunchSpecification]
$creadList :: ReadS [ScheduledInstancesLaunchSpecification]
readsPrec :: Int -> ReadS ScheduledInstancesLaunchSpecification
$creadsPrec :: Int -> ReadS ScheduledInstancesLaunchSpecification
Prelude.Read, Int -> ScheduledInstancesLaunchSpecification -> ShowS
[ScheduledInstancesLaunchSpecification] -> ShowS
ScheduledInstancesLaunchSpecification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduledInstancesLaunchSpecification] -> ShowS
$cshowList :: [ScheduledInstancesLaunchSpecification] -> ShowS
show :: ScheduledInstancesLaunchSpecification -> String
$cshow :: ScheduledInstancesLaunchSpecification -> String
showsPrec :: Int -> ScheduledInstancesLaunchSpecification -> ShowS
$cshowsPrec :: Int -> ScheduledInstancesLaunchSpecification -> ShowS
Prelude.Show, forall x.
Rep ScheduledInstancesLaunchSpecification x
-> ScheduledInstancesLaunchSpecification
forall x.
ScheduledInstancesLaunchSpecification
-> Rep ScheduledInstancesLaunchSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScheduledInstancesLaunchSpecification x
-> ScheduledInstancesLaunchSpecification
$cfrom :: forall x.
ScheduledInstancesLaunchSpecification
-> Rep ScheduledInstancesLaunchSpecification x
Prelude.Generic)

-- |
-- Create a value of 'ScheduledInstancesLaunchSpecification' 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:
--
-- 'blockDeviceMappings', 'scheduledInstancesLaunchSpecification_blockDeviceMappings' - The block device mapping entries.
--
-- 'ebsOptimized', 'scheduledInstancesLaunchSpecification_ebsOptimized' - Indicates whether the instances are optimized for EBS I\/O. This
-- optimization provides dedicated throughput to Amazon EBS and an
-- optimized configuration stack to provide optimal EBS I\/O performance.
-- This optimization isn\'t available with all instance types. Additional
-- usage charges apply when using an EBS-optimized instance.
--
-- Default: @false@
--
-- 'iamInstanceProfile', 'scheduledInstancesLaunchSpecification_iamInstanceProfile' - The IAM instance profile.
--
-- 'instanceType', 'scheduledInstancesLaunchSpecification_instanceType' - The instance type.
--
-- 'kernelId', 'scheduledInstancesLaunchSpecification_kernelId' - The ID of the kernel.
--
-- 'keyName', 'scheduledInstancesLaunchSpecification_keyName' - The name of the key pair.
--
-- 'monitoring', 'scheduledInstancesLaunchSpecification_monitoring' - Enable or disable monitoring for the instances.
--
-- 'networkInterfaces', 'scheduledInstancesLaunchSpecification_networkInterfaces' - The network interfaces.
--
-- 'placement', 'scheduledInstancesLaunchSpecification_placement' - The placement information.
--
-- 'ramdiskId', 'scheduledInstancesLaunchSpecification_ramdiskId' - The ID of the RAM disk.
--
-- 'securityGroupIds', 'scheduledInstancesLaunchSpecification_securityGroupIds' - The IDs of the security groups.
--
-- 'subnetId', 'scheduledInstancesLaunchSpecification_subnetId' - The ID of the subnet in which to launch the instances.
--
-- 'userData', 'scheduledInstancesLaunchSpecification_userData' - The base64-encoded MIME user data.
--
-- 'imageId', 'scheduledInstancesLaunchSpecification_imageId' - The ID of the Amazon Machine Image (AMI).
newScheduledInstancesLaunchSpecification ::
  -- | 'imageId'
  Prelude.Text ->
  ScheduledInstancesLaunchSpecification
newScheduledInstancesLaunchSpecification :: Text -> ScheduledInstancesLaunchSpecification
newScheduledInstancesLaunchSpecification Text
pImageId_ =
  ScheduledInstancesLaunchSpecification'
    { $sel:blockDeviceMappings:ScheduledInstancesLaunchSpecification' :: Maybe [ScheduledInstancesBlockDeviceMapping]
blockDeviceMappings =
        forall a. Maybe a
Prelude.Nothing,
      $sel:ebsOptimized:ScheduledInstancesLaunchSpecification' :: Maybe Bool
ebsOptimized = forall a. Maybe a
Prelude.Nothing,
      $sel:iamInstanceProfile:ScheduledInstancesLaunchSpecification' :: Maybe ScheduledInstancesIamInstanceProfile
iamInstanceProfile = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:ScheduledInstancesLaunchSpecification' :: Maybe Text
instanceType = forall a. Maybe a
Prelude.Nothing,
      $sel:kernelId:ScheduledInstancesLaunchSpecification' :: Maybe Text
kernelId = forall a. Maybe a
Prelude.Nothing,
      $sel:keyName:ScheduledInstancesLaunchSpecification' :: Maybe Text
keyName = forall a. Maybe a
Prelude.Nothing,
      $sel:monitoring:ScheduledInstancesLaunchSpecification' :: Maybe ScheduledInstancesMonitoring
monitoring = forall a. Maybe a
Prelude.Nothing,
      $sel:networkInterfaces:ScheduledInstancesLaunchSpecification' :: Maybe [ScheduledInstancesNetworkInterface]
networkInterfaces = forall a. Maybe a
Prelude.Nothing,
      $sel:placement:ScheduledInstancesLaunchSpecification' :: Maybe ScheduledInstancesPlacement
placement = forall a. Maybe a
Prelude.Nothing,
      $sel:ramdiskId:ScheduledInstancesLaunchSpecification' :: Maybe Text
ramdiskId = forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroupIds:ScheduledInstancesLaunchSpecification' :: Maybe [Text]
securityGroupIds = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetId:ScheduledInstancesLaunchSpecification' :: Maybe Text
subnetId = forall a. Maybe a
Prelude.Nothing,
      $sel:userData:ScheduledInstancesLaunchSpecification' :: Maybe Text
userData = forall a. Maybe a
Prelude.Nothing,
      $sel:imageId:ScheduledInstancesLaunchSpecification' :: Text
imageId = Text
pImageId_
    }

-- | The block device mapping entries.
scheduledInstancesLaunchSpecification_blockDeviceMappings :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe [ScheduledInstancesBlockDeviceMapping])
scheduledInstancesLaunchSpecification_blockDeviceMappings :: Lens'
  ScheduledInstancesLaunchSpecification
  (Maybe [ScheduledInstancesBlockDeviceMapping])
scheduledInstancesLaunchSpecification_blockDeviceMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe [ScheduledInstancesBlockDeviceMapping]
blockDeviceMappings :: Maybe [ScheduledInstancesBlockDeviceMapping]
$sel:blockDeviceMappings:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesBlockDeviceMapping]
blockDeviceMappings} -> Maybe [ScheduledInstancesBlockDeviceMapping]
blockDeviceMappings) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe [ScheduledInstancesBlockDeviceMapping]
a -> ScheduledInstancesLaunchSpecification
s {$sel:blockDeviceMappings:ScheduledInstancesLaunchSpecification' :: Maybe [ScheduledInstancesBlockDeviceMapping]
blockDeviceMappings = Maybe [ScheduledInstancesBlockDeviceMapping]
a} :: ScheduledInstancesLaunchSpecification) 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

-- | Indicates whether the instances are optimized for EBS I\/O. This
-- optimization provides dedicated throughput to Amazon EBS and an
-- optimized configuration stack to provide optimal EBS I\/O performance.
-- This optimization isn\'t available with all instance types. Additional
-- usage charges apply when using an EBS-optimized instance.
--
-- Default: @false@
scheduledInstancesLaunchSpecification_ebsOptimized :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe Prelude.Bool)
scheduledInstancesLaunchSpecification_ebsOptimized :: Lens' ScheduledInstancesLaunchSpecification (Maybe Bool)
scheduledInstancesLaunchSpecification_ebsOptimized = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe Bool
ebsOptimized :: Maybe Bool
$sel:ebsOptimized:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Bool
ebsOptimized} -> Maybe Bool
ebsOptimized) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe Bool
a -> ScheduledInstancesLaunchSpecification
s {$sel:ebsOptimized:ScheduledInstancesLaunchSpecification' :: Maybe Bool
ebsOptimized = Maybe Bool
a} :: ScheduledInstancesLaunchSpecification)

-- | The IAM instance profile.
scheduledInstancesLaunchSpecification_iamInstanceProfile :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe ScheduledInstancesIamInstanceProfile)
scheduledInstancesLaunchSpecification_iamInstanceProfile :: Lens'
  ScheduledInstancesLaunchSpecification
  (Maybe ScheduledInstancesIamInstanceProfile)
scheduledInstancesLaunchSpecification_iamInstanceProfile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe ScheduledInstancesIamInstanceProfile
iamInstanceProfile :: Maybe ScheduledInstancesIamInstanceProfile
$sel:iamInstanceProfile:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesIamInstanceProfile
iamInstanceProfile} -> Maybe ScheduledInstancesIamInstanceProfile
iamInstanceProfile) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe ScheduledInstancesIamInstanceProfile
a -> ScheduledInstancesLaunchSpecification
s {$sel:iamInstanceProfile:ScheduledInstancesLaunchSpecification' :: Maybe ScheduledInstancesIamInstanceProfile
iamInstanceProfile = Maybe ScheduledInstancesIamInstanceProfile
a} :: ScheduledInstancesLaunchSpecification)

-- | The instance type.
scheduledInstancesLaunchSpecification_instanceType :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe Prelude.Text)
scheduledInstancesLaunchSpecification_instanceType :: Lens' ScheduledInstancesLaunchSpecification (Maybe Text)
scheduledInstancesLaunchSpecification_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe Text
a -> ScheduledInstancesLaunchSpecification
s {$sel:instanceType:ScheduledInstancesLaunchSpecification' :: Maybe Text
instanceType = Maybe Text
a} :: ScheduledInstancesLaunchSpecification)

-- | The ID of the kernel.
scheduledInstancesLaunchSpecification_kernelId :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe Prelude.Text)
scheduledInstancesLaunchSpecification_kernelId :: Lens' ScheduledInstancesLaunchSpecification (Maybe Text)
scheduledInstancesLaunchSpecification_kernelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe Text
kernelId :: Maybe Text
$sel:kernelId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
kernelId} -> Maybe Text
kernelId) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe Text
a -> ScheduledInstancesLaunchSpecification
s {$sel:kernelId:ScheduledInstancesLaunchSpecification' :: Maybe Text
kernelId = Maybe Text
a} :: ScheduledInstancesLaunchSpecification)

-- | The name of the key pair.
scheduledInstancesLaunchSpecification_keyName :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe Prelude.Text)
scheduledInstancesLaunchSpecification_keyName :: Lens' ScheduledInstancesLaunchSpecification (Maybe Text)
scheduledInstancesLaunchSpecification_keyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe Text
keyName :: Maybe Text
$sel:keyName:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
keyName} -> Maybe Text
keyName) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe Text
a -> ScheduledInstancesLaunchSpecification
s {$sel:keyName:ScheduledInstancesLaunchSpecification' :: Maybe Text
keyName = Maybe Text
a} :: ScheduledInstancesLaunchSpecification)

-- | Enable or disable monitoring for the instances.
scheduledInstancesLaunchSpecification_monitoring :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe ScheduledInstancesMonitoring)
scheduledInstancesLaunchSpecification_monitoring :: Lens'
  ScheduledInstancesLaunchSpecification
  (Maybe ScheduledInstancesMonitoring)
scheduledInstancesLaunchSpecification_monitoring = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe ScheduledInstancesMonitoring
monitoring :: Maybe ScheduledInstancesMonitoring
$sel:monitoring:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesMonitoring
monitoring} -> Maybe ScheduledInstancesMonitoring
monitoring) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe ScheduledInstancesMonitoring
a -> ScheduledInstancesLaunchSpecification
s {$sel:monitoring:ScheduledInstancesLaunchSpecification' :: Maybe ScheduledInstancesMonitoring
monitoring = Maybe ScheduledInstancesMonitoring
a} :: ScheduledInstancesLaunchSpecification)

-- | The network interfaces.
scheduledInstancesLaunchSpecification_networkInterfaces :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe [ScheduledInstancesNetworkInterface])
scheduledInstancesLaunchSpecification_networkInterfaces :: Lens'
  ScheduledInstancesLaunchSpecification
  (Maybe [ScheduledInstancesNetworkInterface])
scheduledInstancesLaunchSpecification_networkInterfaces = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe [ScheduledInstancesNetworkInterface]
networkInterfaces :: Maybe [ScheduledInstancesNetworkInterface]
$sel:networkInterfaces:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesNetworkInterface]
networkInterfaces} -> Maybe [ScheduledInstancesNetworkInterface]
networkInterfaces) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe [ScheduledInstancesNetworkInterface]
a -> ScheduledInstancesLaunchSpecification
s {$sel:networkInterfaces:ScheduledInstancesLaunchSpecification' :: Maybe [ScheduledInstancesNetworkInterface]
networkInterfaces = Maybe [ScheduledInstancesNetworkInterface]
a} :: ScheduledInstancesLaunchSpecification) 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 placement information.
scheduledInstancesLaunchSpecification_placement :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe ScheduledInstancesPlacement)
scheduledInstancesLaunchSpecification_placement :: Lens'
  ScheduledInstancesLaunchSpecification
  (Maybe ScheduledInstancesPlacement)
scheduledInstancesLaunchSpecification_placement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe ScheduledInstancesPlacement
placement :: Maybe ScheduledInstancesPlacement
$sel:placement:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesPlacement
placement} -> Maybe ScheduledInstancesPlacement
placement) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe ScheduledInstancesPlacement
a -> ScheduledInstancesLaunchSpecification
s {$sel:placement:ScheduledInstancesLaunchSpecification' :: Maybe ScheduledInstancesPlacement
placement = Maybe ScheduledInstancesPlacement
a} :: ScheduledInstancesLaunchSpecification)

-- | The ID of the RAM disk.
scheduledInstancesLaunchSpecification_ramdiskId :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe Prelude.Text)
scheduledInstancesLaunchSpecification_ramdiskId :: Lens' ScheduledInstancesLaunchSpecification (Maybe Text)
scheduledInstancesLaunchSpecification_ramdiskId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe Text
ramdiskId :: Maybe Text
$sel:ramdiskId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
ramdiskId} -> Maybe Text
ramdiskId) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe Text
a -> ScheduledInstancesLaunchSpecification
s {$sel:ramdiskId:ScheduledInstancesLaunchSpecification' :: Maybe Text
ramdiskId = Maybe Text
a} :: ScheduledInstancesLaunchSpecification)

-- | The IDs of the security groups.
scheduledInstancesLaunchSpecification_securityGroupIds :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe [Prelude.Text])
scheduledInstancesLaunchSpecification_securityGroupIds :: Lens' ScheduledInstancesLaunchSpecification (Maybe [Text])
scheduledInstancesLaunchSpecification_securityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe [Text]
a -> ScheduledInstancesLaunchSpecification
s {$sel:securityGroupIds:ScheduledInstancesLaunchSpecification' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: ScheduledInstancesLaunchSpecification) 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 ID of the subnet in which to launch the instances.
scheduledInstancesLaunchSpecification_subnetId :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe Prelude.Text)
scheduledInstancesLaunchSpecification_subnetId :: Lens' ScheduledInstancesLaunchSpecification (Maybe Text)
scheduledInstancesLaunchSpecification_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe Text
a -> ScheduledInstancesLaunchSpecification
s {$sel:subnetId:ScheduledInstancesLaunchSpecification' :: Maybe Text
subnetId = Maybe Text
a} :: ScheduledInstancesLaunchSpecification)

-- | The base64-encoded MIME user data.
scheduledInstancesLaunchSpecification_userData :: Lens.Lens' ScheduledInstancesLaunchSpecification (Prelude.Maybe Prelude.Text)
scheduledInstancesLaunchSpecification_userData :: Lens' ScheduledInstancesLaunchSpecification (Maybe Text)
scheduledInstancesLaunchSpecification_userData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Maybe Text
userData :: Maybe Text
$sel:userData:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
userData} -> Maybe Text
userData) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Maybe Text
a -> ScheduledInstancesLaunchSpecification
s {$sel:userData:ScheduledInstancesLaunchSpecification' :: Maybe Text
userData = Maybe Text
a} :: ScheduledInstancesLaunchSpecification)

-- | The ID of the Amazon Machine Image (AMI).
scheduledInstancesLaunchSpecification_imageId :: Lens.Lens' ScheduledInstancesLaunchSpecification Prelude.Text
scheduledInstancesLaunchSpecification_imageId :: Lens' ScheduledInstancesLaunchSpecification Text
scheduledInstancesLaunchSpecification_imageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledInstancesLaunchSpecification' {Text
imageId :: Text
$sel:imageId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Text
imageId} -> Text
imageId) (\s :: ScheduledInstancesLaunchSpecification
s@ScheduledInstancesLaunchSpecification' {} Text
a -> ScheduledInstancesLaunchSpecification
s {$sel:imageId:ScheduledInstancesLaunchSpecification' :: Text
imageId = Text
a} :: ScheduledInstancesLaunchSpecification)

instance
  Prelude.Hashable
    ScheduledInstancesLaunchSpecification
  where
  hashWithSalt :: Int -> ScheduledInstancesLaunchSpecification -> Int
hashWithSalt
    Int
_salt
    ScheduledInstancesLaunchSpecification' {Maybe Bool
Maybe [Text]
Maybe [ScheduledInstancesBlockDeviceMapping]
Maybe [ScheduledInstancesNetworkInterface]
Maybe Text
Maybe ScheduledInstancesIamInstanceProfile
Maybe ScheduledInstancesMonitoring
Maybe ScheduledInstancesPlacement
Text
imageId :: Text
userData :: Maybe Text
subnetId :: Maybe Text
securityGroupIds :: Maybe [Text]
ramdiskId :: Maybe Text
placement :: Maybe ScheduledInstancesPlacement
networkInterfaces :: Maybe [ScheduledInstancesNetworkInterface]
monitoring :: Maybe ScheduledInstancesMonitoring
keyName :: Maybe Text
kernelId :: Maybe Text
instanceType :: Maybe Text
iamInstanceProfile :: Maybe ScheduledInstancesIamInstanceProfile
ebsOptimized :: Maybe Bool
blockDeviceMappings :: Maybe [ScheduledInstancesBlockDeviceMapping]
$sel:imageId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Text
$sel:userData:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:subnetId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:securityGroupIds:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe [Text]
$sel:ramdiskId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:placement:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesPlacement
$sel:networkInterfaces:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesNetworkInterface]
$sel:monitoring:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesMonitoring
$sel:keyName:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:kernelId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:instanceType:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:iamInstanceProfile:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesIamInstanceProfile
$sel:ebsOptimized:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Bool
$sel:blockDeviceMappings:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesBlockDeviceMapping]
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ScheduledInstancesBlockDeviceMapping]
blockDeviceMappings
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
ebsOptimized
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScheduledInstancesIamInstanceProfile
iamInstanceProfile
        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 ScheduledInstancesMonitoring
monitoring
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ScheduledInstancesNetworkInterface]
networkInterfaces
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScheduledInstancesPlacement
placement
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ramdiskId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroupIds
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userData
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
imageId

instance
  Prelude.NFData
    ScheduledInstancesLaunchSpecification
  where
  rnf :: ScheduledInstancesLaunchSpecification -> ()
rnf ScheduledInstancesLaunchSpecification' {Maybe Bool
Maybe [Text]
Maybe [ScheduledInstancesBlockDeviceMapping]
Maybe [ScheduledInstancesNetworkInterface]
Maybe Text
Maybe ScheduledInstancesIamInstanceProfile
Maybe ScheduledInstancesMonitoring
Maybe ScheduledInstancesPlacement
Text
imageId :: Text
userData :: Maybe Text
subnetId :: Maybe Text
securityGroupIds :: Maybe [Text]
ramdiskId :: Maybe Text
placement :: Maybe ScheduledInstancesPlacement
networkInterfaces :: Maybe [ScheduledInstancesNetworkInterface]
monitoring :: Maybe ScheduledInstancesMonitoring
keyName :: Maybe Text
kernelId :: Maybe Text
instanceType :: Maybe Text
iamInstanceProfile :: Maybe ScheduledInstancesIamInstanceProfile
ebsOptimized :: Maybe Bool
blockDeviceMappings :: Maybe [ScheduledInstancesBlockDeviceMapping]
$sel:imageId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Text
$sel:userData:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:subnetId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:securityGroupIds:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe [Text]
$sel:ramdiskId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:placement:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesPlacement
$sel:networkInterfaces:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesNetworkInterface]
$sel:monitoring:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesMonitoring
$sel:keyName:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:kernelId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:instanceType:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:iamInstanceProfile:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesIamInstanceProfile
$sel:ebsOptimized:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Bool
$sel:blockDeviceMappings:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesBlockDeviceMapping]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ScheduledInstancesBlockDeviceMapping]
blockDeviceMappings
      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 ScheduledInstancesIamInstanceProfile
iamInstanceProfile
      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 ScheduledInstancesMonitoring
monitoring
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ScheduledInstancesNetworkInterface]
networkInterfaces
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ScheduledInstancesPlacement
placement
      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]
securityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetId
      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
imageId

instance
  Data.ToQuery
    ScheduledInstancesLaunchSpecification
  where
  toQuery :: ScheduledInstancesLaunchSpecification -> QueryString
toQuery ScheduledInstancesLaunchSpecification' {Maybe Bool
Maybe [Text]
Maybe [ScheduledInstancesBlockDeviceMapping]
Maybe [ScheduledInstancesNetworkInterface]
Maybe Text
Maybe ScheduledInstancesIamInstanceProfile
Maybe ScheduledInstancesMonitoring
Maybe ScheduledInstancesPlacement
Text
imageId :: Text
userData :: Maybe Text
subnetId :: Maybe Text
securityGroupIds :: Maybe [Text]
ramdiskId :: Maybe Text
placement :: Maybe ScheduledInstancesPlacement
networkInterfaces :: Maybe [ScheduledInstancesNetworkInterface]
monitoring :: Maybe ScheduledInstancesMonitoring
keyName :: Maybe Text
kernelId :: Maybe Text
instanceType :: Maybe Text
iamInstanceProfile :: Maybe ScheduledInstancesIamInstanceProfile
ebsOptimized :: Maybe Bool
blockDeviceMappings :: Maybe [ScheduledInstancesBlockDeviceMapping]
$sel:imageId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Text
$sel:userData:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:subnetId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:securityGroupIds:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe [Text]
$sel:ramdiskId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:placement:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesPlacement
$sel:networkInterfaces:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesNetworkInterface]
$sel:monitoring:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesMonitoring
$sel:keyName:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:kernelId:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:instanceType:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Text
$sel:iamInstanceProfile:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe ScheduledInstancesIamInstanceProfile
$sel:ebsOptimized:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification -> Maybe Bool
$sel:blockDeviceMappings:ScheduledInstancesLaunchSpecification' :: ScheduledInstancesLaunchSpecification
-> Maybe [ScheduledInstancesBlockDeviceMapping]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"BlockDeviceMapping"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ScheduledInstancesBlockDeviceMapping]
blockDeviceMappings
          ),
        ByteString
"EbsOptimized" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
ebsOptimized,
        ByteString
"IamInstanceProfile" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ScheduledInstancesIamInstanceProfile
iamInstanceProfile,
        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
"Monitoring" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ScheduledInstancesMonitoring
monitoring,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"NetworkInterface"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ScheduledInstancesNetworkInterface]
networkInterfaces
          ),
        ByteString
"Placement" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ScheduledInstancesPlacement
placement,
        ByteString
"RamdiskId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ramdiskId,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"SecurityGroupId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupIds
          ),
        ByteString
"SubnetId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
subnetId,
        ByteString
"UserData" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
userData,
        ByteString
"ImageId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
imageId
      ]