{-# 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.Redshift.CreateCluster
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new cluster with the specified parameters.
--
-- To create a cluster in Virtual Private Cloud (VPC), you must provide a
-- cluster subnet group name. The cluster subnet group identifies the
-- subnets of your VPC that Amazon Redshift uses when creating the cluster.
-- For more information about managing clusters, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html Amazon Redshift Clusters>
-- in the /Amazon Redshift Cluster Management Guide/.
module Amazonka.Redshift.CreateCluster
  ( -- * Creating a Request
    CreateCluster (..),
    newCreateCluster,

    -- * Request Lenses
    createCluster_additionalInfo,
    createCluster_allowVersionUpgrade,
    createCluster_aquaConfigurationStatus,
    createCluster_automatedSnapshotRetentionPeriod,
    createCluster_availabilityZone,
    createCluster_availabilityZoneRelocation,
    createCluster_clusterParameterGroupName,
    createCluster_clusterSecurityGroups,
    createCluster_clusterSubnetGroupName,
    createCluster_clusterType,
    createCluster_clusterVersion,
    createCluster_dbName,
    createCluster_defaultIamRoleArn,
    createCluster_elasticIp,
    createCluster_encrypted,
    createCluster_enhancedVpcRouting,
    createCluster_hsmClientCertificateIdentifier,
    createCluster_hsmConfigurationIdentifier,
    createCluster_iamRoles,
    createCluster_kmsKeyId,
    createCluster_loadSampleData,
    createCluster_maintenanceTrackName,
    createCluster_manualSnapshotRetentionPeriod,
    createCluster_numberOfNodes,
    createCluster_port,
    createCluster_preferredMaintenanceWindow,
    createCluster_publiclyAccessible,
    createCluster_snapshotScheduleIdentifier,
    createCluster_tags,
    createCluster_vpcSecurityGroupIds,
    createCluster_clusterIdentifier,
    createCluster_nodeType,
    createCluster_masterUsername,
    createCluster_masterUserPassword,

    -- * Destructuring the Response
    CreateClusterResponse (..),
    newCreateClusterResponse,

    -- * Response Lenses
    createClusterResponse_cluster,
    createClusterResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newCreateCluster' smart constructor.
data CreateCluster = CreateCluster'
  { -- | Reserved.
    CreateCluster -> Maybe Text
additionalInfo :: Prelude.Maybe Prelude.Text,
    -- | If @true@, major version upgrades can be applied during the maintenance
    -- window to the Amazon Redshift engine that is running on the cluster.
    --
    -- When a new major version of the Amazon Redshift engine is released, you
    -- can request that the service automatically apply upgrades during the
    -- maintenance window to the Amazon Redshift engine that is running on your
    -- cluster.
    --
    -- Default: @true@
    CreateCluster -> Maybe Bool
allowVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | This parameter is retired. It does not set the AQUA configuration
    -- status. Amazon Redshift automatically determines whether to use AQUA
    -- (Advanced Query Accelerator).
    CreateCluster -> Maybe AquaConfigurationStatus
aquaConfigurationStatus :: Prelude.Maybe AquaConfigurationStatus,
    -- | The number of days that automated snapshots are retained. If the value
    -- is 0, automated snapshots are disabled. Even if automated snapshots are
    -- disabled, you can still create manual snapshots when you want with
    -- CreateClusterSnapshot.
    --
    -- You can\'t disable automated snapshots for RA3 node types. Set the
    -- automated retention period from 1-35 days.
    --
    -- Default: @1@
    --
    -- Constraints: Must be a value from 0 to 35.
    CreateCluster -> Maybe Int
automatedSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | The EC2 Availability Zone (AZ) in which you want Amazon Redshift to
    -- provision the cluster. For example, if you have several EC2 instances
    -- running in a specific Availability Zone, then you might want the cluster
    -- to be provisioned in the same zone in order to decrease network latency.
    --
    -- Default: A random, system-chosen Availability Zone in the region that is
    -- specified by the endpoint.
    --
    -- Example: @us-east-2d@
    --
    -- Constraint: The specified Availability Zone must be in the same region
    -- as the current endpoint.
    CreateCluster -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The option to enable relocation for an Amazon Redshift cluster between
    -- Availability Zones after the cluster is created.
    CreateCluster -> Maybe Bool
availabilityZoneRelocation :: Prelude.Maybe Prelude.Bool,
    -- | The name of the parameter group to be associated with this cluster.
    --
    -- Default: The default Amazon Redshift cluster parameter group. For
    -- information about the default parameter group, go to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Working with Amazon Redshift Parameter Groups>
    --
    -- Constraints:
    --
    -- -   Must be 1 to 255 alphanumeric characters or hyphens.
    --
    -- -   First character must be a letter.
    --
    -- -   Cannot end with a hyphen or contain two consecutive hyphens.
    CreateCluster -> Maybe Text
clusterParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | A list of security groups to be associated with this cluster.
    --
    -- Default: The default cluster security group for Amazon Redshift.
    CreateCluster -> Maybe [Text]
clusterSecurityGroups :: Prelude.Maybe [Prelude.Text],
    -- | The name of a cluster subnet group to be associated with this cluster.
    --
    -- If this parameter is not provided the resulting cluster will be deployed
    -- outside virtual private cloud (VPC).
    CreateCluster -> Maybe Text
clusterSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | The type of the cluster. When cluster type is specified as
    --
    -- -   @single-node@, the __NumberOfNodes__ parameter is not required.
    --
    -- -   @multi-node@, the __NumberOfNodes__ parameter is required.
    --
    -- Valid Values: @multi-node@ | @single-node@
    --
    -- Default: @multi-node@
    CreateCluster -> Maybe Text
clusterType :: Prelude.Maybe Prelude.Text,
    -- | The version of the Amazon Redshift engine software that you want to
    -- deploy on the cluster.
    --
    -- The version selected runs on all the nodes in the cluster.
    --
    -- Constraints: Only version 1.0 is currently available.
    --
    -- Example: @1.0@
    CreateCluster -> Maybe Text
clusterVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the first database to be created when the cluster is
    -- created.
    --
    -- To create additional databases after the cluster is created, connect to
    -- the cluster with a SQL client and use SQL commands to create a database.
    -- For more information, go to
    -- <https://docs.aws.amazon.com/redshift/latest/dg/t_creating_database.html Create a Database>
    -- in the Amazon Redshift Database Developer Guide.
    --
    -- Default: @dev@
    --
    -- Constraints:
    --
    -- -   Must contain 1 to 64 alphanumeric characters.
    --
    -- -   Must contain only lowercase letters.
    --
    -- -   Cannot be a word that is reserved by the service. A list of reserved
    --     words can be found in
    --     <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>
    --     in the Amazon Redshift Database Developer Guide.
    CreateCluster -> Maybe Text
dbName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the IAM role that was set as default
    -- for the cluster when the cluster was created.
    CreateCluster -> Maybe Text
defaultIamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The Elastic IP (EIP) address for the cluster.
    --
    -- Constraints: The cluster must be provisioned in EC2-VPC and
    -- publicly-accessible through an Internet gateway. Don\'t specify the
    -- Elastic IP address for a publicly accessible cluster with availability
    -- zone relocation turned on. For more information about provisioning
    -- clusters in EC2-VPC, go to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-platforms Supported Platforms to Launch Your Cluster>
    -- in the Amazon Redshift Cluster Management Guide.
    CreateCluster -> Maybe Text
elasticIp :: Prelude.Maybe Prelude.Text,
    -- | If @true@, the data in the cluster is encrypted at rest.
    --
    -- Default: false
    CreateCluster -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
    -- | An option that specifies whether to create the cluster with enhanced VPC
    -- routing enabled. To create a cluster that uses enhanced VPC routing, the
    -- cluster must be in a VPC. For more information, see
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html Enhanced VPC Routing>
    -- in the Amazon Redshift Cluster Management Guide.
    --
    -- If this option is @true@, enhanced VPC routing is enabled.
    --
    -- Default: false
    CreateCluster -> Maybe Bool
enhancedVpcRouting :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the name of the HSM client certificate the Amazon Redshift
    -- cluster uses to retrieve the data encryption keys stored in an HSM.
    CreateCluster -> Maybe Text
hsmClientCertificateIdentifier :: Prelude.Maybe Prelude.Text,
    -- | Specifies the name of the HSM configuration that contains the
    -- information the Amazon Redshift cluster can use to retrieve and store
    -- keys in an HSM.
    CreateCluster -> Maybe Text
hsmConfigurationIdentifier :: Prelude.Maybe Prelude.Text,
    -- | A list of Identity and Access Management (IAM) roles that can be used by
    -- the cluster to access other Amazon Web Services services. You must
    -- supply the IAM roles in their Amazon Resource Name (ARN) format.
    --
    -- The maximum number of IAM roles that you can associate is subject to a
    -- quota. For more information, go to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html Quotas and limits>
    -- in the /Amazon Redshift Cluster Management Guide/.
    CreateCluster -> Maybe [Text]
iamRoles :: Prelude.Maybe [Prelude.Text],
    -- | The Key Management Service (KMS) key ID of the encryption key that you
    -- want to use to encrypt data in the cluster.
    CreateCluster -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | A flag that specifies whether to load sample data once the cluster is
    -- created.
    CreateCluster -> Maybe Text
loadSampleData :: Prelude.Maybe Prelude.Text,
    -- | An optional parameter for the name of the maintenance track for the
    -- cluster. If you don\'t provide a maintenance track name, the cluster is
    -- assigned to the @current@ track.
    CreateCluster -> Maybe Text
maintenanceTrackName :: Prelude.Maybe Prelude.Text,
    -- | The default number of days to retain a manual snapshot. If the value is
    -- -1, the snapshot is retained indefinitely. This setting doesn\'t change
    -- the retention period of existing snapshots.
    --
    -- The value must be either -1 or an integer between 1 and 3,653.
    CreateCluster -> Maybe Int
manualSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | The number of compute nodes in the cluster. This parameter is required
    -- when the __ClusterType__ parameter is specified as @multi-node@.
    --
    -- For information about determining how many nodes you need, go to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes Working with Clusters>
    -- in the /Amazon Redshift Cluster Management Guide/.
    --
    -- If you don\'t specify this parameter, you get a single-node cluster.
    -- When requesting a multi-node cluster, you must specify the number of
    -- nodes that you want in the cluster.
    --
    -- Default: @1@
    --
    -- Constraints: Value must be at least 1 and no more than 100.
    CreateCluster -> Maybe Int
numberOfNodes :: Prelude.Maybe Prelude.Int,
    -- | The port number on which the cluster accepts incoming connections.
    --
    -- The cluster is accessible only via the JDBC and ODBC connection strings.
    -- Part of the connection string requires the port on which the cluster
    -- will listen for incoming connections.
    --
    -- Default: @5439@
    --
    -- Valid Values: @1150-65535@
    CreateCluster -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | The weekly time range (in UTC) during which automated cluster
    -- maintenance can occur.
    --
    -- Format: @ddd:hh24:mi-ddd:hh24:mi@
    --
    -- Default: A 30-minute window selected at random from an 8-hour block of
    -- time per region, occurring on a random day of the week. For more
    -- information about the time blocks for each region, see
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows Maintenance Windows>
    -- in Amazon Redshift Cluster Management Guide.
    --
    -- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
    --
    -- Constraints: Minimum 30-minute window.
    CreateCluster -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | If @true@, the cluster can be accessed from a public network.
    CreateCluster -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
    -- | A unique identifier for the snapshot schedule.
    CreateCluster -> Maybe Text
snapshotScheduleIdentifier :: Prelude.Maybe Prelude.Text,
    -- | A list of tag instances.
    CreateCluster -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A list of Virtual Private Cloud (VPC) security groups to be associated
    -- with the cluster.
    --
    -- Default: The default VPC security group is associated with the cluster.
    CreateCluster -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | A unique identifier for the cluster. You use this identifier to refer to
    -- the cluster for any subsequent cluster operations such as deleting or
    -- modifying. The identifier also appears in the Amazon Redshift console.
    --
    -- Constraints:
    --
    -- -   Must contain from 1 to 63 alphanumeric characters or hyphens.
    --
    -- -   Alphabetic characters must be lowercase.
    --
    -- -   First character must be a letter.
    --
    -- -   Cannot end with a hyphen or contain two consecutive hyphens.
    --
    -- -   Must be unique for all clusters within an Amazon Web Services
    --     account.
    --
    -- Example: @myexamplecluster@
    CreateCluster -> Text
clusterIdentifier :: Prelude.Text,
    -- | The node type to be provisioned for the cluster. For information about
    -- node types, go to
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes Working with Clusters>
    -- in the /Amazon Redshift Cluster Management Guide/.
    --
    -- Valid Values: @ds2.xlarge@ | @ds2.8xlarge@ | @dc1.large@ | @dc1.8xlarge@
    -- | @dc2.large@ | @dc2.8xlarge@ | @ra3.xlplus@ | @ra3.4xlarge@ |
    -- @ra3.16xlarge@
    CreateCluster -> Text
nodeType :: Prelude.Text,
    -- | The user name associated with the admin user account for the cluster
    -- that is being created.
    --
    -- Constraints:
    --
    -- -   Must be 1 - 128 alphanumeric characters. The user name can\'t be
    --     @PUBLIC@.
    --
    -- -   First character must be a letter.
    --
    -- -   Cannot be a reserved word. A list of reserved words can be found in
    --     <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>
    --     in the Amazon Redshift Database Developer Guide.
    CreateCluster -> Text
masterUsername :: Prelude.Text,
    -- | The password associated with the admin user account for the cluster that
    -- is being created.
    --
    -- Constraints:
    --
    -- -   Must be between 8 and 64 characters in length.
    --
    -- -   Must contain at least one uppercase letter.
    --
    -- -   Must contain at least one lowercase letter.
    --
    -- -   Must contain one number.
    --
    -- -   Can be any printable ASCII character (ASCII code 33-126) except @\'@
    --     (single quote), @\"@ (double quote), @\\@, @\/@, or @\@@.
    CreateCluster -> Text
masterUserPassword :: Prelude.Text
  }
  deriving (CreateCluster -> CreateCluster -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCluster -> CreateCluster -> Bool
$c/= :: CreateCluster -> CreateCluster -> Bool
== :: CreateCluster -> CreateCluster -> Bool
$c== :: CreateCluster -> CreateCluster -> Bool
Prelude.Eq, ReadPrec [CreateCluster]
ReadPrec CreateCluster
Int -> ReadS CreateCluster
ReadS [CreateCluster]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCluster]
$creadListPrec :: ReadPrec [CreateCluster]
readPrec :: ReadPrec CreateCluster
$creadPrec :: ReadPrec CreateCluster
readList :: ReadS [CreateCluster]
$creadList :: ReadS [CreateCluster]
readsPrec :: Int -> ReadS CreateCluster
$creadsPrec :: Int -> ReadS CreateCluster
Prelude.Read, Int -> CreateCluster -> ShowS
[CreateCluster] -> ShowS
CreateCluster -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCluster] -> ShowS
$cshowList :: [CreateCluster] -> ShowS
show :: CreateCluster -> String
$cshow :: CreateCluster -> String
showsPrec :: Int -> CreateCluster -> ShowS
$cshowsPrec :: Int -> CreateCluster -> ShowS
Prelude.Show, forall x. Rep CreateCluster x -> CreateCluster
forall x. CreateCluster -> Rep CreateCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCluster x -> CreateCluster
$cfrom :: forall x. CreateCluster -> Rep CreateCluster x
Prelude.Generic)

