{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a 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_manualSnapshotRetentionPeriod,
    createCluster_enhancedVpcRouting,
    createCluster_additionalInfo,
    createCluster_snapshotScheduleIdentifier,
    createCluster_publiclyAccessible,
    createCluster_maintenanceTrackName,
    createCluster_hsmConfigurationIdentifier,
    createCluster_aquaConfigurationStatus,
    createCluster_clusterSecurityGroups,
    createCluster_automatedSnapshotRetentionPeriod,
    createCluster_encrypted,
    createCluster_clusterSubnetGroupName,
    createCluster_hsmClientCertificateIdentifier,
    createCluster_numberOfNodes,
    createCluster_elasticIp,
    createCluster_preferredMaintenanceWindow,
    createCluster_kmsKeyId,
    createCluster_availabilityZone,
    createCluster_vpcSecurityGroupIds,
    createCluster_iamRoles,
    createCluster_clusterType,
    createCluster_availabilityZoneRelocation,
    createCluster_clusterVersion,
    createCluster_allowVersionUpgrade,
    createCluster_clusterParameterGroupName,
    createCluster_tags,
    createCluster_port,
    createCluster_dbName,
    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.Lens as Lens
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'
  { -- | 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,
    -- | 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,
    -- | Reserved.
    CreateCluster -> Maybe Text
additionalInfo :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the snapshot schedule.
    CreateCluster -> Maybe Text
snapshotScheduleIdentifier :: Prelude.Maybe Prelude.Text,
    -- | If @true@, the cluster can be accessed from a public network.
    CreateCluster -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
    -- | 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,
    -- | 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,
    -- | The value represents how the cluster is configured to use AQUA (Advanced
    -- Query Accelerator) when it is created. Possible values include the
    -- following.
    --
    -- -   enabled - Use AQUA if it is available for the current Amazon Web
    --     Services Region and Amazon Redshift node type.
    --
    -- -   disabled - Don\'t use AQUA.
    --
    -- -   auto - Amazon Redshift determines whether to use AQUA.
    CreateCluster -> Maybe AquaConfigurationStatus
aquaConfigurationStatus :: Prelude.Maybe AquaConfigurationStatus,
    -- | 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 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,
    -- | If @true@, the data in the cluster is encrypted at rest.
    --
    -- Default: false
    CreateCluster -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
    -- | 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,
    -- | 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,
    -- | 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 Elastic IP (EIP) address for the cluster.
    --
    -- Constraints: The cluster must be provisioned in EC2-VPC and
    -- publicly-accessible through an Internet gateway. 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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 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. You can
    -- supply up to 10 IAM roles in a single request.
    --
    -- A cluster can have up to 10 IAM roles associated with it at any time.
    CreateCluster -> Maybe [Text]
iamRoles :: 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 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 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,
    -- | 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,
    -- | 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 tag instances.
    CreateCluster -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | 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 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,
    -- | 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 to 126) except
    --     \' (single quote), \" (double quote), \\, \/, \@, or space.
    CreateCluster -> Text
masterUserPassword :: Prelude.Text
  }
  deriving (CreateCluster -> CreateCluster -> Bool
(CreateCluster -> CreateCluster -> Bool)
-> (CreateCluster -> CreateCluster -> Bool) -> Eq CreateCluster
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]
(Int -> ReadS CreateCluster)
-> ReadS [CreateCluster]
-> ReadPrec CreateCluster
-> ReadPrec [CreateCluster]
-> Read 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
(Int -> CreateCluster -> ShowS)
-> (CreateCluster -> String)
-> ([CreateCluster] -> ShowS)
-> Show CreateCluster
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. CreateCluster -> Rep CreateCluster x)
-> (forall x. Rep CreateCluster x -> CreateCluster)
-> Generic CreateCluster
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:
--
-- '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.
--
-- '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
--
-- 'additionalInfo', 'createCluster_additionalInfo' - Reserved.
--
-- 'snapshotScheduleIdentifier', 'createCluster_snapshotScheduleIdentifier' - A unique identifier for the snapshot schedule.
--
-- 'publiclyAccessible', 'createCluster_publiclyAccessible' - If @true@, the cluster can be accessed from a public network.
--
-- '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.
--
-- '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.
--
-- 'aquaConfigurationStatus', 'createCluster_aquaConfigurationStatus' - The value represents how the cluster is configured to use AQUA (Advanced
-- Query Accelerator) when it is created. Possible values include the
-- following.
--
-- -   enabled - Use AQUA if it is available for the current Amazon Web
--     Services Region and Amazon Redshift node type.
--
-- -   disabled - Don\'t use AQUA.
--
-- -   auto - Amazon Redshift determines whether to use AQUA.
--
-- 'clusterSecurityGroups', 'createCluster_clusterSecurityGroups' - A list of security groups to be associated with this cluster.
--
-- Default: The default cluster security group for Amazon Redshift.
--
-- '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.
--
-- 'encrypted', 'createCluster_encrypted' - If @true@, the data in the cluster is encrypted at rest.
--
-- Default: false
--
-- '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).
--
-- '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.
--
-- '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.
--
-- '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. 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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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. You can
-- supply up to 10 IAM roles in a single request.
--
-- A cluster can have up to 10 IAM roles associated with it at any time.
--
-- '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@
--
-- 'availabilityZoneRelocation', 'createCluster_availabilityZoneRelocation' - The option to enable relocation for an Amazon Redshift cluster between
-- Availability Zones after the cluster is created.
--
-- '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@
--
-- '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@
--
-- '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.
--
-- 'tags', 'createCluster_tags' - A list of tag instances.
--
-- '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@
--
-- '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.
--
-- '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 to 126) except
--     \' (single quote), \" (double quote), \\, \/, \@, or space.
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' :: Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe AquaConfigurationStatus
-> Maybe [Text]
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Tag]
-> Maybe Int
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> CreateCluster
CreateCluster'
      { $sel:manualSnapshotRetentionPeriod:CreateCluster' :: Maybe Int
manualSnapshotRetentionPeriod =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:enhancedVpcRouting:CreateCluster' :: Maybe Bool
enhancedVpcRouting = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:additionalInfo:CreateCluster' :: Maybe Text
additionalInfo = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotScheduleIdentifier:CreateCluster' :: Maybe Text
snapshotScheduleIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:publiclyAccessible:CreateCluster' :: Maybe Bool
publiclyAccessible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:maintenanceTrackName:CreateCluster' :: Maybe Text
maintenanceTrackName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:hsmConfigurationIdentifier:CreateCluster' :: Maybe Text
hsmConfigurationIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:aquaConfigurationStatus:CreateCluster' :: Maybe AquaConfigurationStatus
aquaConfigurationStatus = Maybe AquaConfigurationStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterSecurityGroups:CreateCluster' :: Maybe [Text]
clusterSecurityGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:automatedSnapshotRetentionPeriod:CreateCluster' :: Maybe Int
automatedSnapshotRetentionPeriod = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:encrypted:CreateCluster' :: Maybe Bool
encrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterSubnetGroupName:CreateCluster' :: Maybe Text
clusterSubnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:hsmClientCertificateIdentifier:CreateCluster' :: Maybe Text
hsmClientCertificateIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:numberOfNodes:CreateCluster' :: Maybe Int
numberOfNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:elasticIp:CreateCluster' :: Maybe Text
elasticIp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:preferredMaintenanceWindow:CreateCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:CreateCluster' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:availabilityZone:CreateCluster' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcSecurityGroupIds:CreateCluster' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:iamRoles:CreateCluster' :: Maybe [Text]
iamRoles = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterType:CreateCluster' :: Maybe Text
clusterType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:availabilityZoneRelocation:CreateCluster' :: Maybe Bool
availabilityZoneRelocation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterVersion:CreateCluster' :: Maybe Text
clusterVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:allowVersionUpgrade:CreateCluster' :: Maybe Bool
allowVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterParameterGroupName:CreateCluster' :: Maybe Text
clusterParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateCluster' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:port:CreateCluster' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:dbName:CreateCluster' :: Maybe Text
dbName = Maybe Text
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_
      }

-- | 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 :: (Maybe Int -> f (Maybe Int)) -> CreateCluster -> f CreateCluster
createCluster_manualSnapshotRetentionPeriod = (CreateCluster -> Maybe Int)
-> (CreateCluster -> Maybe Int -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Int) (Maybe Int)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> CreateCluster -> f CreateCluster
createCluster_enhancedVpcRouting = (CreateCluster -> Maybe Bool)
-> (CreateCluster -> Maybe Bool -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Bool) (Maybe Bool)
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)

-- | Reserved.
createCluster_additionalInfo :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_additionalInfo :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_additionalInfo = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | A unique identifier for the snapshot schedule.
createCluster_snapshotScheduleIdentifier :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_snapshotScheduleIdentifier :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_snapshotScheduleIdentifier = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | If @true@, the cluster can be accessed from a public network.
createCluster_publiclyAccessible :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Bool)
createCluster_publiclyAccessible :: (Maybe Bool -> f (Maybe Bool)) -> CreateCluster -> f CreateCluster
createCluster_publiclyAccessible = (CreateCluster -> Maybe Bool)
-> (CreateCluster -> Maybe Bool -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_maintenanceTrackName = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_hsmConfigurationIdentifier = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | The value represents how the cluster is configured to use AQUA (Advanced
-- Query Accelerator) when it is created. Possible values include the
-- following.
--
-- -   enabled - Use AQUA if it is available for the current Amazon Web
--     Services Region and Amazon Redshift node type.
--
-- -   disabled - Don\'t use AQUA.
--
-- -   auto - Amazon Redshift determines whether to use AQUA.
createCluster_aquaConfigurationStatus :: Lens.Lens' CreateCluster (Prelude.Maybe AquaConfigurationStatus)
createCluster_aquaConfigurationStatus :: (Maybe AquaConfigurationStatus
 -> f (Maybe AquaConfigurationStatus))
-> CreateCluster -> f CreateCluster
createCluster_aquaConfigurationStatus = (CreateCluster -> Maybe AquaConfigurationStatus)
-> (CreateCluster
    -> Maybe AquaConfigurationStatus -> CreateCluster)
-> Lens
     CreateCluster
     CreateCluster
     (Maybe AquaConfigurationStatus)
     (Maybe 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)

-- | 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 :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCluster -> f CreateCluster
createCluster_clusterSecurityGroups = (CreateCluster -> Maybe [Text])
-> (CreateCluster -> Maybe [Text] -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateCluster -> f CreateCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCluster
-> f CreateCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 :: (Maybe Int -> f (Maybe Int)) -> CreateCluster -> f CreateCluster
createCluster_automatedSnapshotRetentionPeriod = (CreateCluster -> Maybe Int)
-> (CreateCluster -> Maybe Int -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Int) (Maybe Int)
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)

-- | If @true@, the data in the cluster is encrypted at rest.
--
-- Default: false
createCluster_encrypted :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Bool)
createCluster_encrypted :: (Maybe Bool -> f (Maybe Bool)) -> CreateCluster -> f CreateCluster
createCluster_encrypted = (CreateCluster -> Maybe Bool)
-> (CreateCluster -> Maybe Bool -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_clusterSubnetGroupName = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_hsmClientCertificateIdentifier = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Int -> f (Maybe Int)) -> CreateCluster -> f CreateCluster
createCluster_numberOfNodes = (CreateCluster -> Maybe Int)
-> (CreateCluster -> Maybe Int -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Int) (Maybe Int)
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 Elastic IP (EIP) address for the cluster.
--
-- Constraints: The cluster must be provisioned in EC2-VPC and
-- publicly-accessible through an Internet gateway. 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_elasticIp = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_preferredMaintenanceWindow = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_kmsKeyId = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_availabilityZone = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCluster -> f CreateCluster
createCluster_vpcSecurityGroupIds = (CreateCluster -> Maybe [Text])
-> (CreateCluster -> Maybe [Text] -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateCluster -> f CreateCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCluster
-> f CreateCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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. You can
-- supply up to 10 IAM roles in a single request.
--
-- A cluster can have up to 10 IAM roles associated with it at any time.
createCluster_iamRoles :: Lens.Lens' CreateCluster (Prelude.Maybe [Prelude.Text])
createCluster_iamRoles :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateCluster -> f CreateCluster
createCluster_iamRoles = (CreateCluster -> Maybe [Text])
-> (CreateCluster -> Maybe [Text] -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateCluster -> f CreateCluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCluster
-> f CreateCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_clusterType = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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 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 :: (Maybe Bool -> f (Maybe Bool)) -> CreateCluster -> f CreateCluster
createCluster_availabilityZoneRelocation = (CreateCluster -> Maybe Bool)
-> (CreateCluster -> Maybe Bool -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Bool) (Maybe Bool)
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 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_clusterVersion = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> CreateCluster -> f CreateCluster
createCluster_allowVersionUpgrade = (CreateCluster -> Maybe Bool)
-> (CreateCluster -> Maybe Bool -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_clusterParameterGroupName = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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 tag instances.
createCluster_tags :: Lens.Lens' CreateCluster (Prelude.Maybe [Tag])
createCluster_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCluster -> f CreateCluster
createCluster_tags = (CreateCluster -> Maybe [Tag])
-> (CreateCluster -> Maybe [Tag] -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe [Tag]) (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateCluster -> f CreateCluster)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCluster
-> f CreateCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Int -> f (Maybe Int)) -> CreateCluster -> f CreateCluster
createCluster_port = (CreateCluster -> Maybe Int)
-> (CreateCluster -> Maybe Int -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Int) (Maybe Int)
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 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 :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_dbName = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Text -> f Text) -> CreateCluster -> f CreateCluster
createCluster_clusterIdentifier = (CreateCluster -> Text)
-> (CreateCluster -> Text -> CreateCluster)
-> Lens CreateCluster CreateCluster Text Text
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 :: (Text -> f Text) -> CreateCluster -> f CreateCluster
createCluster_nodeType = (CreateCluster -> Text)
-> (CreateCluster -> Text -> CreateCluster)
-> Lens CreateCluster CreateCluster Text Text
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 :: (Text -> f Text) -> CreateCluster -> f CreateCluster
createCluster_masterUsername = (CreateCluster -> Text)
-> (CreateCluster -> Text -> CreateCluster)
-> Lens CreateCluster CreateCluster Text Text
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 to 126) except
--     \' (single quote), \" (double quote), \\, \/, \@, or space.
createCluster_masterUserPassword :: Lens.Lens' CreateCluster Prelude.Text
createCluster_masterUserPassword :: (Text -> f Text) -> CreateCluster -> f CreateCluster
createCluster_masterUserPassword = (CreateCluster -> Text)
-> (CreateCluster -> Text -> CreateCluster)
-> Lens CreateCluster CreateCluster Text Text
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 :: CreateCluster -> Request CreateCluster
request = Service -> CreateCluster -> Request CreateCluster
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCluster)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateCluster))
-> Logger
-> Service
-> Proxy CreateCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCluster)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> 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'
            (Maybe Cluster -> Int -> CreateClusterResponse)
-> Either String (Maybe Cluster)
-> Either String (Int -> CreateClusterResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Cluster)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Cluster")
            Either String (Int -> CreateClusterResponse)
-> Either String Int -> Either String CreateClusterResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateCluster

instance Prelude.NFData CreateCluster

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

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

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