{-# 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.EKS.CreateNodegroup
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a managed node group for an Amazon EKS cluster. You can only
-- create a node group for your cluster that is equal to the current
-- Kubernetes version for the cluster. All node groups are created with the
-- latest AMI release version for the respective minor Kubernetes version
-- of the cluster, unless you deploy a custom AMI using a launch template.
-- For more information about using launch templates, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>.
--
-- An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and
-- associated Amazon EC2 instances that are managed by Amazon Web Services
-- for an Amazon EKS cluster. Each node group uses a version of the Amazon
-- EKS optimized Amazon Linux 2 AMI. For more information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html Managed Node Groups>
-- in the /Amazon EKS User Guide/.
module Amazonka.EKS.CreateNodegroup
  ( -- * Creating a Request
    CreateNodegroup (..),
    newCreateNodegroup,

    -- * Request Lenses
    createNodegroup_capacityType,
    createNodegroup_instanceTypes,
    createNodegroup_taints,
    createNodegroup_remoteAccess,
    createNodegroup_diskSize,
    createNodegroup_releaseVersion,
    createNodegroup_scalingConfig,
    createNodegroup_version,
    createNodegroup_launchTemplate,
    createNodegroup_labels,
    createNodegroup_amiType,
    createNodegroup_clientRequestToken,
    createNodegroup_updateConfig,
    createNodegroup_tags,
    createNodegroup_clusterName,
    createNodegroup_nodegroupName,
    createNodegroup_subnets,
    createNodegroup_nodeRole,

    -- * Destructuring the Response
    CreateNodegroupResponse (..),
    newCreateNodegroupResponse,

    -- * Response Lenses
    createNodegroupResponse_nodegroup,
    createNodegroupResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateNodegroup' smart constructor.
data CreateNodegroup = CreateNodegroup'
  { -- | The capacity type for your node group.
    CreateNodegroup -> Maybe CapacityTypes
capacityType :: Prelude.Maybe CapacityTypes,
    -- | Specify the instance types for a node group. If you specify a GPU
    -- instance type, be sure to specify @AL2_x86_64_GPU@ with the @amiType@
    -- parameter. If you specify @launchTemplate@, then you can specify zero or
    -- one instance type in your launch template /or/ you can specify 0-20
    -- instance types for @instanceTypes@. If however, you specify an instance
    -- type in your launch template /and/ specify any @instanceTypes@, the node
    -- group deployment will fail. If you don\'t specify an instance type in a
    -- launch template or for @instanceTypes@, then @t3.medium@ is used, by
    -- default. If you specify @Spot@ for @capacityType@, then we recommend
    -- specifying multiple values for @instanceTypes@. For more information,
    -- see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types Managed node group capacity types>
    -- and
    -- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
    -- in the /Amazon EKS User Guide/.
    CreateNodegroup -> Maybe [Text]
instanceTypes :: Prelude.Maybe [Prelude.Text],
    -- | The Kubernetes taints to be applied to the nodes in the node group.
    CreateNodegroup -> Maybe [Taint]
taints :: Prelude.Maybe [Taint],
    -- | The remote access (SSH) configuration to use with your node group. If
    -- you specify @launchTemplate@, then don\'t specify @remoteAccess@, or the
    -- node group deployment will fail. For more information about using launch
    -- templates with Amazon EKS, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
    -- in the Amazon EKS User Guide.
    CreateNodegroup -> Maybe RemoteAccessConfig
remoteAccess :: Prelude.Maybe RemoteAccessConfig,
    -- | The root device disk size (in GiB) for your node group instances. The
    -- default disk size is 20 GiB. If you specify @launchTemplate@, then
    -- don\'t specify @diskSize@, or the node group deployment will fail. For
    -- more information about using launch templates with Amazon EKS, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
    -- in the Amazon EKS User Guide.
    CreateNodegroup -> Maybe Int
diskSize :: Prelude.Maybe Prelude.Int,
    -- | The AMI version of the Amazon EKS optimized AMI to use with your node
    -- group. By default, the latest available AMI version for the node
    -- group\'s current Kubernetes version is used. For more information, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html Amazon EKS optimized Amazon Linux 2 AMI versions>
    -- in the /Amazon EKS User Guide/. If you specify @launchTemplate@, and
    -- your launch template uses a custom AMI, then don\'t specify
    -- @releaseVersion@, or the node group deployment will fail. For more
    -- information about using launch templates with Amazon EKS, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
    -- in the Amazon EKS User Guide.
    CreateNodegroup -> Maybe Text
releaseVersion :: Prelude.Maybe Prelude.Text,
    -- | The scaling configuration details for the Auto Scaling group that is
    -- created for your node group.
    CreateNodegroup -> Maybe NodegroupScalingConfig
scalingConfig :: Prelude.Maybe NodegroupScalingConfig,
    -- | The Kubernetes version to use for your managed nodes. By default, the
    -- Kubernetes version of the cluster is used, and this is the only accepted
    -- specified value. If you specify @launchTemplate@, and your launch
    -- template uses a custom AMI, then don\'t specify @version@, or the node
    -- group deployment will fail. For more information about using launch
    -- templates with Amazon EKS, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
    -- in the Amazon EKS User Guide.
    CreateNodegroup -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | An object representing a node group\'s launch template specification. If
    -- specified, then do not specify @instanceTypes@, @diskSize@, or
    -- @remoteAccess@ and make sure that the launch template meets the
    -- requirements in @launchTemplateSpecification@.
    CreateNodegroup -> Maybe LaunchTemplateSpecification
launchTemplate :: Prelude.Maybe LaunchTemplateSpecification,
    -- | The Kubernetes labels to be applied to the nodes in the node group when
    -- they are created.
    CreateNodegroup -> Maybe (HashMap Text Text)
labels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The AMI type for your node group. GPU instance types should use the
    -- @AL2_x86_64_GPU@ AMI type. Non-GPU instances should use the @AL2_x86_64@
    -- AMI type. Arm instances should use the @AL2_ARM_64@ AMI type. All types
    -- use the Amazon EKS optimized Amazon Linux 2 AMI. If you specify
    -- @launchTemplate@, and your launch template uses a custom AMI, then
    -- don\'t specify @amiType@, or the node group deployment will fail. For
    -- more information about using launch templates with Amazon EKS, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
    -- in the Amazon EKS User Guide.
    CreateNodegroup -> Maybe AMITypes
amiType :: Prelude.Maybe AMITypes,
    -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    CreateNodegroup -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The node group update configuration.
    CreateNodegroup -> Maybe NodegroupUpdateConfig
updateConfig :: Prelude.Maybe NodegroupUpdateConfig,
    -- | The metadata to apply to the node group to assist with categorization
    -- and organization. Each tag consists of a key and an optional value, both
    -- of which you define. Node group tags do not propagate to any other
    -- resources associated with the node group, such as the Amazon EC2
    -- instances or subnets.
    CreateNodegroup -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the cluster to create the node group in.
    CreateNodegroup -> Text
clusterName :: Prelude.Text,
    -- | The unique name to give your node group.
    CreateNodegroup -> Text
nodegroupName :: Prelude.Text,
    -- | The subnets to use for the Auto Scaling group that is created for your
    -- node group. If you specify @launchTemplate@, then don\'t specify
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html SubnetId>
    -- in your launch template, or the node group deployment will fail. For
    -- more information about using launch templates with Amazon EKS, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
    -- in the Amazon EKS User Guide.
    CreateNodegroup -> [Text]
subnets :: [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of the IAM role to associate with your
    -- node group. The Amazon EKS worker node @kubelet@ daemon makes calls to
    -- Amazon Web Services APIs on your behalf. Nodes receive permissions for
    -- these API calls through an IAM instance profile and associated policies.
    -- Before you can launch nodes and register them into a cluster, you must
    -- create an IAM role for those nodes to use when they are launched. For
    -- more information, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/worker_node_IAM_role.html Amazon EKS node IAM role>
    -- in the //Amazon EKS User Guide// . If you specify @launchTemplate@, then
    -- don\'t specify
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html IamInstanceProfile>
    -- in your launch template, or the node group deployment will fail. For
    -- more information about using launch templates with Amazon EKS, see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
    -- in the Amazon EKS User Guide.
    CreateNodegroup -> Text
nodeRole :: Prelude.Text
  }
  deriving (CreateNodegroup -> CreateNodegroup -> Bool
(CreateNodegroup -> CreateNodegroup -> Bool)
-> (CreateNodegroup -> CreateNodegroup -> Bool)
-> Eq CreateNodegroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateNodegroup -> CreateNodegroup -> Bool
$c/= :: CreateNodegroup -> CreateNodegroup -> Bool
== :: CreateNodegroup -> CreateNodegroup -> Bool
$c== :: CreateNodegroup -> CreateNodegroup -> Bool
Prelude.Eq, ReadPrec [CreateNodegroup]
ReadPrec CreateNodegroup
Int -> ReadS CreateNodegroup
ReadS [CreateNodegroup]
(Int -> ReadS CreateNodegroup)
-> ReadS [CreateNodegroup]
-> ReadPrec CreateNodegroup
-> ReadPrec [CreateNodegroup]
-> Read CreateNodegroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateNodegroup]
$creadListPrec :: ReadPrec [CreateNodegroup]
readPrec :: ReadPrec CreateNodegroup
$creadPrec :: ReadPrec CreateNodegroup
readList :: ReadS [CreateNodegroup]
$creadList :: ReadS [CreateNodegroup]
readsPrec :: Int -> ReadS CreateNodegroup
$creadsPrec :: Int -> ReadS CreateNodegroup
Prelude.Read, Int -> CreateNodegroup -> ShowS
[CreateNodegroup] -> ShowS
CreateNodegroup -> String
(Int -> CreateNodegroup -> ShowS)
-> (CreateNodegroup -> String)
-> ([CreateNodegroup] -> ShowS)
-> Show CreateNodegroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateNodegroup] -> ShowS
$cshowList :: [CreateNodegroup] -> ShowS
show :: CreateNodegroup -> String
$cshow :: CreateNodegroup -> String
showsPrec :: Int -> CreateNodegroup -> ShowS
$cshowsPrec :: Int -> CreateNodegroup -> ShowS
Prelude.Show, (forall x. CreateNodegroup -> Rep CreateNodegroup x)
-> (forall x. Rep CreateNodegroup x -> CreateNodegroup)
-> Generic CreateNodegroup
forall x. Rep CreateNodegroup x -> CreateNodegroup
forall x. CreateNodegroup -> Rep CreateNodegroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateNodegroup x -> CreateNodegroup
$cfrom :: forall x. CreateNodegroup -> Rep CreateNodegroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateNodegroup' 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:
--
-- 'capacityType', 'createNodegroup_capacityType' - The capacity type for your node group.
--
-- 'instanceTypes', 'createNodegroup_instanceTypes' - Specify the instance types for a node group. If you specify a GPU
-- instance type, be sure to specify @AL2_x86_64_GPU@ with the @amiType@
-- parameter. If you specify @launchTemplate@, then you can specify zero or
-- one instance type in your launch template /or/ you can specify 0-20
-- instance types for @instanceTypes@. If however, you specify an instance
-- type in your launch template /and/ specify any @instanceTypes@, the node
-- group deployment will fail. If you don\'t specify an instance type in a
-- launch template or for @instanceTypes@, then @t3.medium@ is used, by
-- default. If you specify @Spot@ for @capacityType@, then we recommend
-- specifying multiple values for @instanceTypes@. For more information,
-- see
-- <https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types Managed node group capacity types>
-- and
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the /Amazon EKS User Guide/.
--
-- 'taints', 'createNodegroup_taints' - The Kubernetes taints to be applied to the nodes in the node group.
--
-- 'remoteAccess', 'createNodegroup_remoteAccess' - The remote access (SSH) configuration to use with your node group. If
-- you specify @launchTemplate@, then don\'t specify @remoteAccess@, or the
-- node group deployment will fail. For more information about using launch
-- templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
--
-- 'diskSize', 'createNodegroup_diskSize' - The root device disk size (in GiB) for your node group instances. The
-- default disk size is 20 GiB. If you specify @launchTemplate@, then
-- don\'t specify @diskSize@, or the node group deployment will fail. For
-- more information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
--
-- 'releaseVersion', 'createNodegroup_releaseVersion' - The AMI version of the Amazon EKS optimized AMI to use with your node
-- group. By default, the latest available AMI version for the node
-- group\'s current Kubernetes version is used. For more information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html Amazon EKS optimized Amazon Linux 2 AMI versions>
-- in the /Amazon EKS User Guide/. If you specify @launchTemplate@, and
-- your launch template uses a custom AMI, then don\'t specify
-- @releaseVersion@, or the node group deployment will fail. For more
-- information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
--
-- 'scalingConfig', 'createNodegroup_scalingConfig' - The scaling configuration details for the Auto Scaling group that is
-- created for your node group.
--
-- 'version', 'createNodegroup_version' - The Kubernetes version to use for your managed nodes. By default, the
-- Kubernetes version of the cluster is used, and this is the only accepted
-- specified value. If you specify @launchTemplate@, and your launch
-- template uses a custom AMI, then don\'t specify @version@, or the node
-- group deployment will fail. For more information about using launch
-- templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
--
-- 'launchTemplate', 'createNodegroup_launchTemplate' - An object representing a node group\'s launch template specification. If
-- specified, then do not specify @instanceTypes@, @diskSize@, or
-- @remoteAccess@ and make sure that the launch template meets the
-- requirements in @launchTemplateSpecification@.
--
-- 'labels', 'createNodegroup_labels' - The Kubernetes labels to be applied to the nodes in the node group when
-- they are created.
--
-- 'amiType', 'createNodegroup_amiType' - The AMI type for your node group. GPU instance types should use the
-- @AL2_x86_64_GPU@ AMI type. Non-GPU instances should use the @AL2_x86_64@
-- AMI type. Arm instances should use the @AL2_ARM_64@ AMI type. All types
-- use the Amazon EKS optimized Amazon Linux 2 AMI. If you specify
-- @launchTemplate@, and your launch template uses a custom AMI, then
-- don\'t specify @amiType@, or the node group deployment will fail. For
-- more information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
--
-- 'clientRequestToken', 'createNodegroup_clientRequestToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'updateConfig', 'createNodegroup_updateConfig' - The node group update configuration.
--
-- 'tags', 'createNodegroup_tags' - The metadata to apply to the node group to assist with categorization
-- and organization. Each tag consists of a key and an optional value, both
-- of which you define. Node group tags do not propagate to any other
-- resources associated with the node group, such as the Amazon EC2
-- instances or subnets.
--
-- 'clusterName', 'createNodegroup_clusterName' - The name of the cluster to create the node group in.
--
-- 'nodegroupName', 'createNodegroup_nodegroupName' - The unique name to give your node group.
--
-- 'subnets', 'createNodegroup_subnets' - The subnets to use for the Auto Scaling group that is created for your
-- node group. If you specify @launchTemplate@, then don\'t specify
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html SubnetId>
-- in your launch template, or the node group deployment will fail. For
-- more information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
--
-- 'nodeRole', 'createNodegroup_nodeRole' - The Amazon Resource Name (ARN) of the IAM role to associate with your
-- node group. The Amazon EKS worker node @kubelet@ daemon makes calls to
-- Amazon Web Services APIs on your behalf. Nodes receive permissions for
-- these API calls through an IAM instance profile and associated policies.
-- Before you can launch nodes and register them into a cluster, you must
-- create an IAM role for those nodes to use when they are launched. For
-- more information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/worker_node_IAM_role.html Amazon EKS node IAM role>
-- in the //Amazon EKS User Guide// . If you specify @launchTemplate@, then
-- don\'t specify
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html IamInstanceProfile>
-- in your launch template, or the node group deployment will fail. For
-- more information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
newCreateNodegroup ::
  -- | 'clusterName'
  Prelude.Text ->
  -- | 'nodegroupName'
  Prelude.Text ->
  -- | 'nodeRole'
  Prelude.Text ->
  CreateNodegroup
newCreateNodegroup :: Text -> Text -> Text -> CreateNodegroup
newCreateNodegroup
  Text
pClusterName_
  Text
pNodegroupName_
  Text
pNodeRole_ =
    CreateNodegroup' :: Maybe CapacityTypes
-> Maybe [Text]
-> Maybe [Taint]
-> Maybe RemoteAccessConfig
-> Maybe Int
-> Maybe Text
-> Maybe NodegroupScalingConfig
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe (HashMap Text Text)
-> Maybe AMITypes
-> Maybe Text
-> Maybe NodegroupUpdateConfig
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> [Text]
-> Text
-> CreateNodegroup
CreateNodegroup'
      { $sel:capacityType:CreateNodegroup' :: Maybe CapacityTypes
capacityType = Maybe CapacityTypes
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceTypes:CreateNodegroup' :: Maybe [Text]
instanceTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:taints:CreateNodegroup' :: Maybe [Taint]
taints = Maybe [Taint]
forall a. Maybe a
Prelude.Nothing,
        $sel:remoteAccess:CreateNodegroup' :: Maybe RemoteAccessConfig
remoteAccess = Maybe RemoteAccessConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:diskSize:CreateNodegroup' :: Maybe Int
diskSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:releaseVersion:CreateNodegroup' :: Maybe Text
releaseVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:scalingConfig:CreateNodegroup' :: Maybe NodegroupScalingConfig
scalingConfig = Maybe NodegroupScalingConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:version:CreateNodegroup' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:launchTemplate:CreateNodegroup' :: Maybe LaunchTemplateSpecification
launchTemplate = Maybe LaunchTemplateSpecification
forall a. Maybe a
Prelude.Nothing,
        $sel:labels:CreateNodegroup' :: Maybe (HashMap Text Text)
labels = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:amiType:CreateNodegroup' :: Maybe AMITypes
amiType = Maybe AMITypes
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:CreateNodegroup' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:updateConfig:CreateNodegroup' :: Maybe NodegroupUpdateConfig
updateConfig = Maybe NodegroupUpdateConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateNodegroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterName:CreateNodegroup' :: Text
clusterName = Text
pClusterName_,
        $sel:nodegroupName:CreateNodegroup' :: Text
nodegroupName = Text
pNodegroupName_,
        $sel:subnets:CreateNodegroup' :: [Text]
subnets = [Text]
forall a. Monoid a => a
Prelude.mempty,
        $sel:nodeRole:CreateNodegroup' :: Text
nodeRole = Text
pNodeRole_
      }

-- | The capacity type for your node group.
createNodegroup_capacityType :: Lens.Lens' CreateNodegroup (Prelude.Maybe CapacityTypes)
createNodegroup_capacityType :: (Maybe CapacityTypes -> f (Maybe CapacityTypes))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_capacityType = (CreateNodegroup -> Maybe CapacityTypes)
-> (CreateNodegroup -> Maybe CapacityTypes -> CreateNodegroup)
-> Lens
     CreateNodegroup
     CreateNodegroup
     (Maybe CapacityTypes)
     (Maybe CapacityTypes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe CapacityTypes
capacityType :: Maybe CapacityTypes
$sel:capacityType:CreateNodegroup' :: CreateNodegroup -> Maybe CapacityTypes
capacityType} -> Maybe CapacityTypes
capacityType) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe CapacityTypes
a -> CreateNodegroup
s {$sel:capacityType:CreateNodegroup' :: Maybe CapacityTypes
capacityType = Maybe CapacityTypes
a} :: CreateNodegroup)