-- |
-- Create a value of 'CreateCluster' 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', 'createCluster_additionalInfo' - Reserved.
--
-- 'allowVersionUpgrade', 'createCluster_allowVersionUpgrade' - If @true@, major version upgrades can be applied during the maintenance
-- window to the Amazon Redshift engine that is running on the cluster.
--
-- When a new major version of the Amazon Redshift engine is released, you
-- can request that the service automatically apply upgrades during the
-- maintenance window to the Amazon Redshift engine that is running on your
-- cluster.
--
-- Default: @true@
--
-- 'aquaConfigurationStatus', 'createCluster_aquaConfigurationStatus' - This parameter is retired. It does not set the AQUA configuration
-- status. Amazon Redshift automatically determines whether to use AQUA
-- (Advanced Query Accelerator).
--
-- 'automatedSnapshotRetentionPeriod', 'createCluster_automatedSnapshotRetentionPeriod' - The number of days that automated snapshots are retained. If the value
-- is 0, automated snapshots are disabled. Even if automated snapshots are
-- disabled, you can still create manual snapshots when you want with
-- CreateClusterSnapshot.
--
-- You can\'t disable automated snapshots for RA3 node types. Set the
-- automated retention period from 1-35 days.
--
-- Default: @1@
--
-- Constraints: Must be a value from 0 to 35.
--
-- 'availabilityZone', 'createCluster_availabilityZone' - The EC2 Availability Zone (AZ) in which you want Amazon Redshift to
-- provision the cluster. For example, if you have several EC2 instances
-- running in a specific Availability Zone, then you might want the cluster
-- to be provisioned in the same zone in order to decrease network latency.
--
-- Default: A random, system-chosen Availability Zone in the region that is
-- specified by the endpoint.
--
-- Example: @us-east-2d@
--
-- Constraint: The specified Availability Zone must be in the same region
-- as the current endpoint.
--
-- 'availabilityZoneRelocation', 'createCluster_availabilityZoneRelocation' - The option to enable relocation for an Amazon Redshift cluster between
-- Availability Zones after the cluster is created.
--
-- 'clusterParameterGroupName', 'createCluster_clusterParameterGroupName' - The name of the parameter group to be associated with this cluster.
--
-- Default: The default Amazon Redshift cluster parameter group. For
-- information about the default parameter group, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Working with Amazon Redshift Parameter Groups>
--
-- Constraints:
--
-- -   Must be 1 to 255 alphanumeric characters or hyphens.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
--
-- 'clusterSecurityGroups', 'createCluster_clusterSecurityGroups' - A list of security groups to be associated with this cluster.
--
-- Default: The default cluster security group for Amazon Redshift.
--
-- 'clusterSubnetGroupName', 'createCluster_clusterSubnetGroupName' - The name of a cluster subnet group to be associated with this cluster.
--
-- If this parameter is not provided the resulting cluster will be deployed
-- outside virtual private cloud (VPC).
--
-- 'clusterType', 'createCluster_clusterType' - The type of the cluster. When cluster type is specified as
--
-- -   @single-node@, the __NumberOfNodes__ parameter is not required.
--
-- -   @multi-node@, the __NumberOfNodes__ parameter is required.
--
-- Valid Values: @multi-node@ | @single-node@
--
-- Default: @multi-node@
--
-- 'clusterVersion', 'createCluster_clusterVersion' - The version of the Amazon Redshift engine software that you want to
-- deploy on the cluster.
--
-- The version selected runs on all the nodes in the cluster.
--
-- Constraints: Only version 1.0 is currently available.
--
-- Example: @1.0@
--
-- 'dbName', 'createCluster_dbName' - The name of the first database to be created when the cluster is
-- created.
--
-- To create additional databases after the cluster is created, connect to
-- the cluster with a SQL client and use SQL commands to create a database.
-- For more information, go to
-- <https://docs.aws.amazon.com/redshift/latest/dg/t_creating_database.html Create a Database>
-- in the Amazon Redshift Database Developer Guide.
--
-- Default: @dev@
--
-- Constraints:
--
-- -   Must contain 1 to 64 alphanumeric characters.
--
-- -   Must contain only lowercase letters.
--
-- -   Cannot be a word that is reserved by the service. A list of reserved
--     words can be found in
--     <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>
--     in the Amazon Redshift Database Developer Guide.
--
-- 'defaultIamRoleArn', 'createCluster_defaultIamRoleArn' - The Amazon Resource Name (ARN) for the IAM role that was set as default
-- for the cluster when the cluster was created.
--
-- 'elasticIp', 'createCluster_elasticIp' - The Elastic IP (EIP) address for the cluster.
--
-- Constraints: The cluster must be provisioned in EC2-VPC and
-- publicly-accessible through an Internet gateway. Don\'t specify the
-- Elastic IP address for a publicly accessible cluster with availability
-- zone relocation turned on. For more information about provisioning
-- clusters in EC2-VPC, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-platforms Supported Platforms to Launch Your Cluster>
-- in the Amazon Redshift Cluster Management Guide.
--
-- 'encrypted', 'createCluster_encrypted' - If @true@, the data in the cluster is encrypted at rest.
--
-- Default: false
--
-- 'enhancedVpcRouting', 'createCluster_enhancedVpcRouting' - An option that specifies whether to create the cluster with enhanced VPC
-- routing enabled. To create a cluster that uses enhanced VPC routing, the
-- cluster must be in a VPC. For more information, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html Enhanced VPC Routing>
-- in the Amazon Redshift Cluster Management Guide.
--
-- If this option is @true@, enhanced VPC routing is enabled.
--
-- Default: false
--
-- 'hsmClientCertificateIdentifier', 'createCluster_hsmClientCertificateIdentifier' - Specifies the name of the HSM client certificate the Amazon Redshift
-- cluster uses to retrieve the data encryption keys stored in an HSM.
--
-- 'hsmConfigurationIdentifier', 'createCluster_hsmConfigurationIdentifier' - Specifies the name of the HSM configuration that contains the
-- information the Amazon Redshift cluster can use to retrieve and store
-- keys in an HSM.
--
-- 'iamRoles', 'createCluster_iamRoles' - A list of Identity and Access Management (IAM) roles that can be used by
-- the cluster to access other Amazon Web Services services. You must
-- supply the IAM roles in their Amazon Resource Name (ARN) format.
--
-- The maximum number of IAM roles that you can associate is subject to a
-- quota. For more information, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html Quotas and limits>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- 'kmsKeyId', 'createCluster_kmsKeyId' - The Key Management Service (KMS) key ID of the encryption key that you
-- want to use to encrypt data in the cluster.
--
-- 'loadSampleData', 'createCluster_loadSampleData' - A flag that specifies whether to load sample data once the cluster is
-- created.
--
-- 'maintenanceTrackName', 'createCluster_maintenanceTrackName' - An optional parameter for the name of the maintenance track for the
-- cluster. If you don\'t provide a maintenance track name, the cluster is
-- assigned to the @current@ track.
--
-- 'manualSnapshotRetentionPeriod', 'createCluster_manualSnapshotRetentionPeriod' - The default number of days to retain a manual snapshot. If the value is
-- -1, the snapshot is retained indefinitely. This setting doesn\'t change
-- the retention period of existing snapshots.
--
-- The value must be either -1 or an integer between 1 and 3,653.
--
-- 'numberOfNodes', 'createCluster_numberOfNodes' - The number of compute nodes in the cluster. This parameter is required
-- when the __ClusterType__ parameter is specified as @multi-node@.
--
-- For information about determining how many nodes you need, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes Working with Clusters>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- If you don\'t specify this parameter, you get a single-node cluster.
-- When requesting a multi-node cluster, you must specify the number of
-- nodes that you want in the cluster.
--
-- Default: @1@
--
-- Constraints: Value must be at least 1 and no more than 100.
--
-- 'port', 'createCluster_port' - The port number on which the cluster accepts incoming connections.
--
-- The cluster is accessible only via the JDBC and ODBC connection strings.
-- Part of the connection string requires the port on which the cluster
-- will listen for incoming connections.
--
-- Default: @5439@
--
-- Valid Values: @1150-65535@
--
-- 'preferredMaintenanceWindow', 'createCluster_preferredMaintenanceWindow' - The weekly time range (in UTC) during which automated cluster
-- maintenance can occur.
--
-- Format: @ddd:hh24:mi-ddd:hh24:mi@
--
-- Default: A 30-minute window selected at random from an 8-hour block of
-- time per region, occurring on a random day of the week. For more
-- information about the time blocks for each region, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows Maintenance Windows>
-- in Amazon Redshift Cluster Management Guide.
--
-- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
--
-- Constraints: Minimum 30-minute window.
--
-- 'publiclyAccessible', 'createCluster_publiclyAccessible' - If @true@, the cluster can be accessed from a public network.
--
-- 'snapshotScheduleIdentifier', 'createCluster_snapshotScheduleIdentifier' - A unique identifier for the snapshot schedule.
--
-- 'tags', 'createCluster_tags' - A list of tag instances.
--
-- 'vpcSecurityGroupIds', 'createCluster_vpcSecurityGroupIds' - A list of Virtual Private Cloud (VPC) security groups to be associated
-- with the cluster.
--
-- Default: The default VPC security group is associated with the cluster.
--
-- 'clusterIdentifier', 'createCluster_clusterIdentifier' - A unique identifier for the cluster. You use this identifier to refer to
-- the cluster for any subsequent cluster operations such as deleting or
-- modifying. The identifier also appears in the Amazon Redshift console.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 alphanumeric characters or hyphens.
--
-- -   Alphabetic characters must be lowercase.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
--
-- -   Must be unique for all clusters within an Amazon Web Services
--     account.
--
-- Example: @myexamplecluster@
--
-- 'nodeType', 'createCluster_nodeType' - The node type to be provisioned for the cluster. For information about
-- node types, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes Working with Clusters>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- Valid Values: @ds2.xlarge@ | @ds2.8xlarge@ | @dc1.large@ | @dc1.8xlarge@
-- | @dc2.large@ | @dc2.8xlarge@ | @ra3.xlplus@ | @ra3.4xlarge@ |
-- @ra3.16xlarge@
--
-- 'masterUsername', 'createCluster_masterUsername' - The user name associated with the admin user account for the cluster
-- that is being created.
--
-- Constraints:
--
-- -   Must be 1 - 128 alphanumeric characters. The user name can\'t be
--     @PUBLIC@.
--
-- -   First character must be a letter.
--
-- -   Cannot be a reserved word. A list of reserved words can be found in
--     <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>
--     in the Amazon Redshift Database Developer Guide.
--
-- 'masterUserPassword', 'createCluster_masterUserPassword' - The password associated with the admin user account for the cluster that
-- is being created.
--
-- Constraints:
--
-- -   Must be between 8 and 64 characters in length.
--
-- -   Must contain at least one uppercase letter.
--
-- -   Must contain at least one lowercase letter.
--
-- -   Must contain one number.
--
-- -   Can be any printable ASCII character (ASCII code 33-126) except @\'@
--     (single quote), @\"@ (double quote), @\\@, @\/@, or @\@@.
newCreateCluster ::
  -- | 'clusterIdentifier'
  Prelude.Text ->
  -- | 'nodeType'
  Prelude.Text ->
  -- | 'masterUsername'
  Prelude.Text ->
  -- | 'masterUserPassword'
  Prelude.Text ->
  CreateCluster
