{-# 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.EMR.RunJobFlow
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- RunJobFlow creates and starts running a new cluster (job flow). The
-- cluster runs the steps specified. After the steps complete, the cluster
-- stops and the HDFS partition is lost. To prevent loss of data, configure
-- the last step of the job flow to store results in Amazon S3. If the
-- JobFlowInstancesConfig @KeepJobFlowAliveWhenNoSteps@ parameter is set to
-- @TRUE@, the cluster transitions to the WAITING state rather than
-- shutting down after the steps have completed.
--
-- For additional protection, you can set the JobFlowInstancesConfig
-- @TerminationProtected@ parameter to @TRUE@ to lock the cluster and
-- prevent it from being terminated by API call, user intervention, or in
-- the event of a job flow error.
--
-- A maximum of 256 steps are allowed in each job flow.
--
-- If your cluster is long-running (such as a Hive data warehouse) or
-- complex, you may require more than 256 steps to process your data. You
-- can bypass the 256-step limitation in various ways, including using the
-- SSH shell to connect to the master node and submitting queries directly
-- to the software running on the master node, such as Hive and Hadoop.
--
-- For long-running clusters, we recommend that you periodically store your
-- results.
--
-- The instance fleets configuration is available only in Amazon EMR
-- versions 4.8.0 and later, excluding 5.0.x versions. The RunJobFlow
-- request can contain InstanceFleets parameters or InstanceGroups
-- parameters, but not both.
module Amazonka.EMR.RunJobFlow
  ( -- * Creating a Request
    RunJobFlow (..),
    newRunJobFlow,

    -- * Request Lenses
    runJobFlow_additionalInfo,
    runJobFlow_amiVersion,
    runJobFlow_applications,
    runJobFlow_autoScalingRole,
    runJobFlow_autoTerminationPolicy,
    runJobFlow_bootstrapActions,
    runJobFlow_configurations,
    runJobFlow_customAmiId,
    runJobFlow_ebsRootVolumeSize,
    runJobFlow_jobFlowRole,
    runJobFlow_kerberosAttributes,
    runJobFlow_logEncryptionKmsKeyId,
    runJobFlow_logUri,
    runJobFlow_managedScalingPolicy,
    runJobFlow_newSupportedProducts,
    runJobFlow_oSReleaseLabel,
    runJobFlow_placementGroupConfigs,
    runJobFlow_releaseLabel,
    runJobFlow_repoUpgradeOnBoot,
    runJobFlow_scaleDownBehavior,
    runJobFlow_securityConfiguration,
    runJobFlow_serviceRole,
    runJobFlow_stepConcurrencyLevel,
    runJobFlow_steps,
    runJobFlow_supportedProducts,
    runJobFlow_tags,
    runJobFlow_visibleToAllUsers,
    runJobFlow_name,
    runJobFlow_instances,

    -- * Destructuring the Response
    RunJobFlowResponse (..),
    newRunJobFlowResponse,

    -- * Response Lenses
    runJobFlowResponse_clusterArn,
    runJobFlowResponse_jobFlowId,
    runJobFlowResponse_httpStatus,
  )
where

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

-- | Input to the RunJobFlow operation.
--
-- /See:/ 'newRunJobFlow' smart constructor.
data RunJobFlow = RunJobFlow'
  { -- | A JSON string for selecting additional features.
    RunJobFlow -> Maybe Text
additionalInfo :: Prelude.Maybe Prelude.Text,
    -- | Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR
    -- releases 4.0 and later, @ReleaseLabel@ is used. To specify a custom AMI,
    -- use @CustomAmiID@.
    RunJobFlow -> Maybe Text
amiVersion :: Prelude.Maybe Prelude.Text,
    -- | Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of
    -- applications for Amazon EMR to install and configure when launching the
    -- cluster. For a list of applications available for each Amazon EMR
    -- release version, see the
    -- <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/ Amazon EMRRelease Guide>.
    RunJobFlow -> Maybe [Application]
applications :: Prelude.Maybe [Application],
    -- | An IAM role for automatic scaling policies. The default role is
    -- @EMR_AutoScaling_DefaultRole@. The IAM role provides permissions that
    -- the automatic scaling feature requires to launch and terminate EC2
    -- instances in an instance group.
    RunJobFlow -> Maybe Text
autoScalingRole :: Prelude.Maybe Prelude.Text,
    RunJobFlow -> Maybe AutoTerminationPolicy
autoTerminationPolicy :: Prelude.Maybe AutoTerminationPolicy,
    -- | A list of bootstrap actions to run before Hadoop starts on the cluster
    -- nodes.
    RunJobFlow -> Maybe [BootstrapActionConfig]
bootstrapActions :: Prelude.Maybe [BootstrapActionConfig],
    -- | For Amazon EMR releases 4.0 and later. The list of configurations
    -- supplied for the EMR cluster you are creating.
    RunJobFlow -> Maybe [Configuration]
configurations :: Prelude.Maybe [Configuration],
    -- | Available only in Amazon EMR version 5.7.0 and later. The ID of a custom
    -- Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when
    -- it launches cluster EC2 instances. For more information about custom
    -- AMIs in Amazon EMR, see
    -- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html Using a Custom AMI>
    -- in the /Amazon EMR Management Guide/. If omitted, the cluster uses the
    -- base Linux AMI for the @ReleaseLabel@ specified. For Amazon EMR versions
    -- 2.x and 3.x, use @AmiVersion@ instead.
    --
    -- For information about creating a custom AMI, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html Creating an Amazon EBS-Backed Linux AMI>
    -- in the /Amazon Elastic Compute Cloud User Guide for Linux Instances/.
    -- For information about finding an AMI ID, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html Finding a Linux AMI>.
    RunJobFlow -> Maybe Text
customAmiId :: Prelude.Maybe Prelude.Text,
    -- | The size, in GiB, of the Amazon EBS root device volume of the Linux AMI
    -- that is used for each EC2 instance. Available in Amazon EMR version 4.x
    -- and later.
    RunJobFlow -> Maybe Int
ebsRootVolumeSize :: Prelude.Maybe Prelude.Int,
    -- | Also called instance profile and EC2 role. An IAM role for an EMR
    -- cluster. The EC2 instances of the cluster assume this role. The default
    -- role is @EMR_EC2_DefaultRole@. In order to use the default role, you
    -- must have already created it using the CLI or console.
    RunJobFlow -> Maybe Text
jobFlowRole :: Prelude.Maybe Prelude.Text,
    -- | Attributes for Kerberos configuration when Kerberos authentication is
    -- enabled using a security configuration. For more information see
    -- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html Use Kerberos Authentication>
    -- in the /Amazon EMR Management Guide/.
    RunJobFlow -> Maybe KerberosAttributes
kerberosAttributes :: Prelude.Maybe KerberosAttributes,
    -- | The KMS key used for encrypting log files. If a value is not provided,
    -- the logs remain encrypted by AES-256. This attribute is only available
    -- with Amazon EMR version 5.30.0 and later, excluding Amazon EMR 6.0.0.
    RunJobFlow -> Maybe Text
logEncryptionKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The location in Amazon S3 to write the log files of the job flow. If a
    -- value is not provided, logs are not created.
    RunJobFlow -> Maybe Text
logUri :: Prelude.Maybe Prelude.Text,
    -- | The specified managed scaling policy for an Amazon EMR cluster.
    RunJobFlow -> Maybe ManagedScalingPolicy
managedScalingPolicy :: Prelude.Maybe ManagedScalingPolicy,
    -- | For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and
    -- later, use Applications.
    --
    -- A list of strings that indicates third-party software to use with the
    -- job flow that accepts a user argument list. EMR accepts and forwards the
    -- argument list to the corresponding installation script as bootstrap
    -- action arguments. For more information, see \"Launch a Job Flow on the
    -- MapR Distribution for Hadoop\" in the
    -- <https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf Amazon EMR Developer Guide>.
    -- Supported values are:
    --
    -- -   \"mapr-m3\" - launch the cluster using MapR M3 Edition.
    --
    -- -   \"mapr-m5\" - launch the cluster using MapR M5 Edition.
    --
    -- -   \"mapr\" with the user arguments specifying \"--edition,m3\" or
    --     \"--edition,m5\" - launch the job flow using MapR M3 or M5 Edition
    --     respectively.
    --
    -- -   \"mapr-m7\" - launch the cluster using MapR M7 Edition.
    --
    -- -   \"hunk\" - launch the cluster with the Hunk Big Data Analytics
    --     Platform.
    --
    -- -   \"hue\"- launch the cluster with Hue installed.
    --
    -- -   \"spark\" - launch the cluster with Apache Spark installed.
    --
    -- -   \"ganglia\" - launch the cluster with the Ganglia Monitoring System
    --     installed.
    RunJobFlow -> Maybe [SupportedProductConfig]
newSupportedProducts' :: Prelude.Maybe [SupportedProductConfig],
    -- | Specifies a particular Amazon Linux release for all nodes in a cluster
    -- launch RunJobFlow request. If a release is not specified, Amazon EMR
    -- uses the latest validated Amazon Linux release for cluster launch.
    RunJobFlow -> Maybe Text
oSReleaseLabel :: Prelude.Maybe Prelude.Text,
    -- | The specified placement group configuration for an Amazon EMR cluster.
    RunJobFlow -> Maybe [PlacementGroupConfig]
placementGroupConfigs :: Prelude.Maybe [PlacementGroupConfig],
    -- | The Amazon EMR release label, which determines the version of
    -- open-source application packages installed on the cluster. Release
    -- labels are in the form @emr-x.x.x@, where x.x.x is an Amazon EMR release
    -- version such as @emr-5.14.0@. For more information about Amazon EMR
    -- release versions and included application versions and features, see
    -- <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/>. The release
    -- label applies only to Amazon EMR releases version 4.0 and later. Earlier
    -- versions use @AmiVersion@.
    RunJobFlow -> Maybe Text
releaseLabel :: Prelude.Maybe Prelude.Text,
    -- | Applies only when @CustomAmiID@ is used. Specifies which updates from
    -- the Amazon Linux AMI package repositories to apply automatically when
    -- the instance boots using the AMI. If omitted, the default is @SECURITY@,
    -- which indicates that only security updates are applied. If @NONE@ is
    -- specified, no updates are applied, and all updates must be applied
    -- manually.
    RunJobFlow -> Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot :: Prelude.Maybe RepoUpgradeOnBoot,
    -- | Specifies the way that individual Amazon EC2 instances terminate when an
    -- automatic scale-in activity occurs or an instance group is resized.
    -- @TERMINATE_AT_INSTANCE_HOUR@ indicates that Amazon EMR terminates nodes
    -- at the instance-hour boundary, regardless of when the request to
    -- terminate the instance was submitted. This option is only available with
    -- Amazon EMR 5.1.0 and later and is the default for clusters created using
    -- that version. @TERMINATE_AT_TASK_COMPLETION@ indicates that Amazon EMR
    -- adds nodes to a deny list and drains tasks from nodes before terminating
    -- the Amazon EC2 instances, regardless of the instance-hour boundary. With
    -- either behavior, Amazon EMR removes the least active nodes first and
    -- blocks instance termination if it could lead to HDFS corruption.
    -- @TERMINATE_AT_TASK_COMPLETION@ available only in Amazon EMR version
    -- 4.1.0 and later, and is the default for versions of Amazon EMR earlier
    -- than 5.1.0.
    RunJobFlow -> Maybe ScaleDownBehavior
scaleDownBehavior :: Prelude.Maybe ScaleDownBehavior,
    -- | The name of a security configuration to apply to the cluster.
    RunJobFlow -> Maybe Text
securityConfiguration :: Prelude.Maybe Prelude.Text,
    -- | The IAM role that Amazon EMR assumes in order to access Amazon Web
    -- Services resources on your behalf. If you\'ve created a custom service
    -- role path, you must specify it for the service role when you launch your
    -- cluster.
    RunJobFlow -> Maybe Text
serviceRole :: Prelude.Maybe Prelude.Text,
    -- | Specifies the number of steps that can be executed concurrently. The
    -- default value is @1@. The maximum value is @256@.
    RunJobFlow -> Maybe Int
stepConcurrencyLevel :: Prelude.Maybe Prelude.Int,
    -- | A list of steps to run.
    RunJobFlow -> Maybe [StepConfig]
steps :: Prelude.Maybe [StepConfig],
    -- | For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and
    -- later, use Applications.
    --
    -- A list of strings that indicates third-party software to use. For more
    -- information, see the
    -- <https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf Amazon EMR Developer Guide>.
    -- Currently supported values are:
    --
    -- -   \"mapr-m3\" - launch the job flow using MapR M3 Edition.
    --
    -- -   \"mapr-m5\" - launch the job flow using MapR M5 Edition.
    RunJobFlow -> Maybe [Text]
supportedProducts :: Prelude.Maybe [Prelude.Text],
    -- | A list of tags to associate with a cluster and propagate to Amazon EC2
    -- instances.
    RunJobFlow -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The VisibleToAllUsers parameter is no longer supported. By default, the
    -- value is set to @true@. Setting it to @false@ now has no effect.
    --
    -- Set this value to @true@ so that IAM principals in the Amazon Web
    -- Services account associated with the cluster can perform EMR actions on
    -- the cluster that their IAM policies allow. This value defaults to @true@
    -- for clusters created using the EMR API or the CLI
    -- <https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html create-cluster>
    -- command.
    --
    -- When set to @false@, only the IAM principal that created the cluster and
    -- the Amazon Web Services account root user can perform EMR actions for
    -- the cluster, regardless of the IAM permissions policies attached to
    -- other IAM principals. For more information, see
    -- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users Understanding the EMR Cluster VisibleToAllUsers Setting>
    -- in the /Amazon EMRManagement Guide/.
    RunJobFlow -> Maybe Bool
visibleToAllUsers :: Prelude.Maybe Prelude.Bool,
    -- | The name of the job flow.
    RunJobFlow -> Text
name :: Prelude.Text,
    -- | A specification of the number and type of Amazon EC2 instances.
    RunJobFlow -> JobFlowInstancesConfig
instances :: JobFlowInstancesConfig
  }
  deriving (RunJobFlow -> RunJobFlow -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunJobFlow -> RunJobFlow -> Bool
$c/= :: RunJobFlow -> RunJobFlow -> Bool
== :: RunJobFlow -> RunJobFlow -> Bool
$c== :: RunJobFlow -> RunJobFlow -> Bool
Prelude.Eq, ReadPrec [RunJobFlow]
ReadPrec RunJobFlow
Int -> ReadS RunJobFlow
ReadS [RunJobFlow]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RunJobFlow]
$creadListPrec :: ReadPrec [RunJobFlow]
readPrec :: ReadPrec RunJobFlow
$creadPrec :: ReadPrec RunJobFlow
readList :: ReadS [RunJobFlow]
$creadList :: ReadS [RunJobFlow]
readsPrec :: Int -> ReadS RunJobFlow
$creadsPrec :: Int -> ReadS RunJobFlow
Prelude.Read, Int -> RunJobFlow -> ShowS
[RunJobFlow] -> ShowS
RunJobFlow -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunJobFlow] -> ShowS
$cshowList :: [RunJobFlow] -> ShowS
show :: RunJobFlow -> String
$cshow :: RunJobFlow -> String
showsPrec :: Int -> RunJobFlow -> ShowS
$cshowsPrec :: Int -> RunJobFlow -> ShowS
Prelude.Show, forall x. Rep RunJobFlow x -> RunJobFlow
forall x. RunJobFlow -> Rep RunJobFlow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RunJobFlow x -> RunJobFlow
$cfrom :: forall x. RunJobFlow -> Rep RunJobFlow x
Prelude.Generic)