-- | Specify the instance types for a node group. If you specify a GPU
-- instance type, be sure to specify @AL2_x86_64_GPU@ with the @amiType@
-- parameter. If you specify @launchTemplate@, then you can specify zero or
-- one instance type in your launch template /or/ you can specify 0-20
-- instance types for @instanceTypes@. If however, you specify an instance
-- type in your launch template /and/ specify any @instanceTypes@, the node
-- group deployment will fail. If you don\'t specify an instance type in a
-- launch template or for @instanceTypes@, then @t3.medium@ is used, by
-- default. If you specify @Spot@ for @capacityType@, then we recommend
-- specifying multiple values for @instanceTypes@. For more information,
-- see
-- <https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types Managed node group capacity types>
-- and
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the /Amazon EKS User Guide/.
createNodegroup_instanceTypes :: Lens.Lens' CreateNodegroup (Prelude.Maybe [Prelude.Text])
createNodegroup_instanceTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_instanceTypes = (CreateNodegroup -> Maybe [Text])
-> (CreateNodegroup -> Maybe [Text] -> CreateNodegroup)
-> Lens
     CreateNodegroup CreateNodegroup (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe [Text]
instanceTypes :: Maybe [Text]
$sel:instanceTypes:CreateNodegroup' :: CreateNodegroup -> Maybe [Text]
instanceTypes} -> Maybe [Text]
instanceTypes) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe [Text]
a -> CreateNodegroup
s {$sel:instanceTypes:CreateNodegroup' :: Maybe [Text]
instanceTypes = Maybe [Text]
a} :: CreateNodegroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateNodegroup -> f CreateNodegroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateNodegroup
-> f CreateNodegroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Kubernetes taints to be applied to the nodes in the node group.
createNodegroup_taints :: Lens.Lens' CreateNodegroup (Prelude.Maybe [Taint])
createNodegroup_taints :: (Maybe [Taint] -> f (Maybe [Taint]))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_taints = (CreateNodegroup -> Maybe [Taint])
-> (CreateNodegroup -> Maybe [Taint] -> CreateNodegroup)
-> Lens
     CreateNodegroup CreateNodegroup (Maybe [Taint]) (Maybe [Taint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe [Taint]
taints :: Maybe [Taint]
$sel:taints:CreateNodegroup' :: CreateNodegroup -> Maybe [Taint]
taints} -> Maybe [Taint]
taints) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe [Taint]
a -> CreateNodegroup
s {$sel:taints:CreateNodegroup' :: Maybe [Taint]
taints = Maybe [Taint]
a} :: CreateNodegroup) ((Maybe [Taint] -> f (Maybe [Taint]))
 -> CreateNodegroup -> f CreateNodegroup)
-> ((Maybe [Taint] -> f (Maybe [Taint]))
    -> Maybe [Taint] -> f (Maybe [Taint]))
-> (Maybe [Taint] -> f (Maybe [Taint]))
-> CreateNodegroup
-> f CreateNodegroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Taint] [Taint] [Taint] [Taint]
-> Iso
     (Maybe [Taint]) (Maybe [Taint]) (Maybe [Taint]) (Maybe [Taint])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Taint] [Taint] [Taint] [Taint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The remote access (SSH) configuration to use with your node group. If
-- you specify @launchTemplate@, then don\'t specify @remoteAccess@, or the
-- node group deployment will fail. For more information about using launch
-- templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
createNodegroup_remoteAccess :: Lens.Lens' CreateNodegroup (Prelude.Maybe RemoteAccessConfig)
createNodegroup_remoteAccess :: (Maybe RemoteAccessConfig -> f (Maybe RemoteAccessConfig))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_remoteAccess = (CreateNodegroup -> Maybe RemoteAccessConfig)
-> (CreateNodegroup -> Maybe RemoteAccessConfig -> CreateNodegroup)
-> Lens
     CreateNodegroup
     CreateNodegroup
     (Maybe RemoteAccessConfig)
     (Maybe RemoteAccessConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe RemoteAccessConfig
remoteAccess :: Maybe RemoteAccessConfig
$sel:remoteAccess:CreateNodegroup' :: CreateNodegroup -> Maybe RemoteAccessConfig
remoteAccess} -> Maybe RemoteAccessConfig
remoteAccess) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe RemoteAccessConfig
a -> CreateNodegroup
s {$sel:remoteAccess:CreateNodegroup' :: Maybe RemoteAccessConfig
remoteAccess = Maybe RemoteAccessConfig
a} :: CreateNodegroup)

-- | The root device disk size (in GiB) for your node group instances. The
-- default disk size is 20 GiB. If you specify @launchTemplate@, then
-- don\'t specify @diskSize@, or the node group deployment will fail. For
-- more information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
createNodegroup_diskSize :: Lens.Lens' CreateNodegroup (Prelude.Maybe Prelude.Int)
createNodegroup_diskSize :: (Maybe Int -> f (Maybe Int))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_diskSize = (CreateNodegroup -> Maybe Int)
-> (CreateNodegroup -> Maybe Int -> CreateNodegroup)
-> Lens CreateNodegroup CreateNodegroup (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe Int
diskSize :: Maybe Int
$sel:diskSize:CreateNodegroup' :: CreateNodegroup -> Maybe Int
diskSize} -> Maybe Int
diskSize) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe Int
a -> CreateNodegroup
s {$sel:diskSize:CreateNodegroup' :: Maybe Int
diskSize = Maybe Int
a} :: CreateNodegroup)

-- | The AMI version of the Amazon EKS optimized AMI to use with your node
-- group. By default, the latest available AMI version for the node
-- group\'s current Kubernetes version is used. For more information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html Amazon EKS optimized Amazon Linux 2 AMI versions>
-- in the /Amazon EKS User Guide/. If you specify @launchTemplate@, and
-- your launch template uses a custom AMI, then don\'t specify
-- @releaseVersion@, or the node group deployment will fail. For more
-- information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
createNodegroup_releaseVersion :: Lens.Lens' CreateNodegroup (Prelude.Maybe Prelude.Text)
createNodegroup_releaseVersion :: (Maybe Text -> f (Maybe Text))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_releaseVersion = (CreateNodegroup -> Maybe Text)
-> (CreateNodegroup -> Maybe Text -> CreateNodegroup)
-> Lens CreateNodegroup CreateNodegroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe Text
releaseVersion :: Maybe Text
$sel:releaseVersion:CreateNodegroup' :: CreateNodegroup -> Maybe Text
releaseVersion} -> Maybe Text
releaseVersion) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe Text
a -> CreateNodegroup
s {$sel:releaseVersion:CreateNodegroup' :: Maybe Text
releaseVersion = Maybe Text
a} :: CreateNodegroup)

-- | The scaling configuration details for the Auto Scaling group that is
-- created for your node group.
createNodegroup_scalingConfig :: Lens.Lens' CreateNodegroup (Prelude.Maybe NodegroupScalingConfig)
createNodegroup_scalingConfig :: (Maybe NodegroupScalingConfig -> f (Maybe NodegroupScalingConfig))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_scalingConfig = (CreateNodegroup -> Maybe NodegroupScalingConfig)
-> (CreateNodegroup
    -> Maybe NodegroupScalingConfig -> CreateNodegroup)
-> Lens
     CreateNodegroup
     CreateNodegroup
     (Maybe NodegroupScalingConfig)
     (Maybe NodegroupScalingConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe NodegroupScalingConfig
scalingConfig :: Maybe NodegroupScalingConfig
$sel:scalingConfig:CreateNodegroup' :: CreateNodegroup -> Maybe NodegroupScalingConfig
scalingConfig} -> Maybe NodegroupScalingConfig
scalingConfig) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe NodegroupScalingConfig
a -> CreateNodegroup
s {$sel:scalingConfig:CreateNodegroup' :: Maybe NodegroupScalingConfig
scalingConfig = Maybe NodegroupScalingConfig
a} :: CreateNodegroup)

-- | The Kubernetes version to use for your managed nodes. By default, the
-- Kubernetes version of the cluster is used, and this is the only accepted
-- specified value. If you specify @launchTemplate@, and your launch
-- template uses a custom AMI, then don\'t specify @version@, or the node
-- group deployment will fail. For more information about using launch
-- templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
createNodegroup_version :: Lens.Lens' CreateNodegroup (Prelude.Maybe Prelude.Text)
createNodegroup_version :: (Maybe Text -> f (Maybe Text))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_version = (CreateNodegroup -> Maybe Text)
-> (CreateNodegroup -> Maybe Text -> CreateNodegroup)
-> Lens CreateNodegroup CreateNodegroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe Text
version :: Maybe Text
$sel:version:CreateNodegroup' :: CreateNodegroup -> Maybe Text
version} -> Maybe Text
version) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe Text
a -> CreateNodegroup
s {$sel:version:CreateNodegroup' :: Maybe Text
version = Maybe Text
a} :: CreateNodegroup)

-- | An object representing a node group\'s launch template specification. If
-- specified, then do not specify @instanceTypes@, @diskSize@, or
-- @remoteAccess@ and make sure that the launch template meets the
-- requirements in @launchTemplateSpecification@.
createNodegroup_launchTemplate :: Lens.Lens' CreateNodegroup (Prelude.Maybe LaunchTemplateSpecification)
createNodegroup_launchTemplate :: (Maybe LaunchTemplateSpecification
 -> f (Maybe LaunchTemplateSpecification))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_launchTemplate = (CreateNodegroup -> Maybe LaunchTemplateSpecification)
-> (CreateNodegroup
    -> Maybe LaunchTemplateSpecification -> CreateNodegroup)
-> Lens
     CreateNodegroup
     CreateNodegroup
     (Maybe LaunchTemplateSpecification)
     (Maybe LaunchTemplateSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe LaunchTemplateSpecification
launchTemplate :: Maybe LaunchTemplateSpecification
$sel:launchTemplate:CreateNodegroup' :: CreateNodegroup -> Maybe LaunchTemplateSpecification
launchTemplate} -> Maybe LaunchTemplateSpecification
launchTemplate) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe LaunchTemplateSpecification
a -> CreateNodegroup
s {$sel:launchTemplate:CreateNodegroup' :: Maybe LaunchTemplateSpecification
launchTemplate = Maybe LaunchTemplateSpecification
a} :: CreateNodegroup)

-- | The Kubernetes labels to be applied to the nodes in the node group when
-- they are created.
createNodegroup_labels :: Lens.Lens' CreateNodegroup (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createNodegroup_labels :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_labels = (CreateNodegroup -> Maybe (HashMap Text Text))
-> (CreateNodegroup
    -> Maybe (HashMap Text Text) -> CreateNodegroup)
-> Lens
     CreateNodegroup
     CreateNodegroup
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe (HashMap Text Text)
labels :: Maybe (HashMap Text Text)
$sel:labels:CreateNodegroup' :: CreateNodegroup -> Maybe (HashMap Text Text)
labels} -> Maybe (HashMap Text Text)
labels) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe (HashMap Text Text)
a -> CreateNodegroup
s {$sel:labels:CreateNodegroup' :: Maybe (HashMap Text Text)
labels = Maybe (HashMap Text Text)
a} :: CreateNodegroup) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateNodegroup -> f CreateNodegroup)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateNodegroup
-> f CreateNodegroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The AMI type for your node group. GPU instance types should use the
-- @AL2_x86_64_GPU@ AMI type. Non-GPU instances should use the @AL2_x86_64@
-- AMI type. Arm instances should use the @AL2_ARM_64@ AMI type. All types
-- use the Amazon EKS optimized Amazon Linux 2 AMI. If you specify
-- @launchTemplate@, and your launch template uses a custom AMI, then
-- don\'t specify @amiType@, or the node group deployment will fail. For
-- more information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
createNodegroup_amiType :: Lens.Lens' CreateNodegroup (Prelude.Maybe AMITypes)
createNodegroup_amiType :: (Maybe AMITypes -> f (Maybe AMITypes))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_amiType = (CreateNodegroup -> Maybe AMITypes)
-> (CreateNodegroup -> Maybe AMITypes -> CreateNodegroup)
-> Lens
     CreateNodegroup CreateNodegroup (Maybe AMITypes) (Maybe AMITypes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe AMITypes
amiType :: Maybe AMITypes
$sel:amiType:CreateNodegroup' :: CreateNodegroup -> Maybe AMITypes
amiType} -> Maybe AMITypes
amiType) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe AMITypes
a -> CreateNodegroup
s {$sel:amiType:CreateNodegroup' :: Maybe AMITypes
amiType = Maybe AMITypes
a} :: CreateNodegroup)

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
createNodegroup_clientRequestToken :: Lens.Lens' CreateNodegroup (Prelude.Maybe Prelude.Text)
createNodegroup_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_clientRequestToken = (CreateNodegroup -> Maybe Text)
-> (CreateNodegroup -> Maybe Text -> CreateNodegroup)
-> Lens CreateNodegroup CreateNodegroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateNodegroup' :: CreateNodegroup -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe Text
a -> CreateNodegroup
s {$sel:clientRequestToken:CreateNodegroup' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateNodegroup)

-- | The node group update configuration.
createNodegroup_updateConfig :: Lens.Lens' CreateNodegroup (Prelude.Maybe NodegroupUpdateConfig)
createNodegroup_updateConfig :: (Maybe NodegroupUpdateConfig -> f (Maybe NodegroupUpdateConfig))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_updateConfig = (CreateNodegroup -> Maybe NodegroupUpdateConfig)
-> (CreateNodegroup
    -> Maybe NodegroupUpdateConfig -> CreateNodegroup)
-> Lens
     CreateNodegroup
     CreateNodegroup
     (Maybe NodegroupUpdateConfig)
     (Maybe NodegroupUpdateConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe NodegroupUpdateConfig
updateConfig :: Maybe NodegroupUpdateConfig
$sel:updateConfig:CreateNodegroup' :: CreateNodegroup -> Maybe NodegroupUpdateConfig
updateConfig} -> Maybe NodegroupUpdateConfig
updateConfig) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe NodegroupUpdateConfig
a -> CreateNodegroup
s {$sel:updateConfig:CreateNodegroup' :: Maybe NodegroupUpdateConfig
updateConfig = Maybe NodegroupUpdateConfig
a} :: CreateNodegroup)

-- | The metadata to apply to the node group to assist with categorization
-- and organization. Each tag consists of a key and an optional value, both
-- of which you define. Node group tags do not propagate to any other
-- resources associated with the node group, such as the Amazon EC2
-- instances or subnets.
createNodegroup_tags :: Lens.Lens' CreateNodegroup (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createNodegroup_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateNodegroup -> f CreateNodegroup
createNodegroup_tags = (CreateNodegroup -> Maybe (HashMap Text Text))
-> (CreateNodegroup
    -> Maybe (HashMap Text Text) -> CreateNodegroup)
-> Lens
     CreateNodegroup
     CreateNodegroup
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateNodegroup' :: CreateNodegroup -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateNodegroup
s@CreateNodegroup' {} Maybe (HashMap Text Text)
a -> CreateNodegroup
s {$sel:tags:CreateNodegroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateNodegroup) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateNodegroup -> f CreateNodegroup)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateNodegroup
-> f CreateNodegroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the cluster to create the node group in.
createNodegroup_clusterName :: Lens.Lens' CreateNodegroup Prelude.Text
createNodegroup_clusterName :: (Text -> f Text) -> CreateNodegroup -> f CreateNodegroup
createNodegroup_clusterName = (CreateNodegroup -> Text)
-> (CreateNodegroup -> Text -> CreateNodegroup)
-> Lens CreateNodegroup CreateNodegroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Text
clusterName :: Text
$sel:clusterName:CreateNodegroup' :: CreateNodegroup -> Text
clusterName} -> Text
clusterName) (\s :: CreateNodegroup
s@CreateNodegroup' {} Text
a -> CreateNodegroup
s {$sel:clusterName:CreateNodegroup' :: Text
clusterName = Text
a} :: CreateNodegroup)

-- | The unique name to give your node group.
createNodegroup_nodegroupName :: Lens.Lens' CreateNodegroup Prelude.Text
createNodegroup_nodegroupName :: (Text -> f Text) -> CreateNodegroup -> f CreateNodegroup
createNodegroup_nodegroupName = (CreateNodegroup -> Text)
-> (CreateNodegroup -> Text -> CreateNodegroup)
-> Lens CreateNodegroup CreateNodegroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Text
nodegroupName :: Text
$sel:nodegroupName:CreateNodegroup' :: CreateNodegroup -> Text
nodegroupName} -> Text
nodegroupName) (\s :: CreateNodegroup
s@CreateNodegroup' {} Text
a -> CreateNodegroup
s {$sel:nodegroupName:CreateNodegroup' :: Text
nodegroupName = Text
a} :: CreateNodegroup)

-- | The subnets to use for the Auto Scaling group that is created for your
-- node group. If you specify @launchTemplate@, then don\'t specify
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html SubnetId>
-- in your launch template, or the node group deployment will fail. For
-- more information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
createNodegroup_subnets :: Lens.Lens' CreateNodegroup [Prelude.Text]
createNodegroup_subnets :: ([Text] -> f [Text]) -> CreateNodegroup -> f CreateNodegroup
createNodegroup_subnets = (CreateNodegroup -> [Text])
-> (CreateNodegroup -> [Text] -> CreateNodegroup)
-> Lens CreateNodegroup CreateNodegroup [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {[Text]
subnets :: [Text]
$sel:subnets:CreateNodegroup' :: CreateNodegroup -> [Text]
subnets} -> [Text]
subnets) (\s :: CreateNodegroup
s@CreateNodegroup' {} [Text]
a -> CreateNodegroup
s {$sel:subnets:CreateNodegroup' :: [Text]
subnets = [Text]
a} :: CreateNodegroup) (([Text] -> f [Text]) -> CreateNodegroup -> f CreateNodegroup)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateNodegroup
-> f CreateNodegroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the IAM role to associate with your
-- node group. The Amazon EKS worker node @kubelet@ daemon makes calls to
-- Amazon Web Services APIs on your behalf. Nodes receive permissions for
-- these API calls through an IAM instance profile and associated policies.
-- Before you can launch nodes and register them into a cluster, you must
-- create an IAM role for those nodes to use when they are launched. For
-- more information, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/worker_node_IAM_role.html Amazon EKS node IAM role>
-- in the //Amazon EKS User Guide// . If you specify @launchTemplate@, then
-- don\'t specify
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html IamInstanceProfile>
-- in your launch template, or the node group deployment will fail. For
-- more information about using launch templates with Amazon EKS, see
-- <https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html Launch template support>
-- in the Amazon EKS User Guide.
createNodegroup_nodeRole :: Lens.Lens' CreateNodegroup Prelude.Text
createNodegroup_nodeRole :: (Text -> f Text) -> CreateNodegroup -> f CreateNodegroup
createNodegroup_nodeRole = (CreateNodegroup -> Text)
-> (CreateNodegroup -> Text -> CreateNodegroup)
-> Lens CreateNodegroup CreateNodegroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroup' {Text
nodeRole :: Text
$sel:nodeRole:CreateNodegroup' :: CreateNodegroup -> Text
nodeRole} -> Text
nodeRole) (\s :: CreateNodegroup
s@CreateNodegroup' {} Text
a -> CreateNodegroup
s {$sel:nodeRole:CreateNodegroup' :: Text
nodeRole = Text
a} :: CreateNodegroup)

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

instance Prelude.Hashable CreateNodegroup

instance Prelude.NFData CreateNodegroup

instance Core.ToHeaders CreateNodegroup where
  toHeaders :: CreateNodegroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateNodegroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateNodegroup where
  toJSON :: CreateNodegroup -> Value
toJSON CreateNodegroup' {[Text]
Maybe Int
Maybe [Text]
Maybe [Taint]
Maybe Text
Maybe (HashMap Text Text)
Maybe AMITypes
Maybe CapacityTypes
Maybe LaunchTemplateSpecification
Maybe NodegroupScalingConfig
Maybe NodegroupUpdateConfig
Maybe RemoteAccessConfig
Text
nodeRole :: Text
subnets :: [Text]
nodegroupName :: Text
clusterName :: Text
tags :: Maybe (HashMap Text Text)
updateConfig :: Maybe NodegroupUpdateConfig
clientRequestToken :: Maybe Text
amiType :: Maybe AMITypes
labels :: Maybe (HashMap Text Text)
launchTemplate :: Maybe LaunchTemplateSpecification
version :: Maybe Text
scalingConfig :: Maybe NodegroupScalingConfig
releaseVersion :: Maybe Text
diskSize :: Maybe Int
remoteAccess :: Maybe RemoteAccessConfig
taints :: Maybe [Taint]
instanceTypes :: Maybe [Text]
capacityType :: Maybe CapacityTypes
$sel:nodeRole:CreateNodegroup' :: CreateNodegroup -> Text
$sel:subnets:CreateNodegroup' :: CreateNodegroup -> [Text]
$sel:nodegroupName:CreateNodegroup' :: CreateNodegroup -> Text
$sel:clusterName:CreateNodegroup' :: CreateNodegroup -> Text
$sel:tags:CreateNodegroup' :: CreateNodegroup -> Maybe (HashMap Text Text)
$sel:updateConfig:CreateNodegroup' :: CreateNodegroup -> Maybe NodegroupUpdateConfig
$sel:clientRequestToken:CreateNodegroup' :: CreateNodegroup -> Maybe Text
$sel:amiType:CreateNodegroup' :: CreateNodegroup -> Maybe AMITypes
$sel:labels:CreateNodegroup' :: CreateNodegroup -> Maybe (HashMap Text Text)
$sel:launchTemplate:CreateNodegroup' :: CreateNodegroup -> Maybe LaunchTemplateSpecification
$sel:version:CreateNodegroup' :: CreateNodegroup -> Maybe Text
$sel:scalingConfig:CreateNodegroup' :: CreateNodegroup -> Maybe NodegroupScalingConfig
$sel:releaseVersion:CreateNodegroup' :: CreateNodegroup -> Maybe Text
$sel:diskSize:CreateNodegroup' :: CreateNodegroup -> Maybe Int
$sel:remoteAccess:CreateNodegroup' :: CreateNodegroup -> Maybe RemoteAccessConfig
$sel:taints:CreateNodegroup' :: CreateNodegroup -> Maybe [Taint]
$sel:instanceTypes:CreateNodegroup' :: CreateNodegroup -> Maybe [Text]
$sel:capacityType:CreateNodegroup' :: CreateNodegroup -> Maybe CapacityTypes
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"capacityType" Text -> CapacityTypes -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CapacityTypes -> Pair) -> Maybe CapacityTypes -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityTypes
capacityType,
            (Text
"instanceTypes" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
instanceTypes,
            (Text
"taints" Text -> [Taint] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Taint] -> Pair) -> Maybe [Taint] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Taint]
taints,
            (Text
"remoteAccess" Text -> RemoteAccessConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RemoteAccessConfig -> Pair)
-> Maybe RemoteAccessConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RemoteAccessConfig
remoteAccess,
            (Text
"diskSize" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
diskSize,
            (Text
"releaseVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
releaseVersion,
            (Text
"scalingConfig" Text -> NodegroupScalingConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NodegroupScalingConfig -> Pair)
-> Maybe NodegroupScalingConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NodegroupScalingConfig
scalingConfig,
            (Text
"version" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
version,
            (Text
"launchTemplate" Text -> LaunchTemplateSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (LaunchTemplateSpecification -> Pair)
-> Maybe LaunchTemplateSpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LaunchTemplateSpecification
launchTemplate,
            (Text
"labels" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
labels,
            (Text
"amiType" Text -> AMITypes -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AMITypes -> Pair) -> Maybe AMITypes -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AMITypes
amiType,
            (Text
"clientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
            (Text
"updateConfig" Text -> NodegroupUpdateConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NodegroupUpdateConfig -> Pair)
-> Maybe NodegroupUpdateConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NodegroupUpdateConfig
updateConfig,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"nodegroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
nodegroupName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"subnets" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
subnets),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"nodeRole" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
nodeRole)
          ]
      )

instance Core.ToPath CreateNodegroup where
  toPath :: CreateNodegroup -> ByteString
toPath CreateNodegroup' {[Text]
Maybe Int
Maybe [Text]
Maybe [Taint]
Maybe Text
Maybe (HashMap Text Text)
Maybe AMITypes
Maybe CapacityTypes
Maybe LaunchTemplateSpecification
Maybe NodegroupScalingConfig
Maybe NodegroupUpdateConfig
Maybe RemoteAccessConfig
Text
nodeRole :: Text
subnets :: [Text]
nodegroupName :: Text
clusterName :: Text
tags :: Maybe (HashMap Text Text)
updateConfig :: Maybe NodegroupUpdateConfig
clientRequestToken :: Maybe Text
amiType :: Maybe AMITypes
labels :: Maybe (HashMap Text Text)
launchTemplate :: Maybe LaunchTemplateSpecification
version :: Maybe Text
scalingConfig :: Maybe NodegroupScalingConfig
releaseVersion :: Maybe Text
diskSize :: Maybe Int
remoteAccess :: Maybe RemoteAccessConfig
taints :: Maybe [Taint]
instanceTypes :: Maybe [Text]
capacityType :: Maybe CapacityTypes
$sel:nodeRole:CreateNodegroup' :: CreateNodegroup -> Text
$sel:subnets:CreateNodegroup' :: CreateNodegroup -> [Text]
$sel:nodegroupName:CreateNodegroup' :: CreateNodegroup -> Text
$sel:clusterName:CreateNodegroup' :: CreateNodegroup -> Text
$sel:tags:CreateNodegroup' :: CreateNodegroup -> Maybe (HashMap Text Text)
$sel:updateConfig:CreateNodegroup' :: CreateNodegroup -> Maybe NodegroupUpdateConfig
$sel:clientRequestToken:CreateNodegroup' :: CreateNodegroup -> Maybe Text
$sel:amiType:CreateNodegroup' :: CreateNodegroup -> Maybe AMITypes
$sel:labels:CreateNodegroup' :: CreateNodegroup -> Maybe (HashMap Text Text)
$sel:launchTemplate:CreateNodegroup' :: CreateNodegroup -> Maybe LaunchTemplateSpecification
$sel:version:CreateNodegroup' :: CreateNodegroup -> Maybe Text
$sel:scalingConfig:CreateNodegroup' :: CreateNodegroup -> Maybe NodegroupScalingConfig
$sel:releaseVersion:CreateNodegroup' :: CreateNodegroup -> Maybe Text
$sel:diskSize:CreateNodegroup' :: CreateNodegroup -> Maybe Int
$sel:remoteAccess:CreateNodegroup' :: CreateNodegroup -> Maybe RemoteAccessConfig
$sel:taints:CreateNodegroup' :: CreateNodegroup -> Maybe [Taint]
$sel:instanceTypes:CreateNodegroup' :: CreateNodegroup -> Maybe [Text]
$sel:capacityType:CreateNodegroup' :: CreateNodegroup -> Maybe CapacityTypes
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/clusters/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
clusterName, ByteString
"/node-groups"]

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

-- | /See:/ 'newCreateNodegroupResponse' smart constructor.
data CreateNodegroupResponse = CreateNodegroupResponse'
  { -- | The full description of your new node group.
    CreateNodegroupResponse -> Maybe Nodegroup
nodegroup :: Prelude.Maybe Nodegroup,
    -- | The response's http status code.
    CreateNodegroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateNodegroupResponse -> CreateNodegroupResponse -> Bool
(CreateNodegroupResponse -> CreateNodegroupResponse -> Bool)
-> (CreateNodegroupResponse -> CreateNodegroupResponse -> Bool)
-> Eq CreateNodegroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateNodegroupResponse -> CreateNodegroupResponse -> Bool
$c/= :: CreateNodegroupResponse -> CreateNodegroupResponse -> Bool
== :: CreateNodegroupResponse -> CreateNodegroupResponse -> Bool
$c== :: CreateNodegroupResponse -> CreateNodegroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateNodegroupResponse]
ReadPrec CreateNodegroupResponse
Int -> ReadS CreateNodegroupResponse
ReadS [CreateNodegroupResponse]
(Int -> ReadS CreateNodegroupResponse)
-> ReadS [CreateNodegroupResponse]
-> ReadPrec CreateNodegroupResponse
-> ReadPrec [CreateNodegroupResponse]
-> Read CreateNodegroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateNodegroupResponse]
$creadListPrec :: ReadPrec [CreateNodegroupResponse]
readPrec :: ReadPrec CreateNodegroupResponse
$creadPrec :: ReadPrec CreateNodegroupResponse
readList :: ReadS [CreateNodegroupResponse]
$creadList :: ReadS [CreateNodegroupResponse]
readsPrec :: Int -> ReadS CreateNodegroupResponse
$creadsPrec :: Int -> ReadS CreateNodegroupResponse
Prelude.Read, Int -> CreateNodegroupResponse -> ShowS
[CreateNodegroupResponse] -> ShowS
CreateNodegroupResponse -> String
(Int -> CreateNodegroupResponse -> ShowS)
-> (CreateNodegroupResponse -> String)
-> ([CreateNodegroupResponse] -> ShowS)
-> Show CreateNodegroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateNodegroupResponse] -> ShowS
$cshowList :: [CreateNodegroupResponse] -> ShowS
show :: CreateNodegroupResponse -> String
$cshow :: CreateNodegroupResponse -> String
showsPrec :: Int -> CreateNodegroupResponse -> ShowS
$cshowsPrec :: Int -> CreateNodegroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateNodegroupResponse -> Rep CreateNodegroupResponse x)
-> (forall x.
    Rep CreateNodegroupResponse x -> CreateNodegroupResponse)
-> Generic CreateNodegroupResponse
forall x. Rep CreateNodegroupResponse x -> CreateNodegroupResponse
forall x. CreateNodegroupResponse -> Rep CreateNodegroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateNodegroupResponse x -> CreateNodegroupResponse
$cfrom :: forall x. CreateNodegroupResponse -> Rep CreateNodegroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateNodegroupResponse' 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:
--
-- 'nodegroup', 'createNodegroupResponse_nodegroup' - The full description of your new node group.
--
-- 'httpStatus', 'createNodegroupResponse_httpStatus' - The response's http status code.
newCreateNodegroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateNodegroupResponse
newCreateNodegroupResponse :: Int -> CreateNodegroupResponse
newCreateNodegroupResponse Int
pHttpStatus_ =
  CreateNodegroupResponse' :: Maybe Nodegroup -> Int -> CreateNodegroupResponse
CreateNodegroupResponse'
    { $sel:nodegroup:CreateNodegroupResponse' :: Maybe Nodegroup
nodegroup =
        Maybe Nodegroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateNodegroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The full description of your new node group.
createNodegroupResponse_nodegroup :: Lens.Lens' CreateNodegroupResponse (Prelude.Maybe Nodegroup)
createNodegroupResponse_nodegroup :: (Maybe Nodegroup -> f (Maybe Nodegroup))
-> CreateNodegroupResponse -> f CreateNodegroupResponse
createNodegroupResponse_nodegroup = (CreateNodegroupResponse -> Maybe Nodegroup)
-> (CreateNodegroupResponse
    -> Maybe Nodegroup -> CreateNodegroupResponse)
-> Lens
     CreateNodegroupResponse
     CreateNodegroupResponse
     (Maybe Nodegroup)
     (Maybe Nodegroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNodegroupResponse' {Maybe Nodegroup
nodegroup :: Maybe Nodegroup
$sel:nodegroup:CreateNodegroupResponse' :: CreateNodegroupResponse -> Maybe Nodegroup
nodegroup} -> Maybe Nodegroup
nodegroup) (\s :: CreateNodegroupResponse
s@CreateNodegroupResponse' {} Maybe Nodegroup
a -> CreateNodegroupResponse
s {$sel:nodegroup:CreateNodegroupResponse' :: Maybe Nodegroup
nodegroup = Maybe Nodegroup
a} :: CreateNodegroupResponse)

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

instance Prelude.NFData CreateNodegroupResponse