newCreateCluster :: Text -> Text -> Text -> Text -> CreateCluster
newCreateCluster
  Text
pClusterIdentifier_
  Text
pNodeType_
  Text
pMasterUsername_
  Text
pMasterUserPassword_ =
    CreateCluster'
      { $sel:additionalInfo:CreateCluster' :: Maybe Text
additionalInfo = forall a. Maybe a
Prelude.Nothing,
        $sel:allowVersionUpgrade:CreateCluster' :: Maybe Bool
allowVersionUpgrade = forall a. Maybe a
Prelude.Nothing,
        $sel:aquaConfigurationStatus:CreateCluster' :: Maybe AquaConfigurationStatus
aquaConfigurationStatus = forall a. Maybe a
Prelude.Nothing,
        $sel:automatedSnapshotRetentionPeriod:CreateCluster' :: Maybe Int
automatedSnapshotRetentionPeriod = forall a. Maybe a
Prelude.Nothing,
        $sel:availabilityZone:CreateCluster' :: Maybe Text
availabilityZone = forall a. Maybe a
Prelude.Nothing,
        $sel:availabilityZoneRelocation:CreateCluster' :: Maybe Bool
availabilityZoneRelocation = forall a. Maybe a
Prelude.Nothing,
        $sel:clusterParameterGroupName:CreateCluster' :: Maybe Text
clusterParameterGroupName = forall a. Maybe a
Prelude.Nothing,
        $sel:clusterSecurityGroups:CreateCluster' :: Maybe [Text]
clusterSecurityGroups = forall a. Maybe a
Prelude.Nothing,
        $sel:clusterSubnetGroupName:CreateCluster' :: Maybe Text
clusterSubnetGroupName = forall a. Maybe a
Prelude.Nothing,
        $sel:clusterType:CreateCluster' :: Maybe Text
clusterType = forall a. Maybe a
Prelude.Nothing,
        $sel:clusterVersion:CreateCluster' :: Maybe Text
clusterVersion = forall a. Maybe a
Prelude.Nothing,
        $sel:dbName:CreateCluster' :: Maybe Text
dbName = forall a. Maybe a
Prelude.Nothing,
        $sel:defaultIamRoleArn:CreateCluster' :: Maybe Text
defaultIamRoleArn = forall a. Maybe a
Prelude.Nothing,
        $sel:elasticIp:CreateCluster' :: Maybe Text
elasticIp = forall a. Maybe a
Prelude.Nothing,
        $sel:encrypted:CreateCluster' :: Maybe Bool
encrypted = forall a. Maybe a
Prelude.Nothing,
        $sel:enhancedVpcRouting:CreateCluster' :: Maybe Bool
enhancedVpcRouting = forall a. Maybe a
Prelude.Nothing,
        $sel:hsmClientCertificateIdentifier:CreateCluster' :: Maybe Text
hsmClientCertificateIdentifier = forall a. Maybe a
Prelude.Nothing,
        $sel:hsmConfigurationIdentifier:CreateCluster' :: Maybe Text
hsmConfigurationIdentifier = forall a. Maybe a
Prelude.Nothing,
        $sel:iamRoles:CreateCluster' :: Maybe [Text]
iamRoles = forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:CreateCluster' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
        $sel:loadSampleData:CreateCluster' :: Maybe Text
loadSampleData = forall a. Maybe a
Prelude.Nothing,
        $sel:maintenanceTrackName:CreateCluster' :: Maybe Text
maintenanceTrackName = forall a. Maybe a
Prelude.Nothing,
        $sel:manualSnapshotRetentionPeriod:CreateCluster' :: Maybe Int
manualSnapshotRetentionPeriod = forall a. Maybe a
Prelude.Nothing,
        $sel:numberOfNodes:CreateCluster' :: Maybe Int
numberOfNodes = forall a. Maybe a
Prelude.Nothing,
        $sel:port:CreateCluster' :: Maybe Int
port = forall a. Maybe a
Prelude.Nothing,
        $sel:preferredMaintenanceWindow:CreateCluster' :: Maybe Text
preferredMaintenanceWindow = forall a. Maybe a
Prelude.Nothing,
        $sel:publiclyAccessible:CreateCluster' :: Maybe Bool
publiclyAccessible = forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotScheduleIdentifier:CreateCluster' :: Maybe Text
snapshotScheduleIdentifier = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateCluster' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:vpcSecurityGroupIds:CreateCluster' :: Maybe [Text]
vpcSecurityGroupIds = forall a. Maybe a
Prelude.Nothing,
        $sel:clusterIdentifier:CreateCluster' :: Text
clusterIdentifier = Text
pClusterIdentifier_,
        $sel:nodeType:CreateCluster' :: Text
nodeType = Text
pNodeType_,
        $sel:masterUsername:CreateCluster' :: Text
masterUsername = Text
pMasterUsername_,
        $sel:masterUserPassword:CreateCluster' :: Text
masterUserPassword = Text
pMasterUserPassword_
      }

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

-- | If @true@, major version upgrades can be applied during the maintenance
-- window to the Amazon Redshift engine that is running on the cluster.
--
-- When a new major version of the Amazon Redshift engine is released, you
-- can request that the service automatically apply upgrades during the
-- maintenance window to the Amazon Redshift engine that is running on your
-- cluster.
--
-- Default: @true@
createCluster_allowVersionUpgrade :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Bool)
createCluster_allowVersionUpgrade :: Lens' CreateCluster (Maybe Bool)
createCluster_allowVersionUpgrade = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Bool
allowVersionUpgrade :: Maybe Bool
$sel:allowVersionUpgrade:CreateCluster' :: CreateCluster -> Maybe Bool
allowVersionUpgrade} -> Maybe Bool
allowVersionUpgrade) (\s :: CreateCluster
s@CreateCluster' {} Maybe Bool
a -> CreateCluster
s {$sel:allowVersionUpgrade:CreateCluster' :: Maybe Bool
allowVersionUpgrade = Maybe Bool
a} :: CreateCluster)

-- | This parameter is retired. It does not set the AQUA configuration
-- status. Amazon Redshift automatically determines whether to use AQUA
-- (Advanced Query Accelerator).
createCluster_aquaConfigurationStatus :: Lens.Lens' CreateCluster (Prelude.Maybe AquaConfigurationStatus)
createCluster_aquaConfigurationStatus :: Lens' CreateCluster (Maybe AquaConfigurationStatus)
createCluster_aquaConfigurationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe AquaConfigurationStatus
aquaConfigurationStatus :: Maybe AquaConfigurationStatus
$sel:aquaConfigurationStatus:CreateCluster' :: CreateCluster -> Maybe AquaConfigurationStatus
aquaConfigurationStatus} -> Maybe AquaConfigurationStatus
aquaConfigurationStatus) (\s :: CreateCluster
s@CreateCluster' {} Maybe AquaConfigurationStatus
a -> CreateCluster
s {$sel:aquaConfigurationStatus:CreateCluster' :: Maybe AquaConfigurationStatus
aquaConfigurationStatus = Maybe AquaConfigurationStatus
a} :: CreateCluster)

-- | The number of days that automated snapshots are retained. If the value
-- is 0, automated snapshots are disabled. Even if automated snapshots are
-- disabled, you can still create manual snapshots when you want with
-- CreateClusterSnapshot.
--
-- You can\'t disable automated snapshots for RA3 node types. Set the
-- automated retention period from 1-35 days.
--
-- Default: @1@
--
-- Constraints: Must be a value from 0 to 35.
createCluster_automatedSnapshotRetentionPeriod :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Int)
createCluster_automatedSnapshotRetentionPeriod :: Lens' CreateCluster (Maybe Int)
createCluster_automatedSnapshotRetentionPeriod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Int
automatedSnapshotRetentionPeriod :: Maybe Int
$sel:automatedSnapshotRetentionPeriod:CreateCluster' :: CreateCluster -> Maybe Int
automatedSnapshotRetentionPeriod} -> Maybe Int
automatedSnapshotRetentionPeriod) (\s :: CreateCluster
s@CreateCluster' {} Maybe Int
a -> CreateCluster
s {$sel:automatedSnapshotRetentionPeriod:CreateCluster' :: Maybe Int
automatedSnapshotRetentionPeriod = Maybe Int
a} :: CreateCluster)

-- | The EC2 Availability Zone (AZ) in which you want Amazon Redshift to
-- provision the cluster. For example, if you have several EC2 instances
-- running in a specific Availability Zone, then you might want the cluster
-- to be provisioned in the same zone in order to decrease network latency.
--
-- Default: A random, system-chosen Availability Zone in the region that is
-- specified by the endpoint.
--
-- Example: @us-east-2d@
--
-- Constraint: The specified Availability Zone must be in the same region
-- as the current endpoint.
createCluster_availabilityZone :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_availabilityZone :: Lens' CreateCluster (Maybe Text)
createCluster_availabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:CreateCluster' :: CreateCluster -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:availabilityZone:CreateCluster' :: Maybe Text
availabilityZone = Maybe Text
a} :: CreateCluster)

-- | The option to enable relocation for an Amazon Redshift cluster between
-- Availability Zones after the cluster is created.
createCluster_availabilityZoneRelocation :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Bool)
createCluster_availabilityZoneRelocation :: Lens' CreateCluster (Maybe Bool)
createCluster_availabilityZoneRelocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Bool
availabilityZoneRelocation :: Maybe Bool
$sel:availabilityZoneRelocation:CreateCluster' :: CreateCluster -> Maybe Bool
availabilityZoneRelocation} -> Maybe Bool
availabilityZoneRelocation) (\s :: CreateCluster
s@CreateCluster' {} Maybe Bool
a -> CreateCluster
s {$sel:availabilityZoneRelocation:CreateCluster' :: Maybe Bool
availabilityZoneRelocation = Maybe Bool
a} :: CreateCluster)

-- | The name of the parameter group to be associated with this cluster.
--
-- Default: The default Amazon Redshift cluster parameter group. For
-- information about the default parameter group, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Working with Amazon Redshift Parameter Groups>
--
-- Constraints:
--
-- -   Must be 1 to 255 alphanumeric characters or hyphens.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
createCluster_clusterParameterGroupName :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_clusterParameterGroupName :: Lens' CreateCluster (Maybe Text)
createCluster_clusterParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
clusterParameterGroupName :: Maybe Text
$sel:clusterParameterGroupName:CreateCluster' :: CreateCluster -> Maybe Text
clusterParameterGroupName} -> Maybe Text
clusterParameterGroupName) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:clusterParameterGroupName:CreateCluster' :: Maybe Text
clusterParameterGroupName = Maybe Text
a} :: CreateCluster)

-- | A list of security groups to be associated with this cluster.
--
-- Default: The default cluster security group for Amazon Redshift.
createCluster_clusterSecurityGroups :: Lens.Lens' CreateCluster (Prelude.Maybe [Prelude.Text])
createCluster_clusterSecurityGroups :: Lens' CreateCluster (Maybe [Text])
createCluster_clusterSecurityGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe [Text]
clusterSecurityGroups :: Maybe [Text]
$sel:clusterSecurityGroups:CreateCluster' :: CreateCluster -> Maybe [Text]
clusterSecurityGroups} -> Maybe [Text]
clusterSecurityGroups) (\s :: CreateCluster
s@CreateCluster' {} Maybe [Text]
a -> CreateCluster
s {$sel:clusterSecurityGroups:CreateCluster' :: Maybe [Text]
clusterSecurityGroups = Maybe [Text]
a} :: CreateCluster) 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 name of a cluster subnet group to be associated with this cluster.
--
-- If this parameter is not provided the resulting cluster will be deployed
-- outside virtual private cloud (VPC).
createCluster_clusterSubnetGroupName :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_clusterSubnetGroupName :: Lens' CreateCluster (Maybe Text)
createCluster_clusterSubnetGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
clusterSubnetGroupName :: Maybe Text
$sel:clusterSubnetGroupName:CreateCluster' :: CreateCluster -> Maybe Text
clusterSubnetGroupName} -> Maybe Text
clusterSubnetGroupName) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:clusterSubnetGroupName:CreateCluster' :: Maybe Text
clusterSubnetGroupName = Maybe Text
a} :: CreateCluster)

-- | The type of the cluster. When cluster type is specified as
--
-- -   @single-node@, the __NumberOfNodes__ parameter is not required.
--
-- -   @multi-node@, the __NumberOfNodes__ parameter is required.
--
-- Valid Values: @multi-node@ | @single-node@
--
-- Default: @multi-node@
createCluster_clusterType :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_clusterType :: Lens' CreateCluster (Maybe Text)
createCluster_clusterType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
clusterType :: Maybe Text
$sel:clusterType:CreateCluster' :: CreateCluster -> Maybe Text
clusterType} -> Maybe Text
clusterType) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:clusterType:CreateCluster' :: Maybe Text
clusterType = Maybe Text
a} :: CreateCluster)

-- | The version of the Amazon Redshift engine software that you want to
-- deploy on the cluster.
--
-- The version selected runs on all the nodes in the cluster.
--
-- Constraints: Only version 1.0 is currently available.
--
-- Example: @1.0@
createCluster_clusterVersion :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_clusterVersion :: Lens' CreateCluster (Maybe Text)
createCluster_clusterVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
clusterVersion :: Maybe Text
$sel:clusterVersion:CreateCluster' :: CreateCluster -> Maybe Text
clusterVersion} -> Maybe Text
clusterVersion) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:clusterVersion:CreateCluster' :: Maybe Text
clusterVersion = Maybe Text
a} :: CreateCluster)

-- | The name of the first database to be created when the cluster is
-- created.
--
-- To create additional databases after the cluster is created, connect to
-- the cluster with a SQL client and use SQL commands to create a database.
-- For more information, go to
-- <https://docs.aws.amazon.com/redshift/latest/dg/t_creating_database.html Create a Database>
-- in the Amazon Redshift Database Developer Guide.
--
-- Default: @dev@
--
-- Constraints:
--
-- -   Must contain 1 to 64 alphanumeric characters.
--
-- -   Must contain only lowercase letters.
--
-- -   Cannot be a word that is reserved by the service. A list of reserved
--     words can be found in
--     <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>
--     in the Amazon Redshift Database Developer Guide.
createCluster_dbName :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_dbName :: Lens' CreateCluster (Maybe Text)
createCluster_dbName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
dbName :: Maybe Text
$sel:dbName:CreateCluster' :: CreateCluster -> Maybe Text
dbName} -> Maybe Text
dbName) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:dbName:CreateCluster' :: Maybe Text
dbName = Maybe Text
a} :: CreateCluster)

-- | The Amazon Resource Name (ARN) for the IAM role that was set as default
-- for the cluster when the cluster was created.
createCluster_defaultIamRoleArn :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_defaultIamRoleArn :: Lens' CreateCluster (Maybe Text)
createCluster_defaultIamRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
defaultIamRoleArn :: Maybe Text
$sel:defaultIamRoleArn:CreateCluster' :: CreateCluster -> Maybe Text
defaultIamRoleArn} -> Maybe Text
defaultIamRoleArn) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:defaultIamRoleArn:CreateCluster' :: Maybe Text
defaultIamRoleArn = Maybe Text
a} :: CreateCluster)

-- | The Elastic IP (EIP) address for the cluster.
--
-- Constraints: The cluster must be provisioned in EC2-VPC and
-- publicly-accessible through an Internet gateway. Don\'t specify the
-- Elastic IP address for a publicly accessible cluster with availability
-- zone relocation turned on. For more information about provisioning
-- clusters in EC2-VPC, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-platforms Supported Platforms to Launch Your Cluster>
-- in the Amazon Redshift Cluster Management Guide.
createCluster_elasticIp :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_elasticIp :: Lens' CreateCluster (Maybe Text)
createCluster_elasticIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
elasticIp :: Maybe Text
$sel:elasticIp:CreateCluster' :: CreateCluster -> Maybe Text
elasticIp} -> Maybe Text
elasticIp) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:elasticIp:CreateCluster' :: Maybe Text
elasticIp = Maybe Text
a} :: CreateCluster)

-- | If @true@, the data in the cluster is encrypted at rest.
--
-- Default: false
createCluster_encrypted :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Bool)
createCluster_encrypted :: Lens' CreateCluster (Maybe Bool)
createCluster_encrypted = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Bool
encrypted :: Maybe Bool
$sel:encrypted:CreateCluster' :: CreateCluster -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: CreateCluster
s@CreateCluster' {} Maybe Bool
a -> CreateCluster
s {$sel:encrypted:CreateCluster' :: Maybe Bool
encrypted = Maybe Bool
a} :: CreateCluster)

-- | An option that specifies whether to create the cluster with enhanced VPC
-- routing enabled. To create a cluster that uses enhanced VPC routing, the
-- cluster must be in a VPC. For more information, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html Enhanced VPC Routing>
-- in the Amazon Redshift Cluster Management Guide.
--
-- If this option is @true@, enhanced VPC routing is enabled.
--
-- Default: false
createCluster_enhancedVpcRouting :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Bool)
createCluster_enhancedVpcRouting :: Lens' CreateCluster (Maybe Bool)
createCluster_enhancedVpcRouting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Bool
enhancedVpcRouting :: Maybe Bool
$sel:enhancedVpcRouting:CreateCluster' :: CreateCluster -> Maybe Bool
enhancedVpcRouting} -> Maybe Bool
enhancedVpcRouting) (\s :: CreateCluster
s@CreateCluster' {} Maybe Bool
a -> CreateCluster
s {$sel:enhancedVpcRouting:CreateCluster' :: Maybe Bool
enhancedVpcRouting = Maybe Bool
a} :: CreateCluster)

-- | Specifies the name of the HSM client certificate the Amazon Redshift
-- cluster uses to retrieve the data encryption keys stored in an HSM.
createCluster_hsmClientCertificateIdentifier :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_hsmClientCertificateIdentifier :: Lens' CreateCluster (Maybe Text)
createCluster_hsmClientCertificateIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
hsmClientCertificateIdentifier :: Maybe Text
$sel:hsmClientCertificateIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
hsmClientCertificateIdentifier} -> Maybe Text
hsmClientCertificateIdentifier) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:hsmClientCertificateIdentifier:CreateCluster' :: Maybe Text
hsmClientCertificateIdentifier = Maybe Text
a} :: CreateCluster)

-- | Specifies the name of the HSM configuration that contains the
-- information the Amazon Redshift cluster can use to retrieve and store
-- keys in an HSM.
createCluster_hsmConfigurationIdentifier :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_hsmConfigurationIdentifier :: Lens' CreateCluster (Maybe Text)
createCluster_hsmConfigurationIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
hsmConfigurationIdentifier :: Maybe Text
$sel:hsmConfigurationIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
hsmConfigurationIdentifier} -> Maybe Text
hsmConfigurationIdentifier) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:hsmConfigurationIdentifier:CreateCluster' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
a} :: CreateCluster)

-- | A list of Identity and Access Management (IAM) roles that can be used by
-- the cluster to access other Amazon Web Services services. You must
-- supply the IAM roles in their Amazon Resource Name (ARN) format.
--
-- The maximum number of IAM roles that you can associate is subject to a
-- quota. For more information, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html Quotas and limits>
-- in the /Amazon Redshift Cluster Management Guide/.
createCluster_iamRoles :: Lens.Lens' CreateCluster (Prelude.Maybe [Prelude.Text])
createCluster_iamRoles :: Lens' CreateCluster (Maybe [Text])
createCluster_iamRoles = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe [Text]
iamRoles :: Maybe [Text]
$sel:iamRoles:CreateCluster' :: CreateCluster -> Maybe [Text]
iamRoles} -> Maybe [Text]
iamRoles) (\s :: CreateCluster
s@CreateCluster' {} Maybe [Text]
a -> CreateCluster
s {$sel:iamRoles:CreateCluster' :: Maybe [Text]
iamRoles = Maybe [Text]
a} :: CreateCluster) 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 Key Management Service (KMS) key ID of the encryption key that you
-- want to use to encrypt data in the cluster.
createCluster_kmsKeyId :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_kmsKeyId :: Lens' CreateCluster (Maybe Text)
createCluster_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateCluster' :: CreateCluster -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:kmsKeyId:CreateCluster' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateCluster)

-- | A flag that specifies whether to load sample data once the cluster is
-- created.
createCluster_loadSampleData :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_loadSampleData :: Lens' CreateCluster (Maybe Text)
createCluster_loadSampleData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
loadSampleData :: Maybe Text
$sel:loadSampleData:CreateCluster' :: CreateCluster -> Maybe Text
loadSampleData} -> Maybe Text
loadSampleData) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:loadSampleData:CreateCluster' :: Maybe Text
loadSampleData = Maybe Text
a} :: CreateCluster)

-- | An optional parameter for the name of the maintenance track for the
-- cluster. If you don\'t provide a maintenance track name, the cluster is
-- assigned to the @current@ track.
createCluster_maintenanceTrackName :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_maintenanceTrackName :: Lens' CreateCluster (Maybe Text)
createCluster_maintenanceTrackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
maintenanceTrackName :: Maybe Text
$sel:maintenanceTrackName:CreateCluster' :: CreateCluster -> Maybe Text
maintenanceTrackName} -> Maybe Text
maintenanceTrackName) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:maintenanceTrackName:CreateCluster' :: Maybe Text
maintenanceTrackName = Maybe Text
a} :: CreateCluster)

-- | The default number of days to retain a manual snapshot. If the value is
-- -1, the snapshot is retained indefinitely. This setting doesn\'t change
-- the retention period of existing snapshots.
--
-- The value must be either -1 or an integer between 1 and 3,653.
createCluster_manualSnapshotRetentionPeriod :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Int)
createCluster_manualSnapshotRetentionPeriod :: Lens' CreateCluster (Maybe Int)
createCluster_manualSnapshotRetentionPeriod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Int
manualSnapshotRetentionPeriod :: Maybe Int
$sel:manualSnapshotRetentionPeriod:CreateCluster' :: CreateCluster -> Maybe Int
manualSnapshotRetentionPeriod} -> Maybe Int
manualSnapshotRetentionPeriod) (\s :: CreateCluster
s@CreateCluster' {} Maybe Int
a -> CreateCluster
s {$sel:manualSnapshotRetentionPeriod:CreateCluster' :: Maybe Int
manualSnapshotRetentionPeriod = Maybe Int
a} :: CreateCluster)

-- | The number of compute nodes in the cluster. This parameter is required
-- when the __ClusterType__ parameter is specified as @multi-node@.
--
-- For information about determining how many nodes you need, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes Working with Clusters>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- If you don\'t specify this parameter, you get a single-node cluster.
-- When requesting a multi-node cluster, you must specify the number of
-- nodes that you want in the cluster.
--
-- Default: @1@
--
-- Constraints: Value must be at least 1 and no more than 100.
createCluster_numberOfNodes :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Int)
createCluster_numberOfNodes :: Lens' CreateCluster (Maybe Int)
createCluster_numberOfNodes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Int
numberOfNodes :: Maybe Int
$sel:numberOfNodes:CreateCluster' :: CreateCluster -> Maybe Int
numberOfNodes} -> Maybe Int
numberOfNodes) (\s :: CreateCluster
s@CreateCluster' {} Maybe Int
a -> CreateCluster
s {$sel:numberOfNodes:CreateCluster' :: Maybe Int
numberOfNodes = Maybe Int
a} :: CreateCluster)

-- | The port number on which the cluster accepts incoming connections.
--
-- The cluster is accessible only via the JDBC and ODBC connection strings.
-- Part of the connection string requires the port on which the cluster
-- will listen for incoming connections.
--
-- Default: @5439@
--
-- Valid Values: @1150-65535@
createCluster_port :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Int)
createCluster_port :: Lens' CreateCluster (Maybe Int)
createCluster_port = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Int
port :: Maybe Int
$sel:port:CreateCluster' :: CreateCluster -> Maybe Int
port} -> Maybe Int
port) (\s :: CreateCluster
s@CreateCluster' {} Maybe Int
a -> CreateCluster
s {$sel:port:CreateCluster' :: Maybe Int
port = Maybe Int
a} :: CreateCluster)

-- | The weekly time range (in UTC) during which automated cluster
-- maintenance can occur.
--
-- Format: @ddd:hh24:mi-ddd:hh24:mi@
--
-- Default: A 30-minute window selected at random from an 8-hour block of
-- time per region, occurring on a random day of the week. For more
-- information about the time blocks for each region, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-maintenance-windows Maintenance Windows>
-- in Amazon Redshift Cluster Management Guide.
--
-- Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
--
-- Constraints: Minimum 30-minute window.
createCluster_preferredMaintenanceWindow :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_preferredMaintenanceWindow :: Lens' CreateCluster (Maybe Text)
createCluster_preferredMaintenanceWindow = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:CreateCluster' :: CreateCluster -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:preferredMaintenanceWindow:CreateCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: CreateCluster)

-- | If @true@, the cluster can be accessed from a public network.
createCluster_publiclyAccessible :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Bool)
createCluster_publiclyAccessible :: Lens' CreateCluster (Maybe Bool)
createCluster_publiclyAccessible = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:CreateCluster' :: CreateCluster -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: CreateCluster
s@CreateCluster' {} Maybe Bool
a -> CreateCluster
s {$sel:publiclyAccessible:CreateCluster' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: CreateCluster)

-- | A unique identifier for the snapshot schedule.
createCluster_snapshotScheduleIdentifier :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_snapshotScheduleIdentifier :: Lens' CreateCluster (Maybe Text)
createCluster_snapshotScheduleIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
snapshotScheduleIdentifier :: Maybe Text
$sel:snapshotScheduleIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
snapshotScheduleIdentifier} -> Maybe Text
snapshotScheduleIdentifier) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:snapshotScheduleIdentifier:CreateCluster' :: Maybe Text
snapshotScheduleIdentifier = Maybe Text
a} :: CreateCluster)

-- | A list of tag instances.
createCluster_tags :: Lens.Lens' CreateCluster (Prelude.Maybe [Tag])
createCluster_tags :: Lens' CreateCluster (Maybe [Tag])
createCluster_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateCluster' :: CreateCluster -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateCluster
s@CreateCluster' {} Maybe [Tag]
a -> CreateCluster
s {$sel:tags:CreateCluster' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateCluster) 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 Virtual Private Cloud (VPC) security groups to be associated
-- with the cluster.
--
-- Default: The default VPC security group is associated with the cluster.
createCluster_vpcSecurityGroupIds :: Lens.Lens' CreateCluster (Prelude.Maybe [Prelude.Text])
createCluster_vpcSecurityGroupIds :: Lens' CreateCluster (Maybe [Text])
createCluster_vpcSecurityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:CreateCluster' :: CreateCluster -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: CreateCluster
s@CreateCluster' {} Maybe [Text]
a -> CreateCluster
s {$sel:vpcSecurityGroupIds:CreateCluster' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: CreateCluster) 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 unique identifier for the cluster. You use this identifier to refer to
-- the cluster for any subsequent cluster operations such as deleting or
-- modifying. The identifier also appears in the Amazon Redshift console.
--
-- Constraints:
--
-- -   Must contain from 1 to 63 alphanumeric characters or hyphens.
--
-- -   Alphabetic characters must be lowercase.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
--
-- -   Must be unique for all clusters within an Amazon Web Services
--     account.
--
-- Example: @myexamplecluster@
createCluster_clusterIdentifier :: Lens.Lens' CreateCluster Prelude.Text
createCluster_clusterIdentifier :: Lens' CreateCluster Text
createCluster_clusterIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:CreateCluster' :: CreateCluster -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: CreateCluster
s@CreateCluster' {} Text
a -> CreateCluster
s {$sel:clusterIdentifier:CreateCluster' :: Text
clusterIdentifier = Text
a} :: CreateCluster)

-- | The node type to be provisioned for the cluster. For information about
-- node types, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes Working with Clusters>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- Valid Values: @ds2.xlarge@ | @ds2.8xlarge@ | @dc1.large@ | @dc1.8xlarge@
-- | @dc2.large@ | @dc2.8xlarge@ | @ra3.xlplus@ | @ra3.4xlarge@ |
-- @ra3.16xlarge@
createCluster_nodeType :: Lens.Lens' CreateCluster Prelude.Text
createCluster_nodeType :: Lens' CreateCluster Text
createCluster_nodeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Text
nodeType :: Text
$sel:nodeType:CreateCluster' :: CreateCluster -> Text
nodeType} -> Text
nodeType) (\s :: CreateCluster
s@CreateCluster' {} Text
a -> CreateCluster
s {$sel:nodeType:CreateCluster' :: Text
nodeType = Text
a} :: CreateCluster)

-- | The user name associated with the admin user account for the cluster
-- that is being created.
--
-- Constraints:
--
-- -   Must be 1 - 128 alphanumeric characters. The user name can\'t be
--     @PUBLIC@.
--
-- -   First character must be a letter.
--
-- -   Cannot be a reserved word. A list of reserved words can be found in
--     <https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html Reserved Words>
--     in the Amazon Redshift Database Developer Guide.
createCluster_masterUsername :: Lens.Lens' CreateCluster Prelude.Text
createCluster_masterUsername :: Lens' CreateCluster Text
createCluster_masterUsername = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Text
masterUsername :: Text
$sel:masterUsername:CreateCluster' :: CreateCluster -> Text
masterUsername} -> Text
masterUsername) (\s :: CreateCluster
s@CreateCluster' {} Text
a -> CreateCluster
s {$sel:masterUsername:CreateCluster' :: Text
masterUsername = Text
a} :: CreateCluster)

-- | The password associated with the admin user account for the cluster that
-- is being created.
--
-- Constraints:
--
-- -   Must be between 8 and 64 characters in length.
--
-- -   Must contain at least one uppercase letter.
--
-- -   Must contain at least one lowercase letter.
--
-- -   Must contain one number.
--
-- -   Can be any printable ASCII character (ASCII code 33-126) except @\'@
--     (single quote), @\"@ (double quote), @\\@, @\/@, or @\@@.
createCluster_masterUserPassword :: Lens.Lens' CreateCluster Prelude.Text
createCluster_masterUserPassword :: Lens' CreateCluster Text
createCluster_masterUserPassword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Text
masterUserPassword :: Text
$sel:masterUserPassword:CreateCluster' :: CreateCluster -> Text
masterUserPassword} -> Text
masterUserPassword) (\s :: CreateCluster
s@CreateCluster' {} Text
a -> CreateCluster
s {$sel:masterUserPassword:CreateCluster' :: Text
masterUserPassword = Text
a} :: CreateCluster)

instance Core.AWSRequest CreateCluster where
  type
    AWSResponse CreateCluster =
      CreateClusterResponse
  request :: (Service -> Service) -> CreateCluster -> Request CreateCluster
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCluster)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateClusterResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Cluster -> Int -> CreateClusterResponse
CreateClusterResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Cluster")
            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 CreateCluster where
  hashWithSalt :: Int -> CreateCluster -> Int
hashWithSalt Int
_salt CreateCluster' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Tag]
Maybe Text
Maybe AquaConfigurationStatus
Text
masterUserPassword :: Text
masterUsername :: Text
nodeType :: Text
clusterIdentifier :: Text
vpcSecurityGroupIds :: Maybe [Text]
tags :: Maybe [Tag]
snapshotScheduleIdentifier :: Maybe Text
publiclyAccessible :: Maybe Bool
preferredMaintenanceWindow :: Maybe Text
port :: Maybe Int
numberOfNodes :: Maybe Int
manualSnapshotRetentionPeriod :: Maybe Int
maintenanceTrackName :: Maybe Text
loadSampleData :: Maybe Text
kmsKeyId :: Maybe Text
iamRoles :: Maybe [Text]
hsmConfigurationIdentifier :: Maybe Text
hsmClientCertificateIdentifier :: Maybe Text
enhancedVpcRouting :: Maybe Bool
encrypted :: Maybe Bool
elasticIp :: Maybe Text
defaultIamRoleArn :: Maybe Text
dbName :: Maybe Text
clusterVersion :: Maybe Text
clusterType :: Maybe Text
clusterSubnetGroupName :: Maybe Text
clusterSecurityGroups :: Maybe [Text]
clusterParameterGroupName :: Maybe Text
availabilityZoneRelocation :: Maybe Bool
availabilityZone :: Maybe Text
automatedSnapshotRetentionPeriod :: Maybe Int
aquaConfigurationStatus :: Maybe AquaConfigurationStatus
allowVersionUpgrade :: Maybe Bool
additionalInfo :: Maybe Text
$sel:masterUserPassword:CreateCluster' :: CreateCluster -> Text
$sel:masterUsername:CreateCluster' :: CreateCluster -> Text
$sel:nodeType:CreateCluster' :: CreateCluster -> Text
$sel:clusterIdentifier:CreateCluster' :: CreateCluster -> Text
$sel:vpcSecurityGroupIds:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:tags:CreateCluster' :: CreateCluster -> Maybe [Tag]
$sel:snapshotScheduleIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
$sel:publiclyAccessible:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:preferredMaintenanceWindow:CreateCluster' :: CreateCluster -> Maybe Text
$sel:port:CreateCluster' :: CreateCluster -> Maybe Int
$sel:numberOfNodes:CreateCluster' :: CreateCluster -> Maybe Int
$sel:manualSnapshotRetentionPeriod:CreateCluster' :: CreateCluster -> Maybe Int
$sel:maintenanceTrackName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:loadSampleData:CreateCluster' :: CreateCluster -> Maybe Text
$sel:kmsKeyId:CreateCluster' :: CreateCluster -> Maybe Text
$sel:iamRoles:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:hsmConfigurationIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
$sel:hsmClientCertificateIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
$sel:enhancedVpcRouting:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:encrypted:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:elasticIp:CreateCluster' :: CreateCluster -> Maybe Text
$sel:defaultIamRoleArn:CreateCluster' :: CreateCluster -> Maybe Text
$sel:dbName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterVersion:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterType:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterSubnetGroupName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterSecurityGroups:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:clusterParameterGroupName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:availabilityZoneRelocation:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:availabilityZone:CreateCluster' :: CreateCluster -> Maybe Text
$sel:automatedSnapshotRetentionPeriod:CreateCluster' :: CreateCluster -> Maybe Int
$sel:aquaConfigurationStatus:CreateCluster' :: CreateCluster -> Maybe AquaConfigurationStatus
$sel:allowVersionUpgrade:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:additionalInfo:CreateCluster' :: CreateCluster -> 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 Bool
allowVersionUpgrade
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AquaConfigurationStatus
aquaConfigurationStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
automatedSnapshotRetentionPeriod
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
availabilityZone
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
availabilityZoneRelocation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterParameterGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
clusterSecurityGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterSubnetGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultIamRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
elasticIp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
encrypted
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enhancedVpcRouting
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hsmClientCertificateIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hsmConfigurationIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
iamRoles
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
loadSampleData
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maintenanceTrackName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
manualSnapshotRetentionPeriod
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numberOfNodes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
port
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preferredMaintenanceWindow
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
publiclyAccessible
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotScheduleIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
vpcSecurityGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clusterIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
nodeType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
masterUsername
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
masterUserPassword

instance Prelude.NFData CreateCluster where
  rnf :: CreateCluster -> ()
rnf CreateCluster' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Tag]
Maybe Text
Maybe AquaConfigurationStatus
Text
masterUserPassword :: Text
masterUsername :: Text
nodeType :: Text
clusterIdentifier :: Text
vpcSecurityGroupIds :: Maybe [Text]
tags :: Maybe [Tag]
snapshotScheduleIdentifier :: Maybe Text
publiclyAccessible :: Maybe Bool
preferredMaintenanceWindow :: Maybe Text
port :: Maybe Int
numberOfNodes :: Maybe Int
manualSnapshotRetentionPeriod :: Maybe Int
maintenanceTrackName :: Maybe Text
loadSampleData :: Maybe Text
kmsKeyId :: Maybe Text
iamRoles :: Maybe [Text]
hsmConfigurationIdentifier :: Maybe Text
hsmClientCertificateIdentifier :: Maybe Text
enhancedVpcRouting :: Maybe Bool
encrypted :: Maybe Bool
elasticIp :: Maybe Text
defaultIamRoleArn :: Maybe Text
dbName :: Maybe Text
clusterVersion :: Maybe Text
clusterType :: Maybe Text
clusterSubnetGroupName :: Maybe Text
clusterSecurityGroups :: Maybe [Text]
clusterParameterGroupName :: Maybe Text
availabilityZoneRelocation :: Maybe Bool
availabilityZone :: Maybe Text
automatedSnapshotRetentionPeriod :: Maybe Int
aquaConfigurationStatus :: Maybe AquaConfigurationStatus
allowVersionUpgrade :: Maybe Bool
additionalInfo :: Maybe Text
$sel:masterUserPassword:CreateCluster' :: CreateCluster -> Text
$sel:masterUsername:CreateCluster' :: CreateCluster -> Text
$sel:nodeType:CreateCluster' :: CreateCluster -> Text
$sel:clusterIdentifier:CreateCluster' :: CreateCluster -> Text
$sel:vpcSecurityGroupIds:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:tags:CreateCluster' :: CreateCluster -> Maybe [Tag]
$sel:snapshotScheduleIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
$sel:publiclyAccessible:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:preferredMaintenanceWindow:CreateCluster' :: CreateCluster -> Maybe Text
$sel:port:CreateCluster' :: CreateCluster -> Maybe Int
$sel:numberOfNodes:CreateCluster' :: CreateCluster -> Maybe Int
$sel:manualSnapshotRetentionPeriod:CreateCluster' :: CreateCluster -> Maybe Int
$sel:maintenanceTrackName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:loadSampleData:CreateCluster' :: CreateCluster -> Maybe Text
$sel:kmsKeyId:CreateCluster' :: CreateCluster -> Maybe Text
$sel:iamRoles:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:hsmConfigurationIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
$sel:hsmClientCertificateIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
$sel:enhancedVpcRouting:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:encrypted:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:elasticIp:CreateCluster' :: CreateCluster -> Maybe Text
$sel:defaultIamRoleArn:CreateCluster' :: CreateCluster -> Maybe Text
$sel:dbName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterVersion:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterType:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterSubnetGroupName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterSecurityGroups:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:clusterParameterGroupName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:availabilityZoneRelocation:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:availabilityZone:CreateCluster' :: CreateCluster -> Maybe Text
$sel:automatedSnapshotRetentionPeriod:CreateCluster' :: CreateCluster -> Maybe Int
$sel:aquaConfigurationStatus:CreateCluster' :: CreateCluster -> Maybe AquaConfigurationStatus
$sel:allowVersionUpgrade:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:additionalInfo:CreateCluster' :: CreateCluster -> 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 Bool
allowVersionUpgrade
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AquaConfigurationStatus
aquaConfigurationStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
automatedSnapshotRetentionPeriod
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
availabilityZone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
availabilityZoneRelocation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterParameterGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
clusterSecurityGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterSubnetGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultIamRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
elasticIp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
encrypted
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enhancedVpcRouting
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
hsmClientCertificateIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
hsmConfigurationIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
iamRoles
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
loadSampleData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
maintenanceTrackName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Int
manualSnapshotRetentionPeriod
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Int
numberOfNodes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
preferredMaintenanceWindow
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Bool
publiclyAccessible
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
snapshotScheduleIdentifier
      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 [Text]
vpcSecurityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Text
clusterIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Text
nodeType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Text
masterUsername
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Text
masterUserPassword

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

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

instance Data.ToQuery CreateCluster where
  toQuery :: CreateCluster -> QueryString
toQuery CreateCluster' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Tag]
Maybe Text
Maybe AquaConfigurationStatus
Text
masterUserPassword :: Text
masterUsername :: Text
nodeType :: Text
clusterIdentifier :: Text
vpcSecurityGroupIds :: Maybe [Text]
tags :: Maybe [Tag]
snapshotScheduleIdentifier :: Maybe Text
publiclyAccessible :: Maybe Bool
preferredMaintenanceWindow :: Maybe Text
port :: Maybe Int
numberOfNodes :: Maybe Int
manualSnapshotRetentionPeriod :: Maybe Int
maintenanceTrackName :: Maybe Text
loadSampleData :: Maybe Text
kmsKeyId :: Maybe Text
iamRoles :: Maybe [Text]
hsmConfigurationIdentifier :: Maybe Text
hsmClientCertificateIdentifier :: Maybe Text
enhancedVpcRouting :: Maybe Bool
encrypted :: Maybe Bool
elasticIp :: Maybe Text
defaultIamRoleArn :: Maybe Text
dbName :: Maybe Text
clusterVersion :: Maybe Text
clusterType :: Maybe Text
clusterSubnetGroupName :: Maybe Text
clusterSecurityGroups :: Maybe [Text]
clusterParameterGroupName :: Maybe Text
availabilityZoneRelocation :: Maybe Bool
availabilityZone :: Maybe Text
automatedSnapshotRetentionPeriod :: Maybe Int
aquaConfigurationStatus :: Maybe AquaConfigurationStatus
allowVersionUpgrade :: Maybe Bool
additionalInfo :: Maybe Text
$sel:masterUserPassword:CreateCluster' :: CreateCluster -> Text
$sel:masterUsername:CreateCluster' :: CreateCluster -> Text
$sel:nodeType:CreateCluster' :: CreateCluster -> Text
$sel:clusterIdentifier:CreateCluster' :: CreateCluster -> Text
$sel:vpcSecurityGroupIds:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:tags:CreateCluster' :: CreateCluster -> Maybe [Tag]
$sel:snapshotScheduleIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
$sel:publiclyAccessible:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:preferredMaintenanceWindow:CreateCluster' :: CreateCluster -> Maybe Text
$sel:port:CreateCluster' :: CreateCluster -> Maybe Int
$sel:numberOfNodes:CreateCluster' :: CreateCluster -> Maybe Int
$sel:manualSnapshotRetentionPeriod:CreateCluster' :: CreateCluster -> Maybe Int
$sel:maintenanceTrackName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:loadSampleData:CreateCluster' :: CreateCluster -> Maybe Text
$sel:kmsKeyId:CreateCluster' :: CreateCluster -> Maybe Text
$sel:iamRoles:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:hsmConfigurationIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
$sel:hsmClientCertificateIdentifier:CreateCluster' :: CreateCluster -> Maybe Text
$sel:enhancedVpcRouting:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:encrypted:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:elasticIp:CreateCluster' :: CreateCluster -> Maybe Text
$sel:defaultIamRoleArn:CreateCluster' :: CreateCluster -> Maybe Text
$sel:dbName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterVersion:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterType:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterSubnetGroupName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:clusterSecurityGroups:CreateCluster' :: CreateCluster -> Maybe [Text]
$sel:clusterParameterGroupName:CreateCluster' :: CreateCluster -> Maybe Text
$sel:availabilityZoneRelocation:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:availabilityZone:CreateCluster' :: CreateCluster -> Maybe Text
$sel:automatedSnapshotRetentionPeriod:CreateCluster' :: CreateCluster -> Maybe Int
$sel:aquaConfigurationStatus:CreateCluster' :: CreateCluster -> Maybe AquaConfigurationStatus
$sel:allowVersionUpgrade:CreateCluster' :: CreateCluster -> Maybe Bool
$sel:additionalInfo:CreateCluster' :: CreateCluster -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateCluster" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"AdditionalInfo" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
additionalInfo,
        ByteString
"AllowVersionUpgrade" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
allowVersionUpgrade,
        ByteString
"AquaConfigurationStatus"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe AquaConfigurationStatus
aquaConfigurationStatus,
        ByteString
"AutomatedSnapshotRetentionPeriod"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
automatedSnapshotRetentionPeriod,
        ByteString
"AvailabilityZone" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
availabilityZone,
        ByteString
"AvailabilityZoneRelocation"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
availabilityZoneRelocation,
        ByteString
"ClusterParameterGroupName"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clusterParameterGroupName,
        ByteString
"ClusterSecurityGroups"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"ClusterSecurityGroupName"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
clusterSecurityGroups
            ),
        ByteString
"ClusterSubnetGroupName"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clusterSubnetGroupName,
        ByteString
"ClusterType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clusterType,
        ByteString
"ClusterVersion" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clusterVersion,
        ByteString
"DBName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
dbName,
        ByteString
"DefaultIamRoleArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
defaultIamRoleArn,
        ByteString
"ElasticIp" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
elasticIp,
        ByteString
"Encrypted" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
encrypted,
        ByteString
"EnhancedVpcRouting" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
enhancedVpcRouting,
        ByteString
"HsmClientCertificateIdentifier"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
hsmClientCertificateIdentifier,
        ByteString
"HsmConfigurationIdentifier"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
hsmConfigurationIdentifier,
        ByteString
"IamRoles"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"IamRoleArn" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
iamRoles),
        ByteString
"KmsKeyId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
kmsKeyId,
        ByteString
"LoadSampleData" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
loadSampleData,
        ByteString
"MaintenanceTrackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
maintenanceTrackName,
        ByteString
"ManualSnapshotRetentionPeriod"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
manualSnapshotRetentionPeriod,
        ByteString
"NumberOfNodes" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
numberOfNodes,
        ByteString
"Port" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
port,
        ByteString
"PreferredMaintenanceWindow"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
preferredMaintenanceWindow,
        ByteString
"PubliclyAccessible" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
publiclyAccessible,
        ByteString
"SnapshotScheduleIdentifier"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
snapshotScheduleIdentifier,
        ByteString
"Tags"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Tag" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"VpcSecurityGroupIds"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"VpcSecurityGroupId"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
vpcSecurityGroupIds
            ),
        ByteString
"ClusterIdentifier" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
clusterIdentifier,
        ByteString
"NodeType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
nodeType,
        ByteString
"MasterUsername" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
masterUsername,
        ByteString
"MasterUserPassword" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
masterUserPassword
      ]

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

-- |
-- Create a value of 'CreateClusterResponse' 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:
--
-- 'cluster', 'createClusterResponse_cluster' - Undocumented member.
--
-- 'httpStatus', 'createClusterResponse_httpStatus' - The response's http status code.
newCreateClusterResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateClusterResponse
newCreateClusterResponse :: Int -> CreateClusterResponse
newCreateClusterResponse Int
pHttpStatus_ =
  CreateClusterResponse'
    { $sel:cluster:CreateClusterResponse' :: Maybe Cluster
cluster = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateClusterResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createClusterResponse_cluster :: Lens.Lens' CreateClusterResponse (Prelude.Maybe Cluster)
createClusterResponse_cluster :: Lens' CreateClusterResponse (Maybe Cluster)
createClusterResponse_cluster = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterResponse' {Maybe Cluster
cluster :: Maybe Cluster
$sel:cluster:CreateClusterResponse' :: CreateClusterResponse -> Maybe Cluster
cluster} -> Maybe Cluster
cluster) (\s :: CreateClusterResponse
s@CreateClusterResponse' {} Maybe Cluster
a -> CreateClusterResponse
s {$sel:cluster:CreateClusterResponse' :: Maybe Cluster
cluster = Maybe Cluster
a} :: CreateClusterResponse)

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

instance Prelude.NFData CreateClusterResponse where
  rnf :: CreateClusterResponse -> ()
rnf CreateClusterResponse' {Int
Maybe Cluster
httpStatus :: Int
cluster :: Maybe Cluster
$sel:httpStatus:CreateClusterResponse' :: CreateClusterResponse -> Int
$sel:cluster:CreateClusterResponse' :: CreateClusterResponse -> Maybe Cluster
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Cluster
cluster
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus