{-# 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.EC2.RunInstances
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Launches the specified number of instances using an AMI for which you
-- have permissions.
--
-- You can specify a number of options, or leave the default options. The
-- following rules apply:
--
-- -   [EC2-VPC] If you don\'t specify a subnet ID, we choose a default
--     subnet from your default VPC for you. If you don\'t have a default
--     VPC, you must specify a subnet ID in the request.
--
-- -   [EC2-Classic] If don\'t specify an Availability Zone, we choose one
--     for you.
--
-- -   Some instance types must be launched into a VPC. If you do not have
--     a default VPC, or if you do not specify a subnet ID, the request
--     fails. For more information, see
--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types Instance types available only in a VPC>.
--
-- -   [EC2-VPC] All instances have a network interface with a primary
--     private IPv4 address. If you don\'t specify this address, we choose
--     one from the IPv4 range of your subnet.
--
-- -   Not all instance types support IPv6 addresses. For more information,
--     see
--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>.
--
-- -   If you don\'t specify a security group ID, we use the default
--     security group. For more information, see
--     <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html Security groups>.
--
-- -   If any of the AMIs have a product code attached for which the user
--     has not subscribed, the request fails.
--
-- You can create a
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html launch template>,
-- which is a resource that contains the parameters to launch an instance.
-- When you launch an instance using RunInstances, you can specify the
-- launch template instead of specifying the launch parameters.
--
-- To ensure faster instance launches, break up large requests into smaller
-- batches. For example, create five separate launch requests for 100
-- instances each instead of one launch request for 500 instances.
--
-- An instance is ready for you to use when it\'s in the @running@ state.
-- You can check the state of your instance using DescribeInstances. You
-- can tag instances and EBS volumes during launch, after launch, or both.
-- For more information, see CreateTags and
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html Tagging your Amazon EC2 resources>.
--
-- Linux instances have access to the public key of the key pair at boot.
-- You can use this key to provide secure access to the instance. Amazon
-- EC2 public images use this feature to provide secure access without
-- passwords. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html Key pairs>.
--
-- For troubleshooting, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html What to do if an instance immediately terminates>,
-- and
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html Troubleshooting connecting to your instance>.
--
-- We are retiring EC2-Classic. We recommend that you migrate from
-- EC2-Classic to a VPC. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html Migrate from EC2-Classic to a VPC>
-- in the /Amazon EC2 User Guide/.
module Amazonka.EC2.RunInstances
  ( -- * Creating a Request
    RunInstances (..),
    newRunInstances,

    -- * Request Lenses
    runInstances_additionalInfo,
    runInstances_blockDeviceMappings,
    runInstances_capacityReservationSpecification,
    runInstances_clientToken,
    runInstances_cpuOptions,
    runInstances_creditSpecification,
    runInstances_disableApiStop,
    runInstances_disableApiTermination,
    runInstances_dryRun,
    runInstances_ebsOptimized,
    runInstances_elasticGpuSpecification,
    runInstances_elasticInferenceAccelerators,
    runInstances_enclaveOptions,
    runInstances_hibernationOptions,
    runInstances_iamInstanceProfile,
    runInstances_imageId,
    runInstances_instanceInitiatedShutdownBehavior,
    runInstances_instanceMarketOptions,
    runInstances_instanceType,
    runInstances_ipv6AddressCount,
    runInstances_ipv6Addresses,
    runInstances_kernelId,
    runInstances_keyName,
    runInstances_launchTemplate,
    runInstances_licenseSpecifications,
    runInstances_maintenanceOptions,
    runInstances_metadataOptions,
    runInstances_monitoring,
    runInstances_networkInterfaces,
    runInstances_placement,
    runInstances_privateDnsNameOptions,
    runInstances_privateIpAddress,
    runInstances_ramdiskId,
    runInstances_securityGroupIds,
    runInstances_securityGroups,
    runInstances_subnetId,
    runInstances_tagSpecifications,
    runInstances_userData,
    runInstances_maxCount,
    runInstances_minCount,

    -- * Destructuring the Response
    Reservation (..),
    newReservation,

    -- * Response Lenses
    reservation_groups,
    reservation_instances,
    reservation_requesterId,
    reservation_reservationId,
    reservation_ownerId,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newRunInstances' smart constructor.
data RunInstances = RunInstances'
  { -- | Reserved.
    RunInstances -> Maybe Text
additionalInfo :: Prelude.Maybe Prelude.Text,
    -- | The block device mapping, which defines the EBS volumes and instance
    -- store volumes to attach to the instance at launch. For more information,
    -- see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html Block device mappings>
    -- in the /Amazon EC2 User Guide/.
    RunInstances -> Maybe [BlockDeviceMapping]
blockDeviceMappings :: Prelude.Maybe [BlockDeviceMapping],
    -- | Information about the Capacity Reservation targeting option. If you do
    -- not specify this parameter, the instance\'s Capacity Reservation
    -- preference defaults to @open@, which enables it to run in any open
    -- Capacity Reservation that has matching attributes (instance type,
    -- platform, Availability Zone).
    RunInstances -> Maybe CapacityReservationSpecification
capacityReservationSpecification :: Prelude.Maybe CapacityReservationSpecification,
    -- | Unique, case-sensitive identifier you provide to ensure the idempotency
    -- of the request. If you do not specify a client token, a randomly
    -- generated token is used for the request to ensure idempotency.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html Ensuring Idempotency>.
    --
    -- Constraints: Maximum 64 ASCII characters
    RunInstances -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The CPU options for the instance. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html Optimize CPU options>
    -- in the /Amazon EC2 User Guide/.
    RunInstances -> Maybe CpuOptionsRequest
cpuOptions :: Prelude.Maybe CpuOptionsRequest,
    -- | The credit option for CPU usage of the burstable performance instance.
    -- Valid values are @standard@ and @unlimited@. To change this attribute
    -- after launch, use
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html ModifyInstanceCreditSpecification>.
    -- For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html Burstable performance instances>
    -- in the /Amazon EC2 User Guide/.
    --
    -- Default: @standard@ (T2 instances) or @unlimited@ (T3\/T3a\/T4g
    -- instances)
    --
    -- For T3 instances with @host@ tenancy, only @standard@ is supported.
    RunInstances -> Maybe CreditSpecificationRequest
creditSpecification :: Prelude.Maybe CreditSpecificationRequest,
    -- | Indicates whether an instance is enabled for stop protection. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection Stop protection>.
    RunInstances -> Maybe Bool
disableApiStop :: Prelude.Maybe Prelude.Bool,
    -- | If you set this parameter to @true@, you can\'t terminate the instance
    -- using the Amazon EC2 console, CLI, or API; otherwise, you can. To change
    -- this attribute after launch, use
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html ModifyInstanceAttribute>.
    -- Alternatively, if you set @InstanceInitiatedShutdownBehavior@ to
    -- @terminate@, you can terminate the instance by running the shutdown
    -- command from the instance.
    --
    -- Default: @false@
    RunInstances -> Maybe Bool
disableApiTermination :: Prelude.Maybe Prelude.Bool,
    -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    RunInstances -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | Indicates whether the instance is optimized for Amazon EBS I\/O. This
    -- optimization provides dedicated throughput to Amazon EBS and an
    -- optimized configuration stack to provide optimal Amazon 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@
    RunInstances -> Maybe Bool
ebsOptimized :: Prelude.Maybe Prelude.Bool,
    -- | An elastic GPU to associate with the instance. An Elastic GPU is a GPU
    -- resource that you can attach to your Windows instance to accelerate the
    -- graphics performance of your applications. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html Amazon EC2 Elastic GPUs>
    -- in the /Amazon EC2 User Guide/.
    RunInstances -> Maybe [ElasticGpuSpecification]
elasticGpuSpecification :: Prelude.Maybe [ElasticGpuSpecification],
    -- | An elastic inference accelerator to associate with the instance. Elastic
    -- inference accelerators are a resource you can attach to your Amazon EC2
    -- instances to accelerate your Deep Learning (DL) inference workloads.
    --
    -- You cannot specify accelerators from different generations in the same
    -- request.
    RunInstances -> Maybe [ElasticInferenceAccelerator]
elasticInferenceAccelerators :: Prelude.Maybe [ElasticInferenceAccelerator],
    -- | Indicates whether the instance is enabled for Amazon Web Services Nitro
    -- Enclaves. For more information, see
    -- <https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html What is Amazon Web Services Nitro Enclaves?>
    -- in the /Amazon Web Services Nitro Enclaves User Guide/.
    --
    -- You can\'t enable Amazon Web Services Nitro Enclaves and hibernation on
    -- the same instance.
    RunInstances -> Maybe EnclaveOptionsRequest
enclaveOptions :: Prelude.Maybe EnclaveOptionsRequest,
    -- | Indicates whether an instance is enabled for hibernation. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html Hibernate your instance>
    -- in the /Amazon EC2 User Guide/.
    --
    -- You can\'t enable hibernation and Amazon Web Services Nitro Enclaves on
    -- the same instance.
    RunInstances -> Maybe HibernationOptionsRequest
hibernationOptions :: Prelude.Maybe HibernationOptionsRequest,
    -- | The name or Amazon Resource Name (ARN) of an IAM instance profile.
    RunInstances -> Maybe IamInstanceProfileSpecification
iamInstanceProfile :: Prelude.Maybe IamInstanceProfileSpecification,
    -- | The ID of the AMI. An AMI ID is required to launch an instance and must
    -- be specified here or in a launch template.
    RunInstances -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether an instance stops or terminates when you initiate
    -- shutdown from the instance (using the operating system command for
    -- system shutdown).
    --
    -- Default: @stop@
    RunInstances -> Maybe ShutdownBehavior
instanceInitiatedShutdownBehavior :: Prelude.Maybe ShutdownBehavior,
    -- | The market (purchasing) option for the instances.
    --
    -- For RunInstances, persistent Spot Instance requests are only supported
    -- when __InstanceInterruptionBehavior__ is set to either @hibernate@ or
    -- @stop@.
    RunInstances -> Maybe InstanceMarketOptionsRequest
instanceMarketOptions :: Prelude.Maybe InstanceMarketOptionsRequest,
    -- | The instance type. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>
    -- in the /Amazon EC2 User Guide/.
    --
    -- Default: @m1.small@
    RunInstances -> Maybe InstanceType
instanceType :: Prelude.Maybe InstanceType,
    -- | [EC2-VPC] The number of IPv6 addresses to associate with the primary
    -- network interface. Amazon EC2 chooses the IPv6 addresses from the range
    -- of your subnet. You cannot specify this option and the option to assign
    -- specific IPv6 addresses in the same request. You can specify this option
    -- if you\'ve specified a minimum number of instances to launch.
    --
    -- You cannot specify this option and the network interfaces option in the
    -- same request.
    RunInstances -> Maybe Int
ipv6AddressCount :: Prelude.Maybe Prelude.Int,
    -- | [EC2-VPC] The IPv6 addresses from the range of the subnet to associate
    -- with the primary network interface. You cannot specify this option and
    -- the option to assign a number of IPv6 addresses in the same request. You
    -- cannot specify this option if you\'ve specified a minimum number of
    -- instances to launch.
    --
    -- You cannot specify this option and the network interfaces option in the
    -- same request.
    RunInstances -> Maybe [InstanceIpv6Address]
ipv6Addresses :: Prelude.Maybe [InstanceIpv6Address],
    -- | The ID of the kernel.
    --
    -- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html PV-GRUB>
    -- in the /Amazon EC2 User Guide/.
    RunInstances -> Maybe Text
kernelId :: Prelude.Maybe Prelude.Text,
    -- | The name of the key pair. You can create a key pair using
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html CreateKeyPair>
    -- or
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html ImportKeyPair>.
    --
    -- If you do not specify a key pair, you can\'t connect to the instance
    -- unless you choose an AMI that is configured to allow users another way
    -- to log in.
    RunInstances -> Maybe Text
keyName :: Prelude.Maybe Prelude.Text,
    -- | The launch template to use to launch the instances. Any parameters that
    -- you specify in RunInstances override the same parameters in the launch
    -- template. You can specify either the name or ID of a launch template,
    -- but not both.
    RunInstances -> Maybe LaunchTemplateSpecification
launchTemplate :: Prelude.Maybe LaunchTemplateSpecification,
    -- | The license configurations.
    RunInstances -> Maybe [LicenseConfigurationRequest]
licenseSpecifications :: Prelude.Maybe [LicenseConfigurationRequest],
    -- | The maintenance and recovery options for the instance.
    RunInstances -> Maybe InstanceMaintenanceOptionsRequest
maintenanceOptions :: Prelude.Maybe InstanceMaintenanceOptionsRequest,
    -- | The metadata options for the instance. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html Instance metadata and user data>.
    RunInstances -> Maybe InstanceMetadataOptionsRequest
metadataOptions :: Prelude.Maybe InstanceMetadataOptionsRequest,
    -- | Specifies whether detailed monitoring is enabled for the instance.
    RunInstances -> Maybe RunInstancesMonitoringEnabled
monitoring :: Prelude.Maybe RunInstancesMonitoringEnabled,
    -- | The network interfaces to associate with the instance. If you specify a
    -- network interface, you must specify any security groups and subnets as
    -- part of the network interface.
    RunInstances -> Maybe [InstanceNetworkInterfaceSpecification]
networkInterfaces :: Prelude.Maybe [InstanceNetworkInterfaceSpecification],
    -- | The placement for the instance.
    RunInstances -> Maybe Placement
placement :: Prelude.Maybe Placement,
    -- | The options for the instance hostname. The default values are inherited
    -- from the subnet.
    RunInstances -> Maybe PrivateDnsNameOptionsRequest
privateDnsNameOptions :: Prelude.Maybe PrivateDnsNameOptionsRequest,
    -- | [EC2-VPC] The primary IPv4 address. You must specify a value from the
    -- IPv4 address range of the subnet.
    --
    -- Only one private IP address can be designated as primary. You can\'t
    -- specify this option if you\'ve specified the option to designate a
    -- private IP address as the primary IP address in a network interface
    -- specification. You cannot specify this option if you\'re launching more
    -- than one instance in the request.
    --
    -- You cannot specify this option and the network interfaces option in the
    -- same request.
    RunInstances -> Maybe Text
privateIpAddress :: Prelude.Maybe Prelude.Text,
    -- | The ID of the RAM disk to select. Some kernels require additional
    -- drivers at launch. Check the kernel requirements for information about
    -- whether you need to specify a RAM disk. To find kernel requirements, go
    -- to the Amazon Web Services Resource Center and search for the kernel ID.
    --
    -- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html PV-GRUB>
    -- in the /Amazon EC2 User Guide/.
    RunInstances -> Maybe Text
ramdiskId :: Prelude.Maybe Prelude.Text,
    -- | The IDs of the security groups. You can create a security group using
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html CreateSecurityGroup>.
    --
    -- If you specify a network interface, you must specify any security groups
    -- as part of the network interface.
    RunInstances -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | [EC2-Classic, default VPC] The names of the security groups. For a
    -- nondefault VPC, you must use security group IDs instead.
    --
    -- If you specify a network interface, you must specify any security groups
    -- as part of the network interface.
    --
    -- Default: Amazon EC2 uses the default security group.
    RunInstances -> Maybe [Text]
securityGroups :: Prelude.Maybe [Prelude.Text],
    -- | [EC2-VPC] The ID of the subnet to launch the instance into.
    --
    -- If you specify a network interface, you must specify any subnets as part
    -- of the network interface.
    RunInstances -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
    -- | The tags to apply to the resources that are created during instance
    -- launch.
    --
    -- You can specify tags for the following resources only:
    --
    -- -   Instances
    --
    -- -   Volumes
    --
    -- -   Elastic graphics
    --
    -- -   Spot Instance requests
    --
    -- -   Network interfaces
    --
    -- To tag a resource after it has been created, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html CreateTags>.
    RunInstances -> Maybe [TagSpecification]
tagSpecifications :: Prelude.Maybe [TagSpecification],
    -- | The user data script to make available to the instance. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html Run commands on your Linux instance at launch>
    -- and
    -- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html Run commands on your Windows instance at launch>.
    -- 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.
    RunInstances -> Maybe (Sensitive Text)
userData :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The maximum number of instances to launch. If you specify more instances
    -- than Amazon EC2 can launch in the target Availability Zone, Amazon EC2
    -- launches the largest possible number of instances above @MinCount@.
    --
    -- Constraints: Between 1 and the maximum number you\'re allowed for the
    -- specified instance type. For more information about the default limits,
    -- and how to request an increase, see
    -- <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2 How many instances can I run in Amazon EC2>
    -- in the Amazon EC2 FAQ.
    RunInstances -> Int
maxCount :: Prelude.Int,
    -- | The minimum number of instances to launch. If you specify a minimum that
    -- is more instances than Amazon EC2 can launch in the target Availability
    -- Zone, Amazon EC2 launches no instances.
    --
    -- Constraints: Between 1 and the maximum number you\'re allowed for the
    -- specified instance type. For more information about the default limits,
    -- and how to request an increase, see
    -- <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2 How many instances can I run in Amazon EC2>
    -- in the Amazon EC2 General FAQ.
    RunInstances -> Int
minCount :: Prelude.Int
  }
  deriving (RunInstances -> RunInstances -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunInstances -> RunInstances -> Bool
$c/= :: RunInstances -> RunInstances -> Bool
== :: RunInstances -> RunInstances -> Bool
$c== :: RunInstances -> RunInstances -> Bool
Prelude.Eq, Int -> RunInstances -> ShowS
[RunInstances] -> ShowS
RunInstances -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunInstances] -> ShowS
$cshowList :: [RunInstances] -> ShowS
show :: RunInstances -> String
$cshow :: RunInstances -> String
showsPrec :: Int -> RunInstances -> ShowS
$cshowsPrec :: Int -> RunInstances -> ShowS
Prelude.Show, forall x. Rep RunInstances x -> RunInstances
forall x. RunInstances -> Rep RunInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RunInstances x -> RunInstances
$cfrom :: forall x. RunInstances -> Rep RunInstances x
Prelude.Generic)

-- |
-- Create a value of 'RunInstances' 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:
--
-- 'additionalInfo', 'runInstances_additionalInfo' - Reserved.
--
-- 'blockDeviceMappings', 'runInstances_blockDeviceMappings' - The block device mapping, which defines the EBS volumes and instance
-- store volumes to attach to the instance at launch. For more information,
-- see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html Block device mappings>
-- in the /Amazon EC2 User Guide/.
--
-- 'capacityReservationSpecification', 'runInstances_capacityReservationSpecification' - Information about the Capacity Reservation targeting option. If you do
-- not specify this parameter, the instance\'s Capacity Reservation
-- preference defaults to @open@, which enables it to run in any open
-- Capacity Reservation that has matching attributes (instance type,
-- platform, Availability Zone).
--
-- 'clientToken', 'runInstances_clientToken' - Unique, case-sensitive identifier you provide to ensure the idempotency
-- of the request. If you do not specify a client token, a randomly
-- generated token is used for the request to ensure idempotency.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html Ensuring Idempotency>.
--
-- Constraints: Maximum 64 ASCII characters
--
-- 'cpuOptions', 'runInstances_cpuOptions' - The CPU options for the instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html Optimize CPU options>
-- in the /Amazon EC2 User Guide/.
--
-- 'creditSpecification', 'runInstances_creditSpecification' - The credit option for CPU usage of the burstable performance instance.
-- Valid values are @standard@ and @unlimited@. To change this attribute
-- after launch, use
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html ModifyInstanceCreditSpecification>.
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html Burstable performance instances>
-- in the /Amazon EC2 User Guide/.
--
-- Default: @standard@ (T2 instances) or @unlimited@ (T3\/T3a\/T4g
-- instances)
--
-- For T3 instances with @host@ tenancy, only @standard@ is supported.
--
-- 'disableApiStop', 'runInstances_disableApiStop' - Indicates whether an instance is enabled for stop protection. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection Stop protection>.
--
-- 'disableApiTermination', 'runInstances_disableApiTermination' - If you set this parameter to @true@, you can\'t terminate the instance
-- using the Amazon EC2 console, CLI, or API; otherwise, you can. To change
-- this attribute after launch, use
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html ModifyInstanceAttribute>.
-- Alternatively, if you set @InstanceInitiatedShutdownBehavior@ to
-- @terminate@, you can terminate the instance by running the shutdown
-- command from the instance.
--
-- Default: @false@
--
-- 'dryRun', 'runInstances_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'ebsOptimized', 'runInstances_ebsOptimized' - Indicates whether the instance is optimized for Amazon EBS I\/O. This
-- optimization provides dedicated throughput to Amazon EBS and an
-- optimized configuration stack to provide optimal Amazon 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@
--
-- 'elasticGpuSpecification', 'runInstances_elasticGpuSpecification' - An elastic GPU to associate with the instance. An Elastic GPU is a GPU
-- resource that you can attach to your Windows instance to accelerate the
-- graphics performance of your applications. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html Amazon EC2 Elastic GPUs>
-- in the /Amazon EC2 User Guide/.
--
-- 'elasticInferenceAccelerators', 'runInstances_elasticInferenceAccelerators' - An elastic inference accelerator to associate with the instance. Elastic
-- inference accelerators are a resource you can attach to your Amazon EC2
-- instances to accelerate your Deep Learning (DL) inference workloads.
--
-- You cannot specify accelerators from different generations in the same
-- request.
--
-- 'enclaveOptions', 'runInstances_enclaveOptions' - Indicates whether the instance is enabled for Amazon Web Services Nitro
-- Enclaves. For more information, see
-- <https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html What is Amazon Web Services Nitro Enclaves?>
-- in the /Amazon Web Services Nitro Enclaves User Guide/.
--
-- You can\'t enable Amazon Web Services Nitro Enclaves and hibernation on
-- the same instance.
--
-- 'hibernationOptions', 'runInstances_hibernationOptions' - Indicates whether an instance is enabled for hibernation. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html Hibernate your instance>
-- in the /Amazon EC2 User Guide/.
--
-- You can\'t enable hibernation and Amazon Web Services Nitro Enclaves on
-- the same instance.
--
-- 'iamInstanceProfile', 'runInstances_iamInstanceProfile' - The name or Amazon Resource Name (ARN) of an IAM instance profile.
--
-- 'imageId', 'runInstances_imageId' - The ID of the AMI. An AMI ID is required to launch an instance and must
-- be specified here or in a launch template.
--
-- 'instanceInitiatedShutdownBehavior', 'runInstances_instanceInitiatedShutdownBehavior' - Indicates whether an instance stops or terminates when you initiate
-- shutdown from the instance (using the operating system command for
-- system shutdown).
--
-- Default: @stop@
--
-- 'instanceMarketOptions', 'runInstances_instanceMarketOptions' - The market (purchasing) option for the instances.
--
-- For RunInstances, persistent Spot Instance requests are only supported
-- when __InstanceInterruptionBehavior__ is set to either @hibernate@ or
-- @stop@.
--
-- 'instanceType', 'runInstances_instanceType' - The instance type. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>
-- in the /Amazon EC2 User Guide/.
--
-- Default: @m1.small@
--
-- 'ipv6AddressCount', 'runInstances_ipv6AddressCount' - [EC2-VPC] The number of IPv6 addresses to associate with the primary
-- network interface. Amazon EC2 chooses the IPv6 addresses from the range
-- of your subnet. You cannot specify this option and the option to assign
-- specific IPv6 addresses in the same request. You can specify this option
-- if you\'ve specified a minimum number of instances to launch.
--
-- You cannot specify this option and the network interfaces option in the
-- same request.
--
-- 'ipv6Addresses', 'runInstances_ipv6Addresses' - [EC2-VPC] The IPv6 addresses from the range of the subnet to associate
-- with the primary network interface. You cannot specify this option and
-- the option to assign a number of IPv6 addresses in the same request. You
-- cannot specify this option if you\'ve specified a minimum number of
-- instances to launch.
--
-- You cannot specify this option and the network interfaces option in the
-- same request.
--
-- 'kernelId', 'runInstances_kernelId' - The ID of the kernel.
--
-- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html PV-GRUB>
-- in the /Amazon EC2 User Guide/.
--
-- 'keyName', 'runInstances_keyName' - The name of the key pair. You can create a key pair using
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html CreateKeyPair>
-- or
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html ImportKeyPair>.
--
-- If you do not specify a key pair, you can\'t connect to the instance
-- unless you choose an AMI that is configured to allow users another way
-- to log in.
--
-- 'launchTemplate', 'runInstances_launchTemplate' - The launch template to use to launch the instances. Any parameters that
-- you specify in RunInstances override the same parameters in the launch
-- template. You can specify either the name or ID of a launch template,
-- but not both.
--
-- 'licenseSpecifications', 'runInstances_licenseSpecifications' - The license configurations.
--
-- 'maintenanceOptions', 'runInstances_maintenanceOptions' - The maintenance and recovery options for the instance.
--
-- 'metadataOptions', 'runInstances_metadataOptions' - The metadata options for the instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html Instance metadata and user data>.
--
-- 'monitoring', 'runInstances_monitoring' - Specifies whether detailed monitoring is enabled for the instance.
--
-- 'networkInterfaces', 'runInstances_networkInterfaces' - The network interfaces to associate with the instance. If you specify a
-- network interface, you must specify any security groups and subnets as
-- part of the network interface.
--
-- 'placement', 'runInstances_placement' - The placement for the instance.
--
-- 'privateDnsNameOptions', 'runInstances_privateDnsNameOptions' - The options for the instance hostname. The default values are inherited
-- from the subnet.
--
-- 'privateIpAddress', 'runInstances_privateIpAddress' - [EC2-VPC] The primary IPv4 address. You must specify a value from the
-- IPv4 address range of the subnet.
--
-- Only one private IP address can be designated as primary. You can\'t
-- specify this option if you\'ve specified the option to designate a
-- private IP address as the primary IP address in a network interface
-- specification. You cannot specify this option if you\'re launching more
-- than one instance in the request.
--
-- You cannot specify this option and the network interfaces option in the
-- same request.
--
-- 'ramdiskId', 'runInstances_ramdiskId' - The ID of the RAM disk to select. Some kernels require additional
-- drivers at launch. Check the kernel requirements for information about
-- whether you need to specify a RAM disk. To find kernel requirements, go
-- to the Amazon Web Services Resource Center and search for the kernel ID.
--
-- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html PV-GRUB>
-- in the /Amazon EC2 User Guide/.
--
-- 'securityGroupIds', 'runInstances_securityGroupIds' - The IDs of the security groups. You can create a security group using
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html CreateSecurityGroup>.
--
-- If you specify a network interface, you must specify any security groups
-- as part of the network interface.
--
-- 'securityGroups', 'runInstances_securityGroups' - [EC2-Classic, default VPC] The names of the security groups. For a
-- nondefault VPC, you must use security group IDs instead.
--
-- If you specify a network interface, you must specify any security groups
-- as part of the network interface.
--
-- Default: Amazon EC2 uses the default security group.
--
-- 'subnetId', 'runInstances_subnetId' - [EC2-VPC] The ID of the subnet to launch the instance into.
--
-- If you specify a network interface, you must specify any subnets as part
-- of the network interface.
--
-- 'tagSpecifications', 'runInstances_tagSpecifications' - The tags to apply to the resources that are created during instance
-- launch.
--
-- You can specify tags for the following resources only:
--
-- -   Instances
--
-- -   Volumes
--
-- -   Elastic graphics
--
-- -   Spot Instance requests
--
-- -   Network interfaces
--
-- To tag a resource after it has been created, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html CreateTags>.
--
-- 'userData', 'runInstances_userData' - The user data script to make available to the instance. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html Run commands on your Linux instance at launch>
-- and
-- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html Run commands on your Windows instance at launch>.
-- 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.
--
-- 'maxCount', 'runInstances_maxCount' - The maximum number of instances to launch. If you specify more instances
-- than Amazon EC2 can launch in the target Availability Zone, Amazon EC2
-- launches the largest possible number of instances above @MinCount@.
--
-- Constraints: Between 1 and the maximum number you\'re allowed for the
-- specified instance type. For more information about the default limits,
-- and how to request an increase, see
-- <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2 How many instances can I run in Amazon EC2>
-- in the Amazon EC2 FAQ.
--
-- 'minCount', 'runInstances_minCount' - The minimum number of instances to launch. If you specify a minimum that
-- is more instances than Amazon EC2 can launch in the target Availability
-- Zone, Amazon EC2 launches no instances.
--
-- Constraints: Between 1 and the maximum number you\'re allowed for the
-- specified instance type. For more information about the default limits,
-- and how to request an increase, see
-- <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2 How many instances can I run in Amazon EC2>
-- in the Amazon EC2 General FAQ.
newRunInstances ::
  -- | 'maxCount'
  Prelude.Int ->
  -- | 'minCount'
  Prelude.Int ->
  RunInstances
newRunInstances :: Int -> Int -> RunInstances
newRunInstances Int
pMaxCount_ Int
pMinCount_ =
  RunInstances'
    { $sel:additionalInfo:RunInstances' :: Maybe Text
additionalInfo = forall a. Maybe a
Prelude.Nothing,
      $sel:blockDeviceMappings:RunInstances' :: Maybe [BlockDeviceMapping]
blockDeviceMappings = forall a. Maybe a
Prelude.Nothing,
      $sel:capacityReservationSpecification:RunInstances' :: Maybe CapacityReservationSpecification
capacityReservationSpecification = forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:RunInstances' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:cpuOptions:RunInstances' :: Maybe CpuOptionsRequest
cpuOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:creditSpecification:RunInstances' :: Maybe CreditSpecificationRequest
creditSpecification = forall a. Maybe a
Prelude.Nothing,
      $sel:disableApiStop:RunInstances' :: Maybe Bool
disableApiStop = forall a. Maybe a
Prelude.Nothing,
      $sel:disableApiTermination:RunInstances' :: Maybe Bool
disableApiTermination = forall a. Maybe a
Prelude.Nothing,
      $sel:dryRun:RunInstances' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:ebsOptimized:RunInstances' :: Maybe Bool
ebsOptimized = forall a. Maybe a
Prelude.Nothing,
      $sel:elasticGpuSpecification:RunInstances' :: Maybe [ElasticGpuSpecification]
elasticGpuSpecification = forall a. Maybe a
Prelude.Nothing,
      $sel:elasticInferenceAccelerators:RunInstances' :: Maybe [ElasticInferenceAccelerator]
elasticInferenceAccelerators = forall a. Maybe a
Prelude.Nothing,
      $sel:enclaveOptions:RunInstances' :: Maybe EnclaveOptionsRequest
enclaveOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:hibernationOptions:RunInstances' :: Maybe HibernationOptionsRequest
hibernationOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:iamInstanceProfile:RunInstances' :: Maybe IamInstanceProfileSpecification
iamInstanceProfile = forall a. Maybe a
Prelude.Nothing,
      $sel:imageId:RunInstances' :: Maybe Text
imageId = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceInitiatedShutdownBehavior:RunInstances' :: Maybe ShutdownBehavior
instanceInitiatedShutdownBehavior = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceMarketOptions:RunInstances' :: Maybe InstanceMarketOptionsRequest
instanceMarketOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:RunInstances' :: Maybe InstanceType
instanceType = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6AddressCount:RunInstances' :: Maybe Int
ipv6AddressCount = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6Addresses:RunInstances' :: Maybe [InstanceIpv6Address]
ipv6Addresses = forall a. Maybe a
Prelude.Nothing,
      $sel:kernelId:RunInstances' :: Maybe Text
kernelId = forall a. Maybe a
Prelude.Nothing,
      $sel:keyName:RunInstances' :: Maybe Text
keyName = forall a. Maybe a
Prelude.Nothing,
      $sel:launchTemplate:RunInstances' :: Maybe LaunchTemplateSpecification
launchTemplate = forall a. Maybe a
Prelude.Nothing,
      $sel:licenseSpecifications:RunInstances' :: Maybe [LicenseConfigurationRequest]
licenseSpecifications = forall a. Maybe a
Prelude.Nothing,
      $sel:maintenanceOptions:RunInstances' :: Maybe InstanceMaintenanceOptionsRequest
maintenanceOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:metadataOptions:RunInstances' :: Maybe InstanceMetadataOptionsRequest
metadataOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:monitoring:RunInstances' :: Maybe RunInstancesMonitoringEnabled
monitoring = forall a. Maybe a
Prelude.Nothing,
      $sel:networkInterfaces:RunInstances' :: Maybe [InstanceNetworkInterfaceSpecification]
networkInterfaces = forall a. Maybe a
Prelude.Nothing,
      $sel:placement:RunInstances' :: Maybe Placement
placement = forall a. Maybe a
Prelude.Nothing,
      $sel:privateDnsNameOptions:RunInstances' :: Maybe PrivateDnsNameOptionsRequest
privateDnsNameOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:privateIpAddress:RunInstances' :: Maybe Text
privateIpAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:ramdiskId:RunInstances' :: Maybe Text
ramdiskId = forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroupIds:RunInstances' :: Maybe [Text]
securityGroupIds = forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroups:RunInstances' :: Maybe [Text]
securityGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetId:RunInstances' :: Maybe Text
subnetId = forall a. Maybe a
Prelude.Nothing,
      $sel:tagSpecifications:RunInstances' :: Maybe [TagSpecification]
tagSpecifications = forall a. Maybe a
Prelude.Nothing,
      $sel:userData:RunInstances' :: Maybe (Sensitive Text)
userData = forall a. Maybe a
Prelude.Nothing,
      $sel:maxCount:RunInstances' :: Int
maxCount = Int
pMaxCount_,
      $sel:minCount:RunInstances' :: Int
minCount = Int
pMinCount_
    }

-- | Reserved.
runInstances_additionalInfo :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Text)
runInstances_additionalInfo :: Lens' RunInstances (Maybe Text)
runInstances_additionalInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Text
additionalInfo :: Maybe Text
$sel:additionalInfo:RunInstances' :: RunInstances -> Maybe Text
additionalInfo} -> Maybe Text
additionalInfo) (\s :: RunInstances
s@RunInstances' {} Maybe Text
a -> RunInstances
s {$sel:additionalInfo:RunInstances' :: Maybe Text
additionalInfo = Maybe Text
a} :: RunInstances)

-- | The block device mapping, which defines the EBS volumes and instance
-- store volumes to attach to the instance at launch. For more information,
-- see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html Block device mappings>
-- in the /Amazon EC2 User Guide/.
runInstances_blockDeviceMappings :: Lens.Lens' RunInstances (Prelude.Maybe [BlockDeviceMapping])
runInstances_blockDeviceMappings :: Lens' RunInstances (Maybe [BlockDeviceMapping])
runInstances_blockDeviceMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe [BlockDeviceMapping]
blockDeviceMappings :: Maybe [BlockDeviceMapping]
$sel:blockDeviceMappings:RunInstances' :: RunInstances -> Maybe [BlockDeviceMapping]
blockDeviceMappings} -> Maybe [BlockDeviceMapping]
blockDeviceMappings) (\s :: RunInstances
s@RunInstances' {} Maybe [BlockDeviceMapping]
a -> RunInstances
s {$sel:blockDeviceMappings:RunInstances' :: Maybe [BlockDeviceMapping]
blockDeviceMappings = Maybe [BlockDeviceMapping]
a} :: RunInstances) 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

-- | Information about the Capacity Reservation targeting option. If you do
-- not specify this parameter, the instance\'s Capacity Reservation
-- preference defaults to @open@, which enables it to run in any open
-- Capacity Reservation that has matching attributes (instance type,
-- platform, Availability Zone).
runInstances_capacityReservationSpecification :: Lens.Lens' RunInstances (Prelude.Maybe CapacityReservationSpecification)
runInstances_capacityReservationSpecification :: Lens' RunInstances (Maybe CapacityReservationSpecification)
runInstances_capacityReservationSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe CapacityReservationSpecification
capacityReservationSpecification :: Maybe CapacityReservationSpecification
$sel:capacityReservationSpecification:RunInstances' :: RunInstances -> Maybe CapacityReservationSpecification
capacityReservationSpecification} -> Maybe CapacityReservationSpecification
capacityReservationSpecification) (\s :: RunInstances
s@RunInstances' {} Maybe CapacityReservationSpecification
a -> RunInstances
s {$sel:capacityReservationSpecification:RunInstances' :: Maybe CapacityReservationSpecification
capacityReservationSpecification = Maybe CapacityReservationSpecification
a} :: RunInstances)

-- | Unique, case-sensitive identifier you provide to ensure the idempotency
-- of the request. If you do not specify a client token, a randomly
-- generated token is used for the request to ensure idempotency.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html Ensuring Idempotency>.
--
-- Constraints: Maximum 64 ASCII characters
runInstances_clientToken :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Text)
runInstances_clientToken :: Lens' RunInstances (Maybe Text)
runInstances_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:RunInstances' :: RunInstances -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: RunInstances
s@RunInstances' {} Maybe Text
a -> RunInstances
s {$sel:clientToken:RunInstances' :: Maybe Text
clientToken = Maybe Text
a} :: RunInstances)

-- | The CPU options for the instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html Optimize CPU options>
-- in the /Amazon EC2 User Guide/.
runInstances_cpuOptions :: Lens.Lens' RunInstances (Prelude.Maybe CpuOptionsRequest)
runInstances_cpuOptions :: Lens' RunInstances (Maybe CpuOptionsRequest)
runInstances_cpuOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe CpuOptionsRequest
cpuOptions :: Maybe CpuOptionsRequest
$sel:cpuOptions:RunInstances' :: RunInstances -> Maybe CpuOptionsRequest
cpuOptions} -> Maybe CpuOptionsRequest
cpuOptions) (\s :: RunInstances
s@RunInstances' {} Maybe CpuOptionsRequest
a -> RunInstances
s {$sel:cpuOptions:RunInstances' :: Maybe CpuOptionsRequest
cpuOptions = Maybe CpuOptionsRequest
a} :: RunInstances)

-- | The credit option for CPU usage of the burstable performance instance.
-- Valid values are @standard@ and @unlimited@. To change this attribute
-- after launch, use
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html ModifyInstanceCreditSpecification>.
-- For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html Burstable performance instances>
-- in the /Amazon EC2 User Guide/.
--
-- Default: @standard@ (T2 instances) or @unlimited@ (T3\/T3a\/T4g
-- instances)
--
-- For T3 instances with @host@ tenancy, only @standard@ is supported.
runInstances_creditSpecification :: Lens.Lens' RunInstances (Prelude.Maybe CreditSpecificationRequest)
runInstances_creditSpecification :: Lens' RunInstances (Maybe CreditSpecificationRequest)
runInstances_creditSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe CreditSpecificationRequest
creditSpecification :: Maybe CreditSpecificationRequest
$sel:creditSpecification:RunInstances' :: RunInstances -> Maybe CreditSpecificationRequest
creditSpecification} -> Maybe CreditSpecificationRequest
creditSpecification) (\s :: RunInstances
s@RunInstances' {} Maybe CreditSpecificationRequest
a -> RunInstances
s {$sel:creditSpecification:RunInstances' :: Maybe CreditSpecificationRequest
creditSpecification = Maybe CreditSpecificationRequest
a} :: RunInstances)

-- | Indicates whether an instance is enabled for stop protection. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection Stop protection>.
runInstances_disableApiStop :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Bool)
runInstances_disableApiStop :: Lens' RunInstances (Maybe Bool)
runInstances_disableApiStop = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Bool
disableApiStop :: Maybe Bool
$sel:disableApiStop:RunInstances' :: RunInstances -> Maybe Bool
disableApiStop} -> Maybe Bool
disableApiStop) (\s :: RunInstances
s@RunInstances' {} Maybe Bool
a -> RunInstances
s {$sel:disableApiStop:RunInstances' :: Maybe Bool
disableApiStop = Maybe Bool
a} :: RunInstances)

-- | If you set this parameter to @true@, you can\'t terminate the instance
-- using the Amazon EC2 console, CLI, or API; otherwise, you can. To change
-- this attribute after launch, use
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html ModifyInstanceAttribute>.
-- Alternatively, if you set @InstanceInitiatedShutdownBehavior@ to
-- @terminate@, you can terminate the instance by running the shutdown
-- command from the instance.
--
-- Default: @false@
runInstances_disableApiTermination :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Bool)
runInstances_disableApiTermination :: Lens' RunInstances (Maybe Bool)
runInstances_disableApiTermination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Bool
disableApiTermination :: Maybe Bool
$sel:disableApiTermination:RunInstances' :: RunInstances -> Maybe Bool
disableApiTermination} -> Maybe Bool
disableApiTermination) (\s :: RunInstances
s@RunInstances' {} Maybe Bool
a -> RunInstances
s {$sel:disableApiTermination:RunInstances' :: Maybe Bool
disableApiTermination = Maybe Bool
a} :: RunInstances)

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
runInstances_dryRun :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Bool)
runInstances_dryRun :: Lens' RunInstances (Maybe Bool)
runInstances_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:RunInstances' :: RunInstances -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: RunInstances
s@RunInstances' {} Maybe Bool
a -> RunInstances
s {$sel:dryRun:RunInstances' :: Maybe Bool
dryRun = Maybe Bool
a} :: RunInstances)

-- | Indicates whether the instance is optimized for Amazon EBS I\/O. This
-- optimization provides dedicated throughput to Amazon EBS and an
-- optimized configuration stack to provide optimal Amazon 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@
runInstances_ebsOptimized :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Bool)
runInstances_ebsOptimized :: Lens' RunInstances (Maybe Bool)
runInstances_ebsOptimized = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Bool
ebsOptimized :: Maybe Bool
$sel:ebsOptimized:RunInstances' :: RunInstances -> Maybe Bool
ebsOptimized} -> Maybe Bool
ebsOptimized) (\s :: RunInstances
s@RunInstances' {} Maybe Bool
a -> RunInstances
s {$sel:ebsOptimized:RunInstances' :: Maybe Bool
ebsOptimized = Maybe Bool
a} :: RunInstances)

-- | An elastic GPU to associate with the instance. An Elastic GPU is a GPU
-- resource that you can attach to your Windows instance to accelerate the
-- graphics performance of your applications. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html Amazon EC2 Elastic GPUs>
-- in the /Amazon EC2 User Guide/.
runInstances_elasticGpuSpecification :: Lens.Lens' RunInstances (Prelude.Maybe [ElasticGpuSpecification])
runInstances_elasticGpuSpecification :: Lens' RunInstances (Maybe [ElasticGpuSpecification])
runInstances_elasticGpuSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe [ElasticGpuSpecification]
elasticGpuSpecification :: Maybe [ElasticGpuSpecification]
$sel:elasticGpuSpecification:RunInstances' :: RunInstances -> Maybe [ElasticGpuSpecification]
elasticGpuSpecification} -> Maybe [ElasticGpuSpecification]
elasticGpuSpecification) (\s :: RunInstances
s@RunInstances' {} Maybe [ElasticGpuSpecification]
a -> RunInstances
s {$sel:elasticGpuSpecification:RunInstances' :: Maybe [ElasticGpuSpecification]
elasticGpuSpecification = Maybe [ElasticGpuSpecification]
a} :: RunInstances) 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

-- | An elastic inference accelerator to associate with the instance. Elastic
-- inference accelerators are a resource you can attach to your Amazon EC2
-- instances to accelerate your Deep Learning (DL) inference workloads.
--
-- You cannot specify accelerators from different generations in the same
-- request.
runInstances_elasticInferenceAccelerators :: Lens.Lens' RunInstances (Prelude.Maybe [ElasticInferenceAccelerator])
runInstances_elasticInferenceAccelerators :: Lens' RunInstances (Maybe [ElasticInferenceAccelerator])
runInstances_elasticInferenceAccelerators = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe [ElasticInferenceAccelerator]
elasticInferenceAccelerators :: Maybe [ElasticInferenceAccelerator]
$sel:elasticInferenceAccelerators:RunInstances' :: RunInstances -> Maybe [ElasticInferenceAccelerator]
elasticInferenceAccelerators} -> Maybe [ElasticInferenceAccelerator]
elasticInferenceAccelerators) (\s :: RunInstances
s@RunInstances' {} Maybe [ElasticInferenceAccelerator]
a -> RunInstances
s {$sel:elasticInferenceAccelerators:RunInstances' :: Maybe [ElasticInferenceAccelerator]
elasticInferenceAccelerators = Maybe [ElasticInferenceAccelerator]
a} :: RunInstances) 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 instance is enabled for Amazon Web Services Nitro
-- Enclaves. For more information, see
-- <https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html What is Amazon Web Services Nitro Enclaves?>
-- in the /Amazon Web Services Nitro Enclaves User Guide/.
--
-- You can\'t enable Amazon Web Services Nitro Enclaves and hibernation on
-- the same instance.
runInstances_enclaveOptions :: Lens.Lens' RunInstances (Prelude.Maybe EnclaveOptionsRequest)
runInstances_enclaveOptions :: Lens' RunInstances (Maybe EnclaveOptionsRequest)
runInstances_enclaveOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe EnclaveOptionsRequest
enclaveOptions :: Maybe EnclaveOptionsRequest
$sel:enclaveOptions:RunInstances' :: RunInstances -> Maybe EnclaveOptionsRequest
enclaveOptions} -> Maybe EnclaveOptionsRequest
enclaveOptions) (\s :: RunInstances
s@RunInstances' {} Maybe EnclaveOptionsRequest
a -> RunInstances
s {$sel:enclaveOptions:RunInstances' :: Maybe EnclaveOptionsRequest
enclaveOptions = Maybe EnclaveOptionsRequest
a} :: RunInstances)

-- | Indicates whether an instance is enabled for hibernation. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html Hibernate your instance>
-- in the /Amazon EC2 User Guide/.
--
-- You can\'t enable hibernation and Amazon Web Services Nitro Enclaves on
-- the same instance.
runInstances_hibernationOptions :: Lens.Lens' RunInstances (Prelude.Maybe HibernationOptionsRequest)
runInstances_hibernationOptions :: Lens' RunInstances (Maybe HibernationOptionsRequest)
runInstances_hibernationOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe HibernationOptionsRequest
hibernationOptions :: Maybe HibernationOptionsRequest
$sel:hibernationOptions:RunInstances' :: RunInstances -> Maybe HibernationOptionsRequest
hibernationOptions} -> Maybe HibernationOptionsRequest
hibernationOptions) (\s :: RunInstances
s@RunInstances' {} Maybe HibernationOptionsRequest
a -> RunInstances
s {$sel:hibernationOptions:RunInstances' :: Maybe HibernationOptionsRequest
hibernationOptions = Maybe HibernationOptionsRequest
a} :: RunInstances)

-- | The name or Amazon Resource Name (ARN) of an IAM instance profile.
runInstances_iamInstanceProfile :: Lens.Lens' RunInstances (Prelude.Maybe IamInstanceProfileSpecification)
runInstances_iamInstanceProfile :: Lens' RunInstances (Maybe IamInstanceProfileSpecification)
runInstances_iamInstanceProfile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe IamInstanceProfileSpecification
iamInstanceProfile :: Maybe IamInstanceProfileSpecification
$sel:iamInstanceProfile:RunInstances' :: RunInstances -> Maybe IamInstanceProfileSpecification
iamInstanceProfile} -> Maybe IamInstanceProfileSpecification
iamInstanceProfile) (\s :: RunInstances
s@RunInstances' {} Maybe IamInstanceProfileSpecification
a -> RunInstances
s {$sel:iamInstanceProfile:RunInstances' :: Maybe IamInstanceProfileSpecification
iamInstanceProfile = Maybe IamInstanceProfileSpecification
a} :: RunInstances)

-- | The ID of the AMI. An AMI ID is required to launch an instance and must
-- be specified here or in a launch template.
runInstances_imageId :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Text)
runInstances_imageId :: Lens' RunInstances (Maybe Text)
runInstances_imageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Text
imageId :: Maybe Text
$sel:imageId:RunInstances' :: RunInstances -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: RunInstances
s@RunInstances' {} Maybe Text
a -> RunInstances
s {$sel:imageId:RunInstances' :: Maybe Text
imageId = Maybe Text
a} :: RunInstances)

-- | Indicates whether an instance stops or terminates when you initiate
-- shutdown from the instance (using the operating system command for
-- system shutdown).
--
-- Default: @stop@
runInstances_instanceInitiatedShutdownBehavior :: Lens.Lens' RunInstances (Prelude.Maybe ShutdownBehavior)
runInstances_instanceInitiatedShutdownBehavior :: Lens' RunInstances (Maybe ShutdownBehavior)
runInstances_instanceInitiatedShutdownBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe ShutdownBehavior
instanceInitiatedShutdownBehavior :: Maybe ShutdownBehavior
$sel:instanceInitiatedShutdownBehavior:RunInstances' :: RunInstances -> Maybe ShutdownBehavior
instanceInitiatedShutdownBehavior} -> Maybe ShutdownBehavior
instanceInitiatedShutdownBehavior) (\s :: RunInstances
s@RunInstances' {} Maybe ShutdownBehavior
a -> RunInstances
s {$sel:instanceInitiatedShutdownBehavior:RunInstances' :: Maybe ShutdownBehavior
instanceInitiatedShutdownBehavior = Maybe ShutdownBehavior
a} :: RunInstances)

-- | The market (purchasing) option for the instances.
--
-- For RunInstances, persistent Spot Instance requests are only supported
-- when __InstanceInterruptionBehavior__ is set to either @hibernate@ or
-- @stop@.
runInstances_instanceMarketOptions :: Lens.Lens' RunInstances (Prelude.Maybe InstanceMarketOptionsRequest)
runInstances_instanceMarketOptions :: Lens' RunInstances (Maybe InstanceMarketOptionsRequest)
runInstances_instanceMarketOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe InstanceMarketOptionsRequest
instanceMarketOptions :: Maybe InstanceMarketOptionsRequest
$sel:instanceMarketOptions:RunInstances' :: RunInstances -> Maybe InstanceMarketOptionsRequest
instanceMarketOptions} -> Maybe InstanceMarketOptionsRequest
instanceMarketOptions) (\s :: RunInstances
s@RunInstances' {} Maybe InstanceMarketOptionsRequest
a -> RunInstances
s {$sel:instanceMarketOptions:RunInstances' :: Maybe InstanceMarketOptionsRequest
instanceMarketOptions = Maybe InstanceMarketOptionsRequest
a} :: RunInstances)

-- | The instance type. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Instance types>
-- in the /Amazon EC2 User Guide/.
--
-- Default: @m1.small@
runInstances_instanceType :: Lens.Lens' RunInstances (Prelude.Maybe InstanceType)
runInstances_instanceType :: Lens' RunInstances (Maybe InstanceType)
runInstances_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe InstanceType
instanceType :: Maybe InstanceType
$sel:instanceType:RunInstances' :: RunInstances -> Maybe InstanceType
instanceType} -> Maybe InstanceType
instanceType) (\s :: RunInstances
s@RunInstances' {} Maybe InstanceType
a -> RunInstances
s {$sel:instanceType:RunInstances' :: Maybe InstanceType
instanceType = Maybe InstanceType
a} :: RunInstances)

-- | [EC2-VPC] The number of IPv6 addresses to associate with the primary
-- network interface. Amazon EC2 chooses the IPv6 addresses from the range
-- of your subnet. You cannot specify this option and the option to assign
-- specific IPv6 addresses in the same request. You can specify this option
-- if you\'ve specified a minimum number of instances to launch.
--
-- You cannot specify this option and the network interfaces option in the
-- same request.
runInstances_ipv6AddressCount :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Int)
runInstances_ipv6AddressCount :: Lens' RunInstances (Maybe Int)
runInstances_ipv6AddressCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Int
ipv6AddressCount :: Maybe Int
$sel:ipv6AddressCount:RunInstances' :: RunInstances -> Maybe Int
ipv6AddressCount} -> Maybe Int
ipv6AddressCount) (\s :: RunInstances
s@RunInstances' {} Maybe Int
a -> RunInstances
s {$sel:ipv6AddressCount:RunInstances' :: Maybe Int
ipv6AddressCount = Maybe Int
a} :: RunInstances)

-- | [EC2-VPC] The IPv6 addresses from the range of the subnet to associate
-- with the primary network interface. You cannot specify this option and
-- the option to assign a number of IPv6 addresses in the same request. You
-- cannot specify this option if you\'ve specified a minimum number of
-- instances to launch.
--
-- You cannot specify this option and the network interfaces option in the
-- same request.
runInstances_ipv6Addresses :: Lens.Lens' RunInstances (Prelude.Maybe [InstanceIpv6Address])
runInstances_ipv6Addresses :: Lens' RunInstances (Maybe [InstanceIpv6Address])
runInstances_ipv6Addresses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe [InstanceIpv6Address]
ipv6Addresses :: Maybe [InstanceIpv6Address]
$sel:ipv6Addresses:RunInstances' :: RunInstances -> Maybe [InstanceIpv6Address]
ipv6Addresses} -> Maybe [InstanceIpv6Address]
ipv6Addresses) (\s :: RunInstances
s@RunInstances' {} Maybe [InstanceIpv6Address]
a -> RunInstances
s {$sel:ipv6Addresses:RunInstances' :: Maybe [InstanceIpv6Address]
ipv6Addresses = Maybe [InstanceIpv6Address]
a} :: RunInstances) 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 kernel.
--
-- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html PV-GRUB>
-- in the /Amazon EC2 User Guide/.
runInstances_kernelId :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Text)
runInstances_kernelId :: Lens' RunInstances (Maybe Text)
runInstances_kernelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Text
kernelId :: Maybe Text
$sel:kernelId:RunInstances' :: RunInstances -> Maybe Text
kernelId} -> Maybe Text
kernelId) (\s :: RunInstances
s@RunInstances' {} Maybe Text
a -> RunInstances
s {$sel:kernelId:RunInstances' :: Maybe Text
kernelId = Maybe Text
a} :: RunInstances)

-- | The name of the key pair. You can create a key pair using
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html CreateKeyPair>
-- or
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html ImportKeyPair>.
--
-- If you do not specify a key pair, you can\'t connect to the instance
-- unless you choose an AMI that is configured to allow users another way
-- to log in.
runInstances_keyName :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Text)
runInstances_keyName :: Lens' RunInstances (Maybe Text)
runInstances_keyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Text
keyName :: Maybe Text
$sel:keyName:RunInstances' :: RunInstances -> Maybe Text
keyName} -> Maybe Text
keyName) (\s :: RunInstances
s@RunInstances' {} Maybe Text
a -> RunInstances
s {$sel:keyName:RunInstances' :: Maybe Text
keyName = Maybe Text
a} :: RunInstances)

-- | The launch template to use to launch the instances. Any parameters that
-- you specify in RunInstances override the same parameters in the launch
-- template. You can specify either the name or ID of a launch template,
-- but not both.
runInstances_launchTemplate :: Lens.Lens' RunInstances (Prelude.Maybe LaunchTemplateSpecification)
runInstances_launchTemplate :: Lens' RunInstances (Maybe LaunchTemplateSpecification)
runInstances_launchTemplate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe LaunchTemplateSpecification
launchTemplate :: Maybe LaunchTemplateSpecification
$sel:launchTemplate:RunInstances' :: RunInstances -> Maybe LaunchTemplateSpecification
launchTemplate} -> Maybe LaunchTemplateSpecification
launchTemplate) (\s :: RunInstances
s@RunInstances' {} Maybe LaunchTemplateSpecification
a -> RunInstances
s {$sel:launchTemplate:RunInstances' :: Maybe LaunchTemplateSpecification
launchTemplate = Maybe LaunchTemplateSpecification
a} :: RunInstances)

-- | The license configurations.
runInstances_licenseSpecifications :: Lens.Lens' RunInstances (Prelude.Maybe [LicenseConfigurationRequest])
runInstances_licenseSpecifications :: Lens' RunInstances (Maybe [LicenseConfigurationRequest])
runInstances_licenseSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe [LicenseConfigurationRequest]
licenseSpecifications :: Maybe [LicenseConfigurationRequest]
$sel:licenseSpecifications:RunInstances' :: RunInstances -> Maybe [LicenseConfigurationRequest]
licenseSpecifications} -> Maybe [LicenseConfigurationRequest]
licenseSpecifications) (\s :: RunInstances
s@RunInstances' {} Maybe [LicenseConfigurationRequest]
a -> RunInstances
s {$sel:licenseSpecifications:RunInstances' :: Maybe [LicenseConfigurationRequest]
licenseSpecifications = Maybe [LicenseConfigurationRequest]
a} :: RunInstances) 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 maintenance and recovery options for the instance.
runInstances_maintenanceOptions :: Lens.Lens' RunInstances (Prelude.Maybe InstanceMaintenanceOptionsRequest)
runInstances_maintenanceOptions :: Lens' RunInstances (Maybe InstanceMaintenanceOptionsRequest)
runInstances_maintenanceOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe InstanceMaintenanceOptionsRequest
maintenanceOptions :: Maybe InstanceMaintenanceOptionsRequest
$sel:maintenanceOptions:RunInstances' :: RunInstances -> Maybe InstanceMaintenanceOptionsRequest
maintenanceOptions} -> Maybe InstanceMaintenanceOptionsRequest
maintenanceOptions) (\s :: RunInstances
s@RunInstances' {} Maybe InstanceMaintenanceOptionsRequest
a -> RunInstances
s {$sel:maintenanceOptions:RunInstances' :: Maybe InstanceMaintenanceOptionsRequest
maintenanceOptions = Maybe InstanceMaintenanceOptionsRequest
a} :: RunInstances)

-- | The metadata options for the instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html Instance metadata and user data>.
runInstances_metadataOptions :: Lens.Lens' RunInstances (Prelude.Maybe InstanceMetadataOptionsRequest)
runInstances_metadataOptions :: Lens' RunInstances (Maybe InstanceMetadataOptionsRequest)
runInstances_metadataOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe InstanceMetadataOptionsRequest
metadataOptions :: Maybe InstanceMetadataOptionsRequest
$sel:metadataOptions:RunInstances' :: RunInstances -> Maybe InstanceMetadataOptionsRequest
metadataOptions} -> Maybe InstanceMetadataOptionsRequest
metadataOptions) (\s :: RunInstances
s@RunInstances' {} Maybe InstanceMetadataOptionsRequest
a -> RunInstances
s {$sel:metadataOptions:RunInstances' :: Maybe InstanceMetadataOptionsRequest
metadataOptions = Maybe InstanceMetadataOptionsRequest
a} :: RunInstances)

-- | Specifies whether detailed monitoring is enabled for the instance.
runInstances_monitoring :: Lens.Lens' RunInstances (Prelude.Maybe RunInstancesMonitoringEnabled)
runInstances_monitoring :: Lens' RunInstances (Maybe RunInstancesMonitoringEnabled)
runInstances_monitoring = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe RunInstancesMonitoringEnabled
monitoring :: Maybe RunInstancesMonitoringEnabled
$sel:monitoring:RunInstances' :: RunInstances -> Maybe RunInstancesMonitoringEnabled
monitoring} -> Maybe RunInstancesMonitoringEnabled
monitoring) (\s :: RunInstances
s@RunInstances' {} Maybe RunInstancesMonitoringEnabled
a -> RunInstances
s {$sel:monitoring:RunInstances' :: Maybe RunInstancesMonitoringEnabled
monitoring = Maybe RunInstancesMonitoringEnabled
a} :: RunInstances)

-- | The network interfaces to associate with the instance. If you specify a
-- network interface, you must specify any security groups and subnets as
-- part of the network interface.
runInstances_networkInterfaces :: Lens.Lens' RunInstances (Prelude.Maybe [InstanceNetworkInterfaceSpecification])
runInstances_networkInterfaces :: Lens' RunInstances (Maybe [InstanceNetworkInterfaceSpecification])
runInstances_networkInterfaces = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe [InstanceNetworkInterfaceSpecification]
networkInterfaces :: Maybe [InstanceNetworkInterfaceSpecification]
$sel:networkInterfaces:RunInstances' :: RunInstances -> Maybe [InstanceNetworkInterfaceSpecification]
networkInterfaces} -> Maybe [InstanceNetworkInterfaceSpecification]
networkInterfaces) (\s :: RunInstances
s@RunInstances' {} Maybe [InstanceNetworkInterfaceSpecification]
a -> RunInstances
s {$sel:networkInterfaces:RunInstances' :: Maybe [InstanceNetworkInterfaceSpecification]
networkInterfaces = Maybe [InstanceNetworkInterfaceSpecification]
a} :: RunInstances) 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 for the instance.
runInstances_placement :: Lens.Lens' RunInstances (Prelude.Maybe Placement)
runInstances_placement :: Lens' RunInstances (Maybe Placement)
runInstances_placement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Placement
placement :: Maybe Placement
$sel:placement:RunInstances' :: RunInstances -> Maybe Placement
placement} -> Maybe Placement
placement) (\s :: RunInstances
s@RunInstances' {} Maybe Placement
a -> RunInstances
s {$sel:placement:RunInstances' :: Maybe Placement
placement = Maybe Placement
a} :: RunInstances)

-- | The options for the instance hostname. The default values are inherited
-- from the subnet.
runInstances_privateDnsNameOptions :: Lens.Lens' RunInstances (Prelude.Maybe PrivateDnsNameOptionsRequest)
runInstances_privateDnsNameOptions :: Lens' RunInstances (Maybe PrivateDnsNameOptionsRequest)
runInstances_privateDnsNameOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe PrivateDnsNameOptionsRequest
privateDnsNameOptions :: Maybe PrivateDnsNameOptionsRequest
$sel:privateDnsNameOptions:RunInstances' :: RunInstances -> Maybe PrivateDnsNameOptionsRequest
privateDnsNameOptions} -> Maybe PrivateDnsNameOptionsRequest
privateDnsNameOptions) (\s :: RunInstances
s@RunInstances' {} Maybe PrivateDnsNameOptionsRequest
a -> RunInstances
s {$sel:privateDnsNameOptions:RunInstances' :: Maybe PrivateDnsNameOptionsRequest
privateDnsNameOptions = Maybe PrivateDnsNameOptionsRequest
a} :: RunInstances)

-- | [EC2-VPC] The primary IPv4 address. You must specify a value from the
-- IPv4 address range of the subnet.
--
-- Only one private IP address can be designated as primary. You can\'t
-- specify this option if you\'ve specified the option to designate a
-- private IP address as the primary IP address in a network interface
-- specification. You cannot specify this option if you\'re launching more
-- than one instance in the request.
--
-- You cannot specify this option and the network interfaces option in the
-- same request.
runInstances_privateIpAddress :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Text)
runInstances_privateIpAddress :: Lens' RunInstances (Maybe Text)
runInstances_privateIpAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Text
privateIpAddress :: Maybe Text
$sel:privateIpAddress:RunInstances' :: RunInstances -> Maybe Text
privateIpAddress} -> Maybe Text
privateIpAddress) (\s :: RunInstances
s@RunInstances' {} Maybe Text
a -> RunInstances
s {$sel:privateIpAddress:RunInstances' :: Maybe Text
privateIpAddress = Maybe Text
a} :: RunInstances)

-- | The ID of the RAM disk to select. Some kernels require additional
-- drivers at launch. Check the kernel requirements for information about
-- whether you need to specify a RAM disk. To find kernel requirements, go
-- to the Amazon Web Services Resource Center and search for the kernel ID.
--
-- We recommend that you use PV-GRUB instead of kernels and RAM disks. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html PV-GRUB>
-- in the /Amazon EC2 User Guide/.
runInstances_ramdiskId :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Text)
runInstances_ramdiskId :: Lens' RunInstances (Maybe Text)
runInstances_ramdiskId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Text
ramdiskId :: Maybe Text
$sel:ramdiskId:RunInstances' :: RunInstances -> Maybe Text
ramdiskId} -> Maybe Text
ramdiskId) (\s :: RunInstances
s@RunInstances' {} Maybe Text
a -> RunInstances
s {$sel:ramdiskId:RunInstances' :: Maybe Text
ramdiskId = Maybe Text
a} :: RunInstances)

-- | The IDs of the security groups. You can create a security group using
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html CreateSecurityGroup>.
--
-- If you specify a network interface, you must specify any security groups
-- as part of the network interface.
runInstances_securityGroupIds :: Lens.Lens' RunInstances (Prelude.Maybe [Prelude.Text])
runInstances_securityGroupIds :: Lens' RunInstances (Maybe [Text])
runInstances_securityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:RunInstances' :: RunInstances -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: RunInstances
s@RunInstances' {} Maybe [Text]
a -> RunInstances
s {$sel:securityGroupIds:RunInstances' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: RunInstances) 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

-- | [EC2-Classic, default VPC] The names of the security groups. For a
-- nondefault VPC, you must use security group IDs instead.
--
-- If you specify a network interface, you must specify any security groups
-- as part of the network interface.
--
-- Default: Amazon EC2 uses the default security group.
runInstances_securityGroups :: Lens.Lens' RunInstances (Prelude.Maybe [Prelude.Text])
runInstances_securityGroups :: Lens' RunInstances (Maybe [Text])
runInstances_securityGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe [Text]
securityGroups :: Maybe [Text]
$sel:securityGroups:RunInstances' :: RunInstances -> Maybe [Text]
securityGroups} -> Maybe [Text]
securityGroups) (\s :: RunInstances
s@RunInstances' {} Maybe [Text]
a -> RunInstances
s {$sel:securityGroups:RunInstances' :: Maybe [Text]
securityGroups = Maybe [Text]
a} :: RunInstances) 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

-- | [EC2-VPC] The ID of the subnet to launch the instance into.
--
-- If you specify a network interface, you must specify any subnets as part
-- of the network interface.
runInstances_subnetId :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Text)
runInstances_subnetId :: Lens' RunInstances (Maybe Text)
runInstances_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:RunInstances' :: RunInstances -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: RunInstances
s@RunInstances' {} Maybe Text
a -> RunInstances
s {$sel:subnetId:RunInstances' :: Maybe Text
subnetId = Maybe Text
a} :: RunInstances)

-- | The tags to apply to the resources that are created during instance
-- launch.
--
-- You can specify tags for the following resources only:
--
-- -   Instances
--
-- -   Volumes
--
-- -   Elastic graphics
--
-- -   Spot Instance requests
--
-- -   Network interfaces
--
-- To tag a resource after it has been created, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html CreateTags>.
runInstances_tagSpecifications :: Lens.Lens' RunInstances (Prelude.Maybe [TagSpecification])
runInstances_tagSpecifications :: Lens' RunInstances (Maybe [TagSpecification])
runInstances_tagSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe [TagSpecification]
tagSpecifications :: Maybe [TagSpecification]
$sel:tagSpecifications:RunInstances' :: RunInstances -> Maybe [TagSpecification]
tagSpecifications} -> Maybe [TagSpecification]
tagSpecifications) (\s :: RunInstances
s@RunInstances' {} Maybe [TagSpecification]
a -> RunInstances
s {$sel:tagSpecifications:RunInstances' :: Maybe [TagSpecification]
tagSpecifications = Maybe [TagSpecification]
a} :: RunInstances) 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 user data script to make available to the instance. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html Run commands on your Linux instance at launch>
-- and
-- <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html Run commands on your Windows instance at launch>.
-- 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.
runInstances_userData :: Lens.Lens' RunInstances (Prelude.Maybe Prelude.Text)
runInstances_userData :: Lens' RunInstances (Maybe Text)
runInstances_userData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Maybe (Sensitive Text)
userData :: Maybe (Sensitive Text)
$sel:userData:RunInstances' :: RunInstances -> Maybe (Sensitive Text)
userData} -> Maybe (Sensitive Text)
userData) (\s :: RunInstances
s@RunInstances' {} Maybe (Sensitive Text)
a -> RunInstances
s {$sel:userData:RunInstances' :: Maybe (Sensitive Text)
userData = Maybe (Sensitive Text)
a} :: RunInstances) 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 a. Iso' (Sensitive a) a
Data._Sensitive

-- | The maximum number of instances to launch. If you specify more instances
-- than Amazon EC2 can launch in the target Availability Zone, Amazon EC2
-- launches the largest possible number of instances above @MinCount@.
--
-- Constraints: Between 1 and the maximum number you\'re allowed for the
-- specified instance type. For more information about the default limits,
-- and how to request an increase, see
-- <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2 How many instances can I run in Amazon EC2>
-- in the Amazon EC2 FAQ.
runInstances_maxCount :: Lens.Lens' RunInstances Prelude.Int
runInstances_maxCount :: Lens' RunInstances Int
runInstances_maxCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Int
maxCount :: Int
$sel:maxCount:RunInstances' :: RunInstances -> Int
maxCount} -> Int
maxCount) (\s :: RunInstances
s@RunInstances' {} Int
a -> RunInstances
s {$sel:maxCount:RunInstances' :: Int
maxCount = Int
a} :: RunInstances)

-- | The minimum number of instances to launch. If you specify a minimum that
-- is more instances than Amazon EC2 can launch in the target Availability
-- Zone, Amazon EC2 launches no instances.
--
-- Constraints: Between 1 and the maximum number you\'re allowed for the
-- specified instance type. For more information about the default limits,
-- and how to request an increase, see
-- <http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2 How many instances can I run in Amazon EC2>
-- in the Amazon EC2 General FAQ.
runInstances_minCount :: Lens.Lens' RunInstances Prelude.Int
runInstances_minCount :: Lens' RunInstances Int
runInstances_minCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunInstances' {Int
minCount :: Int
$sel:minCount:RunInstances' :: RunInstances -> Int
minCount} -> Int
minCount) (\s :: RunInstances
s@RunInstances' {} Int
a -> RunInstances
s {$sel:minCount:RunInstances' :: Int
minCount = Int
a} :: RunInstances)

instance Core.AWSRequest RunInstances where
  type AWSResponse RunInstances = Reservation
  request :: (Service -> Service) -> RunInstances -> Request RunInstances
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RunInstances
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RunInstances)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML (\Int
s ResponseHeaders
h [Node]
x -> forall a. FromXML a => [Node] -> Either String a
Data.parseXML [Node]
x)

instance Prelude.Hashable RunInstances where
  hashWithSalt :: Int -> RunInstances -> Int
hashWithSalt Int
_salt RunInstances' {Int
Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ElasticGpuSpecification]
Maybe [ElasticInferenceAccelerator]
Maybe [InstanceIpv6Address]
Maybe [LicenseConfigurationRequest]
Maybe [InstanceNetworkInterfaceSpecification]
Maybe [TagSpecification]
Maybe [BlockDeviceMapping]
Maybe Text
Maybe (Sensitive Text)
Maybe CapacityReservationSpecification
Maybe CpuOptionsRequest
Maybe CreditSpecificationRequest
Maybe EnclaveOptionsRequest
Maybe HibernationOptionsRequest
Maybe IamInstanceProfileSpecification
Maybe InstanceMaintenanceOptionsRequest
Maybe InstanceMetadataOptionsRequest
Maybe InstanceType
Maybe LaunchTemplateSpecification
Maybe PrivateDnsNameOptionsRequest
Maybe RunInstancesMonitoringEnabled
Maybe ShutdownBehavior
Maybe InstanceMarketOptionsRequest
Maybe Placement
minCount :: Int
maxCount :: Int
userData :: Maybe (Sensitive Text)
tagSpecifications :: Maybe [TagSpecification]
subnetId :: Maybe Text
securityGroups :: Maybe [Text]
securityGroupIds :: Maybe [Text]
ramdiskId :: Maybe Text
privateIpAddress :: Maybe Text
privateDnsNameOptions :: Maybe PrivateDnsNameOptionsRequest
placement :: Maybe Placement
networkInterfaces :: Maybe [InstanceNetworkInterfaceSpecification]
monitoring :: Maybe RunInstancesMonitoringEnabled
metadataOptions :: Maybe InstanceMetadataOptionsRequest
maintenanceOptions :: Maybe InstanceMaintenanceOptionsRequest
licenseSpecifications :: Maybe [LicenseConfigurationRequest]
launchTemplate :: Maybe LaunchTemplateSpecification
keyName :: Maybe Text
kernelId :: Maybe Text
ipv6Addresses :: Maybe [InstanceIpv6Address]
ipv6AddressCount :: Maybe Int
instanceType :: Maybe InstanceType
instanceMarketOptions :: Maybe InstanceMarketOptionsRequest
instanceInitiatedShutdownBehavior :: Maybe ShutdownBehavior
imageId :: Maybe Text
iamInstanceProfile :: Maybe IamInstanceProfileSpecification
hibernationOptions :: Maybe HibernationOptionsRequest
enclaveOptions :: Maybe EnclaveOptionsRequest
elasticInferenceAccelerators :: Maybe [ElasticInferenceAccelerator]
elasticGpuSpecification :: Maybe [ElasticGpuSpecification]
ebsOptimized :: Maybe Bool
dryRun :: Maybe Bool
disableApiTermination :: Maybe Bool
disableApiStop :: Maybe Bool
creditSpecification :: Maybe CreditSpecificationRequest
cpuOptions :: Maybe CpuOptionsRequest
clientToken :: Maybe Text
capacityReservationSpecification :: Maybe CapacityReservationSpecification
blockDeviceMappings :: Maybe [BlockDeviceMapping]
additionalInfo :: Maybe Text
$sel:minCount:RunInstances' :: RunInstances -> Int
$sel:maxCount:RunInstances' :: RunInstances -> Int
$sel:userData:RunInstances' :: RunInstances -> Maybe (Sensitive Text)
$sel:tagSpecifications:RunInstances' :: RunInstances -> Maybe [TagSpecification]
$sel:subnetId:RunInstances' :: RunInstances -> Maybe Text
$sel:securityGroups:RunInstances' :: RunInstances -> Maybe [Text]
$sel:securityGroupIds:RunInstances' :: RunInstances -> Maybe [Text]
$sel:ramdiskId:RunInstances' :: RunInstances -> Maybe Text
$sel:privateIpAddress:RunInstances' :: RunInstances -> Maybe Text
$sel:privateDnsNameOptions:RunInstances' :: RunInstances -> Maybe PrivateDnsNameOptionsRequest
$sel:placement:RunInstances' :: RunInstances -> Maybe Placement
$sel:networkInterfaces:RunInstances' :: RunInstances -> Maybe [InstanceNetworkInterfaceSpecification]
$sel:monitoring:RunInstances' :: RunInstances -> Maybe RunInstancesMonitoringEnabled
$sel:metadataOptions:RunInstances' :: RunInstances -> Maybe InstanceMetadataOptionsRequest
$sel:maintenanceOptions:RunInstances' :: RunInstances -> Maybe InstanceMaintenanceOptionsRequest
$sel:licenseSpecifications:RunInstances' :: RunInstances -> Maybe [LicenseConfigurationRequest]
$sel:launchTemplate:RunInstances' :: RunInstances -> Maybe LaunchTemplateSpecification
$sel:keyName:RunInstances' :: RunInstances -> Maybe Text
$sel:kernelId:RunInstances' :: RunInstances -> Maybe Text
$sel:ipv6Addresses:RunInstances' :: RunInstances -> Maybe [InstanceIpv6Address]
$sel:ipv6AddressCount:RunInstances' :: RunInstances -> Maybe Int
$sel:instanceType:RunInstances' :: RunInstances -> Maybe InstanceType
$sel:instanceMarketOptions:RunInstances' :: RunInstances -> Maybe InstanceMarketOptionsRequest
$sel:instanceInitiatedShutdownBehavior:RunInstances' :: RunInstances -> Maybe ShutdownBehavior
$sel:imageId:RunInstances' :: RunInstances -> Maybe Text
$sel:iamInstanceProfile:RunInstances' :: RunInstances -> Maybe IamInstanceProfileSpecification
$sel:hibernationOptions:RunInstances' :: RunInstances -> Maybe HibernationOptionsRequest
$sel:enclaveOptions:RunInstances' :: RunInstances -> Maybe EnclaveOptionsRequest
$sel:elasticInferenceAccelerators:RunInstances' :: RunInstances -> Maybe [ElasticInferenceAccelerator]
$sel:elasticGpuSpecification:RunInstances' :: RunInstances -> Maybe [ElasticGpuSpecification]
$sel:ebsOptimized:RunInstances' :: RunInstances -> Maybe Bool
$sel:dryRun:RunInstances' :: RunInstances -> Maybe Bool
$sel:disableApiTermination:RunInstances' :: RunInstances -> Maybe Bool
$sel:disableApiStop:RunInstances' :: RunInstances -> Maybe Bool
$sel:creditSpecification:RunInstances' :: RunInstances -> Maybe CreditSpecificationRequest
$sel:cpuOptions:RunInstances' :: RunInstances -> Maybe CpuOptionsRequest
$sel:clientToken:RunInstances' :: RunInstances -> Maybe Text
$sel:capacityReservationSpecification:RunInstances' :: RunInstances -> Maybe CapacityReservationSpecification
$sel:blockDeviceMappings:RunInstances' :: RunInstances -> Maybe [BlockDeviceMapping]
$sel:additionalInfo:RunInstances' :: RunInstances -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
additionalInfo
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [BlockDeviceMapping]
blockDeviceMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CapacityReservationSpecification
capacityReservationSpecification
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CpuOptionsRequest
cpuOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CreditSpecificationRequest
creditSpecification
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableApiStop
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableApiTermination
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
ebsOptimized
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ElasticGpuSpecification]
elasticGpuSpecification
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ElasticInferenceAccelerator]
elasticInferenceAccelerators
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EnclaveOptionsRequest
enclaveOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HibernationOptionsRequest
hibernationOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IamInstanceProfileSpecification
iamInstanceProfile
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ShutdownBehavior
instanceInitiatedShutdownBehavior
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceMarketOptionsRequest
instanceMarketOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceType
instanceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
ipv6AddressCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InstanceIpv6Address]
ipv6Addresses
      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 LaunchTemplateSpecification
launchTemplate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [LicenseConfigurationRequest]
licenseSpecifications
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceMaintenanceOptionsRequest
maintenanceOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceMetadataOptionsRequest
metadataOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RunInstancesMonitoringEnabled
monitoring
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InstanceNetworkInterfaceSpecification]
networkInterfaces
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Placement
placement
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PrivateDnsNameOptionsRequest
privateDnsNameOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
privateIpAddress
      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]
securityGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [TagSpecification]
tagSpecifications
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
userData
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
maxCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
minCount

instance Prelude.NFData RunInstances where
  rnf :: RunInstances -> ()
rnf RunInstances' {Int
Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ElasticGpuSpecification]
Maybe [ElasticInferenceAccelerator]
Maybe [InstanceIpv6Address]
Maybe [LicenseConfigurationRequest]
Maybe [InstanceNetworkInterfaceSpecification]
Maybe [TagSpecification]
Maybe [BlockDeviceMapping]
Maybe Text
Maybe (Sensitive Text)
Maybe CapacityReservationSpecification
Maybe CpuOptionsRequest
Maybe CreditSpecificationRequest
Maybe EnclaveOptionsRequest
Maybe HibernationOptionsRequest
Maybe IamInstanceProfileSpecification
Maybe InstanceMaintenanceOptionsRequest
Maybe InstanceMetadataOptionsRequest
Maybe InstanceType
Maybe LaunchTemplateSpecification
Maybe PrivateDnsNameOptionsRequest
Maybe RunInstancesMonitoringEnabled
Maybe ShutdownBehavior
Maybe InstanceMarketOptionsRequest
Maybe Placement
minCount :: Int
maxCount :: Int
userData :: Maybe (Sensitive Text)
tagSpecifications :: Maybe [TagSpecification]
subnetId :: Maybe Text
securityGroups :: Maybe [Text]
securityGroupIds :: Maybe [Text]
ramdiskId :: Maybe Text
privateIpAddress :: Maybe Text
privateDnsNameOptions :: Maybe PrivateDnsNameOptionsRequest
placement :: Maybe Placement
networkInterfaces :: Maybe [InstanceNetworkInterfaceSpecification]
monitoring :: Maybe RunInstancesMonitoringEnabled
metadataOptions :: Maybe InstanceMetadataOptionsRequest
maintenanceOptions :: Maybe InstanceMaintenanceOptionsRequest
licenseSpecifications :: Maybe [LicenseConfigurationRequest]
launchTemplate :: Maybe LaunchTemplateSpecification
keyName :: Maybe Text
kernelId :: Maybe Text
ipv6Addresses :: Maybe [InstanceIpv6Address]
ipv6AddressCount :: Maybe Int
instanceType :: Maybe InstanceType
instanceMarketOptions :: Maybe InstanceMarketOptionsRequest
instanceInitiatedShutdownBehavior :: Maybe ShutdownBehavior
imageId :: Maybe Text
iamInstanceProfile :: Maybe IamInstanceProfileSpecification
hibernationOptions :: Maybe HibernationOptionsRequest
enclaveOptions :: Maybe EnclaveOptionsRequest
elasticInferenceAccelerators :: Maybe [ElasticInferenceAccelerator]
elasticGpuSpecification :: Maybe [ElasticGpuSpecification]
ebsOptimized :: Maybe Bool
dryRun :: Maybe Bool
disableApiTermination :: Maybe Bool
disableApiStop :: Maybe Bool
creditSpecification :: Maybe CreditSpecificationRequest
cpuOptions :: Maybe CpuOptionsRequest
clientToken :: Maybe Text
capacityReservationSpecification :: Maybe CapacityReservationSpecification
blockDeviceMappings :: Maybe [BlockDeviceMapping]
additionalInfo :: Maybe Text
$sel:minCount:RunInstances' :: RunInstances -> Int
$sel:maxCount:RunInstances' :: RunInstances -> Int
$sel:userData:RunInstances' :: RunInstances -> Maybe (Sensitive Text)
$sel:tagSpecifications:RunInstances' :: RunInstances -> Maybe [TagSpecification]
$sel:subnetId:RunInstances' :: RunInstances -> Maybe Text
$sel:securityGroups:RunInstances' :: RunInstances -> Maybe [Text]
$sel:securityGroupIds:RunInstances' :: RunInstances -> Maybe [Text]
$sel:ramdiskId:RunInstances' :: RunInstances -> Maybe Text
$sel:privateIpAddress:RunInstances' :: RunInstances -> Maybe Text
$sel:privateDnsNameOptions:RunInstances' :: RunInstances -> Maybe PrivateDnsNameOptionsRequest
$sel:placement:RunInstances' :: RunInstances -> Maybe Placement
$sel:networkInterfaces:RunInstances' :: RunInstances -> Maybe [InstanceNetworkInterfaceSpecification]
$sel:monitoring:RunInstances' :: RunInstances -> Maybe RunInstancesMonitoringEnabled
$sel:metadataOptions:RunInstances' :: RunInstances -> Maybe InstanceMetadataOptionsRequest
$sel:maintenanceOptions:RunInstances' :: RunInstances -> Maybe InstanceMaintenanceOptionsRequest
$sel:licenseSpecifications:RunInstances' :: RunInstances -> Maybe [LicenseConfigurationRequest]
$sel:launchTemplate:RunInstances' :: RunInstances -> Maybe LaunchTemplateSpecification
$sel:keyName:RunInstances' :: RunInstances -> Maybe Text
$sel:kernelId:RunInstances' :: RunInstances -> Maybe Text
$sel:ipv6Addresses:RunInstances' :: RunInstances -> Maybe [InstanceIpv6Address]
$sel:ipv6AddressCount:RunInstances' :: RunInstances -> Maybe Int
$sel:instanceType:RunInstances' :: RunInstances -> Maybe InstanceType
$sel:instanceMarketOptions:RunInstances' :: RunInstances -> Maybe InstanceMarketOptionsRequest
$sel:instanceInitiatedShutdownBehavior:RunInstances' :: RunInstances -> Maybe ShutdownBehavior
$sel:imageId:RunInstances' :: RunInstances -> Maybe Text
$sel:iamInstanceProfile:RunInstances' :: RunInstances -> Maybe IamInstanceProfileSpecification
$sel:hibernationOptions:RunInstances' :: RunInstances -> Maybe HibernationOptionsRequest
$sel:enclaveOptions:RunInstances' :: RunInstances -> Maybe EnclaveOptionsRequest
$sel:elasticInferenceAccelerators:RunInstances' :: RunInstances -> Maybe [ElasticInferenceAccelerator]
$sel:elasticGpuSpecification:RunInstances' :: RunInstances -> Maybe [ElasticGpuSpecification]
$sel:ebsOptimized:RunInstances' :: RunInstances -> Maybe Bool
$sel:dryRun:RunInstances' :: RunInstances -> Maybe Bool
$sel:disableApiTermination:RunInstances' :: RunInstances -> Maybe Bool
$sel:disableApiStop:RunInstances' :: RunInstances -> Maybe Bool
$sel:creditSpecification:RunInstances' :: RunInstances -> Maybe CreditSpecificationRequest
$sel:cpuOptions:RunInstances' :: RunInstances -> Maybe CpuOptionsRequest
$sel:clientToken:RunInstances' :: RunInstances -> Maybe Text
$sel:capacityReservationSpecification:RunInstances' :: RunInstances -> Maybe CapacityReservationSpecification
$sel:blockDeviceMappings:RunInstances' :: RunInstances -> Maybe [BlockDeviceMapping]
$sel:additionalInfo:RunInstances' :: RunInstances -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
additionalInfo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [BlockDeviceMapping]
blockDeviceMappings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CapacityReservationSpecification
capacityReservationSpecification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CpuOptionsRequest
cpuOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CreditSpecificationRequest
creditSpecification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableApiStop
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableApiTermination
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
      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 [ElasticGpuSpecification]
elasticGpuSpecification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ElasticInferenceAccelerator]
elasticInferenceAccelerators
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EnclaveOptionsRequest
enclaveOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HibernationOptionsRequest
hibernationOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IamInstanceProfileSpecification
iamInstanceProfile
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe ShutdownBehavior
instanceInitiatedShutdownBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceMarketOptionsRequest
instanceMarketOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceType
instanceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
ipv6AddressCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InstanceIpv6Address]
ipv6Addresses
      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 LaunchTemplateSpecification
launchTemplate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [LicenseConfigurationRequest]
licenseSpecifications
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe InstanceMaintenanceOptionsRequest
maintenanceOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe InstanceMetadataOptionsRequest
metadataOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe RunInstancesMonitoringEnabled
monitoring
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [InstanceNetworkInterfaceSpecification]
networkInterfaces
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Placement
placement
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe PrivateDnsNameOptionsRequest
privateDnsNameOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
privateIpAddress
      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]
securityGroups
      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 [TagSpecification]
tagSpecifications
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe (Sensitive Text)
userData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Int
maxCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Int
minCount

instance Data.ToHeaders RunInstances where
  toHeaders :: RunInstances -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery RunInstances where
  toQuery :: RunInstances -> QueryString
toQuery RunInstances' {Int
Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ElasticGpuSpecification]
Maybe [ElasticInferenceAccelerator]
Maybe [InstanceIpv6Address]
Maybe [LicenseConfigurationRequest]
Maybe [InstanceNetworkInterfaceSpecification]
Maybe [TagSpecification]
Maybe [BlockDeviceMapping]
Maybe Text
Maybe (Sensitive Text)
Maybe CapacityReservationSpecification
Maybe CpuOptionsRequest
Maybe CreditSpecificationRequest
Maybe EnclaveOptionsRequest
Maybe HibernationOptionsRequest
Maybe IamInstanceProfileSpecification
Maybe InstanceMaintenanceOptionsRequest
Maybe InstanceMetadataOptionsRequest
Maybe InstanceType
Maybe LaunchTemplateSpecification
Maybe PrivateDnsNameOptionsRequest
Maybe RunInstancesMonitoringEnabled
Maybe ShutdownBehavior
Maybe InstanceMarketOptionsRequest
Maybe Placement
minCount :: Int
maxCount :: Int
userData :: Maybe (Sensitive Text)
tagSpecifications :: Maybe [TagSpecification]
subnetId :: Maybe Text
securityGroups :: Maybe [Text]
securityGroupIds :: Maybe [Text]
ramdiskId :: Maybe Text
privateIpAddress :: Maybe Text
privateDnsNameOptions :: Maybe PrivateDnsNameOptionsRequest
placement :: Maybe Placement
networkInterfaces :: Maybe [InstanceNetworkInterfaceSpecification]
monitoring :: Maybe RunInstancesMonitoringEnabled
metadataOptions :: Maybe InstanceMetadataOptionsRequest
maintenanceOptions :: Maybe InstanceMaintenanceOptionsRequest
licenseSpecifications :: Maybe [LicenseConfigurationRequest]
launchTemplate :: Maybe LaunchTemplateSpecification
keyName :: Maybe Text
kernelId :: Maybe Text
ipv6Addresses :: Maybe [InstanceIpv6Address]
ipv6AddressCount :: Maybe Int
instanceType :: Maybe InstanceType
instanceMarketOptions :: Maybe InstanceMarketOptionsRequest
instanceInitiatedShutdownBehavior :: Maybe ShutdownBehavior
imageId :: Maybe Text
iamInstanceProfile :: Maybe IamInstanceProfileSpecification
hibernationOptions :: Maybe HibernationOptionsRequest
enclaveOptions :: Maybe EnclaveOptionsRequest
elasticInferenceAccelerators :: Maybe [ElasticInferenceAccelerator]
elasticGpuSpecification :: Maybe [ElasticGpuSpecification]
ebsOptimized :: Maybe Bool
dryRun :: Maybe Bool
disableApiTermination :: Maybe Bool
disableApiStop :: Maybe Bool
creditSpecification :: Maybe CreditSpecificationRequest
cpuOptions :: Maybe CpuOptionsRequest
clientToken :: Maybe Text
capacityReservationSpecification :: Maybe CapacityReservationSpecification
blockDeviceMappings :: Maybe [BlockDeviceMapping]
additionalInfo :: Maybe Text
$sel:minCount:RunInstances' :: RunInstances -> Int
$sel:maxCount:RunInstances' :: RunInstances -> Int
$sel:userData:RunInstances' :: RunInstances -> Maybe (Sensitive Text)
$sel:tagSpecifications:RunInstances' :: RunInstances -> Maybe [TagSpecification]
$sel:subnetId:RunInstances' :: RunInstances -> Maybe Text
$sel:securityGroups:RunInstances' :: RunInstances -> Maybe [Text]
$sel:securityGroupIds:RunInstances' :: RunInstances -> Maybe [Text]
$sel:ramdiskId:RunInstances' :: RunInstances -> Maybe Text
$sel:privateIpAddress:RunInstances' :: RunInstances -> Maybe Text
$sel:privateDnsNameOptions:RunInstances' :: RunInstances -> Maybe PrivateDnsNameOptionsRequest
$sel:placement:RunInstances' :: RunInstances -> Maybe Placement
$sel:networkInterfaces:RunInstances' :: RunInstances -> Maybe [InstanceNetworkInterfaceSpecification]
$sel:monitoring:RunInstances' :: RunInstances -> Maybe RunInstancesMonitoringEnabled
$sel:metadataOptions:RunInstances' :: RunInstances -> Maybe InstanceMetadataOptionsRequest
$sel:maintenanceOptions:RunInstances' :: RunInstances -> Maybe InstanceMaintenanceOptionsRequest
$sel:licenseSpecifications:RunInstances' :: RunInstances -> Maybe [LicenseConfigurationRequest]
$sel:launchTemplate:RunInstances' :: RunInstances -> Maybe LaunchTemplateSpecification
$sel:keyName:RunInstances' :: RunInstances -> Maybe Text
$sel:kernelId:RunInstances' :: RunInstances -> Maybe Text
$sel:ipv6Addresses:RunInstances' :: RunInstances -> Maybe [InstanceIpv6Address]
$sel:ipv6AddressCount:RunInstances' :: RunInstances -> Maybe Int
$sel:instanceType:RunInstances' :: RunInstances -> Maybe InstanceType
$sel:instanceMarketOptions:RunInstances' :: RunInstances -> Maybe InstanceMarketOptionsRequest
$sel:instanceInitiatedShutdownBehavior:RunInstances' :: RunInstances -> Maybe ShutdownBehavior
$sel:imageId:RunInstances' :: RunInstances -> Maybe Text
$sel:iamInstanceProfile:RunInstances' :: RunInstances -> Maybe IamInstanceProfileSpecification
$sel:hibernationOptions:RunInstances' :: RunInstances -> Maybe HibernationOptionsRequest
$sel:enclaveOptions:RunInstances' :: RunInstances -> Maybe EnclaveOptionsRequest
$sel:elasticInferenceAccelerators:RunInstances' :: RunInstances -> Maybe [ElasticInferenceAccelerator]
$sel:elasticGpuSpecification:RunInstances' :: RunInstances -> Maybe [ElasticGpuSpecification]
$sel:ebsOptimized:RunInstances' :: RunInstances -> Maybe Bool
$sel:dryRun:RunInstances' :: RunInstances -> Maybe Bool
$sel:disableApiTermination:RunInstances' :: RunInstances -> Maybe Bool
$sel:disableApiStop:RunInstances' :: RunInstances -> Maybe Bool
$sel:creditSpecification:RunInstances' :: RunInstances -> Maybe CreditSpecificationRequest
$sel:cpuOptions:RunInstances' :: RunInstances -> Maybe CpuOptionsRequest
$sel:clientToken:RunInstances' :: RunInstances -> Maybe Text
$sel:capacityReservationSpecification:RunInstances' :: RunInstances -> Maybe CapacityReservationSpecification
$sel:blockDeviceMappings:RunInstances' :: RunInstances -> Maybe [BlockDeviceMapping]
$sel:additionalInfo:RunInstances' :: RunInstances -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"RunInstances" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"AdditionalInfo" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
additionalInfo,
        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 [BlockDeviceMapping]
blockDeviceMappings
          ),
        ByteString
"CapacityReservationSpecification"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe CapacityReservationSpecification
capacityReservationSpecification,
        ByteString
"ClientToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientToken,
        ByteString
"CpuOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe CpuOptionsRequest
cpuOptions,
        ByteString
"CreditSpecification" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe CreditSpecificationRequest
creditSpecification,
        ByteString
"DisableApiStop" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
disableApiStop,
        ByteString
"DisableApiTermination"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
disableApiTermination,
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        ByteString
"EbsOptimized" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
ebsOptimized,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"ElasticGpuSpecification"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ElasticGpuSpecification]
elasticGpuSpecification
          ),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"ElasticInferenceAccelerator"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ElasticInferenceAccelerator]
elasticInferenceAccelerators
          ),
        ByteString
"EnclaveOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe EnclaveOptionsRequest
enclaveOptions,
        ByteString
"HibernationOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe HibernationOptionsRequest
hibernationOptions,
        ByteString
"IamInstanceProfile" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe IamInstanceProfileSpecification
iamInstanceProfile,
        ByteString
"ImageId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
imageId,
        ByteString
"InstanceInitiatedShutdownBehavior"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ShutdownBehavior
instanceInitiatedShutdownBehavior,
        ByteString
"InstanceMarketOptions"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe InstanceMarketOptionsRequest
instanceMarketOptions,
        ByteString
"InstanceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe InstanceType
instanceType,
        ByteString
"Ipv6AddressCount" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
ipv6AddressCount,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Ipv6Address"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InstanceIpv6Address]
ipv6Addresses
          ),
        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
"LaunchTemplate" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe LaunchTemplateSpecification
launchTemplate,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"LicenseSpecification"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LicenseConfigurationRequest]
licenseSpecifications
          ),
        ByteString
"MaintenanceOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe InstanceMaintenanceOptionsRequest
maintenanceOptions,
        ByteString
"MetadataOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe InstanceMetadataOptionsRequest
metadataOptions,
        ByteString
"Monitoring" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe RunInstancesMonitoringEnabled
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 [InstanceNetworkInterfaceSpecification]
networkInterfaces
          ),
        ByteString
"Placement" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Placement
placement,
        ByteString
"PrivateDnsNameOptions"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe PrivateDnsNameOptionsRequest
privateDnsNameOptions,
        ByteString
"PrivateIpAddress" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
privateIpAddress,
        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
          ),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"SecurityGroup"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroups
          ),
        ByteString
"SubnetId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
subnetId,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"TagSpecification"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagSpecification]
tagSpecifications
          ),
        ByteString
"UserData" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe (Sensitive Text)
userData,
        ByteString
"MaxCount" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Int
maxCount,
        ByteString
"MinCount" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Int
minCount
      ]