-- |
-- Create a value of 'RunJobFlow' 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', 'runJobFlow_additionalInfo' - A JSON string for selecting additional features.
--
-- 'amiVersion', 'runJobFlow_amiVersion' - Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR
-- releases 4.0 and later, @ReleaseLabel@ is used. To specify a custom AMI,
-- use @CustomAmiID@.
--
-- 'applications', 'runJobFlow_applications' - Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of
-- applications for Amazon EMR to install and configure when launching the
-- cluster. For a list of applications available for each Amazon EMR
-- release version, see the
-- <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/ Amazon EMRRelease Guide>.
--
-- 'autoScalingRole', 'runJobFlow_autoScalingRole' - An IAM role for automatic scaling policies. The default role is
-- @EMR_AutoScaling_DefaultRole@. The IAM role provides permissions that
-- the automatic scaling feature requires to launch and terminate EC2
-- instances in an instance group.
--
-- 'autoTerminationPolicy', 'runJobFlow_autoTerminationPolicy' - Undocumented member.
--
-- 'bootstrapActions', 'runJobFlow_bootstrapActions' - A list of bootstrap actions to run before Hadoop starts on the cluster
-- nodes.
--
-- 'configurations', 'runJobFlow_configurations' - For Amazon EMR releases 4.0 and later. The list of configurations
-- supplied for the EMR cluster you are creating.
--
-- 'customAmiId', 'runJobFlow_customAmiId' - Available only in Amazon EMR version 5.7.0 and later. The ID of a custom
-- Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when
-- it launches cluster EC2 instances. For more information about custom
-- AMIs in Amazon EMR, see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html Using a Custom AMI>
-- in the /Amazon EMR Management Guide/. If omitted, the cluster uses the
-- base Linux AMI for the @ReleaseLabel@ specified. For Amazon EMR versions
-- 2.x and 3.x, use @AmiVersion@ instead.
--
-- For information about creating a custom AMI, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html Creating an Amazon EBS-Backed Linux AMI>
-- in the /Amazon Elastic Compute Cloud User Guide for Linux Instances/.
-- For information about finding an AMI ID, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html Finding a Linux AMI>.
--
-- 'ebsRootVolumeSize', 'runJobFlow_ebsRootVolumeSize' - The size, in GiB, of the Amazon EBS root device volume of the Linux AMI
-- that is used for each EC2 instance. Available in Amazon EMR version 4.x
-- and later.
--
-- 'jobFlowRole', 'runJobFlow_jobFlowRole' - Also called instance profile and EC2 role. An IAM role for an EMR
-- cluster. The EC2 instances of the cluster assume this role. The default
-- role is @EMR_EC2_DefaultRole@. In order to use the default role, you
-- must have already created it using the CLI or console.
--
-- 'kerberosAttributes', 'runJobFlow_kerberosAttributes' - Attributes for Kerberos configuration when Kerberos authentication is
-- enabled using a security configuration. For more information see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html Use Kerberos Authentication>
-- in the /Amazon EMR Management Guide/.
--
-- 'logEncryptionKmsKeyId', 'runJobFlow_logEncryptionKmsKeyId' - The KMS key used for encrypting log files. If a value is not provided,
-- the logs remain encrypted by AES-256. This attribute is only available
-- with Amazon EMR version 5.30.0 and later, excluding Amazon EMR 6.0.0.
--
-- 'logUri', 'runJobFlow_logUri' - The location in Amazon S3 to write the log files of the job flow. If a
-- value is not provided, logs are not created.
--
-- 'managedScalingPolicy', 'runJobFlow_managedScalingPolicy' - The specified managed scaling policy for an Amazon EMR cluster.
--
-- 'newSupportedProducts'', 'runJobFlow_newSupportedProducts' - For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and
-- later, use Applications.
--
-- A list of strings that indicates third-party software to use with the
-- job flow that accepts a user argument list. EMR accepts and forwards the
-- argument list to the corresponding installation script as bootstrap
-- action arguments. For more information, see \"Launch a Job Flow on the
-- MapR Distribution for Hadoop\" in the
-- <https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf Amazon EMR Developer Guide>.
-- Supported values are:
--
-- -   \"mapr-m3\" - launch the cluster using MapR M3 Edition.
--
-- -   \"mapr-m5\" - launch the cluster using MapR M5 Edition.
--
-- -   \"mapr\" with the user arguments specifying \"--edition,m3\" or
--     \"--edition,m5\" - launch the job flow using MapR M3 or M5 Edition
--     respectively.
--
-- -   \"mapr-m7\" - launch the cluster using MapR M7 Edition.
--
-- -   \"hunk\" - launch the cluster with the Hunk Big Data Analytics
--     Platform.
--
-- -   \"hue\"- launch the cluster with Hue installed.
--
-- -   \"spark\" - launch the cluster with Apache Spark installed.
--
-- -   \"ganglia\" - launch the cluster with the Ganglia Monitoring System
--     installed.
--
-- 'oSReleaseLabel', 'runJobFlow_oSReleaseLabel' - Specifies a particular Amazon Linux release for all nodes in a cluster
-- launch RunJobFlow request. If a release is not specified, Amazon EMR
-- uses the latest validated Amazon Linux release for cluster launch.
--
-- 'placementGroupConfigs', 'runJobFlow_placementGroupConfigs' - The specified placement group configuration for an Amazon EMR cluster.
--
-- 'releaseLabel', 'runJobFlow_releaseLabel' - The Amazon EMR release label, which determines the version of
-- open-source application packages installed on the cluster. Release
-- labels are in the form @emr-x.x.x@, where x.x.x is an Amazon EMR release
-- version such as @emr-5.14.0@. For more information about Amazon EMR
-- release versions and included application versions and features, see
-- <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/>. The release
-- label applies only to Amazon EMR releases version 4.0 and later. Earlier
-- versions use @AmiVersion@.
--
-- 'repoUpgradeOnBoot', 'runJobFlow_repoUpgradeOnBoot' - Applies only when @CustomAmiID@ is used. Specifies which updates from
-- the Amazon Linux AMI package repositories to apply automatically when
-- the instance boots using the AMI. If omitted, the default is @SECURITY@,
-- which indicates that only security updates are applied. If @NONE@ is
-- specified, no updates are applied, and all updates must be applied
-- manually.
--
-- 'scaleDownBehavior', 'runJobFlow_scaleDownBehavior' - Specifies the way that individual Amazon EC2 instances terminate when an
-- automatic scale-in activity occurs or an instance group is resized.
-- @TERMINATE_AT_INSTANCE_HOUR@ indicates that Amazon EMR terminates nodes
-- at the instance-hour boundary, regardless of when the request to
-- terminate the instance was submitted. This option is only available with
-- Amazon EMR 5.1.0 and later and is the default for clusters created using
-- that version. @TERMINATE_AT_TASK_COMPLETION@ indicates that Amazon EMR
-- adds nodes to a deny list and drains tasks from nodes before terminating
-- the Amazon EC2 instances, regardless of the instance-hour boundary. With
-- either behavior, Amazon EMR removes the least active nodes first and
-- blocks instance termination if it could lead to HDFS corruption.
-- @TERMINATE_AT_TASK_COMPLETION@ available only in Amazon EMR version
-- 4.1.0 and later, and is the default for versions of Amazon EMR earlier
-- than 5.1.0.
--
-- 'securityConfiguration', 'runJobFlow_securityConfiguration' - The name of a security configuration to apply to the cluster.
--
-- 'serviceRole', 'runJobFlow_serviceRole' - The IAM role that Amazon EMR assumes in order to access Amazon Web
-- Services resources on your behalf. If you\'ve created a custom service
-- role path, you must specify it for the service role when you launch your
-- cluster.
--
-- 'stepConcurrencyLevel', 'runJobFlow_stepConcurrencyLevel' - Specifies the number of steps that can be executed concurrently. The
-- default value is @1@. The maximum value is @256@.
--
-- 'steps', 'runJobFlow_steps' - A list of steps to run.
--
-- 'supportedProducts', 'runJobFlow_supportedProducts' - For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and
-- later, use Applications.
--
-- A list of strings that indicates third-party software to use. For more
-- information, see the
-- <https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf Amazon EMR Developer Guide>.
-- Currently supported values are:
--
-- -   \"mapr-m3\" - launch the job flow using MapR M3 Edition.
--
-- -   \"mapr-m5\" - launch the job flow using MapR M5 Edition.
--
-- 'tags', 'runJobFlow_tags' - A list of tags to associate with a cluster and propagate to Amazon EC2
-- instances.
--
-- 'visibleToAllUsers', 'runJobFlow_visibleToAllUsers' - The VisibleToAllUsers parameter is no longer supported. By default, the
-- value is set to @true@. Setting it to @false@ now has no effect.
--
-- Set this value to @true@ so that IAM principals in the Amazon Web
-- Services account associated with the cluster can perform EMR actions on
-- the cluster that their IAM policies allow. This value defaults to @true@
-- for clusters created using the EMR API or the CLI
-- <https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html create-cluster>
-- command.
--
-- When set to @false@, only the IAM principal that created the cluster and
-- the Amazon Web Services account root user can perform EMR actions for
-- the cluster, regardless of the IAM permissions policies attached to
-- other IAM principals. For more information, see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users Understanding the EMR Cluster VisibleToAllUsers Setting>
-- in the /Amazon EMRManagement Guide/.
--
-- 'name', 'runJobFlow_name' - The name of the job flow.
--
-- 'instances', 'runJobFlow_instances' - A specification of the number and type of Amazon EC2 instances.
newRunJobFlow ::
  -- | 'name'
  Prelude.Text ->
  -- | 'instances'
  JobFlowInstancesConfig ->
  RunJobFlow
newRunJobFlow :: Text -> JobFlowInstancesConfig -> RunJobFlow
newRunJobFlow Text
pName_ JobFlowInstancesConfig
pInstances_ =
  RunJobFlow'
    { $sel:additionalInfo:RunJobFlow' :: Maybe Text
additionalInfo = forall a. Maybe a
Prelude.Nothing,
      $sel:amiVersion:RunJobFlow' :: Maybe Text
amiVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:applications:RunJobFlow' :: Maybe [Application]
applications = forall a. Maybe a
Prelude.Nothing,
      $sel:autoScalingRole:RunJobFlow' :: Maybe Text
autoScalingRole = forall a. Maybe a
Prelude.Nothing,
      $sel:autoTerminationPolicy:RunJobFlow' :: Maybe AutoTerminationPolicy
autoTerminationPolicy = forall a. Maybe a
Prelude.Nothing,
      $sel:bootstrapActions:RunJobFlow' :: Maybe [BootstrapActionConfig]
bootstrapActions = forall a. Maybe a
Prelude.Nothing,
      $sel:configurations:RunJobFlow' :: Maybe [Configuration]
configurations = forall a. Maybe a
Prelude.Nothing,
      $sel:customAmiId:RunJobFlow' :: Maybe Text
customAmiId = forall a. Maybe a
Prelude.Nothing,
      $sel:ebsRootVolumeSize:RunJobFlow' :: Maybe Int
ebsRootVolumeSize = forall a. Maybe a
Prelude.Nothing,
      $sel:jobFlowRole:RunJobFlow' :: Maybe Text
jobFlowRole = forall a. Maybe a
Prelude.Nothing,
      $sel:kerberosAttributes:RunJobFlow' :: Maybe KerberosAttributes
kerberosAttributes = forall a. Maybe a
Prelude.Nothing,
      $sel:logEncryptionKmsKeyId:RunJobFlow' :: Maybe Text
logEncryptionKmsKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:logUri:RunJobFlow' :: Maybe Text
logUri = forall a. Maybe a
Prelude.Nothing,
      $sel:managedScalingPolicy:RunJobFlow' :: Maybe ManagedScalingPolicy
managedScalingPolicy = forall a. Maybe a
Prelude.Nothing,
      $sel:newSupportedProducts':RunJobFlow' :: Maybe [SupportedProductConfig]
newSupportedProducts' = forall a. Maybe a
Prelude.Nothing,
      $sel:oSReleaseLabel:RunJobFlow' :: Maybe Text
oSReleaseLabel = forall a. Maybe a
Prelude.Nothing,
      $sel:placementGroupConfigs:RunJobFlow' :: Maybe [PlacementGroupConfig]
placementGroupConfigs = forall a. Maybe a
Prelude.Nothing,
      $sel:releaseLabel:RunJobFlow' :: Maybe Text
releaseLabel = forall a. Maybe a
Prelude.Nothing,
      $sel:repoUpgradeOnBoot:RunJobFlow' :: Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot = forall a. Maybe a
Prelude.Nothing,
      $sel:scaleDownBehavior:RunJobFlow' :: Maybe ScaleDownBehavior
scaleDownBehavior = forall a. Maybe a
Prelude.Nothing,
      $sel:securityConfiguration:RunJobFlow' :: Maybe Text
securityConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRole:RunJobFlow' :: Maybe Text
serviceRole = forall a. Maybe a
Prelude.Nothing,
      $sel:stepConcurrencyLevel:RunJobFlow' :: Maybe Int
stepConcurrencyLevel = forall a. Maybe a
Prelude.Nothing,
      $sel:steps:RunJobFlow' :: Maybe [StepConfig]
steps = forall a. Maybe a
Prelude.Nothing,
      $sel:supportedProducts:RunJobFlow' :: Maybe [Text]
supportedProducts = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RunJobFlow' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:visibleToAllUsers:RunJobFlow' :: Maybe Bool
visibleToAllUsers = forall a. Maybe a
Prelude.Nothing,
      $sel:name:RunJobFlow' :: Text
name = Text
pName_,
      $sel:instances:RunJobFlow' :: JobFlowInstancesConfig
instances = JobFlowInstancesConfig
pInstances_
    }

-- | A JSON string for selecting additional features.
runJobFlow_additionalInfo :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_additionalInfo :: Lens' RunJobFlow (Maybe Text)
runJobFlow_additionalInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
additionalInfo :: Maybe Text
$sel:additionalInfo:RunJobFlow' :: RunJobFlow -> Maybe Text
additionalInfo} -> Maybe Text
additionalInfo) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:additionalInfo:RunJobFlow' :: Maybe Text
additionalInfo = Maybe Text
a} :: RunJobFlow)

-- | Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR
-- releases 4.0 and later, @ReleaseLabel@ is used. To specify a custom AMI,
-- use @CustomAmiID@.
runJobFlow_amiVersion :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_amiVersion :: Lens' RunJobFlow (Maybe Text)
runJobFlow_amiVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
amiVersion :: Maybe Text
$sel:amiVersion:RunJobFlow' :: RunJobFlow -> Maybe Text
amiVersion} -> Maybe Text
amiVersion) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:amiVersion:RunJobFlow' :: Maybe Text
amiVersion = Maybe Text
a} :: RunJobFlow)

-- | Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of
-- applications for Amazon EMR to install and configure when launching the
-- cluster. For a list of applications available for each Amazon EMR
-- release version, see the
-- <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/ Amazon EMRRelease Guide>.
runJobFlow_applications :: Lens.Lens' RunJobFlow (Prelude.Maybe [Application])
runJobFlow_applications :: Lens' RunJobFlow (Maybe [Application])
runJobFlow_applications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe [Application]
applications :: Maybe [Application]
$sel:applications:RunJobFlow' :: RunJobFlow -> Maybe [Application]
applications} -> Maybe [Application]
applications) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe [Application]
a -> RunJobFlow
s {$sel:applications:RunJobFlow' :: Maybe [Application]
applications = Maybe [Application]
a} :: RunJobFlow) 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 IAM role for automatic scaling policies. The default role is
-- @EMR_AutoScaling_DefaultRole@. The IAM role provides permissions that
-- the automatic scaling feature requires to launch and terminate EC2
-- instances in an instance group.
runJobFlow_autoScalingRole :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_autoScalingRole :: Lens' RunJobFlow (Maybe Text)
runJobFlow_autoScalingRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
autoScalingRole :: Maybe Text
$sel:autoScalingRole:RunJobFlow' :: RunJobFlow -> Maybe Text
autoScalingRole} -> Maybe Text
autoScalingRole) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:autoScalingRole:RunJobFlow' :: Maybe Text
autoScalingRole = Maybe Text
a} :: RunJobFlow)

-- | Undocumented member.
runJobFlow_autoTerminationPolicy :: Lens.Lens' RunJobFlow (Prelude.Maybe AutoTerminationPolicy)
runJobFlow_autoTerminationPolicy :: Lens' RunJobFlow (Maybe AutoTerminationPolicy)
runJobFlow_autoTerminationPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe AutoTerminationPolicy
autoTerminationPolicy :: Maybe AutoTerminationPolicy
$sel:autoTerminationPolicy:RunJobFlow' :: RunJobFlow -> Maybe AutoTerminationPolicy
autoTerminationPolicy} -> Maybe AutoTerminationPolicy
autoTerminationPolicy) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe AutoTerminationPolicy
a -> RunJobFlow
s {$sel:autoTerminationPolicy:RunJobFlow' :: Maybe AutoTerminationPolicy
autoTerminationPolicy = Maybe AutoTerminationPolicy
a} :: RunJobFlow)

-- | A list of bootstrap actions to run before Hadoop starts on the cluster
-- nodes.
runJobFlow_bootstrapActions :: Lens.Lens' RunJobFlow (Prelude.Maybe [BootstrapActionConfig])
runJobFlow_bootstrapActions :: Lens' RunJobFlow (Maybe [BootstrapActionConfig])
runJobFlow_bootstrapActions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe [BootstrapActionConfig]
bootstrapActions :: Maybe [BootstrapActionConfig]
$sel:bootstrapActions:RunJobFlow' :: RunJobFlow -> Maybe [BootstrapActionConfig]
bootstrapActions} -> Maybe [BootstrapActionConfig]
bootstrapActions) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe [BootstrapActionConfig]
a -> RunJobFlow
s {$sel:bootstrapActions:RunJobFlow' :: Maybe [BootstrapActionConfig]
bootstrapActions = Maybe [BootstrapActionConfig]
a} :: RunJobFlow) 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

-- | For Amazon EMR releases 4.0 and later. The list of configurations
-- supplied for the EMR cluster you are creating.
runJobFlow_configurations :: Lens.Lens' RunJobFlow (Prelude.Maybe [Configuration])
runJobFlow_configurations :: Lens' RunJobFlow (Maybe [Configuration])
runJobFlow_configurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe [Configuration]
configurations :: Maybe [Configuration]
$sel:configurations:RunJobFlow' :: RunJobFlow -> Maybe [Configuration]
configurations} -> Maybe [Configuration]
configurations) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe [Configuration]
a -> RunJobFlow
s {$sel:configurations:RunJobFlow' :: Maybe [Configuration]
configurations = Maybe [Configuration]
a} :: RunJobFlow) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Available only in Amazon EMR version 5.7.0 and later. The ID of a custom
-- Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when
-- it launches cluster EC2 instances. For more information about custom
-- AMIs in Amazon EMR, see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html Using a Custom AMI>
-- in the /Amazon EMR Management Guide/. If omitted, the cluster uses the
-- base Linux AMI for the @ReleaseLabel@ specified. For Amazon EMR versions
-- 2.x and 3.x, use @AmiVersion@ instead.
--
-- For information about creating a custom AMI, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html Creating an Amazon EBS-Backed Linux AMI>
-- in the /Amazon Elastic Compute Cloud User Guide for Linux Instances/.
-- For information about finding an AMI ID, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html Finding a Linux AMI>.
runJobFlow_customAmiId :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_customAmiId :: Lens' RunJobFlow (Maybe Text)
runJobFlow_customAmiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
customAmiId :: Maybe Text
$sel:customAmiId:RunJobFlow' :: RunJobFlow -> Maybe Text
customAmiId} -> Maybe Text
customAmiId) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:customAmiId:RunJobFlow' :: Maybe Text
customAmiId = Maybe Text
a} :: RunJobFlow)

-- | The size, in GiB, of the Amazon EBS root device volume of the Linux AMI
-- that is used for each EC2 instance. Available in Amazon EMR version 4.x
-- and later.
runJobFlow_ebsRootVolumeSize :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Int)
runJobFlow_ebsRootVolumeSize :: Lens' RunJobFlow (Maybe Int)
runJobFlow_ebsRootVolumeSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Int
ebsRootVolumeSize :: Maybe Int
$sel:ebsRootVolumeSize:RunJobFlow' :: RunJobFlow -> Maybe Int
ebsRootVolumeSize} -> Maybe Int
ebsRootVolumeSize) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Int
a -> RunJobFlow
s {$sel:ebsRootVolumeSize:RunJobFlow' :: Maybe Int
ebsRootVolumeSize = Maybe Int
a} :: RunJobFlow)

-- | Also called instance profile and EC2 role. An IAM role for an EMR
-- cluster. The EC2 instances of the cluster assume this role. The default
-- role is @EMR_EC2_DefaultRole@. In order to use the default role, you
-- must have already created it using the CLI or console.
runJobFlow_jobFlowRole :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_jobFlowRole :: Lens' RunJobFlow (Maybe Text)
runJobFlow_jobFlowRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
jobFlowRole :: Maybe Text
$sel:jobFlowRole:RunJobFlow' :: RunJobFlow -> Maybe Text
jobFlowRole} -> Maybe Text
jobFlowRole) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:jobFlowRole:RunJobFlow' :: Maybe Text
jobFlowRole = Maybe Text
a} :: RunJobFlow)

-- | Attributes for Kerberos configuration when Kerberos authentication is
-- enabled using a security configuration. For more information see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html Use Kerberos Authentication>
-- in the /Amazon EMR Management Guide/.
runJobFlow_kerberosAttributes :: Lens.Lens' RunJobFlow (Prelude.Maybe KerberosAttributes)
runJobFlow_kerberosAttributes :: Lens' RunJobFlow (Maybe KerberosAttributes)
runJobFlow_kerberosAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe KerberosAttributes
kerberosAttributes :: Maybe KerberosAttributes
$sel:kerberosAttributes:RunJobFlow' :: RunJobFlow -> Maybe KerberosAttributes
kerberosAttributes} -> Maybe KerberosAttributes
kerberosAttributes) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe KerberosAttributes
a -> RunJobFlow
s {$sel:kerberosAttributes:RunJobFlow' :: Maybe KerberosAttributes
kerberosAttributes = Maybe KerberosAttributes
a} :: RunJobFlow)

-- | The KMS key used for encrypting log files. If a value is not provided,
-- the logs remain encrypted by AES-256. This attribute is only available
-- with Amazon EMR version 5.30.0 and later, excluding Amazon EMR 6.0.0.
runJobFlow_logEncryptionKmsKeyId :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_logEncryptionKmsKeyId :: Lens' RunJobFlow (Maybe Text)
runJobFlow_logEncryptionKmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
logEncryptionKmsKeyId :: Maybe Text
$sel:logEncryptionKmsKeyId:RunJobFlow' :: RunJobFlow -> Maybe Text
logEncryptionKmsKeyId} -> Maybe Text
logEncryptionKmsKeyId) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:logEncryptionKmsKeyId:RunJobFlow' :: Maybe Text
logEncryptionKmsKeyId = Maybe Text
a} :: RunJobFlow)

-- | The location in Amazon S3 to write the log files of the job flow. If a
-- value is not provided, logs are not created.
runJobFlow_logUri :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_logUri :: Lens' RunJobFlow (Maybe Text)
runJobFlow_logUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
logUri :: Maybe Text
$sel:logUri:RunJobFlow' :: RunJobFlow -> Maybe Text
logUri} -> Maybe Text
logUri) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:logUri:RunJobFlow' :: Maybe Text
logUri = Maybe Text
a} :: RunJobFlow)

-- | The specified managed scaling policy for an Amazon EMR cluster.
runJobFlow_managedScalingPolicy :: Lens.Lens' RunJobFlow (Prelude.Maybe ManagedScalingPolicy)
runJobFlow_managedScalingPolicy :: Lens' RunJobFlow (Maybe ManagedScalingPolicy)
runJobFlow_managedScalingPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe ManagedScalingPolicy
managedScalingPolicy :: Maybe ManagedScalingPolicy
$sel:managedScalingPolicy:RunJobFlow' :: RunJobFlow -> Maybe ManagedScalingPolicy
managedScalingPolicy} -> Maybe ManagedScalingPolicy
managedScalingPolicy) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe ManagedScalingPolicy
a -> RunJobFlow
s {$sel:managedScalingPolicy:RunJobFlow' :: Maybe ManagedScalingPolicy
managedScalingPolicy = Maybe ManagedScalingPolicy
a} :: RunJobFlow)

-- | For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and
-- later, use Applications.
--
-- A list of strings that indicates third-party software to use with the
-- job flow that accepts a user argument list. EMR accepts and forwards the
-- argument list to the corresponding installation script as bootstrap
-- action arguments. For more information, see \"Launch a Job Flow on the
-- MapR Distribution for Hadoop\" in the
-- <https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf Amazon EMR Developer Guide>.
-- Supported values are:
--
-- -   \"mapr-m3\" - launch the cluster using MapR M3 Edition.
--
-- -   \"mapr-m5\" - launch the cluster using MapR M5 Edition.
--
-- -   \"mapr\" with the user arguments specifying \"--edition,m3\" or
--     \"--edition,m5\" - launch the job flow using MapR M3 or M5 Edition
--     respectively.
--
-- -   \"mapr-m7\" - launch the cluster using MapR M7 Edition.
--
-- -   \"hunk\" - launch the cluster with the Hunk Big Data Analytics
--     Platform.
--
-- -   \"hue\"- launch the cluster with Hue installed.
--
-- -   \"spark\" - launch the cluster with Apache Spark installed.
--
-- -   \"ganglia\" - launch the cluster with the Ganglia Monitoring System
--     installed.
runJobFlow_newSupportedProducts :: Lens.Lens' RunJobFlow (Prelude.Maybe [SupportedProductConfig])
runJobFlow_newSupportedProducts :: Lens' RunJobFlow (Maybe [SupportedProductConfig])
runJobFlow_newSupportedProducts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe [SupportedProductConfig]
newSupportedProducts' :: Maybe [SupportedProductConfig]
$sel:newSupportedProducts':RunJobFlow' :: RunJobFlow -> Maybe [SupportedProductConfig]
newSupportedProducts'} -> Maybe [SupportedProductConfig]
newSupportedProducts') (\s :: RunJobFlow
s@RunJobFlow' {} Maybe [SupportedProductConfig]
a -> RunJobFlow
s {$sel:newSupportedProducts':RunJobFlow' :: Maybe [SupportedProductConfig]
newSupportedProducts' = Maybe [SupportedProductConfig]
a} :: RunJobFlow) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies a particular Amazon Linux release for all nodes in a cluster
-- launch RunJobFlow request. If a release is not specified, Amazon EMR
-- uses the latest validated Amazon Linux release for cluster launch.
runJobFlow_oSReleaseLabel :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_oSReleaseLabel :: Lens' RunJobFlow (Maybe Text)
runJobFlow_oSReleaseLabel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
oSReleaseLabel :: Maybe Text
$sel:oSReleaseLabel:RunJobFlow' :: RunJobFlow -> Maybe Text
oSReleaseLabel} -> Maybe Text
oSReleaseLabel) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:oSReleaseLabel:RunJobFlow' :: Maybe Text
oSReleaseLabel = Maybe Text
a} :: RunJobFlow)

-- | The specified placement group configuration for an Amazon EMR cluster.
runJobFlow_placementGroupConfigs :: Lens.Lens' RunJobFlow (Prelude.Maybe [PlacementGroupConfig])
runJobFlow_placementGroupConfigs :: Lens' RunJobFlow (Maybe [PlacementGroupConfig])
runJobFlow_placementGroupConfigs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe [PlacementGroupConfig]
placementGroupConfigs :: Maybe [PlacementGroupConfig]
$sel:placementGroupConfigs:RunJobFlow' :: RunJobFlow -> Maybe [PlacementGroupConfig]
placementGroupConfigs} -> Maybe [PlacementGroupConfig]
placementGroupConfigs) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe [PlacementGroupConfig]
a -> RunJobFlow
s {$sel:placementGroupConfigs:RunJobFlow' :: Maybe [PlacementGroupConfig]
placementGroupConfigs = Maybe [PlacementGroupConfig]
a} :: RunJobFlow) 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 Amazon EMR release label, which determines the version of
-- open-source application packages installed on the cluster. Release
-- labels are in the form @emr-x.x.x@, where x.x.x is an Amazon EMR release
-- version such as @emr-5.14.0@. For more information about Amazon EMR
-- release versions and included application versions and features, see
-- <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/>. The release
-- label applies only to Amazon EMR releases version 4.0 and later. Earlier
-- versions use @AmiVersion@.
runJobFlow_releaseLabel :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_releaseLabel :: Lens' RunJobFlow (Maybe Text)
runJobFlow_releaseLabel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
releaseLabel :: Maybe Text
$sel:releaseLabel:RunJobFlow' :: RunJobFlow -> Maybe Text
releaseLabel} -> Maybe Text
releaseLabel) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:releaseLabel:RunJobFlow' :: Maybe Text
releaseLabel = Maybe Text
a} :: RunJobFlow)

-- | Applies only when @CustomAmiID@ is used. Specifies which updates from
-- the Amazon Linux AMI package repositories to apply automatically when
-- the instance boots using the AMI. If omitted, the default is @SECURITY@,
-- which indicates that only security updates are applied. If @NONE@ is
-- specified, no updates are applied, and all updates must be applied
-- manually.
runJobFlow_repoUpgradeOnBoot :: Lens.Lens' RunJobFlow (Prelude.Maybe RepoUpgradeOnBoot)
runJobFlow_repoUpgradeOnBoot :: Lens' RunJobFlow (Maybe RepoUpgradeOnBoot)
runJobFlow_repoUpgradeOnBoot = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot :: Maybe RepoUpgradeOnBoot
$sel:repoUpgradeOnBoot:RunJobFlow' :: RunJobFlow -> Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot} -> Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe RepoUpgradeOnBoot
a -> RunJobFlow
s {$sel:repoUpgradeOnBoot:RunJobFlow' :: Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot = Maybe RepoUpgradeOnBoot
a} :: RunJobFlow)

-- | Specifies the way that individual Amazon EC2 instances terminate when an
-- automatic scale-in activity occurs or an instance group is resized.
-- @TERMINATE_AT_INSTANCE_HOUR@ indicates that Amazon EMR terminates nodes
-- at the instance-hour boundary, regardless of when the request to
-- terminate the instance was submitted. This option is only available with
-- Amazon EMR 5.1.0 and later and is the default for clusters created using
-- that version. @TERMINATE_AT_TASK_COMPLETION@ indicates that Amazon EMR
-- adds nodes to a deny list and drains tasks from nodes before terminating
-- the Amazon EC2 instances, regardless of the instance-hour boundary. With
-- either behavior, Amazon EMR removes the least active nodes first and
-- blocks instance termination if it could lead to HDFS corruption.
-- @TERMINATE_AT_TASK_COMPLETION@ available only in Amazon EMR version
-- 4.1.0 and later, and is the default for versions of Amazon EMR earlier
-- than 5.1.0.
runJobFlow_scaleDownBehavior :: Lens.Lens' RunJobFlow (Prelude.Maybe ScaleDownBehavior)
runJobFlow_scaleDownBehavior :: Lens' RunJobFlow (Maybe ScaleDownBehavior)
runJobFlow_scaleDownBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe ScaleDownBehavior
scaleDownBehavior :: Maybe ScaleDownBehavior
$sel:scaleDownBehavior:RunJobFlow' :: RunJobFlow -> Maybe ScaleDownBehavior
scaleDownBehavior} -> Maybe ScaleDownBehavior
scaleDownBehavior) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe ScaleDownBehavior
a -> RunJobFlow
s {$sel:scaleDownBehavior:RunJobFlow' :: Maybe ScaleDownBehavior
scaleDownBehavior = Maybe ScaleDownBehavior
a} :: RunJobFlow)

-- | The name of a security configuration to apply to the cluster.
runJobFlow_securityConfiguration :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_securityConfiguration :: Lens' RunJobFlow (Maybe Text)
runJobFlow_securityConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
securityConfiguration :: Maybe Text
$sel:securityConfiguration:RunJobFlow' :: RunJobFlow -> Maybe Text
securityConfiguration} -> Maybe Text
securityConfiguration) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:securityConfiguration:RunJobFlow' :: Maybe Text
securityConfiguration = Maybe Text
a} :: RunJobFlow)

-- | The IAM role that Amazon EMR assumes in order to access Amazon Web
-- Services resources on your behalf. If you\'ve created a custom service
-- role path, you must specify it for the service role when you launch your
-- cluster.
runJobFlow_serviceRole :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Text)
runJobFlow_serviceRole :: Lens' RunJobFlow (Maybe Text)
runJobFlow_serviceRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Text
serviceRole :: Maybe Text
$sel:serviceRole:RunJobFlow' :: RunJobFlow -> Maybe Text
serviceRole} -> Maybe Text
serviceRole) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Text
a -> RunJobFlow
s {$sel:serviceRole:RunJobFlow' :: Maybe Text
serviceRole = Maybe Text
a} :: RunJobFlow)

-- | Specifies the number of steps that can be executed concurrently. The
-- default value is @1@. The maximum value is @256@.
runJobFlow_stepConcurrencyLevel :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Int)
runJobFlow_stepConcurrencyLevel :: Lens' RunJobFlow (Maybe Int)
runJobFlow_stepConcurrencyLevel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Int
stepConcurrencyLevel :: Maybe Int
$sel:stepConcurrencyLevel:RunJobFlow' :: RunJobFlow -> Maybe Int
stepConcurrencyLevel} -> Maybe Int
stepConcurrencyLevel) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Int
a -> RunJobFlow
s {$sel:stepConcurrencyLevel:RunJobFlow' :: Maybe Int
stepConcurrencyLevel = Maybe Int
a} :: RunJobFlow)

-- | A list of steps to run.
runJobFlow_steps :: Lens.Lens' RunJobFlow (Prelude.Maybe [StepConfig])
runJobFlow_steps :: Lens' RunJobFlow (Maybe [StepConfig])
runJobFlow_steps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe [StepConfig]
steps :: Maybe [StepConfig]
$sel:steps:RunJobFlow' :: RunJobFlow -> Maybe [StepConfig]
steps} -> Maybe [StepConfig]
steps) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe [StepConfig]
a -> RunJobFlow
s {$sel:steps:RunJobFlow' :: Maybe [StepConfig]
steps = Maybe [StepConfig]
a} :: RunJobFlow) 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

-- | For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and
-- later, use Applications.
--
-- A list of strings that indicates third-party software to use. For more
-- information, see the
-- <https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf Amazon EMR Developer Guide>.
-- Currently supported values are:
--
-- -   \"mapr-m3\" - launch the job flow using MapR M3 Edition.
--
-- -   \"mapr-m5\" - launch the job flow using MapR M5 Edition.
runJobFlow_supportedProducts :: Lens.Lens' RunJobFlow (Prelude.Maybe [Prelude.Text])
runJobFlow_supportedProducts :: Lens' RunJobFlow (Maybe [Text])
runJobFlow_supportedProducts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe [Text]
supportedProducts :: Maybe [Text]
$sel:supportedProducts:RunJobFlow' :: RunJobFlow -> Maybe [Text]
supportedProducts} -> Maybe [Text]
supportedProducts) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe [Text]
a -> RunJobFlow
s {$sel:supportedProducts:RunJobFlow' :: Maybe [Text]
supportedProducts = Maybe [Text]
a} :: RunJobFlow) 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

-- | A list of tags to associate with a cluster and propagate to Amazon EC2
-- instances.
runJobFlow_tags :: Lens.Lens' RunJobFlow (Prelude.Maybe [Tag])
runJobFlow_tags :: Lens' RunJobFlow (Maybe [Tag])
runJobFlow_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RunJobFlow' :: RunJobFlow -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe [Tag]
a -> RunJobFlow
s {$sel:tags:RunJobFlow' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RunJobFlow) 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 VisibleToAllUsers parameter is no longer supported. By default, the
-- value is set to @true@. Setting it to @false@ now has no effect.
--
-- Set this value to @true@ so that IAM principals in the Amazon Web
-- Services account associated with the cluster can perform EMR actions on
-- the cluster that their IAM policies allow. This value defaults to @true@
-- for clusters created using the EMR API or the CLI
-- <https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html create-cluster>
-- command.
--
-- When set to @false@, only the IAM principal that created the cluster and
-- the Amazon Web Services account root user can perform EMR actions for
-- the cluster, regardless of the IAM permissions policies attached to
-- other IAM principals. For more information, see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users Understanding the EMR Cluster VisibleToAllUsers Setting>
-- in the /Amazon EMRManagement Guide/.
runJobFlow_visibleToAllUsers :: Lens.Lens' RunJobFlow (Prelude.Maybe Prelude.Bool)
runJobFlow_visibleToAllUsers :: Lens' RunJobFlow (Maybe Bool)
runJobFlow_visibleToAllUsers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Maybe Bool
visibleToAllUsers :: Maybe Bool
$sel:visibleToAllUsers:RunJobFlow' :: RunJobFlow -> Maybe Bool
visibleToAllUsers} -> Maybe Bool
visibleToAllUsers) (\s :: RunJobFlow
s@RunJobFlow' {} Maybe Bool
a -> RunJobFlow
s {$sel:visibleToAllUsers:RunJobFlow' :: Maybe Bool
visibleToAllUsers = Maybe Bool
a} :: RunJobFlow)

-- | The name of the job flow.
runJobFlow_name :: Lens.Lens' RunJobFlow Prelude.Text
runJobFlow_name :: Lens' RunJobFlow Text
runJobFlow_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {Text
name :: Text
$sel:name:RunJobFlow' :: RunJobFlow -> Text
name} -> Text
name) (\s :: RunJobFlow
s@RunJobFlow' {} Text
a -> RunJobFlow
s {$sel:name:RunJobFlow' :: Text
name = Text
a} :: RunJobFlow)

-- | A specification of the number and type of Amazon EC2 instances.
runJobFlow_instances :: Lens.Lens' RunJobFlow JobFlowInstancesConfig
runJobFlow_instances :: Lens' RunJobFlow JobFlowInstancesConfig
runJobFlow_instances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlow' {JobFlowInstancesConfig
instances :: JobFlowInstancesConfig
$sel:instances:RunJobFlow' :: RunJobFlow -> JobFlowInstancesConfig
instances} -> JobFlowInstancesConfig
instances) (\s :: RunJobFlow
s@RunJobFlow' {} JobFlowInstancesConfig
a -> RunJobFlow
s {$sel:instances:RunJobFlow' :: JobFlowInstancesConfig
instances = JobFlowInstancesConfig
a} :: RunJobFlow)

instance Core.AWSRequest RunJobFlow where
  type AWSResponse RunJobFlow = RunJobFlowResponse
  request :: (Service -> Service) -> RunJobFlow -> Request RunJobFlow
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RunJobFlow
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RunJobFlow)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe Text -> Int -> RunJobFlowResponse
RunJobFlowResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ClusterArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobFlowId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable RunJobFlow where
  hashWithSalt :: Int -> RunJobFlow -> Int
hashWithSalt Int
_salt RunJobFlow' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Application]
Maybe [Configuration]
Maybe [PlacementGroupConfig]
Maybe [BootstrapActionConfig]
Maybe [StepConfig]
Maybe [SupportedProductConfig]
Maybe [Tag]
Maybe Text
Maybe AutoTerminationPolicy
Maybe KerberosAttributes
Maybe ManagedScalingPolicy
Maybe RepoUpgradeOnBoot
Maybe ScaleDownBehavior
Text
JobFlowInstancesConfig
instances :: JobFlowInstancesConfig
name :: Text
visibleToAllUsers :: Maybe Bool
tags :: Maybe [Tag]
supportedProducts :: Maybe [Text]
steps :: Maybe [StepConfig]
stepConcurrencyLevel :: Maybe Int
serviceRole :: Maybe Text
securityConfiguration :: Maybe Text
scaleDownBehavior :: Maybe ScaleDownBehavior
repoUpgradeOnBoot :: Maybe RepoUpgradeOnBoot
releaseLabel :: Maybe Text
placementGroupConfigs :: Maybe [PlacementGroupConfig]
oSReleaseLabel :: Maybe Text
newSupportedProducts' :: Maybe [SupportedProductConfig]
managedScalingPolicy :: Maybe ManagedScalingPolicy
logUri :: Maybe Text
logEncryptionKmsKeyId :: Maybe Text
kerberosAttributes :: Maybe KerberosAttributes
jobFlowRole :: Maybe Text
ebsRootVolumeSize :: Maybe Int
customAmiId :: Maybe Text
configurations :: Maybe [Configuration]
bootstrapActions :: Maybe [BootstrapActionConfig]
autoTerminationPolicy :: Maybe AutoTerminationPolicy
autoScalingRole :: Maybe Text
applications :: Maybe [Application]
amiVersion :: Maybe Text
additionalInfo :: Maybe Text
$sel:instances:RunJobFlow' :: RunJobFlow -> JobFlowInstancesConfig
$sel:name:RunJobFlow' :: RunJobFlow -> Text
$sel:visibleToAllUsers:RunJobFlow' :: RunJobFlow -> Maybe Bool
$sel:tags:RunJobFlow' :: RunJobFlow -> Maybe [Tag]
$sel:supportedProducts:RunJobFlow' :: RunJobFlow -> Maybe [Text]
$sel:steps:RunJobFlow' :: RunJobFlow -> Maybe [StepConfig]
$sel:stepConcurrencyLevel:RunJobFlow' :: RunJobFlow -> Maybe Int
$sel:serviceRole:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:securityConfiguration:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:scaleDownBehavior:RunJobFlow' :: RunJobFlow -> Maybe ScaleDownBehavior
$sel:repoUpgradeOnBoot:RunJobFlow' :: RunJobFlow -> Maybe RepoUpgradeOnBoot
$sel:releaseLabel:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:placementGroupConfigs:RunJobFlow' :: RunJobFlow -> Maybe [PlacementGroupConfig]
$sel:oSReleaseLabel:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:newSupportedProducts':RunJobFlow' :: RunJobFlow -> Maybe [SupportedProductConfig]
$sel:managedScalingPolicy:RunJobFlow' :: RunJobFlow -> Maybe ManagedScalingPolicy
$sel:logUri:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:logEncryptionKmsKeyId:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:kerberosAttributes:RunJobFlow' :: RunJobFlow -> Maybe KerberosAttributes
$sel:jobFlowRole:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:ebsRootVolumeSize:RunJobFlow' :: RunJobFlow -> Maybe Int
$sel:customAmiId:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:configurations:RunJobFlow' :: RunJobFlow -> Maybe [Configuration]
$sel:bootstrapActions:RunJobFlow' :: RunJobFlow -> Maybe [BootstrapActionConfig]
$sel:autoTerminationPolicy:RunJobFlow' :: RunJobFlow -> Maybe AutoTerminationPolicy
$sel:autoScalingRole:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:applications:RunJobFlow' :: RunJobFlow -> Maybe [Application]
$sel:amiVersion:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:additionalInfo:RunJobFlow' :: RunJobFlow -> 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 Text
amiVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Application]
applications
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
autoScalingRole
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutoTerminationPolicy
autoTerminationPolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [BootstrapActionConfig]
bootstrapActions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Configuration]
configurations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customAmiId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
ebsRootVolumeSize
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobFlowRole
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KerberosAttributes
kerberosAttributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logEncryptionKmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logUri
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ManagedScalingPolicy
managedScalingPolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SupportedProductConfig]
newSupportedProducts'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
oSReleaseLabel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [PlacementGroupConfig]
placementGroupConfigs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
releaseLabel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScaleDownBehavior
scaleDownBehavior
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
securityConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceRole
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
stepConcurrencyLevel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [StepConfig]
steps
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
supportedProducts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
visibleToAllUsers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobFlowInstancesConfig
instances

instance Prelude.NFData RunJobFlow where
  rnf :: RunJobFlow -> ()
rnf RunJobFlow' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Application]
Maybe [Configuration]
Maybe [PlacementGroupConfig]
Maybe [BootstrapActionConfig]
Maybe [StepConfig]
Maybe [SupportedProductConfig]
Maybe [Tag]
Maybe Text
Maybe AutoTerminationPolicy
Maybe KerberosAttributes
Maybe ManagedScalingPolicy
Maybe RepoUpgradeOnBoot
Maybe ScaleDownBehavior
Text
JobFlowInstancesConfig
instances :: JobFlowInstancesConfig
name :: Text
visibleToAllUsers :: Maybe Bool
tags :: Maybe [Tag]
supportedProducts :: Maybe [Text]
steps :: Maybe [StepConfig]
stepConcurrencyLevel :: Maybe Int
serviceRole :: Maybe Text
securityConfiguration :: Maybe Text
scaleDownBehavior :: Maybe ScaleDownBehavior
repoUpgradeOnBoot :: Maybe RepoUpgradeOnBoot
releaseLabel :: Maybe Text
placementGroupConfigs :: Maybe [PlacementGroupConfig]
oSReleaseLabel :: Maybe Text
newSupportedProducts' :: Maybe [SupportedProductConfig]
managedScalingPolicy :: Maybe ManagedScalingPolicy
logUri :: Maybe Text
logEncryptionKmsKeyId :: Maybe Text
kerberosAttributes :: Maybe KerberosAttributes
jobFlowRole :: Maybe Text
ebsRootVolumeSize :: Maybe Int
customAmiId :: Maybe Text
configurations :: Maybe [Configuration]
bootstrapActions :: Maybe [BootstrapActionConfig]
autoTerminationPolicy :: Maybe AutoTerminationPolicy
autoScalingRole :: Maybe Text
applications :: Maybe [Application]
amiVersion :: Maybe Text
additionalInfo :: Maybe Text
$sel:instances:RunJobFlow' :: RunJobFlow -> JobFlowInstancesConfig
$sel:name:RunJobFlow' :: RunJobFlow -> Text
$sel:visibleToAllUsers:RunJobFlow' :: RunJobFlow -> Maybe Bool
$sel:tags:RunJobFlow' :: RunJobFlow -> Maybe [Tag]
$sel:supportedProducts:RunJobFlow' :: RunJobFlow -> Maybe [Text]
$sel:steps:RunJobFlow' :: RunJobFlow -> Maybe [StepConfig]
$sel:stepConcurrencyLevel:RunJobFlow' :: RunJobFlow -> Maybe Int
$sel:serviceRole:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:securityConfiguration:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:scaleDownBehavior:RunJobFlow' :: RunJobFlow -> Maybe ScaleDownBehavior
$sel:repoUpgradeOnBoot:RunJobFlow' :: RunJobFlow -> Maybe RepoUpgradeOnBoot
$sel:releaseLabel:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:placementGroupConfigs:RunJobFlow' :: RunJobFlow -> Maybe [PlacementGroupConfig]
$sel:oSReleaseLabel:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:newSupportedProducts':RunJobFlow' :: RunJobFlow -> Maybe [SupportedProductConfig]
$sel:managedScalingPolicy:RunJobFlow' :: RunJobFlow -> Maybe ManagedScalingPolicy
$sel:logUri:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:logEncryptionKmsKeyId:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:kerberosAttributes:RunJobFlow' :: RunJobFlow -> Maybe KerberosAttributes
$sel:jobFlowRole:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:ebsRootVolumeSize:RunJobFlow' :: RunJobFlow -> Maybe Int
$sel:customAmiId:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:configurations:RunJobFlow' :: RunJobFlow -> Maybe [Configuration]
$sel:bootstrapActions:RunJobFlow' :: RunJobFlow -> Maybe [BootstrapActionConfig]
$sel:autoTerminationPolicy:RunJobFlow' :: RunJobFlow -> Maybe AutoTerminationPolicy
$sel:autoScalingRole:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:applications:RunJobFlow' :: RunJobFlow -> Maybe [Application]
$sel:amiVersion:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:additionalInfo:RunJobFlow' :: RunJobFlow -> 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 Text
amiVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Application]
applications
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
autoScalingRole
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AutoTerminationPolicy
autoTerminationPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [BootstrapActionConfig]
bootstrapActions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Configuration]
configurations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customAmiId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
ebsRootVolumeSize
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobFlowRole
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KerberosAttributes
kerberosAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logEncryptionKmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ManagedScalingPolicy
managedScalingPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SupportedProductConfig]
newSupportedProducts'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
oSReleaseLabel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PlacementGroupConfig]
placementGroupConfigs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
releaseLabel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ScaleDownBehavior
scaleDownBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
securityConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceRole
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Int
stepConcurrencyLevel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [StepConfig]
steps
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Text]
supportedProducts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Bool
visibleToAllUsers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        JobFlowInstancesConfig
instances

instance Data.ToHeaders RunJobFlow where
  toHeaders :: RunJobFlow -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"ElasticMapReduce.RunJobFlow" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON RunJobFlow where
  toJSON :: RunJobFlow -> Value
toJSON RunJobFlow' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Application]
Maybe [Configuration]
Maybe [PlacementGroupConfig]
Maybe [BootstrapActionConfig]
Maybe [StepConfig]
Maybe [SupportedProductConfig]
Maybe [Tag]
Maybe Text
Maybe AutoTerminationPolicy
Maybe KerberosAttributes
Maybe ManagedScalingPolicy
Maybe RepoUpgradeOnBoot
Maybe ScaleDownBehavior
Text
JobFlowInstancesConfig
instances :: JobFlowInstancesConfig
name :: Text
visibleToAllUsers :: Maybe Bool
tags :: Maybe [Tag]
supportedProducts :: Maybe [Text]
steps :: Maybe [StepConfig]
stepConcurrencyLevel :: Maybe Int
serviceRole :: Maybe Text
securityConfiguration :: Maybe Text
scaleDownBehavior :: Maybe ScaleDownBehavior
repoUpgradeOnBoot :: Maybe RepoUpgradeOnBoot
releaseLabel :: Maybe Text
placementGroupConfigs :: Maybe [PlacementGroupConfig]
oSReleaseLabel :: Maybe Text
newSupportedProducts' :: Maybe [SupportedProductConfig]
managedScalingPolicy :: Maybe ManagedScalingPolicy
logUri :: Maybe Text
logEncryptionKmsKeyId :: Maybe Text
kerberosAttributes :: Maybe KerberosAttributes
jobFlowRole :: Maybe Text
ebsRootVolumeSize :: Maybe Int
customAmiId :: Maybe Text
configurations :: Maybe [Configuration]
bootstrapActions :: Maybe [BootstrapActionConfig]
autoTerminationPolicy :: Maybe AutoTerminationPolicy
autoScalingRole :: Maybe Text
applications :: Maybe [Application]
amiVersion :: Maybe Text
additionalInfo :: Maybe Text
$sel:instances:RunJobFlow' :: RunJobFlow -> JobFlowInstancesConfig
$sel:name:RunJobFlow' :: RunJobFlow -> Text
$sel:visibleToAllUsers:RunJobFlow' :: RunJobFlow -> Maybe Bool
$sel:tags:RunJobFlow' :: RunJobFlow -> Maybe [Tag]
$sel:supportedProducts:RunJobFlow' :: RunJobFlow -> Maybe [Text]
$sel:steps:RunJobFlow' :: RunJobFlow -> Maybe [StepConfig]
$sel:stepConcurrencyLevel:RunJobFlow' :: RunJobFlow -> Maybe Int
$sel:serviceRole:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:securityConfiguration:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:scaleDownBehavior:RunJobFlow' :: RunJobFlow -> Maybe ScaleDownBehavior
$sel:repoUpgradeOnBoot:RunJobFlow' :: RunJobFlow -> Maybe RepoUpgradeOnBoot
$sel:releaseLabel:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:placementGroupConfigs:RunJobFlow' :: RunJobFlow -> Maybe [PlacementGroupConfig]
$sel:oSReleaseLabel:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:newSupportedProducts':RunJobFlow' :: RunJobFlow -> Maybe [SupportedProductConfig]
$sel:managedScalingPolicy:RunJobFlow' :: RunJobFlow -> Maybe ManagedScalingPolicy
$sel:logUri:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:logEncryptionKmsKeyId:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:kerberosAttributes:RunJobFlow' :: RunJobFlow -> Maybe KerberosAttributes
$sel:jobFlowRole:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:ebsRootVolumeSize:RunJobFlow' :: RunJobFlow -> Maybe Int
$sel:customAmiId:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:configurations:RunJobFlow' :: RunJobFlow -> Maybe [Configuration]
$sel:bootstrapActions:RunJobFlow' :: RunJobFlow -> Maybe [BootstrapActionConfig]
$sel:autoTerminationPolicy:RunJobFlow' :: RunJobFlow -> Maybe AutoTerminationPolicy
$sel:autoScalingRole:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:applications:RunJobFlow' :: RunJobFlow -> Maybe [Application]
$sel:amiVersion:RunJobFlow' :: RunJobFlow -> Maybe Text
$sel:additionalInfo:RunJobFlow' :: RunJobFlow -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AdditionalInfo" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
additionalInfo,
            (Key
"AmiVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
amiVersion,
            (Key
"Applications" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Application]
applications,
            (Key
"AutoScalingRole" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
autoScalingRole,
            (Key
"AutoTerminationPolicy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoTerminationPolicy
autoTerminationPolicy,
            (Key
"BootstrapActions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [BootstrapActionConfig]
bootstrapActions,
            (Key
"Configurations" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Configuration]
configurations,
            (Key
"CustomAmiId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customAmiId,
            (Key
"EbsRootVolumeSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
ebsRootVolumeSize,
            (Key
"JobFlowRole" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jobFlowRole,
            (Key
"KerberosAttributes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KerberosAttributes
kerberosAttributes,
            (Key
"LogEncryptionKmsKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
logEncryptionKmsKeyId,
            (Key
"LogUri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
logUri,
            (Key
"ManagedScalingPolicy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedScalingPolicy
managedScalingPolicy,
            (Key
"NewSupportedProducts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SupportedProductConfig]
newSupportedProducts',
            (Key
"OSReleaseLabel" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
oSReleaseLabel,
            (Key
"PlacementGroupConfigs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PlacementGroupConfig]
placementGroupConfigs,
            (Key
"ReleaseLabel" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
releaseLabel,
            (Key
"RepoUpgradeOnBoot" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot,
            (Key
"ScaleDownBehavior" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScaleDownBehavior
scaleDownBehavior,
            (Key
"SecurityConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
securityConfiguration,
            (Key
"ServiceRole" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serviceRole,
            (Key
"StepConcurrencyLevel" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
stepConcurrencyLevel,
            (Key
"Steps" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StepConfig]
steps,
            (Key
"SupportedProducts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
supportedProducts,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            (Key
"VisibleToAllUsers" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
visibleToAllUsers,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"Instances" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= JobFlowInstancesConfig
instances)
          ]
      )

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

instance Data.ToQuery RunJobFlow where
  toQuery :: RunJobFlow -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | The result of the RunJobFlow operation.
--
-- /See:/ 'newRunJobFlowResponse' smart constructor.
data RunJobFlowResponse = RunJobFlowResponse'
  { -- | The Amazon Resource Name (ARN) of the cluster.
    RunJobFlowResponse -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the job flow.
    RunJobFlowResponse -> Maybe Text
jobFlowId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    RunJobFlowResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RunJobFlowResponse -> RunJobFlowResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunJobFlowResponse -> RunJobFlowResponse -> Bool
$c/= :: RunJobFlowResponse -> RunJobFlowResponse -> Bool
== :: RunJobFlowResponse -> RunJobFlowResponse -> Bool
$c== :: RunJobFlowResponse -> RunJobFlowResponse -> Bool
Prelude.Eq, ReadPrec [RunJobFlowResponse]
ReadPrec RunJobFlowResponse
Int -> ReadS RunJobFlowResponse
ReadS [RunJobFlowResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RunJobFlowResponse]
$creadListPrec :: ReadPrec [RunJobFlowResponse]
readPrec :: ReadPrec RunJobFlowResponse
$creadPrec :: ReadPrec RunJobFlowResponse
readList :: ReadS [RunJobFlowResponse]
$creadList :: ReadS [RunJobFlowResponse]
readsPrec :: Int -> ReadS RunJobFlowResponse
$creadsPrec :: Int -> ReadS RunJobFlowResponse
Prelude.Read, Int -> RunJobFlowResponse -> ShowS
[RunJobFlowResponse] -> ShowS
RunJobFlowResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunJobFlowResponse] -> ShowS
$cshowList :: [RunJobFlowResponse] -> ShowS
show :: RunJobFlowResponse -> String
$cshow :: RunJobFlowResponse -> String
showsPrec :: Int -> RunJobFlowResponse -> ShowS
$cshowsPrec :: Int -> RunJobFlowResponse -> ShowS
Prelude.Show, forall x. Rep RunJobFlowResponse x -> RunJobFlowResponse
forall x. RunJobFlowResponse -> Rep RunJobFlowResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RunJobFlowResponse x -> RunJobFlowResponse
$cfrom :: forall x. RunJobFlowResponse -> Rep RunJobFlowResponse x
Prelude.Generic)

-- |
-- Create a value of 'RunJobFlowResponse' 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:
--
-- 'clusterArn', 'runJobFlowResponse_clusterArn' - The Amazon Resource Name (ARN) of the cluster.
--
-- 'jobFlowId', 'runJobFlowResponse_jobFlowId' - A unique identifier for the job flow.
--
-- 'httpStatus', 'runJobFlowResponse_httpStatus' - The response's http status code.
newRunJobFlowResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RunJobFlowResponse
newRunJobFlowResponse :: Int -> RunJobFlowResponse
newRunJobFlowResponse Int
pHttpStatus_ =
  RunJobFlowResponse'
    { $sel:clusterArn:RunJobFlowResponse' :: Maybe Text
clusterArn = forall a. Maybe a
Prelude.Nothing,
      $sel:jobFlowId:RunJobFlowResponse' :: Maybe Text
jobFlowId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RunJobFlowResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the cluster.
runJobFlowResponse_clusterArn :: Lens.Lens' RunJobFlowResponse (Prelude.Maybe Prelude.Text)
runJobFlowResponse_clusterArn :: Lens' RunJobFlowResponse (Maybe Text)
runJobFlowResponse_clusterArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlowResponse' {Maybe Text
clusterArn :: Maybe Text
$sel:clusterArn:RunJobFlowResponse' :: RunJobFlowResponse -> Maybe Text
clusterArn} -> Maybe Text
clusterArn) (\s :: RunJobFlowResponse
s@RunJobFlowResponse' {} Maybe Text
a -> RunJobFlowResponse
s {$sel:clusterArn:RunJobFlowResponse' :: Maybe Text
clusterArn = Maybe Text
a} :: RunJobFlowResponse)

-- | A unique identifier for the job flow.
runJobFlowResponse_jobFlowId :: Lens.Lens' RunJobFlowResponse (Prelude.Maybe Prelude.Text)
runJobFlowResponse_jobFlowId :: Lens' RunJobFlowResponse (Maybe Text)
runJobFlowResponse_jobFlowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlowResponse' {Maybe Text
jobFlowId :: Maybe Text
$sel:jobFlowId:RunJobFlowResponse' :: RunJobFlowResponse -> Maybe Text
jobFlowId} -> Maybe Text
jobFlowId) (\s :: RunJobFlowResponse
s@RunJobFlowResponse' {} Maybe Text
a -> RunJobFlowResponse
s {$sel:jobFlowId:RunJobFlowResponse' :: Maybe Text
jobFlowId = Maybe Text
a} :: RunJobFlowResponse)

-- | The response's http status code.
runJobFlowResponse_httpStatus :: Lens.Lens' RunJobFlowResponse Prelude.Int
runJobFlowResponse_httpStatus :: Lens' RunJobFlowResponse Int
runJobFlowResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunJobFlowResponse' {Int
httpStatus :: Int
$sel:httpStatus:RunJobFlowResponse' :: RunJobFlowResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RunJobFlowResponse
s@RunJobFlowResponse' {} Int
a -> RunJobFlowResponse
s {$sel:httpStatus:RunJobFlowResponse' :: Int
httpStatus = Int
a} :: RunJobFlowResponse)

instance Prelude.NFData RunJobFlowResponse where
  rnf :: RunJobFlowResponse -> ()
rnf RunJobFlowResponse' {Int
Maybe Text
httpStatus :: Int
jobFlowId :: Maybe Text
clusterArn :: Maybe Text
$sel:httpStatus:RunJobFlowResponse' :: RunJobFlowResponse -> Int
$sel:jobFlowId:RunJobFlowResponse' :: RunJobFlowResponse -> Maybe Text
$sel:clusterArn:RunJobFlowResponse' :: RunJobFlowResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobFlowId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus